feat(cli): add mcpctl config prime-agent — proxy MCP + skills sync for prime-agent
#93
Reference in New Issue
Block a user
Delete Branch "feat/config-prime-agent"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
mcpctl config prime-agent— a mirror ofmcpctl config claudethat wires a project's proxy MCP gateway and skills sync into prime-agent (Claude's open-source counterpart, which talks to the same mcpctl gateway over HTTP instead of stdio).mcpctl config prime-agent --project X:~/.prime/agent/settings.jsonasmcpServers.X = { type: "http", url: <gateway>/projects/X/mcp }, merging with any existing servers (e.g. the bundledsreproject) and preserving all other settings..mcpctl-projectmarker so later syncs resolve the project scope.~/.prime/agent/skills/<name>/as markdown skills (prime-agent auto-discovers them at session start).Also adds
mcpctl skills sync --agent prime-agentto re-sync the tree later, regenerated shell completions, README documentation, and unit tests.What changed
src/cli/src/config/prime-agent.ts— prime-agent settings.json read/merge/write helperssrc/cli/src/utils/prime-agent-skills.ts— prime-agent skill sync (reuses atomic install + hash-pinned state; skips Claude-only hooks/postInstall)src/cli/src/commands/config.ts/skills.ts— command wiring (--agent prime-agent,prime-agent/prime-agent-generatealiases)completions/*regenerated;completions.test.tshardened (anchored thecreate agentregex)tests/commands/prime-agent.test.ts,tests/utils/prime-agent-skills.test.tsValidation
tsc --buildpasses; full CLI test suite 525/525 greeninitialize→begin_session→tools/list(121 tools) → realtools/callround-tripmcpctl config prime-agent— proxy MCP + skills sync for prime-agentMirror `mcpctl config claude` for prime-agent (which talks to the same mcpctl proxy MCP gateway over HTTP instead of stdio): `mcpctl config prime-agent --project X`: - registers the proxy MCP gateway in ~/.prime/agent/settings.json as mcpServers.X = { type: "http", url: <gateway>/projects/X/mcp }, merging with any existing servers (e.g. the bundled `sre` project) and preserving all other settings - writes a .mcpctl-project marker so later syncs resolve the project - syncs the project's skills into ~/.prime/agent/skills/<name>/ as markdown skills (prime-agent auto-discovers them at session start) New `mcpctl skills sync --agent prime-agent` target re-syncs the tree later. - src/cli/src/config/prime-agent.ts: settings.json read/merge/write helpers - src/cli/src/utils/prime-agent-skills.ts: prime-agent sync (reuses installSkillAtomic + skills-state; skips Claude-only hooks/postInstall) - completes config.ts/skills.ts wiring; regenerated shell completions - tests: commands/prime-agent.test.ts + utils/prime-agent-skills.test.ts