maka-agent 0.2.2-dev.92.20261019 → 0.2.2-dev.98.20261024
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/LICENSE +7 -7
- package/README.md +78 -18
- package/README.zh-CN.md +73 -15
- package/THIRD_PARTY_NOTICES.txt +12 -12
- package/dist/pi-goal.js +13 -0
- package/dist/pi-tui-runner.js +44 -1
- package/dist/run-command-core.js +111 -70
- package/dist/run-session-command.js +91 -15
- package/dist/run-turn-outcome.js +2 -33
- package/dist/runtime-host-session-channel.js +3 -1
- package/dist/runtime-host-session-driver.js +5 -0
- package/dist/tui-copy-catalog.js +24 -0
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/cache-handler.js +48 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/redirect-handler.js +8 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/decompress.js +15 -5
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/index.js +3 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/parse.js +138 -137
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/fetch/index.js +3 -3
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/infra/index.js +14 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/receiver.js +13 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/package.json +1 -1
- package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog-store.js +87 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog.js +98 -21
- package/node_modules/@maka/acp-executor-plugin/dist/index.js +90 -14
- package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +3997 -56
- package/node_modules/@maka/core/dist/assistant-turn-ids.js +34 -0
- package/node_modules/@maka/core/dist/event-wait.js +28 -10
- package/node_modules/@maka/core/dist/executor-catalog.js +3 -1
- package/node_modules/@maka/core/dist/model-catalog.js +19 -1
- package/node_modules/@maka/core/dist/model-metadata.generated.js +4 -14
- package/node_modules/@maka/core/dist/model-metadata.js +42 -1
- package/node_modules/@maka/core/dist/models-dev-projection.js +32 -1
- package/node_modules/@maka/core/dist/provider-registry.js +16 -2
- package/node_modules/@maka/core/dist/runtime-event.js +8 -0
- package/node_modules/@maka/core/dist/session-checkin.js +31 -0
- package/node_modules/@maka/core/dist/usage-stats/types.js +1 -0
- package/node_modules/@maka/core/package.json +2 -0
- package/node_modules/@maka/eval/node_modules/undici/README.md +25 -3
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/@maka/eval/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/@maka/eval/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/@maka/eval/node_modules/undici/package.json +9 -7
- package/node_modules/@maka/mcp/package.json +1 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +22 -9
- package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +10 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +101 -127
- package/node_modules/@maka/runtime/dist/event-wait-tool.js +2 -2
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +32 -1
- package/node_modules/@maka/runtime/dist/history-compaction.js +7 -0
- package/node_modules/@maka/runtime/dist/model-factory.js +26 -6
- package/node_modules/@maka/runtime/dist/model-fetcher.js +8 -1
- package/node_modules/@maka/runtime/dist/model-history.js +16 -3
- package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +7 -2
- package/node_modules/@maka/runtime/dist/plugin-executor-backend.js +49 -2
- package/node_modules/@maka/runtime/dist/plugin-executor-service.js +12 -3
- package/node_modules/@maka/runtime/dist/runtime-context.js +53 -0
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +3 -0
- package/node_modules/@maka/runtime/dist/session-checkin.js +331 -0
- package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +7 -0
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +34 -0
- package/node_modules/@maka/runtime/dist/telemetry/builtin-pricing.js +21 -2
- package/node_modules/@maka/runtime/dist/tool-runtime.js +8 -0
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs +50 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/cache-handler.js +48 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/redirect-handler.js +8 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/decompress.js +15 -5
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/index.js +3 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/parse.js +138 -137
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/fetch/index.js +3 -3
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/infra/index.js +14 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/receiver.js +13 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/package.json +1 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/README.md +25 -3
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/@maka/runtime/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/@maka/runtime/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/@maka/runtime/node_modules/undici/package.json +9 -7
- package/node_modules/@maka/runtime/package.json +2 -0
- package/node_modules/@maka/runtime-host/dist/assistant/bot/bridge.js +8 -0
- package/node_modules/@maka/runtime-host/dist/assistant/bot/capabilities.js +1 -0
- package/node_modules/@maka/runtime-host/dist/assistant/bot/controller.js +64 -13
- package/node_modules/@maka/runtime-host/dist/assistant/bot/host.js +11 -2
- package/node_modules/@maka/runtime-host/dist/assistant/bot/store.js +71 -2
- package/node_modules/@maka/runtime-host/dist/assistant/bot/turn-ids.js +38 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/assistant.js +7 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/controller.js +193 -32
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/discovery-capabilities.js +69 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/host.js +15 -28
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/notebook.js +286 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/prompt.js +31 -6
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/store.js +18 -1
- package/node_modules/@maka/runtime-host/dist/assistant/memory-network/controller.js +1 -1
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-observer.js +94 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-store.js +253 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition.js +133 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/controller.js +27 -14
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delegation.js +35 -5
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delivery.js +1 -1
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/host.js +16 -2
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/matter.js +13 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/prompt.js +7 -5
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/review.js +1 -1
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/settlement-context.js +126 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/store.js +92 -6
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/tools.js +87 -23
- package/node_modules/@maka/runtime-host/dist/assistant/service.js +49 -5
- package/node_modules/@maka/runtime-host/dist/protocol/goal.js +119 -1
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +7 -1
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +8 -1
- package/node_modules/@maka/runtime-host/dist/protocol/personal-assistant.js +1 -0
- package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +7 -1
- package/node_modules/@maka/runtime-host/dist/protocol/session-checkin.js +133 -0
- package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +3 -2
- package/node_modules/@maka/runtime-host/dist/server/event-wait-manager.js +63 -12
- package/node_modules/@maka/runtime-host/dist/server/event-wait-observation-store.js +19 -0
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +123 -11
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +47 -3
- package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +126 -4
- package/node_modules/@maka/runtime-host/dist/server/goal-event-waits.js +58 -19
- package/node_modules/@maka/runtime-host/dist/server/goal-projection.js +24 -3
- package/node_modules/@maka/runtime-host/dist/server/index.js +2 -0
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +44 -2
- package/node_modules/@maka/runtime-host/dist/server/personal-assistant-workspace.js +78 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +73 -3
- package/node_modules/@maka/runtime-host/dist/server/session-checkin.js +257 -0
- package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-coordinator.js +282 -0
- package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-publication.js +250 -0
- package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-access.js +166 -0
- package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-adapter.js +59 -0
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +4 -2
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +2 -1
- package/node_modules/@maka/storage/dist/execution-stores.js +36 -1
- package/node_modules/@maka/storage/dist/local-execution-persistence.js +26 -0
- package/node_modules/@maka/storage/dist/production-session-snapshot.js +14 -6
- package/node_modules/@maka/storage/dist/runtime-event-persistence.js +1 -0
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +86 -16
- package/node_modules/@maka/storage/dist/session-checkpoint-publication-store.js +204 -0
- package/node_modules/@maka/storage/dist/snapshot-operation-gate.js +65 -0
- package/node_modules/@maka/storage/dist/sqlite-context-offload-schema.js +3 -3
- package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +4 -2
- package/node_modules/@maka/storage/dist/sqlite-reclamation-checkpoint.js +37 -0
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +31 -0
- package/node_modules/@maka/storage/package.json +3 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-B-4n9P0J.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-J2FaQ-KY.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +76 -22
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +76 -22
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/{src-oZBjf3U1.cjs → src-DpAS0jfg.cjs} +105 -8
- package/node_modules/@modelcontextprotocol/client/dist/{src-xKF0PJN-.mjs → src-WCy6ifGf.mjs} +88 -9
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/package.json +2 -2
- package/node_modules/@modelcontextprotocol/client/package.json +5 -5
- package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
- package/node_modules/fast-uri/README.md +8 -0
- package/node_modules/fast-uri/index.js +98 -18
- package/node_modules/fast-uri/lib/utils.js +52 -0
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/follow-redirects/index.js +10 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/ip-address/README.md +104 -104
- package/node_modules/ip-address/dist/ipv4.js +7 -0
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/undici/README.md +25 -3
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/undici/package.json +9 -7
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/package.json +2 -2
- package/node_modules/@modelcontextprotocol/client/dist/index-D_CiY-T3.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-D_QDtbiv.d.mts.map +0 -1
package/node_modules/@modelcontextprotocol/client/dist/{src-oZBjf3U1.cjs → src-DpAS0jfg.cjs}
RENAMED
|
@@ -3072,7 +3072,7 @@ function build() {
|
|
|
3072
3072
|
const subscriptionsListenParamsShape = { notifications: SubscriptionFilterSchema$1 };
|
|
3073
3073
|
const SubscriptionsListenRequestSchema$1 = wireRequest("subscriptions/listen", subscriptionsListenParamsShape);
|
|
3074
3074
|
/**
|
|
3075
|
-
* Anchor
|
|
3075
|
+
* Anchor SubscriptionsListenResultMetaObject — required subscriptionId stamp on
|
|
3076
3076
|
* the graceful-close result. Extends `ResultMetaObject` since spec PR
|
|
3077
3077
|
* #3002 (composed, so the serverInfo key and its leniency stay single-sourced).
|
|
3078
3078
|
*/
|
|
@@ -3345,7 +3345,8 @@ function build() {
|
|
|
3345
3345
|
ListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),
|
|
3346
3346
|
ReadResourceResultResponseSchema: wireResultResponse(zod_v4.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),
|
|
3347
3347
|
CompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),
|
|
3348
|
-
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)
|
|
3348
|
+
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1),
|
|
3349
|
+
SubscriptionsListenResultResponseSchema: wireResultResponse(SubscriptionsListenResultSchema$1)
|
|
3349
3350
|
};
|
|
3350
3351
|
}
|
|
3351
3352
|
let memo;
|
|
@@ -4093,6 +4094,10 @@ function isSpecRequestMethod(method) {
|
|
|
4093
4094
|
function isSpecNotificationMethod(method) {
|
|
4094
4095
|
return ALL_CODECS.some((codec) => codec.hasNotificationMethod(method));
|
|
4095
4096
|
}
|
|
4097
|
+
/** The names SEP-2663 re-defines for the Tasks extension on the era that removed them from core. */
|
|
4098
|
+
function isExtensionReusedRequestMethod(method) {
|
|
4099
|
+
return method === "tasks/get" || method === "tasks/cancel";
|
|
4100
|
+
}
|
|
4096
4101
|
const ALL_CODECS = [rev2025Codec, rev2026Codec];
|
|
4097
4102
|
|
|
4098
4103
|
//#endregion
|
|
@@ -5029,13 +5034,14 @@ function buildInputRequired(spec) {
|
|
|
5029
5034
|
* @example Write-once tool requesting confirmation
|
|
5030
5035
|
* ```ts
|
|
5031
5036
|
* server.registerTool('deploy', { inputSchema: z.object({ env: z.string() }) }, async ({ env }, ctx) => {
|
|
5032
|
-
* const
|
|
5033
|
-
*
|
|
5037
|
+
* const confirmationSchema = z.object({ confirm: z.boolean() });
|
|
5038
|
+
* const confirmed = acceptedContent(ctx.mcpReq.inputResponses, 'confirm', confirmationSchema);
|
|
5039
|
+
* if (confirmed?.confirm !== true) {
|
|
5034
5040
|
* return inputRequired({
|
|
5035
5041
|
* inputRequests: {
|
|
5036
5042
|
* confirm: inputRequired.elicit({
|
|
5037
5043
|
* message: `Deploy to ${env}?`,
|
|
5038
|
-
* requestedSchema:
|
|
5044
|
+
* requestedSchema: confirmationSchema
|
|
5039
5045
|
* })
|
|
5040
5046
|
* }
|
|
5041
5047
|
* });
|
|
@@ -5662,6 +5668,8 @@ var Protocol = class {
|
|
|
5662
5668
|
_transport;
|
|
5663
5669
|
_requestMessageId = 0;
|
|
5664
5670
|
_requestHandlers = /* @__PURE__ */ new Map();
|
|
5671
|
+
/** Methods registered with an explicit schema; the era gate in `_onrequest` reads it for the Tasks extension names. */
|
|
5672
|
+
_customSchemaRequestMethods = /* @__PURE__ */ new Set();
|
|
5665
5673
|
_requestHandlerAbortControllers = /* @__PURE__ */ new Map();
|
|
5666
5674
|
_notificationHandlers = /* @__PURE__ */ new Map();
|
|
5667
5675
|
_responseHandlers = /* @__PURE__ */ new Map();
|
|
@@ -5943,7 +5951,7 @@ var Protocol = class {
|
|
|
5943
5951
|
return;
|
|
5944
5952
|
}
|
|
5945
5953
|
}
|
|
5946
|
-
if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method)) {
|
|
5954
|
+
if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method) && !(isExtensionReusedRequestMethod(request.method) && this._customSchemaRequestMethods.has(request.method))) {
|
|
5947
5955
|
sendErrorResponse(ProtocolErrorCode.MethodNotFound, "Method not found");
|
|
5948
5956
|
return;
|
|
5949
5957
|
}
|
|
@@ -6076,8 +6084,11 @@ var Protocol = class {
|
|
|
6076
6084
|
}
|
|
6077
6085
|
request(request, schemaOrOptions, maybeOptions) {
|
|
6078
6086
|
const codec = this._resolveOutboundCodec(request.method);
|
|
6087
|
+
if (isStandardSchema(schemaOrOptions)) {
|
|
6088
|
+
if (!isExtensionReusedRequestMethod(request.method)) this._assertOutboundRequestInEra(codec, request.method);
|
|
6089
|
+
return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
|
|
6090
|
+
}
|
|
6079
6091
|
this._assertOutboundRequestInEra(codec, request.method);
|
|
6080
|
-
if (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
|
|
6081
6092
|
const validate = codecResultValidator(codec, request.method);
|
|
6082
6093
|
if (validate === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);
|
|
6083
6094
|
return this._requestWithSchemaViaCodec(codec, request, validate, schemaOrOptions);
|
|
@@ -6322,6 +6333,8 @@ var Protocol = class {
|
|
|
6322
6333
|
return maybeHandler(parsed.data, ctx);
|
|
6323
6334
|
};
|
|
6324
6335
|
else throw new TypeError("setRequestHandler: handler is required");
|
|
6336
|
+
if (typeof schemasOrHandler === "function") this._customSchemaRequestMethods.delete(method);
|
|
6337
|
+
else this._customSchemaRequestMethods.add(method);
|
|
6325
6338
|
this._requestHandlers.set(method, this._wrapHandler(method, stored));
|
|
6326
6339
|
}
|
|
6327
6340
|
/**
|
|
@@ -6350,6 +6363,7 @@ var Protocol = class {
|
|
|
6350
6363
|
*/
|
|
6351
6364
|
removeRequestHandler(method) {
|
|
6352
6365
|
this._requestHandlers.delete(method);
|
|
6366
|
+
this._customSchemaRequestMethods.delete(method);
|
|
6353
6367
|
}
|
|
6354
6368
|
/**
|
|
6355
6369
|
* Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
|
|
@@ -6813,6 +6827,71 @@ function createFetchWithInit(baseFetch = fetch, baseInit) {
|
|
|
6813
6827
|
});
|
|
6814
6828
|
};
|
|
6815
6829
|
}
|
|
6830
|
+
const REDIRECT_STATUSES = new Set([
|
|
6831
|
+
301,
|
|
6832
|
+
302,
|
|
6833
|
+
303,
|
|
6834
|
+
307,
|
|
6835
|
+
308
|
|
6836
|
+
]);
|
|
6837
|
+
const MAX_REDIRECTS = 5;
|
|
6838
|
+
/** Whether `to` has the scheme, host and port of `from`, or is its https form with both on the default port. */
|
|
6839
|
+
function isWithinOrigin(from, to) {
|
|
6840
|
+
if (from.protocol === to.protocol && from.host === to.host) return true;
|
|
6841
|
+
return from.protocol === "http:" && to.protocol === "https:" && from.hostname === to.hostname && !from.port && !to.port;
|
|
6842
|
+
}
|
|
6843
|
+
/** The URL that a redirect `response` to a request for `url` points at, if it names one. */
|
|
6844
|
+
function redirectTarget(url, response) {
|
|
6845
|
+
const location = REDIRECT_STATUSES.has(response.status) ? response.headers?.get("location") : void 0;
|
|
6846
|
+
if (!location) return void 0;
|
|
6847
|
+
try {
|
|
6848
|
+
return new URL(location, url);
|
|
6849
|
+
} catch {
|
|
6850
|
+
return;
|
|
6851
|
+
}
|
|
6852
|
+
}
|
|
6853
|
+
const leftToFetch = /* @__PURE__ */ new WeakSet();
|
|
6854
|
+
/** A copy of `baseFetch` that `fetchWithinOrigin` returns as it is, which leaves redirects to `baseFetch`. */
|
|
6855
|
+
function fetchLeavingRedirects(baseFetch) {
|
|
6856
|
+
const copy = (url, init) => baseFetch(url, init);
|
|
6857
|
+
leftToFetch.add(copy);
|
|
6858
|
+
return copy;
|
|
6859
|
+
}
|
|
6860
|
+
/** Wraps `baseFetch` to follow a redirect only when it keeps the method and stays within the origin of the request. */
|
|
6861
|
+
function fetchWithinOrigin(baseFetch) {
|
|
6862
|
+
if (leftToFetch.has(baseFetch)) return baseFetch;
|
|
6863
|
+
return async (url, init) => {
|
|
6864
|
+
if (init?.redirect === "error" || init?.redirect === "manual") return baseFetch(url, init);
|
|
6865
|
+
const method = (init?.method ?? "GET").toUpperCase();
|
|
6866
|
+
let current = url;
|
|
6867
|
+
for (let followed = 0;; followed++) {
|
|
6868
|
+
const response = await baseFetch(current, {
|
|
6869
|
+
...init,
|
|
6870
|
+
redirect: "manual"
|
|
6871
|
+
});
|
|
6872
|
+
const target = redirectTarget(current, response);
|
|
6873
|
+
if (!target || followed === MAX_REDIRECTS) return response;
|
|
6874
|
+
const from = new URL(current);
|
|
6875
|
+
const keepsMethod = method === "GET" || response.status === 307 || response.status === 308;
|
|
6876
|
+
const keepsUserinfo = !(target.username || target.password) || target.username === from.username && target.password === from.password;
|
|
6877
|
+
if (!keepsMethod || !keepsUserinfo || !isWithinOrigin(from, target)) return response;
|
|
6878
|
+
await response.text?.().catch(() => {});
|
|
6879
|
+
current = target;
|
|
6880
|
+
}
|
|
6881
|
+
};
|
|
6882
|
+
}
|
|
6883
|
+
/** Error text for a redirect `response` to a request for `url` that was not followed, or `undefined` for any other response. */
|
|
6884
|
+
function unfollowedRedirect(url, response) {
|
|
6885
|
+
if (response.type === "opaqueredirect") return "Redirect not followed: this runtime does not expose where it points";
|
|
6886
|
+
const target = redirectTarget(response.url || url, response);
|
|
6887
|
+
if (!target) return void 0;
|
|
6888
|
+
target.username = target.password = target.search = target.hash = "";
|
|
6889
|
+
if (target.protocol === "http:" && new URL(response.url || url).protocol === "https:") {
|
|
6890
|
+
target.protocol = "https:";
|
|
6891
|
+
return `Redirect from https to plain http not followed; try ${target.href} as the endpoint`;
|
|
6892
|
+
}
|
|
6893
|
+
return `Redirect to ${target.href} not followed; use that URL as the endpoint if it is the intended server`;
|
|
6894
|
+
}
|
|
6816
6895
|
|
|
6817
6896
|
//#endregion
|
|
6818
6897
|
//#region ../core-internal/src/shared/uriTemplate.ts
|
|
@@ -7343,6 +7422,18 @@ Object.defineProperty(exports, 'encodeMcpParamValue', {
|
|
|
7343
7422
|
return encodeMcpParamValue;
|
|
7344
7423
|
}
|
|
7345
7424
|
});
|
|
7425
|
+
Object.defineProperty(exports, 'fetchLeavingRedirects', {
|
|
7426
|
+
enumerable: true,
|
|
7427
|
+
get: function () {
|
|
7428
|
+
return fetchLeavingRedirects;
|
|
7429
|
+
}
|
|
7430
|
+
});
|
|
7431
|
+
Object.defineProperty(exports, 'fetchWithinOrigin', {
|
|
7432
|
+
enumerable: true,
|
|
7433
|
+
get: function () {
|
|
7434
|
+
return fetchWithinOrigin;
|
|
7435
|
+
}
|
|
7436
|
+
});
|
|
7346
7437
|
Object.defineProperty(exports, 'fromJsonSchema', {
|
|
7347
7438
|
enumerable: true,
|
|
7348
7439
|
get: function () {
|
|
@@ -7523,6 +7614,12 @@ Object.defineProperty(exports, 'stampErrorBrands', {
|
|
|
7523
7614
|
return stampErrorBrands;
|
|
7524
7615
|
}
|
|
7525
7616
|
});
|
|
7617
|
+
Object.defineProperty(exports, 'unfollowedRedirect', {
|
|
7618
|
+
enumerable: true,
|
|
7619
|
+
get: function () {
|
|
7620
|
+
return unfollowedRedirect;
|
|
7621
|
+
}
|
|
7622
|
+
});
|
|
7526
7623
|
Object.defineProperty(exports, 'withInputRequired', {
|
|
7527
7624
|
enumerable: true,
|
|
7528
7625
|
get: function () {
|
|
@@ -7535,4 +7632,4 @@ Object.defineProperty(exports, 'withoutIssuer', {
|
|
|
7535
7632
|
return withoutIssuer;
|
|
7536
7633
|
}
|
|
7537
7634
|
});
|
|
7538
|
-
//# sourceMappingURL=src-
|
|
7635
|
+
//# sourceMappingURL=src-DpAS0jfg.cjs.map
|
package/node_modules/@modelcontextprotocol/client/dist/{src-xKF0PJN-.mjs → src-WCy6ifGf.mjs}
RENAMED
|
@@ -3071,7 +3071,7 @@ function build() {
|
|
|
3071
3071
|
const subscriptionsListenParamsShape = { notifications: SubscriptionFilterSchema$1 };
|
|
3072
3072
|
const SubscriptionsListenRequestSchema$1 = wireRequest("subscriptions/listen", subscriptionsListenParamsShape);
|
|
3073
3073
|
/**
|
|
3074
|
-
* Anchor
|
|
3074
|
+
* Anchor SubscriptionsListenResultMetaObject — required subscriptionId stamp on
|
|
3075
3075
|
* the graceful-close result. Extends `ResultMetaObject` since spec PR
|
|
3076
3076
|
* #3002 (composed, so the serverInfo key and its leniency stay single-sourced).
|
|
3077
3077
|
*/
|
|
@@ -3344,7 +3344,8 @@ function build() {
|
|
|
3344
3344
|
ListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),
|
|
3345
3345
|
ReadResourceResultResponseSchema: wireResultResponse(z.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),
|
|
3346
3346
|
CompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),
|
|
3347
|
-
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)
|
|
3347
|
+
DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1),
|
|
3348
|
+
SubscriptionsListenResultResponseSchema: wireResultResponse(SubscriptionsListenResultSchema$1)
|
|
3348
3349
|
};
|
|
3349
3350
|
}
|
|
3350
3351
|
let memo;
|
|
@@ -4092,6 +4093,10 @@ function isSpecRequestMethod(method) {
|
|
|
4092
4093
|
function isSpecNotificationMethod(method) {
|
|
4093
4094
|
return ALL_CODECS.some((codec) => codec.hasNotificationMethod(method));
|
|
4094
4095
|
}
|
|
4096
|
+
/** The names SEP-2663 re-defines for the Tasks extension on the era that removed them from core. */
|
|
4097
|
+
function isExtensionReusedRequestMethod(method) {
|
|
4098
|
+
return method === "tasks/get" || method === "tasks/cancel";
|
|
4099
|
+
}
|
|
4095
4100
|
const ALL_CODECS = [rev2025Codec, rev2026Codec];
|
|
4096
4101
|
|
|
4097
4102
|
//#endregion
|
|
@@ -5028,13 +5033,14 @@ function buildInputRequired(spec) {
|
|
|
5028
5033
|
* @example Write-once tool requesting confirmation
|
|
5029
5034
|
* ```ts
|
|
5030
5035
|
* server.registerTool('deploy', { inputSchema: z.object({ env: z.string() }) }, async ({ env }, ctx) => {
|
|
5031
|
-
* const
|
|
5032
|
-
*
|
|
5036
|
+
* const confirmationSchema = z.object({ confirm: z.boolean() });
|
|
5037
|
+
* const confirmed = acceptedContent(ctx.mcpReq.inputResponses, 'confirm', confirmationSchema);
|
|
5038
|
+
* if (confirmed?.confirm !== true) {
|
|
5033
5039
|
* return inputRequired({
|
|
5034
5040
|
* inputRequests: {
|
|
5035
5041
|
* confirm: inputRequired.elicit({
|
|
5036
5042
|
* message: `Deploy to ${env}?`,
|
|
5037
|
-
* requestedSchema:
|
|
5043
|
+
* requestedSchema: confirmationSchema
|
|
5038
5044
|
* })
|
|
5039
5045
|
* }
|
|
5040
5046
|
* });
|
|
@@ -5661,6 +5667,8 @@ var Protocol = class {
|
|
|
5661
5667
|
_transport;
|
|
5662
5668
|
_requestMessageId = 0;
|
|
5663
5669
|
_requestHandlers = /* @__PURE__ */ new Map();
|
|
5670
|
+
/** Methods registered with an explicit schema; the era gate in `_onrequest` reads it for the Tasks extension names. */
|
|
5671
|
+
_customSchemaRequestMethods = /* @__PURE__ */ new Set();
|
|
5664
5672
|
_requestHandlerAbortControllers = /* @__PURE__ */ new Map();
|
|
5665
5673
|
_notificationHandlers = /* @__PURE__ */ new Map();
|
|
5666
5674
|
_responseHandlers = /* @__PURE__ */ new Map();
|
|
@@ -5942,7 +5950,7 @@ var Protocol = class {
|
|
|
5942
5950
|
return;
|
|
5943
5951
|
}
|
|
5944
5952
|
}
|
|
5945
|
-
if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method)) {
|
|
5953
|
+
if (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method) && !(isExtensionReusedRequestMethod(request.method) && this._customSchemaRequestMethods.has(request.method))) {
|
|
5946
5954
|
sendErrorResponse(ProtocolErrorCode.MethodNotFound, "Method not found");
|
|
5947
5955
|
return;
|
|
5948
5956
|
}
|
|
@@ -6075,8 +6083,11 @@ var Protocol = class {
|
|
|
6075
6083
|
}
|
|
6076
6084
|
request(request, schemaOrOptions, maybeOptions) {
|
|
6077
6085
|
const codec = this._resolveOutboundCodec(request.method);
|
|
6086
|
+
if (isStandardSchema(schemaOrOptions)) {
|
|
6087
|
+
if (!isExtensionReusedRequestMethod(request.method)) this._assertOutboundRequestInEra(codec, request.method);
|
|
6088
|
+
return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
|
|
6089
|
+
}
|
|
6078
6090
|
this._assertOutboundRequestInEra(codec, request.method);
|
|
6079
|
-
if (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);
|
|
6080
6091
|
const validate = codecResultValidator(codec, request.method);
|
|
6081
6092
|
if (validate === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);
|
|
6082
6093
|
return this._requestWithSchemaViaCodec(codec, request, validate, schemaOrOptions);
|
|
@@ -6321,6 +6332,8 @@ var Protocol = class {
|
|
|
6321
6332
|
return maybeHandler(parsed.data, ctx);
|
|
6322
6333
|
};
|
|
6323
6334
|
else throw new TypeError("setRequestHandler: handler is required");
|
|
6335
|
+
if (typeof schemasOrHandler === "function") this._customSchemaRequestMethods.delete(method);
|
|
6336
|
+
else this._customSchemaRequestMethods.add(method);
|
|
6324
6337
|
this._requestHandlers.set(method, this._wrapHandler(method, stored));
|
|
6325
6338
|
}
|
|
6326
6339
|
/**
|
|
@@ -6349,6 +6362,7 @@ var Protocol = class {
|
|
|
6349
6362
|
*/
|
|
6350
6363
|
removeRequestHandler(method) {
|
|
6351
6364
|
this._requestHandlers.delete(method);
|
|
6365
|
+
this._customSchemaRequestMethods.delete(method);
|
|
6352
6366
|
}
|
|
6353
6367
|
/**
|
|
6354
6368
|
* Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
|
|
@@ -6812,6 +6826,71 @@ function createFetchWithInit(baseFetch = fetch, baseInit) {
|
|
|
6812
6826
|
});
|
|
6813
6827
|
};
|
|
6814
6828
|
}
|
|
6829
|
+
const REDIRECT_STATUSES = new Set([
|
|
6830
|
+
301,
|
|
6831
|
+
302,
|
|
6832
|
+
303,
|
|
6833
|
+
307,
|
|
6834
|
+
308
|
|
6835
|
+
]);
|
|
6836
|
+
const MAX_REDIRECTS = 5;
|
|
6837
|
+
/** Whether `to` has the scheme, host and port of `from`, or is its https form with both on the default port. */
|
|
6838
|
+
function isWithinOrigin(from, to) {
|
|
6839
|
+
if (from.protocol === to.protocol && from.host === to.host) return true;
|
|
6840
|
+
return from.protocol === "http:" && to.protocol === "https:" && from.hostname === to.hostname && !from.port && !to.port;
|
|
6841
|
+
}
|
|
6842
|
+
/** The URL that a redirect `response` to a request for `url` points at, if it names one. */
|
|
6843
|
+
function redirectTarget(url, response) {
|
|
6844
|
+
const location = REDIRECT_STATUSES.has(response.status) ? response.headers?.get("location") : void 0;
|
|
6845
|
+
if (!location) return void 0;
|
|
6846
|
+
try {
|
|
6847
|
+
return new URL(location, url);
|
|
6848
|
+
} catch {
|
|
6849
|
+
return;
|
|
6850
|
+
}
|
|
6851
|
+
}
|
|
6852
|
+
const leftToFetch = /* @__PURE__ */ new WeakSet();
|
|
6853
|
+
/** A copy of `baseFetch` that `fetchWithinOrigin` returns as it is, which leaves redirects to `baseFetch`. */
|
|
6854
|
+
function fetchLeavingRedirects(baseFetch) {
|
|
6855
|
+
const copy = (url, init) => baseFetch(url, init);
|
|
6856
|
+
leftToFetch.add(copy);
|
|
6857
|
+
return copy;
|
|
6858
|
+
}
|
|
6859
|
+
/** Wraps `baseFetch` to follow a redirect only when it keeps the method and stays within the origin of the request. */
|
|
6860
|
+
function fetchWithinOrigin(baseFetch) {
|
|
6861
|
+
if (leftToFetch.has(baseFetch)) return baseFetch;
|
|
6862
|
+
return async (url, init) => {
|
|
6863
|
+
if (init?.redirect === "error" || init?.redirect === "manual") return baseFetch(url, init);
|
|
6864
|
+
const method = (init?.method ?? "GET").toUpperCase();
|
|
6865
|
+
let current = url;
|
|
6866
|
+
for (let followed = 0;; followed++) {
|
|
6867
|
+
const response = await baseFetch(current, {
|
|
6868
|
+
...init,
|
|
6869
|
+
redirect: "manual"
|
|
6870
|
+
});
|
|
6871
|
+
const target = redirectTarget(current, response);
|
|
6872
|
+
if (!target || followed === MAX_REDIRECTS) return response;
|
|
6873
|
+
const from = new URL(current);
|
|
6874
|
+
const keepsMethod = method === "GET" || response.status === 307 || response.status === 308;
|
|
6875
|
+
const keepsUserinfo = !(target.username || target.password) || target.username === from.username && target.password === from.password;
|
|
6876
|
+
if (!keepsMethod || !keepsUserinfo || !isWithinOrigin(from, target)) return response;
|
|
6877
|
+
await response.text?.().catch(() => {});
|
|
6878
|
+
current = target;
|
|
6879
|
+
}
|
|
6880
|
+
};
|
|
6881
|
+
}
|
|
6882
|
+
/** Error text for a redirect `response` to a request for `url` that was not followed, or `undefined` for any other response. */
|
|
6883
|
+
function unfollowedRedirect(url, response) {
|
|
6884
|
+
if (response.type === "opaqueredirect") return "Redirect not followed: this runtime does not expose where it points";
|
|
6885
|
+
const target = redirectTarget(response.url || url, response);
|
|
6886
|
+
if (!target) return void 0;
|
|
6887
|
+
target.username = target.password = target.search = target.hash = "";
|
|
6888
|
+
if (target.protocol === "http:" && new URL(response.url || url).protocol === "https:") {
|
|
6889
|
+
target.protocol = "https:";
|
|
6890
|
+
return `Redirect from https to plain http not followed; try ${target.href} as the endpoint`;
|
|
6891
|
+
}
|
|
6892
|
+
return `Redirect to ${target.href} not followed; use that URL as the endpoint if it is the intended server`;
|
|
6893
|
+
}
|
|
6815
6894
|
|
|
6816
6895
|
//#endregion
|
|
6817
6896
|
//#region ../core-internal/src/shared/uriTemplate.ts
|
|
@@ -7160,5 +7239,5 @@ function fromJsonSchema(schema, validator) {
|
|
|
7160
7239
|
}
|
|
7161
7240
|
|
|
7162
7241
|
//#endregion
|
|
7163
|
-
export {
|
|
7164
|
-
//# sourceMappingURL=src-
|
|
7242
|
+
export { ProtocolErrorCode as $, assertCompleteRequestPrompt as A, OAuthProtectedResourceMetadataSchema as At, isJSONRPCResultResponse as B, withInputRequired as C, checkResourceAllowed as Ct, buildMcpParamHeaders as D, OAuthClientInformationFullSchema as Dt, mcpNameSource as E, IdJagTokenExchangeResponseSchema as Et, isInputRequiredResult as F, SdkHttpError as Ft, ListChangedOptionsBaseSchema as G, parseJSONRPCMessage as H, isJSONRPCErrorResponse as I, OAuthError as It, MissingRequiredClientCapabilityError as J, MODERN_WIRE_REVISION as K, isJSONRPCNotification as L, OAuthErrorCode as Lt, isCallToolResult as M, OpenIdProviderDiscoveryMetadataSchema as Mt, isInitializeRequest as N, SdkError as Nt, encodeMcpParamValue as O, OAuthErrorResponseSchema as Ot, isInitializedNotification as P, SdkErrorCode as Pt, UrlElicitationRequiredError as Q, isJSONRPCRequest as R, brandedHasInstance as Rt, resolveInputRequiredDriverConfig as S, TRACESTATE_META_KEY as St, HEADER_MISMATCH_ERROR_CODE as T, withoutIssuer as Tt, DiscoverResultSchema as U, isTaskAugmentedRequestParams as V, JSONRPCMessageSchema as W, ResourceNotFoundError as X, ProtocolError as Y, UnsupportedProtocolVersionError as Z, DEFAULT_REQUEST_TIMEOUT_MSEC as _, RELATED_TASK_META_KEY as _t, createFetchWithInit as a, CLIENT_CAPABILITIES_META_KEY as at, isSpecType as b, SUPPORTED_PROTOCOL_VERSIONS as bt, unfollowedRedirect as c, INTERNAL_ERROR as ct, deserializeMessage as d, JSONRPC_VERSION as dt, SUPPORTED_MODERN_PROTOCOL_VERSIONS as et, serializeMessage as f, LATEST_PROTOCOL_VERSION as ft, runInputRequiredFlow as g, PROTOCOL_VERSION_META_KEY as gt, mediaTypeEssence as h, PARSE_ERROR as ht, UriTemplate as i, BAGGAGE_META_KEY as it, assertCompleteRequestResourceTemplate as j, OAuthTokensSchema as jt, scanXMcpHeaderDeclarations as k, OAuthMetadataSchema as kt, ReadBuffer as l, INVALID_PARAMS as lt, isJsonContentType as m, METHOD_NOT_FOUND as mt, preloadSchemas as n, legacyProtocolVersions as nt, fetchLeavingRedirects as o, CLIENT_INFO_META_KEY as ot, getDisplayName as p, LOG_LEVEL_META_KEY as pt, codecForVersion as q, InMemoryTransport as r, modernProtocolVersions as rt, fetchWithinOrigin as s, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as st, fromJsonSchema as t, isModernProtocolVersion as tt, STDIO_DEFAULT_MAX_BUFFER_SIZE as u, INVALID_REQUEST as ut, Protocol as v, SERVER_INFO_META_KEY as vt, parseSchema as w, resourceUrlFromServerUrl as wt, specTypeSchemas as x, TRACEPARENT_META_KEY as xt, mergeCapabilities as y, SUBSCRIPTION_ID_META_KEY as yt, isJSONRPCResponse as z, stampErrorBrands as zt };
|
|
7243
|
+
//# sourceMappingURL=src-WCy6ifGf.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-Bnu9O96Y.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-DpAS0jfg.cjs');
|
|
3
3
|
let node_process = require("node:process");
|
|
4
4
|
node_process = require_chunk.__toESM(node_process);
|
|
5
5
|
let node_stream = require("node:stream");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nt as SdkError, Pt as SdkErrorCode, f as serializeMessage, l as ReadBuffer } from "./src-WCy6ifGf.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import { PassThrough } from "node:stream";
|
|
4
4
|
import spawn from "cross-spawn";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modelcontextprotocol/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Model Context Protocol for TypeScript — public Zod schemas (spec + OAuth/OpenID)",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"author": "Anthropic, PBC (https://anthropic.com)",
|
|
7
7
|
"homepage": "https://modelcontextprotocol.io",
|
|
8
8
|
"bugs": "https://github.com/modelcontextprotocol/typescript-sdk/issues",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modelcontextprotocol/client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Model Context Protocol implementation for TypeScript - Client package",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"author": "Anthropic, PBC (https://anthropic.com)",
|
|
7
7
|
"homepage": "https://modelcontextprotocol.io",
|
|
8
8
|
"bugs": "https://github.com/modelcontextprotocol/typescript-sdk/issues",
|
|
@@ -124,11 +124,11 @@
|
|
|
124
124
|
"dependencies": {
|
|
125
125
|
"cross-spawn": "^7.0.5",
|
|
126
126
|
"eventsource": "^3.0.2",
|
|
127
|
-
"eventsource-parser": "^3.0.
|
|
127
|
+
"eventsource-parser": "^3.0.8",
|
|
128
128
|
"jose": "^6.1.3",
|
|
129
129
|
"pkce-challenge": "^5.0.0",
|
|
130
130
|
"zod": "^4.2.0",
|
|
131
|
-
"@modelcontextprotocol/core": "2.
|
|
131
|
+
"@modelcontextprotocol/core": "2.3.0"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@cfworker/json-schema": "^4.1.1",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"typescript-eslint": "^8.48.1",
|
|
148
148
|
"vitest": "^4.0.15",
|
|
149
149
|
"tsdown": "^0.18.0",
|
|
150
|
-
"@modelcontextprotocol/core-internal": "^2.0.
|
|
150
|
+
"@modelcontextprotocol/core-internal": "^2.0.3",
|
|
151
151
|
"@modelcontextprotocol/tsconfig": "^2.0.0",
|
|
152
152
|
"@modelcontextprotocol/vitest-config": "^2.0.0",
|
|
153
153
|
"@modelcontextprotocol/eslint-config": "^2.0.0",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Release the package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
semver:
|
|
7
|
+
description: 'Release bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
- prepatch
|
|
15
|
+
- preminor
|
|
16
|
+
- premajor
|
|
17
|
+
- prerelease
|
|
18
|
+
preid:
|
|
19
|
+
description: 'Prerelease identifier (e.g. rc), used by the pre* bump types'
|
|
20
|
+
required: false
|
|
21
|
+
type: string
|
|
22
|
+
|
|
23
|
+
permissions: {}
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
release:
|
|
27
|
+
permissions:
|
|
28
|
+
id-token: write # required for npm provenance via OIDC
|
|
29
|
+
contents: write # required to push the release commit and the tag
|
|
30
|
+
uses: fastify/workflows/.github/workflows/reusable-release.yml@b0a2ab2d8259b6bd574b804cd6874bbd75c3577c
|
|
31
|
+
with:
|
|
32
|
+
semver: ${{ inputs.semver }}
|
|
33
|
+
preid: ${{ inputs.preid }}
|
|
34
|
+
dist-tag: ${{ startsWith(inputs.semver, 'pre') && 'three-next' || 'three' }}
|
|
35
|
+
make-latest: false
|
|
@@ -14,12 +14,18 @@ All of the above functions can accept an additional options argument that is an
|
|
|
14
14
|
|
|
15
15
|
Malformed authorities and out-of-range ports are reported through the parsed component's `error` field. `normalize()` leaves malformed string inputs unchanged, and `equal()` returns `false` when either string input is malformed.
|
|
16
16
|
|
|
17
|
+
Schemes are never percent-decoded. RFC 3986 does not allow percent-encoding in a scheme, so an input such as `%6Aavascript:alert(1)` is reported as malformed (`error: 'URI scheme is malformed.'`) instead of being parsed as `javascript:`. `normalize()` leaves it unchanged, `equal()` returns `false`, and `resolve()` and `serialize()` throw.
|
|
18
|
+
|
|
19
|
+
For schemes with domain hosts (`http`, `https`, `ws`, `wss`, or any scheme with the `domainHost` option), a host containing an ASCII character that RFC 3986 does not allow in a reg-name (for example `@`, TAB, LF, CR, space, `"`, `<`, `>`, `^`, `` ` ``, `{`, `|`, `}`) is reported as malformed (`error: 'URI host is malformed.'`). It is never passed through a WHATWG URL parser that could treat `@` as a delimiter or strip whitespace. `normalize()` leaves such input unchanged, `equal()` returns `false`, and `resolve()` throws.
|
|
20
|
+
|
|
17
21
|
* `scheme` (string)
|
|
18
22
|
Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
|
|
19
23
|
|
|
20
24
|
* `reference` (string)
|
|
21
25
|
If set to `"suffix"`, it indicates that the URI is in the suffix format and the parser will use the option's `scheme` property to determine the URI's scheme.
|
|
22
26
|
|
|
27
|
+
A suffix reference is written without its scheme and without the `//` authority marker (RFC 3986 section 4.5). Such a reference is inherently ambiguous: an authority component cannot always be distinguished from a path. When the input carries an authority of the form `host:port` (for example `//javascript:80/x`) or a userinfo containing a colon, the serialized suffix output can begin with text that reparses as a URI scheme (for example `javascript:80/x`). Do not treat suffix output as a trusted absolute URL, and do not render it or use it in a scheme allowlist without first validating it with `parse()`. If you need an unambiguous result, use the default (non-suffix) serialization.
|
|
28
|
+
|
|
23
29
|
* `tolerant` (boolean, false)
|
|
24
30
|
If set to `true`, the parser will relax URI resolving rules.
|
|
25
31
|
|
|
@@ -79,6 +85,8 @@ uri.normalize('http://example.com/a%2Fb')
|
|
|
79
85
|
|
|
80
86
|
Reserved path escapes such as `%2F` and `%2E` are preserved as path data during normalization and comparison.
|
|
81
87
|
|
|
88
|
+
Dot segments in relative references are removed without changing what the reference resolves to: leading `..` segments that cannot be collapsed are kept, a relative path is never turned into a root-relative one, and a first-segment colon exposed by the removal is kept behind a leading `./` so the reference is not reparsed as a scheme (`a/../b` → `b`, `../x` → `../x`, `x/..` → `./`, `a/../a:b` → `./a:b`).
|
|
89
|
+
|
|
82
90
|
### Equal
|
|
83
91
|
|
|
84
92
|
```js
|