maka-agent 0.2.0-dev.6.20260830 → 0.2.0-dev.64.20260929
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/DISCLAIMER-WIP +6 -1
- package/LICENSE +291 -9
- package/README.md +50 -20
- package/README.zh-CN.md +39 -19
- package/RUNTIME_HOST_PEER_DEPENDENCIES.rust.tsv +70 -0
- package/RUNTIME_HOST_PEER_THIRD_PARTY_NOTICES.txt +1839 -140
- package/THIRD_PARTY_NOTICES.txt +490 -271
- package/dist/acp/active-promise.js +38 -0
- package/dist/acp/goal-plan-operations.js +142 -0
- package/dist/acp/goal-plan-routes.js +33 -0
- package/dist/acp/maka-acp-agent.js +128 -7
- package/dist/acp/prompt-content.js +225 -0
- package/dist/acp/session-configuration.js +143 -0
- package/dist/acp/session-domain-observation.js +185 -0
- package/dist/acp/session-event-mapper.js +205 -0
- package/dist/acp/session-interactions.js +550 -0
- package/dist/acp/session-mcp.js +361 -0
- package/dist/acp/session-registry.js +2378 -0
- package/dist/acp/stdio-server.js +32 -1
- package/dist/acp/tool-event-mapper.js +457 -0
- package/dist/acp/turn-observation.js +260 -0
- package/dist/activation-command.js +12 -5
- package/dist/bounded-chunk-buffer.js +16 -3
- package/dist/cli-core.js +98 -102
- package/dist/cli-ui-locale.js +7 -2
- package/dist/mcp-capability-provider.js +21 -12
- package/dist/mcp-capability-publication.js +155 -0
- package/dist/onboarding-catalog.js +23 -8
- package/dist/pi-transcript-tools.js +17 -5
- package/dist/pi-transcript.js +77 -31
- package/dist/pi-tui-form-interaction.js +497 -0
- package/dist/pi-tui-layout.js +101 -24
- package/dist/pi-tui-mcp-status.js +194 -128
- package/dist/pi-tui-pickers.js +588 -103
- package/dist/pi-tui-runner.js +1097 -251
- package/dist/pi-tui-todo.js +221 -0
- package/dist/pi-tui-transcript-viewer.js +134 -7
- package/dist/run-command-core.js +6 -14
- package/dist/runtime-host-access-command.js +37 -4
- package/dist/runtime-host-capability-provider-command.js +41 -8
- package/dist/runtime-host-cli-context.js +300 -80
- package/dist/runtime-host-cli-installation.js +8 -2
- package/dist/runtime-host-cli.js +360 -64
- package/dist/runtime-host-handoff-surface.js +108 -0
- package/dist/runtime-host-help.js +244 -0
- package/dist/runtime-host-installed-update-activator.js +70 -33
- package/dist/runtime-host-installed-update-bootstrap.js +16 -1
- package/dist/runtime-host-installed-update-coordinator.js +44 -96
- package/dist/runtime-host-lifecycle-transaction.js +101 -28
- package/dist/runtime-host-local-handoff.js +215 -41
- package/dist/runtime-host-local-managed-activation.js +84 -0
- package/dist/runtime-host-local-source-retirement.js +119 -0
- package/dist/runtime-host-local-target-activation.js +141 -0
- package/dist/runtime-host-managed-deployment.js +158 -51
- package/dist/runtime-host-managed-lifecycle-manager.js +5 -6
- package/dist/runtime-host-onboarding.js +363 -23
- package/dist/runtime-host-openrc-service.js +469 -0
- package/dist/runtime-host-operator-retirement.js +50 -0
- package/dist/runtime-host-package-deployment.js +36 -2
- package/dist/runtime-host-peer-artifact.js +3 -3
- package/dist/runtime-host-peer-management-command.js +30 -12
- package/dist/runtime-host-peer-mesh-management-command.js +1 -1
- package/dist/runtime-host-plugin-command.js +101 -0
- package/dist/runtime-host-profile-command.js +1 -1
- package/dist/runtime-host-run-command.js +89 -67
- package/dist/runtime-host-run-mcp.js +161 -0
- package/dist/runtime-host-service-command.js +3 -3
- package/dist/runtime-host-service-management-command.js +67 -17
- package/dist/runtime-host-service-manager.js +30 -11
- package/dist/runtime-host-session-channel.js +282 -28
- package/dist/runtime-host-session-driver.js +115 -55
- package/dist/runtime-host-session-update.js +62 -0
- package/dist/runtime-host-setup-command.js +72 -52
- package/dist/runtime-host-task-readiness.js +2 -3
- package/dist/runtime-host-tui-command.js +63 -82
- package/dist/runtime-host-tui-context.js +74 -11
- package/dist/runtime-host-tui-owner.js +226 -0
- package/dist/runtime-host-update-command.js +165 -70
- package/dist/runtime-host-update-discovery.js +1 -0
- package/dist/runtime-host-update-reconciliation.js +7 -7
- package/dist/runtime-host-windows-service.js +166 -0
- package/dist/runtime-host-windows-task-launcher-artifact.js +75 -0
- package/dist/session-export-command.js +72 -0
- package/dist/session-import-command.js +69 -0
- package/dist/tui-autocomplete-layout.js +3 -1
- package/dist/tui-clipboard.js +86 -0
- package/dist/tui-context-refresh.js +92 -0
- package/dist/tui-copy-catalog.js +1060 -14
- package/dist/tui-copy-command.js +103 -0
- package/dist/tui-editor-render.js +36 -0
- package/dist/tui-host-owner-copy.js +24 -0
- package/dist/tui-mcp-control.js +162 -122
- package/dist/tui-mcp-remote-publication.js +395 -0
- package/dist/workspace-root.js +2 -2
- package/native/runtime-host-peer/prebuilds/darwin-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/win32-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +12 -12
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +52 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +5 -4
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +7 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +51 -8
- package/node_modules/@agentclientprotocol/sdk/package.json +2 -2
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +90 -2
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +103 -12
- package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +257 -0
- package/node_modules/@ai-sdk/anthropic/README.md +1 -1
- package/node_modules/@ai-sdk/anthropic/dist/index.js +2478 -1198
- package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +1822 -894
- package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +590 -80
- package/node_modules/@ai-sdk/anthropic/package.json +6 -6
- package/node_modules/@ai-sdk/code-mode/dist/approval-continuation.js +0 -1
- package/node_modules/@ai-sdk/code-mode/dist/code-mode-tool.js +26 -7
- package/node_modules/@ai-sdk/code-mode/dist/errors.js +0 -8
- package/node_modules/@ai-sdk/code-mode/dist/interrupt-continuation.js +0 -2
- package/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +8 -19
- package/node_modules/@ai-sdk/code-mode/dist/tool-prompt.js +43 -15
- package/node_modules/@ai-sdk/code-mode/package.json +5 -5
- package/node_modules/@ai-sdk/cohere/CHANGELOG.md +204 -0
- package/node_modules/@ai-sdk/cohere/README.md +1 -1
- package/node_modules/@ai-sdk/cohere/dist/index.js +54 -70
- package/node_modules/@ai-sdk/cohere/docs/25-cohere.mdx +11 -9
- package/node_modules/@ai-sdk/cohere/package.json +6 -6
- package/node_modules/@ai-sdk/gateway/CHANGELOG.md +385 -0
- package/node_modules/@ai-sdk/gateway/README.md +1 -1
- package/node_modules/@ai-sdk/gateway/dist/index.js +1326 -357
- package/node_modules/@ai-sdk/gateway/docs/00-ai-gateway.mdx +547 -29
- package/node_modules/@ai-sdk/gateway/package.json +8 -8
- package/node_modules/@ai-sdk/google/CHANGELOG.md +356 -0
- package/node_modules/@ai-sdk/google/README.md +1 -1
- package/node_modules/@ai-sdk/google/dist/index.js +6356 -4699
- package/node_modules/@ai-sdk/google/dist/internal/index.js +1207 -824
- package/node_modules/@ai-sdk/google/docs/15-google.mdx +444 -133
- package/node_modules/@ai-sdk/google/package.json +6 -6
- package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +190 -0
- package/node_modules/@ai-sdk/open-responses/dist/index.js +908 -124
- package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +240 -4
- package/node_modules/@ai-sdk/open-responses/package.json +4 -4
- package/node_modules/@ai-sdk/openai/CHANGELOG.md +331 -0
- package/node_modules/@ai-sdk/openai/README.md +27 -2
- package/node_modules/@ai-sdk/openai/dist/index.js +3791 -1897
- package/node_modules/@ai-sdk/openai/dist/internal/index.js +3008 -1980
- package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +485 -120
- package/node_modules/@ai-sdk/openai/package.json +6 -6
- package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +236 -0
- package/node_modules/@ai-sdk/openai-compatible/dist/index.js +218 -143
- package/node_modules/@ai-sdk/openai-compatible/dist/internal/index.js +31 -14
- package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +80 -0
- package/node_modules/@ai-sdk/openai-compatible/package.json +6 -6
- package/node_modules/@ai-sdk/provider/CHANGELOG.md +91 -0
- package/node_modules/@ai-sdk/provider/dist/index.js +127 -102
- package/node_modules/@ai-sdk/provider/package.json +3 -3
- package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +191 -0
- package/node_modules/@ai-sdk/provider-utils/dist/experimental-evaluation/index.js +1618 -0
- package/node_modules/@ai-sdk/provider-utils/dist/index.js +1105 -407
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +3 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/Dispatcher.md +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h2.js +84 -19
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/retry-handler.js +109 -23
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/decompress.js +338 -46
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/connection.js +19 -9
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/package.json +1 -1
- package/node_modules/@ai-sdk/provider-utils/package.json +10 -5
- package/node_modules/@earendil-works/pi-tui/README.md +61 -6
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +202 -42
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +54 -14
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +29 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +114 -28
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +44 -5
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +10 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +21 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +8 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +49 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +79 -9
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +5 -4
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +23 -22
- package/node_modules/@earendil-works/pi-tui/dist/index.js +4 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/latex.js +123 -16
- package/node_modules/@earendil-works/pi-tui/dist/layout.js +32 -9
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +3 -50
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +19 -0
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +42 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +38 -6
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +19 -30
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +427 -60
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +111 -50
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +123 -9
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +13 -0
- package/node_modules/@earendil-works/pi-tui/native/clipboard.h +170 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +8 -6
- package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +12 -5
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +93 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/README.md +23 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +65 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +70 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +274 -0
- package/node_modules/@earendil-works/pi-tui/native/napi.h +89 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/README.md +16 -7
- package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +7 -4
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +241 -0
- package/node_modules/@earendil-works/pi-tui/package.json +11 -4
- package/node_modules/@larksuiteoapi/node-sdk/README.md +20 -0
- package/node_modules/@larksuiteoapi/node-sdk/README.zh.md +20 -0
- package/node_modules/@larksuiteoapi/node-sdk/es/index.js +232 -36
- package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +232 -36
- package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
- package/node_modules/@maka/acp-executor-plugin/dist/acp-errors.js +26 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-filesystem.js +103 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-process.js +119 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-projection.js +146 -0
- package/node_modules/@maka/acp-executor-plugin/dist/index.js +958 -0
- package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +24719 -0
- package/node_modules/@maka/acp-executor-plugin/package.json +15 -0
- package/node_modules/@maka/antigravity-acp-plugin/dist/index.js +88 -0
- package/node_modules/@maka/antigravity-acp-plugin/dist/model-presentation.js +53 -0
- package/node_modules/@maka/antigravity-acp-plugin/dist/plugin.mjs +115 -0
- package/node_modules/@maka/antigravity-acp-plugin/package.json +15 -0
- package/node_modules/@maka/core/dist/agent-graph-schedule.js +15 -4
- package/node_modules/@maka/core/dist/agent-run.js +25 -336
- package/node_modules/@maka/core/dist/artifacts.js +33 -23
- package/node_modules/@maka/core/dist/attachments.js +107 -1
- package/node_modules/@maka/core/dist/bot-events.js +18 -63
- package/node_modules/@maka/core/dist/bounded-response.js +71 -0
- package/node_modules/@maka/core/dist/canonical-json.js +27 -0
- package/node_modules/@maka/core/dist/canonical-runtime-event.js +3 -1
- package/node_modules/@maka/core/dist/capabilities.js +35 -0
- package/node_modules/@maka/core/dist/chat-model-choice.js +14 -31
- package/node_modules/@maka/core/dist/client-capability-grant.js +149 -0
- package/node_modules/@maka/core/dist/collaboration.js +12 -0
- package/node_modules/@maka/core/dist/computer-use.js +27 -93
- package/node_modules/@maka/core/dist/connection-error-copy.js +17 -34
- package/node_modules/@maka/core/dist/connection-readiness.js +3 -31
- package/node_modules/@maka/core/dist/diagnostic-log.js +18 -7
- package/node_modules/@maka/core/dist/display-redaction.js +18 -0
- package/node_modules/@maka/core/dist/durable-tool-result-projection.js +126 -0
- package/node_modules/@maka/core/dist/events.js +125 -21
- package/node_modules/@maka/core/dist/execution-inspect.js +12 -21
- package/node_modules/@maka/core/dist/executor-catalog.js +115 -0
- package/node_modules/@maka/core/dist/executor-id.js +22 -0
- package/node_modules/@maka/core/dist/external-session.js +65 -3
- package/node_modules/@maka/core/dist/goal.js +44 -2
- package/node_modules/@maka/core/dist/health.js +50 -45
- package/node_modules/@maka/core/dist/interaction.js +657 -2
- package/node_modules/@maka/core/dist/llm-connections.js +108 -97
- package/node_modules/@maka/core/dist/local-memory.js +2 -2
- package/node_modules/@maka/core/dist/maka-wordmark.js +23 -0
- package/node_modules/@maka/core/dist/mcp.js +4 -1
- package/node_modules/@maka/core/dist/message-queue-order.js +47 -0
- package/node_modules/@maka/core/dist/model-call-attempt.js +134 -82
- package/node_modules/@maka/core/dist/model-call-usage-projection.js +0 -196
- package/node_modules/@maka/core/dist/model-catalog.js +194 -337
- package/node_modules/@maka/core/dist/model-facts.js +204 -0
- package/node_modules/@maka/core/dist/model-failure.js +40 -0
- package/node_modules/@maka/core/dist/model-metadata.generated.js +2069 -1878
- package/node_modules/@maka/core/dist/model-metadata.js +371 -215
- package/node_modules/@maka/core/dist/model-projection-transition.js +145 -0
- package/node_modules/@maka/core/dist/model-thinking.js +133 -34
- package/node_modules/@maka/core/dist/model-web-search.js +13 -15
- package/node_modules/@maka/core/dist/models-dev-projection.js +320 -0
- package/node_modules/@maka/core/dist/models-dev-refresh.js +55 -0
- package/node_modules/@maka/core/dist/onboarding.js +3 -5
- package/node_modules/@maka/core/dist/openai-urls.js +51 -0
- package/node_modules/@maka/core/dist/permission-profile.js +17 -0
- package/node_modules/@maka/core/dist/permission.js +0 -1
- package/node_modules/@maka/core/dist/provider-auth.js +49 -291
- package/node_modules/@maka/core/dist/provider-registry.js +251 -494
- package/node_modules/@maka/core/dist/recall.js +1143 -0
- package/node_modules/@maka/core/dist/record-schema.js +22 -2
- package/node_modules/@maka/core/dist/redaction.js +128 -43
- package/node_modules/@maka/core/dist/refresh-read-coordinator.js +62 -0
- package/node_modules/@maka/core/dist/relative-time-policy.js +71 -0
- package/node_modules/@maka/core/dist/relative-time.js +26 -77
- package/node_modules/@maka/core/dist/run-composition.js +77 -2
- package/node_modules/@maka/core/dist/runtime-boundary.js +182 -66
- package/node_modules/@maka/core/dist/runtime-event-store.js +31 -0
- package/node_modules/@maka/core/dist/runtime-event.js +270 -12
- package/node_modules/@maka/core/dist/runtime-handoff.js +106 -0
- package/node_modules/@maka/core/dist/runtime-invocation.js +228 -0
- package/node_modules/@maka/core/dist/runtime-logical-execution.js +137 -0
- package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +247 -74
- package/node_modules/@maka/core/dist/runtime-policy/credential-vault-codec.js +15 -1
- package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +106 -0
- package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +139 -4
- package/node_modules/@maka/core/dist/runtime-policy.js +7 -3
- package/node_modules/@maka/core/dist/scheduled-task.js +12 -2
- package/node_modules/@maka/core/dist/session-name.js +2 -3
- package/node_modules/@maka/core/dist/session-reference.js +149 -0
- package/node_modules/@maka/core/dist/session-send-projection.js +8 -4
- package/node_modules/@maka/core/dist/session-start-mode.js +39 -0
- package/node_modules/@maka/core/dist/session-todo.js +101 -0
- package/node_modules/@maka/core/dist/session-trace.js +5 -1
- package/node_modules/@maka/core/dist/session.js +356 -57
- package/node_modules/@maka/core/dist/settings.js +50 -12
- package/node_modules/@maka/core/dist/shell-run-result.js +1 -0
- package/node_modules/@maka/core/dist/shell-run.js +15 -0
- package/node_modules/@maka/core/dist/skill-locations.js +29 -0
- package/node_modules/@maka/core/dist/slash-command-catalog.js +4 -0
- package/node_modules/@maka/core/dist/task-submission-readiness.js +2 -1
- package/node_modules/@maka/core/dist/text-sanitize.js +29 -4
- package/node_modules/@maka/core/dist/tool-activity-args.js +4 -0
- package/node_modules/@maka/core/dist/tool-ledger-scanner.js +365 -104
- package/node_modules/@maka/core/dist/tool-quiet-preview.js +53 -26
- package/node_modules/@maka/core/dist/tool-result-archive-evidence.js +22 -0
- package/node_modules/@maka/core/dist/tool-result-record-schema.js +12 -2
- package/node_modules/@maka/core/dist/transcript-search.js +46 -0
- package/node_modules/@maka/core/dist/turn-origin.js +20 -0
- package/node_modules/@maka/core/dist/ui-locale.js +23 -10
- package/node_modules/@maka/core/dist/unified-diff.js +33 -26
- package/node_modules/@maka/core/dist/usage-ledger-merge.js +10 -9
- package/node_modules/@maka/core/dist/usage-record-schema.js +38 -31
- package/node_modules/@maka/core/dist/usage-stats/types.js +3 -0
- package/node_modules/@maka/core/dist/work-board.js +94 -1
- package/node_modules/@maka/core/dist/workhub-action-result.js +68 -0
- package/node_modules/@maka/core/dist/workhub-routing.js +126 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/index.js +2178 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
- package/node_modules/@maka/core/node_modules/intl-messageformat/intl-messageformat.iife.js +2810 -0
- package/node_modules/@maka/core/node_modules/intl-messageformat/package.json +40 -0
- package/node_modules/@maka/core/package.json +34 -8
- package/node_modules/@maka/eval/dist/egress-audit.js +127 -0
- package/node_modules/@maka/eval/dist/experiment-directory.js +4 -13
- package/node_modules/@maka/eval/dist/fleet-simulation.js +270 -0
- package/node_modules/@maka/eval/dist/fleet-store.js +243 -0
- package/node_modules/@maka/eval/dist/fleet-worker.js +125 -0
- package/node_modules/@maka/eval/dist/fleet.js +329 -0
- package/node_modules/@maka/eval/dist/harbor-external-subject.js +2 -1
- package/node_modules/@maka/eval/dist/harbor-maka-subject.js +16 -3
- package/node_modules/@maka/eval/dist/harness-executor.js +19 -98
- package/node_modules/@maka/eval/dist/index.js +3 -0
- package/node_modules/@maka/eval/dist/install-preflight.js +39 -10
- package/node_modules/@maka/eval/dist/maka-artifacts.js +28 -14
- package/node_modules/@maka/eval/dist/maka-subject.js +35 -3
- package/node_modules/@maka/eval/dist/metering-checkpoint.js +4 -4
- package/node_modules/@maka/eval/dist/process-termination.js +83 -0
- package/node_modules/@maka/eval/dist/toolchain-verification.js +1 -1
- package/node_modules/@maka/eval/harbor/egress-proxy/entrypoint.sh +6 -5
- package/node_modules/@maka/eval/harbor/egress_filter.py +202 -136
- package/node_modules/@maka/eval/harbor/eval_framework.py +39 -16
- package/node_modules/@maka/eval/harbor/relay_agent.py +47 -10
- package/node_modules/@maka/eval/harbor/run_trial.py +13 -6
- package/node_modules/@maka/eval/node_modules/undici/README.md +10 -1
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Interceptors.md +8 -3
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/core/request.js +23 -2
- 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 +0 -39
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +94 -10
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +9 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +31 -9
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +33 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +29 -10
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +26 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +215 -38
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/cache.js +69 -13
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/decompress.js +319 -50
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/@maka/eval/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +38 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/index.js +52 -25
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/request.js +76 -82
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/util.js +13 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/webidl/index.js +5 -17
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/connection.js +34 -13
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/stream/websocketstream.js +27 -14
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/@maka/eval/node_modules/undici/package.json +3 -3
- package/node_modules/@maka/eval/package.json +1 -1
- package/node_modules/@maka/mcp/dist/credential-coordinator.js +6 -1
- package/node_modules/@maka/mcp/dist/form-elicitation.js +213 -0
- package/node_modules/@maka/mcp/dist/index.js +517 -72
- package/node_modules/@maka/mcp/dist/oauth.js +58 -8
- package/node_modules/@maka/mcp/dist/sep-2243.js +3 -3
- package/node_modules/@maka/mcp/dist/tool-progress.js +45 -0
- package/node_modules/@maka/mcp/package.json +1 -1
- package/node_modules/@maka/runtime/dist/agent-graph-supervisor-wake.js +33 -6
- package/node_modules/@maka/runtime/dist/agent-graph-timeline.js +12 -11
- package/node_modules/@maka/runtime/dist/agent-run-inspect.js +38 -86
- package/node_modules/@maka/runtime/dist/agent-run-recovery.js +36 -46
- package/node_modules/@maka/runtime/dist/agent-run.js +603 -470
- package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +116 -3753
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction-contract.js +6 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +511 -549
- package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +623 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-tool-repair.js +115 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +2616 -0
- package/node_modules/@maka/runtime/dist/apply-patch-profile.js +64 -14
- package/node_modules/@maka/runtime/dist/ask-user-question-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/background-task-health-tool.js +104 -0
- package/node_modules/@maka/runtime/dist/bash-model-output.js +7 -1
- package/node_modules/@maka/runtime/dist/bash-tail-buffer.js +13 -52
- package/node_modules/@maka/runtime/dist/bots/base-adapter.js +17 -0
- package/node_modules/@maka/runtime/dist/bots/bot-test.js +40 -23
- package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +93 -24
- package/node_modules/@maka/runtime/dist/bots/discord-bridge.js +4 -4
- package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +28 -25
- package/node_modules/@maka/runtime/dist/bots/proxied-fetch.js +5 -4
- package/node_modules/@maka/runtime/dist/bots/qq-bridge.js +6 -4
- package/node_modules/@maka/runtime/dist/bots/slack-bridge.js +8 -7
- package/node_modules/@maka/runtime/dist/bots/telegram-bridge.js +7 -31
- package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +104 -48
- package/node_modules/@maka/runtime/dist/bots/wecom-bridge.js +45 -42
- package/node_modules/@maka/runtime/dist/bots/ws-bridge-base.js +2 -3
- package/node_modules/@maka/runtime/dist/builtin-tools.js +134 -133
- package/node_modules/@maka/runtime/dist/bundled-skill-catalog.generated.js +1 -1
- package/node_modules/@maka/runtime/dist/child-fd-input.js +3 -2
- package/node_modules/@maka/runtime/dist/code-mode.js +7 -4
- package/node_modules/@maka/runtime/dist/codex-v4a-patch.js +18 -0
- package/node_modules/@maka/runtime/dist/computer-use-codec.js +1 -141
- package/node_modules/@maka/runtime/dist/computer-use-tools.js +162 -205
- package/node_modules/@maka/runtime/dist/context-budget-helpers.js +7 -56
- package/node_modules/@maka/runtime/dist/context-budget-policy.js +26 -65
- package/node_modules/@maka/runtime/dist/context-budget.js +44 -103
- package/node_modules/@maka/runtime/dist/context-diagnostics.js +72 -33
- package/node_modules/@maka/runtime/dist/continuation-replay.js +25 -12
- package/node_modules/@maka/runtime/dist/conversation-copy.js +731 -356
- package/node_modules/@maka/runtime/dist/cua-frame-state.js +1 -69
- package/node_modules/@maka/runtime/dist/deepseek-web-search-codec.js +71 -0
- package/node_modules/@maka/runtime/dist/durable-tool-result-projection.js +436 -0
- package/node_modules/@maka/runtime/dist/edit-replace.js +9 -9
- package/node_modules/@maka/runtime/dist/execution-inspect.js +56 -41
- package/node_modules/@maka/runtime/dist/filesystem-executor.js +17 -28
- package/node_modules/@maka/runtime/dist/filesystem-worker/client.js +77 -19
- package/node_modules/@maka/runtime/dist/filesystem-worker/launch-spec.js +66 -55
- package/node_modules/@maka/runtime/dist/filesystem-worker/operations.js +50 -125
- package/node_modules/@maka/runtime/dist/filesystem-worker/protocol.js +29 -11
- package/node_modules/@maka/runtime/dist/filesystem-worker/worker-entry.js +2 -0
- package/node_modules/@maka/runtime/dist/format-json.js +39 -0
- package/node_modules/@maka/runtime/dist/github-copilot-oauth-enrollment.js +267 -0
- package/node_modules/@maka/runtime/dist/glob-search.js +87 -0
- package/node_modules/@maka/runtime/dist/goal-continuation.js +119 -13
- package/node_modules/@maka/runtime/dist/goal-evaluator.js +10 -4
- package/node_modules/@maka/runtime/dist/goal-state.js +7 -0
- package/node_modules/@maka/runtime/dist/grep-search.js +155 -0
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint-coordinator.js +16 -6
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +79 -34
- package/node_modules/@maka/runtime/dist/history-compact-error.js +10 -2
- package/node_modules/@maka/runtime/dist/history-compact-input-fit.js +7 -1
- package/node_modules/@maka/runtime/dist/history-compact-ledger.js +18 -18
- package/node_modules/@maka/runtime/dist/history-compact-summarizer.js +132 -110
- package/node_modules/@maka/runtime/dist/history-compact-summary-validation.js +14 -30
- package/node_modules/@maka/runtime/dist/history-compaction.js +114 -93
- package/node_modules/@maka/runtime/dist/image-file.js +26 -33
- package/node_modules/@maka/runtime/dist/interaction-authority.js +85 -0
- package/node_modules/@maka/runtime/dist/latest-context-snapshot.js +112 -23
- package/node_modules/@maka/runtime/dist/ledger-tool-result-archive-reader.js +164 -0
- package/node_modules/@maka/runtime/dist/local-web-fetch.js +26 -55
- package/node_modules/@maka/runtime/dist/mcp-tools.js +102 -37
- package/node_modules/@maka/runtime/dist/memory-extraction-evidence.js +7 -1
- package/node_modules/@maka/runtime/dist/memory-extraction.js +30 -19
- package/node_modules/@maka/runtime/dist/message-authority.js +9 -0
- package/node_modules/@maka/runtime/dist/model-adapter.js +291 -193
- package/node_modules/@maka/runtime/dist/model-factory.js +131 -135
- package/node_modules/@maka/runtime/dist/model-fetcher.js +102 -90
- package/node_modules/@maka/runtime/dist/model-history.js +533 -169
- package/node_modules/@maka/runtime/dist/model-projection-transition-ledger.js +207 -0
- package/node_modules/@maka/runtime/dist/model-runtime.js +91 -113
- package/node_modules/@maka/runtime/dist/native-web-search-tool.js +2 -1
- package/node_modules/@maka/runtime/dist/network/abortable-connector.js +55 -0
- package/node_modules/@maka/runtime/dist/network/proxy-dispatcher.js +72 -37
- package/node_modules/@maka/runtime/dist/network/proxy-test.js +1 -1
- package/node_modules/@maka/runtime/dist/network/scoped-fetch-transport.js +7 -2
- package/node_modules/@maka/runtime/dist/oauth-provider-contracts.js +28 -1
- package/node_modules/@maka/runtime/dist/openai-apply-patch.js +5 -0
- package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +29 -77
- package/node_modules/@maka/runtime/dist/openai-responses-websocket.js +2 -5
- package/node_modules/@maka/runtime/dist/opencode-session-header.js +30 -0
- package/node_modules/@maka/runtime/dist/pipe-tail-collector.js +6 -9
- package/node_modules/@maka/runtime/dist/plan-mode.js +0 -65
- package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/plugin-agent-service.js +123 -0
- package/node_modules/@maka/runtime/dist/plugin-approval-service.js +33 -0
- package/node_modules/@maka/runtime/dist/plugin-attachment-service.js +45 -0
- package/node_modules/@maka/runtime/dist/plugin-client-bridge-service.js +308 -0
- package/node_modules/@maka/runtime/dist/plugin-command-service.js +100 -0
- package/node_modules/@maka/runtime/dist/plugin-composition-loader.js +209 -56
- package/node_modules/@maka/runtime/dist/plugin-data-services.js +315 -0
- package/node_modules/@maka/runtime/dist/plugin-executor-backend.js +451 -0
- package/node_modules/@maka/runtime/dist/plugin-executor-service.js +576 -0
- package/node_modules/@maka/runtime/dist/plugin-fs-service.js +54 -0
- package/node_modules/@maka/runtime/dist/plugin-goal-service.js +53 -0
- package/node_modules/@maka/runtime/dist/plugin-internals.js +78 -0
- package/node_modules/@maka/runtime/dist/plugin-invocation-signal.js +24 -0
- package/node_modules/@maka/runtime/dist/plugin-llm-service.js +77 -0
- package/node_modules/@maka/runtime/dist/plugin-lsp-service.js +94 -0
- package/node_modules/@maka/runtime/dist/plugin-runtime.js +211 -10
- package/node_modules/@maka/runtime/dist/plugin-scope-registry.js +91 -0
- package/node_modules/@maka/runtime/dist/plugin-session-query-service.js +63 -0
- package/node_modules/@maka/runtime/dist/plugin-shell-env-service.js +87 -0
- package/node_modules/@maka/runtime/dist/plugin-shell-service.js +66 -0
- package/node_modules/@maka/runtime/dist/plugin-skill-service.js +93 -0
- package/node_modules/@maka/runtime/dist/plugin-system-prompt-service.js +346 -0
- package/node_modules/@maka/runtime/dist/plugin-tool-service.js +171 -0
- package/node_modules/@maka/runtime/dist/plugin-user-question-service.js +43 -0
- package/node_modules/@maka/runtime/dist/plugin-web-service.js +61 -0
- package/node_modules/@maka/runtime/dist/prior-run-context.js +24 -94
- package/node_modules/@maka/runtime/dist/process-tree-terminator.js +2 -2
- package/node_modules/@maka/runtime/dist/prompt-composition.js +36 -31
- package/node_modules/@maka/runtime/dist/provider-error-classification.js +127 -205
- package/node_modules/@maka/runtime/dist/provider-error-signals.js +31 -0
- package/node_modules/@maka/runtime/dist/provider-image-overflow-recovery.js +12 -31
- package/node_modules/@maka/runtime/dist/provider-request-telemetry.js +207 -204
- package/node_modules/@maka/runtime/dist/provider-retry-policy.js +79 -0
- package/node_modules/@maka/runtime/dist/provider-urls.js +1 -18
- package/node_modules/@maka/runtime/dist/pty-screen-collector.js +32 -6
- package/node_modules/@maka/runtime/dist/quiescent-session-snapshot.js +78 -0
- package/node_modules/@maka/runtime/dist/read-page.js +234 -0
- package/node_modules/@maka/runtime/dist/recall-candidates.js +53 -0
- package/node_modules/@maka/runtime/dist/recall-tools.js +282 -0
- package/node_modules/@maka/runtime/dist/recovery-resolver.js +0 -59
- package/node_modules/@maka/runtime/dist/request-customization-fetch.js +14 -7
- package/node_modules/@maka/runtime/dist/request-projection.js +2 -15
- package/node_modules/@maka/runtime/dist/request-shape.js +187 -365
- package/node_modules/@maka/runtime/dist/responses-reasoning-state.js +19 -7
- package/node_modules/@maka/runtime/dist/ripgrep-executable.js +62 -0
- package/node_modules/@maka/runtime/dist/ripgrep-guidance.js +81 -0
- package/node_modules/@maka/runtime/dist/run-handoff-gate.js +97 -0
- package/node_modules/@maka/runtime/dist/run-trace.js +2 -34
- package/node_modules/@maka/runtime/dist/runtime-continuation-admission.js +1 -1
- package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +114 -66
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +420 -234
- package/node_modules/@maka/runtime/dist/runtime-invocation-route.js +49 -0
- package/node_modules/@maka/runtime/dist/runtime-kernel.js +619 -357
- package/node_modules/@maka/runtime/dist/runtime-ledger-repair.js +235 -450
- package/node_modules/@maka/runtime/dist/runtime-read-model.js +94 -200
- package/node_modules/@maka/runtime/dist/runtime-resume.js +162 -126
- package/node_modules/@maka/runtime/dist/sandbox/index.js +0 -1
- package/node_modules/@maka/runtime/dist/sandbox/linux-profile-path.js +7 -1
- package/node_modules/@maka/runtime/dist/sandbox/linux-sandbox.js +20 -17
- package/node_modules/@maka/runtime/dist/sandbox/macos-seatbelt.js +0 -12
- package/node_modules/@maka/runtime/dist/sandbox/sandbox-manager.js +0 -35
- package/node_modules/@maka/runtime/dist/sandbox/windows-sandbox.js +0 -12
- package/node_modules/@maka/runtime/dist/scheduled-task-tools.js +68 -9
- package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +67 -20
- package/node_modules/@maka/runtime/dist/session-export.js +178 -0
- package/node_modules/@maka/runtime/dist/session-import.js +100 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +985 -1067
- package/node_modules/@maka/runtime/dist/session-projection-helpers.js +18 -28
- package/node_modules/@maka/runtime/dist/session-recap.js +90 -17
- package/node_modules/@maka/runtime/dist/session-todo-tools.js +67 -0
- package/node_modules/@maka/runtime/dist/session-trace-projection.js +25 -30
- package/node_modules/@maka/runtime/dist/shell-detect.js +3 -7
- package/node_modules/@maka/runtime/dist/shell-exec.js +7 -25
- package/node_modules/@maka/runtime/dist/shell-run-contract.js +0 -1
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +83 -78
- package/node_modules/@maka/runtime/dist/shell-run-tool-result.js +19 -9
- package/node_modules/@maka/runtime/dist/shell-tools.js +84 -14
- package/node_modules/@maka/runtime/dist/skills-discovery.js +17 -23
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +96 -20
- package/node_modules/@maka/runtime/dist/stream-graph-handoff.js +6 -1
- package/node_modules/@maka/runtime/dist/stream-graph-projection.js +18 -15
- package/node_modules/@maka/runtime/dist/stream-graph-read-model.js +5 -0
- package/node_modules/@maka/runtime/dist/stream-graph-schedule-reconcile.js +1 -0
- package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +26 -12
- package/node_modules/@maka/runtime/dist/stream-usage-fallback-fetch.js +74 -0
- package/node_modules/@maka/runtime/dist/subagent-tools.js +77 -90
- package/node_modules/@maka/runtime/dist/subscription-credentials.js +51 -4
- package/node_modules/@maka/runtime/dist/subscription-model-fetch.js +135 -13
- package/node_modules/@maka/runtime/dist/system-prompt/main-session-prompt.js +21 -2
- package/node_modules/@maka/runtime/dist/system-prompt/workspace-instructions.js +11 -6
- package/node_modules/@maka/runtime/dist/tavily-search.js +8 -2
- package/node_modules/@maka/runtime/dist/telemetry/model-pricing.generated.js +299 -215
- package/node_modules/@maka/runtime/dist/terminal-run-commit.js +42 -171
- package/node_modules/@maka/runtime/dist/test-connection.js +35 -85
- package/node_modules/@maka/runtime/dist/text-line-window.js +49 -0
- package/node_modules/@maka/runtime/dist/tool-activation-identity.js +41 -0
- package/node_modules/@maka/runtime/dist/tool-availability.js +89 -8
- package/node_modules/@maka/runtime/dist/tool-output.js +36 -13
- package/node_modules/@maka/runtime/dist/tool-result-archive-capability.js +24 -36
- package/node_modules/@maka/runtime/dist/tool-result-archive-encoding.js +38 -0
- package/node_modules/@maka/runtime/dist/tool-result-archive-resource.js +93 -245
- package/node_modules/@maka/runtime/dist/tool-result-archive-transition.js +186 -0
- package/node_modules/@maka/runtime/dist/tool-result-archive.js +50 -173
- package/node_modules/@maka/runtime/dist/tool-runtime.js +415 -613
- package/node_modules/@maka/runtime/dist/unified-diff.js +40 -10
- package/node_modules/@maka/runtime/dist/web-fetch-tool.js +4 -2
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +13681 -5108
- package/node_modules/@maka/runtime/dist/workspace-executor.js +26 -35
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/README.md +44 -8
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/package.json +4 -4
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +39 -3
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +4 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +3 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/Dispatcher.md +1 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h2.js +84 -19
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/retry-handler.js +109 -23
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/decompress.js +338 -46
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/connection.js +19 -9
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- 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 +5 -5
- package/node_modules/@maka/runtime/node_modules/undici/README.md +10 -1
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Interceptors.md +8 -3
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/request.js +23 -2
- 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 +0 -39
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +94 -10
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +9 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +31 -9
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +33 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +29 -10
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +26 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +215 -38
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/cache.js +69 -13
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/decompress.js +319 -50
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/@maka/runtime/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +38 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/index.js +52 -25
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/request.js +76 -82
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/util.js +13 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/webidl/index.js +5 -17
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/connection.js +34 -13
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/stream/websocketstream.js +27 -14
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/@maka/runtime/node_modules/undici/package.json +3 -3
- package/node_modules/@maka/runtime/package.json +53 -22
- package/node_modules/@maka/runtime-host/dist/adapter/provider-retry-projector.js +63 -0
- package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +137 -156
- package/node_modules/@maka/runtime-host/dist/candidate-cli.js +7 -7
- package/node_modules/@maka/runtime-host/dist/candidate-entry.js +18 -7
- package/node_modules/@maka/runtime-host/dist/candidate-launch-owner-guard.js +13 -0
- package/node_modules/@maka/runtime-host/dist/client/capability-provider-service.js +2 -0
- package/node_modules/@maka/runtime-host/dist/client/catalog-reader.js +64 -25
- package/node_modules/@maka/runtime-host/dist/client/client-capability-channel.js +190 -30
- package/node_modules/@maka/runtime-host/dist/client/connect-or-spawn.js +60 -20
- package/node_modules/@maka/runtime-host/dist/client/connection.js +170 -63
- package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +248 -0
- package/node_modules/@maka/runtime-host/dist/client/host-handoff.js +311 -0
- package/node_modules/@maka/runtime-host/dist/client/host-profile.js +483 -94
- package/node_modules/@maka/runtime-host/dist/client/host-retirement.js +28 -5
- package/node_modules/@maka/runtime-host/dist/client/hosted-execution-target.js +33 -6
- package/node_modules/@maka/runtime-host/dist/client/hosted-execution.js +10 -28
- package/node_modules/@maka/runtime-host/dist/client/index.js +15 -11
- package/node_modules/@maka/runtime-host/dist/client/launcher.js +12 -3
- package/node_modules/@maka/runtime-host/dist/client/oauth-presentation.js +1 -1
- package/node_modules/@maka/runtime-host/dist/client/owner-connection-code.js +38 -4
- package/node_modules/@maka/runtime-host/dist/client/peer-client.js +389 -25
- package/node_modules/@maka/runtime-host/dist/client/process-identity.js +73 -0
- package/node_modules/@maka/runtime-host/dist/client/reconnect-lifecycle.js +80 -8
- package/node_modules/@maka/runtime-host/dist/client/reconnecting-connection.js +15 -4
- package/node_modules/@maka/runtime-host/dist/client/registered-host-termination.js +107 -0
- package/node_modules/@maka/runtime-host/dist/client/remote-compatibility-error.js +2 -0
- package/node_modules/@maka/runtime-host/dist/client/session-catalog-summary.js +15 -1
- package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +105 -125
- package/node_modules/@maka/runtime-host/dist/client/ssh-operator-activation.js +48 -11
- package/node_modules/@maka/runtime-host/dist/client/startup-error.js +1 -1
- package/node_modules/@maka/runtime-host/dist/client/wait-for-ready.js +1 -1
- package/node_modules/@maka/runtime-host/dist/client/wsl-control.js +0 -8
- package/node_modules/@maka/runtime-host/dist/client/wsl-environment.js +12 -8
- package/node_modules/@maka/runtime-host/dist/client-capability-entity-id.js +27 -0
- package/node_modules/@maka/runtime-host/dist/composition-identity.js +19 -0
- package/node_modules/@maka/runtime-host/dist/control/endpoint.js +8 -9
- package/node_modules/@maka/runtime-host/dist/execution-candidate-main.js +8 -1
- package/node_modules/@maka/runtime-host/dist/node-error.js +22 -0
- package/node_modules/@maka/runtime-host/dist/operator/access-management-frame.js +10 -1
- package/node_modules/@maka/runtime-host/dist/operator/index.js +5 -2
- package/node_modules/@maka/runtime-host/dist/operator/managed-deployment.js +17 -8
- package/node_modules/@maka/runtime-host/dist/operator/operator-command.js +110 -0
- package/node_modules/@maka/runtime-host/dist/operator/peer-management-frame.js +2 -0
- package/node_modules/@maka/runtime-host/dist/operator/retirement-cancellation.js +20 -0
- package/node_modules/@maka/runtime-host/dist/operator/service-management-frame.js +5 -6
- package/node_modules/@maka/runtime-host/dist/operator/setup-frame.js +32 -6
- package/node_modules/@maka/runtime-host/dist/peer-mesh/index.js +3 -3
- package/node_modules/@maka/runtime-host/dist/peer-mesh/limits.js +1 -2
- package/node_modules/@maka/runtime-host/dist/peer-mesh/model.js +48 -60
- package/node_modules/@maka/runtime-host/dist/peer-mesh/node.js +1228 -472
- package/node_modules/@maka/runtime-host/dist/peer-mesh/owner.js +33 -70
- package/node_modules/@maka/runtime-host/dist/peer-mesh/store.js +141 -59
- package/node_modules/@maka/runtime-host/dist/peer-reachability/index.js +21 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/model.js +202 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/owner.js +118 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/publisher.js +243 -0
- package/node_modules/@maka/runtime-host/dist/protocol/agent-graph.js +5 -12
- package/node_modules/@maka/runtime-host/dist/protocol/artifact.js +11 -20
- package/node_modules/@maka/runtime-host/dist/protocol/client-capability.js +273 -46
- package/node_modules/@maka/runtime-host/dist/protocol/codec.js +11 -0
- package/node_modules/@maka/runtime-host/dist/protocol/configuration.js +55 -9
- package/node_modules/@maka/runtime-host/dist/protocol/connection-catalog-change.js +26 -0
- package/node_modules/@maka/runtime-host/dist/protocol/connection-effects.js +42 -9
- package/node_modules/@maka/runtime-host/dist/protocol/external-agent-setup.js +149 -0
- package/node_modules/@maka/runtime-host/dist/protocol/external-session.js +41 -12
- package/node_modules/@maka/runtime-host/dist/protocol/host-resources.js +253 -0
- package/node_modules/@maka/runtime-host/dist/protocol/host-status.js +49 -11
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +283 -5
- package/node_modules/@maka/runtime-host/dist/protocol/message-queue-limits.js +21 -0
- package/node_modules/@maka/runtime-host/dist/protocol/message.js +29 -112
- package/node_modules/@maka/runtime-host/dist/protocol/network-proxy.js +1 -7
- package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +104 -8
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +34 -10
- package/node_modules/@maka/runtime-host/dist/protocol/peer-mesh.js +14 -31
- package/node_modules/@maka/runtime-host/dist/protocol/plan.js +1 -0
- package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +899 -0
- package/node_modules/@maka/runtime-host/dist/protocol/project-catalog.js +2 -2
- package/node_modules/@maka/runtime-host/dist/protocol/prompt-suggestions.js +61 -0
- package/node_modules/@maka/runtime-host/dist/protocol/queue-mutation.js +136 -0
- package/node_modules/@maka/runtime-host/dist/protocol/recall.js +270 -0
- package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +84 -26
- package/node_modules/@maka/runtime-host/dist/protocol/runtime-resource.js +4 -17
- package/node_modules/@maka/runtime-host/dist/protocol/scheduled-task.js +26 -6
- package/node_modules/@maka/runtime-host/dist/protocol/session-bundle.js +100 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-catalog-change.js +24 -6
- package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +134 -14
- package/node_modules/@maka/runtime-host/dist/protocol/session-collaboration.js +68 -4
- package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +71 -34
- package/node_modules/@maka/runtime-host/dist/protocol/session-retirement.js +30 -3
- package/node_modules/@maka/runtime-host/dist/protocol/session-revision.js +11 -2
- package/node_modules/@maka/runtime-host/dist/protocol/session-todo.js +53 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-transcript.js +34 -127
- package/node_modules/@maka/runtime-host/dist/protocol/session-turns.js +38 -59
- package/node_modules/@maka/runtime-host/dist/protocol/skill-catalog.js +2 -1
- package/node_modules/@maka/runtime-host/dist/protocol/turn-provider-retry.js +69 -0
- package/node_modules/@maka/runtime-host/dist/protocol/turn.js +54 -95
- package/node_modules/@maka/runtime-host/dist/protocol/usage-pricing.js +39 -3
- package/node_modules/@maka/runtime-host/dist/protocol/usage-screen.js +312 -0
- package/node_modules/@maka/runtime-host/dist/protocol/workhub-coordination.js +218 -75
- package/node_modules/@maka/runtime-host/dist/server/access-authority.js +78 -17
- package/node_modules/@maka/runtime-host/dist/server/access-credential-metadata.js +4 -2
- package/node_modules/@maka/runtime-host/dist/server/access-credential-store.js +137 -49
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity-install.js +242 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity.js +154 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/connection.js +116 -0
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-coordinator.js +0 -3
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-execution-coordinator.js +1 -2
- package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +19 -22
- package/node_modules/@maka/runtime-host/dist/server/bootstrap-runtime-policy.js +95 -97
- package/node_modules/@maka/runtime-host/dist/server/builtin-external-agent-plugins.js +188 -0
- package/node_modules/@maka/runtime-host/dist/server/candidate.js +15 -7
- package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/canonical-turn-snapshot.js +34 -24
- package/node_modules/@maka/runtime-host/dist/server/canonical-usage-reader.js +24 -11
- package/node_modules/@maka/runtime-host/dist/server/child-agent-composition.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/client-capability-coordinator.js +633 -101
- package/node_modules/@maka/runtime-host/dist/server/client-capability-invocation-broker.js +266 -53
- package/node_modules/@maka/runtime-host/dist/server/client-capability-provider-id.js +31 -0
- package/node_modules/@maka/runtime-host/dist/server/client-capability-recovery.js +45 -44
- package/node_modules/@maka/runtime-host/dist/server/configuration-coordinator.js +20 -1
- package/node_modules/@maka/runtime-host/dist/server/connection-effect-coordinator.js +46 -18
- package/node_modules/@maka/runtime-host/dist/server/connection-session.js +42 -19
- package/node_modules/@maka/runtime-host/dist/server/context-coordinator.js +2 -0
- package/node_modules/@maka/runtime-host/dist/server/daily-review-coordinator.js +164 -82
- package/node_modules/@maka/runtime-host/dist/server/execution-artifacts.js +59 -57
- package/node_modules/@maka/runtime-host/dist/server/execution-candidate.js +4 -1
- package/node_modules/@maka/runtime-host/dist/server/execution-composition-factory.js +10 -4
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +1511 -240
- package/node_modules/@maka/runtime-host/dist/server/execution-inspect-coordinator.js +35 -29
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +160 -20
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +102 -73
- package/node_modules/@maka/runtime-host/dist/server/execution-service.js +49 -25
- package/node_modules/@maka/runtime-host/dist/server/extension-bundle.js +253 -0
- package/node_modules/@maka/runtime-host/dist/server/extension-package-manifest.js +280 -0
- package/node_modules/@maka/runtime-host/dist/server/external-agent-setup-coordinator.js +190 -0
- package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +130 -55
- package/node_modules/@maka/runtime-host/dist/server/failure-diagnostic.js +24 -0
- package/node_modules/@maka/runtime-host/dist/server/generated-text.js +39 -0
- package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +176 -40
- package/node_modules/@maka/runtime-host/dist/server/host-change-feed.js +26 -22
- package/node_modules/@maka/runtime-host/dist/server/host-composition-source.js +47 -0
- package/node_modules/@maka/runtime-host/dist/server/host-composition.js +1 -29
- package/node_modules/@maka/runtime-host/dist/server/host-kernel.js +164 -35
- package/node_modules/@maka/runtime-host/dist/server/host-residency-registry.js +41 -20
- package/node_modules/@maka/runtime-host/dist/server/host-resource-collector.js +223 -0
- package/node_modules/@maka/runtime-host/dist/server/host-resource-probe-main.js +44 -0
- package/node_modules/@maka/runtime-host/dist/server/host-resource-probe.js +83 -0
- package/node_modules/@maka/runtime-host/dist/server/host-session-availability.js +15 -4
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-admission-registry.js +3 -1
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-projection.js +12 -7
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +205 -75
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +82 -12
- package/node_modules/@maka/runtime-host/dist/server/index.js +5 -0
- package/node_modules/@maka/runtime-host/dist/server/interaction-coordinator.js +467 -40
- package/node_modules/@maka/runtime-host/dist/server/interaction-projection.js +36 -1
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +178 -126
- package/node_modules/@maka/runtime-host/dist/server/interactive-turn-coordinator.js +5 -17
- package/node_modules/@maka/runtime-host/dist/server/jev-routing-model.js +157 -0
- package/node_modules/@maka/runtime-host/dist/server/json-array-page-budget.js +48 -0
- package/node_modules/@maka/runtime-host/dist/server/listener-set.js +8 -6
- package/node_modules/@maka/runtime-host/dist/server/memory-projection.js +14 -15
- package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +565 -353
- package/node_modules/@maka/runtime-host/dist/server/message-queue-state.js +69 -0
- package/node_modules/@maka/runtime-host/dist/server/model-metadata-refresh.js +96 -0
- package/node_modules/@maka/runtime-host/dist/server/network-proxy-coordinator.js +0 -1
- package/node_modules/@maka/runtime-host/dist/server/oauth-coordinator.js +169 -45
- package/node_modules/@maka/runtime-host/dist/server/oauth-execution-authority.js +20 -3
- package/node_modules/@maka/runtime-host/dist/server/operation-dispatcher.js +66 -127
- package/node_modules/@maka/runtime-host/dist/server/peer-listener.js +131 -48
- package/node_modules/@maka/runtime-host/dist/server/peer-mesh-authority.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/plan-coordinator.js +52 -16
- package/node_modules/@maka/runtime-host/dist/server/plugin-composition-patch.js +58 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-composition-store.js +141 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-data-runtime.js +234 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-package-loader.js +204 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-package-store.js +545 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +400 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform.js +1273 -0
- package/node_modules/@maka/runtime-host/dist/server/process-lifecycle.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/process-termination-error.js +27 -0
- package/node_modules/@maka/runtime-host/dist/server/project-catalog-coordinator.js +10 -12
- package/node_modules/@maka/runtime-host/dist/server/project-directory-authority.js +4 -3
- package/node_modules/@maka/runtime-host/dist/server/prompt-suggestion.js +179 -0
- package/node_modules/@maka/runtime-host/dist/server/provider-retry-projection.js +71 -0
- package/node_modules/@maka/runtime-host/dist/server/queued-mutation-executor.js +94 -0
- package/node_modules/@maka/runtime-host/dist/server/recall-coordinator.js +117 -0
- package/node_modules/@maka/runtime-host/dist/server/recall-material-fetch.js +92 -0
- package/node_modules/@maka/runtime-host/dist/server/root-admission-owner.js +32 -7
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +803 -218
- package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +74 -18
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-coordinator.js +24 -31
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-projection.js +15 -32
- package/node_modules/@maka/runtime-host/dist/server/safe-boundary-resume-policy.js +27 -0
- package/node_modules/@maka/runtime-host/dist/server/sandbox-boundary-graph-wake.js +3 -5
- package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +150 -41
- package/node_modules/@maka/runtime-host/dist/server/serial-outbound-writer.js +46 -4
- package/node_modules/@maka/runtime-host/dist/server/session-admission-gate.js +21 -1
- package/node_modules/@maka/runtime-host/dist/server/session-bundle-coordinator.js +166 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +461 -62
- package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +484 -586
- package/node_modules/@maka/runtime-host/dist/server/session-effect-coordinator.js +13 -7
- package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +68 -16
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +118 -189
- package/node_modules/@maka/runtime-host/dist/server/session-revision-graph-references.js +64 -85
- package/node_modules/@maka/runtime-host/dist/server/session-sidecar-purge.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/session-title.js +3 -16
- package/node_modules/@maka/runtime-host/dist/server/session-todo-coordinator.js +77 -0
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-pager.js +23 -488
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-reader.js +407 -115
- package/node_modules/@maka/runtime-host/dist/server/session-turn-access-request-coordinator.js +33 -26
- package/node_modules/@maka/runtime-host/dist/server/shared-session-transcript.js +4 -1
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-coordinator.js +18 -2
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +16 -17
- package/node_modules/@maka/runtime-host/dist/server/storage-maintenance.js +109 -0
- package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +120 -36
- package/node_modules/@maka/runtime-host/dist/server/web-fetch-tool.js +38 -2
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-action-gate.js +625 -39
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +625 -132
- package/node_modules/@maka/runtime-host/dist/server/workhub-message-attachments.js +47 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-result-coordinator.js +203 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-result-runtime.js +293 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-target-execution-authority.js +161 -0
- package/node_modules/@maka/runtime-host/dist/transport/framed-byte-stream-transport.js +43 -6
- package/node_modules/@maka/runtime-host/dist/transport/local-ipc-framing.js +4 -2
- package/node_modules/@maka/runtime-host/dist/transport/peer-native.js +112 -24
- package/node_modules/@maka/runtime-host/dist/transport/resumable-peer-stream.js +469 -0
- package/node_modules/@maka/runtime-host/dist/webrtc-stun-policy.js +114 -0
- package/node_modules/@maka/runtime-host/package.json +9 -1
- package/node_modules/@maka/storage/dist/agent-run-store-contract.js +956 -0
- package/node_modules/@maka/storage/dist/agent-run-store.js +264 -1058
- package/node_modules/@maka/storage/dist/artifact-attachments.js +66 -18
- package/node_modules/@maka/storage/dist/artifact-metadata-codec.js +28 -31
- package/node_modules/@maka/storage/dist/artifact-store.js +265 -787
- package/node_modules/@maka/storage/dist/artifact-stores.js +5 -12
- package/node_modules/@maka/storage/dist/artifact-writer-lock.js +1 -1
- package/node_modules/@maka/storage/dist/atomic-file-write.js +75 -0
- package/node_modules/@maka/storage/dist/claude-code-session-adapter.js +802 -321
- package/node_modules/@maka/storage/dist/claude-code-transcript-lineage.js +106 -77
- package/node_modules/@maka/storage/dist/codex-session-adapter.js +845 -315
- package/node_modules/@maka/storage/dist/config-transfer.js +14 -8
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +397 -0
- package/node_modules/@maka/storage/dist/context-value-mutation-gate.js +59 -0
- package/node_modules/@maka/storage/dist/conversation-operational-state.js +10 -0
- package/node_modules/@maka/storage/dist/credential-store.js +15 -63
- package/node_modules/@maka/storage/dist/execution-persistence-provider.js +55 -0
- package/node_modules/@maka/storage/dist/execution-record-codec.js +1 -22
- package/node_modules/@maka/storage/dist/execution-stores.js +254 -81
- package/node_modules/@maka/storage/dist/external-session-importer.js +25 -3
- package/node_modules/@maka/storage/dist/file-lifetime-owner.js +30 -2
- package/node_modules/@maka/storage/dist/file-session-repository.js +1012 -0
- package/node_modules/@maka/storage/dist/git-exec.js +61 -0
- package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +8 -35
- package/node_modules/@maka/storage/dist/goal-authority.js +41 -10
- package/node_modules/@maka/storage/dist/graph-control-values.js +126 -0
- package/node_modules/@maka/storage/dist/interaction-store-contract.js +231 -0
- package/node_modules/@maka/storage/dist/interaction-store-public.js +1 -1
- package/node_modules/@maka/storage/dist/interaction-store.js +196 -166
- package/node_modules/@maka/storage/dist/legacy-run-header.js +327 -0
- package/node_modules/@maka/storage/dist/local-execution-persistence.js +80 -0
- package/node_modules/@maka/storage/dist/mcp-config-store.js +123 -30
- package/node_modules/@maka/storage/dist/message-admission-store.js +8 -3
- package/node_modules/@maka/storage/dist/model-call-ledger.js +199 -32
- package/node_modules/@maka/storage/dist/model-call-usage-sql.js +136 -0
- package/node_modules/@maka/storage/dist/model-facts-store.js +56 -0
- package/node_modules/@maka/storage/dist/offset-external-session-catalog.js +69 -0
- package/node_modules/@maka/storage/dist/opencode-session-adapter.js +278 -77
- package/node_modules/@maka/storage/dist/operational-state-backup.js +15 -11
- package/node_modules/@maka/storage/dist/operational-state-store-public.js +1 -1
- package/node_modules/@maka/storage/dist/operational-state-store.js +60 -8
- package/node_modules/@maka/storage/dist/plan-authority.js +50 -0
- package/node_modules/@maka/storage/dist/plan-store.js +30 -0
- package/node_modules/@maka/storage/dist/process-lifetime-file-update-lock.js +0 -41
- package/node_modules/@maka/storage/dist/production-session-snapshot.js +761 -0
- package/node_modules/@maka/storage/dist/project-catalog.js +51 -74
- package/node_modules/@maka/storage/dist/quiescent-session-snapshot.js +1154 -0
- package/node_modules/@maka/storage/dist/recall-fold.js +65 -0
- package/node_modules/@maka/storage/dist/root-authority.js +4 -0
- package/node_modules/@maka/storage/dist/runtime-event-invariants.js +2 -2
- package/node_modules/@maka/storage/dist/runtime-event-persistence.js +9 -0
- package/node_modules/@maka/storage/dist/runtime-event-store-contract.js +19 -0
- package/node_modules/@maka/storage/dist/runtime-partial-values.js +118 -0
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +181 -112
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +552 -121
- package/node_modules/@maka/storage/dist/runtime-policy/credential-vault-document.js +4 -1
- package/node_modules/@maka/storage/dist/runtime-policy/document-io.js +22 -16
- package/node_modules/@maka/storage/dist/runtime-policy/legacy-custom-connection.js +65 -0
- package/node_modules/@maka/storage/dist/runtime-policy/oauth-login-receipt-document.js +207 -0
- package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +157 -9
- package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +12 -4
- package/node_modules/@maka/storage/dist/runtime-policy-stores.js +7 -4
- package/node_modules/@maka/storage/dist/runtime-transcript-query.js +333 -0
- package/node_modules/@maka/storage/dist/scheduled-task-store.js +256 -283
- package/node_modules/@maka/storage/dist/session-bundle-manifest.js +5 -17
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +1042 -34
- package/node_modules/@maka/storage/dist/session-bundle-ustar.js +12 -0
- package/node_modules/@maka/storage/dist/session-copy-cleanup.js +12 -7
- package/node_modules/@maka/storage/dist/session-message-projection.js +24 -5
- package/node_modules/@maka/storage/dist/session-repository.js +767 -0
- package/node_modules/@maka/storage/dist/session-store-contract.js +61 -0
- package/node_modules/@maka/storage/dist/session-store-values.js +354 -0
- package/node_modules/@maka/storage/dist/session-store.js +129 -433
- package/node_modules/@maka/storage/dist/session-todo-authority.js +106 -0
- package/node_modules/@maka/storage/dist/session-todo-store.js +169 -0
- package/node_modules/@maka/storage/dist/settings-store.js +297 -34
- package/node_modules/@maka/storage/dist/shell-run-authority.js +1 -0
- package/node_modules/@maka/storage/dist/shell-run-store.js +15 -0
- package/node_modules/@maka/storage/dist/sqlite-artifact-metadata.js +51 -17
- package/node_modules/@maka/storage/dist/sqlite-artifact-schema.js +55 -5
- package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +42 -12
- package/node_modules/@maka/storage/dist/sqlite-core-execution-schema.js +46 -2
- package/node_modules/@maka/storage/dist/sqlite-long-term-memory-store.js +86 -12
- package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +455 -1
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +1461 -359
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-schema.js +114 -5
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +705 -1049
- package/node_modules/@maka/storage/dist/sqlite-usage-schema.js +280 -20
- package/node_modules/@maka/storage/dist/sqlite-usage-store.js +29 -6
- package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +7 -8
- package/node_modules/@maka/storage/dist/stable-storage.js +16 -2
- package/node_modules/@maka/storage/dist/storage-id.js +28 -0
- package/node_modules/@maka/storage/dist/storage-writer-composition.js +5 -9
- package/node_modules/@maka/storage/dist/telemetry-file-schema.js +5 -3
- package/node_modules/@maka/storage/dist/tool-commit-validation.js +111 -0
- package/node_modules/@maka/storage/dist/tool-result-archive-evidence.js +138 -0
- package/node_modules/@maka/storage/dist/usage-screen.js +384 -0
- package/node_modules/@maka/storage/dist/usage-stores.js +30 -9
- package/node_modules/@maka/storage/dist/work-board-store.js +44 -5
- package/node_modules/@maka/storage/dist/workspace-identity.js +2 -15
- package/node_modules/@maka/storage/dist/workspace-version-authority-internal.js +1 -8
- package/node_modules/@maka/storage/package.json +9 -5
- package/node_modules/@modelcontextprotocol/client/dist/index-BCtJi0p5.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-CEk3qkZM.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +375 -60
- 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 +369 -61
- 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-D0qEN74R.cjs +7521 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-DDAAhLnO.mjs +7153 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +8 -2
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +8 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/auth--n_Yzytt.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/auth-4-zilcqg.cjs +2900 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/auth-CGP0BDVq.mjs +1679 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/auth-YUQV3RRv.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/package.json +85 -0
- package/node_modules/@modelcontextprotocol/client/package.json +4 -4
- package/node_modules/@openai/agents-core/dist/agent.js +8 -10
- package/node_modules/@openai/agents-core/dist/agent.mjs +9 -11
- package/node_modules/@openai/agents-core/dist/agentToolInput.js +2 -30
- package/node_modules/@openai/agents-core/dist/agentToolInput.mjs +1 -29
- package/node_modules/@openai/agents-core/dist/defaultModel.js +23 -3
- package/node_modules/@openai/agents-core/dist/defaultModel.mjs +21 -3
- package/node_modules/@openai/agents-core/dist/handoff.js +5 -5
- package/node_modules/@openai/agents-core/dist/handoff.mjs +5 -5
- package/node_modules/@openai/agents-core/dist/index.js +2 -1
- package/node_modules/@openai/agents-core/dist/index.mjs +1 -1
- package/node_modules/@openai/agents-core/dist/items.js +8 -1
- package/node_modules/@openai/agents-core/dist/items.mjs +8 -1
- package/node_modules/@openai/agents-core/dist/mcp.js +26 -16
- package/node_modules/@openai/agents-core/dist/mcp.mjs +27 -17
- package/node_modules/@openai/agents-core/dist/mcpServers.js +18 -15
- package/node_modules/@openai/agents-core/dist/mcpServers.mjs +18 -15
- package/node_modules/@openai/agents-core/dist/mcpShared.js +12 -0
- package/node_modules/@openai/agents-core/dist/mcpShared.mjs +12 -0
- package/node_modules/@openai/agents-core/dist/memory/session.js +8 -0
- package/node_modules/@openai/agents-core/dist/memory/session.mjs +7 -0
- package/node_modules/@openai/agents-core/dist/metadata.js +2 -2
- package/node_modules/@openai/agents-core/dist/metadata.mjs +2 -2
- package/node_modules/@openai/agents-core/dist/run.js +550 -248
- package/node_modules/@openai/agents-core/dist/run.mjs +555 -253
- package/node_modules/@openai/agents-core/dist/runState.js +747 -420
- package/node_modules/@openai/agents-core/dist/runState.mjs +742 -421
- package/node_modules/@openai/agents-core/dist/runStateLegacyCompaction.js +440 -0
- package/node_modules/@openai/agents-core/dist/runStateLegacyCompaction.mjs +404 -0
- package/node_modules/@openai/agents-core/dist/runner/blockedOutputPersistence.js +274 -78
- package/node_modules/@openai/agents-core/dist/runner/blockedOutputPersistence.mjs +268 -77
- package/node_modules/@openai/agents-core/dist/runner/conversation.js +22 -3
- package/node_modules/@openai/agents-core/dist/runner/conversation.mjs +23 -4
- package/node_modules/@openai/agents-core/dist/runner/guardrails.js +80 -15
- package/node_modules/@openai/agents-core/dist/runner/guardrails.mjs +78 -15
- package/node_modules/@openai/agents-core/dist/runner/items.js +35 -2
- package/node_modules/@openai/agents-core/dist/runner/items.mjs +35 -2
- package/node_modules/@openai/agents-core/dist/runner/modelOutputs.js +47 -18
- package/node_modules/@openai/agents-core/dist/runner/modelOutputs.mjs +50 -21
- package/node_modules/@openai/agents-core/dist/runner/modelPreparation.js +28 -0
- package/node_modules/@openai/agents-core/dist/runner/modelPreparation.mjs +28 -1
- package/node_modules/@openai/agents-core/dist/runner/modelRetry.js +322 -217
- package/node_modules/@openai/agents-core/dist/runner/modelRetry.mjs +322 -217
- package/node_modules/@openai/agents-core/dist/runner/modelSettings.js +15 -22
- package/node_modules/@openai/agents-core/dist/runner/modelSettings.mjs +15 -22
- package/node_modules/@openai/agents-core/dist/runner/outputGuardrailBlockedMessage.js +32 -0
- package/node_modules/@openai/agents-core/dist/runner/outputGuardrailBlockedMessage.mjs +28 -0
- package/node_modules/@openai/agents-core/dist/runner/runLoop.js +53 -8
- package/node_modules/@openai/agents-core/dist/runner/runLoop.mjs +53 -8
- package/node_modules/@openai/agents-core/dist/runner/sessionItems.js +119 -0
- package/node_modules/@openai/agents-core/dist/runner/sessionItems.mjs +114 -0
- package/node_modules/@openai/agents-core/dist/runner/sessionPersistence.js +408 -157
- package/node_modules/@openai/agents-core/dist/runner/sessionPersistence.mjs +388 -142
- package/node_modules/@openai/agents-core/dist/runner/toolExecution.js +42 -3
- package/node_modules/@openai/agents-core/dist/runner/toolExecution.mjs +42 -3
- package/node_modules/@openai/agents-core/dist/runner/toolSearch.js +1 -0
- package/node_modules/@openai/agents-core/dist/runner/toolSearch.mjs +1 -1
- package/node_modules/@openai/agents-core/dist/runner/toolSearchAttribution.js +19 -0
- package/node_modules/@openai/agents-core/dist/runner/toolSearchAttribution.mjs +15 -0
- package/node_modules/@openai/agents-core/dist/runner/turnResolution.js +65 -13
- package/node_modules/@openai/agents-core/dist/runner/turnResolution.mjs +65 -13
- package/node_modules/@openai/agents-core/dist/runner/usageTracking.js +69 -0
- package/node_modules/@openai/agents-core/dist/runner/usageTracking.mjs +65 -0
- package/node_modules/@openai/agents-core/dist/sandbox/manifest.js +4 -0
- package/node_modules/@openai/agents-core/dist/sandbox/manifest.mjs +4 -0
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/docker.js +317 -127
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/docker.mjs +319 -129
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/localWorkspace.js +1 -1
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/localWorkspace.mjs +1 -1
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/pty.js +27 -13
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/pty.mjs +27 -13
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/unixLocalFileWorker.js +196 -0
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/unixLocalFileWorker.mjs +193 -0
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/unixLocalFiles.js +215 -0
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/shared/unixLocalFiles.mjs +211 -0
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/unixLocal.js +193 -83
- package/node_modules/@openai/agents-core/dist/sandbox/sandboxes/unixLocal.mjs +196 -86
- package/node_modules/@openai/agents-core/dist/sandbox/session.js +2 -1
- package/node_modules/@openai/agents-core/dist/sandbox/session.mjs +2 -1
- package/node_modules/@openai/agents-core/dist/tracing/processor.js +21 -7
- package/node_modules/@openai/agents-core/dist/tracing/processor.mjs +21 -7
- package/node_modules/@openai/agents-core/dist/tracing/spans.js +40 -6
- package/node_modules/@openai/agents-core/dist/tracing/spans.mjs +7 -3
- package/node_modules/@openai/agents-core/dist/types/protocol.js +6 -0
- package/node_modules/@openai/agents-core/dist/types/protocol.mjs +6 -0
- package/node_modules/@openai/agents-core/dist/usage.js +13 -4
- package/node_modules/@openai/agents-core/dist/usage.mjs +13 -4
- package/node_modules/@openai/agents-core/dist/utils/applyDiff.js +24 -7
- package/node_modules/@openai/agents-core/dist/utils/applyDiff.mjs +24 -7
- package/node_modules/@openai/agents-core/dist/utils/internal.js +3 -1
- package/node_modules/@openai/agents-core/dist/utils/internal.mjs +1 -1
- package/node_modules/@openai/agents-core/dist/utils/zodCompat.js +29 -0
- package/node_modules/@openai/agents-core/dist/utils/zodCompat.mjs +28 -0
- package/node_modules/@openai/agents-core/dist/utils/zodJsonSchemaCompat.js +3 -31
- package/node_modules/@openai/agents-core/dist/utils/zodJsonSchemaCompat.mjs +1 -29
- package/node_modules/@openai/agents-core/package.json +1 -1
- package/node_modules/@slack/types/dist/events/agent.js +3 -0
- package/node_modules/@slack/types/dist/events/index.js +44 -0
- package/node_modules/@slack/types/package.json +47 -0
- package/node_modules/@slack/web-api/README.md +382 -0
- package/node_modules/@slack/web-api/dist/methods.js +1636 -0
- package/node_modules/@slack/web-api/dist/types/request/agents.js +3 -0
- package/node_modules/@slack/web-api/dist/types/request/blocks.js +3 -0
- package/node_modules/@slack/web-api/dist/types/response/AdminUsersGetExpirationResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsRenameResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsSetStatusResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/BlocksValidateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +48 -0
- package/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +67 -0
- package/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +72 -0
- package/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +48 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +11 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/LICENSE +21 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/README.md +15 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/package.json +30 -0
- package/node_modules/@slack/web-api/package.json +71 -0
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/package.json +3 -18
- package/node_modules/ai/CHANGELOG.md +611 -0
- package/node_modules/ai/README.md +6 -6
- package/node_modules/ai/dist/index.js +7872 -3383
- package/node_modules/ai/dist/internal/index.js +837 -465
- package/node_modules/ai/docs/00-introduction/index.mdx +1 -1
- package/node_modules/ai/docs/02-foundations/02-providers-and-models.mdx +15 -4
- package/node_modules/ai/docs/02-foundations/03-prompts.mdx +1 -1
- package/node_modules/ai/docs/02-foundations/04-tools.mdx +2 -2
- package/node_modules/ai/docs/02-foundations/06-provider-options.mdx +11 -11
- package/node_modules/ai/docs/02-getting-started/00-choosing-a-provider.mdx +4 -4
- package/node_modules/ai/docs/02-getting-started/02-nextjs-app-router.mdx +3 -3
- package/node_modules/ai/docs/02-getting-started/03-nextjs-pages-router.mdx +4 -4
- package/node_modules/ai/docs/02-getting-started/04-svelte.mdx +7 -7
- package/node_modules/ai/docs/02-getting-started/05-nuxt.mdx +8 -8
- package/node_modules/ai/docs/02-getting-started/06-nodejs.mdx +3 -3
- package/node_modules/ai/docs/02-getting-started/07-expo.mdx +10 -3
- package/node_modules/ai/docs/02-getting-started/08-tanstack-start.mdx +3 -3
- package/node_modules/ai/docs/02-getting-started/09-coding-agents.mdx +1 -1
- package/node_modules/ai/docs/03-agents/02-building-agents.mdx +2 -2
- package/node_modules/ai/docs/03-agents/03-workflows.mdx +2 -2
- package/node_modules/ai/docs/03-agents/04-loop-control.mdx +6 -4
- package/node_modules/ai/docs/03-agents/05-configuring-call-options.mdx +4 -2
- package/node_modules/ai/docs/03-agents/06-memory.mdx +2 -2
- package/node_modules/ai/docs/03-agents/06-policy-tool-approvals.mdx +5 -4
- package/node_modules/ai/docs/03-agents/06-tool-approvals.mdx +35 -7
- package/node_modules/ai/docs/03-agents/07-workflow-agent.mdx +125 -28
- package/node_modules/ai/docs/03-agents/08-terminal-ui.mdx +14 -10
- package/node_modules/ai/docs/03-ai-sdk-core/05-generating-text.mdx +2 -2
- package/node_modules/ai/docs/03-ai-sdk-core/10-generating-structured-data.mdx +15 -3
- package/node_modules/ai/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +14 -6
- package/node_modules/ai/docs/03-ai-sdk-core/16-mcp-tools.mdx +95 -1
- package/node_modules/ai/docs/03-ai-sdk-core/17-mcp-apps.mdx +2 -2
- package/node_modules/ai/docs/03-ai-sdk-core/18-code-mode.mdx +50 -0
- package/node_modules/ai/docs/03-ai-sdk-core/19-tool-search.mdx +82 -0
- package/node_modules/ai/docs/03-ai-sdk-core/20-prompt-engineering.mdx +1 -1
- package/node_modules/ai/docs/03-ai-sdk-core/26-reasoning.mdx +15 -14
- package/node_modules/ai/docs/03-ai-sdk-core/31-reranking.mdx +12 -10
- package/node_modules/ai/docs/03-ai-sdk-core/32-evaluation.mdx +287 -0
- package/node_modules/ai/docs/03-ai-sdk-core/35-image-generation.mdx +79 -14
- package/node_modules/ai/docs/03-ai-sdk-core/36-realtime.mdx +41 -18
- package/node_modules/ai/docs/03-ai-sdk-core/36-transcription.mdx +37 -35
- package/node_modules/ai/docs/03-ai-sdk-core/37-speech.mdx +8 -23
- package/node_modules/ai/docs/03-ai-sdk-core/39-file-uploads.mdx +26 -1
- package/node_modules/ai/docs/03-ai-sdk-core/40-middleware.mdx +92 -7
- package/node_modules/ai/docs/03-ai-sdk-core/41-skill-uploads.mdx +1 -1
- package/node_modules/ai/docs/03-ai-sdk-core/42-batch.mdx +371 -0
- package/node_modules/ai/docs/03-ai-sdk-core/45-provider-management.mdx +31 -21
- package/node_modules/ai/docs/03-ai-sdk-core/50-error-handling.mdx +94 -2
- package/node_modules/ai/docs/03-ai-sdk-core/55-testing.mdx +75 -0
- package/node_modules/ai/docs/03-ai-sdk-core/60-telemetry.mdx +89 -11
- package/node_modules/ai/docs/03-ai-sdk-core/65-devtools.mdx +3 -3
- package/node_modules/ai/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +132 -7
- package/node_modules/ai/docs/03-ai-sdk-core/index.mdx +11 -0
- package/node_modules/ai/docs/03-ai-sdk-harnesses/01-overview.mdx +3 -2
- package/node_modules/ai/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +324 -97
- package/node_modules/ai/docs/03-ai-sdk-harnesses/03-tools.mdx +47 -22
- package/node_modules/ai/docs/03-ai-sdk-harnesses/04-skills.mdx +6 -6
- package/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +15 -13
- package/node_modules/ai/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +43 -9
- package/node_modules/ai/docs/03-ai-sdk-harnesses/07-ui.mdx +33 -30
- package/node_modules/ai/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +8 -6
- package/node_modules/ai/docs/04-ai-sdk-ui/01-overview.mdx +1 -1
- package/node_modules/ai/docs/04-ai-sdk-ui/02-chatbot.mdx +47 -21
- package/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +46 -3
- package/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +11 -4
- package/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +39 -2
- package/node_modules/ai/docs/04-ai-sdk-ui/05-completion.mdx +1 -1
- package/node_modules/ai/docs/04-ai-sdk-ui/08-object-generation.mdx +4 -1
- package/node_modules/ai/docs/04-ai-sdk-ui/20-streaming-data.mdx +11 -6
- package/node_modules/ai/docs/04-ai-sdk-ui/21-error-handling.mdx +28 -2
- package/node_modules/ai/docs/04-ai-sdk-ui/21-transport.mdx +7 -3
- package/node_modules/ai/docs/04-ai-sdk-ui/50-stream-protocol.mdx +6 -2
- package/node_modules/ai/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +5 -5
- package/node_modules/ai/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +2 -2
- package/node_modules/ai/docs/05-ai-sdk-rsc/06-loading-state.mdx +1 -1
- package/node_modules/ai/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +3 -3
- package/node_modules/ai/docs/06-advanced/02-stopping-streams.mdx +8 -0
- package/node_modules/ai/docs/06-advanced/04-caching.mdx +9 -1
- package/node_modules/ai/docs/06-advanced/11-secure-url-fetching.mdx +54 -3
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +28 -5
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +66 -15
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/05-embed.mdx +31 -5
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +38 -8
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +24 -10
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +2 -1
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +1 -1
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +3 -3
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-evaluate.mdx +74 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +37 -4
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +5 -3
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +154 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-tool.mdx +7 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +133 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +7 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +109 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +96 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-tool-search.mdx +76 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +121 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/28-output.mdx +27 -1
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +63 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +30 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +12 -0
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +19 -1
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +22 -4
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +1 -1
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +17 -2
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +5 -3
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/index.mdx +31 -0
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +2 -2
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +4 -1
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +364 -48
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +14 -2
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +45 -6
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +6 -1
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +3 -3
- package/node_modules/ai/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +2 -1
- package/node_modules/ai/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +1 -1
- package/node_modules/ai/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +1 -1
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +124 -43
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +29 -15
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +157 -0
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/index.mdx +6 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +4 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-evaluation-unsupported-question-type-error.mdx +31 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +6 -1
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +7 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +4 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +4 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +52 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +38 -0
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +6 -2
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +131 -34
- package/node_modules/ai/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +13 -9
- package/node_modules/ai/docs/08-migration-guides/29-migration-guide-4-0.mdx +5 -5
- package/node_modules/ai/docs/08-migration-guides/37-migration-guide-3-3.mdx +1 -1
- package/node_modules/ai/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +3 -3
- package/node_modules/ai/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +2 -2
- package/node_modules/ai/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +1 -1
- package/node_modules/ai/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +2 -2
- package/node_modules/ai/package.json +19 -9
- package/node_modules/balanced-match/LICENSE.md +23 -0
- package/node_modules/balanced-match/README.md +57 -0
- package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/balanced-match/package.json +68 -0
- package/node_modules/brace-expansion/LICENSE +23 -0
- package/node_modules/brace-expansion/README.md +105 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +289 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.js +285 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +64 -0
- package/node_modules/fast-uri/index.js +215 -47
- package/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fs-native-extensions/package.json +1 -1
- package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-x64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/src/win32.c +50 -11
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/README.md +1203 -0
- package/node_modules/glob/dist/commonjs/glob.js +248 -0
- package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/node_modules/glob/dist/commonjs/index.js +68 -0
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/package.json +3 -0
- package/node_modules/glob/dist/commonjs/pattern.js +223 -0
- package/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/node_modules/glob/dist/esm/glob.js +244 -0
- package/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/node_modules/glob/dist/esm/ignore.js +115 -0
- package/node_modules/glob/dist/esm/index.js +55 -0
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/package.json +3 -0
- package/node_modules/glob/dist/esm/pattern.js +219 -0
- package/node_modules/glob/dist/esm/processor.js +294 -0
- package/node_modules/glob/dist/esm/walker.js +381 -0
- package/node_modules/glob/package.json +98 -0
- package/node_modules/image-dimensions/cli.js +18 -3
- package/node_modules/image-dimensions/index.js +7 -5
- package/node_modules/image-dimensions/package.json +4 -1
- package/node_modules/image-dimensions/readme.md +2 -1
- package/node_modules/image-dimensions/types/avif.js +2 -24
- package/node_modules/image-dimensions/types/heic.js +2 -24
- package/node_modules/image-dimensions/types/jpeg.js +28 -7
- package/node_modules/image-dimensions/types/png.js +13 -2
- package/node_modules/image-dimensions/types/webp.js +20 -36
- package/node_modules/image-dimensions/utilities.js +184 -60
- package/node_modules/ip-address/README.md +145 -135
- package/node_modules/ip-address/dist/common.js +48 -0
- package/node_modules/ip-address/dist/ipv4.js +117 -11
- package/node_modules/ip-address/dist/ipv6.js +162 -48
- package/node_modules/ip-address/dist/v4/constants.js +40 -1
- package/node_modules/ip-address/dist/v6/constants.js +47 -1
- package/node_modules/ip-address/package.json +1 -1
- package/node_modules/marked/README.md +1 -0
- package/node_modules/marked/lib/marked.esm.js +30 -29
- package/node_modules/marked/lib/marked.umd.js +30 -29
- package/node_modules/marked/man/marked.1 +1 -1
- package/node_modules/marked/package.json +11 -11
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/README.md +528 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/minimatch/package.json +73 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/README.md +636 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/path-scurry/node_modules/lru-cache/README.md +469 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/package.json +154 -0
- package/node_modules/path-scurry/package.json +72 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/qs/CHANGELOG.md +15 -0
- package/node_modules/qs/README.md +19 -1
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/qs/lib/parse.js +3 -4
- package/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/qs/lib/utils.js +10 -3
- package/node_modules/qs/package.json +4 -4
- package/node_modules/run/README.md +109 -18
- package/node_modules/run/THIRD_PARTY_NOTICES.md +11 -11
- package/node_modules/run/dist/continuation-validation.js +116 -1
- package/node_modules/run/dist/errors.js +12 -2
- package/node_modules/run/dist/host-function-invocation.js +2 -1
- package/node_modules/run/dist/run.js +30 -4
- package/node_modules/run/dist/runtime/guest-serde-source.js +1 -1
- package/node_modules/run/dist/runtime/guest-sources.js +214 -56
- package/node_modules/run/dist/runtime/manager.js +575 -116
- package/node_modules/run/dist/runtime/max-workers.js +8 -4
- package/node_modules/run/dist/runtime/protocol-validation.js +20 -7
- package/node_modules/run/dist/runtime/sync-bridge-protocol.js +135 -0
- package/node_modules/run/dist/runtime/worker-source.js +1 -1
- package/node_modules/run/dist/utils/options.js +7 -0
- package/node_modules/run/dist/utils/promise-with-resolvers.js +13 -1
- package/node_modules/run/dist/utils/serde.js +1 -7
- package/node_modules/run/dist/utils/source-cache.js +83 -13
- package/node_modules/run/package.json +6 -4
- package/node_modules/socks/build/common/helpers.js +5 -6
- package/node_modules/socks/build/common/util.js +2 -2
- package/node_modules/socks/package.json +7 -7
- package/node_modules/systeminformation/LICENSE +20 -0
- package/node_modules/systeminformation/README.md +1251 -0
- package/node_modules/systeminformation/lib/audio.js +335 -0
- package/node_modules/systeminformation/lib/battery.js +355 -0
- package/node_modules/systeminformation/lib/bluetooth.js +315 -0
- package/node_modules/systeminformation/lib/bluetoothVendors.js +1138 -0
- package/node_modules/systeminformation/lib/cli.js +100 -0
- package/node_modules/systeminformation/lib/cpu.js +2285 -0
- package/node_modules/systeminformation/lib/docker.js +791 -0
- package/node_modules/systeminformation/lib/dockerSocket.js +117 -0
- package/node_modules/systeminformation/lib/filesystem.js +1933 -0
- package/node_modules/systeminformation/lib/graphics.js +1317 -0
- package/node_modules/systeminformation/lib/index.js +520 -0
- package/node_modules/systeminformation/lib/internet.js +265 -0
- package/node_modules/systeminformation/lib/memory.js +620 -0
- package/node_modules/systeminformation/lib/network.js +2014 -0
- package/node_modules/systeminformation/lib/osinfo.js +1304 -0
- package/node_modules/systeminformation/lib/printer.js +209 -0
- package/node_modules/systeminformation/lib/processes.js +1496 -0
- package/node_modules/systeminformation/lib/system.js +855 -0
- package/node_modules/systeminformation/lib/usb.js +309 -0
- package/node_modules/systeminformation/lib/users.js +412 -0
- package/node_modules/systeminformation/lib/util.js +2840 -0
- package/node_modules/systeminformation/lib/virtualbox.js +116 -0
- package/node_modules/systeminformation/lib/wifi.js +839 -0
- package/node_modules/systeminformation/package.json +102 -0
- package/node_modules/undici/README.md +10 -1
- package/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +8 -3
- package/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +0 -39
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/undici/lib/dispatcher/client-h1.js +23 -8
- package/node_modules/undici/lib/dispatcher/client-h2.js +94 -10
- package/node_modules/undici/lib/dispatcher/client.js +9 -3
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +31 -9
- package/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +33 -3
- package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +29 -10
- package/node_modules/undici/lib/handler/redirect-handler.js +26 -4
- package/node_modules/undici/lib/handler/retry-handler.js +215 -38
- package/node_modules/undici/lib/interceptor/cache.js +69 -13
- package/node_modules/undici/lib/interceptor/decompress.js +319 -50
- package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +38 -4
- package/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/undici/lib/web/fetch/index.js +52 -25
- package/node_modules/undici/lib/web/fetch/request.js +76 -82
- package/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/undici/lib/web/fetch/util.js +13 -8
- package/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/undici/lib/web/webidl/index.js +5 -17
- package/node_modules/undici/lib/web/websocket/connection.js +34 -13
- package/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +27 -14
- package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +19 -18
- package/node_modules/yaml/browser/dist/nodes/Alias.js +25 -23
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +19 -18
- package/node_modules/yaml/dist/nodes/Alias.js +25 -23
- package/node_modules/yaml/package.json +1 -1
- package/node_modules/zod/README.md +29 -2
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +21 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +62 -34
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +591 -426
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +101 -19
- package/node_modules/zod/v4/core/core.js +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -25
- package/node_modules/zod/v4/core/errors.js +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +356 -0
- package/node_modules/zod/v4/core/memoizer.js +307 -0
- package/node_modules/zod/v4/core/parse.cjs +148 -46
- package/node_modules/zod/v4/core/parse.js +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.js +341 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +33 -1
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +22 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +117 -53
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +4 -4
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1224
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/LICENSE +0 -13
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/README.md +0 -1
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/dist/index.js +0 -426
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +0 -2444
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/README.md +0 -1
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -4295
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/package.json +0 -82
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/LICENSE +0 -16
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/README.md +0 -24
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/LICENSE +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/README.md +0 -741
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Agent.md +0 -84
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStore.md +0 -164
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Client.md +0 -288
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Connector.md +0 -115
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ContentType.md +0 -57
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Cookies.md +0 -128
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Debug.md +0 -62
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -315
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1392
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Errors.md +0 -49
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EventSource.md +0 -45
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Fetch.md +0 -60
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -139
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/H2CClient.md +0 -263
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockClient.md +0 -81
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockPool.md +0 -555
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Pool.md +0 -84
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -229
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -93
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryAgent.md +0 -50
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryHandler.md +0 -118
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -145
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -616
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -275
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Util.md +0 -25
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/WebSocket.md +0 -141
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/crawling.md +0 -58
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -224
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -63
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/index-fetch.js +0 -65
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/index.js +0 -234
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/abort-signal.js +0 -59
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-connect.js +0 -110
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-pipeline.js +0 -252
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-request.js +0 -214
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-stream.js +0 -209
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-upgrade.js +0 -111
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/index.js +0 -7
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/readable.js +0 -580
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/memory-cache-store.js +0 -279
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -467
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/connect.js +0 -153
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/constants.js +0 -143
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/diagnostics.js +0 -227
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/errors.js +0 -477
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/request.js +0 -464
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-client.js +0 -422
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-utils.js +0 -212
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/symbols.js +0 -75
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/tree.js +0 -160
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/util.js +0 -992
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/agent.js +0 -158
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h1.js +0 -1731
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client.js +0 -664
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -184
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool.js +0 -118
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -319
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -260
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/encoding/index.js +0 -33
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/global.js +0 -59
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-handler.js +0 -760
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/decorator-handler.js +0 -67
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/redirect-handler.js +0 -238
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/retry-handler.js +0 -418
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/unwrap-handler.js +0 -106
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/wrap-handler.js +0 -105
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/cache.js +0 -602
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/decompress.js +0 -259
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dns.js +0 -571
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dump.js +0 -112
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/redirect.js +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/response-error.js +0 -95
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/retry.js +0 -19
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/constants.js +0 -531
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/utils.js +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-agent.js +0 -232
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-call-history.js +0 -248
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-client.js +0 -68
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-errors.js +0 -29
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-pool.js +0 -68
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-symbols.js +0 -32
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-utils.js +0 -486
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/cache.js +0 -676
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/date.js +0 -670
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/promise.js +0 -28
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/runtime-features.js +0 -124
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/stats.js +0 -32
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/timers.js +0 -425
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cache.js +0 -864
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/util.js +0 -45
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/constants.js +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/index.js +0 -199
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/parse.js +0 -314
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/util.js +0 -352
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/util.js +0 -29
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/LICENSE +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/body.js +0 -509
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/constants.js +0 -131
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/data-url.js +0 -596
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata.js +0 -259
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/global.js +0 -40
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/headers.js +0 -719
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/index.js +0 -2413
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/request.js +0 -1115
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/response.js +0 -641
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/util.js +0 -1522
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/infra/index.js +0 -229
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/webidl/index.js +0 -1006
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/connection.js +0 -329
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/constants.js +0 -126
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/events.js +0 -331
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/frame.js +0 -133
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -100
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/receiver.js +0 -507
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/sender.js +0 -109
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -498
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/util.js +0 -347
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/websocket.js +0 -758
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/package.json +0 -152
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/scripts/strip-comments.js +0 -10
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/types/README.md +0 -6
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +0 -70
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +0 -119
- package/node_modules/@formatjs/icu-messageformat-parser/index.js +0 -2173
- package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +0 -207
- package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +0 -160
- package/node_modules/@formatjs/icu-messageformat-parser/package.json +0 -21
- package/node_modules/@formatjs/icu-messageformat-parser/printer.js +0 -224
- package/node_modules/@maka/core/dist/deep-research-client-progress.js +0 -132
- package/node_modules/@maka/core/dist/deep-research-run.js +0 -625
- package/node_modules/@maka/core/dist/deep-research.js +0 -227
- package/node_modules/@maka/core/dist/foreign-session.js +0 -596
- package/node_modules/@maka/core/dist/task-ledger.js +0 -797
- package/node_modules/@maka/core/dist/thread-search.js +0 -498
- package/node_modules/@maka/eval/dist/maka-runtime-policy.js +0 -42
- package/node_modules/@maka/runtime/dist/active-tool-result-prune.js +0 -334
- package/node_modules/@maka/runtime/dist/active-tool-result-working-set.js +0 -218
- package/node_modules/@maka/runtime/dist/archive-read-tool.js +0 -92
- package/node_modules/@maka/runtime/dist/deep-research-tools.js +0 -741
- package/node_modules/@maka/runtime/dist/history-tools.js +0 -429
- package/node_modules/@maka/runtime/dist/provider-runtime-policy.js +0 -43
- package/node_modules/@maka/runtime/dist/sandbox/diagnostics.js +0 -285
- package/node_modules/@maka/runtime/dist/system-prompt/sandbox-context-prompt.js +0 -77
- package/node_modules/@maka/runtime/dist/system-prompt/session-environment-prompt.js +0 -47
- package/node_modules/@maka/runtime/dist/task-ledger-tools.js +0 -244
- package/node_modules/@maka/runtime/dist/test-helpers.js +0 -61
- package/node_modules/@maka/runtime/node_modules/@slack/types/dist/events/index.js +0 -43
- package/node_modules/@maka/runtime/node_modules/@slack/types/package.json +0 -47
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/README.md +0 -390
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/methods.js +0 -1610
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +0 -37
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +0 -82
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +0 -63
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/package.json +0 -71
- package/node_modules/@maka/runtime-host/dist/protocol/deep-research.js +0 -233
- package/node_modules/@maka/runtime-host/dist/protocol/task-ledger.js +0 -321
- package/node_modules/@maka/runtime-host/dist/server/deep-research-coordinator.js +0 -116
- package/node_modules/@maka/runtime-host/dist/server/task-ledger-coordinator.js +0 -154
- package/node_modules/@maka/storage/dist/artifact-storage-layout.js +0 -26
- package/node_modules/@maka/storage/dist/deep-research-authority.js +0 -129
- package/node_modules/@maka/storage/dist/deep-research-store.js +0 -343
- package/node_modules/@maka/storage/dist/foreign-session-store.js +0 -641
- package/node_modules/@maka/storage/dist/provider-request-capture-artifact.js +0 -31
- package/node_modules/@maka/storage/dist/task-ledger-authority.js +0 -121
- package/node_modules/@maka/storage/dist/task-ledger-store-internal.js +0 -32
- package/node_modules/@maka/storage/dist/task-ledger-store.js +0 -663
- package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +0 -7063
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +0 -7431
- package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +0 -1678
- package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +0 -2899
- package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +0 -175
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +0 -3
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +0 -201
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +0 -3
- package/node_modules/@modelcontextprotocol/core/package.json +0 -85
- package/node_modules/intl-messageformat/intl-messageformat.iife.js +0 -2807
- package/node_modules/intl-messageformat/package.json +0 -40
- package/node_modules/socks/.eslintrc.cjs +0 -11
- /package/node_modules/@maka/{storage/dist/artifact-metadata-repository.js → core/dist/client-plugin-bridge.js} +0 -0
- /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/LICENSE.md +0 -0
- /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/README.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/LICENSE.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/README.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/index.js +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/LICENSE +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/README.md +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/internal.d.cts.map +0 -0
- /package/node_modules/@modelcontextprotocol/{core → client/node_modules/@modelcontextprotocol/core}/dist/internal.d.mts.map +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/README.md +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/package.json +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/README.md +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/block-elements.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/blocks.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/composition-objects.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/extensions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/calls.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/chunk.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/bot-profile.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/status-emoji-display-info.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/dialog.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/app.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/assistant.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/call.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/channel.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/dnd.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/email.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/entity-details-requested.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/file.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/function.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/grid-migration.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/group.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/im.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/invite.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/link-shared.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/member.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message-metadata.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/pin.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/reaction.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/shared-channel.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/star.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/steps-from-apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/subteam.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/team.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/token.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/user.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-attachments.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-metadata.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/views.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/WebClient.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/chat-stream.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/errors.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/file-upload.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/helpers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/instrument.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/logger.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/retry-policies.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/helpers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/analytics.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/auth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/barriers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/conversations.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/functions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/inviteRequests.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/roles.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/teams.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/usergroups.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/users.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/workflows.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/api.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/assistant.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/auth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bookmarks.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bots.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/calls.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/canvas.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/chat.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/common.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/conversations.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dialog.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dnd.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/entity.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/files.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/functions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/manifest.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/migration.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/oauth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/openid.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/pins.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reactions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reminders.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/rtm.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/search.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/slackLists.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/stars.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/team.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/tooling.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/usergroups.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/users.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/views.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/workflows.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAnalyticsGetFileResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsActivitiesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApprovedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsClearResolutionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsCancelResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsUninstallResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyAssignEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyGetEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyRemoveEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkMoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPrivateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPublicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDisconnectSharedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetConversationPrefsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRemoveCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessAddGroupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessListGroupsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSearchResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetConversationPrefsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddAliasResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApprovedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDeniedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDenyResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesAddAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesListAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesRemoveAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsAdminsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsOwnersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDescriptionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetIconResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetNameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsListChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsRemoveChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersAssignResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionClearSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionGetSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionInvalidateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetBulkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionSetSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetAdminResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetExpirationResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetOwnerResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetRegularResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersUnsupportedVersionsExportResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsPermissionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsSearchResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsUnpublishResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ApiTestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsConnectionsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsEventAuthorizationsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestExportResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestValidateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsRequestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsResourcesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsScopesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersRequestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUninstallResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUserConnectionUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetStatusResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetSuggestedPromptsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetTitleResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthRevokeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BotsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsEndResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesSectionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsJoinResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteScheduledMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatGetPermalinkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatMeMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostEphemeralResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduleMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduledMessagesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUnfurlResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsAcceptSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsApproveSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCanvasesCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsDeclineSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsExternalInvitePermissionsSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteSharedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsJoinResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListConnectInvitesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMembersResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteDenyResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DialogOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndDndResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndSnoozeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndSetSnoozeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndTeamInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EmojiListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EntityPresentDetailsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCompleteUploadExternalResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesGetUploadURLExternalResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteShareResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRevokePublicURLResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesSharedPublicURLResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesUploadResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteErrorResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteSuccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateChildResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MigrationExchangeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthAccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthTokenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2AccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2ExchangeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectTokenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectUserInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersCompleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmConnectResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmStartResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/SearchMessagesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamAccessLogsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillableInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillingInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsDisconnectResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamIntegrationLogsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamPreferencesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamProfileGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ToolingTokensRotateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsDisableResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsEnableResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersConversationsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDeletePhotoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDiscoverableContactsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersGetPresenceResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersIdentityResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersLookupByEmailResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetActiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPhotoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPresenceResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPublishResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPushResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepCompletedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepFailedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsUpdateStepResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/index.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/License +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/README.md +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/dns.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/stop.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/index.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry_operation.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/package.json +0 -0
|
@@ -0,0 +1,2378 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { randomUUID } from 'node:crypto';
|
|
20
|
+
import { realpath } from 'node:fs/promises';
|
|
21
|
+
import { isAbsolute, normalize } from 'node:path';
|
|
22
|
+
import { RequestError, } from '@agentclientprotocol/sdk';
|
|
23
|
+
import { isRuntimeHostTerminalTurn, } from '@maka/runtime-host/adapter';
|
|
24
|
+
import { abortable, readRuntimeHostConnectionCatalog, readRuntimeHostSessionCatalogPage, RuntimeHostCatalogReadError, RuntimeHostOperationError, RuntimeHostRequestInterruptedError, RuntimeHostSubscriptionError, RuntimeHostSessionCatalogRevisionChangedError, } from '@maka/runtime-host/client';
|
|
25
|
+
import { SESSION_CATALOG_CURSOR_MAX_BYTES, SESSION_CATALOG_CWD_MAX_BYTES, HOST_OPERATION_SPECS, } from '@maka/runtime-host/protocol';
|
|
26
|
+
import { RuntimeHostSessionChannel } from '../runtime-host-session-channel.js';
|
|
27
|
+
import { RuntimeHostSessionUpdateError, getRuntimeHostSession, requireRuntimeHostSessionProjection, updateRuntimeHostSession, } from '../runtime-host-session-update.js';
|
|
28
|
+
import { AcpSessionConfigInputError, createAcpSessionConfigPatch, projectAcpSessionConfigOptions, validateAcpSessionConfigOptionRequest, } from './session-configuration.js';
|
|
29
|
+
import { AcpSessionEventMapper } from './session-event-mapper.js';
|
|
30
|
+
import { mapAcpPromptContent, publishAcpPromptAttachments } from './prompt-content.js';
|
|
31
|
+
import { AcpSessionMcp, createAcpMcpConfig } from './session-mcp.js';
|
|
32
|
+
import { AcpSessionInteractions } from './session-interactions.js';
|
|
33
|
+
import { AcpTurnObservation, AcpAdmittedTurnObservation } from './turn-observation.js';
|
|
34
|
+
import { AcpGoalPlanOperations, } from './goal-plan-operations.js';
|
|
35
|
+
import { AcpSessionDomainObservation, } from './session-domain-observation.js';
|
|
36
|
+
const ACP_SESSION_CURSOR_MAX_BYTES = 8 * 1024;
|
|
37
|
+
const ADMISSION_QUERY_MAX_ATTEMPTS = 5;
|
|
38
|
+
const ADMISSION_QUERY_TIMEOUT_MS = 1_000;
|
|
39
|
+
const ADMISSION_QUERY_RETRY_MS = 25;
|
|
40
|
+
const EXTENSION_REQUEST_TIMEOUT_MS = 30_000;
|
|
41
|
+
const ARTIFACT_CLEANUP_TIMEOUT_MS = 5_000;
|
|
42
|
+
const ARTIFACT_UPLOAD_TTL_MS = 5 * 60_000;
|
|
43
|
+
const MAX_TRACKED_ARTIFACT_UPLOADS = 64;
|
|
44
|
+
const TURN_STOP_TIMEOUT_MS = 30_000;
|
|
45
|
+
const COPY_RECONCILIATION_TIMEOUT_MS = 30_000;
|
|
46
|
+
const UNAVAILABLE_INTERACTION_CLIENT = {
|
|
47
|
+
capabilities: {},
|
|
48
|
+
requestPermission: async () => {
|
|
49
|
+
throw RequestError.methodNotFound('session/request_permission');
|
|
50
|
+
},
|
|
51
|
+
createElicitation: async () => {
|
|
52
|
+
throw RequestError.methodNotFound('elicitation/create');
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
function artifactUploadKey(sessionId, uploadId) {
|
|
56
|
+
return JSON.stringify([sessionId, uploadId]);
|
|
57
|
+
}
|
|
58
|
+
/** Owns all Runtime Host resources associated with one ACP connection. */
|
|
59
|
+
export class AcpSessionRegistry {
|
|
60
|
+
#connect;
|
|
61
|
+
#newSessionId;
|
|
62
|
+
#newTurnId;
|
|
63
|
+
#inFlightOperations = new Set();
|
|
64
|
+
#ownedSessionIds = new Set();
|
|
65
|
+
#mcps = new Map();
|
|
66
|
+
#creationAbort = new AbortController();
|
|
67
|
+
#attachmentInteractions = new Map();
|
|
68
|
+
#domainObservations = new Map();
|
|
69
|
+
#goalPlan;
|
|
70
|
+
#attachments = new Map();
|
|
71
|
+
#attachmentOpenControllers = new Map();
|
|
72
|
+
#attachmentConfigurations = new Map();
|
|
73
|
+
#pendingConfigSets = new Map();
|
|
74
|
+
#attachmentWaiters = new Map();
|
|
75
|
+
#turnObservations = new Map();
|
|
76
|
+
#pendingPlanAdmissions = new Map();
|
|
77
|
+
#discardedAttachments = new WeakSet();
|
|
78
|
+
#externalObservationContexts = new Map();
|
|
79
|
+
#externalContextLeases = new Map();
|
|
80
|
+
#sessionCloseTasks = new Map();
|
|
81
|
+
#artifactUploads = new Map();
|
|
82
|
+
#artifactOperations = new Map();
|
|
83
|
+
// Retain cleanup waits across Host replacement so a late abort cannot race a reused ID.
|
|
84
|
+
#artifactCleanupTasks = new Map();
|
|
85
|
+
#artifactConnectionIdentity;
|
|
86
|
+
#artifactConnectionDisposer;
|
|
87
|
+
#sessionCloseGenerations = new Map();
|
|
88
|
+
#sessionLoadTails = new Map();
|
|
89
|
+
#sessionLoadControllers = new Map();
|
|
90
|
+
#historyReplays = new Set();
|
|
91
|
+
#historyReplayDelivery = new Map();
|
|
92
|
+
#connection;
|
|
93
|
+
#connectTask;
|
|
94
|
+
#connectAbortController;
|
|
95
|
+
#closing = false;
|
|
96
|
+
#connectionCloseTask;
|
|
97
|
+
#disposeTask;
|
|
98
|
+
constructor(options) {
|
|
99
|
+
this.#connect = options.connect;
|
|
100
|
+
this.#newSessionId = options.newSessionId ?? randomUUID;
|
|
101
|
+
this.#newTurnId = options.newTurnId ?? randomUUID;
|
|
102
|
+
this.#goalPlan = new AcpGoalPlanOperations({
|
|
103
|
+
prepare: (sessionId, context, turnId, observe) => this.#prepareGoalPlan(sessionId, context, turnId, observe),
|
|
104
|
+
assertCurrent: (sessionId) => {
|
|
105
|
+
this.#assertOpen('subscription.open');
|
|
106
|
+
this.#assertOwned(sessionId);
|
|
107
|
+
},
|
|
108
|
+
mapError: (error, operation, extra) => requestErrorFromRuntimeHost(error, operation, extra),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
goalQuery(input, context) {
|
|
112
|
+
return this.#track(this.#goalPlan.goalQuery(input, context));
|
|
113
|
+
}
|
|
114
|
+
goalArm(input, context) {
|
|
115
|
+
return this.#track(this.#goalPlan.goalArm(input, context));
|
|
116
|
+
}
|
|
117
|
+
goalControl(input, context) {
|
|
118
|
+
return this.#track(this.#goalPlan.goalControl(input, context));
|
|
119
|
+
}
|
|
120
|
+
planQuery(input, context) {
|
|
121
|
+
return this.#track(this.#goalPlan.planQuery(input, context));
|
|
122
|
+
}
|
|
123
|
+
planControl(input, context) {
|
|
124
|
+
return this.#track(this.#goalPlan.planControl(input, context));
|
|
125
|
+
}
|
|
126
|
+
planTurnStart(input, context) {
|
|
127
|
+
return this.#track(this.#goalPlan.planTurnStart(input, context));
|
|
128
|
+
}
|
|
129
|
+
async #prepareGoalPlan(sessionId, context, turnId, observe = true) {
|
|
130
|
+
this.#assertOpen('subscription.open');
|
|
131
|
+
this.#assertOwned(sessionId);
|
|
132
|
+
context.signal.throwIfAborted();
|
|
133
|
+
const generation = this.#sessionCloseGenerations.get(sessionId) ?? 0;
|
|
134
|
+
const connection = await this.#getConnection('subscription.open');
|
|
135
|
+
this.#assertOwned(sessionId);
|
|
136
|
+
context.signal.throwIfAborted();
|
|
137
|
+
if (!observe)
|
|
138
|
+
return { connection, commit: () => undefined, rollback: () => undefined };
|
|
139
|
+
const restoreContext = this.#installExternalContext(sessionId, context);
|
|
140
|
+
const restoreClient = this.#attachmentInteractions
|
|
141
|
+
.get(sessionId)
|
|
142
|
+
?.setClient(context.interactions ?? UNAVAILABLE_INTERACTION_CLIENT);
|
|
143
|
+
const creatingAttachment = !this.#attachments.has(sessionId);
|
|
144
|
+
let observation;
|
|
145
|
+
let observedReplay = false;
|
|
146
|
+
let admissionFinished = false;
|
|
147
|
+
let attachment;
|
|
148
|
+
const finishAdmission = (retain, error) => {
|
|
149
|
+
if (!observation || admissionFinished)
|
|
150
|
+
return;
|
|
151
|
+
admissionFinished = true;
|
|
152
|
+
const state = this.#pendingPlanAdmissions.get(observation);
|
|
153
|
+
if (!state)
|
|
154
|
+
return;
|
|
155
|
+
state.retained ||= retain;
|
|
156
|
+
state.users -= 1;
|
|
157
|
+
if (state.users > 0)
|
|
158
|
+
return;
|
|
159
|
+
this.#pendingPlanAdmissions.delete(observation);
|
|
160
|
+
if (state.retained)
|
|
161
|
+
return;
|
|
162
|
+
observation.failStartRequest(error);
|
|
163
|
+
observation.dispose();
|
|
164
|
+
this.#removeTurnObservation(observation);
|
|
165
|
+
if (error && turnId)
|
|
166
|
+
attachment?.failTurn(turnId, error);
|
|
167
|
+
};
|
|
168
|
+
const rollback = (error) => {
|
|
169
|
+
finishAdmission(false, error);
|
|
170
|
+
restoreContext.rollback();
|
|
171
|
+
restoreClient?.rollback();
|
|
172
|
+
if (creatingAttachment &&
|
|
173
|
+
!this.#hasAttachmentConsumers(sessionId) &&
|
|
174
|
+
!this.#turnObservations.get(sessionId)?.size &&
|
|
175
|
+
!this.#externalObservationContexts.has(sessionId)) {
|
|
176
|
+
const task = this.#detachAttachment(sessionId);
|
|
177
|
+
void task?.then((channel) => channel.close(), () => undefined);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
try {
|
|
181
|
+
const prepared = await this.#prepareExternalObservation(sessionId, context, connection, 'subscription.open', turnId);
|
|
182
|
+
attachment = prepared.attachment;
|
|
183
|
+
observation = prepared.observation;
|
|
184
|
+
observedReplay = prepared.observedReplay ?? false;
|
|
185
|
+
if (observation) {
|
|
186
|
+
const state = this.#pendingPlanAdmissions.get(observation) ?? {
|
|
187
|
+
users: 0,
|
|
188
|
+
retained: false,
|
|
189
|
+
};
|
|
190
|
+
state.users += 1;
|
|
191
|
+
this.#pendingPlanAdmissions.set(observation, state);
|
|
192
|
+
}
|
|
193
|
+
if ((this.#sessionCloseGenerations.get(sessionId) ?? 0) !== generation)
|
|
194
|
+
throw unknownSessionError();
|
|
195
|
+
if (context.notifyGoalStatus || context.notifyPlanChanged) {
|
|
196
|
+
this.#domainObservations.get(sessionId)?.initialize(attachment.snapshot.goal);
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
connection,
|
|
200
|
+
...(observedReplay ? { observedReplay } : {}),
|
|
201
|
+
...(observation ? { observation } : {}),
|
|
202
|
+
...(observation
|
|
203
|
+
? { reconcileAdmission: () => this.#queryPromptAdmission(observation, connection) }
|
|
204
|
+
: {}),
|
|
205
|
+
...(observation
|
|
206
|
+
? {
|
|
207
|
+
cancelObservation: () => {
|
|
208
|
+
const state = this.#pendingPlanAdmissions.get(observation);
|
|
209
|
+
if (state?.users === 1 && !state.retained)
|
|
210
|
+
void this.#cancelPrompt(observation).catch(() => undefined);
|
|
211
|
+
},
|
|
212
|
+
}
|
|
213
|
+
: {}),
|
|
214
|
+
commit: () => {
|
|
215
|
+
finishAdmission(true);
|
|
216
|
+
restoreContext.commit();
|
|
217
|
+
restoreClient?.commit();
|
|
218
|
+
},
|
|
219
|
+
rollback,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
rollback(error);
|
|
224
|
+
if (error instanceof RequestError)
|
|
225
|
+
throw error;
|
|
226
|
+
throw requestErrorFromRuntimeHost(error, 'subscription.open');
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/** Shared non-prompt preparation for explicit Turn resume and Plan admission. */
|
|
230
|
+
async #prepareExternalObservation(sessionId, context, connection, operation, turnId) {
|
|
231
|
+
await this.#mcps.get(sessionId)?.ready(context.signal);
|
|
232
|
+
const attachment = await this.#ensureAttachment(sessionId, connection, context);
|
|
233
|
+
context.signal.throwIfAborted();
|
|
234
|
+
this.#assertOpen(operation);
|
|
235
|
+
this.#assertOwned(sessionId);
|
|
236
|
+
if (!turnId)
|
|
237
|
+
return { attachment };
|
|
238
|
+
const root = attachment.snapshot.rootTurn;
|
|
239
|
+
if (root?.turnId === turnId && isRuntimeHostTerminalTurn(root))
|
|
240
|
+
return { attachment, observedReplay: true };
|
|
241
|
+
const observation = await this.#adoptTurn(sessionId, turnId, attachment, true);
|
|
242
|
+
if (!observation)
|
|
243
|
+
throw registryClosedError(operation);
|
|
244
|
+
// Load/resume already observes an admitted Host Turn without local admission
|
|
245
|
+
// bookkeeping. Let the Host validate the replay while preserving that sole
|
|
246
|
+
// consumer, including when this request is rejected or its result is lost.
|
|
247
|
+
if (!(observation instanceof AcpAdmittedTurnObservation))
|
|
248
|
+
return { attachment, observedReplay: true };
|
|
249
|
+
return { attachment, observation };
|
|
250
|
+
}
|
|
251
|
+
async create(params, signal) {
|
|
252
|
+
this.#assertOpen('session.create');
|
|
253
|
+
validateNewSessionParams(params);
|
|
254
|
+
const mcpConfig = createAcpMcpConfig(params);
|
|
255
|
+
return this.#track(this.#create(params, mcpConfig, signal));
|
|
256
|
+
}
|
|
257
|
+
async load(params, context) {
|
|
258
|
+
this.#assertOpen('subscription.open');
|
|
259
|
+
validateNewSessionParams(params);
|
|
260
|
+
const mcpConfig = createAcpMcpConfig(params);
|
|
261
|
+
await this.#sessionCloseTasks.get(params.sessionId)?.catch(() => undefined);
|
|
262
|
+
this.#assertOpen('subscription.open');
|
|
263
|
+
const generation = this.#sessionCloseGenerations.get(params.sessionId) ?? 0;
|
|
264
|
+
return this.#track(this.#queueLoad(params.sessionId, () => this.#load(params, context, mcpConfig, true, generation)));
|
|
265
|
+
}
|
|
266
|
+
async resume(params, context) {
|
|
267
|
+
this.#assertOpen('subscription.open');
|
|
268
|
+
validateNewSessionParams(params);
|
|
269
|
+
const mcpConfig = createAcpMcpConfig({ ...params, mcpServers: params.mcpServers ?? [] });
|
|
270
|
+
await this.#sessionCloseTasks.get(params.sessionId)?.catch(() => undefined);
|
|
271
|
+
this.#assertOpen('subscription.open');
|
|
272
|
+
const generation = this.#sessionCloseGenerations.get(params.sessionId) ?? 0;
|
|
273
|
+
return this.#track(this.#queueLoad(params.sessionId, () => this.#load(params, context, mcpConfig, false, generation)));
|
|
274
|
+
}
|
|
275
|
+
async list(params) {
|
|
276
|
+
this.#assertOpen('session.catalog.query');
|
|
277
|
+
return this.#track(this.#list(params));
|
|
278
|
+
}
|
|
279
|
+
async setConfigOption(params) {
|
|
280
|
+
this.#assertOpen('session.configuration.update');
|
|
281
|
+
if (!this.#ownedSessionIds.has(params.sessionId)) {
|
|
282
|
+
throw RequestError.invalidParams({ reason: 'unknown_session' }, 'Session is not owned by this ACP connection');
|
|
283
|
+
}
|
|
284
|
+
try {
|
|
285
|
+
validateAcpSessionConfigOptionRequest(params);
|
|
286
|
+
}
|
|
287
|
+
catch (error) {
|
|
288
|
+
throw requestErrorFromConfigInput(error);
|
|
289
|
+
}
|
|
290
|
+
const configuration = this.#attachmentConfigurations.get(params.sessionId);
|
|
291
|
+
const operation = this.#track(configuration
|
|
292
|
+
? this.#queueConfiguration(configuration, () => this.#setConfigOption(params, configuration))
|
|
293
|
+
: this.#setConfigOption(params));
|
|
294
|
+
let pending = this.#pendingConfigSets.get(params.sessionId);
|
|
295
|
+
if (!pending) {
|
|
296
|
+
pending = new Set();
|
|
297
|
+
this.#pendingConfigSets.set(params.sessionId, pending);
|
|
298
|
+
}
|
|
299
|
+
pending.add(operation);
|
|
300
|
+
try {
|
|
301
|
+
return await operation;
|
|
302
|
+
}
|
|
303
|
+
finally {
|
|
304
|
+
pending.delete(operation);
|
|
305
|
+
if (pending.size === 0)
|
|
306
|
+
this.#pendingConfigSets.delete(params.sessionId);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
async prompt(params, context) {
|
|
310
|
+
this.#assertOpen('turn.start');
|
|
311
|
+
this.#assertOwned(params.sessionId);
|
|
312
|
+
return this.#track(this.#prompt(params, context));
|
|
313
|
+
}
|
|
314
|
+
async cancel(params) {
|
|
315
|
+
if (this.#closing)
|
|
316
|
+
return;
|
|
317
|
+
await this.#cancelSession(params.sessionId);
|
|
318
|
+
}
|
|
319
|
+
async resumeTurn(params, context) {
|
|
320
|
+
this.#assertOpen('turn.resume.query');
|
|
321
|
+
this.#assertOwned(params.sessionId);
|
|
322
|
+
return this.#track(this.#resumeTurn(params, context));
|
|
323
|
+
}
|
|
324
|
+
async queryCopySource(params) {
|
|
325
|
+
this.#assertOpen('session.turns.query');
|
|
326
|
+
this.#assertOwned(params.sessionId);
|
|
327
|
+
return this.#track(this.#queryCopySource(params));
|
|
328
|
+
}
|
|
329
|
+
async #queryCopySource(params) {
|
|
330
|
+
const connection = await this.#getConnection('session.turns.query');
|
|
331
|
+
this.#assertOwned(params.sessionId);
|
|
332
|
+
let session;
|
|
333
|
+
try {
|
|
334
|
+
session = await getRuntimeHostSession(connection, params.sessionId);
|
|
335
|
+
}
|
|
336
|
+
catch (error) {
|
|
337
|
+
throw requestErrorFromSessionUpdate(error, 'session.catalog.query');
|
|
338
|
+
}
|
|
339
|
+
if (!session)
|
|
340
|
+
throw unknownSessionError();
|
|
341
|
+
this.#assertOwned(params.sessionId);
|
|
342
|
+
try {
|
|
343
|
+
const page = await connection.request('session.turns.query', params);
|
|
344
|
+
this.#assertOwned(params.sessionId);
|
|
345
|
+
// Read the revision before the page: concurrent source changes leave a
|
|
346
|
+
// stale CAS token, which Host rejects instead of silently copying new data.
|
|
347
|
+
return { ...page, expectedSourceRevision: session.revision };
|
|
348
|
+
}
|
|
349
|
+
catch (error) {
|
|
350
|
+
if (error instanceof RequestError)
|
|
351
|
+
throw error;
|
|
352
|
+
throw requestErrorFromRuntimeHost(error, 'session.turns.query');
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
async branch(params) {
|
|
356
|
+
return this.#track(this.#copySession('session.branch.create', params));
|
|
357
|
+
}
|
|
358
|
+
async createRevision(params) {
|
|
359
|
+
return this.#track(this.#copySession('session.revision.create', params));
|
|
360
|
+
}
|
|
361
|
+
async abandonRevision(params) {
|
|
362
|
+
this.#assertOpen('session.revision.abandon');
|
|
363
|
+
this.#assertOwned(params.targetSessionId);
|
|
364
|
+
const task = this.#track(this.#abandonRevision(params));
|
|
365
|
+
return task;
|
|
366
|
+
}
|
|
367
|
+
async close(params) {
|
|
368
|
+
this.#assertOpen('session.close');
|
|
369
|
+
const existing = this.#sessionCloseTasks.get(params.sessionId);
|
|
370
|
+
if (existing)
|
|
371
|
+
return existing;
|
|
372
|
+
if (!this.#ownedSessionIds.has(params.sessionId) &&
|
|
373
|
+
!this.#sessionLoadTails.has(params.sessionId)) {
|
|
374
|
+
throw unknownSessionError();
|
|
375
|
+
}
|
|
376
|
+
this.#sessionCloseGenerations.set(params.sessionId, (this.#sessionCloseGenerations.get(params.sessionId) ?? 0) + 1);
|
|
377
|
+
this.#sessionLoadControllers.get(params.sessionId)?.abort();
|
|
378
|
+
this.#ownedSessionIds.delete(params.sessionId);
|
|
379
|
+
this.#historyReplayDelivery.delete(params.sessionId);
|
|
380
|
+
const configuration = this.#attachmentConfigurations.get(params.sessionId);
|
|
381
|
+
const delivery = configuration?.delivery;
|
|
382
|
+
this.#attachmentConfigurations.delete(params.sessionId);
|
|
383
|
+
const task = this.#track(this.#closeSession(params.sessionId, delivery));
|
|
384
|
+
this.#sessionCloseTasks.set(params.sessionId, task);
|
|
385
|
+
const forget = () => {
|
|
386
|
+
if (this.#sessionCloseTasks.get(params.sessionId) === task) {
|
|
387
|
+
this.#sessionCloseTasks.delete(params.sessionId);
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
void task.then(forget, forget);
|
|
391
|
+
return task;
|
|
392
|
+
}
|
|
393
|
+
async artifactQuery(input) {
|
|
394
|
+
return this.#artifactRequest('artifact.query', input);
|
|
395
|
+
}
|
|
396
|
+
async artifactIngest(input) {
|
|
397
|
+
return this.#artifactRequest('artifact.ingest', input);
|
|
398
|
+
}
|
|
399
|
+
async artifactDelete(input) {
|
|
400
|
+
return this.#artifactRequest('artifact.delete', input);
|
|
401
|
+
}
|
|
402
|
+
async memoryQuery(input) {
|
|
403
|
+
return this.#hostRequest('memory.query', input);
|
|
404
|
+
}
|
|
405
|
+
async memoryMutate(input) {
|
|
406
|
+
const sessionId = 'scope' in input && input.scope.kind === 'session' ? input.scope.sessionId : undefined;
|
|
407
|
+
if (sessionId)
|
|
408
|
+
this.#assertOwned(sessionId);
|
|
409
|
+
return this.#hostRequest('memory.mutate', input, sessionId ? () => this.#assertOwned(sessionId) : undefined);
|
|
410
|
+
}
|
|
411
|
+
#artifactRequest(operation, input) {
|
|
412
|
+
this.#assertOpen(operation);
|
|
413
|
+
this.#assertOwned(input.sessionId);
|
|
414
|
+
const request = this.#hostRequest(operation, input, () => this.#assertOwned(input.sessionId));
|
|
415
|
+
let pending = this.#artifactOperations.get(input.sessionId);
|
|
416
|
+
if (!pending) {
|
|
417
|
+
pending = new Set();
|
|
418
|
+
this.#artifactOperations.set(input.sessionId, pending);
|
|
419
|
+
}
|
|
420
|
+
pending.add(request);
|
|
421
|
+
void request
|
|
422
|
+
.finally(() => {
|
|
423
|
+
pending.delete(request);
|
|
424
|
+
if (pending.size === 0)
|
|
425
|
+
this.#artifactOperations.delete(input.sessionId);
|
|
426
|
+
})
|
|
427
|
+
.catch(() => undefined);
|
|
428
|
+
return request;
|
|
429
|
+
}
|
|
430
|
+
async #hostRequest(operation, input, beforeDispatch) {
|
|
431
|
+
this.#assertOpen(operation);
|
|
432
|
+
return this.#track((async () => {
|
|
433
|
+
let trackedIngest;
|
|
434
|
+
try {
|
|
435
|
+
const connection = await this.#getConnection(operation);
|
|
436
|
+
this.#assertOpen(operation);
|
|
437
|
+
beforeDispatch?.();
|
|
438
|
+
if (operation === 'artifact.ingest') {
|
|
439
|
+
const upload = input;
|
|
440
|
+
let cleaning;
|
|
441
|
+
while ((cleaning = this.#artifactCleanupTasks.get(artifactUploadKey(upload.sessionId, upload.uploadId)))) {
|
|
442
|
+
await cleaning;
|
|
443
|
+
this.#assertOpen(operation);
|
|
444
|
+
beforeDispatch?.();
|
|
445
|
+
}
|
|
446
|
+
if (upload.kind === 'begin') {
|
|
447
|
+
this.#watchArtifactConnection(connection);
|
|
448
|
+
let uploads = this.#artifactUploads.get(upload.sessionId);
|
|
449
|
+
if (!uploads) {
|
|
450
|
+
uploads = new Map();
|
|
451
|
+
this.#artifactUploads.set(upload.sessionId, uploads);
|
|
452
|
+
}
|
|
453
|
+
if (!uploads.has(upload.uploadId) && uploads.size >= MAX_TRACKED_ARTIFACT_UPLOADS) {
|
|
454
|
+
await this.#pruneExpiredArtifactUploads(connection, upload.sessionId, uploads);
|
|
455
|
+
this.#assertOpen(operation);
|
|
456
|
+
beforeDispatch?.();
|
|
457
|
+
if (this.#artifactUploads.get(upload.sessionId) !== uploads) {
|
|
458
|
+
uploads = this.#artifactUploads.get(upload.sessionId) ?? new Map();
|
|
459
|
+
this.#artifactUploads.set(upload.sessionId, uploads);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
if (!uploads.has(upload.uploadId) && uploads.size >= MAX_TRACKED_ARTIFACT_UPLOADS) {
|
|
463
|
+
throw RequestError.internalError({ source: 'adapter', operation, code: 'upload_tracking_capacity' }, 'Too many unresolved Artifact uploads');
|
|
464
|
+
}
|
|
465
|
+
// Remember before dispatch: an interrupted response can hide an opened upload.
|
|
466
|
+
let state = uploads.get(upload.uploadId);
|
|
467
|
+
if (!state) {
|
|
468
|
+
state = {
|
|
469
|
+
touchedAt: Date.now(),
|
|
470
|
+
pendingRequests: 0,
|
|
471
|
+
mayBeOpen: false,
|
|
472
|
+
};
|
|
473
|
+
uploads.set(upload.uploadId, state);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
trackedIngest = this.#artifactUploads.get(upload.sessionId)?.get(upload.uploadId);
|
|
477
|
+
if (trackedIngest)
|
|
478
|
+
trackedIngest.pendingRequests += 1;
|
|
479
|
+
}
|
|
480
|
+
const result = await connection.request(operation, input, EXTENSION_REQUEST_TIMEOUT_MS);
|
|
481
|
+
if (operation === 'artifact.ingest') {
|
|
482
|
+
const upload = input;
|
|
483
|
+
const uploads = this.#artifactUploads.get(upload.sessionId);
|
|
484
|
+
if (upload.kind === 'abort' ||
|
|
485
|
+
upload.kind === 'commit' ||
|
|
486
|
+
(upload.kind === 'begin' && result.kind === 'committed')) {
|
|
487
|
+
const state = uploads?.get(upload.uploadId);
|
|
488
|
+
if (state) {
|
|
489
|
+
state.mayBeOpen = false;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
else if (upload.kind === 'begin' && trackedIngest) {
|
|
493
|
+
trackedIngest.mayBeOpen = true;
|
|
494
|
+
trackedIngest.touchedAt = Date.now();
|
|
495
|
+
let currentUploads = this.#artifactUploads.get(upload.sessionId);
|
|
496
|
+
if (!currentUploads) {
|
|
497
|
+
currentUploads = new Map();
|
|
498
|
+
this.#artifactUploads.set(upload.sessionId, currentUploads);
|
|
499
|
+
}
|
|
500
|
+
if (!currentUploads.has(upload.uploadId)) {
|
|
501
|
+
currentUploads.set(upload.uploadId, trackedIngest);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
else if (upload.kind === 'chunk') {
|
|
505
|
+
const state = uploads?.get(upload.uploadId);
|
|
506
|
+
if (state)
|
|
507
|
+
state.touchedAt = Date.now();
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
return result;
|
|
511
|
+
}
|
|
512
|
+
catch (error) {
|
|
513
|
+
if (operation === 'artifact.ingest') {
|
|
514
|
+
const upload = input;
|
|
515
|
+
const uploads = this.#artifactUploads.get(upload.sessionId);
|
|
516
|
+
if (upload.kind === 'begin' && trackedIngest) {
|
|
517
|
+
if (error instanceof RuntimeHostRequestInterruptedError &&
|
|
518
|
+
error.dispatch === 'dispatched') {
|
|
519
|
+
trackedIngest.mayBeOpen = true;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
else if (upload.kind === 'commit' &&
|
|
523
|
+
error instanceof RuntimeHostOperationError &&
|
|
524
|
+
(error.code === 'not_found' ||
|
|
525
|
+
(error.code === 'operation_conflict' &&
|
|
526
|
+
error.message === 'Attachment content digest does not match'))) {
|
|
527
|
+
const state = uploads?.get(upload.uploadId);
|
|
528
|
+
if (state) {
|
|
529
|
+
state.mayBeOpen = false;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
if (error instanceof RequestError)
|
|
534
|
+
throw error;
|
|
535
|
+
throw requestErrorFromRuntimeHost(error, operation);
|
|
536
|
+
}
|
|
537
|
+
finally {
|
|
538
|
+
if (trackedIngest) {
|
|
539
|
+
trackedIngest.pendingRequests -= 1;
|
|
540
|
+
const upload = input;
|
|
541
|
+
const uploads = this.#artifactUploads.get(upload.sessionId);
|
|
542
|
+
if (!trackedIngest.mayBeOpen && trackedIngest.pendingRequests === 0) {
|
|
543
|
+
if (uploads?.get(upload.uploadId) === trackedIngest)
|
|
544
|
+
uploads.delete(upload.uploadId);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
})());
|
|
549
|
+
}
|
|
550
|
+
async #pruneExpiredArtifactUploads(connection, sessionId, uploads) {
|
|
551
|
+
const expired = [...uploads].filter(([uploadId, state]) => state.pendingRequests === 0 &&
|
|
552
|
+
!this.#artifactCleanupTasks.has(artifactUploadKey(sessionId, uploadId)) &&
|
|
553
|
+
Date.now() - state.touchedAt > ARTIFACT_UPLOAD_TTL_MS + EXTENSION_REQUEST_TIMEOUT_MS);
|
|
554
|
+
const cleanups = expired.map(([uploadId, state]) => {
|
|
555
|
+
const key = artifactUploadKey(sessionId, uploadId);
|
|
556
|
+
const cleanup = Promise.resolve()
|
|
557
|
+
.then(() => connection.request('artifact.ingest', { kind: 'abort', sessionId, uploadId }, ARTIFACT_CLEANUP_TIMEOUT_MS))
|
|
558
|
+
.then(() => {
|
|
559
|
+
if (uploads.get(uploadId) === state)
|
|
560
|
+
uploads.delete(uploadId);
|
|
561
|
+
}, () => undefined)
|
|
562
|
+
.finally(() => {
|
|
563
|
+
if (this.#artifactCleanupTasks.get(key) === cleanup) {
|
|
564
|
+
this.#artifactCleanupTasks.delete(key);
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
this.#artifactCleanupTasks.set(key, cleanup);
|
|
568
|
+
return cleanup;
|
|
569
|
+
});
|
|
570
|
+
await Promise.all(cleanups);
|
|
571
|
+
}
|
|
572
|
+
#watchArtifactConnection(connection) {
|
|
573
|
+
if (this.#artifactConnectionDisposer)
|
|
574
|
+
return;
|
|
575
|
+
this.#artifactConnectionDisposer = connection.subscribeConnectionAvailability((availability) => {
|
|
576
|
+
const identity = availability.kind === 'connected'
|
|
577
|
+
? JSON.stringify([availability.hostEpoch, availability.connectionId])
|
|
578
|
+
: undefined;
|
|
579
|
+
if (identity !== this.#artifactConnectionIdentity) {
|
|
580
|
+
this.#artifactConnectionIdentity = identity;
|
|
581
|
+
this.#artifactUploads.clear();
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
dispose() {
|
|
586
|
+
this.#closing = true;
|
|
587
|
+
this.#connectAbortController?.abort();
|
|
588
|
+
this.#creationAbort.abort();
|
|
589
|
+
for (const controller of this.#sessionLoadControllers.values())
|
|
590
|
+
controller.abort();
|
|
591
|
+
this.#disposeTask ??= this.#dispose();
|
|
592
|
+
return this.#disposeTask;
|
|
593
|
+
}
|
|
594
|
+
async #prompt(params, context) {
|
|
595
|
+
const turnId = this.#newTurnId();
|
|
596
|
+
const active = new AcpAdmittedTurnObservation({
|
|
597
|
+
sessionId: params.sessionId,
|
|
598
|
+
turnId,
|
|
599
|
+
notify: async (notification) => {
|
|
600
|
+
if (!this.#closing && this.#ownedSessionIds.has(params.sessionId)) {
|
|
601
|
+
await context.notify(notification);
|
|
602
|
+
this.#recordLiveHistoryDelivery(params.sessionId, notification, active);
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
});
|
|
606
|
+
if (this.#historyReplays.has(params.sessionId))
|
|
607
|
+
void active.holdLive().catch(() => undefined);
|
|
608
|
+
this.#setTurnObservation(active);
|
|
609
|
+
const onAbort = () => {
|
|
610
|
+
void this.#cancelPrompt(active).catch(() => undefined);
|
|
611
|
+
};
|
|
612
|
+
context.signal.addEventListener('abort', onAbort, { once: true });
|
|
613
|
+
if (context.signal.aborted)
|
|
614
|
+
onAbort();
|
|
615
|
+
try {
|
|
616
|
+
const content = await mapAcpPromptContent(params.prompt);
|
|
617
|
+
let startInput;
|
|
618
|
+
try {
|
|
619
|
+
startInput = HOST_OPERATION_SPECS['turn.start'].decodeInput({
|
|
620
|
+
sessionId: params.sessionId,
|
|
621
|
+
turnId,
|
|
622
|
+
content,
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
catch {
|
|
626
|
+
throw RequestError.invalidParams({ field: 'prompt', reason: 'runtime_host_admission_rejected' }, 'Prompt cannot be admitted by Runtime Host');
|
|
627
|
+
}
|
|
628
|
+
if (active.cancelled)
|
|
629
|
+
return { stopReason: await this.#cancelledStopReason(active) };
|
|
630
|
+
const connection = await this.#getConnection('subscription.open');
|
|
631
|
+
let attachment;
|
|
632
|
+
try {
|
|
633
|
+
attachment = await this.#ensureAttachment(params.sessionId, connection, {
|
|
634
|
+
...context,
|
|
635
|
+
signal: active.projectionAbort.signal,
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
catch (error) {
|
|
639
|
+
if (active.cancelled)
|
|
640
|
+
return { stopReason: await this.#cancelledStopReason(active) };
|
|
641
|
+
throw error;
|
|
642
|
+
}
|
|
643
|
+
active.attachment = attachment;
|
|
644
|
+
active.wake();
|
|
645
|
+
if (active.cancelled)
|
|
646
|
+
return { stopReason: await this.#cancelledStopReason(active) };
|
|
647
|
+
try {
|
|
648
|
+
startInput = {
|
|
649
|
+
...startInput,
|
|
650
|
+
content: await publishAcpPromptAttachments(content, {
|
|
651
|
+
sessionId: params.sessionId,
|
|
652
|
+
connection,
|
|
653
|
+
assertActive: () => {
|
|
654
|
+
if (active.cancelled)
|
|
655
|
+
throw new Error('ACP prompt cancelled before Turn admission');
|
|
656
|
+
this.#assertOpen('turn.start');
|
|
657
|
+
this.#assertOwned(params.sessionId);
|
|
658
|
+
},
|
|
659
|
+
}),
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
catch (error) {
|
|
663
|
+
if (error instanceof RequestError)
|
|
664
|
+
throw error;
|
|
665
|
+
throw requestErrorFromRuntimeHost(error, 'artifact.ingest');
|
|
666
|
+
}
|
|
667
|
+
if (active.cancelled)
|
|
668
|
+
return { stopReason: await this.#cancelledStopReason(active) };
|
|
669
|
+
await this.#mcps.get(params.sessionId)?.ready(active.projectionAbort.signal);
|
|
670
|
+
if (active.cancelled)
|
|
671
|
+
return { stopReason: await this.#cancelledStopReason(active) };
|
|
672
|
+
this.#assertOwned(params.sessionId);
|
|
673
|
+
const observation = active.start(attachment);
|
|
674
|
+
// Mark the observer as handled immediately: turn.start may still be in flight
|
|
675
|
+
// when the live subscription reports a failure.
|
|
676
|
+
void observation.catch(() => undefined);
|
|
677
|
+
active.markDispatched();
|
|
678
|
+
try {
|
|
679
|
+
const result = await connection.request('turn.start', startInput);
|
|
680
|
+
active.settleStartRequest(result.kind === 'started' ? result.turn : undefined);
|
|
681
|
+
if (result.kind === 'blocked') {
|
|
682
|
+
const error = new Error('Runtime Host blocked the requested Turn');
|
|
683
|
+
attachment.failTurn(turnId, error);
|
|
684
|
+
throw error;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
catch (error) {
|
|
688
|
+
// A lost dispatched response does not establish whether Host admitted
|
|
689
|
+
// this Turn. Retain this attempt until subscription or query facts do.
|
|
690
|
+
active.failStartRequest(error);
|
|
691
|
+
if (!active.admission.settled) {
|
|
692
|
+
this.#queryPromptAdmission(active, connection);
|
|
693
|
+
}
|
|
694
|
+
attachment.failTurn(turnId, error);
|
|
695
|
+
if (!active.cancelled)
|
|
696
|
+
throw requestErrorFromRuntimeHost(error, 'turn.start');
|
|
697
|
+
}
|
|
698
|
+
if (active.cancelled) {
|
|
699
|
+
await active.stopTask?.catch(() => undefined);
|
|
700
|
+
return { stopReason: await this.#cancelledStopReason(active) };
|
|
701
|
+
}
|
|
702
|
+
const stopReason = await observation;
|
|
703
|
+
return { stopReason };
|
|
704
|
+
}
|
|
705
|
+
catch (error) {
|
|
706
|
+
// A failed projection must not leave the corresponding Host Turn running.
|
|
707
|
+
active.stopTask ??= this.#stopPromptWhenObservable(active);
|
|
708
|
+
await active.stopTask.catch(() => undefined);
|
|
709
|
+
if (active.cancelled)
|
|
710
|
+
return { stopReason: await this.#cancelledStopReason(active) };
|
|
711
|
+
if (active.admission.failure)
|
|
712
|
+
throw active.admission.failure;
|
|
713
|
+
if (error instanceof RequestError)
|
|
714
|
+
throw error;
|
|
715
|
+
throw requestErrorFromRuntimeHost(error, 'subscription.open');
|
|
716
|
+
}
|
|
717
|
+
finally {
|
|
718
|
+
context.signal.removeEventListener('abort', onAbort);
|
|
719
|
+
// A terminal subscription event can precede the Stop response. Retain this
|
|
720
|
+
// prompt so close/dispose cannot release its connection while Stop is in flight.
|
|
721
|
+
await active.stopTask?.catch(() => undefined);
|
|
722
|
+
active.dispose();
|
|
723
|
+
this.#attachmentInteractions.get(active.sessionId)?.settleTurn(active.turnId);
|
|
724
|
+
const observed = active.attachment?.snapshot.rootTurn;
|
|
725
|
+
if (observed?.turnId === active.turnId && isRuntimeHostTerminalTurn(observed)) {
|
|
726
|
+
this.#attachmentInteractions.get(active.sessionId)?.terminalTurn(active.turnId);
|
|
727
|
+
}
|
|
728
|
+
active.wake();
|
|
729
|
+
this.#removeTurnObservation(active);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
async #cancelledStopReason(active) {
|
|
733
|
+
return active.cancelledStopReason();
|
|
734
|
+
}
|
|
735
|
+
#cancelSession(sessionId) {
|
|
736
|
+
const active = this.#admittedTurns(sessionId);
|
|
737
|
+
const cancellations = active.map((prompt) => this.#cancelPrompt(prompt));
|
|
738
|
+
for (const observation of this.#turnObservations.get(sessionId)?.values() ?? []) {
|
|
739
|
+
if (!(observation instanceof AcpAdmittedTurnObservation) && observation.stopTask) {
|
|
740
|
+
cancellations.push(observation.stopTask);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
this.#attachmentOpenControllers.get(sessionId)?.abort();
|
|
744
|
+
const attachment = this.#attachments.get(sessionId);
|
|
745
|
+
if (attachment) {
|
|
746
|
+
cancellations.push(attachment.then(async (opened) => {
|
|
747
|
+
const root = opened.snapshot.rootTurn;
|
|
748
|
+
// Local prompts already latch cancellation across pending turn.start.
|
|
749
|
+
// An idle attachment may also observe a Turn started by another client.
|
|
750
|
+
if (root &&
|
|
751
|
+
!isRuntimeHostTerminalTurn(root) &&
|
|
752
|
+
!active.some((prompt) => prompt.turnId === root.turnId)) {
|
|
753
|
+
const observation = this.#observation(sessionId, root.turnId);
|
|
754
|
+
if (observation && observation.attachment === opened) {
|
|
755
|
+
observation.stopTask ??= this.#stopAttachedTurn(opened, root);
|
|
756
|
+
await observation.stopTask;
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
await this.#stopAttachedTurn(opened, root);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}, () => undefined));
|
|
763
|
+
}
|
|
764
|
+
return Promise.allSettled(cancellations);
|
|
765
|
+
}
|
|
766
|
+
#stopAttachedTurn(attachment, root) {
|
|
767
|
+
const current = attachment.snapshot.rootTurn;
|
|
768
|
+
if (!current ||
|
|
769
|
+
current.sessionId !== root.sessionId ||
|
|
770
|
+
current.turnId !== root.turnId ||
|
|
771
|
+
current.runId !== root.runId ||
|
|
772
|
+
isRuntimeHostTerminalTurn(current))
|
|
773
|
+
return Promise.resolve();
|
|
774
|
+
const observation = this.#observation(root.sessionId, root.turnId);
|
|
775
|
+
if (observation && observation.runId !== undefined && observation.runId !== root.runId)
|
|
776
|
+
return Promise.resolve();
|
|
777
|
+
if (observation && observation.attachment === attachment) {
|
|
778
|
+
observation.cancelled = true;
|
|
779
|
+
observation.projectionAbort.abort();
|
|
780
|
+
observation.reconciliationAbort.abort();
|
|
781
|
+
}
|
|
782
|
+
// Fence before sending Stop: a failed delivery cannot authorize a late answer.
|
|
783
|
+
this.#attachmentInteractions.get(root.sessionId)?.cancelTurn(root.turnId);
|
|
784
|
+
return (this.#connection
|
|
785
|
+
?.request('turn.stop', { sessionId: root.sessionId, turnId: root.turnId, runId: root.runId }, TURN_STOP_TIMEOUT_MS)
|
|
786
|
+
.then(() => undefined) ?? Promise.resolve());
|
|
787
|
+
}
|
|
788
|
+
async #cancelPrompt(active) {
|
|
789
|
+
active.cancelled = true;
|
|
790
|
+
active.wake();
|
|
791
|
+
active.projectionAbort.abort();
|
|
792
|
+
active.reconciliationAbort.abort();
|
|
793
|
+
this.#attachmentInteractions.get(active.sessionId)?.cancelTurn(active.turnId);
|
|
794
|
+
active.stopTask ??= this.#stopPromptWhenObservable(active);
|
|
795
|
+
await Promise.all([
|
|
796
|
+
active.mapper.flush().catch(() => undefined),
|
|
797
|
+
active.stopTask.catch((error) => {
|
|
798
|
+
// End only this prompt's observation. Failed delivery does not establish
|
|
799
|
+
// a terminal Host Turn, and teardown still receives the original error.
|
|
800
|
+
active.attachment?.failTurn(active.turnId, error);
|
|
801
|
+
throw error;
|
|
802
|
+
}),
|
|
803
|
+
]);
|
|
804
|
+
}
|
|
805
|
+
async #stopPromptWhenObservable(active) {
|
|
806
|
+
if (!active.admission.dispatchStarted)
|
|
807
|
+
return;
|
|
808
|
+
while (!active.finished) {
|
|
809
|
+
const observed = active.attachment?.snapshot.rootTurn;
|
|
810
|
+
// Subscription teardown can precede the start response. Keep the admitted
|
|
811
|
+
// identity until exact Stop completes, even when observation has ended.
|
|
812
|
+
const root = observed?.turnId === active.turnId ? observed : active.admission.startedTurn;
|
|
813
|
+
if (root) {
|
|
814
|
+
if (isRuntimeHostTerminalTurn(root))
|
|
815
|
+
return;
|
|
816
|
+
const connection = this.#connection;
|
|
817
|
+
if (!connection)
|
|
818
|
+
return;
|
|
819
|
+
try {
|
|
820
|
+
await connection.request('turn.stop', { sessionId: root.sessionId, turnId: root.turnId, runId: root.runId }, TURN_STOP_TIMEOUT_MS);
|
|
821
|
+
}
|
|
822
|
+
catch (error) {
|
|
823
|
+
console.error('[acp] Host Stop delivery failed:', error);
|
|
824
|
+
throw error;
|
|
825
|
+
}
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
if (active.admission.settled && active.admission.startRequestSettled)
|
|
829
|
+
return;
|
|
830
|
+
if (active.admission.failure) {
|
|
831
|
+
console.error('[acp] Host Turn admission remains unknown:', active.admission.failure);
|
|
832
|
+
throw active.admission.failure;
|
|
833
|
+
}
|
|
834
|
+
await active.waitForChange();
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
#queryPromptAdmission(active, connection) {
|
|
838
|
+
// Recovery and the lost start response can both request this read. Keep one
|
|
839
|
+
// bounded retry task; neither a healthy subscription nor a query failure
|
|
840
|
+
// other than not_found establishes whether a dispatched start was admitted.
|
|
841
|
+
active.admission.query ??= this.#readPromptAdmission(active, connection);
|
|
842
|
+
}
|
|
843
|
+
async #readPromptAdmission(active, connection) {
|
|
844
|
+
let lastError;
|
|
845
|
+
for (let attempt = 0; attempt < ADMISSION_QUERY_MAX_ATTEMPTS; attempt += 1) {
|
|
846
|
+
if (active.finished || active.admission.settled || (this.#closing && attempt > 0))
|
|
847
|
+
return;
|
|
848
|
+
const observed = active.attachment?.snapshot.rootTurn;
|
|
849
|
+
if (observed?.turnId === active.turnId) {
|
|
850
|
+
active.observeStartedTurn(observed);
|
|
851
|
+
return;
|
|
852
|
+
}
|
|
853
|
+
try {
|
|
854
|
+
const turn = await connection.request('turn.query', { sessionId: active.sessionId, turnId: active.turnId }, ADMISSION_QUERY_TIMEOUT_MS);
|
|
855
|
+
if (!active.finished && !active.admission.settled) {
|
|
856
|
+
active.observeStartedTurn(turn);
|
|
857
|
+
}
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
catch (error) {
|
|
861
|
+
if (error instanceof RuntimeHostOperationError && error.code === 'not_found') {
|
|
862
|
+
const observed = active.attachment?.snapshot.rootTurn;
|
|
863
|
+
active.settleAbsentTurn(observed?.turnId === active.turnId ? observed : undefined);
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
lastError = error;
|
|
867
|
+
}
|
|
868
|
+
if (active.finished || active.admission.settled || this.#closing)
|
|
869
|
+
return;
|
|
870
|
+
if (attempt + 1 < ADMISSION_QUERY_MAX_ATTEMPTS) {
|
|
871
|
+
await active.waitForChange(ADMISSION_QUERY_RETRY_MS * 2 ** attempt);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
if (active.attachment?.snapshot.rootTurn?.turnId === active.turnId) {
|
|
875
|
+
active.wake();
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
active.failAdmission(RequestError.internalError({
|
|
879
|
+
source: 'runtime_host',
|
|
880
|
+
operation: 'turn.query',
|
|
881
|
+
code: 'outcome_unknown',
|
|
882
|
+
reason: 'admission_query_failed',
|
|
883
|
+
attempts: ADMISSION_QUERY_MAX_ATTEMPTS,
|
|
884
|
+
cause: runtimeHostErrorData(lastError, 'turn.query'),
|
|
885
|
+
}, 'Runtime Host Turn admission could not be established; Stop could not be confirmed'));
|
|
886
|
+
}
|
|
887
|
+
async #ensureAttachment(sessionId, connection, context) {
|
|
888
|
+
context.signal.throwIfAborted();
|
|
889
|
+
let waiters = this.#attachmentWaiters.get(sessionId);
|
|
890
|
+
if (!waiters) {
|
|
891
|
+
waiters = new Set();
|
|
892
|
+
this.#attachmentWaiters.set(sessionId, waiters);
|
|
893
|
+
}
|
|
894
|
+
const waiter = {};
|
|
895
|
+
waiters.add(waiter);
|
|
896
|
+
try {
|
|
897
|
+
return await abortable(() => this.#openAttachment(sessionId, connection, context), context.signal);
|
|
898
|
+
}
|
|
899
|
+
finally {
|
|
900
|
+
waiters.delete(waiter);
|
|
901
|
+
if (waiters.size === 0 && this.#attachmentWaiters.get(sessionId) === waiters) {
|
|
902
|
+
this.#attachmentWaiters.delete(sessionId);
|
|
903
|
+
if (context.signal.aborted && !this.#hasAttachmentConsumers(sessionId)) {
|
|
904
|
+
this.#attachmentOpenControllers.get(sessionId)?.abort();
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
#hasAttachmentConsumers(sessionId) {
|
|
910
|
+
return ((this.#attachmentWaiters.get(sessionId)?.size ?? 0) > 0 ||
|
|
911
|
+
this.#admittedTurns(sessionId).some((active) => !active.cancelled && !active.finished));
|
|
912
|
+
}
|
|
913
|
+
async #openAttachment(sessionId, connection, context) {
|
|
914
|
+
const existing = this.#attachments.get(sessionId);
|
|
915
|
+
if (existing)
|
|
916
|
+
return existing;
|
|
917
|
+
const openingController = new AbortController();
|
|
918
|
+
this.#attachmentOpenControllers.set(sessionId, openingController);
|
|
919
|
+
const configuration = {
|
|
920
|
+
notify: context.notify,
|
|
921
|
+
// Setters can outlive an absent or failed attachment. Their responses
|
|
922
|
+
// must precede refreshes delivered by the new attachment's queue.
|
|
923
|
+
tail: Promise.allSettled([...(this.#pendingConfigSets.get(sessionId) ?? [])]),
|
|
924
|
+
};
|
|
925
|
+
this.#attachmentConfigurations.set(sessionId, configuration);
|
|
926
|
+
let task;
|
|
927
|
+
let attachment;
|
|
928
|
+
let earlyFailure;
|
|
929
|
+
const failAttachment = (error) => {
|
|
930
|
+
if (!attachment) {
|
|
931
|
+
earlyFailure = error;
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
this.#retireFailedAttachment(sessionId, task, attachment, error);
|
|
935
|
+
};
|
|
936
|
+
const interactions = new AcpSessionInteractions({
|
|
937
|
+
sessionId,
|
|
938
|
+
connection,
|
|
939
|
+
client: context.interactions ?? UNAVAILABLE_INTERACTION_CLIENT,
|
|
940
|
+
onPending: async (pending) => {
|
|
941
|
+
const observation = this.#observation(sessionId, pending.turnId);
|
|
942
|
+
if (observation && !observation.cancelled) {
|
|
943
|
+
await observation.pendingInteraction(pending);
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
onAnswered: (answered, pending) => attachment?.publishInteractionAnswer(answered, pending),
|
|
947
|
+
onResolved: async (resolved, pending) => {
|
|
948
|
+
const observation = this.#observation(sessionId, pending.turnId);
|
|
949
|
+
if (observation && !observation.cancelled && !observation.finished) {
|
|
950
|
+
await observation.resolvedInteraction(resolved, pending);
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
onFailure: (pending, error) => {
|
|
954
|
+
const observation = this.#observation(sessionId, pending.turnId);
|
|
955
|
+
if (observation?.attachment) {
|
|
956
|
+
if (!(observation instanceof AcpAdmittedTurnObservation)) {
|
|
957
|
+
console.error('[acp] Attached interaction presentation failed:', error);
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
observation.projectionFailure ??= error;
|
|
961
|
+
observation.attachment.failTurn(observation.turnId, error);
|
|
962
|
+
}
|
|
963
|
+
else if (!attachment)
|
|
964
|
+
failAttachment(error);
|
|
965
|
+
},
|
|
966
|
+
onCancelled: (pending) => {
|
|
967
|
+
let localPrompt = false;
|
|
968
|
+
for (const active of this.#admittedTurns(sessionId)) {
|
|
969
|
+
if (active.turnId === pending.turnId) {
|
|
970
|
+
localPrompt = true;
|
|
971
|
+
void this.#cancelPrompt(active).catch(() => undefined);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
if (!localPrompt && this.#observation(sessionId, pending.turnId)) {
|
|
975
|
+
void this.#cancelSession(sessionId).catch(() => undefined);
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
});
|
|
979
|
+
this.#attachmentInteractions.set(sessionId, interactions);
|
|
980
|
+
const domainObservation = new AcpSessionDomainObservation({
|
|
981
|
+
sessionId,
|
|
982
|
+
queryPlan: () => connection.request('plan.query', { kind: 'list_start', sessionId }),
|
|
983
|
+
goalNotify: () => this.#externalObservationContexts.get(sessionId)?.notifyGoalStatus,
|
|
984
|
+
planNotify: () => this.#externalObservationContexts.get(sessionId)?.notifyPlanChanged,
|
|
985
|
+
});
|
|
986
|
+
this.#domainObservations.set(sessionId, domainObservation);
|
|
987
|
+
task = RuntimeHostSessionChannel.open({
|
|
988
|
+
connection,
|
|
989
|
+
signal: openingController.signal,
|
|
990
|
+
openInitialSessionSubscription: connection.openSessionSubscriptionOnce.bind(connection),
|
|
991
|
+
sessionId,
|
|
992
|
+
now: Date.now,
|
|
993
|
+
onTurnStarted: (turn) => {
|
|
994
|
+
if (attachment)
|
|
995
|
+
void this.#adoptTurn(sessionId, turn.turnId, attachment, false, turn.runId, attachment.terminalTurn(turn.turnId)).catch((error) => {
|
|
996
|
+
console.error('[acp] Attached Turn observation failed:', error);
|
|
997
|
+
});
|
|
998
|
+
},
|
|
999
|
+
onRuntimeResourceChanged: () => undefined,
|
|
1000
|
+
onSessionDomainChanged: (frame) => {
|
|
1001
|
+
if (frame.domain === 'plan' &&
|
|
1002
|
+
this.#externalObservationContexts.get(sessionId)?.notifyPlanChanged)
|
|
1003
|
+
domainObservation.planChanged();
|
|
1004
|
+
},
|
|
1005
|
+
onCanonicalReplacement: (snapshot) => {
|
|
1006
|
+
if (attachment && this.#discardedAttachments.has(attachment))
|
|
1007
|
+
return;
|
|
1008
|
+
if (this.#externalObservationContexts.get(sessionId)?.notifyPlanChanged ||
|
|
1009
|
+
this.#externalObservationContexts.get(sessionId)?.notifyGoalStatus) {
|
|
1010
|
+
domainObservation.canonicalReplacement(snapshot.goal);
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
onSnapshotChanged: (snapshot) => {
|
|
1014
|
+
if (attachment && this.#discardedAttachments.has(attachment))
|
|
1015
|
+
return;
|
|
1016
|
+
this.#wakeSession(sessionId);
|
|
1017
|
+
if (snapshot.rootTurn && isRuntimeHostTerminalTurn(snapshot.rootTurn)) {
|
|
1018
|
+
interactions.terminalTurn(snapshot.rootTurn.turnId);
|
|
1019
|
+
}
|
|
1020
|
+
const root = snapshot.rootTurn;
|
|
1021
|
+
const observation = root && this.#observation(sessionId, root.turnId);
|
|
1022
|
+
const prompt = observation instanceof AcpAdmittedTurnObservation ? observation : undefined;
|
|
1023
|
+
const observedRunId = observation?.runId ??
|
|
1024
|
+
prompt?.admission.startedTurn?.runId ??
|
|
1025
|
+
observation?.terminalTurn?.runId;
|
|
1026
|
+
if (root && observation && (observedRunId === undefined || observedRunId === root.runId)) {
|
|
1027
|
+
if (isRuntimeHostTerminalTurn(root))
|
|
1028
|
+
observation.terminalTurn = root;
|
|
1029
|
+
if (prompt) {
|
|
1030
|
+
prompt.observeStartedTurn(root);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
if (configuration.metadataRevision === undefined) {
|
|
1034
|
+
configuration.metadataRevision = snapshot.session.metadataRevision;
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
if (configuration.metadataRevision === snapshot.session.metadataRevision)
|
|
1038
|
+
return;
|
|
1039
|
+
configuration.metadataRevision = snapshot.session.metadataRevision;
|
|
1040
|
+
void this.#queueConfiguration(configuration, async () => {
|
|
1041
|
+
if (!this.#configurationIsLive(sessionId, configuration))
|
|
1042
|
+
return;
|
|
1043
|
+
const session = await getRuntimeHostSession(connection, sessionId);
|
|
1044
|
+
if (!session)
|
|
1045
|
+
throw unknownSessionError();
|
|
1046
|
+
const configOptions = await this.#projectConfigOptions(connection, session);
|
|
1047
|
+
await this.#notifyConfiguration(sessionId, configuration, configOptions);
|
|
1048
|
+
}).catch((error) => {
|
|
1049
|
+
// Closing or replacing the attachment intentionally invalidates any
|
|
1050
|
+
// in-flight presentation refresh; its interrupted read is no longer actionable.
|
|
1051
|
+
if (this.#configurationIsLive(sessionId, configuration)) {
|
|
1052
|
+
console.error('[acp] Session configuration refresh failed:', error);
|
|
1053
|
+
}
|
|
1054
|
+
});
|
|
1055
|
+
},
|
|
1056
|
+
onTranscriptReplaced: (turnId, messages) => {
|
|
1057
|
+
if (attachment && this.#discardedAttachments.has(attachment))
|
|
1058
|
+
return;
|
|
1059
|
+
const observation = this.#observation(sessionId, turnId);
|
|
1060
|
+
if (observation && !observation.cancelled) {
|
|
1061
|
+
void observation.replaceTranscript(messages).catch((error) => {
|
|
1062
|
+
observation.attachment?.failTurn(turnId, error);
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
onInteractionPending: (pending) => {
|
|
1067
|
+
if (attachment && this.#discardedAttachments.has(attachment))
|
|
1068
|
+
return;
|
|
1069
|
+
if (!interactions.fencesTurn(pending.turnId) &&
|
|
1070
|
+
!this.#observation(sessionId, pending.turnId)) {
|
|
1071
|
+
// An idle attachment can observe another client's Turn; it does not
|
|
1072
|
+
// transfer that Turn's interaction authority to this ACP client.
|
|
1073
|
+
return;
|
|
1074
|
+
}
|
|
1075
|
+
void interactions.pending(pending);
|
|
1076
|
+
},
|
|
1077
|
+
onInteractionResolved: (pending) => {
|
|
1078
|
+
if (attachment && this.#discardedAttachments.has(attachment))
|
|
1079
|
+
return;
|
|
1080
|
+
if (!interactions.fencesTurn(pending.turnId) &&
|
|
1081
|
+
!this.#observation(sessionId, pending.turnId))
|
|
1082
|
+
return;
|
|
1083
|
+
void interactions.resolved(pending);
|
|
1084
|
+
},
|
|
1085
|
+
onTranscriptSettlement: (turnId) => {
|
|
1086
|
+
if (attachment && this.#discardedAttachments.has(attachment))
|
|
1087
|
+
return;
|
|
1088
|
+
void this.#observation(sessionId, turnId)
|
|
1089
|
+
?.reconcile()
|
|
1090
|
+
.catch(() => undefined);
|
|
1091
|
+
},
|
|
1092
|
+
onGoalChanged: (goal) => domainObservation.goalChanged(goal),
|
|
1093
|
+
onFailed: failAttachment,
|
|
1094
|
+
onRecovered: () => {
|
|
1095
|
+
for (const active of this.#admittedTurns(sessionId)) {
|
|
1096
|
+
if (active.attachment !== attachment ||
|
|
1097
|
+
!active.admission.startRequestSettled ||
|
|
1098
|
+
active.admission.settled) {
|
|
1099
|
+
continue;
|
|
1100
|
+
}
|
|
1101
|
+
// Recovery may hydrate a snapshot taken before start admission.
|
|
1102
|
+
// An absent root needs a fresh query; a matching root can be stopped
|
|
1103
|
+
// directly by the existing cancellation task.
|
|
1104
|
+
if (attachment?.snapshot.rootTurn?.turnId !== active.turnId) {
|
|
1105
|
+
this.#queryPromptAdmission(active, connection);
|
|
1106
|
+
}
|
|
1107
|
+
active.wake();
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
})
|
|
1111
|
+
.then(async ({ channel, attachedTurnId }) => {
|
|
1112
|
+
attachment = channel;
|
|
1113
|
+
if (earlyFailure) {
|
|
1114
|
+
this.#retireFailedAttachment(sessionId, task, channel, earlyFailure);
|
|
1115
|
+
throw earlyFailure;
|
|
1116
|
+
}
|
|
1117
|
+
if (this.#closing || !this.#ownedSessionIds.has(sessionId)) {
|
|
1118
|
+
await channel.close();
|
|
1119
|
+
throw this.#closing ? registryClosedError('subscription.open') : unknownSessionError();
|
|
1120
|
+
}
|
|
1121
|
+
if (attachedTurnId) {
|
|
1122
|
+
const root = channel.snapshot.rootTurn;
|
|
1123
|
+
await this.#adoptTurn(sessionId, attachedTurnId, channel, false, root?.turnId === attachedTurnId
|
|
1124
|
+
? root.runId
|
|
1125
|
+
: channel.terminalTurn(attachedTurnId)?.runId, channel.terminalTurn(attachedTurnId));
|
|
1126
|
+
}
|
|
1127
|
+
channel.activate(attachedTurnId && this.#observation(sessionId, attachedTurnId)
|
|
1128
|
+
? attachedTurnId
|
|
1129
|
+
: undefined);
|
|
1130
|
+
if (this.#externalObservationContexts.get(sessionId)?.notifyGoalStatus ||
|
|
1131
|
+
this.#externalObservationContexts.get(sessionId)?.notifyPlanChanged) {
|
|
1132
|
+
domainObservation.initialize(channel.snapshot.goal);
|
|
1133
|
+
}
|
|
1134
|
+
return channel;
|
|
1135
|
+
})
|
|
1136
|
+
.catch((error) => {
|
|
1137
|
+
domainObservation.dispose();
|
|
1138
|
+
if (this.#domainObservations.get(sessionId) === domainObservation)
|
|
1139
|
+
this.#domainObservations.delete(sessionId);
|
|
1140
|
+
interactions.close();
|
|
1141
|
+
if (this.#attachmentInteractions.get(sessionId) === interactions) {
|
|
1142
|
+
this.#attachmentInteractions.delete(sessionId);
|
|
1143
|
+
}
|
|
1144
|
+
if (this.#attachments.get(sessionId) === task) {
|
|
1145
|
+
this.#attachments.delete(sessionId);
|
|
1146
|
+
this.#attachmentConfigurations.delete(sessionId);
|
|
1147
|
+
}
|
|
1148
|
+
if (error instanceof RequestError)
|
|
1149
|
+
throw error;
|
|
1150
|
+
throw requestErrorFromRuntimeHost(error, 'subscription.open');
|
|
1151
|
+
})
|
|
1152
|
+
.finally(() => {
|
|
1153
|
+
if (this.#attachmentOpenControllers.get(sessionId) === openingController) {
|
|
1154
|
+
this.#attachmentOpenControllers.delete(sessionId);
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
this.#attachments.set(sessionId, task);
|
|
1158
|
+
return task;
|
|
1159
|
+
}
|
|
1160
|
+
#retireFailedAttachment(sessionId, task, attachment, error) {
|
|
1161
|
+
this.#detachAttachment(sessionId, task);
|
|
1162
|
+
for (const active of this.#admittedTurns(sessionId)) {
|
|
1163
|
+
if (active.attachment !== attachment)
|
|
1164
|
+
continue;
|
|
1165
|
+
// Losing observation cannot settle a dispatched start. Its pending
|
|
1166
|
+
// response or bounded admission query still owns the exact Stop identity.
|
|
1167
|
+
attachment.failTurn(active.turnId, error);
|
|
1168
|
+
active.wake();
|
|
1169
|
+
}
|
|
1170
|
+
for (const observation of this.#turnObservations.get(sessionId)?.values() ?? []) {
|
|
1171
|
+
if (observation.attachment !== attachment ||
|
|
1172
|
+
observation instanceof AcpAdmittedTurnObservation)
|
|
1173
|
+
continue;
|
|
1174
|
+
observation.attachment.failTurn(observation.turnId, error);
|
|
1175
|
+
}
|
|
1176
|
+
void attachment.close().catch(() => undefined);
|
|
1177
|
+
}
|
|
1178
|
+
#detachAttachment(sessionId, expected = this.#attachments.get(sessionId)) {
|
|
1179
|
+
if (!expected || this.#attachments.get(sessionId) !== expected)
|
|
1180
|
+
return;
|
|
1181
|
+
this.#attachmentOpenControllers.get(sessionId)?.abort();
|
|
1182
|
+
this.#attachmentInteractions.get(sessionId)?.close();
|
|
1183
|
+
this.#attachmentInteractions.delete(sessionId);
|
|
1184
|
+
this.#domainObservations.get(sessionId)?.dispose();
|
|
1185
|
+
this.#domainObservations.delete(sessionId);
|
|
1186
|
+
this.#attachmentConfigurations.delete(sessionId);
|
|
1187
|
+
this.#attachments.delete(sessionId);
|
|
1188
|
+
return expected;
|
|
1189
|
+
}
|
|
1190
|
+
#detachMcp(sessionId, expected = this.#mcps.get(sessionId)) {
|
|
1191
|
+
if (!expected || this.#mcps.get(sessionId) !== expected)
|
|
1192
|
+
return;
|
|
1193
|
+
this.#mcps.delete(sessionId);
|
|
1194
|
+
return expected;
|
|
1195
|
+
}
|
|
1196
|
+
async #closeSession(sessionId, delivery) {
|
|
1197
|
+
const cancellation = await this.#cancelSession(sessionId);
|
|
1198
|
+
this.#externalObservationContexts.delete(sessionId);
|
|
1199
|
+
this.#externalContextLeases.delete(sessionId);
|
|
1200
|
+
for (const observation of this.#turnObservations.get(sessionId)?.values() ?? []) {
|
|
1201
|
+
if (!(observation instanceof AcpAdmittedTurnObservation)) {
|
|
1202
|
+
observation.dispose();
|
|
1203
|
+
this.#removeTurnObservation(observation);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
const attachmentTask = this.#detachAttachment(sessionId);
|
|
1207
|
+
let closeError;
|
|
1208
|
+
const artifactOperations = this.#artifactOperations.get(sessionId);
|
|
1209
|
+
if (artifactOperations)
|
|
1210
|
+
await Promise.allSettled([...artifactOperations]);
|
|
1211
|
+
const uploads = this.#artifactUploads.get(sessionId);
|
|
1212
|
+
this.#artifactUploads.delete(sessionId);
|
|
1213
|
+
if (uploads && this.#connection) {
|
|
1214
|
+
const aborts = await Promise.allSettled([...uploads.keys()].map((uploadId) => this.#connection.request('artifact.ingest', { kind: 'abort', sessionId, uploadId }, ARTIFACT_CLEANUP_TIMEOUT_MS)));
|
|
1215
|
+
const failedAbort = aborts.find((result) => result.status === 'rejected');
|
|
1216
|
+
if (failedAbort) {
|
|
1217
|
+
closeError = requestErrorFromRuntimeHost(failedAbort.reason, 'artifact.ingest');
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
if (attachmentTask) {
|
|
1221
|
+
try {
|
|
1222
|
+
// A rejected open has no retained resource; close still releases ownership.
|
|
1223
|
+
const attachment = await attachmentTask.catch(() => undefined);
|
|
1224
|
+
await attachment?.close();
|
|
1225
|
+
}
|
|
1226
|
+
catch (error) {
|
|
1227
|
+
closeError ??= error;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
const mcp = this.#detachMcp(sessionId);
|
|
1231
|
+
try {
|
|
1232
|
+
await mcp?.close();
|
|
1233
|
+
}
|
|
1234
|
+
catch (error) {
|
|
1235
|
+
closeError ??= error;
|
|
1236
|
+
}
|
|
1237
|
+
await delivery;
|
|
1238
|
+
const failedCancellation = cancellation.find((result) => result.status === 'rejected');
|
|
1239
|
+
if (failedCancellation)
|
|
1240
|
+
throw failedCancellation.reason;
|
|
1241
|
+
if (closeError)
|
|
1242
|
+
throw closeError;
|
|
1243
|
+
return {};
|
|
1244
|
+
}
|
|
1245
|
+
async #adoptTurn(sessionId, turnId, attachment, trackAdmission = false, expectedRunId, initialTerminalTurn) {
|
|
1246
|
+
const context = this.#externalObservationContexts.get(sessionId);
|
|
1247
|
+
if (!context ||
|
|
1248
|
+
this.#closing ||
|
|
1249
|
+
this.#discardedAttachments.has(attachment) ||
|
|
1250
|
+
!this.#ownedSessionIds.has(sessionId))
|
|
1251
|
+
return;
|
|
1252
|
+
const existing = this.#observation(sessionId, turnId);
|
|
1253
|
+
if (existing) {
|
|
1254
|
+
this.#replayPendingInteractions(sessionId, turnId, attachment, existing);
|
|
1255
|
+
return existing;
|
|
1256
|
+
}
|
|
1257
|
+
const runId = expectedRunId ??
|
|
1258
|
+
(attachment.snapshot.rootTurn?.turnId === turnId
|
|
1259
|
+
? attachment.snapshot.rootTurn.runId
|
|
1260
|
+
: undefined);
|
|
1261
|
+
const Observation = trackAdmission ? AcpAdmittedTurnObservation : AcpTurnObservation;
|
|
1262
|
+
const observation = new Observation({
|
|
1263
|
+
sessionId,
|
|
1264
|
+
turnId,
|
|
1265
|
+
...(runId === undefined ? {} : { runId }),
|
|
1266
|
+
notify: async (notification) => {
|
|
1267
|
+
const current = this.#externalObservationContexts.get(sessionId);
|
|
1268
|
+
if (!this.#closing && this.#ownedSessionIds.has(sessionId) && current) {
|
|
1269
|
+
await current.notify(notification);
|
|
1270
|
+
this.#recordLiveHistoryDelivery(sessionId, notification, observation);
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
});
|
|
1274
|
+
if (initialTerminalTurn?.runId === runId)
|
|
1275
|
+
observation.terminalTurn = initialTerminalTurn;
|
|
1276
|
+
if (this.#historyReplays.has(sessionId))
|
|
1277
|
+
void observation.holdLive().catch(() => undefined);
|
|
1278
|
+
const admission = observation instanceof AcpAdmittedTurnObservation ? observation : undefined;
|
|
1279
|
+
if (admission)
|
|
1280
|
+
this.#setTurnObservation(admission);
|
|
1281
|
+
else
|
|
1282
|
+
this.#setTurnObservation(observation);
|
|
1283
|
+
try {
|
|
1284
|
+
await observation.seed(attachment.messages);
|
|
1285
|
+
if (this.#observation(sessionId, turnId) !== observation ||
|
|
1286
|
+
this.#closing ||
|
|
1287
|
+
this.#discardedAttachments.has(attachment)) {
|
|
1288
|
+
observation.dispose();
|
|
1289
|
+
if (admission)
|
|
1290
|
+
this.#removeTurnObservation(admission);
|
|
1291
|
+
else
|
|
1292
|
+
this.#removeTurnObservation(observation);
|
|
1293
|
+
return;
|
|
1294
|
+
}
|
|
1295
|
+
const task = observation.start(attachment);
|
|
1296
|
+
this.#replayPendingInteractions(sessionId, turnId, attachment, observation);
|
|
1297
|
+
const interactions = this.#attachmentInteractions.get(sessionId);
|
|
1298
|
+
void task
|
|
1299
|
+
.then(async () => {
|
|
1300
|
+
if (observation.finished ||
|
|
1301
|
+
this.#observation(sessionId, turnId) !== observation ||
|
|
1302
|
+
this.#discardedAttachments.has(attachment))
|
|
1303
|
+
return;
|
|
1304
|
+
const root = observation.terminalTurn;
|
|
1305
|
+
const outcome = root ?? observation.terminalOutcome;
|
|
1306
|
+
const runId = root?.runId ?? observation.runId;
|
|
1307
|
+
if (outcome && runId) {
|
|
1308
|
+
await this.#externalObservationContexts.get(sessionId)?.notifyTurnStatus?.({
|
|
1309
|
+
sessionId,
|
|
1310
|
+
turnId,
|
|
1311
|
+
runId,
|
|
1312
|
+
status: outcome.status,
|
|
1313
|
+
...(outcome.status === 'failed'
|
|
1314
|
+
? { failureClass: outcome.failureClass ?? 'runtime_error' }
|
|
1315
|
+
: {}),
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
}, async (error) => {
|
|
1319
|
+
if (!this.#closing &&
|
|
1320
|
+
!observation.finished &&
|
|
1321
|
+
this.#observation(sessionId, turnId) === observation &&
|
|
1322
|
+
!this.#discardedAttachments.has(attachment)) {
|
|
1323
|
+
console.error('[acp] Attached Turn observation failed:', error);
|
|
1324
|
+
const root = attachment.snapshot.rootTurn;
|
|
1325
|
+
if (root?.turnId === turnId &&
|
|
1326
|
+
(observation.runId === undefined || root.runId === observation.runId) &&
|
|
1327
|
+
!isRuntimeHostTerminalTurn(root)) {
|
|
1328
|
+
observation.stopTask ??= this.#stopAttachedTurn(attachment, root);
|
|
1329
|
+
void observation.stopTask.catch((stopError) => {
|
|
1330
|
+
console.error('[acp] Host Stop delivery failed:', stopError);
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
await this.#externalObservationContexts.get(sessionId)?.notifyTurnStatus?.({
|
|
1334
|
+
sessionId,
|
|
1335
|
+
turnId,
|
|
1336
|
+
runId: root?.turnId === turnId ? root.runId : '',
|
|
1337
|
+
status: 'observation_failed',
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
})
|
|
1341
|
+
.catch((error) => {
|
|
1342
|
+
console.error('[acp] Attached Turn status delivery failed:', error);
|
|
1343
|
+
})
|
|
1344
|
+
.finally(async () => {
|
|
1345
|
+
if (admission) {
|
|
1346
|
+
while (admission.admission.dispatchStarted &&
|
|
1347
|
+
!admission.admission.startRequestSettled &&
|
|
1348
|
+
!this.#closing) {
|
|
1349
|
+
await admission.waitForChange();
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
await observation.stopTask?.catch(() => undefined);
|
|
1353
|
+
if (admission)
|
|
1354
|
+
this.#removeTurnObservation(admission);
|
|
1355
|
+
interactions?.settleTurn(turnId);
|
|
1356
|
+
observation.dispose();
|
|
1357
|
+
this.#removeTurnObservation(observation);
|
|
1358
|
+
});
|
|
1359
|
+
return observation;
|
|
1360
|
+
}
|
|
1361
|
+
catch (error) {
|
|
1362
|
+
observation.dispose();
|
|
1363
|
+
if (admission)
|
|
1364
|
+
this.#removeTurnObservation(admission);
|
|
1365
|
+
else
|
|
1366
|
+
this.#removeTurnObservation(observation);
|
|
1367
|
+
throw error;
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
#replayPendingInteractions(sessionId, turnId, attachment, observation) {
|
|
1371
|
+
if (observation.finished || this.#discardedAttachments.has(attachment))
|
|
1372
|
+
return;
|
|
1373
|
+
const interactions = this.#attachmentInteractions.get(sessionId);
|
|
1374
|
+
for (const pending of attachment.snapshot.interactions.pending) {
|
|
1375
|
+
if (pending.turnId === turnId)
|
|
1376
|
+
void interactions?.pending(pending);
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
async #resumeTurn(params, context) {
|
|
1380
|
+
context.signal.throwIfAborted();
|
|
1381
|
+
const connection = await this.#getConnection('turn.resume.query');
|
|
1382
|
+
let plan;
|
|
1383
|
+
try {
|
|
1384
|
+
plan = await connection.request('turn.resume.query', params);
|
|
1385
|
+
}
|
|
1386
|
+
catch (error) {
|
|
1387
|
+
throw requestErrorFromRuntimeHost(error, 'turn.resume.query');
|
|
1388
|
+
}
|
|
1389
|
+
if (plan.disposition === 'parked')
|
|
1390
|
+
return { kind: 'parked', plan };
|
|
1391
|
+
const restoreContext = this.#installExternalContext(params.sessionId, context);
|
|
1392
|
+
const restoreClient = this.#attachmentInteractions
|
|
1393
|
+
.get(params.sessionId)
|
|
1394
|
+
?.setClient(context.interactions ?? UNAVAILABLE_INTERACTION_CLIENT);
|
|
1395
|
+
let observation;
|
|
1396
|
+
let attachment;
|
|
1397
|
+
const turnId = this.#newTurnId();
|
|
1398
|
+
let dispatched = false;
|
|
1399
|
+
const onAbort = () => {
|
|
1400
|
+
if (observation)
|
|
1401
|
+
void this.#cancelPrompt(observation).catch(() => undefined);
|
|
1402
|
+
};
|
|
1403
|
+
context.signal.addEventListener('abort', onAbort, { once: true });
|
|
1404
|
+
try {
|
|
1405
|
+
const prepared = await this.#prepareExternalObservation(params.sessionId, context, connection, 'turn.resume.start', turnId);
|
|
1406
|
+
attachment = prepared.attachment;
|
|
1407
|
+
observation = prepared.observation;
|
|
1408
|
+
if (!observation)
|
|
1409
|
+
throw registryClosedError('turn.resume.start');
|
|
1410
|
+
if (context.signal.aborted)
|
|
1411
|
+
onAbort();
|
|
1412
|
+
if (observation.cancelled)
|
|
1413
|
+
throw RequestError.internalError({ source: 'adapter', operation: 'turn.resume.start', code: 'cancelled' }, 'Turn resume was cancelled before admission');
|
|
1414
|
+
dispatched = true;
|
|
1415
|
+
observation.markDispatched();
|
|
1416
|
+
const result = await connection.request('turn.resume.start', {
|
|
1417
|
+
sessionId: params.sessionId,
|
|
1418
|
+
turnId,
|
|
1419
|
+
sourceRunId: plan.sourceRunId,
|
|
1420
|
+
sourceRuntimeEventHighWater: plan.sourceRuntimeEventHighWater,
|
|
1421
|
+
});
|
|
1422
|
+
observation.settleStartRequest(result.kind === 'started' ? result.turn : undefined);
|
|
1423
|
+
if (result.kind === 'parked') {
|
|
1424
|
+
observation.dispose();
|
|
1425
|
+
this.#removeTurnObservation(observation);
|
|
1426
|
+
attachment.failTurn(turnId, new Error(`Turn resume parked: ${result.plan.reason}`));
|
|
1427
|
+
restoreContext.commit();
|
|
1428
|
+
restoreClient?.commit();
|
|
1429
|
+
return { kind: 'parked', plan: result.plan };
|
|
1430
|
+
}
|
|
1431
|
+
await observation.stopTask?.catch(() => undefined);
|
|
1432
|
+
restoreContext.commit();
|
|
1433
|
+
restoreClient?.commit();
|
|
1434
|
+
return {
|
|
1435
|
+
kind: 'started',
|
|
1436
|
+
turn: result.turn,
|
|
1437
|
+
sourceRunId: plan.sourceRunId,
|
|
1438
|
+
sourceRuntimeEventHighWater: plan.sourceRuntimeEventHighWater,
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
catch (error) {
|
|
1442
|
+
let failure = error;
|
|
1443
|
+
if (observation) {
|
|
1444
|
+
observation.failStartRequest(error);
|
|
1445
|
+
}
|
|
1446
|
+
if (dispatched &&
|
|
1447
|
+
error instanceof RuntimeHostRequestInterruptedError &&
|
|
1448
|
+
error.dispatch === 'dispatched' &&
|
|
1449
|
+
observation) {
|
|
1450
|
+
this.#queryPromptAdmission(observation, connection);
|
|
1451
|
+
await observation.admission.query;
|
|
1452
|
+
if (observation.admission.startedTurn) {
|
|
1453
|
+
restoreContext.commit();
|
|
1454
|
+
restoreClient?.commit();
|
|
1455
|
+
return {
|
|
1456
|
+
kind: 'started',
|
|
1457
|
+
turn: observation.admission.startedTurn,
|
|
1458
|
+
sourceRunId: plan.sourceRunId,
|
|
1459
|
+
sourceRuntimeEventHighWater: plan.sourceRuntimeEventHighWater,
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
const admissionError = RequestError.internalError({
|
|
1463
|
+
source: 'runtime_host',
|
|
1464
|
+
operation: 'turn.resume.start',
|
|
1465
|
+
code: 'outcome_unknown',
|
|
1466
|
+
sessionId: params.sessionId,
|
|
1467
|
+
turnId,
|
|
1468
|
+
sourceRunId: plan.sourceRunId,
|
|
1469
|
+
}, 'Runtime Host Turn resume admission could not be established');
|
|
1470
|
+
if (!observation.admission.rejected) {
|
|
1471
|
+
// The dispatched Turn may still be running, so its context and
|
|
1472
|
+
// interaction client remain the current attachment authority.
|
|
1473
|
+
restoreContext.commit();
|
|
1474
|
+
restoreClient?.commit();
|
|
1475
|
+
throw admissionError;
|
|
1476
|
+
}
|
|
1477
|
+
failure = admissionError;
|
|
1478
|
+
}
|
|
1479
|
+
if (observation) {
|
|
1480
|
+
observation.dispose();
|
|
1481
|
+
this.#removeTurnObservation(observation);
|
|
1482
|
+
attachment?.failTurn(turnId, failure);
|
|
1483
|
+
}
|
|
1484
|
+
restoreContext.rollback();
|
|
1485
|
+
restoreClient?.rollback();
|
|
1486
|
+
if (failure instanceof RequestError)
|
|
1487
|
+
throw failure;
|
|
1488
|
+
throw requestErrorFromRuntimeHost(failure, 'turn.resume.start', { turnId });
|
|
1489
|
+
}
|
|
1490
|
+
finally {
|
|
1491
|
+
context.signal.removeEventListener('abort', onAbort);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
async #copySession(operation, params) {
|
|
1495
|
+
this.#assertOpen(operation);
|
|
1496
|
+
this.#assertOwned(params.sourceSessionId);
|
|
1497
|
+
if (this.#ownedSessionIds.has(params.targetSessionId)) {
|
|
1498
|
+
throw RequestError.invalidParams({ field: 'targetSessionId', reason: 'already_owned' }, 'Target Session is already owned by this ACP connection');
|
|
1499
|
+
}
|
|
1500
|
+
const connection = await this.#getConnection(operation);
|
|
1501
|
+
this.#assertOwned(params.sourceSessionId);
|
|
1502
|
+
let result;
|
|
1503
|
+
try {
|
|
1504
|
+
result = await connection.request(operation, params);
|
|
1505
|
+
}
|
|
1506
|
+
catch (error) {
|
|
1507
|
+
if (error instanceof RuntimeHostRequestInterruptedError &&
|
|
1508
|
+
error.dispatch === 'dispatched' &&
|
|
1509
|
+
!this.#closing) {
|
|
1510
|
+
// The target ID alone is not proof of ownership: a lost response may
|
|
1511
|
+
// have been an operation_conflict with another caller's target. The
|
|
1512
|
+
// Host's exact copy request is idempotent by target and fingerprint.
|
|
1513
|
+
try {
|
|
1514
|
+
result = await connection.request(operation, params, COPY_RECONCILIATION_TIMEOUT_MS);
|
|
1515
|
+
}
|
|
1516
|
+
catch (reconciliationError) {
|
|
1517
|
+
throw requestErrorFromRuntimeHost(reconciliationError, operation, {
|
|
1518
|
+
targetSessionId: params.targetSessionId,
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
else {
|
|
1523
|
+
throw requestErrorFromRuntimeHost(error, operation, {
|
|
1524
|
+
targetSessionId: params.targetSessionId,
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
if (result.kind === 'committed' && !this.#closing) {
|
|
1529
|
+
this.#ownedSessionIds.add(params.targetSessionId);
|
|
1530
|
+
}
|
|
1531
|
+
return result;
|
|
1532
|
+
}
|
|
1533
|
+
async #abandonRevision(params) {
|
|
1534
|
+
const connection = await this.#getConnection('session.revision.abandon');
|
|
1535
|
+
this.#assertOwned(params.targetSessionId);
|
|
1536
|
+
let result;
|
|
1537
|
+
try {
|
|
1538
|
+
result = await connection.request('session.revision.abandon', params);
|
|
1539
|
+
}
|
|
1540
|
+
catch (error) {
|
|
1541
|
+
throw requestErrorFromRuntimeHost(error, 'session.revision.abandon');
|
|
1542
|
+
}
|
|
1543
|
+
if (result.kind === 'abandoned') {
|
|
1544
|
+
this.#sessionCloseGenerations.set(params.targetSessionId, (this.#sessionCloseGenerations.get(params.targetSessionId) ?? 0) + 1);
|
|
1545
|
+
this.#sessionLoadControllers.get(params.targetSessionId)?.abort();
|
|
1546
|
+
this.#ownedSessionIds.delete(params.targetSessionId);
|
|
1547
|
+
this.#historyReplayDelivery.delete(params.targetSessionId);
|
|
1548
|
+
this.#externalObservationContexts.delete(params.targetSessionId);
|
|
1549
|
+
this.#externalContextLeases.delete(params.targetSessionId);
|
|
1550
|
+
for (const observation of this.#turnObservations.get(params.targetSessionId)?.values() ??
|
|
1551
|
+
[]) {
|
|
1552
|
+
observation.cancelled = true;
|
|
1553
|
+
observation.dispose();
|
|
1554
|
+
if (observation instanceof AcpAdmittedTurnObservation)
|
|
1555
|
+
observation.wake();
|
|
1556
|
+
else
|
|
1557
|
+
this.#removeTurnObservation(observation);
|
|
1558
|
+
}
|
|
1559
|
+
const attachment = this.#detachAttachment(params.targetSessionId);
|
|
1560
|
+
const mcp = this.#detachMcp(params.targetSessionId);
|
|
1561
|
+
await Promise.allSettled([
|
|
1562
|
+
attachment?.then((channel) => channel.close(), () => undefined),
|
|
1563
|
+
mcp?.close(),
|
|
1564
|
+
]);
|
|
1565
|
+
}
|
|
1566
|
+
return result;
|
|
1567
|
+
}
|
|
1568
|
+
#admittedTurns(sessionId) {
|
|
1569
|
+
return [...(this.#turnObservations.get(sessionId)?.values() ?? [])].filter((observation) => observation instanceof AcpAdmittedTurnObservation);
|
|
1570
|
+
}
|
|
1571
|
+
#installExternalContext(sessionId, context) {
|
|
1572
|
+
const lease = {
|
|
1573
|
+
context,
|
|
1574
|
+
previous: this.#externalContextLeases.get(sessionId),
|
|
1575
|
+
valid: true,
|
|
1576
|
+
};
|
|
1577
|
+
this.#externalContextLeases.set(sessionId, lease);
|
|
1578
|
+
this.#externalObservationContexts.set(sessionId, context);
|
|
1579
|
+
return {
|
|
1580
|
+
rollback: () => {
|
|
1581
|
+
lease.valid = false;
|
|
1582
|
+
if (this.#externalContextLeases.get(sessionId) !== lease)
|
|
1583
|
+
return;
|
|
1584
|
+
let previous = lease.previous;
|
|
1585
|
+
while (previous && !previous.valid)
|
|
1586
|
+
previous = previous.previous;
|
|
1587
|
+
if (previous) {
|
|
1588
|
+
this.#externalContextLeases.set(sessionId, previous);
|
|
1589
|
+
this.#externalObservationContexts.set(sessionId, previous.context);
|
|
1590
|
+
}
|
|
1591
|
+
else {
|
|
1592
|
+
this.#externalContextLeases.delete(sessionId);
|
|
1593
|
+
this.#externalObservationContexts.delete(sessionId);
|
|
1594
|
+
}
|
|
1595
|
+
},
|
|
1596
|
+
commit: () => {
|
|
1597
|
+
lease.previous = undefined;
|
|
1598
|
+
},
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
#setTurnObservation(observation) {
|
|
1602
|
+
let observations = this.#turnObservations.get(observation.sessionId);
|
|
1603
|
+
if (!observations) {
|
|
1604
|
+
observations = new Map();
|
|
1605
|
+
this.#turnObservations.set(observation.sessionId, observations);
|
|
1606
|
+
}
|
|
1607
|
+
observations.set(observation.turnId, observation);
|
|
1608
|
+
}
|
|
1609
|
+
#removeTurnObservation(observation) {
|
|
1610
|
+
const observations = this.#turnObservations.get(observation.sessionId);
|
|
1611
|
+
if (observations?.get(observation.turnId) !== observation)
|
|
1612
|
+
return;
|
|
1613
|
+
observations.delete(observation.turnId);
|
|
1614
|
+
if (observations.size === 0)
|
|
1615
|
+
this.#turnObservations.delete(observation.sessionId);
|
|
1616
|
+
if (observation instanceof AcpAdmittedTurnObservation &&
|
|
1617
|
+
!this.#hasAttachmentConsumers(observation.sessionId)) {
|
|
1618
|
+
this.#attachmentOpenControllers.get(observation.sessionId)?.abort();
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
#observation(sessionId, turnId) {
|
|
1622
|
+
return this.#turnObservations.get(sessionId)?.get(turnId);
|
|
1623
|
+
}
|
|
1624
|
+
#wakeSession(sessionId) {
|
|
1625
|
+
for (const active of this.#admittedTurns(sessionId))
|
|
1626
|
+
active.wake();
|
|
1627
|
+
}
|
|
1628
|
+
#assertOwned(sessionId) {
|
|
1629
|
+
if (!this.#ownedSessionIds.has(sessionId))
|
|
1630
|
+
throw unknownSessionError();
|
|
1631
|
+
}
|
|
1632
|
+
async #create(params, mcpConfig, signal) {
|
|
1633
|
+
const lifetime = signal
|
|
1634
|
+
? AbortSignal.any([signal, this.#creationAbort.signal])
|
|
1635
|
+
: this.#creationAbort.signal;
|
|
1636
|
+
lifetime.throwIfAborted();
|
|
1637
|
+
const connection = await this.#getConnection('session.create');
|
|
1638
|
+
const sessionId = this.#newSessionId();
|
|
1639
|
+
let mcp;
|
|
1640
|
+
if (params.mcpServers.length > 0) {
|
|
1641
|
+
mcp = new AcpSessionMcp(sessionId, mcpConfig, connection);
|
|
1642
|
+
this.#mcps.set(sessionId, mcp);
|
|
1643
|
+
}
|
|
1644
|
+
let result;
|
|
1645
|
+
let dispatched = false;
|
|
1646
|
+
try {
|
|
1647
|
+
await mcp?.prepare(lifetime);
|
|
1648
|
+
lifetime.throwIfAborted();
|
|
1649
|
+
this.#assertOpen('session.create');
|
|
1650
|
+
dispatched = true;
|
|
1651
|
+
result = await connection.request('session.create', {
|
|
1652
|
+
sessionId,
|
|
1653
|
+
workspace: { kind: 'host_path', path: params.cwd },
|
|
1654
|
+
modelTarget: { kind: 'default' },
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
catch (error) {
|
|
1658
|
+
const outcomeUnknown = dispatched &&
|
|
1659
|
+
error instanceof RuntimeHostRequestInterruptedError &&
|
|
1660
|
+
error.dispatch === 'dispatched';
|
|
1661
|
+
if (outcomeUnknown && !this.#closing) {
|
|
1662
|
+
// The error returns this ID. Keep its connection-local reservation usable
|
|
1663
|
+
// without guessing whether Host committed or resending Session creation.
|
|
1664
|
+
this.#ownedSessionIds.add(sessionId);
|
|
1665
|
+
}
|
|
1666
|
+
else {
|
|
1667
|
+
this.#mcps.delete(sessionId);
|
|
1668
|
+
await mcp?.close().catch(() => undefined);
|
|
1669
|
+
}
|
|
1670
|
+
if (error instanceof RequestError)
|
|
1671
|
+
throw error;
|
|
1672
|
+
throw requestErrorFromRuntimeHost(error, 'session.create', { sessionId });
|
|
1673
|
+
}
|
|
1674
|
+
// Session creation has committed. Optional presentation failures must not
|
|
1675
|
+
// turn that success into an unreachable durable Session.
|
|
1676
|
+
let configOptions;
|
|
1677
|
+
try {
|
|
1678
|
+
const created = requireRuntimeHostSessionProjection(result, 'session.create');
|
|
1679
|
+
configOptions = await this.#projectConfigOptions(connection, created);
|
|
1680
|
+
}
|
|
1681
|
+
catch {
|
|
1682
|
+
// The client can still prompt, configure, list, or close the returned ID.
|
|
1683
|
+
}
|
|
1684
|
+
// Do not admit mutations while projection is pending, or resurrect ownership
|
|
1685
|
+
// if connection shutdown raced the successful Host creation.
|
|
1686
|
+
if (!this.#closing)
|
|
1687
|
+
this.#ownedSessionIds.add(sessionId);
|
|
1688
|
+
return { sessionId, ...(configOptions ? { configOptions } : {}) };
|
|
1689
|
+
}
|
|
1690
|
+
async #load(params, context, mcpConfig, replayHistory, requestedGeneration) {
|
|
1691
|
+
if ((this.#sessionCloseGenerations.get(params.sessionId) ?? 0) !== requestedGeneration) {
|
|
1692
|
+
throw unknownSessionError();
|
|
1693
|
+
}
|
|
1694
|
+
const existingReplayDelivery = this.#historyReplayDelivery.get(params.sessionId);
|
|
1695
|
+
const replayDelivery = replayHistory
|
|
1696
|
+
? (existingReplayDelivery ?? {
|
|
1697
|
+
textByMessage: new Map(),
|
|
1698
|
+
otherUpdates: new Set(),
|
|
1699
|
+
})
|
|
1700
|
+
: undefined;
|
|
1701
|
+
if (replayDelivery && !existingReplayDelivery) {
|
|
1702
|
+
// An attached Turn may have streamed before load started. Retain its
|
|
1703
|
+
// absolute message prefix so later live chunks are not mistaken for one.
|
|
1704
|
+
for (const observation of this.#turnObservations.get(params.sessionId)?.values() ?? []) {
|
|
1705
|
+
for (const [key, prefix] of observation.deliveredTextByMessage) {
|
|
1706
|
+
replayDelivery.textByMessage.set(key, prefix);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
if (replayDelivery)
|
|
1711
|
+
this.#historyReplayDelivery.set(params.sessionId, replayDelivery);
|
|
1712
|
+
const loadController = new AbortController();
|
|
1713
|
+
this.#sessionLoadControllers.set(params.sessionId, loadController);
|
|
1714
|
+
const lifetime = AbortSignal.any([
|
|
1715
|
+
context.signal,
|
|
1716
|
+
loadController.signal,
|
|
1717
|
+
this.#creationAbort.signal,
|
|
1718
|
+
]);
|
|
1719
|
+
const generation = this.#sessionCloseGenerations.get(params.sessionId) ?? 0;
|
|
1720
|
+
const alreadyOwned = this.#ownedSessionIds.has(params.sessionId);
|
|
1721
|
+
const heldObservations = new Set();
|
|
1722
|
+
let restoreContext;
|
|
1723
|
+
let restoreClient;
|
|
1724
|
+
const previousMcp = this.#mcps.get(params.sessionId);
|
|
1725
|
+
const previousMcpConfig = previousMcp?.config;
|
|
1726
|
+
let previousMcpReconfigureAttempted = false;
|
|
1727
|
+
let installedMcp;
|
|
1728
|
+
let newAttachment;
|
|
1729
|
+
try {
|
|
1730
|
+
lifetime.throwIfAborted();
|
|
1731
|
+
const connection = await this.#getConnection('session.catalog.query');
|
|
1732
|
+
let session;
|
|
1733
|
+
try {
|
|
1734
|
+
session = await getRuntimeHostSession(connection, params.sessionId);
|
|
1735
|
+
}
|
|
1736
|
+
catch (error) {
|
|
1737
|
+
throw requestErrorFromSessionUpdate(error, 'session.catalog.query');
|
|
1738
|
+
}
|
|
1739
|
+
if (!session) {
|
|
1740
|
+
throw RequestError.invalidParams({ source: 'runtime_host', operation: 'session.catalog.query', code: 'not_found' }, 'Runtime Host Session was not found');
|
|
1741
|
+
}
|
|
1742
|
+
if (session.isArchived) {
|
|
1743
|
+
throw RequestError.invalidParams({ source: 'runtime_host', operation: 'session.catalog.query', code: 'archived' }, 'Archived Runtime Host Sessions cannot be loaded');
|
|
1744
|
+
}
|
|
1745
|
+
const cwd = await normalizeCwd(params.cwd);
|
|
1746
|
+
if (cwd !== session.workspace.hostCwd) {
|
|
1747
|
+
throw RequestError.invalidParams({ field: 'cwd', reason: 'session_cwd_mismatch' }, 'cwd does not match the existing Session workspace');
|
|
1748
|
+
}
|
|
1749
|
+
lifetime.throwIfAborted();
|
|
1750
|
+
const configOptions = await this.#projectConfigOptions(connection, session);
|
|
1751
|
+
if ((this.#sessionCloseGenerations.get(params.sessionId) ?? 0) !== generation) {
|
|
1752
|
+
throw unknownSessionError();
|
|
1753
|
+
}
|
|
1754
|
+
if (previousMcp) {
|
|
1755
|
+
previousMcpReconfigureAttempted = true;
|
|
1756
|
+
await previousMcp.reconfigure(mcpConfig, lifetime, async () => {
|
|
1757
|
+
const latest = await getRuntimeHostSession(connection, params.sessionId);
|
|
1758
|
+
if (!latest)
|
|
1759
|
+
throw unknownSessionError();
|
|
1760
|
+
if (latest.status === 'running' ||
|
|
1761
|
+
latest.status === 'waiting_for_user' ||
|
|
1762
|
+
(latest.liveRunState?.runningTurnIds.length ?? 0) > 0 ||
|
|
1763
|
+
this.#admittedTurns(params.sessionId).length > 0) {
|
|
1764
|
+
throw RequestError.internalError({ source: 'adapter', operation: 'mcp.prepare', code: 'session_busy' }, 'Cannot replace Session MCP configuration during an active Turn');
|
|
1765
|
+
}
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
else {
|
|
1769
|
+
installedMcp = new AcpSessionMcp(params.sessionId, mcpConfig, connection);
|
|
1770
|
+
this.#mcps.set(params.sessionId, installedMcp);
|
|
1771
|
+
await installedMcp.prepare(lifetime);
|
|
1772
|
+
}
|
|
1773
|
+
if ((this.#sessionCloseGenerations.get(params.sessionId) ?? 0) !== generation) {
|
|
1774
|
+
throw unknownSessionError();
|
|
1775
|
+
}
|
|
1776
|
+
this.#ownedSessionIds.add(params.sessionId);
|
|
1777
|
+
if (replayHistory) {
|
|
1778
|
+
this.#historyReplays.add(params.sessionId);
|
|
1779
|
+
for (const observation of this.#turnObservations.get(params.sessionId)?.values() ?? []) {
|
|
1780
|
+
heldObservations.add(observation);
|
|
1781
|
+
}
|
|
1782
|
+
await Promise.all([...heldObservations].map((observation) => observation.holdLive()));
|
|
1783
|
+
}
|
|
1784
|
+
restoreContext = this.#installExternalContext(params.sessionId, context);
|
|
1785
|
+
restoreClient = this.#attachmentInteractions
|
|
1786
|
+
.get(params.sessionId)
|
|
1787
|
+
?.setClient(context.interactions ?? UNAVAILABLE_INTERACTION_CLIENT);
|
|
1788
|
+
const creatingAttachment = !this.#attachments.has(params.sessionId);
|
|
1789
|
+
const attachmentPromise = this.#ensureAttachment(params.sessionId, connection, {
|
|
1790
|
+
...context,
|
|
1791
|
+
signal: lifetime,
|
|
1792
|
+
});
|
|
1793
|
+
if (creatingAttachment)
|
|
1794
|
+
newAttachment = this.#attachments.get(params.sessionId);
|
|
1795
|
+
const attachment = await attachmentPromise;
|
|
1796
|
+
lifetime.throwIfAborted();
|
|
1797
|
+
this.#assertOpen('subscription.open');
|
|
1798
|
+
this.#assertOwned(params.sessionId);
|
|
1799
|
+
if (context.notifyGoalStatus || context.notifyPlanChanged) {
|
|
1800
|
+
this.#domainObservations.get(params.sessionId)?.initialize(attachment.snapshot.goal);
|
|
1801
|
+
}
|
|
1802
|
+
if ((this.#sessionCloseGenerations.get(params.sessionId) ?? 0) !== generation) {
|
|
1803
|
+
throw unknownSessionError();
|
|
1804
|
+
}
|
|
1805
|
+
// A retained attachment may have observed this Turn before load/resume
|
|
1806
|
+
// installed its presentation context. Attach its existing event consumer
|
|
1807
|
+
// now; opening a second channel would lose the queue and interaction state.
|
|
1808
|
+
const root = attachment.snapshot.rootTurn;
|
|
1809
|
+
if (root &&
|
|
1810
|
+
!isRuntimeHostTerminalTurn(root) &&
|
|
1811
|
+
!attachment.hasQueuedStartedTurn(root.turnId)) {
|
|
1812
|
+
await this.#adoptTurn(params.sessionId, root.turnId, attachment, false, root.runId);
|
|
1813
|
+
lifetime.throwIfAborted();
|
|
1814
|
+
this.#assertOpen('subscription.open');
|
|
1815
|
+
this.#assertOwned(params.sessionId);
|
|
1816
|
+
if ((this.#sessionCloseGenerations.get(params.sessionId) ?? 0) !== generation) {
|
|
1817
|
+
throw unknownSessionError();
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
if (replayHistory) {
|
|
1821
|
+
const mappers = new Map();
|
|
1822
|
+
await attachment.replayTranscript(async (messages) => {
|
|
1823
|
+
const active = this.#turnObservations.get(params.sessionId);
|
|
1824
|
+
for (const observation of active?.values() ?? []) {
|
|
1825
|
+
if (!heldObservations.has(observation)) {
|
|
1826
|
+
heldObservations.add(observation);
|
|
1827
|
+
await observation.holdLive();
|
|
1828
|
+
}
|
|
1829
|
+
await observation.seed(messages);
|
|
1830
|
+
}
|
|
1831
|
+
for (const message of messages) {
|
|
1832
|
+
lifetime.throwIfAborted();
|
|
1833
|
+
if (!message.turnId)
|
|
1834
|
+
continue;
|
|
1835
|
+
let mapper = mappers.get(message.turnId);
|
|
1836
|
+
if (!mapper) {
|
|
1837
|
+
mapper = new AcpSessionEventMapper({
|
|
1838
|
+
sessionId: params.sessionId,
|
|
1839
|
+
notify: (notification) => this.#deliverHistoryNotification(notification, context.notify, replayDelivery),
|
|
1840
|
+
signal: lifetime,
|
|
1841
|
+
});
|
|
1842
|
+
mappers.set(message.turnId, mapper);
|
|
1843
|
+
}
|
|
1844
|
+
await mapper.acceptHistoricalMessage(message);
|
|
1845
|
+
if (message.type === 'turn_state' && message.status !== 'running') {
|
|
1846
|
+
await mapper.finishTools(message.turnId, message.status === 'aborted' ? 'cancelled' : message.status);
|
|
1847
|
+
await mapper.flush();
|
|
1848
|
+
mappers.delete(message.turnId);
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
}, lifetime);
|
|
1852
|
+
await Promise.all([...mappers.values()].map((mapper) => mapper.flush()));
|
|
1853
|
+
}
|
|
1854
|
+
restoreContext.commit();
|
|
1855
|
+
restoreClient?.commit();
|
|
1856
|
+
if (replayHistory)
|
|
1857
|
+
this.#historyReplayDelivery.delete(params.sessionId);
|
|
1858
|
+
return { configOptions };
|
|
1859
|
+
}
|
|
1860
|
+
catch (error) {
|
|
1861
|
+
const sharedAttachment = newAttachment &&
|
|
1862
|
+
this.#attachments.get(params.sessionId) === newAttachment &&
|
|
1863
|
+
this.#hasAttachmentConsumers(params.sessionId);
|
|
1864
|
+
if (sharedAttachment) {
|
|
1865
|
+
// A concurrent prompt has adopted this prepared Session. Its attachment,
|
|
1866
|
+
// ownership and MCP provider must outlive this cancelled/failed load.
|
|
1867
|
+
restoreContext?.rollback();
|
|
1868
|
+
restoreClient?.rollback();
|
|
1869
|
+
if (error instanceof RequestError)
|
|
1870
|
+
throw error;
|
|
1871
|
+
throw requestErrorFromRuntimeHost(error, 'subscription.open');
|
|
1872
|
+
}
|
|
1873
|
+
if (newAttachment && this.#attachments.get(params.sessionId) === newAttachment) {
|
|
1874
|
+
const channel = await newAttachment.catch(() => undefined);
|
|
1875
|
+
if (channel) {
|
|
1876
|
+
this.#discardedAttachments.add(channel);
|
|
1877
|
+
for (const observation of this.#turnObservations.get(params.sessionId)?.values() ?? []) {
|
|
1878
|
+
if (observation.attachment !== channel)
|
|
1879
|
+
continue;
|
|
1880
|
+
observation.dispose();
|
|
1881
|
+
this.#removeTurnObservation(observation);
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
this.#detachAttachment(params.sessionId, newAttachment);
|
|
1885
|
+
await channel?.close().catch(() => undefined);
|
|
1886
|
+
}
|
|
1887
|
+
if (installedMcp && this.#mcps.get(params.sessionId) === installedMcp) {
|
|
1888
|
+
await this.#detachMcp(params.sessionId, installedMcp)
|
|
1889
|
+
?.close()
|
|
1890
|
+
.catch(() => undefined);
|
|
1891
|
+
}
|
|
1892
|
+
else if (previousMcp &&
|
|
1893
|
+
previousMcpReconfigureAttempted &&
|
|
1894
|
+
previousMcpConfig &&
|
|
1895
|
+
this.#mcps.get(params.sessionId) === previousMcp) {
|
|
1896
|
+
await previousMcp.reconfigure(previousMcpConfig).catch(() => undefined);
|
|
1897
|
+
}
|
|
1898
|
+
restoreContext?.rollback();
|
|
1899
|
+
restoreClient?.rollback();
|
|
1900
|
+
if (!alreadyOwned)
|
|
1901
|
+
this.#ownedSessionIds.delete(params.sessionId);
|
|
1902
|
+
if (error instanceof RequestError)
|
|
1903
|
+
throw error;
|
|
1904
|
+
throw requestErrorFromRuntimeHost(error, 'subscription.open');
|
|
1905
|
+
}
|
|
1906
|
+
finally {
|
|
1907
|
+
if (this.#sessionLoadControllers.get(params.sessionId) === loadController) {
|
|
1908
|
+
this.#sessionLoadControllers.delete(params.sessionId);
|
|
1909
|
+
}
|
|
1910
|
+
if (replayHistory)
|
|
1911
|
+
this.#historyReplays.delete(params.sessionId);
|
|
1912
|
+
for (const observation of heldObservations)
|
|
1913
|
+
observation.releaseLive();
|
|
1914
|
+
for (const observation of this.#turnObservations.get(params.sessionId)?.values() ?? []) {
|
|
1915
|
+
observation.releaseLive();
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
#recordLiveHistoryDelivery(sessionId, notification, observation) {
|
|
1920
|
+
const prefix = observation.recordDeliveredText(notification);
|
|
1921
|
+
const delivery = this.#historyReplayDelivery.get(sessionId);
|
|
1922
|
+
if (!delivery)
|
|
1923
|
+
return;
|
|
1924
|
+
const chunk = historyTextChunk(notification);
|
|
1925
|
+
if (chunk) {
|
|
1926
|
+
const previous = delivery.textByMessage.get(chunk.key) ?? '';
|
|
1927
|
+
delivery.textByMessage.set(chunk.key, prefix?.startsWith(previous) ? prefix : previous + chunk.text);
|
|
1928
|
+
}
|
|
1929
|
+
else {
|
|
1930
|
+
delivery.otherUpdates.add(JSON.stringify(notification.update));
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
async #deliverHistoryNotification(notification, notify, delivery) {
|
|
1934
|
+
const chunk = historyTextChunk(notification);
|
|
1935
|
+
if (chunk) {
|
|
1936
|
+
const previous = delivery.textByMessage.get(chunk.key) ?? '';
|
|
1937
|
+
const text = chunk.text.startsWith(previous) ? chunk.text.slice(previous.length) : chunk.text;
|
|
1938
|
+
if (!text)
|
|
1939
|
+
return;
|
|
1940
|
+
await notify({
|
|
1941
|
+
...notification,
|
|
1942
|
+
update: {
|
|
1943
|
+
...notification.update,
|
|
1944
|
+
content: { type: 'text', text },
|
|
1945
|
+
},
|
|
1946
|
+
});
|
|
1947
|
+
delivery.textByMessage.set(chunk.key, chunk.text.startsWith(previous) ? chunk.text : previous + chunk.text);
|
|
1948
|
+
return;
|
|
1949
|
+
}
|
|
1950
|
+
const key = JSON.stringify(notification.update);
|
|
1951
|
+
if (delivery.otherUpdates.has(key))
|
|
1952
|
+
return;
|
|
1953
|
+
await notify(notification);
|
|
1954
|
+
delivery.otherUpdates.add(key);
|
|
1955
|
+
}
|
|
1956
|
+
#queueLoad(sessionId, operation) {
|
|
1957
|
+
const previous = this.#sessionLoadTails.get(sessionId) ?? Promise.resolve();
|
|
1958
|
+
const result = previous.catch(() => undefined).then(operation);
|
|
1959
|
+
this.#sessionLoadTails.set(sessionId, result);
|
|
1960
|
+
void result.then(() => {
|
|
1961
|
+
if (this.#sessionLoadTails.get(sessionId) === result)
|
|
1962
|
+
this.#sessionLoadTails.delete(sessionId);
|
|
1963
|
+
}, () => {
|
|
1964
|
+
if (this.#sessionLoadTails.get(sessionId) === result)
|
|
1965
|
+
this.#sessionLoadTails.delete(sessionId);
|
|
1966
|
+
});
|
|
1967
|
+
return result;
|
|
1968
|
+
}
|
|
1969
|
+
async #setConfigOption(params, configuration) {
|
|
1970
|
+
const connection = await this.#getConnection('session.configuration.update');
|
|
1971
|
+
let committed;
|
|
1972
|
+
try {
|
|
1973
|
+
committed = await updateRuntimeHostSession(connection, params.sessionId, (current) => connection.request('session.configuration.update', {
|
|
1974
|
+
sessionId: params.sessionId,
|
|
1975
|
+
expectedRevision: current.revision,
|
|
1976
|
+
patch: createAcpSessionConfigPatch(params),
|
|
1977
|
+
}), {
|
|
1978
|
+
operation: 'session.configuration.update',
|
|
1979
|
+
assertRequestAllowed: () => {
|
|
1980
|
+
this.#assertOpen('session.configuration.update');
|
|
1981
|
+
this.#assertOwned(params.sessionId);
|
|
1982
|
+
},
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
catch (error) {
|
|
1986
|
+
throw requestErrorFromSessionUpdate(error, 'session.configuration.update');
|
|
1987
|
+
}
|
|
1988
|
+
const configOptions = await this.#projectConfigOptions(connection, committed);
|
|
1989
|
+
if (configuration)
|
|
1990
|
+
await this.#notifyConfiguration(params.sessionId, configuration, configOptions);
|
|
1991
|
+
return { configOptions };
|
|
1992
|
+
}
|
|
1993
|
+
#configurationIsLive(sessionId, configuration) {
|
|
1994
|
+
return (!this.#closing &&
|
|
1995
|
+
this.#ownedSessionIds.has(sessionId) &&
|
|
1996
|
+
this.#attachmentConfigurations.get(sessionId) === configuration);
|
|
1997
|
+
}
|
|
1998
|
+
#queueConfiguration(configuration, operation) {
|
|
1999
|
+
// Serialize asynchronous catalog projection and delivery, not Host frames:
|
|
2000
|
+
// session-channel/projector remain the only subscription ordering authority.
|
|
2001
|
+
// A local set emits its committed options before its response; subscription
|
|
2002
|
+
// refreshes observed during that set follow its notification in this queue.
|
|
2003
|
+
const result = configuration.tail.then(operation, operation);
|
|
2004
|
+
configuration.tail = result.catch(() => undefined);
|
|
2005
|
+
return result;
|
|
2006
|
+
}
|
|
2007
|
+
async #notifyConfiguration(sessionId, configuration, configOptions) {
|
|
2008
|
+
if (!this.#configurationIsLive(sessionId, configuration))
|
|
2009
|
+
return;
|
|
2010
|
+
const options = JSON.stringify(configOptions);
|
|
2011
|
+
if (configuration.options === options)
|
|
2012
|
+
return;
|
|
2013
|
+
configuration.delivery = configuration.notify({
|
|
2014
|
+
sessionId,
|
|
2015
|
+
update: { sessionUpdate: 'config_option_update', configOptions },
|
|
2016
|
+
});
|
|
2017
|
+
await configuration.delivery;
|
|
2018
|
+
configuration.options = options;
|
|
2019
|
+
}
|
|
2020
|
+
async #projectConfigOptions(connection, session) {
|
|
2021
|
+
let catalog;
|
|
2022
|
+
try {
|
|
2023
|
+
catalog = await readRuntimeHostConnectionCatalog(connection);
|
|
2024
|
+
}
|
|
2025
|
+
catch (error) {
|
|
2026
|
+
throw requestErrorFromRuntimeHost(error, 'connection.catalog.query');
|
|
2027
|
+
}
|
|
2028
|
+
const selectedConnection = catalog.connections.find(({ connectionId }) => connectionId === session.llmConnectionId);
|
|
2029
|
+
const selectedModel = selectedConnection?.catalogEntries.find(({ id }) => id === session.model);
|
|
2030
|
+
return projectAcpSessionConfigOptions(session, selectedModel?.thinkingLevels ?? []);
|
|
2031
|
+
}
|
|
2032
|
+
async #list(params) {
|
|
2033
|
+
const cursor = params.cursor == null ? undefined : decodeAcpSessionCursor(params.cursor);
|
|
2034
|
+
const requestedCwd = params.cwd == null ? undefined : await normalizeCwd(params.cwd);
|
|
2035
|
+
if (cursor && requestedCwd !== undefined && cursor.cwd !== requestedCwd) {
|
|
2036
|
+
throw RequestError.invalidParams({ reason: 'cursor_cwd_mismatch' }, 'cursor was created for a different cwd filter');
|
|
2037
|
+
}
|
|
2038
|
+
const cwd = requestedCwd ?? cursor?.cwd ?? null;
|
|
2039
|
+
const connection = await this.#getConnection('session.catalog.query');
|
|
2040
|
+
let page;
|
|
2041
|
+
try {
|
|
2042
|
+
page = await readRuntimeHostSessionCatalogPage(connection, cursor ? { revision: cursor.revision, cursor: cursor.cursor } : undefined);
|
|
2043
|
+
}
|
|
2044
|
+
catch (error) {
|
|
2045
|
+
if (error instanceof RuntimeHostSessionCatalogRevisionChangedError) {
|
|
2046
|
+
throw RequestError.invalidParams({ reason: 'stale_cursor' }, 'session catalog changed; restart listing from the first page');
|
|
2047
|
+
}
|
|
2048
|
+
throw requestErrorFromRuntimeHost(error, 'session.catalog.query');
|
|
2049
|
+
}
|
|
2050
|
+
const sessions = page.sessions.flatMap((session) => {
|
|
2051
|
+
if ('kind' in session || (cwd !== null && session.workspace.hostCwd !== cwd))
|
|
2052
|
+
return [];
|
|
2053
|
+
const updatedAt = isoTimestamp(session.activityAt);
|
|
2054
|
+
return [
|
|
2055
|
+
{
|
|
2056
|
+
sessionId: session.id,
|
|
2057
|
+
cwd: session.workspace.hostCwd,
|
|
2058
|
+
title: session.name,
|
|
2059
|
+
...(updatedAt ? { updatedAt } : {}),
|
|
2060
|
+
},
|
|
2061
|
+
];
|
|
2062
|
+
});
|
|
2063
|
+
return {
|
|
2064
|
+
sessions,
|
|
2065
|
+
...(page.nextCursor
|
|
2066
|
+
? { nextCursor: encodeAcpSessionCursor({ ...page.nextCursor, cwd }) }
|
|
2067
|
+
: {}),
|
|
2068
|
+
};
|
|
2069
|
+
}
|
|
2070
|
+
async #dispose() {
|
|
2071
|
+
for (const observer of this.#domainObservations.values())
|
|
2072
|
+
observer.dispose();
|
|
2073
|
+
this.#domainObservations.clear();
|
|
2074
|
+
this.#externalObservationContexts.clear();
|
|
2075
|
+
this.#externalContextLeases.clear();
|
|
2076
|
+
for (const observations of this.#turnObservations.values()) {
|
|
2077
|
+
for (const observation of observations.values()) {
|
|
2078
|
+
if (!(observation instanceof AcpAdmittedTurnObservation))
|
|
2079
|
+
observation.dispose();
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
const sessionIds = new Set([...this.#turnObservations.keys(), ...this.#attachments.keys()]);
|
|
2083
|
+
const observations = [...this.#turnObservations.values()].flatMap((turns) => [
|
|
2084
|
+
...turns.values(),
|
|
2085
|
+
]);
|
|
2086
|
+
const activePrompts = [...sessionIds].flatMap((sessionId) => this.#admittedTurns(sessionId));
|
|
2087
|
+
const cancellations = [...sessionIds].map((sessionId) => this.#cancelSession(sessionId));
|
|
2088
|
+
for (const interactions of this.#attachmentInteractions.values())
|
|
2089
|
+
interactions.close();
|
|
2090
|
+
this.#attachmentInteractions.clear();
|
|
2091
|
+
const attachments = [...this.#attachments.values()];
|
|
2092
|
+
this.#attachments.clear();
|
|
2093
|
+
const configurations = [...this.#attachmentConfigurations.values()];
|
|
2094
|
+
this.#attachmentConfigurations.clear();
|
|
2095
|
+
await Promise.allSettled(attachments.map(async (attachment) => (await attachment).close()));
|
|
2096
|
+
await Promise.allSettled(activePrompts.map(async (active) => {
|
|
2097
|
+
while (active.admission.dispatchStarted &&
|
|
2098
|
+
!active.admission.startRequestSettled &&
|
|
2099
|
+
!active.finished) {
|
|
2100
|
+
await active.waitForChange();
|
|
2101
|
+
}
|
|
2102
|
+
}));
|
|
2103
|
+
const unknownAdmissions = activePrompts.filter((active) => {
|
|
2104
|
+
const observed = active.attachment?.snapshot.rootTurn;
|
|
2105
|
+
const hasStopIdentity = observed?.turnId === active.turnId || active.admission.startedTurn !== undefined;
|
|
2106
|
+
return active.admission.dispatchStarted && !active.admission.settled && !hasStopIdentity;
|
|
2107
|
+
});
|
|
2108
|
+
await Promise.allSettled(observations
|
|
2109
|
+
.filter((observation) => unknownAdmissions.every((active) => active !== observation))
|
|
2110
|
+
.map((observation) => observation.stopTask));
|
|
2111
|
+
if (unknownAdmissions.length > 0) {
|
|
2112
|
+
// At shutdown the attachment is already closed and each start request has
|
|
2113
|
+
// settled, leaving recovery/query as the only remaining fact source.
|
|
2114
|
+
// Close the owned connection so those reads cannot deadlock EOF cleanup.
|
|
2115
|
+
await Promise.allSettled([this.#closeOwnedConnection()]);
|
|
2116
|
+
for (const active of unknownAdmissions) {
|
|
2117
|
+
active.settleOnClose();
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
await Promise.allSettled(cancellations);
|
|
2121
|
+
const mcps = [...this.#mcps.values()];
|
|
2122
|
+
this.#mcps.clear();
|
|
2123
|
+
await Promise.allSettled(mcps.map((mcp) => mcp.close()));
|
|
2124
|
+
await Promise.allSettled([this.#closeOwnedConnection()]);
|
|
2125
|
+
await Promise.allSettled([
|
|
2126
|
+
...this.#inFlightOperations,
|
|
2127
|
+
...configurations.map(({ tail }) => tail),
|
|
2128
|
+
]);
|
|
2129
|
+
this.#pendingPlanAdmissions.clear();
|
|
2130
|
+
this.#artifactOperations.clear();
|
|
2131
|
+
this.#artifactCleanupTasks.clear();
|
|
2132
|
+
this.#artifactUploads.clear();
|
|
2133
|
+
this.#ownedSessionIds.clear();
|
|
2134
|
+
this.#historyReplayDelivery.clear();
|
|
2135
|
+
}
|
|
2136
|
+
#closeOwnedConnection() {
|
|
2137
|
+
this.#artifactConnectionDisposer?.();
|
|
2138
|
+
this.#artifactConnectionDisposer = undefined;
|
|
2139
|
+
const connection = this.#connection;
|
|
2140
|
+
const connectTask = this.#connectTask;
|
|
2141
|
+
if (!connection && !connectTask)
|
|
2142
|
+
return Promise.resolve();
|
|
2143
|
+
this.#connectionCloseTask ??= connection
|
|
2144
|
+
? Promise.resolve().then(() => connection.close())
|
|
2145
|
+
: connectTask.then((connected) => connected.close(), () => undefined);
|
|
2146
|
+
return this.#connectionCloseTask;
|
|
2147
|
+
}
|
|
2148
|
+
async #getConnection(operation) {
|
|
2149
|
+
this.#assertOpen(operation);
|
|
2150
|
+
if (this.#connection)
|
|
2151
|
+
return this.#connection;
|
|
2152
|
+
let connectController = this.#connectAbortController;
|
|
2153
|
+
if (!this.#connectTask) {
|
|
2154
|
+
connectController = new AbortController();
|
|
2155
|
+
this.#connectAbortController = connectController;
|
|
2156
|
+
this.#connectTask = Promise.resolve().then(() => {
|
|
2157
|
+
if (this.#closing)
|
|
2158
|
+
throw registryClosedError('connect');
|
|
2159
|
+
connectController.signal.throwIfAborted();
|
|
2160
|
+
return this.#connect(connectController.signal);
|
|
2161
|
+
});
|
|
2162
|
+
}
|
|
2163
|
+
const connectTask = this.#connectTask;
|
|
2164
|
+
let connection;
|
|
2165
|
+
try {
|
|
2166
|
+
connection = await connectTask;
|
|
2167
|
+
}
|
|
2168
|
+
catch {
|
|
2169
|
+
if (this.#connectTask === connectTask)
|
|
2170
|
+
this.#connectTask = undefined;
|
|
2171
|
+
if (this.#connectAbortController === connectController) {
|
|
2172
|
+
this.#connectAbortController = undefined;
|
|
2173
|
+
}
|
|
2174
|
+
if (this.#closing)
|
|
2175
|
+
throw registryClosedError('connect');
|
|
2176
|
+
throw RequestError.internalError({
|
|
2177
|
+
source: 'runtime_host',
|
|
2178
|
+
operation: 'connect',
|
|
2179
|
+
code: 'connection_failed',
|
|
2180
|
+
}, 'Runtime Host connection failed');
|
|
2181
|
+
}
|
|
2182
|
+
if (this.#connectAbortController === connectController) {
|
|
2183
|
+
this.#connectAbortController = undefined;
|
|
2184
|
+
}
|
|
2185
|
+
if (this.#closing) {
|
|
2186
|
+
await this.#closeOwnedConnection().catch(() => undefined);
|
|
2187
|
+
throw registryClosedError('connect');
|
|
2188
|
+
}
|
|
2189
|
+
this.#connection ??= connection;
|
|
2190
|
+
return this.#connection;
|
|
2191
|
+
}
|
|
2192
|
+
async #track(operation) {
|
|
2193
|
+
this.#inFlightOperations.add(operation);
|
|
2194
|
+
try {
|
|
2195
|
+
return await operation;
|
|
2196
|
+
}
|
|
2197
|
+
finally {
|
|
2198
|
+
this.#inFlightOperations.delete(operation);
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
#assertOpen(operation) {
|
|
2202
|
+
if (!this.#closing)
|
|
2203
|
+
return;
|
|
2204
|
+
throw registryClosedError(operation);
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
function unknownSessionError() {
|
|
2208
|
+
return RequestError.invalidParams({ reason: 'unknown_session' }, 'Session is not owned by this ACP connection');
|
|
2209
|
+
}
|
|
2210
|
+
function registryClosedError(operation) {
|
|
2211
|
+
return RequestError.internalError({ source: 'runtime_host', operation, code: 'registry_closed' }, 'ACP session registry is closed');
|
|
2212
|
+
}
|
|
2213
|
+
function validateNewSessionParams(params) {
|
|
2214
|
+
assertBoundedAbsoluteCwd(params.cwd);
|
|
2215
|
+
if ((params.additionalDirectories?.length ?? 0) > 0) {
|
|
2216
|
+
throw RequestError.invalidParams({ field: 'additionalDirectories', reason: 'unsupported' }, 'Additional directories are not supported by this ACP adapter yet');
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
function requestErrorFromConfigInput(error) {
|
|
2220
|
+
if (error instanceof AcpSessionConfigInputError) {
|
|
2221
|
+
return RequestError.invalidParams({ field: error.field, reason: error.reason }, 'Invalid Session configuration option');
|
|
2222
|
+
}
|
|
2223
|
+
return RequestError.internalError({
|
|
2224
|
+
source: 'adapter',
|
|
2225
|
+
operation: 'session.configuration.update',
|
|
2226
|
+
code: 'validation_failed',
|
|
2227
|
+
}, 'Session configuration validation failed');
|
|
2228
|
+
}
|
|
2229
|
+
function requestErrorFromSessionUpdate(error, operation, extra = {}) {
|
|
2230
|
+
if (error instanceof RequestError)
|
|
2231
|
+
return error;
|
|
2232
|
+
if (!(error instanceof RuntimeHostSessionUpdateError)) {
|
|
2233
|
+
return requestErrorFromRuntimeHost(error, operation, extra);
|
|
2234
|
+
}
|
|
2235
|
+
const common = { source: 'runtime_host', operation: error.operation, ...extra };
|
|
2236
|
+
switch (error.reason) {
|
|
2237
|
+
case 'not_found':
|
|
2238
|
+
return RequestError.invalidParams({ ...common, code: 'not_found' }, 'Runtime Host Session was not found');
|
|
2239
|
+
case 'invalid_projection':
|
|
2240
|
+
return RequestError.internalError({ ...common, code: 'catalog_read_failure', reason: 'invalid_projection' }, 'Runtime Host returned an invalid Session lookup');
|
|
2241
|
+
case 'unsupported_session_projection':
|
|
2242
|
+
return RequestError.internalError({ ...common, code: 'unsupported_session_projection' }, 'Runtime Host Session cannot be represented in ACP');
|
|
2243
|
+
case 'revision_conflict':
|
|
2244
|
+
return RequestError.internalError({ ...common, code: 'revision_conflict', attempts: error.attempts }, 'Session configuration kept changing');
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
function requestErrorFromRuntimeHost(error, operation, extra = {}) {
|
|
2248
|
+
const data = { ...runtimeHostErrorData(error, operation), ...extra };
|
|
2249
|
+
if (error instanceof RuntimeHostOperationError &&
|
|
2250
|
+
(error.code === 'invalid_request' || error.code === 'not_found')) {
|
|
2251
|
+
return RequestError.invalidParams(data, 'Runtime Host rejected the request');
|
|
2252
|
+
}
|
|
2253
|
+
return RequestError.internalError(data, 'Runtime Host request failed');
|
|
2254
|
+
}
|
|
2255
|
+
function runtimeHostErrorData(error, operation) {
|
|
2256
|
+
if (error instanceof RuntimeHostOperationError) {
|
|
2257
|
+
return {
|
|
2258
|
+
source: 'runtime_host',
|
|
2259
|
+
operation: error.operation,
|
|
2260
|
+
code: error.code,
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
if (error instanceof RuntimeHostRequestInterruptedError) {
|
|
2264
|
+
return {
|
|
2265
|
+
source: 'runtime_host',
|
|
2266
|
+
operation: error.operation,
|
|
2267
|
+
code: 'request_interrupted',
|
|
2268
|
+
reason: error.reason,
|
|
2269
|
+
dispatch: error.dispatch,
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2272
|
+
if (error instanceof RuntimeHostSubscriptionError) {
|
|
2273
|
+
return {
|
|
2274
|
+
source: 'runtime_host',
|
|
2275
|
+
operation,
|
|
2276
|
+
code: 'subscription_failure',
|
|
2277
|
+
reason: error.reason,
|
|
2278
|
+
};
|
|
2279
|
+
}
|
|
2280
|
+
if (error instanceof RuntimeHostCatalogReadError) {
|
|
2281
|
+
return {
|
|
2282
|
+
source: 'runtime_host',
|
|
2283
|
+
operation,
|
|
2284
|
+
code: 'catalog_read_failure',
|
|
2285
|
+
reason: error.reason,
|
|
2286
|
+
};
|
|
2287
|
+
}
|
|
2288
|
+
return { source: 'runtime_host', operation, code: 'internal_failure' };
|
|
2289
|
+
}
|
|
2290
|
+
function encodeAcpSessionCursor(cursor) {
|
|
2291
|
+
const encoded = Buffer.from(JSON.stringify(cursor), 'utf8').toString('base64url');
|
|
2292
|
+
if (Buffer.byteLength(encoded, 'utf8') > ACP_SESSION_CURSOR_MAX_BYTES) {
|
|
2293
|
+
throw RequestError.internalError({
|
|
2294
|
+
source: 'runtime_host',
|
|
2295
|
+
operation: 'session.catalog.query',
|
|
2296
|
+
code: 'cursor_too_large',
|
|
2297
|
+
}, 'Runtime Host cursor cannot be represented safely in ACP');
|
|
2298
|
+
}
|
|
2299
|
+
return encoded;
|
|
2300
|
+
}
|
|
2301
|
+
function decodeAcpSessionCursor(encoded) {
|
|
2302
|
+
try {
|
|
2303
|
+
if (encoded.length === 0 || Buffer.byteLength(encoded, 'utf8') > ACP_SESSION_CURSOR_MAX_BYTES) {
|
|
2304
|
+
throw new Error('cursor size is invalid');
|
|
2305
|
+
}
|
|
2306
|
+
const decoded = Buffer.from(encoded, 'base64url');
|
|
2307
|
+
if (decoded.toString('base64url') !== encoded)
|
|
2308
|
+
throw new Error('cursor encoding is invalid');
|
|
2309
|
+
const value = JSON.parse(decoded.toString('utf8'));
|
|
2310
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
2311
|
+
throw new Error('cursor body is invalid');
|
|
2312
|
+
}
|
|
2313
|
+
const record = value;
|
|
2314
|
+
if (Object.keys(record).length !== 3 ||
|
|
2315
|
+
typeof record.revision !== 'string' ||
|
|
2316
|
+
!/^sha256:[0-9a-f]{64}$/.test(record.revision) ||
|
|
2317
|
+
typeof record.cursor !== 'string' ||
|
|
2318
|
+
record.cursor.length === 0 ||
|
|
2319
|
+
Buffer.byteLength(record.cursor, 'utf8') > SESSION_CATALOG_CURSOR_MAX_BYTES ||
|
|
2320
|
+
!validCursorCwd(record.cwd)) {
|
|
2321
|
+
throw new Error('cursor fields are invalid');
|
|
2322
|
+
}
|
|
2323
|
+
return {
|
|
2324
|
+
revision: record.revision,
|
|
2325
|
+
cursor: record.cursor,
|
|
2326
|
+
cwd: record.cwd,
|
|
2327
|
+
};
|
|
2328
|
+
}
|
|
2329
|
+
catch {
|
|
2330
|
+
throw RequestError.invalidParams({ reason: 'invalid_cursor' }, 'cursor is invalid');
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
function validCursorCwd(value) {
|
|
2334
|
+
return (value === null ||
|
|
2335
|
+
(typeof value === 'string' &&
|
|
2336
|
+
isAbsolute(value) &&
|
|
2337
|
+
normalize(value) === value &&
|
|
2338
|
+
Buffer.byteLength(value, 'utf8') <= SESSION_CATALOG_CWD_MAX_BYTES));
|
|
2339
|
+
}
|
|
2340
|
+
async function normalizeCwd(cwd) {
|
|
2341
|
+
assertBoundedAbsoluteCwd(cwd);
|
|
2342
|
+
const lexical = normalize(cwd);
|
|
2343
|
+
try {
|
|
2344
|
+
return await realpath(lexical);
|
|
2345
|
+
}
|
|
2346
|
+
catch (error) {
|
|
2347
|
+
const code = error.code;
|
|
2348
|
+
if (code === 'ENOENT' || code === 'ENOTDIR')
|
|
2349
|
+
return lexical;
|
|
2350
|
+
throw RequestError.internalError({
|
|
2351
|
+
source: 'filesystem',
|
|
2352
|
+
operation: 'cwd.realpath',
|
|
2353
|
+
code: code ?? 'internal_failure',
|
|
2354
|
+
}, 'cwd could not be canonicalized');
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
function assertBoundedAbsoluteCwd(cwd) {
|
|
2358
|
+
if (!isAbsolute(cwd)) {
|
|
2359
|
+
throw RequestError.invalidParams({ field: 'cwd', reason: 'must_be_absolute' }, 'cwd must be an absolute path');
|
|
2360
|
+
}
|
|
2361
|
+
if (Buffer.byteLength(cwd, 'utf8') > SESSION_CATALOG_CWD_MAX_BYTES) {
|
|
2362
|
+
throw RequestError.invalidParams({ field: 'cwd', reason: 'too_large' }, 'cwd exceeds the Runtime Host path limit');
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
function isoTimestamp(timestamp) {
|
|
2366
|
+
const date = new Date(timestamp);
|
|
2367
|
+
return Number.isNaN(date.getTime()) ? undefined : date.toISOString();
|
|
2368
|
+
}
|
|
2369
|
+
function historyTextChunk(notification) {
|
|
2370
|
+
const update = notification.update;
|
|
2371
|
+
if (update.sessionUpdate !== 'user_message_chunk' &&
|
|
2372
|
+
update.sessionUpdate !== 'agent_message_chunk' &&
|
|
2373
|
+
update.sessionUpdate !== 'agent_thought_chunk')
|
|
2374
|
+
return;
|
|
2375
|
+
if (update.content.type !== 'text' || !update.messageId)
|
|
2376
|
+
return;
|
|
2377
|
+
return { key: `${update.sessionUpdate}:${update.messageId}`, text: update.content.text };
|
|
2378
|
+
}
|