@xopcai/xopc 0.0.218 → 0.0.219
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/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DF2dYXG1.js → activity-store-slG02hSm.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Dw9rF5o1.js → agent-avatar-dicebear-DZ6ETNIk.js} +1 -1
- package/dist/gateway/static/root/assets/agents-DxaIH0Ep.js +68 -0
- package/dist/gateway/static/root/assets/{api-_H0Bam-t.js → api-Tz57QxiN.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-DdR1L4LR.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-wYbwqmee.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-CyWr6KyO.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-DZCOhXch.js → archive-plugin-DKXa160O.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-Bjb0FH2B.js → attachment-load-CzwA9g2y.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-D4N3ZDhu.js → automations-page-DwAXyWAY.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CL7ieYIt.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-uXPt0s47.js → binary-plugins-DoQ_DnT7.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-gukkIEro.js → block-editor-Bj_Uxxng.js} +47 -47
- package/dist/gateway/static/root/assets/browser-settings-page-BYa_FNC1.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-DAhdS-XZ.js → browser-workflow-inputs-D4roXE6r.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-LKjYzXS_.js → browser-workflows-page-CleKTAKD.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DYG37N0k.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-BBUkH833.js → capability-presets-api-wtEN6Ss6.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-C0Q4dFq-.js +3 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-E5mo8M3a.js → channel-recipient-api-DhuS2RJ3.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-CpO6Xg0n.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-CXhPeiNj.js +1 -0
- package/dist/gateway/static/root/assets/chat-terminal-dock-ClQMDe2n.js +36 -0
- package/dist/gateway/static/root/assets/connectors-page-BvyiPdKU.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-BGNuaqvI.js → cron-expression-4DvCFs-v.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-k7mkklMU.js → date-picker-B6FSjt4Z.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-Za18eMp1.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-p9EZyGzV.js → desktop-pet-DUUf3yyJ.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-Dwx3GfB8.js +1 -0
- package/dist/gateway/static/root/assets/directory-picker-path-field-C6dfTCsl.js +1 -0
- package/dist/gateway/static/root/assets/ellipsis-0k4rZLoy.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-Cd4BMKm_.js → extension-debug-page-Cordpg4X.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CzEGCkOa.js → extension-page-Dw0dGyMl.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-B2pUMaXm.js +1 -0
- package/dist/gateway/static/root/assets/eye-CABVeTq0.js +1 -0
- package/dist/gateway/static/root/assets/eye-off-DEAzt3g1.js +1 -0
- package/dist/gateway/static/root/assets/file-code-corner-byQA1VfD.js +1 -0
- package/dist/gateway/static/root/assets/form-field-width-DJw_jULe.js +1 -0
- package/dist/gateway/static/root/assets/gateway-config-api-DAZUOEQh.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-DNrttVr2.js → gateway-config-swr-BIqRg-zo.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-ik2f-pmV.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-B1vD3vRb.js → gateway-startup-retry-BFjWYOCS.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-BE81XJ8F.js +1 -0
- package/dist/gateway/static/root/assets/home-page-BTWXJu_m.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-BTR0Wk_k.js → image-generation-api-HXAWlgm6.js} +1 -1
- package/dist/gateway/static/root/assets/index-B6gWYy08.js +108 -0
- package/dist/gateway/static/root/assets/index-CDkuz_YC.css +2 -0
- package/dist/gateway/static/root/assets/interaction-BmQogeqz.js +1 -0
- package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CYlS4RGA.js → keyboard-shortcuts-settings-ROqQ_Xlo.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Dcaf190G.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CNppYVew.js → local-apps-page-Be79cyMG.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-gf9Bg2gb.js → locale-store-DfK-Hofd.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-C2pjbXno.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-IYk9xLgt.js → management-settings-CRspx0oY.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-D8e6pRMH.js → markdown-split-G3PTpGw3.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-D0fiJjBQ.js → markdown-view-D4FPJZ91.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CCq6TtEf.js → media-plugins-DT0P7j7u.js} +1 -1
- package/dist/gateway/static/root/assets/messages-B701TEZ5.js +3 -0
- package/dist/gateway/static/root/assets/{notes-api-BBtWnlUU.js → notes-api-q7HjYO07.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-BKe1xa3U.js → notes-page-Cgl2h7AR.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DFMQYyGJ.js +4 -0
- package/dist/gateway/static/root/assets/page-tabs-BaEQMYm_.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-CsNVTKC0.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-DXe5iWI6.js → product-open-page-ComKLO4D.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DUFmQscH.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CTWxt3dv.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-xj5gOva_.js → registry-api-BBoJ7khF.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-qmG-3qjj.js +1 -0
- package/dist/gateway/static/root/assets/rotate-cw-LIg3Am9S.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BJTvmBCA.js → runtime-tools-settings-panel-CXHQc53b.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DvGBa_7R.js → schema-form-3jTDF2lJ.js} +1 -1
- package/dist/gateway/static/root/assets/search-DA7gz22f.js +1 -0
- package/dist/gateway/static/root/assets/sessions-page-D_We4_MV.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-B_QhPgU0.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-CUDozALU.js +1 -0
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-sbef7GTm.js → settings-loading-skeleton-H3ZH6a6l.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BNGxxXZe.js → settings-page-tx29z21o.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-VunfXpTX.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-C1523ij3.js → share-preview-page-MyThymEx.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DkZvY1cr.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DVDOh1iY.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-BOOyMnno.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-Ditgz7Vo.js → skills-page.utils-Bl5Yv3Cx.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-DwQ3O1ta.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-BwOyrADL.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-DgSjes3O.js → theme-store-Br4BtK4x.js} +1 -1
- package/dist/gateway/static/root/assets/typed-models-lib-q5-Vfqd8.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-Bp_qFZkl.js → use-autosave-DRS3RwS9.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-ClV2r3Cr.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-hbzDfErG.js → voice-api-key-field-CGTE5156.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DZVib-04.js → work-discovery-overlay-CW-HKD7h.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-C2RKay1p.js → workflow-run-setup-panel-Dtr9fDC8.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CDOyNgZf.js +5 -0
- package/dist/gateway/static/root/index.html +20 -11
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/new-session.js +99 -0
- package/dist/packages/gateway-contract/src/tasks.js +5 -0
- package/dist/packages/gateway-contract/src/user-message-display.js +55 -0
- package/dist/src/agent/agent-manager.js +5 -4
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +2 -2
- package/dist/src/agent/background-review/run-background-review.js +144 -16
- 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/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +3 -1
- package/dist/src/agent/inbound/turn-dispatcher.js +2 -1
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/memory/context/types.d.ts +1 -1
- package/dist/src/agent/memory/manager.d.ts +2 -1
- package/dist/src/agent/memory/manager.js +2 -6
- package/dist/src/agent/memory/understanding/service.d.ts +1 -0
- package/dist/src/agent/memory/understanding/service.js +179 -36
- package/dist/src/agent/memory/understanding/types.d.ts +6 -0
- package/dist/src/agent/messaging/command-handler.d.ts +2 -0
- package/dist/src/agent/messaging/command-handler.js +3 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +3 -0
- package/dist/src/agent/service/direct-turn-helpers.js +13 -3
- package/dist/src/agent/service/process-direct-streaming.d.ts +2 -1
- package/dist/src/agent/service/process-direct-streaming.js +12 -11
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-config-service.d.ts +1 -0
- package/dist/src/agent/session/session-config-service.js +11 -0
- package/dist/src/agent/session/session-inspector.d.ts +1 -0
- package/dist/src/agent/session/session-inspector.js +2 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/source-context/budget.d.ts +3 -0
- package/dist/src/agent/source-context/budget.js +21 -0
- package/dist/src/agent/source-context/index.js +3 -3
- package/dist/src/agent/source-context/injector.d.ts +2 -2
- package/dist/src/agent/source-context/injector.js +19 -9
- package/dist/src/agent/source-context/types.d.ts +16 -0
- package/dist/src/agent/source-context/types.js +25 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +19 -2
- package/dist/src/agent/tools/xopc-use-tool.js +62 -2
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/backend-from-config.d.ts +8 -0
- package/dist/src/browser/backend-from-config.js +16 -1
- package/dist/src/browser/providers/browser-ext-install.d.ts +3 -2
- package/dist/src/browser/providers/browser-ext-install.js +5 -3
- package/dist/src/chat-commands/builtins/review.js +11 -2
- package/dist/src/chat-commands/builtins/understanding.js +11 -4
- package/dist/src/chat-commands/types.d.ts +4 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +20 -20
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/connectors/connected-source-understanding.d.ts +1 -0
- package/dist/src/connectors/connected-source-understanding.js +82 -34
- package/dist/src/connectors/learning-coordinator.js +57 -11
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +18 -0
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/agent-stream.js +12 -2
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +1 -0
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +46 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +23 -3
- package/dist/src/gateway/hono/routes/sessions.js +17 -20
- package/dist/src/gateway/hono/routes/tasks.js +25 -0
- package/dist/src/gateway/hono/routes/understanding-sources.d.ts +9 -0
- package/dist/src/gateway/hono/routes/understanding-sources.js +127 -31
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/hono/routes/you.js +71 -4
- package/dist/src/gateway/service/agent-runner.d.ts +7 -2
- package/dist/src/gateway/service/agent-runner.js +21 -1
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.d.ts +2 -0
- package/dist/src/gateway/service/run-gateway-agent.js +2 -1
- package/dist/src/gateway/service/session-input-coordinator.d.ts +8 -2
- package/dist/src/gateway/service/session-input-coordinator.js +62 -3
- package/dist/src/gateway/service/sessions-api.d.ts +1 -0
- package/dist/src/gateway/service.d.ts +3 -2
- package/dist/src/gateway/service.js +25 -15
- package/dist/src/gateway/user-turn-input.d.ts +2 -0
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +3 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +16 -3
- package/dist/src/infra/update-runner.js +1 -1
- package/dist/src/knowledge/connected-understanding-pipeline.d.ts +1 -1
- package/dist/src/knowledge/connected-understanding-pipeline.js +4 -2
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/retrieval/queryProfile.d.ts +1 -0
- package/dist/src/retrieval/queryProfile.js +9 -1
- package/dist/src/session/client-history.d.ts +11 -0
- package/dist/src/session/client-history.js +24 -2
- package/dist/src/session/config-types.d.ts +1 -1
- package/dist/src/session/session-title.js +2 -3
- package/dist/src/session/store.js +1 -0
- package/dist/src/session/transcript-outline.js +5 -2
- package/dist/src/session/types.d.ts +1 -0
- package/dist/src/session/user-message-display.d.ts +4 -0
- package/dist/src/session/user-message-display.js +22 -0
- package/dist/src/storage/sqlite/context-extraction-repository.d.ts +57 -0
- package/dist/src/storage/sqlite/context-extraction-repository.js +119 -0
- package/dist/src/storage/sqlite/context-relation-repository.d.ts +50 -0
- package/dist/src/storage/sqlite/context-relation-repository.js +97 -0
- package/dist/src/storage/sqlite/index.d.ts +4 -2
- package/dist/src/storage/sqlite/index.js +5 -3
- package/dist/src/storage/sqlite/migrations/126_focus_context_governance.sql +72 -0
- package/dist/src/storage/sqlite/migrations/127_context_object_origin.sql +36 -0
- package/dist/src/storage/sqlite/migrations/128_context_extraction.sql +73 -0
- package/dist/src/storage/sqlite/migrations/129_focus_versions.sql +51 -0
- package/dist/src/storage/sqlite/migrations/130_context_evidence_provenance.sql +18 -0
- package/dist/src/storage/sqlite/migrations/131_session_input_contexts.sql +2 -0
- package/dist/src/storage/sqlite/migrations/132_transcript_source_context_metadata.sql +34 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.d.ts +8 -0
- package/dist/src/storage/sqlite/session-input-repository.js +19 -7
- package/dist/src/storage/sqlite/session-turn-replace-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/session-turn-replace-repository.js +3 -2
- package/dist/src/storage/sqlite/transcript-repository.js +29 -3
- package/dist/src/storage/sqlite/user-context-repository.d.ts +4 -1
- package/dist/src/storage/sqlite/user-context-repository.js +65 -29
- package/dist/src/tasks/index.d.ts +1 -0
- package/dist/src/tasks/index.js +2 -1
- package/dist/src/tasks/task-deletion-service.d.ts +21 -0
- package/dist/src/tasks/task-deletion-service.js +35 -0
- package/dist/src/tasks/task-repository.js +22 -1
- package/dist/src/tui/backends/embedded-backend.js +5 -3
- package/dist/src/tui/backends/gateway-realtime-backend.js +5 -3
- package/dist/src/tui/chat-history.js +2 -1
- package/dist/src/tui/tui-agent-events.js +4 -2
- package/dist/src/tui/tui-commands.d.ts +1 -0
- package/dist/src/tui/tui-commands.js +8 -3
- package/dist/src/tui/tui-empty-session-cleanup.d.ts +0 -1
- package/dist/src/tui/tui-empty-session-cleanup.js +1 -11
- package/dist/src/tui/tui-new-session-preferences.d.ts +10 -0
- package/dist/src/tui/tui-new-session-preferences.js +32 -0
- package/dist/src/tui/tui-session-actions.d.ts +1 -0
- package/dist/src/tui/tui-session-actions.js +2 -1
- package/dist/src/tui/tui-settings.d.ts +2 -0
- package/dist/src/tui/tui-settings.js +4 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui-types.d.ts +1 -0
- package/dist/src/tui/tui.js +58 -5
- package/dist/src/tunnel/frpc-process.js +3 -0
- package/dist/src/tunnel/tunnel-service.d.ts +2 -0
- package/dist/src/tunnel/tunnel-service.js +40 -28
- package/dist/src/user-context/context-objects.d.ts +17 -0
- package/dist/src/user-context/context-objects.js +99 -0
- package/dist/src/user-context/domain.d.ts +13 -1
- package/dist/src/user-context/evaluation/harness.d.ts +13 -0
- package/dist/src/user-context/evaluation/harness.js +31 -0
- package/dist/src/user-context/extraction/registry.d.ts +26 -0
- package/dist/src/user-context/extraction/registry.js +113 -0
- package/dist/src/user-context/extraction/repair.d.ts +19 -0
- package/dist/src/user-context/extraction/repair.js +68 -0
- package/dist/src/user-context/planner.js +214 -57
- package/dist/src/user-context/retriever.js +69 -9
- package/dist/src/user-context/sources/index.js +2 -2
- package/dist/src/user-context/sources/processing-policy.d.ts +2 -0
- package/dist/src/user-context/sources/processing-policy.js +7 -0
- package/dist/src/user-context/sources/repository.d.ts +23 -4
- package/dist/src/user-context/sources/repository.js +122 -12
- package/dist/src/user-context/sources/types.d.ts +10 -1
- package/dist/src/user-context/understanding.js +1 -1
- package/dist/src/work-discovery/service.js +21 -5
- package/dist/src/work-discovery/source-repository.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agents-Dj86bHkl.js +0 -68
- package/dist/gateway/static/root/assets/app-management-settings-panel-D-M6GN-8.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-XDhmzdIc.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-sfO835uz.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-PptuZgoo.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-BoCmzMFV.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DhkJsU8Z.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-Dm7T61fE.js +0 -3
- package/dist/gateway/static/root/assets/channels-settings-dG6UFVqt.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-DgJxfNyK.js +0 -1
- package/dist/gateway/static/root/assets/chat-terminal-dock-CT5yoSMD.js +0 -36
- package/dist/gateway/static/root/assets/connectors-page-BC6Ft9SU.js +0 -2
- package/dist/gateway/static/root/assets/dependency-picker-DZVSgLXH.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-Bw4cCFzI.js +0 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-Cbst7IXR.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-C1PAKSy2.js +0 -1
- package/dist/gateway/static/root/assets/gateway-config-api-Bch9vO6t.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-DkDxZFGG.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DXNMxy5b.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CYcpVFNT.js +0 -1
- package/dist/gateway/static/root/assets/index-Dgb1R07E.css +0 -2
- package/dist/gateway/static/root/assets/index-DlOYwVFK.js +0 -108
- package/dist/gateway/static/root/assets/local-app-workbench-page-BFrgPwGE.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CPweLw3k.js +0 -2
- package/dist/gateway/static/root/assets/messages-B9WQcZ1V.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-wieRAd1y.js +0 -4
- package/dist/gateway/static/root/assets/page-tabs-Bsluqyfb.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-BrpTWv44.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-Cww6V7HJ.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D0LKhCCw.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Sf4Pde6Z.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-S5gvgfu5.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-B3XvdEy8.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-CiGFtdD8.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CGU_Mxjr.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-k0UQ8WxO.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DQ1GvL1w.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-OuHd9GcN.js +0 -2
- package/dist/gateway/static/root/assets/system-settings-panel-CERqCsz2.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-BnRNL2sn.js +0 -1
- package/dist/gateway/static/root/assets/typed-models-lib-abEJNkCO.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-Cnkaiky5.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-B_VlcKiK.js +0 -5
|
@@ -48,17 +48,25 @@ const TIME_RULES = [
|
|
|
48
48
|
pattern: /\b(?:future|next|later|upcoming)\b|未来|下次|之后|即将/i
|
|
49
49
|
}
|
|
50
50
|
];
|
|
51
|
+
const TIME_EXPANSIONS = {
|
|
52
|
+
current: "now current active today 现在 当前 今天",
|
|
53
|
+
recent: "recent recently latest 近期 最近 最新",
|
|
54
|
+
historical: "previous before history past 之前 以前 历史 上次",
|
|
55
|
+
future: "future next later upcoming 未来 下次 之后 即将"
|
|
56
|
+
};
|
|
51
57
|
function buildRetrievalQueryProfile(query, scope = {}) {
|
|
52
58
|
const normalized = normalizeRetrievalText(query);
|
|
53
59
|
const intentKinds = INTENT_RULES.filter((rule) => rule.pattern.test(normalized)).flatMap((rule) => rule.kinds);
|
|
54
60
|
const timeHints = TIME_RULES.filter((rule) => rule.pattern.test(normalized)).map((rule) => rule.hint);
|
|
61
|
+
const uniqueTimeHints = [...new Set(timeHints)];
|
|
55
62
|
return {
|
|
56
63
|
normalized,
|
|
64
|
+
expanded: [normalized, ...uniqueTimeHints.map((hint) => TIME_EXPANSIONS[hint])].join(" ").trim(),
|
|
57
65
|
terms: extractLexicalTerms(normalized),
|
|
58
66
|
cjkBigrams: extractCjkBigrams(normalized),
|
|
59
67
|
identifiers: extractRetrievalIdentifiers(normalized),
|
|
60
68
|
intentKinds: [...new Set(intentKinds)],
|
|
61
|
-
timeHints:
|
|
69
|
+
timeHints: uniqueTimeHints,
|
|
62
70
|
scope: { ...scope }
|
|
63
71
|
};
|
|
64
72
|
}
|
|
@@ -11,6 +11,17 @@ export interface ClientHistoryMessage {
|
|
|
11
11
|
/** Persisted inbound attachment metadata used by chat clients to reload media. */
|
|
12
12
|
media?: Message['media'];
|
|
13
13
|
timestamp?: number;
|
|
14
|
+
/** Whitelisted display metadata; never includes source snapshot text. */
|
|
15
|
+
metadata?: {
|
|
16
|
+
sourceContexts: Array<{
|
|
17
|
+
kind: 'note';
|
|
18
|
+
sourceId: string;
|
|
19
|
+
version: string;
|
|
20
|
+
title: string;
|
|
21
|
+
tokenEstimate?: number;
|
|
22
|
+
truncated?: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
14
25
|
kind?: 'message' | 'compaction' | 'context' | 'bash' | 'custom' | 'branch';
|
|
15
26
|
tokensBefore?: number;
|
|
16
27
|
tokensAfter?: number;
|
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
1
2
|
import { buildTranscriptOutline } from "./transcript-outline.js";
|
|
2
3
|
//#region src/session/client-history.ts
|
|
4
|
+
function sourceContextDisplayMetadata(metadata) {
|
|
5
|
+
if (!metadata || typeof metadata !== "object" || Array.isArray(metadata)) return void 0;
|
|
6
|
+
const rows = metadata.sourceContexts;
|
|
7
|
+
if (!Array.isArray(rows)) return void 0;
|
|
8
|
+
const sourceContexts = rows.flatMap((value) => {
|
|
9
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return [];
|
|
10
|
+
const row = value;
|
|
11
|
+
if (row.kind !== "note" || typeof row.sourceId !== "string" || typeof row.version !== "string" || typeof row.title !== "string") return [];
|
|
12
|
+
return [{
|
|
13
|
+
kind: "note",
|
|
14
|
+
sourceId: row.sourceId,
|
|
15
|
+
version: row.version,
|
|
16
|
+
title: row.title,
|
|
17
|
+
...typeof row.tokenEstimate === "number" ? { tokenEstimate: row.tokenEstimate } : {},
|
|
18
|
+
...row.truncated === true ? { truncated: true } : {}
|
|
19
|
+
}];
|
|
20
|
+
});
|
|
21
|
+
return sourceContexts.length ? { sourceContexts } : void 0;
|
|
22
|
+
}
|
|
3
23
|
function flattenMessageContent(content) {
|
|
4
24
|
if (typeof content === "string") return content;
|
|
5
25
|
if (!Array.isArray(content)) return "";
|
|
@@ -111,8 +131,9 @@ function messagesToClientHistory(messages, opts) {
|
|
|
111
131
|
out.push({
|
|
112
132
|
role: m.role,
|
|
113
133
|
...typeof m.turnId === "string" ? { turnId: m.turnId } : {},
|
|
114
|
-
content: text,
|
|
134
|
+
content: m.role === "user" ? stripRuntimeContextFromUserMessage(text) : text,
|
|
115
135
|
...m.media?.length ? { media: m.media } : {},
|
|
136
|
+
...sourceContextDisplayMetadata(m.metadata) ? { metadata: sourceContextDisplayMetadata(m.metadata) } : {},
|
|
116
137
|
timestamp: parseTimestamp(m.timestamp)
|
|
117
138
|
});
|
|
118
139
|
continue;
|
|
@@ -413,8 +434,9 @@ function transcriptRowsToClientHistory(rows, opts) {
|
|
|
413
434
|
...messageRow.turnId ? { turnId: messageRow.turnId } : {},
|
|
414
435
|
role: messageRow.role,
|
|
415
436
|
kind: "message",
|
|
416
|
-
content: flattenMessageContent(messageRow.content ?? ""),
|
|
437
|
+
content: messageRow.role === "user" ? stripRuntimeContextFromUserMessage(flattenMessageContent(messageRow.content ?? "")) : flattenMessageContent(messageRow.content ?? ""),
|
|
417
438
|
...messageRow.media?.length ? { media: messageRow.media } : {},
|
|
439
|
+
...sourceContextDisplayMetadata(messageRow.metadata) ? { metadata: sourceContextDisplayMetadata(messageRow.metadata) } : {},
|
|
418
440
|
...displayIndex !== void 0 ? { displayIndex } : {},
|
|
419
441
|
timestamp: parseTimestampValue(messageRow.timestamp)
|
|
420
442
|
});
|
|
@@ -13,6 +13,6 @@ export interface SessionAgentConfig {
|
|
|
13
13
|
providerOverride?: string;
|
|
14
14
|
workingDirectoryOverride?: string;
|
|
15
15
|
responseLanguage?: ResponseLanguage;
|
|
16
|
-
userContextMode?: 'enabled' | 'off';
|
|
16
|
+
userContextMode?: 'enabled' | 'off' | 'temporary';
|
|
17
17
|
updatedAt?: number;
|
|
18
18
|
}
|
|
@@ -5,8 +5,7 @@ import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
|
5
5
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
6
6
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
7
7
|
import { readAgentMessageContent } from "../agent/memory/agent-message-access.js";
|
|
8
|
-
import {
|
|
9
|
-
import { stripEnvelopeTimestampPrefix } from "../channels/envelope-timestamp.js";
|
|
8
|
+
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
10
9
|
//#region src/session/session-title.ts
|
|
11
10
|
init_session_key();
|
|
12
11
|
init_providers();
|
|
@@ -56,7 +55,7 @@ function stripSkillCommandForTitle(text) {
|
|
|
56
55
|
return match[2]?.trim() || match[1]?.trim() || text;
|
|
57
56
|
}
|
|
58
57
|
function normalizeUserTextForTitle(raw) {
|
|
59
|
-
return stripSkillCommandForTitle(stripExpandedSkillBlockForTitle(stripMediaClaimChecks(
|
|
58
|
+
return stripSkillCommandForTitle(stripExpandedSkillBlockForTitle(stripMediaClaimChecks(stripRuntimeContextFromUserMessage(raw)))).trim();
|
|
60
59
|
}
|
|
61
60
|
/** First assistant message that has visible text (skips tool-only assistant rows). */
|
|
62
61
|
function firstAssistantText(messages) {
|
|
@@ -725,6 +725,7 @@ var SessionStore = class {
|
|
|
725
725
|
name: m.name
|
|
726
726
|
};
|
|
727
727
|
if (Array.isArray(m.media) && m.media.length > 0) row.media = m.media;
|
|
728
|
+
if (m.metadata && typeof m.metadata === "object") row.metadata = m.metadata;
|
|
728
729
|
const rawUsage = m.usage;
|
|
729
730
|
if (rawUsage && typeof rawUsage === "object") {
|
|
730
731
|
const inputTokens = typeof rawUsage.input === "number" ? rawUsage.input : void 0;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isTranscriptBashExecutionEntry, isTranscriptContextEntry, isTranscriptCustomMessageEntry, isTranscriptLabelEntry, isTranscriptMetadataEntry, isTranscriptSummaryMessageEntry } from "./session-context-for-llm.js";
|
|
2
|
+
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
2
3
|
//#region src/session/transcript-outline.ts
|
|
3
4
|
function asRecord(value) {
|
|
4
5
|
return value && typeof value === "object" ? value : null;
|
|
@@ -170,7 +171,8 @@ function rowPreview(row) {
|
|
|
170
171
|
}
|
|
171
172
|
const record = asRecord(row);
|
|
172
173
|
if (record?.type === "compaction") return truncateText(stringValue(record.summary) ?? "compaction checkpoint");
|
|
173
|
-
const
|
|
174
|
+
const content = contentText(record?.content);
|
|
175
|
+
const preview = truncateText(record?.role === "user" ? stripRuntimeContextFromUserMessage(content) : content);
|
|
174
176
|
if (record?.role === "assistant" && !preview) {
|
|
175
177
|
if (record.stopReason === "aborted") return "(aborted)";
|
|
176
178
|
const errorMessage = stringValue(record.errorMessage);
|
|
@@ -194,7 +196,8 @@ function rowContentText(row) {
|
|
|
194
196
|
if (isTranscriptSummaryMessageEntry(row)) return row.summary;
|
|
195
197
|
const record = asRecord(row);
|
|
196
198
|
if (record?.type === "compaction") return stringValue(record.summary);
|
|
197
|
-
const
|
|
199
|
+
const rawText = contentText(record?.content);
|
|
200
|
+
const text = (record?.role === "user" ? stripRuntimeContextFromUserMessage(rawText) : rawText).trim();
|
|
198
201
|
return text ? text : void 0;
|
|
199
202
|
}
|
|
200
203
|
function roleForTimeline(role) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Client-facing form of a persisted model-facing user message. */
|
|
2
|
+
export declare function stripRuntimeContextFromUserMessage(text: string): string;
|
|
3
|
+
/** Preserve structured content while cleaning every user text block. */
|
|
4
|
+
export declare function stripRuntimeContextFromUserContent(content: string | unknown[]): string | unknown[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { stripRuntimeUserMessageEnvelope } from "../../packages/gateway-contract/src/user-message-display.js";
|
|
2
|
+
import { stripSessionStartupContextFromUserText } from "../agent/reply/startup-context.js";
|
|
3
|
+
//#region src/session/user-message-display.ts
|
|
4
|
+
/** Client-facing form of a persisted model-facing user message. */
|
|
5
|
+
function stripRuntimeContextFromUserMessage(text) {
|
|
6
|
+
return stripRuntimeUserMessageEnvelope(stripSessionStartupContextFromUserText(text));
|
|
7
|
+
}
|
|
8
|
+
/** Preserve structured content while cleaning every user text block. */
|
|
9
|
+
function stripRuntimeContextFromUserContent(content) {
|
|
10
|
+
if (typeof content === "string") return stripRuntimeContextFromUserMessage(content);
|
|
11
|
+
return content.map((block) => {
|
|
12
|
+
if (!block || typeof block !== "object") return block;
|
|
13
|
+
const row = block;
|
|
14
|
+
if (row.type !== "text" || typeof row.text !== "string") return block;
|
|
15
|
+
return {
|
|
16
|
+
...row,
|
|
17
|
+
text: stripRuntimeContextFromUserMessage(row.text)
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { stripRuntimeContextFromUserContent, stripRuntimeContextFromUserMessage };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type ContextExtractionStatus = 'running' | 'completed' | 'skipped' | 'failed';
|
|
2
|
+
export type ContextObjectType = 'profile' | 'rule' | 'focus' | 'understanding';
|
|
3
|
+
export type ContextExtractionRun = {
|
|
4
|
+
id: string;
|
|
5
|
+
principalId: string;
|
|
6
|
+
sourceRef: string;
|
|
7
|
+
extractorId: string;
|
|
8
|
+
extractorVersion: string;
|
|
9
|
+
processingPolicy: 'local_only' | 'remote_allowed';
|
|
10
|
+
destination: 'deterministic' | 'local_model' | 'remote_model';
|
|
11
|
+
inputHash: string;
|
|
12
|
+
status: ContextExtractionStatus;
|
|
13
|
+
errorCode?: string;
|
|
14
|
+
startedAt: number;
|
|
15
|
+
completedAt?: number;
|
|
16
|
+
};
|
|
17
|
+
export type ContextExtractionOutput = {
|
|
18
|
+
id: string;
|
|
19
|
+
runId: string;
|
|
20
|
+
ordinal: number;
|
|
21
|
+
candidateKey: string;
|
|
22
|
+
objectType?: ContextObjectType;
|
|
23
|
+
objectId?: string;
|
|
24
|
+
versionId?: string;
|
|
25
|
+
outcome: 'created' | 'deduplicated' | 'rejected';
|
|
26
|
+
createdAt: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function claimContextExtractionRun(input: {
|
|
29
|
+
sourceRef: string;
|
|
30
|
+
extractorId: string;
|
|
31
|
+
extractorVersion: string;
|
|
32
|
+
processingPolicy: ContextExtractionRun['processingPolicy'];
|
|
33
|
+
destination: ContextExtractionRun['destination'];
|
|
34
|
+
inputHash: string;
|
|
35
|
+
principalId?: string;
|
|
36
|
+
nowMs?: number;
|
|
37
|
+
}): {
|
|
38
|
+
run: ContextExtractionRun;
|
|
39
|
+
shouldExecute: boolean;
|
|
40
|
+
};
|
|
41
|
+
export declare function finishContextExtractionRun(input: {
|
|
42
|
+
runId: string;
|
|
43
|
+
status: Exclude<ContextExtractionStatus, 'running'>;
|
|
44
|
+
errorCode?: string;
|
|
45
|
+
outputs?: Array<Omit<ContextExtractionOutput, 'id' | 'runId' | 'ordinal' | 'createdAt'>>;
|
|
46
|
+
nowMs?: number;
|
|
47
|
+
}): ContextExtractionRun | null;
|
|
48
|
+
export declare function listContextExtractionRuns(filter?: {
|
|
49
|
+
sourceRef?: string;
|
|
50
|
+
extractorId?: string;
|
|
51
|
+
extractorVersion?: string;
|
|
52
|
+
status?: ContextExtractionStatus;
|
|
53
|
+
limit?: number;
|
|
54
|
+
}): ContextExtractionRun[];
|
|
55
|
+
export declare function getContextExtractionRun(id: string): ContextExtractionRun | null;
|
|
56
|
+
export declare function listContextExtractionOutputs(runId: string): ContextExtractionOutput[];
|
|
57
|
+
export declare function hasIndependentExtractionOutput(runIds: string[], objectType: ContextObjectType, objectId: string): boolean;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
+
import "../../user-context/domain.js";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
//#region src/storage/sqlite/context-extraction-repository.ts
|
|
5
|
+
function runFromRow(row) {
|
|
6
|
+
return {
|
|
7
|
+
id: row.extraction_run_id,
|
|
8
|
+
principalId: row.principal_id,
|
|
9
|
+
sourceRef: row.source_ref,
|
|
10
|
+
extractorId: row.extractor_id,
|
|
11
|
+
extractorVersion: row.extractor_version,
|
|
12
|
+
processingPolicy: row.processing_policy,
|
|
13
|
+
destination: row.destination,
|
|
14
|
+
inputHash: row.input_hash,
|
|
15
|
+
status: row.status,
|
|
16
|
+
...row.error_code ? { errorCode: row.error_code } : {},
|
|
17
|
+
startedAt: row.started_at,
|
|
18
|
+
...row.completed_at == null ? {} : { completedAt: row.completed_at }
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function outputFromRow(row) {
|
|
22
|
+
return {
|
|
23
|
+
id: row.output_id,
|
|
24
|
+
runId: row.extraction_run_id,
|
|
25
|
+
ordinal: row.ordinal,
|
|
26
|
+
candidateKey: row.candidate_key,
|
|
27
|
+
...row.object_type ? { objectType: row.object_type } : {},
|
|
28
|
+
...row.object_id ? { objectId: row.object_id } : {},
|
|
29
|
+
...row.version_id ? { versionId: row.version_id } : {},
|
|
30
|
+
outcome: row.outcome,
|
|
31
|
+
createdAt: row.created_at
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function claimContextExtractionRun(input) {
|
|
35
|
+
const principalId = input.principalId ?? "local-owner";
|
|
36
|
+
const now = input.nowMs ?? Date.now();
|
|
37
|
+
return runSqliteWriteTransaction((db) => {
|
|
38
|
+
const existing = db.prepare(`SELECT * FROM context_extraction_runs
|
|
39
|
+
WHERE principal_id = ? AND source_ref = ? AND extractor_id = ? AND extractor_version = ?`).get(principalId, input.sourceRef, input.extractorId, input.extractorVersion);
|
|
40
|
+
if (existing) {
|
|
41
|
+
if (existing.input_hash !== input.inputHash) throw new Error("Extraction source changed without a new source reference");
|
|
42
|
+
if (existing.status !== "failed") return {
|
|
43
|
+
run: runFromRow(existing),
|
|
44
|
+
shouldExecute: false
|
|
45
|
+
};
|
|
46
|
+
db.prepare(`UPDATE context_extraction_runs
|
|
47
|
+
SET status = 'running', error_code = NULL, started_at = ?, completed_at = NULL
|
|
48
|
+
WHERE extraction_run_id = ?`).run(now, existing.extraction_run_id);
|
|
49
|
+
return {
|
|
50
|
+
run: runFromRow(db.prepare("SELECT * FROM context_extraction_runs WHERE extraction_run_id = ?").get(existing.extraction_run_id)),
|
|
51
|
+
shouldExecute: true
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const id = randomUUID();
|
|
55
|
+
db.prepare(`INSERT INTO context_extraction_runs (
|
|
56
|
+
extraction_run_id, principal_id, source_ref, extractor_id, extractor_version,
|
|
57
|
+
processing_policy, destination, input_hash, status, started_at
|
|
58
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'running', ?)`).run(id, principalId, input.sourceRef, input.extractorId, input.extractorVersion, input.processingPolicy, input.destination, input.inputHash, now);
|
|
59
|
+
return {
|
|
60
|
+
run: runFromRow(db.prepare("SELECT * FROM context_extraction_runs WHERE extraction_run_id = ?").get(id)),
|
|
61
|
+
shouldExecute: true
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function finishContextExtractionRun(input) {
|
|
66
|
+
const now = input.nowMs ?? Date.now();
|
|
67
|
+
return runSqliteWriteTransaction((db) => {
|
|
68
|
+
if (!db.prepare(`UPDATE context_extraction_runs SET status = ?, error_code = ?, completed_at = ?
|
|
69
|
+
WHERE extraction_run_id = ?`).run(input.status, input.errorCode ?? null, now, input.runId).changes) return null;
|
|
70
|
+
db.prepare("DELETE FROM context_extraction_outputs WHERE extraction_run_id = ?").run(input.runId);
|
|
71
|
+
const insert = db.prepare(`INSERT INTO context_extraction_outputs (
|
|
72
|
+
output_id, extraction_run_id, ordinal, candidate_key, object_type, object_id,
|
|
73
|
+
version_id, outcome, created_at
|
|
74
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
75
|
+
for (const [ordinal, output] of (input.outputs ?? []).entries()) insert.run(randomUUID(), input.runId, ordinal, output.candidateKey, output.objectType ?? null, output.objectId ?? null, output.versionId ?? null, output.outcome, now);
|
|
76
|
+
return runFromRow(db.prepare("SELECT * FROM context_extraction_runs WHERE extraction_run_id = ?").get(input.runId));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function listContextExtractionRuns(filter = {}) {
|
|
80
|
+
const clauses = [];
|
|
81
|
+
const values = [];
|
|
82
|
+
if (filter.sourceRef) {
|
|
83
|
+
clauses.push("source_ref = ?");
|
|
84
|
+
values.push(filter.sourceRef);
|
|
85
|
+
}
|
|
86
|
+
if (filter.extractorId) {
|
|
87
|
+
clauses.push("extractor_id = ?");
|
|
88
|
+
values.push(filter.extractorId);
|
|
89
|
+
}
|
|
90
|
+
if (filter.extractorVersion) {
|
|
91
|
+
clauses.push("extractor_version = ?");
|
|
92
|
+
values.push(filter.extractorVersion);
|
|
93
|
+
}
|
|
94
|
+
if (filter.status) {
|
|
95
|
+
clauses.push("status = ?");
|
|
96
|
+
values.push(filter.status);
|
|
97
|
+
}
|
|
98
|
+
values.push(Math.max(1, Math.min(500, filter.limit ?? 100)));
|
|
99
|
+
return getSqliteDatabase().prepare(`SELECT * FROM context_extraction_runs
|
|
100
|
+
${clauses.length ? `WHERE ${clauses.join(" AND ")}` : ""} ORDER BY started_at DESC LIMIT ?`).all(...values).map(runFromRow);
|
|
101
|
+
}
|
|
102
|
+
function getContextExtractionRun(id) {
|
|
103
|
+
const row = getSqliteDatabase().prepare("SELECT * FROM context_extraction_runs WHERE extraction_run_id = ?").get(id);
|
|
104
|
+
return row ? runFromRow(row) : null;
|
|
105
|
+
}
|
|
106
|
+
function listContextExtractionOutputs(runId) {
|
|
107
|
+
return getSqliteDatabase().prepare(`SELECT * FROM context_extraction_outputs
|
|
108
|
+
WHERE extraction_run_id = ? ORDER BY ordinal`).all(runId).map(outputFromRow);
|
|
109
|
+
}
|
|
110
|
+
function hasIndependentExtractionOutput(runIds, objectType, objectId) {
|
|
111
|
+
if (!runIds.length) return false;
|
|
112
|
+
const placeholders = runIds.map(() => "?").join(", ");
|
|
113
|
+
return Boolean(getSqliteDatabase().prepare(`SELECT 1 FROM context_extraction_outputs o
|
|
114
|
+
JOIN context_extraction_runs r ON r.extraction_run_id = o.extraction_run_id
|
|
115
|
+
WHERE o.extraction_run_id NOT IN (${placeholders}) AND o.object_type = ? AND o.object_id = ?
|
|
116
|
+
AND r.status = 'completed' LIMIT 1`).get(...runIds, objectType, objectId));
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { claimContextExtractionRun, finishContextExtractionRun, getContextExtractionRun, hasIndependentExtractionOutput, listContextExtractionOutputs, listContextExtractionRuns };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ContextObjectType } from './context-extraction-repository.js';
|
|
2
|
+
export type ContextObjectRelation = {
|
|
3
|
+
id: string;
|
|
4
|
+
subjectType: ContextObjectType;
|
|
5
|
+
subjectId: string;
|
|
6
|
+
subjectVersionId?: string;
|
|
7
|
+
predicate: 'supersedes' | 'supports' | 'contradicts' | 'related_to';
|
|
8
|
+
objectType: ContextObjectType;
|
|
9
|
+
objectId: string;
|
|
10
|
+
objectVersionId?: string;
|
|
11
|
+
factual: boolean;
|
|
12
|
+
extractionRunId?: string;
|
|
13
|
+
createdAt: number;
|
|
14
|
+
};
|
|
15
|
+
export type ContextTemporalAssertion = {
|
|
16
|
+
id: string;
|
|
17
|
+
objectType: 'focus' | 'understanding';
|
|
18
|
+
objectId: string;
|
|
19
|
+
objectVersionId?: string;
|
|
20
|
+
assertionType: 'current_state' | 'routine' | 'relationship' | 'project_status';
|
|
21
|
+
value: Record<string, unknown>;
|
|
22
|
+
confidence: number;
|
|
23
|
+
validFrom?: number;
|
|
24
|
+
validTo?: number;
|
|
25
|
+
status: 'candidate' | 'active' | 'closed' | 'rejected';
|
|
26
|
+
extractionRunId?: string;
|
|
27
|
+
createdAt: number;
|
|
28
|
+
updatedAt: number;
|
|
29
|
+
};
|
|
30
|
+
export declare function linkContextObjects(input: Omit<ContextObjectRelation, 'id' | 'createdAt'> & {
|
|
31
|
+
nowMs?: number;
|
|
32
|
+
}): ContextObjectRelation;
|
|
33
|
+
export declare function listContextObjectRelations(input?: {
|
|
34
|
+
objectType?: ContextObjectType;
|
|
35
|
+
objectId?: string;
|
|
36
|
+
extractionRunId?: string;
|
|
37
|
+
}): ContextObjectRelation[];
|
|
38
|
+
export declare function createTemporalAssertion(input: Omit<ContextTemporalAssertion, 'id' | 'createdAt' | 'updatedAt'> & {
|
|
39
|
+
nowMs?: number;
|
|
40
|
+
}): ContextTemporalAssertion;
|
|
41
|
+
export declare function closeTemporalAssertions(input: {
|
|
42
|
+
objectType: ContextTemporalAssertion['objectType'];
|
|
43
|
+
objectId: string;
|
|
44
|
+
validTo?: number;
|
|
45
|
+
}): number;
|
|
46
|
+
export declare function listTemporalAssertions(input?: {
|
|
47
|
+
objectType?: ContextTemporalAssertion['objectType'];
|
|
48
|
+
objectId?: string;
|
|
49
|
+
status?: ContextTemporalAssertion['status'];
|
|
50
|
+
}): ContextTemporalAssertion[];
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { getSqliteDatabase } from "./transaction.js";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
//#region src/storage/sqlite/context-relation-repository.ts
|
|
4
|
+
function relationFromRow(row) {
|
|
5
|
+
return {
|
|
6
|
+
id: row.relation_id,
|
|
7
|
+
subjectType: row.subject_type,
|
|
8
|
+
subjectId: row.subject_id,
|
|
9
|
+
...row.subject_version_id ? { subjectVersionId: row.subject_version_id } : {},
|
|
10
|
+
predicate: row.predicate,
|
|
11
|
+
objectType: row.object_type,
|
|
12
|
+
objectId: row.object_id,
|
|
13
|
+
...row.object_version_id ? { objectVersionId: row.object_version_id } : {},
|
|
14
|
+
factual: row.factual === 1,
|
|
15
|
+
...row.extraction_run_id ? { extractionRunId: row.extraction_run_id } : {},
|
|
16
|
+
createdAt: row.created_at
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function assertionFromRow(row) {
|
|
20
|
+
return {
|
|
21
|
+
id: row.assertion_id,
|
|
22
|
+
objectType: row.object_type,
|
|
23
|
+
objectId: row.object_id,
|
|
24
|
+
...row.object_version_id ? { objectVersionId: row.object_version_id } : {},
|
|
25
|
+
assertionType: row.assertion_type,
|
|
26
|
+
value: JSON.parse(row.value_json),
|
|
27
|
+
confidence: row.confidence,
|
|
28
|
+
...row.valid_from == null ? {} : { validFrom: row.valid_from },
|
|
29
|
+
...row.valid_to == null ? {} : { validTo: row.valid_to },
|
|
30
|
+
status: row.status,
|
|
31
|
+
...row.extraction_run_id ? { extractionRunId: row.extraction_run_id } : {},
|
|
32
|
+
createdAt: row.created_at,
|
|
33
|
+
updatedAt: row.updated_at
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function linkContextObjects(input) {
|
|
37
|
+
const now = input.nowMs ?? Date.now();
|
|
38
|
+
const factual = input.predicate !== "related_to";
|
|
39
|
+
getSqliteDatabase().prepare(`INSERT INTO context_object_relations (
|
|
40
|
+
relation_id, subject_type, subject_id, subject_version_id, predicate,
|
|
41
|
+
object_type, object_id, object_version_id, factual, extraction_run_id, created_at
|
|
42
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
43
|
+
ON CONFLICT DO UPDATE SET factual = excluded.factual, extraction_run_id = excluded.extraction_run_id`).run(randomUUID(), input.subjectType, input.subjectId, input.subjectVersionId ?? null, input.predicate, input.objectType, input.objectId, input.objectVersionId ?? null, factual ? 1 : 0, input.extractionRunId ?? null, now);
|
|
44
|
+
return relationFromRow(getSqliteDatabase().prepare(`SELECT * FROM context_object_relations
|
|
45
|
+
WHERE subject_type = ? AND subject_id = ? AND COALESCE(subject_version_id, '') = COALESCE(?, '')
|
|
46
|
+
AND predicate = ? AND object_type = ? AND object_id = ?
|
|
47
|
+
AND COALESCE(object_version_id, '') = COALESCE(?, '')`).get(input.subjectType, input.subjectId, input.subjectVersionId ?? null, input.predicate, input.objectType, input.objectId, input.objectVersionId ?? null));
|
|
48
|
+
}
|
|
49
|
+
function listContextObjectRelations(input = {}) {
|
|
50
|
+
const clauses = [];
|
|
51
|
+
const values = [];
|
|
52
|
+
if (input.objectType && input.objectId) {
|
|
53
|
+
clauses.push("((subject_type = ? AND subject_id = ?) OR (object_type = ? AND object_id = ?))");
|
|
54
|
+
values.push(input.objectType, input.objectId, input.objectType, input.objectId);
|
|
55
|
+
}
|
|
56
|
+
if (input.extractionRunId) {
|
|
57
|
+
clauses.push("extraction_run_id = ?");
|
|
58
|
+
values.push(input.extractionRunId);
|
|
59
|
+
}
|
|
60
|
+
return getSqliteDatabase().prepare(`SELECT * FROM context_object_relations
|
|
61
|
+
${clauses.length ? `WHERE ${clauses.join(" AND ")}` : ""} ORDER BY created_at DESC`).all(...values).map(relationFromRow);
|
|
62
|
+
}
|
|
63
|
+
function createTemporalAssertion(input) {
|
|
64
|
+
const now = input.nowMs ?? Date.now();
|
|
65
|
+
const id = randomUUID();
|
|
66
|
+
getSqliteDatabase().prepare(`INSERT INTO context_temporal_assertions (
|
|
67
|
+
assertion_id, object_type, object_id, object_version_id, assertion_type, value_json,
|
|
68
|
+
confidence, valid_from, valid_to, status, extraction_run_id, created_at, updated_at
|
|
69
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.objectType, input.objectId, input.objectVersionId ?? null, input.assertionType, JSON.stringify(input.value), input.confidence, input.validFrom ?? null, input.validTo ?? null, input.status, input.extractionRunId ?? null, now, now);
|
|
70
|
+
return assertionFromRow(getSqliteDatabase().prepare("SELECT * FROM context_temporal_assertions WHERE assertion_id = ?").get(id));
|
|
71
|
+
}
|
|
72
|
+
function closeTemporalAssertions(input) {
|
|
73
|
+
const now = input.validTo ?? Date.now();
|
|
74
|
+
return Number(getSqliteDatabase().prepare(`UPDATE context_temporal_assertions
|
|
75
|
+
SET status = 'closed', valid_to = COALESCE(valid_to, ?), updated_at = ?
|
|
76
|
+
WHERE object_type = ? AND object_id = ? AND status = 'active'`).run(now, now, input.objectType, input.objectId).changes);
|
|
77
|
+
}
|
|
78
|
+
function listTemporalAssertions(input = {}) {
|
|
79
|
+
const clauses = [];
|
|
80
|
+
const values = [];
|
|
81
|
+
if (input.objectType) {
|
|
82
|
+
clauses.push("object_type = ?");
|
|
83
|
+
values.push(input.objectType);
|
|
84
|
+
}
|
|
85
|
+
if (input.objectId) {
|
|
86
|
+
clauses.push("object_id = ?");
|
|
87
|
+
values.push(input.objectId);
|
|
88
|
+
}
|
|
89
|
+
if (input.status) {
|
|
90
|
+
clauses.push("status = ?");
|
|
91
|
+
values.push(input.status);
|
|
92
|
+
}
|
|
93
|
+
return getSqliteDatabase().prepare(`SELECT * FROM context_temporal_assertions
|
|
94
|
+
${clauses.length ? `WHERE ${clauses.join(" AND ")}` : ""} ORDER BY created_at DESC`).all(...values).map(assertionFromRow);
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { closeTemporalAssertions, createTemporalAssertion, linkContextObjects, listContextObjectRelations, listTemporalAssertions };
|
|
@@ -5,10 +5,12 @@ export { DatabaseSchemaMigrationGapError, DatabaseSchemaTooNewError, } from './m
|
|
|
5
5
|
export { discoverSqlMigrations, listRegisteredMigrationTargets } from './migrations/discover.js';
|
|
6
6
|
export { closeXopcDatabase, getXopcDatabase, isXopcDatabaseOpen, openXopcDatabase, requireXopcDatabase, resetXopcDatabaseSingletonForTest, type OpenXopcDatabaseOptions, type XopcDatabase, } from './connection.js';
|
|
7
7
|
export { getSqliteDatabase, runSqliteWriteTransaction } from './transaction.js';
|
|
8
|
+
export { claimContextExtractionRun, finishContextExtractionRun, getContextExtractionRun, hasIndependentExtractionOutput, listContextExtractionOutputs, listContextExtractionRuns, type ContextExtractionOutput, type ContextExtractionRun, type ContextExtractionStatus, type ContextObjectType, } from './context-extraction-repository.js';
|
|
9
|
+
export { closeTemporalAssertions, createTemporalAssertion, linkContextObjects, listContextObjectRelations, listTemporalAssertions, type ContextObjectRelation, type ContextTemporalAssertion, } from './context-relation-repository.js';
|
|
8
10
|
export { finishContextConsolidationRun, getContextConsolidationRun, listContextConsolidationDecisions, listContextConsolidationRuns, recordContextConsolidationDecision, startContextConsolidationRun, type ContextConsolidationDecision, type ContextConsolidationRun, } from './context-consolidation-repository.js';
|
|
9
11
|
export { summarizeUnderstandingFeedback, summarizeUserUnderstandingQuality, type UnderstandingFeedbackSummary, type UserUnderstandingQualityMetrics, } from './user-context-quality-repository.js';
|
|
10
|
-
export { createCollaborationRule, createContextEvidence, createUnderstanding, consumeContextConsent, deleteCollaborationRule, deleteUnderstanding, decideContextConsent, ensureContextConsent, getCollaborationRule, getTurnPersonalization, getUnderstanding, getUserProfile, hasContextConsent, isUnderstandingSuppressed, listCollaborationRules, listUnderstandingEvidence, listUnderstandings, linkUnderstandingEvidence, recordContextFeedback, recordContextRun, rejectUnderstanding, reviseCollaborationRule, reviseUnderstanding, searchActiveUnderstandings, setCollaborationRuleStatus, setUnderstandingStatus, updateUserProfile, type CreateUnderstandingInput, } from './user-context-repository.js';
|
|
11
|
-
export { cancelQueuedSessionInput, claimNextSessionInput, findSessionInput, finishSessionInputRun, getSessionInputState, insertSessionInput, mutateQueuedSessionInput, recoverSessionInputState, setSessionInputStatus, type SessionInput, type SessionInputDelivery, type SessionInputState, type SessionInputStatus, } from './session-input-repository.js';
|
|
12
|
+
export { createCollaborationRule, createContextEvidence, createUnderstanding, closeUnderstandingValidity, consumeContextConsent, deleteCollaborationRule, deleteUnderstanding, decideContextConsent, ensureContextConsent, getCollaborationRule, getTurnPersonalization, getUnderstanding, getUserProfile, hasContextConsent, isUnderstandingSuppressed, listCollaborationRules, listUnderstandingEvidence, listUnderstandings, linkUnderstandingEvidence, recordContextFeedback, recordContextRun, rejectUnderstanding, reviseCollaborationRule, reviseUnderstanding, searchActiveUnderstandings, setCollaborationRuleStatus, setUnderstandingStatus, updateUserProfile, type CreateUnderstandingInput, } from './user-context-repository.js';
|
|
13
|
+
export { cancelQueuedSessionInput, claimNextSessionInput, findSessionInput, finishSessionInputRun, getSessionInputState, getSessionInputById, insertSessionInput, mutateQueuedSessionInput, recoverSessionInputState, setSessionInputStatus, type SessionInput, type SessionInputDelivery, type SessionInputState, type SessionInputStatus, } from './session-input-repository.js';
|
|
12
14
|
export { replaceLatestSessionTurnAndQueueInput, validateLatestSessionTurnTarget, type ReplaceLatestSessionTurnInput, type ReplaceLatestSessionTurnResult, } from './session-turn-replace-repository.js';
|
|
13
15
|
export { acknowledgeHomeAttention, isHomeAttentionAcknowledged, type HomeAttentionSubjectKind, } from './home-attention-repository.js';
|
|
14
16
|
export { claimNextConnectorLearningJob, enqueueConnectorLearningJob, listConnectorLearningJobs, recoverStaleConnectorLearningJobs, setConnectorLearningPaused, updateConnectorLearningJob, type ConnectorLearningJob, type ConnectorLearningMode, type ConnectorLearningPhase, type ConnectorLearningStatus, } from './connector-learning-repository.js';
|
|
@@ -6,10 +6,12 @@ import { XOPC_DB_BASELINE_SCHEMA_VERSION, XOPC_DB_SCHEMA_VERSION, applyPendingMi
|
|
|
6
6
|
import { ensureXopcDatabaseSchema } from "./schema.js";
|
|
7
7
|
import { closeXopcDatabase, getXopcDatabase, isXopcDatabaseOpen, openXopcDatabase, requireXopcDatabase, resetXopcDatabaseSingletonForTest } from "./connection.js";
|
|
8
8
|
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
9
|
+
import { claimContextExtractionRun, finishContextExtractionRun, getContextExtractionRun, hasIndependentExtractionOutput, listContextExtractionOutputs, listContextExtractionRuns } from "./context-extraction-repository.js";
|
|
10
|
+
import { closeTemporalAssertions, createTemporalAssertion, linkContextObjects, listContextObjectRelations, listTemporalAssertions } from "./context-relation-repository.js";
|
|
9
11
|
import { finishContextConsolidationRun, getContextConsolidationRun, listContextConsolidationDecisions, listContextConsolidationRuns, recordContextConsolidationDecision, startContextConsolidationRun } from "./context-consolidation-repository.js";
|
|
10
12
|
import { summarizeUnderstandingFeedback, summarizeUserUnderstandingQuality } from "./user-context-quality-repository.js";
|
|
11
|
-
import { consumeContextConsent, createCollaborationRule, createContextEvidence, createUnderstanding, decideContextConsent, deleteCollaborationRule, deleteUnderstanding, ensureContextConsent, getCollaborationRule, getTurnPersonalization, getUnderstanding, getUserProfile, hasContextConsent, isUnderstandingSuppressed, linkUnderstandingEvidence, listCollaborationRules, listUnderstandingEvidence, listUnderstandings, recordContextFeedback, recordContextRun, rejectUnderstanding, reviseCollaborationRule, reviseUnderstanding, searchActiveUnderstandings, setCollaborationRuleStatus, setUnderstandingStatus, updateUserProfile } from "./user-context-repository.js";
|
|
12
|
-
import { cancelQueuedSessionInput, claimNextSessionInput, findSessionInput, finishSessionInputRun, getSessionInputState, insertSessionInput, mutateQueuedSessionInput, recoverSessionInputState, setSessionInputStatus } from "./session-input-repository.js";
|
|
13
|
+
import { closeUnderstandingValidity, consumeContextConsent, createCollaborationRule, createContextEvidence, createUnderstanding, decideContextConsent, deleteCollaborationRule, deleteUnderstanding, ensureContextConsent, getCollaborationRule, getTurnPersonalization, getUnderstanding, getUserProfile, hasContextConsent, isUnderstandingSuppressed, linkUnderstandingEvidence, listCollaborationRules, listUnderstandingEvidence, listUnderstandings, recordContextFeedback, recordContextRun, rejectUnderstanding, reviseCollaborationRule, reviseUnderstanding, searchActiveUnderstandings, setCollaborationRuleStatus, setUnderstandingStatus, updateUserProfile } from "./user-context-repository.js";
|
|
14
|
+
import { cancelQueuedSessionInput, claimNextSessionInput, findSessionInput, finishSessionInputRun, getSessionInputById, getSessionInputState, insertSessionInput, mutateQueuedSessionInput, recoverSessionInputState, setSessionInputStatus } from "./session-input-repository.js";
|
|
13
15
|
import { buildDefaultSessionMetadata } from "./session-metadata.js";
|
|
14
16
|
import { buildGlobalSessionStats, classifyStoredRow, estimateTokensFromMessages, extractFtsContent, metadataToSessionInsert, sessionConfigRowToConfig, sessionRowToMetadata, transcriptEntryRowToStoredRow } from "./row-mappers.js";
|
|
15
17
|
import { replaceLatestSessionTurnAndQueueInput, validateLatestSessionTurnTarget } from "./session-turn-replace-repository.js";
|
|
@@ -33,4 +35,4 @@ import { appendConnectorExecutionAudit, claimConnectorWebhookDelivery, completeC
|
|
|
33
35
|
import { getConnectorAccount, listConnectorAccounts, reconcileConnectorAccount, refreshConnectorAccountCurrent } from "./connector-account-repository.js";
|
|
34
36
|
import { getConnectorSyncPolicy, getConnectorSyncPolicyForConnection, listConnectorSyncPolicies, upsertConnectorSyncPolicy } from "./connector-sync-policy-repository.js";
|
|
35
37
|
import { getUserTrustPolicy, setUserTrustPolicy } from "./user-trust-repository.js";
|
|
36
|
-
export { COMPOSER_INPUT_HISTORY_LIMIT, DatabaseSchemaMigrationGapError, DatabaseSchemaTooNewError, SCHEMA_META_SCHEMA_VERSION_KEY, XOPC_DB_BASELINE_SCHEMA_VERSION, XOPC_DB_FILENAME, XOPC_DB_SCHEMA_VERSION, acknowledgeHomeAttention, appendCompactionBoundaryIfUnchanged, appendComposerInputHistory, appendConnectorExecutionAudit, appendMemorySignal, appendMemoryTraceEvent, appendTranscriptEntry, applyPendingMigrations, attachMemoryEvidence, bindEndpointPrincipal, buildDefaultSessionMetadata, buildGlobalSessionStats, buildRelationshipPrompt, cancelQueuedSessionInput, claimConnectorWebhookDelivery, claimKnowledgeSourceItems, claimNextConnectorLearningJob, claimNextSessionInput, classifyStoredRow, clearComposerInputHistory, closeXopcDatabase, completeConnectorWebhookDelivery, completeKnowledgeSourceItemSynthesis, consumeConnectorApproval, consumeContextConsent, createCollaborationRule, createConnectorApproval, createContextEvidence, createEndpointPrincipal, createObjectLinkRecord, createUnderstanding, decideConnectorApproval, decideContextConsent, deleteCollaborationRule, deleteConnectorConnection, deleteConnectorInstallation, deleteMemoryEvidenceForRecord, deleteMemoryRecord, deleteNoteAgentContextRecord, deleteNoteRecord, deleteObjectLinkRecord, deleteSessionConfig, deleteSessionRecord, deleteUnderstanding, discoverSqlMigrations, enqueueConnectorLearningJob, ensureContextConsent, ensureSessionRecord, ensureXopcDatabaseSchema, estimateTokensFromMessages, extractFtsContent, findSessionInput, findSessionKeyBySessionId, finishContextConsolidationRun, finishEndpointToolInvocationAudit, finishKnowledgeSyncRun, finishSessionInputRun, getActivityEventRecord, getCachedConnectorCatalogEntry, getCollaborationRule, getConnectorAccount, getConnectorApproval, getConnectorConnection, getConnectorInstallation, getConnectorSyncPolicy, getConnectorSyncPolicyForConnection, getContextConsolidationRun, getCurrentSessionId, getEndpointPrincipal, getGlobalSessionStats, getInteractionState, getKnowledgeConsumerWatermark, getKnowledgeSourceCursor, getKnowledgeSourceItem, getMemoryProviderState, getMemoryRecord, getMemoryTurnFeedback, getNoteAgentContextRecord, getNoteRecord, getRelationshipSettings, getSessionConfig, getSessionInputState, getSessionMetadata, getSessionPersistedLevels, getSessionTaskPlan, getSqliteDatabase, getTurnPersonalization, getUnderstanding, getUserProfile, getUserTrustPolicy, getXopcDatabase, hasContextConsent, hasSessionConfig, hasUnresolvedMemoryConflict, incrementSessionStatsOnAppend, insertSessionInput, inspectSchemaMigrationStatus, isHomeAttentionAcknowledged, isProactiveSupportAllowed, isUnderstandingSuppressed, isXopcDatabaseOpen, linkUnderstandingEvidence, listActivityRecords, listCachedConnectorCatalogEntries, listCollaborationRules, listCompactionBoundaries, listComposerInputHistory, listConnectorAccounts, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, listConnectorLearningJobs, listConnectorSyncPolicies, listContextConsolidationDecisions, listContextConsolidationRuns, listEndpointPrincipals, listEndpointToolInvocationAudits, listKnowledgeSourceChanges, listKnowledgeSourceItems, listKnowledgeSyncRuns, listMemoryEvidence, listMemoryRecords, listMemorySignals, listMemoryTraceEvents, listNoteRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, listRegisteredMigrationTargets, listSessionMetadata, listSessionsByAgent, listUnderstandingEvidence, listUnderstandings, loadCompactionSourceSnapshot, loadLlmMessagesForSession, loadTranscriptHistoryRowsForSession, loadTranscriptRows, loadTranscriptRowsForSession, markMemoryRecordsConflicted, metadataToSessionInsert, mutateQueuedSessionInput, openXopcDatabase, paginateTranscriptMessages, patchSessionMetadata, pruneBoundedKnowledgeSourceItems, readSchemaVersion, readSchemaVersionForTest, reconcileConnectorAccount, recordActivityEvent, recordContextConsolidationDecision, recordContextFeedback, recordContextRun, recoverSessionInputState, recoverStaleConnectorLearningJobs, refreshConnectorAccountCurrent, rejectUnderstanding, releaseConnectorWebhookDelivery, replaceConnectorCatalogEntries, replaceLatestSessionTurnAndQueueInput, replaceTranscriptRows, requireXopcDatabase, resetSessionRecord, resetXopcDatabaseSingletonForTest, resolveMigrationsDir, resolveSessionAgentId, resolveXopcDatabasePath, restoreBeforeCompactionBoundary, reviseCollaborationRule, reviseUnderstanding, revokeEndpointPrincipal, runSqliteWriteTransaction, searchActiveUnderstandings, searchMemoryRecords, searchSessionTranscript, sessionConfigRowToConfig, sessionRowToMetadata, setCollaborationRuleStatus, setConnectorLearningPaused, setInteractionState, setKnowledgeConsumerWatermark, setKnowledgeSourceCursor, setKnowledgeSourceItemSynthesisStatus, setMemoryProviderState, setMemoryRecordStatus, setMemoryTurnFeedback, setSessionConfig, setSessionInputStatus, setSessionTaskPlan, setUnderstandingStatus, setUserTrustPolicy, startContextConsolidationRun, startEndpointToolInvocationAudit, startKnowledgeSyncRun, summarizeMemoryRecallFeedback, summarizeUnderstandingFeedback, summarizeUserUnderstandingQuality, touchEndpointPrincipal, transcriptEntryRowToStoredRow, updateConnectorLearningJob, updateInteractionStateFromMessage, updateRelationshipSettings, updateSessionConfig, updateSessionStats, updateUserProfile, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation, upsertConnectorSyncPolicy, upsertKnowledgeSourceItems, upsertMemoryRecord, upsertNoteAgentContextRecord, upsertNoteRecord, validateLatestSessionTurnTarget };
|
|
38
|
+
export { COMPOSER_INPUT_HISTORY_LIMIT, DatabaseSchemaMigrationGapError, DatabaseSchemaTooNewError, SCHEMA_META_SCHEMA_VERSION_KEY, XOPC_DB_BASELINE_SCHEMA_VERSION, XOPC_DB_FILENAME, XOPC_DB_SCHEMA_VERSION, acknowledgeHomeAttention, appendCompactionBoundaryIfUnchanged, appendComposerInputHistory, appendConnectorExecutionAudit, appendMemorySignal, appendMemoryTraceEvent, appendTranscriptEntry, applyPendingMigrations, attachMemoryEvidence, bindEndpointPrincipal, buildDefaultSessionMetadata, buildGlobalSessionStats, buildRelationshipPrompt, cancelQueuedSessionInput, claimConnectorWebhookDelivery, claimContextExtractionRun, claimKnowledgeSourceItems, claimNextConnectorLearningJob, claimNextSessionInput, classifyStoredRow, clearComposerInputHistory, closeTemporalAssertions, closeUnderstandingValidity, closeXopcDatabase, completeConnectorWebhookDelivery, completeKnowledgeSourceItemSynthesis, consumeConnectorApproval, consumeContextConsent, createCollaborationRule, createConnectorApproval, createContextEvidence, createEndpointPrincipal, createObjectLinkRecord, createTemporalAssertion, createUnderstanding, decideConnectorApproval, decideContextConsent, deleteCollaborationRule, deleteConnectorConnection, deleteConnectorInstallation, deleteMemoryEvidenceForRecord, deleteMemoryRecord, deleteNoteAgentContextRecord, deleteNoteRecord, deleteObjectLinkRecord, deleteSessionConfig, deleteSessionRecord, deleteUnderstanding, discoverSqlMigrations, enqueueConnectorLearningJob, ensureContextConsent, ensureSessionRecord, ensureXopcDatabaseSchema, estimateTokensFromMessages, extractFtsContent, findSessionInput, findSessionKeyBySessionId, finishContextConsolidationRun, finishContextExtractionRun, finishEndpointToolInvocationAudit, finishKnowledgeSyncRun, finishSessionInputRun, getActivityEventRecord, getCachedConnectorCatalogEntry, getCollaborationRule, getConnectorAccount, getConnectorApproval, getConnectorConnection, getConnectorInstallation, getConnectorSyncPolicy, getConnectorSyncPolicyForConnection, getContextConsolidationRun, getContextExtractionRun, getCurrentSessionId, getEndpointPrincipal, getGlobalSessionStats, getInteractionState, getKnowledgeConsumerWatermark, getKnowledgeSourceCursor, getKnowledgeSourceItem, getMemoryProviderState, getMemoryRecord, getMemoryTurnFeedback, getNoteAgentContextRecord, getNoteRecord, getRelationshipSettings, getSessionConfig, getSessionInputById, getSessionInputState, getSessionMetadata, getSessionPersistedLevels, getSessionTaskPlan, getSqliteDatabase, getTurnPersonalization, getUnderstanding, getUserProfile, getUserTrustPolicy, getXopcDatabase, hasContextConsent, hasIndependentExtractionOutput, hasSessionConfig, hasUnresolvedMemoryConflict, incrementSessionStatsOnAppend, insertSessionInput, inspectSchemaMigrationStatus, isHomeAttentionAcknowledged, isProactiveSupportAllowed, isUnderstandingSuppressed, isXopcDatabaseOpen, linkContextObjects, linkUnderstandingEvidence, listActivityRecords, listCachedConnectorCatalogEntries, listCollaborationRules, listCompactionBoundaries, listComposerInputHistory, listConnectorAccounts, listConnectorActionMetadata, listConnectorApprovals, listConnectorConnections, listConnectorExecutionAudit, listConnectorInstallations, listConnectorLearningJobs, listConnectorSyncPolicies, listContextConsolidationDecisions, listContextConsolidationRuns, listContextExtractionOutputs, listContextExtractionRuns, listContextObjectRelations, listEndpointPrincipals, listEndpointToolInvocationAudits, listKnowledgeSourceChanges, listKnowledgeSourceItems, listKnowledgeSyncRuns, listMemoryEvidence, listMemoryRecords, listMemorySignals, listMemoryTraceEvents, listNoteRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, listRegisteredMigrationTargets, listSessionMetadata, listSessionsByAgent, listTemporalAssertions, listUnderstandingEvidence, listUnderstandings, loadCompactionSourceSnapshot, loadLlmMessagesForSession, loadTranscriptHistoryRowsForSession, loadTranscriptRows, loadTranscriptRowsForSession, markMemoryRecordsConflicted, metadataToSessionInsert, mutateQueuedSessionInput, openXopcDatabase, paginateTranscriptMessages, patchSessionMetadata, pruneBoundedKnowledgeSourceItems, readSchemaVersion, readSchemaVersionForTest, reconcileConnectorAccount, recordActivityEvent, recordContextConsolidationDecision, recordContextFeedback, recordContextRun, recoverSessionInputState, recoverStaleConnectorLearningJobs, refreshConnectorAccountCurrent, rejectUnderstanding, releaseConnectorWebhookDelivery, replaceConnectorCatalogEntries, replaceLatestSessionTurnAndQueueInput, replaceTranscriptRows, requireXopcDatabase, resetSessionRecord, resetXopcDatabaseSingletonForTest, resolveMigrationsDir, resolveSessionAgentId, resolveXopcDatabasePath, restoreBeforeCompactionBoundary, reviseCollaborationRule, reviseUnderstanding, revokeEndpointPrincipal, runSqliteWriteTransaction, searchActiveUnderstandings, searchMemoryRecords, searchSessionTranscript, sessionConfigRowToConfig, sessionRowToMetadata, setCollaborationRuleStatus, setConnectorLearningPaused, setInteractionState, setKnowledgeConsumerWatermark, setKnowledgeSourceCursor, setKnowledgeSourceItemSynthesisStatus, setMemoryProviderState, setMemoryRecordStatus, setMemoryTurnFeedback, setSessionConfig, setSessionInputStatus, setSessionTaskPlan, setUnderstandingStatus, setUserTrustPolicy, startContextConsolidationRun, startEndpointToolInvocationAudit, startKnowledgeSyncRun, summarizeMemoryRecallFeedback, summarizeUnderstandingFeedback, summarizeUserUnderstandingQuality, touchEndpointPrincipal, transcriptEntryRowToStoredRow, updateConnectorLearningJob, updateInteractionStateFromMessage, updateRelationshipSettings, updateSessionConfig, updateSessionStats, updateUserProfile, upsertConnectorActionMetadata, upsertConnectorCatalogEntry, upsertConnectorConnection, upsertConnectorInstallation, upsertConnectorSyncPolicy, upsertKnowledgeSourceItems, upsertMemoryRecord, upsertNoteAgentContextRecord, upsertNoteRecord, validateLatestSessionTurnTarget };
|