@odradekk/vera-ccc-tools
CocoIndex Code semantic search tools for Vera agent
Package details
Install @odradekk/vera-ccc-tools from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@odradekk/vera-ccc-tools- Package
@odradekk/vera-ccc-tools- Version
0.2.0- Published
- Jun 12, 2026
- Downloads
- 34/mo · 17/wk
- Author
- odradekk
- License
- MIT
- Types
- extension
- Size
- 50.7 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
vera-ccc-tools
Purpose
Expose CocoIndex Code (ccc) as native Pi/Vera tools so semantic code search and index management are available without going through raw bash.
Registered tools
ccc_search— semantic code search viaccc searchccc_index— build or refresh the project index viaccc indexccc_init— initialize the current project for CocoIndex Code viaccc initccc_doctor— run CocoIndex diagnostics viaccc doctor
Project index status (ccc status) is not a tool. It is surfaced as an always-on ccc-status segment at the end of the system prompt, refreshed once per user turn.
Design notes
- Uses the installed
cccexecutable fromPATH - Executes commands in the current project
cwd - Returns truncated text output suitable for the model context
- Keeps semantic search as a first-class tool while leaving exact file lookup to
fd/rg/read - Forces UTF-8 on spawned
cccprocesses (PYTHONIOENCODING/PYTHONUTF8) so non-ASCII index content is not mangled when captured on Windows
Gitignore sync
Index exclusion is kept aligned with the project's effective .gitignore, because ccc's own gitignore matcher is unreliable on Windows. git is the source of truth: git ls-files -o -i --exclude-standard --directory -z yields the ignored set (platform-uniform forward-slash paths), which is converted to **/<path>/** globs and merged into .cocoindex_code/settings.yml exclude_patterns.
- Sync runs before
ccc_search(whenrefresh_indexis on — the default), at the start ofccc_index, and after a foregroundccc_init.ccc_searchis the hot path, so newly-ignored files drop out of results on the next search rather than waiting for an explicit re-index. - Idempotent: a sidecar (
.cocoindex_code/.vera-gitignore-sync.json) tracks the patterns this tool injected. Each sync reconciles only that set, preservingcccdefaults and any user-added patterns. No disk write when the ignored set is unchanged. - Fallback: a non-git directory, missing
git, or an empty ignored set leavesexclude_patternsatccc's defaults. - Cost: one
git ls-filescall (~tens of ms) per refreshing search.
Implemented in src/gitignore-sync.ts.
Non-goals
- replacing
rg/fdfor exact text or path lookup - destructive reset / daemon stop controls
- direct MCP transport management
External dependencies
cccinstalled and available onPATH- CocoIndex daemon health for index/search operations
- initialized project for
ccc_searchunlessccc_indexorccc_inithas been run git(optional) — enables gitignore sync; when absent, exclusion falls back tocccdefaults
Smoke
npm run smoke- from project root:
node packages/vera-ccc-tools/scripts/smoke.mjs
Loaded through agent/settings.json as ./packages/vera-ccc-tools.