@cyanheads/mcp-ts-core 0.12.1 → 0.12.3
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.
- package/AGENTS.md +7 -3
- package/CLAUDE.md +7 -3
- package/README.md +1 -1
- package/changelog/0.12.x/0.12.2.md +29 -0
- package/changelog/0.12.x/0.12.3.md +26 -0
- package/dist/core/app.d.ts +22 -0
- package/dist/core/app.d.ts.map +1 -1
- package/dist/core/app.js +41 -2
- package/dist/core/app.js.map +1 -1
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/serverManifest.d.ts +6 -1
- package/dist/core/serverManifest.d.ts.map +1 -1
- package/dist/core/serverManifest.js +2 -2
- package/dist/core/serverManifest.js.map +1 -1
- package/dist/linter/rules/schema-rules.d.ts +18 -0
- package/dist/linter/rules/schema-rules.d.ts.map +1 -1
- package/dist/linter/rules/schema-rules.js +35 -0
- package/dist/linter/rules/schema-rules.js.map +1 -1
- package/dist/linter/rules/tool-rules.d.ts.map +1 -1
- package/dist/linter/rules/tool-rules.js +4 -1
- package/dist/linter/rules/tool-rules.js.map +1 -1
- package/dist/mcp-server/cacheHints.d.ts +35 -0
- package/dist/mcp-server/cacheHints.d.ts.map +1 -0
- package/dist/mcp-server/cacheHints.js +43 -0
- package/dist/mcp-server/cacheHints.js.map +1 -0
- package/dist/mcp-server/resources/resource-registration.d.ts.map +1 -1
- package/dist/mcp-server/resources/resource-registration.js +3 -0
- package/dist/mcp-server/resources/resource-registration.js.map +1 -1
- package/dist/mcp-server/resources/utils/resourceDefinition.d.ts +14 -1
- package/dist/mcp-server/resources/utils/resourceDefinition.d.ts.map +1 -1
- package/dist/mcp-server/resources/utils/resourceDefinition.js.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +21 -13
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
- package/dist/mcp-server/server.d.ts +7 -0
- package/dist/mcp-server/server.d.ts.map +1 -1
- package/dist/mcp-server/server.js +1 -0
- package/dist/mcp-server/server.js.map +1 -1
- package/dist/mcp-server/tools/utils/headerParam.d.ts +113 -0
- package/dist/mcp-server/tools/utils/headerParam.d.ts.map +1 -0
- package/dist/mcp-server/tools/utils/headerParam.js +280 -0
- package/dist/mcp-server/tools/utils/headerParam.js.map +1 -0
- package/dist/mcp-server/tools/utils/toolDefinition.d.ts +1 -0
- package/dist/mcp-server/tools/utils/toolDefinition.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolDefinition.js +5 -1
- package/dist/mcp-server/tools/utils/toolDefinition.js.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js +45 -36
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
- package/dist/mcp-server/transports/http/httpServer.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpServer.js +97 -14
- package/dist/mcp-server/transports/http/httpServer.js.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.d.ts +1 -1
- package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.js +5 -3
- package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts +29 -0
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/stdio/stdioTransport.js +33 -0
- package/dist/mcp-server/transports/stdio/stdioTransport.js.map +1 -1
- package/dist/mcp-server/types.d.ts +20 -1
- package/dist/mcp-server/types.d.ts.map +1 -1
- package/dist/mcp-server/types.js +14 -0
- package/dist/mcp-server/types.js.map +1 -1
- package/dist/utils/internal/logger.d.ts +12 -0
- package/dist/utils/internal/logger.d.ts.map +1 -1
- package/dist/utils/internal/logger.js +39 -6
- package/dist/utils/internal/logger.js.map +1 -1
- package/dist/utils/internal/performance.d.ts +18 -9
- package/dist/utils/internal/performance.d.ts.map +1 -1
- package/dist/utils/internal/performance.js +66 -14
- package/dist/utils/internal/performance.js.map +1 -1
- package/package.json +4 -4
- package/skills/add-resource/SKILL.md +31 -1
- package/skills/add-tool/SKILL.md +35 -1
- package/skills/api-config/SKILL.md +36 -4
- package/skills/api-linter/SKILL.md +25 -2
- package/skills/api-telemetry/SKILL.md +35 -3
- package/skills/git-wrapup/SKILL.md +4 -2
- package/skills/polish-docs-meta/references/package-meta.md +1 -1
- package/skills/release-and-publish/SKILL.md +9 -2
- package/templates/Dockerfile +2 -2
- package/templates/package.json +1 -1
- package/dist/logs/combined.log +0 -10
- package/dist/logs/error.log +0 -6
- package/dist/logs/interactions.log +0 -0
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
MCP definition linter rules reference. Use when `bun run lint:mcp` or `bun run devcheck` reports a lint error or warning (`format-parity`, `schema-is-object`, `name-format`, `server-json-*`, etc.) and you need to understand the rule, its severity, and how to fix it. Every rule ID the linter emits has an entry in this doc.
|
|
5
5
|
metadata:
|
|
6
6
|
author: cyanheads
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.12"
|
|
8
8
|
audience: external
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -44,7 +44,7 @@ Grouped by family. Jump to any rule ID via its anchor.
|
|
|
44
44
|
|:-------|:------|:--------|
|
|
45
45
|
| Definition | `definition-invalid` | [Definition rules](#definition-rules) |
|
|
46
46
|
| Format parity | `format-parity`, `format-parity-threw`, `format-parity-walk-failed`, `format-parity-depth-limit` | [Format parity](#format-parity) |
|
|
47
|
-
| Schema | `schema-is-object`, `describe-on-fields`, `schema-serializable`, `schema-unsatisfiable` | [Schema rules](#schema-rules) |
|
|
47
|
+
| Schema | `schema-is-object`, `describe-on-fields`, `schema-serializable`, `schema-unsatisfiable`, `header-param-designation` | [Schema rules](#schema-rules) |
|
|
48
48
|
| Portability | `schema-format-portability`, `schema-anyof-needs-type`, `schema-no-discriminator-keyword`, `schema-no-defs`, `schema-root-oneof-portability`, `schema-dialect-tag` | [Portability rules](#portability-rules) |
|
|
49
49
|
| Names | `name-required`, `name-format`, `name-unique` | [Name rules](#name-rules) |
|
|
50
50
|
| Tools | `description-required`, `handler-required`, `auth-type`, `auth-scope-format`, `annotation-type`, `annotation-coherence`, `meta-ui-type`, `meta-ui-resource-uri-required`, `meta-ui-resource-uri-scheme`, `app-tool-resource-pairing`, `canvas-consumer-missing` | [Tool rules](#tool-rules) |
|
|
@@ -247,6 +247,29 @@ Evaluated on the emitted schema rather than on the Zod schema, because the two d
|
|
|
247
247
|
|
|
248
248
|
Not flagged, deliberately: `allOf: []` is vacuously true (matches everything), and empty `required` / `properties` / `prefixItems` are absent constraints rather than impossible ones.
|
|
249
249
|
|
|
250
|
+
### header-param-designation
|
|
251
|
+
|
|
252
|
+
**Severity:** error
|
|
253
|
+
|
|
254
|
+
Fires when a tool's `input` carries an `x-mcp-header` designation — from `headerParam(schema, 'Name')` or a hand-written `.meta({ 'x-mcp-header': 'Name' })` — that violates one of the constraints protocol revision 2026-07-28 places on it.
|
|
255
|
+
|
|
256
|
+
| Constraint | Example violation |
|
|
257
|
+
|:--|:--|
|
|
258
|
+
| Statically reachable through a chain of `properties` keys | A designation on an array element, a `z.record()` value, any field of a **discriminated-union input root** (the root advertises `oneOf`), or a schema hoisted into `$defs` by `.meta({ id })` |
|
|
259
|
+
| Primitive-typed property — `string`, `integer`, `number`, `boolean` | `headerParam(z.object({ … }), 'Region')` |
|
|
260
|
+
| Non-empty RFC 9110 token | `headerParam(z.string(), 'Bad Name')` — spaces, control characters, and HTTP delimiters are all rejected |
|
|
261
|
+
| Case-insensitively unique across the whole input schema | `'Region'` and `'REGION'` on two sibling fields |
|
|
262
|
+
|
|
263
|
+
Evaluated on the emitted JSON Schema, which is the same input the SDK's own scan reads — so a verdict here is the SDK's verdict.
|
|
264
|
+
|
|
265
|
+
The message names the offending field in the linter's path vocabulary: `input.rows[].region` for an array element, `input.map.<key>` for a record value, `input|0.region` for a union branch.
|
|
266
|
+
|
|
267
|
+
**Fix:** move the designation to a top-level or nested object property. For a multi-mode tool, there is no placement that works — a union input root puts every field behind `oneOf`; flatten the schema or drop the designation.
|
|
268
|
+
|
|
269
|
+
**Why it is an error, not a warning:** the SDK enforces this with a `console.warn`. The tool still registers, and conforming Streamable HTTP clients then exclude it from `tools/list` — it silently disappears with nothing reporting the gap. `tool()` throws on the same condition at definition time, so this rule normally fires only for a definition assembled without the builder.
|
|
270
|
+
|
|
271
|
+
Silent when the schema cannot be converted to JSON Schema at all — that is `schema-serializable`'s diagnostic.
|
|
272
|
+
|
|
250
273
|
---
|
|
251
274
|
|
|
252
275
|
## Portability rules
|
|
@@ -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.
|
|
7
|
+
version: "1.7"
|
|
8
8
|
audience: external
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -57,6 +57,25 @@ Cloud platform detection auto-populates resource attributes:
|
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
60
|
+
## Flush at exit
|
|
61
|
+
|
|
62
|
+
Spans batch and metrics push on a 15-second cycle, so a process that exits between cycles takes its telemetry with it. `ServerHandle.shutdown()` is the drain: it stops the transport, then force-flushes traces and metrics through the OTLP exporters and closes the logger.
|
|
63
|
+
|
|
64
|
+
| Trigger | Path |
|
|
65
|
+
|:--------|:-----|
|
|
66
|
+
| `SIGTERM` / `SIGINT` | `shutdown(signal)` |
|
|
67
|
+
| `uncaughtException` / `unhandledRejection` | `shutdown(signal)`, then `process.exit(1)` |
|
|
68
|
+
| stdin EOF, stdio transport | `shutdown('STDIN_EOF')`, then `process.exit(0)` |
|
|
69
|
+
| `ServerHandle.shutdown()` called directly | the same drain, no exit |
|
|
70
|
+
|
|
71
|
+
**Stdin EOF is a disconnect.** A stdio host closing the pipe runs the cleanup a signal runs, exactly once — the shutdown detaches the signal handlers and the EOF watcher as it starts, so neither can re-enter it — and the process then exits explicitly instead of waiting to run out of handles. Two things follow: the OTLP export leaves the process, and a `setInterval` a service registered without `unref()` can no longer keep the server resident after its client is gone. The path writes nothing to stdout.
|
|
72
|
+
|
|
73
|
+
**The drain is bounded.** Shutdown-on-exit races a 10-second backstop, so a cleanup step that never settles still terminates the process. The logger bounds its own flush separately, per pino instance: a completing callback is awaited in full, and a runtime whose callback never arrives releases shutdown rather than hanging it.
|
|
74
|
+
|
|
75
|
+
Workers has no `ServerHandle` and no `NodeSDK` — flush whatever exporter you wired there yourself, via `ctx.waitUntil()`.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
60
79
|
## Spans
|
|
61
80
|
|
|
62
81
|
Every handler call gets a span. Nested operations (storage, graph, LLM) become child spans on the same trace. All spans carry `code.function.name` and `code.namespace` for code-attribution. Errors are recorded via `span.recordException()` and `SpanStatusCode.ERROR`; `McpError` codes surface as the `*.error_code` attribute.
|
|
@@ -74,6 +93,19 @@ Every handler call gets a span. Nested operations (storage, graph, LLM) become c
|
|
|
74
93
|
|
|
75
94
|
A handler that ends its round with `ctx.requestInput(...)` closes its span `OK` with `mcp.*.input_required` set — no recorded exception, no error-counter increment. Multi-round-trip input is protocol control flow, so it never inflates error rates; split on that attribute to tell an incomplete round from a completed call.
|
|
76
95
|
|
|
96
|
+
### The measured region
|
|
97
|
+
|
|
98
|
+
A tool or resource call is measured from the start of the handler through the response pipeline that follows it: output-schema validation, `format()`, the enrichment merge, and the trailer render for tools; output-schema validation and `format()` for resources. Telemetry therefore records the outcome the client sees — a failure in any of those is an ERROR span, `success=false` counters, an error-counter increment, and `isSuccess: false` in the completion log, matching the `isError: true` the caller receives. Prompt generation has no post-handler pipeline, so its region is the generate function alone.
|
|
99
|
+
|
|
100
|
+
Two consequences worth knowing when reading a dashboard:
|
|
101
|
+
|
|
102
|
+
| Signal | What it covers |
|
|
103
|
+
|:-------|:---------------|
|
|
104
|
+
| `mcp.tool.duration` / `mcp.resource.duration` | The handler **plus** validation, formatting, and the enrichment merge — time to produce the result, not time spent in handler code. An expensive `format()` shows up here. |
|
|
105
|
+
| `mcp.tool.output_bytes` / `mcp.resource.output_bytes` | The handler's returned domain value, not the assembled result. `content[]` re-renders the data the structured payload already carries, so measuring the assembly would double-count it. Nothing is recorded for a call that fails after the handler. |
|
|
106
|
+
|
|
107
|
+
`mcp.tool.partial_success` and the `mcp.tool.batch.*` counts read the same domain value, so a batch envelope (`{ succeeded, failed }`) is still detected once the result has been assembled around it.
|
|
108
|
+
|
|
77
109
|
Trace context propagates across boundaries via W3C `traceparent` headers. See `api-utils` → `telemetry/trace` for `withSpan`, `buildTraceparent`, `extractTraceparent`, `createContextWithParentTrace`, `injectCurrentContextInto`, `runInContext` signatures.
|
|
78
110
|
|
|
79
111
|
---
|
|
@@ -90,12 +122,12 @@ All custom metrics are namespaced `mcp.*` (or `process.*` / `http.client.*` wher
|
|
|
90
122
|
| `mcp.tool.duration` | histogram | `ms` | `mcp.tool.name`, `mcp.tool.success` |
|
|
91
123
|
| `mcp.tool.errors` | counter | `{errors}` | `mcp.tool.name`, `mcp.tool.error_category` (`upstream`/`server`/`client`) |
|
|
92
124
|
| `mcp.tool.input_bytes` | histogram | `bytes` | `mcp.tool.name` |
|
|
93
|
-
| `mcp.tool.output_bytes` | histogram | `bytes` | `mcp.tool.name` (success only) |
|
|
125
|
+
| `mcp.tool.output_bytes` | histogram | `bytes` | `mcp.tool.name` (success only; the handler's returned value) |
|
|
94
126
|
| `mcp.tool.param.usage` | counter | `{uses}` | `mcp.tool.name`, `mcp.tool.param` (top-level keys supplied by caller) |
|
|
95
127
|
| `mcp.resource.reads` | counter | `{reads}` | `mcp.resource.name`, `mcp.resource.success` |
|
|
96
128
|
| `mcp.resource.duration` | histogram | `ms` | `mcp.resource.name`, `mcp.resource.success` |
|
|
97
129
|
| `mcp.resource.errors` | counter | `{errors}` | `mcp.resource.name` |
|
|
98
|
-
| `mcp.resource.output_bytes` | histogram | `bytes` | `mcp.resource.name` (success only) |
|
|
130
|
+
| `mcp.resource.output_bytes` | histogram | `bytes` | `mcp.resource.name` (success only; the handler's returned value) |
|
|
99
131
|
| `mcp.prompt.generations` | counter | `{generations}` | `mcp.prompt.name`, `mcp.prompt.success` |
|
|
100
132
|
| `mcp.prompt.duration` | histogram | `ms` | `mcp.prompt.name`, `mcp.prompt.success` |
|
|
101
133
|
| `mcp.prompt.errors` | counter | `{errors}` | `mcp.prompt.name`, `mcp.prompt.error_category` |
|
|
@@ -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.
|
|
7
|
+
version: "1.11"
|
|
8
8
|
audience: external
|
|
9
9
|
type: workflow
|
|
10
10
|
---
|
|
@@ -27,7 +27,7 @@ Every item must be true before starting wrapup. Committing means releasing — a
|
|
|
27
27
|
- [ ] **Code simplified** — if the diff spans more than ~50 changed lines or touches 3+ source files, the `code-simplifier` skill has been run across the changes
|
|
28
28
|
- [ ] **`bun run devcheck` passes** — typecheck + lint clean
|
|
29
29
|
- [ ] **`bun run rebuild` succeeds** — full clean build from scratch
|
|
30
|
-
- [ ] **All tests pass** — `bun run test:all` (or `bun run test`)
|
|
30
|
+
- [ ] **All tests pass** — `bun run test:all` (or `bun run test`), plus `bun run test:package` where the project defines one: it guards the public-export manifest and is not part of `test:all`. New tests and regression tests added as needed for the changes being shipped.
|
|
31
31
|
- [ ] **Fixes verified** — bug fixes validated, generally via `bun run rebuild` and field-testing. Not just written — confirmed to resolve the described behavior.
|
|
32
32
|
- [ ] **No known regressions** — the changes don't break existing functionality
|
|
33
33
|
- [ ] **GH issues updated** — issues addressed by this work commented with what landed and any follow-ups needed. Concise. Backlinked as needed.
|
|
@@ -119,6 +119,7 @@ The tree being committed must pass verification. Both must succeed:
|
|
|
119
119
|
```bash
|
|
120
120
|
bun run devcheck
|
|
121
121
|
bun run test:all # or `bun run test` if no test:all script exists
|
|
122
|
+
bun run test:package # only if the script exists — NOT part of test:all
|
|
122
123
|
```
|
|
123
124
|
|
|
124
125
|
**If either fails, halt.** Do not bypass verification to land the commit. Fix the issue first, then re-run from step 6.
|
|
@@ -237,6 +238,7 @@ If the working tree isn't clean or the tag doesn't point at HEAD, something went
|
|
|
237
238
|
- [ ] `docs/tree.md` regenerated if structure changed (`bun run tree`)
|
|
238
239
|
- [ ] `bun run devcheck` passes
|
|
239
240
|
- [ ] `bun run test:all` (or `test`) passes
|
|
241
|
+
- [ ] `bun run test:package` passes, when the project defines it — it guards the public-export manifest and `test:all` does not run it
|
|
240
242
|
- [ ] Work grouped into logical commits (large features split by layer); release artifacts (version + changelog + tree) committed separately on top, subject leading with the version
|
|
241
243
|
- [ ] Every commit carries a body, and every body is one or two lines — none subject-only, none a paragraph
|
|
242
244
|
- [ ] Annotated tag `v<version>` with structured markdown message, final line linking this version's changelog file
|
|
@@ -28,7 +28,7 @@ These are set by `init` and generally don't need changes. Verify they're present
|
|
|
28
28
|
| `types` | `"dist/index.d.ts"` | TypeScript declarations |
|
|
29
29
|
| `files` | `["dist/"]` | What npm publishes |
|
|
30
30
|
| `engines` | `{ "node": ">=24.0.0", "bun": ">=1.3.0" }` | Node runs the built `dist/`; Bun is the dev floor |
|
|
31
|
-
| `packageManager` | `"bun@1.
|
|
31
|
+
| `packageManager` | `"bun@1.4.0"` | Pins the dev package manager; keep current with the framework's Bun version |
|
|
32
32
|
| `scripts` | _(various)_ | Build, dev, test scripts |
|
|
33
33
|
| `dependencies` | `@cyanheads/mcp-ts-core` | Core framework |
|
|
34
34
|
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Ship a release end-to-end across every registry the project targets (npm, MCP Registry, GitHub Releases for `.mcpb` bundles, GHCR). Runs the final verification gate, pushes commits and tags, then publishes to each applicable destination. Assumes git wrapup (version bumps, changelog, commit, annotated tag) is already complete — this skill is the post-wrapup publish workflow. Retries transient network failures on publish steps; halts with a partial-state report when retries are exhausted or the failure is terminal.
|
|
5
5
|
metadata:
|
|
6
6
|
author: cyanheads
|
|
7
|
-
version: "
|
|
7
|
+
version: "1.11"
|
|
8
8
|
audience: external
|
|
9
9
|
type: workflow
|
|
10
10
|
---
|
|
@@ -73,14 +73,20 @@ If working tree is dirty or HEAD isn't on `v<version>`, halt.
|
|
|
73
73
|
|
|
74
74
|
### 2. Run the verification gate
|
|
75
75
|
|
|
76
|
-
All
|
|
76
|
+
All must succeed. Check `package.json` `scripts` for `test:all`; if absent, fall back to `test`:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
79
|
bun run devcheck
|
|
80
80
|
bun run rebuild
|
|
81
81
|
bun run test:all # or `bun run test` if no test:all
|
|
82
|
+
bun run test:package # only if the script exists — NOT part of test:all
|
|
82
83
|
```
|
|
83
84
|
|
|
85
|
+
`test:package` is a separate gate wherever a project defines one: it verifies the public-export
|
|
86
|
+
manifest against what the built subpaths actually export. A release that adds, removes, or renames
|
|
87
|
+
an export passes `test:all` and fails here. Regenerate the manifest with the command the failure
|
|
88
|
+
names rather than editing it by hand.
|
|
89
|
+
|
|
84
90
|
Any non-zero exit → halt with the failing command's output.
|
|
85
91
|
|
|
86
92
|
### 3. Push to origin
|
|
@@ -214,6 +220,7 @@ If any check fails, halt and report which destination is unreachable. A successf
|
|
|
214
220
|
- [ ] `bun run devcheck` passes
|
|
215
221
|
- [ ] `bun run rebuild` succeeds
|
|
216
222
|
- [ ] `bun run test:all` (or `test`) passes
|
|
223
|
+
- [ ] `bun run test:package` passes, when the project defines it
|
|
217
224
|
- [ ] Commits pushed to origin
|
|
218
225
|
- [ ] Tags pushed to origin
|
|
219
226
|
- [ ] `bun publish --access public` succeeds
|
package/templates/Dockerfile
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This stage installs all dependencies (including dev), builds the TypeScript
|
|
5
5
|
# source code into JavaScript, and prepares the production assets.
|
|
6
6
|
# ==============================================================================
|
|
7
|
-
FROM oven/bun:1.
|
|
7
|
+
FROM oven/bun:1.4.0 AS build
|
|
8
8
|
|
|
9
9
|
WORKDIR /usr/src/app
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ RUN bun run build
|
|
|
30
30
|
# application. It uses a slim base image and only includes production
|
|
31
31
|
# dependencies and build artifacts.
|
|
32
32
|
# ==============================================================================
|
|
33
|
-
FROM oven/bun:1.
|
|
33
|
+
FROM oven/bun:1.4.0-slim AS production
|
|
34
34
|
|
|
35
35
|
WORKDIR /usr/src/app
|
|
36
36
|
|
package/templates/package.json
CHANGED
package/dist/logs/combined.log
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{"level":40,"time":1787249221180,"env":"testing","version":"0.12.1","pid":43171,"operation":"TransportManager.start","requestId":"PUL22-AMHD7","timestamp":"2026-08-20T18:07:01.180Z","transport":"http","component":"HttpTransportSetup","msg":"MCP_ALLOWED_ORIGINS is not set — CORS is wildcard for CLI clients; browser Origin headers are restricted to loopback. Set MCP_ALLOWED_ORIGINS for production deployments accepting remote browser origins."}
|
|
2
|
-
{"level":40,"time":1787249223452,"env":"testing","version":"0.12.1","pid":43171,"operation":"HttpRpcRequest","requestId":"199WT-2MJID","sessionId":"not-a-real-session-1787249223449","timestamp":"2026-08-20T18:07:03.452Z","component":"HttpTransport","msg":"Session validation failed - invalid or hijacked session"}
|
|
3
|
-
{"level":50,"time":1787249227153,"env":"testing","version":"0.0.0-test","pid":43212,"auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"LEPEF-Q8LQQ","sessionId":"785ee4109a184c257b58b7ffcdf73e21589e44c418eee4ccdfcc5a71dbfe6847","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.152Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"LEPEF-Q8LQQ","sessionId":"785ee4109a184c257b58b7ffcdf73e21589e44c418eee4ccdfcc5a71dbfe6847","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.152Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
4
|
-
{"level":50,"time":1787249227166,"env":"testing","version":"0.0.0-test","pid":43212,"auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"1F3Z0-Z77NT","sessionId":"d1e234e49509af45bb2dd4575bcb09cc467dfc8f6f1a5e5e038227f608f6b5b2","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.166Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"1F3Z0-Z77NT","sessionId":"d1e234e49509af45bb2dd4575bcb09cc467dfc8f6f1a5e5e038227f608f6b5b2","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.166Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
5
|
-
{"level":50,"time":1787249228307,"env":"testing","version":"0.0.0-test","pid":43220,"operation":"HandleToolRequest","requestId":"XMI4S-0CN4L","sessionId":"10b75ba7267aa0f3ac4acfa447e0232f7e9080095e6305d7a7fcc652016e56f2","timestamp":"2026-08-20T18:07:08.301Z","toolName":"session_cancellable_tool","critical":false,"errorCode":-32004,"originalErrorType":"stringEncountered","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"XMI4S-0CN4L","sessionId":"10b75ba7267aa0f3ac4acfa447e0232f7e9080095e6305d7a7fcc652016e56f2","timestamp":"2026-08-20T18:07:08.301Z","toolName":"session_cancellable_tool","originalErrorName":"stringEncountered","originalMessage":"AbortError: cancel tool request"},"stack":"McpError: AbortError: cancel tool request\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:186:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:20\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
|
6
|
-
{"level":40,"time":1787249240624,"env":"testing","version":"0.12.1","pid":43318,"operation":"TransportManager.start","requestId":"7B2CS-MCVTS","timestamp":"2026-08-20T18:07:20.623Z","transport":"http","component":"HttpTransportSetup","msg":"MCP_ALLOWED_ORIGINS is not set — CORS is wildcard for CLI clients; browser Origin headers are restricted to loopback. Set MCP_ALLOWED_ORIGINS for production deployments accepting remote browser origins."}
|
|
7
|
-
{"level":40,"time":1787249242441,"env":"testing","version":"0.12.1","pid":43318,"operation":"HttpRpcRequest","requestId":"5IM4G-6QY7E","sessionId":"not-a-real-session-1787249242441","timestamp":"2026-08-20T18:07:22.441Z","component":"HttpTransport","msg":"Session validation failed - invalid or hijacked session"}
|
|
8
|
-
{"level":50,"time":1787249244842,"env":"testing","version":"0.0.0-test","pid":43342,"auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"K0YRI-7BS1I","sessionId":"2ee7048f7affa20c25adfd980a023387cea2ce2a61eaee63048249d4dc0aab57","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.841Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"K0YRI-7BS1I","sessionId":"2ee7048f7affa20c25adfd980a023387cea2ce2a61eaee63048249d4dc0aab57","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.841Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
9
|
-
{"level":50,"time":1787249244854,"env":"testing","version":"0.0.0-test","pid":43342,"auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"NFZQV-P2NPI","sessionId":"f0811459e7d29d052c034cdaa5f6f4da3f9f150c0d5af8ebf65ae1aaac2d9c0c","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.854Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"NFZQV-P2NPI","sessionId":"f0811459e7d29d052c034cdaa5f6f4da3f9f150c0d5af8ebf65ae1aaac2d9c0c","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.854Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
10
|
-
{"level":50,"time":1787249246537,"env":"testing","version":"0.0.0-test","pid":43354,"operation":"HandleToolRequest","requestId":"57E0T-P1UGN","sessionId":"757eccb5bfa31c7a69caa0876786df1a43a8d46e255273e5c42c20c68ebc062f","timestamp":"2026-08-20T18:07:26.534Z","toolName":"session_cancellable_tool","critical":false,"errorCode":-32004,"originalErrorType":"stringEncountered","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"57E0T-P1UGN","sessionId":"757eccb5bfa31c7a69caa0876786df1a43a8d46e255273e5c42c20c68ebc062f","timestamp":"2026-08-20T18:07:26.534Z","toolName":"session_cancellable_tool","originalErrorName":"stringEncountered","originalMessage":"AbortError: cancel tool request"},"stack":"McpError: AbortError: cancel tool request\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:186:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
package/dist/logs/error.log
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{"level":50,"time":1787249227153,"env":"testing","version":"0.0.0-test","pid":43212,"auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"LEPEF-Q8LQQ","sessionId":"785ee4109a184c257b58b7ffcdf73e21589e44c418eee4ccdfcc5a71dbfe6847","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.152Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"LEPEF-Q8LQQ","sessionId":"785ee4109a184c257b58b7ffcdf73e21589e44c418eee4ccdfcc5a71dbfe6847","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.152Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
2
|
-
{"level":50,"time":1787249227166,"env":"testing","version":"0.0.0-test","pid":43212,"auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"1F3Z0-Z77NT","sessionId":"d1e234e49509af45bb2dd4575bcb09cc467dfc8f6f1a5e5e038227f608f6b5b2","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.166Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"1F3Z0-Z77NT","sessionId":"d1e234e49509af45bb2dd4575bcb09cc467dfc8f6f1a5e5e038227f608f6b5b2","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:07.166Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (file:///Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:54)\n at withRequiredScopes (file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19"},"stack":"McpError: Insufficient permissions.\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26\n at Object.callback [as executor] (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at McpServer.executeToolHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
3
|
-
{"level":50,"time":1787249228307,"env":"testing","version":"0.0.0-test","pid":43220,"operation":"HandleToolRequest","requestId":"XMI4S-0CN4L","sessionId":"10b75ba7267aa0f3ac4acfa447e0232f7e9080095e6305d7a7fcc652016e56f2","timestamp":"2026-08-20T18:07:08.301Z","toolName":"session_cancellable_tool","critical":false,"errorCode":-32004,"originalErrorType":"stringEncountered","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"XMI4S-0CN4L","sessionId":"10b75ba7267aa0f3ac4acfa447e0232f7e9080095e6305d7a7fcc652016e56f2","timestamp":"2026-08-20T18:07:08.301Z","toolName":"session_cancellable_tool","originalErrorName":"stringEncountered","originalMessage":"AbortError: cancel tool request"},"stack":"McpError: AbortError: cancel tool request\n at ErrorHandler.handleError (file:///Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:186:19)\n at file:///Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:20\n at async Server._invokeInputRequiredCapableHandler (file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:887:13)\n at async file:///Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:838:19","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
|
4
|
-
{"level":50,"time":1787249244842,"env":"testing","version":"0.0.0-test","pid":43342,"auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"K0YRI-7BS1I","sessionId":"2ee7048f7affa20c25adfd980a023387cea2ce2a61eaee63048249d4dc0aab57","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.841Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"K0YRI-7BS1I","sessionId":"2ee7048f7affa20c25adfd980a023387cea2ce2a61eaee63048249d4dc0aab57","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.841Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
5
|
-
{"level":50,"time":1787249244854,"env":"testing","version":"0.0.0-test","pid":43342,"auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"operation":"HandleToolRequest","requestId":"NFZQV-P2NPI","sessionId":"f0811459e7d29d052c034cdaa5f6f4da3f9f150c0d5af8ebf65ae1aaac2d9c0c","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.854Z","toolName":"scoped_echo","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"NFZQV-P2NPI","sessionId":"f0811459e7d29d052c034cdaa5f6f4da3f9f150c0d5af8ebf65ae1aaac2d9c0c","tenantId":"authz-tenant","timestamp":"2026-08-20T18:07:24.854Z","toolName":"scoped_echo","originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:91:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:60:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:382:17)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:178:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1861:31)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1450:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs:1400:31)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
6
|
-
{"level":50,"time":1787249246537,"env":"testing","version":"0.0.0-test","pid":43354,"operation":"HandleToolRequest","requestId":"57E0T-P1UGN","sessionId":"757eccb5bfa31c7a69caa0876786df1a43a8d46e255273e5c42c20c68ebc062f","timestamp":"2026-08-20T18:07:26.534Z","toolName":"session_cancellable_tool","critical":false,"errorCode":-32004,"originalErrorType":"stringEncountered","finalErrorType":"McpError","errorData":{"operation":"HandleToolRequest","requestId":"57E0T-P1UGN","sessionId":"757eccb5bfa31c7a69caa0876786df1a43a8d46e255273e5c42c20c68ebc062f","timestamp":"2026-08-20T18:07:26.534Z","toolName":"session_cancellable_tool","originalErrorName":"stringEncountered","originalMessage":"AbortError: cancel tool request"},"stack":"McpError: AbortError: cancel tool request\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:186:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:449:26)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:session_cancellable_tool: AbortError: cancel tool request"}
|
|
File without changes
|