Add JSON search, JSON-RPC bridge, and repo-scoped vector partitions to ccc#153
Open
faysou wants to merge 1 commit into
Open
Add JSON search, JSON-RPC bridge, and repo-scoped vector partitions to ccc#153faysou wants to merge 1 commit into
faysou wants to merge 1 commit into
Conversation
47e7a1d to
589b07d
Compare
Contributor
Author
|
Fyi, I've done this PR to be able to integrate ccc with gitnexus for the semantic search part, and it works for me locally. Gitnexus works at single repo level but I use one index to index all my repos at the same time. The repo key is useful so gitnexus can filter ccc results on a single result, else a query was taking 25 seconds instead of half a second. |
af78391 to
c662652
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--jsonoption toccc search.ccc bridge --jsonrpcas a long-running stdin/stdout bridge for external tools.--repo-keyandrepo_keyssearch filtering for workspace indexes containing multiple repositories.repo_keyon indexed chunks and makes it a sqlite-vec partition key alongsidelanguage.repo_keyfrom the nearest.gitroot relative to the CocoIndex project root, so nested repos such asADK/a2a-samplesare scoped exactly.repo_keyby falling back to the previous path-glob scan.Design decisions
ping,search, andshutdown; bridge errors are returned as JSON-RPC error objects rather than printed to stdout.repo_keyis a stored partition key so new workspace indexes can use fast KNN search with repo-level filtering instead of a full vector scan.code_chunks_vechas norepo_keycolumn,repo_keys=["nautilus_trader"]is translated tofile_path GLOB "nautilus_trader/*".Files changed
src/cocoindex_code/cli.py.src/cocoindex_code/client.py.src/cocoindex_code/daemon.py.src/cocoindex_code/indexer.py.src/cocoindex_code/project.py.src/cocoindex_code/protocol.py.src/cocoindex_code/query.py.src/cocoindex_code/schema.py.src/cocoindex_code/server.py.src/cocoindex_code/shared.py.tests/test_cli_helpers.py.tests/test_indexer_helpers.py.tests/test_protocol.py.Validation
uv run pytest.uv run ruff check ...on the touched source and test files.uv run mypy.uv run prek run --all-files --verbose --show-diff-on-failure --skip pytest.ccc search --json --repo-key nautilus_trader --limit 1 streamwriteragainst the existing Nautilus workspace index and validated JSON output.