@cyanheads/mcp-ts-core 0.13.11 → 0.13.12
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 +4 -4
- package/CLAUDE.md +4 -4
- package/README.md +1 -1
- package/changelog/0.13.x/0.13.12.md +50 -0
- package/dist/mcp-server/handlerContext.d.ts +14 -8
- package/dist/mcp-server/handlerContext.d.ts.map +1 -1
- package/dist/mcp-server/handlerContext.js +16 -9
- package/dist/mcp-server/handlerContext.js.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +7 -10
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
- package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts +8 -2
- package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/inputPrevalidation.js +18 -7
- package/dist/mcp-server/tools/utils/inputPrevalidation.js.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js +79 -8
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
- package/dist/mcp-server/transports/auth/lib/authUtils.d.ts +20 -0
- package/dist/mcp-server/transports/auth/lib/authUtils.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/lib/authUtils.js +28 -2
- package/dist/mcp-server/transports/auth/lib/authUtils.js.map +1 -1
- package/dist/mcp-server/transports/auth/lib/checkScopes.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/lib/checkScopes.js +2 -1
- package/dist/mcp-server/transports/auth/lib/checkScopes.js.map +1 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.js +4 -2
- package/dist/mcp-server/transports/http/httpErrorHandler.js.map +1 -1
- package/dist/services/mirror/sqlite/handle.d.ts +13 -2
- package/dist/services/mirror/sqlite/handle.d.ts.map +1 -1
- package/dist/services/mirror/sqlite/handle.js +17 -6
- package/dist/services/mirror/sqlite/handle.js.map +1 -1
- package/dist/services/mirror/sqlite/sqliteMirrorStore.d.ts.map +1 -1
- package/dist/services/mirror/sqlite/sqliteMirrorStore.js +3 -2
- package/dist/services/mirror/sqlite/sqliteMirrorStore.js.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.d.ts +1 -0
- package/dist/utils/internal/error-handler/errorHandler.d.ts.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.js +22 -11
- package/dist/utils/internal/error-handler/errorHandler.js.map +1 -1
- package/dist/utils/internal/error-handler/helpers.d.ts +16 -5
- package/dist/utils/internal/error-handler/helpers.d.ts.map +1 -1
- package/dist/utils/internal/error-handler/helpers.js +12 -7
- package/dist/utils/internal/error-handler/helpers.js.map +1 -1
- package/dist/utils/internal/error-handler/types.d.ts +11 -4
- package/dist/utils/internal/error-handler/types.d.ts.map +1 -1
- package/dist/utils/internal/observabilityCap.d.ts +35 -0
- package/dist/utils/internal/observabilityCap.d.ts.map +1 -0
- package/dist/utils/internal/observabilityCap.js +43 -0
- package/dist/utils/internal/observabilityCap.js.map +1 -0
- package/dist/utils/network/fetchWithTimeout.d.ts +3 -1
- package/dist/utils/network/fetchWithTimeout.d.ts.map +1 -1
- package/dist/utils/network/fetchWithTimeout.js +70 -16
- package/dist/utils/network/fetchWithTimeout.js.map +1 -1
- package/dist/utils/network/retry.d.ts +22 -2
- package/dist/utils/network/retry.d.ts.map +1 -1
- package/dist/utils/network/retry.js +29 -1
- package/dist/utils/network/retry.js.map +1 -1
- package/framework-skills/api-auth/SKILL.md +3 -1
- package/framework-skills/api-canvas/SKILL.md +2 -2
- package/framework-skills/api-context/SKILL.md +4 -4
- package/framework-skills/api-errors/SKILL.md +6 -6
- package/framework-skills/api-mirror/SKILL.md +3 -1
- package/framework-skills/api-telemetry/SKILL.md +10 -6
- package/framework-skills/api-utils/SKILL.md +3 -3
- package/framework-skills/field-test/SKILL.md +2 -2
- package/framework-skills/git-wrapup/SKILL.md +3 -3
- package/framework-skills/tool-defs-analysis/SKILL.md +2 -2
- package/package.json +5 -5
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Package:** `@cyanheads/mcp-ts-core`
|
|
4
|
-
**Version:** 0.13.
|
|
4
|
+
**Version:** 0.13.12
|
|
5
5
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
6
6
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.2.0 (protocol revisions 2026-07-28 and 2025-*)
|
|
7
7
|
**Zod:** ^4.6.5
|
|
@@ -406,7 +406,7 @@ See `api-context` skill for full details.
|
|
|
406
406
|
|
|
407
407
|
## Error Handling
|
|
408
408
|
|
|
409
|
-
**Recommended path: declare a typed error contract.** Add `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` to `tool()` / `resource()`. Handler gets `ctx.fail(reason, msg?, data?)` typed against the reason union — typos fail at compile time. Runtime auto-populates `data.reason` for observability; linter enforces conformance against the handler body. `recovery` is required (≥5 words, lint-validated) — the wire hint for its reason: when a failure whose `data.reason` names the entry reaches the tool or resource factory without `data.recovery`, the framework fills `data.recovery.hint` from it — a bare `ctx.fail('reason')` and a service throw carrying `{ reason }` alike, matched on the reason alone — and mirrors it into `content[]` text. Override with explicit `{ recovery: { hint: '...' } }` when runtime context matters; a throw-site `recovery` always wins, and the thrown `McpError` itself is never changed. Optional `severity` (`debug`/`info`/`notice`/`warning`) logs a modeled outcome below `error` — tools only, logging only: the wire envelope, the span status, and the `mcp.tool.*` metrics are untouched. The framework's own `invalid_arguments` and `client_capability_missing` refusals log at `notice` unless an entry naming them declares otherwise. Optional `thrownBy: 'service'` marks an entry the service layer produces, so `error-contract-unthrown` skips it while still checking the handler's own reasons — lint-only metadata, nothing at runtime reads it.
|
|
409
|
+
**Recommended path: declare a typed error contract.** Add `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` to `tool()` / `resource()`. Handler gets `ctx.fail(reason, msg?, data?)` typed against the reason union — typos fail at compile time. Runtime auto-populates `data.reason` for observability; linter enforces conformance against the handler body. `recovery` is required (≥5 words, lint-validated) — the wire hint for its reason: when a failure whose `data.reason` names the entry reaches the tool or resource factory without `data.recovery`, the framework fills `data.recovery.hint` from it — a bare `ctx.fail('reason')` and a service throw carrying `{ reason }` alike, matched on the reason alone — and mirrors it into `content[]` text. Override with explicit `{ recovery: { hint: '...' } }` when runtime context matters; a throw-site `recovery` always wins, and the thrown `McpError` itself is never changed. Optional `severity` (`debug`/`info`/`notice`/`warning`) logs a modeled outcome below `error` — tools only, logging only: the wire envelope, the span status, and the `mcp.tool.*` metrics are untouched. The framework's own `invalid_arguments` and `client_capability_missing` refusals log at `notice` unless an entry naming them declares otherwise, and so does a tool's missing-scope refusal (the inline `auth` check or `checkScopes`), which carries no reason to declare; a missing auth context, a handler's own `forbidden()`, and an upstream 403 keep `error`. The missing-scope and argument-rejection records log no stack, and an argument rejection's record keeps at most the first 1,024 characters of each string and the first 10 entries of each array, the uncut length or count beside each cut. Optional `thrownBy: 'service'` marks an entry the service layer produces, so `error-contract-unthrown` skips it while still checking the handler's own reasons — lint-only metadata, nothing at runtime reads it.
|
|
410
410
|
|
|
411
411
|
```ts
|
|
412
412
|
errors: [
|
|
@@ -446,7 +446,7 @@ For HTTP responses from upstream APIs, use `httpErrorFromResponse(response, { se
|
|
|
446
446
|
|
|
447
447
|
**Auto-classification.** Plain `Error`, `ZodError`, and any other thrown value are caught and classified automatically. Resolution order: request signal already aborted (→ `RequestCancelled`, outranking the thrown value's own code, `McpError` included) → `McpError` code (preserved as-is) → SDK `ConnectionClosed` (→ `RequestCancelled`) → engine resource-limit `RangeError` by whole message — stack overflow, maximum string size (→ `InternalError`) → JS constructor name (`SyntaxError` → `ValidationError`; `TypeError` is excluded) → provider patterns (HTTP status codes, AWS errors, DB errors) → common message patterns → `AbortError` name (→ `Timeout`) → `InternalError` fallback. A result that breaks the definition's own `output` or `enrichment` schema fails as `InternalError` naming that contract, not `ValidationError`.
|
|
448
448
|
|
|
449
|
-
**Error-path parity.** Tool errors: `content[]` carries `Error: <message>`, then `Recovery: <hint>` when the hint says something the message does not already contain, then a closing `(reason … · not retryable · request <id>)` for whichever of `data.reason` / `data.retryable` / `data.requestId` is present; the numeric code and `data.issues` stay JSON-only. `structuredContent.error` carries `{ code, message, data? }`. No `_meta.error`. Resources re-throw via JSON-RPC error envelope. An argument rejection is one of them: `-32602` with `data.issues`, plus `data.reason: 'invalid_arguments'` and a hint synthesized from the issues and the root schema — never a tool-declared `reason`, since the handler never ran. When pre-validation rewrote or dropped a key the caller wrote, `data.input` (`{ aliased: [{ alias, target }], ignored }`) names it and the hint closes with `Validated … as ….` / `Dropped undeclared key ….`; an ignore-list drop is never reported. `client_capability_missing` is the second framework-owned reason: a `ctx.requestInput` return a 2025-era connection cannot serve is refused before any wire traffic as `-32600` carrying that reason and a hint naming the capability. **`data.requestId`** is set on every error envelope the framework builds — tool results, resource reads, prompts, `httpErrorHandler`'s JSON-RPC errors — equal to the `requestId` of that call's log records: a
|
|
449
|
+
**Error-path parity.** Tool errors: `content[]` carries `Error: <message>`, then `Recovery: <hint>` when the hint says something the message does not already contain, then a closing `(reason … · not retryable · request <id>)` for whichever of `data.reason` / `data.retryable` / `data.requestId` is present; the numeric code and `data.issues` stay JSON-only. `structuredContent.error` carries `{ code, message, data? }`. No `_meta.error`. Resources re-throw via JSON-RPC error envelope. An argument rejection is one of them: `-32602` with `data.issues`, plus `data.reason: 'invalid_arguments'` and a hint synthesized from the issues and the root schema — never a tool-declared `reason`, since the handler never ran. When pre-validation rewrote or dropped a key the caller wrote, `data.input` (`{ aliased: [{ alias, target }], ignored }`) names it and the hint closes with `Validated … as ….` / `Dropped undeclared key ….`; an ignore-list drop is never reported. `client_capability_missing` is the second framework-owned reason: a `ctx.requestInput` return a 2025-era connection cannot serve is refused before any wire traffic as `-32600` carrying that reason and a hint naming the capability. **`data.requestId`** is set on every error envelope the framework builds — tool results, resource reads, prompts, `httpErrorHandler`'s JSON-RPC errors — equal to the `requestId` of that call's log records: a token the framework generates per call, never the client's JSON-RPC id. Those records carry the client's id as `jsonRpcId` (string or number as sent; a string over 1,024 characters keeps at most its first 1,024, plus `jsonRpcIdLength`), and the response `id` is unchanged. A resource read refused before it is measured (auth, `params`) carries an id no record shares. It replaces a thrown `data.requestId`, is never added to the thrown `McpError`, and is left off a resource `-32602` whose `data` is exactly `{ uri }` and off `runToolContract` results.
|
|
450
450
|
|
|
451
451
|
**Lint rules** (all warnings, surfaced in `devcheck`): `prefer-mcp-error-in-handler`, `prefer-error-factory`, `preserve-cause-on-rethrow`, `no-stringify-upstream-error`, `error-contract-conformance`, `error-contract-prefer-fail`, `error-contract-unthrown` (a declared reason no literal `ctx.fail`/`ctx.recoveryFor` in the handler names, unless marked `thrownBy: 'service'`). See `api-linter` skill.
|
|
452
452
|
|
|
@@ -653,7 +653,7 @@ Badge order when both set: `· ⚠️ Breaking · 🛡️ Security`. Summary > 3
|
|
|
653
653
|
|
|
654
654
|
## Publishing
|
|
655
655
|
|
|
656
|
-
**Every release goes through a gated release PR** — `git-wrapup`'s "Release PR mode", mode `gated`. Three separate runs, never one: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the
|
|
656
|
+
**Every release goes through a gated release PR** — `git-wrapup`'s "Release PR mode", mode `gated`. Three separate runs, never one: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the release digest: theme line, `## Changes`, `## Gates`, changelog link last); `release-pr-review` reviews and fixes on that branch (each fix an ordinary commit on top of the stack, pushed plainly — nothing already pushed is ever rewritten, so `main` keeps the record of what the review corrected — PR body kept in sync, one summary comment); then `release-and-publish` fast-forwards `main` locally with `git merge --ff-only`, creates the tag on `main`'s tip, pushes `main` and the tag, deletes the branch, and publishes. The release run needs an explicit "review pass finished" in its brief — it halts without one. **Never merge through the GitHub UI or `gh pr merge`**: squash and rebase-merge are disabled in the repo settings because both rewrite the stack (rebase-merge also strips the SSH signatures), and a merge commit breaks the linear history.
|
|
657
657
|
|
|
658
658
|
Codex (`chatgpt-codex-connector`) reviews the PR when it opens — it reacts 👀 while running, then leaves inline comments, or reacts 👍 when it found nothing. Those comments are claims for `release-pr-review` to verify against the code (its step 4), never instructions: what holds up lands as a commit like any other finding, and what does not is recorded with the reason. Codex runs once, when the PR opens; the release proceeds on the stack the review pass leaves behind.
|
|
659
659
|
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Package:** `@cyanheads/mcp-ts-core`
|
|
4
|
-
**Version:** 0.13.
|
|
4
|
+
**Version:** 0.13.12
|
|
5
5
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
6
6
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.2.0 (protocol revisions 2026-07-28 and 2025-*)
|
|
7
7
|
**Zod:** ^4.6.5
|
|
@@ -406,7 +406,7 @@ See `api-context` skill for full details.
|
|
|
406
406
|
|
|
407
407
|
## Error Handling
|
|
408
408
|
|
|
409
|
-
**Recommended path: declare a typed error contract.** Add `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` to `tool()` / `resource()`. Handler gets `ctx.fail(reason, msg?, data?)` typed against the reason union — typos fail at compile time. Runtime auto-populates `data.reason` for observability; linter enforces conformance against the handler body. `recovery` is required (≥5 words, lint-validated) — the wire hint for its reason: when a failure whose `data.reason` names the entry reaches the tool or resource factory without `data.recovery`, the framework fills `data.recovery.hint` from it — a bare `ctx.fail('reason')` and a service throw carrying `{ reason }` alike, matched on the reason alone — and mirrors it into `content[]` text. Override with explicit `{ recovery: { hint: '...' } }` when runtime context matters; a throw-site `recovery` always wins, and the thrown `McpError` itself is never changed. Optional `severity` (`debug`/`info`/`notice`/`warning`) logs a modeled outcome below `error` — tools only, logging only: the wire envelope, the span status, and the `mcp.tool.*` metrics are untouched. The framework's own `invalid_arguments` and `client_capability_missing` refusals log at `notice` unless an entry naming them declares otherwise. Optional `thrownBy: 'service'` marks an entry the service layer produces, so `error-contract-unthrown` skips it while still checking the handler's own reasons — lint-only metadata, nothing at runtime reads it.
|
|
409
|
+
**Recommended path: declare a typed error contract.** Add `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` to `tool()` / `resource()`. Handler gets `ctx.fail(reason, msg?, data?)` typed against the reason union — typos fail at compile time. Runtime auto-populates `data.reason` for observability; linter enforces conformance against the handler body. `recovery` is required (≥5 words, lint-validated) — the wire hint for its reason: when a failure whose `data.reason` names the entry reaches the tool or resource factory without `data.recovery`, the framework fills `data.recovery.hint` from it — a bare `ctx.fail('reason')` and a service throw carrying `{ reason }` alike, matched on the reason alone — and mirrors it into `content[]` text. Override with explicit `{ recovery: { hint: '...' } }` when runtime context matters; a throw-site `recovery` always wins, and the thrown `McpError` itself is never changed. Optional `severity` (`debug`/`info`/`notice`/`warning`) logs a modeled outcome below `error` — tools only, logging only: the wire envelope, the span status, and the `mcp.tool.*` metrics are untouched. The framework's own `invalid_arguments` and `client_capability_missing` refusals log at `notice` unless an entry naming them declares otherwise, and so does a tool's missing-scope refusal (the inline `auth` check or `checkScopes`), which carries no reason to declare; a missing auth context, a handler's own `forbidden()`, and an upstream 403 keep `error`. The missing-scope and argument-rejection records log no stack, and an argument rejection's record keeps at most the first 1,024 characters of each string and the first 10 entries of each array, the uncut length or count beside each cut. Optional `thrownBy: 'service'` marks an entry the service layer produces, so `error-contract-unthrown` skips it while still checking the handler's own reasons — lint-only metadata, nothing at runtime reads it.
|
|
410
410
|
|
|
411
411
|
```ts
|
|
412
412
|
errors: [
|
|
@@ -446,7 +446,7 @@ For HTTP responses from upstream APIs, use `httpErrorFromResponse(response, { se
|
|
|
446
446
|
|
|
447
447
|
**Auto-classification.** Plain `Error`, `ZodError`, and any other thrown value are caught and classified automatically. Resolution order: request signal already aborted (→ `RequestCancelled`, outranking the thrown value's own code, `McpError` included) → `McpError` code (preserved as-is) → SDK `ConnectionClosed` (→ `RequestCancelled`) → engine resource-limit `RangeError` by whole message — stack overflow, maximum string size (→ `InternalError`) → JS constructor name (`SyntaxError` → `ValidationError`; `TypeError` is excluded) → provider patterns (HTTP status codes, AWS errors, DB errors) → common message patterns → `AbortError` name (→ `Timeout`) → `InternalError` fallback. A result that breaks the definition's own `output` or `enrichment` schema fails as `InternalError` naming that contract, not `ValidationError`.
|
|
448
448
|
|
|
449
|
-
**Error-path parity.** Tool errors: `content[]` carries `Error: <message>`, then `Recovery: <hint>` when the hint says something the message does not already contain, then a closing `(reason … · not retryable · request <id>)` for whichever of `data.reason` / `data.retryable` / `data.requestId` is present; the numeric code and `data.issues` stay JSON-only. `structuredContent.error` carries `{ code, message, data? }`. No `_meta.error`. Resources re-throw via JSON-RPC error envelope. An argument rejection is one of them: `-32602` with `data.issues`, plus `data.reason: 'invalid_arguments'` and a hint synthesized from the issues and the root schema — never a tool-declared `reason`, since the handler never ran. When pre-validation rewrote or dropped a key the caller wrote, `data.input` (`{ aliased: [{ alias, target }], ignored }`) names it and the hint closes with `Validated … as ….` / `Dropped undeclared key ….`; an ignore-list drop is never reported. `client_capability_missing` is the second framework-owned reason: a `ctx.requestInput` return a 2025-era connection cannot serve is refused before any wire traffic as `-32600` carrying that reason and a hint naming the capability. **`data.requestId`** is set on every error envelope the framework builds — tool results, resource reads, prompts, `httpErrorHandler`'s JSON-RPC errors — equal to the `requestId` of that call's log records: a
|
|
449
|
+
**Error-path parity.** Tool errors: `content[]` carries `Error: <message>`, then `Recovery: <hint>` when the hint says something the message does not already contain, then a closing `(reason … · not retryable · request <id>)` for whichever of `data.reason` / `data.retryable` / `data.requestId` is present; the numeric code and `data.issues` stay JSON-only. `structuredContent.error` carries `{ code, message, data? }`. No `_meta.error`. Resources re-throw via JSON-RPC error envelope. An argument rejection is one of them: `-32602` with `data.issues`, plus `data.reason: 'invalid_arguments'` and a hint synthesized from the issues and the root schema — never a tool-declared `reason`, since the handler never ran. When pre-validation rewrote or dropped a key the caller wrote, `data.input` (`{ aliased: [{ alias, target }], ignored }`) names it and the hint closes with `Validated … as ….` / `Dropped undeclared key ….`; an ignore-list drop is never reported. `client_capability_missing` is the second framework-owned reason: a `ctx.requestInput` return a 2025-era connection cannot serve is refused before any wire traffic as `-32600` carrying that reason and a hint naming the capability. **`data.requestId`** is set on every error envelope the framework builds — tool results, resource reads, prompts, `httpErrorHandler`'s JSON-RPC errors — equal to the `requestId` of that call's log records: a token the framework generates per call, never the client's JSON-RPC id. Those records carry the client's id as `jsonRpcId` (string or number as sent; a string over 1,024 characters keeps at most its first 1,024, plus `jsonRpcIdLength`), and the response `id` is unchanged. A resource read refused before it is measured (auth, `params`) carries an id no record shares. It replaces a thrown `data.requestId`, is never added to the thrown `McpError`, and is left off a resource `-32602` whose `data` is exactly `{ uri }` and off `runToolContract` results.
|
|
450
450
|
|
|
451
451
|
**Lint rules** (all warnings, surfaced in `devcheck`): `prefer-mcp-error-in-handler`, `prefer-error-factory`, `preserve-cause-on-rethrow`, `no-stringify-upstream-error`, `error-contract-conformance`, `error-contract-prefer-fail`, `error-contract-unthrown` (a declared reason no literal `ctx.fail`/`ctx.recoveryFor` in the handler names, unless marked `thrownBy: 'service'`). See `api-linter` skill.
|
|
452
452
|
|
|
@@ -653,7 +653,7 @@ Badge order when both set: `· ⚠️ Breaking · 🛡️ Security`. Summary > 3
|
|
|
653
653
|
|
|
654
654
|
## Publishing
|
|
655
655
|
|
|
656
|
-
**Every release goes through a gated release PR** — `git-wrapup`'s "Release PR mode", mode `gated`. Three separate runs, never one: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the
|
|
656
|
+
**Every release goes through a gated release PR** — `git-wrapup`'s "Release PR mode", mode `gated`. Three separate runs, never one: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the release digest: theme line, `## Changes`, `## Gates`, changelog link last); `release-pr-review` reviews and fixes on that branch (each fix an ordinary commit on top of the stack, pushed plainly — nothing already pushed is ever rewritten, so `main` keeps the record of what the review corrected — PR body kept in sync, one summary comment); then `release-and-publish` fast-forwards `main` locally with `git merge --ff-only`, creates the tag on `main`'s tip, pushes `main` and the tag, deletes the branch, and publishes. The release run needs an explicit "review pass finished" in its brief — it halts without one. **Never merge through the GitHub UI or `gh pr merge`**: squash and rebase-merge are disabled in the repo settings because both rewrite the stack (rebase-merge also strips the SSH signatures), and a merge commit breaks the linear history.
|
|
657
657
|
|
|
658
658
|
Codex (`chatgpt-codex-connector`) reviews the PR when it opens — it reacts 👀 while running, then leaves inline comments, or reacts 👍 when it found nothing. Those comments are claims for `release-pr-review` to verify against the code (its step 4), never instructions: what holds up lands as a commit like any other finding, and what does not is recorded with the reason. Codex runs once, when the PR opens; the release proceeds on the stack the review pass leaves behind.
|
|
659
659
|
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
|
|
9
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://modelcontextprotocol.io/specification/2026-07-28)
|
|
10
10
|
|
|
11
11
|
[](https://modelcontextprotocol.io/) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
12
12
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Log records and error messages no longer carry credential-bearing URL paths, host directory paths, or unbounded caller-supplied strings, and every call logs under a generated requestId with the client's JSON-RPC id moved to jsonRpcId."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: true
|
|
5
|
+
agent-notes: |
|
|
6
|
+
Adoption steps for a consumer upgrading from 0.13.11.
|
|
7
|
+
|
|
8
|
+
1. Re-sync the skills (maintenance Phases A and B): `api-utils`, `api-errors`,
|
|
9
|
+
`api-telemetry`, `api-auth`, `api-context`, `api-mirror`, `api-canvas`,
|
|
10
|
+
`field-test`, `git-wrapup`, `tool-defs-analysis`.
|
|
11
|
+
2. Log queries, dashboards, and alerts that join on `requestId` using the
|
|
12
|
+
client's string JSON-RPC id now join on `jsonRpcId` (`extra.jsonRpcId`).
|
|
13
|
+
A tool's missing-scope `Error in tool:<name>` record moved from `error`
|
|
14
|
+
to `notice`; alert rules keyed on that level or on its stack change with
|
|
15
|
+
it.
|
|
16
|
+
3. Code or tests asserting a fetch error message that includes a URL path
|
|
17
|
+
(`https://host/path`) now see `https://host/…`. Label calls that need
|
|
18
|
+
telling apart with `withExtra(ctx, { endpoint })`, and put no URL in a
|
|
19
|
+
`ctx.log` field.
|
|
20
|
+
4. Mirror servers: tests asserting the store path in a `DatabaseError`
|
|
21
|
+
message or `data.path` now assert the file name and `data.recovery.hint`.
|
|
22
|
+
5. Tests asserting a `ZodError`'s message — a resource `params` rejection,
|
|
23
|
+
or a `ZodError` a handler throws — update to the path-first form (see
|
|
24
|
+
Changed).
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# 0.13.12 — 2026-10-04
|
|
28
|
+
|
|
29
|
+
## Changed
|
|
30
|
+
|
|
31
|
+
- **A `ZodError`'s message leads with its path** ([#620](https://github.com/cyanheads/mcp-ts-core/issues/620)): `<dotted.path>: <message>` in place of `<message> at <path>`, on a resource `params` rejection and on any `ZodError` a tool handler, `ctx.state.get(key, schema)`, or a prompt's `generate()` throws. An empty path renders the bare message, and `(+N more)` still trails.
|
|
32
|
+
- **A tool's missing-scope refusal logs at `notice` without a stack** ([#585](https://github.com/cyanheads/mcp-ts-core/issues/585)), from the inline `auth` check and `checkScopes` alike, and `mcp.errors.classified` counts it with `mcp.error.severity: "notice"`. A missing auth context, a handler's own `forbidden()`, and an upstream 403 stay at `error`.
|
|
33
|
+
- **`ErrorHandlerOptions.includeStack: false` removes every stack from the record** ([#586](https://github.com/cyanheads/mcp-ts-core/issues/586)): `stack`, `errorData.originalStack` (also one carried in an `McpError`'s `data`), and each `causeChain` node's `stack`. The tool factory passes it for argument and missing-scope rejections.
|
|
34
|
+
- **`fetchWithTimeout` chains the runtime's rejection as `cause` of the `ServiceUnavailable` it throws** ([#615](https://github.com/cyanheads/mcp-ts-core/issues/615)), message redacted, so the transport `code` (`ECONNREFUSED`, `ConnectionRefused`) survives on the cause chain; an `ErrorHandler.tryCatch` around the call now adds `data.rootCause`.
|
|
35
|
+
- **Retry debug records and the network-error record add `causeChain`** — `{ name, message, code? }` per node — when the error has a cause or a string `code`. The `causeChain` `handleError` logs gains `code` as well.
|
|
36
|
+
- **Skill guidance** — `api-canvas`: a `dataframe_drop` handler re-raises `canvas_not_found` through its own `ctx.fail`, since `acquire()`'s re-stage hint is wrong for a drop; `tool-defs-analysis`: the length-outliers pass weighs `output` and `enrichment` field prose, and `field-test` hands catalog outliers to it; `git-wrapup`: test the stack's base snapshot before blaming a commit group, and a dependency bump rides the commit that adds the files a new `exports` or `files` entry names.
|
|
37
|
+
- **Package description** — "Agent-native TypeScript framework for building MCP servers." in `package.json`, `server.json`, the Docker image label, and `CITATION.cff`, matching the README tagline.
|
|
38
|
+
|
|
39
|
+
## Security
|
|
40
|
+
|
|
41
|
+
- **`requestId` is always a framework-generated `XXXXX-XXXXX` token** ([#584](https://github.com/cyanheads/mcp-ts-core/issues/584)). The client's JSON-RPC id, which is unique only within its connection, is no longer adopted when it is a string; every record of a tool call, resource read, or `prompts/get` carries it as `jsonRpcId` instead, with `jsonRpcIdLength` when cut to 1,024 characters. `httpErrorHandler`'s records carry the body's id the same way. `data.requestId` on error envelopes still matches the call's records; the response `id` is unchanged.
|
|
42
|
+
- **`fetchWithTimeout` names a URL by origin** ([#626](https://github.com/cyanheads/mcp-ts-core/issues/626)): `https://host/sk-key/x?k=1` reads `https://host/…?…`, in every error message and log record, for redirect hops, and for a URL the runtime quotes in its own rejection. A root URL keeps its bare origin. Calls to one origin now share one per-message budget under the logger's rate limit (`MCP_LOG_RATE_LIMIT_THRESHOLD`, default 10 a minute); a repeat past it is dropped and reported as a `Suppressed N` line.
|
|
43
|
+
- **An argument rejection's `Error in tool:<name>` record is bounded** ([#631](https://github.com/cyanheads/mcp-ts-core/issues/631)): each string keeps its first 1,024 characters and each array its first 10 entries, with `originalMessageLength`, `<field>Length`, `<field>Count`, or `<field>Lengths` beside each cut. A rejection within the caps logs as before, and the `-32602` result is unchanged. Pre-validation debug records cut a dropped or rewritten key the same way, adding `ignoredKeyLength` / `aliasLength`.
|
|
44
|
+
- **A mirror store that cannot open or initialize rejects with the file name and a recovery hint** ([#635](https://github.com/cyanheads/mcp-ts-core/issues/635)): `Failed to open mirror store "<file>".` or `Failed to initialize mirror store "<file>".`, with `data` holding only `recovery.hint`. The directory path no longer appears in the message or `data`, and a failure creating the parent directory is now a `DatabaseError` too. The missing-`better-sqlite3` `ConfigurationError` carries no `data`.
|
|
45
|
+
|
|
46
|
+
## Dependencies
|
|
47
|
+
|
|
48
|
+
- Dev: `@types/node` 26.6.3 → 26.6.4.
|
|
49
|
+
- Dev: `openai` ^7.25.0 → ^7.27.0.
|
|
50
|
+
- Dev: `vite` 8.3.1 → 8.3.2.
|
|
@@ -66,15 +66,21 @@ export interface HandlerRequest {
|
|
|
66
66
|
export declare function resolveHandlerRequest(serverContext: ServerContext | undefined, services: HandlerServices, notifiers: NotifierSources): HandlerRequest;
|
|
67
67
|
/**
|
|
68
68
|
* The `parentContext` of a request's tracing context — for a tool call, a
|
|
69
|
-
* resource read, and a `prompts/get` alike
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
69
|
+
* resource read, and a `prompts/get` alike. It carries no `requestId`, so the
|
|
70
|
+
* context generates one per call: a JSON-RPC id is chosen by the client and
|
|
71
|
+
* unique only within its connection, so it cannot name a call (#584). That
|
|
72
|
+
* generated id is the one the call's log records carry and its error
|
|
73
|
+
* `data.requestId` returns (#576).
|
|
74
|
+
*
|
|
75
|
+
* The client's id rides every record of the call as `extra.jsonRpcId` instead
|
|
76
|
+
* — capped by {@link jsonRpcIdLogFields}, string or number as sent — beside the
|
|
77
|
+
* raw session id when present. Log fields only: the execution span and metrics
|
|
78
|
+
* never read `extra`. Raw handler input is deliberately not part of it — the
|
|
79
|
+
* context spreads into the completion log and can carry caller PII or secrets;
|
|
80
|
+
* sizes and parameter names are recorded as metric attributes by the execution
|
|
81
|
+
* measurement instead.
|
|
76
82
|
*/
|
|
77
|
-
export declare function handlerParentContext(serverContext: ServerContext | undefined): Partial<Pick<RequestContext, '
|
|
83
|
+
export declare function handlerParentContext(serverContext: ServerContext | undefined): Partial<Pick<RequestContext, 'extra' | 'sessionId'>>;
|
|
78
84
|
/**
|
|
79
85
|
* Builds the handler `Context`. Called from inside the execution span so
|
|
80
86
|
* `ctx.traceId` / `ctx.spanId` — and the child logger built from them — name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlerContext.d.ts","sourceRoot":"","sources":["../../src/mcp-server/handlerContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAGlE,OAAO,EAAmB,KAAK,OAAO,EAAiB,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,KAAK,oBAAoB,EAIzB,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EAEvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAE3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"handlerContext.d.ts","sourceRoot":"","sources":["../../src/mcp-server/handlerContext.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,aAAa,GAAG,SAAS,EACxC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,eAAe,GACzB,cAAc,CAehB;AAOD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,aAAa,GAAG,SAAS,GACvC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC,CAOtD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,cAAc,EAC3B,MAAM,EAAE,SAAS,aAAa,EAAE,GAAG,SAAS,EAC5C,cAAc,CAAC,EAAE,oBAAoB,EACrC,GAAG,CAAC,EAAE,GAAG,GACR,OAAO,CAyBT"}
|
|
@@ -9,6 +9,7 @@ import { attachTypedFail, createContext } from '../core/context.js';
|
|
|
9
9
|
import { createContextInputs, createInputRequiredGate, createRequestInput, } from './inputRequired.js';
|
|
10
10
|
import { selectNotifiers, } from './notifications.js';
|
|
11
11
|
import { resolveSessionMode } from './types.js';
|
|
12
|
+
import { jsonRpcIdLogFields } from '../utils/internal/observabilityCap.js';
|
|
12
13
|
/**
|
|
13
14
|
* Derives the per-request values from the SDK's `ServerContext`, and picks the
|
|
14
15
|
* notifier delivery path for the request's era via {@link selectNotifiers}.
|
|
@@ -36,19 +37,25 @@ function sdkSessionIdOf(serverContext) {
|
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* The `parentContext` of a request's tracing context — for a tool call, a
|
|
39
|
-
* resource read, and a `prompts/get` alike
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
40
|
+
* resource read, and a `prompts/get` alike. It carries no `requestId`, so the
|
|
41
|
+
* context generates one per call: a JSON-RPC id is chosen by the client and
|
|
42
|
+
* unique only within its connection, so it cannot name a call (#584). That
|
|
43
|
+
* generated id is the one the call's log records carry and its error
|
|
44
|
+
* `data.requestId` returns (#576).
|
|
45
|
+
*
|
|
46
|
+
* The client's id rides every record of the call as `extra.jsonRpcId` instead
|
|
47
|
+
* — capped by {@link jsonRpcIdLogFields}, string or number as sent — beside the
|
|
48
|
+
* raw session id when present. Log fields only: the execution span and metrics
|
|
49
|
+
* never read `extra`. Raw handler input is deliberately not part of it — the
|
|
50
|
+
* context spreads into the completion log and can carry caller PII or secrets;
|
|
51
|
+
* sizes and parameter names are recorded as metric attributes by the execution
|
|
52
|
+
* measurement instead.
|
|
46
53
|
*/
|
|
47
54
|
export function handlerParentContext(serverContext) {
|
|
48
|
-
const
|
|
55
|
+
const jsonRpcId = serverContext?.mcpReq?.id;
|
|
49
56
|
const sessionId = sdkSessionIdOf(serverContext);
|
|
50
57
|
return {
|
|
51
|
-
...(
|
|
58
|
+
...(jsonRpcId !== undefined && { extra: jsonRpcIdLogFields(jsonRpcId) }),
|
|
52
59
|
...(sessionId && { sessionId }),
|
|
53
60
|
};
|
|
54
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlerContext.js","sourceRoot":"","sources":["../../src/mcp-server/handlerContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAgB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAEL,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,GAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGL,eAAe,GAChB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlerContext.js","sourceRoot":"","sources":["../../src/mcp-server/handlerContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC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yBAAyB,EAAE,SAAS,CAAC,yBAAyB;QAC9D,qBAAqB,EAAE,SAAS,CAAC,qBAAqB;QACtD,qBAAqB,EAAE,SAAS,CAAC,qBAAqB;QACtD,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC;KACpB,CAAC,EACF,MAAM,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceHandlerFactory.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/utils/resourceHandlerFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,SAAS,EACV,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"resourceHandlerFactory.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/utils/resourceHandlerFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,SAAS,EACV,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,oBAAoB,EAG1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAehG,gEAAgE;AAChE,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAiBrE;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACnC,kBAAkB,CAAC,UAAU,CAAC,CAShC;AAwBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,qBAAqB,EAC1B,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,eAAe,EAC1B,YAAY,CAAC,EAAE,oBAAoB,GAClC,CACD,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,CAiGrD"}
|
|
@@ -10,6 +10,7 @@ import { parseOutputContract } from '../../outputContract.js';
|
|
|
10
10
|
import { withRequiredScopes } from '../../transports/auth/lib/authUtils.js';
|
|
11
11
|
import { JsonRpcErrorCode, McpError } from '../../../types-global/errors.js';
|
|
12
12
|
import { asRequestCancelled, ErrorHandler } from '../../../utils/internal/error-handler/errorHandler.js';
|
|
13
|
+
import { capForObservability, OBSERVABILITY_MAX_STRING_LENGTH, } from '../../../utils/internal/observabilityCap.js';
|
|
13
14
|
import { measureResourceExecution } from '../../../utils/internal/performance.js';
|
|
14
15
|
import { requestContextService } from '../../../utils/internal/requestContext.js';
|
|
15
16
|
// ---------------------------------------------------------------------------
|
|
@@ -39,15 +40,13 @@ export function defaultResponseFormatter(result, meta) {
|
|
|
39
40
|
},
|
|
40
41
|
];
|
|
41
42
|
}
|
|
42
|
-
/** The longest URI a read's log records and span carry: 1 KiB, since the projection is ASCII. */
|
|
43
|
-
const OBSERVABLE_URI_MAX_LENGTH = 1024;
|
|
44
43
|
/**
|
|
45
44
|
* The URI a read's log records and span carry: userinfo, query, and fragment
|
|
46
45
|
* stripped — they commonly carry credentials or caller secrets — then cut to
|
|
47
|
-
* its first {@link
|
|
48
|
-
* its length. `uriLength` is the uncut projection's length, present only
|
|
49
|
-
* the cut removed something. The handler's `ctx.uri` and the response
|
|
50
|
-
* original URI; this projection is observability-only.
|
|
46
|
+
* its first {@link OBSERVABILITY_MAX_STRING_LENGTH} characters, since a client
|
|
47
|
+
* sets its length. `uriLength` is the uncut projection's length, present only
|
|
48
|
+
* when the cut removed something. The handler's `ctx.uri` and the response
|
|
49
|
+
* keep the original URI; this projection is observability-only.
|
|
51
50
|
*/
|
|
52
51
|
function observableResourceUri(uri) {
|
|
53
52
|
const safe = new URL(uri.href);
|
|
@@ -55,10 +54,8 @@ function observableResourceUri(uri) {
|
|
|
55
54
|
safe.password = '';
|
|
56
55
|
safe.search = '';
|
|
57
56
|
safe.hash = '';
|
|
58
|
-
const {
|
|
59
|
-
return
|
|
60
|
-
? { uri: href.slice(0, OBSERVABLE_URI_MAX_LENGTH), uriLength: href.length }
|
|
61
|
-
: { uri: href };
|
|
57
|
+
const { value, length } = capForObservability(safe.href);
|
|
58
|
+
return { uri: value, ...(length !== undefined && { uriLength: length }) };
|
|
62
59
|
}
|
|
63
60
|
// ---------------------------------------------------------------------------
|
|
64
61
|
// Factory
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceHandlerFactory.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/utils/resourceHandlerFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EAEnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,qBAAqB,EACrB,UAAU,GACX,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,Q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C7G,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,KAAK,YAAY,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACjE,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,aAAa,CAAC,KAAe,EAAE,SAAiB;IACvD,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,kBAAkB,GACtB,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,aAAa;QAC7C,IAAI,KAAK,SAAS;QAClB,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACjC,IAAI,kBAAkB;QAAE,OAAO,KAAK,CAAC;IACrC,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
* carrying the caller's own key text mints a permanent time series per spelling
|
|
50
50
|
* a client invents (#114). The raw key and alias go to the debug log, which is
|
|
51
51
|
* where an operator looks when a counter shows a new client artifact and where
|
|
52
|
-
* cardinality costs nothing
|
|
53
|
-
*
|
|
52
|
+
* cardinality costs nothing, at most their first 1,024 characters bounding its size
|
|
53
|
+
* (#631) — and, on a rejection, back to the caller who sent them, whole, since
|
|
54
|
+
* an error payload is per call rather than a permanent series.
|
|
54
55
|
*
|
|
55
56
|
* @module src/mcp-server/tools/utils/inputPrevalidation
|
|
56
57
|
*/
|
|
@@ -162,6 +163,11 @@ export interface RepairedArguments {
|
|
|
162
163
|
* call, for the attempt whose arguments the handler receives — or, on a
|
|
163
164
|
* rejection, the first attempt, the one the rejection reports — so a key the
|
|
164
165
|
* alias-first retry rewrote never also counts as dropped (#563).
|
|
166
|
+
*
|
|
167
|
+
* The key a record names is the caller's, of whatever length the caller wrote,
|
|
168
|
+
* so the message and the field carry at most its first 1,024 characters, with
|
|
169
|
+
* `aliasLength` / `ignoredKeyLength` holding the uncut length when that cut
|
|
170
|
+
* something (#631).
|
|
165
171
|
*/
|
|
166
172
|
export declare function recordPrevalidation(def: AnyToolDefinition, attempt: PrevalidatedArguments, context: RequestContext | undefined): void;
|
|
167
173
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputPrevalidation.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/inputPrevalidation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"inputPrevalidation.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/inputPrevalidation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAmC,MAAM,KAAK,CAAC;AAIrE,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,oCAAoC,CAAC;AAW5C,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,qBAAqB,CAAC;AAM9E;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,KAAK,CAAC;CACxC;AASD;;;;GAIG;AACH,QAAA,MAAM,cAAc;aAClB,iBA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D,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC;AAiDD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,iBAAiB,EACtB,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,IAAI,CA4BN;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,IAAI,CAqBN;AAgDD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAoSD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,oBAAoB,GAAG,SAAS,GACxC,qBAAqB,CAEvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,qBAAqB,EAC5B,OAAO,EAAE,oBAAoB,GAAG,SAAS,GACxC,qBAAqB,GAAG,SAAS,CASnC;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,iBAAiB,CAgBnB"}
|
|
@@ -49,12 +49,14 @@
|
|
|
49
49
|
* carrying the caller's own key text mints a permanent time series per spelling
|
|
50
50
|
* a client invents (#114). The raw key and alias go to the debug log, which is
|
|
51
51
|
* where an operator looks when a counter shows a new client artifact and where
|
|
52
|
-
* cardinality costs nothing
|
|
53
|
-
*
|
|
52
|
+
* cardinality costs nothing, at most their first 1,024 characters bounding its size
|
|
53
|
+
* (#631) — and, on a rejection, back to the caller who sent them, whole, since
|
|
54
|
+
* an error payload is per call rather than a permanent series.
|
|
54
55
|
*
|
|
55
56
|
* @module src/mcp-server/tools/utils/inputPrevalidation
|
|
56
57
|
*/
|
|
57
58
|
import { logger } from '../../../utils/internal/logger.js';
|
|
59
|
+
import { capForObservability } from '../../../utils/internal/observabilityCap.js';
|
|
58
60
|
import { requestContextService, withExtra, } from '../../../utils/internal/requestContext.js';
|
|
59
61
|
import { ATTR_MCP_INPUT_ALIAS_KIND, ATTR_MCP_INPUT_COERCION, ATTR_MCP_INPUT_IGNORE_RULE, ATTR_MCP_INPUT_TARGET, ATTR_MCP_TOOL_NAME, } from '../../../utils/telemetry/attributes.js';
|
|
60
62
|
import { createCounter } from '../../../utils/telemetry/metrics.js';
|
|
@@ -122,24 +124,33 @@ function countAliased(toolName, target, kind) {
|
|
|
122
124
|
* call, for the attempt whose arguments the handler receives — or, on a
|
|
123
125
|
* rejection, the first attempt, the one the rejection reports — so a key the
|
|
124
126
|
* alias-first retry rewrote never also counts as dropped (#563).
|
|
127
|
+
*
|
|
128
|
+
* The key a record names is the caller's, of whatever length the caller wrote,
|
|
129
|
+
* so the message and the field carry at most its first 1,024 characters, with
|
|
130
|
+
* `aliasLength` / `ignoredKeyLength` holding the uncut length when that cut
|
|
131
|
+
* something (#631).
|
|
125
132
|
*/
|
|
126
133
|
export function recordPrevalidation(def, attempt, context) {
|
|
127
134
|
for (const change of attempt.changes) {
|
|
128
135
|
if (change.kind === 'aliased') {
|
|
129
|
-
const {
|
|
136
|
+
const { aliasKind, target } = change;
|
|
137
|
+
const alias = capForObservability(change.alias);
|
|
130
138
|
countAliased(def.name, target, aliasKind);
|
|
131
|
-
debugLog(`Tool '${def.name}': rewrote argument key '${alias}' to '${target}'.`, context, {
|
|
139
|
+
debugLog(`Tool '${def.name}': rewrote argument key '${alias.value}' to '${target}'.`, context, {
|
|
132
140
|
toolName: def.name,
|
|
133
|
-
alias,
|
|
141
|
+
alias: alias.value,
|
|
142
|
+
...(alias.length !== undefined && { aliasLength: alias.length }),
|
|
134
143
|
target,
|
|
135
144
|
aliasKind,
|
|
136
145
|
});
|
|
137
146
|
}
|
|
138
147
|
else {
|
|
148
|
+
const key = capForObservability(change.key);
|
|
139
149
|
countIgnoredKey(def.name, change.rule);
|
|
140
|
-
debugLog(`Tool '${def.name}': dropped client-added argument key '${
|
|
150
|
+
debugLog(`Tool '${def.name}': dropped client-added argument key '${key.value}'.`, context, {
|
|
141
151
|
toolName: def.name,
|
|
142
|
-
ignoredKey:
|
|
152
|
+
ignoredKey: key.value,
|
|
153
|
+
...(key.length !== undefined && { ignoredKeyLength: key.length }),
|
|
143
154
|
ignoreRule: change.rule,
|
|
144
155
|
});
|
|
145
156
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputPrevalidation.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/inputPrevalidation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAKH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAEL,qBAAqB,EACrB,SAAS,GACV,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAsCrF;;;;GAIG;AACH,MAAM,qBAAqB,GAAsB,CAAC,OAAO,EAAE,uBAAuB,EAAE,YAAY,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