maka-agent 0.2.1-dev.91.20261018 → 0.2.2-dev.97.20261024
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DISCLAIMER-WIP +1 -1
- package/LICENSE +15 -11
- package/README.md +173 -1
- package/README.zh-CN.md +156 -0
- package/THIRD_PARTY_NOTICES.txt +12 -12
- package/dist/cli-core.js +1 -0
- package/dist/pi-goal.js +13 -0
- package/dist/pi-tui-runner.js +44 -1
- package/dist/run-command-core.js +256 -48
- package/dist/run-session-command.js +534 -0
- package/dist/run-session-result.js +38 -0
- package/dist/run-turn-outcome.js +174 -0
- package/dist/runtime-host-cli.js +32 -17
- package/dist/runtime-host-run-command.js +53 -165
- package/dist/runtime-host-run-mcp.js +3 -0
- package/dist/runtime-host-session-channel.js +3 -1
- package/dist/runtime-host-session-driver.js +5 -0
- package/dist/runtime-host-setup-command.js +114 -7
- package/dist/tui-copy-catalog.js +24 -0
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/cache-handler.js +48 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/handler/redirect-handler.js +8 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/interceptor/decompress.js +15 -5
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/index.js +3 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/parse.js +138 -137
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/fetch/index.js +3 -3
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/infra/index.js +14 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/lib/web/websocket/receiver.js +13 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/undici/package.json +1 -1
- package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog-store.js +87 -0
- package/node_modules/@maka/acp-executor-plugin/dist/acp-catalog.js +98 -21
- package/node_modules/@maka/acp-executor-plugin/dist/index.js +90 -14
- package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +3997 -56
- package/node_modules/@maka/core/dist/assistant-turn-ids.js +34 -0
- package/node_modules/@maka/core/dist/bot-chat-settings.js +10 -1
- package/node_modules/@maka/core/dist/event-wait-delivery.js +67 -0
- package/node_modules/@maka/core/dist/event-wait.js +75 -10
- package/node_modules/@maka/core/dist/executor-catalog.js +3 -1
- package/node_modules/@maka/core/dist/goal.js +54 -2
- package/node_modules/@maka/core/dist/model-catalog.js +19 -1
- package/node_modules/@maka/core/dist/model-metadata.generated.js +4 -14
- package/node_modules/@maka/core/dist/model-metadata.js +42 -1
- package/node_modules/@maka/core/dist/models-dev-projection.js +32 -1
- package/node_modules/@maka/core/dist/provider-registry.js +16 -2
- package/node_modules/@maka/core/dist/runtime-event-store.js +0 -1
- package/node_modules/@maka/core/dist/runtime-event.js +24 -2
- package/node_modules/@maka/core/dist/runtime-invocation.js +10 -0
- package/node_modules/@maka/core/dist/session-checkin.js +31 -0
- package/node_modules/@maka/core/dist/tool-ledger-scanner.js +1 -9
- package/node_modules/@maka/core/dist/tool-recovery-bundle.js +1 -14
- package/node_modules/@maka/core/dist/turn-origin.js +14 -2
- package/node_modules/@maka/core/dist/usage-stats/types.js +1 -0
- package/node_modules/@maka/core/package.json +3 -0
- package/node_modules/@maka/eval/node_modules/undici/README.md +25 -3
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/@maka/eval/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/@maka/eval/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@maka/eval/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/@maka/eval/node_modules/undici/package.json +9 -7
- package/node_modules/@maka/mcp/package.json +1 -1
- package/node_modules/@maka/runtime/dist/agent-run.js +5 -1
- package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +29 -15
- package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +10 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +125 -131
- package/node_modules/@maka/runtime/dist/bots/bot-registry.js +19 -3
- package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +178 -6
- package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +163 -9
- package/node_modules/@maka/runtime/dist/context-budget-policy.js +9 -2
- package/node_modules/@maka/runtime/dist/event-wait-tool.js +69 -0
- package/node_modules/@maka/runtime/dist/goal-continuation.js +195 -117
- package/node_modules/@maka/runtime/dist/goal-state.js +8 -0
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +34 -4
- package/node_modules/@maka/runtime/dist/history-compaction.js +7 -0
- package/node_modules/@maka/runtime/dist/memory-extraction.js +0 -2
- package/node_modules/@maka/runtime/dist/model-factory.js +26 -6
- package/node_modules/@maka/runtime/dist/model-fetcher.js +8 -1
- package/node_modules/@maka/runtime/dist/model-history.js +16 -3
- package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +15 -5
- package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/plugin-executor-backend.js +49 -2
- package/node_modules/@maka/runtime/dist/plugin-executor-service.js +12 -3
- package/node_modules/@maka/runtime/dist/provider-error-classification.js +2 -0
- package/node_modules/@maka/runtime/dist/recovery-resolver.js +2 -1
- package/node_modules/@maka/runtime/dist/runtime-context.js +53 -0
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +3 -0
- package/node_modules/@maka/runtime/dist/sandbox-boundary-path.js +79 -2
- package/node_modules/@maka/runtime/dist/session-checkin.js +331 -0
- package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +7 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +5 -1
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +34 -0
- package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/telemetry/builtin-pricing.js +21 -2
- package/node_modules/@maka/runtime/dist/tool-runtime.js +11 -2
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs +50 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/cache-handler.js +48 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/handler/redirect-handler.js +8 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/interceptor/decompress.js +15 -5
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/index.js +3 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/parse.js +138 -137
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/fetch/index.js +3 -3
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/infra/index.js +14 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/lib/web/websocket/receiver.js +13 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/node_modules/undici/package.json +1 -1
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/README.md +25 -3
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/@maka/runtime/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/@maka/runtime/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/@maka/runtime/node_modules/undici/package.json +9 -7
- package/node_modules/@maka/runtime/package.json +3 -0
- package/node_modules/@maka/runtime-host/dist/assistant/bot/bridge.js +8 -0
- package/node_modules/@maka/runtime-host/dist/assistant/bot/capabilities.js +1 -0
- package/node_modules/@maka/runtime-host/dist/assistant/bot/controller.js +92 -22
- package/node_modules/@maka/runtime-host/dist/assistant/bot/host.js +11 -2
- package/node_modules/@maka/runtime-host/dist/assistant/bot/store.js +71 -2
- package/node_modules/@maka/runtime-host/dist/assistant/bot/turn-ids.js +38 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/assistant.js +7 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/controller.js +193 -32
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/discovery-capabilities.js +69 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/host.js +15 -28
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/notebook.js +286 -0
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/prompt.js +31 -6
- package/node_modules/@maka/runtime-host/dist/assistant/index-initiative/store.js +18 -1
- package/node_modules/@maka/runtime-host/dist/assistant/memory-network/controller.js +203 -71
- package/node_modules/@maka/runtime-host/dist/assistant/memory-network/host.js +21 -5
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-observer.js +94 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition-store.js +253 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/condition.js +133 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/controller.js +27 -14
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delegation.js +37 -5
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/delivery.js +1 -1
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/host.js +16 -2
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/matter.js +13 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/prompt.js +7 -5
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/review.js +68 -14
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/settlement-context.js +126 -0
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/store.js +92 -6
- package/node_modules/@maka/runtime-host/dist/assistant/proactive-matters/tools.js +93 -23
- package/node_modules/@maka/runtime-host/dist/assistant/service.js +72 -16
- package/node_modules/@maka/runtime-host/dist/client/host-profile.js +30 -1
- package/node_modules/@maka/runtime-host/dist/client/ssh-operator-activation.js +9 -2
- package/node_modules/@maka/runtime-host/dist/protocol/goal.js +119 -1
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +10 -3
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +8 -1
- package/node_modules/@maka/runtime-host/dist/protocol/personal-assistant.js +1 -0
- package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +7 -1
- package/node_modules/@maka/runtime-host/dist/protocol/session-checkin.js +133 -0
- package/node_modules/@maka/runtime-host/dist/server/agent-settings-tools.js +0 -1
- package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +3 -2
- package/node_modules/@maka/runtime-host/dist/server/event-wait-manager.js +151 -20
- package/node_modules/@maka/runtime-host/dist/server/event-wait-observation-store.js +19 -0
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +127 -11
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +47 -3
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +11 -0
- package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +5 -2
- package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +343 -53
- package/node_modules/@maka/runtime-host/dist/server/goal-event-waits.js +457 -0
- package/node_modules/@maka/runtime-host/dist/server/goal-execution-coordinator.js +23 -6
- package/node_modules/@maka/runtime-host/dist/server/goal-projection.js +24 -3
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +5 -1
- package/node_modules/@maka/runtime-host/dist/server/index.js +2 -0
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +44 -2
- package/node_modules/@maka/runtime-host/dist/server/personal-assistant-workspace.js +78 -0
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +8 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +73 -3
- package/node_modules/@maka/runtime-host/dist/server/session-checkin.js +257 -0
- package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-coordinator.js +282 -0
- package/node_modules/@maka/runtime-host/dist/server/session-checkpoint-publication.js +250 -0
- package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-access.js +166 -0
- package/node_modules/@maka/runtime-host/dist/server/shell-run-event-wait-adapter.js +59 -0
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +4 -2
- package/node_modules/@maka/storage/dist/agent-run-store-contract.js +14 -3
- package/node_modules/@maka/storage/dist/agent-run-store.js +10 -0
- package/node_modules/@maka/storage/dist/codex-session-adapter.js +20 -3
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +2 -1
- package/node_modules/@maka/storage/dist/event-wait-authority.js +18 -1
- package/node_modules/@maka/storage/dist/event-wait-bridge.js +336 -0
- package/node_modules/@maka/storage/dist/execution-stores.js +39 -1
- package/node_modules/@maka/storage/dist/external-session-images.js +131 -0
- package/node_modules/@maka/storage/dist/external-session-importer.js +12 -2
- package/node_modules/@maka/storage/dist/goal-authority.js +2 -0
- package/node_modules/@maka/storage/dist/local-execution-persistence.js +27 -1
- package/node_modules/@maka/storage/dist/operational-state-store.js +1 -1
- package/node_modules/@maka/storage/dist/production-session-snapshot.js +14 -6
- package/node_modules/@maka/storage/dist/runtime-event-persistence.js +1 -0
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +116 -16
- package/node_modules/@maka/storage/dist/session-checkpoint-publication-store.js +204 -0
- package/node_modules/@maka/storage/dist/session-store.js +37 -8
- package/node_modules/@maka/storage/dist/snapshot-operation-gate.js +65 -0
- package/node_modules/@maka/storage/dist/sqlite-context-offload-schema.js +3 -3
- package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +4 -2
- package/node_modules/@maka/storage/dist/sqlite-event-wait-authority.js +81 -8
- package/node_modules/@maka/storage/dist/sqlite-event-wait-bridge.js +94 -0
- package/node_modules/@maka/storage/dist/sqlite-reclamation-checkpoint.js +37 -0
- package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +7 -8
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +38 -162
- package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +7 -4
- package/node_modules/@maka/storage/dist/tool-commit-validation.js +1 -1
- package/node_modules/@maka/storage/package.json +4 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-B-4n9P0J.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-J2FaQ-KY.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +76 -22
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +76 -22
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/{src-oZBjf3U1.cjs → src-DpAS0jfg.cjs} +105 -8
- package/node_modules/@modelcontextprotocol/client/dist/{src-xKF0PJN-.mjs → src-WCy6ifGf.mjs} +88 -9
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +1 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +1 -1
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/package.json +2 -2
- package/node_modules/@modelcontextprotocol/client/package.json +5 -5
- package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
- package/node_modules/fast-uri/README.md +8 -0
- package/node_modules/fast-uri/index.js +98 -18
- package/node_modules/fast-uri/lib/utils.js +52 -0
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/follow-redirects/index.js +10 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/ip-address/README.md +104 -104
- package/node_modules/ip-address/dist/ipv4.js +7 -0
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/undici/README.md +25 -3
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/undici/package.json +9 -7
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/package.json +2 -2
- package/node_modules/@modelcontextprotocol/client/dist/index-D_CiY-T3.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-D_QDtbiv.d.mts.map +0 -1
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
* specific language governing permissions and limitations
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
|
+
import { readMatterRuntimeEvents } from '../assistant/proactive-matters/settlement-context.js';
|
|
19
20
|
import { markAssistantBackgroundSessions } from '../assistant/background-sessions.js';
|
|
20
21
|
import { PersonalAssistantService, ASSISTANT_LEGACY_PACKAGES } from '../assistant/service.js';
|
|
22
|
+
import { assistantInputTurnId, legacyAssistantInputTurnId } from '../assistant/bot/turn-ids.js';
|
|
21
23
|
import { createAssistantMessageReader } from './session-transcript-reader.js';
|
|
22
24
|
import { createImageFileReader } from '@maka/runtime/image-file-reader';
|
|
23
25
|
import { ChatImageDeliveryService } from './chat-image-delivery.js';
|
|
@@ -60,6 +62,9 @@ import { RuntimeReadModel } from '@maka/runtime/runtime-read-model';
|
|
|
60
62
|
import { renderAgentSwarmSupervisorWake, shouldWakeAgentSwarmSupervisor, } from '@maka/runtime/agent-swarm-status-tool';
|
|
61
63
|
import { SessionActivityRegistry } from '@maka/runtime/goal-turn-lifecycle';
|
|
62
64
|
import { ShellRunProcessManager } from '@maka/runtime/shell-run-manager';
|
|
65
|
+
import { ShellRunEventWaitAccess } from './shell-run-event-wait-access.js';
|
|
66
|
+
import { ShellRunEventWaitAdapter } from './shell-run-event-wait-adapter.js';
|
|
67
|
+
import { EventWaitAdapterRegistry } from './event-wait-adapter.js';
|
|
63
68
|
import { resolveShellPlan, resolveTurnShellPlan, validateShellPreference, } from '@maka/runtime/shell-detect';
|
|
64
69
|
import { Context } from '@maka/runtime/plugin-kernel';
|
|
65
70
|
import { PluginAgentService } from '@maka/runtime/plugin-agent-service';
|
|
@@ -109,12 +114,13 @@ import { HostConnectionEffectCoordinator } from './connection-effect-coordinator
|
|
|
109
114
|
import { HostChangeFeed } from './host-change-feed.js';
|
|
110
115
|
import { HostConfigurationCoordinator } from './configuration-coordinator.js';
|
|
111
116
|
import { HostPromptSuggestionCoordinator, supportsPromptSuggestion } from './prompt-suggestion.js';
|
|
117
|
+
import { checkinSessionState, HostSessionCheckinCoordinator, listCheckinCatalogSessions, } from './session-checkin.js';
|
|
112
118
|
import { HostContextCoordinator } from './context-coordinator.js';
|
|
113
119
|
import { HostClientCapabilityCoordinator } from './client-capability-coordinator.js';
|
|
114
120
|
import { HostDailyReviewCoordinator } from './daily-review-coordinator.js';
|
|
115
121
|
import { prepareHostAiSdkBackend } from './execution-model-composition.js';
|
|
116
122
|
import { createInteractiveRunComposer, createInteractiveRunComposerFactory, routeInteractiveRunToolSurface, } from './interactive-run-composer.js';
|
|
117
|
-
import { createHostGoalEvaluator, createHostDailyReviewModel, createHostMemoryExtractionModel, createHostPluginModel, createHostSessionEffectModel, createHostPromptSuggestionModel, } from './execution-model-authority.js';
|
|
123
|
+
import { createHostGoalEvaluator, createHostDailyReviewModel, createHostMemoryExtractionModel, createHostPluginModel, createHostSessionEffectModel, createHostPromptSuggestionModel, createHostCheckinModel, resolveDefaultModelHeader, } from './execution-model-authority.js';
|
|
118
124
|
import { HostExecutionInspectCoordinator } from './execution-inspect-coordinator.js';
|
|
119
125
|
import { HostExternalSessionCoordinator } from './external-session-coordinator.js';
|
|
120
126
|
import { boundedFailureDiagnostic } from './failure-diagnostic.js';
|
|
@@ -143,6 +149,7 @@ import { join } from 'node:path';
|
|
|
143
149
|
import { toRuntimePolicyProxy } from './runtime-policy-proxy.js';
|
|
144
150
|
import { AcpSetupError } from './acp/connection.js';
|
|
145
151
|
import { installAntigravity } from './acp/antigravity-install.js';
|
|
152
|
+
import { ANTIGRAVITY_ACP_EXECUTOR_ID } from '@maka/antigravity-acp-plugin';
|
|
146
153
|
import { createProxiedFetchTransport } from '@maka/runtime/network/scoped-fetch-transport';
|
|
147
154
|
import { HostExternalAgentSetupCoordinator } from './external-agent-setup-coordinator.js';
|
|
148
155
|
import { HostOAuthCoordinator } from './oauth-coordinator.js';
|
|
@@ -163,6 +170,7 @@ import { startHostModelMetadataRefresh } from './model-metadata-refresh.js';
|
|
|
163
170
|
import { HostRuntimeResourceCoordinator } from './runtime-resource-coordinator.js';
|
|
164
171
|
import { SessionAdmissionGate } from './session-admission-gate.js';
|
|
165
172
|
import { workHubResultOrigin } from './workhub-result-coordinator.js';
|
|
173
|
+
import { HostPersonalAssistantWorkspace } from './personal-assistant-workspace.js';
|
|
166
174
|
import { HostSessionCatalogCoordinator } from './session-catalog-coordinator.js';
|
|
167
175
|
import { SessionBackgroundActivityProjection } from './session-background-activity.js';
|
|
168
176
|
import { SessionInteractionActivityProjection } from './session-interaction-activity.js';
|
|
@@ -171,6 +179,7 @@ import { HostSessionRetirementCoordinator } from './session-retirement-coordinat
|
|
|
171
179
|
import { HostStorageMaintenance } from './storage-maintenance.js';
|
|
172
180
|
import { HostStorageUsageCoordinator } from './storage-usage-coordinator.js';
|
|
173
181
|
import { HostArchiveRetentionCoordinator } from './archive-retention-coordinator.js';
|
|
182
|
+
import { createHostSessionCheckpointPublication, } from './session-checkpoint-publication.js';
|
|
174
183
|
import { HostSessionRevisionCoordinator } from './session-revision-coordinator.js';
|
|
175
184
|
import { HostSessionEffectCoordinator } from './session-effect-coordinator.js';
|
|
176
185
|
import { SessionContinuityCoordinator } from './session-continuity-coordinator.js';
|
|
@@ -226,6 +235,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
226
235
|
let graphClient;
|
|
227
236
|
let sessionEffects;
|
|
228
237
|
let promptSuggestions;
|
|
238
|
+
let checkins;
|
|
229
239
|
let memoryExtraction;
|
|
230
240
|
let imageDelivery;
|
|
231
241
|
let unsubscribeTranscriptChanges;
|
|
@@ -240,6 +250,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
240
250
|
let invalidatePluginExecutorBackends = () => undefined;
|
|
241
251
|
let modelMetadataRefresh;
|
|
242
252
|
let archiveEvidence;
|
|
253
|
+
let sessionCheckpoints;
|
|
243
254
|
try {
|
|
244
255
|
const pluginRoot = new Context();
|
|
245
256
|
const pluginAgents = new PluginAgentService(pluginRoot);
|
|
@@ -295,9 +306,20 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
295
306
|
...(header.executorConfig ? { configuration: header.executorConfig } : {}),
|
|
296
307
|
});
|
|
297
308
|
}
|
|
298
|
-
return pluginExecutors.catalog({
|
|
309
|
+
return pluginExecutors.catalog({
|
|
310
|
+
cwd: input.cwd,
|
|
311
|
+
refresh: input.refresh,
|
|
312
|
+
executorId: input.executorId,
|
|
313
|
+
listOnly: input.listOnly,
|
|
314
|
+
});
|
|
299
315
|
});
|
|
300
316
|
const personalAssistant = (assistant = new PersonalAssistantService(join(context.owner.controlDirectory, 'personal-assistant'), {
|
|
317
|
+
prepareBotWake: async (ownerId, workerId) => {
|
|
318
|
+
if (await interactions.hasPendingSession(workerId))
|
|
319
|
+
return 'deferred';
|
|
320
|
+
return sessionCatalog.synchronizeAssistantBotModel(ownerId, workerId);
|
|
321
|
+
},
|
|
322
|
+
allocateWorkspace: () => assistantWorkspace.allocate(),
|
|
301
323
|
stopSessions: async () => {
|
|
302
324
|
if (!rootCoordinator)
|
|
303
325
|
return;
|
|
@@ -344,6 +366,9 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
344
366
|
});
|
|
345
367
|
},
|
|
346
368
|
markBackgroundSessions: (ids) => markAssistantBackgroundSessions(stores.sessionStore, ids),
|
|
369
|
+
readRuntimeEvents: async (sessionId, runId) => runId
|
|
370
|
+
? readMatterRuntimeEvents(stores.runtimeEventStore, sessionId, runId)
|
|
371
|
+
: (await stores.runtimeEventStore.readSessionRuntimeEventEntries(sessionId)).map((entry) => entry.event),
|
|
347
372
|
agents: pluginAgents,
|
|
348
373
|
llm: pluginLlm,
|
|
349
374
|
sessionQuery: pluginSessionQuery,
|
|
@@ -879,13 +904,15 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
879
904
|
continuity = new SessionContinuityCoordinator(context.hostEpoch, (sessionId) => canonicalProjectionReader.read(sessionId), sessionAdmission, context.requestDrain, transcriptReader, async (sessionId, attention) => {
|
|
880
905
|
if (attention) {
|
|
881
906
|
try {
|
|
882
|
-
|
|
907
|
+
const header = await stores.sessionStore.readHeaderSnapshot(sessionId);
|
|
908
|
+
if (header.labels?.includes(ASSISTANT_BACKGROUND_SESSION_LABEL) ||
|
|
909
|
+
(await runtimePolicyStores.runtimePolicy.getSnapshot()).policy.privacy.incognitoActive) {
|
|
883
910
|
attention = undefined;
|
|
884
911
|
}
|
|
885
912
|
}
|
|
886
913
|
catch (error) {
|
|
887
914
|
attention = undefined;
|
|
888
|
-
console.warn('[runtime-host] Could not read notification
|
|
915
|
+
console.warn('[runtime-host] Could not read notification policy', error);
|
|
889
916
|
}
|
|
890
917
|
}
|
|
891
918
|
hostChanges.publishSessionCatalog(sessionId, attention);
|
|
@@ -927,6 +954,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
927
954
|
let domainModuleDrainBegun = false;
|
|
928
955
|
const beginDrain = () => {
|
|
929
956
|
draining = true;
|
|
957
|
+
sessionCheckpoints?.beginDrain();
|
|
930
958
|
if (!domainModules || domainModuleDrainBegun)
|
|
931
959
|
return;
|
|
932
960
|
domainModuleDrainBegun = true;
|
|
@@ -1022,19 +1050,24 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
1022
1050
|
...(scheduledTaskTool ? { scheduledTaskTool } : {}),
|
|
1023
1051
|
planStore,
|
|
1024
1052
|
goalTools: requireGoal(goal).tools,
|
|
1053
|
+
eventWaitAvailable: () => backendContext.header.toolMode !== 'code_mode' &&
|
|
1054
|
+
['active', 'waiting'].includes(requireGoal(goal).manager.get(backendContext.sessionId)?.status ?? ''),
|
|
1025
1055
|
builtinTools,
|
|
1026
1056
|
hostTools,
|
|
1027
1057
|
resolveToolCeiling: (sessionId) => personalAssistant.toolCeiling(sessionId),
|
|
1028
1058
|
resolveRootTools: async (sessionId) => {
|
|
1029
1059
|
await assertAssistantSessionEnabled(sessionId);
|
|
1030
1060
|
return [
|
|
1031
|
-
...personalAssistant.tools,
|
|
1061
|
+
...personalAssistant.filterTools(sessionId, personalAssistant.tools),
|
|
1032
1062
|
...(sessionId === WORKHUB_COORDINATION_SESSION_ID && workHubResults && workHubInspection
|
|
1033
1063
|
? [workHubResults.tool, workHubInspection]
|
|
1034
1064
|
: await requireGraphCoordinator(graphCoordinator).toolsForSession(sessionId)),
|
|
1035
1065
|
];
|
|
1036
1066
|
},
|
|
1037
|
-
resolvePluginTools: (sessionId, coreTools) =>
|
|
1067
|
+
resolvePluginTools: (sessionId, coreTools) => {
|
|
1068
|
+
const resolved = pluginTools.resolveContributions(sessionId, coreTools);
|
|
1069
|
+
return { ...resolved, tools: personalAssistant.filterTools(sessionId, resolved.tools) };
|
|
1070
|
+
},
|
|
1038
1071
|
resolvePluginSystemPrompt: async (sessionId, promptContext, baseText) => {
|
|
1039
1072
|
const assembly = await pluginSystemPrompt.assemble({
|
|
1040
1073
|
sessionId,
|
|
@@ -1190,7 +1223,10 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
1190
1223
|
const [graphTools, planState] = await Promise.all([
|
|
1191
1224
|
(sessionId === WORKHUB_COORDINATION_SESSION_ID && workHubResults && workHubInspection
|
|
1192
1225
|
? Promise.resolve([workHubResults.tool, workHubInspection])
|
|
1193
|
-
: requireGraphCoordinator(graphCoordinator).toolsForSession(sessionId)).then((tools) => [
|
|
1226
|
+
: requireGraphCoordinator(graphCoordinator).toolsForSession(sessionId)).then((tools) => [
|
|
1227
|
+
...personalAssistant.filterTools(sessionId, personalAssistant.tools),
|
|
1228
|
+
...tools,
|
|
1229
|
+
]),
|
|
1194
1230
|
planStore.readState(sessionId),
|
|
1195
1231
|
]);
|
|
1196
1232
|
const { runtimePolicy, surface } = await resolveInteractiveToolSurface({
|
|
@@ -1524,7 +1560,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
1524
1560
|
context.requestDrain();
|
|
1525
1561
|
},
|
|
1526
1562
|
onSucceeded: () => {
|
|
1527
|
-
pluginExecutors.invalidateCatalog();
|
|
1563
|
+
pluginExecutors.invalidateCatalog(ANTIGRAVITY_ACP_EXECUTOR_ID);
|
|
1528
1564
|
hostChanges.publishConfiguration();
|
|
1529
1565
|
},
|
|
1530
1566
|
capabilities: clientCapabilities,
|
|
@@ -1621,6 +1657,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
1621
1657
|
};
|
|
1622
1658
|
const pluginSessionSummary = (session) => Object.freeze({
|
|
1623
1659
|
id: session.id,
|
|
1660
|
+
isArchived: session.isArchived,
|
|
1624
1661
|
...(session.name ? { title: session.name } : {}),
|
|
1625
1662
|
...(session.cwd ? { cwd: session.cwd } : {}),
|
|
1626
1663
|
...(session.labels?.length ? { labels: session.labels } : {}),
|
|
@@ -1970,12 +2007,20 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
1970
2007
|
onError: () => context.requestDrain(),
|
|
1971
2008
|
});
|
|
1972
2009
|
const goalExecutionCoordinator = new HostGoalExecutionCoordinator({
|
|
2010
|
+
authorizeEventWait: async (sessionId, pending) => (await requireGoal(goal).eventWaitBridge?.authorizeAdmission(sessionId, pending)) ?? false,
|
|
1973
2011
|
executions: coordinator,
|
|
1974
2012
|
runtime: manager,
|
|
1975
2013
|
matchesActive: (sessionId, checkpoint, controlLease) => requireGoal(goal).matchesActive(sessionId, checkpoint, controlLease),
|
|
1976
2014
|
});
|
|
1977
2015
|
goalExecutions = goalExecutionCoordinator;
|
|
2016
|
+
const shellRunWaitAccess = new ShellRunEventWaitAccess(openedShellRunStore, stores.runtimeEventStore);
|
|
1978
2017
|
goal = new HostGoalCoordinator({
|
|
2018
|
+
eventWaitSources: dependencies.eventWaitSources ?? {
|
|
2019
|
+
adapters: new EventWaitAdapterRegistry([
|
|
2020
|
+
new ShellRunEventWaitAdapter(shellRunWaitAccess, shellRuns),
|
|
2021
|
+
]),
|
|
2022
|
+
authorize: (wait, signal) => shellRunWaitAccess.authorize(wait, signal),
|
|
2023
|
+
},
|
|
1979
2024
|
store: openedGoalStore,
|
|
1980
2025
|
stores,
|
|
1981
2026
|
readSessionContext: async (sessionId) => {
|
|
@@ -1996,7 +2041,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
1996
2041
|
requestDrain: context.requestDrain,
|
|
1997
2042
|
readSessionHeader: (sessionId) => stores.sessionStore.readHeaderSnapshot(sessionId),
|
|
1998
2043
|
}),
|
|
1999
|
-
admitTurn: (sessionId, text, checkpoint, controlLease) => goalExecutionCoordinator.admitTurn(sessionId, text, checkpoint, controlLease),
|
|
2044
|
+
admitTurn: (sessionId, text, checkpoint, controlLease, eventWait) => goalExecutionCoordinator.admitTurn(sessionId, text, checkpoint, controlLease, eventWait),
|
|
2000
2045
|
acquireResidency: (kind) => context.acquireResidency('goal', kind),
|
|
2001
2046
|
onProjectionChanged: (sessionId) => continuityCoordinator.enqueueCanonicalRefresh(sessionId),
|
|
2002
2047
|
requestDrain: context.requestDrain,
|
|
@@ -2031,7 +2076,8 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2031
2076
|
});
|
|
2032
2077
|
async function applyRuntimePolicyMutationEffects() {
|
|
2033
2078
|
try {
|
|
2034
|
-
|
|
2079
|
+
// Reconciliation replaces only changed agent configurations. Unrelated
|
|
2080
|
+
// policy edits must not discard every provider's persistent catalog.
|
|
2035
2081
|
await builtinExternalAgentPlugins.reconcile();
|
|
2036
2082
|
await requireMemory(memory).refreshAfterPolicyMutation();
|
|
2037
2083
|
}
|
|
@@ -2095,6 +2141,46 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2095
2141
|
? { sessionAccessAuthority: context.sessionAccessAuthority }
|
|
2096
2142
|
: {}),
|
|
2097
2143
|
});
|
|
2144
|
+
const sessionCheckins = new HostSessionCheckinCoordinator({
|
|
2145
|
+
allowed: async () => !(await runtimePolicyStores.runtimePolicy.getSnapshot()).policy.privacy.incognitoActive,
|
|
2146
|
+
listSessions: (context) => listCheckinCatalogSessions((input) => sessionCatalog.handlers['session.catalog.query'](input, context)),
|
|
2147
|
+
readSession: async (session) => {
|
|
2148
|
+
// The Todo read takes the Session's admission itself, so it cannot run inside this one.
|
|
2149
|
+
const todos = (await sessionTodo.read(session.id)).items;
|
|
2150
|
+
return sessionAdmission.run(session.id, async () => {
|
|
2151
|
+
const canonical = await canonicalProjectionReader.read(session.id);
|
|
2152
|
+
if (!canonical || canonical.session.isArchived)
|
|
2153
|
+
return undefined;
|
|
2154
|
+
await requireSessionManager(manager).ensureTranscriptLedgerForRead(session.id);
|
|
2155
|
+
const view = await recapReadModel.getSessionView(session.id);
|
|
2156
|
+
return checkinSessionState({
|
|
2157
|
+
session,
|
|
2158
|
+
canonical,
|
|
2159
|
+
todos,
|
|
2160
|
+
messages: view.messages,
|
|
2161
|
+
turns: view.turns,
|
|
2162
|
+
});
|
|
2163
|
+
});
|
|
2164
|
+
},
|
|
2165
|
+
readModelTarget: () => resolveDefaultModelHeader(runtimePolicyStores),
|
|
2166
|
+
generate: createHostCheckinModel({
|
|
2167
|
+
runtimePolicy: runtimePolicyStores,
|
|
2168
|
+
oauthCredentials,
|
|
2169
|
+
usage: openedUsageStores,
|
|
2170
|
+
requestDrain: context.requestDrain,
|
|
2171
|
+
}),
|
|
2172
|
+
});
|
|
2173
|
+
checkins = sessionCheckins;
|
|
2174
|
+
const assistantWorkspace = new HostPersonalAssistantWorkspace({
|
|
2175
|
+
stateRoot: context.owner.capability.canonicalPath,
|
|
2176
|
+
...(options.assistantHomeDirectory ? { homeDirectory: options.assistantHomeDirectory } : {}),
|
|
2177
|
+
projects: openedProjectCatalog,
|
|
2178
|
+
membership: projectMembership,
|
|
2179
|
+
projectChanged: () => hostChanges.publishProjectCatalog(),
|
|
2180
|
+
preflightSessionCreation: async () => {
|
|
2181
|
+
await sessionCatalog.resolveDefaultCreateTarget();
|
|
2182
|
+
},
|
|
2183
|
+
});
|
|
2098
2184
|
const workHubTargetExecution = new HostWorkHubTargetExecutionAuthority({
|
|
2099
2185
|
readSession: (sessionId) => stores.sessionStore.readHeaderRecordSnapshot(sessionId),
|
|
2100
2186
|
runtimePolicy: {
|
|
@@ -2468,6 +2554,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2468
2554
|
});
|
|
2469
2555
|
const externalSessions = new HostExternalSessionCoordinator({
|
|
2470
2556
|
adapters: createExternalSessionAdapterRegistry(),
|
|
2557
|
+
artifacts: openedArtifactStore,
|
|
2471
2558
|
admission: sessionAdmission,
|
|
2472
2559
|
sessions: stores.sessionStore,
|
|
2473
2560
|
workspaceResolver,
|
|
@@ -2477,6 +2564,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2477
2564
|
const outcomes = await Promise.allSettled([
|
|
2478
2565
|
stores.purgeConversationOperationalState(sessionId),
|
|
2479
2566
|
sessionTodoStore.purgeSessionState(sessionId),
|
|
2567
|
+
openedArtifactStore.purgeSessionArtifacts(sessionId),
|
|
2480
2568
|
stores.sessionStore.remove(sessionId),
|
|
2481
2569
|
]);
|
|
2482
2570
|
for (const outcome of outcomes) {
|
|
@@ -2606,6 +2694,15 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2606
2694
|
catalog: stores.sessionStore,
|
|
2607
2695
|
retirement: sessionRetirement,
|
|
2608
2696
|
});
|
|
2697
|
+
sessionCheckpoints = await createHostSessionCheckpointPublication({
|
|
2698
|
+
context,
|
|
2699
|
+
stores,
|
|
2700
|
+
admission: sessionAdmission,
|
|
2701
|
+
manager: requireSessionManager(manager),
|
|
2702
|
+
shellRuns: openedShellRunStore,
|
|
2703
|
+
isSessionIdle: (sessionId) => rootRecoveryCompleted && !draining && coordinator.isSessionExecutionIdle(sessionId),
|
|
2704
|
+
options: dependencies.checkpointPublication,
|
|
2705
|
+
});
|
|
2609
2706
|
const storageMaintenance = new HostStorageMaintenance({
|
|
2610
2707
|
artifacts: openedArtifactStore,
|
|
2611
2708
|
contextOffload: openedContextOffloadStore,
|
|
@@ -2839,7 +2936,9 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2839
2936
|
return result;
|
|
2840
2937
|
// Canonical receipts remain queryable even while the feature is disabled.
|
|
2841
2938
|
const visible = new Set((await stores.sessionStore.readMessagesSnapshot(input.sessionId))
|
|
2842
|
-
.filter((row) => row.type === 'user' &&
|
|
2939
|
+
.filter((row) => row.type === 'user' &&
|
|
2940
|
+
(row.turnId === assistantInputTurnId(row.id) ||
|
|
2941
|
+
row.turnId === legacyAssistantInputTurnId(row.id)))
|
|
2843
2942
|
.map((row) => row.id));
|
|
2844
2943
|
return {
|
|
2845
2944
|
ok: true,
|
|
@@ -2904,6 +3003,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2904
3003
|
interactions.handlers,
|
|
2905
3004
|
sessionEffectCoordinator.handlers,
|
|
2906
3005
|
promptSuggestionCoordinator.handlers,
|
|
3006
|
+
sessionCheckins.handlers,
|
|
2907
3007
|
continuityCoordinator.handlers,
|
|
2908
3008
|
runtimeResources.handlers,
|
|
2909
3009
|
contextOperations.handlers,
|
|
@@ -2934,6 +3034,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2934
3034
|
() => interactions.beginDrain(),
|
|
2935
3035
|
() => sessionEffects?.beginDrain(),
|
|
2936
3036
|
() => promptSuggestions?.beginDrain(),
|
|
3037
|
+
() => checkins?.beginDrain(),
|
|
2937
3038
|
],
|
|
2938
3039
|
close: [
|
|
2939
3040
|
async () => {
|
|
@@ -2949,6 +3050,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
2949
3050
|
() => workspaceExecution?.close(),
|
|
2950
3051
|
() => sessionEffects?.close(),
|
|
2951
3052
|
() => promptSuggestions?.close(),
|
|
3053
|
+
() => checkins?.close(),
|
|
2952
3054
|
() => messages.close(),
|
|
2953
3055
|
() => interactions.close(),
|
|
2954
3056
|
() => turnAccessRequests?.close(),
|
|
@@ -3018,6 +3120,12 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
3018
3120
|
catch (error) {
|
|
3019
3121
|
errors.push(error);
|
|
3020
3122
|
}
|
|
3123
|
+
try {
|
|
3124
|
+
await sessionCheckpoints?.close();
|
|
3125
|
+
}
|
|
3126
|
+
catch (error) {
|
|
3127
|
+
errors.push(error);
|
|
3128
|
+
}
|
|
3021
3129
|
try {
|
|
3022
3130
|
await closeRuntimeHostDomainModules(domainModules);
|
|
3023
3131
|
}
|
|
@@ -3040,6 +3148,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
3040
3148
|
};
|
|
3041
3149
|
return {
|
|
3042
3150
|
handlers,
|
|
3151
|
+
sessionCheckpoints,
|
|
3043
3152
|
moduleIds: Object.freeze(domainModules.map(({ id }) => id)),
|
|
3044
3153
|
workspaceExecution: requireWorkspaceExecution(workspaceExecution),
|
|
3045
3154
|
plugins: pluginPlatform,
|
|
@@ -3124,6 +3233,12 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
3124
3233
|
}
|
|
3125
3234
|
catch (error) {
|
|
3126
3235
|
const errors = [error];
|
|
3236
|
+
try {
|
|
3237
|
+
await sessionCheckpoints?.close();
|
|
3238
|
+
}
|
|
3239
|
+
catch (closeError) {
|
|
3240
|
+
errors.push(closeError);
|
|
3241
|
+
}
|
|
3127
3242
|
archiveEvidence?.close();
|
|
3128
3243
|
try {
|
|
3129
3244
|
await modelMetadataRefresh?.close();
|
|
@@ -3149,6 +3264,7 @@ export async function createExecutionRuntimeHostComposition(context, options = {
|
|
|
3149
3264
|
try {
|
|
3150
3265
|
await sessionEffects?.close();
|
|
3151
3266
|
await promptSuggestions?.close();
|
|
3267
|
+
await checkins?.close();
|
|
3152
3268
|
}
|
|
3153
3269
|
catch (closeError) {
|
|
3154
3270
|
errors.push(closeError);
|
|
@@ -215,6 +215,43 @@ export function createHostPromptSuggestionModel(input) {
|
|
|
215
215
|
return result.finishReason === 'length' ? undefined : result.text;
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
+
const CHECKIN_MAX_OUTPUT_TOKENS = 2_048;
|
|
219
|
+
const CHECKIN_REASONING_MAX_OUTPUT_TOKENS = 8_192;
|
|
220
|
+
/**
|
|
221
|
+
* Creates the root-scoped check-in call. It reads many Sessions, so it runs on
|
|
222
|
+
* the user's default model (resolved by the coordinator before any read)
|
|
223
|
+
* rather than borrowing any one Session's.
|
|
224
|
+
*/
|
|
225
|
+
export function createHostCheckinModel(input) {
|
|
226
|
+
const authority = createAuxiliaryModelCallAuthority(input);
|
|
227
|
+
return async ({ target, prompt, abortSignal, }) => {
|
|
228
|
+
try {
|
|
229
|
+
const callId = authority.newId();
|
|
230
|
+
const result = await runHostAuxiliaryModelCall(authority, {
|
|
231
|
+
transportContextId: callId,
|
|
232
|
+
header: target,
|
|
233
|
+
callKind: 'session_checkin',
|
|
234
|
+
callId: `session_checkin_${callId}`,
|
|
235
|
+
abortSignal,
|
|
236
|
+
reasoning: 'least',
|
|
237
|
+
buildRequest: (_target, thinkingLevel) => ({
|
|
238
|
+
prompt,
|
|
239
|
+
maxOutputTokens: thinkingLevel === 'off'
|
|
240
|
+
? CHECKIN_MAX_OUTPUT_TOKENS
|
|
241
|
+
: CHECKIN_REASONING_MAX_OUTPUT_TOKENS,
|
|
242
|
+
maxRetries: 0,
|
|
243
|
+
}),
|
|
244
|
+
});
|
|
245
|
+
return result.finishReason === 'length'
|
|
246
|
+
? { ok: false, errorClass: 'invalid_response' }
|
|
247
|
+
: { ok: true, text: result.text };
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
const errorClass = auxiliaryModelErrorClass(error, abortSignal);
|
|
251
|
+
return { ok: false, errorClass: errorClass === 'persistence' ? 'unknown' : errorClass };
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
}
|
|
218
255
|
/** Creates tool-free Session title and recap calls on canonical Host model authority. */
|
|
219
256
|
export function createHostSessionEffectModel(input) {
|
|
220
257
|
const authority = createAuxiliaryModelCallAuthority(input);
|
|
@@ -649,14 +686,21 @@ async function resolveDailyReviewHeader(runtimePolicy, modelKey) {
|
|
|
649
686
|
thinkingLevel: 'off',
|
|
650
687
|
};
|
|
651
688
|
}
|
|
689
|
+
const header = await resolveDefaultModelHeader(runtimePolicy);
|
|
690
|
+
if (!header) {
|
|
691
|
+
throw new AuxiliaryModelCallConfigurationError('Daily Review has no canonical default model target');
|
|
692
|
+
}
|
|
693
|
+
return header;
|
|
694
|
+
}
|
|
695
|
+
/** The connection and model the user chose as default, or undefined when none is set. */
|
|
696
|
+
export async function resolveDefaultModelHeader(runtimePolicy) {
|
|
652
697
|
const catalog = await runtimePolicy.connectionCatalog.getSnapshot();
|
|
653
698
|
const target = catalog.defaultTarget;
|
|
654
699
|
const connection = target
|
|
655
700
|
? catalog.connections.find((candidate) => candidate.connectionId === target.connectionId)
|
|
656
701
|
: undefined;
|
|
657
|
-
if (!target || !connection)
|
|
658
|
-
|
|
659
|
-
}
|
|
702
|
+
if (!target || !connection)
|
|
703
|
+
return undefined;
|
|
660
704
|
return {
|
|
661
705
|
llmConnectionId: connection.connectionId,
|
|
662
706
|
llmConnectionSlug: connection.slug,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
19
|
import { randomUUID } from 'node:crypto';
|
|
20
|
+
import { ASSISTANT_BACKGROUND_SESSION_LABEL } from '@maka/core/session';
|
|
20
21
|
import { createRunCompositionSnapshot } from '@maka/core/run-composition';
|
|
21
22
|
import { resolveModelVisionSupport } from '@maka/core/model-metadata';
|
|
22
23
|
import { modelOverride } from '@maka/core/model-thinking';
|
|
@@ -269,6 +270,16 @@ async function buildHostAiSdkBackend(input, target) {
|
|
|
269
270
|
contextBudget: buildDefaultContextBudgetPolicy({
|
|
270
271
|
name: 'runtime-host-default-history-budget',
|
|
271
272
|
modelId: target.model,
|
|
273
|
+
// The persistent Bot cannot depend on a provider rejecting its ever-growing
|
|
274
|
+
// history. Ordinary sessions retain their existing opt-in policy. The
|
|
275
|
+
// runtime gives an explicit user threshold precedence over this fallback.
|
|
276
|
+
...(input.context.header.labels?.includes(ASSISTANT_BACKGROUND_SESSION_LABEL) &&
|
|
277
|
+
input.context.header.labels.some((label) => label.startsWith('assistant-bot:')) &&
|
|
278
|
+
contextWindow !== undefined
|
|
279
|
+
? {
|
|
280
|
+
fallbackCompactionThresholdTokens: Math.floor(contextWindow * 0.8),
|
|
281
|
+
}
|
|
282
|
+
: {}),
|
|
272
283
|
}),
|
|
273
284
|
supportsVision: resolveModelVisionSupport(target.connection.providerType, target.connection.models, target.model, modelOverride(target.connection, target.model)?.vision),
|
|
274
285
|
readAttachmentBytes: createAttachmentByteReader({
|
|
@@ -31,6 +31,7 @@ export class HostExternalSessionCoordinator {
|
|
|
31
31
|
'external-session.import': (input) => this.importSession(input),
|
|
32
32
|
};
|
|
33
33
|
#adapters;
|
|
34
|
+
#artifacts;
|
|
34
35
|
#admission;
|
|
35
36
|
#sessions;
|
|
36
37
|
#workspaceResolver;
|
|
@@ -60,6 +61,7 @@ export class HostExternalSessionCoordinator {
|
|
|
60
61
|
#importsInFlight = new Map();
|
|
61
62
|
constructor(options) {
|
|
62
63
|
this.#adapters = options.adapters;
|
|
64
|
+
this.#artifacts = options.artifacts;
|
|
63
65
|
this.#admission = options.admission;
|
|
64
66
|
this.#sessions = options.sessions;
|
|
65
67
|
this.#workspaceResolver = options.workspaceResolver;
|
|
@@ -228,14 +230,15 @@ export class HostExternalSessionCoordinator {
|
|
|
228
230
|
}
|
|
229
231
|
let commitAttempted = false;
|
|
230
232
|
const importer = new ExternalSessionImporter(this.#adapters, {
|
|
231
|
-
createImportedSession: async (sessionInput, messages, externalOrigin) => {
|
|
233
|
+
createImportedSession: async (sessionInput, messages, externalOrigin, options) => {
|
|
232
234
|
return this.#sessions.createImportedSession(sessionInput, messages, externalOrigin, {
|
|
235
|
+
...options,
|
|
233
236
|
onCommitStarted: () => {
|
|
234
237
|
commitAttempted = true;
|
|
235
238
|
},
|
|
236
239
|
});
|
|
237
240
|
},
|
|
238
|
-
});
|
|
241
|
+
}, this.#artifacts);
|
|
239
242
|
let header;
|
|
240
243
|
try {
|
|
241
244
|
header = await importer.import({
|