@cyanheads/mcp-ts-core 0.12.5 → 0.12.7
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 +26 -14
- package/CLAUDE.md +26 -14
- package/README.md +124 -76
- package/biome.json +1 -1
- package/changelog/0.12.x/0.12.6.md +44 -0
- package/changelog/0.12.x/0.12.7.md +39 -0
- package/dist/core/app.d.ts +2 -2
- package/dist/core/app.js +2 -2
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +2 -2
- package/dist/core/worker.d.ts +2 -2
- package/dist/core/worker.d.ts.map +1 -1
- package/dist/core/worker.js +1 -1
- package/dist/core/worker.js.map +1 -1
- package/dist/mcp-server/apps/appBuilders.d.ts +2 -2
- package/dist/mcp-server/apps/appBuilders.js +2 -2
- package/dist/mcp-server/cacheHints.d.ts +1 -1
- package/dist/mcp-server/prompts/prompt-registration.d.ts +1 -1
- package/dist/mcp-server/prompts/prompt-registration.js +1 -1
- package/dist/mcp-server/resources/resource-registration.d.ts +3 -3
- package/dist/mcp-server/resources/resource-registration.js +1 -1
- package/dist/mcp-server/resources/resourceSubscriptions.d.ts +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts +2 -2
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +4 -4
- package/dist/mcp-server/server.d.ts +4 -4
- package/dist/mcp-server/server.js +1 -1
- package/dist/mcp-server/tools/tool-registration.d.ts +3 -3
- package/dist/mcp-server/tools/tool-registration.d.ts.map +1 -1
- package/dist/mcp-server/tools/tool-registration.js +9 -3
- package/dist/mcp-server/tools/tool-registration.js.map +1 -1
- package/dist/mcp-server/tools/utils/deferredInputSchema.d.ts +39 -0
- package/dist/mcp-server/tools/utils/deferredInputSchema.d.ts.map +1 -0
- package/dist/mcp-server/tools/utils/deferredInputSchema.js +33 -0
- package/dist/mcp-server/tools/utils/deferredInputSchema.js.map +1 -0
- package/dist/mcp-server/tools/utils/disabled-tool.d.ts +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +11 -3
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js +29 -7
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
- package/dist/mcp-server/transports/auth/authFactory.d.ts +1 -1
- package/dist/mcp-server/transports/auth/authFactory.js +2 -2
- package/dist/mcp-server/transports/auth/authMiddleware.d.ts +1 -1
- package/dist/mcp-server/transports/auth/authMiddleware.js +1 -1
- package/dist/mcp-server/transports/auth/lib/authUtils.js +1 -1
- package/dist/mcp-server/transports/auth/lib/claimParser.d.ts +1 -1
- package/dist/mcp-server/transports/auth/strategies/authStrategy.d.ts +1 -1
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.d.ts +2 -2
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js +1 -1
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.d.ts +2 -2
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js +1 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.d.ts +1 -1
- package/dist/mcp-server/transports/http/httpServer.d.ts +1 -1
- package/dist/mcp-server/transports/http/httpServer.js +1 -1
- package/dist/mcp-server/transports/http/httpTransport.d.ts +3 -3
- package/dist/mcp-server/transports/http/httpTransport.js +12 -12
- package/dist/mcp-server/transports/http/landing-page/handler.d.ts +1 -1
- package/dist/mcp-server/transports/http/sessionStore.js +1 -1
- package/dist/mcp-server/transports/manager.d.ts +2 -2
- package/dist/mcp-server/transports/manager.js +3 -3
- package/dist/services/llm/providers/openrouter.provider.d.ts +1 -1
- package/dist/services/speech/providers/whisper.provider.d.ts.map +1 -1
- package/dist/services/speech/providers/whisper.provider.js +4 -2
- package/dist/services/speech/providers/whisper.provider.js.map +1 -1
- package/dist/storage/core/StorageService.d.ts +1 -1
- package/dist/storage/core/StorageService.js +1 -1
- package/dist/storage/core/storageFactory.d.ts +2 -2
- package/dist/storage/core/storageFactory.js +6 -6
- package/dist/storage/core/storageValidation.d.ts.map +1 -1
- package/dist/storage/core/storageValidation.js +5 -3
- package/dist/storage/core/storageValidation.js.map +1 -1
- package/dist/storage/providers/cloudflare/d1Provider.d.ts +1 -1
- package/dist/storage/providers/cloudflare/d1Provider.js +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.d.ts +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.js +1 -1
- package/dist/storage/providers/cloudflare/r2Provider.d.ts +1 -1
- package/dist/storage/providers/cloudflare/r2Provider.js +1 -1
- package/dist/storage/providers/fileSystem/fileSystemProvider.d.ts +1 -1
- package/dist/storage/providers/fileSystem/fileSystemProvider.js +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.d.ts +3 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.d.ts.map +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.js +11 -7
- package/dist/storage/providers/inMemory/inMemoryProvider.js.map +1 -1
- package/dist/storage/providers/supabase/supabaseProvider.d.ts +2 -2
- package/dist/storage/providers/supabase/supabaseProvider.js +1 -1
- package/dist/testing/fuzz.d.ts.map +1 -1
- package/dist/testing/fuzz.js +92 -53
- package/dist/testing/fuzz.js.map +1 -1
- package/dist/utils/formatting/diffFormatter.d.ts +2 -2
- package/dist/utils/formatting/diffFormatter.js +4 -4
- package/dist/utils/formatting/tableFormatter.d.ts +2 -2
- package/dist/utils/formatting/tableFormatter.js +3 -3
- package/dist/utils/formatting/treeFormatter.d.ts +3 -3
- package/dist/utils/formatting/treeFormatter.js +4 -4
- package/dist/utils/internal/error-handler/errorHandler.js +6 -6
- package/dist/utils/internal/error-handler/helpers.js +1 -1
- package/dist/utils/internal/error-handler/types.d.ts +1 -1
- package/dist/utils/internal/health.js +2 -2
- package/dist/utils/internal/lazyImport.js +1 -1
- package/dist/utils/internal/logger.d.ts +3 -3
- package/dist/utils/internal/logger.js +4 -4
- package/dist/utils/internal/performance.d.ts +1 -1
- package/dist/utils/internal/performance.js +6 -6
- package/dist/utils/internal/requestContext.d.ts +1 -1
- package/dist/utils/internal/requestContext.js +2 -2
- package/dist/utils/metrics/tokenCounter.d.ts +1 -1
- package/dist/utils/metrics/tokenCounter.js +2 -2
- package/dist/utils/network/fetchWithTimeout.d.ts +1 -1
- package/dist/utils/network/fetchWithTimeout.js +6 -6
- package/dist/utils/network/httpError.js +1 -1
- package/dist/utils/network/retry.d.ts +1 -1
- package/dist/utils/network/retry.js +1 -1
- package/dist/utils/pagination/pagination.d.ts +2 -2
- package/dist/utils/pagination/pagination.js +4 -4
- package/dist/utils/parsing/csvParser.d.ts +4 -4
- package/dist/utils/parsing/csvParser.js +6 -6
- package/dist/utils/parsing/dateParser.d.ts +3 -3
- package/dist/utils/parsing/dateParser.js +6 -6
- package/dist/utils/parsing/frontmatterParser.d.ts +2 -2
- package/dist/utils/parsing/frontmatterParser.js +3 -3
- package/dist/utils/parsing/htmlExtractor.d.ts +3 -3
- package/dist/utils/parsing/htmlExtractor.js +5 -5
- package/dist/utils/parsing/jsonParser.d.ts +4 -4
- package/dist/utils/parsing/jsonParser.js +6 -6
- package/dist/utils/parsing/pdfParser.d.ts +2 -2
- package/dist/utils/parsing/pdfParser.js +4 -4
- package/dist/utils/parsing/xmlParser.d.ts +4 -4
- package/dist/utils/parsing/xmlParser.js +5 -5
- package/dist/utils/parsing/yamlParser.d.ts +4 -4
- package/dist/utils/parsing/yamlParser.js +6 -6
- package/dist/utils/scheduling/scheduler.d.ts +3 -3
- package/dist/utils/scheduling/scheduler.js +5 -5
- package/dist/utils/security/rateLimiter.d.ts +2 -2
- package/dist/utils/security/rateLimiter.js +3 -3
- package/dist/utils/security/rateLimiter.js.map +1 -1
- package/dist/utils/security/sanitization.d.ts +3 -3
- package/dist/utils/security/sanitization.js +7 -7
- package/dist/utils/telemetry/instrumentation.d.ts.map +1 -1
- package/dist/utils/telemetry/instrumentation.js +7 -8
- package/dist/utils/telemetry/instrumentation.js.map +1 -1
- package/dist/utils/telemetry/trace.d.ts +1 -1
- package/dist/utils/telemetry/trace.js +1 -1
- package/package.json +33 -26
- package/scripts/check-framework-antipatterns.ts +4 -1
- package/scripts/devcheck.ts +309 -37
- package/scripts/lint-packaging.ts +28 -6
- package/skills/add-tool/SKILL.md +33 -1
- package/skills/api-errors/SKILL.md +2 -1
- package/skills/api-workers/SKILL.md +3 -3
- package/skills/design-mcp-server/SKILL.md +6 -1
- package/skills/field-test/SKILL.md +70 -30
- package/skills/git-wrapup/SKILL.md +4 -3
- package/templates/AGENTS.md +2 -2
- package/templates/CLAUDE.md +2 -2
- package/templates/package.json +6 -6
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Five source fixes: detached storage writes after a capacity sweep, an unevictable empty rate-limit key, a module-load cursor key that broke standalone Worker startup, fuzz that never reached pattern-validated handlers, and a leaked shutdown deadline. The test suite trades type-only assertions for behavior and gains three lanes."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: true
|
|
5
|
+
agent-notes: |
|
|
6
|
+
Scaffold sync only: re-sync a project copy of CLAUDE.md/AGENTS.md for the
|
|
7
|
+
Dependencies and RequestCancelled bullet under Changed. Nothing else to adopt.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 0.12.6 — 2026-09-06
|
|
11
|
+
|
|
12
|
+
## Added
|
|
13
|
+
|
|
14
|
+
- **`bun run test:leaks` is an async-resource retention gate** ([#404](https://github.com/cyanheads/mcp-ts-core/issues/404)) — it runs the root runtime projects on real Node, observes every allocation from file collection through worker teardown, and exits nonzero on retained operations, missing evidence, or forced termination. Its sentinel suite runs separately as `bun run test:leak-gate`. Scope and evidence: [tests/leaks/README.md](https://github.com/cyanheads/mcp-ts-core/blob/v0.12.6/tests/leaks/README.md).
|
|
15
|
+
- **Benchmark lanes** — `bun run bench` / `bench:node` for micro workloads over the tool pipeline, storage, and rate limiter, and `bench:io` / `bench:io:bun` for opt-in HTTP, Workerd, and native I/O measurements. Reports carry runtime and machine provenance; no timing threshold enters `test:all`. See [tests/benchmarks/README.md](https://github.com/cyanheads/mcp-ts-core/blob/v0.12.6/tests/benchmarks/README.md).
|
|
16
|
+
- **`bun run test:worker` also boots the built bundle standalone** ([#406](https://github.com/cyanheads/mcp-ts-core/issues/406)) — a Wrangler-hosted lane outside the Workerd test pool's module loader, which is where a startup-time failure is observable at all.
|
|
17
|
+
|
|
18
|
+
## Changed
|
|
19
|
+
|
|
20
|
+
- **Lane configs live in `tests/config/`** — `vitest.integration.ts`, `vitest.worker.ts`, and `vitest.package.ts` moved there, joined by the new worker-bundle, benchmark, performance, and leak configs. `vitest.config.ts` and the published `vitest.config.base.mjs` stay at the repository root.
|
|
21
|
+
- **`scripts/with-node.ts` selects the real Node binary** for `test:node`, `test:order`, `test:worker`, and `bench:node`, replacing the inline shell each script carried.
|
|
22
|
+
- **Scaffolded `CLAUDE.md` / `AGENTS.md`** — the changelog section order ends with `Dependencies`, and `RequestCancelled` is listed among the baseline error codes a tool need not declare.
|
|
23
|
+
- **Test assertions moved from type shapes to behavior** — ten type-only suites that imported no runtime value, plus a duplicate `Context` suite, are gone (~2,700 lines). The behavior they claimed to cover is now exercised directly: `Context` state bounds and cancellation between I/O steps, the multi-round-trip input helper, format parity across every enum member, and Worker lifecycle-failure, storage-failure, and wire-contract paths.
|
|
24
|
+
- **Every suite passes in shuffled order** — session stores, mirror handles, sockets, and response bodies that outlived their cases are settled per test, and paired tests no longer depend on file order. The disabled OpenRouter provider suite is rewritten and running again.
|
|
25
|
+
- **The skip-only telemetry suite is gone** ([#362](https://github.com/cyanheads/mcp-ts-core/issues/362)) — `instrumentation.test.ts` carried nine skips and a todo attributing them to Bun; `instrumentation.lifecycle.test.ts` now covers all of it, including the lightweight-mode and idempotency cases the skips masked.
|
|
26
|
+
- Shipped skills: `api-workers` 1.8.
|
|
27
|
+
|
|
28
|
+
## Fixed
|
|
29
|
+
|
|
30
|
+
- **`InMemoryProvider` reattaches the tenant map after a capacity sweep** ([#403](https://github.com/cyanheads/mcp-ts-core/issues/403)) — a sweep that removed the target tenant left `set()` writing into a detached map, so the value was unreachable while `size` still counted it. `setMany()` now preflights against the snapshot it counted rather than a later one.
|
|
31
|
+
- **The cursor HMAC key is generated on first use, not at module load** ([#406](https://github.com/cyanheads/mcp-ts-core/issues/406)) — Workerd forbids random generation during global evaluation, so a standalone bundle failed to start. Cursor encoding, truncation, and tenant/tamper rejection are unchanged.
|
|
32
|
+
- **`fuzzTool` and `fuzzResource` reach pattern-validated handlers** ([#385](https://github.com/cyanheads/mcp-ts-core/issues/385), [#350](https://github.com/cyanheads/mcp-ts-core/issues/350)) — a `.regex()` field now drives generation instead of rejecting every sample at parse, resource runs receive the definition's `errors[]`, and tool, resource, and prompt results are validated after the call rather than assumed.
|
|
33
|
+
- **`shutdownOpenTelemetry()` clears its timeout on every path** — a rejected shutdown left the deadline timer armed.
|
|
34
|
+
- **The root `.mcpbignore` anchors its development-directory patterns** ([#343](https://github.com/cyanheads/mcp-ts-core/issues/343)) — `/.claude/`, `/.agents/`, and `/skills/` no longer strip matching paths under `node_modules`, and `devcheck` runs Packaging whenever `.mcpbignore` exists, not only alongside a manifest.
|
|
35
|
+
|
|
36
|
+
## Security
|
|
37
|
+
|
|
38
|
+
- **An empty rate-limit key is evicted like any other** ([#405](https://github.com/cyanheads/mcp-ts-core/issues/405)) — the eviction candidate was tested for truthiness, so `''` was selected and never deleted; a server whose `keyGenerator` can produce it grew the tracked map past `maxTrackedKeys` under distinct-key churn.
|
|
39
|
+
|
|
40
|
+
## Dependencies
|
|
41
|
+
|
|
42
|
+
- `@opentelemetry/resources`, `@opentelemetry/sdk-metrics`, `@opentelemetry/sdk-trace-node` 2.10.0 → 2.11.0
|
|
43
|
+
- `@supabase/supabase-js` 2.112.4 → 2.114.0
|
|
44
|
+
- `ignore` 7.0.7 → 7.0.8, `tsc-alias` 1.9.2 → 1.9.4 (lockfile only; the declared ranges are unchanged)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Argument rejections now carry the structured error envelope, classified as InvalidParams, on every transport. The Node and workerd type environments are checked as separate TypeScript programs, which lifts the @cloudflare/workers-types hold."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
agent-notes: |
|
|
6
|
+
Two adoption points. A test asserting `JsonRpcErrorCode.ValidationError` for a
|
|
7
|
+
tool's argument rejection must now expect `InvalidParams`. A project whose
|
|
8
|
+
tsconfig loads `node` alongside `@cloudflare/workers-types` can split the two
|
|
9
|
+
programs the way `tsconfig.worker.json` does here, and drop any
|
|
10
|
+
`@cloudflare/workers-types` version hold it carried for the Buffer collision.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 0.12.7 — 2026-09-08
|
|
14
|
+
|
|
15
|
+
## Added
|
|
16
|
+
|
|
17
|
+
- **`bun run typecheck:worker`** — the workerd lane checked in its own program (`tsconfig.worker.json`) against the built declarations, so run it after a build. `devcheck` runs it as the `TypeScript (Worker)` check when `dist/` exists.
|
|
18
|
+
|
|
19
|
+
## Changed
|
|
20
|
+
|
|
21
|
+
- **README rewritten** around a quick start, one worked tool, and a capability table. The package description shortens to "Agent-native TypeScript framework for MCP servers. Includes runtime infrastructure and agent skills for building, testing, and shipping servers." in `package.json`, `CITATION.cff`, and the Docker OCI label; `server.json` carries the first sentence.
|
|
22
|
+
- **Gating a tool now carries a reference audit** ([#402](https://github.com/cyanheads/mcp-ts-core/issues/402)) — `disabledTool()` removes a tool from `tools/list` but rewrites nothing else, so `add-tool` and `design-mcp-server` require that prose, `errors[].recovery` text, and `nextToolSuggestions` entries naming a gated tool be resolved from the same config that decides registration.
|
|
23
|
+
- **Scaffold devDependency pins** — `@biomejs/biome` 2.5.5 → 2.5.12, `@types/node` 26.1.1 → 26.4.0, `vitest` and `@vitest/coverage-istanbul` 4.1.10 → 4.1.11, `ignore` ^7.0.6 → ^7.0.7, `tsc-alias` ^1.9.1 → ^1.9.2.
|
|
24
|
+
- Shipped skills: `add-tool` 2.22, `api-errors` 1.9, `design-mcp-server` 2.24, `field-test` 2.10, `git-wrapup` 1.12.
|
|
25
|
+
|
|
26
|
+
## Fixed
|
|
27
|
+
|
|
28
|
+
- **An argument rejection carries `structuredContent.error`** ([#377](https://github.com/cyanheads/mcp-ts-core/issues/377)) — an unknown root key, wrong type, missing required field, or failed constraint returns `isError: true` with `error.code` `-32602` and the same readable `Invalid arguments for tool <name>: …` text as before, on the 2025-11-25 and 2026-07-28 revisions and under workerd. `registerTool` receives a schema that projects the source JSON Schema verbatim and defers validation to the handler, which never runs for a rejected call. Direct handler tests that expected `ValidationError` now see `InvalidParams`.
|
|
29
|
+
- **Node and workerd ambient types no longer share a program** ([#397](https://github.com/cyanheads/mcp-ts-core/issues/397)) — `@cloudflare/workers-types` declares `Buffer` as an ambient `const … : any`, which stripped the encoding-aware `toString()` overloads off every Node Buffer while `skipLibCheck` hid the redeclaration. The root and build configs load Node globals only; `tsconfig.worker.json` loads the workerd set for `tests/worker`. Worker types still reach `src/` through module imports.
|
|
30
|
+
- **`bun outdated` rows resolve to the dependency key that declared them** ([#398](https://github.com/cyanheads/mcp-ts-core/issues/398)) — an `npm:` alias is printed under its resolved target, so an allowlist entry keyed on the `package.json` key could never match. Rows are attributed through declared ranges and reprinted under the declared key; where a direct dependency and an alias share a target and attribution stays ambiguous, the row is called out rather than allowlisted.
|
|
31
|
+
- **Packaging validation compares each plugin manifest's `version` with `package.json`** ([#393](https://github.com/cyanheads/mcp-ts-core/issues/393)) — a missing or stale `version` in `.claude-plugin/plugin.json` or `.codex-plugin/plugin.json` fails with the path and expected version. `checkPluginManifests()` takes the package version as a fourth argument; absent manifests and the `packaging.pluginManifests` opt-out are unchanged. Both manifests are named in the `git-wrapup` version lists.
|
|
32
|
+
- **The field-test helper initializes against a stateless server** ([#391](https://github.com/cyanheads/mcp-ts-core/issues/391)) — `mcp_init` decides success on the initialize result rather than the `Mcp-Session-Id` header, and fails loudly on a transport error, a non-2xx status, a JSON-RPC error, or a result with no `protocolVersion`. `mcp_call` accepts an empty `sid`, omits the session header when there is none, and takes the negotiated protocol as a fifth argument.
|
|
33
|
+
|
|
34
|
+
## Dependencies
|
|
35
|
+
|
|
36
|
+
- `@cloudflare/workers-types` 5.20260730.1 → 5.20260905.1 (the exact pin held for #397 is lifted, and its `devcheck.config.json` allowlist entry removed)
|
|
37
|
+
- `@opentelemetry/exporter-metrics-otlp-http`, `@opentelemetry/exporter-trace-otlp-http`, `@opentelemetry/instrumentation-http`, `@opentelemetry/sdk-node` ^0.221.0 → ^0.222.0; `@opentelemetry/instrumentation-pino` ^0.67.0 → ^0.68.0 (peer floor ^0.66.0 → ^0.68.0)
|
|
38
|
+
- `hono` ^4.13.5 → ^4.13.7, `jose` ^6.2.10 → ^6.2.12
|
|
39
|
+
- `@supabase/supabase-js` ^2.112.4 → ^2.115.0, `openai` ^7.8.0 → ^7.10.0, `@biomejs/biome` 2.5.11 → 2.5.12, `@types/bun` ^1.4.0 → ^1.4.1, `bun-types` ^1.4.0 → ^1.4.2
|
package/dist/core/app.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type Implementation, type ServerEventBus, type ServerNotifier } from '@modelcontextprotocol/server';
|
|
9
9
|
import { config } from '../config/index.js';
|
|
10
|
-
import { type LandingConfig, type ServerManifest } from '
|
|
10
|
+
import { type LandingConfig, type ServerManifest } from './serverManifest.js';
|
|
11
11
|
import { type CacheHints } from '../mcp-server/cacheHints.js';
|
|
12
12
|
import type { AnyPromptDefinition } from '../mcp-server/prompts/utils/promptDefinition.js';
|
|
13
13
|
import type { AnyResourceDefinition } from '../mcp-server/resources/utils/resourceDefinition.js';
|
|
@@ -237,7 +237,7 @@ export declare function composeServices<TSupabaseClient extends object = Supabas
|
|
|
237
237
|
*/
|
|
238
238
|
export declare function createApp<TSupabaseClient extends object = SupabaseClientHandle>(options?: CreateAppOptions<TSupabaseClient>): Promise<ServerHandle<TSupabaseClient>>;
|
|
239
239
|
export { z } from 'zod';
|
|
240
|
-
export type { Context, ContextInputs, ContextLogger, ContextState } from '
|
|
240
|
+
export type { Context, ContextInputs, ContextLogger, ContextState } from './context.js';
|
|
241
241
|
export type { PromptDefinition } from '../mcp-server/prompts/utils/promptDefinition.js';
|
|
242
242
|
export { prompt } from '../mcp-server/prompts/utils/promptDefinition.js';
|
|
243
243
|
export type { AnyResourceDefinition, ResourceDefinition, } from '../mcp-server/resources/utils/resourceDefinition.js';
|
package/dist/core/app.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { InMemoryServerEventBus, } from '@modelcontextprotocol/server';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { config, resetConfig } from '../config/index.js';
|
|
11
|
-
import { startGcPressureLoop } from '
|
|
12
|
-
import { buildServerManifest, } from '
|
|
11
|
+
import { startGcPressureLoop } from './gcPressure.js';
|
|
12
|
+
import { buildServerManifest, } from './serverManifest.js';
|
|
13
13
|
import { assertValidCacheHints } from '../mcp-server/cacheHints.js';
|
|
14
14
|
import { notifierFor } from '../mcp-server/notifications.js';
|
|
15
15
|
import { PromptRegistry } from '../mcp-server/prompts/prompt-registration.js';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* `DefinitionCounts`, `Database`) out of the consumer-facing surface.
|
|
6
6
|
* @module src/core/index
|
|
7
7
|
*/
|
|
8
|
-
export type { ContextOptions, CoreServices, CreateAppOptions, ServerHandle, SupabaseClientHandle, } from '
|
|
9
|
-
export { createApp } from '
|
|
10
|
-
export type { LandingConfig, LandingLink } from '
|
|
8
|
+
export type { ContextOptions, CoreServices, CreateAppOptions, ServerHandle, SupabaseClientHandle, } from './app.js';
|
|
9
|
+
export { createApp } from './app.js';
|
|
10
|
+
export type { LandingConfig, LandingLink } from './serverManifest.js';
|
|
11
11
|
export type { CacheableResultMethod, CacheHints } from '../mcp-server/cacheHints.js';
|
|
12
12
|
export { z } from 'zod';
|
|
13
|
-
export type { AuthContext, ContentCollect, Context, ContextInputs, ContextLogger, ContextState, Enrich, EnrichHelpers, HandlerContext, ReasonOf, TypedEnrich, TypedFail, TypedRecoveryFor, } from '
|
|
14
|
-
export { createFail, createRecoveryFor } from '
|
|
13
|
+
export type { AuthContext, ContentCollect, Context, ContextInputs, ContextLogger, ContextState, Enrich, EnrichHelpers, HandlerContext, ReasonOf, TypedEnrich, TypedFail, TypedRecoveryFor, } from './context.js';
|
|
14
|
+
export { createFail, createRecoveryFor } from './context.js';
|
|
15
15
|
export { APP_RESOURCE_MIME_TYPE, appResource, appTool } from '../mcp-server/apps/appBuilders.js';
|
|
16
16
|
export type { AnyPromptDefinition, PromptDefinition, } from '../mcp-server/prompts/utils/promptDefinition.js';
|
|
17
17
|
export { prompt } from '../mcp-server/prompts/utils/promptDefinition.js';
|
package/dist/core/index.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* `DefinitionCounts`, `Database`) out of the consumer-facing surface.
|
|
6
6
|
* @module src/core/index
|
|
7
7
|
*/
|
|
8
|
-
export { createApp } from '
|
|
8
|
+
export { createApp } from './app.js';
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
10
|
// Zod re-export (consumers use the framework's copy, no separate zod dep)
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
12
12
|
export { z } from 'zod';
|
|
13
|
-
export { createFail, createRecoveryFor } from '
|
|
13
|
+
export { createFail, createRecoveryFor } from './context.js';
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
// Definition builders & types
|
|
16
16
|
// ---------------------------------------------------------------------------
|
package/dist/core/worker.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* exporter is added in the future, `ctx.waitUntil()` should be wired for flush.
|
|
10
10
|
* @module src/core/worker
|
|
11
11
|
*/
|
|
12
|
-
import type { Ai, D1Database, KVNamespace, R2Bucket, ScheduledController } from '@cloudflare/workers-types';
|
|
13
|
-
import { type CreateAppOptions } from '
|
|
12
|
+
import type { Ai, D1Database, ExecutionContext, KVNamespace, R2Bucket, ScheduledController } from '@cloudflare/workers-types';
|
|
13
|
+
import { type CreateAppOptions } from './app.js';
|
|
14
14
|
/**
|
|
15
15
|
* Cloudflare Worker Bindings with proper type safety.
|
|
16
16
|
* No index signature — servers extend via intersection types.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/core/worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,EAAE,EAEF,UAAU,EACV,WAAW,EACX,QAAQ,EACR,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,KAAK,gBAAgB,EAAmB,MAAM,eAAe,CAAC;AAKvE;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,CAAC,EAAE,EAAE,CAAC;IACR;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC,CAAC,EAAE,MAAM,CAAC;IAC7C,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,kBAAkB,CAAC,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oBAAqB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC;IAClF,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3C,0EAA0E;IAC1E,mBAAmB,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,kBAAkB,KAAK,MAAM,CAAC,CAAC;IAC9D,oFAAoF;IACpF,WAAW,CAAC,EAAE,CACZ,UAAU,EAAE,mBAAmB,EAC/B,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,gBAAgB,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AA0GD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAAyB;IAyF5D,KAAK,UACA,OAAO,OACX,kBAAkB,OAClB,gBAAgB,GACpB,OAAO,CAAC,QAAQ,CAAC;IAgEd,SAAS,aACD,mBAAmB,OAC1B,kBAAkB,OAClB,gBAAgB,GACpB,OAAO,CAAC,IAAI,CAAC;EAwCnB"}
|
package/dist/core/worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeLogLevelAlias } from '../config/logLevelAlias.js';
|
|
2
|
-
import { composeServices } from '
|
|
2
|
+
import { composeServices } from './app.js';
|
|
3
3
|
import { createHttpApp } from '../mcp-server/transports/http/httpTransport.js';
|
|
4
4
|
import { logger } from '../utils/internal/logger.js';
|
|
5
5
|
import { requestContextService, withExtra } from '../utils/internal/requestContext.js';
|
package/dist/core/worker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/core/worker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/core/worker.ts"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,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE;iBACjE,CAAC,CAAC;gBAEH,MAAM,CAAC,IAAI,CACT,6BAA6B,EAC7B,SAAS,CAAC,gBAAgB,EAAE;oBAC1B,aAAa,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE;iBAChE,CAAC,CACH,CAAC;gBAEF,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,CAAC;YAC9D,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACxB,MAAM,YAAY,GAAG,qBAAqB,CAAC,oBAAoB,CAAC;oBAC9D,SAAS,EAAE,iBAAiB;oBAC5B,iBAAiB,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE;iBACjE,CAAC,CAAC;gBAEH,MAAM,CAAC,KAAK,CACV,iCAAiC,EACjC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EACzD,YAAY,CACb,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @module src/mcp-server/apps/appBuilders
|
|
8
8
|
*/
|
|
9
9
|
import type { ZodObject, ZodRawShape } from 'zod';
|
|
10
|
-
import type { ResourceDefinition } from '
|
|
11
|
-
import type { ToolDefinition } from '
|
|
10
|
+
import type { ResourceDefinition } from '../resources/utils/resourceDefinition.js';
|
|
11
|
+
import type { ToolDefinition } from '../tools/utils/toolDefinition.js';
|
|
12
12
|
import type { ErrorContract } from '../../types-global/errors.js';
|
|
13
13
|
/**
|
|
14
14
|
* MIME type for MCP Apps HTML resources.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* app resource `_meta.ui` into `resources/read` content items.
|
|
7
7
|
* @module src/mcp-server/apps/appBuilders
|
|
8
8
|
*/
|
|
9
|
-
import { resource } from '
|
|
10
|
-
import { tool } from '
|
|
9
|
+
import { resource } from '../resources/utils/resourceDefinition.js';
|
|
10
|
+
import { tool } from '../tools/utils/toolDefinition.js';
|
|
11
11
|
/**
|
|
12
12
|
* MIME type for MCP Apps HTML resources.
|
|
13
13
|
* Matches `RESOURCE_MIME_TYPE` from `@modelcontextprotocol/ext-apps/server`
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @module src/mcp-server/cacheHints
|
|
11
11
|
*/
|
|
12
12
|
import type { ServerOptions } from '@modelcontextprotocol/server';
|
|
13
|
-
import type { AnyResourceDefinition } from '
|
|
13
|
+
import type { AnyResourceDefinition } from './resources/utils/resourceDefinition.js';
|
|
14
14
|
/**
|
|
15
15
|
* Cache hints keyed by operation, for the closed set of methods whose
|
|
16
16
|
* 2026-07-28 results carry `ttlMs` / `cacheScope`: `tools/list`,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module src/mcp-server/prompts/prompt-registration
|
|
7
7
|
*/
|
|
8
8
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
9
|
-
import type { AnyPromptDefinition } from '
|
|
9
|
+
import type { AnyPromptDefinition } from './utils/promptDefinition.js';
|
|
10
10
|
import type { logger as defaultLogger } from '../../utils/internal/logger.js';
|
|
11
11
|
export declare class PromptRegistry {
|
|
12
12
|
private promptDefs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isInputRequiredSignal } from '
|
|
1
|
+
import { isInputRequiredSignal } from '../inputRequired.js';
|
|
2
2
|
import { JsonRpcErrorCode, McpError } from '../../types-global/errors.js';
|
|
3
3
|
import { ErrorHandler } from '../../utils/internal/error-handler/errorHandler.js';
|
|
4
4
|
import { measurePromptGeneration } from '../../utils/internal/performance.js';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @module src/mcp-server/resources/resource-registration
|
|
4
4
|
*/
|
|
5
5
|
import { type McpServer, type ServerNotifier } from '@modelcontextprotocol/server';
|
|
6
|
-
import type { ResourceSubscriptions } from '
|
|
7
|
-
import type { AnyResourceDefinition } from '
|
|
8
|
-
import { type ResourceHandlerFactoryServices } from '
|
|
6
|
+
import type { ResourceSubscriptions } from '../notifications.js';
|
|
7
|
+
import type { AnyResourceDefinition } from './utils/resourceDefinition.js';
|
|
8
|
+
import { type ResourceHandlerFactoryServices } from './utils/resourceHandlerFactory.js';
|
|
9
9
|
export declare class ResourceRegistry {
|
|
10
10
|
private resourceDefs;
|
|
11
11
|
private services;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module src/mcp-server/resources/resource-registration
|
|
4
4
|
*/
|
|
5
5
|
import { ResourceTemplate, } from '@modelcontextprotocol/server';
|
|
6
|
-
import { createResourceHandler, } from '
|
|
6
|
+
import { createResourceHandler, } from './utils/resourceHandlerFactory.js';
|
|
7
7
|
import { JsonRpcErrorCode } from '../../types-global/errors.js';
|
|
8
8
|
import { ErrorHandler } from '../../utils/internal/error-handler/errorHandler.js';
|
|
9
9
|
import { logger } from '../../utils/internal/logger.js';
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @module src/mcp-server/resources/resourceSubscriptions
|
|
25
25
|
*/
|
|
26
26
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
27
|
-
import type { ResourceSubscriptions } from '
|
|
27
|
+
import type { ResourceSubscriptions } from '../notifications.js';
|
|
28
28
|
/**
|
|
29
29
|
* Read-only view of one connection's subscription set. The set is mutated only
|
|
30
30
|
* by the `resources/subscribe` / `resources/unsubscribe` handlers installed
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @module src/mcp-server/resources/utils/resourceHandlerFactory
|
|
5
5
|
*/
|
|
6
6
|
import type { InputRequiredResult, ReadResourceResult, ServerContext, ServerNotifier, Variables } from '@modelcontextprotocol/server';
|
|
7
|
-
import { type ResourceSubscriptions } from '
|
|
8
|
-
import type { AnyResourceDefinition } from '
|
|
7
|
+
import { type ResourceSubscriptions } from '../../notifications.js';
|
|
8
|
+
import type { AnyResourceDefinition } from './resourceDefinition.js';
|
|
9
9
|
import type { StorageService } from '../../../storage/core/StorageService.js';
|
|
10
10
|
import type { Logger } from '../../../utils/internal/logger.js';
|
|
11
11
|
/** Services required by the handler factory to construct Context. */
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { config } from '../../../config/index.js';
|
|
7
7
|
import { attachTypedFail, createContext } from '../../../core/context.js';
|
|
8
|
-
import { createContextInputs, createRequestInput, isInputRequiredSignal, } from '
|
|
9
|
-
import { selectNotifiers } from '
|
|
10
|
-
import { withRequiredScopes } from '
|
|
11
|
-
import { resolveSessionMode } from '
|
|
8
|
+
import { createContextInputs, createRequestInput, isInputRequiredSignal, } from '../../inputRequired.js';
|
|
9
|
+
import { selectNotifiers } from '../../notifications.js';
|
|
10
|
+
import { withRequiredScopes } from '../../transports/auth/lib/authUtils.js';
|
|
11
|
+
import { resolveSessionMode } from '../../types.js';
|
|
12
12
|
import { McpError } from '../../../types-global/errors.js';
|
|
13
13
|
import { ErrorHandler } from '../../../utils/internal/error-handler/errorHandler.js';
|
|
14
14
|
import { measureResourceExecution } from '../../../utils/internal/performance.js';
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { type Implementation, McpServer, type ServerNotifier } from '@modelcontextprotocol/server';
|
|
13
13
|
import type { AppConfig } from '../config/index.js';
|
|
14
|
-
import type { CacheHints } from '
|
|
15
|
-
import type { PromptRegistry } from '
|
|
16
|
-
import type { ResourceRegistry } from '
|
|
17
|
-
import type { ToolRegistry } from '
|
|
14
|
+
import type { CacheHints } from './cacheHints.js';
|
|
15
|
+
import type { PromptRegistry } from './prompts/prompt-registration.js';
|
|
16
|
+
import type { ResourceRegistry } from './resources/resource-registration.js';
|
|
17
|
+
import type { ToolRegistry } from './tools/tool-registration.js';
|
|
18
18
|
/** Dependencies required to create an MCP server instance. */
|
|
19
19
|
export interface McpServerDeps {
|
|
20
20
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @module src/mcp-server/server
|
|
11
11
|
*/
|
|
12
12
|
import { McpServer, } from '@modelcontextprotocol/server';
|
|
13
|
-
import { installResourceSubscriptions } from '
|
|
13
|
+
import { installResourceSubscriptions } from './resources/resourceSubscriptions.js';
|
|
14
14
|
import { logger } from '../utils/internal/logger.js';
|
|
15
15
|
import { requestContextService } from '../utils/internal/requestContext.js';
|
|
16
16
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @module src/mcp-server/tools/tool-registration
|
|
4
4
|
*/
|
|
5
5
|
import type { McpServer, ServerNotifier } from '@modelcontextprotocol/server';
|
|
6
|
-
import type { ResourceSubscriptions } from '
|
|
7
|
-
import type { AnyToolDefinition } from '
|
|
8
|
-
import { type HandlerFactoryServices } from '
|
|
6
|
+
import type { ResourceSubscriptions } from '../notifications.js';
|
|
7
|
+
import type { AnyToolDefinition } from './utils/toolDefinition.js';
|
|
8
|
+
import { type HandlerFactoryServices } from './utils/toolHandlerFactory.js';
|
|
9
9
|
/**
|
|
10
10
|
* Union of all accepted tool definition shapes.
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registration.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-registration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAgB,MAAM,8BAA8B,CAAC;AAE5F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-registration.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-registration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAgB,MAAM,8BAA8B,CAAC;AAE5F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAGL,KAAK,sBAAsB,EAE5B,MAAM,gDAAgD,CAAC;AAMxD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAE3C,qBAAa,YAAY;IAKrB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,QAAQ,CAAC;IALnB,oEAAoE;IACpE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqB;IAErD,YACU,QAAQ,EAAE,UAAU,EAAE,EACtB,QAAQ,CAAC,EAAE,sBAAsB,YAAA,EACvC;IAEJ,2EAA2E;IAC9D,WAAW,CACtB,MAAM,EAAE,SAAS,EACjB,aAAa,CAAC,EAAE,qBAAqB,EACrC,GAAG,CAAC,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CA8Cf;IAED,6EAA6E;IAC7E,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,mBAAmB;IAI3B;;;OAGG;YACW,YAAY;CAuD3B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { deferInputValidation } from './utils/deferredInputSchema.js';
|
|
2
|
+
import { getDisabledMetadata } from './utils/disabled-tool.js';
|
|
3
|
+
import { advertisedOutputSchema, createToolHandler, } from './utils/toolHandlerFactory.js';
|
|
3
4
|
import { JsonRpcErrorCode } from '../../types-global/errors.js';
|
|
4
5
|
import { ErrorHandler } from '../../utils/internal/error-handler/errorHandler.js';
|
|
5
6
|
import { logger } from '../../utils/internal/logger.js';
|
|
@@ -80,11 +81,16 @@ export class ToolRegistry {
|
|
|
80
81
|
}
|
|
81
82
|
const handler = createToolHandler(tool, this.services, notifiers);
|
|
82
83
|
const title = tool.title ?? tool.annotations?.title ?? this.deriveTitleFromName(tool.name);
|
|
84
|
+
// Advertised verbatim; the same schema rejects the same arguments one
|
|
85
|
+
// layer down, where a rejection can carry the framework's structured
|
|
86
|
+
// error envelope (#377). The SDK reads it through `~standard` like any
|
|
87
|
+
// other Standard Schema, but types the parameter as Zod.
|
|
88
|
+
const inputSchema = deferInputValidation(tool.input);
|
|
83
89
|
// Type assertion required: SDK's conditional types don't resolve with erased generics
|
|
84
90
|
server.registerTool(tool.name, {
|
|
85
91
|
title,
|
|
86
92
|
description: tool.description,
|
|
87
|
-
inputSchema
|
|
93
|
+
inputSchema,
|
|
88
94
|
outputSchema: advertisedOutputSchema(tool),
|
|
89
95
|
...(tool.annotations && { annotations: tool.annotations }),
|
|
90
96
|
...(tool._meta && { _meta: tool._meta }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registration.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-registration.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,GAGlB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAU3E,MAAM,OAAO,YAAY;IAKb,QAAQ;IACR,QAAQ;IALlB,oEAAoE;IACnD,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IAErD,YACU,QAAsB,EACtB,QAAiC;wBADjC,QAAQ;wBACR,QAAQ;IACf,CAAC;IAEJ,2EAA2E;IACpE,KAAK,CAAC,WAAW,CACtB,MAAiB,EACjB,aAAqC,EACrC,GAAoB;QAEpB,sEAAsE;QACtE,sDAAsD;QACtD,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;QAE7B,4EAA4E;QAC5E,0EAA0E;QA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,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE3F,sFAAsF;YACtF,MAAM,CAAC,YAAY,CACjB,IAAI,CAAC,IAAI,EACT;gBACE,KAAK;gBACL,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW
|
|
1
|
+
{"version":3,"file":"tool-registration.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-registration.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,GAGlB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAU3E,MAAM,OAAO,YAAY;IAKb,QAAQ;IACR,QAAQ;IALlB,oEAAoE;IACnD,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IAErD,YACU,QAAsB,EACtB,QAAiC;wBADjC,QAAQ;wBACR,QAAQ;IACf,CAAC;IAEJ,2EAA2E;IACpE,KAAK,CAAC,WAAW,CACtB,MAAiB,EACjB,aAAqC,EACrC,GAAoB;QAEpB,sEAAsE;QACtE,sDAAsD;QACtD,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;QAE7B,4EAA4E;QAC5E,0EAA0E;QAC1E,yEAAyE;QACzE,mEAAmE;QACnE,MAAM,SAAS,GAAqB;YAClC,uBAAuB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,qBAAqB,EAAE;YAC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I,CAAC,CAAC;YAE3F,sEAAsE;YACtE,qEAAqE;YACrE,uEAAuE;YACvE,yDAAyD;YACzD,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAiC,CAAC;YAErF,sFAAsF;YACtF,MAAM,CAAC,YAAY,CACjB,IAAI,CAAC,IAAI,EACT;gBACE,KAAK;gBACL,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW;gBACX,YAAY,EAAE,sBAAsB,CAAC,IAAI,CAAC;gBAC1C,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC1D,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;aACzC,EACD,OAA0C,CAC3C,CAAC;YAEF,MAAM,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,4BAA4B,EAAE,mBAAmB,CAAC,CAAC;QACpF,CAAC,EACD;YACE,SAAS,EAAE,mBAAmB,IAAI,CAAC,IAAI,EAAE;YACzC,OAAO,EAAE,mBAAmB;YAC5B,SAAS,EAAE,gBAAgB,CAAC,oBAAoB;YAChD,QAAQ,EAAE,IAAI;SACf,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Advertise a tool's input schema to the SDK while keeping
|
|
3
|
+
* argument rejection inside the framework (issue #377).
|
|
4
|
+
*
|
|
5
|
+
* SDK 2.0.0 rejects invalid `tools/call` arguments before the handler runs,
|
|
6
|
+
* returning `{ content: [text], isError: true }` without `structuredContent.error`.
|
|
7
|
+
* It exposes no per-tool validation hook, but uses `~standard` for both schema
|
|
8
|
+
* advertising and validation.
|
|
9
|
+
*
|
|
10
|
+
* Preserve Zod's JSON Schema converters verbatim, including strict root keys
|
|
11
|
+
* and `x-mcp-header` designations. Pass validation through to the framework
|
|
12
|
+
* handler, which parses against the same schema and emits the structured error
|
|
13
|
+
* envelope. The advertised schema and accepted arguments remain unchanged.
|
|
14
|
+
*
|
|
15
|
+
* @module src/mcp-server/tools/utils/deferredInputSchema
|
|
16
|
+
*/
|
|
17
|
+
import type { ToolInputSchema } from './toolDefinition.js';
|
|
18
|
+
/**
|
|
19
|
+
* The `~standard` surface the SDK consumes from a registered input schema:
|
|
20
|
+
* `jsonSchema[io]()` for advertising, `validate()` for `tools/call`.
|
|
21
|
+
*/
|
|
22
|
+
export interface DeferredInputSchema {
|
|
23
|
+
'~standard': {
|
|
24
|
+
jsonSchema: ToolInputSchema['~standard']['jsonSchema'];
|
|
25
|
+
validate: (value: unknown) => {
|
|
26
|
+
value: unknown;
|
|
27
|
+
};
|
|
28
|
+
vendor: string;
|
|
29
|
+
version: 1;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Wraps a tool's input schema for `server.registerTool()`. The JSON Schema
|
|
34
|
+
* projection delegates to the source schema, so what `tools/list` advertises is
|
|
35
|
+
* unchanged; `validate` passes arguments through untouched, leaving rejection
|
|
36
|
+
* to the framework handler that parses them against the same schema.
|
|
37
|
+
*/
|
|
38
|
+
export declare function deferInputValidation(input: ToolInputSchema): DeferredInputSchema;
|
|
39
|
+
//# sourceMappingURL=deferredInputSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferredInputSchema.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/deferredInputSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE;QACX,UAAU,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QACvD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK;YAAE,KAAK,EAAE,OAAO,CAAA;SAAE,CAAC;QACjD,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC;KACZ,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,mBAAmB,CAShF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Advertise a tool's input schema to the SDK while keeping
|
|
3
|
+
* argument rejection inside the framework (issue #377).
|
|
4
|
+
*
|
|
5
|
+
* SDK 2.0.0 rejects invalid `tools/call` arguments before the handler runs,
|
|
6
|
+
* returning `{ content: [text], isError: true }` without `structuredContent.error`.
|
|
7
|
+
* It exposes no per-tool validation hook, but uses `~standard` for both schema
|
|
8
|
+
* advertising and validation.
|
|
9
|
+
*
|
|
10
|
+
* Preserve Zod's JSON Schema converters verbatim, including strict root keys
|
|
11
|
+
* and `x-mcp-header` designations. Pass validation through to the framework
|
|
12
|
+
* handler, which parses against the same schema and emits the structured error
|
|
13
|
+
* envelope. The advertised schema and accepted arguments remain unchanged.
|
|
14
|
+
*
|
|
15
|
+
* @module src/mcp-server/tools/utils/deferredInputSchema
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Wraps a tool's input schema for `server.registerTool()`. The JSON Schema
|
|
19
|
+
* projection delegates to the source schema, so what `tools/list` advertises is
|
|
20
|
+
* unchanged; `validate` passes arguments through untouched, leaving rejection
|
|
21
|
+
* to the framework handler that parses them against the same schema.
|
|
22
|
+
*/
|
|
23
|
+
export function deferInputValidation(input) {
|
|
24
|
+
return {
|
|
25
|
+
'~standard': {
|
|
26
|
+
jsonSchema: input['~standard'].jsonSchema,
|
|
27
|
+
validate: (value) => ({ value }),
|
|
28
|
+
vendor: 'mcp-ts-core',
|
|
29
|
+
version: 1,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=deferredInputSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferredInputSchema.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/deferredInputSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAiBH;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAsB;IACzD,OAAO;QACL,WAAW,EAAE;YACX,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,UAAU;YACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;YAChC,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,CAAC;SACX;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*
|
|
24
24
|
* @module src/mcp-server/tools/utils/disabled-tool
|
|
25
25
|
*/
|
|
26
|
-
import type { AnyToolDef } from '
|
|
26
|
+
import type { AnyToolDef } from '../tool-registration.js';
|
|
27
27
|
/**
|
|
28
28
|
* Operator-facing metadata describing why a tool is disabled in the current
|
|
29
29
|
* deployment and (optionally) how to enable it.
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* @module src/mcp-server/tools/utils/toolHandlerFactory
|
|
5
5
|
*/
|
|
6
6
|
import type { CallToolResult, ContentBlock, InputRequiredResult, ServerContext, ServerNotifier } from '@modelcontextprotocol/server';
|
|
7
|
-
import { type ZodObject, type ZodRawShape } from 'zod';
|
|
7
|
+
import { ZodError, type ZodObject, type ZodRawShape } from 'zod';
|
|
8
8
|
import type { Context } from '../../../core/context.js';
|
|
9
|
-
import { type ResourceSubscriptions } from '
|
|
9
|
+
import { type ResourceSubscriptions } from '../../notifications.js';
|
|
10
10
|
import type { StorageService } from '../../../storage/core/StorageService.js';
|
|
11
|
-
import {
|
|
11
|
+
import { JsonRpcErrorCode } from '../../../types-global/errors.js';
|
|
12
12
|
import type { Logger } from '../../../utils/internal/logger.js';
|
|
13
13
|
import type { AnyToolDefinition } from './toolDefinition.js';
|
|
14
14
|
/** Services required by the handler factory to construct Context. */
|
|
@@ -67,6 +67,14 @@ export interface HandlerNotifiers {
|
|
|
67
67
|
* path's `structuredContent` surface.
|
|
68
68
|
*/
|
|
69
69
|
export declare function buildToolErrorResult(code: JsonRpcErrorCode, message: string, data: Record<string, unknown> | undefined): CallToolResult;
|
|
70
|
+
/**
|
|
71
|
+
* Renders an argument-validation failure the way the MCP SDK renders its own,
|
|
72
|
+
* so the readable diagnostic — the offending key or field, and why it failed —
|
|
73
|
+
* is unchanged for clients that read `content[]` text. The framework owns this
|
|
74
|
+
* rejection (see `deferInputValidation`) purely so it can also carry
|
|
75
|
+
* `structuredContent.error`.
|
|
76
|
+
*/
|
|
77
|
+
export declare function formatInputValidationMessage(toolName: string, error: ZodError): string;
|
|
70
78
|
/**
|
|
71
79
|
* Builds an error `CallToolResult` from a raw thrown value. Classifies via
|
|
72
80
|
* {@link ErrorHandler.classifyOnly} when the value isn't already an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolHandlerFactory.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/toolHandlerFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,
|
|
1
|
+
{"version":3,"file":"toolHandlerFactory.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/utils/toolHandlerFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAmB,MAAM,KAAK,CAAC;AAGlF,OAAO,KAAK,EAAE,OAAO,EAAmB,MA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