@xopcai/xopc 0.0.391 → 0.0.393
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/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CzS0TUv9.js → agent-avatar-dicebear-1AF2KGju.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CPJr7NRR.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-cjJXJj_3.js +1 -0
- package/dist/gateway/static/root/assets/agents-DW3TlnIg.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-Bb3Kvz3X.js → agents-admin-api-B5aykqg_.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-BV_eGr7l.js +1 -0
- package/dist/gateway/static/root/assets/app-management-settings-panel-B_MFhXXU.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-TYGidVnd.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-DOkyvOF0.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-DFnHPNie.js → archive-plugin-BrFfEp0u.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CnBLPVNh.js → automations-page-B7OofUPF.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DIod-bfm.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BQC0Tzoi.js → binary-plugins-BfAWnYG8.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DSh5019z.js → block-editor-_Y-QwZ-3.js} +5 -5
- package/dist/gateway/static/root/assets/browser-automation-inputs-DH9QHI9m.js +1 -0
- package/dist/gateway/static/root/assets/browser-automations-page-B_SnD9B0.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BPlqYpMM.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-page-BtzZvMIK.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-pt2M56-E.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-WzoG3oBb.js +8 -0
- package/dist/gateway/static/root/assets/capability-header-actions-CFVx3iaZ.js +1 -0
- package/dist/gateway/static/root/assets/channels-BXA55GY2.js +1 -0
- package/dist/gateway/static/root/assets/chat-terminal-dock-D3GuiG3N.js +36 -0
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE--EKdQGRF.js → chunk-KS7C4IRE-B2HK1psj.js} +2 -2
- package/dist/gateway/static/root/assets/computer-settings-page-CIbHDlp8.js +1 -0
- package/dist/gateway/static/root/assets/connector-service-page-CDyCHkpK.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-DA2b6cJu.js +1 -0
- package/dist/gateway/static/root/assets/date-picker-C424c_g9.js +1 -0
- package/dist/gateway/static/root/assets/dependency-picker-BVJh9sYc.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-Q52A8vjp.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-CZr1CXxu.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-Bd-aOI7N.js +30 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BuB0g8zv.css +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-D_WWTsze.js +1 -0
- package/dist/gateway/static/root/assets/directory-picker-path-field-C6cUgrvg.js +1 -0
- package/dist/gateway/static/root/assets/echarts-runtime-tcHc9TOS.js +18 -0
- package/dist/gateway/static/root/assets/extension-debug-page-DyyfC4gA.js +1 -0
- package/dist/gateway/static/root/assets/extension-page-Dho9o3ZZ.js +1 -0
- package/dist/gateway/static/root/assets/extension-settings-page-CdnIGyCH.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-Dv_A5FMu.js → gateway-config-swr-BEePO3Wl.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DghCGfY_.js → gateway-realtime-Dng_VOvI.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DtlBf7oH.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-D0KSQRNZ.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CkTVSESs.js → gateway-startup-retry-CDCiy7Cd.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-DV2wNqBn.js → highlighted-body-KQOG7T2V-BNpj_mIM.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CH_A0W29.js +2 -0
- package/dist/gateway/static/root/assets/image-generation-api-DwkO2y46.js +1 -0
- package/dist/gateway/static/root/assets/imports-page-BrYvomnU.js +1 -0
- package/dist/gateway/static/root/assets/index-CKdOZoVu.js +260 -0
- package/dist/gateway/static/root/assets/index-Rxjt-jc3.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-BveDYfYk.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-CcIi1BhT.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-B1a69mlV.js +1 -0
- package/dist/gateway/static/root/assets/local-session-drafts-CYEDUPH7.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-BpK9AiDq.js → locale-store-CE7L6MlS.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-Us1jv3C4.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-C9RAM7-s.js +1 -0
- package/dist/gateway/static/root/assets/markdown-view-PrKvVpRh.js +324 -0
- package/dist/gateway/static/root/assets/{media-plugins-oSChWbcP.js → media-plugins-CR1fp6IL.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-DQdcaMiu.js +1 -0
- package/dist/gateway/static/root/assets/messages-CaeL_miw.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-Q4yRx9iZ.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C9qu16IN.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-Cn_WK68Y.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-DrP6hEcg.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-3NbiWGRG.js +1 -0
- package/dist/gateway/static/root/assets/product-delivery-DwmnNJvk.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-KKE5-V8k.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-content-BM0oqNxi.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-CPZrwf8n.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Besfx_07.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-Dsa2LvRt.js → registry-api-BO2Ck3aA.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CTDghL5L.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-C2Uw89eY.js → runtime-tools-api-B1sb8nlw.js} +1 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-W0X_Fy7b.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-DNM2Zdyr.js +1 -0
- package/dist/gateway/static/root/assets/{session-api-ga-SUOq_.js → session-api-CaAUJvu1.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-DoFTlgNz.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-Dxtablvd.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7zklouD.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-DCSHPFAN.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-DPCgrICd.js → settings-page-B18UbbaJ.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-JoSfluza.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-BLnS3hoH.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-DcIuPJK3.js +1 -0
- package/dist/gateway/static/root/assets/skill-api-CcYGkRPL.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-PnUZjoPK.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-D3JAw62U.js +2 -0
- package/dist/gateway/static/root/assets/style-BQqU-1pP.js +7 -0
- package/dist/gateway/static/root/assets/system-settings-panel-C974myUM.js +1 -0
- package/dist/gateway/static/root/assets/tab-completion-input-CxtEp0aP.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-CiljFekC.js +2 -0
- package/dist/gateway/static/root/assets/{task-expandable-content-DAZGz5YC.js → task-expandable-content-DTEVoNrM.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-DEE75MUn.js +1 -0
- package/dist/gateway/static/root/assets/tunnel-api-DWyI3uA3.js +1 -0
- package/dist/gateway/static/root/assets/usage-page-DJYvbxk7.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-CY0YuljR.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-eHZJD6Fw.js +2 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-BNG4ixJE.js +1 -0
- package/dist/gateway/static/root/assets/{voice-config-api-Dl39b27p.js → voice-config-api-D0Wscn9W.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-CohIoAre.js +1 -0
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-BXI8eyYh.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-CVti0u-l.js +6 -0
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-C_COnY_B.js +1 -0
- package/dist/gateway/static/root/index.html +22 -72
- package/dist/gateway/static/root/notification-sw.js +0 -15
- package/dist/package.js +1 -1
- package/dist/packages/computer-control-contract/src/index.js +8 -0
- package/dist/packages/gateway-contract/src/app-context.js +0 -1
- package/dist/packages/gateway-contract/src/capabilities.js +2 -249
- package/dist/packages/gateway-contract/src/home.js +0 -5
- package/dist/packages/gateway-contract/src/index.js +0 -4
- package/dist/packages/gateway-contract/src/notifications.js +0 -11
- package/dist/packages/gateway-contract/src/product-delivery.js +0 -2
- package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
- package/dist/src/agent/agent-manager.d.ts +1 -3
- package/dist/src/agent/agent-manager.js +8 -18
- package/dist/src/agent/child-agent-factory.d.ts +2 -1
- package/dist/src/agent/child-agent-factory.js +2 -1
- package/dist/src/agent/coding/projectEvidence.d.ts +9 -0
- package/dist/src/agent/coding/projectEvidence.js +177 -0
- package/dist/src/agent/coding/repository-instructions.d.ts +8 -1
- package/dist/src/agent/coding/repository-instructions.js +9 -4
- package/dist/src/agent/coding/run-verification.d.ts +17 -2
- package/dist/src/agent/coding/run-verification.js +82 -12
- package/dist/src/agent/coding/workspace-revision.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/execution-context.d.ts +1 -0
- package/dist/src/agent/embedded/execution-context.js +4 -1
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -0
- package/dist/src/agent/embedded/run-turn.js +41 -5
- package/dist/src/agent/embedded/session-runner.js +1 -1
- package/dist/src/agent/embedded/session-tool-result-guard.js +5 -0
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +2 -1
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/independent-execution.d.ts +2 -0
- package/dist/src/agent/independent-execution.js +12 -0
- package/dist/src/agent/mcp/connection-drafts.js +15 -10
- package/dist/src/agent/memory/compaction.js +1 -1
- package/dist/src/agent/orchestration/delegation-scope.d.ts +1 -0
- package/dist/src/agent/orchestration/delegation-scope.js +4 -1
- package/dist/src/agent/orchestration/loop-guard.js +6 -2
- package/dist/src/agent/prompt/sections/agent-identity.js +3 -2
- package/dist/src/agent/prompt/sections/behavior.d.ts +3 -2
- package/dist/src/agent/prompt/sections/behavior.js +35 -25
- package/dist/src/agent/prompt/sections/memory-skills.d.ts +1 -1
- package/dist/src/agent/prompt/sections/memory-skills.js +10 -11
- package/dist/src/agent/prompt/sections/messaging-runtime.d.ts +3 -2
- package/dist/src/agent/prompt/sections/messaging-runtime.js +21 -24
- package/dist/src/agent/prompt/sections/response-language.js +7 -5
- package/dist/src/agent/prompt/sections/tooling.js +11 -10
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -1
- package/dist/src/agent/prompt/system-prompt-params.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt-params.js +2 -0
- package/dist/src/agent/prompt/system-prompt.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt.js +21 -18
- package/dist/src/agent/prompt/types.d.ts +2 -0
- package/dist/src/agent/service.js +1 -1
- package/dist/src/agent/service.types.d.ts +0 -2
- package/dist/src/agent/skills/format-skills-prompt.js +5 -2
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +9 -1
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +6 -48
- package/dist/src/agent/tools/computer-use-tool.js +17 -3
- package/dist/src/agent/tools/dataBatch.d.ts +1 -0
- package/dist/src/agent/tools/dataBatch.js +4 -1
- package/dist/src/agent/tools/delegate-tool.d.ts +1 -0
- package/dist/src/agent/tools/delegate-tool.js +1 -0
- package/dist/src/agent/tools/error-tracker.js +4 -2
- package/dist/src/agent/tools/exec-command.js +4 -3
- package/dist/src/agent/tools/factory.d.ts +1 -2
- package/dist/src/agent/tools/factory.js +20 -22
- package/dist/src/agent/tools/{delegation-parent-policy.d.ts → noninteractive-tool-policy.d.ts} +1 -1
- package/dist/src/agent/tools/{delegation-parent-policy.js → noninteractive-tool-policy.js} +4 -4
- package/dist/src/agent/tools/personal-task-tool.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/search/cache.d.ts +3 -1
- package/dist/src/agent/tools/search/cache.js +4 -1
- package/dist/src/agent/tools/search/providers/deepseek-protocol.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek-protocol.js +84 -0
- package/dist/src/agent/tools/search/providers/deepseek.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek.js +55 -0
- package/dist/src/agent/tools/search/providers/xopc-cloud.d.ts +2 -1
- package/dist/src/agent/tools/search/providers/xopc-cloud.js +36 -1
- package/dist/src/agent/tools/search/registry.d.ts +1 -0
- package/dist/src/agent/tools/search/registry.js +32 -6
- package/dist/src/agent/tools/search/request-gate.d.ts +13 -0
- package/dist/src/agent/tools/search/request-gate.js +41 -0
- package/dist/src/agent/tools/search/resolve-config.js +1 -1
- package/dist/src/agent/tools/search/search-info.d.ts +8 -0
- package/dist/src/agent/tools/search/search-info.js +34 -0
- package/dist/src/agent/tools/search/types.d.ts +19 -1
- package/dist/src/agent/tools/toolExposure.d.ts +3 -0
- package/dist/src/agent/tools/toolExposure.js +25 -0
- package/dist/src/agent/tools/web.js +8 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +2 -4
- package/dist/src/agent/tools/xopc-use-tool.js +11 -135
- package/dist/src/agent/workflow/builtins/index.js +98 -0
- package/dist/src/agent/workflow/subagent-runner.d.ts +1 -0
- package/dist/src/agent/workflow/subagent-runner.js +3 -3
- package/dist/src/agent/workflow/types.d.ts +3 -2
- package/dist/src/agent/workflow/workflow-child-tools.js +13 -8
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +1 -2
- package/dist/src/automations/domain/validation.d.ts +8 -8
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -1
- package/dist/src/automations/events/event-catalog.js +0 -18
- package/dist/src/backup/archive.js +1 -2
- package/dist/src/capabilities/runtime/app-context.js +2 -6
- package/dist/src/capabilities/runtime/product.d.ts +1 -3
- package/dist/src/capabilities/runtime/product.js +0 -6
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/search.d.ts +2 -2
- package/dist/src/cli/commands/search.js +8 -6
- package/dist/src/computer/config.d.ts +1 -0
- package/dist/src/computer/config.js +1 -0
- package/dist/src/computer/diagnostics.d.ts +223 -0
- package/dist/src/computer/diagnostics.js +360 -0
- package/dist/src/computer/errors.d.ts +1 -1
- package/dist/src/computer/errors.js +8 -1
- package/dist/src/computer/evaluation-comparison.d.ts +125 -0
- package/dist/src/computer/evaluation-comparison.js +65 -0
- package/dist/src/computer/evaluation-harness.d.ts +2 -1
- package/dist/src/computer/evaluation-harness.js +59 -8
- package/dist/src/computer/evaluation.d.ts +102 -7
- package/dist/src/computer/evaluation.js +64 -15
- package/dist/src/computer/flows.d.ts +62 -0
- package/dist/src/computer/flows.js +158 -0
- package/dist/src/computer/model-adapter.d.ts +11 -0
- package/dist/src/computer/model-adapter.js +156 -11
- package/dist/src/computer/model-policy.d.ts +1 -1
- package/dist/src/computer/model-policy.js +13 -6
- package/dist/src/computer/release-gate.d.ts +11 -0
- package/dist/src/computer/runtime.d.ts +27 -2
- package/dist/src/computer/runtime.js +261 -44
- package/dist/src/computer/semantic-actions.d.ts +3 -0
- package/dist/src/computer/semantic-actions.js +29 -0
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/models-json.d.ts +14 -8
- package/dist/src/config/models-json.js +2 -0
- package/dist/src/config/outbound-proxy.d.ts +11 -0
- package/dist/src/config/outbound-proxy.js +30 -0
- package/dist/src/config/rules.js +5 -0
- package/dist/src/config/schema.d.ts +25 -10
- package/dist/src/config/schema.js +21 -10
- package/dist/src/connectors/cli/authorization.d.ts +1 -1
- package/dist/src/connectors/cli/store.d.ts +1 -1
- package/dist/src/endpoint-tools/invocation-service.js +5 -0
- package/dist/src/gateway/config-tools-web.js +15 -4
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +3 -0
- package/dist/src/gateway/hono/app.d.ts +0 -2
- package/dist/src/gateway/hono/app.js +1 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +6 -3
- package/dist/src/gateway/hono/lib/config-payload.js +5 -1
- package/dist/src/gateway/hono/routes/capability-operations.js +0 -7
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +7 -0
- package/dist/src/gateway/hono/routes/deps.d.ts +0 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +0 -8
- package/dist/src/gateway/hono/routes/models.js +5 -2
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
- package/dist/src/gateway/service/config-coordinator.d.ts +8 -5
- package/dist/src/gateway/service/session-input-coordinator.js +1 -1
- package/dist/src/gateway/service.d.ts +0 -3
- package/dist/src/gateway/service.js +10 -44
- package/dist/src/home-intelligence/generator.js +1 -1
- package/dist/src/home-intelligence/policy.js +0 -5
- package/dist/src/home-intelligence/repository.d.ts +1 -1
- package/dist/src/infra/domain-outbox-dispatcher.js +1 -1
- package/dist/src/infra/http-proxy-env.d.ts +3 -0
- package/dist/src/infra/http-proxy-env.js +22 -2
- package/dist/src/notifications/service.d.ts +2 -18
- package/dist/src/notifications/service.js +8 -39
- package/dist/src/notifications/store.d.ts +0 -1
- package/dist/src/notifications/store.js +1 -4
- package/dist/src/personal-agent/communication.d.ts +2 -1
- package/dist/src/personal-agent/communication.js +11 -2
- package/dist/src/personal-agent/persona.d.ts +2 -1
- package/dist/src/personal-agent/persona.js +3 -2
- package/dist/src/personal-agent/prompts.d.ts +2 -0
- package/dist/src/personal-agent/prompts.js +69 -7
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/reply-style.d.ts +4 -2
- package/dist/src/personal-agent/reply-style.js +19 -3
- package/dist/src/personal-agent/request-service.js +14 -9
- package/dist/src/pets/loopi-artwork.d.ts +2 -0
- package/dist/src/pets/loopi-artwork.js +36 -0
- package/dist/src/pets/pointer.d.ts +6 -0
- package/dist/src/pets/pointer.js +16 -0
- package/dist/src/platform/contracts.d.ts +3 -3
- package/dist/src/project-trust/trust-store.d.ts +5 -0
- package/dist/src/project-trust/trust-store.js +7 -1
- package/dist/src/providers/index.js +3 -3
- package/dist/src/providers/model-registry.js +2 -0
- package/dist/src/providers/model-supplements.d.ts +0 -2
- package/dist/src/providers/model-supplements.js +2 -18
- package/dist/src/providers/xopc-cloud-credit-budget.d.ts +1 -0
- package/dist/src/providers/xopc-cloud-credit-budget.js +4 -1
- package/dist/src/realtime/compact-run-event.js +17 -2
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/session-key.js +1 -1
- package/dist/src/session/compact-history.js +16 -6
- package/dist/src/storage/sqlite/connection.js +2 -2
- package/dist/src/storage/sqlite/conversation-repository.js +1 -1
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +0 -2
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +8 -18
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +28 -33
- package/dist/src/storage/sqlite/migrations/errors.js +1 -1
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +5 -40
- package/dist/src/storage/sqlite/migrations/types.d.ts +0 -2
- package/dist/src/storage/sqlite/schema.d.ts +1 -3
- package/dist/src/storage/sqlite/schema.js +4 -8
- package/dist/src/storage/sqlite/schema.sql +1356 -1282
- package/dist/src/tasks/capabilities/management.d.ts +2 -2
- package/dist/src/tasks/capabilities/relations.d.ts +4 -4
- package/dist/src/tasks/capabilities/write.d.ts +4 -4
- package/dist/src/tasks/task-allocation-service.js +51 -40
- package/dist/src/tasks/task-application-service.js +5 -1
- package/dist/src/tasks/task-contract-planner.js +21 -6
- package/dist/src/tasks/task-language.d.ts +2 -0
- package/dist/src/tasks/task-language.js +13 -2
- package/dist/src/tasks/task-research-result.d.ts +2 -2
- package/dist/src/tasks/task-run-coordinator.js +5 -1
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/usage/scenario-registry.js +0 -5
- package/dist/src/usage/types.d.ts +1 -1
- package/dist/src/work-discovery/probe.js +1 -1
- package/dist/src/workflows/domain/definition.d.ts +1 -0
- package/dist/src/workflows/service/workflow-run-service.js +2 -1
- package/package.json +10 -6
- package/skills/THIRD_PARTY_NOTICES.md +0 -6
- package/skills/creative/chat-charts/SKILL.md +26 -0
- package/skills/creative/chat-charts/references/bar-example.json +10 -0
- package/skills/creative/chat-charts/references/chart-spec.md +25 -0
- package/skills/creative/chat-charts/references/line-example.json +13 -0
- package/dist/gateway/static/root/assets/activity-YogQEteU.js +0 -1
- package/dist/gateway/static/root/assets/activity-store-DWQCDi8M.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DE910MyU.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-0SlvsYl7.js +0 -1
- package/dist/gateway/static/root/assets/agents-BZh28Qn1.js +0 -77
- package/dist/gateway/static/root/assets/app-chrome-BeB4KgOf.js +0 -1
- package/dist/gateway/static/root/assets/app-link-4gpFbdsr.js +0 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-9A7JN5V5.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-BPdLEo6L.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-Cz7LypV9.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BBjS-sk-.js +0 -6
- package/dist/gateway/static/root/assets/browser-automation-inputs-C5tIrIRL.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-CFCMNfJN.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-C__tyPwu.js +0 -3
- package/dist/gateway/static/root/assets/button-aIC072nz.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-D6RJG4QY.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-DGEmBQnF.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-B5AZa7ir.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-Dskz2_bh.js +0 -8
- package/dist/gateway/static/root/assets/capability-header-actions-xzjWZVbg.js +0 -1
- package/dist/gateway/static/root/assets/channels-DRse_dD3.js +0 -1
- package/dist/gateway/static/root/assets/chat-terminal-dock-CQF0M4kE.js +0 -36
- package/dist/gateway/static/root/assets/chevron-left-DqFhpbvK.js +0 -1
- package/dist/gateway/static/root/assets/chevron-right-BweFrslA.js +0 -1
- package/dist/gateway/static/root/assets/circle-alert-BEjgurr2.js +0 -1
- package/dist/gateway/static/root/assets/circle-dashed-8qMD7gHf.js +0 -1
- package/dist/gateway/static/root/assets/circle-dot-BAseJTrF.js +0 -1
- package/dist/gateway/static/root/assets/cloud-C4-yfnnk.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-ZfzCTS0N.js +0 -1
- package/dist/gateway/static/root/assets/connector-service-page-CwAeWVLK.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CanakKaj.js +0 -1
- package/dist/gateway/static/root/assets/copy-text-row-C7egVuKr.js +0 -1
- package/dist/gateway/static/root/assets/date-formatters-CUZAyDEg.js +0 -1
- package/dist/gateway/static/root/assets/date-picker-hmJlEAQZ.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-Us_Juz6I.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-CvOTI4uw.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-DYg-Gb8t.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BP6iMVw1.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-B1FbZ8C1.js +0 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-DZN9EDvM.js +0 -1
- package/dist/gateway/static/root/assets/dist-C3DSFZCi.js +0 -1
- package/dist/gateway/static/root/assets/electron-env-Dit0bHgy.js +0 -1
- package/dist/gateway/static/root/assets/extension-debug-page-YIibp6Kk.js +0 -1
- package/dist/gateway/static/root/assets/extension-page-DkcGyb28.js +0 -1
- package/dist/gateway/static/root/assets/extension-provider-B1PQGTtY.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-C_rJiSKo.js +0 -1
- package/dist/gateway/static/root/assets/form-field-width-DJw_jULe.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CMJVSnvi.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CjCWPHNJ.js +0 -1
- package/dist/gateway/static/root/assets/globe-DSSGFWFn.js +0 -1
- package/dist/gateway/static/root/assets/home-page-fAYsd7kG.js +0 -2
- package/dist/gateway/static/root/assets/image-generation-api-B98iXt6A.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-DoBCBN8G.js +0 -1
- package/dist/gateway/static/root/assets/index-DFgXwLsv.js +0 -260
- package/dist/gateway/static/root/assets/index-a6ZvhclR.css +0 -1
- package/dist/gateway/static/root/assets/index.module-Cd9ENXfk.js +0 -1
- package/dist/gateway/static/root/assets/interaction-BdhHBbYa.js +0 -1
- package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-DXVu4lqV.js +0 -1
- package/dist/gateway/static/root/assets/loader-circle-CifKLtgG.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-B3fz6uRi.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-page-BC6xhmUh.js +0 -1
- package/dist/gateway/static/root/assets/local-session-drafts-DFnZQu9A.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-CSqSFDRU.js +0 -2
- package/dist/gateway/static/root/assets/loopi-C09I2mNj.css +0 -1
- package/dist/gateway/static/root/assets/loopi-Djb8XU3l.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-gq5L0THs.js +0 -1
- package/dist/gateway/static/root/assets/markdown-view-IsYTotu6.js +0 -324
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-C_QKwqDN.js +0 -1
- package/dist/gateway/static/root/assets/message-square-plus-XP0tGdlV.js +0 -1
- package/dist/gateway/static/root/assets/messages-CKTo_sIF.js +0 -3
- package/dist/gateway/static/root/assets/mic-CuUb7zc-.js +0 -1
- package/dist/gateway/static/root/assets/minimize-2-DtOGrlpo.js +0 -1
- package/dist/gateway/static/root/assets/models-hub-cache-TjpL7hZ5.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CdpNXre-.js +0 -5
- package/dist/gateway/static/root/assets/notes-api-CBb944yw.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-EGvGw8MN.js +0 -8
- package/dist/gateway/static/root/assets/page-context-capture-button-CoWb7BYP.js +0 -1
- package/dist/gateway/static/root/assets/page-tabs-HLrKIjXH.js +0 -1
- package/dist/gateway/static/root/assets/pencil-DmIY3Oa-.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-DYzbNTyN.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DHC7J4lG.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-BJU2fmPn.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-BAks11S4.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-CTyy7H7-.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-D4xqTaEy.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-DIVCw0QQ.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-B4L9VnBN.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-B8PvgLVz.js +0 -1
- package/dist/gateway/static/root/assets/rotate-ccw-JM1TBLpp.js +0 -1
- package/dist/gateway/static/root/assets/rotate-cw-LIg3Am9S.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-Bqnp3tyt.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-D50g4GM2.js +0 -2
- package/dist/gateway/static/root/assets/schema-form-h_RCNfiO.js +0 -1
- package/dist/gateway/static/root/assets/search-DA7gz22f.js +0 -1
- package/dist/gateway/static/root/assets/secret-input-BxWHx6J6.js +0 -1
- package/dist/gateway/static/root/assets/send-session-input-DypbVTT7.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-C_OiKblh.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-BsqDIbIr.js +0 -1
- package/dist/gateway/static/root/assets/settings-2-D-csvaET.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-D3zJAW4p.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-draft-Dy10ldo8.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-num14vSv.js +0 -1
- package/dist/gateway/static/root/assets/settings-shell-dialog-layer-BU3UuiJr.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-jjSYJpDd.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-BGicglAS.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-BORe9rLB.js +0 -2
- package/dist/gateway/static/root/assets/shares-api-Dbx3z6-1.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-C13FgfWk.js +0 -1
- package/dist/gateway/static/root/assets/skeleton-BI5TyibZ.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-Cq6O1DZK.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-utils-C7V4JVXM.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Cq7QDjMA.js +0 -1
- package/dist/gateway/static/root/assets/skill-wire-pattern-BPpeIcCi.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BM1ShEjx.js +0 -2
- package/dist/gateway/static/root/assets/style-TIDOdKy0.js +0 -7
- package/dist/gateway/static/root/assets/system-settings-panel-BNCGFO1e.js +0 -1
- package/dist/gateway/static/root/assets/tab-completion-input-D64VNmiA.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-4VG82wcF.js +0 -2
- package/dist/gateway/static/root/assets/theme-store-Db7hDESt.js +0 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-C6p2Mu92.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-Dw15EJp0.js +0 -1
- package/dist/gateway/static/root/assets/usage-page-DDrIqgGe.js +0 -1
- package/dist/gateway/static/root/assets/use-async-resource-GrnWNwMZ.js +0 -1
- package/dist/gateway/static/root/assets/use-autosave-DDjIdW4U.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-DNl7O3Vb.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-DMHehhwG.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-CaS9dOIr.js +0 -2
- package/dist/gateway/static/root/assets/voice-api-key-field-ByAxHE4P.js +0 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-CVaU83Jc.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-BvVvPA1T.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-BcFm9QcC.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-DMec_XZB.js +0 -6
- package/dist/gateway/static/root/assets/workspace-api-BpfKsrtP.js +0 -2
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-CU5lzzE9.js +0 -1
- package/dist/packages/gateway-contract/src/project-monitoring.js +0 -36
- package/dist/packages/gateway-contract/src/scenes.js +0 -200
- package/dist/src/agent/bootstrap/project-agents-context.d.ts +0 -2
- package/dist/src/agent/bootstrap/project-agents-context.js +0 -30
- package/dist/src/gateway/hono/routes/scenes.d.ts +0 -3
- package/dist/src/gateway/hono/routes/scenes.js +0 -271
- package/dist/src/gateway/scenes/browserNotifications.d.ts +0 -4
- package/dist/src/gateway/scenes/browserNotifications.js +0 -54
- package/dist/src/gateway/scenes/host.d.ts +0 -34
- package/dist/src/gateway/scenes/host.js +0 -154
- package/dist/src/gateway/scenes/mailContext.d.ts +0 -32
- package/dist/src/gateway/scenes/mailContext.js +0 -235
- package/dist/src/gateway/scenes/slackThreadSource.d.ts +0 -41
- package/dist/src/gateway/scenes/slackThreadSource.js +0 -168
- package/dist/src/notifications/browser-endpoint.d.ts +0 -2
- package/dist/src/notifications/browser-endpoint.js +0 -13
- package/dist/src/notifications/browserSubscriptions.d.ts +0 -20
- package/dist/src/notifications/browserSubscriptions.js +0 -59
- package/dist/src/notifications/browserTransport.d.ts +0 -9
- package/dist/src/notifications/browserTransport.js +0 -64
- package/dist/src/notifications/dispatch.d.ts +0 -46
- package/dist/src/notifications/dispatch.js +0 -109
- package/dist/src/notifications/domain-delivery.d.ts +0 -21
- package/dist/src/notifications/domain-delivery.js +0 -1
- package/dist/src/notifications/quietHours.d.ts +0 -6
- package/dist/src/notifications/quietHours.js +0 -23
- package/dist/src/notifications/resultOutbox.d.ts +0 -23
- package/dist/src/notifications/resultOutbox.js +0 -49
- package/dist/src/scenes/activationAdapter.d.ts +0 -19
- package/dist/src/scenes/activationAdapter.js +0 -1
- package/dist/src/scenes/agentExecutor.d.ts +0 -9
- package/dist/src/scenes/agentExecutor.js +0 -61
- package/dist/src/scenes/capabilities/read.d.ts +0 -3
- package/dist/src/scenes/capabilities/read.js +0 -187
- package/dist/src/scenes/capabilities/write.d.ts +0 -3
- package/dist/src/scenes/capabilities/write.js +0 -151
- package/dist/src/scenes/contracts.d.ts +0 -9
- package/dist/src/scenes/contracts.js +0 -61
- package/dist/src/scenes/execution.d.ts +0 -62
- package/dist/src/scenes/execution.js +0 -169
- package/dist/src/scenes/httpServices.d.ts +0 -39
- package/dist/src/scenes/httpServices.js +0 -1
- package/dist/src/scenes/inbox.d.ts +0 -17
- package/dist/src/scenes/inbox.js +0 -68
- package/dist/src/scenes/mailContext.d.ts +0 -24
- package/dist/src/scenes/mailContext.js +0 -115
- package/dist/src/scenes/mailObservations.d.ts +0 -20
- package/dist/src/scenes/mailObservations.js +0 -107
- package/dist/src/scenes/maintenance.d.ts +0 -3
- package/dist/src/scenes/maintenance.js +0 -20
- package/dist/src/scenes/metrics.d.ts +0 -31
- package/dist/src/scenes/metrics.js +0 -89
- package/dist/src/scenes/model.d.ts +0 -3
- package/dist/src/scenes/model.js +0 -10
- package/dist/src/scenes/notificationEligibility.d.ts +0 -17
- package/dist/src/scenes/notificationEligibility.js +0 -72
- package/dist/src/scenes/notificationPublication.d.ts +0 -7
- package/dist/src/scenes/notificationPublication.js +0 -43
- package/dist/src/scenes/preferences.d.ts +0 -19
- package/dist/src/scenes/preferences.js +0 -86
- package/dist/src/scenes/readiness.d.ts +0 -7
- package/dist/src/scenes/readiness.js +0 -20
- package/dist/src/scenes/registry.d.ts +0 -11
- package/dist/src/scenes/registry.js +0 -28
- package/dist/src/scenes/repository.d.ts +0 -178
- package/dist/src/scenes/repository.js +0 -782
- package/dist/src/scenes/resultNotifications.d.ts +0 -17
- package/dist/src/scenes/resultNotifications.js +0 -204
- package/dist/src/scenes/runtime.d.ts +0 -25
- package/dist/src/scenes/runtime.js +0 -101
- package/dist/src/scenes/schedule.d.ts +0 -2
- package/dist/src/scenes/schedule.js +0 -33
- package/dist/src/scenes/service.d.ts +0 -36
- package/dist/src/scenes/service.js +0 -122
- package/dist/src/scenes/taskFollowUp/agentExecutor.d.ts +0 -36
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +0 -149
- package/dist/src/scenes/taskFollowUp/branchInventory.d.ts +0 -38
- package/dist/src/scenes/taskFollowUp/branchInventory.js +0 -70
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +0 -121
- package/dist/src/scenes/taskFollowUp/contracts.js +0 -119
- package/dist/src/scenes/taskFollowUp/resources.d.ts +0 -19
- package/dist/src/scenes/taskFollowUp/resources.js +0 -97
- package/dist/src/scenes/taskFollowUp/service.d.ts +0 -848
- package/dist/src/scenes/taskFollowUp/service.js +0 -770
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.d.ts +0 -2
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.js +0 -46
- package/dist/src/scenes/templates.d.ts +0 -64
- package/dist/src/scenes/templates.js +0 -76
- package/dist/src/scenes/userNotes.d.ts +0 -13
- package/dist/src/scenes/userNotes.js +0 -40
- package/dist/src/storage/sqlite/migrations/166_remove_proactive_previews.sql +0 -1
- package/dist/src/storage/sqlite/migrations/167_discussion_recording_chunks.sql +0 -7
- package/dist/src/storage/sqlite/migrations/168_discussion_evidence.sql +0 -16
- package/dist/src/storage/sqlite/migrations/169_discussion_action_tasks.sql +0 -8
- package/dist/src/storage/sqlite/migrations/170_discussion_edits.sql +0 -8
- package/dist/src/storage/sqlite/migrations/171_discussion_recording_jobs.sql +0 -14
- package/dist/src/storage/sqlite/migrations/172_project_understanding.sql +0 -3
- package/dist/src/storage/sqlite/migrations/173_mobile_discussion_source.sql +0 -5
- package/dist/src/storage/sqlite/migrations/174_capability_imports.sql +0 -11
- package/dist/src/storage/sqlite/migrations/175_import_selections.sql +0 -8
- package/dist/src/storage/sqlite/migrations/176_proactive_quality.sql +0 -5
- package/dist/src/storage/sqlite/migrations/177_proactive_check_controls.sql +0 -25
- package/dist/src/storage/sqlite/migrations/178_conversation_uuid.sql +0 -2
- package/dist/src/storage/sqlite/migrations/179_harmonyos_devices.sql +0 -41
- package/dist/src/storage/sqlite/migrations/180_execution_environment_ownership.sql +0 -7
- package/dist/src/storage/sqlite/migrations/181_knowledge_item_status_events.sql +0 -12
- package/dist/src/storage/sqlite/migrations/182_connector_account_policies.sql +0 -92
- package/dist/src/storage/sqlite/migrations/183_connector_backend_consistency.sql +0 -20
- package/dist/src/storage/sqlite/migrations/184_memory_suppressions.sql +0 -12
- package/dist/src/storage/sqlite/migrations/185_understanding_refresh_batches.sql +0 -6
- package/dist/src/storage/sqlite/migrations/186_sidebar_layout.sql +0 -16
- package/dist/src/storage/sqlite/migrations/187_cli_connectors.sql +0 -34
- package/dist/src/storage/sqlite/migrations/188_scene_storage.sql +0 -2
- package/dist/src/storage/sqlite/migrations/189_scene_source_health.sql +0 -8
- package/dist/src/storage/sqlite/migrations/190_scene_development.sql +0 -37
- package/dist/src/storage/sqlite/migrations/191_scene_task_follow_up.sql +0 -27
- package/dist/src/storage/sqlite/migrations/192_capability_operations.sql +0 -20
- package/dist/src/storage/sqlite/migrations/193_note_file_cleanup.sql +0 -8
- package/dist/src/storage/sqlite/migrations/194_capability_external_outcomes.sql +0 -11
- package/dist/src/storage/sqlite/migrations/195_automation_deleted_revisions.sql +0 -4
- package/dist/src/storage/sqlite/migrations/196_automation_run_requests.sql +0 -23
- package/dist/src/storage/sqlite/migrations/197_note_deletion_cleanup.sql +0 -8
- package/dist/src/storage/sqlite/migrations/198_project_workspace_creation.sql +0 -7
- package/dist/src/storage/sqlite/migrations/199_scene_resource_events.sql +0 -488
- package/dist/src/storage/sqlite/migrations/200_connected_work_threads.sql +0 -92
- package/dist/src/storage/sqlite/migrations/201_connector_extraction_audit.sql +0 -127
- package/dist/src/storage/sqlite/migrations/202_chat_previews.sql +0 -26
- package/dist/src/storage/sqlite/migrations/203_remove_retired_proactive_contracts.sql +0 -70
- package/dist/src/storage/sqlite/migrations/204_home_intelligence.sql +0 -78
- package/dist/src/storage/sqlite/migrations/205_agent_catalog.sql +0 -66
- package/dist/src/storage/sqlite/migrations/206_home_advice_strategy_version.sql +0 -3
- package/dist/src/storage/sqlite/migrations/207_user_model_policy_contract.sql +0 -121
- package/dist/src/storage/sqlite/migrations/208_automation_management.sql +0 -2
- package/dist/src/storage/sqlite/migrations/209_automation_event_hub.sql +0 -48
- package/dist/src/storage/sqlite/migrations/210_remove_legacy_automation_timeout.sql +0 -14
- package/dist/src/storage/sqlite/migrations/211_automation_result_deliveries.sql +0 -16
- package/dist/src/storage/sqlite/migrations/212_automation_delivery_policy.sql +0 -30
- package/dist/src/storage/sqlite/migrations/213_automation_reliability_contract.sql +0 -188
- package/dist/src/storage/sqlite/migrations/214_ai_usage_ledger.sql +0 -41
- package/dist/src/storage/sqlite/migrations/215_scene_execution_adapters.sql +0 -6
- package/dist/src/storage/sqlite/migrations/216_remove_scene_model_usage.sql +0 -1
- package/dist/src/storage/sqlite/migrations/217_remove_legacy_memory_tables.sql +0 -4
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.d.ts +0 -8
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.js +0 -87
- package/dist/src/storage/sqlite/migrations/conversation-uuid.d.ts +0 -8
- package/dist/src/storage/sqlite/migrations/conversation-uuid.js +0 -366
- package/dist/src/storage/sqlite/migrations/scene-reset.d.ts +0 -5
- package/dist/src/storage/sqlite/migrations/scene-reset.js +0 -40
- package/dist/src/storage/sqlite/scenes-schema.d.ts +0 -8
- package/dist/src/storage/sqlite/scenes-schema.js +0 -60
- package/dist/src/storage/sqlite/schemas/notifications.sql +0 -65
- package/dist/src/storage/sqlite/schemas/scenes.sql +0 -205
- package/skills/engineering/design-recurring-work/SKILL.md +0 -75
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
import { __esmMin } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { conversationRouteKey, init_conversation_route } from "../../../routing/conversation-route.js";
|
|
3
|
-
import { decodeStoredConversationKey, decodeStoredWorkflowSubagent, init_conversation_key_decoder } from "./conversation-key-decoder.js";
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
//#region src/storage/sqlite/migrations/conversation-uuid.ts
|
|
6
|
-
function quote(name) {
|
|
7
|
-
return `"${name.replaceAll("\"", "\"\"")}"`;
|
|
8
|
-
}
|
|
9
|
-
function columns(db, table) {
|
|
10
|
-
return new Set(db.prepare(`PRAGMA table_info(${quote(table)})`).all().map((row) => row.name));
|
|
11
|
-
}
|
|
12
|
-
function assertForeignKeys(db) {
|
|
13
|
-
const errors = db.prepare("PRAGMA foreign_key_check").all();
|
|
14
|
-
if (errors.length) throw new Error(`Conversation migration has ${errors.length} invalid foreign keys`);
|
|
15
|
-
}
|
|
16
|
-
/** Runs inside the migration runner's single transaction. */
|
|
17
|
-
function migrateConversationUuids(db) {
|
|
18
|
-
db.exec("PRAGMA defer_foreign_keys = ON");
|
|
19
|
-
assertForeignKeys(db);
|
|
20
|
-
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table'").all().map((row) => row.name);
|
|
21
|
-
for (const table of tables) {
|
|
22
|
-
if (table === "transcript_fts" || table.startsWith("transcript_fts_")) continue;
|
|
23
|
-
for (const column of columns(db, table)) if (column.endsWith("session_key") && !KEY_COLUMNS[table]?.includes(column)) throw new Error(`Unregistered conversation reference: ${table}.${column}`);
|
|
24
|
-
}
|
|
25
|
-
db.exec(`CREATE TEMP TABLE conversation_id_map (
|
|
26
|
-
old_key TEXT PRIMARY KEY, conversation_id TEXT NOT NULL UNIQUE
|
|
27
|
-
);
|
|
28
|
-
CREATE TABLE conversation_routes (
|
|
29
|
-
route_key TEXT PRIMARY KEY,
|
|
30
|
-
conversation_id TEXT NOT NULL REFERENCES sessions(session_key) ON DELETE CASCADE
|
|
31
|
-
);`);
|
|
32
|
-
const owners = db.prepare(`SELECT session_key FROM sessions UNION SELECT session_key FROM transcripts`).all();
|
|
33
|
-
const mapping = /* @__PURE__ */ new Map();
|
|
34
|
-
const insert = db.prepare("INSERT INTO conversation_id_map VALUES (?, ?)");
|
|
35
|
-
for (const owner of owners) {
|
|
36
|
-
const id = randomUUID();
|
|
37
|
-
mapping.set(owner.session_key, id);
|
|
38
|
-
insert.run(owner.session_key, id);
|
|
39
|
-
}
|
|
40
|
-
const resolve = (key) => {
|
|
41
|
-
const id = mapping.get(key);
|
|
42
|
-
if (!id) throw new Error(`Missing conversation referenced by persisted state: ${key}`);
|
|
43
|
-
return id;
|
|
44
|
-
};
|
|
45
|
-
const sessions = db.prepare("SELECT session_key, agent_id, routing_json, source_channel, source_chat_id, session_type, custom_data_json FROM sessions").all();
|
|
46
|
-
const bind = db.prepare("INSERT INTO conversation_routes(route_key, conversation_id) VALUES (?, ?)");
|
|
47
|
-
const updateRouting = db.prepare("UPDATE sessions SET agent_id=?, routing_json=?, source_channel=?, source_chat_id=?, session_type=?, custom_data_json=? WHERE session_key=?");
|
|
48
|
-
for (const session of sessions) {
|
|
49
|
-
const route = decodeStoredConversationKey(session.session_key, session.agent_id);
|
|
50
|
-
bind.run(conversationRouteKey(route), resolve(session.session_key));
|
|
51
|
-
const workflow = decodeStoredWorkflowSubagent(session.session_key);
|
|
52
|
-
const stored = session.routing_json ? JSON.parse(session.routing_json) : {};
|
|
53
|
-
if (stored.agentId && ![route.agentId, workflow?.actorId].includes(stored.agentId.toLowerCase())) throw new Error(`Conflicting conversation agent: ${session.session_key}`);
|
|
54
|
-
const source = stored.source || session.source_channel || route.channel || "cli";
|
|
55
|
-
const peerId = stored.peerId || session.source_chat_id || route.peerId;
|
|
56
|
-
const routing = {
|
|
57
|
-
source,
|
|
58
|
-
accountId: route.accountId || "default",
|
|
59
|
-
peerKind: route.peerKind,
|
|
60
|
-
peerId,
|
|
61
|
-
...route.threadId ? { threadId: route.threadId } : {},
|
|
62
|
-
...route.scopeId ? { scopeId: route.scopeId } : {},
|
|
63
|
-
...stored,
|
|
64
|
-
agentId: route.agentId
|
|
65
|
-
};
|
|
66
|
-
const sessionType = session.session_key.startsWith("heartbeat:") ? "heartbeat" : session.session_key.includes(":subagent:") ? "workflow-subagent" : session.session_key.includes(":cron:") ? "cron" : session.session_type ?? "chat";
|
|
67
|
-
const customData = session.custom_data_json ? JSON.parse(session.custom_data_json) : {};
|
|
68
|
-
if (customData.genericNewChatShell === void 0 && source === "webchat" && peerId.startsWith("chat_") && !customData.sourceBinding) customData.genericNewChatShell = true;
|
|
69
|
-
updateRouting.run(route.agentId, JSON.stringify(routing), source, peerId, sessionType, JSON.stringify(customData), session.session_key);
|
|
70
|
-
}
|
|
71
|
-
for (const [table, references] of Object.entries(KEY_COLUMNS)) {
|
|
72
|
-
const present = columns(db, table);
|
|
73
|
-
for (const column of references) {
|
|
74
|
-
if (!present.has(column)) continue;
|
|
75
|
-
const missing = db.prepare(`SELECT ${quote(column)} AS value FROM ${quote(table)}
|
|
76
|
-
WHERE ${quote(column)} IS NOT NULL AND ${quote(column)} NOT IN (SELECT old_key FROM conversation_id_map) LIMIT 1`).get();
|
|
77
|
-
if (missing) throw new Error(`Unresolved ${table}.${column}: ${missing.value}`);
|
|
78
|
-
db.exec(`UPDATE ${quote(table)} SET ${quote(column)} =
|
|
79
|
-
(SELECT conversation_id FROM conversation_id_map WHERE old_key = ${quote(table)}.${quote(column)})
|
|
80
|
-
WHERE ${quote(column)} IS NOT NULL`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
const rewrite = (value, transcriptFields = false) => {
|
|
84
|
-
if (Array.isArray(value)) return value.map((item) => rewrite(item, transcriptFields));
|
|
85
|
-
if (!value || typeof value !== "object") return value;
|
|
86
|
-
const record = value;
|
|
87
|
-
const conversationReference = [
|
|
88
|
-
"session",
|
|
89
|
-
"conversation",
|
|
90
|
-
"chat"
|
|
91
|
-
].includes(String(record.kind ?? record.type));
|
|
92
|
-
return Object.fromEntries(Object.entries(record).filter(([name]) => name !== "mainSessionKey").map(([name, child]) => {
|
|
93
|
-
if ((name === "id" && conversationReference || [
|
|
94
|
-
"chatId",
|
|
95
|
-
"chat_id",
|
|
96
|
-
"to",
|
|
97
|
-
"targetChatId"
|
|
98
|
-
].includes(name)) && typeof child === "string" && mapping.has(child)) return [name, resolve(child)];
|
|
99
|
-
if (name === "key" && typeof child === "string" && mapping.has(child)) return [name, resolve(child)];
|
|
100
|
-
if ((name === "importedFromSessionKey" || name === "forkedFromSessionKey") && typeof child === "string") return mapping.has(child) ? [name.replace("SessionKey", "ConversationId"), resolve(child)] : [name.replace("SessionKey", "ExternalConversationRef"), child];
|
|
101
|
-
if (REFERENCE_NAMES[name] && typeof child === "string") return [REFERENCE_NAMES[name], resolve(child)];
|
|
102
|
-
if (name.endsWith("SessionKey") && typeof child === "string") return [name.replace(/SessionKey$/, "ConversationId"), resolve(child)];
|
|
103
|
-
if ((name === "sessionKeys" || name.endsWith("SessionKeys")) && Array.isArray(child)) return [name.replace("sessionKeys", "conversationIds").replace(/SessionKeys$/, "ConversationIds"), child.map((key) => resolve(String(key)))];
|
|
104
|
-
if (name === "expectedSessionId" || name === "forkedFromSessionId") return [name.replace("SessionId", "TranscriptId"), child];
|
|
105
|
-
if ((name === "sessionId" || name === "sourceSessionId") && typeof child === "string" && mapping.has(child)) return [name === "sessionId" ? "conversationId" : "sourceConversationId", resolve(child)];
|
|
106
|
-
if (transcriptFields && (name === "sessionId" || name === "expectedSessionId")) return [name === "sessionId" ? "transcriptId" : "expectedTranscriptId", child];
|
|
107
|
-
if ([
|
|
108
|
-
"content",
|
|
109
|
-
"text",
|
|
110
|
-
"arguments",
|
|
111
|
-
"prompt",
|
|
112
|
-
"messages",
|
|
113
|
-
"transcriptRows"
|
|
114
|
-
].includes(name)) return [name, child];
|
|
115
|
-
return [name, rewrite(child, transcriptFields)];
|
|
116
|
-
}));
|
|
117
|
-
};
|
|
118
|
-
for (const [table, fields] of Object.entries(CONTROL_JSON_COLUMNS)) {
|
|
119
|
-
const present = columns(db, table);
|
|
120
|
-
for (const field of fields) {
|
|
121
|
-
if (!present.has(field)) continue;
|
|
122
|
-
const update = db.prepare(`UPDATE ${quote(table)} SET ${quote(field)} = ? WHERE rowid = ?`);
|
|
123
|
-
const rows = db.prepare(`SELECT rowid AS row_id, ${quote(field)} AS value FROM ${quote(table)} WHERE ${quote(field)} IS NOT NULL`);
|
|
124
|
-
for (const row of rows.all()) {
|
|
125
|
-
const next = JSON.stringify(rewrite(JSON.parse(row.value), table === "session_connection_waits" || table === "session_clarification_waits"));
|
|
126
|
-
if (next !== row.value) update.run(next, row.row_id);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
for (const table of ["context_evidence", "context_extraction_runs"]) {
|
|
131
|
-
const rows = db.prepare(`SELECT rowid AS row_id, source_ref FROM ${table} WHERE source_ref LIKE 'session:%'`);
|
|
132
|
-
const update = db.prepare(`UPDATE ${table} SET source_ref=? WHERE rowid=?`);
|
|
133
|
-
const orderedKeys = [...mapping.keys()].sort((a, b) => b.length - a.length);
|
|
134
|
-
for (const row of rows.all()) {
|
|
135
|
-
const oldKey = orderedKeys.find((key) => row.source_ref === `session:${key}` || row.source_ref.startsWith(`session:${key}:`));
|
|
136
|
-
if (!oldKey) throw new Error(`Unresolved ${table}.source_ref`);
|
|
137
|
-
update.run(`session:${resolve(oldKey)}${row.source_ref.slice(8 + oldKey.length)}`, row.row_id);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const summaries = db.prepare("SELECT rowid AS row_id, canonical_key FROM knowledge_items WHERE canonical_key LIKE 'project-session-summary:%'");
|
|
141
|
-
const updateSummary = db.prepare("UPDATE knowledge_items SET canonical_key=? WHERE rowid=?");
|
|
142
|
-
for (const row of summaries.all()) {
|
|
143
|
-
const oldKey = [...mapping.keys()].find((key) => row.canonical_key.endsWith(`:${key}`));
|
|
144
|
-
if (!oldKey) throw new Error("Unresolved project session summary reference");
|
|
145
|
-
updateSummary.run(row.canonical_key.slice(0, -oldKey.length) + resolve(oldKey), row.row_id);
|
|
146
|
-
}
|
|
147
|
-
for (const table of ["durable_state", "durable_messages"]) {
|
|
148
|
-
const discriminator = table === "durable_state" ? "namespace" : "queue";
|
|
149
|
-
const rows = db.prepare(`SELECT rowid AS row_id, ${discriminator} AS kind, scope, payload FROM ${table}`);
|
|
150
|
-
const update = db.prepare(`UPDATE ${table} SET payload=?, scope=? WHERE rowid=?`);
|
|
151
|
-
for (const row of rows.all()) {
|
|
152
|
-
if (!(table === "durable_state" ? DURABLE_NAMESPACES.has(row.kind) : row.kind === "outbound" || row.kind === "agent-ipc")) {
|
|
153
|
-
if (/"(?:sessionKey|parentSessionKey)"\s*:/.test(row.payload)) throw new Error(`Conversation migration requires a decoder for ${table}:${row.kind}`);
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
const payload = rewrite(JSON.parse(row.payload));
|
|
157
|
-
if (row.kind === "shares" && payload.kind === "session" && typeof payload.sourceSessionId === "string") {
|
|
158
|
-
payload.sourceTranscriptId = payload.sourceSessionId;
|
|
159
|
-
delete payload.sourceSessionId;
|
|
160
|
-
}
|
|
161
|
-
if (row.kind === "hosted-share-bindings" && typeof payload.sessionId === "string") {
|
|
162
|
-
payload.transcriptId = payload.sessionId;
|
|
163
|
-
delete payload.sessionId;
|
|
164
|
-
}
|
|
165
|
-
update.run(JSON.stringify(payload), mapping.get(row.scope) ?? row.scope, row.row_id);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
for (const [table, kind, id] of OBJECT_REFERENCES) {
|
|
169
|
-
const present = columns(db, table);
|
|
170
|
-
if (!present.has(kind) || !present.has(id)) continue;
|
|
171
|
-
const rows = db.prepare(`SELECT rowid AS row_id, ${quote(id)} AS value FROM ${quote(table)} WHERE ${quote(kind)} IN ('session','conversation','chat') AND ${quote(id)} IS NOT NULL`);
|
|
172
|
-
const update = db.prepare(`UPDATE ${quote(table)} SET ${quote(id)}=? WHERE rowid=?`);
|
|
173
|
-
for (const row of rows.all()) update.run(resolve(row.value), row.row_id);
|
|
174
|
-
}
|
|
175
|
-
for (const [table, from, to] of [
|
|
176
|
-
[
|
|
177
|
-
"execution_context_runs",
|
|
178
|
-
"session_id",
|
|
179
|
-
"conversation_id"
|
|
180
|
-
],
|
|
181
|
-
[
|
|
182
|
-
"context_evidence",
|
|
183
|
-
"session_id",
|
|
184
|
-
"conversation_id"
|
|
185
|
-
],
|
|
186
|
-
[
|
|
187
|
-
"knowledge_items",
|
|
188
|
-
"source_session_id",
|
|
189
|
-
"source_conversation_id"
|
|
190
|
-
]
|
|
191
|
-
]) {
|
|
192
|
-
const rows = db.prepare(`SELECT rowid AS row_id, ${from} AS value FROM ${table} WHERE ${from} IS NOT NULL`);
|
|
193
|
-
const update = db.prepare(`UPDATE ${table} SET ${from}=? WHERE rowid=?`);
|
|
194
|
-
for (const row of rows.all()) {
|
|
195
|
-
const owner = mapping.get(row.value) ?? db.prepare("SELECT conversation_id FROM conversation_id_map m JOIN transcripts t ON t.session_key=m.conversation_id WHERE t.session_id=?").get(row.value)?.conversation_id;
|
|
196
|
-
if (!owner) throw new Error(`Unresolved ${table}.${from}: ${row.value}`);
|
|
197
|
-
update.run(owner, row.row_id);
|
|
198
|
-
}
|
|
199
|
-
db.exec(`ALTER TABLE ${table} RENAME COLUMN ${from} TO ${to}`);
|
|
200
|
-
}
|
|
201
|
-
for (const [table, references] of Object.entries(KEY_COLUMNS)) {
|
|
202
|
-
const present = columns(db, table);
|
|
203
|
-
for (const column of references) if (present.has(column)) db.exec(`ALTER TABLE ${quote(table)} RENAME COLUMN ${quote(column)} TO ${quote(column.replace("session_key", "conversation_id"))}`);
|
|
204
|
-
}
|
|
205
|
-
for (const [table, names] of Object.entries(TRANSCRIPT_COLUMNS)) {
|
|
206
|
-
const present = columns(db, table);
|
|
207
|
-
for (const [from, to] of Object.entries(names)) if (present.has(from)) db.exec(`ALTER TABLE ${quote(table)} RENAME COLUMN ${quote(from)} TO ${quote(to)}`);
|
|
208
|
-
}
|
|
209
|
-
db.exec(`CREATE VIRTUAL TABLE transcript_fts_next USING fts5(
|
|
210
|
-
content, conversation_id UNINDEXED, transcript_id UNINDEXED, entry_id UNINDEXED, tokenize='unicode61'
|
|
211
|
-
);
|
|
212
|
-
INSERT INTO transcript_fts_next(rowid, content, conversation_id, transcript_id, entry_id)
|
|
213
|
-
SELECT f.rowid, f.content, m.conversation_id, f.session_id, f.entry_id
|
|
214
|
-
FROM transcript_fts f JOIN conversation_id_map m ON m.old_key = f.session_key;`);
|
|
215
|
-
if (db.prepare("SELECT count(*) AS n FROM transcript_fts").get().n !== db.prepare("SELECT count(*) AS n FROM transcript_fts_next").get().n) throw new Error("Conversation migration lost FTS entries");
|
|
216
|
-
db.exec("DROP TABLE transcript_fts; ALTER TABLE transcript_fts_next RENAME TO transcript_fts;");
|
|
217
|
-
assertForeignKeys(db);
|
|
218
|
-
if (db.prepare(`SELECT s.conversation_id FROM sessions s LEFT JOIN transcripts t
|
|
219
|
-
ON t.transcript_id = s.active_transcript_id AND t.conversation_id = s.conversation_id
|
|
220
|
-
WHERE t.transcript_id IS NULL LIMIT 1`).get()) throw new Error("Conversation migration has an invalid active transcript");
|
|
221
|
-
db.exec("DROP TABLE conversation_id_map");
|
|
222
|
-
return {
|
|
223
|
-
conversations: sessions.length,
|
|
224
|
-
historicalOwners: owners.length - sessions.length,
|
|
225
|
-
routes: sessions.length
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
var KEY_COLUMNS, TRANSCRIPT_COLUMNS, CONTROL_JSON_COLUMNS, DURABLE_NAMESPACES, OBJECT_REFERENCES, REFERENCE_NAMES;
|
|
229
|
-
var init_conversation_uuid = __esmMin((() => {
|
|
230
|
-
init_conversation_route();
|
|
231
|
-
init_conversation_key_decoder();
|
|
232
|
-
KEY_COLUMNS = {
|
|
233
|
-
sessions: ["session_key", "parent_session_key"],
|
|
234
|
-
transcripts: ["session_key"],
|
|
235
|
-
session_config: ["session_key"],
|
|
236
|
-
session_inputs: ["session_key"],
|
|
237
|
-
session_input_runtime: ["session_key"],
|
|
238
|
-
session_connection_waits: ["session_key"],
|
|
239
|
-
session_clarification_waits: ["session_key"],
|
|
240
|
-
task_sessions: ["session_key"],
|
|
241
|
-
task_runs: ["session_key"],
|
|
242
|
-
task_conversation_state: ["active_session_key"],
|
|
243
|
-
task_handoff_snapshots: ["from_session_key", "to_session_key"],
|
|
244
|
-
workflow_runs: ["session_key", "parent_session_key"],
|
|
245
|
-
automation_runs: ["session_key"],
|
|
246
|
-
work_discovery_runs: ["session_key"],
|
|
247
|
-
endpoint_session_bindings: ["session_key"],
|
|
248
|
-
browser_tab_bindings: ["session_key"],
|
|
249
|
-
execution_environment_bindings: ["session_key"],
|
|
250
|
-
interaction_states: ["session_key"],
|
|
251
|
-
proactive_follow_ups: ["session_key"],
|
|
252
|
-
context_snapshots: ["session_key"],
|
|
253
|
-
connector_approvals: ["session_key"],
|
|
254
|
-
connector_execution_audit: ["session_key"]
|
|
255
|
-
};
|
|
256
|
-
TRANSCRIPT_COLUMNS = {
|
|
257
|
-
sessions: { session_id: "active_transcript_id" },
|
|
258
|
-
transcripts: { session_id: "transcript_id" },
|
|
259
|
-
transcript_entries: { session_id: "transcript_id" },
|
|
260
|
-
compaction_checkpoints: { session_id: "transcript_id" },
|
|
261
|
-
session_task_plans: { session_id: "transcript_id" },
|
|
262
|
-
session_connection_waits: { session_id: "transcript_id" },
|
|
263
|
-
session_clarification_waits: { session_id: "transcript_id" },
|
|
264
|
-
session_inputs: { expected_session_id: "expected_transcript_id" }
|
|
265
|
-
};
|
|
266
|
-
CONTROL_JSON_COLUMNS = {
|
|
267
|
-
sessions: ["routing_json", "custom_data_json"],
|
|
268
|
-
session_inputs: [
|
|
269
|
-
"origin_json",
|
|
270
|
-
"context_refs_json",
|
|
271
|
-
"payload_json"
|
|
272
|
-
],
|
|
273
|
-
session_connection_waits: ["data_json"],
|
|
274
|
-
session_clarification_waits: ["data_json"],
|
|
275
|
-
task_handoff_snapshots: ["payload_json"],
|
|
276
|
-
task_runs: ["executor_ref_json", "trigger_json"],
|
|
277
|
-
task_waits: ["condition_json", "resolution_json"],
|
|
278
|
-
automations: ["action_json", "state_json"],
|
|
279
|
-
automation_runs: ["action_snapshot_json", "termination_json"],
|
|
280
|
-
workflow_runs: ["source_json", "metadata_json"],
|
|
281
|
-
notification_events: ["target_json", "payload_json"],
|
|
282
|
-
proactive_channel_deliveries: ["target_json"],
|
|
283
|
-
domain_outbox: ["payload_json"],
|
|
284
|
-
command_deduplication: ["result_json"],
|
|
285
|
-
activity_events: ["source_json", "payload_json"],
|
|
286
|
-
task_run_events: ["payload_json"],
|
|
287
|
-
workflow_events: ["payload"],
|
|
288
|
-
knowledge_items: ["source_json"]
|
|
289
|
-
};
|
|
290
|
-
DURABLE_NAMESPACES = new Set([
|
|
291
|
-
"shares",
|
|
292
|
-
"site-shares",
|
|
293
|
-
"hosted-share-bindings",
|
|
294
|
-
"command-receipts",
|
|
295
|
-
"workflow-drafts",
|
|
296
|
-
"workflow-definitions",
|
|
297
|
-
"workflow-revisions"
|
|
298
|
-
]);
|
|
299
|
-
OBJECT_REFERENCES = [
|
|
300
|
-
[
|
|
301
|
-
"object_links",
|
|
302
|
-
"from_kind",
|
|
303
|
-
"from_id"
|
|
304
|
-
],
|
|
305
|
-
[
|
|
306
|
-
"object_links",
|
|
307
|
-
"to_kind",
|
|
308
|
-
"to_id"
|
|
309
|
-
],
|
|
310
|
-
[
|
|
311
|
-
"activity_events",
|
|
312
|
-
"primary_object_kind",
|
|
313
|
-
"primary_object_id"
|
|
314
|
-
],
|
|
315
|
-
[
|
|
316
|
-
"activity_scopes",
|
|
317
|
-
"scope_kind",
|
|
318
|
-
"scope_id"
|
|
319
|
-
],
|
|
320
|
-
[
|
|
321
|
-
"context_edges",
|
|
322
|
-
"owner_kind",
|
|
323
|
-
"owner_id"
|
|
324
|
-
],
|
|
325
|
-
[
|
|
326
|
-
"context_edges",
|
|
327
|
-
"target_kind",
|
|
328
|
-
"target_id"
|
|
329
|
-
],
|
|
330
|
-
[
|
|
331
|
-
"context_snapshots",
|
|
332
|
-
"owner_kind",
|
|
333
|
-
"owner_id"
|
|
334
|
-
],
|
|
335
|
-
[
|
|
336
|
-
"knowledge_items",
|
|
337
|
-
"scope_type",
|
|
338
|
-
"scope_id"
|
|
339
|
-
],
|
|
340
|
-
[
|
|
341
|
-
"command_deduplication",
|
|
342
|
-
"subject_kind",
|
|
343
|
-
"subject_id"
|
|
344
|
-
],
|
|
345
|
-
[
|
|
346
|
-
"domain_outbox",
|
|
347
|
-
"subject_kind",
|
|
348
|
-
"subject_id"
|
|
349
|
-
],
|
|
350
|
-
[
|
|
351
|
-
"proactive_events",
|
|
352
|
-
"subject_kind",
|
|
353
|
-
"subject_id"
|
|
354
|
-
]
|
|
355
|
-
];
|
|
356
|
-
REFERENCE_NAMES = {
|
|
357
|
-
sessionKey: "conversationId",
|
|
358
|
-
parentSessionKey: "parentConversationId",
|
|
359
|
-
fromSessionKey: "fromConversationId",
|
|
360
|
-
toSessionKey: "toConversationId",
|
|
361
|
-
activeSessionKey: "activeConversationId"
|
|
362
|
-
};
|
|
363
|
-
}));
|
|
364
|
-
//#endregion
|
|
365
|
-
init_conversation_uuid();
|
|
366
|
-
export { init_conversation_uuid, migrateConversationUuids };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
/** Discard obsolete payloads before historical migrations try to interpret them. */
|
|
3
|
-
export declare function discardExperimentalSceneData(db: DatabaseSync): void;
|
|
4
|
-
/** v188 installs current storage; the migration runner owns the transaction and FK checks. */
|
|
5
|
-
export declare function resetExperimentalScenes(db: DatabaseSync): void;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { __esmMin } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { NOTIFICATION_LEDGER_TABLES, init_scenes_schema, installSceneStorage } from "../scenes-schema.js";
|
|
3
|
-
//#region src/storage/sqlite/migrations/scene-reset.ts
|
|
4
|
-
/** Discard obsolete payloads before historical migrations try to interpret them. */
|
|
5
|
-
function discardExperimentalSceneData(db) {
|
|
6
|
-
const triggers = db.prepare("SELECT name, sql FROM sqlite_master WHERE type = 'trigger' AND tbl_name GLOB 'proactive_*'").all();
|
|
7
|
-
for (const trigger of triggers) db.exec(`DROP TRIGGER ${quote(String(trigger.name))}`);
|
|
8
|
-
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND (name GLOB 'proactive_*' OR name = 'heartbeat_checks') AND name NOT IN ('proactive_scenarios', 'proactive_scenario_versions')").all();
|
|
9
|
-
for (const table of tables) db.exec(`DELETE FROM ${quote(String(table.name))}`);
|
|
10
|
-
for (const trigger of triggers) db.exec(String(trigger.sql));
|
|
11
|
-
const discarded = "SELECT event_id FROM notification_events WHERE event_type IN ('proactive.insight', 'scene.result', 'scene.digest')";
|
|
12
|
-
for (const table of ["notification_deliveries", "notification_acknowledgements"]) db.exec(`DELETE FROM ${table} WHERE event_id IN (${discarded})`);
|
|
13
|
-
db.exec(`DELETE FROM notification_events WHERE event_id IN (${discarded})`);
|
|
14
|
-
}
|
|
15
|
-
/** v188 installs current storage; the migration runner owns the transaction and FK checks. */
|
|
16
|
-
function resetExperimentalScenes(db) {
|
|
17
|
-
const ledger = new Set(NOTIFICATION_LEDGER_TABLES);
|
|
18
|
-
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table'").all();
|
|
19
|
-
for (const table of tables) {
|
|
20
|
-
const name = String(table.name);
|
|
21
|
-
if (name.startsWith("scene_") || ledger.has(name)) db.exec(`DROP TABLE ${quote(name)}`);
|
|
22
|
-
}
|
|
23
|
-
discardExperimentalSceneData(db);
|
|
24
|
-
for (const table of tables) {
|
|
25
|
-
const name = String(table.name);
|
|
26
|
-
if (name.startsWith("proactive_") || name === "heartbeat_checks" || name === "project_monitoring_policies") db.exec(`DROP TABLE ${quote(name)}`);
|
|
27
|
-
}
|
|
28
|
-
db.exec(`DROP INDEX IF EXISTS idx_connector_sync_policies_proactive;
|
|
29
|
-
ALTER TABLE connector_sync_policies DROP COLUMN proactive_enabled;
|
|
30
|
-
ALTER TABLE connector_sync_policies DROP COLUMN allowed_scenario_keys_json;`);
|
|
31
|
-
installSceneStorage(db);
|
|
32
|
-
}
|
|
33
|
-
var quote;
|
|
34
|
-
var init_scene_reset = __esmMin((() => {
|
|
35
|
-
init_scenes_schema();
|
|
36
|
-
quote = (name) => `"${name.replaceAll("\"", "\"\"")}"`;
|
|
37
|
-
}));
|
|
38
|
-
//#endregion
|
|
39
|
-
init_scene_reset();
|
|
40
|
-
export { discardExperimentalSceneData, init_scene_reset, resetExperimentalScenes };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
export declare const NOTIFICATION_LEDGER_TABLES: readonly ["notification_browser_keys", "notification_browser_subscriptions", "notification_dispatches", "notification_result_outbox", "notification_attention_budget", "notification_digest_queue", "notification_digests", "notification_digest_members", "notification_dispatch_decisions", "notification_browser_probes", "notification_presence"];
|
|
3
|
-
export declare const SCENE_TABLES: readonly ["scene_source_health", "scene_activation_requests", "scene_activations", "scene_context_snapshots", "scene_events", "scene_feedback", "scene_feedback_history", "scene_intent_events", "scene_model_reservations", "scene_notes", "scene_outcomes", "scene_preferences", "scene_presentations", "scene_runs", "scene_schedule_cursors", "scene_template_versions", "scene_trigger_intents", "scene_work_items", "scene_mail_sources", "scene_connector_usage"];
|
|
4
|
-
/** Installs fresh tables; the normal versioned upgrade owns existing databases. */
|
|
5
|
-
export declare function installSceneSchema(db: DatabaseSync): void;
|
|
6
|
-
export declare function installNotificationLedgerSchema(db: DatabaseSync): void;
|
|
7
|
-
export declare function installSceneStorage(db: DatabaseSync): void;
|
|
8
|
-
export declare function assertSceneStorageReady(db: DatabaseSync): void;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_sql_assets, readSqliteAsset } from "./sql-assets.js";
|
|
3
|
-
//#region src/storage/sqlite/scenes-schema.ts
|
|
4
|
-
/** Installs fresh tables; the normal versioned upgrade owns existing databases. */
|
|
5
|
-
function installSceneSchema(db) {
|
|
6
|
-
db.exec(readSqliteAsset("schemas/scenes.sql"));
|
|
7
|
-
}
|
|
8
|
-
function installNotificationLedgerSchema(db) {
|
|
9
|
-
db.exec(readSqliteAsset("schemas/notifications.sql"));
|
|
10
|
-
}
|
|
11
|
-
function installSceneStorage(db) {
|
|
12
|
-
installSceneSchema(db);
|
|
13
|
-
installNotificationLedgerSchema(db);
|
|
14
|
-
}
|
|
15
|
-
function assertSceneStorageReady(db) {
|
|
16
|
-
const tables = new Set(db.prepare("SELECT name FROM sqlite_master WHERE type = 'table'").all().map((row) => row.name));
|
|
17
|
-
if ([...SCENE_TABLES, ...NOTIFICATION_LEDGER_TABLES].some((name) => !tables.has(name))) throw new Error("Scene storage is not initialized");
|
|
18
|
-
}
|
|
19
|
-
var NOTIFICATION_LEDGER_TABLES, SCENE_TABLES;
|
|
20
|
-
var init_scenes_schema = __esmMin((() => {
|
|
21
|
-
init_sql_assets();
|
|
22
|
-
NOTIFICATION_LEDGER_TABLES = [
|
|
23
|
-
"notification_browser_keys",
|
|
24
|
-
"notification_browser_subscriptions",
|
|
25
|
-
"notification_dispatches",
|
|
26
|
-
"notification_result_outbox",
|
|
27
|
-
"notification_attention_budget",
|
|
28
|
-
"notification_digest_queue",
|
|
29
|
-
"notification_digests",
|
|
30
|
-
"notification_digest_members",
|
|
31
|
-
"notification_dispatch_decisions",
|
|
32
|
-
"notification_browser_probes",
|
|
33
|
-
"notification_presence"
|
|
34
|
-
];
|
|
35
|
-
SCENE_TABLES = [
|
|
36
|
-
"scene_source_health",
|
|
37
|
-
"scene_activation_requests",
|
|
38
|
-
"scene_activations",
|
|
39
|
-
"scene_context_snapshots",
|
|
40
|
-
"scene_events",
|
|
41
|
-
"scene_feedback",
|
|
42
|
-
"scene_feedback_history",
|
|
43
|
-
"scene_intent_events",
|
|
44
|
-
"scene_model_reservations",
|
|
45
|
-
"scene_notes",
|
|
46
|
-
"scene_outcomes",
|
|
47
|
-
"scene_preferences",
|
|
48
|
-
"scene_presentations",
|
|
49
|
-
"scene_runs",
|
|
50
|
-
"scene_schedule_cursors",
|
|
51
|
-
"scene_template_versions",
|
|
52
|
-
"scene_trigger_intents",
|
|
53
|
-
"scene_work_items",
|
|
54
|
-
"scene_mail_sources",
|
|
55
|
-
"scene_connector_usage"
|
|
56
|
-
];
|
|
57
|
-
}));
|
|
58
|
-
//#endregion
|
|
59
|
-
init_scenes_schema();
|
|
60
|
-
export { NOTIFICATION_LEDGER_TABLES, SCENE_TABLES, assertSceneStorageReady, init_scenes_schema, installNotificationLedgerSchema, installSceneSchema, installSceneStorage };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
CREATE TABLE notification_browser_keys (
|
|
2
|
-
id INTEGER PRIMARY KEY CHECK(id = 1), public_key TEXT NOT NULL, private_key TEXT NOT NULL
|
|
3
|
-
);
|
|
4
|
-
CREATE TABLE notification_browser_subscriptions (
|
|
5
|
-
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL,
|
|
6
|
-
endpoint TEXT NOT NULL UNIQUE, auth_key TEXT NOT NULL, public_key TEXT NOT NULL,
|
|
7
|
-
expires_at INTEGER, language TEXT NOT NULL CHECK(language IN ('en', 'zh')), created_at INTEGER NOT NULL
|
|
8
|
-
);
|
|
9
|
-
CREATE INDEX notification_browser_owner ON notification_browser_subscriptions(owner_id, workspace_id);
|
|
10
|
-
CREATE TABLE notification_presence (
|
|
11
|
-
owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL, client_id TEXT NOT NULL,
|
|
12
|
-
surface TEXT NOT NULL CHECK(surface IN ('web', 'electron', 'mobile')),
|
|
13
|
-
expires_at INTEGER NOT NULL, subject_id TEXT, subject_revision INTEGER,
|
|
14
|
-
PRIMARY KEY(owner_id, workspace_id, client_id)
|
|
15
|
-
);
|
|
16
|
-
CREATE TABLE notification_dispatches (
|
|
17
|
-
id TEXT PRIMARY KEY, notification_id TEXT NOT NULL REFERENCES notification_events(event_id),
|
|
18
|
-
owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL,
|
|
19
|
-
channel TEXT NOT NULL CHECK(channel IN ('browser', 'telegram')),
|
|
20
|
-
destination_id TEXT NOT NULL, destination_json TEXT CHECK(destination_json IS NULL OR json_valid(destination_json)),
|
|
21
|
-
subject_id TEXT, subject_revision INTEGER NOT NULL CHECK(subject_revision > 0),
|
|
22
|
-
status TEXT NOT NULL CHECK(status IN ('pending', 'sending', 'accepted', 'failed', 'unknown', 'cancelled')),
|
|
23
|
-
attempt INTEGER NOT NULL CHECK(attempt >= 0), failure_count INTEGER NOT NULL DEFAULT 0 CHECK(failure_count >= 0),
|
|
24
|
-
next_attempt_at INTEGER NOT NULL,
|
|
25
|
-
lease_until INTEGER, provider_message_id TEXT, last_error TEXT,
|
|
26
|
-
UNIQUE(notification_id, channel, destination_id)
|
|
27
|
-
);
|
|
28
|
-
CREATE INDEX notification_dispatch_due ON notification_dispatches(status, next_attempt_at);
|
|
29
|
-
CREATE INDEX notification_dispatch_owner ON notification_dispatches(owner_id, workspace_id);
|
|
30
|
-
CREATE TABLE notification_result_outbox (
|
|
31
|
-
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL, subject_id TEXT NOT NULL UNIQUE,
|
|
32
|
-
status TEXT NOT NULL CHECK(status IN ('pending', 'processing', 'settled', 'failed')),
|
|
33
|
-
attempt INTEGER NOT NULL CHECK(attempt >= 0), next_attempt_at INTEGER NOT NULL,
|
|
34
|
-
lease_until INTEGER, last_error TEXT, decision_reason TEXT,
|
|
35
|
-
created_at INTEGER NOT NULL, settled_at INTEGER, updated_at INTEGER NOT NULL
|
|
36
|
-
);
|
|
37
|
-
CREATE TABLE notification_attention_budget (
|
|
38
|
-
dedupe_key TEXT PRIMARY KEY, owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL,
|
|
39
|
-
local_day TEXT NOT NULL, created_at INTEGER NOT NULL
|
|
40
|
-
);
|
|
41
|
-
CREATE INDEX notification_attention_day ON notification_attention_budget(owner_id, workspace_id, local_day);
|
|
42
|
-
CREATE TABLE notification_digest_queue (
|
|
43
|
-
subject_id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL,
|
|
44
|
-
subject_revision INTEGER NOT NULL CHECK(subject_revision > 0), mode TEXT NOT NULL CHECK(mode IN ('daily', 'quiet')),
|
|
45
|
-
due_at INTEGER NOT NULL, consumed_at INTEGER,
|
|
46
|
-
status TEXT NOT NULL CHECK(status IN ('held', 'pending', 'consumed'))
|
|
47
|
-
);
|
|
48
|
-
CREATE TABLE notification_digests (
|
|
49
|
-
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL, occurrence_key TEXT NOT NULL,
|
|
50
|
-
created_at INTEGER NOT NULL, notification_id TEXT REFERENCES notification_events(event_id),
|
|
51
|
-
UNIQUE(owner_id, workspace_id, occurrence_key)
|
|
52
|
-
);
|
|
53
|
-
CREATE TABLE notification_digest_members (
|
|
54
|
-
digest_id TEXT NOT NULL REFERENCES notification_digests(id), subject_id TEXT NOT NULL,
|
|
55
|
-
subject_revision INTEGER NOT NULL CHECK(subject_revision > 0), PRIMARY KEY(digest_id, subject_id)
|
|
56
|
-
);
|
|
57
|
-
CREATE TABLE notification_dispatch_decisions (
|
|
58
|
-
dedupe_key TEXT PRIMARY KEY, owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL,
|
|
59
|
-
disposition TEXT NOT NULL, created_at INTEGER NOT NULL
|
|
60
|
-
);
|
|
61
|
-
CREATE TABLE notification_browser_probes (
|
|
62
|
-
id TEXT PRIMARY KEY, owner_id TEXT NOT NULL, workspace_id TEXT NOT NULL, subscription_id TEXT NOT NULL,
|
|
63
|
-
status TEXT NOT NULL CHECK(status IN ('accepted', 'opened', 'failed', 'unknown')),
|
|
64
|
-
created_at INTEGER NOT NULL, opened_at INTEGER, error TEXT
|
|
65
|
-
);
|