@cyanheads/mcp-ts-core 0.13.8 → 0.13.10
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 +51 -24
- package/CLAUDE.md +51 -24
- package/README.md +10 -10
- package/changelog/0.13.x/0.13.10.md +118 -0
- package/changelog/0.13.x/0.13.9.md +113 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +31 -9
- package/dist/config/index.js.map +1 -1
- package/dist/core/app.d.ts +6 -3
- package/dist/core/app.d.ts.map +1 -1
- package/dist/core/app.js +21 -5
- package/dist/core/app.js.map +1 -1
- package/dist/core/context.d.ts +114 -21
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +40 -0
- package/dist/core/context.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/serverManifest.d.ts +6 -0
- package/dist/core/serverManifest.d.ts.map +1 -1
- package/dist/core/serverManifest.js +6 -0
- package/dist/core/serverManifest.js.map +1 -1
- package/dist/core/worker.d.ts +6 -0
- package/dist/core/worker.d.ts.map +1 -1
- package/dist/core/worker.js +1 -0
- package/dist/core/worker.js.map +1 -1
- package/dist/linter/rules/error-contract-rules.d.ts +3 -44
- package/dist/linter/rules/error-contract-rules.d.ts.map +1 -1
- package/dist/linter/rules/error-contract-rules.js +8 -144
- package/dist/linter/rules/error-contract-rules.js.map +1 -1
- package/dist/linter/rules/index.d.ts +1 -1
- package/dist/linter/rules/index.d.ts.map +1 -1
- package/dist/linter/rules/index.js +1 -1
- package/dist/linter/rules/index.js.map +1 -1
- package/dist/linter/rules/resource-rules.d.ts.map +1 -1
- package/dist/linter/rules/resource-rules.js +1 -2
- package/dist/linter/rules/resource-rules.js.map +1 -1
- package/dist/linter/rules/tool-rules.d.ts +2 -1
- package/dist/linter/rules/tool-rules.d.ts.map +1 -1
- package/dist/linter/rules/tool-rules.js +37 -3
- package/dist/linter/rules/tool-rules.js.map +1 -1
- package/dist/mcp-server/handlerContext.d.ts +26 -13
- package/dist/mcp-server/handlerContext.d.ts.map +1 -1
- package/dist/mcp-server/handlerContext.js +32 -17
- package/dist/mcp-server/handlerContext.js.map +1 -1
- package/dist/mcp-server/inputRequired.d.ts +133 -12
- package/dist/mcp-server/inputRequired.d.ts.map +1 -1
- package/dist/mcp-server/inputRequired.js +192 -20
- package/dist/mcp-server/inputRequired.js.map +1 -1
- package/dist/mcp-server/prompts/prompt-registration.d.ts +10 -2
- package/dist/mcp-server/prompts/prompt-registration.d.ts.map +1 -1
- package/dist/mcp-server/prompts/prompt-registration.js +49 -11
- package/dist/mcp-server/prompts/prompt-registration.js.map +1 -1
- package/dist/mcp-server/resources/resource-registration.d.ts +4 -2
- package/dist/mcp-server/resources/resource-registration.d.ts.map +1 -1
- package/dist/mcp-server/resources/resource-registration.js +6 -4
- package/dist/mcp-server/resources/resource-registration.js.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts +4 -3
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +42 -14
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
- package/dist/mcp-server/server.d.ts +9 -0
- package/dist/mcp-server/server.d.ts.map +1 -1
- package/dist/mcp-server/server.js +14 -13
- package/dist/mcp-server/server.js.map +1 -1
- package/dist/mcp-server/tools/tool-registration.d.ts +7 -3
- package/dist/mcp-server/tools/tool-registration.d.ts.map +1 -1
- package/dist/mcp-server/tools/tool-registration.js +9 -5
- package/dist/mcp-server/tools/tool-registration.js.map +1 -1
- package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts +163 -40
- package/dist/mcp-server/tools/utils/inputPrevalidation.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/inputPrevalidation.js +330 -114
- package/dist/mcp-server/tools/utils/inputPrevalidation.js.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +40 -19
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js +387 -130
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.js +7 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.js.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.js +65 -9
- package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts +9 -5
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/stdio/stdioTransport.js +9 -5
- package/dist/mcp-server/transports/stdio/stdioTransport.js.map +1 -1
- package/dist/services/canvas/core/CanvasRegistry.d.ts +6 -2
- package/dist/services/canvas/core/CanvasRegistry.d.ts.map +1 -1
- package/dist/services/canvas/core/CanvasRegistry.js +7 -3
- package/dist/services/canvas/core/CanvasRegistry.js.map +1 -1
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts +82 -18
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts.map +1 -1
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.js +620 -328
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.js.map +1 -1
- package/dist/services/canvas/providers/duckdb/exportWriter.d.ts +11 -7
- package/dist/services/canvas/providers/duckdb/exportWriter.d.ts.map +1 -1
- package/dist/services/canvas/providers/duckdb/exportWriter.js +19 -16
- package/dist/services/canvas/providers/duckdb/exportWriter.js.map +1 -1
- package/dist/services/mirror/core/defineMirror.d.ts +1 -0
- package/dist/services/mirror/core/defineMirror.d.ts.map +1 -1
- package/dist/services/mirror/core/defineMirror.js +1 -0
- package/dist/services/mirror/core/defineMirror.js.map +1 -1
- package/dist/testing/index.d.ts +17 -2
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +21 -7
- package/dist/testing/index.js.map +1 -1
- package/dist/types-global/errors.d.ts +18 -15
- package/dist/types-global/errors.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.d.ts +5 -4
- package/dist/utils/internal/error-handler/errorHandler.d.ts.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.js +9 -7
- package/dist/utils/internal/error-handler/errorHandler.js.map +1 -1
- package/dist/utils/internal/error-handler/types.d.ts +3 -1
- package/dist/utils/internal/error-handler/types.d.ts.map +1 -1
- package/dist/utils/internal/performance.d.ts +4 -2
- package/dist/utils/internal/performance.d.ts.map +1 -1
- package/dist/utils/internal/performance.js +8 -6
- package/dist/utils/internal/performance.js.map +1 -1
- package/dist/utils/internal/telemetryMessages.d.ts +0 -1
- package/dist/utils/internal/telemetryMessages.d.ts.map +1 -1
- package/dist/utils/internal/telemetryMessages.js +0 -1
- package/dist/utils/internal/telemetryMessages.js.map +1 -1
- package/dist/utils/network/pacer.d.ts +38 -5
- package/dist/utils/network/pacer.d.ts.map +1 -1
- package/dist/utils/network/pacer.js +87 -25
- package/dist/utils/network/pacer.js.map +1 -1
- package/dist/utils/telemetry/attributes.d.ts +10 -5
- package/dist/utils/telemetry/attributes.d.ts.map +1 -1
- package/dist/utils/telemetry/attributes.js +10 -5
- package/dist/utils/telemetry/attributes.js.map +1 -1
- package/framework-skills/add-app-tool/SKILL.md +3 -3
- package/framework-skills/add-export/SKILL.md +5 -16
- package/framework-skills/add-prompt/SKILL.md +7 -3
- package/framework-skills/add-resource/SKILL.md +7 -5
- package/framework-skills/add-service/SKILL.md +3 -12
- package/framework-skills/add-test/SKILL.md +6 -3
- package/framework-skills/add-tool/SKILL.md +40 -42
- package/framework-skills/api-auth/SKILL.md +2 -2
- package/framework-skills/api-canvas/SKILL.md +17 -8
- package/framework-skills/api-config/SKILL.md +5 -4
- package/framework-skills/api-context/SKILL.md +168 -42
- package/framework-skills/api-errors/SKILL.md +48 -51
- package/framework-skills/api-linter/SKILL.md +30 -35
- package/framework-skills/api-mirror/SKILL.md +2 -1
- package/framework-skills/api-telemetry/SKILL.md +14 -10
- package/framework-skills/api-testing/SKILL.md +43 -11
- package/framework-skills/api-utils/SKILL.md +2 -2
- package/framework-skills/api-workers/SKILL.md +3 -1
- package/framework-skills/design-mcp-server/SKILL.md +6 -6
- package/framework-skills/field-test/SKILL.md +5 -5
- package/framework-skills/git-wrapup/SKILL.md +8 -6
- package/framework-skills/orchestrations/SKILL.md +7 -6
- package/framework-skills/orchestrations/workflows/field-test-fix.md +9 -19
- package/framework-skills/orchestrations/workflows/fix-wrapup-release.md +7 -7
- package/framework-skills/orchestrations/workflows/greenfield-build.md +8 -5
- package/framework-skills/orchestrations/workflows/maintenance-release.md +8 -8
- package/framework-skills/polish-docs-meta/SKILL.md +4 -4
- package/framework-skills/release-and-publish/SKILL.md +8 -6
- package/framework-skills/release-pr-review/SKILL.md +38 -24
- package/framework-skills/report-issue-framework/SKILL.md +7 -5
- package/framework-skills/report-issue-local/SKILL.md +8 -6
- package/framework-skills/security-pass/SKILL.md +14 -13
- package/package.json +6 -5
- package/scripts/devcheck.ts +7 -6
- package/scripts/install-otel.ts +84 -0
- package/scripts/lint-mcp.ts +87 -27
- package/scripts/lint-packaging.ts +226 -4
- package/scripts/release-github.ts +117 -5
- package/templates/.env.example +2 -0
- package/templates/AGENTS.md +5 -4
- package/templates/CLAUDE.md +5 -4
- package/templates/Dockerfile +67 -50
- package/templates/_.mcpbignore +2 -0
- package/templates/src/mcp-server/tools/definitions/echo.tool.ts +3 -8
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Outbound request pacer — a FIFO queue in front of a rate-limited
|
|
3
3
|
* upstream. Holds work back until every configured window, the minimum start gap,
|
|
4
|
-
* and the concurrency cap allow it; sheds callers
|
|
5
|
-
* and closes a shared cooldown gate when the upstream
|
|
4
|
+
* and the concurrency cap allow it; sheds callers the queue cannot hold or whose
|
|
5
|
+
* wait budget cannot be met; and closes a shared cooldown gate when the upstream
|
|
6
|
+
* answers 429.
|
|
6
7
|
*
|
|
7
8
|
* The inbound `RateLimiter` (`utils/security`) is the mirror image: it is keyed
|
|
8
9
|
* per caller and rejects synchronously, so it cannot queue work against an
|
|
@@ -13,6 +14,15 @@ import { JsonRpcErrorCode, McpError, rateLimited, requestCancelled, } from '../.
|
|
|
13
14
|
import { parseRetryAfterMs } from './retry.js';
|
|
14
15
|
import { ATTR_MCP_PACER_NAME } from '../telemetry/attributes.js';
|
|
15
16
|
import { createCounter, createHistogram, createUpDownCounter } from '../telemetry/metrics.js';
|
|
17
|
+
/**
|
|
18
|
+
* The caller-facing message for each shed kind. A `queue_full` shed names the
|
|
19
|
+
* full queue, not a wait budget the caller may never have set.
|
|
20
|
+
*/
|
|
21
|
+
const shedMessages = {
|
|
22
|
+
queue_full: (name) => `No ${name} request slot is open and the wait queue is full.`,
|
|
23
|
+
wait_elapsed: (name) => `The caller's wait budget ran out before a ${name} request slot opened.`,
|
|
24
|
+
wait_projected: (name) => `No ${name} request slot available within the caller's wait budget.`,
|
|
25
|
+
};
|
|
16
26
|
let instruments;
|
|
17
27
|
/**
|
|
18
28
|
* The four pacer instruments, shared across every pacer in the process and told
|
|
@@ -22,7 +32,7 @@ function getPacerMetrics() {
|
|
|
22
32
|
instruments ??= {
|
|
23
33
|
cooldowns: createCounter('mcp.pacer.cooldowns', 'Cooldown gates closed by an upstream rate limit', '{cooldowns}'),
|
|
24
34
|
queueDepth: createUpDownCounter('mcp.pacer.queue_depth', 'Requests waiting for a pacer slot', '{requests}'),
|
|
25
|
-
sheds: createCounter('mcp.pacer.sheds', 'Requests shed before dispatch
|
|
35
|
+
sheds: createCounter('mcp.pacer.sheds', 'Requests shed before dispatch: the wait queue was full, or no slot fit the wait budget', '{requests}'),
|
|
26
36
|
wait: createHistogram('mcp.pacer.wait', 'Time a request spent waiting for a pacer slot', 'ms'),
|
|
27
37
|
};
|
|
28
38
|
return instruments;
|
|
@@ -122,21 +132,49 @@ export function createPacer(options) {
|
|
|
122
132
|
}
|
|
123
133
|
return at;
|
|
124
134
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
135
|
+
function atCapacity() {
|
|
136
|
+
return maxConcurrent !== undefined && active >= maxConcurrent;
|
|
137
|
+
}
|
|
138
|
+
/** Whether an arrival at `now` would start at once rather than wait. */
|
|
139
|
+
function canStartNow(now) {
|
|
140
|
+
return queue.length === 0 && !atCapacity() && earliestStart(starts, now) <= now;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Rate limits in the current streak, as the next one doubles from them. The
|
|
144
|
+
* streak lapses once the gate has stood open for `cooldown.maxMs` — one full
|
|
145
|
+
* capped cooldown with no rate limit — and is keyed to the gate rather than
|
|
146
|
+
* to the last rate limit, so continuous demand under a sustained limit, every
|
|
147
|
+
* attempt landing as the gate reopens, keeps its capped backoff.
|
|
148
|
+
*/
|
|
149
|
+
function streak(now) {
|
|
150
|
+
return cooldown && now - gateOpensAt < cooldown.maxMs ? consecutiveRateLimits : 0;
|
|
128
151
|
}
|
|
129
152
|
/**
|
|
130
|
-
* The shed error
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
153
|
+
* The shed error, for a caller that enqueued at `enqueuedAt` — `now` when shed
|
|
154
|
+
* on arrival — and has already left the queue. `retryAfter` projects a caller
|
|
155
|
+
* joining behind every remaining waiter. That projection cannot see a
|
|
156
|
+
* concurrency slot freeing, so while `maxConcurrent` is saturated it is floored
|
|
157
|
+
* at the longest wait of any queued caller, the shed one included, and never
|
|
158
|
+
* below 1s: the slots have been held at least that long.
|
|
159
|
+
*
|
|
160
|
+
* `rateLimited` with no `retryable: false`: to the calling agent this is an
|
|
161
|
+
* ordinary rate limit — wait `retryAfter`, call again — and that flag would
|
|
162
|
+
* tell them the opposite. `withRetry`'s default predicate reads `reason`
|
|
163
|
+
* instead, so an enclosing retry fails fast rather than sleeping past the
|
|
164
|
+
* deadline the shed exists to enforce.
|
|
135
165
|
*/
|
|
136
|
-
function shed(
|
|
166
|
+
function shed(shedKind, enqueuedAt) {
|
|
137
167
|
getPacerMetrics().sheds.add(1, attributes);
|
|
138
|
-
|
|
168
|
+
const now = Date.now();
|
|
169
|
+
const queueDepth = queue.length;
|
|
170
|
+
let retryAfter = Math.ceil(Math.max(0, projectedStart(now, queueDepth) - now) / 1000);
|
|
171
|
+
if (atCapacity()) {
|
|
172
|
+
const oldest = Math.min(enqueuedAt, queue[0]?.enqueuedAt ?? enqueuedAt);
|
|
173
|
+
retryAfter = Math.max(retryAfter, Math.ceil((now - oldest) / 1000), 1);
|
|
174
|
+
}
|
|
175
|
+
return rateLimited(shedMessages[shedKind](name), {
|
|
139
176
|
reason: 'pacer_shed',
|
|
177
|
+
shedKind,
|
|
140
178
|
retryAfter,
|
|
141
179
|
queueDepth,
|
|
142
180
|
});
|
|
@@ -181,7 +219,7 @@ export function createPacer(options) {
|
|
|
181
219
|
function pump() {
|
|
182
220
|
clearDispatchTimer();
|
|
183
221
|
while (queue.length > 0) {
|
|
184
|
-
if (
|
|
222
|
+
if (atCapacity())
|
|
185
223
|
return;
|
|
186
224
|
const now = Date.now();
|
|
187
225
|
const earliest = earliestStart(starts, now);
|
|
@@ -206,19 +244,30 @@ export function createPacer(options) {
|
|
|
206
244
|
/**
|
|
207
245
|
* Closes the shared gate on an upstream rate limit:
|
|
208
246
|
* `min(max(baseMs · 2^(consecutive−1), retryAfter), maxMs)`, as an absolute
|
|
209
|
-
* instant. Any other error leaves it open
|
|
247
|
+
* instant. Any other error leaves it open and the count untouched; the first
|
|
248
|
+
* success resets the count, and so does a gate left open for `maxMs`.
|
|
249
|
+
*
|
|
250
|
+
* A shed (`data.reason: 'pacer_shed'`) is excluded: raised by a pacer nested
|
|
251
|
+
* inside this task, it is local backpressure, and no upstream answered.
|
|
210
252
|
*/
|
|
211
253
|
function noteRateLimit(error) {
|
|
212
254
|
if (!cooldown)
|
|
213
255
|
return;
|
|
214
256
|
if (!(error instanceof McpError) || error.code !== JsonRpcErrorCode.RateLimited)
|
|
215
257
|
return;
|
|
216
|
-
|
|
217
|
-
|
|
258
|
+
if (error.data?.reason === 'pacer_shed')
|
|
259
|
+
return;
|
|
260
|
+
const now = Date.now();
|
|
261
|
+
consecutiveRateLimits = streak(now) + 1;
|
|
262
|
+
// The exponent is bounded so the product stays finite: past 2^1024 it is
|
|
263
|
+
// Infinity, and `baseMs: 0` would make it `0 · Infinity` — NaN, which sticks
|
|
264
|
+
// in `gateOpensAt` and stops every window and gap from binding. A positive
|
|
265
|
+
// `baseMs · 2^52` still exceeds any practical `maxMs`, so it clamps as before.
|
|
266
|
+
const doubled = cooldown.baseMs * 2 ** Math.min(consecutiveRateLimits - 1, 52);
|
|
218
267
|
// An absent or unparseable hint contributes nothing, leaving the doubling.
|
|
219
268
|
const honored = parseRetryAfterMs(error) ?? 0;
|
|
220
269
|
const waitMs = Math.min(Math.max(doubled, honored), cooldown.maxMs);
|
|
221
|
-
gateOpensAt = Math.max(gateOpensAt,
|
|
270
|
+
gateOpensAt = Math.max(gateOpensAt, now + waitMs);
|
|
222
271
|
getPacerMetrics().cooldowns.add(1, attributes);
|
|
223
272
|
}
|
|
224
273
|
function run(task, runOptions = {}) {
|
|
@@ -228,14 +277,19 @@ export function createPacer(options) {
|
|
|
228
277
|
}
|
|
229
278
|
if (signal?.aborted)
|
|
230
279
|
return Promise.reject(signal.reason);
|
|
280
|
+
// Start whoever is already due before judging this arrival: a dispatch
|
|
281
|
+
// timer running late (event-loop lag) leaves a waiter whose slot is open
|
|
282
|
+
// counted against `maxQueueDepth`, and would shed this call with a
|
|
283
|
+
// `retryAfter` of 0.
|
|
284
|
+
pump();
|
|
231
285
|
const now = Date.now();
|
|
232
|
-
|
|
233
|
-
//
|
|
234
|
-
if (maxQueueDepth !== undefined &&
|
|
235
|
-
return Promise.reject(shed(
|
|
286
|
+
// Absolute backpressure first, so it rejects without arming a timer. It
|
|
287
|
+
// bounds waiters, so an arrival that can start this instant never counts.
|
|
288
|
+
if (maxQueueDepth !== undefined && queue.length >= maxQueueDepth && !canStartNow(now)) {
|
|
289
|
+
return Promise.reject(shed('queue_full', now));
|
|
236
290
|
}
|
|
237
|
-
if (maxWaitMs !== undefined && projectedStart(now,
|
|
238
|
-
return Promise.reject(shed(
|
|
291
|
+
if (maxWaitMs !== undefined && projectedStart(now, queue.length) - now > maxWaitMs) {
|
|
292
|
+
return Promise.reject(shed('wait_projected', now));
|
|
239
293
|
}
|
|
240
294
|
return new Promise((resolve, reject) => {
|
|
241
295
|
const entry = {
|
|
@@ -263,9 +317,13 @@ export function createPacer(options) {
|
|
|
263
317
|
if (maxWaitMs !== undefined) {
|
|
264
318
|
entry.shedTimer = setTimeout(() => {
|
|
265
319
|
entry.shedTimer = undefined;
|
|
320
|
+
// This can fire ahead of a dispatch timer due the same instant, so
|
|
321
|
+
// drain what is due first: a slot opening as the budget ends
|
|
322
|
+
// dispatches the entry rather than shedding it.
|
|
323
|
+
pump();
|
|
266
324
|
if (!remove(entry))
|
|
267
325
|
return;
|
|
268
|
-
reject(shed(
|
|
326
|
+
reject(shed('wait_elapsed', entry.enqueuedAt));
|
|
269
327
|
// The shed entry is gone; whoever is behind it should not wait on it.
|
|
270
328
|
pump();
|
|
271
329
|
}, maxWaitMs);
|
|
@@ -296,6 +354,10 @@ export function createPacer(options) {
|
|
|
296
354
|
}
|
|
297
355
|
}
|
|
298
356
|
return {
|
|
357
|
+
get cooldown() {
|
|
358
|
+
const now = Date.now();
|
|
359
|
+
return { remainingMs: Math.max(0, gateOpensAt - now), consecutive: streak(now) };
|
|
360
|
+
},
|
|
299
361
|
dispose,
|
|
300
362
|
run,
|
|
301
363
|
[Symbol.dispose]: dispose,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pacer.js","sourceRoot":"","sources":["../../../src/utils/network/pacer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pacer.js","sourceRoot":"","sources":["../../../src/utils/network/pacer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAmInG;;;GAGG;AACH,MAAM,YAAY,GAAoD;IACpE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,IAAI,mDAAmD;IACnF,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,6CAA6C,IAAI,uBAAuB;IAChG,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,IAAI,0DAA0D;CAC/F,CAAC;AAEF,IAAI,WAOS,CAAC;AAEd;;;GAGG;AACH,SAAS,eAAe;IACtB,WAAW,KAAK;QACd,SAAS,EAAE,aAAa,CACtB,qBAAqB,EACrB,iDAAiD,EACjD,aAAa,CACd;QACD,UAAU,EAAE,mBAAmB,CAC7B,uBAAuB,EACvB,mCAAmC,EACnC,YAAY,CACb;QACD,KAAK,EAAE,aAAa,CAClB,iBAAiB,EACjB,wFAAwF,EACxF,YAAY,CACb;QACD,IAAI,EAAE,eAAe,CAAC,gBAAgB,EAAE,+CAA+C,EAAE,IAAI,CAAC;KAC/F,CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,UAAU,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P_INPUT_TARGET = "mcp.input.target";
|
|
67
67
|
/** Which half of the alias stage fired: `declared` or `case_style`. */
|
|
68
68
|
export declare const ATTR_MCP_INPUT_ALIAS_KIND = "mcp.input.alias_kind";
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Which representation repair earned validity: `stringified_array`,
|
|
71
|
+
* `stringified_object`, or `integer_as_string`. A call that needed several
|
|
72
|
+
* kinds counts once under each.
|
|
73
|
+
*/
|
|
70
74
|
export declare const ATTR_MCP_INPUT_COERCION = "mcp.input.coercion";
|
|
71
75
|
/**
|
|
72
76
|
* Author-set label of the outbound pacer a queue metric belongs to
|
|
@@ -193,10 +197,11 @@ export declare const ATTR_MCP_ERROR_CLASSIFIED_CODE = "mcp.error.classified_code
|
|
|
193
197
|
*/
|
|
194
198
|
export declare const ATTR_MCP_ERROR_CATEGORY = "mcp.error.category";
|
|
195
199
|
/**
|
|
196
|
-
* Log level
|
|
197
|
-
* `
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
+
* Log level resolved for this failure mode: `debug`, `info`, `notice`, or
|
|
201
|
+
* `warning`. Set when a definition's `errors[]` entry declares one, and as
|
|
202
|
+
* `notice` on the framework's `invalid_arguments` and
|
|
203
|
+
* `client_capability_missing` refusals when none does; absent on every other
|
|
204
|
+
* failure. The `reason` itself is unbounded across a fleet and stays on the
|
|
200
205
|
* span and in the log.
|
|
201
206
|
*/
|
|
202
207
|
export declare const ATTR_MCP_ERROR_SEVERITY = "mcp.error.severity";
|
|
@@ -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,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AM,8BAA8B,8BAA8B,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,uBAAuB,CAAC"}
|
|
@@ -80,7 +80,11 @@ export const ATTR_MCP_INPUT_IGNORE_RULE = 'mcp.input.ignore_rule';
|
|
|
80
80
|
export const ATTR_MCP_INPUT_TARGET = 'mcp.input.target';
|
|
81
81
|
/** Which half of the alias stage fired: `declared` or `case_style`. */
|
|
82
82
|
export const ATTR_MCP_INPUT_ALIAS_KIND = 'mcp.input.alias_kind';
|
|
83
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Which representation repair earned validity: `stringified_array`,
|
|
85
|
+
* `stringified_object`, or `integer_as_string`. A call that needed several
|
|
86
|
+
* kinds counts once under each.
|
|
87
|
+
*/
|
|
84
88
|
export const ATTR_MCP_INPUT_COERCION = 'mcp.input.coercion';
|
|
85
89
|
// ============================================================================
|
|
86
90
|
// MCP Outbound Pacer Attributes
|
|
@@ -244,10 +248,11 @@ export const ATTR_MCP_ERROR_CLASSIFIED_CODE = 'mcp.error.classified_code';
|
|
|
244
248
|
*/
|
|
245
249
|
export const ATTR_MCP_ERROR_CATEGORY = 'mcp.error.category';
|
|
246
250
|
/**
|
|
247
|
-
* Log level
|
|
248
|
-
* `
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
+
* Log level resolved for this failure mode: `debug`, `info`, `notice`, or
|
|
252
|
+
* `warning`. Set when a definition's `errors[]` entry declares one, and as
|
|
253
|
+
* `notice` on the framework's `invalid_arguments` and
|
|
254
|
+
* `client_capability_missing` refusals when none does; absent on every other
|
|
255
|
+
* failure. The `reason` itself is unbounded across a fleet and stays on the
|
|
251
256
|
* span and in the log.
|
|
252
257
|
*/
|
|
253
258
|
export const ATTR_MCP_ERROR_SEVERITY = 'mcp.error.severity';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.js","sourceRoot":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 +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
|
+
version: "1.7"
|
|
8
8
|
audience: external
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -40,7 +40,7 @@ For the full API, Context interface, and error codes, read the framework's `CLAU
|
|
|
40
40
|
4. **Create the app resource** at `src/mcp-server/resources/definitions/{{tool-name}}-ui.app-resource.ts`
|
|
41
41
|
5. **Register both** in the project's existing `createApp()` arrays (directly in `src/index.ts` for fresh scaffolds, or via barrels if the repo already has them)
|
|
42
42
|
6. **Run `bun run devcheck`** — the linter validates `_meta.ui` and cross-checks tool/resource pairing
|
|
43
|
-
7. **Smoke-test** with `bun run rebuild && bun run start:stdio` (or `start:http`)
|
|
43
|
+
7. **Smoke-test** with `bun run rebuild && bun run start:stdio < /dev/null` (or `start:http`) — the `Core services constructed` log record must list the tool in its `tools` field and its UI resource in `resources` (the message text shows only counts)
|
|
44
44
|
|
|
45
45
|
## App Tool Template
|
|
46
46
|
|
|
@@ -235,4 +235,4 @@ If the repo already uses `definitions/index.ts` barrels, update those instead of
|
|
|
235
235
|
- [ ] Both registered in the project's existing `createApp()` arrays (directly or via barrels)
|
|
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
|
-
- [ ] Smoke-tested with `bun run rebuild && bun run start:stdio` (or `start:http`)
|
|
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`
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Add a new subpath export to the @cyanheads/mcp-ts-core package. Use when creating a new public API surface that consumers import from a dedicated subpath (e.g., @cyanheads/mcp-ts-core/newutil).
|
|
5
5
|
metadata:
|
|
6
6
|
author: cyanheads
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.2"
|
|
8
8
|
audience: internal
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -29,18 +29,8 @@ The build uses `tsconfig.build.json` (not `tsconfig.json`) with `rootDir: ./src`
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
3. **Update the exports catalog** in both `CLAUDE.md` and `AGENTS.md` — add a row to the table. These files must stay byte-identical; the simplest approach is `cp CLAUDE.md AGENTS.md` after editing
|
|
32
|
-
4. **
|
|
33
|
-
5. **Verify
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
# Confirm the compiled file exists at the expected dist path
|
|
37
|
-
ls dist/utils/new-util.js
|
|
38
|
-
|
|
39
|
-
# Confirm the subpath export resolves correctly (tests the exports map, not just the dist file)
|
|
40
|
-
bun -e "import('@cyanheads/mcp-ts-core/newutil').then(m => console.log(Object.keys(m)))"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
6. **Run `bun run devcheck`** to verify
|
|
32
|
+
4. **Regenerate the public API manifest** — `bun run scripts/public-api-contract-update.ts` rewrites `PUBLIC_RUNTIME_EXPORTS` in `scripts/public-api-contract.ts` from the live barrels; never edit it by hand
|
|
33
|
+
5. **Verify** with `bun run devcheck` and `bun run test:package` — the package lane builds, packs, installs, and imports every subpath in the manifest, so a wrong `dist/` path or a missing export fails there
|
|
44
34
|
|
|
45
35
|
## Naming conventions
|
|
46
36
|
|
|
@@ -56,7 +46,6 @@ The build uses `tsconfig.build.json` (not `tsconfig.json`) with `rootDir: ./src`
|
|
|
56
46
|
- [ ] Subpath added to `package.json` `exports` with `types` and `import` conditions
|
|
57
47
|
- [ ] Exports catalog updated in both `CLAUDE.md` and `AGENTS.md` (must be byte-identical)
|
|
58
48
|
- [ ] If the new export has optional peer dependencies: entries added to both `peerDependencies` and `peerDependenciesMeta` in `package.json`
|
|
59
|
-
- [ ] `bun run
|
|
60
|
-
- [ ] Compiled file exists at expected `dist/` path and subpath import resolves correctly
|
|
61
|
-
- [ ] Integration test at `tests/integration/package-consumer.int.test.ts` updated: new subpath added to the import spec list and `toHaveLength` count incremented
|
|
49
|
+
- [ ] Public API manifest regenerated with `bun run scripts/public-api-contract-update.ts`
|
|
62
50
|
- [ ] `bun run devcheck` passes
|
|
51
|
+
- [ ] `bun run test:package` passes
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Scaffold a new MCP prompt template. Use when the user asks to add a prompt, create a reusable message template, or define a prompt for LLM interactions.
|
|
5
5
|
metadata:
|
|
6
6
|
author: cyanheads
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.5"
|
|
8
8
|
audience: external
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -21,6 +21,7 @@ Prompts are pure message templates — no `Context`, no auth, no side effects. `
|
|
|
21
21
|
2. **Create the file** at `src/mcp-server/prompts/definitions/{{prompt-name}}.prompt.ts`
|
|
22
22
|
3. **Register** the prompt in the project's existing `createApp()` prompt list (directly in `src/index.ts` for fresh scaffolds, or via a barrel if the repo already has one)
|
|
23
23
|
4. **Run `bun run devcheck`** to verify
|
|
24
|
+
5. **Smoke-test** with `bun run rebuild && bun run start:stdio < /dev/null` — the `Core services constructed` log record must list the new prompt in its `prompts` field (the message text shows only counts); if it doesn't, the prompt never reached `createApp()`
|
|
24
25
|
|
|
25
26
|
## Template
|
|
26
27
|
|
|
@@ -90,10 +91,12 @@ await createApp({
|
|
|
90
91
|
});
|
|
91
92
|
```
|
|
92
93
|
|
|
93
|
-
If the repo already uses `src/mcp-server/prompts/definitions/index.ts`, add the
|
|
94
|
+
If the repo already uses `src/mcp-server/prompts/definitions/index.ts`, add the prompt to that barrel the way it holds the existing ones — it must end up in the array passed to `createApp()`. A bare `export … from` line registers nothing on its own. The standard barrel shape:
|
|
94
95
|
|
|
95
96
|
```typescript
|
|
96
|
-
|
|
97
|
+
import { {{PROMPT_EXPORT}} } from './{{prompt-name}}.prompt.js';
|
|
98
|
+
|
|
99
|
+
export const allPromptDefinitions = [/* existing prompts */, {{PROMPT_EXPORT}}];
|
|
97
100
|
```
|
|
98
101
|
|
|
99
102
|
## Argument autocompletion
|
|
@@ -137,3 +140,4 @@ For an optional argument, wrap the inner schema and apply `.optional()` outside:
|
|
|
137
140
|
- [ ] No side effects — prompts are pure templates
|
|
138
141
|
- [ ] Registered in the project's existing `createApp()` prompt list (directly or via barrel)
|
|
139
142
|
- [ ] `bun run devcheck` passes
|
|
143
|
+
- [ ] Smoke-tested with `bun run rebuild && bun run start:stdio < /dev/null`; the `Core services constructed` record lists the new prompt in its `prompts` field
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Scaffold a new MCP resource definition. Use when the user asks to add a resource, expose data via URI, or create a readable endpoint.
|
|
5
5
|
metadata:
|
|
6
6
|
author: cyanheads
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.8"
|
|
8
8
|
audience: external
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -22,7 +22,7 @@ Resources use the `resource()` builder from `@cyanheads/mcp-ts-core`. Each resou
|
|
|
22
22
|
3. **Create the file** at `src/mcp-server/resources/definitions/{{resource-name}}.resource.ts`
|
|
23
23
|
4. **Register** the resource in the project's existing `createApp()` resource list (directly in `src/index.ts` for fresh scaffolds, or via a barrel if the repo already has one)
|
|
24
24
|
5. **Run `bun run devcheck`** to verify
|
|
25
|
-
6. **Smoke-test** with `bun run rebuild && bun run start:stdio` (or `start:http`)
|
|
25
|
+
6. **Smoke-test** with `bun run rebuild && bun run start:stdio < /dev/null` (or `start:http`) — the `Core services constructed` log record must list the new resource in its `resources` field (the message text shows only counts); if it doesn't, the resource never reached `createApp()`
|
|
26
26
|
|
|
27
27
|
## Template
|
|
28
28
|
|
|
@@ -103,10 +103,12 @@ await createApp({
|
|
|
103
103
|
});
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
If the repo already uses `src/mcp-server/resources/definitions/index.ts`, add the
|
|
106
|
+
If the repo already uses `src/mcp-server/resources/definitions/index.ts`, add the resource to that barrel the way it holds the existing ones — it must end up in the array passed to `createApp()`. A bare `export … from` line registers nothing on its own. The standard barrel shape:
|
|
107
107
|
|
|
108
108
|
```typescript
|
|
109
|
-
|
|
109
|
+
import { {{RESOURCE_EXPORT}} } from './{{resource-name}}.resource.js';
|
|
110
|
+
|
|
111
|
+
export const allResourceDefinitions = [/* existing resources */, {{RESOURCE_EXPORT}}];
|
|
110
112
|
```
|
|
111
113
|
|
|
112
114
|
### Optional: declarative `errors[]` contract
|
|
@@ -222,4 +224,4 @@ Cacheable operations are `tools/list`, `prompts/list`, `resources/list`, `resour
|
|
|
222
224
|
- [ ] Pagination used for large result sets (`extractCursor`/`paginateArray`) — applies to both `handler` data and `list()` catalogs with many entries
|
|
223
225
|
- [ ] Registered in the project's existing `createApp()` resource list (directly or via barrel)
|
|
224
226
|
- [ ] `bun run devcheck` passes
|
|
225
|
-
- [ ] Smoke-tested with `bun run rebuild && bun run start:stdio` (or `start:http`)
|
|
227
|
+
- [ ] Smoke-tested with `bun run rebuild && bun run start:stdio < /dev/null` (or `start:http`); the `Core services constructed` record lists the new resource in its `resources` field
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Scaffold a new service integration. Use when the user asks to add a service, integrate an external API, or create a reusable domain module with its own initialization and state.
|
|
5
5
|
metadata:
|
|
6
6
|
author: cyanheads
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.12"
|
|
8
8
|
audience: external
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -231,7 +231,7 @@ Services don't declare `errors: [...]` contracts and don't have `ctx.fail` — t
|
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
- **Tool/resource handlers bubble service errors unchanged** — the contract advertises the *advertised* failure surface, and any code thrown from a service still reaches the client correctly via the auto-classifier. The conformance lint scans handler source text only, so service-thrown codes aren't flagged.
|
|
234
|
-
- **Carry contract `reason` via `data: { reason }`** when the calling tool declares an `errors[]` contract entry for this failure mode. Services can't call `ctx.fail`, but passing the reason in `data` flows through the auto-classifier untouched, so clients see the same `error.data.reason` they'd see from `ctx.fail` —
|
|
234
|
+
- **Carry contract `reason` via `data: { reason }`** when the calling tool declares an `errors[]` contract entry for this failure mode. Services can't call `ctx.fail`, but passing the reason in `data` flows through the auto-classifier untouched, so clients see the same `error.data.reason` they'd see from `ctx.fail` — and the framework fills that entry's `recovery` as `data.recovery.hint` when the throw carries none. No handler-side catch-and-rethrow needed:
|
|
235
235
|
|
|
236
236
|
```ts
|
|
237
237
|
// tool declares: errors: [{ reason: 'empty_expression', code: JsonRpcErrorCode.ValidationError,
|
|
@@ -241,16 +241,7 @@ Services don't declare `errors: [...]` contracts and don't have `ctx.fail` — t
|
|
|
241
241
|
|
|
242
242
|
The tool's entry carries `thrownBy: 'service'` so `error-contract-unthrown` — which reads the handler body and cannot see this throw — skips it while still checking whatever the handler throws itself. Lint-only metadata; nothing at runtime reads it.
|
|
243
243
|
|
|
244
|
-
- **
|
|
245
|
-
|
|
246
|
-
```ts
|
|
247
|
-
throw validationError('Parse failed: ' + err.message, {
|
|
248
|
-
reason: 'parse_failed',
|
|
249
|
-
...ctx.recoveryFor('parse_failed'), // resolves from caller's contract
|
|
250
|
-
});
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
The contract `recovery` (validated ≥5 words at lint time) is the single source of truth. Services that opt in via the resolver carry the same hint to the wire that handler-level `ctx.fail` callers do — no drift, no auto-population. For dynamic recovery (interpolating runtime values into the hint), pass an explicit `{ recovery: { hint: '…' } }` instead.
|
|
244
|
+
- **The contract `recovery` follows the reason.** The calling tool's declared `recovery` (validated ≥5 words at lint time) is the single source of truth, and the handler factory puts it on the wire for any failure carrying that reason — matched on the reason alone, whatever factory the service picked — so a service throw needs nothing beyond `{ reason }`. For dynamic recovery (interpolating runtime values into the hint), pass an explicit `{ recovery: { hint: '…' } }`, which always wins.
|
|
254
245
|
|
|
255
246
|
## API Efficiency
|
|
256
247
|
|
|
@@ -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.
|
|
7
|
+
version: "1.8"
|
|
8
8
|
audience: external
|
|
9
9
|
type: reference
|
|
10
10
|
---
|
|
@@ -36,7 +36,8 @@ Read the handler and identify:
|
|
|
36
36
|
| **Input variations** | Optional fields omitted, defaults applied, boundary values |
|
|
37
37
|
| **Error paths** | Invalid state, missing resources, service failures → correct error thrown |
|
|
38
38
|
| **`ctx.state` usage** | Available on any mock context (tenant `'default'` unless `{ tenantId }` says otherwise). It runs the production storage path, so use storage-legal keys (`cache/v1/abc`, never `cache:v1:abc`) and assert TTL expiry with fake timers. |
|
|
39
|
-
| **`ctx.requestInput` / `ctx.inputs`** | Two rounds. First round: assert the handler throws the input-required signal (`.rejects.toSatisfy(isInputRequiredSignal)`), or catch it and assert on `error.result.inputRequests`. Second round: seed `createMockContext({ inputResponses })` and assert the handler completes. Cover the decline/cancel branch too. |
|
|
39
|
+
| **`ctx.requestInput` / `ctx.inputs`** | Two rounds. First round: assert the handler throws the input-required signal (`.rejects.toSatisfy(isInputRequiredSignal)`), or catch it and assert on `error.result.inputRequests`. Second round: seed `createMockContext({ inputResponses })` and assert the handler completes. Cover the decline/cancel branch too. A consent gate that redeems a `ctx.state` record also needs that record written into the second round's context, and a replay case showing the spent record asks again (see `api-testing` § Mock inputs). |
|
|
40
|
+
| **`ctx.clientCapabilities`** | When the handler asks only if the client declared a capability, seed `createMockContext({ clientCapabilities })` with and without it and assert it asks in one case and falls through in the other. Seeding it also filters `inputResponses` to the declared kinds, as production does. |
|
|
40
41
|
| **`ctx.signal`** | Pass `createMockContext({ signal: controller.signal })` and assert a long loop stops early rather than running to completion. |
|
|
41
42
|
| **`ctx.fail` (typed contract)** | Definitions with `errors[]` need `fail` attached to the mock ctx — `createMockContext({ errors: myTool.errors })` does it for you. Assert on `data.reason` (stable per-contract entry), not just `code`. |
|
|
42
43
|
| **`format` function** | Test separately if defined — it's pure, no ctx needed. Verify it renders the IDs and fields the model needs, not just a count or title. For projection-style tools, test non-default field selections. |
|
|
@@ -222,6 +223,8 @@ it('does not re-ask after a decline', async () => {
|
|
|
222
223
|
});
|
|
223
224
|
```
|
|
224
225
|
|
|
226
|
+
For a destructive consent gate, the second round completes only when the context holds the single-use record the first round stored, keyed by the `requestState` it returned — each mock context has its own `ctx.state`, so write the record into the second context before calling the handler. `api-testing` § Mock inputs has the full pattern, including the replay case.
|
|
227
|
+
|
|
225
228
|
### Cancellation test
|
|
226
229
|
|
|
227
230
|
```typescript
|
|
@@ -308,7 +311,7 @@ When scaffolding tests for an existing handler, use the Zod schemas to generate
|
|
|
308
311
|
- [ ] Happy path tested with valid input → expected output
|
|
309
312
|
- [ ] Error paths tested (at least one `.rejects.toThrow()`)
|
|
310
313
|
- [ ] `format` function tested if defined
|
|
311
|
-
- [ ] `createMockContext` options match handler's ctx usage (`tenantId`, `inputResponses`, `requestState`, `errors`, `signal`)
|
|
314
|
+
- [ ] `createMockContext` options match handler's ctx usage (`tenantId`, `inputResponses`, `requestState`, `clientCapabilities`, `errors`, `signal`)
|
|
312
315
|
- [ ] Service re-initialized in `beforeEach` if handler depends on a service singleton
|
|
313
316
|
- [ ] If handler has optional fields: tested with empty-string inner values (form-client simulation)
|
|
314
317
|
- [ ] If wrapping external API: sparse-payload case tested — fixture omits at least one optional upstream field; output still validates and `format()` renders uncertainty honestly instead of inventing values
|