@ekanos/cli, @ekanos/sdk, @ekanos/ui, @ekanos/integration-schema, and @ekanos/harness. Three independent defenses keep it in sync:
1. Schema-version skew gate
validate and publish bundle an exact @ekanos/integration-schema version. If the project resolves a newer one (checked against both a direct install and what @ekanos/sdk declares), both verbs fail fast with precondition_failed (exit 9) — before loading the definition at all.
Why this matters
unrecognized_keys issue, and the usual hint would tell you to delete correct code. So the CLI fails loudly instead.
Older project schema (warning only)
If the project’s schema is older, the verb continues and warns on stderr:data.schemaSkew in this case.
2. ekanos upgrade
The primary way to keep the toolchain coherent.
Coherence guarantee
upgrade resolves a coherent target version set — from GET /api/partner/toolchain on your logged-in host when available, else the npm registry. @ekanos/sdk, @ekanos/ui, and @ekanos/integration-schema must share one version, and the SDK release at that version must pin exactly that schema.
An incoherent set (for example, mid-way through a multi-package publish) is refused with precondition_failed (exit 9) rather than turned into an uninstallable tree:
Install and verify
- Snapshot —
package.jsonand the lockfile are saved - Install — Target versions of the toolchain packages that are direct dependencies are installed; transitive ones follow from whatever pins them and are listed in
data.skippedTransitive - Verify —
ekanos validateand your test script run - Rollback — On any failure,
package.jsonand the lockfile are restored and a reinstall restoresnode_modules
upgrade prints the plan and asks Upgrade now? [y/N]. Outside a real TTY it requires --yes; without it, it fails with validation (exit 3) and changes nothing. If the project is already at the target, it reports so and exits 0.
A failed step is reported with an error.code naming it and the step’s output in data.output:
The hint confirms the project has been restored to its pre-upgrade state.
Agent-context file regeneration
After a successful upgrade,ekanos upgrade regenerates:
AGENTS.mdCLAUDE.md.claude/skills/ekanos/SKILL.md
docs/api-notes.md and .mcp.json are created if missing, never overwritten.
A stale AGENTS.md teaches an agent yesterday’s contract, which is as harmful as a stale binary.
Flags
boolean
Read-only. Report current vs. target versions and exit 0. Changes nothing.
Safe for CI and scripts.
boolean
Skip the interactive confirm. Required outside a real TTY (scripts, cron,
containers).
boolean
Skip the post-install verification step. Not recommended.
string
Ekanos host to fetch the target version set from. Falls back to host
resolution (see Authentication). With
no stored session for the host, the npm registry is used.
string
Project directory (contains
ekanos.json). Defaults to the current working
directory.3. Proactive update notice
validate, dev, publish, and status check in the background whether a newer @ekanos/cli exists.
How it works
- Cached — 24-hour cache
- Bounded — 1.5 second ceiling on network time
- Non-fatal — never changes the command’s exit code
- Silent when current — no notice if you’re up to date
data.toolchain:
claude-code-hint line so agents can parse it without reading prose.
Unsupported version
If you’re below the host’s declared minimum CLI version, the notice’sstatus is unsupported and human mode prints:
publish then fails fast with precondition_failed (exit 9), because the host would refuse the submission anyway:
Disable update checks
Workflow examples
Before you publish
Team with a shared lockfile
Commitpackage.json and the lockfile so everyone runs the same toolchain. One person upgrades for the team:
CI/CD pipeline
Agent-driven updates
ekanos upgrade --yes means the project was restored; read error.code and data.output for the failing step.
Troubleshooting
CLI too old for the installed harness
dev refuses (exit 9) before writing anything. The hint gives the install command to upgrade the CLI. The reverse case, @ekanos/harness <version> is too old for @ekanos/cli <version>, gives the command to upgrade the harness.
Fix: Run ekanos upgrade, or follow the hint.
Project schema newer than the CLI
See the schema-version skew gate section at the top of this page. Fix: Runekanos upgrade --check to see the target, then ekanos upgrade.
Upgrade rolled back
The install, validate, or test step failed and the project was restored.error.code names the step and data.output holds its output.
Fix: Fix the underlying issue (often a test failure against the new versions) and re-run ekanos upgrade.
No target available
Edited agent-context files
upgrade leaves an AGENTS.md, CLAUDE.md, or skill file you’ve edited untouched and reports it as needing manual attention.
Fix: Compare it against the new template and merge by hand.