@cyanheads/mcp-ts-core 0.13.10 → 0.13.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/AGENTS.md +6 -3
  2. package/CLAUDE.md +6 -3
  3. package/README.md +29 -3
  4. package/biome.json +1 -1
  5. package/changelog/0.13.x/0.13.11.md +113 -0
  6. package/dist/cli/app-render.d.ts +11 -0
  7. package/dist/cli/app-render.d.ts.map +1 -0
  8. package/dist/cli/app-render.js +150 -0
  9. package/dist/cli/app-render.js.map +1 -0
  10. package/dist/cli/init.d.ts +2 -1
  11. package/dist/cli/init.d.ts.map +1 -1
  12. package/dist/cli/init.js +10 -2
  13. package/dist/cli/init.js.map +1 -1
  14. package/dist/core/context.d.ts +3 -2
  15. package/dist/core/context.d.ts.map +1 -1
  16. package/dist/core/context.js +25 -16
  17. package/dist/core/context.js.map +1 -1
  18. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
  19. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +18 -7
  20. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
  21. package/dist/services/mirror/sqlite/handle.d.ts +11 -5
  22. package/dist/services/mirror/sqlite/handle.d.ts.map +1 -1
  23. package/dist/services/mirror/sqlite/handle.js +46 -8
  24. package/dist/services/mirror/sqlite/handle.js.map +1 -1
  25. package/dist/services/mirror/sqlite/sqliteMirrorStore.d.ts +6 -1
  26. package/dist/services/mirror/sqlite/sqliteMirrorStore.d.ts.map +1 -1
  27. package/dist/services/mirror/sqlite/sqliteMirrorStore.js.map +1 -1
  28. package/dist/testing/apps/browser.d.ts +27 -0
  29. package/dist/testing/apps/browser.d.ts.map +1 -0
  30. package/dist/testing/apps/browser.js +162 -0
  31. package/dist/testing/apps/browser.js.map +1 -0
  32. package/dist/testing/apps/cdp-pipe.d.ts +79 -0
  33. package/dist/testing/apps/cdp-pipe.d.ts.map +1 -0
  34. package/dist/testing/apps/cdp-pipe.js +200 -0
  35. package/dist/testing/apps/cdp-pipe.js.map +1 -0
  36. package/dist/testing/apps/csp.d.ts +17 -0
  37. package/dist/testing/apps/csp.d.ts.map +1 -0
  38. package/dist/testing/apps/csp.js +50 -0
  39. package/dist/testing/apps/csp.js.map +1 -0
  40. package/dist/testing/apps/host-pages.d.ts +47 -0
  41. package/dist/testing/apps/host-pages.d.ts.map +1 -0
  42. package/dist/testing/apps/host-pages.js +138 -0
  43. package/dist/testing/apps/host-pages.js.map +1 -0
  44. package/dist/testing/apps/index.d.ts +167 -0
  45. package/dist/testing/apps/index.d.ts.map +1 -0
  46. package/dist/testing/apps/index.js +36 -0
  47. package/dist/testing/apps/index.js.map +1 -0
  48. package/dist/testing/apps/partial-json.d.ts +14 -0
  49. package/dist/testing/apps/partial-json.d.ts.map +1 -0
  50. package/dist/testing/apps/partial-json.js +71 -0
  51. package/dist/testing/apps/partial-json.js.map +1 -0
  52. package/dist/testing/apps/run.d.ts +13 -0
  53. package/dist/testing/apps/run.d.ts.map +1 -0
  54. package/dist/testing/apps/run.js +659 -0
  55. package/dist/testing/apps/run.js.map +1 -0
  56. package/dist/utils/index.d.ts +1 -1
  57. package/dist/utils/index.d.ts.map +1 -1
  58. package/dist/utils/index.js +1 -1
  59. package/dist/utils/index.js.map +1 -1
  60. package/dist/utils/internal/logger.d.ts +21 -1
  61. package/dist/utils/internal/logger.d.ts.map +1 -1
  62. package/dist/utils/internal/logger.js +31 -14
  63. package/dist/utils/internal/logger.js.map +1 -1
  64. package/dist/utils/internal/performance.d.ts +3 -1
  65. package/dist/utils/internal/performance.d.ts.map +1 -1
  66. package/dist/utils/internal/performance.js +8 -3
  67. package/dist/utils/internal/performance.js.map +1 -1
  68. package/dist/utils/security/sanitization.d.ts +16 -13
  69. package/dist/utils/security/sanitization.d.ts.map +1 -1
  70. package/dist/utils/security/sanitization.js +74 -33
  71. package/dist/utils/security/sanitization.js.map +1 -1
  72. package/dist/utils/telemetry/attributes.d.ts +7 -1
  73. package/dist/utils/telemetry/attributes.d.ts.map +1 -1
  74. package/dist/utils/telemetry/attributes.js +7 -1
  75. package/dist/utils/telemetry/attributes.js.map +1 -1
  76. package/framework-skills/add-app-tool/SKILL.md +2 -1
  77. package/framework-skills/add-test/SKILL.md +15 -15
  78. package/framework-skills/add-tool/SKILL.md +2 -2
  79. package/framework-skills/api-config/SKILL.md +11 -2
  80. package/framework-skills/api-context/SKILL.md +2 -2
  81. package/framework-skills/api-mirror/SKILL.md +4 -3
  82. package/framework-skills/api-telemetry/SKILL.md +6 -4
  83. package/framework-skills/api-testing/SKILL.md +5 -1
  84. package/framework-skills/api-utils/SKILL.md +3 -3
  85. package/framework-skills/code-simplifier/SKILL.md +2 -2
  86. package/framework-skills/field-test/SKILL.md +52 -7
  87. package/framework-skills/git-wrapup/SKILL.md +2 -2
  88. package/framework-skills/orchestrations/SKILL.md +1 -1
  89. package/framework-skills/orchestrations/workflows/greenfield-build.md +2 -2
  90. package/framework-skills/polish-docs-meta/SKILL.md +4 -3
  91. package/framework-skills/polish-docs-meta/references/server-json.md +24 -26
  92. package/framework-skills/release-and-publish/SKILL.md +2 -2
  93. package/framework-skills/release-pr-review/SKILL.md +5 -5
  94. package/framework-skills/setup/SKILL.md +2 -2
  95. package/package.json +37 -22
  96. package/scripts/devcheck.ts +43 -21
  97. package/scripts/lint-packaging.ts +91 -1
  98. package/scripts/prune-musl-packages.ts +146 -0
  99. package/templates/.github/workflows/codeql.yml +10 -1
  100. package/templates/Dockerfile +13 -4
  101. package/templates/_.dockerignore +3 -5
  102. package/templates/_.gitignore +4 -4
  103. package/templates/package.json +4 -4
  104. package/templates/server.json +7 -21
@@ -57,6 +57,74 @@ const PATH_REJECTION_HINTS = {
57
57
  path_traversal: 'Provide a relative path that stays inside the permitted directory, with no `..` segments climbing out of it.',
58
58
  absolute_path_disallowed: 'Provide a relative path instead of an absolute one.',
59
59
  };
60
+ /**
61
+ * Each sensitive field lowercased with non-alphanumerics stripped, matched
62
+ * against a whole key. Module state: the singleton `Sanitization` and
63
+ * {@link maskSensitiveFields} read one list, which `setSensitiveFields` rebuilds.
64
+ */
65
+ let sensitiveNames = new Set();
66
+ /** Each sensitive field lowercased, matched against each word of a key. */
67
+ let sensitiveWords = new Set();
68
+ /** Lowercases a field name and strips every non-alphanumeric character. */
69
+ function normalizeName(name) {
70
+ return name.toLowerCase().replace(/[^a-z0-9]/g, '');
71
+ }
72
+ function setSensitiveNames(fields) {
73
+ sensitiveNames = new Set(fields.map(normalizeName).filter(Boolean));
74
+ sensitiveWords = new Set(fields.map((field) => field.toLowerCase()).filter(Boolean));
75
+ }
76
+ setSensitiveNames(DEFAULT_SENSITIVE_FIELDS);
77
+ /**
78
+ * Whether `key` names a sensitive field: its normalized form equals one
79
+ * (`API_KEY` matches `apiKey`), or one of its camelCase, snake_case, or
80
+ * kebab-case words does (`accessToken` matches `token`).
81
+ */
82
+ function isSensitiveKey(key) {
83
+ if (sensitiveNames.has(normalizeName(key)))
84
+ return true;
85
+ return key
86
+ .replace(/([A-Z])/g, ' $1')
87
+ .toLowerCase()
88
+ .split(/[\s_-]+/)
89
+ .some((word) => sensitiveWords.has(word));
90
+ }
91
+ /**
92
+ * Copies `fields` with the value of every sensitive field replaced by
93
+ * `'[REDACTED]'`, at any depth, matching keys as `sanitizeForLogging` does —
94
+ * fields added with `setSensitiveFields` included. The copy is what
95
+ * `JSON.stringify` reads from the input (an object's `toJSON()` result, else its
96
+ * own enumerable properties), so it serializes as the input would, minus the
97
+ * masked values. Nothing passes through `structuredClone`, which rejects a `URL`
98
+ * or a function. A reference back to an enclosing object becomes `'[Circular]'`.
99
+ * The input is never modified.
100
+ *
101
+ * @internal Masks the `ctx.log` mirror to the client. Not part of the public API.
102
+ */
103
+ export function maskSensitiveFields(fields) {
104
+ return maskEntries(fields, new Set([fields]));
105
+ }
106
+ /** Masks an object's own enumerable entries; `ancestors` holds every object enclosing them. */
107
+ function maskEntries(object, ancestors) {
108
+ const masked = {};
109
+ for (const [key, value] of Object.entries(object)) {
110
+ masked[key] = isSensitiveKey(key) ? '[REDACTED]' : maskValue(value, ancestors);
111
+ }
112
+ return masked;
113
+ }
114
+ function maskValue(value, ancestors) {
115
+ const toJSON = isRecord(value) ? value.toJSON : undefined;
116
+ const json = typeof toJSON === 'function' ? toJSON.call(value) : value;
117
+ if (json === null || typeof json !== 'object')
118
+ return json;
119
+ if (ancestors.has(json))
120
+ return '[Circular]';
121
+ ancestors.add(json);
122
+ const masked = Array.isArray(json)
123
+ ? json.map((item) => maskValue(item, ancestors))
124
+ : maskEntries(json, ancestors);
125
+ ancestors.delete(json);
126
+ return masked;
127
+ }
60
128
  // Dynamically import 'path' only in Node.js environments.
61
129
  // Top-level await ensures the module is loaded before any sanitizePath call.
62
130
  let pathModule;
@@ -156,11 +224,7 @@ export class Sanitization {
156
224
  // transformTags is built lazily in sanitizeHtml() when the dep is loaded
157
225
  };
158
226
  /** @private */
159
- constructor() {
160
- this.rebuildSensitiveSets();
161
- }
162
- normalizedSensitiveSet;
163
- wordSensitiveSet;
227
+ constructor() { }
164
228
  /**
165
229
  * Returns the singleton instance of `Sanitization`, creating it on first call.
166
230
  *
@@ -178,9 +242,10 @@ export class Sanitization {
178
242
  return Sanitization.instance;
179
243
  }
180
244
  /**
181
- * Extends the list of sensitive field names used by `sanitizeForLogging`.
245
+ * Extends the list of sensitive field names used by `sanitizeForLogging` and by the
246
+ * masking of every `ctx.log` record mirrored to the client.
182
247
  * New names are merged with the existing list (deduplication applied, case-insensitive).
183
- * Changes take effect immediately on subsequent `sanitizeForLogging` calls.
248
+ * Changes take effect immediately on subsequent calls.
184
249
  *
185
250
  * @param fields - Field names to add to the sensitive list (e.g., `['myApiKey', 'session_id']`).
186
251
  * @returns `void`
@@ -195,7 +260,7 @@ export class Sanitization {
195
260
  this.sensitiveFields = [
196
261
  ...new Set([...this.sensitiveFields, ...fields.map((f) => f.toLowerCase())]),
197
262
  ];
198
- this.rebuildSensitiveSets();
263
+ setSensitiveNames(this.sensitiveFields);
199
264
  const logContext = requestContextService.createRequestContext({
200
265
  operation: 'Sanitization.setSensitiveFields',
201
266
  additionalContext: {
@@ -781,17 +846,7 @@ export class Sanitization {
781
846
  for (const key in obj) {
782
847
  if (Object.hasOwn(obj, key)) {
783
848
  const value = obj[key];
784
- const normalizedKey = Sanitization.normalizeName(key);
785
- // Split into words for token-based matching (camelCase, snake_case, kebab-case)
786
- const keyWords = key
787
- .replace(/([A-Z])/g, ' $1')
788
- .toLowerCase()
789
- .split(/[\s_-]+/)
790
- .filter(Boolean);
791
- const isExactSensitive = this.normalizedSensitiveSet.has(normalizedKey);
792
- const isWordSensitive = keyWords.some((w) => this.wordSensitiveSet.has(w));
793
- const isSensitive = isExactSensitive || isWordSensitive;
794
- if (isSensitive) {
849
+ if (isSensitiveKey(key)) {
795
850
  obj[key] = '[REDACTED]';
796
851
  }
797
852
  else if (value && typeof value === 'object') {
@@ -800,20 +855,6 @@ export class Sanitization {
800
855
  }
801
856
  }
802
857
  }
803
- /**
804
- * Normalizes a field name for sensitive-key lookup by lowercasing and stripping
805
- * all non-alphanumeric characters. Used for exact-match detection in `redactSensitiveFields`.
806
- * @param str - The raw field name string.
807
- * @returns Lowercased alphanumeric-only version of `str`.
808
- * @private
809
- */
810
- static normalizeName(str) {
811
- return str.toLowerCase().replace(/[^a-z0-9]/g, '');
812
- }
813
- rebuildSensitiveSets() {
814
- this.normalizedSensitiveSet = new Set(this.sensitiveFields.map((f) => Sanitization.normalizeName(f)).filter(Boolean));
815
- this.wordSensitiveSet = new Set(this.sensitiveFields.map((f) => f.toLowerCase()).filter(Boolean));
816
- }
817
858
  }
818
859
  /**
819
860
  * Pre-constructed singleton instance of `Sanitization`.
@@ -1 +1 @@
1
- {"version":3,"file":"sanitization.js","sourceRoot":"","sources":["../../../src/utils/security/sanitization.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,eAAe,GAChB,MAAM,0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GAAY;QACxC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO;QAE5C,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACvB,KAAK,MAAM,IAAI,IAAI,GAAG;gBAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;YACzD,OAAO;QACT,CAAC;QAED,sDAAsD;QACtD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,OAAO;QAE3B,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;YACtB,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;gBACvB,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;oBACxB,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC;gBAC1B,CAAC;qBAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBAC9C,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAc,EAAW,EAAE,CACjE,YAAY,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC"}
@@ -80,10 +80,16 @@ export declare const ATTR_MCP_INPUT_COERCION = "mcp.input.coercion";
80
80
  */
81
81
  export declare const ATTR_MCP_PACER_NAME = "mcp.pacer.name";
82
82
  /**
83
- * Full URI identifying the MCP resource being accessed (e.g., `myscheme://items/123`).
83
+ * URI of the MCP resource being read (e.g., `myscheme://items/123`), without
84
+ * userinfo, query, or fragment, and cut to its first 1,024 characters.
84
85
  * Use on spans only — not on metrics, where unbounded cardinality is a concern.
85
86
  */
86
87
  export declare const ATTR_MCP_RESOURCE_URI = "mcp.resource.uri";
88
+ /**
89
+ * Length of the URI `mcp.resource.uri` was cut from — set only when the cut
90
+ * removed something. Spans only, like `mcp.resource.uri`.
91
+ */
92
+ export declare const ATTR_MCP_RESOURCE_URI_LENGTH = "mcp.resource.uri_length";
87
93
  /** Bounded resource identifier (name or URI template) for metric attributes. */
88
94
  export declare const ATTR_MCP_RESOURCE_NAME = "mcp.resource.name";
89
95
  /** MIME type of the resource content (e.g., `application/json`, `text/plain`). */
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/utils/telemetry/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D,iGAAiG;AACjG,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAMpD;;GAEG;AACH,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD,0DAA0D;AAC1D,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAEhE,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAE9D,yGAAyG;AACzG,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD,iGAAiG;AACjG,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AAExE,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE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tD,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAMxD,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AAMxE,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,8BAA8B,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,uBAAuB,CAAC"}
@@ -100,10 +100,16 @@ export const ATTR_MCP_PACER_NAME = 'mcp.pacer.name';
100
100
  // MCP Resource Attributes
101
101
  // ============================================================================
102
102
  /**
103
- * Full URI identifying the MCP resource being accessed (e.g., `myscheme://items/123`).
103
+ * URI of the MCP resource being read (e.g., `myscheme://items/123`), without
104
+ * userinfo, query, or fragment, and cut to its first 1,024 characters.
104
105
  * Use on spans only — not on metrics, where unbounded cardinality is a concern.
105
106
  */
106
107
  export const ATTR_MCP_RESOURCE_URI = 'mcp.resource.uri';
108
+ /**
109
+ * Length of the URI `mcp.resource.uri` was cut from — set only when the cut
110
+ * removed something. Spans only, like `mcp.resource.uri`.
111
+ */
112
+ export const ATTR_MCP_RESOURCE_URI_LENGTH = 'mcp.resource.uri_length';
107
113
  /** Bounded resource identifier (name or URI template) for metric attributes. */
108
114
  export const ATTR_MCP_RESOURCE_NAME = 'mcp.resource.name';
109
115
  /** MIME type of the resource content (e.g., `application/json`, `text/plain`). */
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/utils/telemetry/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+EAA+E;AAC/E,yDAAyD;AACzD,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE5D,iGAAiG;AACjG,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;G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kB,CAAC;AAExD,+EAA+E;AAC/E,wCAAwC;AACxC,+EAA+E;AAE/E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,6BAA6B,GAAG,0BAA0B,CAAC;AAExE,+EAA+E;AAC/E,sCAAsC;AACtC,+EAA+E;AAE/E,mFAAmF;AACnF,MAAM,CAAC,MAAM,8BAA8B,GAAG,2BAA2B,CAAC;AAE1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC"}
@@ -4,7 +4,7 @@ description: >
4
4
  Scaffold an MCP App tool + UI resource pair. Use when the user asks to add a tool with interactive UI, create an MCP App, or build a visual/interactive tool.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.7"
7
+ version: "1.8"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -236,3 +236,4 @@ If the repo already uses `definitions/index.ts` barrels, update those instead of
236
236
  - [ ] Handler tested directly via `createMockContext()`, or `add-test` skill run to scaffold the test file
237
237
  - [ ] `bun run devcheck` passes (linter validates `_meta.ui` and tool/resource pairing)
238
238
  - [ ] Smoke-tested with `bun run rebuild && bun run start:stdio < /dev/null` (or `start:http`); the `Core services constructed` record lists the tool in `tools` and its UI resource in `resources`
239
+ - [ ] View rendered in the headless MCP Apps host (`mcp-ts-core app-render`; `field-test` skill, Step 6): `initialized` is true, `errors` and `cspViolations` are empty, and the screenshot shows the tool result
@@ -4,7 +4,7 @@ description: >
4
4
  Scaffold a test file for an existing tool, resource, or service. Use when the user asks to add tests, improve coverage, or when a definition exists without a matching test file.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.8"
7
+ version: "1.9"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -227,20 +227,20 @@ For a destructive consent gate, the second round completes only when the context
227
227
 
228
228
  ### Cancellation test
229
229
 
230
- ```typescript
231
- it('respects cancellation', async () => {
232
- const controller = new AbortController();
233
- const ctx = createMockContext({ signal: controller.signal });
234
- const input = {{TOOL_EXPORT}}.input.parse({ count: 100, delayMs: 10 });
235
-
236
- setTimeout(() => controller.abort(), 50);
237
- const result = await {{TOOL_EXPORT}}.handler(input, ctx);
238
-
239
- // Should have returned a partial result rather than throwing on cancellation.
240
- // Assert on a field from the tool's actual output schema.
241
- expect(result).toBeDefined();
242
- });
243
- ```
230
+ Pass an `AbortController` signal through `createMockContext` or `runToolContract`.
231
+ Abort after a controlled I/O operation or loop iteration starts, then assert that
232
+ the pending call settles and no further requests or iterations run. Use a deferred
233
+ fixture or fake timers so the test does not depend on a wall-clock delay; restore
234
+ timers and close any fixture resources afterward. A defined result alone does not
235
+ prove cancellation stopped the work.
236
+
237
+ When an abort-aware handler throws after the signal fires, `runToolContract` returns
238
+ `isError: true` with `structuredContent.error.code` equal to
239
+ `JsonRpcErrorCode.RequestCancelled`; assert the cancellation message in `content[]`
240
+ as well. Use schema-valid arguments: invalid arguments still return `InvalidParams`
241
+ before the handler runs. A partial success is appropriate only when the tool's
242
+ contract explicitly supports it; assert its actual partial-result fields, output
243
+ schema, and `format()` content instead of requiring every handler to return one.
244
244
 
245
245
  ### Prompt test
246
246
 
@@ -4,7 +4,7 @@ description: >
4
4
  Scaffold a new MCP tool definition. Use when the user asks to add a tool, create a new tool, or implement a new capability for the server.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.32"
7
+ version: "2.33"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -822,7 +822,7 @@ input: z.object({
822
822
  }),
823
823
  ```
824
824
 
825
- `toJSONSchema` emits only the inner schema for a preprocess pipe in both `io` modes, so the advertised `pattern` is unchanged; `''` parses to an absent key, a real value still hits the validator, and the handler needs no extra guard.
825
+ `toJSONSchema` emits only the inner schema for a preprocess pipe in both `io` modes, so the advertised `pattern` is unchanged; `''` parses to `undefined`, a real value still hits the validator, and a handler that tests the value (`input.d1 ?? default`, `if (input.d1)`) needs no extra guard. The key itself stays present (`'d1' in input` is `true`), so never test for the key or spread `input` into an upstream query. Because the advertised pattern still rejects `''`, keep the blank out of the `.describe()` text: "an empty string means unset" contradicts the schema a validating client reads. The blank is tolerated for form clients, not offered as input.
826
826
 
827
827
  **Required fields are different.** If a string field is required and must be non-empty to be meaningful, `.min(1)` is correct — the client shouldn't have submitted the form without filling it in.
828
828
 
@@ -4,7 +4,7 @@ description: >
4
4
  Reference for core and server configuration in `@cyanheads/mcp-ts-core`. Covers env var tables with defaults, priority order, server-specific Zod schema pattern, and Workers lazy-parsing requirement.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.23"
7
+ version: "1.24"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -92,7 +92,7 @@ await createApp({ sessionMode: { default: 'stateful', require: 'stateful' } });
92
92
  | Env Var | `AppConfig` field | Default | Notes |
93
93
  |:--------|:-----------------|:--------|:------|
94
94
  | `NODE_ENV` | `environment` | `development` | Aliases: `dev`→`development`, `prod`→`production`, `test`→`testing` |
95
- | `MCP_LOG_LEVEL` | `logLevel` | `debug` | Aliases: `warn`→`warning`, `err`→`error`, `fatal`/`silent`→`emerg`, `trace`→`debug`, `information`→`info` |
95
+ | `MCP_LOG_LEVEL` | `logLevel` | `debug` | The floor for every log sink — stderr, the files, OTLP export, and the `ctx.log` mirror to the client (`notifications/message`), which a client's own level can only narrow. Compared on the RFC 5424 order, so `notice` drops `info` and `crit` drops `error`. Aliases: `warn`→`warning`, `err`→`error`, `fatal`/`silent`→`emerg`, `trace`→`debug`, `information`→`info` |
96
96
  | `LOGS_DIR` | `logsPath` | `<app-root>/logs` | Node.js only; absolute paths are used verbatim, relative ones resolve against the application root (see Core config) — never the framework's install directory. A file under it that cannot be opened (read-only mount, another user's directory) is dropped at startup with one `warning` naming it and the error code; stderr and the other files keep logging |
97
97
  | `LOG_TOOL_FAILURE_PAYLOADS` | `logToolFailurePayloads` | `false` | Opt-in. Each failed tool call also writes a `Tool failure payload: <tool>` record carrying `toolInput` (the arguments as sent) and `toolResult` (the `CallToolResult` returned) as redacted JSON strings, at the call's error-record level. Reaches every log destination — stderr, `combined.log`, and OTLP when `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` is set. Redaction is by key name only, so a secret inside a free-form value (a query, a message) is logged. Record shape: `api-telemetry` Logs |
98
98
  | `LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES` | `logToolFailurePayloadMaxBytes` | `16384` | Cap per payload, in UTF-8 bytes. A longer one is cut on a character boundary and flagged with `toolInputTruncated` / `toolResultTruncated` |
@@ -281,6 +281,15 @@ export function getServerConfig(): ServerConfig {
281
281
  }
282
282
  ```
283
283
 
284
+ **Call `getServerConfig()` in `createApp`'s `setup()`.** The accessor alone parses on first read, which is usually the first tool call: an invalid value then lets the server report ready and fails every call instead, including tools that never read the bad variable. Calling it in `setup()` turns that into a startup failure — the `ConfigurationError` banner naming the variable, exit code 1, before any transport binds. On Workers `setup()` runs inside the first request, after `injectEnvVars()`, so the call is safe there too.
285
+
286
+ ```ts
287
+ setup(core) {
288
+ getServerConfig();
289
+ initMyService(core.config, core.storage);
290
+ },
291
+ ```
292
+
284
293
  **Env booleans — use `z.stringbool()`, never `z.coerce.boolean()`.** `z.coerce.boolean()` runs `Boolean(value)`, so `"false"`, `"0"`, and `"no"` all coerce to `true` — the flag becomes impossible to disable through the environment except by omitting it entirely. `z.stringbool()` parses `true/false/1/0/yes/no/on/off` (case-insensitive) and rejects anything else, so `MY_VERBOSE_LOGGING=false` actually disables and a typo fails loudly at startup instead of silently coercing. An empty string is not in that accepted set — `z.stringbool()` rejects `''` with `Invalid option`. What makes a blank `.env` line take the default is the normalization layer described under **Unset means unset** below, not the schema type.
285
294
 
286
295
  **Unset means unset.** `parseEnvConfig` and the framework's own config both treat an empty string and a whole-value `${…}` placeholder — what an MCPB or plugin host forwards when a user leaves an option blank and nothing substitutes it — as the variable being absent: an optional field stays `undefined`, a defaulted field takes its default, and a required field fails as missing rather than as a format error against the literal text. A value that merely contains `${…}` is kept. No per-field `z.preprocess` guard is needed for either case.
@@ -4,7 +4,7 @@ description: >
4
4
  Canonical reference for the unified `Context` object passed to every tool and resource handler in `@cyanheads/mcp-ts-core`. Covers the full interface, its `RequestContext` base, all sub-APIs (`ctx.log`, `ctx.state`, `ctx.requestInput`, `ctx.inputs`, `ctx.clientCapabilities`, `ctx.enrich`, `ctx.content`), and when to use each.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.9"
7
+ version: "2.10"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -154,7 +154,7 @@ Never re-open the shape to get past a type error: no index signature, no widenin
154
154
 
155
155
  Request-scoped structured logger. Every log line is automatically annotated with `requestId`, `traceId`, and `tenantId` — no manual spreading needed.
156
156
 
157
- **Dual-sink.** Each call writes to Pino *and* mirrors onto the MCP wire as a `notifications/message` (the framework advertises the `logging` capability, and the SDK filters by the level the client set via `logging/setLevel`). The wire payload is `{ message, ...data }`; `ctx.log.error` adds `error: <message>`. `message` and `error` are reserved wire keys, written after `data`: a `message` in `data` never replaces the log line on the wire, and on `ctx.log.error` with an `Error` the `error` key is always that error's message. The process log line still carries the caller's own fields, except one reusing a canonical name the context already sets (`requestId`, `traceId`, `spanId`, `tenantId`, …) — there the context's value wins, so the line stays correlated to its request. Delivery is fire-and-forget — a client that never upgraded to SSE, set a higher level, or already disconnected drops the notification, and a failed send never fails the handler. Treat `ctx.log` as client-visible: it is no longer a server-only sink, so don't log anything there you wouldn't put in a tool result.
157
+ **Dual-sink.** Each call writes to Pino *and* mirrors onto the MCP wire as a `notifications/message` (the framework advertises the `logging` capability). One level check gates both sinks: `MCP_LOG_LEVEL` (or a runtime `logger.setLevel()`) is a floor for the client stream as well as the process log, compared on the RFC 5424 order, so a `notice` floor drops `info` from both. The SDK then filters by the client's own level — `logging/setLevel`, or the `io.modelcontextprotocol/logLevel` a 2026-07-28 request carries — which can only narrow the floor, never widen it. The wire payload is `{ message, ...data }` with every sensitive field masked as `[REDACTED]` at any depth: the same field list the logs are redacted with, extensible through `sanitization.setSensitiveFields`, matched as `sanitizeForLogging` matches it — case- and separator-insensitive (`API_KEY` is `apiKey`), and on any one word of a compound name, so `accessToken` (and `tokenCount`) are masked. The caller's `data` object is never modified. `ctx.log.error` adds `error: <message>`. `message` and `error` are reserved wire keys, written after `data`: a `message` in `data` never replaces the log line on the wire, and on `ctx.log.error` with an `Error` the `error` key is always that error's message. The process log line still carries the caller's own fields, except one reusing a canonical name the context already sets (`requestId`, `traceId`, `spanId`, `tenantId`, …) — there the context's value wins, so the line stays correlated to its request. Delivery is fire-and-forget — a client that never upgraded to SSE, set a higher level, or already disconnected drops the notification, and a failed send never fails the handler. Treat `ctx.log` as client-visible: it is no longer a server-only sink, so don't log anything there you wouldn't put in a tool result.
158
158
 
159
159
  ### Methods
160
160
 
@@ -4,7 +4,7 @@ description: >
4
4
  Stand up a persistent, self-refreshing local mirror of a bulk upstream dataset with the MirrorService (@cyanheads/mcp-ts-core/mirror). Use when a server wraps a large or slow API and should query a synced local index (embedded SQLite + FTS5) instead of paginating the live API per request.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.3"
7
+ version: "1.4"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -65,7 +65,7 @@ Why they can't merge: during a from-scratch init the records aren't ordered by t
65
65
 
66
66
  | Framework | Server |
67
67
  |---|---|
68
- | Cross-runtime SQLite handle, WAL + `busy_timeout` | The `sync` generator (the ingester) |
68
+ | Cross-runtime SQLite handle, WAL + `busy_timeout`; an open waits out another connection's lock for `busyTimeoutMs` | The `sync` generator (the ingester) |
69
69
  | `mirror_sync_state` + cursor/checkpoint state machine | Translating your query syntax → FTS5 `match` |
70
70
  | `runSync({ init \| refresh })`, per-page persist, resume | Mapping upstream records → row objects |
71
71
  | Schema gen (columns + FTS + tokenizer + triggers) | Migration *content* (the `up` functions) |
@@ -93,6 +93,7 @@ A migration runs identically on first creation and on upgrade: a fresh database
93
93
  The service owns `runSync` + state; it does not schedule. Wire "self-refreshing" yourself:
94
94
 
95
95
  - **Refresh** — register `runSync({ mode: 'refresh' })` on a cron via `schedulerService` from `@cyanheads/mcp-ts-core/utils`, inside `setup()`. Gate on transport (HTTP) when stdio operators run it out-of-band.
96
+ - **Off the serving thread** — SQLite calls are synchronous, so each write transaction a sync runs blocks the event loop until it commits. A refresh whose pages or post-sync recomputes take seconds stalls every request, `/healthz` included, for that long. Run such a scheduled sync in a child process instead: spawn `process.execPath` with `process.execArgv` and a compiled job entry in `dist/`, relay its log lines, and in `teardown` stop it with SIGTERM, then SIGKILL after a grace period. In-process scheduling suits mirrors whose transactions stay short.
96
97
  - **Init** — run out-of-band (a CLI script / one-shot), never on startup: a full init can take hours and must not block the server. It is idempotent and resumable — re-running after an interrupt continues from the persisted cursor.
97
98
 
98
99
  ### Shipping the mirror CLI in a production Docker image
@@ -122,7 +123,7 @@ RUN echo '{"compilerOptions":{"baseUrl":".","paths":{"@/*":["./dist/*"]}}}' > ts
122
123
 
123
124
  **Caveat:** this relies on Bun's runtime `paths` resolution. A Node runtime image (no native `.ts` execution) needs the scripts compiled into `dist/` instead — a separate tsconfig pass with a different `rootDir` is required in that case.
124
125
 
125
- **`package.json` `files[]`:** add `scripts/_mirror-context.ts` and the three named lifecycle scripts so the npm tarball and `.mcpb` bundle carry them. Consumers installing from npm need them for `docker exec` access.
126
+ **`package.json` `files[]`:** add `scripts/_mirror-context.ts` and the three named lifecycle scripts so the npm tarball and `.mcpb` bundle carry them. They resolve `@/` only where a `tsconfig.json` maps it (a dev checkout, or the image above). An npm install ships no such mapping, so an npm-installed server cannot run them: document building the mirror from a checkout or the image.
126
127
 
127
128
  ## Checklist
128
129
 
@@ -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.16"
7
+ version: "1.17"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -94,7 +94,7 @@ Every handler call gets a span. Nested operations (storage, graph, LLM) become c
94
94
  | Span name | Source | Key attributes |
95
95
  |:----------|:-------|:---------------|
96
96
  | `tool_execution:<tool>` | every tool call | `mcp.tool.input_bytes`, `mcp.tool.output_bytes`, `mcp.tool.duration_ms`, `mcp.tool.success`, `mcp.tool.error_code`, `mcp.tool.input_required`, `mcp.tool.partial_success`, `mcp.tool.batch.{succeeded,failed}_count` |
97
- | `resource_read:<resource>` | every resource handler | `mcp.resource.uri`, `mcp.resource.mime_type`, `mcp.resource.size_bytes`, `mcp.resource.duration_ms`, `mcp.resource.success`, `mcp.resource.error_code`, `mcp.resource.input_required` |
97
+ | `resource_read:<resource>` | every resource handler | `mcp.resource.uri` (userinfo, query, and fragment stripped, then cut to its first 1,024 characters), `mcp.resource.uri_length` (the uncut length, only when the cut removed something), `mcp.resource.mime_type`, `mcp.resource.size_bytes`, `mcp.resource.duration_ms`, `mcp.resource.success`, `mcp.resource.error_code`, `mcp.resource.input_required` |
98
98
  | `prompt_generation:<prompt>` | every prompt handler | `mcp.prompt.input_bytes`, `mcp.prompt.output_bytes`, `mcp.prompt.message_count`, `mcp.prompt.duration_ms`, `mcp.prompt.success`, `mcp.prompt.error_code`, `mcp.prompt.input_required` |
99
99
  | `storage:<op>` | `StorageService` (every call) | `mcp.storage.operation`, `mcp.storage.duration_ms`, `mcp.storage.success`, `mcp.storage.key_count` (batch ops) |
100
100
  | `graph:<op>` | `GraphService` (every call) | `mcp.graph.operation`, `mcp.graph.duration_ms`, `mcp.graph.success` |
@@ -252,9 +252,11 @@ For domain logging inside handlers, use `ctx.log` (`debug`/`info`/`notice`/`warn
252
252
  | Handler | Log message | `metrics` fields |
253
253
  |:--------|:------------|:-----------------|
254
254
  | Tool | `Tool execution finished.` | `durationMs`, `isSuccess`, `errorCode`, `inputBytes`, `outputBytes`, plus `partialSuccess` / `batchSucceeded` / `batchFailed` when the result is a partial-success batch |
255
- | Resource | `Resource read finished.` | `durationMs`, `isSuccess`, `errorCode`, `outputBytes`, `uri`, `mimeType` |
255
+ | Resource | `Resource read finished.` | `durationMs`, `isSuccess`, `errorCode`, `outputBytes`, `uri` (the same capped URI as `mcp.resource.uri`), `mimeType` |
256
256
  | Prompt | `Prompt generation finished.` | `durationMs`, `isSuccess`, `errorCode`, `inputBytes` (0 for a prompt declaring no arguments), `outputBytes`, `messageCount` |
257
257
 
258
+ Every record of a resource read — scope checks, the handler's `ctx.log` lines, the completion record — carries the read's URI as `resourceUri`, capped like `mcp.resource.uri`, plus `resourceUriLength` when the cap cut it. The handler's `ctx.uri` and the response keep the full URI.
259
+
258
260
  A failed tool call or prompt adds exactly one `Error in tool:<name>` / `Error in prompt:<name>` record. Each call — prompts included — logs under its own `requestId`, and the client receives that value as `data.requestId` on the call's error envelope, so a reported failure resolves to its records.
259
261
 
260
262
  ### Failed-call payloads
@@ -316,7 +318,7 @@ Series are cheap to emit but expensive to store and query. The framework deliber
316
318
 
317
319
  | On metrics | On spans / logs only |
318
320
  |:-----------|:---------------------|
319
- | `mcp.resource.name` (URI template) | `mcp.resource.uri` (full URI with IDs) |
321
+ | `mcp.resource.name` (URI template) | `mcp.resource.uri` (URI with IDs, capped at 1,024 characters), `mcp.resource.uri_length` |
320
322
  | `gen_ai.request.model` (bounded enum) | `mcp.tenant.id`, `mcp.client.id`, `mcp.auth.subject` |
321
323
  | Bounded enum / template strings | Per-request unique IDs, free-form user input, opaque tokens |
322
324
 
@@ -4,7 +4,7 @@ description: >
4
4
  Testing patterns for MCP tool/resource handlers using `createMockContext` and Vitest. Covers mock context options, handler testing, McpError assertions, format testing, Vitest config setup, and test isolation conventions.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.13"
7
+ version: "1.14"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -15,6 +15,8 @@ Tests target handler behavior directly — call `handler(input, ctx)`, assert on
15
15
 
16
16
  **Additional exports from `/testing`:** `createMockSession()` binds a mock handler context to an HTTP session; `createFetchMock()` provides a strict upstream HTTP fake; `runToolContract()` executes a definition through schema, handler, formatting, enrichment/content, and production-shaped error-envelope checks. `createMockLogger()` returns a standalone `MockContextLogger`, `createInMemoryStorage(options?)` provides a real `StorageService` backed by `InMemoryProvider`, and `expectInputRequired(run)` returns the `input_required` result a multi-round-trip handler asked for (see [Mock inputs](#mock-inputs)).
17
17
 
18
+ **Other testing subpaths:** `/testing/vitest` (fixtures and conformance suites, below), `/testing/fuzz` (see [Fuzz testing](#fuzz-testing)), and `/testing/apps`, whose `renderAppTool` renders an app tool's `ui://` view against your server (a stdio command or an HTTP URL) in a headless MCP Apps host and reports initialization, errors, CSP violations, the view↔host messages, and screenshots. It needs the optional peers `@modelcontextprotocol/client` and `@modelcontextprotocol/ext-apps` plus a `chrome-headless-shell` build; the `field-test` skill covers installing one and reading the report.
19
+
18
20
  **Philosophy:** Test behavior, not implementation. Refactors should not break tests. Match the repo's existing test layout: fresh scaffolds use `tests/`, while colocated `src/**/*.test.ts` files are also supported. Integration tests at I/O boundaries over unit tests of internals.
19
21
 
20
22
  ---
@@ -139,6 +141,8 @@ Arguments that fail the `input` schema are rejected the way the production handl
139
141
 
140
142
  Cancellation settles as it does in production. Pass `context: { signal }` and abort it: once the signal has fired, whatever the handler — or the output validation, `format()`, and enrichment after it — throws comes back as `RequestCancelled` (`-32011`), whether that is the signal's `AbortError`, its reason string, a `withRetry` backoff that stopped, or an `McpError` of the handler's own. A throw while the signal is still live keeps its own classification, and argument parsing stays outside the settle, so schema-invalid arguments on an aborted signal still return `InvalidParams`. A `toolContractSuite` error case with an aborted `context.signal` asserts `code: JsonRpcErrorCode.RequestCancelled` the same way.
141
143
 
144
+ **Resources have no contract runner.** A resource definition's `handler(...)` called directly returns the throw site's `McpError` with no recovery fill, so asserting a resource's declared `errors[]` hints needs a path through the resource factory. Serve the definition from `createWorkerHandler({ name, title, resources: [def] })` (`/worker`) and `fetch` it a `resources/read` JSON-RPC request carrying the current protocol revision in both the `MCP-Protocol-Version` header and `params._meta`. The response is plain JSON or an SSE `data:` frame, and its `error` carries `code`, `data.reason`, and the filled `data.recovery.hint`.
145
+
142
146
  ---
143
147
 
144
148
  ## `createMockContext` options
@@ -4,7 +4,7 @@ description: >
4
4
  API reference for all utilities exported from `@cyanheads/mcp-ts-core/utils`. Use when looking up utility method signatures, options, peer dependencies, or usage patterns.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.14"
7
+ version: "2.15"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -85,7 +85,7 @@ The `utils` export includes two type guards. The full set of guards lives in the
85
85
  | Export | API | Notes |
86
86
  |:-------|:----|:------|
87
87
  | `Logger` | Class | The `Logger` class itself. Use `Logger.getInstance()` if needed; most consumers use the `logger` singleton. |
88
- | `logger` | `Logger` instance (wraps Pino). `.debug(msg, ctx?)` `.info(msg, ctx?)` `.notice(msg, ctx?)` `.warning(msg, ctx?)` `.error(msg, errorOrCtx, ctx?)` `.crit(msg, errorOrCtx, ctx?)` `.alert(msg, errorOrCtx, ctx?)` `.emerg(msg, errorOrCtx, ctx?)` `.fatal(msg, errorOrCtx, ctx?)` | Global structured logger. Use `ctx.log` in handlers instead. `logger` is for lifecycle/background contexts (startup, shutdown, `setup()`). Auto-redacts sensitive fields. The context's `extra` bag is flattened into the record, but a canonical field the context carries (`requestId`, `timestamp`, `traceId`, `spanId`, `sessionId`, `tenantId`, `operation`) always wins over an `extra` key of the same name. Records logged before the framework initializes the logger — anything in `setup()` — are held in a 250-record buffer and replayed once the sinks exist, filtered against the level the logger starts with. **Note:** `.error()` and higher accept `(msg, Error, ctx?)` or `(msg, ctx?)` — the second arg is overloaded. `.fatal()` is an alias for `.emerg()`. Full RFC 5424 severity set. |
88
+ | `logger` | `Logger` instance (wraps Pino). `.debug(msg, ctx?)` `.info(msg, ctx?)` `.notice(msg, ctx?)` `.warning(msg, ctx?)` `.error(msg, errorOrCtx, ctx?)` `.crit(msg, errorOrCtx, ctx?)` `.alert(msg, errorOrCtx, ctx?)` `.emerg(msg, errorOrCtx, ctx?)` `.fatal(msg, errorOrCtx, ctx?)` `.isLevelEnabled(level) -> boolean` | Global structured logger. Use `ctx.log` in handlers instead. `logger` is for lifecycle/background contexts (startup, shutdown, `setup()`). Auto-redacts sensitive fields. The context's `extra` bag is flattened into the record, but a canonical field the context carries (`requestId`, `timestamp`, `traceId`, `spanId`, `sessionId`, `tenantId`, `operation`) always wins over an `extra` key of the same name. Records logged before the framework initializes the logger — anything in `setup()` — are held in a 250-record buffer and replayed once the sinks exist, filtered against the level the logger starts with. `isLevelEnabled(level)` is that filter: `true` when a record at `level` would be written, compared on the RFC 5424 order of all eight levels (a `notice` level drops `info` though pino emits both at `info`, a `crit` level drops `error`), and `true` for every level before initialization. The `ctx.log` mirror to the client is gated by the same check. **Note:** `.error()` and higher accept `(msg, Error, ctx?)` or `(msg, ctx?)` — the second arg is overloaded. `.fatal()` is an alias for `.emerg()`. Full RFC 5424 severity set. |
89
89
  | `McpLogLevel` | Type | Log level union type for typing level variables. |
90
90
 
91
91
  ---
@@ -175,7 +175,7 @@ Helper API only. For the catalog of what the framework auto-emits (span names, m
175
175
 
176
176
  ### `telemetry/attributes`
177
177
 
178
- MCP-specific `ATTR_*` constant exports for span and metric attributes. Covers: code execution (`code.function.name`, `code.namespace`), MCP tool execution (name, input/output bytes, duration, success, error code, error category, partial success, batch succeeded/failed counts), MCP resource (URI, name, MIME type, size, duration, success, error code), MCP request context (tenant ID, client ID), MCP session events, MCP storage, GenAI semantic conventions, speech, graph, auth, task, and error classification attributes.
178
+ MCP-specific `ATTR_*` constant exports for span and metric attributes. Covers: code execution (`code.function.name`, `code.namespace`), MCP tool execution (name, input/output bytes, duration, success, error code, error category, partial success, batch succeeded/failed counts), MCP resource (URI, the uncut URI length when the recorded URI was capped, name, MIME type, size, duration, success, error code), MCP request context (tenant ID, client ID), MCP session events, MCP storage, GenAI semantic conventions, speech, graph, auth, task, and error classification attributes.
179
179
 
180
180
  Batch/partial success attributes (`mcp.tool.partial_success`, `mcp.tool.batch.succeeded_count`, `mcp.tool.batch.failed_count`) are set automatically by the framework when a tool handler returns a result containing a non-empty `failed` array — matching the batch response pattern from the design skill. A tool whose `output` is built with `partialResultSchema()` is read under its `failedKey`/`succeededKey` instead, including after `.extend()`, `.pick()`, `.omit()`, or a `.shape` spread.
181
181