maka-agent 0.2.0-dev.9.20260831 → 0.2.1-dev.82.20261014
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 +51 -21
- package/README.zh-CN.md +42 -22
- package/RUNTIME_HOST_PEER_DEPENDENCIES.rust.tsv +70 -0
- package/RUNTIME_HOST_PEER_THIRD_PARTY_NOTICES.txt +1839 -140
- package/THIRD_PARTY_NOTICES.txt +491 -272
- 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 +465 -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 +88 -102
- package/dist/cli-ui-locale.js +7 -2
- package/dist/fullscreen-mode.js +165 -0
- package/dist/mcp-capability-provider.js +22 -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 +96 -38
- package/dist/pi-tui-form-interaction.js +497 -0
- package/dist/pi-tui-layout.js +367 -24
- package/dist/pi-tui-mcp-status.js +194 -128
- package/dist/pi-tui-pickers.js +591 -103
- package/dist/pi-tui-runner.js +1591 -326
- 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 +316 -64
- package/dist/runtime-host-handoff-surface.js +108 -0
- package/dist/runtime-host-help.js +244 -0
- package/dist/runtime-host-installed-update-bootstrap.js +16 -1
- package/dist/runtime-host-installed-update-coordinator.js +33 -0
- package/dist/runtime-host-lifecycle-transaction.js +99 -28
- package/dist/runtime-host-local-handoff.js +48 -5
- package/dist/runtime-host-local-managed-activation.js +84 -0
- package/dist/runtime-host-local-source-retirement.js +19 -3
- 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 +20 -8
- 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 +206 -68
- 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 +70 -84
- 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-catalog-limits.js +22 -0
- package/dist/session-driver.js +10 -0
- package/dist/session-export-command.js +72 -0
- package/dist/session-import-command.js +69 -0
- package/dist/skill-highlight-editor.js +9 -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 +1266 -178
- 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-catalog.js +132 -0
- 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 +1096 -0
- package/node_modules/@maka/acp-executor-plugin/dist/plugin.mjs +25042 -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 -334
- package/node_modules/@maka/core/dist/archive-retention.js +109 -0
- package/node_modules/@maka/core/dist/artifacts.js +22 -20
- package/node_modules/@maka/core/dist/attachments.js +107 -1
- package/node_modules/@maka/core/dist/bot-chat-settings.js +8 -6
- package/node_modules/@maka/core/dist/bot-events.js +19 -71
- 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 +4 -32
- package/node_modules/@maka/core/dist/diagnostic-log.js +18 -7
- package/node_modules/@maka/core/dist/display-redaction.js +21 -2
- package/node_modules/@maka/core/dist/durable-tool-result-projection.js +3 -1
- package/node_modules/@maka/core/dist/event-wait.js +320 -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 +137 -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 +89 -98
- package/node_modules/@maka/core/dist/local-memory.js +40 -3
- 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 +195 -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 +50 -291
- package/node_modules/@maka/core/dist/provider-registry.js +246 -499
- package/node_modules/@maka/core/dist/provider-retirement.js +45 -0
- package/node_modules/@maka/core/dist/recall.js +1153 -0
- package/node_modules/@maka/core/dist/record-schema.js +22 -2
- package/node_modules/@maka/core/dist/redaction.js +130 -44
- package/node_modules/@maka/core/dist/refresh-read-coordinator.js +62 -0
- package/node_modules/@maka/core/dist/relative-time-policy.js +72 -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 +247 -10
- 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 +255 -78
- 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 +26 -17
- package/node_modules/@maka/core/dist/session-name.js +2 -2
- 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 +9 -2
- package/node_modules/@maka/core/dist/session.js +368 -57
- package/node_modules/@maka/core/dist/settings/network-settings.js +4 -1
- 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 +36 -6
- package/node_modules/@maka/core/dist/tool-activity-args.js +4 -0
- package/node_modules/@maka/core/dist/tool-ledger-scanner.js +250 -86
- package/node_modules/@maka/core/dist/tool-quiet-preview.js +56 -28
- 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/tool-result-status.js +12 -1
- 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 +31 -12
- 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 +39 -31
- package/node_modules/@maka/core/dist/usage-stats/types.js +3 -0
- package/node_modules/@maka/core/dist/web-search.js +3 -3
- 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 +36 -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 +63 -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/admission-limiter.js +3 -2
- package/node_modules/@maka/runtime/dist/agent-graph-supervisor-wake.js +145 -20
- 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 +614 -470
- package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +124 -3714
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction-contract.js +6 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +601 -535
- 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 +2687 -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 +21 -0
- package/node_modules/@maka/runtime/dist/bots/bot-test.js +40 -23
- package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +94 -27
- package/node_modules/@maka/runtime/dist/bots/discord-bridge.js +6 -6
- package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +32 -38
- package/node_modules/@maka/runtime/dist/bots/proxied-fetch.js +34 -5
- package/node_modules/@maka/runtime/dist/bots/qq-bridge.js +8 -6
- package/node_modules/@maka/runtime/dist/bots/slack-bridge.js +8 -7
- package/node_modules/@maka/runtime/dist/bots/telegram-bridge.js +13 -57
- package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +107 -50
- package/node_modules/@maka/runtime/dist/bots/wecom-bridge.js +49 -48
- 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-observation-text.js +22 -0
- package/node_modules/@maka/runtime/dist/computer-use-tools.js +252 -223
- 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 -102
- 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-agent-output.js +227 -0
- package/node_modules/@maka/runtime/dist/conversation-copy.js +849 -405
- 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 +46 -0
- package/node_modules/@maka/runtime/dist/edit-replace.js +16 -13
- package/node_modules/@maka/runtime/dist/execution-inspect.js +56 -41
- package/node_modules/@maka/runtime/dist/file-stable-write.js +15 -3
- 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/resource-resolver.js +3 -1
- 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 +103 -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 +406 -208
- 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 +512 -131
- 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 +29 -2
- package/node_modules/@maka/runtime/dist/network/scoped-fetch-transport.js +19 -3
- 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/owned-child-process.js +209 -0
- package/node_modules/@maka/runtime/dist/owned-process-main.js +183 -0
- package/node_modules/@maka/runtime/dist/pipe-process-driver.js +19 -25
- package/node_modules/@maka/runtime/dist/pipe-tail-collector.js +6 -9
- 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 +322 -0
- package/node_modules/@maka/runtime/dist/plugin-executor-backend.js +451 -0
- package/node_modules/@maka/runtime/dist/plugin-executor-service.js +592 -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 +214 -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 +252 -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 -63
- 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 -24
- package/node_modules/@maka/runtime/dist/runtime-continuation-admission.js +1 -1
- package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +115 -66
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +438 -234
- package/node_modules/@maka/runtime/dist/runtime-invocation-route.js +49 -0
- package/node_modules/@maka/runtime/dist/runtime-kernel.js +834 -360
- package/node_modules/@maka/runtime/dist/runtime-ledger-repair.js +235 -450
- package/node_modules/@maka/runtime/dist/runtime-read-model.js +113 -200
- package/node_modules/@maka/runtime/dist/runtime-resume.js +162 -126
- package/node_modules/@maka/runtime/dist/sandbox/linux-profile-path.js +7 -1
- package/node_modules/@maka/runtime/dist/sandbox/linux-sandbox.js +20 -5
- package/node_modules/@maka/runtime/dist/sandbox-boundary-tool.js +12 -0
- package/node_modules/@maka/runtime/dist/scheduled-task-tools.js +68 -9
- package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +56 -9
- package/node_modules/@maka/runtime/dist/session-export.js +179 -0
- package/node_modules/@maka/runtime/dist/session-import.js +100 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +1121 -908
- 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 +31 -31
- package/node_modules/@maka/runtime/dist/shell-exec.js +25 -45
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +83 -39
- package/node_modules/@maka/runtime/dist/shell-run-tool-result.js +19 -9
- package/node_modules/@maka/runtime/dist/shell-tools.js +83 -13
- package/node_modules/@maka/runtime/dist/skills-discovery.js +17 -23
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +454 -41
- package/node_modules/@maka/runtime/dist/stream-graph-handoff.js +6 -1
- package/node_modules/@maka/runtime/dist/stream-graph-projection.js +82 -15
- package/node_modules/@maka/runtime/dist/stream-graph-read-model.js +143 -20
- package/node_modules/@maka/runtime/dist/stream-graph-schedule-reconcile.js +210 -37
- 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 +37 -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 +154 -29
- package/node_modules/@maka/runtime/dist/tool-call-snapshot.js +142 -0
- 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 +407 -668
- 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.mjs +25572 -0
- 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 -21
- 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 +147 -157
- package/node_modules/@maka/runtime-host/dist/antigravity-program.js +49 -0
- package/node_modules/@maka/runtime-host/dist/candidate-cli.js +7 -7
- package/node_modules/@maka/runtime-host/dist/candidate-entry.js +27 -6
- package/node_modules/@maka/runtime-host/dist/candidate-startup-failure.js +5 -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 +191 -30
- package/node_modules/@maka/runtime-host/dist/client/connect-or-spawn.js +85 -24
- package/node_modules/@maka/runtime-host/dist/client/connection.js +189 -63
- package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +249 -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 +457 -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 +14 -10
- package/node_modules/@maka/runtime-host/dist/client/launcher.js +4 -1
- 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 +379 -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 +122 -19
- package/node_modules/@maka/runtime-host/dist/client/reconnecting-connection.js +23 -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 +22 -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 +6 -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 +16 -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 +889 -414
- package/node_modules/@maka/runtime-host/dist/peer-mesh/owner.js +33 -70
- package/node_modules/@maka/runtime-host/dist/peer-mesh/store.js +82 -69
- 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 +47 -9
- package/node_modules/@maka/runtime-host/dist/protocol/artifact-change.js +46 -0
- package/node_modules/@maka/runtime-host/dist/protocol/artifact.js +11 -20
- package/node_modules/@maka/runtime-host/dist/protocol/client-capability.js +279 -47
- 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 +53 -11
- 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 +315 -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 -124
- package/node_modules/@maka/runtime-host/dist/protocol/network-proxy.js +1 -7
- package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +48 -5
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +42 -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 +905 -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 +184 -15
- package/node_modules/@maka/runtime-host/dist/protocol/session-collaboration.js +68 -4
- package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +88 -47
- package/node_modules/@maka/runtime-host/dist/protocol/session-retirement.js +71 -8
- 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/storage-retention.js +144 -0
- package/node_modules/@maka/runtime-host/dist/protocol/storage-usage.js +155 -0
- package/node_modules/@maka/runtime-host/dist/protocol/turn-provider-retry.js +69 -0
- package/node_modules/@maka/runtime-host/dist/protocol/turn.js +55 -108
- package/node_modules/@maka/runtime-host/dist/protocol/usage-pricing.js +47 -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 +215 -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 +140 -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 +23 -3
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-execution-coordinator.js +1 -2
- package/node_modules/@maka/runtime-host/dist/server/archive-retention-coordinator.js +522 -0
- package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +22 -20
- 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 +48 -36
- 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 +39 -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 +636 -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 +44 -46
- 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 +47 -19
- package/node_modules/@maka/runtime-host/dist/server/connection-session.js +50 -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 +1575 -234
- 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 +214 -33
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +94 -67
- package/node_modules/@maka/runtime-host/dist/server/execution-service.js +54 -26
- 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 +193 -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 +34 -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 +154 -35
- package/node_modules/@maka/runtime-host/dist/server/host-maintenance-guards.js +95 -0
- 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-runner.js +13 -6
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +98 -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 +209 -68
- 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 +79 -4
- 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 +240 -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/plugin-scratch-directory.js +55 -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 +12 -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 +912 -225
- 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 +170 -44
- 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-background-activity.js +71 -0
- 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 +508 -65
- package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +493 -587
- package/node_modules/@maka/runtime-host/dist/server/session-effect-coordinator.js +13 -7
- package/node_modules/@maka/runtime-host/dist/server/session-interaction-activity.js +78 -0
- package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +282 -29
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +186 -199
- package/node_modules/@maka/runtime-host/dist/server/session-revision-graph-references.js +80 -87
- package/node_modules/@maka/runtime-host/dist/server/session-sidecar-purge.js +7 -3
- 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 +5 -1
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-coordinator.js +20 -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 +139 -0
- package/node_modules/@maka/runtime-host/dist/server/storage-usage-coordinator.js +67 -0
- package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +86 -32
- 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 +631 -50
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +680 -132
- package/node_modules/@maka/runtime-host/dist/server/workhub-inspection-tool.js +208 -0
- 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 +200 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-target-execution-authority.js +49 -0
- package/node_modules/@maka/runtime-host/dist/server/workhub-topic-gate.js +92 -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 +10 -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/archive-retention-store.js +124 -0
- package/node_modules/@maka/storage/dist/artifact-attachments.js +9 -12
- package/node_modules/@maka/storage/dist/artifact-metadata-codec.js +28 -31
- package/node_modules/@maka/storage/dist/artifact-store.js +256 -789
- package/node_modules/@maka/storage/dist/artifact-stores.js +2 -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 +15 -8
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +397 -0
- package/node_modules/@maka/storage/dist/context-offload-store.js +12 -3
- package/node_modules/@maka/storage/dist/context-value-mutation-gate.js +59 -0
- package/node_modules/@maka/storage/dist/conversation-operational-state.js +11 -0
- package/node_modules/@maka/storage/dist/credential-store.js +15 -63
- package/node_modules/@maka/storage/dist/event-wait-authority.js +141 -0
- 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 +293 -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-entry.js +142 -5
- package/node_modules/@maka/storage/dist/git-exec.js +61 -0
- package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +11 -36
- 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 +84 -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 +257 -32
- package/node_modules/@maka/storage/dist/model-call-usage-sql.js +174 -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 +52 -9
- 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 +1 -1
- package/node_modules/@maka/storage/dist/recall-fold.js +70 -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 +10 -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 +188 -123
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +352 -88
- 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 +28 -7
- package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +53 -24
- package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +12 -4
- package/node_modules/@maka/storage/dist/runtime-policy-stores.js +6 -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 +1094 -34
- 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 +364 -0
- package/node_modules/@maka/storage/dist/session-store.js +154 -438
- 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 +76 -12
- package/node_modules/@maka/storage/dist/sqlite-core-execution-schema.js +46 -2
- package/node_modules/@maka/storage/dist/sqlite-event-wait-authority.js +131 -0
- package/node_modules/@maka/storage/dist/sqlite-file-set.js +22 -0
- package/node_modules/@maka/storage/dist/sqlite-long-term-memory-store.js +87 -15
- package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +470 -1
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +1290 -372
- package/node_modules/@maka/storage/dist/sqlite-session-catalog-query.js +49 -5
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-schema.js +126 -5
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +907 -1116
- package/node_modules/@maka/storage/dist/sqlite-session-role-scope.js +3 -3
- package/node_modules/@maka/storage/dist/sqlite-usage-schema.js +295 -20
- package/node_modules/@maka/storage/dist/sqlite-usage-store.js +33 -6
- package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +24 -8
- package/node_modules/@maka/storage/dist/stable-storage.js +16 -2
- package/node_modules/@maka/storage/dist/storage-footprint.js +239 -0
- package/node_modules/@maka/storage/dist/storage-id.js +28 -0
- package/node_modules/@maka/storage/dist/storage-writer-composition.js +17 -10
- 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 +33 -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 +10 -5
- package/node_modules/@modelcontextprotocol/client/dist/index-D_CiY-T3.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-D_QDtbiv.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +474 -114
- 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 +468 -115
- 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 +7538 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-xKF0PJN-.mjs +7164 -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-Anm-lwWi.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs +1681 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/auth-D1CeV_Jr.cjs +2902 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core/dist/auth-V9XJSCfa.d.cts.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/axios/CHANGELOG.md +62 -0
- package/node_modules/axios/README.md +297 -5
- package/node_modules/axios/dist/axios.js +728 -170
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/browser/axios.cjs +871 -188
- package/node_modules/axios/dist/esm/axios.js +871 -188
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/node/axios.cjs +1037 -225
- package/node_modules/axios/lib/adapters/fetch.js +64 -11
- package/node_modules/axios/lib/adapters/http.js +140 -67
- package/node_modules/axios/lib/adapters/xhr.js +52 -3
- package/node_modules/axios/lib/core/Axios.js +43 -20
- package/node_modules/axios/lib/core/AxiosError.js +33 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +124 -1
- package/node_modules/axios/lib/core/InterceptorManager.js +107 -8
- package/node_modules/axios/lib/core/buildFullPath.js +41 -15
- package/node_modules/axios/lib/core/dispatchRequest.js +8 -2
- package/node_modules/axios/lib/core/mergeConfig.js +19 -4
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/defaults/index.js +2 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +12 -1
- package/node_modules/axios/lib/helpers/combineURLs.js +11 -3
- package/node_modules/axios/lib/helpers/composeSignals.js +12 -1
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +115 -54
- package/node_modules/axios/lib/helpers/formDataToJSON.js +11 -5
- package/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +5 -3
- package/node_modules/axios/lib/helpers/progressEventReducer.js +4 -4
- package/node_modules/axios/lib/helpers/resolveConfig.js +5 -17
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +300 -5
- package/node_modules/axios/lib/helpers/throttle.js +3 -2
- package/node_modules/axios/lib/helpers/toFormData.js +17 -23
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/utils.js +151 -18
- package/node_modules/axios/package.json +21 -19
- 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 +333 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.js +329 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +65 -0
- package/node_modules/fast-uri/index.js +221 -49
- 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/node-pty/lib/windowsPtyAgent.js +7 -0
- package/node_modules/node-pty/lib/windowsTerminal.js +11 -1
- 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 +5 -5
- 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 -669
- 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/task-ledger-tools.js +0 -244
- package/node_modules/@maka/runtime/dist/test-helpers.js +0 -61
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +0 -16973
- 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
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
* specific language governing permissions and limitations
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
|
+
import { SessionMetadataConflictError, SessionMetadataVersionConflictError, } from './session-store-contract.js';
|
|
20
|
+
export { SessionMetadataConflictError, SessionMetadataVersionConflictError, } from './session-store-contract.js';
|
|
19
21
|
import { createRequire } from 'node:module';
|
|
20
22
|
import { createHash } from 'node:crypto';
|
|
21
23
|
import { dirname, resolve } from 'node:path';
|
|
22
24
|
import { tmpdir } from 'node:os';
|
|
23
25
|
import { existsSync, mkdirSync } from 'node:fs';
|
|
24
26
|
import { isDeepStrictEqual } from 'node:util';
|
|
27
|
+
import { isCanonicalReadOnlyPermissionProfile } from '@maka/core/permission-profile';
|
|
25
28
|
import { AGENT_GRAPH_CLIENT_PROJECTION_SCHEMA_VERSION, AgentGraphClientProjectionConflictError, AgentGraphClientTerminalCursorError, } from '@maka/core/agent-graph-client-projection';
|
|
26
29
|
import { assessSandboxBoundaryExpansion, assertExecutionBoundaryCapacity, decodeExecutionBoundary, createGenesisExecutionBoundary, SANDBOX_BOUNDARY_CLOSURE_REASONS, SANDBOX_BOUNDARY_HOST_RESTART_CLOSURE_REASON, validateSandboxBoundaryExpansion, } from '@maka/core/sandbox-boundary';
|
|
27
30
|
import { AGENT_GRAPH_EPOCH_SCHEMA_VERSION, AgentGraphEpochConflictError, assertAdvanceAgentGraphEpochRequest, assertResolveAgentGraphEpochRequest, decodeAgentGraphEpochBinding, } from '@maka/core/agent-graph-epoch';
|
|
@@ -31,23 +34,33 @@ import { assertAgentGraphIntentClaimRequest, decodeAgentGraphIntentClaim, } from
|
|
|
31
34
|
import { isSubagentSessionParent, isSubagentSessionRuntime, isSubagentSessionSpawn, WORKHUB_COORDINATION_SESSION_ID, WORKHUB_COORDINATION_SESSION_ROLE, decodeCanonicalMessage, decodeStoredMessage as decodePersistedStoredMessage, } from '@maka/core/session';
|
|
32
35
|
import { markPersisted } from '@maka/core/persisted-value';
|
|
33
36
|
import { normalizePendingMessageAdmission, normalizeProvenRootMessageHandoff, normalizeProvenSteeringMessageHandoff, samePendingMessageAdmission, } from './message-admission-store.js';
|
|
37
|
+
import { rootTurnSourceMessagePayloadsEqual } from './agent-run-store-contract.js';
|
|
34
38
|
import { normalizeSubmittedTurnIntent } from './submitted-turn-intent.js';
|
|
35
39
|
import { messageContentDigest, messageContentsEqual, normalizeMessageContent, } from '@maka/core/events';
|
|
36
40
|
import { AGENT_GRAPH_SUPERVISOR_WAKE_SCHEMA_VERSION, } from '@maka/core/agent-graph-supervisor-wake';
|
|
37
|
-
import { assertSafeSessionId,
|
|
41
|
+
import { assertSafeSessionId, SessionNotFoundError, } from './session-store-contract.js';
|
|
42
|
+
import { decodePersistedSessionHeader, normalizeSessionHeader } from './session-store.js';
|
|
38
43
|
import { isDiscardableConversationCopy, isValidConversationCopyTransition, } from './session-conversation-copy.js';
|
|
39
|
-
import {
|
|
44
|
+
import { projectSessionCatalogMessages } from './session-message-projection.js';
|
|
40
45
|
import { configureSqliteSessionMetadataDatabase, migrateSqliteSessionMetadataDatabase, readSqliteSessionMetadataSchemaVersion, SQLITE_AGENT_GRAPH_CONTROL_TABLES, SQLITE_SESSION_MESSAGE_CHUNK_BYTES, SQLITE_SESSION_MESSAGE_CHUNK_MARKER, } from './sqlite-session-metadata-schema.js';
|
|
41
|
-
import {
|
|
46
|
+
import { assertFoldedSearchTerm, recallFoldedMatchClause, registerRecallFoldFunction, } from './recall-fold.js';
|
|
47
|
+
import { buildSqliteSessionCatalogPageQuery, sqliteArchivedTaskRowPredicate, } from './sqlite-session-catalog-query.js';
|
|
42
48
|
import { sqliteOrdinarySessionRolePredicate, sqliteRecoverableSessionRolePredicate, } from './sqlite-session-role-scope.js';
|
|
43
49
|
export { SQLITE_SESSION_METADATA_SCHEMA_VERSION } from './sqlite-session-metadata-schema.js';
|
|
44
50
|
const SQLITE_TRANSCRIPT_MESSAGE_LOOKUP_BATCH_SIZE = 256;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
51
|
+
// Each target Session binds three parameters in the linkage query. Stay well
|
|
52
|
+
// inside SQLite's bound-parameter limit.
|
|
53
|
+
const WORKHUB_TARGET_LINKAGE_MAX_SESSIONS = 256;
|
|
48
54
|
function decodeStoredMessage(value) {
|
|
49
55
|
return decodePersistedStoredMessage(markPersisted(value));
|
|
50
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Message types that carry user-visible content. Coordination records are
|
|
59
|
+
* excluded here so a candidate scan never reads them, matching the projection
|
|
60
|
+
* the recall predicate applies afterwards.
|
|
61
|
+
*/
|
|
62
|
+
const SEARCHABLE_MESSAGE_TYPES = ['user', 'assistant', 'tool_call', 'tool_result'];
|
|
63
|
+
const SEARCHABLE_MESSAGE_TYPE_PLACEHOLDERS = SEARCHABLE_MESSAGE_TYPES.map(() => '?').join(', ');
|
|
51
64
|
const require = createRequire(import.meta.url);
|
|
52
65
|
const AGENT_GRAPH_CONTROL_DELETE_TABLES = SQLITE_AGENT_GRAPH_CONTROL_TABLES.filter((table) => table !== 'agent_graph_epochs').reverse();
|
|
53
66
|
function loadSqliteModule() {
|
|
@@ -72,6 +85,7 @@ function decodeMessageAdmissionRow(sessionId, row) {
|
|
|
72
85
|
typeof row.run_id !== 'string' ||
|
|
73
86
|
typeof row.message_id !== 'string' ||
|
|
74
87
|
typeof row.content_json !== 'string' ||
|
|
88
|
+
typeof row.skill_invocation_json !== 'string' ||
|
|
75
89
|
typeof row.submitted_content_digest !== 'string' ||
|
|
76
90
|
(row.submitted_placement !== 'current_turn' && row.submitted_placement !== 'next_turn') ||
|
|
77
91
|
(row.placement !== 'current_turn' && row.placement !== 'next_turn') ||
|
|
@@ -95,6 +109,7 @@ function decodeMessageAdmissionRow(sessionId, row) {
|
|
|
95
109
|
...(typeof row.submitted_intent_json === 'string'
|
|
96
110
|
? { submittedIntent: normalizeSubmittedTurnIntent(JSON.parse(row.submitted_intent_json)) }
|
|
97
111
|
: {}),
|
|
112
|
+
skillInvocation: JSON.parse(row.skill_invocation_json),
|
|
98
113
|
admittedAt: row.admitted_at,
|
|
99
114
|
});
|
|
100
115
|
}
|
|
@@ -115,9 +130,6 @@ function uniqueVersionedSessionIdentities(sessions) {
|
|
|
115
130
|
}
|
|
116
131
|
return [...unique.values()].sort((left, right) => left.sessionId.localeCompare(right.sessionId));
|
|
117
132
|
}
|
|
118
|
-
export class SessionMetadataConflictError extends Error {
|
|
119
|
-
name = 'SessionMetadataConflictError';
|
|
120
|
-
}
|
|
121
133
|
export class StoredSessionMessageIncompatibleError extends Error {
|
|
122
134
|
sessionId;
|
|
123
135
|
sequence;
|
|
@@ -129,24 +141,9 @@ export class StoredSessionMessageIncompatibleError extends Error {
|
|
|
129
141
|
this.sequence = sequence;
|
|
130
142
|
}
|
|
131
143
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
actualVersion;
|
|
136
|
-
name = 'SessionMetadataVersionConflictError';
|
|
137
|
-
constructor(sessionId, expectedVersion, actualVersion) {
|
|
138
|
-
super(`Session metadata version conflict for ${sessionId}: expected ${expectedVersion}, found ${actualVersion}`);
|
|
139
|
-
this.sessionId = sessionId;
|
|
140
|
-
this.expectedVersion = expectedVersion;
|
|
141
|
-
this.actualVersion = actualVersion;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
export class AgentGraphIntentClaimConflictError extends SessionMetadataConflictError {
|
|
145
|
-
name = 'AgentGraphIntentClaimConflictError';
|
|
146
|
-
}
|
|
147
|
-
export class AgentGraphScheduleUpdateConflictError extends SessionMetadataConflictError {
|
|
148
|
-
name = 'AgentGraphScheduleUpdateConflictError';
|
|
149
|
-
}
|
|
144
|
+
import { AgentGraphIntentClaimConflictError, AgentGraphScheduleUpdateConflictError, } from './session-store-contract.js';
|
|
145
|
+
export { AgentGraphIntentClaimConflictError, AgentGraphScheduleUpdateConflictError, } from './session-store-contract.js';
|
|
146
|
+
import { assertGraphLookupIdentity, assertAgentGraphSupervisorWakeClaim, assertAgentGraphSupervisorWakeAttempt, assertAgentGraphSupervisorWakeCompletion, assertAgentGraphClientProjectionRequest, encodeProjectionPayload, assertGraphEventTime, assertGraphIntentId, } from './graph-control-values.js';
|
|
150
147
|
export function createSqliteSessionMetadataStore(path, options = {}) {
|
|
151
148
|
return new SqliteSessionMetadataStore(path, options);
|
|
152
149
|
}
|
|
@@ -165,6 +162,7 @@ export class SqliteSessionMetadataStore {
|
|
|
165
162
|
if (options.databaseLease) {
|
|
166
163
|
this.databaseLease = options.databaseLease;
|
|
167
164
|
this.db = options.databaseLease.database;
|
|
165
|
+
registerRecallFoldFunction(this.db);
|
|
168
166
|
this.now = options.now ?? Date.now;
|
|
169
167
|
return;
|
|
170
168
|
}
|
|
@@ -173,6 +171,7 @@ export class SqliteSessionMetadataStore {
|
|
|
173
171
|
try {
|
|
174
172
|
configureSqliteSessionMetadataDatabase(database);
|
|
175
173
|
migrateSqliteSessionMetadataDatabase(database);
|
|
174
|
+
registerRecallFoldFunction(database);
|
|
176
175
|
}
|
|
177
176
|
catch (error) {
|
|
178
177
|
database.close();
|
|
@@ -346,6 +345,32 @@ export class SqliteSessionMetadataStore {
|
|
|
346
345
|
return rows.map(decodeSandboxBoundaryRequestRow);
|
|
347
346
|
});
|
|
348
347
|
}
|
|
348
|
+
async hasExplicitSandboxBoundaryDenial(identities) {
|
|
349
|
+
this.assertOpen();
|
|
350
|
+
const query = this.db.prepare(`
|
|
351
|
+
SELECT
|
|
352
|
+
MAX(CASE WHEN outcome_reason = 'client_denied' THEN 1 ELSE 0 END) AS explicit,
|
|
353
|
+
MAX(CASE WHEN outcome_reason IN ('client_denied', 'turn_stopped', 'turn_terminal', 'host_restarted')
|
|
354
|
+
THEN 0 ELSE 1 END) AS ambiguous
|
|
355
|
+
FROM sandbox_boundary_log
|
|
356
|
+
WHERE session_id = ? AND run_id = ? AND turn_id = ?
|
|
357
|
+
AND entry_kind = 'expansion_request' AND status = 'denied'
|
|
358
|
+
`);
|
|
359
|
+
let denied = false;
|
|
360
|
+
for (const identity of identities) {
|
|
361
|
+
assertSafeSessionId(identity.sessionId);
|
|
362
|
+
assertSandboxBoundaryProvenanceId(identity.runId, 'run id');
|
|
363
|
+
assertSandboxBoundaryProvenanceId(identity.turnId, 'turn id');
|
|
364
|
+
const evidence = query.get(identity.sessionId, identity.runId, identity.turnId);
|
|
365
|
+
// Legacy NULL also meant internal cleanup. Do not invent a user decision
|
|
366
|
+
// or erase a possible denial; ambiguous provenance blocks this continuation.
|
|
367
|
+
if (evidence.ambiguous === 1) {
|
|
368
|
+
throw new Error('Historical sandbox denial cannot be attributed safely; start a new user Turn.');
|
|
369
|
+
}
|
|
370
|
+
denied ||= evidence.explicit === 1;
|
|
371
|
+
}
|
|
372
|
+
return denied;
|
|
373
|
+
}
|
|
349
374
|
async settleSandboxBoundaryRequest(input) {
|
|
350
375
|
this.assertOpen();
|
|
351
376
|
assertSafeSessionId(input.sessionId);
|
|
@@ -373,7 +398,7 @@ export class SqliteSessionMetadataStore {
|
|
|
373
398
|
sessionId: input.sessionId,
|
|
374
399
|
requestId: input.requestId,
|
|
375
400
|
status: 'denied',
|
|
376
|
-
|
|
401
|
+
outcomeReason: input.closureReason ?? 'client_denied',
|
|
377
402
|
settledAt,
|
|
378
403
|
});
|
|
379
404
|
return {
|
|
@@ -702,10 +727,12 @@ export class SqliteSessionMetadataStore {
|
|
|
702
727
|
throw new SessionNotFoundError(sessionId);
|
|
703
728
|
return record;
|
|
704
729
|
}
|
|
705
|
-
async readCatalogRecord(sessionId) {
|
|
730
|
+
async readCatalogRecord(sessionId, roleScope = 'ordinary') {
|
|
706
731
|
this.assertOpen();
|
|
707
732
|
assertSafeSessionId(sessionId);
|
|
708
|
-
const role =
|
|
733
|
+
const role = roleScope === 'recoverable'
|
|
734
|
+
? sqliteRecoverableSessionRolePredicate()
|
|
735
|
+
: sqliteOrdinarySessionRolePredicate();
|
|
709
736
|
const row = this.db
|
|
710
737
|
.prepare(`
|
|
711
738
|
SELECT
|
|
@@ -713,6 +740,7 @@ export class SqliteSessionMetadataStore {
|
|
|
713
740
|
metadata.payload_json,
|
|
714
741
|
metadata.metadata_version,
|
|
715
742
|
metadata.committed_at,
|
|
743
|
+
metadata.archived_at,
|
|
716
744
|
projection.activity_at,
|
|
717
745
|
projection.last_message_preview
|
|
718
746
|
FROM session_catalog_projection projection
|
|
@@ -780,6 +808,95 @@ export class SqliteSessionMetadataStore {
|
|
|
780
808
|
.all(sessionId);
|
|
781
809
|
return rows.map((row) => row.sessionId);
|
|
782
810
|
}
|
|
811
|
+
/**
|
|
812
|
+
* Archive-retention candidates, oldest archive first: the rows Settings ›
|
|
813
|
+
* Archived tasks shows (the catalog's own archived-row predicate), less
|
|
814
|
+
* Agent Graph operators, which retire only with their root, and less any
|
|
815
|
+
* family a pinned member keeps. A row that no longer decodes is returned as
|
|
816
|
+
* such, so a sweep can count it and move past it.
|
|
817
|
+
*/
|
|
818
|
+
async listArchiveRetentionCandidates(query) {
|
|
819
|
+
this.assertOpen();
|
|
820
|
+
if (!Number.isSafeInteger(query.limit) || query.limit < 1 || query.limit > 256) {
|
|
821
|
+
throw new Error('Archive retention candidate limit must be between 1 and 256');
|
|
822
|
+
}
|
|
823
|
+
const candidate = archiveRetentionCandidatePredicate();
|
|
824
|
+
const where = [candidate.sql];
|
|
825
|
+
const parameters = [...candidate.parameters];
|
|
826
|
+
if (query.archivedBefore !== undefined) {
|
|
827
|
+
where.push('(metadata.archived_at IS NULL OR metadata.archived_at < ?)');
|
|
828
|
+
parameters.push(query.archivedBefore);
|
|
829
|
+
}
|
|
830
|
+
if (query.after) {
|
|
831
|
+
assertSafeSessionId(query.after.sessionId);
|
|
832
|
+
where.push('(COALESCE(metadata.archived_at, -1), metadata.session_id) > (?, ?)');
|
|
833
|
+
parameters.push(query.after.archivedAt ?? -1, query.after.sessionId);
|
|
834
|
+
}
|
|
835
|
+
const rows = this.db
|
|
836
|
+
.prepare(`
|
|
837
|
+
SELECT
|
|
838
|
+
metadata.session_id,
|
|
839
|
+
metadata.payload_json,
|
|
840
|
+
metadata.metadata_version,
|
|
841
|
+
metadata.committed_at,
|
|
842
|
+
metadata.archived_at
|
|
843
|
+
FROM session_metadata metadata
|
|
844
|
+
JOIN session_catalog_projection projection
|
|
845
|
+
ON projection.session_id = metadata.session_id
|
|
846
|
+
WHERE ${where.join(' AND ')}
|
|
847
|
+
ORDER BY COALESCE(metadata.archived_at, -1), metadata.session_id
|
|
848
|
+
LIMIT ?
|
|
849
|
+
`)
|
|
850
|
+
.all(...parameters, query.limit);
|
|
851
|
+
return rows.map((row) => {
|
|
852
|
+
const position = typeof row.archived_at === 'number' ? { archivedAt: row.archived_at } : {};
|
|
853
|
+
try {
|
|
854
|
+
const archivedAt = decodeCatalogArchivedAt(row.archived_at, row.session_id);
|
|
855
|
+
return { ...decodeRecord(row), ...(archivedAt === undefined ? {} : { archivedAt }) };
|
|
856
|
+
}
|
|
857
|
+
catch {
|
|
858
|
+
return { undecodable: true, sessionId: row.session_id, ...position };
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* How many families `listArchiveRetentionCandidates` would offer, and the
|
|
864
|
+
* earliest clock start among them under a policy enabled at `enabledAt`: a
|
|
865
|
+
* family starts when its most recently archived member did, and never before
|
|
866
|
+
* enablement.
|
|
867
|
+
*/
|
|
868
|
+
async countArchiveRetentionCandidates(enabledAt) {
|
|
869
|
+
this.assertOpen();
|
|
870
|
+
const candidate = archiveRetentionCandidatePredicate();
|
|
871
|
+
const row = this.db
|
|
872
|
+
.prepare(`
|
|
873
|
+
SELECT COUNT(*) AS families, MIN(start) AS first_start
|
|
874
|
+
FROM (
|
|
875
|
+
SELECT MAX(MAX(COALESCE(metadata.archived_at, ?), ?)) AS start
|
|
876
|
+
FROM session_metadata metadata
|
|
877
|
+
JOIN session_catalog_projection projection
|
|
878
|
+
ON projection.session_id = metadata.session_id
|
|
879
|
+
WHERE ${candidate.sql}
|
|
880
|
+
GROUP BY COALESCE(metadata.revision_root_session_id, metadata.session_id)
|
|
881
|
+
)
|
|
882
|
+
`)
|
|
883
|
+
.get(enabledAt, enabledAt, ...candidate.parameters);
|
|
884
|
+
return {
|
|
885
|
+
families: row.families,
|
|
886
|
+
...(typeof row.first_start === 'number' ? { firstStart: row.first_start } : {}),
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
async readLatestSessionMetadataTime() {
|
|
890
|
+
this.assertOpen();
|
|
891
|
+
const row = this.db
|
|
892
|
+
.prepare(`
|
|
893
|
+
SELECT MAX(committed_at) AS committed_at, MAX(archived_at) AS archived_at
|
|
894
|
+
FROM session_metadata
|
|
895
|
+
`)
|
|
896
|
+
.get();
|
|
897
|
+
const times = [row?.committed_at, row?.archived_at].filter((value) => typeof value === 'number' && Number.isFinite(value));
|
|
898
|
+
return times.length === 0 ? undefined : Math.max(...times);
|
|
899
|
+
}
|
|
783
900
|
async reconcileOrphanedAgentGraphRetirements() {
|
|
784
901
|
this.assertOpen();
|
|
785
902
|
return this.transaction(() => {
|
|
@@ -903,6 +1020,10 @@ export class SqliteSessionMetadataStore {
|
|
|
903
1020
|
.run(sessionId);
|
|
904
1021
|
});
|
|
905
1022
|
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Session records in catalog order, each carrying the projection the Session
|
|
1025
|
+
* list shows.
|
|
1026
|
+
*/
|
|
906
1027
|
async list(filter, roleScope) {
|
|
907
1028
|
this.assertOpen();
|
|
908
1029
|
const { where, parameters } = buildSessionListPredicate(filter ?? {});
|
|
@@ -918,17 +1039,22 @@ export class SqliteSessionMetadataStore {
|
|
|
918
1039
|
}
|
|
919
1040
|
const rows = this.db
|
|
920
1041
|
.prepare(`
|
|
921
|
-
SELECT
|
|
1042
|
+
SELECT
|
|
1043
|
+
metadata.session_id,
|
|
1044
|
+
metadata.payload_json,
|
|
1045
|
+
metadata.metadata_version,
|
|
1046
|
+
metadata.committed_at,
|
|
1047
|
+
metadata.archived_at,
|
|
1048
|
+
COALESCE(projection.activity_at, 0) AS activity_at,
|
|
1049
|
+
projection.last_message_preview
|
|
922
1050
|
FROM session_metadata metadata
|
|
1051
|
+
LEFT JOIN session_catalog_projection projection
|
|
1052
|
+
ON projection.session_id = metadata.session_id
|
|
923
1053
|
${where.length > 0 ? `WHERE ${where.join(' AND ')}` : ''}
|
|
924
|
-
ORDER BY
|
|
925
|
-
SELECT activity_at
|
|
926
|
-
FROM session_catalog_projection projection
|
|
927
|
-
WHERE projection.session_id = metadata.session_id
|
|
928
|
-
) DESC, session_id ASC
|
|
1054
|
+
ORDER BY activity_at DESC, metadata.session_id ASC
|
|
929
1055
|
`)
|
|
930
1056
|
.all(...parameters);
|
|
931
|
-
return rows.map(
|
|
1057
|
+
return rows.map(decodeCatalogRecord);
|
|
932
1058
|
}
|
|
933
1059
|
async listCatalogPage(filter, cursor, limit) {
|
|
934
1060
|
this.assertOpen();
|
|
@@ -1114,7 +1240,7 @@ export class SqliteSessionMetadataStore {
|
|
|
1114
1240
|
.prepare(`
|
|
1115
1241
|
SELECT turn_id, run_id, message_id, content_json, submitted_content_digest,
|
|
1116
1242
|
submitted_placement, placement, disposition, queue_order, admitted_at,
|
|
1117
|
-
submitted_intent_json
|
|
1243
|
+
submitted_intent_json, skill_invocation_json
|
|
1118
1244
|
FROM message_admissions
|
|
1119
1245
|
WHERE session_id = ? AND message_id = ?
|
|
1120
1246
|
`)
|
|
@@ -1143,14 +1269,20 @@ export class SqliteSessionMetadataStore {
|
|
|
1143
1269
|
INSERT INTO message_admissions(
|
|
1144
1270
|
session_id, turn_id, run_id, message_id, content_json, submitted_content_digest,
|
|
1145
1271
|
submitted_placement, placement, disposition, queue_order, admitted_at,
|
|
1146
|
-
submitted_intent_json
|
|
1147
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
1272
|
+
submitted_intent_json, skill_invocation_json
|
|
1273
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
1148
1274
|
`)
|
|
1149
|
-
.run(stored.sessionId, stored.turnId, stored.runId, stored.messageId, JSON.stringify(stored.content), stored.submittedContentDigest, stored.submittedPlacement, stored.placement, stored.disposition, orderRow.next_order, stored.admittedAt, stored.submittedIntent ? JSON.stringify(stored.submittedIntent) : null);
|
|
1275
|
+
.run(stored.sessionId, stored.turnId, stored.runId, stored.messageId, JSON.stringify(stored.content), stored.submittedContentDigest, stored.submittedPlacement, stored.placement, stored.disposition, orderRow.next_order, stored.admittedAt, stored.submittedIntent ? JSON.stringify(stored.submittedIntent) : null, JSON.stringify(stored.skillInvocation));
|
|
1150
1276
|
}
|
|
1151
1277
|
async assignWorkHubMessage(request) {
|
|
1152
1278
|
const assignmentJson = JSON.stringify(request.assignment);
|
|
1153
1279
|
const assignment = decodeCanonicalMessage(JSON.parse(assignmentJson));
|
|
1280
|
+
const supersessionJson = request.supersession
|
|
1281
|
+
? JSON.stringify(request.supersession)
|
|
1282
|
+
: undefined;
|
|
1283
|
+
const supersession = supersessionJson
|
|
1284
|
+
? decodeCanonicalMessage(JSON.parse(supersessionJson))
|
|
1285
|
+
: undefined;
|
|
1154
1286
|
const admission = normalizePendingMessageAdmission(request.admission);
|
|
1155
1287
|
const suffix = createHash('sha256')
|
|
1156
1288
|
.update(request.assignment.actionId)
|
|
@@ -1164,13 +1296,37 @@ export class SqliteSessionMetadataStore {
|
|
|
1164
1296
|
assignment.id !== `wha_${suffix}` ||
|
|
1165
1297
|
assignment.targetMessageId !== `whm_${suffix}` ||
|
|
1166
1298
|
assignment.delegationId !== `whd_${suffix}` ||
|
|
1167
|
-
!
|
|
1299
|
+
!workHubAssignmentAttachmentsMatchTarget(assignment) ||
|
|
1300
|
+
!messageContentsEqual(admission.content, normalizeMessageContent({
|
|
1301
|
+
text: assignment.delegationText ?? assignment.userText,
|
|
1302
|
+
...(assignment.targetAttachments ? { attachments: assignment.targetAttachments } : {}),
|
|
1303
|
+
})) ||
|
|
1168
1304
|
admission.submittedContentDigest !== messageContentDigest(admission.content) ||
|
|
1169
1305
|
admission.submittedPlacement !== 'current_turn' ||
|
|
1170
1306
|
admission.placement !== 'current_turn' ||
|
|
1171
1307
|
admission.disposition !== 'steering') {
|
|
1172
1308
|
throw new SessionMetadataConflictError('Invalid WorkHub assignment identity');
|
|
1173
1309
|
}
|
|
1310
|
+
if ((assignment.replacesActionId === undefined) !==
|
|
1311
|
+
(assignment.replacesDelegationId === undefined) ||
|
|
1312
|
+
(assignment.replacesDelegationId === undefined) !== (supersession === undefined) ||
|
|
1313
|
+
(supersession !== undefined &&
|
|
1314
|
+
(supersession.type !== 'workhub_coordination' ||
|
|
1315
|
+
supersession.kind !== 'delegation_superseded' ||
|
|
1316
|
+
supersession.actionId !== assignment.actionId ||
|
|
1317
|
+
supersession.actionFingerprint !== assignment.actionFingerprint ||
|
|
1318
|
+
supersession.coordinationTurnId !== assignment.coordinationTurnId ||
|
|
1319
|
+
supersession.turnId !== assignment.coordinationTurnId ||
|
|
1320
|
+
supersession.supersededActionId !== assignment.replacesActionId ||
|
|
1321
|
+
supersession.supersededDelegationId !== assignment.replacesDelegationId ||
|
|
1322
|
+
supersession.replacementDelegationId !== assignment.delegationId ||
|
|
1323
|
+
supersession.id !==
|
|
1324
|
+
`whx_${createHash('sha256')
|
|
1325
|
+
.update(supersession.supersededDelegationId)
|
|
1326
|
+
.digest('hex')
|
|
1327
|
+
.slice(0, 48)}`))) {
|
|
1328
|
+
throw new SessionMetadataConflictError('Invalid WorkHub supersession identity');
|
|
1329
|
+
}
|
|
1174
1330
|
const create = request.create
|
|
1175
1331
|
? {
|
|
1176
1332
|
header: normalizeSessionHeader(request.create.header),
|
|
@@ -1207,6 +1363,39 @@ export class SqliteSessionMetadataStore {
|
|
|
1207
1363
|
assignment: existingAssignment,
|
|
1208
1364
|
};
|
|
1209
1365
|
}
|
|
1366
|
+
if (supersession && assignment.replacesActionId && assignment.replacesDelegationId) {
|
|
1367
|
+
const replacedSuffix = createHash('sha256')
|
|
1368
|
+
.update(assignment.replacesActionId)
|
|
1369
|
+
.digest('hex')
|
|
1370
|
+
.slice(0, 48);
|
|
1371
|
+
const replaced = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `wha_${replacedSuffix}`);
|
|
1372
|
+
if (replaced?.type !== 'workhub_coordination' ||
|
|
1373
|
+
replaced.kind !== 'delegation_assigned' ||
|
|
1374
|
+
replaced.delegationId !== assignment.replacesDelegationId) {
|
|
1375
|
+
throw new SessionMetadataConflictError('WorkHub supersession source is unavailable');
|
|
1376
|
+
}
|
|
1377
|
+
const abortSuffix = createHash('sha256')
|
|
1378
|
+
.update(assignment.replacesDelegationId)
|
|
1379
|
+
.digest('hex')
|
|
1380
|
+
.slice(0, 48);
|
|
1381
|
+
const stopRequest = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `whq_${abortSuffix}`);
|
|
1382
|
+
if (stopRequest) {
|
|
1383
|
+
const stopResolution = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `whz_${abortSuffix}`);
|
|
1384
|
+
if (stopResolution?.type !== 'workhub_coordination' ||
|
|
1385
|
+
stopResolution.kind !== 'delegation_stop_resolved' ||
|
|
1386
|
+
stopResolution.outcome !== 'not_owned') {
|
|
1387
|
+
throw new SessionMetadataConflictError('WorkHub delegation already has a stop claim');
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
const existingAbort = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `whb_${abortSuffix}`);
|
|
1391
|
+
if (existingAbort) {
|
|
1392
|
+
throw new SessionMetadataConflictError('WorkHub delegation replacement is aborted');
|
|
1393
|
+
}
|
|
1394
|
+
const existingSupersession = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, supersession.id);
|
|
1395
|
+
if (existingSupersession) {
|
|
1396
|
+
throw new SessionMetadataConflictError('WorkHub delegation is already superseded');
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1210
1399
|
let targetCreated = false;
|
|
1211
1400
|
if (create) {
|
|
1212
1401
|
const probe = this.probeStableSessionCreateSync(create.header.id, create.requestFingerprint);
|
|
@@ -1232,8 +1421,19 @@ export class SqliteSessionMetadataStore {
|
|
|
1232
1421
|
if (target.header.status === 'waiting_for_user') {
|
|
1233
1422
|
throw new SessionMetadataConflictError('WorkHub target Session is waiting for user input');
|
|
1234
1423
|
}
|
|
1424
|
+
let committedAssignment = assignment;
|
|
1425
|
+
let committedAssignmentJson = assignmentJson;
|
|
1235
1426
|
if (target.header.name !== assignment.targetSessionName) {
|
|
1236
|
-
|
|
1427
|
+
if (assignment.disposition !== 'delegate_existing' ||
|
|
1428
|
+
assignment.replacesDelegationId === undefined) {
|
|
1429
|
+
throw new SessionMetadataConflictError('WorkHub target display identity changed');
|
|
1430
|
+
}
|
|
1431
|
+
// A durable replacement owns the target Session id before retiring the
|
|
1432
|
+
// source. Canonicalize its display-only name at the same transaction
|
|
1433
|
+
// boundary that validates the target so a concurrent rename cannot
|
|
1434
|
+
// strand the already-retired delegation.
|
|
1435
|
+
committedAssignment = { ...assignment, targetSessionName: target.header.name };
|
|
1436
|
+
committedAssignmentJson = JSON.stringify(committedAssignment);
|
|
1237
1437
|
}
|
|
1238
1438
|
if (this.readMessageAdmissionSync(admission.sessionId, admission.messageId)) {
|
|
1239
1439
|
throw new SessionMetadataConflictError('WorkHub target Message identity belongs to another admission');
|
|
@@ -1247,9 +1447,14 @@ export class SqliteSessionMetadataStore {
|
|
|
1247
1447
|
sequenceRow.last_sequence < -1) {
|
|
1248
1448
|
throw new SessionMetadataConflictError('Invalid WorkHub transcript sequence');
|
|
1249
1449
|
}
|
|
1250
|
-
this.insertSessionMessagesSync(WORKHUB_COORDINATION_SESSION_ID, sequenceRow.last_sequence + 1, [
|
|
1450
|
+
this.insertSessionMessagesSync(WORKHUB_COORDINATION_SESSION_ID, sequenceRow.last_sequence + 1, [
|
|
1451
|
+
{ message: committedAssignment, json: committedAssignmentJson },
|
|
1452
|
+
...(supersession && supersessionJson
|
|
1453
|
+
? [{ message: supersession, json: supersessionJson }]
|
|
1454
|
+
: []),
|
|
1455
|
+
]);
|
|
1251
1456
|
this.updateCatalogProjectionSync(WORKHUB_COORDINATION_SESSION_ID, request.projection, false);
|
|
1252
|
-
return { kind: 'assigned', targetCreated, assignment };
|
|
1457
|
+
return { kind: 'assigned', targetCreated, assignment: committedAssignment };
|
|
1253
1458
|
});
|
|
1254
1459
|
}
|
|
1255
1460
|
async readMessageAdmission(sessionId, messageId) {
|
|
@@ -1261,7 +1466,7 @@ export class SqliteSessionMetadataStore {
|
|
|
1261
1466
|
.prepare(`
|
|
1262
1467
|
SELECT turn_id, run_id, message_id, content_json, submitted_content_digest,
|
|
1263
1468
|
submitted_placement, placement, disposition, queue_order, admitted_at,
|
|
1264
|
-
submitted_intent_json
|
|
1469
|
+
submitted_intent_json, skill_invocation_json
|
|
1265
1470
|
FROM message_admissions
|
|
1266
1471
|
WHERE session_id = ? AND message_id = ?
|
|
1267
1472
|
`)
|
|
@@ -1280,6 +1485,106 @@ export class SqliteSessionMetadataStore {
|
|
|
1280
1485
|
return row !== undefined;
|
|
1281
1486
|
});
|
|
1282
1487
|
}
|
|
1488
|
+
/**
|
|
1489
|
+
* Binds one WorkHub action identity to one exact operation, for good.
|
|
1490
|
+
*
|
|
1491
|
+
* Every other durable WorkHub record is keyed by what it is about, so none of
|
|
1492
|
+
* them can see an action id that moved to a second delegation or a second
|
|
1493
|
+
* disposition. This row is the global owner that rejects both, and it is
|
|
1494
|
+
* written before the action's effect so a rejected or recovering attempt can
|
|
1495
|
+
* never leak its identity into a different operation.
|
|
1496
|
+
*/
|
|
1497
|
+
async claimWorkHubAction(claim) {
|
|
1498
|
+
this.assertOpen();
|
|
1499
|
+
assertSafeSessionId(claim.actionId);
|
|
1500
|
+
assertSafeSessionId(claim.subject);
|
|
1501
|
+
if (!/^sha256:[a-f0-9]{64}$/u.test(claim.actionFingerprint)) {
|
|
1502
|
+
throw new SessionMetadataConflictError('Invalid WorkHub action fingerprint');
|
|
1503
|
+
}
|
|
1504
|
+
return this.transaction(() => {
|
|
1505
|
+
const existing = this.readWorkHubActionClaimSync(claim.actionId);
|
|
1506
|
+
if (existing) {
|
|
1507
|
+
return existing.operation === claim.operation &&
|
|
1508
|
+
existing.actionFingerprint === claim.actionFingerprint &&
|
|
1509
|
+
existing.subject === claim.subject
|
|
1510
|
+
? 'same_claim'
|
|
1511
|
+
: 'conflict';
|
|
1512
|
+
}
|
|
1513
|
+
this.db
|
|
1514
|
+
.prepare(`
|
|
1515
|
+
INSERT INTO workhub_action_claims(
|
|
1516
|
+
action_id, operation, action_fingerprint, subject, claimed_at
|
|
1517
|
+
) VALUES (?, ?, ?, ?, ?)
|
|
1518
|
+
`)
|
|
1519
|
+
.run(claim.actionId, claim.operation, claim.actionFingerprint, claim.subject, this.now());
|
|
1520
|
+
return 'claimed';
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
async readWorkHubActionClaim(actionId) {
|
|
1524
|
+
this.assertOpen();
|
|
1525
|
+
assertSafeSessionId(actionId);
|
|
1526
|
+
return this.readTransaction(() => this.readWorkHubActionClaimSync(actionId));
|
|
1527
|
+
}
|
|
1528
|
+
readWorkHubActionClaimSync(actionId) {
|
|
1529
|
+
const row = this.db
|
|
1530
|
+
.prepare('SELECT operation, action_fingerprint, subject FROM workhub_action_claims WHERE action_id = ?')
|
|
1531
|
+
.get(actionId);
|
|
1532
|
+
if (!row)
|
|
1533
|
+
return undefined;
|
|
1534
|
+
if (!isWorkHubActionOperation(row.operation) ||
|
|
1535
|
+
typeof row.action_fingerprint !== 'string' ||
|
|
1536
|
+
!/^sha256:[a-f0-9]{64}$/u.test(row.action_fingerprint) ||
|
|
1537
|
+
typeof row.subject !== 'string') {
|
|
1538
|
+
throw new SessionMetadataConflictError('Invalid WorkHub action claim row');
|
|
1539
|
+
}
|
|
1540
|
+
return {
|
|
1541
|
+
actionId,
|
|
1542
|
+
operation: row.operation,
|
|
1543
|
+
actionFingerprint: row.action_fingerprint,
|
|
1544
|
+
subject: row.subject,
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
async claimMessageAdmissionCancellation(sessionId, messageId, claimId) {
|
|
1548
|
+
this.assertOpen();
|
|
1549
|
+
assertSafeSessionId(sessionId);
|
|
1550
|
+
assertSafeSessionId(messageId);
|
|
1551
|
+
assertSafeSessionId(claimId);
|
|
1552
|
+
return this.transaction(() => {
|
|
1553
|
+
const cancelled = this.db
|
|
1554
|
+
.prepare('SELECT cancellation_claim_id FROM cancelled_message_admissions WHERE session_id = ? AND message_id = ?')
|
|
1555
|
+
.get(sessionId, messageId);
|
|
1556
|
+
if (cancelled) {
|
|
1557
|
+
return cancelled.cancellation_claim_id === claimId ? 'same_claim' : 'already_cancelled';
|
|
1558
|
+
}
|
|
1559
|
+
const admission = this.db
|
|
1560
|
+
.prepare(`
|
|
1561
|
+
SELECT submitted_content_digest, submitted_placement
|
|
1562
|
+
FROM message_admissions
|
|
1563
|
+
WHERE session_id = ? AND message_id = ?
|
|
1564
|
+
`)
|
|
1565
|
+
.get(sessionId, messageId);
|
|
1566
|
+
if (typeof admission?.submitted_content_digest !== 'string' ||
|
|
1567
|
+
(admission.submitted_placement !== 'current_turn' &&
|
|
1568
|
+
admission.submitted_placement !== 'next_turn')) {
|
|
1569
|
+
throw new SessionMetadataConflictError('Message admission cancellation identity conflict');
|
|
1570
|
+
}
|
|
1571
|
+
this.db
|
|
1572
|
+
.prepare(`
|
|
1573
|
+
INSERT INTO cancelled_message_admissions(
|
|
1574
|
+
session_id, message_id, submitted_content_digest, submitted_placement,
|
|
1575
|
+
cancellation_claim_id
|
|
1576
|
+
) VALUES (?, ?, ?, ?, ?)
|
|
1577
|
+
`)
|
|
1578
|
+
.run(sessionId, messageId, admission.submitted_content_digest, admission.submitted_placement, claimId);
|
|
1579
|
+
const deleted = this.db
|
|
1580
|
+
.prepare('DELETE FROM message_admissions WHERE session_id = ? AND message_id = ?')
|
|
1581
|
+
.run(sessionId, messageId);
|
|
1582
|
+
if (deleted.changes !== 1) {
|
|
1583
|
+
throw new SessionMetadataConflictError('Message admission cancellation identity conflict');
|
|
1584
|
+
}
|
|
1585
|
+
return 'cancelled_by_claim';
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1283
1588
|
async listMessageAdmissions(sessionId) {
|
|
1284
1589
|
this.assertOpen();
|
|
1285
1590
|
assertSafeSessionId(sessionId);
|
|
@@ -1288,7 +1593,7 @@ export class SqliteSessionMetadataStore {
|
|
|
1288
1593
|
.prepare(`
|
|
1289
1594
|
SELECT turn_id, run_id, message_id, content_json, submitted_content_digest,
|
|
1290
1595
|
submitted_placement, placement, disposition, queue_order, admitted_at,
|
|
1291
|
-
submitted_intent_json
|
|
1596
|
+
submitted_intent_json, skill_invocation_json
|
|
1292
1597
|
FROM message_admissions
|
|
1293
1598
|
WHERE session_id = ?
|
|
1294
1599
|
ORDER BY queue_order, sequence
|
|
@@ -1297,6 +1602,111 @@ export class SqliteSessionMetadataStore {
|
|
|
1297
1602
|
return rows.map((row) => decodeMessageAdmissionRow(sessionId, row));
|
|
1298
1603
|
});
|
|
1299
1604
|
}
|
|
1605
|
+
async readActiveWorkHubAssignmentsByTarget(targetSessionIds, maxAssignmentsPerTarget, includeStopped) {
|
|
1606
|
+
this.assertOpen();
|
|
1607
|
+
for (const sessionId of targetSessionIds)
|
|
1608
|
+
assertSafeSessionId(sessionId);
|
|
1609
|
+
if (targetSessionIds.length > WORKHUB_TARGET_LINKAGE_MAX_SESSIONS) {
|
|
1610
|
+
throw new Error('Invalid WorkHub target Session count');
|
|
1611
|
+
}
|
|
1612
|
+
if (maxAssignmentsPerTarget !== undefined &&
|
|
1613
|
+
(!Number.isSafeInteger(maxAssignmentsPerTarget) ||
|
|
1614
|
+
maxAssignmentsPerTarget < 1 ||
|
|
1615
|
+
maxAssignmentsPerTarget > 256)) {
|
|
1616
|
+
throw new Error('Invalid WorkHub target Message limit');
|
|
1617
|
+
}
|
|
1618
|
+
const targets = [...new Set(targetSessionIds)];
|
|
1619
|
+
if (targets.length === 0)
|
|
1620
|
+
return [];
|
|
1621
|
+
return this.readTransaction(() => {
|
|
1622
|
+
const list = targets.map(() => '?').join(', ');
|
|
1623
|
+
// One Message moves between these lifecycle tables — pending, admitted
|
|
1624
|
+
// into a Turn, cancelled. Combine every target's identities once, then
|
|
1625
|
+
// resolve activity from the canonical Coordination ledger in this same
|
|
1626
|
+
// read transaction. That avoids rebuilding the target set once per page
|
|
1627
|
+
// or once per candidate, without introducing another durable
|
|
1628
|
+
// representation.
|
|
1629
|
+
const rows = this.db
|
|
1630
|
+
.prepare(`
|
|
1631
|
+
WITH target_messages(session_id, message_id) AS (
|
|
1632
|
+
SELECT session_id, message_id
|
|
1633
|
+
FROM message_admissions
|
|
1634
|
+
WHERE session_id IN (${list})
|
|
1635
|
+
AND message_id GLOB 'whm_*'
|
|
1636
|
+
AND length(message_id) = 52
|
|
1637
|
+
UNION
|
|
1638
|
+
SELECT session_id, message_id
|
|
1639
|
+
FROM core_root_source_message_proofs
|
|
1640
|
+
WHERE session_id IN (${list})
|
|
1641
|
+
AND message_id GLOB 'whm_*'
|
|
1642
|
+
AND length(message_id) = 52
|
|
1643
|
+
UNION
|
|
1644
|
+
SELECT session_id, message_id
|
|
1645
|
+
FROM cancelled_message_admissions
|
|
1646
|
+
WHERE session_id IN (${list})
|
|
1647
|
+
AND message_id GLOB 'whm_*'
|
|
1648
|
+
AND length(message_id) = 52
|
|
1649
|
+
)
|
|
1650
|
+
SELECT target.session_id, target.message_id
|
|
1651
|
+
FROM target_messages AS target
|
|
1652
|
+
CROSS JOIN session_messages AS assignment INDEXED BY session_messages_by_identity
|
|
1653
|
+
WHERE assignment.session_id = ?
|
|
1654
|
+
AND assignment.message_id = 'wha_' || substr(target.message_id, 5)
|
|
1655
|
+
ORDER BY assignment.sequence DESC
|
|
1656
|
+
`)
|
|
1657
|
+
.iterate(...targets, ...targets, ...targets, WORKHUB_COORDINATION_SESSION_ID);
|
|
1658
|
+
const assignments = [];
|
|
1659
|
+
const acceptedPerTarget = new Map();
|
|
1660
|
+
for (const row of rows) {
|
|
1661
|
+
if (typeof row.message_id !== 'string' || typeof row.session_id !== 'string') {
|
|
1662
|
+
throw new SessionMetadataConflictError('Invalid WorkHub target Message identity');
|
|
1663
|
+
}
|
|
1664
|
+
const targetSessionId = row.session_id;
|
|
1665
|
+
if (maxAssignmentsPerTarget !== undefined &&
|
|
1666
|
+
(acceptedPerTarget.get(targetSessionId) ?? 0) >= maxAssignmentsPerTarget) {
|
|
1667
|
+
continue;
|
|
1668
|
+
}
|
|
1669
|
+
const assignment = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `wha_${row.message_id.slice('whm_'.length)}`);
|
|
1670
|
+
if (assignment?.type !== 'workhub_coordination' ||
|
|
1671
|
+
assignment.kind !== 'delegation_assigned' ||
|
|
1672
|
+
assignment.targetSessionId !== targetSessionId ||
|
|
1673
|
+
assignment.targetMessageId !== row.message_id) {
|
|
1674
|
+
continue;
|
|
1675
|
+
}
|
|
1676
|
+
const terminalSuffix = createHash('sha256')
|
|
1677
|
+
.update(assignment.delegationId, 'utf8')
|
|
1678
|
+
.digest('hex')
|
|
1679
|
+
.slice(0, 48);
|
|
1680
|
+
const supersession = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `whx_${terminalSuffix}`);
|
|
1681
|
+
if (supersession?.type === 'workhub_coordination' &&
|
|
1682
|
+
supersession.kind === 'delegation_superseded') {
|
|
1683
|
+
continue;
|
|
1684
|
+
}
|
|
1685
|
+
const replacementAbort = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `whb_${terminalSuffix}`);
|
|
1686
|
+
if (replacementAbort?.type === 'workhub_coordination' &&
|
|
1687
|
+
replacementAbort.kind === 'delegation_replacement_aborted') {
|
|
1688
|
+
continue;
|
|
1689
|
+
}
|
|
1690
|
+
const stopResolution = this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `whzt_${terminalSuffix}`) ??
|
|
1691
|
+
this.readMessageByIdSync(WORKHUB_COORDINATION_SESSION_ID, `whz_${terminalSuffix}`);
|
|
1692
|
+
if (!includeStopped &&
|
|
1693
|
+
stopResolution?.type === 'workhub_coordination' &&
|
|
1694
|
+
stopResolution.kind === 'delegation_stop_resolved' &&
|
|
1695
|
+
stopResolution.outcome !== 'not_owned') {
|
|
1696
|
+
continue;
|
|
1697
|
+
}
|
|
1698
|
+
assignments.push(assignment);
|
|
1699
|
+
acceptedPerTarget.set(targetSessionId, (acceptedPerTarget.get(targetSessionId) ?? 0) + 1);
|
|
1700
|
+
}
|
|
1701
|
+
return assignments;
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
async readMessageById(sessionId, messageId) {
|
|
1705
|
+
this.assertOpen();
|
|
1706
|
+
assertSafeSessionId(sessionId);
|
|
1707
|
+
assertSafeSessionId(messageId);
|
|
1708
|
+
return this.readTransaction(() => this.readMessageByIdSync(sessionId, messageId));
|
|
1709
|
+
}
|
|
1300
1710
|
async markMessagesHandedOff(input) {
|
|
1301
1711
|
this.assertOpen();
|
|
1302
1712
|
assertSafeSessionId(input.sessionId);
|
|
@@ -1331,19 +1741,6 @@ export class SqliteSessionMetadataStore {
|
|
|
1331
1741
|
provenSteeringMessages.set(normalized.messageId, normalized);
|
|
1332
1742
|
}
|
|
1333
1743
|
this.transaction(() => {
|
|
1334
|
-
const lastSequenceRow = this.db
|
|
1335
|
-
.prepare('SELECT COALESCE(MAX(sequence), -1) AS last_sequence FROM session_messages WHERE session_id = ?')
|
|
1336
|
-
.get(input.sessionId);
|
|
1337
|
-
if (typeof lastSequenceRow.last_sequence !== 'number' ||
|
|
1338
|
-
!Number.isSafeInteger(lastSequenceRow.last_sequence) ||
|
|
1339
|
-
lastSequenceRow.last_sequence < -1) {
|
|
1340
|
-
throw new SessionMetadataConflictError('Invalid Session message sequence');
|
|
1341
|
-
}
|
|
1342
|
-
const lastSequence = lastSequenceRow.last_sequence;
|
|
1343
|
-
const historicalMissingMessages = new Map();
|
|
1344
|
-
const ordinaryMissingMessages = new Map();
|
|
1345
|
-
const historicalMessageIdSet = new Set();
|
|
1346
|
-
const existingSequences = new Map();
|
|
1347
1744
|
for (const messageId of unique) {
|
|
1348
1745
|
const fallback = provenRootMessages.get(messageId);
|
|
1349
1746
|
const steeringProof = provenSteeringMessages.get(messageId);
|
|
@@ -1351,7 +1748,7 @@ export class SqliteSessionMetadataStore {
|
|
|
1351
1748
|
.prepare(`
|
|
1352
1749
|
SELECT turn_id, run_id, message_id, content_json, submitted_content_digest,
|
|
1353
1750
|
submitted_placement, placement, disposition, queue_order, admitted_at,
|
|
1354
|
-
submitted_intent_json
|
|
1751
|
+
submitted_intent_json, skill_invocation_json
|
|
1355
1752
|
FROM message_admissions
|
|
1356
1753
|
WHERE session_id = ? AND message_id = ?
|
|
1357
1754
|
`)
|
|
@@ -1366,83 +1763,35 @@ export class SqliteSessionMetadataStore {
|
|
|
1366
1763
|
admission.runId === steeringProof.admissionRunId &&
|
|
1367
1764
|
admission.admittedAt === steeringProof.admittedAt &&
|
|
1368
1765
|
messageContentsEqual(admission.content, steeringProof.content);
|
|
1766
|
+
// Root admission commits before this mutable queue projection is retired. A crash
|
|
1767
|
+
// between those writes can therefore leave the same Message looking like steering
|
|
1768
|
+
// for its predecessor even though the successor Root already owns it.
|
|
1769
|
+
const provenSuccessorRootHandoff = admission !== undefined &&
|
|
1770
|
+
fallback !== undefined &&
|
|
1771
|
+
rootTurnSourceMessagePayloadsEqual(admission, fallback);
|
|
1369
1772
|
if (admission !== undefined && steeringProof !== undefined && !provenCrossTurnSteering) {
|
|
1370
1773
|
throw new SessionMetadataConflictError('Proven steering admission identity conflict');
|
|
1371
1774
|
}
|
|
1775
|
+
if (admission !== undefined &&
|
|
1776
|
+
fallback !== undefined &&
|
|
1777
|
+
!rootTurnSourceMessagePayloadsEqual(admission, fallback)) {
|
|
1778
|
+
throw new SessionMetadataConflictError('Message admission fallback payload conflict');
|
|
1779
|
+
}
|
|
1372
1780
|
if (admission !== undefined &&
|
|
1373
1781
|
admission.turnId !== input.turnId &&
|
|
1374
1782
|
admission.disposition !== 'followup' &&
|
|
1375
|
-
!provenCrossTurnSteering
|
|
1783
|
+
!provenCrossTurnSteering &&
|
|
1784
|
+
!provenSuccessorRootHandoff) {
|
|
1376
1785
|
throw new SessionMetadataConflictError('Message admission Turn conflict');
|
|
1377
1786
|
}
|
|
1378
|
-
if (admission !== undefined &&
|
|
1379
|
-
fallback !== undefined &&
|
|
1380
|
-
!messageContentsEqual(admission.content, fallback.content)) {
|
|
1381
|
-
throw new SessionMetadataConflictError('Message admission fallback content conflict');
|
|
1382
|
-
}
|
|
1383
|
-
if (admission === undefined && fallback !== undefined) {
|
|
1384
|
-
historicalMessageIdSet.add(messageId);
|
|
1385
|
-
}
|
|
1386
1787
|
if (!admission &&
|
|
1387
1788
|
this.db
|
|
1388
1789
|
.prepare('SELECT 1 AS present FROM cancelled_message_admissions WHERE session_id = ? AND message_id = ?')
|
|
1389
1790
|
.get(input.sessionId, messageId)) {
|
|
1390
1791
|
throw new SessionMetadataConflictError('Message admission is already cancelled');
|
|
1391
1792
|
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
SELECT message.sequence, message.record_json, payload.record_bytes, payload.sha256
|
|
1395
|
-
FROM session_messages AS message
|
|
1396
|
-
LEFT JOIN session_message_payloads AS payload
|
|
1397
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
1398
|
-
WHERE message.session_id = ? AND message.message_id = ?
|
|
1399
|
-
`)
|
|
1400
|
-
.all(input.sessionId, messageId);
|
|
1401
|
-
if (rows.length > 1) {
|
|
1402
|
-
throw new SessionMetadataConflictError('Message admission transcript identity is ambiguous');
|
|
1403
|
-
}
|
|
1404
|
-
if (rows.length === 0) {
|
|
1405
|
-
const source = admission ?? fallback;
|
|
1406
|
-
if (!source)
|
|
1407
|
-
throw new SessionMetadataConflictError('Message admission does not exist');
|
|
1408
|
-
const message = decodeCanonicalMessage({
|
|
1409
|
-
type: 'user',
|
|
1410
|
-
id: messageId,
|
|
1411
|
-
turnId: input.turnId,
|
|
1412
|
-
ts: steeringProof?.eventTs ?? source.admittedAt,
|
|
1413
|
-
...source.content,
|
|
1414
|
-
steeringEventId: steeringProof?.eventId ?? messageId,
|
|
1415
|
-
});
|
|
1416
|
-
const json = JSON.stringify(message);
|
|
1417
|
-
(historicalMessageIdSet.has(messageId)
|
|
1418
|
-
? historicalMissingMessages
|
|
1419
|
-
: ordinaryMissingMessages).set(messageId, { message, json });
|
|
1420
|
-
}
|
|
1421
|
-
else {
|
|
1422
|
-
const sequence = rows[0]?.sequence;
|
|
1423
|
-
if (typeof sequence !== 'number' || !Number.isSafeInteger(sequence)) {
|
|
1424
|
-
throw new SessionMetadataConflictError('Invalid Message transcript sequence');
|
|
1425
|
-
}
|
|
1426
|
-
const row = rows[0];
|
|
1427
|
-
const recordJson = readStoredMessageRecordJson(this.db, input.sessionId, sequence, row);
|
|
1428
|
-
const message = decodeStoredMessage(JSON.parse(recordJson));
|
|
1429
|
-
const expectedSource = admission ?? fallback ?? steeringProof;
|
|
1430
|
-
if (message.type !== 'user' ||
|
|
1431
|
-
message.id !== messageId ||
|
|
1432
|
-
(expectedSource !== undefined &&
|
|
1433
|
-
!messageContentsEqual(normalizeMessageContent(message), expectedSource.content))) {
|
|
1434
|
-
throw new SessionMetadataConflictError('Message admission transcript identity conflict');
|
|
1435
|
-
}
|
|
1436
|
-
if (message.turnId !== input.turnId) {
|
|
1437
|
-
throw new SessionMetadataConflictError('Message admission transcript Turn conflict');
|
|
1438
|
-
}
|
|
1439
|
-
if (steeringProof !== undefined &&
|
|
1440
|
-
(message.ts !== steeringProof.eventTs ||
|
|
1441
|
-
message.turnId !== steeringProof.executionTurnId ||
|
|
1442
|
-
message.steeringEventId !== steeringProof.eventId)) {
|
|
1443
|
-
throw new SessionMetadataConflictError('Proven steering transcript identity conflict');
|
|
1444
|
-
}
|
|
1445
|
-
existingSequences.set(messageId, sequence);
|
|
1793
|
+
if (admission === undefined && fallback === undefined && steeringProof === undefined) {
|
|
1794
|
+
throw new SessionMetadataConflictError('Message admission does not exist');
|
|
1446
1795
|
}
|
|
1447
1796
|
if (admission) {
|
|
1448
1797
|
const deleted = this.db
|
|
@@ -1453,94 +1802,21 @@ export class SqliteSessionMetadataStore {
|
|
|
1453
1802
|
}
|
|
1454
1803
|
}
|
|
1455
1804
|
}
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
throw new SessionMetadataConflictError('Message admission transcript source order conflict');
|
|
1472
|
-
}
|
|
1473
|
-
previousExistingSequence = sequence;
|
|
1474
|
-
}
|
|
1475
|
-
const insertionGroups = [];
|
|
1476
|
-
let pending = [];
|
|
1477
|
-
let previousAnchor = -1;
|
|
1478
|
-
for (const messageId of historicalMessageIds) {
|
|
1479
|
-
const missing = historicalMissingMessages.get(messageId);
|
|
1480
|
-
if (missing) {
|
|
1481
|
-
pending.push(missing);
|
|
1482
|
-
continue;
|
|
1483
|
-
}
|
|
1484
|
-
const boundary = existingSequences.get(messageId);
|
|
1485
|
-
if (pending.length > 0 && boundary !== undefined) {
|
|
1486
|
-
const admittedAt = Math.min(...pending.map(({ message }) => message.ts));
|
|
1487
|
-
const earlierBoundary = transcript.find(({ sequence, message }) => sequence > previousAnchor &&
|
|
1488
|
-
sequence < boundary &&
|
|
1489
|
-
!historicalMessageIdSet.has(message.id) &&
|
|
1490
|
-
(message.turnId === input.turnId || message.ts >= admittedAt));
|
|
1491
|
-
if (earlierBoundary) {
|
|
1492
|
-
throw new SessionMetadataConflictError('Message admission transcript source order conflict');
|
|
1493
|
-
}
|
|
1494
|
-
insertionGroups.push({ boundary, entries: pending });
|
|
1495
|
-
pending = [];
|
|
1496
|
-
}
|
|
1497
|
-
if (boundary !== undefined)
|
|
1498
|
-
previousAnchor = boundary;
|
|
1499
|
-
}
|
|
1500
|
-
if (pending.length > 0) {
|
|
1501
|
-
const admittedAt = Math.min(...pending.map(({ message }) => message.ts));
|
|
1502
|
-
const repairBoundary = transcript.find(({ sequence, message }) => sequence > previousAnchor &&
|
|
1503
|
-
!historicalMessageIdSet.has(message.id) &&
|
|
1504
|
-
(message.turnId === input.turnId || message.ts >= admittedAt))?.sequence;
|
|
1505
|
-
insertionGroups.push({
|
|
1506
|
-
boundary: repairBoundary ?? lastSequence + 1,
|
|
1507
|
-
entries: pending,
|
|
1508
|
-
});
|
|
1509
|
-
}
|
|
1510
|
-
for (const group of insertionGroups.reverse()) {
|
|
1511
|
-
this.shiftSessionMessageSuffixSync(input.sessionId, group.boundary, group.entries.length);
|
|
1512
|
-
this.insertSessionMessagesSync(input.sessionId, group.boundary, group.entries);
|
|
1513
|
-
if (group.boundary === lastSequence + 1) {
|
|
1514
|
-
tailLatest = group.entries.at(-1)?.message;
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
if (ordinaryMissingMessages.size > 0) {
|
|
1519
|
-
const ordinaryEntries = unique.flatMap((messageId) => {
|
|
1520
|
-
const entry = ordinaryMissingMessages.get(messageId);
|
|
1521
|
-
return entry ? [entry] : [];
|
|
1522
|
-
});
|
|
1523
|
-
const currentLastSequenceRow = this.db
|
|
1524
|
-
.prepare('SELECT COALESCE(MAX(sequence), -1) AS last_sequence FROM session_messages WHERE session_id = ?')
|
|
1525
|
-
.get(input.sessionId);
|
|
1526
|
-
const currentLastSequence = currentLastSequenceRow.last_sequence;
|
|
1527
|
-
if (typeof currentLastSequence !== 'number' ||
|
|
1528
|
-
!Number.isSafeInteger(currentLastSequence) ||
|
|
1529
|
-
currentLastSequence < -1) {
|
|
1530
|
-
throw new SessionMetadataConflictError('Invalid Session message sequence');
|
|
1531
|
-
}
|
|
1532
|
-
this.insertSessionMessagesSync(input.sessionId, currentLastSequence + 1, ordinaryEntries);
|
|
1533
|
-
tailLatest = ordinaryEntries.at(-1)?.message;
|
|
1534
|
-
}
|
|
1535
|
-
if (tailLatest?.type === 'user') {
|
|
1536
|
-
this.updateCatalogProjectionSync(input.sessionId, {
|
|
1537
|
-
lastMessageAt: tailLatest.ts,
|
|
1538
|
-
lastMessagePreview: catalogPreviewForUserMessage(tailLatest),
|
|
1539
|
-
}, false, true);
|
|
1540
|
-
}
|
|
1541
|
-
else if (historicalMissingMessages.size > 0 || ordinaryMissingMessages.size > 0) {
|
|
1542
|
-
this.updateCatalogProjectionSync(input.sessionId, {}, false, true);
|
|
1543
|
-
}
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
/**
|
|
1808
|
+
* The catalog facts a durable message carries, committed without a transcript
|
|
1809
|
+
* row to carry them: the Session list's preview line, its time, and the
|
|
1810
|
+
* connection lock a Session takes on its first user message.
|
|
1811
|
+
*/
|
|
1812
|
+
async commitMessageCatalogProjection(sessionId, message) {
|
|
1813
|
+
this.assertOpen();
|
|
1814
|
+
assertSafeSessionId(sessionId);
|
|
1815
|
+
this.transaction(() => {
|
|
1816
|
+
const record = this.readRecordSync(sessionId);
|
|
1817
|
+
if (!record)
|
|
1818
|
+
throw new SessionNotFoundError(sessionId);
|
|
1819
|
+
this.updateCatalogProjectionSync(sessionId, projectSessionCatalogMessages([message]), false, message.type === 'user' && !record.header.connectionLocked);
|
|
1544
1820
|
});
|
|
1545
1821
|
}
|
|
1546
1822
|
async updateMessageAdmission(admission) {
|
|
@@ -1551,7 +1827,7 @@ export class SqliteSessionMetadataStore {
|
|
|
1551
1827
|
.prepare(`
|
|
1552
1828
|
SELECT turn_id, run_id, message_id, content_json, submitted_content_digest,
|
|
1553
1829
|
submitted_placement, placement, disposition, queue_order, admitted_at,
|
|
1554
|
-
submitted_intent_json
|
|
1830
|
+
submitted_intent_json, skill_invocation_json
|
|
1555
1831
|
FROM message_admissions
|
|
1556
1832
|
WHERE session_id = ? AND message_id = ?
|
|
1557
1833
|
`)
|
|
@@ -1568,10 +1844,11 @@ export class SqliteSessionMetadataStore {
|
|
|
1568
1844
|
this.db
|
|
1569
1845
|
.prepare(`
|
|
1570
1846
|
UPDATE message_admissions
|
|
1571
|
-
SET content_json = ?, submitted_content_digest = ?, placement = ?, disposition =
|
|
1847
|
+
SET content_json = ?, submitted_content_digest = ?, placement = ?, disposition = ?,
|
|
1848
|
+
skill_invocation_json = ?
|
|
1572
1849
|
WHERE session_id = ? AND message_id = ?
|
|
1573
1850
|
`)
|
|
1574
|
-
.run(JSON.stringify(stored.content), stored.submittedContentDigest, stored.placement, stored.disposition, stored.sessionId, stored.messageId);
|
|
1851
|
+
.run(JSON.stringify(stored.content), stored.submittedContentDigest, stored.placement, stored.disposition, JSON.stringify(stored.skillInvocation), stored.sessionId, stored.messageId);
|
|
1575
1852
|
});
|
|
1576
1853
|
}
|
|
1577
1854
|
async cancelMessageAdmissions(sessionId, messageIds) {
|
|
@@ -1619,7 +1896,7 @@ export class SqliteSessionMetadataStore {
|
|
|
1619
1896
|
}
|
|
1620
1897
|
});
|
|
1621
1898
|
}
|
|
1622
|
-
async reorderMessageAdmissions(sessionId, messageIds) {
|
|
1899
|
+
async reorderMessageAdmissions(sessionId, messageIds, disposition = 'followup') {
|
|
1623
1900
|
this.assertOpen();
|
|
1624
1901
|
assertSafeSessionId(sessionId);
|
|
1625
1902
|
const unique = [...new Set(messageIds)];
|
|
@@ -1633,13 +1910,13 @@ export class SqliteSessionMetadataStore {
|
|
|
1633
1910
|
.prepare(`
|
|
1634
1911
|
SELECT message_id
|
|
1635
1912
|
FROM message_admissions
|
|
1636
|
-
WHERE session_id = ? AND disposition =
|
|
1913
|
+
WHERE session_id = ? AND disposition = ?
|
|
1637
1914
|
ORDER BY queue_order, sequence
|
|
1638
1915
|
`)
|
|
1639
|
-
.all(sessionId);
|
|
1916
|
+
.all(sessionId, disposition);
|
|
1640
1917
|
const current = rows.map((row) => row.message_id);
|
|
1641
1918
|
const currentIds = new Set(current);
|
|
1642
|
-
if (current.length !== unique.length ||
|
|
1919
|
+
if ((disposition === 'followup' && current.length !== unique.length) ||
|
|
1643
1920
|
unique.some((messageId) => !currentIds.has(messageId))) {
|
|
1644
1921
|
throw new SessionMetadataConflictError('Message admission reorder identity conflict');
|
|
1645
1922
|
}
|
|
@@ -1648,576 +1925,333 @@ export class SqliteSessionMetadataStore {
|
|
|
1648
1925
|
SET queue_order = ?
|
|
1649
1926
|
WHERE session_id = ? AND message_id = ?
|
|
1650
1927
|
`);
|
|
1651
|
-
|
|
1928
|
+
// Older steering may already be in flight. Keep those entries in their
|
|
1929
|
+
// slots so recovery never interleaves them with a newly reordered batch.
|
|
1930
|
+
const selected = new Set(unique);
|
|
1931
|
+
let next = 0;
|
|
1932
|
+
current.forEach((messageId, index) => {
|
|
1933
|
+
const orderedId = selected.has(messageId) ? unique[next++] : messageId;
|
|
1934
|
+
update.run(index, sessionId, orderedId);
|
|
1935
|
+
});
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
async readCoordinationTranscriptIndexState() {
|
|
1939
|
+
this.assertOpen();
|
|
1940
|
+
return this.db
|
|
1941
|
+
.prepare(`SELECT (SELECT MAX(sequence) FROM coordination_transcript_index) AS highWater,
|
|
1942
|
+
(SELECT MAX(source_sequence) FROM coordination_transcript_index WHERE source = 'legacy') AS legacy,
|
|
1943
|
+
(SELECT MAX(source_sequence) FROM coordination_transcript_index WHERE source = 'runtime') AS runtime`)
|
|
1944
|
+
.get();
|
|
1945
|
+
}
|
|
1946
|
+
async appendCoordinationTranscriptIndex(records) {
|
|
1947
|
+
this.assertOpen();
|
|
1948
|
+
if (records.length > 64)
|
|
1949
|
+
throw new Error('Coordination transcript index batch exceeds limit');
|
|
1950
|
+
this.transaction(() => {
|
|
1951
|
+
let sequence = this.db
|
|
1952
|
+
.prepare('SELECT MAX(sequence) AS value FROM coordination_transcript_index')
|
|
1953
|
+
.get().value ?? -1;
|
|
1954
|
+
const insert = this.db.prepare(`INSERT INTO coordination_transcript_index
|
|
1955
|
+
(sequence, source, source_sequence) VALUES (?, ?, ?)
|
|
1956
|
+
ON CONFLICT(source, source_sequence) DO NOTHING`);
|
|
1957
|
+
for (const record of records) {
|
|
1958
|
+
if (!Number.isSafeInteger(record.sourceSequence) || record.sourceSequence < 0)
|
|
1959
|
+
throw new Error('Invalid Coordination source sequence');
|
|
1960
|
+
const result = insert.run(sequence + 1, record.source, record.sourceSequence);
|
|
1961
|
+
if (result.changes)
|
|
1962
|
+
sequence++;
|
|
1963
|
+
}
|
|
1652
1964
|
});
|
|
1653
1965
|
}
|
|
1966
|
+
async readCoordinationTranscriptIndex(request) {
|
|
1967
|
+
this.assertOpen();
|
|
1968
|
+
if (!Number.isSafeInteger(request.limit) || request.limit < 1 || request.limit > 64)
|
|
1969
|
+
throw new Error('Invalid Coordination transcript index limit');
|
|
1970
|
+
const older = request.direction === 'older';
|
|
1971
|
+
return this.db
|
|
1972
|
+
.prepare(`SELECT sequence, source, source_sequence AS sourceSequence
|
|
1973
|
+
FROM coordination_transcript_index WHERE sequence <= ? AND sequence ${older ? '<=' : '>='} ?
|
|
1974
|
+
ORDER BY sequence ${older ? 'DESC' : 'ASC'} LIMIT ?`)
|
|
1975
|
+
.all(request.throughSequence, request.position, request.limit);
|
|
1976
|
+
}
|
|
1654
1977
|
async readMessages(sessionId) {
|
|
1655
1978
|
return this.readMessagesWith(sessionId, decodeStoredMessage);
|
|
1656
1979
|
}
|
|
1657
|
-
|
|
1980
|
+
/**
|
|
1981
|
+
* Narrows recall to the pre-ledger Sessions whose transcript rows contain
|
|
1982
|
+
* one of the folded terms. The answer is a superset of the true matches,
|
|
1983
|
+
* never an answer: the caller projects each candidate Session and re-runs the
|
|
1984
|
+
* real predicate on the projected, redacted text.
|
|
1985
|
+
*
|
|
1986
|
+
* Only Sessions the ledger does not yet own are scanned here. A Session with
|
|
1987
|
+
* `transcriptLedgerVersion` 1 is projected from `runtime_events`, and its
|
|
1988
|
+
* rows in these tables are a frozen copy of what the conversion read, so the
|
|
1989
|
+
* ledger scan already covers it. Sessions still awaiting conversion, and
|
|
1990
|
+
* imports still being prepared, keep their transcript here.
|
|
1991
|
+
*
|
|
1992
|
+
* Folding is ASCII `lower()` in SQL plus an unconditional match on every
|
|
1993
|
+
* record that fold cannot reproduce — see `recall-fold.ts`. Terms must arrive
|
|
1994
|
+
* folded; a raw term is rejected rather than quietly mismatched.
|
|
1995
|
+
*
|
|
1996
|
+
* Two scans rather than one condition, because the two storage forms need
|
|
1997
|
+
* different reads. An inline record is matched directly; a record above the
|
|
1998
|
+
* chunk threshold keeps only a marker in `record_json` and has to be
|
|
1999
|
+
* reassembled from its chunks first. SQLite concatenates chunk blobs
|
|
2000
|
+
* byte-wise, which restores characters a chunk boundary split in half.
|
|
2001
|
+
*
|
|
2002
|
+
* Returns `undefined` when a chunked record cannot be reassembled, which
|
|
2003
|
+
* declines the fast path rather than answering with fewer candidates.
|
|
2004
|
+
*/
|
|
2005
|
+
async listLegacyTranscriptCandidateSessions(sessionIds, terms) {
|
|
1658
2006
|
this.assertOpen();
|
|
1659
|
-
|
|
1660
|
-
|
|
2007
|
+
if (sessionIds.length === 0 || terms.length === 0)
|
|
2008
|
+
return [];
|
|
2009
|
+
for (const sessionId of sessionIds)
|
|
2010
|
+
assertSafeSessionId(sessionId);
|
|
2011
|
+
for (const term of terms)
|
|
2012
|
+
assertFoldedSearchTerm(term);
|
|
2013
|
+
const sessions = sessionIds.map(() => '?').join(', ');
|
|
2014
|
+
const inlineMatch = recallFoldedMatchClause('message.record_json', terms.length);
|
|
2015
|
+
const chunkedMatch = recallFoldedMatchClause('chunked.body', terms.length);
|
|
1661
2016
|
return this.readTransaction(() => {
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
const
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
2017
|
+
// A payload row whose chunks do not reassemble to the bytes it recorded
|
|
2018
|
+
// would be matched on a body shorter than the record, which is the one
|
|
2019
|
+
// way this scan could return less than a superset: the term could sit in
|
|
2020
|
+
// the part that is missing. A short body is as unusable as no body at
|
|
2021
|
+
// all, so both decline the fast path rather than quietly answering with
|
|
2022
|
+
// fewer candidates.
|
|
2023
|
+
const unreadable = this.db
|
|
2024
|
+
.prepare(`
|
|
2025
|
+
SELECT count(*) AS total
|
|
2026
|
+
FROM session_message_payloads AS payload
|
|
2027
|
+
WHERE payload.session_id IN (${sessions})
|
|
2028
|
+
AND COALESCE(
|
|
2029
|
+
octet_length((SELECT group_concat(CAST(chunk.data AS TEXT), '' ORDER BY chunk.chunk_index)
|
|
2030
|
+
FROM session_message_chunks AS chunk
|
|
2031
|
+
WHERE chunk.session_id = payload.session_id
|
|
2032
|
+
AND chunk.sequence = payload.sequence)),
|
|
2033
|
+
-1
|
|
2034
|
+
) <> payload.record_bytes
|
|
2035
|
+
`)
|
|
2036
|
+
.get(...sessionIds);
|
|
2037
|
+
if (typeof unreadable?.total === 'number' && unreadable.total > 0)
|
|
2038
|
+
return undefined;
|
|
1683
2039
|
const rows = this.db
|
|
1684
2040
|
.prepare(`
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
2041
|
+
WITH legacy AS (
|
|
2042
|
+
SELECT metadata.session_id
|
|
2043
|
+
FROM session_metadata AS metadata
|
|
2044
|
+
WHERE metadata.session_id IN (${sessions})
|
|
2045
|
+
AND COALESCE(json_extract(metadata.payload_json, '$.transcriptLedgerVersion'), -1) <> 1
|
|
2046
|
+
),
|
|
2047
|
+
chunked AS (
|
|
2048
|
+
SELECT payload.session_id, payload.sequence,
|
|
2049
|
+
(SELECT group_concat(CAST(chunk.data AS TEXT), '' ORDER BY chunk.chunk_index)
|
|
2050
|
+
FROM session_message_chunks AS chunk
|
|
2051
|
+
WHERE chunk.session_id = payload.session_id
|
|
2052
|
+
AND chunk.sequence = payload.sequence) AS body
|
|
2053
|
+
FROM session_message_payloads AS payload
|
|
2054
|
+
WHERE payload.session_id IN (SELECT session_id FROM legacy)
|
|
2055
|
+
)
|
|
2056
|
+
SELECT DISTINCT message.session_id
|
|
1689
2057
|
FROM session_messages AS message
|
|
1690
2058
|
LEFT JOIN session_message_payloads AS payload
|
|
1691
2059
|
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
1692
|
-
WHERE message.session_id
|
|
1693
|
-
AND message.
|
|
1694
|
-
AND
|
|
1695
|
-
|
|
1696
|
-
|
|
2060
|
+
WHERE message.session_id IN (SELECT session_id FROM legacy)
|
|
2061
|
+
AND message.message_type IN (${SEARCHABLE_MESSAGE_TYPE_PLACEHOLDERS})
|
|
2062
|
+
AND payload.sequence IS NULL
|
|
2063
|
+
AND (${inlineMatch})
|
|
2064
|
+
UNION
|
|
2065
|
+
SELECT DISTINCT message.session_id
|
|
2066
|
+
FROM session_messages AS message
|
|
2067
|
+
JOIN chunked
|
|
2068
|
+
ON chunked.session_id = message.session_id AND chunked.sequence = message.sequence
|
|
2069
|
+
WHERE message.message_type IN (${SEARCHABLE_MESSAGE_TYPE_PLACEHOLDERS})
|
|
2070
|
+
AND chunked.body IS NOT NULL
|
|
2071
|
+
AND (${chunkedMatch})
|
|
1697
2072
|
`)
|
|
1698
|
-
.all(
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
for (const row of rows) {
|
|
1703
|
-
if (slices.length >= request.maxMessages || rawBytes >= request.maxBytes)
|
|
1704
|
-
break;
|
|
1705
|
-
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
1706
|
-
const totalBytes = requireTranscriptRecordByteLength(row.total_bytes, sessionId, sequence);
|
|
1707
|
-
const chunked = row.chunked === 1;
|
|
1708
|
-
const payloadDigest = chunked
|
|
1709
|
-
? requireTranscriptPayloadDigest(row.payload_sha256, sessionId, sequence)
|
|
1710
|
-
: null;
|
|
1711
|
-
const continued = sequence === position && request.byteOffset !== undefined;
|
|
1712
|
-
const edge = continued
|
|
1713
|
-
? request.byteOffset
|
|
1714
|
-
: request.direction === 'older'
|
|
1715
|
-
? totalBytes
|
|
1716
|
-
: 0;
|
|
1717
|
-
if ((request.direction === 'older' && (edge < 1 || edge > totalBytes)) ||
|
|
1718
|
-
(request.direction === 'newer' && (edge < 0 || edge >= totalBytes))) {
|
|
1719
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
1720
|
-
}
|
|
1721
|
-
const available = request.maxBytes - rawBytes;
|
|
1722
|
-
const byteOffset = request.direction === 'older' ? Math.max(0, edge - available) : edge;
|
|
1723
|
-
const byteLength = request.direction === 'older'
|
|
1724
|
-
? edge - byteOffset
|
|
1725
|
-
: Math.min(totalBytes - edge, available);
|
|
1726
|
-
const complete = request.direction === 'older' ? byteOffset === 0 : byteOffset + byteLength === totalBytes;
|
|
1727
|
-
slices.push({
|
|
1728
|
-
sequence,
|
|
1729
|
-
byteOffset,
|
|
1730
|
-
totalBytes,
|
|
1731
|
-
byteLength,
|
|
1732
|
-
chunked,
|
|
1733
|
-
payloadDigest,
|
|
1734
|
-
});
|
|
1735
|
-
rawBytes += byteLength;
|
|
1736
|
-
if (!complete) {
|
|
1737
|
-
next = {
|
|
1738
|
-
position: sequence,
|
|
1739
|
-
byteOffset: request.direction === 'older' ? byteOffset : byteOffset + byteLength,
|
|
1740
|
-
};
|
|
1741
|
-
break;
|
|
2073
|
+
.all(...sessionIds, ...SEARCHABLE_MESSAGE_TYPES, ...terms, ...SEARCHABLE_MESSAGE_TYPES, ...terms);
|
|
2074
|
+
return rows.map((row) => {
|
|
2075
|
+
if (typeof row.session_id !== 'string') {
|
|
2076
|
+
throw new Error('Session search candidate is missing its Session');
|
|
1742
2077
|
}
|
|
1743
|
-
|
|
1744
|
-
if (next === null && slices.length > 0 && slices.length < rows.length) {
|
|
1745
|
-
const sequence = slices.at(-1).sequence;
|
|
1746
|
-
next = {
|
|
1747
|
-
position: sequence + (request.direction === 'older' ? -1 : 1),
|
|
1748
|
-
byteOffset: null,
|
|
1749
|
-
};
|
|
1750
|
-
}
|
|
1751
|
-
const dataBySequence = readTranscriptSlices(this.db, sessionId, slices);
|
|
1752
|
-
const fragments = slices.map(({ sequence, byteOffset, totalBytes, byteLength, payloadDigest }) => {
|
|
1753
|
-
const data = dataBySequence.get(sequence);
|
|
1754
|
-
if (!data || data.byteLength !== byteLength) {
|
|
1755
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
1756
|
-
}
|
|
1757
|
-
if (byteOffset === 0 && byteLength === totalBytes) {
|
|
1758
|
-
validateTranscriptRecord(data, sessionId, sequence);
|
|
1759
|
-
}
|
|
1760
|
-
return { sequence, byteOffset, totalBytes, payloadDigest, data };
|
|
2078
|
+
return row.session_id;
|
|
1761
2079
|
});
|
|
1762
|
-
return { throughSequence, fragments, rawBytes, next };
|
|
1763
2080
|
});
|
|
1764
2081
|
}
|
|
1765
|
-
|
|
2082
|
+
/**
|
|
2083
|
+
* How many pre-ledger transcript rows could project to a searchable message,
|
|
2084
|
+
* for recall's idf term. Counted by message type rather than by projecting,
|
|
2085
|
+
* so it is cheap and identical whichever path recall takes to find its hits;
|
|
2086
|
+
* Sessions the ledger owns are counted from `runtime_events` instead.
|
|
2087
|
+
*/
|
|
2088
|
+
async countLegacyTranscriptMessages(sessionIds) {
|
|
1766
2089
|
this.assertOpen();
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
(!Number.isSafeInteger(request.throughSequence) || request.throughSequence < 0)) {
|
|
1773
|
-
throw new Error('Invalid Session transcript watermark');
|
|
1774
|
-
}
|
|
1775
|
-
if (!Number.isSafeInteger(request.maxBytes) || request.maxBytes < 1) {
|
|
1776
|
-
throw new Error('Invalid Session transcript message byte limit');
|
|
1777
|
-
}
|
|
1778
|
-
if (!Number.isSafeInteger(request.maxMessages) || request.maxMessages < 1) {
|
|
1779
|
-
throw new Error('Invalid Session transcript message count limit');
|
|
1780
|
-
}
|
|
1781
|
-
const messageIds = [...new Set(request.messageIds)];
|
|
2090
|
+
if (sessionIds.length === 0)
|
|
2091
|
+
return 0;
|
|
2092
|
+
for (const sessionId of sessionIds)
|
|
2093
|
+
assertSafeSessionId(sessionId);
|
|
2094
|
+
const sessions = sessionIds.map(() => '?').join(', ');
|
|
1782
2095
|
return this.readTransaction(() => {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
.prepare(`
|
|
1795
|
-
SELECT message.sequence,
|
|
1796
|
-
coalesce(payload.record_bytes, length(CAST(message.record_json AS BLOB)))
|
|
1797
|
-
AS stored_bytes
|
|
1798
|
-
FROM session_messages AS message
|
|
1799
|
-
LEFT JOIN session_message_payloads AS payload
|
|
1800
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
1801
|
-
WHERE message.session_id = ? AND message.sequence <= ?
|
|
1802
|
-
AND message.message_id IN (${placeholders})
|
|
1803
|
-
ORDER BY message.sequence ASC
|
|
1804
|
-
LIMIT ?
|
|
1805
|
-
`)
|
|
1806
|
-
.all(sessionId, request.throughSequence, ...batch, remainingMessages + 1);
|
|
1807
|
-
if (rows.length > remainingMessages) {
|
|
1808
|
-
throw new Error('Session transcript message lookup exceeds its message limit');
|
|
1809
|
-
}
|
|
1810
|
-
for (const row of rows) {
|
|
1811
|
-
if (typeof row.sequence !== 'number' ||
|
|
1812
|
-
!Number.isSafeInteger(row.sequence) ||
|
|
1813
|
-
row.sequence < 0 ||
|
|
1814
|
-
typeof row.stored_bytes !== 'number' ||
|
|
1815
|
-
!Number.isSafeInteger(row.stored_bytes) ||
|
|
1816
|
-
row.stored_bytes < 1) {
|
|
1817
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, -1);
|
|
1818
|
-
}
|
|
1819
|
-
selectedBytes += row.stored_bytes;
|
|
1820
|
-
if (selectedBytes > request.maxBytes) {
|
|
1821
|
-
throw new Error('Session transcript message lookup exceeds its byte limit');
|
|
1822
|
-
}
|
|
1823
|
-
selected.push(row.sequence);
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
selected.sort((left, right) => left - right);
|
|
1827
|
-
const messages = [];
|
|
1828
|
-
for (let offset = 0; offset < selected.length; offset += SQLITE_TRANSCRIPT_MESSAGE_LOOKUP_BATCH_SIZE) {
|
|
1829
|
-
const batch = selected.slice(offset, offset + SQLITE_TRANSCRIPT_MESSAGE_LOOKUP_BATCH_SIZE);
|
|
1830
|
-
const placeholders = batch.map(() => '?').join(', ');
|
|
1831
|
-
const rows = readStoredMessageRows(this.db, sessionId, batch, placeholders);
|
|
1832
|
-
if (rows.length !== batch.length) {
|
|
1833
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, -1);
|
|
1834
|
-
}
|
|
1835
|
-
for (const row of rows) {
|
|
1836
|
-
try {
|
|
1837
|
-
messages.push(decodeStoredMessage(JSON.parse(row.recordJson)));
|
|
1838
|
-
}
|
|
1839
|
-
catch (error) {
|
|
1840
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, row.sequence, {
|
|
1841
|
-
cause: error,
|
|
1842
|
-
});
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
return messages;
|
|
2096
|
+
const row = this.db
|
|
2097
|
+
.prepare(`
|
|
2098
|
+
SELECT count(*) AS total
|
|
2099
|
+
FROM session_messages AS message
|
|
2100
|
+
JOIN session_metadata AS metadata ON metadata.session_id = message.session_id
|
|
2101
|
+
WHERE message.session_id IN (${sessions})
|
|
2102
|
+
AND COALESCE(json_extract(metadata.payload_json, '$.transcriptLedgerVersion'), -1) <> 1
|
|
2103
|
+
AND message.message_type IN (${SEARCHABLE_MESSAGE_TYPE_PLACEHOLDERS})
|
|
2104
|
+
`)
|
|
2105
|
+
.get(...sessionIds, ...SEARCHABLE_MESSAGE_TYPES);
|
|
2106
|
+
return typeof row?.total === 'number' ? row.total : 0;
|
|
1847
2107
|
});
|
|
1848
2108
|
}
|
|
1849
|
-
async
|
|
2109
|
+
async readMessagesAfter(sessionId, request) {
|
|
1850
2110
|
this.assertOpen();
|
|
1851
2111
|
assertSafeSessionId(sessionId);
|
|
1852
|
-
|
|
2112
|
+
if (!Number.isSafeInteger(request.maxMessages) || request.maxMessages < 1) {
|
|
2113
|
+
throw new Error('Invalid Session message count limit');
|
|
2114
|
+
}
|
|
2115
|
+
if (!Number.isSafeInteger(request.maxStoredBytes) || request.maxStoredBytes < 1) {
|
|
2116
|
+
throw new Error('Invalid Session message byte limit');
|
|
2117
|
+
}
|
|
2118
|
+
if (request.afterSequence !== undefined && request.beforeSequence !== undefined) {
|
|
2119
|
+
throw new Error('Invalid Session message scan bounds');
|
|
2120
|
+
}
|
|
2121
|
+
const backward = request.beforeSequence !== undefined;
|
|
1853
2122
|
return this.readTransaction(() => {
|
|
1854
2123
|
if (!this.readRecordSync(sessionId))
|
|
1855
2124
|
throw new SessionNotFoundError(sessionId);
|
|
1856
|
-
const highWaterRow = this.db
|
|
1857
|
-
.prepare('SELECT MAX(sequence) AS high_water FROM session_messages WHERE session_id = ?')
|
|
1858
|
-
.get(sessionId);
|
|
1859
|
-
const actualHighWater = nullableStoredMessageSequence(highWaterRow.high_water, sessionId);
|
|
1860
|
-
const throughSequence = request.throughSequence === undefined ? actualHighWater : request.throughSequence;
|
|
1861
|
-
if (throughSequence === null) {
|
|
1862
|
-
return { throughSequence: null, records: [], nextPosition: null };
|
|
1863
|
-
}
|
|
1864
|
-
if (actualHighWater === null || throughSequence > actualHighWater) {
|
|
1865
|
-
throw new Error(`Session transcript watermark is ahead of durable storage: ${sessionId}`);
|
|
1866
|
-
}
|
|
1867
|
-
const position = request.position ?? (request.direction === 'older' ? throughSequence : 0);
|
|
1868
|
-
const comparison = request.direction === 'older' ? '<=' : '>=';
|
|
1869
|
-
const order = request.direction === 'older' ? 'DESC' : 'ASC';
|
|
1870
2125
|
const rows = this.db
|
|
1871
2126
|
.prepare(`
|
|
1872
|
-
SELECT message.sequence,
|
|
1873
|
-
coalesce(payload.record_bytes, length(CAST(message.record_json AS BLOB))) AS stored_bytes
|
|
2127
|
+
SELECT message.sequence, message.record_json, payload.record_bytes, payload.sha256
|
|
1874
2128
|
FROM session_messages AS message
|
|
1875
2129
|
LEFT JOIN session_message_payloads AS payload
|
|
1876
2130
|
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
1877
|
-
WHERE message.session_id = ?
|
|
1878
|
-
|
|
1879
|
-
AND message.sequence ${comparison} ?
|
|
1880
|
-
ORDER BY message.sequence ${order}
|
|
2131
|
+
WHERE message.session_id = ? AND message.sequence ${backward ? '<' : '>'} ?
|
|
2132
|
+
ORDER BY message.sequence ${backward ? 'DESC' : 'ASC'}
|
|
1881
2133
|
LIMIT ?
|
|
1882
2134
|
`)
|
|
1883
|
-
.all(sessionId,
|
|
1884
|
-
const
|
|
2135
|
+
.all(sessionId, backward ? request.beforeSequence : (request.afterSequence ?? -1), request.maxMessages);
|
|
2136
|
+
const records = [];
|
|
1885
2137
|
let storedBytes = 0;
|
|
1886
2138
|
for (const row of rows) {
|
|
1887
|
-
if (selected.length >= request.maxMessages)
|
|
1888
|
-
break;
|
|
1889
2139
|
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
1890
|
-
|
|
1891
|
-
|
|
2140
|
+
// A record too large for one row is stored in chunks, with only a
|
|
2141
|
+
// marker inline; its size is the chunk total, not the marker's.
|
|
2142
|
+
const recordBytes = typeof row.record_bytes === 'number' ? row.record_bytes : String(row.record_json).length;
|
|
2143
|
+
// The first record of a page is always taken, so a single row larger
|
|
2144
|
+
// than the budget still makes progress instead of stalling the scan.
|
|
2145
|
+
if (records.length > 0 && storedBytes + recordBytes > request.maxStoredBytes)
|
|
1892
2146
|
break;
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
try {
|
|
1899
|
-
decoded.set(row.sequence, decodeStoredMessage(JSON.parse(row.recordJson)));
|
|
1900
|
-
}
|
|
1901
|
-
catch (error) {
|
|
1902
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, row.sequence, {
|
|
1903
|
-
cause: error,
|
|
1904
|
-
});
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
const records = selected.map((sequence) => {
|
|
1908
|
-
const message = decoded.get(sequence);
|
|
1909
|
-
if (!message)
|
|
1910
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
1911
|
-
return { sequence, message };
|
|
1912
|
-
});
|
|
1913
|
-
const last = selected.at(-1);
|
|
1914
|
-
return {
|
|
1915
|
-
throughSequence,
|
|
1916
|
-
records,
|
|
1917
|
-
nextPosition: last !== undefined && rows.length > selected.length
|
|
1918
|
-
? last + (request.direction === 'older' ? -1 : 1)
|
|
1919
|
-
: null,
|
|
1920
|
-
};
|
|
1921
|
-
});
|
|
1922
|
-
}
|
|
1923
|
-
async readTranscriptHighWater(sessionId) {
|
|
1924
|
-
this.assertOpen();
|
|
1925
|
-
assertSafeSessionId(sessionId);
|
|
1926
|
-
if (!this.readRecordSync(sessionId))
|
|
1927
|
-
throw new SessionNotFoundError(sessionId);
|
|
1928
|
-
const row = this.db
|
|
1929
|
-
.prepare('SELECT MAX(sequence) AS high_water FROM session_messages WHERE session_id = ?')
|
|
1930
|
-
.get(sessionId);
|
|
1931
|
-
return nullableStoredMessageSequence(row.high_water, sessionId);
|
|
1932
|
-
}
|
|
1933
|
-
async readTurnContributions(sessionId, throughSequence, position, maxContributions) {
|
|
1934
|
-
this.assertOpen();
|
|
1935
|
-
assertSafeSessionId(sessionId);
|
|
1936
|
-
if ((throughSequence !== null &&
|
|
1937
|
-
(!Number.isSafeInteger(throughSequence) || throughSequence < 0)) ||
|
|
1938
|
-
!Number.isSafeInteger(position) ||
|
|
1939
|
-
position < 0 ||
|
|
1940
|
-
!Number.isSafeInteger(maxContributions) ||
|
|
1941
|
-
maxContributions < 1 ||
|
|
1942
|
-
maxContributions > 128) {
|
|
1943
|
-
throw new Error('Invalid Session turn contribution request');
|
|
1944
|
-
}
|
|
1945
|
-
return this.readTransaction(() => {
|
|
1946
|
-
if (!this.readRecordSync(sessionId))
|
|
1947
|
-
throw new SessionNotFoundError(sessionId);
|
|
1948
|
-
const highWaterRow = this.db
|
|
1949
|
-
.prepare('SELECT MAX(sequence) AS high_water FROM session_messages WHERE session_id = ?')
|
|
1950
|
-
.get(sessionId);
|
|
1951
|
-
const actualHighWater = nullableStoredMessageSequence(highWaterRow.high_water, sessionId);
|
|
1952
|
-
const fixedThrough = throughSequence ?? actualHighWater;
|
|
1953
|
-
if (fixedThrough === null) {
|
|
1954
|
-
return { throughSequence: null, contributions: [], nextPosition: null };
|
|
1955
|
-
}
|
|
1956
|
-
if (actualHighWater === null || fixedThrough > actualHighWater) {
|
|
1957
|
-
throw new Error(`Session turn watermark is ahead of durable storage: ${sessionId}`);
|
|
1958
|
-
}
|
|
1959
|
-
const contributions = new Map();
|
|
1960
|
-
let nextPosition = position;
|
|
1961
|
-
let sourceMessages = 0;
|
|
1962
|
-
let sourceBytes = 0;
|
|
1963
|
-
while (nextPosition <= fixedThrough) {
|
|
1964
|
-
const rows = this.db
|
|
1965
|
-
.prepare(`
|
|
1966
|
-
SELECT message.sequence, message.record_json, payload.record_bytes, payload.sha256
|
|
1967
|
-
FROM session_messages AS message
|
|
1968
|
-
LEFT JOIN session_message_payloads AS payload
|
|
1969
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
1970
|
-
WHERE message.session_id = ?
|
|
1971
|
-
AND message.sequence >= ?
|
|
1972
|
-
AND message.sequence <= ?
|
|
1973
|
-
ORDER BY message.sequence ASC
|
|
1974
|
-
LIMIT 128
|
|
1975
|
-
`)
|
|
1976
|
-
.all(sessionId, nextPosition, fixedThrough);
|
|
1977
|
-
if (rows.length === 0) {
|
|
1978
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, nextPosition);
|
|
1979
|
-
}
|
|
1980
|
-
for (const row of rows) {
|
|
1981
|
-
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
1982
|
-
const recordBytes = storedMessageRecordBytes(row, sessionId, sequence);
|
|
1983
|
-
if (sourceMessages > 0 &&
|
|
1984
|
-
(sourceMessages >= SQLITE_TURN_CONTRIBUTION_MAX_SOURCE_MESSAGES ||
|
|
1985
|
-
sourceBytes + recordBytes > SQLITE_TURN_CONTRIBUTION_MAX_SOURCE_BYTES)) {
|
|
1986
|
-
return {
|
|
1987
|
-
throughSequence: fixedThrough,
|
|
1988
|
-
contributions: [...contributions.values()],
|
|
1989
|
-
nextPosition: sequence,
|
|
1990
|
-
};
|
|
1991
|
-
}
|
|
1992
|
-
const message = decodeStoredMessageRecordRow(this.db, sessionId, row);
|
|
1993
|
-
sourceMessages += 1;
|
|
1994
|
-
sourceBytes += recordBytes;
|
|
1995
|
-
if (!('turnId' in message) || typeof message.turnId !== 'string') {
|
|
1996
|
-
nextPosition = sequence + 1;
|
|
1997
|
-
continue;
|
|
1998
|
-
}
|
|
1999
|
-
const turnId = message.turnId;
|
|
2000
|
-
if (turnId && !contributions.has(turnId) && contributions.size >= maxContributions) {
|
|
2001
|
-
nextPosition = sequence;
|
|
2002
|
-
return {
|
|
2003
|
-
throughSequence: fixedThrough,
|
|
2004
|
-
contributions: [...contributions.values()],
|
|
2005
|
-
nextPosition,
|
|
2006
|
-
};
|
|
2007
|
-
}
|
|
2008
|
-
contributions.set(turnId, foldTurnContribution(contributions.get(turnId), turnId, sequence, message));
|
|
2009
|
-
nextPosition = sequence + 1;
|
|
2010
|
-
}
|
|
2147
|
+
storedBytes += recordBytes;
|
|
2148
|
+
records.push({
|
|
2149
|
+
sequence,
|
|
2150
|
+
message: decodeStoredMessageRecordRow(this.db, sessionId, row),
|
|
2151
|
+
});
|
|
2011
2152
|
}
|
|
2153
|
+
const highWater = this.db
|
|
2154
|
+
.prepare('SELECT MAX(sequence) AS high_water FROM session_messages WHERE session_id = ?')
|
|
2155
|
+
.get(sessionId);
|
|
2012
2156
|
return {
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
nextPosition: null,
|
|
2157
|
+
records,
|
|
2158
|
+
highWaterSequence: nullableStoredMessageSequence(highWater.high_water, sessionId),
|
|
2016
2159
|
};
|
|
2017
2160
|
});
|
|
2018
2161
|
}
|
|
2019
|
-
async
|
|
2162
|
+
async readTranscriptMessages(sessionId, request) {
|
|
2020
2163
|
this.assertOpen();
|
|
2021
2164
|
assertSafeSessionId(sessionId);
|
|
2022
|
-
if (
|
|
2023
|
-
throw new Error('Invalid Session
|
|
2165
|
+
if (request.messageIds.some((messageId) => typeof messageId !== 'string')) {
|
|
2166
|
+
throw new Error('Invalid Session transcript message identity set');
|
|
2167
|
+
}
|
|
2168
|
+
if (request.throughSequence !== null &&
|
|
2169
|
+
(!Number.isSafeInteger(request.throughSequence) || request.throughSequence < 0)) {
|
|
2170
|
+
throw new Error('Invalid Session transcript watermark');
|
|
2171
|
+
}
|
|
2172
|
+
if (!Number.isSafeInteger(request.maxBytes) || request.maxBytes < 1) {
|
|
2173
|
+
throw new Error('Invalid Session transcript message byte limit');
|
|
2174
|
+
}
|
|
2175
|
+
if (!Number.isSafeInteger(request.maxMessages) || request.maxMessages < 1) {
|
|
2176
|
+
throw new Error('Invalid Session transcript message count limit');
|
|
2024
2177
|
}
|
|
2178
|
+
const messageIds = [...new Set(request.messageIds)];
|
|
2025
2179
|
return this.readTransaction(() => {
|
|
2026
2180
|
if (!this.readRecordSync(sessionId))
|
|
2027
2181
|
throw new SessionNotFoundError(sessionId);
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
.
|
|
2037
|
-
const throughSequence = nullableStoredMessageSequence(throughRow?.through_sequence, sessionId);
|
|
2038
|
-
if (throughSequence === null) {
|
|
2039
|
-
return { throughSequence: null, landmarks: [] };
|
|
2040
|
-
}
|
|
2041
|
-
const promptRows = this.db
|
|
2042
|
-
.prepare(`
|
|
2043
|
-
SELECT admission.admitted_at, message.sequence
|
|
2044
|
-
FROM core_root_turn_admissions AS admission
|
|
2045
|
-
JOIN session_messages AS message
|
|
2046
|
-
ON message.session_id = admission.session_id
|
|
2047
|
-
AND message.message_id = json_extract(admission.record_json, '$.userMessageId')
|
|
2048
|
-
LEFT JOIN session_message_payloads AS payload
|
|
2049
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
2050
|
-
WHERE admission.session_id = ? AND payload.sequence IS NULL
|
|
2051
|
-
ORDER BY admission.admitted_at ASC, admission.turn_id ASC
|
|
2052
|
-
LIMIT ?
|
|
2053
|
-
`)
|
|
2054
|
-
.all(sessionId, maxLandmarks + 1);
|
|
2055
|
-
const selected = new Set();
|
|
2056
|
-
if (promptRows.length <= maxLandmarks) {
|
|
2057
|
-
for (const row of promptRows) {
|
|
2058
|
-
selected.add(requireStoredMessageSequence(row.sequence, sessionId));
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
const forward = this.db.prepare(`
|
|
2062
|
-
SELECT admission.admitted_at, message.sequence
|
|
2063
|
-
FROM core_root_turn_admissions AS admission
|
|
2064
|
-
JOIN session_messages AS message
|
|
2065
|
-
ON message.session_id = admission.session_id
|
|
2066
|
-
AND message.message_id = json_extract(admission.record_json, '$.userMessageId')
|
|
2067
|
-
LEFT JOIN session_message_payloads AS payload
|
|
2068
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
2069
|
-
WHERE admission.session_id = ? AND admission.admitted_at >= ? AND payload.sequence IS NULL
|
|
2070
|
-
ORDER BY admission.admitted_at ASC, admission.turn_id ASC
|
|
2071
|
-
LIMIT 1
|
|
2072
|
-
`);
|
|
2073
|
-
const backward = this.db.prepare(`
|
|
2074
|
-
SELECT admission.admitted_at, message.sequence
|
|
2075
|
-
FROM core_root_turn_admissions AS admission
|
|
2076
|
-
JOIN session_messages AS message
|
|
2077
|
-
ON message.session_id = admission.session_id
|
|
2078
|
-
AND message.message_id = json_extract(admission.record_json, '$.userMessageId')
|
|
2079
|
-
LEFT JOIN session_message_payloads AS payload
|
|
2080
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
2081
|
-
WHERE admission.session_id = ? AND admission.admitted_at < ? AND payload.sequence IS NULL
|
|
2082
|
-
ORDER BY admission.admitted_at DESC, admission.turn_id DESC
|
|
2083
|
-
LIMIT 1
|
|
2084
|
-
`);
|
|
2085
|
-
if (promptRows.length > maxLandmarks) {
|
|
2086
|
-
const firstAdmittedAt = requireTurnLandmarkAdmittedAt(promptRows[0]?.admitted_at);
|
|
2087
|
-
const lastRow = this.db
|
|
2182
|
+
if (messageIds.length === 0 || request.throughSequence === null)
|
|
2183
|
+
return [];
|
|
2184
|
+
const selected = [];
|
|
2185
|
+
let selectedBytes = 0;
|
|
2186
|
+
for (let offset = 0; offset < messageIds.length; offset += SQLITE_TRANSCRIPT_MESSAGE_LOOKUP_BATCH_SIZE) {
|
|
2187
|
+
const batch = messageIds.slice(offset, offset + SQLITE_TRANSCRIPT_MESSAGE_LOOKUP_BATCH_SIZE);
|
|
2188
|
+
const placeholders = batch.map(() => '?').join(', ');
|
|
2189
|
+
const remainingMessages = request.maxMessages - selected.length;
|
|
2190
|
+
const rows = this.db
|
|
2088
2191
|
.prepare(`
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
nearest = candidate;
|
|
2113
|
-
}
|
|
2192
|
+
SELECT message.sequence,
|
|
2193
|
+
coalesce(payload.record_bytes, length(CAST(message.record_json AS BLOB)))
|
|
2194
|
+
AS stored_bytes
|
|
2195
|
+
FROM session_messages AS message
|
|
2196
|
+
LEFT JOIN session_message_payloads AS payload
|
|
2197
|
+
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
2198
|
+
WHERE message.session_id = ? AND message.sequence <= ?
|
|
2199
|
+
AND message.message_id IN (${placeholders})
|
|
2200
|
+
ORDER BY message.sequence ASC
|
|
2201
|
+
LIMIT ?
|
|
2202
|
+
`)
|
|
2203
|
+
.all(sessionId, request.throughSequence, ...batch, remainingMessages + 1);
|
|
2204
|
+
if (rows.length > remainingMessages) {
|
|
2205
|
+
throw new Error('Session transcript message lookup exceeds its message limit');
|
|
2206
|
+
}
|
|
2207
|
+
for (const row of rows) {
|
|
2208
|
+
if (typeof row.sequence !== 'number' ||
|
|
2209
|
+
!Number.isSafeInteger(row.sequence) ||
|
|
2210
|
+
row.sequence < 0 ||
|
|
2211
|
+
typeof row.stored_bytes !== 'number' ||
|
|
2212
|
+
!Number.isSafeInteger(row.stored_bytes) ||
|
|
2213
|
+
row.stored_bytes < 1) {
|
|
2214
|
+
throw new StoredSessionMessageIncompatibleError(sessionId, -1);
|
|
2114
2215
|
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2216
|
+
selectedBytes += row.stored_bytes;
|
|
2217
|
+
if (selectedBytes > request.maxBytes) {
|
|
2218
|
+
throw new Error('Session transcript message lookup exceeds its byte limit');
|
|
2219
|
+
}
|
|
2220
|
+
selected.push(row.sequence);
|
|
2117
2221
|
}
|
|
2118
2222
|
}
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
const
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
FROM session_messages
|
|
2128
|
-
WHERE session_id = ?
|
|
2129
|
-
ORDER BY sequence ASC
|
|
2130
|
-
LIMIT 1
|
|
2131
|
-
`)
|
|
2132
|
-
.get(sessionId);
|
|
2133
|
-
const firstSequence = nullableStoredMessageSequence(firstRow?.first_sequence, sessionId);
|
|
2134
|
-
if (firstSequence === null || firstSequence > legacyThrough) {
|
|
2135
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, legacyThrough);
|
|
2223
|
+
selected.sort((left, right) => left - right);
|
|
2224
|
+
const messages = [];
|
|
2225
|
+
for (let offset = 0; offset < selected.length; offset += SQLITE_TRANSCRIPT_MESSAGE_LOOKUP_BATCH_SIZE) {
|
|
2226
|
+
const batch = selected.slice(offset, offset + SQLITE_TRANSCRIPT_MESSAGE_LOOKUP_BATCH_SIZE);
|
|
2227
|
+
const placeholders = batch.map(() => '?').join(', ');
|
|
2228
|
+
const rows = readStoredMessageRows(this.db, sessionId, batch, placeholders);
|
|
2229
|
+
if (rows.length !== batch.length) {
|
|
2230
|
+
throw new StoredSessionMessageIncompatibleError(sessionId, -1);
|
|
2136
2231
|
}
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
`);
|
|
2146
|
-
const backwardLegacy = this.db.prepare(`
|
|
2147
|
-
SELECT message.sequence, message.message_type, payload.sequence AS payload_sequence
|
|
2148
|
-
FROM session_messages AS message
|
|
2149
|
-
LEFT JOIN session_message_payloads AS payload
|
|
2150
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
2151
|
-
WHERE message.session_id = ? AND message.sequence < ? AND message.sequence >= ?
|
|
2152
|
-
ORDER BY message.sequence DESC
|
|
2153
|
-
LIMIT ${SQLITE_TURN_LANDMARK_LEGACY_NEIGHBOR_MESSAGES}
|
|
2154
|
-
`);
|
|
2155
|
-
const targetCount = Math.min(maxLandmarks, legacyThrough - firstSequence + 1);
|
|
2156
|
-
for (let index = 0; index < targetCount; index += 1) {
|
|
2157
|
-
const target = targetCount === 1
|
|
2158
|
-
? legacyThrough
|
|
2159
|
-
: firstSequence +
|
|
2160
|
-
Math.floor(((legacyThrough - firstSequence) * index) / (targetCount - 1));
|
|
2161
|
-
const candidates = [
|
|
2162
|
-
...forwardLegacy.all(sessionId, target, legacyThrough),
|
|
2163
|
-
...backwardLegacy.all(sessionId, target, firstSequence),
|
|
2164
|
-
];
|
|
2165
|
-
let nearest;
|
|
2166
|
-
for (const candidate of candidates) {
|
|
2167
|
-
const sequence = requireStoredMessageSequence(candidate.sequence, sessionId);
|
|
2168
|
-
if (candidate.message_type !== 'user' || candidate.payload_sequence !== null)
|
|
2169
|
-
continue;
|
|
2170
|
-
if (nearest === undefined || Math.abs(sequence - target) < Math.abs(nearest - target)) {
|
|
2171
|
-
nearest = sequence;
|
|
2172
|
-
}
|
|
2232
|
+
for (const row of rows) {
|
|
2233
|
+
try {
|
|
2234
|
+
messages.push(decodeStoredMessage(JSON.parse(row.recordJson)));
|
|
2235
|
+
}
|
|
2236
|
+
catch (error) {
|
|
2237
|
+
throw new StoredSessionMessageIncompatibleError(sessionId, row.sequence, {
|
|
2238
|
+
cause: error,
|
|
2239
|
+
});
|
|
2173
2240
|
}
|
|
2174
|
-
if (nearest !== undefined)
|
|
2175
|
-
selected.add(nearest);
|
|
2176
2241
|
}
|
|
2177
2242
|
}
|
|
2178
|
-
|
|
2179
|
-
const sampledSequences = selectedSequences.length <= maxLandmarks
|
|
2180
|
-
? selectedSequences
|
|
2181
|
-
: Array.from({ length: maxLandmarks }, (_, index) => selectedSequences[maxLandmarks === 1
|
|
2182
|
-
? selectedSequences.length - 1
|
|
2183
|
-
: Math.floor(((selectedSequences.length - 1) * index) / (maxLandmarks - 1))]);
|
|
2184
|
-
const landmarks = readStoredMessageRows(this.db, sessionId, sampledSequences).flatMap(({ sequence, recordJson }) => {
|
|
2185
|
-
let message;
|
|
2186
|
-
try {
|
|
2187
|
-
message = decodeStoredMessage(JSON.parse(recordJson));
|
|
2188
|
-
}
|
|
2189
|
-
catch (error) {
|
|
2190
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence, { cause: error });
|
|
2191
|
-
}
|
|
2192
|
-
if (message.type !== 'user') {
|
|
2193
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
2194
|
-
}
|
|
2195
|
-
const label = (message.displayText ?? message.text).trim();
|
|
2196
|
-
return label ? [{ turnId: message.turnId, sequence, label }] : [];
|
|
2197
|
-
});
|
|
2198
|
-
return { throughSequence, landmarks };
|
|
2243
|
+
return messages;
|
|
2199
2244
|
});
|
|
2200
2245
|
}
|
|
2201
|
-
async
|
|
2202
|
-
return this.readMessagesWith(sessionId, decodeStoredMessage);
|
|
2203
|
-
}
|
|
2204
|
-
async readPreviewMessages(sessionId, limit = 10) {
|
|
2246
|
+
async readTranscriptHighWater(sessionId) {
|
|
2205
2247
|
this.assertOpen();
|
|
2206
2248
|
assertSafeSessionId(sessionId);
|
|
2207
|
-
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 128) {
|
|
2208
|
-
throw new Error('Session message preview limit must be between 1 and 128');
|
|
2209
|
-
}
|
|
2210
2249
|
if (!this.readRecordSync(sessionId))
|
|
2211
2250
|
throw new SessionNotFoundError(sessionId);
|
|
2212
|
-
const
|
|
2213
|
-
.prepare(
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
`)
|
|
2217
|
-
.all(sessionId, limit)
|
|
2218
|
-
.map((row) => requireStoredMessageSequence(row.sequence, sessionId))
|
|
2219
|
-
.reverse();
|
|
2220
|
-
return readStoredMessageRows(this.db, sessionId, sequences, sequences.map(() => '?').join(', ')).map((row) => decodeStoredMessageRow({ sequence: row.sequence, record_json: row.recordJson }, sessionId));
|
|
2251
|
+
const row = this.db
|
|
2252
|
+
.prepare('SELECT MAX(sequence) AS high_water FROM session_messages WHERE session_id = ?')
|
|
2253
|
+
.get(sessionId);
|
|
2254
|
+
return nullableStoredMessageSequence(row.high_water, sessionId);
|
|
2221
2255
|
}
|
|
2222
2256
|
async beginCatalogProjectionWrite() {
|
|
2223
2257
|
this.assertOpen();
|
|
@@ -2457,6 +2491,22 @@ export class SqliteSessionMetadataStore {
|
|
|
2457
2491
|
.all(graphId);
|
|
2458
2492
|
return rows.map(decodeAgentGraphScheduleUpdateRow);
|
|
2459
2493
|
}
|
|
2494
|
+
async listAgentGraphScheduleRecoveryGraphIds() {
|
|
2495
|
+
this.assertOpen();
|
|
2496
|
+
const rows = this.db
|
|
2497
|
+
.prepare(`
|
|
2498
|
+
SELECT DISTINCT graph_id
|
|
2499
|
+
FROM agent_graph_schedule_updates
|
|
2500
|
+
ORDER BY graph_id
|
|
2501
|
+
`)
|
|
2502
|
+
.all();
|
|
2503
|
+
return rows.map((row) => {
|
|
2504
|
+
if (typeof row.graph_id !== 'string') {
|
|
2505
|
+
throw new Error('Invalid Agent Graph schedule identity');
|
|
2506
|
+
}
|
|
2507
|
+
return row.graph_id;
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2460
2510
|
async claimAgentGraphSupervisorWake(request) {
|
|
2461
2511
|
this.assertOpen();
|
|
2462
2512
|
assertAgentGraphSupervisorWakeClaim(request);
|
|
@@ -2494,11 +2544,17 @@ export class SqliteSessionMetadataStore {
|
|
|
2494
2544
|
async beginAgentGraphSupervisorWakeAttempt(request) {
|
|
2495
2545
|
this.assertOpen();
|
|
2496
2546
|
assertAgentGraphSupervisorWakeAttempt(request);
|
|
2547
|
+
if (request.maxAttempts !== undefined &&
|
|
2548
|
+
(!Number.isSafeInteger(request.maxAttempts) || request.maxAttempts < 1)) {
|
|
2549
|
+
throw new Error('Agent graph supervisor wake max attempts must be positive');
|
|
2550
|
+
}
|
|
2497
2551
|
return this.transaction(() => {
|
|
2498
2552
|
const wake = this.requireAgentGraphSupervisorWakeSync(request.graphId, request.wakeId);
|
|
2499
2553
|
if (wake.status === 'delivered' ||
|
|
2500
2554
|
wake.status === 'running' ||
|
|
2501
|
-
wake.status === 'waiting_permission'
|
|
2555
|
+
wake.status === 'waiting_permission' ||
|
|
2556
|
+
wake.status === 'exhausted' ||
|
|
2557
|
+
(request.maxAttempts !== undefined && wake.attemptCount >= request.maxAttempts)) {
|
|
2502
2558
|
return { wake, acquired: false };
|
|
2503
2559
|
}
|
|
2504
2560
|
const now = this.now();
|
|
@@ -2514,8 +2570,9 @@ export class SqliteSessionMetadataStore {
|
|
|
2514
2570
|
WHERE graph_id = ?
|
|
2515
2571
|
AND wake_id = ?
|
|
2516
2572
|
AND status IN ('pending', 'retryable_failed')
|
|
2573
|
+
AND (? IS NULL OR attempt_count < ?)
|
|
2517
2574
|
`)
|
|
2518
|
-
.run(request.attemptId, request.turnId, now, request.graphId, request.wakeId);
|
|
2575
|
+
.run(request.attemptId, request.turnId, now, request.graphId, request.wakeId, request.maxAttempts ?? null, request.maxAttempts ?? null);
|
|
2519
2576
|
if (updated.changes !== 1) {
|
|
2520
2577
|
return {
|
|
2521
2578
|
wake: this.requireAgentGraphSupervisorWakeSync(request.graphId, request.wakeId),
|
|
@@ -2582,6 +2639,30 @@ export class SqliteSessionMetadataStore {
|
|
|
2582
2639
|
return this.requireAgentGraphSupervisorWakeSync(request.graphId, request.wakeId);
|
|
2583
2640
|
});
|
|
2584
2641
|
}
|
|
2642
|
+
async exhaustAgentGraphSupervisorWake(graphId, wakeId, reason) {
|
|
2643
|
+
this.assertOpen();
|
|
2644
|
+
assertGraphLookupIdentity(graphId, 'graph id');
|
|
2645
|
+
assertGraphLookupIdentity(wakeId, 'supervisor wake id');
|
|
2646
|
+
if (!reason.trim() || reason.length > 4_000) {
|
|
2647
|
+
throw new Error('Agent graph supervisor wake exhaustion reason must be non-empty and bounded');
|
|
2648
|
+
}
|
|
2649
|
+
return this.transaction(() => {
|
|
2650
|
+
const wake = this.requireAgentGraphSupervisorWakeSync(graphId, wakeId);
|
|
2651
|
+
if (wake.status === 'exhausted')
|
|
2652
|
+
return wake;
|
|
2653
|
+
if (wake.status !== 'retryable_failed') {
|
|
2654
|
+
throw new SessionMetadataConflictError('Agent graph supervisor wake is not retryable');
|
|
2655
|
+
}
|
|
2656
|
+
this.db
|
|
2657
|
+
.prepare(`
|
|
2658
|
+
UPDATE agent_graph_supervisor_wakes
|
|
2659
|
+
SET status = 'exhausted', failure_reason = ?, updated_at = ?
|
|
2660
|
+
WHERE graph_id = ? AND wake_id = ? AND status = 'retryable_failed'
|
|
2661
|
+
`)
|
|
2662
|
+
.run(reason, this.now(), graphId, wakeId);
|
|
2663
|
+
return this.requireAgentGraphSupervisorWakeSync(graphId, wakeId);
|
|
2664
|
+
});
|
|
2665
|
+
}
|
|
2585
2666
|
async supersedeAgentGraphSupervisorWakes(request) {
|
|
2586
2667
|
this.assertOpen();
|
|
2587
2668
|
const sessionIds = [...new Set(request.rootSessionIds)];
|
|
@@ -3317,9 +3398,12 @@ export class SqliteSessionMetadataStore {
|
|
|
3317
3398
|
this.assertOpen();
|
|
3318
3399
|
const identities = uniqueVersionedSessionIdentities(sessions);
|
|
3319
3400
|
return this.transaction(() => {
|
|
3320
|
-
|
|
3401
|
+
// One instant for the whole set, so a family archived together reads as
|
|
3402
|
+
// archived together.
|
|
3403
|
+
const archivedAt = this.now();
|
|
3404
|
+
const records = identities.map(({ sessionId, expectedVersion }) => this.setArchivedSync(sessionId, expectedVersion, isArchived, archivedAt));
|
|
3321
3405
|
if (isArchived)
|
|
3322
|
-
this.
|
|
3406
|
+
this.deleteWorkflowAuthorities(identities);
|
|
3323
3407
|
return records;
|
|
3324
3408
|
});
|
|
3325
3409
|
}
|
|
@@ -3359,7 +3443,7 @@ export class SqliteSessionMetadataStore {
|
|
|
3359
3443
|
}
|
|
3360
3444
|
const deletedAt = this.now();
|
|
3361
3445
|
for (const { sessionId, expectedVersion } of archiveIdentities) {
|
|
3362
|
-
this.setArchivedSync(sessionId, expectedVersion, true);
|
|
3446
|
+
this.setArchivedSync(sessionId, expectedVersion, true, deletedAt);
|
|
3363
3447
|
}
|
|
3364
3448
|
for (const { sessionId } of present) {
|
|
3365
3449
|
const deleted = this.db
|
|
@@ -3381,18 +3465,21 @@ export class SqliteSessionMetadataStore {
|
|
|
3381
3465
|
`)
|
|
3382
3466
|
.run(sessionId, deletedAt, retirementUnitId);
|
|
3383
3467
|
}
|
|
3384
|
-
this.
|
|
3468
|
+
this.deleteWorkflowAuthorities([...identities, ...archiveIdentities]);
|
|
3385
3469
|
return identities.map((identity) => identity.sessionId);
|
|
3386
3470
|
});
|
|
3387
3471
|
}
|
|
3388
|
-
|
|
3472
|
+
deleteWorkflowAuthorities(sessions) {
|
|
3389
3473
|
// Standalone metadata stores have no workflow schema. An operational lease
|
|
3390
|
-
// guarantees that
|
|
3474
|
+
// guarantees that workflow authority shares this exact transaction boundary.
|
|
3391
3475
|
if (!this.databaseLease)
|
|
3392
3476
|
return;
|
|
3393
3477
|
const remove = this.db.prepare('DELETE FROM workflow_goal_authority WHERE session_id = ?');
|
|
3394
|
-
|
|
3478
|
+
const removeWaits = this.db.prepare('DELETE FROM workflow_event_waits WHERE session_id = ?');
|
|
3479
|
+
for (const { sessionId } of sessions) {
|
|
3395
3480
|
remove.run(sessionId);
|
|
3481
|
+
removeWaits.run(sessionId);
|
|
3482
|
+
}
|
|
3396
3483
|
}
|
|
3397
3484
|
async remove(sessionId) {
|
|
3398
3485
|
this.assertOpen();
|
|
@@ -3522,7 +3609,7 @@ export class SqliteSessionMetadataStore {
|
|
|
3522
3609
|
if (boundary.kind !== 'managed') {
|
|
3523
3610
|
throw new SessionMetadataConflictError(`Managed sandbox boundary history is invalid: ${sessionId}`);
|
|
3524
3611
|
}
|
|
3525
|
-
if (!
|
|
3612
|
+
if (!isCanonicalReadOnlyPermissionProfile(boundary.profile))
|
|
3526
3613
|
return boundary.profile;
|
|
3527
3614
|
}
|
|
3528
3615
|
return requireManagedProfile(createGenesisExecutionBoundary('ask'));
|
|
@@ -3580,7 +3667,7 @@ export class SqliteSessionMetadataStore {
|
|
|
3580
3667
|
}, sessionId);
|
|
3581
3668
|
return this.persistHeaderSync(sessionId, current, next, options);
|
|
3582
3669
|
}
|
|
3583
|
-
setArchivedSync(sessionId, expectedVersion, isArchived) {
|
|
3670
|
+
setArchivedSync(sessionId, expectedVersion, isArchived, archivedAt) {
|
|
3584
3671
|
const current = this.readRecordSync(sessionId);
|
|
3585
3672
|
if (!current)
|
|
3586
3673
|
throw new SessionNotFoundError(sessionId);
|
|
@@ -3588,7 +3675,13 @@ export class SqliteSessionMetadataStore {
|
|
|
3588
3675
|
throw new SessionMetadataVersionConflictError(sessionId, expectedVersion, current.metadataVersion);
|
|
3589
3676
|
}
|
|
3590
3677
|
const next = normalizeSessionHeader({ ...current.header, isArchived }, sessionId);
|
|
3591
|
-
|
|
3678
|
+
// A Session already in the requested state is a no-op below, so an
|
|
3679
|
+
// archived Session keeps the time it was first archived; only a real
|
|
3680
|
+
// transition writes the column. Every other writer leaves it alone.
|
|
3681
|
+
return this.persistHeaderSync(sessionId, current, next, {
|
|
3682
|
+
skipNoop: true,
|
|
3683
|
+
archivedAt: isArchived ? archivedAt : null,
|
|
3684
|
+
});
|
|
3592
3685
|
}
|
|
3593
3686
|
persistHeaderSync(sessionId, current, next, options = {}) {
|
|
3594
3687
|
if (next.id !== sessionId) {
|
|
@@ -3620,10 +3713,11 @@ export class SqliteSessionMetadataStore {
|
|
|
3620
3713
|
llm_connection_slug = ?,
|
|
3621
3714
|
model = ?,
|
|
3622
3715
|
metadata_version = ?,
|
|
3623
|
-
committed_at =
|
|
3716
|
+
committed_at = ?,
|
|
3717
|
+
archived_at = CASE WHEN ? = 1 THEN ? ELSE archived_at END
|
|
3624
3718
|
WHERE session_id = ? AND metadata_version = ?
|
|
3625
3719
|
`)
|
|
3626
|
-
.run(JSON.stringify(next), next.createdAt, next.lastMessageAt ?? null, next.name, booleanInteger(next.isFlagged), booleanInteger(next.isArchived), next.parentSessionId ?? null, next.subagentParent?.parentSessionId ?? null, next.revisionRootSessionId ?? null, next.revisionIndex ?? null, booleanInteger(next.hasUnread), next.backend, next.llmConnectionSlug, next.model, metadataVersion, committedAt, sessionId, current.metadataVersion);
|
|
3720
|
+
.run(JSON.stringify(next), next.createdAt, next.lastMessageAt ?? null, next.name, booleanInteger(next.isFlagged), booleanInteger(next.isArchived), next.parentSessionId ?? null, next.subagentParent?.parentSessionId ?? null, next.revisionRootSessionId ?? null, next.revisionIndex ?? null, booleanInteger(next.hasUnread), next.backend, next.llmConnectionSlug, next.model, metadataVersion, committedAt, options.archivedAt === undefined ? 0 : 1, options.archivedAt ?? null, sessionId, current.metadataVersion);
|
|
3627
3721
|
if (updated.changes !== 1) {
|
|
3628
3722
|
throw new SessionMetadataConflictError(`Session metadata compare-and-set failed: ${sessionId}`);
|
|
3629
3723
|
}
|
|
@@ -3668,7 +3762,7 @@ export class SqliteSessionMetadataStore {
|
|
|
3668
3762
|
const nextManagedProfile = kind === 'managed'
|
|
3669
3763
|
? projectedMode === 'explore'
|
|
3670
3764
|
? requireManagedProfile(createGenesisExecutionBoundary('explore'))
|
|
3671
|
-
: current.kind === 'managed' && !
|
|
3765
|
+
: current.kind === 'managed' && !isCanonicalReadOnlyPermissionProfile(current.profile)
|
|
3672
3766
|
? current.profile
|
|
3673
3767
|
: this.readLatestAutoSandboxProfileSync(sessionId)
|
|
3674
3768
|
: undefined;
|
|
@@ -3739,64 +3833,6 @@ export class SqliteSessionMetadataStore {
|
|
|
3739
3833
|
.get(sessionId, messageId);
|
|
3740
3834
|
return row ? decodeStoredMessageRecordRow(this.db, sessionId, row) : undefined;
|
|
3741
3835
|
}
|
|
3742
|
-
readSessionMessageOrderingSync(sessionId) {
|
|
3743
|
-
const rows = this.db
|
|
3744
|
-
.prepare(`
|
|
3745
|
-
SELECT message.sequence, message.record_json, payload.record_bytes, payload.sha256
|
|
3746
|
-
FROM session_messages AS message
|
|
3747
|
-
LEFT JOIN session_message_payloads AS payload
|
|
3748
|
-
ON payload.session_id = message.session_id AND payload.sequence = message.sequence
|
|
3749
|
-
WHERE message.session_id = ?
|
|
3750
|
-
ORDER BY message.sequence
|
|
3751
|
-
`)
|
|
3752
|
-
.all(sessionId);
|
|
3753
|
-
return rows.map((row) => {
|
|
3754
|
-
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
3755
|
-
const recordJson = readStoredMessageRecordJson(this.db, sessionId, sequence, row);
|
|
3756
|
-
return {
|
|
3757
|
-
sequence,
|
|
3758
|
-
message: decodeStoredMessage(JSON.parse(recordJson)),
|
|
3759
|
-
};
|
|
3760
|
-
});
|
|
3761
|
-
}
|
|
3762
|
-
shiftSessionMessageSuffixSync(sessionId, firstSequence, amount) {
|
|
3763
|
-
if (!Number.isSafeInteger(firstSequence) || firstSequence < 0) {
|
|
3764
|
-
throw new SessionMetadataConflictError('Invalid transcript insertion sequence');
|
|
3765
|
-
}
|
|
3766
|
-
if (!Number.isSafeInteger(amount) || amount < 1) {
|
|
3767
|
-
throw new SessionMetadataConflictError('Invalid transcript insertion size');
|
|
3768
|
-
}
|
|
3769
|
-
const sequences = this.db
|
|
3770
|
-
.prepare(`
|
|
3771
|
-
SELECT sequence
|
|
3772
|
-
FROM session_messages
|
|
3773
|
-
WHERE session_id = ? AND sequence >= ?
|
|
3774
|
-
ORDER BY sequence DESC
|
|
3775
|
-
`)
|
|
3776
|
-
.all(sessionId, firstSequence).map((row) => requireStoredMessageSequence(row.sequence, sessionId));
|
|
3777
|
-
const highest = sequences[0];
|
|
3778
|
-
if (highest !== undefined && highest > Number.MAX_SAFE_INTEGER - amount) {
|
|
3779
|
-
throw new SessionMetadataConflictError('Session message sequence overflow');
|
|
3780
|
-
}
|
|
3781
|
-
if (sequences.length === 0)
|
|
3782
|
-
return;
|
|
3783
|
-
this.db.exec('PRAGMA defer_foreign_keys = ON');
|
|
3784
|
-
const moveChunks = this.db.prepare('UPDATE session_message_chunks SET sequence = ? WHERE session_id = ? AND sequence = ?');
|
|
3785
|
-
const movePayload = this.db.prepare('UPDATE session_message_payloads SET sequence = ? WHERE session_id = ? AND sequence = ?');
|
|
3786
|
-
const moveMessage = this.db.prepare('UPDATE session_messages SET sequence = ? WHERE session_id = ? AND sequence = ?');
|
|
3787
|
-
for (const sequence of sequences) {
|
|
3788
|
-
const shifted = sequence + amount;
|
|
3789
|
-
moveChunks.run(shifted, sessionId, sequence);
|
|
3790
|
-
const payload = movePayload.run(shifted, sessionId, sequence);
|
|
3791
|
-
if (payload.changes !== 0 && payload.changes !== 1) {
|
|
3792
|
-
throw new SessionMetadataConflictError('Message payload sequence is ambiguous');
|
|
3793
|
-
}
|
|
3794
|
-
const message = moveMessage.run(shifted, sessionId, sequence);
|
|
3795
|
-
if (message.changes !== 1) {
|
|
3796
|
-
throw new SessionMetadataConflictError('Message transcript sequence changed during repair');
|
|
3797
|
-
}
|
|
3798
|
-
}
|
|
3799
|
-
}
|
|
3800
3836
|
insertSessionMessagesSync(sessionId, firstSequence, entries) {
|
|
3801
3837
|
if (!Number.isSafeInteger(firstSequence) ||
|
|
3802
3838
|
firstSequence < 0 ||
|
|
@@ -3897,12 +3933,19 @@ export class SqliteSessionMetadataStore {
|
|
|
3897
3933
|
if (!current)
|
|
3898
3934
|
throw new SessionNotFoundError(sessionId);
|
|
3899
3935
|
const lastMessageAt = maxTimestamp(current.header.lastMessageAt, projection.lastMessageAt);
|
|
3936
|
+
// The preview refuses to move backwards for the same reason the timestamp
|
|
3937
|
+
// does: a message older than the one on show is a repair of something the
|
|
3938
|
+
// catalog already passed, and recovery replays exactly those.
|
|
3939
|
+
const stale = !replacePreview &&
|
|
3940
|
+
projection.lastMessageAt !== undefined &&
|
|
3941
|
+
current.header.lastMessageAt !== undefined &&
|
|
3942
|
+
projection.lastMessageAt < current.header.lastMessageAt;
|
|
3900
3943
|
this.updateHeaderSync(sessionId, {
|
|
3901
3944
|
...(lockConnection ? { connectionLocked: true } : {}),
|
|
3902
3945
|
...(lastMessageAt === undefined ? {} : { lastMessageAt }),
|
|
3903
3946
|
}, {
|
|
3904
3947
|
skipNoop: true,
|
|
3905
|
-
...(replacePreview || projection.lastMessagePreview !== undefined
|
|
3948
|
+
...(!stale && (replacePreview || projection.lastMessagePreview !== undefined)
|
|
3906
3949
|
? {
|
|
3907
3950
|
catalogPreview: {
|
|
3908
3951
|
kind: 'replace',
|
|
@@ -4470,6 +4513,7 @@ function decodeAgentGraphSupervisorWakeRow(row) {
|
|
|
4470
4513
|
'waiting_permission',
|
|
4471
4514
|
'delivered',
|
|
4472
4515
|
'superseded',
|
|
4516
|
+
'exhausted',
|
|
4473
4517
|
'retryable_failed',
|
|
4474
4518
|
].includes(row.status) ||
|
|
4475
4519
|
!Number.isSafeInteger(row.attemptCount) ||
|
|
@@ -4537,6 +4581,27 @@ function agentGraphScheduleUpdateRequest(update) {
|
|
|
4537
4581
|
const { revision: _revision, committedAt: _committedAt, ...request } = update;
|
|
4538
4582
|
return request;
|
|
4539
4583
|
}
|
|
4584
|
+
function archiveRetentionCandidatePredicate() {
|
|
4585
|
+
const row = sqliteArchivedTaskRowPredicate();
|
|
4586
|
+
return {
|
|
4587
|
+
// The pinned-family exclusion is deliberately uncorrelated: SQLite
|
|
4588
|
+
// evaluates the pinned family roots once, instead of rescanning
|
|
4589
|
+
// session_metadata for every candidate. The correlated form was quadratic
|
|
4590
|
+
// (about 1 s at 10k Sessions) and runs synchronously on the Host thread.
|
|
4591
|
+
// No index covers is_flagged/is_archived (migration 26 dropped them).
|
|
4592
|
+
sql: `(
|
|
4593
|
+
metadata.is_flagged = 0
|
|
4594
|
+
AND ${row.sql}
|
|
4595
|
+
AND json_type(metadata.payload_json, '$.subagentParent.graph') IS NULL
|
|
4596
|
+
AND COALESCE(metadata.revision_root_session_id, metadata.session_id) NOT IN (
|
|
4597
|
+
SELECT COALESCE(pinned.revision_root_session_id, pinned.session_id)
|
|
4598
|
+
FROM session_metadata pinned
|
|
4599
|
+
WHERE pinned.is_flagged = 1
|
|
4600
|
+
)
|
|
4601
|
+
)`,
|
|
4602
|
+
parameters: row.parameters,
|
|
4603
|
+
};
|
|
4604
|
+
}
|
|
4540
4605
|
function decodeRecord(row) {
|
|
4541
4606
|
const parsed = JSON.parse(row.payload_json);
|
|
4542
4607
|
if (!Number.isSafeInteger(row.metadata_version) ||
|
|
@@ -4555,12 +4620,22 @@ function decodeCatalogRecord(row) {
|
|
|
4555
4620
|
throw new Error(`Invalid SQLite Session catalog activity for ${row.session_id}`);
|
|
4556
4621
|
}
|
|
4557
4622
|
const lastMessagePreview = decodeCatalogPreview(row.last_message_preview, row.session_id);
|
|
4623
|
+
const archivedAt = decodeCatalogArchivedAt(row.archived_at, row.session_id);
|
|
4558
4624
|
return {
|
|
4559
4625
|
...decodeRecord(row),
|
|
4560
4626
|
activityAt: row.activity_at,
|
|
4561
4627
|
...(lastMessagePreview === undefined ? {} : { lastMessagePreview }),
|
|
4628
|
+
...(archivedAt === undefined ? {} : { archivedAt }),
|
|
4562
4629
|
};
|
|
4563
4630
|
}
|
|
4631
|
+
function decodeCatalogArchivedAt(value, sessionId) {
|
|
4632
|
+
if (value === null || value === undefined)
|
|
4633
|
+
return undefined;
|
|
4634
|
+
if (typeof value !== 'number' || !Number.isSafeInteger(value) || value < 0) {
|
|
4635
|
+
throw new Error(`Invalid SQLite Session archive time for ${sessionId}`);
|
|
4636
|
+
}
|
|
4637
|
+
return value;
|
|
4638
|
+
}
|
|
4564
4639
|
function decodeCatalogPreview(value, sessionId) {
|
|
4565
4640
|
if (value === null || value === undefined)
|
|
4566
4641
|
return undefined;
|
|
@@ -4650,20 +4725,6 @@ function requireManagedProfile(boundary) {
|
|
|
4650
4725
|
throw new Error('Expected a managed execution boundary');
|
|
4651
4726
|
return boundary.profile;
|
|
4652
4727
|
}
|
|
4653
|
-
function isCanonicalReadOnlySandboxProfile(profile) {
|
|
4654
|
-
const { name: _profileName, ...profilePolicy } = profile;
|
|
4655
|
-
const { name: _canonicalName, ...canonicalPolicy } = requireManagedProfile(createGenesisExecutionBoundary('explore'));
|
|
4656
|
-
return isDeepStrictEqual(profilePolicy, canonicalPolicy);
|
|
4657
|
-
}
|
|
4658
|
-
function assertGraphLookupIdentity(value, name) {
|
|
4659
|
-
if (typeof value !== 'string' ||
|
|
4660
|
-
value.length === 0 ||
|
|
4661
|
-
value.length > 256 ||
|
|
4662
|
-
value.trim() !== value ||
|
|
4663
|
-
/[\u0000-\u001f\u007f]/.test(value)) {
|
|
4664
|
-
throw new Error(`Invalid agent graph ${name}`);
|
|
4665
|
-
}
|
|
4666
|
-
}
|
|
4667
4728
|
function assertSafeBoundaryRequestId(value) {
|
|
4668
4729
|
if (!/^[A-Za-z0-9_-]{1,128}$/.test(value)) {
|
|
4669
4730
|
throw new Error('Invalid sandbox boundary request id');
|
|
@@ -4678,92 +4739,6 @@ function assertSandboxBoundaryProvenanceId(value, name) {
|
|
|
4678
4739
|
throw new Error(`Invalid sandbox boundary ${name}`);
|
|
4679
4740
|
}
|
|
4680
4741
|
}
|
|
4681
|
-
function assertAgentGraphSupervisorWakeClaim(request) {
|
|
4682
|
-
if (request.schemaVersion !== AGENT_GRAPH_SUPERVISOR_WAKE_SCHEMA_VERSION) {
|
|
4683
|
-
throw new Error('Invalid agent graph supervisor wake schema');
|
|
4684
|
-
}
|
|
4685
|
-
assertGraphLookupIdentity(request.graphId, 'graph id');
|
|
4686
|
-
assertGraphLookupIdentity(request.wakeId, 'supervisor wake id');
|
|
4687
|
-
assertGraphLookupIdentity(request.snapshotVersion, 'snapshot version');
|
|
4688
|
-
assertSafeSessionId(request.rootSessionId);
|
|
4689
|
-
}
|
|
4690
|
-
function assertAgentGraphSupervisorWakeAttempt(request) {
|
|
4691
|
-
assertGraphLookupIdentity(request.graphId, 'graph id');
|
|
4692
|
-
assertGraphLookupIdentity(request.wakeId, 'supervisor wake id');
|
|
4693
|
-
assertGraphLookupIdentity(request.attemptId, 'supervisor wake attempt id');
|
|
4694
|
-
assertGraphLookupIdentity(request.turnId, 'supervisor wake turn id');
|
|
4695
|
-
}
|
|
4696
|
-
function assertAgentGraphSupervisorWakeCompletion(request) {
|
|
4697
|
-
assertGraphLookupIdentity(request.graphId, 'graph id');
|
|
4698
|
-
assertGraphLookupIdentity(request.wakeId, 'supervisor wake id');
|
|
4699
|
-
assertGraphLookupIdentity(request.attemptId, 'supervisor wake attempt id');
|
|
4700
|
-
if (request.status !== 'waiting_permission' &&
|
|
4701
|
-
request.status !== 'delivered' &&
|
|
4702
|
-
request.status !== 'superseded' &&
|
|
4703
|
-
request.status !== 'retryable_failed') {
|
|
4704
|
-
throw new Error('Invalid agent graph supervisor wake completion status');
|
|
4705
|
-
}
|
|
4706
|
-
if ((request.status === 'retryable_failed' || request.status === 'superseded') &&
|
|
4707
|
-
(!request.failureReason?.trim() || request.failureReason.length > 4_000)) {
|
|
4708
|
-
throw new Error('Agent graph supervisor wake failure reason must be non-empty and bounded');
|
|
4709
|
-
}
|
|
4710
|
-
}
|
|
4711
|
-
function assertAgentGraphClientProjectionRequest(request) {
|
|
4712
|
-
if (request.schemaVersion !== AGENT_GRAPH_CLIENT_PROJECTION_SCHEMA_VERSION ||
|
|
4713
|
-
(request.expectedSnapshotVersion !== null &&
|
|
4714
|
-
typeof request.expectedSnapshotVersion !== 'string') ||
|
|
4715
|
-
typeof request.replaceOperators !== 'boolean' ||
|
|
4716
|
-
!Array.isArray(request.operators) ||
|
|
4717
|
-
!Array.isArray(request.terminalActivities) ||
|
|
4718
|
-
!Array.isArray(request.activityRecords)) {
|
|
4719
|
-
throw new Error('Invalid agent graph client projection request');
|
|
4720
|
-
}
|
|
4721
|
-
assertGraphLookupIdentity(request.graphId, 'graph id');
|
|
4722
|
-
assertSafeSessionId(request.rootSessionId);
|
|
4723
|
-
if (request.expectedSnapshotVersion !== null) {
|
|
4724
|
-
assertGraphLookupIdentity(request.expectedSnapshotVersion, 'expected snapshot version');
|
|
4725
|
-
}
|
|
4726
|
-
assertGraphLookupIdentity(request.snapshotVersion, 'snapshot version');
|
|
4727
|
-
const operatorIds = new Set();
|
|
4728
|
-
for (const operator of request.operators) {
|
|
4729
|
-
assertGraphLookupIdentity(operator.operatorId, 'operator id');
|
|
4730
|
-
if (operatorIds.has(operator.operatorId)) {
|
|
4731
|
-
throw new Error(`Duplicate agent graph client operator ${operator.operatorId}`);
|
|
4732
|
-
}
|
|
4733
|
-
operatorIds.add(operator.operatorId);
|
|
4734
|
-
}
|
|
4735
|
-
const terminalIds = new Set();
|
|
4736
|
-
for (const terminal of request.terminalActivities) {
|
|
4737
|
-
assertGraphLookupIdentity(terminal.recordId, 'terminal record id');
|
|
4738
|
-
assertGraphEventTime(terminal.eventTime);
|
|
4739
|
-
if (terminalIds.has(terminal.recordId)) {
|
|
4740
|
-
throw new Error(`Duplicate agent graph terminal activity ${terminal.recordId}`);
|
|
4741
|
-
}
|
|
4742
|
-
terminalIds.add(terminal.recordId);
|
|
4743
|
-
}
|
|
4744
|
-
const activityIds = new Set();
|
|
4745
|
-
for (const record of request.activityRecords) {
|
|
4746
|
-
assertGraphLookupIdentity(record.recordId, 'activity record id');
|
|
4747
|
-
assertGraphEventTime(record.eventTime);
|
|
4748
|
-
if (activityIds.has(record.recordId)) {
|
|
4749
|
-
throw new Error(`Duplicate agent graph activity ${record.recordId}`);
|
|
4750
|
-
}
|
|
4751
|
-
activityIds.add(record.recordId);
|
|
4752
|
-
}
|
|
4753
|
-
if (request.incrementalRecordId !== undefined) {
|
|
4754
|
-
assertGraphLookupIdentity(request.incrementalRecordId, 'incremental record id');
|
|
4755
|
-
if (request.expectedSnapshotVersion === null || !activityIds.has(request.incrementalRecordId)) {
|
|
4756
|
-
throw new Error('Invalid incremental agent graph projection record');
|
|
4757
|
-
}
|
|
4758
|
-
}
|
|
4759
|
-
}
|
|
4760
|
-
function encodeProjectionPayload(payload, name) {
|
|
4761
|
-
const encoded = JSON.stringify(payload);
|
|
4762
|
-
if (encoded === undefined) {
|
|
4763
|
-
throw new Error(`Invalid agent graph ${name} payload`);
|
|
4764
|
-
}
|
|
4765
|
-
return encoded;
|
|
4766
|
-
}
|
|
4767
4742
|
function decodeAgentGraphClientProjectionRow(row) {
|
|
4768
4743
|
if (row.schemaVersion !== AGENT_GRAPH_CLIENT_PROJECTION_SCHEMA_VERSION ||
|
|
4769
4744
|
!Number.isSafeInteger(row.materializedAt) ||
|
|
@@ -4797,16 +4772,6 @@ function decodeAgentGraphClientOperatorProjectionRow(row) {
|
|
|
4797
4772
|
materializedAt: row.materializedAt,
|
|
4798
4773
|
};
|
|
4799
4774
|
}
|
|
4800
|
-
function assertGraphEventTime(value) {
|
|
4801
|
-
if (!Number.isSafeInteger(value) || value < 0) {
|
|
4802
|
-
throw new Error('Invalid agent graph terminal activity event time');
|
|
4803
|
-
}
|
|
4804
|
-
}
|
|
4805
|
-
function assertGraphIntentId(value) {
|
|
4806
|
-
if (!/^graph_intent_[a-f0-9]{32}$/.test(value)) {
|
|
4807
|
-
throw new Error('Invalid agent graph intent id');
|
|
4808
|
-
}
|
|
4809
|
-
}
|
|
4810
4775
|
function decodeStoredMessageRow(row, sessionId) {
|
|
4811
4776
|
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
4812
4777
|
if (typeof row.record_json !== 'string') {
|
|
@@ -4822,22 +4787,6 @@ function decodeStoredMessageRow(row, sessionId) {
|
|
|
4822
4787
|
});
|
|
4823
4788
|
}
|
|
4824
4789
|
}
|
|
4825
|
-
function requireTurnLandmarkAdmittedAt(value) {
|
|
4826
|
-
if (typeof value !== 'number' || !Number.isSafeInteger(value) || value < 0) {
|
|
4827
|
-
throw new Error('Invalid root Turn admission timestamp');
|
|
4828
|
-
}
|
|
4829
|
-
return value;
|
|
4830
|
-
}
|
|
4831
|
-
function storedMessageRecordBytes(row, sessionId, sequence) {
|
|
4832
|
-
if (row.record_bytes !== null) {
|
|
4833
|
-
return requireTranscriptRecordByteLength(row.record_bytes, sessionId, sequence);
|
|
4834
|
-
}
|
|
4835
|
-
if (typeof row.record_json !== 'string' ||
|
|
4836
|
-
row.record_json === SQLITE_SESSION_MESSAGE_CHUNK_MARKER) {
|
|
4837
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
4838
|
-
}
|
|
4839
|
-
return Buffer.byteLength(row.record_json, 'utf8');
|
|
4840
|
-
}
|
|
4841
4790
|
function decodeStoredMessageRecordRow(db, sessionId, row) {
|
|
4842
4791
|
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
4843
4792
|
return decodeStoredMessageRow({
|
|
@@ -4869,6 +4818,29 @@ function readStoredMessageRecordJson(db, sessionId, sequence, row) {
|
|
|
4869
4818
|
}
|
|
4870
4819
|
return recordJson;
|
|
4871
4820
|
}
|
|
4821
|
+
function isWorkHubActionOperation(value) {
|
|
4822
|
+
return (value === 'answer_here' ||
|
|
4823
|
+
value === 'clarify' ||
|
|
4824
|
+
value === 'delegate_existing' ||
|
|
4825
|
+
value === 'create_new' ||
|
|
4826
|
+
value === 'replace' ||
|
|
4827
|
+
value === 'stop');
|
|
4828
|
+
}
|
|
4829
|
+
function workHubAssignmentAttachmentsMatchTarget(assignment) {
|
|
4830
|
+
const source = assignment.attachments ?? [];
|
|
4831
|
+
const target = assignment.targetAttachments ?? [];
|
|
4832
|
+
return (source.length === target.length &&
|
|
4833
|
+
source.every((attachment, index) => {
|
|
4834
|
+
const copied = target[index];
|
|
4835
|
+
const { ref: sourceRef, ...sourceMetadata } = attachment;
|
|
4836
|
+
const { ref: targetRef, ...targetMetadata } = copied;
|
|
4837
|
+
return (sourceRef.kind === 'session_file' &&
|
|
4838
|
+
sourceRef.sessionId === WORKHUB_COORDINATION_SESSION_ID &&
|
|
4839
|
+
targetRef.kind === 'session_file' &&
|
|
4840
|
+
targetRef.sessionId === assignment.targetSessionId &&
|
|
4841
|
+
isDeepStrictEqual(sourceMetadata, targetMetadata));
|
|
4842
|
+
}));
|
|
4843
|
+
}
|
|
4872
4844
|
function sameWorkHubAssignmentRequest(existing, requested) {
|
|
4873
4845
|
return isDeepStrictEqual({
|
|
4874
4846
|
actionId: existing.actionId,
|
|
@@ -4877,7 +4849,11 @@ function sameWorkHubAssignmentRequest(existing, requested) {
|
|
|
4877
4849
|
targetSessionId: existing.targetSessionId,
|
|
4878
4850
|
disposition: existing.disposition,
|
|
4879
4851
|
userText: existing.userText,
|
|
4852
|
+
delegationText: existing.delegationText,
|
|
4853
|
+
attachments: existing.attachments ?? [],
|
|
4880
4854
|
create: existing.create,
|
|
4855
|
+
replacesActionId: existing.replacesActionId,
|
|
4856
|
+
replacesDelegationId: existing.replacesDelegationId,
|
|
4881
4857
|
}, {
|
|
4882
4858
|
actionId: requested.actionId,
|
|
4883
4859
|
actionFingerprint: requested.actionFingerprint,
|
|
@@ -4885,34 +4861,13 @@ function sameWorkHubAssignmentRequest(existing, requested) {
|
|
|
4885
4861
|
targetSessionId: requested.targetSessionId,
|
|
4886
4862
|
disposition: requested.disposition,
|
|
4887
4863
|
userText: requested.userText,
|
|
4864
|
+
delegationText: requested.delegationText,
|
|
4865
|
+
attachments: requested.attachments ?? [],
|
|
4888
4866
|
create: requested.create,
|
|
4867
|
+
replacesActionId: requested.replacesActionId,
|
|
4868
|
+
replacesDelegationId: requested.replacesDelegationId,
|
|
4889
4869
|
});
|
|
4890
4870
|
}
|
|
4891
|
-
function foldTurnContribution(current, turnId, sequence, message) {
|
|
4892
|
-
const contribution = current ?? {
|
|
4893
|
-
turnId,
|
|
4894
|
-
firstSequence: sequence,
|
|
4895
|
-
latestState: null,
|
|
4896
|
-
userPromptPreview: null,
|
|
4897
|
-
hasAssistantMessage: false,
|
|
4898
|
-
hasAssistantOutput: false,
|
|
4899
|
-
hasToolResult: false,
|
|
4900
|
-
hasFailedToolResult: false,
|
|
4901
|
-
hasAbortNote: false,
|
|
4902
|
-
};
|
|
4903
|
-
const userPrompt = message.type === 'user' ? (message.displayText ?? message.text).trim() : '';
|
|
4904
|
-
return {
|
|
4905
|
-
...contribution,
|
|
4906
|
-
latestState: message.type === 'turn_state' ? { sequence, message } : contribution.latestState,
|
|
4907
|
-
userPromptPreview: contribution.userPromptPreview ?? (userPrompt || null),
|
|
4908
|
-
hasAssistantMessage: contribution.hasAssistantMessage || message.type === 'assistant',
|
|
4909
|
-
hasAssistantOutput: contribution.hasAssistantOutput ||
|
|
4910
|
-
(message.type === 'assistant' && message.text.trim().length > 0),
|
|
4911
|
-
hasToolResult: contribution.hasToolResult || message.type === 'tool_result',
|
|
4912
|
-
hasFailedToolResult: contribution.hasFailedToolResult || (message.type === 'tool_result' && message.isError),
|
|
4913
|
-
hasAbortNote: contribution.hasAbortNote || (message.type === 'system_note' && message.kind === 'abort'),
|
|
4914
|
-
};
|
|
4915
|
-
}
|
|
4916
4871
|
function readStoredMessageRows(db, sessionId, sequences, placeholders = sequences.map(() => '?').join(', ')) {
|
|
4917
4872
|
if (sequences.length === 0)
|
|
4918
4873
|
return [];
|
|
@@ -4979,173 +4934,9 @@ function nullableStoredMessageSequence(value, sessionId) {
|
|
|
4979
4934
|
return null;
|
|
4980
4935
|
return requireStoredMessageSequence(value, sessionId);
|
|
4981
4936
|
}
|
|
4982
|
-
function requireTranscriptPayloadDigest(value, sessionId, sequence) {
|
|
4983
|
-
if (typeof value !== 'string' || !/^[0-9a-f]{64}$/.test(value)) {
|
|
4984
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
4985
|
-
}
|
|
4986
|
-
return `sha256:${value}`;
|
|
4987
|
-
}
|
|
4988
4937
|
function requireTranscriptRecordByteLength(value, sessionId, sequence) {
|
|
4989
4938
|
if (!Number.isSafeInteger(value) || value < 1) {
|
|
4990
4939
|
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
4991
4940
|
}
|
|
4992
4941
|
return value;
|
|
4993
4942
|
}
|
|
4994
|
-
function readTranscriptSlices(db, sessionId, slices) {
|
|
4995
|
-
if (slices.length === 0)
|
|
4996
|
-
return new Map();
|
|
4997
|
-
const chunkedSlices = slices.filter((slice) => slice.chunked);
|
|
4998
|
-
const values = chunkedSlices.map(() => '(?, ?, ?)').join(', ');
|
|
4999
|
-
const parameters = chunkedSlices.flatMap((slice) => [
|
|
5000
|
-
slice.sequence,
|
|
5001
|
-
Math.floor(slice.byteOffset / SQLITE_SESSION_MESSAGE_CHUNK_BYTES),
|
|
5002
|
-
Math.floor((slice.byteOffset + slice.byteLength - 1) / SQLITE_SESSION_MESSAGE_CHUNK_BYTES),
|
|
5003
|
-
]);
|
|
5004
|
-
const rows = chunkedSlices.length === 0
|
|
5005
|
-
? []
|
|
5006
|
-
: db
|
|
5007
|
-
.prepare(`
|
|
5008
|
-
WITH requested(sequence, first_chunk, last_chunk) AS (VALUES ${values})
|
|
5009
|
-
SELECT requested.sequence, chunk.chunk_index, chunk.data, chunk.sha256
|
|
5010
|
-
FROM requested
|
|
5011
|
-
INNER JOIN session_message_chunks AS chunk
|
|
5012
|
-
ON chunk.session_id = ?
|
|
5013
|
-
AND chunk.sequence = requested.sequence
|
|
5014
|
-
AND chunk.chunk_index BETWEEN requested.first_chunk AND requested.last_chunk
|
|
5015
|
-
ORDER BY requested.sequence, chunk.chunk_index
|
|
5016
|
-
`)
|
|
5017
|
-
.all(...parameters, sessionId);
|
|
5018
|
-
const rowsBySequence = new Map();
|
|
5019
|
-
for (const row of rows) {
|
|
5020
|
-
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
5021
|
-
const grouped = rowsBySequence.get(sequence);
|
|
5022
|
-
if (grouped)
|
|
5023
|
-
grouped.push(row);
|
|
5024
|
-
else
|
|
5025
|
-
rowsBySequence.set(sequence, [row]);
|
|
5026
|
-
}
|
|
5027
|
-
const result = new Map();
|
|
5028
|
-
for (const slice of slices) {
|
|
5029
|
-
if (!slice.chunked)
|
|
5030
|
-
continue;
|
|
5031
|
-
const selected = rowsBySequence.get(slice.sequence) ?? [];
|
|
5032
|
-
const firstChunk = Math.floor(slice.byteOffset / SQLITE_SESSION_MESSAGE_CHUNK_BYTES);
|
|
5033
|
-
const lastChunk = Math.floor((slice.byteOffset + slice.byteLength - 1) / SQLITE_SESSION_MESSAGE_CHUNK_BYTES);
|
|
5034
|
-
if (selected.length !== lastChunk - firstChunk + 1) {
|
|
5035
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, slice.sequence);
|
|
5036
|
-
}
|
|
5037
|
-
const chunks = [];
|
|
5038
|
-
for (let index = 0; index < selected.length; index += 1) {
|
|
5039
|
-
const row = selected[index];
|
|
5040
|
-
if (row.chunk_index !== firstChunk + index ||
|
|
5041
|
-
!(row.data instanceof Uint8Array) ||
|
|
5042
|
-
typeof row.sha256 !== 'string') {
|
|
5043
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, slice.sequence);
|
|
5044
|
-
}
|
|
5045
|
-
const chunk = Buffer.from(row.data);
|
|
5046
|
-
if (createHash('sha256').update(chunk).digest('hex') !== row.sha256) {
|
|
5047
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, slice.sequence);
|
|
5048
|
-
}
|
|
5049
|
-
chunks.push(chunk);
|
|
5050
|
-
}
|
|
5051
|
-
const joined = Buffer.concat(chunks);
|
|
5052
|
-
const start = slice.byteOffset - firstChunk * SQLITE_SESSION_MESSAGE_CHUNK_BYTES;
|
|
5053
|
-
const data = joined.subarray(start, start + slice.byteLength);
|
|
5054
|
-
if (data.byteLength !== slice.byteLength) {
|
|
5055
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, slice.sequence);
|
|
5056
|
-
}
|
|
5057
|
-
result.set(slice.sequence, data);
|
|
5058
|
-
}
|
|
5059
|
-
const inlineSlices = slices.filter((slice) => !slice.chunked);
|
|
5060
|
-
if (inlineSlices.length > 0) {
|
|
5061
|
-
const inlineValues = inlineSlices.map(() => '(?, ?, ?)').join(', ');
|
|
5062
|
-
const inlineParameters = inlineSlices.flatMap((slice) => [
|
|
5063
|
-
slice.sequence,
|
|
5064
|
-
slice.byteOffset + 1,
|
|
5065
|
-
slice.byteLength,
|
|
5066
|
-
]);
|
|
5067
|
-
const inlineRows = db
|
|
5068
|
-
.prepare(`
|
|
5069
|
-
WITH requested(sequence, byte_start, byte_length) AS (VALUES ${inlineValues})
|
|
5070
|
-
SELECT requested.sequence,
|
|
5071
|
-
substr(CAST(message.record_json AS BLOB), requested.byte_start, requested.byte_length)
|
|
5072
|
-
AS data
|
|
5073
|
-
FROM requested
|
|
5074
|
-
INNER JOIN session_messages AS message
|
|
5075
|
-
ON message.session_id = ? AND message.sequence = requested.sequence
|
|
5076
|
-
`)
|
|
5077
|
-
.all(...inlineParameters, sessionId);
|
|
5078
|
-
for (const row of inlineRows) {
|
|
5079
|
-
const sequence = requireStoredMessageSequence(row.sequence, sessionId);
|
|
5080
|
-
if (!(row.data instanceof Uint8Array)) {
|
|
5081
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence);
|
|
5082
|
-
}
|
|
5083
|
-
result.set(sequence, Buffer.from(row.data));
|
|
5084
|
-
}
|
|
5085
|
-
}
|
|
5086
|
-
return result;
|
|
5087
|
-
}
|
|
5088
|
-
function validateTranscriptRecord(data, sessionId, sequence) {
|
|
5089
|
-
try {
|
|
5090
|
-
decodeStoredMessage(markPersisted(JSON.parse(typeof data === 'string' ? data : data.toString('utf8'))));
|
|
5091
|
-
}
|
|
5092
|
-
catch (error) {
|
|
5093
|
-
throw new StoredSessionMessageIncompatibleError(sessionId, sequence, {
|
|
5094
|
-
cause: error,
|
|
5095
|
-
});
|
|
5096
|
-
}
|
|
5097
|
-
}
|
|
5098
|
-
function assertTranscriptPageRequest(request) {
|
|
5099
|
-
if (request.direction !== 'older' && request.direction !== 'newer') {
|
|
5100
|
-
throw new Error('Invalid Session transcript page direction');
|
|
5101
|
-
}
|
|
5102
|
-
if (request.throughSequence !== undefined &&
|
|
5103
|
-
request.throughSequence !== null &&
|
|
5104
|
-
(!Number.isSafeInteger(request.throughSequence) || request.throughSequence < 0)) {
|
|
5105
|
-
throw new Error('Invalid Session transcript watermark');
|
|
5106
|
-
}
|
|
5107
|
-
if (request.position !== undefined &&
|
|
5108
|
-
(!Number.isSafeInteger(request.position) || request.position < 0)) {
|
|
5109
|
-
throw new Error('Invalid Session transcript position');
|
|
5110
|
-
}
|
|
5111
|
-
if (request.byteOffset !== undefined &&
|
|
5112
|
-
(request.position === undefined ||
|
|
5113
|
-
!Number.isSafeInteger(request.byteOffset) ||
|
|
5114
|
-
request.byteOffset < 0)) {
|
|
5115
|
-
throw new Error('Invalid Session transcript byte offset');
|
|
5116
|
-
}
|
|
5117
|
-
if (!Number.isSafeInteger(request.maxBytes) ||
|
|
5118
|
-
request.maxBytes < 1 ||
|
|
5119
|
-
request.maxBytes > 1024 * 1024) {
|
|
5120
|
-
throw new Error('Session transcript page byte limit must be between 1 and 1048576');
|
|
5121
|
-
}
|
|
5122
|
-
if (!Number.isSafeInteger(request.maxMessages) ||
|
|
5123
|
-
request.maxMessages < 1 ||
|
|
5124
|
-
request.maxMessages > 256) {
|
|
5125
|
-
throw new Error('Session transcript page message limit must be between 1 and 256');
|
|
5126
|
-
}
|
|
5127
|
-
}
|
|
5128
|
-
function assertTranscriptRecordScanRequest(request) {
|
|
5129
|
-
if (request.direction !== 'older' && request.direction !== 'newer') {
|
|
5130
|
-
throw new Error('Invalid Session transcript record direction');
|
|
5131
|
-
}
|
|
5132
|
-
if (request.throughSequence !== undefined &&
|
|
5133
|
-
request.throughSequence !== null &&
|
|
5134
|
-
(!Number.isSafeInteger(request.throughSequence) || request.throughSequence < 0)) {
|
|
5135
|
-
throw new Error('Invalid Session transcript watermark');
|
|
5136
|
-
}
|
|
5137
|
-
if (request.position !== undefined &&
|
|
5138
|
-
(!Number.isSafeInteger(request.position) || request.position < 0)) {
|
|
5139
|
-
throw new Error('Invalid Session transcript position');
|
|
5140
|
-
}
|
|
5141
|
-
if (!Number.isSafeInteger(request.maxStoredBytes) ||
|
|
5142
|
-
request.maxStoredBytes < 1 ||
|
|
5143
|
-
request.maxStoredBytes > 16 * 1024 * 1024) {
|
|
5144
|
-
throw new Error('Invalid Session transcript record byte limit');
|
|
5145
|
-
}
|
|
5146
|
-
if (!Number.isSafeInteger(request.maxMessages) ||
|
|
5147
|
-
request.maxMessages < 1 ||
|
|
5148
|
-
request.maxMessages > 256) {
|
|
5149
|
-
throw new Error('Invalid Session transcript record count limit');
|
|
5150
|
-
}
|
|
5151
|
-
}
|