@cyanheads/mcp-ts-core 0.11.5 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +27 -23
- package/CLAUDE.md +27 -23
- package/README.md +10 -10
- package/biome.json +1 -1
- package/changelog/0.12.x/0.12.0.md +96 -0
- package/dist/cli/init.js +1 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/config/index.d.ts +0 -18
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +0 -25
- package/dist/config/index.js.map +1 -1
- package/dist/core/app.d.ts +5 -7
- package/dist/core/app.d.ts.map +1 -1
- package/dist/core/app.js +18 -27
- package/dist/core/app.js.map +1 -1
- package/dist/core/context.d.ts +90 -57
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +32 -33
- package/dist/core/context.js.map +1 -1
- package/dist/core/gcPressure.d.ts.map +1 -1
- package/dist/core/gcPressure.js +3 -4
- package/dist/core/gcPressure.js.map +1 -1
- package/dist/core/index.d.ts +6 -7
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +10 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/serverManifest.d.ts +1 -3
- package/dist/core/serverManifest.d.ts.map +1 -1
- package/dist/core/serverManifest.js +9 -4
- package/dist/core/serverManifest.js.map +1 -1
- package/dist/core/worker.d.ts.map +1 -1
- package/dist/core/worker.js +32 -35
- package/dist/core/worker.js.map +1 -1
- package/dist/logs/combined.log +10 -22
- package/dist/logs/error.log +6 -18
- package/dist/mcp-server/inputRequired.d.ts +52 -0
- package/dist/mcp-server/inputRequired.d.ts.map +1 -0
- package/dist/mcp-server/inputRequired.js +76 -0
- package/dist/mcp-server/inputRequired.js.map +1 -0
- package/dist/mcp-server/notifications.d.ts +33 -31
- package/dist/mcp-server/notifications.d.ts.map +1 -1
- package/dist/mcp-server/notifications.js +34 -26
- package/dist/mcp-server/notifications.js.map +1 -1
- package/dist/mcp-server/prompts/prompt-registration.d.ts +2 -2
- package/dist/mcp-server/prompts/prompt-registration.d.ts.map +1 -1
- package/dist/mcp-server/prompts/prompt-registration.js +15 -5
- package/dist/mcp-server/prompts/prompt-registration.js.map +1 -1
- package/dist/mcp-server/prompts/utils/promptDefinition.d.ts +1 -1
- package/dist/mcp-server/prompts/utils/promptDefinition.d.ts.map +1 -1
- package/dist/mcp-server/resources/resource-registration.d.ts +3 -3
- package/dist/mcp-server/resources/resource-registration.d.ts.map +1 -1
- package/dist/mcp-server/resources/resource-registration.js +8 -15
- package/dist/mcp-server/resources/resource-registration.js.map +1 -1
- package/dist/mcp-server/resources/resourceSubscriptions.d.ts +45 -0
- package/dist/mcp-server/resources/resourceSubscriptions.d.ts.map +1 -0
- package/dist/mcp-server/resources/resourceSubscriptions.js +51 -0
- package/dist/mcp-server/resources/resourceSubscriptions.js.map +1 -0
- package/dist/mcp-server/resources/utils/resourceDefinition.d.ts +3 -5
- package/dist/mcp-server/resources/utils/resourceDefinition.d.ts.map +1 -1
- package/dist/mcp-server/resources/utils/resourceDefinition.js +1 -1
- package/dist/mcp-server/resources/utils/resourceDefinition.js.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts +8 -15
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +21 -22
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
- package/dist/mcp-server/server.d.ts +12 -21
- package/dist/mcp-server/server.d.ts.map +1 -1
- package/dist/mcp-server/server.js +38 -28
- package/dist/mcp-server/server.js.map +1 -1
- package/dist/mcp-server/tools/tool-registration.d.ts +11 -33
- package/dist/mcp-server/tools/tool-registration.d.ts.map +1 -1
- package/dist/mcp-server/tools/tool-registration.js +17 -243
- package/dist/mcp-server/tools/tool-registration.js.map +1 -1
- package/dist/mcp-server/tools/utils/toolDefinition.d.ts +1 -3
- package/dist/mcp-server/tools/utils/toolDefinition.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolDefinition.js +48 -1
- package/dist/mcp-server/tools/utils/toolDefinition.js.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +46 -20
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js +131 -25
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
- package/dist/mcp-server/transports/ITransport.d.ts +2 -2
- package/dist/mcp-server/transports/ITransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/authFactory.js +1 -1
- package/dist/mcp-server/transports/auth/authFactory.js.map +1 -1
- package/dist/mcp-server/transports/auth/lib/authTypes.d.ts +1 -1
- package/dist/mcp-server/transports/auth/lib/authTypes.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/lib/authUtils.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/lib/authUtils.js +5 -13
- package/dist/mcp-server/transports/auth/lib/authUtils.js.map +1 -1
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js +5 -11
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js.map +1 -1
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js +9 -22
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js.map +1 -1
- package/dist/mcp-server/transports/heartbeat.d.ts.map +1 -1
- package/dist/mcp-server/transports/heartbeat.js +4 -8
- package/dist/mcp-server/transports/heartbeat.js.map +1 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpErrorHandler.js +6 -24
- package/dist/mcp-server/transports/http/httpErrorHandler.js.map +1 -1
- package/dist/mcp-server/transports/http/httpServer.d.ts +3 -3
- package/dist/mcp-server/transports/http/httpServer.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpServer.js +15 -32
- package/dist/mcp-server/transports/http/httpServer.js.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.d.ts +25 -8
- package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.js +156 -373
- package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
- package/dist/mcp-server/transports/http/landing-page/assets/styles.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/landing-page/assets/styles.js +0 -1
- package/dist/mcp-server/transports/http/landing-page/assets/styles.js.map +1 -1
- package/dist/mcp-server/transports/http/landing-page/handler.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/landing-page/handler.js +4 -8
- package/dist/mcp-server/transports/http/landing-page/handler.js.map +1 -1
- package/dist/mcp-server/transports/http/landing-page/sections/tools.js +0 -2
- package/dist/mcp-server/transports/http/landing-page/sections/tools.js.map +1 -1
- package/dist/mcp-server/transports/http/protectedResourceMetadata.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/protectedResourceMetadata.js +2 -6
- package/dist/mcp-server/transports/http/protectedResourceMetadata.js.map +1 -1
- package/dist/mcp-server/transports/http/robotsTxt.js +2 -2
- package/dist/mcp-server/transports/http/robotsTxt.js.map +1 -1
- package/dist/mcp-server/transports/http/serverCard.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/serverCard.js +2 -6
- package/dist/mcp-server/transports/http/serverCard.js.map +1 -1
- package/dist/mcp-server/transports/http/sessionStore.d.ts +46 -66
- package/dist/mcp-server/transports/http/sessionStore.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/sessionStore.js +140 -238
- package/dist/mcp-server/transports/http/sessionStore.js.map +1 -1
- package/dist/mcp-server/transports/manager.d.ts +12 -4
- package/dist/mcp-server/transports/manager.d.ts.map +1 -1
- package/dist/mcp-server/transports/manager.js +35 -33
- package/dist/mcp-server/transports/manager.js.map +1 -1
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts +24 -31
- package/dist/mcp-server/transports/stdio/stdioTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/stdio/stdioTransport.js +23 -38
- package/dist/mcp-server/transports/stdio/stdioTransport.js.map +1 -1
- package/dist/mcp-server/types.d.ts +25 -0
- package/dist/mcp-server/types.d.ts.map +1 -0
- package/dist/mcp-server/types.js +10 -0
- package/dist/mcp-server/types.js.map +1 -0
- package/dist/services/canvas/core/CanvasInstance.d.ts +2 -2
- package/dist/services/canvas/core/CanvasInstance.d.ts.map +1 -1
- package/dist/services/canvas/core/CanvasInstance.js.map +1 -1
- package/dist/services/canvas/core/CanvasRegistry.d.ts +4 -4
- package/dist/services/canvas/core/CanvasRegistry.d.ts.map +1 -1
- package/dist/services/canvas/core/CanvasRegistry.js +8 -18
- package/dist/services/canvas/core/CanvasRegistry.js.map +1 -1
- package/dist/services/canvas/core/DataCanvas.d.ts +5 -5
- package/dist/services/canvas/core/DataCanvas.d.ts.map +1 -1
- package/dist/services/canvas/core/DataCanvas.js +2 -3
- package/dist/services/canvas/core/DataCanvas.js.map +1 -1
- package/dist/services/canvas/core/IDataCanvasProvider.d.ts +11 -11
- package/dist/services/canvas/core/IDataCanvasProvider.d.ts.map +1 -1
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts +11 -11
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts.map +1 -1
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.js +4 -10
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.js.map +1 -1
- package/dist/services/llm/providers/openrouter.provider.d.ts.map +1 -1
- package/dist/services/llm/providers/openrouter.provider.js +2 -5
- package/dist/services/llm/providers/openrouter.provider.js.map +1 -1
- package/dist/services/mirror/core/defineMirror.js +1 -1
- package/dist/services/mirror/core/defineMirror.js.map +1 -1
- package/dist/services/mirror/types.d.ts +5 -5
- package/dist/services/mirror/types.d.ts.map +1 -1
- package/dist/services/speech/providers/elevenlabs.provider.js +1 -1
- package/dist/services/speech/providers/elevenlabs.provider.js.map +1 -1
- package/dist/services/speech/providers/whisper.provider.js +1 -1
- 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.d.ts.map +1 -1
- package/dist/storage/core/StorageService.js +12 -20
- package/dist/storage/core/StorageService.js.map +1 -1
- package/dist/storage/core/storageFactory.d.ts.map +1 -1
- package/dist/storage/core/storageFactory.js.map +1 -1
- package/dist/storage/core/storageValidation.d.ts +1 -1
- package/dist/storage/core/storageValidation.d.ts.map +1 -1
- package/dist/storage/core/storageValidation.js +2 -2
- 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.d.ts.map +1 -1
- package/dist/storage/providers/cloudflare/d1Provider.js +4 -12
- package/dist/storage/providers/cloudflare/d1Provider.js.map +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.d.ts +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.d.ts.map +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.js +3 -8
- package/dist/storage/providers/cloudflare/kvProvider.js.map +1 -1
- package/dist/storage/providers/cloudflare/r2Provider.d.ts +1 -1
- package/dist/storage/providers/cloudflare/r2Provider.d.ts.map +1 -1
- package/dist/storage/providers/cloudflare/r2Provider.js +3 -8
- package/dist/storage/providers/cloudflare/r2Provider.js.map +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.d.ts +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.d.ts.map +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.js +2 -4
- package/dist/storage/providers/inMemory/inMemoryProvider.js.map +1 -1
- package/dist/testing/index.d.ts +35 -12
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +53 -38
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/vitest.d.ts +1 -1
- package/dist/testing/vitest.d.ts.map +1 -1
- package/dist/types-global/errors.d.ts +28 -15
- package/dist/types-global/errors.d.ts.map +1 -1
- package/dist/types-global/errors.js +8 -1
- package/dist/types-global/errors.js.map +1 -1
- package/dist/utils/formatting/diffFormatter.d.ts +5 -5
- package/dist/utils/formatting/diffFormatter.d.ts.map +1 -1
- package/dist/utils/formatting/diffFormatter.js +7 -20
- package/dist/utils/formatting/diffFormatter.js.map +1 -1
- package/dist/utils/formatting/tableFormatter.d.ts +3 -3
- package/dist/utils/formatting/tableFormatter.d.ts.map +1 -1
- package/dist/utils/formatting/tableFormatter.js +6 -17
- package/dist/utils/formatting/tableFormatter.js.map +1 -1
- package/dist/utils/formatting/treeFormatter.d.ts +3 -3
- package/dist/utils/formatting/treeFormatter.d.ts.map +1 -1
- package/dist/utils/formatting/treeFormatter.js +5 -18
- package/dist/utils/formatting/treeFormatter.js.map +1 -1
- package/dist/utils/index.d.ts +4 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.d.ts +1 -1
- package/dist/utils/internal/error-handler/errorHandler.d.ts.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.js +23 -11
- package/dist/utils/internal/error-handler/errorHandler.js.map +1 -1
- package/dist/utils/internal/error-handler/types.d.ts +10 -13
- package/dist/utils/internal/error-handler/types.d.ts.map +1 -1
- package/dist/utils/internal/logger.d.ts +3 -3
- package/dist/utils/internal/logger.d.ts.map +1 -1
- package/dist/utils/internal/logger.js +11 -5
- package/dist/utils/internal/logger.js.map +1 -1
- package/dist/utils/internal/performance.d.ts +1 -1
- package/dist/utils/internal/performance.d.ts.map +1 -1
- package/dist/utils/internal/performance.js +57 -13
- package/dist/utils/internal/performance.js.map +1 -1
- package/dist/utils/internal/requestContext.d.ts +79 -55
- package/dist/utils/internal/requestContext.d.ts.map +1 -1
- package/dist/utils/internal/requestContext.js +77 -32
- package/dist/utils/internal/requestContext.js.map +1 -1
- package/dist/utils/metrics/tokenCounter.d.ts +3 -3
- package/dist/utils/metrics/tokenCounter.d.ts.map +1 -1
- package/dist/utils/metrics/tokenCounter.js.map +1 -1
- package/dist/utils/network/fetchWithTimeout.d.ts +2 -2
- package/dist/utils/network/fetchWithTimeout.d.ts.map +1 -1
- package/dist/utils/network/fetchWithTimeout.js +8 -24
- package/dist/utils/network/fetchWithTimeout.js.map +1 -1
- package/dist/utils/network/retry.d.ts +2 -2
- package/dist/utils/network/retry.d.ts.map +1 -1
- package/dist/utils/overflow/outlineOnOverflow.d.ts +1 -1
- package/dist/utils/overflow/outlineOnOverflow.d.ts.map +1 -1
- package/dist/utils/pagination/pagination.d.ts +3 -3
- package/dist/utils/pagination/pagination.d.ts.map +1 -1
- package/dist/utils/pagination/pagination.js +3 -3
- package/dist/utils/pagination/pagination.js.map +1 -1
- package/dist/utils/parsing/csvParser.d.ts +2 -2
- package/dist/utils/parsing/csvParser.d.ts.map +1 -1
- package/dist/utils/parsing/csvParser.js +4 -8
- package/dist/utils/parsing/csvParser.js.map +1 -1
- package/dist/utils/parsing/dateParser.d.ts +3 -3
- package/dist/utils/parsing/dateParser.d.ts.map +1 -1
- package/dist/utils/parsing/dateParser.js +3 -2
- package/dist/utils/parsing/dateParser.js.map +1 -1
- package/dist/utils/parsing/frontmatterParser.d.ts +2 -2
- package/dist/utils/parsing/frontmatterParser.d.ts.map +1 -1
- package/dist/utils/parsing/frontmatterParser.js +7 -10
- package/dist/utils/parsing/frontmatterParser.js.map +1 -1
- package/dist/utils/parsing/htmlExtractor.d.ts +2 -2
- package/dist/utils/parsing/htmlExtractor.d.ts.map +1 -1
- package/dist/utils/parsing/htmlExtractor.js +6 -11
- package/dist/utils/parsing/htmlExtractor.js.map +1 -1
- package/dist/utils/parsing/jsonParser.d.ts +2 -2
- package/dist/utils/parsing/jsonParser.d.ts.map +1 -1
- package/dist/utils/parsing/jsonParser.js +4 -8
- package/dist/utils/parsing/jsonParser.js.map +1 -1
- package/dist/utils/parsing/pdfParser.d.ts +10 -10
- package/dist/utils/parsing/pdfParser.d.ts.map +1 -1
- package/dist/utils/parsing/pdfParser.js +26 -89
- package/dist/utils/parsing/pdfParser.js.map +1 -1
- package/dist/utils/parsing/xmlParser.d.ts +2 -2
- package/dist/utils/parsing/xmlParser.d.ts.map +1 -1
- package/dist/utils/parsing/xmlParser.js +4 -8
- package/dist/utils/parsing/xmlParser.js.map +1 -1
- package/dist/utils/parsing/yamlParser.d.ts +2 -2
- package/dist/utils/parsing/yamlParser.d.ts.map +1 -1
- package/dist/utils/parsing/yamlParser.js +4 -8
- package/dist/utils/parsing/yamlParser.js.map +1 -1
- package/dist/utils/scheduling/scheduler.d.ts.map +1 -1
- package/dist/utils/scheduling/scheduler.js +5 -6
- package/dist/utils/scheduling/scheduler.js.map +1 -1
- package/dist/utils/security/rateLimiter.d.ts +2 -2
- package/dist/utils/security/rateLimiter.d.ts.map +1 -1
- package/dist/utils/security/rateLimiter.js +1 -1
- package/dist/utils/security/rateLimiter.js.map +1 -1
- package/dist/utils/telemetry/attributes.d.ts +23 -7
- package/dist/utils/telemetry/attributes.d.ts.map +1 -1
- package/dist/utils/telemetry/attributes.js +23 -10
- package/dist/utils/telemetry/attributes.js.map +1 -1
- package/dist/utils/telemetry/trace.d.ts +3 -3
- package/dist/utils/telemetry/trace.d.ts.map +1 -1
- package/dist/utils/telemetry/trace.js +4 -2
- package/dist/utils/telemetry/trace.js.map +1 -1
- package/package.json +22 -26
- package/scripts/lint-mcp.ts +1 -3
- package/scripts/lint-packaging.ts +1 -1
- package/skills/add-service/SKILL.md +2 -2
- package/skills/add-test/SKILL.md +42 -20
- package/skills/add-tool/SKILL.md +68 -19
- package/skills/api-config/SKILL.md +1 -11
- package/skills/api-context/SKILL.md +175 -111
- package/skills/api-linter/SKILL.md +2 -2
- package/skills/api-telemetry/SKILL.md +8 -12
- package/skills/api-testing/SKILL.md +53 -52
- package/skills/code-simplifier/SKILL.md +2 -2
- package/skills/design-mcp-server/SKILL.md +31 -17
- package/skills/field-test/SKILL.md +4 -2
- package/skills/polish-docs-meta/SKILL.md +1 -1
- package/skills/polish-docs-meta/references/agent-protocol.md +2 -2
- package/skills/polish-docs-meta/references/readme.md +1 -1
- package/skills/release-and-publish/SKILL.md +3 -1
- package/skills/report-issue-framework/SKILL.md +2 -2
- package/skills/report-issue-local/SKILL.md +2 -2
- package/skills/security-pass/SKILL.md +16 -14
- package/templates/AGENTS.md +6 -6
- package/templates/CLAUDE.md +6 -6
- package/templates/tests/resources/echo.resource.test.ts +16 -9
- package/dist/mcp-server/elicitation.d.ts +0 -64
- package/dist/mcp-server/elicitation.d.ts.map +0 -1
- package/dist/mcp-server/elicitation.js +0 -81
- package/dist/mcp-server/elicitation.js.map +0 -1
- package/dist/mcp-server/protocolSession.d.ts +0 -34
- package/dist/mcp-server/protocolSession.d.ts.map +0 -1
- package/dist/mcp-server/protocolSession.js +0 -13
- package/dist/mcp-server/protocolSession.js.map +0 -1
- package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.d.ts +0 -53
- package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.d.ts.map +0 -1
- package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.js +0 -65
- package/dist/mcp-server/tasks/core/evictingTaskMessageQueue.js.map +0 -1
- package/dist/mcp-server/tasks/core/sessionAwareTaskStore.d.ts +0 -70
- package/dist/mcp-server/tasks/core/sessionAwareTaskStore.d.ts.map +0 -1
- package/dist/mcp-server/tasks/core/sessionAwareTaskStore.js +0 -130
- package/dist/mcp-server/tasks/core/sessionAwareTaskStore.js.map +0 -1
- package/dist/mcp-server/tasks/core/storageBackedTaskStore.d.ts +0 -109
- package/dist/mcp-server/tasks/core/storageBackedTaskStore.d.ts.map +0 -1
- package/dist/mcp-server/tasks/core/storageBackedTaskStore.js +0 -209
- package/dist/mcp-server/tasks/core/storageBackedTaskStore.js.map +0 -1
- package/dist/mcp-server/tasks/core/taskManager.d.ts +0 -91
- package/dist/mcp-server/tasks/core/taskManager.d.ts.map +0 -1
- package/dist/mcp-server/tasks/core/taskManager.js +0 -210
- package/dist/mcp-server/tasks/core/taskManager.js.map +0 -1
- package/dist/mcp-server/tasks/core/taskTypes.d.ts +0 -18
- package/dist/mcp-server/tasks/core/taskTypes.d.ts.map +0 -1
- package/dist/mcp-server/tasks/core/taskTypes.js +0 -20
- package/dist/mcp-server/tasks/core/taskTypes.js.map +0 -1
- package/dist/mcp-server/tasks/utils/taskToolDefinition.d.ts +0 -101
- package/dist/mcp-server/tasks/utils/taskToolDefinition.d.ts.map +0 -1
- package/dist/mcp-server/tasks/utils/taskToolDefinition.js +0 -14
- package/dist/mcp-server/tasks/utils/taskToolDefinition.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Package:** `@cyanheads/mcp-ts-core`
|
|
4
|
-
**Version:** 0.
|
|
4
|
+
**Version:** 0.12.0
|
|
5
5
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
6
|
-
**MCP SDK:** `@modelcontextprotocol/
|
|
6
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0 (protocol revisions 2026-07-28 and 2025-*)
|
|
7
7
|
**Zod:** ^4.4.3
|
|
8
8
|
**GitHub:** [cyanheads/mcp-ts-core](https://github.com/cyanheads/mcp-ts-core)
|
|
9
9
|
**npm:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
@@ -30,12 +30,12 @@ Both paths share the same public API. Init copies starter `package.json`, config
|
|
|
30
30
|
|
|
31
31
|
- **Logic throws, framework catches.** Pure, stateless `handler` functions, no `try/catch`. Plain `Error` works — framework catches, classifies, formats. Use `McpError(code, message, data, options?)` only when you need a specific JSON-RPC code or structured data; 4th arg `{ cause }` chains.
|
|
32
32
|
- **Full-stack observability.** The framework automatically instruments every tool/resource call — OTel span, duration/payload/memory metrics, structured completion log. Use `ctx.log` for additional domain-specific logging within handlers (external API calls, multi-step operations, business events). `requestId`, `traceId`, `tenantId` auto-correlated. No `console` calls.
|
|
33
|
-
- **Unified Context.** Handlers receive `ctx` with logging (`ctx.log`), tenant-scoped storage (`ctx.state`),
|
|
33
|
+
- **Unified Context.** Handlers receive `ctx` with logging (`ctx.log`), tenant-scoped storage (`ctx.state`), multi-round-trip input (`ctx.requestInput` / `ctx.inputs`), and cancellation (`ctx.signal`). `Context extends RequestContext`, so `ctx` goes straight into any service, storage, or logger call.
|
|
34
34
|
- **Decoupled storage.** `ctx.state` for tenant-scoped KV. Never access persistence backends directly.
|
|
35
35
|
- **Canvas tokens are capabilities, not tenant-scoped state.** A `canvasId` is a 10-char URL-safe token; possession grants full read/write/drop. Shareable between agents and across users in single-tenant deployments. Tools accept token in `input` (omit to create fresh) and return in `output`; collaboration is opt-in via token exchange.
|
|
36
36
|
- **Runtime parity.** All features work across `stdio`/`http`/Worker. Guard non-portable deps via `runtimeCaps` from `/utils` (`isNode`, `isBun`, `isWorkerLike`, `hasBuffer`, `hasProcess`, etc.). Prefer runtime-agnostic abstractions (Hono, Fetch APIs).
|
|
37
37
|
- **Definition linting is build-time only.** Run `bun run lint:mcp` (standalone) or `bun run devcheck` (gate). Not invoked at server startup — new lint rules are additive and never break deployed servers. Every diagnostic links to the rule reference in `api-linter` skill; see that skill for the full rule catalog.
|
|
38
|
-
- **
|
|
38
|
+
- **Ask for missing input by returning, not awaiting.** `return ctx.requestInput({ inputRequests: … })` suspends the handler; it is re-entered with `ctx.inputs` populated. One handler serves both protocol eras.
|
|
39
39
|
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
|
|
40
40
|
|
|
41
41
|
---
|
|
@@ -49,7 +49,6 @@ Both paths share the same public API. Init copies starter `package.json`, config
|
|
|
49
49
|
| `/tools` | `ToolDefinition`, `AnyToolDefinition`, `ToolAnnotations` | Tool definition types |
|
|
50
50
|
| `/resources` | `ResourceDefinition`, `AnyResourceDefinition` | Resource definition types |
|
|
51
51
|
| `/prompts` | `PromptDefinition` | Prompt definition type |
|
|
52
|
-
| `/tasks` | `TaskToolDefinition`, `isTaskToolDefinition` | Task tool escape hatch |
|
|
53
52
|
| `/errors` | `McpError`, `JsonRpcErrorCode`, `notFound`, `validationError`, `unauthorized`, ... | Error types, codes, and factory functions |
|
|
54
53
|
| `/config` | `AppConfig`, `config`, `parseConfig`, `parseEnvConfig`, `resetConfig`, `ConfigSchema`, `FRAMEWORK_NAME`, `FRAMEWORK_VERSION` | Zod-validated config, framework identity, env-var helper |
|
|
55
54
|
| `/auth` | `checkScopes` | Dynamic scope checking |
|
|
@@ -242,7 +241,9 @@ export const myTool = tool('my_tool', {
|
|
|
242
241
|
|
|
243
242
|
**`enrichment`** (optional): The success-path counterpart to `errors[]` — a `ZodRawShape` of agent-facing context (empty-result notices, query/filter echo, pagination totals, truncation disclosure) that must reach both client surfaces. Populate via `ctx.enrich(...)` (or `ctx.enrich.notice()` / `.total()` / `.echo()` / `.truncated()`) in the handler or service layer. The framework merges it into `structuredContent`, advertises `output.extend(enrichment)` as `outputSchema`, and mirrors it into a `content[]` trailer — so it reaches `structuredContent`-only and `content[]`-only clients alike, with no `format()` entry. Keys must be disjoint from `output`; a required field never populated fails the effective-output parse. See `api-context`'s `ctx.enrich`.
|
|
244
243
|
|
|
245
|
-
**
|
|
244
|
+
**Strict input:** `tool()` stores `input.strict()`, so an unrecognized argument key is rejected by name before the handler runs and `inputSchema` advertises `additionalProperties: false`. Root-level only — a nested `z.object()` still strips unless it is strict itself. An explicit `.passthrough()` / `.catchall()` is honored.
|
|
245
|
+
|
|
246
|
+
**Advertised vs. parsed output:** `tools/list` advertises a widened schema (success fields optional, `error` declared) so an error envelope validates in strict clients; the framework still parses success results against the strict `output` (+ `enrichment`).
|
|
246
247
|
|
|
247
248
|
---
|
|
248
249
|
|
|
@@ -284,13 +285,13 @@ interface Context {
|
|
|
284
285
|
readonly auth?: AuthContext;
|
|
285
286
|
readonly log: ContextLogger; // auto-correlated: requestId, traceId, tenantId
|
|
286
287
|
readonly state: ContextState; // tenant-scoped KV storage
|
|
287
|
-
readonly
|
|
288
|
+
readonly requestInput: RequestInputFn; // (spec) => never — suspends and asks the caller for input
|
|
289
|
+
readonly inputs: ContextInputs; // reader over a retried request's responses
|
|
288
290
|
readonly notifyPromptListChanged?: (() => void) | undefined; // prompt list changed
|
|
289
291
|
readonly notifyResourceListChanged?: (() => void) | undefined; // resource list changed
|
|
290
292
|
readonly notifyResourceUpdated?: ((uri: string) => void) | undefined; // resource content changed
|
|
291
293
|
readonly notifyToolListChanged?: (() => void) | undefined; // tool list changed
|
|
292
|
-
readonly signal: AbortSignal; // cancellation
|
|
293
|
-
readonly progress?: ContextProgress; // present when task: true
|
|
294
|
+
readonly signal: AbortSignal; // cancellation (also fires when the transport closes)
|
|
294
295
|
readonly uri?: URL; // present for resource handlers
|
|
295
296
|
readonly content: ContentCollect; // media blocks → prepended to content[]; never in structuredContent
|
|
296
297
|
readonly enrich: Enrich; // success-path agent context → structuredContent + content[]; typed on HandlerContext<R, E>
|
|
@@ -326,29 +327,33 @@ Throws `McpError(InvalidRequest)` if `tenantId` missing. Tenant ID resolution:
|
|
|
326
327
|
| HTTP + `MCP_AUTH_MODE=none` | `'default'` (single-tenant by design) |
|
|
327
328
|
| HTTP + `MCP_AUTH_MODE=jwt`/`oauth` | JWT `'tid'` claim — fail-closed if absent |
|
|
328
329
|
|
|
329
|
-
### `ctx.
|
|
330
|
+
### `ctx.requestInput` / `ctx.inputs`
|
|
330
331
|
|
|
331
|
-
|
|
332
|
+
Read what came back first, then request only what is still missing. Write it as
|
|
333
|
+
`return ctx.requestInput(...)` — the `never` return narrows the read above it.
|
|
332
334
|
|
|
333
335
|
```ts
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
336
|
+
const Format = z.object({ format: z.enum(['json', 'csv']).describe('Output format') });
|
|
337
|
+
|
|
338
|
+
const answer = ctx.inputs.accepted('format', Format);
|
|
339
|
+
if (!answer) {
|
|
340
|
+
return ctx.requestInput({
|
|
341
|
+
inputRequests: {
|
|
342
|
+
format: inputRequired.elicit({ message: 'What format?', requestedSchema: Format }),
|
|
343
|
+
},
|
|
344
|
+
});
|
|
339
345
|
}
|
|
346
|
+
useFormat(answer.format);
|
|
340
347
|
```
|
|
341
348
|
|
|
342
|
-
|
|
349
|
+
`ctx.inputs.view(key)` discriminates `missing` / `elicit` / `sampling` / `roots` — a declined or
|
|
350
|
+
cancelled prompt is terminal, not a round to retry. `inputRequired.elicitUrl({ message, url })`
|
|
351
|
+
hands the user an external link instead of a form.
|
|
343
352
|
|
|
344
353
|
### `ctx.content`
|
|
345
354
|
|
|
346
355
|
Accumulates non-text content blocks — image/audio bytes, embedded resources, resource links — onto the response: `ctx.content.image(data, mimeType)`, `ctx.content.audio(data, mimeType)`, or `ctx.content(block)` for a raw `ContentBlock`. Blocks are prepended to `content[]` after `format()` runs and never enter `structuredContent`, so a handler can emit media for the calling model without the base64 duplicating into typed output. Always present (no-op when unused); callable from handler and service layer.
|
|
347
356
|
|
|
348
|
-
### `ctx.progress`
|
|
349
|
-
|
|
350
|
-
Present when `task: true`. Methods: `setTotal(n)`, `increment(amount?)`, `update(message)`.
|
|
351
|
-
|
|
352
357
|
See `api-context` skill for full details.
|
|
353
358
|
|
|
354
359
|
---
|
|
@@ -515,8 +520,7 @@ Skills live in `skills/<name>/SKILL.md`; the full list is discoverable via the a
|
|
|
515
520
|
- **Builders:** `tool()`/`resource()`/`prompt()` with correct fields (`handler`, `input`, `output`, `format`, `auth`, `args`)
|
|
516
521
|
- **`format()` completeness:** must carry the same data as `output` (parity is lint-enforced — see Adding a Tool)
|
|
517
522
|
- **Auth:** via `auth: ['scope']` on definitions (not HOF wrapper)
|
|
518
|
-
- **
|
|
519
|
-
- **Task tools:** use `task: true` flag
|
|
523
|
+
- **Missing input:** read `ctx.inputs` first, then `return ctx.requestInput(...)`
|
|
520
524
|
- **Pagination:** large resource lists use `extractCursor`/`paginateArray`
|
|
521
525
|
- **Registration:** definitions exported in `definitions/index.ts` barrel
|
|
522
526
|
- **Tests:** `createMockContext()`, `.handler()` tested directly
|
package/CLAUDE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Package:** `@cyanheads/mcp-ts-core`
|
|
4
|
-
**Version:** 0.
|
|
4
|
+
**Version:** 0.12.0
|
|
5
5
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
6
|
-
**MCP SDK:** `@modelcontextprotocol/
|
|
6
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0 (protocol revisions 2026-07-28 and 2025-*)
|
|
7
7
|
**Zod:** ^4.4.3
|
|
8
8
|
**GitHub:** [cyanheads/mcp-ts-core](https://github.com/cyanheads/mcp-ts-core)
|
|
9
9
|
**npm:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
@@ -30,12 +30,12 @@ Both paths share the same public API. Init copies starter `package.json`, config
|
|
|
30
30
|
|
|
31
31
|
- **Logic throws, framework catches.** Pure, stateless `handler` functions, no `try/catch`. Plain `Error` works — framework catches, classifies, formats. Use `McpError(code, message, data, options?)` only when you need a specific JSON-RPC code or structured data; 4th arg `{ cause }` chains.
|
|
32
32
|
- **Full-stack observability.** The framework automatically instruments every tool/resource call — OTel span, duration/payload/memory metrics, structured completion log. Use `ctx.log` for additional domain-specific logging within handlers (external API calls, multi-step operations, business events). `requestId`, `traceId`, `tenantId` auto-correlated. No `console` calls.
|
|
33
|
-
- **Unified Context.** Handlers receive `ctx` with logging (`ctx.log`), tenant-scoped storage (`ctx.state`),
|
|
33
|
+
- **Unified Context.** Handlers receive `ctx` with logging (`ctx.log`), tenant-scoped storage (`ctx.state`), multi-round-trip input (`ctx.requestInput` / `ctx.inputs`), and cancellation (`ctx.signal`). `Context extends RequestContext`, so `ctx` goes straight into any service, storage, or logger call.
|
|
34
34
|
- **Decoupled storage.** `ctx.state` for tenant-scoped KV. Never access persistence backends directly.
|
|
35
35
|
- **Canvas tokens are capabilities, not tenant-scoped state.** A `canvasId` is a 10-char URL-safe token; possession grants full read/write/drop. Shareable between agents and across users in single-tenant deployments. Tools accept token in `input` (omit to create fresh) and return in `output`; collaboration is opt-in via token exchange.
|
|
36
36
|
- **Runtime parity.** All features work across `stdio`/`http`/Worker. Guard non-portable deps via `runtimeCaps` from `/utils` (`isNode`, `isBun`, `isWorkerLike`, `hasBuffer`, `hasProcess`, etc.). Prefer runtime-agnostic abstractions (Hono, Fetch APIs).
|
|
37
37
|
- **Definition linting is build-time only.** Run `bun run lint:mcp` (standalone) or `bun run devcheck` (gate). Not invoked at server startup — new lint rules are additive and never break deployed servers. Every diagnostic links to the rule reference in `api-linter` skill; see that skill for the full rule catalog.
|
|
38
|
-
- **
|
|
38
|
+
- **Ask for missing input by returning, not awaiting.** `return ctx.requestInput({ inputRequests: … })` suspends the handler; it is re-entered with `ctx.inputs` populated. One handler serves both protocol eras.
|
|
39
39
|
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
|
|
40
40
|
|
|
41
41
|
---
|
|
@@ -49,7 +49,6 @@ Both paths share the same public API. Init copies starter `package.json`, config
|
|
|
49
49
|
| `/tools` | `ToolDefinition`, `AnyToolDefinition`, `ToolAnnotations` | Tool definition types |
|
|
50
50
|
| `/resources` | `ResourceDefinition`, `AnyResourceDefinition` | Resource definition types |
|
|
51
51
|
| `/prompts` | `PromptDefinition` | Prompt definition type |
|
|
52
|
-
| `/tasks` | `TaskToolDefinition`, `isTaskToolDefinition` | Task tool escape hatch |
|
|
53
52
|
| `/errors` | `McpError`, `JsonRpcErrorCode`, `notFound`, `validationError`, `unauthorized`, ... | Error types, codes, and factory functions |
|
|
54
53
|
| `/config` | `AppConfig`, `config`, `parseConfig`, `parseEnvConfig`, `resetConfig`, `ConfigSchema`, `FRAMEWORK_NAME`, `FRAMEWORK_VERSION` | Zod-validated config, framework identity, env-var helper |
|
|
55
54
|
| `/auth` | `checkScopes` | Dynamic scope checking |
|
|
@@ -242,7 +241,9 @@ export const myTool = tool('my_tool', {
|
|
|
242
241
|
|
|
243
242
|
**`enrichment`** (optional): The success-path counterpart to `errors[]` — a `ZodRawShape` of agent-facing context (empty-result notices, query/filter echo, pagination totals, truncation disclosure) that must reach both client surfaces. Populate via `ctx.enrich(...)` (or `ctx.enrich.notice()` / `.total()` / `.echo()` / `.truncated()`) in the handler or service layer. The framework merges it into `structuredContent`, advertises `output.extend(enrichment)` as `outputSchema`, and mirrors it into a `content[]` trailer — so it reaches `structuredContent`-only and `content[]`-only clients alike, with no `format()` entry. Keys must be disjoint from `output`; a required field never populated fails the effective-output parse. See `api-context`'s `ctx.enrich`.
|
|
244
243
|
|
|
245
|
-
**
|
|
244
|
+
**Strict input:** `tool()` stores `input.strict()`, so an unrecognized argument key is rejected by name before the handler runs and `inputSchema` advertises `additionalProperties: false`. Root-level only — a nested `z.object()` still strips unless it is strict itself. An explicit `.passthrough()` / `.catchall()` is honored.
|
|
245
|
+
|
|
246
|
+
**Advertised vs. parsed output:** `tools/list` advertises a widened schema (success fields optional, `error` declared) so an error envelope validates in strict clients; the framework still parses success results against the strict `output` (+ `enrichment`).
|
|
246
247
|
|
|
247
248
|
---
|
|
248
249
|
|
|
@@ -284,13 +285,13 @@ interface Context {
|
|
|
284
285
|
readonly auth?: AuthContext;
|
|
285
286
|
readonly log: ContextLogger; // auto-correlated: requestId, traceId, tenantId
|
|
286
287
|
readonly state: ContextState; // tenant-scoped KV storage
|
|
287
|
-
readonly
|
|
288
|
+
readonly requestInput: RequestInputFn; // (spec) => never — suspends and asks the caller for input
|
|
289
|
+
readonly inputs: ContextInputs; // reader over a retried request's responses
|
|
288
290
|
readonly notifyPromptListChanged?: (() => void) | undefined; // prompt list changed
|
|
289
291
|
readonly notifyResourceListChanged?: (() => void) | undefined; // resource list changed
|
|
290
292
|
readonly notifyResourceUpdated?: ((uri: string) => void) | undefined; // resource content changed
|
|
291
293
|
readonly notifyToolListChanged?: (() => void) | undefined; // tool list changed
|
|
292
|
-
readonly signal: AbortSignal; // cancellation
|
|
293
|
-
readonly progress?: ContextProgress; // present when task: true
|
|
294
|
+
readonly signal: AbortSignal; // cancellation (also fires when the transport closes)
|
|
294
295
|
readonly uri?: URL; // present for resource handlers
|
|
295
296
|
readonly content: ContentCollect; // media blocks → prepended to content[]; never in structuredContent
|
|
296
297
|
readonly enrich: Enrich; // success-path agent context → structuredContent + content[]; typed on HandlerContext<R, E>
|
|
@@ -326,29 +327,33 @@ Throws `McpError(InvalidRequest)` if `tenantId` missing. Tenant ID resolution:
|
|
|
326
327
|
| HTTP + `MCP_AUTH_MODE=none` | `'default'` (single-tenant by design) |
|
|
327
328
|
| HTTP + `MCP_AUTH_MODE=jwt`/`oauth` | JWT `'tid'` claim — fail-closed if absent |
|
|
328
329
|
|
|
329
|
-
### `ctx.
|
|
330
|
+
### `ctx.requestInput` / `ctx.inputs`
|
|
330
331
|
|
|
331
|
-
|
|
332
|
+
Read what came back first, then request only what is still missing. Write it as
|
|
333
|
+
`return ctx.requestInput(...)` — the `never` return narrows the read above it.
|
|
332
334
|
|
|
333
335
|
```ts
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
336
|
+
const Format = z.object({ format: z.enum(['json', 'csv']).describe('Output format') });
|
|
337
|
+
|
|
338
|
+
const answer = ctx.inputs.accepted('format', Format);
|
|
339
|
+
if (!answer) {
|
|
340
|
+
return ctx.requestInput({
|
|
341
|
+
inputRequests: {
|
|
342
|
+
format: inputRequired.elicit({ message: 'What format?', requestedSchema: Format }),
|
|
343
|
+
},
|
|
344
|
+
});
|
|
339
345
|
}
|
|
346
|
+
useFormat(answer.format);
|
|
340
347
|
```
|
|
341
348
|
|
|
342
|
-
|
|
349
|
+
`ctx.inputs.view(key)` discriminates `missing` / `elicit` / `sampling` / `roots` — a declined or
|
|
350
|
+
cancelled prompt is terminal, not a round to retry. `inputRequired.elicitUrl({ message, url })`
|
|
351
|
+
hands the user an external link instead of a form.
|
|
343
352
|
|
|
344
353
|
### `ctx.content`
|
|
345
354
|
|
|
346
355
|
Accumulates non-text content blocks — image/audio bytes, embedded resources, resource links — onto the response: `ctx.content.image(data, mimeType)`, `ctx.content.audio(data, mimeType)`, or `ctx.content(block)` for a raw `ContentBlock`. Blocks are prepended to `content[]` after `format()` runs and never enter `structuredContent`, so a handler can emit media for the calling model without the base64 duplicating into typed output. Always present (no-op when unused); callable from handler and service layer.
|
|
347
356
|
|
|
348
|
-
### `ctx.progress`
|
|
349
|
-
|
|
350
|
-
Present when `task: true`. Methods: `setTotal(n)`, `increment(amount?)`, `update(message)`.
|
|
351
|
-
|
|
352
357
|
See `api-context` skill for full details.
|
|
353
358
|
|
|
354
359
|
---
|
|
@@ -515,8 +520,7 @@ Skills live in `skills/<name>/SKILL.md`; the full list is discoverable via the a
|
|
|
515
520
|
- **Builders:** `tool()`/`resource()`/`prompt()` with correct fields (`handler`, `input`, `output`, `format`, `auth`, `args`)
|
|
516
521
|
- **`format()` completeness:** must carry the same data as `output` (parity is lint-enforced — see Adding a Tool)
|
|
517
522
|
- **Auth:** via `auth: ['scope']` on definitions (not HOF wrapper)
|
|
518
|
-
- **
|
|
519
|
-
- **Task tools:** use `task: true` flag
|
|
523
|
+
- **Missing input:** read `ctx.inputs` first, then `return ctx.requestInput(...)`
|
|
520
524
|
- **Pagination:** large resource lists use `extractCursor`/`paginateArray`
|
|
521
525
|
- **Registration:** definitions exported in `definitions/index.ts` barrel
|
|
522
526
|
- **Tests:** `createMockContext()`, `.handler()` tested directly
|
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
7
7
|
|
|
8
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://modelcontextprotocol.io/specification/2026-07-28)
|
|
9
9
|
|
|
10
|
-
[](https://modelcontextprotocol.io/) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
13
13
|
|
|
@@ -143,9 +143,10 @@ It also works on Cloudflare Workers with `createWorkerHandler()` — same defini
|
|
|
143
143
|
- **Declarative definitions** — `tool()`, `resource()`, `prompt()` builders with Zod schemas; `appTool()`/`appResource()` add interactive HTML UIs.
|
|
144
144
|
- **Server-level orientation** — `instructions` on `createApp`/`createWorkerHandler` rides every `initialize` for the model. Cross-tool composition hints, regional notes, scope guidance — without leaking text into every tool description.
|
|
145
145
|
- **Server identity** — optional `title`, `websiteUrl`, `description`, `icons` (SEP-973) on `createApp`/`createWorkerHandler` flow to `initialize` serverInfo, the `/.well-known/mcp.json` server card, and the landing page.
|
|
146
|
-
- **Unified Context** — one `ctx` for logging, tenant-scoped storage,
|
|
146
|
+
- **Unified Context** — one `ctx` for logging, tenant-scoped storage, multi-round-trip input collection, and cancellation. `Context extends RequestContext`, so a handler's `ctx` goes straight into any service or storage call.
|
|
147
147
|
- **Auth** — `auth: ['scope']` on definitions, checked before dispatch (no wrapper code). Modes: `none`, `jwt`, or `oauth` (local secret or JWKS).
|
|
148
|
-
- **
|
|
148
|
+
- **Two protocol revisions, one handler** — HTTP serves both the 2026-07-28 revision (per-request `_meta` envelope, no session) and the `initialize`-negotiated 2025 era (sessionful, identity-bound). Handlers are written once; the SDK's legacy shim fulfils multi-round-trip input for 2025-era clients.
|
|
149
|
+
- **Multi-round-trip input** — a handler `return`s `ctx.requestInput(...)` for a confirmation, a sampling call, or the client's roots, and is re-entered with the answers on `ctx.inputs`.
|
|
149
150
|
- **Definition linter** — validates names, schemas, auth scopes, annotations, format-parity, and cross-vendor JSON Schema portability at build time. Run via `lint:mcp` or `devcheck` — not invoked at server startup.
|
|
150
151
|
- **Typed error contracts** — declare `errors: [{ reason, code, when, recovery, retryable? }]` and handlers get a typed `ctx.fail(reason, …)`. Contracts publish in `tools/list` so clients preview failure modes; the linter cross-checks the handler. Factories (`notFound()`, `httpErrorFromResponse()`, …) cover ad-hoc throws; plain `Error` auto-classifies.
|
|
151
152
|
- **Multi-backend storage** — `in-memory`, filesystem, Supabase, Cloudflare D1/KV/R2. Swap via env var; handlers don't change.
|
|
@@ -219,16 +220,16 @@ Handlers receive a unified `Context` object:
|
|
|
219
220
|
|
|
220
221
|
| Property | Type | Description |
|
|
221
222
|
|:---------|:-----|:------------|
|
|
222
|
-
| `ctx.log` | `ContextLogger` | Request-scoped logger (auto-correlates requestId, traceId, tenantId) |
|
|
223
|
+
| `ctx.log` | `ContextLogger` | Request-scoped logger (auto-correlates requestId, traceId, tenantId); also mirrored to the client as `notifications/message` |
|
|
223
224
|
| `ctx.state` | `ContextState` | Tenant-scoped key-value storage |
|
|
224
|
-
| `ctx.
|
|
225
|
+
| `ctx.requestInput` | `(spec) => never` | Suspend and ask the caller for more input; the handler is re-entered with the answers |
|
|
226
|
+
| `ctx.inputs` | `ContextInputs` | Reader over a retried request's responses — `.accepted()`, `.view()`, `.state()`, `.dropped` |
|
|
225
227
|
| `ctx.fail` | `(reason, msg?, data?) => McpError` | Typed error throw — reason checked against `errors[]` contract at compile time |
|
|
226
228
|
| `ctx.signal` | `AbortSignal` | Cancellation signal |
|
|
227
229
|
| `ctx.notifyResourceUpdated` | `Function?` | Notify subscribed clients a resource changed |
|
|
228
230
|
| `ctx.notifyResourceListChanged` | `Function?` | Notify clients the resource list changed |
|
|
229
231
|
| `ctx.notifyPromptListChanged` | `Function?` | Notify clients the prompt list changed |
|
|
230
232
|
| `ctx.notifyToolListChanged` | `Function?` | Notify clients the tool list changed |
|
|
231
|
-
| `ctx.progress` | `ContextProgress?` | Task progress reporting (when `task: true`) |
|
|
232
233
|
| `ctx.requestId` | `string` | Unique request ID |
|
|
233
234
|
| `ctx.tenantId` | `string?` | Tenant ID (JWT `tid` claim, or `'default'` for stdio and HTTP+`MCP_AUTH_MODE=none`) |
|
|
234
235
|
|
|
@@ -257,9 +258,8 @@ The `examples/` directory contains a reference server consuming core through pub
|
|
|
257
258
|
|:-----|:--------|
|
|
258
259
|
| `template_echo_message` | Basic tool with `format`, `auth` |
|
|
259
260
|
| `template_cat_fact` | External API call, error factories |
|
|
260
|
-
| `template_madlibs_elicitation` | `ctx.
|
|
261
|
+
| `template_madlibs_elicitation` | `ctx.requestInput` / `ctx.inputs` for multi-round-trip input |
|
|
261
262
|
| `template_image_test` | Image content blocks |
|
|
262
|
-
| `template_async_countdown` | `task: true` with `ctx.progress` |
|
|
263
263
|
| `template_data_explorer` | MCP Apps with linked UI resource via `appTool()`/`appResource()` builders |
|
|
264
264
|
|
|
265
265
|
## Testing
|
|
@@ -273,7 +273,7 @@ const input = myTool.input.parse({ query: 'test' });
|
|
|
273
273
|
const result = await myTool.handler(input, ctx);
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
-
`createMockContext()` provides a recording `log`, a working `state`, and a `signal`. State runs on a real `StorageService` over an in-memory provider — the same key validation and TTL expiry a deployed server applies — scoped to tenant `'default'` unless `{ tenantId }` says otherwise. Pass `{ errors: myTool.errors }` for a typed `ctx.fail` matching the definition's contract, `{
|
|
276
|
+
`createMockContext()` provides a recording `log`, a working `state`, and a `signal`. State runs on a real `StorageService` over an in-memory provider — the same key validation and TTL expiry a deployed server applies — scoped to tenant `'default'` unless `{ tenantId }` says otherwise. Pass `{ errors: myTool.errors }` for a typed `ctx.fail` matching the definition's contract, and `{ inputResponses, requestState }` to drive a multi-round-trip handler into its second round.
|
|
277
277
|
|
|
278
278
|
`/testing` also exports `createMockSession()` for session-bound contexts, `createFetchMock()` for upstream HTTP boundaries, and `runToolContract()` to drive a definition through schema, handler, formatting, and error-envelope checks. `/testing/vitest` adds the `mcpTest` fixtures (`ctx`, `session`, `fetchMock`, `storage`) and `toolContractSuite()`.
|
|
279
279
|
|
package/biome.json
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adopts MCP SDK v2: every HTTP endpoint now serves protocol revision 2026-07-28 alongside the 2025 era, ctx.elicit is replaced by multi-round-trip input, the experimental tasks surface is removed, and the request-context types collapse into one."
|
|
3
|
+
breaking: true
|
|
4
|
+
security: false
|
|
5
|
+
agent-notes: |
|
|
6
|
+
Upgrade steps for a downstream server, in the order they bite:
|
|
7
|
+
|
|
8
|
+
1. Replace `@modelcontextprotocol/sdk` imports with `@modelcontextprotocol/server`
|
|
9
|
+
(client-side test code uses `@modelcontextprotocol/client`). Remove `@hono/mcp`
|
|
10
|
+
if the server depends on it directly.
|
|
11
|
+
2. Delete every `task: true` tool, `TaskToolDefinition`, and `ctx.progress` call, and
|
|
12
|
+
drop `TASK_STORE_TYPE` / `TASK_STORE_TENANT_ID` / `TASK_STORE_DEFAULT_TTL_MS`
|
|
13
|
+
from `.env` and `.env.example`.
|
|
14
|
+
3. Rewrite each `await ctx.elicit(...)` call as a `return ctx.requestInput(...)` with a
|
|
15
|
+
`ctx.inputs.accepted(key, schema)` read above it. Pass the same schema to
|
|
16
|
+
`accepted()` — neither protocol era re-validates the content the client returns.
|
|
17
|
+
4. Replace `{ ...ctx, someField }` log/error spreads with `withExtra(ctx, { someField })`
|
|
18
|
+
and move ad-hoc `createRequestContext({ ... })` keys into `additionalContext`.
|
|
19
|
+
5. Audit tool inputs for keys callers actually send: input objects are strict now, so a
|
|
20
|
+
key the schema does not declare is rejected instead of stripped. An input that must
|
|
21
|
+
stay open needs an explicit `.passthrough()` or `.catchall()`.
|
|
22
|
+
6. Rename any tool output or enrichment field called `error` — `tool()` now throws on
|
|
23
|
+
it, since that key is the wire's failure envelope.
|
|
24
|
+
7. Re-run the tool-definition linter and the full test suite; advertised `inputSchema`
|
|
25
|
+
and `outputSchema` bytes changed, so wire-shape snapshots need re-recording.
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# 0.12.0 — 2026-08-20
|
|
29
|
+
|
|
30
|
+
Phase 1 of the SDK v2 migration ([#305](https://github.com/cyanheads/mcp-ts-core/issues/305)). Existing 2025-era clients keep working — every endpoint still serves them — apart from the wire-tightening changes called out below.
|
|
31
|
+
|
|
32
|
+
## Added
|
|
33
|
+
|
|
34
|
+
- **Protocol revision 2026-07-28 is served on every HTTP endpoint.** `createMcpHandler` answers per-request modern traffic; `MODERN_PROTOCOL_REVISION` names the revision, and the server card and manifest advertise it ahead of the `initialize`-negotiated 2025 revisions.
|
|
35
|
+
- **`ctx.requestInput(spec)` and `ctx.inputs`** — the multi-round-trip replacement for `ctx.elicit`. Write it as `return ctx.requestInput(...)`; the `never` return narrows the read above it. Build embedded requests with the re-exported `inputRequired` builder. Handlers are written once: a 2026-era client fulfils them directly, and the SDK's legacy shim fulfils them over a live 2025 session.
|
|
36
|
+
- **`expectInputRequired(run)`** in `@cyanheads/mcp-ts-core/testing`, plus `createMockContext({ inputResponses, requestState })` for driving the re-entry round.
|
|
37
|
+
- **`InputRequiredSignal` and `isInputRequiredSignal`** are exported so a handler's input-required round can be asserted directly.
|
|
38
|
+
- **`toCanonicalContext(context)`** — projects any context-shaped object down to the declared `RequestContext` fields. TypeScript cannot enforce the contract at a call site (excess-property checking applies to object literals, not variables), so a handler `ctx` passed to a `RequestContext` parameter arrives whole; the error and log sinks project before serializing.
|
|
39
|
+
- **`RequestContext.extra` and `withExtra(ctx, fields)`** — the typed replacement for the removed index signature ([#110](https://github.com/cyanheads/mcp-ts-core/issues/110)). `extra` is flattened into every log line, so emitted fields are unchanged.
|
|
40
|
+
|
|
41
|
+
## Changed
|
|
42
|
+
|
|
43
|
+
- **`@modelcontextprotocol/sdk` and `@hono/mcp` are replaced by `@modelcontextprotocol/server` + `@modelcontextprotocol/client`.** stdio serves through `serveStdio`; stateful HTTP keeps one `McpServer` and transport per `Mcp-Session-Id` behind `isLegacyRequest`, and stateless HTTP serves both eras from a single handler.
|
|
44
|
+
- **`Context extends RequestContext`, and `RequestContext` is closed** ([#110](https://github.com/cyanheads/mcp-ts-core/issues/110)). A handler `ctx` goes straight into `storage.get(key, ctx)` and `logger.info(msg, ctx)` with no slice helper. `operation` and `sessionId` are declared fields; `RequestContextLike` is a deprecated alias.
|
|
45
|
+
- **Tool inputs are strict** ([#232](https://github.com/cyanheads/mcp-ts-core/issues/232)). An unrecognized argument key is rejected by name before the handler runs, and `inputSchema` advertises `additionalProperties: false`. Root-level only — a nested `z.object()` still strips. An explicit `.passthrough()` or `.catchall()` is honored.
|
|
46
|
+
- **The advertised `outputSchema` declares the error envelope** ([#241](https://github.com/cyanheads/mcp-ts-core/issues/241)). Success fields become optional, `error` is declared, and an `anyOf` refinement recovers the dropped `required`. Clients whose `callTool()` validates `structuredContent` without checking `isError` stop rejecting error results with `-32602`. `data.reason` stays `type: 'string'` — a service throwing below the handler carries its own reason to the wire, and an enum of the declared ones would reject exactly those envelopes; the contract's reasons ride along as `examples` and description text. `effectiveOutputSchema` still parses strictly; `advertisedOutputSchema` is emission-only.
|
|
47
|
+
- **`tool()` rejects an `error` field on `output` or `enrichment`.** The key is the failure envelope's: a success payload using it is indistinguishable from a failure on the wire, and the advertised schema would require and forbid it on the same branch. Thrown at definition time.
|
|
48
|
+
- **`ctx.log` reaches the client.** Every level also emits `notifications/message` at its RFC 5424 level, gated by the client's `logging/setLevel` — which now resolves, because declaring the capability installs the SDK's handler.
|
|
49
|
+
- **`resources: { subscribe: true }` is advertised and backed** ([#354](https://github.com/cyanheads/mcp-ts-core/issues/354)). `resources/subscribe` and `resources/unsubscribe` resolve, and `ctx.notifyResourceUpdated(uri)` emits only for URIs the connection subscribed to.
|
|
50
|
+
- **Advertised JSON Schema is 2020-12**, not draft-07 — strict 2020-12 clients no longer reject a tool before dispatching it ([obsidian-mcp-server#109](https://github.com/cyanheads/obsidian-mcp-server/issues/109)).
|
|
51
|
+
- **`prompt()` argument requiredness follows the emitted schema** ([#258](https://github.com/cyanheads/mcp-ts-core/issues/258)). A `.default()`ed argument advertises as optional.
|
|
52
|
+
- **`createHttpApp` returns `{ app, close, handler, sessionStore }`**, and `SessionStore` holds the live `{ server, transport }` pair per session: `register`, `getConnection`, `assertCapacity`, `terminate` (async), `destroy` (async).
|
|
53
|
+
- **`startStdioTransport(factory, ctx)` returns a `StdioServerHandle`**, and `TransportManager`'s constructor lost its task-manager argument. The stdio heartbeat runs on legacy-era connections only — the 2026 revision has no server-to-client request channel.
|
|
54
|
+
|
|
55
|
+
## Removed
|
|
56
|
+
|
|
57
|
+
- **The experimental tasks surface**, deleted upstream: `task: true`, `TaskToolDefinition`, `TaskManager`, `ctx.progress`, the `tasks` capability, the `./tasks` export subpath, the `TASK_STORE_*` config, and `ATTR_MCP_TASK_STATUS` / `ATTR_MCP_TASK_STORE_TYPE`.
|
|
58
|
+
- **`ctx.elicit`**, `wrapElicit`, and `assertElicitedContent` — superseded by `ctx.requestInput` / `ctx.inputs`.
|
|
59
|
+
- **`ProtocolSessionHooks` and `McpServerFactory`** from `@/mcp-server/protocolSession.js`; the factory type is now the SDK's, taking an `McpRequestContext` with the era it will serve.
|
|
60
|
+
|
|
61
|
+
## Fixed
|
|
62
|
+
|
|
63
|
+
- **Tool input-validation failures read as flat `path: message` sentences** ([#66](https://github.com/cyanheads/mcp-ts-core/issues/66)), not a serialized `ZodIssue[]` blob behind an `MCP error -32602:` prefix.
|
|
64
|
+
- **An unknown or disabled tool rejects with `-32602`** instead of resolving an `isError` result.
|
|
65
|
+
- **A handler `ctx` no longer leaks through service errors.** `ErrorHandler` spread the caller-supplied context straight into `McpError.data`, which a tool returns as `structuredContent.error.data` — so a service following the documented `{ context: ctx }` pattern published `inputs.responses`, the content a user typed into an elicitation prompt. Both sinks project to `RequestContext` first; the logger drops the same surface instead of emitting live handles.
|
|
66
|
+
- **A refined output schema no longer breaks registration.** `advertisedOutputSchema` widened through `.partial()`, which Zod rejects outright on an object carrying `.refine()` / `.superRefine()` — and `tool()` accepts those, so an otherwise valid server threw at startup. The widened shape is rebuilt field by field.
|
|
67
|
+
- **The handler `ctx` carries `operation` and `extra`.** `Context extends RequestContext`, but `createContext` never copied them, so passing `ctx` into a service dropped the operation and every `additionalContext` correlation field.
|
|
68
|
+
- **A POST with a non-JSON `Content-Type` answers `415`,** not `-32700`. The body was parsed before the media type was checked, so even a well-formed payload came back as a parse error and diverged from what the SDK produces for the same request.
|
|
69
|
+
- **`ctx.notifyResourceUpdated(uri)` reaches 2026-era clients.** The `resources/subscribe` registry is a 2025 mechanism, and gating a modern instance on it left the registry permanently empty — every resource update was silently dropped while the server advertised `resources: { subscribe: true }`. The registry is now installed only for the era that has the RPC.
|
|
70
|
+
- **An `input_required` round no longer registers as a tool failure.** `ctx.requestInput(...)` unwinds the handler as a thrown signal; the measurement wrappers recorded it as an exception, marked the span `ERROR`, incremented `mcp.tool.errors`, and logged `isSuccess: false`. Every round now sets `mcp.{tool,resource,prompt}.input_required` on an `OK` span instead.
|
|
71
|
+
- **Notifications fired from a handler reach the client on every transport** — the request's own `ctx.mcpReq.notify` carries `relatedRequestId`, and per-request serving no longer drops them.
|
|
72
|
+
|
|
73
|
+
## Dependencies
|
|
74
|
+
|
|
75
|
+
- `@biomejs/biome` `2.5.6` → `2.5.8`
|
|
76
|
+
- `@cloudflare/vitest-pool-workers` `^0.19.1` → `^0.21.3` (clears the transitive `undici` advisory)
|
|
77
|
+
- `@duckdb/node-api` `^1.5.5-r.3` → `^1.5.5-r.4`
|
|
78
|
+
- `@hono/node-server` `^2.1.0` → `^2.1.1`
|
|
79
|
+
- `@supabase/supabase-js` `^2.112.2` → `^2.112.3`
|
|
80
|
+
- `@types/node` `26.1.2` → `26.2.0`
|
|
81
|
+
- `fast-xml-parser` `^5.10.1` → `^5.11.0`
|
|
82
|
+
- `hono` `^4.13.1` → `^4.13.2`
|
|
83
|
+
- `jose` `^6.2.8` → `^6.2.9`
|
|
84
|
+
- `js-yaml` `^5.2.3` → `^5.3.0`
|
|
85
|
+
- `openai` `^6.49.0` → `^7.4.0` (dev). The optional peer range widens to `^6.48.0 || ^7.0.0` rather than moving — the provider lazily imports `openai` and touches only `chat.completions`, the `openai/resources/chat/completions` types, and `openai/streaming`, all unchanged across the major.
|
|
86
|
+
- `papaparse` `^5.5.4` → `^5.6.0`
|
|
87
|
+
- `sanitize-html` `^2.17.6` → `^2.17.7`
|
|
88
|
+
- `tsc-alias` `^1.9.1` → `^1.9.2`
|
|
89
|
+
- `unpdf` `^1.8.0` → `^1.8.1`
|
|
90
|
+
- `vite` `8.2.0` → `8.2.1`
|
|
91
|
+
- `nanoid` `^3.3.18` added to `overrides` — `postcss` (reached through both `sanitize-html` and `vite`) resolves a version under the advisory floor; pinned to the lowest patched release inside its existing major
|
|
92
|
+
|
|
93
|
+
Two packages are deliberately held, and allowlisted in `devcheck.config.json` so the outdated gate stays meaningful:
|
|
94
|
+
|
|
95
|
+
- `typescript-v6` stays on `npm:typescript@^6.0.3`. The alias exists because TypeScript 7 dropped the programmatic compiler API that `scripts/audit-open-index-signatures.ts` parses with; `bun update --latest` re-resolves it to 7 and defeats the hold.
|
|
96
|
+
- `@cloudflare/workers-types` stays on `5.20260730.1`. `5.20260817.1` adds a global `declare const Buffer: any`, which displaces the Node `Buffer` interface in the shared tsconfig: `randomBytes(n).toString('hex')` stops type-checking, and every `Buffer.from(...)` silently degrades to `any`. Adopting it means reworking session-id generation and the cursor HMAC, one of which is wire-visible.
|
package/dist/cli/init.js
CHANGED
|
@@ -82,7 +82,7 @@ function init() {
|
|
|
82
82
|
const substitutions = {
|
|
83
83
|
PACKAGE_NAME: packageName,
|
|
84
84
|
FRAMEWORK_VERSION: PACKAGE_JSON.version,
|
|
85
|
-
MCP_SDK_VERSION: PACKAGE_JSON.dependencies?.['@modelcontextprotocol/
|
|
85
|
+
MCP_SDK_VERSION: PACKAGE_JSON.dependencies?.['@modelcontextprotocol/server'] ?? '',
|
|
86
86
|
ZOD_VERSION: PACKAGE_JSON.peerDependencies?.zod ?? '',
|
|
87
87
|
};
|
|
88
88
|
const created = [];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known>>;
|
|
126
126
|
schemaSniffRows: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
127
127
|
}, z.core.$strip>;
|
|
128
|
-
tasks: z.ZodObject<{
|
|
129
|
-
storeType: z.ZodDefault<z.ZodPreprocess<z.ZodEnum<{
|
|
130
|
-
"in-memory": "in-memory";
|
|
131
|
-
storage: "storage";
|
|
132
|
-
}>>>;
|
|
133
|
-
tenantId: z.ZodDefault<z.ZodString>;
|
|
134
|
-
defaultTtlMs: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
135
|
-
}, z.core.$strip>;
|
|
136
128
|
openTelemetry: z.ZodObject<{
|
|
137
129
|
enabled: z.ZodPreprocess<z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
|
|
138
130
|
serviceName: z.ZodString;
|
|
@@ -259,11 +251,6 @@ declare const parseConfig: (envOverrides?: Record<string, string | undefined>) =
|
|
|
259
251
|
defaultRowLimit: number;
|
|
260
252
|
schemaSniffRows: number;
|
|
261
253
|
};
|
|
262
|
-
tasks: {
|
|
263
|
-
storeType: "in-memory" | "storage";
|
|
264
|
-
tenantId: string;
|
|
265
|
-
defaultTtlMs?: number | null | undefined;
|
|
266
|
-
};
|
|
267
254
|
openTelemetry: {
|
|
268
255
|
enabled: boolean;
|
|
269
256
|
serviceName: string;
|
|
@@ -395,11 +382,6 @@ declare const config: {
|
|
|
395
382
|
defaultRowLimit: number;
|
|
396
383
|
schemaSniffRows: number;
|
|
397
384
|
};
|
|
398
|
-
tasks: {
|
|
399
|
-
storeType: "in-memory" | "storage";
|
|
400
|
-
tenantId: string;
|
|
401
|
-
defaultTtlMs?: number | null | undefined;
|
|
402
|
-
};
|
|
403
385
|
openTelemetry: {
|
|
404
386
|
enabled: boolean;
|
|
405
387
|
serviceName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/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CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/config/index.js
CHANGED
|
@@ -306,26 +306,6 @@ const ConfigSchema = z
|
|
|
306
306
|
message: 'CANVAS_ABSOLUTE_CAP_MS must be >= CANVAS_TTL_MS — otherwise canvases die at the absolute cap before the sliding TTL ever extends them.',
|
|
307
307
|
path: ['absoluteCapMs'],
|
|
308
308
|
}),
|
|
309
|
-
// Experimental: Task store configuration
|
|
310
|
-
tasks: z.object({
|
|
311
|
-
storeType: z
|
|
312
|
-
.preprocess((val) => {
|
|
313
|
-
const str = emptyStringAsUndefined(val);
|
|
314
|
-
if (typeof str === 'string') {
|
|
315
|
-
const lower = str.toLowerCase();
|
|
316
|
-
const aliasMap = {
|
|
317
|
-
mem: 'in-memory',
|
|
318
|
-
memory: 'in-memory',
|
|
319
|
-
persistent: 'storage',
|
|
320
|
-
};
|
|
321
|
-
return aliasMap[lower] ?? lower;
|
|
322
|
-
}
|
|
323
|
-
return str;
|
|
324
|
-
}, z.enum(['in-memory', 'storage']))
|
|
325
|
-
.default('in-memory'),
|
|
326
|
-
tenantId: z.string().default('system-tasks'),
|
|
327
|
-
defaultTtlMs: z.coerce.number().nullable().optional(),
|
|
328
|
-
}),
|
|
329
309
|
openTelemetry: z.object({
|
|
330
310
|
enabled: envBoolean,
|
|
331
311
|
serviceName: z.string(),
|
|
@@ -518,11 +498,6 @@ const parseConfig = (envOverrides) => {
|
|
|
518
498
|
defaultRowLimit: env.CANVAS_DEFAULT_ROW_LIMIT,
|
|
519
499
|
schemaSniffRows: env.CANVAS_SCHEMA_SNIFF_ROWS,
|
|
520
500
|
},
|
|
521
|
-
tasks: {
|
|
522
|
-
storeType: env.TASK_STORE_TYPE,
|
|
523
|
-
tenantId: env.TASK_STORE_TENANT_ID,
|
|
524
|
-
defaultTtlMs: env.TASK_STORE_DEFAULT_TTL_MS,
|
|
525
|
-
},
|
|
526
501
|
openTelemetry: {
|
|
527
502
|
enabled: env.OTEL_ENABLED,
|
|
528
503
|
serviceName: env.OTEL_SERVICE_NAME,
|