CLI Config Schema
Voyager config has two related but separate paths:
- Voyager CLI runtime loads and merges config locally.
- Cloud-served JSON Schema gives editors validation and completion for
voyager.jsonandvoyager.jsonc.
JSON Schema does not load, apply, or override runtime config.
{
"$schema": "https://app.vgercode.com/config.json"
}
Two separate paths
Changing runtime config precedence affects first path. Adding or changing config key affects both paths because editor schema must describe keys CLI accepts. See CLI Runtime config precedence for runtime merge order.
Source of truth
Canonical CLI config source is Effect Schema Config.Info in packages/voyagercode/src/config/config.ts in Voyager-Org/voyager. CLI derives .zod compatibility surface from Effect Schema for plugin and SDK consumers. Do not maintain separate handwritten Zod definition for Voyager config fields.
Cloud schema endpoint
Static source review of Voyager-Org/cloud shows this route behavior:
- Editor fetches
https://app.vgercode.com/config.jsonbecause config file references$schema. - Cloud route
apps/web/src/app/config.json/route.tsfetcheshttps://voyagercode.ai/config.json. - Route runs
merge()and returns upstream schema with Voyager additions and overrides. merge()overlays buckets fromapps/web/src/app/config.json/extras.ts.
Cloud source defines 1-hour upstream revalidation and edge-cache headers. This describes checked-in route behavior, not live deployment or cache state.
Overlay buckets
Reviewed cloud source overlays:
| Bucket | Purpose |
|---|---|
top | Top-level Voyager keys and overrides |
agents | Voyager primary agents under agent |
experimental | Voyager experimental keys under experimental |
Nested CLI fields outside these buckets need dedicated overlay bucket and matching merge() logic.
Failure mode
If cloud overlay misses valid CLI field, CLI can accept config while editor reports unknown property. Opposite drift is also possible: cloud schema can advertise field that runtime no longer accepts.
Treat schema synchronization as cross-repository contract. Tests should detect both missing valid fields and stale overlay entries. Keep branch-specific drift findings in tracked issues or test output, not this architecture page.
Adding or changing Voyager-only config key
- Add or update Effect Schema field with
voyager_changemarker inpackages/voyagercode/src/config/config.ts. - Generate JSON Schema shape:
bun --bun packages/voyagercode/script/schema.ts /tmp/voyager.json jq '.properties.<new_key>' /tmp/voyager.json
- Update matching bucket in
apps/web/src/app/config.json/extras.tsin cloud repo. - Extend
merge()inapps/web/src/app/config.json/route.tswhen new nested bucket is required. - Add assertion in
apps/web/src/tests/cli-config-schema.test.ts. - Audit stale overlay entries as well as missing additions.
CLI schema source lives in Voyager-Org/voyager. Public editor schema overlay lives in Voyager-Org/cloud. Config-key change is incomplete until both repositories agree.
Source map
Repository column identifies source root for each relative path.
| Repository | Source path | Role |
|---|---|---|
Voyager-Org/voyager | packages/voyagercode/src/config/config.ts | Canonical Effect Schema and derived .zod surface |
Voyager-Org/cloud | apps/web/src/app/config.json/route.ts | Cloud overlay route |
Voyager-Org/cloud | apps/web/src/app/config.json/extras.ts | Voyager overlay buckets |
Voyager-Org/cloud | apps/web/src/tests/cli-config-schema.test.ts | Cloud schema assertions |
Related pages
- CLI Runtime - runtime config loading and precedence
- Development Patterns - shared-file markers, Voyager-owned boundaries, and cross-repository contributor workflow