create-codemodekit 0.3.0 → 0.5.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 (39) hide show
  1. package/README.md +45 -5
  2. package/dist/agent-plugin.d.ts +6 -7
  3. package/dist/agent-plugin.d.ts.map +1 -1
  4. package/dist/agent-plugin.js +34 -27
  5. package/dist/agent-plugin.js.map +1 -1
  6. package/dist/authoring-skill.d.ts +8 -1
  7. package/dist/authoring-skill.d.ts.map +1 -1
  8. package/dist/authoring-skill.js +17 -38
  9. package/dist/authoring-skill.js.map +1 -1
  10. package/dist/catalog-files.d.ts +28 -0
  11. package/dist/catalog-files.d.ts.map +1 -0
  12. package/dist/catalog-files.js +193 -0
  13. package/dist/catalog-files.js.map +1 -0
  14. package/dist/cli.d.ts +14 -1
  15. package/dist/cli.d.ts.map +1 -1
  16. package/dist/cli.js +345 -39
  17. package/dist/cli.js.map +1 -1
  18. package/dist/index.d.ts +4 -3
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +2 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/scaffold.d.ts +14 -6
  23. package/dist/scaffold.d.ts.map +1 -1
  24. package/dist/scaffold.js +177 -70
  25. package/dist/scaffold.js.map +1 -1
  26. package/dist/source-template.d.ts +31 -0
  27. package/dist/source-template.d.ts.map +1 -0
  28. package/dist/source-template.js +356 -0
  29. package/dist/source-template.js.map +1 -0
  30. package/dist/verify-template.d.ts +2 -0
  31. package/dist/verify-template.d.ts.map +1 -0
  32. package/dist/verify-template.js +113 -0
  33. package/dist/verify-template.js.map +1 -0
  34. package/package.json +5 -5
  35. package/skills/build-codemodekit-plugin/SKILL.md +0 -44
  36. package/skills/build-codemodekit-plugin/agents/openai.yaml +0 -4
  37. package/skills/build-codemodekit-plugin/references/generator.md +0 -42
  38. package/skills/build-codemodekit-plugin/references/plugin-layout.md +0 -38
  39. package/skills/build-codemodekit-plugin/references/programmatic-api.md +0 -48
@@ -1,48 +0,0 @@
1
- # Programmatic API
2
-
3
- Import the builders from `create-codemodekit`.
4
-
5
- ## Scaffold the full project
6
-
7
- ```ts
8
- import { parseMcpCommand, scaffoldCodeModeMcp } from "create-codemodekit";
9
-
10
- const result = await scaffoldCodeModeMcp({
11
- targetDirectory: "my-code-mode",
12
- mcpName: "upstream",
13
- mcpCommand: parseMcpCommand("uvx upstream-mcp"),
14
- agentPlugin: true,
15
- });
16
- ```
17
-
18
- Installation and the project authoring skill default to enabled. Pass `install: false` or `authoringSkill: false` only when intentionally deferring those steps.
19
-
20
- `agentPlugin` also accepts configuration:
21
-
22
- ```ts
23
- agentPlugin: {
24
- pluginName: "my-code-mode",
25
- skillName: "use-my-code-mode",
26
- description: "Use the upstream service through Code Mode.",
27
- license: "Apache-2.0",
28
- sync: true,
29
- }
30
- ```
31
-
32
- ## Scaffold only plugin components
33
-
34
- Use `scaffoldAgentPlugin` when a project already owns its server entrypoint. It writes `plugin.json`, `mcp.json`, the companion `SKILL.md`, and pending references.
35
-
36
- Use `buildAgentPlugin` to create the dependency-free `dist/plugin` artifact. Use `installCursorPlugin`, `getCursorPluginStatus`, and `uninstallCursorPlugin` for Cursor's concrete local copy.
37
-
38
- Use `installProjectAuthoringSkill` to add the bundled development-time skill to an existing project at `.agents/skills/build-codemodekit-plugin`.
39
-
40
- ## Refresh references
41
-
42
- Call `syncAgentPluginSkill` with a started or startable CodeModeKit `CodeMode` instance. The function reads the revisioned TypeScript catalog, rejects degraded or unstable snapshots, and atomically replaces `references/tools.d.ts` and `references/catalog-metadata.json`.
43
-
44
- Close the Code Mode application in a `finally` block after syncing.
45
-
46
- ## Observe execution
47
-
48
- The high- and low-level constructors accept an `observer` callback. Use it for metrics, tracing, and audit correlation. Events contain IDs, source/tool names, byte counts, durations, outcomes, and stable error codes; they intentionally exclude authored code, arguments, results, logs, and diagnostic messages. Keep payload logging as a separate, explicit host decision.