Redesigned high-performance local search and indexing engine
Project description
sari v2
LSP-first 로컬 인덱싱/검색 엔진 + MCP 데몬.
설치
필수 런타임: Python 3.14+
uv tool install sari
# 또는
python3 -m pip install sari
기본 사용
sari doctor
sari daemon start
sari roots add /absolute/path/to/repo
sari roots deactivate /absolute/path/to/repo
sari roots activate /absolute/path/to/repo
Workspace 활성 정책 (Soft-OFF)
is_active는 수집/도구 접근 제어 플래그다.
is_active=true: 수집 루프와 MCP/HTTP repo 해석 경로에서 정상 접근된다.is_active=false: 수집 스케줄 및 watcher 등록에서 제외되고, 도구 접근은ERR_WORKSPACE_INACTIVE로 차단된다.- Soft-OFF 정책: 비활성화 시 기존 인덱스/메타데이터는 즉시 삭제하지 않는다(데이터 유지).
자세한 운영 규칙은 docs/workspace_activation_policy.md를 참고한다.
MCP 연동 (권장)
sari install --host gemini
sari install --host codex
- Gemini/Codex 설정에
command = "sari"+args = ["mcp","stdio"]를 자동 반영한다. - Codex 설정에는
startup_timeout_sec = 45를 기본 반영한다. - 기존 설정 파일은
.bak.<timestamp>로 백업된다.
MCP handshake timeout 대응
MCP 클라이언트에서 아래와 같은 메시지가 보이면 startup timeout이 짧은 경우가 많다.
MCP client for "sari" timed out after 10 secondsMCP startup incomplete
Codex 설정(~/.codex/config.toml)에서 startup_timeout_sec를 늘려준다.
[mcp_servers.sari]
command = "sari"
args = ["mcp", "stdio"]
startup_timeout_sec = 45
- 권장 시작값:
30 - 대형 DB/느린 디스크/초기 마이그레이션 환경:
45~60
수동 설정 예시
Gemini (~/.gemini/settings.json)
{
"mcpServers": {
"sari": {
"command": "sari",
"args": ["mcp", "stdio"]
}
}
}
Codex (~/.codex/config.toml)
[mcp_servers.sari]
command = "sari"
args = ["mcp", "stdio"]
startup_timeout_sec = 45
Troubleshooting
sqlite3.OperationalError: no such column: repo_id
기존(구버전) state.db를 현재 바이너리와 함께 사용할 때 발생할 수 있다.
복구 절차:
- 기존 DB 백업
- 새 DB 경로로 부팅해 초기 스키마/마이그레이션을 완료
sari doctor와 MCP 연결 재확인
예시:
# 1) 백업
cp ~/.local/share/sari-v2/state.db ~/.local/share/sari-v2/state.db.bak.$(date +%Y%m%d-%H%M%S)
# 2) 새 DB로 실행(임시/영구 경로 모두 가능)
export SARI_DB_PATH=~/.local/share/sari-v2/state.new.db
# 3) 상태 확인
sari doctor
설치 직후 최소 점검 순서
sari doctor
sari install --host codex
# Codex config.toml에서 startup_timeout_sec = 30~60 확인
개발 검증
uv run pytest -q .
tools/ci/run_installed_freshdb_smoke.sh
uv run tools/ci/run_release_gate.sh
tools/manual/test_mcp_call_flow.sh /absolute/path/to/repo
GitHub Actions 배포
Release 워크플로우 파일: .github/workflows/release-pypi.yml
1) TestPyPI 선검증 (권장)
- GitHub Actions에서
Release PyPI를 수동 실행한다. - 입력값
publish_to_testpypi=true로 실행한다. buildjob에서 release gate + wheel/sdist 빌드 + twine check 통과를 확인한다.publish-testpypijob 성공과release-distartifact 업로드를 확인한다.
2) PyPI 실배포
pyproject.toml버전을 확정한다.- 동일 버전 태그(
v<version>)를 push 한다. 예:v2.0.14 - 워크플로우의 tag/version 일치 검증 통과 후
publish-pypijob 성공을 확인한다.
로컬 wheel 테스트 (글로벌 tool 오염 방지)
로컬 빌드 산출물 검증은 uv tool install dist/*.whl 대신 아래 스크립트를 사용한다.
uv run --with build python -m build
tools/manual/test_local_wheel_ephemeral.sh
- 위 방식은
uvx --from <wheel>로 일회성 실행만 하므로,~/.local/bin/sari글로벌 설치를 덮어쓰지 않는다. - 글로벌 업그레이드는 계속
uv tool upgrade sari를 사용한다.
실수로 글로벌 tool을 로컬 wheel로 덮어쓴 경우 복구
tools/manual/repair_global_sari_tool.sh
# 특정 버전으로 복구
tools/manual/repair_global_sari_tool.sh 2.0.13
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sari-2.0.47.tar.gz.
File metadata
- Download URL: sari-2.0.47.tar.gz
- Upload date:
- Size: 3.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
669b100efaea469ec73aff134f57c02e416e7a185d9fad889c92b9a4192b8d49
|
|
| MD5 |
38d96dab8ad37518ea75ac94653ab4f5
|
|
| BLAKE2b-256 |
1de9ff49fec4369fde7ee2a49c56f7ad42fea5d4a9a15479f3fba087570f701f
|
Provenance
The following attestation bundles were made for sari-2.0.47.tar.gz:
Publisher:
release-pypi.yml on BaeCheolHan/sari
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sari-2.0.47.tar.gz -
Subject digest:
669b100efaea469ec73aff134f57c02e416e7a185d9fad889c92b9a4192b8d49 - Sigstore transparency entry: 1171451729
- Sigstore integration time:
-
Permalink:
BaeCheolHan/sari@b25ebfdf958490398d9e33d3ced2f36aacb4dc0b -
Branch / Tag:
refs/tags/v2.0.47 - Owner: https://github.com/BaeCheolHan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@b25ebfdf958490398d9e33d3ced2f36aacb4dc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file sari-2.0.47-py3-none-any.whl.
File metadata
- Download URL: sari-2.0.47-py3-none-any.whl
- Upload date:
- Size: 4.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f98d921fc15171d573990b0eb08a1767f6a3736b32399097f0ed25b794585146
|
|
| MD5 |
3a61079d44a0b74361d121e10b309cc0
|
|
| BLAKE2b-256 |
8a52c2f6f1938b5a1ffbe9dce637047b7b5a0855064e52f8400d29898f759e4d
|
Provenance
The following attestation bundles were made for sari-2.0.47-py3-none-any.whl:
Publisher:
release-pypi.yml on BaeCheolHan/sari
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sari-2.0.47-py3-none-any.whl -
Subject digest:
f98d921fc15171d573990b0eb08a1767f6a3736b32399097f0ed25b794585146 - Sigstore transparency entry: 1171451730
- Sigstore integration time:
-
Permalink:
BaeCheolHan/sari@b25ebfdf958490398d9e33d3ced2f36aacb4dc0b -
Branch / Tag:
refs/tags/v2.0.47 - Owner: https://github.com/BaeCheolHan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@b25ebfdf958490398d9e33d3ced2f36aacb4dc0b -
Trigger Event:
push
-
Statement type: