@cyanheads/mcp-ts-core 0.10.5 → 0.10.7

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 (35) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/biome.json +2 -2
  4. package/changelog/0.10.x/0.10.5.md +5 -5
  5. package/changelog/0.10.x/0.10.6.md +37 -0
  6. package/changelog/0.10.x/0.10.7.md +49 -0
  7. package/dist/logs/combined.log +8 -0
  8. package/dist/logs/error.log +4 -0
  9. package/dist/logs/interactions.log +0 -0
  10. package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts.map +1 -1
  11. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js +9 -4
  12. package/dist/services/canvas/providers/duckdb/DuckdbProvider.js.map +1 -1
  13. package/package.json +21 -27
  14. package/scripts/build-changelog.ts +9 -0
  15. package/scripts/check-framework-antipatterns.ts +10 -0
  16. package/scripts/check-skill-versions.ts +1 -0
  17. package/scripts/clean-mcpb.ts +118 -0
  18. package/scripts/devcheck.ts +30 -13
  19. package/scripts/lint-packaging.ts +312 -66
  20. package/skills/api-auth/SKILL.md +1 -1
  21. package/skills/api-errors/SKILL.md +1 -1
  22. package/skills/api-services/SKILL.md +1 -1
  23. package/skills/api-telemetry/SKILL.md +1 -1
  24. package/skills/field-test/SKILL.md +1 -1
  25. package/skills/git-wrapup/SKILL.md +4 -3
  26. package/skills/orchestrations/SKILL.md +2 -2
  27. package/skills/orchestrations/workflows/fix-wrapup-release.md +9 -5
  28. package/skills/polish-docs-meta/SKILL.md +4 -2
  29. package/skills/report-issue-local/SKILL.md +1 -1
  30. package/skills/tool-defs-analysis/SKILL.md +1 -1
  31. package/templates/AGENTS.md +2 -2
  32. package/templates/CLAUDE.md +2 -2
  33. package/templates/manifest.json +0 -1
  34. package/templates/package.json +1 -1
  35. package/templates/src/index.ts +2 -0
@@ -4,7 +4,7 @@ description: >
4
4
  Authentication, authorization, and multi-tenancy patterns for `@cyanheads/mcp-ts-core`. Use when implementing auth scopes on tools/resources, configuring auth modes (none/jwt/oauth), working with JWT/OAuth env vars, or understanding how tenantId flows through ctx.state.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.1"
7
+ version: "1.2"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -4,7 +4,7 @@ description: >
4
4
  McpError constructor, JsonRpcErrorCode reference, and error handling patterns for `@cyanheads/mcp-ts-core`. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.6"
7
+ version: "1.7"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -4,7 +4,7 @@ description: >
4
4
  API reference for built-in service providers (LLM, Speech, Graph). Use when looking up service interfaces, provider capabilities, or integration patterns.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.3"
7
+ version: "1.4"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -4,7 +4,7 @@ description: >
4
4
  Catalog of OpenTelemetry instrumentation built into framework `@cyanheads/mcp-ts-core` — spans, metrics, completion logs, env config, runtime caveats, custom instrumentation patterns, and cardinality rules. Use when enabling OTel export, adding custom spans or metrics in services, debugging missing telemetry, looking up attribute names, or deciding what's safe to put on a metric attribute vs. a span.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.0"
7
+ version: "1.1"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -4,7 +4,7 @@ description: >
4
4
  Exercise tools, resources, and prompts against a live HTTP server via MCP JSON-RPC over curl. Starts the server, surfaces the catalog, runs real and adversarial inputs, and produces a tight report with concrete findings and numbered follow-up options. Use after adding or modifying definitions, or when the user asks to test, try out, or verify their MCP surface.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.5"
7
+ version: "2.6"
8
8
  audience: external
9
9
  type: debug
10
10
  ---
@@ -4,7 +4,7 @@ description: >
4
4
  Land working-tree changes as logical commits — the work grouped by concern, topped by a release commit (version bump, changelog, regenerated artifacts) and an annotated tag. Verify, commit, tag. Stops at "committed and tagged locally" — no push, no publish. The release-and-publish skill picks up from here. Distilled from the git_wrapup_instructions protocol.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.2"
7
+ version: "1.4"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -159,7 +159,7 @@ Use `-m` with embedded newlines in the string (the commit `-m`-only constraint a
159
159
  ```
160
160
  <theme — omit version number, GitHub prepends v<VERSION>:>
161
161
 
162
- <1-2 sentence context: what this release does>
162
+ <optional context one concise line, two max>
163
163
 
164
164
  <Sections — Keep a Changelog names, only those with entries>
165
165
 
@@ -182,6 +182,7 @@ Dependency bumps:
182
182
 
183
183
  **Rules:**
184
184
  - Subject line omits the version number (GitHub prepends `v<VERSION>:` to the release title)
185
+ - **No narrative preamble** — context under the subject is one concise line, two max; never paragraph blocks. Detail belongs in the bullets
185
186
  - Not a CHANGELOG copy — terse, scannable
186
187
  - No marketing adjectives
187
188
  - Length is earned — two-line tags are fine for small patches
@@ -204,7 +205,7 @@ If the working tree isn't clean or the tag doesn't point at HEAD, something went
204
205
  - **Local only.** No `git push`, no remote operations
205
206
  - **Never stash.** Not for quick checks, not for testing, not for any reason
206
207
  - **Never destructive.** No `git reset --hard`, `git restore .`, `git clean -f`, `git checkout -- .`
207
- - **Bash git only** when running inside orchestrated sub-agents (git-mcp-server session state leaks across parallel agents)
208
+ - **Bash git only.** Drive every git operation through the shell
208
209
  - If `v<version>` already exists as a tag, **halt and report the conflict** — include the version string, existing tag SHA, and current HEAD SHA so the caller can resolve it. Do not delete or move tags without explicit authorization
209
210
 
210
211
  ## Checklist
@@ -4,7 +4,7 @@ description: >
4
4
  Pick and run a multi-phase workflow that chains foundational task skills (`git-wrapup`, `release-and-publish`, `maintenance`, `field-test`, `setup`, etc.) end-to-end. Routes user intent to a workflow file under `workflows/` — greenfield builds, maintenance + release, field-test + fix, or known-work + release. Single source for the universal rules (no commits without authorization, no destructive git, no marketing language), the orchestrator posture (own the goal, ground sub-agents in primary sources, verify against the goal), and the sub-agent strategy (orient block, parallel fanout, isolation, normalization) that apply across every workflow. Sub-agents are an optional capability — workflows run linearly when fanout isn't available.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.2"
7
+ version: "1.4"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -140,7 +140,7 @@ The sub-agent reads the primary sources directly during orient (step 6) — do n
140
140
 
141
141
  ### Isolation rules
142
142
 
143
- 1. **Bash `git` only in parallel sub-agents.** Do not let parallel sub-agents call `mcp__git-mcp-server__*` tools session state (`set_working_dir`) leaks across parallel calls in the same orchestrator session, causing silent no-ops, wrong-directory operations, and false "tag already exists" errors. Bash `git` in the agent's CWD is reliable. The orchestrator may still use `git-mcp-server` itself in serial.
143
+ 1. **Bash `git` in each sub-agent's own CWD.** Parallel sub-agents run git through the shell against their own working directory independent, no shared state across agents.
144
144
 
145
145
  2. **Sub-agents do not receive this orchestrations skill or workflow files.** Their prompts include Tier 1 skill paths only. This prevents recursive sub-agent spawning — if a sub-agent decides it needs to fan out work, that's a signal the orchestrator sliced the work too wide. Re-slice; don't let the sub-agent recurse.
146
146
 
@@ -63,7 +63,7 @@ Each phase's Objective column is the goal state per target — the verifiable en
63
63
  | 1b | Fix | Per target: targeted issues fixed in source, tests updated/added, `devcheck` + `rebuild` + `test` green, each fixed issue commented with fix details, working tree dirty for review | parallel fanout (one sub-agent per target — hard constraint) | **barrier** — orchestrator reviews diffs before verify (explicit gate in checklist) |
64
64
  | 2 | Verify | Per target: full diff cold-reviewed; simplified if warranted; each fix re-exercised against the running server with actual tool output in the summary | parallel fanout | **barrier** — orchestrator reviews simplified diff and verified outputs; release authorization required |
65
65
  | 3 | Wrap-up + release | Per target: fixes split into per-file commits with a release commit on top; annotated tag; published per repo visibility; tag annotation is structured markdown with issue backlinks | parallel fanout (Bash git only) | gate-free |
66
- | 4 | Issue cleanup | Every GH issue that shipped a fix closed with "Fixed in v\<version\>" comment | orchestrator (serial) | — |
66
+ | 4 | Issue cleanup | Every shipped issue closed (reason: completed) carrying exactly one what-landed comment that cites the version | orchestrator (serial) | — |
67
67
 
68
68
  Phase 1a is conditional — only runs when the input is a handoff document or otherwise unvalidated. When the input is already tracked GH issues, skip directly to Phase 1b. The release portion of Phase 3 is conditional on user authorization to ship.
69
69
 
@@ -137,14 +137,18 @@ The tag annotation and changelog cover ALL fixes — the commit split is about g
137
137
  **Tag annotations** are for end users — internal dev cleanup (lockfile refreshes, linter fixes, build config) belongs in commit bodies, not the tag annotation.
138
138
 
139
139
  ### Phase 4: Issue cleanup
140
- Close issues that shipped fixes — only those. Skipped issues stay open.
140
+ Close issues that shipped — only those. Skipped issues stay open.
141
+
142
+ Each issue gets exactly ONE substantive comment recording what landed — concrete changes, file paths, and the version — written either by the fix sub-agent (Phase 1b) or by the orchestrator here. Then close without an additional comment:
141
143
 
142
144
  ```bash
143
- for n in <fixed-issue-numbers>; do
144
- gh issue close "$n" -R "<owner>/<repo>" --reason completed --comment "Fixed in v<version>."
145
+ for n in <shipped-issue-numbers>; do
146
+ gh issue close "$n" -R "<owner>/<repo>" --reason completed
145
147
  done
146
148
  ```
147
149
 
150
+ If no what-landed comment exists yet, the version belongs in that one comment ("Shipped in v\<version\>: …"). Never stack a bare "Fixed in v\<version\>" trailer on top of an existing summary — it duplicates the record, and "fixed" misdescribes enhancements (enhancements ship/land; only bugs are fixed).
151
+
148
152
  ## Workflow-specific gotchas
149
153
 
150
154
  | # | Gotcha | Mitigation |
@@ -170,6 +174,6 @@ done
170
174
  - [ ] Orchestrator gate after Phase 2: simplified diff reviewed, field-test claims verified
171
175
  - [ ] Phase 3: version bumped, fix commits + release commit, annotated tag per target — scope matches private/public status
172
176
  - [ ] Phase 3: published per scope (push, npm if public, MCP Registry if applicable, GH release, Docker if applicable)
173
- - [ ] Phase 4: fixed issues closed; skipped issues remain open
177
+ - [ ] Phase 4: shipped issues closed, one what-landed comment each; skipped issues remain open
174
178
  - [ ] Post-workflow verification: `git ls-remote --tags origin`, `npm view <pkg>@<version>` if public, GH release artifacts attached
175
179
  - [ ] Tag/release quality review: tag subject omits version number, structured markdown, no marketing adjectives, issue backlinks present
@@ -4,7 +4,7 @@ description: >
4
4
  Finalize documentation and project metadata for a ship-ready MCP server. Use after implementation is complete, tests pass, and devcheck is clean. Safe to run at any stage — each step checks current state and only acts on what still needs work.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.6"
7
+ version: "2.7"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -76,6 +76,8 @@ Key fields: `name`, `description`, `repository`, `author`, `homepage`, `bugs`, `
76
76
 
77
77
  **`name` must communicate the server's domain at a glance.** See `references/package-meta.md` for the naming convention — ambiguous abbreviations and acronym-only names fail the scannability test for humans and agents alike.
78
78
 
79
+ **`name` and `title` in `createApp()` / `createWorkerHandler()` must match the unscoped `package.json` `name`** — display identity is the machine name on every surface; `lint:packaging` (run by `devcheck`) enforces the match and warns when the pair is partial. `description` is never duplicated into the entrypoint — `package.json` is the canonical source (the framework derives the served description from it).
80
+
79
81
  **`description` is the canonical source.** Every other surface (README header, `server.json`, Dockerfile OCI label, GitHub repo description) derives from it. Write it here first, then propagate.
80
82
 
81
83
  ### 6. `server.json`
@@ -193,7 +195,7 @@ If the project ships as an `.mcpb` bundle for Claude Desktop (check for `manifes
193
195
 
194
196
  **`package.json` scripts:**
195
197
 
196
- - `bundle` — builds the `.mcpb` (e.g., `mcpb pack --output dist/`)
198
+ - `bundle` — builds the `.mcpb` (`mcpb pack`, then `scripts/clean-mcpb.ts` prunes dev deps and strips dependency-shipped agent docs)
197
199
  - `lint:packaging` — validates `manifest.json` ↔ `server.json` env var consistency (run by `devcheck`)
198
200
 
199
201
  **Cross-file consistency:**
@@ -4,7 +4,7 @@ description: >
4
4
  File a bug or feature request against this MCP server's own repo. Use for server-specific issues — tool logic, service integrations, config problems, or domain bugs that aren't caused by the framework.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.5"
7
+ version: "1.6"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -4,7 +4,7 @@ description: >
4
4
  Read-only audit of MCP definition language across an existing surface — tools, resources, prompts. Walks every definition file and checks 12 categories the LLM reads to decide whether and how to call: voice & tense, internal leaks, audience leaks, defaults, recovery hints, output descriptions, cross-references, sparsity, examples, structure, mutator observability, unit-bearing numeric names. Produces grouped findings with file:line citations and a numbered options list. Use during polish, after a refactor, or before a release. Complements `field-test` (behavior testing) and `security-pass` (security audit).
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.2"
7
+ version: "1.3"
8
8
  audience: external
9
9
  type: audit
10
10
  ---
@@ -335,13 +335,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
335
335
  | `npm run start:http` | Production mode (HTTP) |
336
336
  | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
337
337
  | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
338
- | `npm run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
338
+ | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
339
339
 
340
340
  ---
341
341
 
342
342
  ## Bundling
343
343
 
344
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
344
+ `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
345
345
 
346
346
  **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
347
347
 
@@ -335,13 +335,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
335
335
  | `npm run start:http` | Production mode (HTTP) |
336
336
  | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
337
337
  | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
338
- | `npm run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
338
+ | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
339
339
 
340
340
  ---
341
341
 
342
342
  ## Bundling
343
343
 
344
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
344
+ `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
345
345
 
346
346
  **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
347
347
 
@@ -22,6 +22,5 @@
22
22
  },
23
23
  "tools_generated": true,
24
24
  "prompts_generated": true,
25
- "repository": { "type": "git", "url": "" },
26
25
  "user_config": {}
27
26
  }
@@ -30,7 +30,7 @@
30
30
  "format:unsafe": "biome check --write --unsafe .",
31
31
  "lint:mcp": "bun run scripts/lint-mcp.ts",
32
32
  "lint:packaging": "bun run scripts/lint-packaging.ts",
33
- "bundle": "bun run build && npx -y @anthropic-ai/mcpb pack . dist/{{PACKAGE_NAME}}.mcpb",
33
+ "bundle": "bun run build && npx -y @anthropic-ai/mcpb pack . dist/{{PACKAGE_NAME}}.mcpb && bun run scripts/clean-mcpb.ts dist/{{PACKAGE_NAME}}.mcpb",
34
34
  "changelog:build": "bun run scripts/build-changelog.ts",
35
35
  "changelog:check": "bun run scripts/build-changelog.ts --check",
36
36
  "release:github": "bun run scripts/release-github.ts",
@@ -12,6 +12,8 @@ import { echoAppUiResource } from './mcp-server/resources/definitions/echo-app-u
12
12
  import { echoPrompt } from './mcp-server/prompts/definitions/echo.prompt.js';
13
13
 
14
14
  await createApp({
15
+ name: '{{PACKAGE_NAME}}',
16
+ title: '{{PACKAGE_NAME}}',
15
17
  tools: [echoTool, echoAppTool],
16
18
  resources: [echoResource, echoAppUiResource],
17
19
  prompts: [echoPrompt],