capix-mcp 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +51 -72
  2. package/dist/prompts.d.ts +6 -1
  3. package/dist/prompts.d.ts.map +1 -1
  4. package/dist/prompts.js +41 -75
  5. package/dist/prompts.js.map +1 -1
  6. package/dist/route-families.d.ts +47 -0
  7. package/dist/route-families.d.ts.map +1 -0
  8. package/dist/route-families.js +96 -0
  9. package/dist/route-families.js.map +1 -0
  10. package/dist/server.d.ts +5 -5
  11. package/dist/server.js +8 -8
  12. package/dist/server.js.map +1 -1
  13. package/dist/tools/define-tool.d.ts +6 -0
  14. package/dist/tools/define-tool.d.ts.map +1 -1
  15. package/dist/tools/define-tool.js +1 -0
  16. package/dist/tools/define-tool.js.map +1 -1
  17. package/dist/tools/factory.d.ts +42 -0
  18. package/dist/tools/factory.d.ts.map +1 -0
  19. package/dist/tools/factory.js +363 -0
  20. package/dist/tools/factory.js.map +1 -0
  21. package/dist/tools/generate.d.ts +108 -0
  22. package/dist/tools/generate.d.ts.map +1 -0
  23. package/dist/tools/generate.js +149 -0
  24. package/dist/tools/generate.js.map +1 -0
  25. package/dist/tools/infra-context.d.ts +15 -11
  26. package/dist/tools/infra-context.d.ts.map +1 -1
  27. package/dist/tools/infra-context.js +43 -92
  28. package/dist/tools/infra-context.js.map +1 -1
  29. package/dist/tools/memes.d.ts +31 -0
  30. package/dist/tools/memes.d.ts.map +1 -0
  31. package/dist/tools/memes.js +175 -0
  32. package/dist/tools/memes.js.map +1 -0
  33. package/dist/tools.d.ts +47 -7
  34. package/dist/tools.d.ts.map +1 -1
  35. package/dist/tools.js +341 -891
  36. package/dist/tools.js.map +1 -1
  37. package/dist/types.d.ts +17 -2
  38. package/dist/types.d.ts.map +1 -1
  39. package/dist/types.js +0 -2
  40. package/dist/types.js.map +1 -1
  41. package/package.json +3 -3
package/dist/tools.d.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  /**
2
- * Capix MCP Server — all 64 tool definitions.
2
+ * Capix MCP Server — all 37 tool definitions.
3
+ *
4
+ * 2026-07 repair: every tool below targets a route family that EXISTS in the
5
+ * control plane (app/api/v1/* in the protocol repo), verified route-by-route
6
+ * against the live source. Each tool declares its canonical path (`routePath`)
7
+ * and the registry gate (tools/registry.test.ts) asserts it against the
8
+ * allowlist in route-families.ts — no phantom routes can be re-introduced.
3
9
  *
4
10
  * Each tool is declared with:
5
11
  * - inputShape : a Zod raw shape (validated by the McpServer before dispatch)
@@ -11,17 +17,51 @@
11
17
  * structured content. The CapixApiError (problem+json) thrown by the client is
12
18
  * caught by the server wrapper and surfaced as an MCP error result.
13
19
  *
14
- * Tools are grouped by scope (mirrors services/capix-mcp/tools/*.ts):
15
- * discovery (9) · planning (6) · lifecycle (7) · networking (8) ·
16
- * testing (6) · verification (6) · website (17) · infra-context (5)
20
+ * CRUD-shaped tools are declared with `defineGeneratedTool` (tools/generate.ts)
21
+ * a declarative spec (method, path, input) from which the registration AND
22
+ * the HTTP call are generated instead of a hand-written handler. Everything
23
+ * else uses `defineTool` (tools/define-tool.ts) with an explicit handler.
24
+ *
25
+ * Tools are grouped by scope:
26
+ * discovery (7) · planning (2) · lifecycle (19) · verification (1) ·
27
+ * website (6) · infra-context (2)
28
+ * (The factory tools — jobs/training/agent-deploys — live in
29
+ * tools/factory.ts and join lifecycle; the meme/image tools live in
30
+ * tools/memes.ts: the meme catalog joins discovery, the two billable
31
+ * generators join lifecycle.)
32
+ *
33
+ * Removed in the repair (no backing route in the control plane — hidden, not
34
+ * deleted from git history):
35
+ * - networking scope (8 tools): /api/v1/networking/* and /api/v1/vpc do not
36
+ * exist. Returns with the networking roadmap (N1–N5).
37
+ * - testing scope (6 tools): /api/v1/testing/* does not exist (disposable
38
+ * test envs are not built).
39
+ * - attestation/zkVM/measurement tools (5): /api/v1/verification/* and
40
+ * /api/v1/attestations do not exist. Secured Cloud (TEE/zkVM) is deferred.
41
+ * - planning stubs (capix_compute_plan, capix_model_plan, capix_stack_*):
42
+ * /api/v1/planning/* does not exist; quoting lives at /api/v1/quotes.
43
+ * - lifecycle stubs (capix_start/stop/restart/extend): start/stop exist
44
+ * upstream ONLY as PATCH /api/v1/deployments/[id] { desiredState } with a
45
+ * mandatory If-Match etag — unreachable through the current client
46
+ * surface (no PATCH, no etag access). Restart/extend have no backend.
47
+ * - discovery stubs: capix_projects (no /api/v1/projects),
48
+ * capix_model_catalog (real catalog is /api/v1/models, covered by
49
+ * capix_model_list), capix_attestations (Secured Cloud deferred).
50
+ * - website stubs (12 tools): singular /api/v1/website/* never existed and
51
+ * detect/plan/quote/deploy/preview/deployments/logs/metrics/domains have
52
+ * no routes under the real /api/v1/websites family (build logs surface as
53
+ * `logTail` inside capix_website_get; previews are implicit per release).
54
+ * - infra-context stubs: capix_node_status, capix_earnings_check (no
55
+ * /api/v1/nodes/status or /api/v1/earnings), capix_deployment_list
56
+ * (duplicate of capix_deployments).
17
57
  */
18
58
  import type { ToolDef } from "./types.js";
59
+ import { factoryTools } from "./tools/factory.js";
19
60
  import { infraContextTools } from "./tools/infra-context.js";
61
+ import { memeImageTools } from "./tools/memes.js";
20
62
  declare const discoveryTools: ToolDef[];
21
63
  declare const planningTools: ToolDef[];
22
64
  declare const lifecycleTools: ToolDef[];
23
- declare const networkingTools: ToolDef[];
24
- declare const testingTools: ToolDef[];
25
65
  declare const verificationTools: ToolDef[];
26
66
  declare const websiteTools: ToolDef[];
27
67
  export declare const TOOLS: ToolDef[];
@@ -29,5 +69,5 @@ export declare const TOOL_NAMES: string[];
29
69
  export declare const TOOL_COUNT: number;
30
70
  /** Map of tool name → definition, used by the server for O(1) lookup. */
31
71
  export declare const TOOL_MAP: Map<string, ToolDef>;
32
- export { discoveryTools, planningTools, lifecycleTools, networkingTools, testingTools, verificationTools, websiteTools, infraContextTools };
72
+ export { discoveryTools, planningTools, lifecycleTools, verificationTools, websiteTools, factoryTools, infraContextTools, memeImageTools };
33
73
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAEV,OAAO,EACR,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAqG7D,QAAA,MAAM,cAAc,EAAE,OAAO,EAmK5B,CAAC;AAqCF,QAAA,MAAM,aAAa,EAAE,OAAO,EA8F3B,CAAC;AAMF,QAAA,MAAM,cAAc,EAAE,OAAO,EA0I5B,CAAC;AAMF,QAAA,MAAM,eAAe,EAAE,OAAO,EA8H7B,CAAC;AAMF,QAAA,MAAM,YAAY,EAAE,OAAO,EA4I1B,CAAC;AAMF,QAAA,MAAM,iBAAiB,EAAE,OAAO,EAmI/B,CAAC;AAaF,QAAA,MAAM,YAAY,EAAE,OAAO,EAmU1B,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,OAAO,EAS1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,EAA6B,CAAC;AAE7D,eAAO,MAAM,UAAU,QAAe,CAAC;AAEvC,yEAAyE;AACzE,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAA0C,CAAC;AAErF,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAQ1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,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