@cyanheads/mcp-ts-core 0.9.21 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -57,7 +57,7 @@ Both paths share the same public API. Init copies starter `package.json`, config
57
57
  | `/storage/types` | `IStorageProvider` | Provider interface |
58
58
  | `/canvas` | `DataCanvas`, `CanvasInstance`, `CanvasRegistry`, `IDataCanvasProvider`, `DuckdbProvider`, `spillover`, `inferSchemaFromRows`, `assertReadOnlyQuery`, `quoteIdentifier`, ... | DataCanvas primitive (Tier 3, optional peer dep `@duckdb/node-api`); SQL/analytical workspace + source-agnostic spillover helper |
59
59
  | `/mirror` | `defineMirror`, `sqliteMirrorStore`, `buildSchemaSql`, `openSqliteHandle`, `Mirror`, `MirrorStore`, `MirrorDefinition`, `SyncContext`, `SyncPage`, ... | MirrorService primitive (Tier 3, optional peer dep `better-sqlite3` on Node; `bun:sqlite` built-in on Bun); persistent self-refreshing local mirror of a bulk upstream dataset (embedded SQLite + FTS5). Node/Bun only |
60
- | `/utils` | formatting, encoding, network, pagination, logging, runtime, telemetry, token counting, parsers†, sanitization†, scheduling† | All utilities (†optional peer deps) |
60
+ | `/utils` | formatting, encoding, network, pagination, overflow (`outlineOnOverflow`, `OUTLINE_VARIANT`, `selectSections`, `formatOutline`), logging, runtime, telemetry, token counting, parsers†, sanitization†, scheduling† | All utilities (†optional peer deps) |
61
61
  | `/services` | `OpenRouterProvider`, `SpeechService`, `createSpeechProvider`, `ElevenLabsProvider`, `WhisperProvider`, `GraphService`, provider interfaces and types | LLM, Speech (TTS/STT), Graph services |
62
62
  | `/linter` | `validateDefinitions`, `LintReport`, `LintDiagnostic`, `LintInput`, `LintSeverity` | Definition validation |
63
63
  | `/testing` | `createMockContext`, `getEnrichment` | Test helpers |
package/CLAUDE.md CHANGED
@@ -57,7 +57,7 @@ Both paths share the same public API. Init copies starter `package.json`, config
57
57
  | `/storage/types` | `IStorageProvider` | Provider interface |
58
58
  | `/canvas` | `DataCanvas`, `CanvasInstance`, `CanvasRegistry`, `IDataCanvasProvider`, `DuckdbProvider`, `spillover`, `inferSchemaFromRows`, `assertReadOnlyQuery`, `quoteIdentifier`, ... | DataCanvas primitive (Tier 3, optional peer dep `@duckdb/node-api`); SQL/analytical workspace + source-agnostic spillover helper |
59
59
  | `/mirror` | `defineMirror`, `sqliteMirrorStore`, `buildSchemaSql`, `openSqliteHandle`, `Mirror`, `MirrorStore`, `MirrorDefinition`, `SyncContext`, `SyncPage`, ... | MirrorService primitive (Tier 3, optional peer dep `better-sqlite3` on Node; `bun:sqlite` built-in on Bun); persistent self-refreshing local mirror of a bulk upstream dataset (embedded SQLite + FTS5). Node/Bun only |
60
- | `/utils` | formatting, encoding, network, pagination, logging, runtime, telemetry, token counting, parsers†, sanitization†, scheduling† | All utilities (†optional peer deps) |
60
+ | `/utils` | formatting, encoding, network, pagination, overflow (`outlineOnOverflow`, `OUTLINE_VARIANT`, `selectSections`, `formatOutline`), logging, runtime, telemetry, token counting, parsers†, sanitization†, scheduling† | All utilities (†optional peer deps) |
61
61
  | `/services` | `OpenRouterProvider`, `SpeechService`, `createSpeechProvider`, `ElevenLabsProvider`, `WhisperProvider`, `GraphService`, provider interfaces and types | LLM, Speech (TTS/STT), Graph services |
62
62
  | `/linter` | `validateDefinitions`, `LintReport`, `LintDiagnostic`, `LintInput`, `LintSeverity` | Definition validation |
63
63
  | `/testing` | `createMockContext`, `getEnrichment` | Test helpers |
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div align="center">
7
7
 
8
- [![Version](https://img.shields.io/badge/Version-0.9.21-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx)
8
+ [![Version](https://img.shields.io/badge/Version-0.10.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx)
9
9
 
10
10
  [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0%2B-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
@@ -0,0 +1,19 @@
1
+ ---
2
+ summary: "Outline-on-overflow helper for oversized document payloads; env booleans parse via Zod stringbool (rejects unrecognized values); built Docker images stamp image.version."
3
+ breaking: false
4
+ agent-notes: "Env-boolean parsing tightened to Zod stringbool: values outside true/false/1/0/yes/no/on/off now throw at startup instead of coercing to false, and yes/on/y/enabled now parse truthy (previously only true/1 were truthy; everything else fell silently to false). Audit boolean env vars — OTEL_ENABLED, MCP_AUTH_DISABLE_SCOPE_CHECKS, LOG_LLM_INTERACTIONS, SPEECH_TTS_ENABLED, SPEECH_STT_ENABLED, DEV_MCP_AUTH_BYPASS — for non-standard spellings. In server config, replace z.coerce.boolean() with z.stringbool(); devcheck now flags z.coerce.boolean() via the coerce-boolean-env-flag antipattern rule."
5
+ ---
6
+
7
+ # 0.10.0 — 2026-06-05
8
+
9
+ ## Added
10
+
11
+ - **Outline-on-overflow** (`@cyanheads/mcp-ts-core/utils`): `outlineOnOverflow()`, `OUTLINE_VARIANT`, `selectSections()`, `formatOutline()`, and `DEFAULT_OUTLINE_BUDGET_BYTES`. When a single document-shaped tool payload exceeds a serialized-byte budget, return a section outline (top-level keys + per-section size) plus a re-call notice instead of truncating; the agent re-calls the same tool with `sections:[...]` for only what it needs. Pure measure + key-slice — Workers-portable, unlike canvas-bound `spillover()`. The `format()`-parity linter validates each discriminated-union branch, so both surfaces stay in lockstep. (#204)
12
+ - **`techniques` skill**: a catalog of reusable response/data-shaping patterns. The first reference documents outline-on-overflow — the stateless re-call contract, the optional `ctx.state` cache, and when to choose it over `spillover()` or capped-list disclosure. (#204)
13
+ - **`coerce-boolean-env-flag` antipattern rule** (`scripts/check-framework-antipatterns.ts`, enforced by `devcheck`): flags `z.coerce.boolean()` in `src/`, which cannot be disabled through the environment because `Boolean("false") === true`; recommends `z.stringbool()`. The scanner now skips comment lines so docs that name an antipattern don't false-positive. (#201)
14
+
15
+ ## Changed
16
+
17
+ - **Env-boolean parsing now uses Zod `stringbool`.** Boolean env flags accept `true/false/1/0/yes/no/on/off` (case-insensitive) and **reject unrecognized values at startup** instead of silently coercing them to `false`. `false/0/no/off`, empty string, and unset all still resolve to `false` as before; `yes/on/y/enabled` now parse truthy; real booleans still pass through (Workers `[vars]`). Affects `OTEL_ENABLED`, `MCP_AUTH_DISABLE_SCOPE_CHECKS`, `LOG_LLM_INTERACTIONS`, `SPEECH_TTS_ENABLED`, `SPEECH_STT_ENABLED`, and `DEV_MCP_AUTH_BYPASS`. `z.stringbool()` is now the documented convention for server-config booleans. (#201)
18
+ - **`templates/Dockerfile`** stamps `org.opencontainers.image.version` from an `APP_VERSION` build arg and declares `org.opencontainers.image.source` (filled at polish time); the release `docker buildx` command passes `--build-arg APP_VERSION`. Scaffolded servers only — existing servers pick this up on re-scaffold. (#202)
19
+ - Dependencies: `@cloudflare/vitest-pool-workers` ^0.16.11 → ^0.16.13, `@cloudflare/workers-types` 4.20260602.1 → 4.20260605.1, `@supabase/supabase-js` ^2.106.2 → ^2.107.0, `openai` ^6.41.0 → ^6.42.0.
@@ -25,7 +25,7 @@ declare const ConfigSchema: z.ZodObject<{
25
25
  emerg: "emerg";
26
26
  }>>>;
27
27
  logsPath: z.ZodOptional<z.ZodString>;
28
- logLlmInteractions: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
28
+ logLlmInteractions: z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
29
29
  environment: z.ZodDefault<z.ZodPreprocess<z.ZodEnum<{
30
30
  development: "development";
31
31
  production: "production";
@@ -65,14 +65,14 @@ declare const ConfigSchema: z.ZodObject<{
65
65
  oauth: "oauth";
66
66
  none: "none";
67
67
  }>>>;
68
- mcpAuthDisableScopeChecks: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
68
+ mcpAuthDisableScopeChecks: z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
69
69
  oauthIssuerUrl: z.ZodOptional<z.ZodURL>;
70
70
  oauthJwksUri: z.ZodOptional<z.ZodURL>;
71
71
  oauthAudience: z.ZodOptional<z.ZodString>;
72
72
  oauthJwksCooldownMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
73
73
  oauthJwksTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
74
74
  mcpServerResourceIdentifier: z.ZodOptional<z.ZodURL>;
75
- devMcpAuthBypass: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
75
+ devMcpAuthBypass: z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
76
76
  devMcpClientId: z.ZodOptional<z.ZodString>;
77
77
  devMcpScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
78
  openrouterAppUrl: z.ZodDefault<z.ZodString>;
@@ -131,7 +131,7 @@ declare const ConfigSchema: z.ZodObject<{
131
131
  defaultTtlMs: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
132
132
  }, z.core.$strip>;
133
133
  openTelemetry: z.ZodObject<{
134
- enabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
134
+ enabled: z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
135
135
  serviceName: z.ZodString;
136
136
  serviceVersion: z.ZodString;
137
137
  tracesEndpoint: z.ZodOptional<z.ZodURL>;
@@ -149,7 +149,7 @@ declare const ConfigSchema: z.ZodObject<{
149
149
  }, z.core.$strip>;
150
150
  speech: z.ZodOptional<z.ZodObject<{
151
151
  tts: z.ZodOptional<z.ZodObject<{
152
- enabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
152
+ enabled: z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
153
153
  provider: z.ZodDefault<z.ZodEnum<{
154
154
  elevenlabs: "elevenlabs";
155
155
  }>>;
@@ -160,7 +160,7 @@ declare const ConfigSchema: z.ZodObject<{
160
160
  timeout: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
161
161
  }, z.core.$strip>>;
162
162
  stt: z.ZodOptional<z.ZodObject<{
163
- enabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
163
+ enabled: z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
164
164
  provider: z.ZodDefault<z.ZodEnum<{
165
165
  "openai-whisper": "openai-whisper";
166
166
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,wEAAwE;AACxE,eAAO,MAAM,cAAc,2BAA2B,CAAC;AACvD,eAAO,MAAM,iBAAiB,QAAkC,CAAC;AA+CjE,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+Wd,CAAC;AAGL,QAAA,MAAM,WAAW,GAAI,eAAe,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4MrE,CAAC;AAIF;;;;;;;;GAQG;AACH,QAAA,MAAM,WAAW,GAAI,eAAe,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAG,IAExE,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBV,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
@@ -59,12 +59,17 @@ const emptyStringAsUndefined = (val) => {
59
59
  }
60
60
  return val;
61
61
  };
62
- /** Parses string booleans from env vars correctly (`"false"` → `false`). */
63
- const envBoolean = z.preprocess((val) => {
64
- if (typeof val === 'string')
65
- return val.toLowerCase() === 'true' || val === '1';
66
- return val;
67
- }, z.boolean());
62
+ /**
63
+ * Boolean env flag parser. Uses Zod's `stringbool` — accepts `true/false/1/0/
64
+ * yes/no/on/off` (case-insensitive) and rejects anything else, so `"false"`
65
+ * disables. This is the safe alternative to `z.coerce.boolean()`, where
66
+ * `Boolean("false") === true` makes a flag impossible to turn off through the
67
+ * environment. Empty string and unset both fall through to the baked `false`
68
+ * default; real booleans pass through for runtimes that inject typed env vars
69
+ * (Cloudflare Workers `[vars]`). Field sites use `envBoolean` directly — the
70
+ * default lives under the preprocess so empty strings resolve to it.
71
+ */
72
+ const envBoolean = z.preprocess(emptyStringAsUndefined, z.union([z.boolean(), z.stringbool()]).default(false));
68
73
  // --- Schema Definition ---
69
74
  const ConfigSchema = z
70
75
  .object({
@@ -108,7 +113,7 @@ const ConfigSchema = z
108
113
  * explicitly opted into. When `false`, interaction logs carry metadata
109
114
  * only (model, message count, token usage, duration).
110
115
  */
111
- logLlmInteractions: envBoolean.default(false),
116
+ logLlmInteractions: envBoolean,
112
117
  environment: z
113
118
  .preprocess((val) => {
114
119
  const str = emptyStringAsUndefined(val);
@@ -190,21 +195,14 @@ const ConfigSchema = z
190
195
  * with server-side ACLs — without an in-handler ACL, every authenticated user
191
196
  * effectively has every scope.
192
197
  */
193
- mcpAuthDisableScopeChecks: envBoolean.default(false),
198
+ mcpAuthDisableScopeChecks: envBoolean,
194
199
  oauthIssuerUrl: z.url().optional(),
195
200
  oauthJwksUri: z.url().optional(),
196
201
  oauthAudience: z.string().optional(),
197
202
  oauthJwksCooldownMs: z.coerce.number().default(300_000), // 5 minutes
198
203
  oauthJwksTimeoutMs: z.coerce.number().default(5_000), // 5 seconds
199
204
  mcpServerResourceIdentifier: z.url().optional(), // RFC 8707 resource indicator
200
- devMcpAuthBypass: z
201
- .preprocess((val) => {
202
- if (val === undefined || val === null || val === '')
203
- return false;
204
- const str = String(val).toLowerCase().trim();
205
- return str === 'true' || str === '1';
206
- }, z.boolean())
207
- .default(false),
205
+ devMcpAuthBypass: envBoolean,
208
206
  devMcpClientId: z.string().optional(),
209
207
  devMcpScopes: z.array(z.string()).optional(),
210
208
  openrouterAppUrl: z.string().default('http://localhost:3000'),
@@ -316,7 +314,7 @@ const ConfigSchema = z
316
314
  defaultTtlMs: z.coerce.number().nullable().optional(),
317
315
  }),
318
316
  openTelemetry: z.object({
319
- enabled: envBoolean.default(false),
317
+ enabled: envBoolean,
320
318
  serviceName: z.string(),
321
319
  serviceVersion: z.string(),
322
320
  tracesEndpoint: z.url().optional(),
@@ -342,7 +340,7 @@ const ConfigSchema = z
342
340
  .object({
343
341
  tts: z
344
342
  .object({
345
- enabled: envBoolean.default(false),
343
+ enabled: envBoolean,
346
344
  provider: z.enum(['elevenlabs']).default('elevenlabs'),
347
345
  apiKey: z.string().optional(),
348
346
  baseUrl: z.url().optional(),
@@ -353,7 +351,7 @@ const ConfigSchema = z
353
351
  .optional(),
354
352
  stt: z
355
353
  .object({
356
- enabled: envBoolean.default(false),
354
+ enabled: envBoolean,
357
355
  provider: z.enum(['openai-whisper']).default('openai-whisper'),
358
356
  apiKey: z.string().optional(),
359
357
  baseUrl: z.url().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAS3D,MAAM,YAAY,GAAG,WAA8B,CAAC;AAEpD,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAA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CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,EAAe,EAAE;IACxC,GAAG,CAAC,OAAO,EAAE,IAAI;QACf,OAAO,KAAK,WAAW,EAAE,CAAC;QAC1B,OAAQ,OAA4C,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IACD,GAAG;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,cAAc;QACZ,OAAO,KAAK,CAAC;IACf,CAAC;IACD,GAAG,CAAC,OAAO,EAAE,IAAI;QACf,OAAO,KAAK,WAAW,EAAE,CAAC;QAC1B,OAAO,IAAI,IAAI,OAAO,CAAC;IACzB,CAAC;IACD,OAAO;QACL,OAAO,KAAK,WAAW,EAAE,CAAC;QAC1B,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IACD,wBAAwB,CAAC,OAAO,EAAE,IAAI;QACpC,OAAO,KAAK,WAAW,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC;AAOH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
@@ -19,6 +19,9 @@ import type { z } from 'zod';
19
19
  * const ServerConfigSchema = z.object({
20
20
  * apiKey: z.string().describe('External API key'),
21
21
  * maxResults: z.coerce.number().default(100),
22
+ * // Use z.stringbool() for env booleans, never z.coerce.boolean() —
23
+ * // Boolean("false") is true, so coerce can't be turned off via the env.
24
+ * verboseLogging: z.stringbool().default(false),
22
25
  * });
23
26
  *
24
27
  * let _config: z.infer<typeof ServerConfigSchema> | undefined;
@@ -26,6 +29,7 @@ import type { z } from 'zod';
26
29
  * _config ??= parseEnvConfig(ServerConfigSchema, {
27
30
  * apiKey: 'MY_API_KEY',
28
31
  * maxResults: 'MY_MAX_RESULTS',
32
+ * verboseLogging: 'MY_VERBOSE_LOGGING',
29
33
  * });
30
34
  * return _config;
31
35
  * }
@@ -1 +1 @@
1
- {"version":3,"file":"parseEnvConfig.d.ts","sourceRoot":"","sources":["../../src/config/parseEnvConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAChD,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAqD,GAC1F,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CA4BZ"}
1
+ {"version":3,"file":"parseEnvConfig.d.ts","sourceRoot":"","sources":["../../src/config/parseEnvConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAChD,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAqD,GAC1F,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CA4BZ"}
@@ -19,6 +19,9 @@ import { configurationError } from '../types-global/errors.js';
19
19
  * const ServerConfigSchema = z.object({
20
20
  * apiKey: z.string().describe('External API key'),
21
21
  * maxResults: z.coerce.number().default(100),
22
+ * // Use z.stringbool() for env booleans, never z.coerce.boolean() —
23
+ * // Boolean("false") is true, so coerce can't be turned off via the env.
24
+ * verboseLogging: z.stringbool().default(false),
22
25
  * });
23
26
  *
24
27
  * let _config: z.infer<typeof ServerConfigSchema> | undefined;
@@ -26,6 +29,7 @@ import { configurationError } from '../types-global/errors.js';
26
29
  * _config ??= parseEnvConfig(ServerConfigSchema, {
27
30
  * apiKey: 'MY_API_KEY',
28
31
  * maxResults: 'MY_MAX_RESULTS',
32
+ * verboseLogging: 'MY_VERBOSE_LOGGING',
29
33
  * });
30
34
  * return _config;
31
35
  * }
@@ -1 +1 @@
1
- {"version":3,"file":"parseEnvConfig.js","sourceRoot":"","sources":["../../src/config/parseEnvConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAS,EACT,MAA8B,EAC9B,MAA0C,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;IAE3F,MAAM,KAAK,GAA4B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9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CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;QACpC,OAAO,OAAO,MAAM,KAAK,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,MAAM,kBAAkB,CAAC,qCAAqC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;QAChF,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACxC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAClC,OAAO;gBACL,IAAI;gBACJ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI;gBAC5B,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,IAAI,EAAE,KAAK,CAAC,IAAI;aACjB,CAAC;QACJ,CAAC,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ {"level":40,"time":1780661721460,"env":"testing","version":"0.10.0","pid":2920,"transport":"http","requestId":"3AO3C-RSW68","timestamp":"2026-06-05T12:15:21.458Z","operation":"TransportManager.start","component":"HttpTransportSetup","msg":"MCP_ALLOWED_ORIGINS is not set — CORS is wildcard for CLI clients; browser Origin headers are restricted to loopback. Set MCP_ALLOWED_ORIGINS for production deployments accepting remote browser origins."}
2
+ {"level":50,"time":1780661756674,"env":"testing","version":"0.0.0-test","pid":3730,"requestId":"W9KE1-4HJ9M","timestamp":"2026-06-05T12:15:56.673Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"3d9d6060f29e58f1f62cdff95b820b035903962db2054bc949d1c7a667840046","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"3d9d6060f29e58f1f62cdff95b820b035903962db2054bc949d1c7a667840046","toolName":"scoped_echo","requestId":"W9KE1-4HJ9M","timestamp":"2026-06-05T12:15:56.673Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:258:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:300:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
3
+ {"level":50,"time":1780661756690,"env":"testing","version":"0.0.0-test","pid":3730,"requestId":"XS2FK-B4EXK","timestamp":"2026-06-05T12:15:56.690Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"8a2f3f42c6f40d88e8ea295b20c570d251d989b5042beacbe18f69781a98649e","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"8a2f3f42c6f40d88e8ea295b20c570d251d989b5042beacbe18f69781a98649e","toolName":"scoped_echo","requestId":"XS2FK-B4EXK","timestamp":"2026-06-05T12:15:56.690Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:258:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:300:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
@@ -0,0 +1,2 @@
1
+ {"level":50,"time":1780661756674,"env":"testing","version":"0.0.0-test","pid":3730,"requestId":"W9KE1-4HJ9M","timestamp":"2026-06-05T12:15:56.673Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"3d9d6060f29e58f1f62cdff95b820b035903962db2054bc949d1c7a667840046","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"3d9d6060f29e58f1f62cdff95b820b035903962db2054bc949d1c7a667840046","toolName":"scoped_echo","requestId":"W9KE1-4HJ9M","timestamp":"2026-06-05T12:15:56.673Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:258:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:300:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
2
+ {"level":50,"time":1780661756690,"env":"testing","version":"0.0.0-test","pid":3730,"requestId":"XS2FK-B4EXK","timestamp":"2026-06-05T12:15:56.690Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"8a2f3f42c6f40d88e8ea295b20c570d251d989b5042beacbe18f69781a98649e","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"8a2f3f42c6f40d88e8ea295b20c570d251d989b5042beacbe18f69781a98649e","toolName":"scoped_echo","requestId":"XS2FK-B4EXK","timestamp":"2026-06-05T12:15:56.690Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:258:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:300:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
File without changes
@@ -13,6 +13,7 @@ export { type ChatMessage, countChatTokens, countTokens, type ModelHeuristics, }
13
13
  export { type FetchWithTimeoutOptions, fetchWithTimeout } from './network/fetchWithTimeout.js';
14
14
  export { type HttpErrorFromResponseOptions, httpErrorFromResponse, httpStatusToErrorCode, } from './network/httpError.js';
15
15
  export { type RetryOptions, withRetry } from './network/retry.js';
16
+ export { DEFAULT_OUTLINE_BUDGET_BYTES, formatOutline, OUTLINE_VARIANT, type OutlineOptions, type OutlinePayload, type OutlineResult, outlineOnOverflow, type SectionMeta, selectSections, } from './overflow/outlineOnOverflow.js';
16
17
  export { DEFAULT_PAGINATION_CONFIG, decodeCursor, encodeCursor, extractCursor, type PaginatedResult, type PaginationState, paginateArray, } from './pagination/pagination.js';
17
18
  export { type AddPageOptions, Allow, CsvParser, csvParser, type DrawImageOptions, type DrawTextOptions, dateParser, type EmbedImageOptions, type ExtractArticleOptions, type ExtractArticleResult, type ExtractTextOptions, type ExtractTextResult, type FillFormOptions, FrontmatterParser, type FrontmatterResult, frontmatterParser, HtmlExtractor, htmlExtractor, JsonParser, jsonParser, type PageRange, type PdfMetadata, PdfParser, parseDateString, parseDateStringDetailed, pdfParser, type SetMetadataOptions, thinkBlockRegex, XmlParser, xmlParser, YamlParser, yamlParser, } from './parsing/index.js';
18
19
  export { type Job, SchedulerService, schedulerService } from './scheduling/scheduler.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,aAAa,EACb,KAAK,oBAAoB,EACzB,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,IAAI,EACJ,eAAe,EACf,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,cAAc,EACd,aAAa,EACb,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,YAAY,GACb,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO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AO,EACL,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,KAAK,eAAe,EACpB,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
@@ -20,6 +20,8 @@ export { countChatTokens, countTokens, } from './metrics/tokenCounter.js';
20
20
  export { fetchWithTimeout } from './network/fetchWithTimeout.js';
21
21
  export { httpErrorFromResponse, httpStatusToErrorCode, } from './network/httpError.js';
22
22
  export { withRetry } from './network/retry.js';
23
+ // Overflow (outline-on-overflow — issue #204)
24
+ export { DEFAULT_OUTLINE_BUDGET_BYTES, formatOutline, OUTLINE_VARIANT, outlineOnOverflow, selectSections, } from './overflow/outlineOnOverflow.js';
23
25
  // Pagination
24
26
  export { DEFAULT_PAGINATION_CONFIG, decodeCursor, encodeCursor, extractCursor, paginateArray, } from './pagination/pagination.js';
25
27
  // Parsing
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,aAAa;AACb,OAAO,EAGL,aAAa,EAEb,aAAa,EACb,UAAU,EACV,kBAAkB,EAElB,IAAI,EACJ,eAAe,EACf,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,cAAc,EAGd,aAAa,EAIb,cAAc,EACd,aAAa,EACb,SAAS,GACV,MAAM,uBAAuB,CAAC;AAC/B,WAAW;AACX,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7F,gBAAgB;AAChB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAOxE,SAAS;AACT,OAAO,EAAE,MAAM,EAAE,MAAM,EAAoB,MAA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mBAAmB,EACnB,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAChC,oBAAoB;AACpB,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EAEZ,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAC9B,cAAc;AACd,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * @fileoverview Outline-on-overflow: when a single document-shaped tool payload
3
+ * exceeds a serialized-byte budget, return a section outline (identifiers +
4
+ * per-section size) plus a re-call notice instead of truncating. The agent
5
+ * re-calls the same tool with `sections:[...]` to pull only what it needs.
6
+ *
7
+ * Pure measurement + key-slicing — no DuckDB, no I/O — so it runs identically on
8
+ * stdio / HTTP / Workers. The row-collection sibling is `spillover()` (`/canvas`);
9
+ * this handles the one-fat-document case. See issue #204 and the `techniques`
10
+ * skill (`outline-on-overflow` reference) for the full pattern, including the
11
+ * stateless re-call contract and the optional `ctx.state` cache.
12
+ *
13
+ * @module src/utils/overflow/outlineOnOverflow
14
+ */
15
+ import type { ContentBlock } from '@modelcontextprotocol/sdk/types.js';
16
+ import { z } from 'zod';
17
+ /** Default serialized-byte budget. Over this, a document overflows to an outline. */
18
+ export declare const DEFAULT_OUTLINE_BUDGET_BYTES = 24000;
19
+ /** One addressable section of a document and its serialized size. */
20
+ export interface SectionMeta {
21
+ /** Serialized byte size of the section's value. */
22
+ bytes: number;
23
+ /** Section identifier — the agent passes this in `sections:[...]` to retrieve it. */
24
+ name: string;
25
+ }
26
+ /**
27
+ * Reusable outline arm for a tool's discriminated-union `output`. Pair it with
28
+ * the tool's full-payload schema so the parity linter validates each branch:
29
+ *
30
+ * ```ts
31
+ * output: z.discriminatedUnion('kind', [
32
+ * FullLabel.extend({ kind: z.literal('full') }),
33
+ * OUTLINE_VARIANT,
34
+ * ]),
35
+ * ```
36
+ */
37
+ export declare const OUTLINE_VARIANT: z.ZodObject<{
38
+ kind: z.ZodLiteral<"outline">;
39
+ sections: z.ZodArray<z.ZodObject<{
40
+ name: z.ZodString;
41
+ bytes: z.ZodNumber;
42
+ }, z.core.$strip>>;
43
+ notice: z.ZodString;
44
+ }, z.core.$strip>;
45
+ /** The outline payload shape, inferred from {@link OUTLINE_VARIANT}. */
46
+ export type OutlinePayload = z.infer<typeof OUTLINE_VARIANT>;
47
+ /** Result of {@link outlineOnOverflow}: the full document, or an outline of it. */
48
+ export type OutlineResult<T> = (T & {
49
+ kind: 'full';
50
+ }) | OutlinePayload;
51
+ /** Options for {@link outlineOnOverflow}. */
52
+ export interface OutlineOptions<T> {
53
+ /**
54
+ * Serialized-byte budget. When `JSON.stringify(doc).length` exceeds this, the
55
+ * document overflows to an outline. Default {@link DEFAULT_OUTLINE_BUDGET_BYTES}.
56
+ * A helper argument, deliberately not an env var — a deploy-tunable threshold
57
+ * would drift a tool's output *shape* across environments.
58
+ */
59
+ budget?: number;
60
+ /**
61
+ * Section extractor. Default: each top-level key becomes a section sized by
62
+ * `JSON.stringify(value).length`. Override only when "section" means something
63
+ * other than a top-level key.
64
+ */
65
+ extract?: (doc: T) => SectionMeta[];
66
+ /**
67
+ * Builds the re-call notice from the size-sorted sections. Default names the
68
+ * three largest sections as examples.
69
+ */
70
+ notice?: (sections: SectionMeta[]) => string;
71
+ }
72
+ /**
73
+ * Returns the document whole when it fits the budget, or a section outline when
74
+ * it overflows. The caller spreads the result into a discriminated-union `output`
75
+ * keyed on `kind` ({@link OUTLINE_VARIANT} supplies the outline arm).
76
+ *
77
+ * Single-entry short-circuit: a document with fewer than two sections is returned
78
+ * whole even when over budget — an outline of one section would cost a round-trip
79
+ * whose only possible `sections` arg returns the same bytes. (A lone section that
80
+ * itself exceeds the budget is a known limitation; sub-section outlining is out
81
+ * of scope.)
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * async handler(input) {
86
+ * const doc = await fetchLabel(input.query);
87
+ * if (input.sections?.length) {
88
+ * return { ...selectSections(doc, input.sections), kind: 'full' as const };
89
+ * }
90
+ * return outlineOnOverflow(doc, { budget: 24_000 });
91
+ * }
92
+ * ```
93
+ */
94
+ export declare function outlineOnOverflow<T extends Record<string, unknown>>(doc: T, options?: OutlineOptions<T>): OutlineResult<T>;
95
+ /**
96
+ * Projects a document down to the requested sections plus any always-kept
97
+ * metadata keys — the selection-path counterpart to {@link outlineOnOverflow}.
98
+ * The handler re-fetches the document, then slices it to what the agent asked
99
+ * for. Pure top-level key projection; supply a custom selector when "section"
100
+ * means something other than a top-level key.
101
+ *
102
+ * @param doc - The full document.
103
+ * @param want - Section identifiers the agent requested (from the outline).
104
+ * @param options.alwaysKeep - Metadata keys to retain regardless (ids, timestamps).
105
+ */
106
+ export declare function selectSections<T extends Record<string, unknown>>(doc: T, want: string[], options?: {
107
+ alwaysKeep?: string[];
108
+ }): Partial<T>;
109
+ /**
110
+ * Renders an outline payload to MCP `content[]` — the markdown twin of the
111
+ * outline's `structuredContent`, so `format()`-parity holds. Drop into a tool's
112
+ * `format`:
113
+ *
114
+ * ```ts
115
+ * format: (r) => (r.kind === 'outline' ? formatOutline(r) : renderFull(r)),
116
+ * ```
117
+ */
118
+ export declare function formatOutline(outline: OutlinePayload): ContentBlock[];
119
+ //# sourceMappingURL=outlineOnOverflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outlineOnOverflow.d.ts","sourceRoot":"","sources":["../../../src/utils/overflow/outlineOnOverflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qFAAqF;AACrF,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC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. */
3
+ export const DEFAULT_OUTLINE_BUDGET_BYTES = 24_000;
4
+ /**
5
+ * Reusable outline arm for a tool's discriminated-union `output`. Pair it with
6
+ * the tool's full-payload schema so the parity linter validates each branch:
7
+ *
8
+ * ```ts
9
+ * output: z.discriminatedUnion('kind', [
10
+ * FullLabel.extend({ kind: z.literal('full') }),
11
+ * OUTLINE_VARIANT,
12
+ * ]),
13
+ * ```
14
+ */
15
+ export const OUTLINE_VARIANT = z.object({
16
+ kind: z.literal('outline'),
17
+ sections: z
18
+ .array(z.object({
19
+ name: z.string().describe('Section identifier — pass in `sections` to retrieve it'),
20
+ bytes: z.number().int().nonnegative().describe('Serialized byte size of the section'),
21
+ }))
22
+ .describe('Available sections, largest first'),
23
+ notice: z.string().describe('How to re-call the tool for specific sections'),
24
+ });
25
+ /** Default extractor: one section per top-level key, sized by serialized length. */
26
+ function defaultExtract(doc) {
27
+ return Object.entries(doc).map(([name, value]) => ({
28
+ name,
29
+ bytes: JSON.stringify(value)?.length ?? 0,
30
+ }));
31
+ }
32
+ /** Default notice: re-call instruction naming the three largest sections. */
33
+ function defaultNotice(sections) {
34
+ const examples = sections
35
+ .slice(0, 3)
36
+ .map((s) => s.name)
37
+ .join(', ');
38
+ return `Record too large to inline. Re-call this tool with sections:[...] to retrieve specific sections — e.g. ${examples}.`;
39
+ }
40
+ /**
41
+ * Returns the document whole when it fits the budget, or a section outline when
42
+ * it overflows. The caller spreads the result into a discriminated-union `output`
43
+ * keyed on `kind` ({@link OUTLINE_VARIANT} supplies the outline arm).
44
+ *
45
+ * Single-entry short-circuit: a document with fewer than two sections is returned
46
+ * whole even when over budget — an outline of one section would cost a round-trip
47
+ * whose only possible `sections` arg returns the same bytes. (A lone section that
48
+ * itself exceeds the budget is a known limitation; sub-section outlining is out
49
+ * of scope.)
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * async handler(input) {
54
+ * const doc = await fetchLabel(input.query);
55
+ * if (input.sections?.length) {
56
+ * return { ...selectSections(doc, input.sections), kind: 'full' as const };
57
+ * }
58
+ * return outlineOnOverflow(doc, { budget: 24_000 });
59
+ * }
60
+ * ```
61
+ */
62
+ export function outlineOnOverflow(doc, options) {
63
+ const budget = options?.budget ?? DEFAULT_OUTLINE_BUDGET_BYTES;
64
+ if (JSON.stringify(doc).length <= budget) {
65
+ return { ...doc, kind: 'full' };
66
+ }
67
+ const sections = (options?.extract ?? defaultExtract)(doc).sort((a, b) => b.bytes - a.bytes);
68
+ // Single-entry short-circuit — nothing to choose between.
69
+ if (sections.length < 2) {
70
+ return { ...doc, kind: 'full' };
71
+ }
72
+ const notice = (options?.notice ?? defaultNotice)(sections);
73
+ return { kind: 'outline', sections, notice };
74
+ }
75
+ /**
76
+ * Projects a document down to the requested sections plus any always-kept
77
+ * metadata keys — the selection-path counterpart to {@link outlineOnOverflow}.
78
+ * The handler re-fetches the document, then slices it to what the agent asked
79
+ * for. Pure top-level key projection; supply a custom selector when "section"
80
+ * means something other than a top-level key.
81
+ *
82
+ * @param doc - The full document.
83
+ * @param want - Section identifiers the agent requested (from the outline).
84
+ * @param options.alwaysKeep - Metadata keys to retain regardless (ids, timestamps).
85
+ */
86
+ export function selectSections(doc, want, options) {
87
+ const keep = new Set([...want, ...(options?.alwaysKeep ?? [])]);
88
+ return Object.fromEntries(Object.entries(doc).filter(([key]) => keep.has(key)));
89
+ }
90
+ /**
91
+ * Renders an outline payload to MCP `content[]` — the markdown twin of the
92
+ * outline's `structuredContent`, so `format()`-parity holds. Drop into a tool's
93
+ * `format`:
94
+ *
95
+ * ```ts
96
+ * format: (r) => (r.kind === 'outline' ? formatOutline(r) : renderFull(r)),
97
+ * ```
98
+ */
99
+ export function formatOutline(outline) {
100
+ const lines = [
101
+ `**${outline.sections.length} sections available** (record too large to inline)`,
102
+ '',
103
+ ...outline.sections.map((s) => `- \`${s.name}\` — ${s.bytes} bytes`),
104
+ '',
105
+ outline.notice,
106
+ ];
107
+ return [{ type: 'text', text: lines.join('\n') }];
108
+ }
109
+ //# sourceMappingURL=outlineOnOverflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outlineOnOverflow.js","sourceRoot":"","sources":["../../../src/utils/overflow/outlineOnOverflow.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qFAAqF;AACrF,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAUnD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC;SACR,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;QACnF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;KACtF,CAAC,CACH;SACA,QAAQ,CAAC,mCAAmC,CAAC;IAChD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;CAC7E,CAAC,CAAC;AA8BH,oFAAoF;AACpF,SAAS,cAAc,CAAC,GAA4B;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QACjD,IAAI;QACJ,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;KAC1C,CAAC,CAAC,CAAC;AACN,CAAC;AAED,6EAA6E;AAC7E,SAAS,aAAa,CAAC,QAAuB;IAC5C,MAAM,QAAQ,GAAG,QAAQ;SACtB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,CAAC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C,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAe,CAAC;AAChG,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,OAAuB;IACnD,MAAM,KAAK,GAAG;QACZ,KAAK,OAAO,CAAC,QAAQ,CAAC,MAAM,oDAAoD;QAChF,EAAE;QACF,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,KAAK,QAAQ,CAAC;QACpE,EAAE;QACF,OAAO,CAAC,MAAM;KACf,CAAC;IACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/mcp-ts-core",
3
- "version": "0.9.21",
3
+ "version": "0.10.0",
4
4
  "mcpName": "io.github.cyanheads/mcp-ts-core",
5
5
  "description": "Agent-native TypeScript framework for building MCP servers. Declarative definitions with auth, multi-backend storage, OpenTelemetry, and first-class support for Bun/Node/Cloudflare Workers.",
6
6
  "main": "dist/core/index.js",
@@ -177,8 +177,8 @@
177
177
  },
178
178
  "devDependencies": {
179
179
  "@biomejs/biome": "2.4.16",
180
- "@cloudflare/vitest-pool-workers": "^0.16.11",
181
- "@cloudflare/workers-types": "4.20260602.1",
180
+ "@cloudflare/vitest-pool-workers": "^0.16.13",
181
+ "@cloudflare/workers-types": "4.20260605.1",
182
182
  "@duckdb/node-api": "^1.5.3-r.3",
183
183
  "@hono/otel": "^1.1.2",
184
184
  "@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
@@ -190,7 +190,7 @@
190
190
  "@opentelemetry/sdk-node": "^0.218.0",
191
191
  "@opentelemetry/sdk-trace-node": "^2.7.1",
192
192
  "@opentelemetry/semantic-conventions": "^1.41.1",
193
- "@supabase/supabase-js": "^2.106.2",
193
+ "@supabase/supabase-js": "^2.107.0",
194
194
  "@types/bun": "^1.3.14",
195
195
  "@types/js-yaml": "^4.0.9",
196
196
  "@types/node": "^25.9.1",
@@ -212,7 +212,7 @@
212
212
  "js-yaml": "^4.2.0",
213
213
  "linkedom": "^0.18.12",
214
214
  "node-cron": "^4.2.1",
215
- "openai": "^6.41.0",
215
+ "openai": "^6.42.0",
216
216
  "papaparse": "^5.5.3",
217
217
  "partial-json": "^0.1.7",
218
218
  "pdf-lib": "^1.17.1",
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @fileoverview Guards against three SDK-coupling antipatterns. Scans `src/`
4
- * via `git grep` all rules target framework-internal paths. Shipped to
5
- * consumers via `package.json` `files:` because `devcheck` invokes it; in
6
- * consumer projects the scanned paths (`src/mcp-server/tools/`,
7
- * `src/mcp-server/transports/`) either don't exist or contain consumer code
8
- * that follows different conventions, so the script exits cleanly with 0
9
- * findings. Defense-in-depth: harmless when nothing matches, catches real
10
- * regressions in the framework.
3
+ * @fileoverview Guards against framework antipatterns via `git grep` over
4
+ * `src/`. Rules 1–3 are SDK-coupling regressions scoped to framework-internal
5
+ * paths they no-op in consumer projects, where those paths either don't exist
6
+ * or hold consumer code under different conventions. Rule 4 (`z.coerce.boolean()`)
7
+ * is intentionally consumer-facing: it catches the env-boolean footgun in both
8
+ * framework and scaffolded-server config. Shipped to consumers via
9
+ * `package.json` `files:` because `devcheck` invokes it. Defense-in-depth:
10
+ * harmless when nothing matches, catches real regressions.
11
11
  *
12
12
  * Rules:
13
13
  * 1. Framework must not downgrade the Zod `inputSchema` passed to
@@ -23,6 +23,11 @@
23
23
  * `"Input validation error"`) is brittle across SDK versions. Any fix for
24
24
  * #66 that intervenes at transport should use a structural signal, not a
25
25
  * string match.
26
+ * 4. `z.coerce.boolean()` on an env flag can't be turned off through the
27
+ * environment — `Boolean("false") === true`, so `"false"`/`"0"`/`"no"`
28
+ * all coerce to `true` and the only `false` is omitting the variable.
29
+ * Use `z.stringbool()` (parses `true/false/1/0/yes/no/on/off`, rejects
30
+ * the rest). Scoped to `src/` so it fires in consumer config too.
26
31
  *
27
32
  * Runs standalone (`bun run scripts/check-framework-antipatterns.ts`) and as
28
33
  * a devcheck step.
@@ -62,6 +67,13 @@ const RULES: Rule[] = [
62
67
  pathspec: ['src/mcp-server/transports/'],
63
68
  message: 'Matching SDK error text in transport layer is brittle across SDK versions',
64
69
  },
70
+ {
71
+ id: 'coerce-boolean-env-flag',
72
+ pattern: 'z\\.coerce\\.boolean\\(\\)',
73
+ pathspec: ['src/', ':!**/*.test.ts'],
74
+ message:
75
+ 'z.coerce.boolean() can\'t be disabled via env (Boolean("false") is true) — use z.stringbool() for boolean env flags',
76
+ },
65
77
  ];
66
78
 
67
79
  interface Finding {
@@ -72,6 +84,16 @@ interface Finding {
72
84
  ruleMessage: string;
73
85
  }
74
86
 
87
+ /**
88
+ * A matched line that is itself a comment is a mention (e.g. JSDoc naming the
89
+ * antipattern to document the rule), not a real usage. Real violations are
90
+ * code. Skipping comment lines keeps the rules sound when docs name the pattern.
91
+ */
92
+ function isCommentLine(line: string): boolean {
93
+ const t = line.trim();
94
+ return t.startsWith('//') || t.startsWith('*') || t.startsWith('/*');
95
+ }
96
+
75
97
  function runRule(rule: Rule): Finding[] {
76
98
  const result = spawnSync('git', ['grep', '-nE', rule.pattern, '--', ...rule.pathspec], {
77
99
  encoding: 'utf-8',
@@ -97,7 +119,8 @@ function runRule(rule: Rule): Finding[] {
97
119
  const lineNo = Number(raw.slice(firstColon + 1, secondColon));
98
120
  const line = raw.slice(secondColon + 1);
99
121
  return { file, lineNo, line, ruleId: rule.id, ruleMessage: rule.message };
100
- });
122
+ })
123
+ .filter((finding) => !isCommentLine(finding.line));
101
124
  }
102
125
 
103
126
  const findings = RULES.flatMap(runRule);
@@ -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.12"
7
+ version: "2.13"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -575,6 +575,7 @@ Large payloads burn the agent's context window. Default to curated summaries; of
575
575
  - **Large objects**: Return key fields by default; accept a `fields` or `verbose` parameter for full data
576
576
  - **Binary/blob content**: Return metadata and a reference, not the raw content
577
577
  - **Analytical working sets**: When upstream returns more *analytical* rows (data an agent would SQL — aggregate, group, join) than fit in context, `DataCanvas` (`ctx.core.canvas?`, Tier 3 — opt-in via `CANVAS_PROVIDER_TYPE=duckdb`) lets you register the rows and return the `canvas_id` plus a preview so the agent can run SQL to slice down without a re-fetch. The `spillover()` helper (`@cyanheads/mcp-ts-core/canvas`) automates the overflow case: drain rows up to a character budget for the inline preview, auto-register the full source on overflow, return both as a discriminated union. **Two gates:** it must be analytical, not a discovery/search surface of categorical metadata (those don't earn a canvas regardless of row count — use MCP-side list filtering or pagination); and a tool emitting a `canvas_id` MUST be paired with a registered `dataframe_query` tool, or the handle is unreachable. Compute distributions or refinement hints across the full result — not the preview — so the agent gets honest aggregate signal on the rows it didn't read. See `api-canvas` for the register / query / export pattern and the spillover flow.
578
+ - **One large document**: When a single call returns one document-shaped record (not a row set) that can overflow context, return a section *outline* — top-level keys + per-section byte size — and let the agent re-call with `sections: [...]` for only what it needs, instead of truncating one surface. `outlineOnOverflow()` with `OUTLINE_VARIANT` / `selectSections()` / `formatOutline()` (`@cyanheads/mcp-ts-core/utils`) measures the payload and returns a `full | outline` discriminated-union `output`; declare `OUTLINE_VARIANT` as a branch so `format()`-parity holds per arm. Pure measure + key-slice — Workers-portable, unlike canvas `spillover()`. Use for one fat record; use `spillover()` for a row collection. See the `techniques` skill's `outline-on-overflow` reference.
578
579
 
579
580
  ## MCP-side list filtering
580
581
 
@@ -624,6 +625,7 @@ return { items: hits };
624
625
  - [ ] `task: true` added if the tool is long-running
625
626
  - [ ] If `task: true`: handler checks `ctx.signal.aborted` in its loop for cancellation support
626
627
  - [ ] If tool returns unbounded arrays: pagination with total count, or `spillover()` / DataCanvas for *analytical* working sets (an agent would SQL them — not a discovery/search surface). If any tool emits a `canvas_id`, a `dataframe_query` tool is registered in the same server — a token with no query tool is dead output
628
+ - [ ] If tool returns one large *document* (not a row set) that can overflow context: `outlineOnOverflow()` returns a `full | outline` union so the agent re-calls with `sections: [...]` — not one-sided truncation
627
629
  - [ ] If tool is feature-gated: evaluated whether `disabledTool()` wrapper is appropriate (present in manifest but uncallable)
628
630
  - [ ] If the tool filters a bounded list locally (no upstream search): a distinct local param (`filter`/`nameContains`, not `query`), filters the full set (not one page), strict token match by default
629
631
  - [ ] Registered in the project's existing `createApp()` tool list (directly or via barrel)
@@ -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.5"
7
+ version: "1.6"
8
8
  audience: external
9
9
  type: reference
10
10
  ---
@@ -220,6 +220,7 @@ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
220
220
  const ServerConfigSchema = z.object({
221
221
  apiKey: z.string().describe('External API key'),
222
222
  maxResults: z.coerce.number().default(100),
223
+ verboseLogging: z.stringbool().default(false).describe('Enable verbose logging'),
223
224
  });
224
225
 
225
226
  export type ServerConfig = z.infer<typeof ServerConfigSchema>;
@@ -230,11 +231,14 @@ export function getServerConfig(): ServerConfig {
230
231
  _config ??= parseEnvConfig(ServerConfigSchema, {
231
232
  apiKey: 'MY_API_KEY',
232
233
  maxResults: 'MY_MAX_RESULTS',
234
+ verboseLogging: 'MY_VERBOSE_LOGGING',
233
235
  });
234
236
  return _config;
235
237
  }
236
238
  ```
237
239
 
240
+ **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. Empty string and unset both fall through to `.default()`.
241
+
238
242
  **Why `parseEnvConfig`?** It maps Zod schema paths to env var names so validation errors name the actual variable at fault. A missing `MY_API_KEY` produces:
239
243
 
240
244
  ```
@@ -4,7 +4,7 @@ description: >
4
4
  Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.16"
7
+ version: "2.17"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -350,6 +350,7 @@ output: z.object({
350
350
 
351
351
  - **Truncate large output with counts.** When a list exceeds a reasonable display size, show the top N and append "...and X more". Don't silently drop results.
352
352
  - **Spill big *analytical* results to a queryable surface.** When a tool's row set is something an agent would run SQL over (aggregate, group, join) *and* can exceed any reasonable context budget — paginated APIs, streamed exports, big query results — pair an inline preview with a `DataCanvas` table holding the full set. **Two rules gate this:** (1) it must earn its keep on *shape, not size* — a discovery/search surface of categorical metadata (titles, IDs) is not analytical and doesn't get a canvas regardless of row count; for name→ID resolution over a bounded list use [MCP-side list filtering](#mcp-side-list-filtering); (2) the `canvas_id` is reachable only if the same server **also exposes a `dataframe_query` tool** — emit one without the other and the handle is dead output. Compute distributions or refinement hints across the full result, not the preview, so aggregate signal stays honest. See `api-canvas` for the `spillover()` helper and both rules in full.
353
+ - **Outline one large *document* into sections.** When a single tool call returns one document-shaped record (not many rows) that can exceed context — a ~130KB FDA drug label, a big API entity dominated by a few fat fields — return a section *outline* (top-level keys + per-section byte size) instead of truncating, and let the agent re-call with `sections: [...]` to pull only what it needs. The `outlineOnOverflow()` helper (`@cyanheads/mcp-ts-core/utils`) measures the payload and returns a `full | outline` discriminated union; declare its `OUTLINE_VARIANT` as a branch of the tool's `output` so `format()`-parity is enforced per branch. Pure measure + key-slice — Workers-portable, unlike canvas-bound `spillover()`. Distinct from spillover on *shape*: spillover splits a row collection, this outlines one fat record. See the `techniques` skill's `outline-on-overflow` reference.
353
354
  - **Mirror a bulk upstream instead of paginating it live.** When the server wraps a large or slow API whose corpus is queried far more than it changes, sync it once into a persistent local index and query that as the primary data path — not the live API per request. Match the backend to corpus size: ≲ tens of thousands of rows → an in-memory index (server-level, no primitive); ~10⁴–10⁷ → the `MirrorService` (embedded SQLite + FTS5; declare a schema + a `sync` ingester via `defineMirror`/`sqliteMirrorStore`, then `runSync`/`query`, see `api-mirror`); ≳ 10⁸ → an external store. Distinct lifecycle from DataCanvas: a mirror is long-lived and cross-session, refreshed on a schedule; canvas is ephemeral and per-session.
354
355
  - **`format()` is the markdown twin of `structuredContent` — make both content-complete.** Different MCP clients forward different surfaces to the model: some (e.g., Claude Code) read `structuredContent` from `output`, others (e.g., Claude Desktop) read `content[]` from `format()`. Both must carry the same data so every client sees the same picture — `format()` just dresses it up with markdown. A thin `format()` that returns only a count or title leaves `content[]`-only clients blind to data that `structuredContent` clients can see. Render all fields the LLM needs, with structured markdown (headers, bold labels, lists) for readability.
355
356
  - **Agent-facing context must reach both client surfaces — put it in `enrichment`.** `structuredContent` (from `output`) and `content[]` (from `format()`) are read by different clients. Empty-result notices, the query/filter as the server parsed it, and pagination totals — the context the agent *reasons with*, distinct from the domain payload — reach only `content[]` if hand-authored into `format()` text alone, leaving `structuredContent`-only clients (Claude Code) blind. (The reverse can't happen: `format-parity` drags every `output` field into `format()`, so `output`-authored context already reaches both.) An `enrichment` block — the success-path counterpart to `errors[]`, populated via `ctx.enrich(...)` — reaches both automatically: merged into `structuredContent`, advertised as `output.extend(enrichment)`, mirrored into a `content[]` trailer, no `format()` entry needed. How each field renders in that trailer is a per-tool call — a kind-tag (`notice`/`total`/`echo`/`delta`) when a canonical form fits, a domain key like `totalFound` otherwise, and an `enrichmentTrailer.render` for any structured (object/array) field so it doesn't ship as a JSON blob. See `add-tool`'s **Tool Response Design**.
@@ -4,7 +4,7 @@ description: >
4
4
  Ship a release end-to-end across every registry the project targets (npm, MCP Registry, GitHub Releases for `.mcpb` bundles, GHCR). Runs the final verification gate, pushes commits and tags, then publishes to each applicable destination. Assumes git wrapup (version bumps, changelog, commit, annotated tag) is already complete — this skill is the post-wrapup publish workflow. Retries transient network failures on publish steps; halts with a partial-state report when retries are exhausted or the failure is terminal.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.8"
7
+ version: "2.9"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -174,6 +174,7 @@ Derive:
174
174
 
175
175
  ```bash
176
176
  docker buildx build --platform linux/amd64,linux/arm64 \
177
+ --build-arg APP_VERSION=<VERSION> \
177
178
  -t ghcr.io/<OWNER>/<REPO>:<VERSION> \
178
179
  -t ghcr.io/<OWNER>/<REPO>:latest \
179
180
  --push .
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: techniques
3
+ description: >
4
+ Catalog of reusable response- and data-shaping techniques for MCP servers built on `@cyanheads/mcp-ts-core` — overflow handling, payload shaping, retrieval patterns. Use when a tool's payload is too large, awkwardly shaped, or expensive to retrieve and you want a proven pattern instead of inventing one. Each technique has a self-contained reference under `references/`.
5
+ metadata:
6
+ author: cyanheads
7
+ version: "0.1"
8
+ audience: external
9
+ type: reference
10
+ ---
11
+
12
+ ## Overview
13
+
14
+ A directory of cross-cutting techniques for shaping what a handler returns and how a client retrieves it — patterns that don't belong to a single API surface. Each entry is a self-contained reference under `references/`: the problem it solves, when to reach for it (and when not to), and how to apply it with current framework primitives.
15
+
16
+ These are **patterns, not new primitives** — they compose `tool()`, discriminated-union `output`, `ctx.state`, and the existing helpers. Where a technique has (or will have) a dedicated helper, its reference says so and links the tracking issue.
17
+
18
+ ## Techniques
19
+
20
+ | Technique | Path | Use when |
21
+ |:----------|:-----|:---------|
22
+ | Outline-on-overflow | `references/outline-on-overflow.md` | A single tool call returns one **document-shaped** payload too big to inline (e.g. a ~130KB record), and you want an honest section outline + a re-call contract instead of truncating. |
23
+
24
+ ## Adding a technique
25
+
26
+ One file under `references/`, one row above. A technique earns a place here when it's a reusable response/retrieval pattern that (a) spans more than one tool or server and (b) isn't already covered by an `api-*` reference. Keep the reference concise: problem → when-to-use → how-to with current primitives → helper status. Bump `metadata.version` on any change (skill-versioning policy).
27
+
28
+ ## Related
29
+
30
+ - `design-mcp-server` — choosing the tool surface and output shapes up front.
31
+ - `add-tool` — the `tool()` builder, `format()` ⟷ `structuredContent` parity, matching response density to context budget.
32
+ - `api-canvas` — `spillover()`, the row-collection sibling of outline-on-overflow.
@@ -0,0 +1,124 @@
1
+ # Outline-on-overflow
2
+
3
+ Return a section **outline** when a single document-shaped payload is too big to inline, and let the agent re-call the same tool for only the sections it needs. The honest alternative to truncation for the *one fat document* case.
4
+
5
+ Ships as `outlineOnOverflow` + friends in `@cyanheads/mcp-ts-core/utils`.
6
+
7
+ ## The problem
8
+
9
+ Some tools fetch one large **document-shaped** record. An FDA drug label is a single ~130KB / ~32K-token payload dominated by raw HTML sections. Returning it whole burns the agent's context; truncating it either hides data or — when only `format()` is trimmed — silently desyncs `content[]` from `structuredContent`. Neither is acceptable.
10
+
11
+ This is distinct from the other two overflow shapes:
12
+
13
+ | Shape | Technique |
14
+ |:--|:--|
15
+ | Many rows (tabular) | `spillover()` → DataCanvas SQL handle (see `api-canvas`) |
16
+ | Capped list | honest truncation disclosure |
17
+ | **One large document** | **outline-on-overflow (this file)** |
18
+
19
+ ## Philosophy
20
+
21
+ **Never truncate to fit a budget.** When a payload is too big, return a complete, honest outline of what's available plus how to retrieve it — identically on `content[]` and `structuredContent`.
22
+
23
+ ## The shape — a discriminated-union `output`
24
+
25
+ The outline is the payload the agent acts on, so it lands in the **main body** (`structuredContent` + `content[]`), as a variant of the tool's own `output`. Not the enrichment block — enrichment is *additive* (`output.extend(...)` merged after `output.parse(result)`), so it can add fields to the fat document but never replace it. Not a post-hoc framework swap either — that would emit a `structuredContent` shape the advertised `outputSchema` (`tools/list`) doesn't describe. A discriminated-union variant is the only placement that replaces the payload, is advertised honestly, and gets `format()`-parity for free.
26
+
27
+ ```ts
28
+ import { tool, z } from '@cyanheads/mcp-ts-core';
29
+ import {
30
+ OUTLINE_VARIANT,
31
+ outlineOnOverflow,
32
+ selectSections,
33
+ formatOutline,
34
+ } from '@cyanheads/mcp-ts-core/utils';
35
+
36
+ const FullLabel = z.object({ /* every section field */ });
37
+
38
+ export const getLabel = tool('get_label', {
39
+ description: 'Fetch a drug label. Returns the full record, or a section outline when it overflows.',
40
+ input: z.object({
41
+ query: z.string().describe('Label query'),
42
+ sections: z
43
+ .array(z.string())
44
+ .optional()
45
+ .describe('Sections to return. Omit for the full label (or an outline if it overflows).'),
46
+ }),
47
+ output: z.discriminatedUnion('kind', [
48
+ FullLabel.extend({ kind: z.literal('full') }),
49
+ OUTLINE_VARIANT,
50
+ ]),
51
+ format: (r) => (r.kind === 'outline' ? formatOutline(r) : renderLabel(r)),
52
+ async handler(input) {
53
+ const doc = await fetchLabel(input.query); // deterministic from query
54
+ if (input.sections?.length) {
55
+ // selection path — slice to requested keys plus always-kept metadata
56
+ return { ...selectSections(doc, input.sections, { alwaysKeep: ['id', 'set_id'] }), kind: 'full' as const };
57
+ }
58
+ return outlineOnOverflow(doc, { budget: 24_000 }); // disclosure path → full | outline
59
+ },
60
+ });
61
+ ```
62
+
63
+ `format()`-parity is enforced **per branch** — the linter walks each discriminated-union arm separately, so both `full` and `outline` must render. `formatOutline` is the shipped renderer for the `outline` arm; you supply the `full` renderer. That keeps the two client surfaces in lockstep with no extra work.
64
+
65
+ ## The helper
66
+
67
+ `@cyanheads/mcp-ts-core/utils` ships the whole pattern — pure measurement + key-slicing, no DuckDB, so it runs on stdio / HTTP / Workers alike:
68
+
69
+ | Export | Purpose |
70
+ |:--|:--|
71
+ | `outlineOnOverflow(doc, options?)` | Returns `{ kind: 'full', ...doc }` under budget (or with `< 2` sections), else `{ kind: 'outline', sections, notice }`. |
72
+ | `OUTLINE_VARIANT` | The reusable `outline`-arm Zod schema for your discriminated-union `output`. |
73
+ | `selectSections(doc, want, { alwaysKeep })` | Projects the document to requested keys plus always-kept metadata. The selection-path counterpart. |
74
+ | `formatOutline(outline)` | Renders the outline to `content[]` for `format()`. |
75
+ | `DEFAULT_OUTLINE_BUDGET_BYTES` | The default budget (`24_000`) when `options.budget` is omitted. |
76
+
77
+ `outlineOnOverflow` options:
78
+
79
+ - `budget` — serialized-byte threshold (default `DEFAULT_OUTLINE_BUDGET_BYTES`). A helper argument, **not** an env var: a deploy-tunable threshold would drift a tool's output *shape* across environments.
80
+ - `extract` — custom section extractor. Default: one section per top-level key, sized by `JSON.stringify(value).length`. Override only when "section" means something other than a top-level key.
81
+ - `notice` — custom re-call notice builder. Default names the three largest sections as examples.
82
+
83
+ The flow:
84
+
85
+ 1. **Measure** the serialized payload (`JSON.stringify(doc).length`).
86
+ 2. **Under budget** → `{ kind: 'full', ...doc }`.
87
+ 3. **Over budget, ≥ 2 sections** → the outline (sections sorted largest-first). The agent re-calls with `sections: [...]`.
88
+ 4. **Over budget, < 2 sections** → `full` anyway (nothing to pick between). A single section that *alone* exceeds budget is a known limitation — sub-section outlining is out of scope.
89
+
90
+ ## Re-retrieval — why the selection call is stateless
91
+
92
+ The re-call is **self-contained**, so nothing is stored between the outline call and the selection call:
93
+
94
+ - The selection call sends the **same input** as the outline call, plus `sections: [...]`.
95
+ - The handler **re-fetches** the document — input-minus-`sections` is identical and the upstream query is deterministic, so it reproduces the exact same record — then applies `selectSections` (a pure projection: requested keys + `alwaysKeep` metadata).
96
+ - You **reconstruct rather than remember**. The agent holds the continuity (it passes `sections`); the upstream holds the document.
97
+
98
+ The only cost is the redundant fetch. For a **rate-limited or expensive upstream**, trade it for an optional cache:
99
+
100
+ ```ts
101
+ const key = `label:${input.query}`; // NOTE: excludes `sections`
102
+ let doc = await ctx.state.get<Label>(key).catch(() => null); // best-effort read
103
+ if (!doc) {
104
+ doc = await fetchLabel(input.query);
105
+ await ctx.state.set(key, doc, { ttl: 300 }).catch(() => {}); // best-effort write, 5 min
106
+ }
107
+ ```
108
+
109
+ - **Key excludes the `sections` selector** — otherwise the outline call and the selection call compute different keys and never share the doc.
110
+ - **Best-effort** — a miss or a read/write failure falls through to the stateless refetch, so correctness never depends on the cache.
111
+ - Rides `ctx.state` (the tenant-scoped KV abstraction), which is **independent of `MCP_SESSION_MODE`**. It does *not* require switching the server to stateful sessions and has no end-user-visible effect (a miss behaves exactly like the stateless path). Tenant-scoping isolates per-identity under `jwt`/`oauth`; the shared `default` tenant (stdio, HTTP + `none`) is benign because the cached value is a deterministic public-query → document map, not user state. If the upstream itself returns identity-scoped data, fold the auth principal into the key.
112
+
113
+ The framework ships no cache-key helper — the pattern above is one line and tool-specific (which fields key the doc, what TTL). **Default to stateless.** Reach for the cache only where the upstream cost is real.
114
+
115
+ ## When to use
116
+
117
+ - A single tool result is one **document-shaped** record that can exceed a context-meaningful size.
118
+ - The record has addressable parts (top-level sections) the agent can choose among.
119
+
120
+ ## When not to
121
+
122
+ - **Many rows** → `spillover()`. The document here is one row; spilling rows leaves the per-record size intact.
123
+ - **A capped list** → truncation disclosure.
124
+ - **No meaningful sub-structure** to outline → there's nothing to pick. Return it, or shrink it at the source (drop redundant fields before measuring).
@@ -138,6 +138,7 @@ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
138
138
  const ServerConfigSchema = z.object({
139
139
  apiKey: z.string().describe('External API key'),
140
140
  maxResults: z.coerce.number().default(100),
141
+ verboseLogging: z.stringbool().default(false).describe('Enable verbose logging'),
141
142
  });
142
143
 
143
144
  let _config: z.infer<typeof ServerConfigSchema> | undefined;
@@ -145,6 +146,7 @@ export function getServerConfig() {
145
146
  _config ??= parseEnvConfig(ServerConfigSchema, {
146
147
  apiKey: 'MY_API_KEY',
147
148
  maxResults: 'MY_MAX_RESULTS',
149
+ verboseLogging: 'MY_VERBOSE_LOGGING',
148
150
  });
149
151
  return _config;
150
152
  }
@@ -152,6 +154,8 @@ export function getServerConfig() {
152
154
 
153
155
  `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
154
156
 
157
+ For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false/1/0/yes/no/on/off` and rejects anything else, so `=false` actually disables.
158
+
155
159
  ### Server instructions
156
160
 
157
161
  `createApp({ instructions })` — optional server-level orientation, sent to clients on every `initialize` as session-level context. Use it for deployment guidance (connection aliases, regional notes, scope hints) instead of repeating the same context across tool descriptions. Client adoption is uneven, but there's no downside when set.
@@ -138,6 +138,7 @@ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
138
138
  const ServerConfigSchema = z.object({
139
139
  apiKey: z.string().describe('External API key'),
140
140
  maxResults: z.coerce.number().default(100),
141
+ verboseLogging: z.stringbool().default(false).describe('Enable verbose logging'),
141
142
  });
142
143
 
143
144
  let _config: z.infer<typeof ServerConfigSchema> | undefined;
@@ -145,6 +146,7 @@ export function getServerConfig() {
145
146
  _config ??= parseEnvConfig(ServerConfigSchema, {
146
147
  apiKey: 'MY_API_KEY',
147
148
  maxResults: 'MY_MAX_RESULTS',
149
+ verboseLogging: 'MY_VERBOSE_LOGGING',
148
150
  });
149
151
  return _config;
150
152
  }
@@ -152,6 +154,8 @@ export function getServerConfig() {
152
154
 
153
155
  `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
154
156
 
157
+ For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false/1/0/yes/no/on/off` and rejects anything else, so `=false` actually disables.
158
+
155
159
  ### Server instructions
156
160
 
157
161
  `createApp({ instructions })` — optional server-level orientation, sent to clients on every `initialize` as session-level context. Use it for deployment guidance (connection aliases, regional notes, scope hints) instead of repeating the same context across tool descriptions. Client adoption is uneven, but there's no downside when set.
@@ -37,9 +37,12 @@ WORKDIR /usr/src/app
37
37
  ENV NODE_ENV=production
38
38
 
39
39
  # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
40
+ ARG APP_VERSION
40
41
  LABEL org.opencontainers.image.title="{{PACKAGE_NAME}}"
41
42
  LABEL org.opencontainers.image.description=""
42
43
  LABEL org.opencontainers.image.licenses="Apache-2.0"
44
+ LABEL org.opencontainers.image.version="${APP_VERSION}"
45
+ LABEL org.opencontainers.image.source=""
43
46
 
44
47
  # Copy dependency manifests
45
48
  COPY package.json bun.lock ./