Skip to content

Commit d237d17

Browse files
TheodoreSpeaksclaude
authored andcommitted
feat(cli): pick up the new v2 domains; discover modules instead of listing them
Merges `v2-api-spec` (#6150 — v2 endpoints for MCP servers, skills, custom tools, folders, credentials) and the newer `improvement/v2-endpoints`. `DOMAINS` and `SPEC_FILES` were hardcoded. Five new contract modules and a new `openapi-v2-resources.json` had landed, and the generator would have skipped every one — silently, with `--check` still passing, because the generated file matched a generator that never looked. Both are now discovered from disk. That is the same silent-drop class the review rounds kept surfacing, and it is the property the whole pipeline rests on: a new v2 domain should reach the CLI by regenerating, not by remembering to edit a list. Result: 47 → 72 operations, 13 contract modules, and 25 new commands (`sim skills list`, `sim mcp-servers get`, `sim folders delete`, …) with no CLI change beyond the discovery fix. Summaries for the new domains now resolve too, so their `--help` reads properly instead of falling back to `METHOD /path`. Five new DELETEs arrived ungated. `deleteFolder` is the sharpest — the route archives the folder *and cascades to its contents* — so its message says so rather than reading like a single-item removal. Added a test asserting every DELETE carries a confirmation, with `undeployWorkflow` the one documented exception (reversible by redeploying). It fails against this commit's own starting state, so the next domain to arrive cannot land ungated the way these did. `lib/skills/orchestration/skill-lifecycle.ts`, added by #6150, imports `OrchestrationErrorCode` from `@/lib/workflows/orchestration/types`, which does not exist — the type lives in `@/lib/core/orchestration/types`, where every other consumer reads it. The branch does not type-check without this. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsThUPqZXjwuuyRjBbmVkj
1 parent b9be0c7 commit d237d17

4 files changed

Lines changed: 1166 additions & 32 deletions

File tree

packages/sim-cli/src/contract/commands.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ export const CLI_CONTRACT: CliContract = {
4242
deleteKnowledgeBase: { confirm: 'This deletes the knowledge base and every document in it.' },
4343
deleteKnowledgeDocument: { confirm: 'This deletes the document and its embeddings.' },
4444
deleteFile: { confirm: 'This archives the file.' },
45+
deleteSkill: { confirm: 'This deletes the skill.' },
46+
deleteCustomTool: { confirm: 'This deletes the custom tool.' },
47+
deleteMcpServer: {
48+
confirm: 'This removes the MCP server and the tools it provides.',
49+
},
50+
deleteCredential: {
51+
confirm: 'This deletes the credential; anything authenticating with it stops working.',
52+
},
53+
deleteFolder: {
54+
// The route archives the folder *and cascades to its contents*, so this is
55+
// the broadest delete on the surface — the message says so rather than
56+
// reading like a single-item removal.
57+
confirm: 'This archives the folder and everything inside it.',
58+
},
4559

4660
// ─── Fields whose type misdescribes their meaning ─────────────────────────
4761
// `z.string()` that the route splits on commas. No generator can infer this.

0 commit comments

Comments
 (0)