@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,46 +0,0 @@
|
|
|
1
|
-
import { runGit } from "../../execution-environments/git.js";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { createHash } from "node:crypto";
|
|
4
|
-
import { lstat, readFile, readlink } from "node:fs/promises";
|
|
5
|
-
//#region src/scenes/taskFollowUp/workspaceFingerprint.ts
|
|
6
|
-
/** Bind verification to tracked and non-ignored files without executing repository code. */
|
|
7
|
-
async function workspaceFingerprint(workspace) {
|
|
8
|
-
const hash = createHash("sha256");
|
|
9
|
-
hash.update(await runGit(workspace, ["rev-parse", "HEAD"]));
|
|
10
|
-
hash.update(await runGit(workspace, [
|
|
11
|
-
"symbolic-ref",
|
|
12
|
-
"--quiet",
|
|
13
|
-
"HEAD"
|
|
14
|
-
]));
|
|
15
|
-
const paths = [...new Set((await runGit(workspace, [
|
|
16
|
-
"ls-files",
|
|
17
|
-
"-z",
|
|
18
|
-
"--cached",
|
|
19
|
-
"--others",
|
|
20
|
-
"--exclude-standard"
|
|
21
|
-
])).split("\0").filter(Boolean))].sort();
|
|
22
|
-
if (paths.length > 2e4) throw new Error("Workspace verification file budget exceeded");
|
|
23
|
-
let bytes = 0;
|
|
24
|
-
for (const path of paths) {
|
|
25
|
-
const file = resolve(workspace, path);
|
|
26
|
-
hash.update(JSON.stringify(path));
|
|
27
|
-
const stat = await lstat(file).catch((error) => {
|
|
28
|
-
if (error.code === "ENOENT") return void 0;
|
|
29
|
-
throw error;
|
|
30
|
-
});
|
|
31
|
-
if (!stat) {
|
|
32
|
-
hash.update("deleted");
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
hash.update(String(stat.mode));
|
|
36
|
-
if (stat.isSymbolicLink()) hash.update(await readlink(file));
|
|
37
|
-
else if (stat.isFile()) {
|
|
38
|
-
bytes += stat.size;
|
|
39
|
-
if (bytes > 256 * 1024 * 1024) throw new Error("Workspace verification size budget exceeded");
|
|
40
|
-
hash.update(await readFile(file));
|
|
41
|
-
} else throw new Error("Submodules and special files require a separate verification workspace");
|
|
42
|
-
}
|
|
43
|
-
return hash.digest("hex");
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
export { workspaceFingerprint };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export declare const mailFollowUpTemplate: {
|
|
2
|
-
schemaVersion: 1;
|
|
3
|
-
key: string;
|
|
4
|
-
version: string;
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
goalMode: "finite" | "ongoing";
|
|
8
|
-
contextProviders: string[];
|
|
9
|
-
triggers: ({
|
|
10
|
-
id: string;
|
|
11
|
-
type: "manual";
|
|
12
|
-
} | {
|
|
13
|
-
id: string;
|
|
14
|
-
type: "event";
|
|
15
|
-
eventType: string;
|
|
16
|
-
} | {
|
|
17
|
-
id: string;
|
|
18
|
-
type: "schedule";
|
|
19
|
-
})[];
|
|
20
|
-
execution: {
|
|
21
|
-
kind: string;
|
|
22
|
-
instruction: string;
|
|
23
|
-
limits: {
|
|
24
|
-
timeoutSeconds: number;
|
|
25
|
-
maxIterations: number;
|
|
26
|
-
maxToolCalls: number;
|
|
27
|
-
maxOutputTokens: number;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
allowedOutcomeKinds: ("decision" | "artifact" | "receipt" | "observation" | "no_change" | "state_change" | "effect_proposal")[];
|
|
31
|
-
allowedEffectHandlers: string[];
|
|
32
|
-
};
|
|
33
|
-
export declare const familyPlanTemplate: {
|
|
34
|
-
schemaVersion: 1;
|
|
35
|
-
key: string;
|
|
36
|
-
version: string;
|
|
37
|
-
title: string;
|
|
38
|
-
description: string;
|
|
39
|
-
goalMode: "finite" | "ongoing";
|
|
40
|
-
contextProviders: string[];
|
|
41
|
-
triggers: ({
|
|
42
|
-
id: string;
|
|
43
|
-
type: "manual";
|
|
44
|
-
} | {
|
|
45
|
-
id: string;
|
|
46
|
-
type: "event";
|
|
47
|
-
eventType: string;
|
|
48
|
-
} | {
|
|
49
|
-
id: string;
|
|
50
|
-
type: "schedule";
|
|
51
|
-
})[];
|
|
52
|
-
execution: {
|
|
53
|
-
kind: string;
|
|
54
|
-
instruction: string;
|
|
55
|
-
limits: {
|
|
56
|
-
timeoutSeconds: number;
|
|
57
|
-
maxIterations: number;
|
|
58
|
-
maxToolCalls: number;
|
|
59
|
-
maxOutputTokens: number;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
allowedOutcomeKinds: ("decision" | "artifact" | "receipt" | "observation" | "no_change" | "state_change" | "effect_proposal")[];
|
|
63
|
-
allowedEffectHandlers: string[];
|
|
64
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { sceneTemplateSchema } from "../../packages/gateway-contract/src/scenes.js";
|
|
2
|
-
//#region src/scenes/templates.ts
|
|
3
|
-
const mailFollowUpTemplate = sceneTemplateSchema.parse({
|
|
4
|
-
schemaVersion: 1,
|
|
5
|
-
key: "mail-follow-up",
|
|
6
|
-
version: "1.0.0",
|
|
7
|
-
title: "跟进重要邮件",
|
|
8
|
-
description: "在约定时间检查指定邮件,准备需要你判断的下一步;不自动发送。",
|
|
9
|
-
goalMode: "ongoing",
|
|
10
|
-
contextProviders: ["mail"],
|
|
11
|
-
triggers: [
|
|
12
|
-
{
|
|
13
|
-
id: "check",
|
|
14
|
-
type: "manual"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: "due",
|
|
18
|
-
type: "schedule"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: "changed",
|
|
22
|
-
type: "event",
|
|
23
|
-
eventType: "mail.thread.changed"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
execution: {
|
|
27
|
-
kind: "agent",
|
|
28
|
-
instruction: "Review the authorized mail thread against the user goal. If a reply resolves the request or no useful next step exists, return no_change. Otherwise prepare a concise follow-up draft or a decision with evidence. Do not infer that a draft was sent. Do not infer missing messages or recipients.",
|
|
29
|
-
limits: {
|
|
30
|
-
timeoutSeconds: 90,
|
|
31
|
-
maxIterations: 1,
|
|
32
|
-
maxToolCalls: 0,
|
|
33
|
-
maxOutputTokens: 2e3
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
allowedOutcomeKinds: [
|
|
37
|
-
"no_change",
|
|
38
|
-
"artifact",
|
|
39
|
-
"decision"
|
|
40
|
-
],
|
|
41
|
-
allowedEffectHandlers: []
|
|
42
|
-
});
|
|
43
|
-
const familyPlanTemplate = sceneTemplateSchema.parse({
|
|
44
|
-
schemaVersion: 1,
|
|
45
|
-
key: "weekly-family-plan",
|
|
46
|
-
version: "1.0.0",
|
|
47
|
-
title: "提前准备下周家庭安排",
|
|
48
|
-
description: "根据你提供的安排整理冲突、准备事项和可选计划,不替你决定家庭活动。",
|
|
49
|
-
goalMode: "ongoing",
|
|
50
|
-
contextProviders: ["user_notes"],
|
|
51
|
-
triggers: [{
|
|
52
|
-
id: "check",
|
|
53
|
-
type: "manual"
|
|
54
|
-
}, {
|
|
55
|
-
id: "weekly-review",
|
|
56
|
-
type: "schedule"
|
|
57
|
-
}],
|
|
58
|
-
execution: {
|
|
59
|
-
kind: "agent",
|
|
60
|
-
instruction: "Use only the supplied family arrangements to prepare next week. Surface concrete conflicts and useful preparations. Preserve room for rest and changing plans. Do not infer access to other family members, medical advice, or obligations not provided by the user. No useful change means no_change.",
|
|
61
|
-
limits: {
|
|
62
|
-
timeoutSeconds: 90,
|
|
63
|
-
maxIterations: 1,
|
|
64
|
-
maxToolCalls: 0,
|
|
65
|
-
maxOutputTokens: 2e3
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
allowedOutcomeKinds: [
|
|
69
|
-
"no_change",
|
|
70
|
-
"artifact",
|
|
71
|
-
"decision"
|
|
72
|
-
],
|
|
73
|
-
allowedEffectHandlers: []
|
|
74
|
-
});
|
|
75
|
-
//#endregion
|
|
76
|
-
export { familyPlanTemplate, mailFollowUpTemplate };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { SceneContextProvider, SceneEvidence } from './execution.js';
|
|
3
|
-
import type { SceneActivation } from './contracts.js';
|
|
4
|
-
/** Explicit notes belong to one delegation, not an implicit family-wide data grant. */
|
|
5
|
-
export declare class SceneUserNotesProvider implements SceneContextProvider {
|
|
6
|
-
private readonly db;
|
|
7
|
-
private readonly clock;
|
|
8
|
-
readonly id = "user_notes";
|
|
9
|
-
constructor(db: DatabaseSync, clock?: () => number);
|
|
10
|
-
setupIssues(activation: SceneActivation): string[];
|
|
11
|
-
authorization(activation: SceneActivation): string[] | null;
|
|
12
|
-
read(input: Parameters<SceneContextProvider['read']>[0]): Promise<SceneEvidence[]>;
|
|
13
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { SceneSourceNotReady } from "./readiness.js";
|
|
2
|
-
//#region src/scenes/userNotes.ts
|
|
3
|
-
/** Explicit notes belong to one delegation, not an implicit family-wide data grant. */
|
|
4
|
-
var SceneUserNotesProvider = class {
|
|
5
|
-
id = "user_notes";
|
|
6
|
-
constructor(db, clock = Date.now) {
|
|
7
|
-
this.db = db;
|
|
8
|
-
this.clock = clock;
|
|
9
|
-
}
|
|
10
|
-
setupIssues(activation) {
|
|
11
|
-
return activation.scope.kind === "personal" ? [] : ["personal_notes_scope"];
|
|
12
|
-
}
|
|
13
|
-
authorization(activation) {
|
|
14
|
-
return activation.scope.kind === "personal" ? [] : null;
|
|
15
|
-
}
|
|
16
|
-
async read(input) {
|
|
17
|
-
input.signal.throwIfAborted();
|
|
18
|
-
if (!input.permissions.contextProviders.includes(this.id) || input.activation.scope.kind !== "personal") throw new Error("Personal notes permission is required");
|
|
19
|
-
const row = this.db.prepare(`SELECT n.content, n.revision, n.valid_until, n.updated_at
|
|
20
|
-
FROM scene_activations a LEFT JOIN scene_notes n ON n.activation_id = a.id
|
|
21
|
-
WHERE a.id = ? AND a.owner_id = ? AND a.workspace_id = ? AND a.status = 'active'
|
|
22
|
-
AND json_extract(a.scope_json, '$.kind') = 'personal'`).get(input.activation.id, input.activation.ownerId, input.activation.workspaceId);
|
|
23
|
-
if (!row) throw new Error("Personal notes are unavailable");
|
|
24
|
-
if (row.content === null || row.content === "") return [];
|
|
25
|
-
const now = this.clock();
|
|
26
|
-
if (row.valid_until !== null && Number(row.valid_until) <= now) throw new SceneSourceNotReady();
|
|
27
|
-
return [{
|
|
28
|
-
id: `scene-notes:${input.activation.id}`,
|
|
29
|
-
subjectId: input.activation.id,
|
|
30
|
-
ownerId: input.activation.ownerId,
|
|
31
|
-
workspaceId: input.activation.workspaceId,
|
|
32
|
-
revision: String(row.revision),
|
|
33
|
-
occurredAt: Number(row.updated_at),
|
|
34
|
-
content: String(row.content),
|
|
35
|
-
freshUntil: Math.min(now + 6e4, row.valid_until === null ? Infinity : Number(row.valid_until))
|
|
36
|
-
}];
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
//#endregion
|
|
40
|
-
export { SceneUserNotesProvider };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
DROP TABLE IF EXISTS proactive_preview_runs;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
CREATE TABLE discussion_recording_chunks (
|
|
2
|
-
discussion_id TEXT NOT NULL REFERENCES discussion_captures(id) ON DELETE CASCADE,
|
|
3
|
-
sequence INTEGER NOT NULL CHECK(sequence >= 0),
|
|
4
|
-
sha256 TEXT NOT NULL,
|
|
5
|
-
bytes INTEGER NOT NULL CHECK(bytes > 0),
|
|
6
|
-
PRIMARY KEY(discussion_id, sequence)
|
|
7
|
-
);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
CREATE TABLE discussion_transcript_revisions (
|
|
2
|
-
discussion_id TEXT NOT NULL REFERENCES discussion_captures(id) ON DELETE CASCADE,
|
|
3
|
-
revision INTEGER NOT NULL,
|
|
4
|
-
segments_json TEXT NOT NULL,
|
|
5
|
-
created_at INTEGER NOT NULL,
|
|
6
|
-
PRIMARY KEY(discussion_id, revision)
|
|
7
|
-
);
|
|
8
|
-
ALTER TABLE discussion_organizations ADD COLUMN transcript_revision INTEGER NOT NULL DEFAULT 0;
|
|
9
|
-
UPDATE discussion_organizations SET transcript_revision = COALESCE((SELECT transcript_revision FROM discussion_captures WHERE id = discussion_id), 0);
|
|
10
|
-
UPDATE discussion_organizations SET organization_json = json_set(organization_json, '$.decisions', json(COALESCE((SELECT json_group_array(json_object('id', lower(hex(randomblob(8))), 'text', value, 'evidenceSegmentIds', json('[]'))) FROM json_each(organization_json, '$.decisions')), '[]'))) WHERE organization_json IS NOT NULL;
|
|
11
|
-
UPDATE discussion_organizations SET organization_json = json_set(organization_json, '$.risks', json(COALESCE((SELECT json_group_array(json_object('id', lower(hex(randomblob(8))), 'text', value, 'evidenceSegmentIds', json('[]'))) FROM json_each(organization_json, '$.risks')), '[]'))) WHERE organization_json IS NOT NULL;
|
|
12
|
-
UPDATE discussion_organizations SET organization_json = json_set(organization_json, '$.openQuestions', json(COALESCE((SELECT json_group_array(json_object('id', lower(hex(randomblob(8))), 'text', value, 'evidenceSegmentIds', json('[]'))) FROM json_each(organization_json, '$.openQuestions')), '[]'))) WHERE organization_json IS NOT NULL;
|
|
13
|
-
UPDATE discussion_organizations SET organization_json = json_set(organization_json, '$.chapters', json('[]'), '$.actionItems', json(COALESCE((SELECT json_group_array(json_set(value, '$.evidenceSegmentIds', json('[]'))) FROM json_each(organization_json, '$.actionItems')), '[]'))) WHERE organization_json IS NOT NULL;
|
|
14
|
-
|
|
15
|
-
ALTER TABLE discussion_captures ADD COLUMN organization_template TEXT NOT NULL DEFAULT 'general';
|
|
16
|
-
CREATE TABLE discussion_analysis_chunks (discussion_id TEXT NOT NULL REFERENCES discussion_captures(id) ON DELETE CASCADE, input_hash TEXT NOT NULL, result_json TEXT NOT NULL, PRIMARY KEY (discussion_id, input_hash));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
CREATE TABLE discussion_action_tasks (
|
|
2
|
-
discussion_id TEXT NOT NULL REFERENCES discussion_captures(id) ON DELETE CASCADE,
|
|
3
|
-
action_id TEXT NOT NULL,
|
|
4
|
-
task_id TEXT NOT NULL,
|
|
5
|
-
organization_revision INTEGER NOT NULL,
|
|
6
|
-
created_at INTEGER NOT NULL,
|
|
7
|
-
PRIMARY KEY(discussion_id, action_id)
|
|
8
|
-
);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
CREATE TABLE discussion_edits (
|
|
2
|
-
discussion_id TEXT NOT NULL REFERENCES discussion_captures(id) ON DELETE CASCADE,
|
|
3
|
-
kind TEXT NOT NULL CHECK (kind IN ('summary', 'decisions', 'actionItems', 'risks', 'openQuestions')),
|
|
4
|
-
item_id TEXT NOT NULL,
|
|
5
|
-
value_json TEXT NOT NULL,
|
|
6
|
-
updated_at INTEGER NOT NULL,
|
|
7
|
-
PRIMARY KEY (discussion_id, kind, item_id)
|
|
8
|
-
);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
CREATE TABLE discussion_recording_jobs (
|
|
2
|
-
id TEXT PRIMARY KEY,
|
|
3
|
-
discussion_id TEXT NOT NULL UNIQUE REFERENCES discussion_captures(id) ON DELETE CASCADE,
|
|
4
|
-
input_json TEXT NOT NULL,
|
|
5
|
-
manifest_hash TEXT NOT NULL,
|
|
6
|
-
state TEXT NOT NULL CHECK(state IN ('queued', 'running', 'completed', 'failed', 'cancelled')),
|
|
7
|
-
lease_owner TEXT,
|
|
8
|
-
lease_until INTEGER,
|
|
9
|
-
error TEXT,
|
|
10
|
-
created_at INTEGER NOT NULL,
|
|
11
|
-
updated_at INTEGER NOT NULL
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
CREATE INDEX discussion_recording_jobs_pending ON discussion_recording_jobs(state, created_at);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
ALTER TABLE discussion_captures ADD COLUMN source_new TEXT NOT NULL DEFAULT 'web'
|
|
2
|
-
CHECK (source_new IN ('web', 'electron', 'mobile'));
|
|
3
|
-
UPDATE discussion_captures SET source_new = source;
|
|
4
|
-
ALTER TABLE discussion_captures DROP COLUMN source;
|
|
5
|
-
ALTER TABLE discussion_captures RENAME COLUMN source_new TO source;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
CREATE TABLE capability_imports (
|
|
2
|
-
id TEXT PRIMARY KEY,
|
|
3
|
-
owner TEXT NOT NULL,
|
|
4
|
-
kind TEXT NOT NULL CHECK (kind IN ('scan', 'plan', 'job', 'run')),
|
|
5
|
-
created_at INTEGER NOT NULL,
|
|
6
|
-
idempotency_key TEXT,
|
|
7
|
-
payload TEXT NOT NULL
|
|
8
|
-
);
|
|
9
|
-
CREATE INDEX capability_imports_owner_kind ON capability_imports(owner, kind, created_at DESC);
|
|
10
|
-
CREATE UNIQUE INDEX capability_imports_idempotency ON capability_imports(owner, idempotency_key)
|
|
11
|
-
WHERE idempotency_key IS NOT NULL;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
CREATE TABLE import_selections (
|
|
2
|
-
id TEXT PRIMARY KEY,
|
|
3
|
-
owner TEXT NOT NULL,
|
|
4
|
-
kind TEXT NOT NULL CHECK (kind IN ('inventory', 'run')),
|
|
5
|
-
created_at INTEGER NOT NULL,
|
|
6
|
-
payload TEXT NOT NULL
|
|
7
|
-
);
|
|
8
|
-
CREATE INDEX import_selections_owner_kind ON import_selections(owner, kind, created_at DESC);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
ALTER TABLE knowledge_sync_runs ADD COLUMN collection_scope TEXT;
|
|
2
|
-
ALTER TABLE proactive_presence ADD COLUMN inbox_item_id TEXT;
|
|
3
|
-
ALTER TABLE proactive_presence ADD COLUMN notification_revision INTEGER;
|
|
4
|
-
ALTER TABLE proactive_inbox_items ADD COLUMN actionable_until TEXT;
|
|
5
|
-
CREATE INDEX knowledge_sync_source_scope ON knowledge_sync_runs(source_instance_id, collection_scope, started_at DESC);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
UPDATE proactive_preferences SET preferences_json = json_remove(json_set(preferences_json,
|
|
2
|
-
'$.checksPaused', json(CASE WHEN json_extract(preferences_json, '$.level') = 'off' THEN 'true' ELSE 'false' END),
|
|
3
|
-
'$.checksPausedUntil', json_extract(preferences_json, '$.pausedUntil'),
|
|
4
|
-
'$.level', CASE WHEN json_extract(preferences_json, '$.level') = 'off' THEN 'balanced' ELSE COALESCE(json_extract(preferences_json, '$.level'), 'balanced') END), '$.pausedUntil');
|
|
5
|
-
UPDATE proactive_scenario_subscriptions SET enabled = 0 WHERE subscription_id IN
|
|
6
|
-
(SELECT subscription_id FROM proactive_subscription_settings WHERE json_extract(settings_json, '$.level') = 'off');
|
|
7
|
-
UPDATE proactive_subscription_settings SET settings_json = json_set(settings_json, '$.level', NULL)
|
|
8
|
-
WHERE json_extract(settings_json, '$.level') = 'off';
|
|
9
|
-
CREATE TABLE heartbeat_checks (
|
|
10
|
-
id TEXT PRIMARY KEY,
|
|
11
|
-
workspace_id TEXT NOT NULL,
|
|
12
|
-
started_at TEXT NOT NULL,
|
|
13
|
-
completed_at TEXT,
|
|
14
|
-
status TEXT NOT NULL,
|
|
15
|
-
detail TEXT,
|
|
16
|
-
content TEXT,
|
|
17
|
-
target TEXT,
|
|
18
|
-
chat_id TEXT,
|
|
19
|
-
fingerprint TEXT,
|
|
20
|
-
delivery_status TEXT NOT NULL DEFAULT 'none',
|
|
21
|
-
next_attempt_at TEXT,
|
|
22
|
-
expires_at TEXT NOT NULL
|
|
23
|
-
);
|
|
24
|
-
CREATE INDEX heartbeat_checks_recent ON heartbeat_checks(workspace_id, started_at DESC);
|
|
25
|
-
CREATE INDEX heartbeat_checks_pending ON heartbeat_checks(delivery_status, next_attempt_at);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
-- The runner disables foreign keys outside the transaction for this parent-table rebuild.
|
|
2
|
-
-- All existing device identities and dependent credential/session records are retained.
|
|
3
|
-
-- The _new tables exist only during this rebuild; all platforms still share the original table names.
|
|
4
|
-
CREATE TABLE devices_new (
|
|
5
|
-
device_id TEXT PRIMARY KEY,
|
|
6
|
-
display_name TEXT NOT NULL,
|
|
7
|
-
platform TEXT NOT NULL CHECK (platform IN ('ios', 'android', 'harmonyos', 'chrome')),
|
|
8
|
-
extension_id TEXT CHECK (extension_id IS NULL OR length(extension_id) = 32),
|
|
9
|
-
public_key_jwk TEXT NOT NULL,
|
|
10
|
-
scopes_json TEXT NOT NULL,
|
|
11
|
-
created_at INTEGER NOT NULL,
|
|
12
|
-
last_seen_at INTEGER,
|
|
13
|
-
revoked_at INTEGER,
|
|
14
|
-
CHECK ((platform = 'chrome') = (extension_id IS NOT NULL))
|
|
15
|
-
);
|
|
16
|
-
INSERT INTO devices_new
|
|
17
|
-
(device_id, display_name, platform, extension_id, public_key_jwk, scopes_json, created_at, last_seen_at, revoked_at)
|
|
18
|
-
SELECT device_id, display_name, platform, extension_id, public_key_jwk, scopes_json, created_at, last_seen_at, revoked_at
|
|
19
|
-
FROM devices;
|
|
20
|
-
DROP TABLE devices;
|
|
21
|
-
ALTER TABLE devices_new RENAME TO devices;
|
|
22
|
-
|
|
23
|
-
CREATE TABLE device_push_endpoints_new (
|
|
24
|
-
device_id TEXT PRIMARY KEY REFERENCES devices(device_id) ON DELETE CASCADE,
|
|
25
|
-
platform TEXT NOT NULL CHECK (platform IN ('ios', 'android', 'harmonyos')),
|
|
26
|
-
push_token TEXT NOT NULL UNIQUE,
|
|
27
|
-
enabled INTEGER NOT NULL DEFAULT 1,
|
|
28
|
-
permissions TEXT NOT NULL CHECK (permissions IN ('granted', 'denied', 'unknown')),
|
|
29
|
-
preferences_json TEXT NOT NULL DEFAULT '{}',
|
|
30
|
-
locale TEXT NOT NULL CHECK (locale IN ('en', 'zh')),
|
|
31
|
-
app_version TEXT,
|
|
32
|
-
lease_expires_at INTEGER NOT NULL,
|
|
33
|
-
last_seen_at INTEGER NOT NULL,
|
|
34
|
-
created_at INTEGER NOT NULL,
|
|
35
|
-
updated_at INTEGER NOT NULL
|
|
36
|
-
);
|
|
37
|
-
INSERT INTO device_push_endpoints_new
|
|
38
|
-
SELECT device_id, platform, push_token, enabled, permissions, preferences_json, locale,
|
|
39
|
-
app_version, lease_expires_at, last_seen_at, created_at, updated_at FROM device_push_endpoints;
|
|
40
|
-
DROP TABLE device_push_endpoints;
|
|
41
|
-
ALTER TABLE device_push_endpoints_new RENAME TO device_push_endpoints;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS knowledge_item_status_events (
|
|
2
|
-
event_id TEXT PRIMARY KEY,
|
|
3
|
-
knowledge_id TEXT NOT NULL REFERENCES knowledge_items(knowledge_id) ON DELETE CASCADE,
|
|
4
|
-
from_status TEXT,
|
|
5
|
-
to_status TEXT NOT NULL,
|
|
6
|
-
actor_type TEXT NOT NULL CHECK(actor_type IN ('user', 'agent', 'runtime', 'maintenance', 'migration')),
|
|
7
|
-
reason TEXT NOT NULL,
|
|
8
|
-
created_at INTEGER NOT NULL
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_item_status_events_item
|
|
12
|
-
ON knowledge_item_status_events(knowledge_id, created_at DESC);
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
ALTER TABLE connector_installations RENAME COLUMN selected_connection_ids_json TO selected_account_ids_json;
|
|
2
|
-
UPDATE connector_installations
|
|
3
|
-
SET selected_account_ids_json = CASE
|
|
4
|
-
WHEN json_array_length(selected_account_ids_json) = 0 THEN 'null'
|
|
5
|
-
ELSE (
|
|
6
|
-
SELECT json_group_array(DISTINCT c.account_id)
|
|
7
|
-
FROM json_each(connector_installations.selected_account_ids_json) selected
|
|
8
|
-
JOIN connector_connections c ON c.id = selected.value
|
|
9
|
-
WHERE c.principal_id = connector_installations.principal_id
|
|
10
|
-
AND c.connector_id = connector_installations.connector_id
|
|
11
|
-
AND c.account_id IS NOT NULL
|
|
12
|
-
)
|
|
13
|
-
END;
|
|
14
|
-
|
|
15
|
-
ALTER TABLE connector_accounts ADD COLUMN label TEXT;
|
|
16
|
-
ALTER TABLE connector_accounts ADD COLUMN enabled INTEGER NOT NULL DEFAULT 1;
|
|
17
|
-
ALTER TABLE connector_accounts ADD COLUMN allowed_agent_ids_json TEXT;
|
|
18
|
-
UPDATE connector_accounts SET label = (
|
|
19
|
-
SELECT alias FROM connector_connections WHERE account_id = connector_accounts.id
|
|
20
|
-
AND alias IS NOT NULL ORDER BY is_default DESC, updated_at DESC LIMIT 1
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
CREATE TABLE connector_backends (
|
|
24
|
-
id TEXT PRIMARY KEY,
|
|
25
|
-
mode TEXT NOT NULL CHECK(mode IN ('managed', 'byok')),
|
|
26
|
-
label TEXT NOT NULL,
|
|
27
|
-
credential_ref TEXT,
|
|
28
|
-
credential_source TEXT NOT NULL DEFAULT 'stored' CHECK(credential_source IN ('stored','environment')),
|
|
29
|
-
verified_at TEXT,
|
|
30
|
-
active INTEGER NOT NULL DEFAULT 0,
|
|
31
|
-
created_at TEXT NOT NULL
|
|
32
|
-
);
|
|
33
|
-
CREATE UNIQUE INDEX idx_connector_backend_active ON connector_backends(active) WHERE active = 1;
|
|
34
|
-
ALTER TABLE connector_accounts ADD COLUMN backend_id TEXT;
|
|
35
|
-
DROP INDEX idx_connector_accounts_identity;
|
|
36
|
-
CREATE UNIQUE INDEX idx_connector_accounts_identity
|
|
37
|
-
ON connector_accounts(principal_id, backend_id, connector_id, identity_key)
|
|
38
|
-
WHERE identity_key IS NOT NULL;
|
|
39
|
-
|
|
40
|
-
CREATE TABLE connector_objective_accounts (
|
|
41
|
-
conversation_id TEXT NOT NULL,
|
|
42
|
-
transcript_id TEXT NOT NULL,
|
|
43
|
-
objective_id TEXT NOT NULL,
|
|
44
|
-
connector_id TEXT NOT NULL,
|
|
45
|
-
account_id TEXT NOT NULL REFERENCES connector_accounts(id) ON DELETE CASCADE,
|
|
46
|
-
PRIMARY KEY(conversation_id, transcript_id, objective_id, connector_id, account_id)
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
-- Provider IDs are scoped to a backend, not the whole installation.
|
|
50
|
-
CREATE TABLE connector_connections_next (
|
|
51
|
-
id TEXT PRIMARY KEY,
|
|
52
|
-
installation_id TEXT REFERENCES connector_installations(id) ON DELETE SET NULL,
|
|
53
|
-
connector_id TEXT NOT NULL,
|
|
54
|
-
provider TEXT NOT NULL,
|
|
55
|
-
principal_id TEXT NOT NULL,
|
|
56
|
-
provider_connection_id TEXT NOT NULL,
|
|
57
|
-
alias TEXT,
|
|
58
|
-
identity_json TEXT NOT NULL DEFAULT '{}',
|
|
59
|
-
status TEXT NOT NULL DEFAULT 'unknown' CHECK(status IN ('pending','active','expired','failed','revoked','disabled','unknown')),
|
|
60
|
-
is_default INTEGER NOT NULL DEFAULT 0 CHECK(is_default IN (0,1)),
|
|
61
|
-
connected_at TEXT,
|
|
62
|
-
expires_at TEXT,
|
|
63
|
-
last_error TEXT,
|
|
64
|
-
metadata_json TEXT NOT NULL DEFAULT '{}',
|
|
65
|
-
created_at TEXT NOT NULL,
|
|
66
|
-
updated_at TEXT NOT NULL,
|
|
67
|
-
account_id TEXT REFERENCES connector_accounts(id) ON DELETE CASCADE
|
|
68
|
-
);
|
|
69
|
-
INSERT INTO connector_connections_next SELECT * FROM connector_connections;
|
|
70
|
-
DROP TABLE connector_connections;
|
|
71
|
-
ALTER TABLE connector_connections_next RENAME TO connector_connections;
|
|
72
|
-
CREATE INDEX idx_connector_connections_principal ON connector_connections(principal_id, connector_id, status);
|
|
73
|
-
CREATE INDEX idx_connector_connections_account ON connector_connections(account_id);
|
|
74
|
-
CREATE UNIQUE INDEX idx_connector_connections_provider_backend
|
|
75
|
-
ON connector_connections(provider, COALESCE(json_extract(metadata_json, '$.backendId'), ''), provider_connection_id);
|
|
76
|
-
|
|
77
|
-
CREATE TABLE connector_authorization_attempts (
|
|
78
|
-
id TEXT PRIMARY KEY,
|
|
79
|
-
principal_id TEXT NOT NULL,
|
|
80
|
-
connector_id TEXT NOT NULL,
|
|
81
|
-
backend_id TEXT,
|
|
82
|
-
connection_id TEXT NOT NULL REFERENCES connector_connections(id) ON DELETE CASCADE,
|
|
83
|
-
expected_account_id TEXT,
|
|
84
|
-
authorization_url TEXT,
|
|
85
|
-
status TEXT NOT NULL CHECK(status IN ('awaiting_user','succeeded','failed','expired')),
|
|
86
|
-
expires_at INTEGER NOT NULL,
|
|
87
|
-
created_at INTEGER NOT NULL
|
|
88
|
-
);
|
|
89
|
-
CREATE INDEX idx_connector_authorization_attempt_scope ON connector_authorization_attempts(principal_id,connector_id,created_at);
|
|
90
|
-
CREATE TABLE connector_runtime_identity (id INTEGER PRIMARY KEY CHECK(id = 1), installation_id TEXT NOT NULL);
|
|
91
|
-
INSERT INTO connector_runtime_identity VALUES(1, lower(hex(randomblob(16))));
|
|
92
|
-
ALTER TABLE connector_approvals ADD COLUMN wait_id TEXT;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
-- Repair only accounts whose authorizations agree on one known backend.
|
|
2
|
-
-- Identity collisions are reconciled transactionally by the next provider sync.
|
|
3
|
-
WITH candidates AS (
|
|
4
|
-
SELECT c.account_id, MIN(json_extract(c.metadata_json, '$.backendId')) AS backend_id
|
|
5
|
-
FROM connector_connections c
|
|
6
|
-
GROUP BY c.account_id
|
|
7
|
-
HAVING COUNT(DISTINCT json_extract(c.metadata_json, '$.backendId')) = 1
|
|
8
|
-
AND COUNT(json_extract(c.metadata_json, '$.backendId')) = COUNT(*)
|
|
9
|
-
)
|
|
10
|
-
UPDATE connector_accounts AS account
|
|
11
|
-
SET backend_id = (SELECT backend_id FROM candidates WHERE account_id = account.id)
|
|
12
|
-
WHERE account.backend_id IS NULL
|
|
13
|
-
AND EXISTS (SELECT 1 FROM candidates JOIN connector_backends backend ON backend.id = candidates.backend_id WHERE candidates.account_id = account.id)
|
|
14
|
-
AND NOT EXISTS (
|
|
15
|
-
SELECT 1 FROM connector_accounts other JOIN candidates ON candidates.account_id = account.id
|
|
16
|
-
WHERE other.id <> account.id
|
|
17
|
-
AND COALESCE(other.backend_id, (SELECT backend_id FROM candidates WHERE account_id = other.id)) = candidates.backend_id
|
|
18
|
-
AND other.principal_id = account.principal_id AND other.connector_id = account.connector_id
|
|
19
|
-
AND other.identity_key = account.identity_key
|
|
20
|
-
);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
CREATE TABLE memory_suppressions (
|
|
2
|
-
fingerprint TEXT PRIMARY KEY,
|
|
3
|
-
created_at INTEGER NOT NULL
|
|
4
|
-
);
|
|
5
|
-
|
|
6
|
-
UPDATE notification_events SET
|
|
7
|
-
event_type = 'work_discovery.completed',
|
|
8
|
-
dedupe_key = replace(dedupe_key, 'work_discovery.review_ready:', 'work_discovery.completed:'),
|
|
9
|
-
title_en = 'Understanding updated', title_zh = '用户理解已更新',
|
|
10
|
-
body_en = 'See what xopc learned. You can edit or delete it anytime.',
|
|
11
|
-
body_zh = '理解已自动整理,可随时查看、修改或删除。'
|
|
12
|
-
WHERE event_type = 'work_discovery.review_ready';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
CREATE TABLE sidebar_layouts (
|
|
2
|
-
container_id TEXT PRIMARY KEY,
|
|
3
|
-
revision INTEGER NOT NULL DEFAULT 0,
|
|
4
|
-
updated_at INTEGER NOT NULL
|
|
5
|
-
);
|
|
6
|
-
|
|
7
|
-
CREATE TABLE sidebar_positions (
|
|
8
|
-
container_id TEXT NOT NULL REFERENCES sidebar_layouts(container_id) ON DELETE CASCADE,
|
|
9
|
-
item_id TEXT NOT NULL,
|
|
10
|
-
position INTEGER NOT NULL,
|
|
11
|
-
PRIMARY KEY (container_id, item_id),
|
|
12
|
-
UNIQUE (container_id, position)
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
CREATE INDEX idx_sidebar_positions_order
|
|
16
|
-
ON sidebar_positions(container_id, position);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
ALTER TABLE connector_accounts ADD COLUMN runtime_instance_id TEXT;
|
|
2
|
-
CREATE UNIQUE INDEX idx_cli_account_identity ON connector_accounts(principal_id, runtime_instance_id, identity_key)
|
|
3
|
-
WHERE runtime_instance_id IS NOT NULL AND identity_key IS NOT NULL;
|
|
4
|
-
CREATE TABLE connector_cli_authorizations (
|
|
5
|
-
id TEXT PRIMARY KEY,
|
|
6
|
-
instance_id TEXT NOT NULL,
|
|
7
|
-
connector_id TEXT NOT NULL,
|
|
8
|
-
principal_id TEXT NOT NULL,
|
|
9
|
-
expected_account_id TEXT,
|
|
10
|
-
context_id TEXT NOT NULL,
|
|
11
|
-
phase TEXT NOT NULL CHECK(phase IN ('preparing','awaiting_user','verifying','succeeded','failed','expired','cancelled')),
|
|
12
|
-
challenge_json TEXT,
|
|
13
|
-
error TEXT,
|
|
14
|
-
account_id TEXT,
|
|
15
|
-
owner_id TEXT NOT NULL,
|
|
16
|
-
expires_at INTEGER NOT NULL,
|
|
17
|
-
updated_at INTEGER NOT NULL
|
|
18
|
-
);
|
|
19
|
-
CREATE UNIQUE INDEX idx_cli_active_authorization ON connector_cli_authorizations(instance_id, principal_id)
|
|
20
|
-
WHERE phase IN ('preparing','awaiting_user','verifying');
|
|
21
|
-
CREATE TABLE connector_cli_executions (
|
|
22
|
-
id TEXT PRIMARY KEY,
|
|
23
|
-
instance_id TEXT NOT NULL,
|
|
24
|
-
account_id TEXT NOT NULL,
|
|
25
|
-
connection_id TEXT NOT NULL,
|
|
26
|
-
action_id TEXT NOT NULL,
|
|
27
|
-
revision TEXT NOT NULL,
|
|
28
|
-
arguments_hash TEXT NOT NULL,
|
|
29
|
-
status TEXT NOT NULL CHECK(status IN ('running','success','failed','unknown')),
|
|
30
|
-
owner_id TEXT NOT NULL,
|
|
31
|
-
error_kind TEXT,
|
|
32
|
-
started_at INTEGER NOT NULL,
|
|
33
|
-
finished_at INTEGER
|
|
34
|
-
);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS scene_source_health (
|
|
2
|
-
activation_id TEXT PRIMARY KEY REFERENCES scene_activations(id) ON DELETE CASCADE,
|
|
3
|
-
last_attempt_at INTEGER NOT NULL,
|
|
4
|
-
last_success_at INTEGER,
|
|
5
|
-
reason TEXT,
|
|
6
|
-
consecutive_failures INTEGER NOT NULL DEFAULT 0,
|
|
7
|
-
retry_at INTEGER
|
|
8
|
-
);
|