Parallel real-environment tests (graphify 0.9.23, Sourcebot v5 in Docker,
gbrain 0.42.56) surfaced real mismatches:
- graphify: build via `graphify update <dir>` (the local, no-LLM path) instead
of `graphify <dir>` (which runs an LLM backend needing a key + network, so the
old path wasn't actually local); query via `graphify query --graph <graph.json>`
so it reads the indexed graph regardless of cwd; parse the real NODE/EDGE output
(file lives at src=/at=) instead of an invented format.
- sourcebot: Sourcebot v5 gates /api/search behind auth — send
`Authorization: Bearer <SOURCEBOT_API_KEY>`; treat 401/403 as PROVIDER_UNAVAILABLE;
make status probe /api/search without following the login redirect.
- gbrain: degrade engine/DB init failures (e.g. pglite WASM, garrytan/gbrain#223)
to PROVIDER_UNAVAILABLE with a one-line message instead of PROVIDER_ERROR + a raw
stack dump; drop flags the real CLI doesn't define (`sync --strategy`,
`search --source`); align put/delete to stdin, export to brain-wide.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
contract.ts: repo-oriented interface (four required ops, three optional),
typed CodeProviderError, egress + capability consent guards.
Three real, runtime-drivable adapters:
- GbrainProvider: gbrain CLI (reuses lib/gbrain-exec + lib/gbrain-sources),
all seven capabilities.
- GraphifyProvider: graphify CLI — `graphify <dir>` builds the local graph,
`graphify query` searches it, export reads graphify-out/graph.json. Fully
local; never auto-installed.
- SourcebotProvider: self-hosted server over HTTP — register writes a local
git connection to config.json, search is POST /api/search, status is a
liveness probe. Loopback base URL = local (no egress); remote = consent.
selection.ts persists the chosen provider + per-repo indexing consent under
$GSTACK_HOME. picker.ts recommends GBrain first, resolves the selected
provider or null (provider-OFF), and probes live availability. Every adapter
degrades to PROVIDER_UNAVAILABLE when its tool/server is absent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>