@xopcai/xopc 0.0.286 → 0.0.291
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/README.md +16 -0
- package/README.zh-CN.md +16 -0
- package/dist/browser-ext/dist/assets/{auth-BXCWrPlg.js → auth-B2CDTr_F.js} +2 -1
- package/dist/browser-ext/dist/background.js +1 -1
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +36 -10
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-xOhV8FHx.js → activity-store-6lmzUBEr.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BzQbYWEj.js → agent-avatar-dicebear-BCtrkF15.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D2eYNelh.js +1 -0
- package/dist/gateway/static/root/assets/agents-BedA5XwI.js +1 -0
- package/dist/gateway/static/root/assets/{api-CVJQLBv9.js → api-D6yepxBp.js} +1 -1
- package/dist/gateway/static/root/assets/api-Dnfnl1Gd.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CTyuXkNC.js → app-management-settings-panel-Md562Fo-.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Tk-GJtvF.js → appearance-settings-BiBFI4BM.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-BA-7OrhJ.js → apps-page-Corla83b.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-O49jeeXo.js → archive-plugin-A_Unp751.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-r9lBF2tW.js → attachment-load-D6idSUyP.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CFFLXYgS.js → automations-page-C6j71Lgs.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DjZdhLQ5.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BpM43vsn.js → binary-plugins-BkKYh-8v.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DFrfEcGw.js → block-editor-CDcMvaku.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-CyHGQwxQ.js → browser-automation-inputs-Cq4sIJt2.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-CPkOWfM9.js → browser-automations-page-C64k4TBH.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-settings-page-BOcseZxg.js → browser-settings-page-1k5rj_qR.js} +3 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B2NvoTYb.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-DExixzp4.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-BArPeImO.js → channels-status-swr-CVzEYBpX.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D5Aka4S8.js → chat-terminal-dock-B9eKFkbg.js} +2 -2
- package/dist/gateway/static/root/assets/computer-model-settings-DW6j2lsn.js +1 -0
- package/dist/gateway/static/root/assets/computer-settings-page-C2Qyw63Q.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-C3ubZz7K.js +2 -0
- package/dist/gateway/static/root/assets/{date-picker-DNtRu6EB.js → date-picker-BdxjXVKL.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Dng3dIQa.js → dependency-picker-CXOa4uh4.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BicYycxy.js → desktop-pet-CBWiAaSv.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BEse55eX.js → desktop-pet-settings-BX1aILDK.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-be30HuFI.js → device-pairing-wizard-bqm_Yf4i.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-YzhYyuay.js → extension-debug-page-B4MMerja.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CEXVIkDl.js → extension-page-B3ZtINak.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CrlbgK8g.js → extension-settings-page-8BkQVh0z.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BNuoHXiZ.js → gateway-config-swr-BBovMBQ1.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-ZyhacQX5.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-zMPfje0n.js → gateway-startup-retry-NXDtzZED.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-BtxitqZ3.js → heartbeat-settings-Bllcxm2A.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-Cv2e8XBR.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-B_Tyx74A.js → image-generation-api-D01ieqGC.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-eZciuLw_.js → imports-page-DJG1BJzd.js} +1 -1
- package/dist/gateway/static/root/assets/index-B7EieIE4.js +75 -0
- package/dist/gateway/static/root/assets/index-BD5uNzie.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-B796W039.js → keyboard-shortcuts-settings-6A6JOHTI.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Cipj52Zq.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DXmY5jwM.js → local-apps-page-bD-m7YHJ.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-D0001I7p.js → locale-store-eliqUnBr.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-D5feO2yw.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-b1MG7s-3.js → management-settings-B7mz0_44.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-2txE_Blz.js → markdown-view-BIg7cei7.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CDEf3ksI.js → media-plugins-DQ2HfMeG.js} +1 -1
- package/dist/gateway/static/root/assets/messages-NYDOR8-j.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DhYJigb3.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-Bg5NPUdf.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-Bi_-DA5J.js → page-tabs-DmG_Qjl8.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Dhfdf14p.js → preview-open-alternatives-Y9J1kjKC.js} +1 -1
- package/dist/gateway/static/root/assets/{proactive-page-BNouL7Tv.js → proactive-page-Duc_NQ8l.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BkbZBqBr.js → product-open-page-DtgWUAwT.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DVOiucVA.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Dr_kDoCJ.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-icwoEKYB.js → registry-api-Dpm3N2h0.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-hyJ2KKKK.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-bmgxwWpW.js → runtime-tools-settings-panel-DB7J9opJ.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DoZeepCg.js → schema-form-CMYuPOlE.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-DGsnYcoh.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DuzZqQMn.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-sw2bbS2b.js → settings-form-section-BayJP08a.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BWF8uac0.js → settings-page-CWBqZtt6.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-C97S5g5c.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BIHYD6-O.js → share-preview-page-Wn5bQA-5.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-pfVzP8F7.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DDJ0ZKx3.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DbDpLjDW.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-dvue6Ish.js → skills-page.utils-DCHY_kou.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DCyxPWCl.js → system-settings-panel-DhgITgId.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-UqwtiHYu.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-CZwYGpbY.js → theme-store-DUHPzKzv.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-__auf8Ww.js → tunnel-api-DJ3gz2tM.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-Iq83UDt3.js → use-autosave-htvgT192.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-xOsXY_2W.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-D-QssKik.js → voice-api-key-field-BviJF3Oa.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-B0wNN_tE.js → voice-config-api-Bjy8EFqi.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-5NRYg1iI.js → work-discovery-overlay-BOBVNEYZ.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Ds2SZjLG.js → workflow-run-setup-panel-D1N9uUyM.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-2ylzlgkG.js +6 -0
- package/dist/gateway/static/root/index.html +10 -10
- package/dist/package.js +1 -1
- package/dist/packages/computer-control-contract/src/index.js +178 -0
- package/dist/packages/realtime-protocol/src/voice-audio.js +15 -10
- package/dist/packages/realtime-protocol/src/voice-catalog.js +61 -0
- package/dist/packages/realtime-protocol/src/voice.js +257 -248
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +5 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/embedded/run-turn.js +9 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +4 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/index.js +25 -15
- package/dist/src/agent/skills/parse-skill-metadata.d.ts +5 -1
- package/dist/src/agent/skills/parse-skill-metadata.js +21 -1
- package/dist/src/agent/skills/types.d.ts +7 -0
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -0
- package/dist/src/agent/tool-manuals/computer.js +19 -0
- package/dist/src/agent/tool-manuals/index.js +7 -0
- package/dist/src/agent/tools/computer-use-tool.d.ts +11 -0
- package/dist/src/agent/tools/computer-use-tool.js +86 -0
- package/dist/src/agent/tools/factory.d.ts +2 -0
- package/dist/src/agent/tools/factory.js +30 -0
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/resolver.js +5 -0
- package/dist/src/agent-config/schema.d.ts +32 -0
- package/dist/src/agent-config/schema.js +5 -2
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/readiness/from-config.js +14 -2
- package/dist/src/capabilities/readiness/planner.js +3 -2
- package/dist/src/capabilities/readiness/types.d.ts +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/computer/broker.d.ts +97 -0
- package/dist/src/computer/broker.js +337 -0
- package/dist/src/computer/config.d.ts +9 -0
- package/dist/src/computer/config.js +16 -0
- package/dist/src/computer/control-guard.d.ts +4 -0
- package/dist/src/computer/control-guard.js +17 -0
- package/dist/src/computer/errors.d.ts +7 -0
- package/dist/src/computer/errors.js +30 -0
- package/dist/src/computer/model-adapter.d.ts +44 -0
- package/dist/src/computer/model-adapter.js +273 -0
- package/dist/src/computer/model-config.d.ts +3 -0
- package/dist/src/computer/model-config.js +27 -0
- package/dist/src/computer/model-policy.d.ts +3 -0
- package/dist/src/computer/model-policy.js +20 -0
- package/dist/src/computer/runtime.d.ts +128 -0
- package/dist/src/computer/runtime.js +388 -0
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.d.ts +36 -0
- package/dist/src/config/models-json.js +15 -1
- package/dist/src/config/schema.d.ts +37 -0
- package/dist/src/config/schema.js +11 -2
- package/dist/src/config/voice.js +2 -2
- package/dist/src/endpoint-tools/invocation-service.d.ts +1 -0
- package/dist/src/endpoint-tools/invocation-service.js +5 -2
- package/dist/src/endpoint-tools/policy.js +7 -0
- package/dist/src/endpoint-tools/runtime.js +1 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +13 -1
- package/dist/src/endpoint-tools/upload-service.js +73 -8
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +7 -1
- package/dist/src/gateway/agent-builtin-tools.js +7 -0
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/global-defaults-admin.js +16 -0
- package/dist/src/gateway/hono/lib/config-payload.d.ts +15 -0
- package/dist/src/gateway/hono/lib/config-payload.js +2 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +13 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.js +3 -2
- package/dist/src/gateway/hono/routes/models.js +6 -3
- package/dist/src/gateway/hono/routes/voice.js +55 -1
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/security/gateway-scopes.d.ts +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +3 -0
- package/dist/src/gateway/service/config-coordinator.js +4 -1
- package/dist/src/gateway/service.js +12 -12
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-catalog-persistence.js +11 -2
- package/dist/src/providers/model-catalog-store.js +1 -0
- package/dist/src/providers/model-catalog-types.d.ts +7 -2
- package/dist/src/providers/model-reference-auditor.js +6 -3
- package/dist/src/providers/model-registry.js +4 -1
- package/dist/src/providers/model-supplements.js +18 -2
- package/dist/src/providers/presentation.js +4 -2
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/providers/xopc-cloud-model-source.js +10 -4
- package/dist/src/storage/sqlite/index.d.ts +1 -1
- package/dist/src/storage/sqlite/index.js +2 -2
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +17 -7
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +5 -2
- package/dist/src/storage/sqlite/migrations/discover.js +2 -2
- package/dist/src/storage/sqlite/migrations/errors.d.ts +5 -0
- package/dist/src/storage/sqlite/migrations/errors.js +12 -2
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -2
- package/dist/src/storage/sqlite/schema.js +2 -2
- package/dist/src/storage/sqlite/schema.sql +2641 -526
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +2 -2
- package/dist/src/voice/platform-catalog.d.ts +81 -0
- package/dist/src/voice/platform-catalog.js +16 -0
- package/dist/src/voice/platform-settings.d.ts +4 -0
- package/dist/src/voice/platform-settings.js +120 -0
- package/dist/src/voice/platform-streams.d.ts +12 -0
- package/dist/src/voice/platform-streams.js +250 -0
- package/dist/src/voice/realtime/omniEngine.js +8 -5
- package/dist/src/voice/realtime/omniRoute.d.ts +1 -0
- package/dist/src/voice/realtime/omniRoute.js +11 -1
- package/dist/src/voice/realtime/runtime.js +14 -6
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +15 -8
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +12 -19
- package/dist/src/work-discovery/service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +7 -4
- package/skills/creative/algorithmic-art/SKILL.md +7 -0
- package/skills/creative/frontend-design/SKILL.md +8 -0
- package/skills/creative/hatch-pet/SKILL.md +7 -0
- package/skills/creative/theme-factory/SKILL.md +8 -0
- package/skills/documents/doc-coauthoring/SKILL.md +7 -0
- package/skills/documents/docx/SKILL.md +7 -0
- package/skills/documents/pdf/SKILL.md +7 -0
- package/skills/documents/pptx/SKILL.md +7 -0
- package/skills/documents/xlsx/SKILL.md +9 -1
- package/skills/engineering/build-xopc-local-app/SKILL.md +7 -0
- package/skills/engineering/define-task/SKILL.md +7 -0
- package/skills/engineering/diagnose/SKILL.md +8 -0
- package/skills/engineering/tdd/SKILL.md +8 -0
- package/skills/tools/find-skills/SKILL.md +8 -0
- package/skills/tools/github/SKILL.md +7 -0
- package/skills/tools/summarize/SKILL.md +8 -0
- package/skills/tools/webapp-testing/SKILL.md +8 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BxR5eog4.js +0 -1
- package/dist/gateway/static/root/assets/agents-Dx1om1eN.js +0 -1
- package/dist/gateway/static/root/assets/api-q1kIMCLW.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DUZE1NOH.js +0 -6
- package/dist/gateway/static/root/assets/capabilities-settings-panel-ohEV64hG.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-UOf9mgqt.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BEQR0NRq.js +0 -2
- package/dist/gateway/static/root/assets/gateway-settings-CDJY1AOW.js +0 -1
- package/dist/gateway/static/root/assets/home-page-_oqo0pNR.js +0 -1
- package/dist/gateway/static/root/assets/index--YC42LAz.css +0 -2
- package/dist/gateway/static/root/assets/index-fVtuw2o9.js +0 -75
- package/dist/gateway/static/root/assets/local-app-workbench-page-Z8mpau9d.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-BGOO8ouT.js +0 -2
- package/dist/gateway/static/root/assets/messages-BWANv-N-.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-Bm33_3xJ.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-C32-xssK.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-CZ7glGYw.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-DP3ZINZz.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-xqJcPdOO.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-BaxIfjpm.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cy3Ab3Vg.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BuYto2mT.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DKtWUneq.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Dn7ElMUk.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-D-7UtJIc.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-efmH43Pq.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-DByIJcQq.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-BJv3eoKR.js +0 -6
- package/dist/src/storage/sqlite/migrations/002_add_flush_columns.sql +0 -3
- package/dist/src/storage/sqlite/migrations/003_add_note_markdown_meta.sql +0 -4
- package/dist/src/storage/sqlite/migrations/004_add_session_type_metadata.sql +0 -15
- package/dist/src/storage/sqlite/migrations/005_add_note_agent_contexts.sql +0 -10
- package/dist/src/storage/sqlite/migrations/006_add_goals.sql +0 -108
- package/dist/src/storage/sqlite/migrations/007_goal_run_judge_schema.sql +0 -4
- package/dist/src/storage/sqlite/migrations/008_goal_queue_workflow_runs.sql +0 -53
- package/dist/src/storage/sqlite/migrations/009_cron_jobs.sql +0 -24
- package/dist/src/storage/sqlite/migrations/010_session_id_identity.sql +0 -30
- package/dist/src/storage/sqlite/migrations/011_goal_context_messages.sql +0 -8
- package/dist/src/storage/sqlite/migrations/012_memory_records.sql +0 -63
- package/dist/src/storage/sqlite/migrations/013_memory_trace_events.sql +0 -21
- package/dist/src/storage/sqlite/migrations/014_memory_record_governance.sql +0 -10
- package/dist/src/storage/sqlite/migrations/015_memory_trace_feedback.sql +0 -4
- package/dist/src/storage/sqlite/migrations/016_automations.sql +0 -47
- package/dist/src/storage/sqlite/migrations/017_automation_run_events.sql +0 -14
- package/dist/src/storage/sqlite/migrations/018_automation_safety.sql +0 -1
- package/dist/src/storage/sqlite/migrations/019_projects.sql +0 -40
- package/dist/src/storage/sqlite/migrations/020_project_default_agent.sql +0 -1
- package/dist/src/storage/sqlite/migrations/021_projects_fts.sql +0 -21
- package/dist/src/storage/sqlite/migrations/022_work_items.sql +0 -61
- package/dist/src/storage/sqlite/migrations/023_work_item_attachments.sql +0 -15
- package/dist/src/storage/sqlite/migrations/024_activity_events.sql +0 -62
- package/dist/src/storage/sqlite/migrations/025_project_pinned_at.sql +0 -5
- package/dist/src/storage/sqlite/migrations/026_goal_contracts.sql +0 -10
- package/dist/src/storage/sqlite/migrations/027_mobile_notifications.sql +0 -43
- package/dist/src/storage/sqlite/migrations/028_goal_evidence_requirements.sql +0 -47
- package/dist/src/storage/sqlite/migrations/029_user_understanding.sql +0 -133
- package/dist/src/storage/sqlite/migrations/030_connectors.sql +0 -94
- package/dist/src/storage/sqlite/migrations/031_connector_approvals.sql +0 -24
- package/dist/src/storage/sqlite/migrations/032_connector_webhook_deliveries.sql +0 -15
- package/dist/src/storage/sqlite/migrations/033_user_trust_policies.sql +0 -6
- package/dist/src/storage/sqlite/migrations/034_allow_global_auto_trust.sql +0 -14
- package/dist/src/storage/sqlite/migrations/035_user_profile_prompt_state.sql +0 -7
- package/dist/src/storage/sqlite/migrations/036_goal_outcome_metric.sql +0 -12
- package/dist/src/storage/sqlite/migrations/037_connected_knowledge_pipeline.sql +0 -47
- package/dist/src/storage/sqlite/migrations/038_user_owned_memory.sql +0 -68
- package/dist/src/storage/sqlite/migrations/039_memory_reference_consents.sql +0 -19
- package/dist/src/storage/sqlite/migrations/040_local_apps.sql +0 -32
- package/dist/src/storage/sqlite/migrations/041_local_app_release_lifecycle.sql +0 -17
- package/dist/src/storage/sqlite/migrations/042_work_discovery.sql +0 -41
- package/dist/src/storage/sqlite/migrations/043_local_app_acceptance_runs.sql +0 -16
- package/dist/src/storage/sqlite/migrations/044_repair_work_discovery_foreign_keys.sql +0 -75
- package/dist/src/storage/sqlite/migrations/045_extension_ui_grants.sql +0 -13
- package/dist/src/storage/sqlite/migrations/046_work_discovery_feedback.sql +0 -13
- package/dist/src/storage/sqlite/migrations/047_work_discovery_sources.sql +0 -16
- package/dist/src/storage/sqlite/migrations/048_work_understanding_investigations.sql +0 -40
- package/dist/src/storage/sqlite/migrations/049_work_understanding_threads.sql +0 -52
- package/dist/src/storage/sqlite/migrations/050_work_discovery_source_refreshes.sql +0 -15
- package/dist/src/storage/sqlite/migrations/051_focus_watches.sql +0 -26
- package/dist/src/storage/sqlite/migrations/052_proactive_insights.sql +0 -25
- package/dist/src/storage/sqlite/migrations/053_browser_recipes.sql +0 -45
- package/dist/src/storage/sqlite/migrations/054_task_outcomes.sql +0 -24
- package/dist/src/storage/sqlite/migrations/055_relationship_settings.sql +0 -14
- package/dist/src/storage/sqlite/migrations/056_task_verification.sql +0 -6
- package/dist/src/storage/sqlite/migrations/057_interaction_states.sql +0 -11
- package/dist/src/storage/sqlite/migrations/058_proactive_value.sql +0 -3
- package/dist/src/storage/sqlite/migrations/059_composer_input_history.sql +0 -8
- package/dist/src/storage/sqlite/migrations/060_remove_runtime_transcript_messages.sql +0 -45
- package/dist/src/storage/sqlite/migrations/061_drop_compaction_checkpoints.sql +0 -2
- package/dist/src/storage/sqlite/migrations/062_connector_learning_jobs.sql +0 -27
- package/dist/src/storage/sqlite/migrations/063_knowledge_collection_scopes.sql +0 -14
- package/dist/src/storage/sqlite/migrations/064_user_claims.sql +0 -60
- package/dist/src/storage/sqlite/migrations/065_knowledge_item_scope_identity.sql +0 -116
- package/dist/src/storage/sqlite/migrations/066_first_class_focuses.sql +0 -126
- package/dist/src/storage/sqlite/migrations/067_home_attention_acknowledgements.sql +0 -9
- package/dist/src/storage/sqlite/migrations/068_proactive_event_spine.sql +0 -71
- package/dist/src/storage/sqlite/migrations/069_proactive_scenario_control.sql +0 -69
- package/dist/src/storage/sqlite/migrations/070_proactive_execution.sql +0 -55
- package/dist/src/storage/sqlite/migrations/071_proactive_inbox.sql +0 -45
- package/dist/src/storage/sqlite/migrations/072_proactive_judgments.sql +0 -14
- package/dist/src/storage/sqlite/migrations/073_enable_default_proactive_scenarios.sql +0 -13
- package/dist/src/storage/sqlite/migrations/074_deduplicate_blocked_work_routing.sql +0 -5
- package/dist/src/storage/sqlite/migrations/075_connector_sync_policies.sql +0 -13
- package/dist/src/storage/sqlite/migrations/076_meeting_preparation_scenario.sql +0 -29
- package/dist/src/storage/sqlite/migrations/077_proactive_insight_fingerprints.sql +0 -4
- package/dist/src/storage/sqlite/migrations/078_discussion_captures.sql +0 -64
- package/dist/src/storage/sqlite/migrations/079_discussion_follow_up_scenario.sql +0 -29
- package/dist/src/storage/sqlite/migrations/080_task_outcome_context.sql +0 -15
- package/dist/src/storage/sqlite/migrations/081_project_monitoring_policies.sql +0 -10
- package/dist/src/storage/sqlite/migrations/082_one_click_live_discussions.sql +0 -100
- package/dist/src/storage/sqlite/migrations/083_session_task_plans.sql +0 -9
- package/dist/src/storage/sqlite/migrations/084_work_intake_lifecycle.sql +0 -26
- package/dist/src/storage/sqlite/migrations/085_task_outcome_projection.sql +0 -19
- package/dist/src/storage/sqlite/migrations/086_outcome_aggregates.sql +0 -168
- package/dist/src/storage/sqlite/migrations/087_context_snapshots.sql +0 -21
- package/dist/src/storage/sqlite/migrations/088_automation_execution_deadlines.sql +0 -5
- package/dist/src/storage/sqlite/migrations/089_automation_run_leases.sql +0 -8
- package/dist/src/storage/sqlite/migrations/090_outcome_contract_judgment.sql +0 -2
- package/dist/src/storage/sqlite/migrations/091_context_allocation.sql +0 -1
- package/dist/src/storage/sqlite/migrations/092_outcome_execution_runtime.sql +0 -88
- package/dist/src/storage/sqlite/migrations/093_remove_legacy_goals.sql +0 -174
- package/dist/src/storage/sqlite/migrations/094_outcome_judgment_and_authority.sql +0 -3
- package/dist/src/storage/sqlite/migrations/095_session_input_queue.sql +0 -35
- package/dist/src/storage/sqlite/migrations/096_drop_work_intakes.sql +0 -6
- package/dist/src/storage/sqlite/migrations/097_work_item_lifecycle.sql +0 -194
- package/dist/src/storage/sqlite/migrations/098_discussion_note_documents.sql +0 -99
- package/dist/src/storage/sqlite/migrations/099_task_model.sql +0 -500
- package/dist/src/storage/sqlite/migrations/100_project_task_taskrun.sql +0 -763
- package/dist/src/storage/sqlite/migrations/101_session_response_language.sql +0 -1
- package/dist/src/storage/sqlite/migrations/102_session_user_context_mode.sql +0 -2
- package/dist/src/storage/sqlite/migrations/103_finalize_structured_memory.sql +0 -3
- package/dist/src/storage/sqlite/migrations/104_turn_memory_feedback.sql +0 -77
- package/dist/src/storage/sqlite/migrations/105_dreaming_ledger.sql +0 -34
- package/dist/src/storage/sqlite/migrations/106_dreaming_run_reproducibility.sql +0 -2
- package/dist/src/storage/sqlite/migrations/107_connector_accounts.sql +0 -146
- package/dist/src/storage/sqlite/migrations/108_repair_user_memory_provider.sql +0 -18
- package/dist/src/storage/sqlite/migrations/109_endpoint_principals.sql +0 -14
- package/dist/src/storage/sqlite/migrations/110_session_input_origin.sql +0 -43
- package/dist/src/storage/sqlite/migrations/111_endpoint_tool_invocations.sql +0 -18
- package/dist/src/storage/sqlite/migrations/112_endpoint_instance_bindings.sql +0 -8
- package/dist/src/storage/sqlite/migrations/113_memory_evidence_single_source.sql +0 -76
- package/dist/src/storage/sqlite/migrations/114_user_context_domain.sql +0 -193
- package/dist/src/storage/sqlite/migrations/115_remove_legacy_user_context.sql +0 -6
- package/dist/src/storage/sqlite/migrations/116_structured_context_consolidation.sql +0 -38
- package/dist/src/storage/sqlite/migrations/117_unified_understanding_sources.sql +0 -110
- package/dist/src/storage/sqlite/migrations/118_task_board_rank.sql +0 -6
- package/dist/src/storage/sqlite/migrations/119_proactive_disposition.sql +0 -13
- package/dist/src/storage/sqlite/migrations/120_task_conversation.sql +0 -112
- package/dist/src/storage/sqlite/migrations/121_automation_inbox.sql +0 -24
- package/dist/src/storage/sqlite/migrations/122_automation_session_projects.sql +0 -18
- package/dist/src/storage/sqlite/migrations/123_remove_v2_compaction_boundaries.sql +0 -25
- package/dist/src/storage/sqlite/migrations/124_workflow_context_snapshots.sql +0 -15
- package/dist/src/storage/sqlite/migrations/125_project_workflow_presets.sql +0 -12
- package/dist/src/storage/sqlite/migrations/126_focus_context_governance.sql +0 -72
- package/dist/src/storage/sqlite/migrations/127_context_object_origin.sql +0 -36
- package/dist/src/storage/sqlite/migrations/128_context_extraction.sql +0 -73
- package/dist/src/storage/sqlite/migrations/129_focus_versions.sql +0 -51
- package/dist/src/storage/sqlite/migrations/130_context_evidence_provenance.sql +0 -18
- package/dist/src/storage/sqlite/migrations/131_session_input_contexts.sql +0 -2
- package/dist/src/storage/sqlite/migrations/132_transcript_source_context_metadata.sql +0 -34
- package/dist/src/storage/sqlite/migrations/133_archive_legacy_work_discovery_profile_facts.sql +0 -11
- package/dist/src/storage/sqlite/migrations/134_memory_provenance.sql +0 -18
- package/dist/src/storage/sqlite/migrations/135_user_people.sql +0 -59
- package/dist/src/storage/sqlite/migrations/136_product_notifications.sql +0 -79
- package/dist/src/storage/sqlite/migrations/137_understanding_status_audit.sql +0 -71
- package/dist/src/storage/sqlite/migrations/138_device_access.sql +0 -96
- package/dist/src/storage/sqlite/migrations/139_turn_outcome_artifact_backfill.sql +0 -231
- package/dist/src/storage/sqlite/migrations/140_endpoint_session_bindings.sql +0 -8
- package/dist/src/storage/sqlite/migrations/141_device_pairing_approval.sql +0 -17
- package/dist/src/storage/sqlite/migrations/142_session_input_instance.sql +0 -1
- package/dist/src/storage/sqlite/migrations/143_fixed_session_model.sql +0 -1
- package/dist/src/storage/sqlite/migrations/144_execution_environments.sql +0 -59
- package/dist/src/storage/sqlite/migrations/145_project_execution_mode.sql +0 -5
- package/dist/src/storage/sqlite/migrations/146_understanding_focus_exclusions.sql +0 -9
- package/dist/src/storage/sqlite/migrations/147_durable_application_state.sql +0 -39
- package/dist/src/storage/sqlite/migrations/148_user_model_foundation.sql +0 -554
- package/dist/src/storage/sqlite/migrations/149_separate_source_index_from_memory.sql +0 -18
- package/dist/src/storage/sqlite/migrations/150_session_connection_waits.sql +0 -47
- package/dist/src/storage/sqlite/migrations/151_proactive_scope_cleanup.sql +0 -6
- package/dist/src/storage/sqlite/migrations/152_proactive_scenario_contract.sql +0 -140
- package/dist/src/storage/sqlite/migrations/153_browser_control_v2.sql +0 -45
- package/dist/src/storage/sqlite/migrations/154_session_clarification_waits.sql +0 -60
- package/dist/src/storage/sqlite/migrations/155_browser_extension.sql +0 -120
- package/dist/src/storage/sqlite/migrations/156_browser_tab_bindings.sql +0 -14
- package/dist/src/storage/sqlite/migrations/157_browser_endpoint_principals.sql +0 -50
- package/dist/src/storage/sqlite/migrations/158_browser_native_enrollment.sql +0 -4
- package/dist/src/storage/sqlite/migrations/159_proactive_controls.sql +0 -68
- package/dist/src/storage/sqlite/migrations/160_proactive_web_push.sql +0 -27
- package/dist/src/storage/sqlite/migrations/161_proactive_delivery_and_lifecycle.sql +0 -51
- package/dist/src/storage/sqlite/migrations/162_proactive_product.sql +0 -7
- package/dist/src/storage/sqlite/migrations/163_proactive_follow_ups.sql +0 -29
- package/dist/src/storage/sqlite/migrations/164_browser_sessions.sql +0 -8
- package/dist/src/storage/sqlite/migrations/165_device_pairing_target.sql +0 -40
- package/dist/src/storage/sqlite/migrations/__tests__/mobile-discussion-source.test.ts +0 -20
- package/dist/src/storage/sqlite/migrations/conversation-backup.ts +0 -66
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.ts +0 -50
- package/dist/src/storage/sqlite/migrations/conversation-uuid.ts +0 -324
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.ts +0 -71
- package/dist/src/storage/sqlite/migrations/discover.ts +0 -52
- package/dist/src/storage/sqlite/migrations/errors.ts +0 -32
- package/dist/src/storage/sqlite/migrations/runner.ts +0 -204
- package/dist/src/storage/sqlite/migrations/types.ts +0 -15
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
-- Repair support for databases whose schema version was advanced by an older
|
|
2
|
-
-- partial build without the optional memory subsystem tables.
|
|
3
|
-
CREATE TABLE IF NOT EXISTS memory_records (
|
|
4
|
-
record_id TEXT PRIMARY KEY,
|
|
5
|
-
provider_id TEXT NOT NULL,
|
|
6
|
-
kind TEXT NOT NULL,
|
|
7
|
-
agent_id TEXT NOT NULL,
|
|
8
|
-
workspace_id TEXT,
|
|
9
|
-
session_key TEXT,
|
|
10
|
-
project_id TEXT,
|
|
11
|
-
content TEXT NOT NULL,
|
|
12
|
-
source_json TEXT NOT NULL,
|
|
13
|
-
confidence REAL,
|
|
14
|
-
tags_json TEXT NOT NULL DEFAULT '[]',
|
|
15
|
-
status TEXT NOT NULL DEFAULT 'active',
|
|
16
|
-
sensitivity TEXT NOT NULL DEFAULT 'normal',
|
|
17
|
-
evidence_json TEXT NOT NULL DEFAULT '[]',
|
|
18
|
-
review_after INTEGER,
|
|
19
|
-
expires_at INTEGER,
|
|
20
|
-
created_at INTEGER NOT NULL,
|
|
21
|
-
updated_at INTEGER NOT NULL,
|
|
22
|
-
last_recalled_at INTEGER,
|
|
23
|
-
recall_count INTEGER NOT NULL DEFAULT 0
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
ALTER TABLE memory_records ADD COLUMN canonical_key TEXT;
|
|
27
|
-
ALTER TABLE memory_records ADD COLUMN explicitness TEXT NOT NULL DEFAULT 'inferred';
|
|
28
|
-
ALTER TABLE memory_records ADD COLUMN durability TEXT NOT NULL DEFAULT 'durable';
|
|
29
|
-
ALTER TABLE memory_records ADD COLUMN importance REAL NOT NULL DEFAULT 0.5;
|
|
30
|
-
ALTER TABLE memory_records ADD COLUMN disclosure_policy TEXT NOT NULL DEFAULT 'referenceable';
|
|
31
|
-
ALTER TABLE memory_records ADD COLUMN valid_from INTEGER;
|
|
32
|
-
ALTER TABLE memory_records ADD COLUMN valid_to INTEGER;
|
|
33
|
-
ALTER TABLE memory_records ADD COLUMN supersedes_record_id TEXT;
|
|
34
|
-
ALTER TABLE memory_records ADD COLUMN conflict_group_id TEXT;
|
|
35
|
-
|
|
36
|
-
CREATE INDEX IF NOT EXISTS idx_memory_records_canonical_status
|
|
37
|
-
ON memory_records(agent_id, canonical_key, status);
|
|
38
|
-
CREATE INDEX IF NOT EXISTS idx_memory_records_validity
|
|
39
|
-
ON memory_records(valid_from, valid_to);
|
|
40
|
-
CREATE INDEX IF NOT EXISTS idx_memory_records_conflict_group
|
|
41
|
-
ON memory_records(conflict_group_id);
|
|
42
|
-
|
|
43
|
-
CREATE TABLE IF NOT EXISTS knowledge_sync_runs (
|
|
44
|
-
run_id TEXT PRIMARY KEY,
|
|
45
|
-
source_instance_id TEXT NOT NULL,
|
|
46
|
-
status TEXT NOT NULL,
|
|
47
|
-
cursor_before TEXT,
|
|
48
|
-
cursor_after TEXT,
|
|
49
|
-
items_seen INTEGER NOT NULL DEFAULT 0,
|
|
50
|
-
items_created INTEGER NOT NULL DEFAULT 0,
|
|
51
|
-
items_updated INTEGER NOT NULL DEFAULT 0,
|
|
52
|
-
warnings_json TEXT NOT NULL DEFAULT '[]',
|
|
53
|
-
error TEXT,
|
|
54
|
-
started_at INTEGER NOT NULL,
|
|
55
|
-
finished_at INTEGER
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_sync_runs_source_started
|
|
59
|
-
ON knowledge_sync_runs(source_instance_id, started_at DESC);
|
|
60
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_sync_runs_status_started
|
|
61
|
-
ON knowledge_sync_runs(status, started_at DESC);
|
|
62
|
-
|
|
63
|
-
CREATE TABLE IF NOT EXISTS knowledge_source_state (
|
|
64
|
-
source_instance_id TEXT PRIMARY KEY,
|
|
65
|
-
cursor TEXT,
|
|
66
|
-
updated_at INTEGER NOT NULL
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
CREATE TABLE IF NOT EXISTS knowledge_source_items (
|
|
70
|
-
item_id TEXT PRIMARY KEY,
|
|
71
|
-
source_instance_id TEXT NOT NULL,
|
|
72
|
-
external_id TEXT NOT NULL,
|
|
73
|
-
item_type TEXT NOT NULL,
|
|
74
|
-
author_role TEXT,
|
|
75
|
-
occurred_at INTEGER,
|
|
76
|
-
source_updated_at INTEGER,
|
|
77
|
-
content_hash TEXT NOT NULL,
|
|
78
|
-
normalized_text TEXT,
|
|
79
|
-
payload_ref TEXT,
|
|
80
|
-
metadata_json TEXT NOT NULL DEFAULT '{}',
|
|
81
|
-
sensitivity TEXT NOT NULL DEFAULT 'normal',
|
|
82
|
-
retention_class TEXT NOT NULL DEFAULT 'bounded',
|
|
83
|
-
synthesis_status TEXT NOT NULL DEFAULT 'pending',
|
|
84
|
-
deleted_at INTEGER,
|
|
85
|
-
created_at INTEGER NOT NULL,
|
|
86
|
-
updated_at INTEGER NOT NULL,
|
|
87
|
-
UNIQUE(source_instance_id, external_id)
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_source_items_source_updated
|
|
91
|
-
ON knowledge_source_items(source_instance_id, updated_at DESC);
|
|
92
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_source_items_synthesis
|
|
93
|
-
ON knowledge_source_items(synthesis_status, updated_at);
|
|
94
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_source_items_hash
|
|
95
|
-
ON knowledge_source_items(content_hash);
|
|
96
|
-
|
|
97
|
-
CREATE TABLE IF NOT EXISTS memory_evidence (
|
|
98
|
-
evidence_id TEXT PRIMARY KEY,
|
|
99
|
-
record_id TEXT NOT NULL,
|
|
100
|
-
source_item_id TEXT,
|
|
101
|
-
relation TEXT NOT NULL,
|
|
102
|
-
excerpt TEXT,
|
|
103
|
-
confidence REAL,
|
|
104
|
-
observed_at INTEGER,
|
|
105
|
-
created_at INTEGER NOT NULL,
|
|
106
|
-
FOREIGN KEY(record_id) REFERENCES memory_records(record_id) ON DELETE CASCADE,
|
|
107
|
-
FOREIGN KEY(source_item_id) REFERENCES knowledge_source_items(item_id) ON DELETE SET NULL
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
CREATE INDEX IF NOT EXISTS idx_memory_evidence_record
|
|
111
|
-
ON memory_evidence(record_id, created_at DESC);
|
|
112
|
-
CREATE INDEX IF NOT EXISTS idx_memory_evidence_source_item
|
|
113
|
-
ON memory_evidence(source_item_id);
|
|
114
|
-
|
|
115
|
-
CREATE TABLE IF NOT EXISTS memory_relations (
|
|
116
|
-
relation_id TEXT PRIMARY KEY,
|
|
117
|
-
from_record_id TEXT NOT NULL,
|
|
118
|
-
relation_type TEXT NOT NULL,
|
|
119
|
-
to_record_id TEXT NOT NULL,
|
|
120
|
-
confidence REAL NOT NULL,
|
|
121
|
-
valid_from INTEGER,
|
|
122
|
-
valid_to INTEGER,
|
|
123
|
-
created_at INTEGER NOT NULL,
|
|
124
|
-
updated_at INTEGER NOT NULL,
|
|
125
|
-
UNIQUE(from_record_id, relation_type, to_record_id),
|
|
126
|
-
FOREIGN KEY(from_record_id) REFERENCES memory_records(record_id) ON DELETE CASCADE,
|
|
127
|
-
FOREIGN KEY(to_record_id) REFERENCES memory_records(record_id) ON DELETE CASCADE
|
|
128
|
-
);
|
|
129
|
-
|
|
130
|
-
CREATE INDEX IF NOT EXISTS idx_memory_relations_from
|
|
131
|
-
ON memory_relations(from_record_id, relation_type);
|
|
132
|
-
CREATE INDEX IF NOT EXISTS idx_memory_relations_to
|
|
133
|
-
ON memory_relations(to_record_id, relation_type);
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS connector_catalog_entries (
|
|
2
|
-
connector_id TEXT PRIMARY KEY,
|
|
3
|
-
provider TEXT NOT NULL,
|
|
4
|
-
definition_json TEXT NOT NULL,
|
|
5
|
-
fetched_at TEXT NOT NULL,
|
|
6
|
-
expires_at TEXT
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
CREATE INDEX IF NOT EXISTS idx_connector_catalog_provider
|
|
10
|
-
ON connector_catalog_entries(provider, fetched_at DESC);
|
|
11
|
-
|
|
12
|
-
CREATE TABLE IF NOT EXISTS connector_installations (
|
|
13
|
-
id TEXT PRIMARY KEY,
|
|
14
|
-
connector_id TEXT NOT NULL,
|
|
15
|
-
principal_id TEXT NOT NULL,
|
|
16
|
-
enabled INTEGER NOT NULL DEFAULT 1 CHECK (enabled IN (0, 1)),
|
|
17
|
-
allowed_agent_ids_json TEXT NOT NULL DEFAULT '[]',
|
|
18
|
-
max_scope TEXT NOT NULL DEFAULT 'read' CHECK (max_scope IN ('read', 'write', 'admin')),
|
|
19
|
-
confirmation_policy TEXT NOT NULL DEFAULT 'writes'
|
|
20
|
-
CHECK (confirmation_policy IN ('always', 'writes', 'admin', 'never')),
|
|
21
|
-
selected_connection_ids_json TEXT NOT NULL DEFAULT '[]',
|
|
22
|
-
created_at TEXT NOT NULL,
|
|
23
|
-
updated_at TEXT NOT NULL,
|
|
24
|
-
UNIQUE(connector_id, principal_id)
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
CREATE INDEX IF NOT EXISTS idx_connector_installations_principal
|
|
28
|
-
ON connector_installations(principal_id, enabled, connector_id);
|
|
29
|
-
|
|
30
|
-
CREATE TABLE IF NOT EXISTS connector_connections (
|
|
31
|
-
id TEXT PRIMARY KEY,
|
|
32
|
-
installation_id TEXT REFERENCES connector_installations(id) ON DELETE SET NULL,
|
|
33
|
-
connector_id TEXT NOT NULL,
|
|
34
|
-
provider TEXT NOT NULL,
|
|
35
|
-
principal_id TEXT NOT NULL,
|
|
36
|
-
provider_connection_id TEXT NOT NULL,
|
|
37
|
-
alias TEXT,
|
|
38
|
-
identity_json TEXT NOT NULL DEFAULT '{}',
|
|
39
|
-
status TEXT NOT NULL DEFAULT 'unknown'
|
|
40
|
-
CHECK (status IN ('pending', 'active', 'expired', 'failed', 'revoked', 'disabled', 'unknown')),
|
|
41
|
-
is_default INTEGER NOT NULL DEFAULT 0 CHECK (is_default IN (0, 1)),
|
|
42
|
-
connected_at TEXT,
|
|
43
|
-
expires_at TEXT,
|
|
44
|
-
last_error TEXT,
|
|
45
|
-
metadata_json TEXT NOT NULL DEFAULT '{}',
|
|
46
|
-
created_at TEXT NOT NULL,
|
|
47
|
-
updated_at TEXT NOT NULL,
|
|
48
|
-
UNIQUE(provider, provider_connection_id)
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
CREATE INDEX IF NOT EXISTS idx_connector_connections_principal
|
|
52
|
-
ON connector_connections(principal_id, connector_id, status);
|
|
53
|
-
|
|
54
|
-
CREATE UNIQUE INDEX IF NOT EXISTS idx_connector_connections_default
|
|
55
|
-
ON connector_connections(principal_id, connector_id)
|
|
56
|
-
WHERE is_default = 1;
|
|
57
|
-
|
|
58
|
-
CREATE TABLE IF NOT EXISTS connector_action_metadata (
|
|
59
|
-
connector_id TEXT NOT NULL,
|
|
60
|
-
action_id TEXT NOT NULL,
|
|
61
|
-
toolkit TEXT,
|
|
62
|
-
scope TEXT NOT NULL DEFAULT 'write' CHECK (scope IN ('read', 'write', 'admin')),
|
|
63
|
-
curated INTEGER NOT NULL DEFAULT 0 CHECK (curated IN (0, 1)),
|
|
64
|
-
input_schema_json TEXT,
|
|
65
|
-
schema_version TEXT,
|
|
66
|
-
cached_at TEXT NOT NULL,
|
|
67
|
-
PRIMARY KEY(connector_id, action_id)
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
CREATE INDEX IF NOT EXISTS idx_connector_action_scope
|
|
71
|
-
ON connector_action_metadata(connector_id, scope, curated);
|
|
72
|
-
|
|
73
|
-
CREATE TABLE IF NOT EXISTS connector_execution_audit (
|
|
74
|
-
id TEXT PRIMARY KEY,
|
|
75
|
-
installation_id TEXT REFERENCES connector_installations(id) ON DELETE SET NULL,
|
|
76
|
-
connection_id TEXT REFERENCES connector_connections(id) ON DELETE SET NULL,
|
|
77
|
-
connector_id TEXT NOT NULL,
|
|
78
|
-
principal_id TEXT NOT NULL,
|
|
79
|
-
agent_id TEXT,
|
|
80
|
-
session_key TEXT,
|
|
81
|
-
action_id TEXT NOT NULL,
|
|
82
|
-
scope TEXT NOT NULL CHECK (scope IN ('read', 'write', 'admin')),
|
|
83
|
-
decision TEXT NOT NULL CHECK (decision IN ('allowed', 'denied', 'confirmation_required')),
|
|
84
|
-
result_status TEXT NOT NULL CHECK (result_status IN ('success', 'error', 'not_executed')),
|
|
85
|
-
duration_ms INTEGER,
|
|
86
|
-
error_code TEXT,
|
|
87
|
-
created_at TEXT NOT NULL
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
CREATE INDEX IF NOT EXISTS idx_connector_audit_principal_time
|
|
91
|
-
ON connector_execution_audit(principal_id, created_at DESC);
|
|
92
|
-
|
|
93
|
-
CREATE INDEX IF NOT EXISTS idx_connector_audit_connector_time
|
|
94
|
-
ON connector_execution_audit(connector_id, created_at DESC);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS connector_approvals (
|
|
2
|
-
id TEXT PRIMARY KEY,
|
|
3
|
-
principal_id TEXT NOT NULL,
|
|
4
|
-
connector_id TEXT NOT NULL,
|
|
5
|
-
connection_id TEXT REFERENCES connector_connections(id) ON DELETE SET NULL,
|
|
6
|
-
agent_id TEXT,
|
|
7
|
-
session_key TEXT,
|
|
8
|
-
action_id TEXT NOT NULL,
|
|
9
|
-
scope TEXT NOT NULL CHECK (scope IN ('read', 'write', 'admin')),
|
|
10
|
-
arguments_hash TEXT NOT NULL,
|
|
11
|
-
arguments_preview_json TEXT NOT NULL DEFAULT '{}',
|
|
12
|
-
status TEXT NOT NULL DEFAULT 'pending'
|
|
13
|
-
CHECK (status IN ('pending', 'approved', 'denied', 'expired', 'consumed')),
|
|
14
|
-
expires_at TEXT NOT NULL,
|
|
15
|
-
created_at TEXT NOT NULL,
|
|
16
|
-
decided_at TEXT,
|
|
17
|
-
consumed_at TEXT
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
CREATE INDEX IF NOT EXISTS idx_connector_approvals_pending
|
|
21
|
-
ON connector_approvals(principal_id, status, expires_at, created_at DESC);
|
|
22
|
-
|
|
23
|
-
CREATE INDEX IF NOT EXISTS idx_connector_approvals_session
|
|
24
|
-
ON connector_approvals(session_key, status, created_at DESC);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS connector_webhook_deliveries (
|
|
2
|
-
id TEXT PRIMARY KEY,
|
|
3
|
-
provider TEXT NOT NULL,
|
|
4
|
-
payload_hash TEXT NOT NULL,
|
|
5
|
-
status TEXT NOT NULL DEFAULT 'processing'
|
|
6
|
-
CHECK (status IN ('pending', 'processing', 'processed')),
|
|
7
|
-
attempts INTEGER NOT NULL DEFAULT 1,
|
|
8
|
-
received_at TEXT NOT NULL,
|
|
9
|
-
processing_at TEXT,
|
|
10
|
-
processed_at TEXT,
|
|
11
|
-
last_error TEXT
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
CREATE INDEX IF NOT EXISTS idx_connector_webhook_deliveries_status
|
|
15
|
-
ON connector_webhook_deliveries(provider, status, received_at DESC);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
CREATE TABLE user_trust_policies_next (
|
|
2
|
-
principal_id TEXT PRIMARY KEY,
|
|
3
|
-
default_action_level TEXT NOT NULL DEFAULT 'confirm'
|
|
4
|
-
CHECK (default_action_level IN ('observe', 'suggest', 'confirm', 'auto')),
|
|
5
|
-
updated_at TEXT NOT NULL
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
INSERT INTO user_trust_policies_next (principal_id, default_action_level, updated_at)
|
|
9
|
-
SELECT principal_id, default_action_level, updated_at
|
|
10
|
-
FROM user_trust_policies;
|
|
11
|
-
|
|
12
|
-
DROP TABLE user_trust_policies;
|
|
13
|
-
|
|
14
|
-
ALTER TABLE user_trust_policies_next RENAME TO user_trust_policies;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS goal_contracts (
|
|
2
|
-
goal_id TEXT PRIMARY KEY,
|
|
3
|
-
version INTEGER NOT NULL DEFAULT 1,
|
|
4
|
-
objective TEXT NOT NULL,
|
|
5
|
-
scope_boundary TEXT,
|
|
6
|
-
evidence_plan_json TEXT NOT NULL DEFAULT '[]',
|
|
7
|
-
created_at INTEGER NOT NULL,
|
|
8
|
-
updated_at INTEGER NOT NULL,
|
|
9
|
-
FOREIGN KEY (goal_id) REFERENCES goals(goal_id) ON DELETE CASCADE
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
ALTER TABLE goal_contracts ADD COLUMN outcome_metric_json TEXT;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS knowledge_source_changes (
|
|
2
|
-
sequence INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
3
|
-
change_id TEXT NOT NULL UNIQUE,
|
|
4
|
-
source_instance_id TEXT NOT NULL,
|
|
5
|
-
source_item_id TEXT NOT NULL,
|
|
6
|
-
change_kind TEXT NOT NULL CHECK(change_kind IN ('added', 'modified', 'deleted')),
|
|
7
|
-
old_hash TEXT,
|
|
8
|
-
new_hash TEXT,
|
|
9
|
-
changed_at INTEGER NOT NULL,
|
|
10
|
-
FOREIGN KEY(source_item_id) REFERENCES knowledge_source_items(item_id) ON DELETE CASCADE
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_source_changes_source_sequence
|
|
14
|
-
ON knowledge_source_changes(source_instance_id, sequence);
|
|
15
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_source_changes_changed_at
|
|
16
|
-
ON knowledge_source_changes(changed_at DESC);
|
|
17
|
-
|
|
18
|
-
CREATE TABLE IF NOT EXISTS knowledge_consumer_watermarks (
|
|
19
|
-
consumer_id TEXT NOT NULL,
|
|
20
|
-
source_instance_id TEXT NOT NULL,
|
|
21
|
-
last_sequence INTEGER NOT NULL DEFAULT 0,
|
|
22
|
-
updated_at INTEGER NOT NULL,
|
|
23
|
-
PRIMARY KEY(consumer_id, source_instance_id)
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
ALTER TABLE knowledge_source_items ADD COLUMN synthesis_pipeline TEXT NOT NULL DEFAULT 'user_understanding'
|
|
27
|
-
CHECK(synthesis_pipeline IN ('user_understanding', 'connected_knowledge'));
|
|
28
|
-
ALTER TABLE knowledge_source_items ADD COLUMN synthesis_attempts INTEGER NOT NULL DEFAULT 0;
|
|
29
|
-
ALTER TABLE knowledge_source_items ADD COLUMN synthesis_claimed_at INTEGER;
|
|
30
|
-
ALTER TABLE knowledge_source_items ADD COLUMN synthesis_claimed_by TEXT;
|
|
31
|
-
ALTER TABLE knowledge_source_items ADD COLUMN synthesis_error TEXT;
|
|
32
|
-
|
|
33
|
-
CREATE INDEX IF NOT EXISTS idx_knowledge_source_items_synthesis_lease
|
|
34
|
-
ON knowledge_source_items(synthesis_pipeline, synthesis_status, synthesis_claimed_at, updated_at);
|
|
35
|
-
|
|
36
|
-
DELETE FROM memory_evidence
|
|
37
|
-
WHERE source_item_id IS NOT NULL
|
|
38
|
-
AND rowid NOT IN (
|
|
39
|
-
SELECT MIN(rowid)
|
|
40
|
-
FROM memory_evidence
|
|
41
|
-
WHERE source_item_id IS NOT NULL
|
|
42
|
-
GROUP BY record_id, source_item_id, relation
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_evidence_record_source_relation
|
|
46
|
-
ON memory_evidence(record_id, source_item_id, relation)
|
|
47
|
-
WHERE source_item_id IS NOT NULL;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
DROP INDEX IF EXISTS idx_memory_records_scope_updated;
|
|
2
|
-
DROP INDEX IF EXISTS idx_memory_records_canonical_status;
|
|
3
|
-
ALTER TABLE memory_records RENAME COLUMN agent_id TO source_agent_id;
|
|
4
|
-
ALTER TABLE memory_records ADD COLUMN user_id TEXT NOT NULL DEFAULT 'local-owner';
|
|
5
|
-
UPDATE memory_records SET kind = 'curated_note' WHERE kind = 'agent_note';
|
|
6
|
-
|
|
7
|
-
DELETE FROM automations
|
|
8
|
-
WHERE automation_id IN ('system-dreaming-light', 'system-dreaming-deep', 'system-dreaming-rem')
|
|
9
|
-
OR automation_id LIKE 'system-dreaming:%';
|
|
10
|
-
CREATE INDEX idx_memory_records_user_updated
|
|
11
|
-
ON memory_records(user_id, updated_at DESC);
|
|
12
|
-
CREATE INDEX idx_memory_records_user_project
|
|
13
|
-
ON memory_records(user_id, project_id);
|
|
14
|
-
CREATE INDEX idx_memory_records_user_status
|
|
15
|
-
ON memory_records(user_id, status);
|
|
16
|
-
CREATE INDEX idx_memory_records_source_agent
|
|
17
|
-
ON memory_records(source_agent_id);
|
|
18
|
-
CREATE INDEX idx_memory_records_canonical_status
|
|
19
|
-
ON memory_records(user_id, canonical_key, status);
|
|
20
|
-
|
|
21
|
-
DROP TABLE memory_records_fts;
|
|
22
|
-
CREATE VIRTUAL TABLE memory_records_fts USING fts5(
|
|
23
|
-
content,
|
|
24
|
-
record_id UNINDEXED,
|
|
25
|
-
provider_id UNINDEXED,
|
|
26
|
-
kind UNINDEXED,
|
|
27
|
-
user_id UNINDEXED,
|
|
28
|
-
source_agent_id UNINDEXED,
|
|
29
|
-
workspace_id UNINDEXED,
|
|
30
|
-
tokenize='unicode61'
|
|
31
|
-
);
|
|
32
|
-
INSERT INTO memory_records_fts (
|
|
33
|
-
content, record_id, provider_id, kind, user_id, source_agent_id, workspace_id
|
|
34
|
-
)
|
|
35
|
-
SELECT content, record_id, provider_id, kind, user_id, source_agent_id, workspace_id
|
|
36
|
-
FROM memory_records
|
|
37
|
-
WHERE trim(content) <> '';
|
|
38
|
-
|
|
39
|
-
DROP INDEX IF EXISTS idx_memory_signals_scope_created;
|
|
40
|
-
ALTER TABLE memory_signals RENAME COLUMN agent_id TO source_agent_id;
|
|
41
|
-
ALTER TABLE memory_signals ADD COLUMN user_id TEXT NOT NULL DEFAULT 'local-owner';
|
|
42
|
-
CREATE INDEX idx_memory_signals_user_created
|
|
43
|
-
ON memory_signals(user_id, created_at DESC);
|
|
44
|
-
CREATE INDEX idx_memory_signals_source_agent_created
|
|
45
|
-
ON memory_signals(source_agent_id, created_at DESC);
|
|
46
|
-
|
|
47
|
-
ALTER TABLE memory_trace_events ADD COLUMN user_id TEXT NOT NULL DEFAULT 'local-owner';
|
|
48
|
-
ALTER TABLE memory_trace_events ADD COLUMN source_agent_id TEXT;
|
|
49
|
-
CREATE INDEX idx_memory_trace_user_created
|
|
50
|
-
ON memory_trace_events(user_id, created_at DESC);
|
|
51
|
-
CREATE INDEX idx_memory_trace_source_agent_created
|
|
52
|
-
ON memory_trace_events(source_agent_id, created_at DESC);
|
|
53
|
-
|
|
54
|
-
ALTER TABLE memory_files RENAME COLUMN agent_id TO user_id;
|
|
55
|
-
DROP TABLE memory_fts;
|
|
56
|
-
CREATE VIRTUAL TABLE memory_fts USING fts5(
|
|
57
|
-
content,
|
|
58
|
-
chunk_id UNINDEXED,
|
|
59
|
-
user_id UNINDEXED,
|
|
60
|
-
path UNINDEXED,
|
|
61
|
-
start_line UNINDEXED,
|
|
62
|
-
end_line UNINDEXED,
|
|
63
|
-
tokenize='unicode61'
|
|
64
|
-
);
|
|
65
|
-
INSERT INTO memory_fts (content, chunk_id, user_id, path, start_line, end_line)
|
|
66
|
-
SELECT chunks.content, chunks.chunk_id, files.user_id, files.path, chunks.start_line, chunks.end_line
|
|
67
|
-
FROM memory_chunks AS chunks
|
|
68
|
-
JOIN memory_files AS files ON files.file_id = chunks.file_id;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS memory_reference_consents (
|
|
2
|
-
consent_id TEXT PRIMARY KEY,
|
|
3
|
-
record_id TEXT NOT NULL,
|
|
4
|
-
session_key TEXT NOT NULL,
|
|
5
|
-
purpose TEXT NOT NULL,
|
|
6
|
-
status TEXT NOT NULL CHECK (status IN ('pending', 'granted', 'denied', 'consumed')),
|
|
7
|
-
grant_scope TEXT CHECK (grant_scope IN ('once', 'session', 'always')),
|
|
8
|
-
expires_at INTEGER,
|
|
9
|
-
created_at INTEGER NOT NULL,
|
|
10
|
-
updated_at INTEGER NOT NULL,
|
|
11
|
-
FOREIGN KEY (record_id) REFERENCES memory_records(record_id) ON DELETE CASCADE
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_reference_consents_pending
|
|
15
|
-
ON memory_reference_consents(record_id, session_key)
|
|
16
|
-
WHERE status = 'pending';
|
|
17
|
-
|
|
18
|
-
CREATE INDEX IF NOT EXISTS idx_memory_reference_consents_resolution
|
|
19
|
-
ON memory_reference_consents(record_id, status, session_key, expires_at);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS local_apps (
|
|
2
|
-
app_id TEXT PRIMARY KEY,
|
|
3
|
-
extension_id TEXT NOT NULL UNIQUE,
|
|
4
|
-
project_id TEXT NOT NULL UNIQUE,
|
|
5
|
-
name TEXT NOT NULL,
|
|
6
|
-
description TEXT,
|
|
7
|
-
idea TEXT NOT NULL,
|
|
8
|
-
status TEXT NOT NULL CHECK (status IN ('preview_ready', 'installed', 'degraded')),
|
|
9
|
-
workspace_root TEXT NOT NULL UNIQUE,
|
|
10
|
-
preview_token TEXT NOT NULL UNIQUE,
|
|
11
|
-
draft_version INTEGER NOT NULL DEFAULT 1,
|
|
12
|
-
active_version INTEGER,
|
|
13
|
-
created_at INTEGER NOT NULL,
|
|
14
|
-
updated_at INTEGER NOT NULL,
|
|
15
|
-
installed_at INTEGER,
|
|
16
|
-
FOREIGN KEY (project_id) REFERENCES projects(project_id) ON DELETE CASCADE
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
CREATE INDEX IF NOT EXISTS idx_local_apps_updated_at ON local_apps(updated_at DESC);
|
|
20
|
-
CREATE INDEX IF NOT EXISTS idx_local_apps_status ON local_apps(status, updated_at DESC);
|
|
21
|
-
|
|
22
|
-
CREATE TABLE IF NOT EXISTS local_app_releases (
|
|
23
|
-
release_id TEXT PRIMARY KEY,
|
|
24
|
-
app_id TEXT NOT NULL,
|
|
25
|
-
version INTEGER NOT NULL,
|
|
26
|
-
source_hash TEXT NOT NULL,
|
|
27
|
-
created_at INTEGER NOT NULL,
|
|
28
|
-
UNIQUE(app_id, version),
|
|
29
|
-
FOREIGN KEY (app_id) REFERENCES local_apps(app_id) ON DELETE CASCADE
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
CREATE INDEX IF NOT EXISTS idx_local_app_releases_app ON local_app_releases(app_id, version DESC);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
ALTER TABLE local_apps ADD COLUMN installation_state TEXT NOT NULL DEFAULT 'not_installed'
|
|
2
|
-
CHECK (installation_state IN ('not_installed', 'installed'));
|
|
3
|
-
ALTER TABLE local_apps ADD COLUMN enabled INTEGER NOT NULL DEFAULT 0 CHECK (enabled IN (0, 1));
|
|
4
|
-
ALTER TABLE local_apps ADD COLUMN active_release_id TEXT;
|
|
5
|
-
|
|
6
|
-
UPDATE local_apps
|
|
7
|
-
SET installation_state = CASE WHEN active_version IS NULL THEN 'not_installed' ELSE 'installed' END,
|
|
8
|
-
enabled = CASE WHEN active_version IS NULL THEN 0 ELSE 1 END;
|
|
9
|
-
|
|
10
|
-
ALTER TABLE local_app_releases ADD COLUMN artifact_path TEXT;
|
|
11
|
-
ALTER TABLE local_app_releases ADD COLUMN manifest_json TEXT NOT NULL DEFAULT '{}';
|
|
12
|
-
ALTER TABLE local_app_releases ADD COLUMN health_status TEXT NOT NULL DEFAULT 'healthy'
|
|
13
|
-
CHECK (health_status IN ('healthy', 'failed'));
|
|
14
|
-
ALTER TABLE local_app_releases ADD COLUMN activated_at INTEGER;
|
|
15
|
-
|
|
16
|
-
CREATE INDEX IF NOT EXISTS idx_local_app_releases_created
|
|
17
|
-
ON local_app_releases(app_id, created_at DESC);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS work_discovery_onboarding (
|
|
2
|
-
singleton_id INTEGER PRIMARY KEY CHECK (singleton_id = 1),
|
|
3
|
-
status TEXT NOT NULL CHECK (status IN ('not_started', 'in_progress', 'completed', 'dismissed')),
|
|
4
|
-
active_run_id TEXT,
|
|
5
|
-
completed_at INTEGER,
|
|
6
|
-
dismissed_at INTEGER,
|
|
7
|
-
updated_at INTEGER NOT NULL
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
INSERT OR IGNORE INTO work_discovery_onboarding (singleton_id, status, updated_at)
|
|
11
|
-
VALUES (1, 'not_started', 0);
|
|
12
|
-
|
|
13
|
-
CREATE TABLE IF NOT EXISTS work_discovery_runs (
|
|
14
|
-
id TEXT PRIMARY KEY,
|
|
15
|
-
idempotency_key TEXT NOT NULL UNIQUE,
|
|
16
|
-
source TEXT NOT NULL CHECK (source IN ('onboarding_selected_directory', 'manual_selected_directory')),
|
|
17
|
-
status TEXT NOT NULL CHECK (status IN ('queued', 'probing', 'analyzing', 'completed', 'failed', 'canceled')),
|
|
18
|
-
stage TEXT CHECK (stage IS NULL OR stage IN ('folder_structure', 'recent_progress', 'next_steps')),
|
|
19
|
-
root_path TEXT NOT NULL,
|
|
20
|
-
project_id TEXT NOT NULL,
|
|
21
|
-
session_key TEXT NOT NULL,
|
|
22
|
-
agent_id TEXT NOT NULL,
|
|
23
|
-
model_ref TEXT NOT NULL,
|
|
24
|
-
scan_policy_version INTEGER NOT NULL,
|
|
25
|
-
snapshot_summary_json TEXT,
|
|
26
|
-
result_json TEXT,
|
|
27
|
-
error_code TEXT,
|
|
28
|
-
error_message TEXT,
|
|
29
|
-
created_at INTEGER NOT NULL,
|
|
30
|
-
started_at INTEGER,
|
|
31
|
-
completed_at INTEGER,
|
|
32
|
-
canceled_at INTEGER,
|
|
33
|
-
FOREIGN KEY (project_id) REFERENCES projects(project_id) ON DELETE CASCADE,
|
|
34
|
-
FOREIGN KEY (session_key) REFERENCES sessions(session_key) ON DELETE CASCADE
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
CREATE INDEX IF NOT EXISTS idx_work_discovery_runs_status_created
|
|
38
|
-
ON work_discovery_runs(status, created_at DESC);
|
|
39
|
-
|
|
40
|
-
CREATE INDEX IF NOT EXISTS idx_work_discovery_runs_project
|
|
41
|
-
ON work_discovery_runs(project_id, created_at DESC);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS local_app_acceptance_runs (
|
|
2
|
-
run_id TEXT PRIMARY KEY,
|
|
3
|
-
app_id TEXT NOT NULL,
|
|
4
|
-
source_hash TEXT NOT NULL,
|
|
5
|
-
status TEXT NOT NULL CHECK (status IN ('passed', 'failed')),
|
|
6
|
-
checks_json TEXT NOT NULL,
|
|
7
|
-
interactive_count INTEGER NOT NULL DEFAULT 0 CHECK (interactive_count >= 0),
|
|
8
|
-
created_at INTEGER NOT NULL,
|
|
9
|
-
FOREIGN KEY (app_id) REFERENCES local_apps(app_id) ON DELETE CASCADE
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
CREATE INDEX IF NOT EXISTS idx_local_app_acceptance_runs_app_created
|
|
13
|
-
ON local_app_acceptance_runs(app_id, created_at DESC);
|
|
14
|
-
|
|
15
|
-
CREATE INDEX IF NOT EXISTS idx_local_app_acceptance_runs_source
|
|
16
|
-
ON local_app_acceptance_runs(app_id, source_hash, created_at DESC);
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
CREATE TABLE work_discovery_runs_v44 (
|
|
2
|
-
id TEXT PRIMARY KEY,
|
|
3
|
-
idempotency_key TEXT NOT NULL UNIQUE,
|
|
4
|
-
source TEXT NOT NULL CHECK (source IN ('onboarding_selected_directory', 'manual_selected_directory')),
|
|
5
|
-
status TEXT NOT NULL CHECK (status IN ('queued', 'probing', 'analyzing', 'completed', 'failed', 'canceled')),
|
|
6
|
-
stage TEXT CHECK (stage IS NULL OR stage IN ('folder_structure', 'recent_progress', 'next_steps')),
|
|
7
|
-
root_path TEXT NOT NULL,
|
|
8
|
-
project_id TEXT NOT NULL,
|
|
9
|
-
session_key TEXT NOT NULL,
|
|
10
|
-
agent_id TEXT NOT NULL,
|
|
11
|
-
model_ref TEXT NOT NULL,
|
|
12
|
-
scan_policy_version INTEGER NOT NULL,
|
|
13
|
-
snapshot_summary_json TEXT,
|
|
14
|
-
result_json TEXT,
|
|
15
|
-
error_code TEXT,
|
|
16
|
-
error_message TEXT,
|
|
17
|
-
created_at INTEGER NOT NULL,
|
|
18
|
-
started_at INTEGER,
|
|
19
|
-
completed_at INTEGER,
|
|
20
|
-
canceled_at INTEGER,
|
|
21
|
-
FOREIGN KEY (project_id) REFERENCES projects(project_id) ON DELETE CASCADE,
|
|
22
|
-
FOREIGN KEY (session_key) REFERENCES sessions(session_key) ON DELETE CASCADE
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
INSERT INTO work_discovery_runs_v44 (
|
|
26
|
-
id,
|
|
27
|
-
idempotency_key,
|
|
28
|
-
source,
|
|
29
|
-
status,
|
|
30
|
-
stage,
|
|
31
|
-
root_path,
|
|
32
|
-
project_id,
|
|
33
|
-
session_key,
|
|
34
|
-
agent_id,
|
|
35
|
-
model_ref,
|
|
36
|
-
scan_policy_version,
|
|
37
|
-
snapshot_summary_json,
|
|
38
|
-
result_json,
|
|
39
|
-
error_code,
|
|
40
|
-
error_message,
|
|
41
|
-
created_at,
|
|
42
|
-
started_at,
|
|
43
|
-
completed_at,
|
|
44
|
-
canceled_at
|
|
45
|
-
)
|
|
46
|
-
SELECT
|
|
47
|
-
id,
|
|
48
|
-
idempotency_key,
|
|
49
|
-
source,
|
|
50
|
-
status,
|
|
51
|
-
stage,
|
|
52
|
-
root_path,
|
|
53
|
-
project_id,
|
|
54
|
-
session_key,
|
|
55
|
-
agent_id,
|
|
56
|
-
model_ref,
|
|
57
|
-
scan_policy_version,
|
|
58
|
-
snapshot_summary_json,
|
|
59
|
-
result_json,
|
|
60
|
-
error_code,
|
|
61
|
-
error_message,
|
|
62
|
-
created_at,
|
|
63
|
-
started_at,
|
|
64
|
-
completed_at,
|
|
65
|
-
canceled_at
|
|
66
|
-
FROM work_discovery_runs;
|
|
67
|
-
|
|
68
|
-
DROP TABLE work_discovery_runs;
|
|
69
|
-
ALTER TABLE work_discovery_runs_v44 RENAME TO work_discovery_runs;
|
|
70
|
-
|
|
71
|
-
CREATE INDEX idx_work_discovery_runs_status_created
|
|
72
|
-
ON work_discovery_runs(status, created_at DESC);
|
|
73
|
-
|
|
74
|
-
CREATE INDEX idx_work_discovery_runs_project
|
|
75
|
-
ON work_discovery_runs(project_id, created_at DESC);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS extension_ui_grants (
|
|
2
|
-
extension_id TEXT NOT NULL,
|
|
3
|
-
app_id TEXT,
|
|
4
|
-
manifest_digest TEXT NOT NULL,
|
|
5
|
-
permissions_json TEXT NOT NULL,
|
|
6
|
-
granted_at INTEGER NOT NULL,
|
|
7
|
-
revoked_at INTEGER,
|
|
8
|
-
PRIMARY KEY (extension_id, manifest_digest),
|
|
9
|
-
FOREIGN KEY (app_id) REFERENCES local_apps(app_id) ON DELETE CASCADE
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
CREATE INDEX IF NOT EXISTS idx_extension_ui_grants_app_granted
|
|
13
|
-
ON extension_ui_grants(app_id, granted_at DESC);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
CREATE TABLE IF NOT EXISTS work_discovery_feedback (
|
|
2
|
-
run_id TEXT PRIMARY KEY,
|
|
3
|
-
recognition_decision TEXT NOT NULL CHECK (
|
|
4
|
-
recognition_decision IN ('confirmed', 'corrected', 'different_goal', 'dismissed')
|
|
5
|
-
),
|
|
6
|
-
corrected_intent TEXT,
|
|
7
|
-
created_at INTEGER NOT NULL,
|
|
8
|
-
updated_at INTEGER NOT NULL,
|
|
9
|
-
FOREIGN KEY (run_id) REFERENCES work_discovery_runs(id) ON DELETE CASCADE
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
CREATE INDEX IF NOT EXISTS idx_work_discovery_feedback_updated
|
|
13
|
-
ON work_discovery_feedback(updated_at DESC);
|