@xopcai/xopc 0.0.248 → 0.0.250
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-etpmyV7S.js → activity-store-DfBjTSo9.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BmKxSM1k.js → agent-avatar-dicebear-BN6FJXkJ.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-C7rZH1A2.js +1 -0
- package/dist/gateway/static/root/assets/agents-CgGaoo4z.js +1 -0
- package/dist/gateway/static/root/assets/{api-B0-hLuZ1.js → api-zxpcJfgj.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-D2gMshuS.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-wMu0jSKx.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-KF1Gnv36.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BnMSgZvR.js → archive-plugin-u6EE3JV8.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CejsQMev.js → attachment-load-DbJurnv-.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-RC8EyoAf.js → automations-page-Ew_e5HDn.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-Ch-ldu35.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DGjppLSG.js → binary-plugins-DtDFNfPM.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CWdP4bUc.js → block-editor-CnAwmabq.js} +44 -44
- package/dist/gateway/static/root/assets/browser-settings-page-DtVhsHJW.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BQ1Ilw_o.js → browser-workflow-inputs-BX1-uM9L.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-CJh4NyxT.js → browser-workflows-page-CcbUOWDF.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel--sXeylhe.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-AXSBDujZ.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-Ohhee4vm.js → channels-status-swr-CX-yWwLD.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BOtoKTK3.js → chat-terminal-dock-CryTDNdD.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-HBHUWohz.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-DTj1V3Sw.js → cron-expression-ji5aWrjG.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-Yr6OCvGL.js → date-picker-Dro_w3eX.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-Ce19KKnX.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-DbGzggPF.js → desktop-pet-DsSi-3uZ.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-8WQ4woJy.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DgTtk4KC.js → extension-debug-page-CgvEBfLZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DtQeiP6f.js → extension-page-DkznBbMj.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BOjhchK2.js +1 -0
- package/dist/gateway/static/root/assets/files-BArWTfr7.js +1 -0
- package/dist/gateway/static/root/assets/gateway-config-api-OEruhhX3.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-DXuXtU1w.js → gateway-config-swr-CMNbl0FZ.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-BgH3A0LO.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CzBzglzQ.js → gateway-startup-retry-CR7Xg8As.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-C97naDkO.js +1 -0
- package/dist/gateway/static/root/assets/home-page-BBKKme4G.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-TIgsn04n.js → image-generation-api-C5mn73ca.js} +1 -1
- package/dist/gateway/static/root/assets/index-BcaF-dgQ.js +72 -0
- package/dist/gateway/static/root/assets/index-DAryGvZ7.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-wsWuoa8p.js → keyboard-shortcuts-settings-BYhfzsqe.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DNncc2tn.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CXrbrGo8.js → local-apps-page-vBlknU7C.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BJFLQY8O.js → locale-store-CF4erhjB.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CizZInrT.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-BdJZFR7U.js → management-settings-Dnx6mSNe.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-NK3ACVG2.js → markdown-split-DtBtcHWi.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DTF9v1gg.js → markdown-view-CQvzsE24.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-F0jcUxyl.js → media-plugins-DrMYeHe7.js} +1 -1
- package/dist/gateway/static/root/assets/messages-Cf5hpZE6.js +3 -0
- package/dist/gateway/static/root/assets/mobile-pairing-wizard-AKgGy3Kx.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-Bw3jD9Jf.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-Dpqq7Z-J.js +8 -0
- package/dist/gateway/static/root/assets/page-tabs-CX9T71by.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-DvEHoimN.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-CxGGlWA8.js → product-open-page-COcr_NUJ.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BuT6MCTs.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DXWMxOjf.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CIsNlSBi.js → registry-api-BsRBlji7.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-7rBCUWzZ.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-YkjhiQfA.js → runtime-tools-settings-panel-CQ13P-mS.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-oFGf3G3s.js → schema-form-BUVyTpZj.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-gmEOYNb4.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DYYoJcl7.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-DVY-8_B9.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-C7VWs0IT.js → settings-page-CdiVYyTl.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BhenBnUj.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-t5oz18rh.js → share-preview-page-C88YLKm4.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-Dq7xIj0_.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-MDI9Lz6z.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DLir1nM0.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-DEDTYs2W.js → skills-page.utils-BMZAfS3G.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-BM8ivYan.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-P0_RldWv.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-O597U8q_.js → theme-store-BOgkc_9D.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-DemxChjo.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-B5eUJ6Zq.js → use-autosave-CV3Ui5hu.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-CxfnoRVn.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-CMKSwz4C.js → voice-api-key-field-CUoCi4Sq.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-q7B6fOFB.js → voice-config-api-C-ryeIxj.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-BhDlkCMB.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DZmvLZjb.js → workflow-run-setup-panel-D8CcPc_C.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Bxn2Dc16.js +5 -0
- package/dist/gateway/static/root/index.html +11 -27
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/user-message-display.js +18 -0
- package/dist/src/agent/agent-instance-gateway.d.ts +3 -3
- package/dist/src/agent/agent-manager.d.ts +13 -13
- package/dist/src/agent/agent-manager.js +76 -42
- package/dist/src/agent/background-review/coordinator.d.ts +2 -4
- package/dist/src/agent/background-review/coordinator.js +5 -30
- package/dist/src/agent/background-review/prompts.d.ts +4 -2
- package/dist/src/agent/background-review/prompts.js +33 -19
- package/dist/src/agent/background-review/run-background-review.d.ts +6 -7
- package/dist/src/agent/background-review/run-background-review.js +47 -41
- package/dist/src/agent/background-review/settings.d.ts +0 -1
- package/dist/src/agent/background-review/settings.js +6 -7
- package/dist/src/agent/context/audit.d.ts +38 -0
- package/dist/src/agent/context/audit.js +123 -0
- package/dist/src/agent/context/coordinator.d.ts +31 -0
- package/dist/src/agent/context/coordinator.js +73 -0
- package/dist/src/agent/context/execution-context.d.ts +13 -0
- package/dist/src/agent/context/execution-context.js +211 -0
- package/dist/src/agent/context/execution-context.types.d.ts +50 -0
- package/dist/src/agent/context/execution-scope.d.ts +5 -1
- package/dist/src/agent/context/execution-scope.js +6 -2
- package/dist/src/agent/context/prepend.d.ts +2 -0
- package/dist/src/agent/context/prepend.js +28 -0
- package/dist/src/agent/context/project-context.d.ts +6 -3
- package/dist/src/agent/context/project-context.js +28 -23
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -0
- package/dist/src/agent/embedded/run-turn.js +22 -2
- package/dist/src/agent/embedded/types.d.ts +1 -25
- package/dist/src/agent/external-tools/composio-provider.js +87 -92
- package/dist/src/agent/external-tools/gateway-tools.d.ts +4 -1
- package/dist/src/agent/external-tools/gateway-tools.js +153 -41
- package/dist/src/agent/external-tools/index.d.ts +1 -0
- package/dist/src/agent/external-tools/index.js +2 -1
- package/dist/src/agent/external-tools/memory-provider.d.ts +1 -0
- package/dist/src/agent/external-tools/memory-provider.js +1 -0
- package/dist/src/agent/external-tools/search-error.d.ts +12 -0
- package/dist/src/agent/external-tools/search-error.js +29 -0
- package/dist/src/agent/external-tools/service.d.ts +4 -0
- package/dist/src/agent/external-tools/service.js +22 -2
- package/dist/src/agent/inbound/attachment-pipeline.js +5 -1
- package/dist/src/agent/memory/compaction-policy.js +1 -1
- package/dist/src/agent/memory/compaction-promotion.d.ts +1 -0
- package/dist/src/agent/memory/compaction-promotion.js +52 -79
- package/dist/src/agent/memory/create-memory-manager.js +1 -3
- package/dist/src/agent/memory/index.d.ts +1 -6
- package/dist/src/agent/memory/index.js +3 -6
- package/dist/src/agent/memory/manager.d.ts +0 -16
- package/dist/src/agent/memory/manager.js +11 -40
- package/dist/src/agent/memory/memory-config.d.ts +0 -5
- package/dist/src/agent/memory/memory-config.js +2 -9
- package/dist/src/agent/memory/runtime.d.ts +2 -2
- package/dist/src/agent/memory/runtime.js +9 -19
- package/dist/src/agent/memory/types.d.ts +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +13 -21
- package/dist/src/agent/orchestration/context-overflow.js +1 -0
- package/dist/src/agent/prompt/sections/memory-skills.js +25 -36
- package/dist/src/agent/prompt/sections/tooling.js +10 -4
- package/dist/src/agent/prompt/service-prompt-builder.js +4 -3
- package/dist/src/agent/service/direct-turn-helpers.d.ts +2 -2
- package/dist/src/agent/service/direct-turn-helpers.js +8 -25
- package/dist/src/agent/service/process-direct-streaming.js +8 -7
- package/dist/src/agent/service.js +4 -3
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/clarify-tool.d.ts +1 -0
- package/dist/src/agent/tools/delegate-tool.js +5 -2
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +68 -21
- package/dist/src/agent/tools/index.d.ts +3 -2
- package/dist/src/agent/tools/index.js +4 -3
- package/dist/src/agent/tools/knowledge-memory-tool.d.ts +15 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +184 -0
- package/dist/src/agent/tools/{dreaming-tool.d.ts → memory-maintenance-tool.d.ts} +2 -2
- package/dist/src/agent/tools/memory-maintenance-tool.js +31 -0
- package/dist/src/agent/tools/session-search-tool.d.ts +1 -0
- package/dist/src/agent/tools/session-search-tool.js +7 -0
- package/dist/src/agent/tools/user-context-tool.d.ts +10 -0
- package/dist/src/agent/tools/user-context-tool.js +98 -0
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/automations/service/automation-service.d.ts +2 -1
- package/dist/src/automations/service/automation-service.js +6 -2
- package/dist/src/chat-commands/builtins/understanding.js +24 -6
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/config/schema.d.ts +68 -75
- package/dist/src/config/schema.js +29 -18
- package/dist/src/config/web-patch.d.ts +1 -1
- package/dist/src/connectors/auth-provider-registry.js +1 -1
- package/dist/src/connectors/composio-managed-client.js +6 -2
- package/dist/src/connectors/connected-source-ingestion.js +1 -1
- package/dist/src/connectors/connected-source-understanding.d.ts +1 -3
- package/dist/src/connectors/connected-source-understanding.js +86 -99
- package/dist/src/connectors/connection-candidates.d.ts +11 -0
- package/dist/src/connectors/connection-candidates.js +58 -0
- package/dist/src/connectors/connection-capabilities.d.ts +4 -0
- package/dist/src/connectors/connection-capabilities.js +37 -0
- package/dist/src/connectors/connection-recovery-service.d.ts +43 -0
- package/dist/src/connectors/connection-recovery-service.js +420 -0
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/connectors/learning-coordinator.d.ts +0 -2
- package/dist/src/connectors/learning-coordinator.js +6 -7
- package/dist/src/connectors/principal.d.ts +5 -0
- package/dist/src/connectors/principal.js +18 -0
- package/dist/src/files/file-service.js +4 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +28 -10
- package/dist/src/gateway/agent-builtin-tools.js +30 -9
- package/dist/src/gateway/chat-stream/mapper.js +1 -28
- package/dist/src/gateway/chat-stream/protocol.d.ts +2 -24
- package/dist/src/gateway/clarify-bridge.d.ts +4 -0
- package/dist/src/gateway/clarify-bridge.js +9 -4
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +52 -30
- package/dist/src/gateway/hono/lib/config-payload.js +4 -4
- package/dist/src/gateway/hono/middleware/auth.js +1 -2
- package/dist/src/gateway/hono/routes/capabilities.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.d.ts +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +72 -28
- package/dist/src/gateway/hono/routes/connection-waits.d.ts +3 -0
- package/dist/src/gateway/hono/routes/connection-waits.js +58 -0
- package/dist/src/gateway/hono/routes/connectors.js +24 -18
- package/dist/src/gateway/hono/routes/context-sources.d.ts +4 -0
- package/dist/src/gateway/hono/routes/context-sources.js +159 -0
- package/dist/src/gateway/hono/routes/files.js +23 -2
- package/dist/src/gateway/hono/routes/index.js +4 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +9 -4
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +22 -7
- package/dist/src/gateway/hono/routes/projects.js +36 -44
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +15 -1
- package/dist/src/gateway/hono/routes/side-chats.js +13 -2
- package/dist/src/gateway/hono/routes/tasks.js +3 -3
- package/dist/src/gateway/hono/routes/user-model.d.ts +3 -0
- package/dist/src/gateway/hono/routes/user-model.js +480 -0
- package/dist/src/gateway/memory-maintenance-automation-reconciler.d.ts +11 -0
- package/dist/src/gateway/memory-maintenance-automation-reconciler.js +72 -0
- package/dist/src/gateway/security/gateway-scopes.js +2 -0
- package/dist/src/gateway/service/agent-runner.d.ts +9 -1
- package/dist/src/gateway/service/agent-runner.js +25 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +2 -2
- package/dist/src/gateway/service/config-coordinator.js +4 -4
- package/dist/src/gateway/service/run-gateway-agent.d.ts +1 -0
- package/dist/src/gateway/service/run-gateway-agent.js +18 -14
- package/dist/src/gateway/service/session-input-coordinator.d.ts +3 -0
- package/dist/src/gateway/service/session-input-coordinator.js +12 -2
- package/dist/src/gateway/service.d.ts +3 -1
- package/dist/src/gateway/service.js +52 -17
- package/dist/src/gateway/side-chat/manager.d.ts +16 -3
- package/dist/src/gateway/side-chat/manager.js +117 -28
- package/dist/src/gateway/side-chat/run-service.d.ts +2 -0
- package/dist/src/gateway/side-chat/run-service.js +28 -5
- package/dist/src/gateway/side-chat/types.d.ts +9 -1
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/knowledge/connected-knowledge-pipeline.d.ts +0 -2
- package/dist/src/knowledge/connected-knowledge-pipeline.js +46 -217
- package/dist/src/knowledge-memory/domain.d.ts +36 -0
- package/dist/src/knowledge-memory/index.d.ts +2 -0
- package/dist/src/knowledge-memory/index.js +2 -0
- package/dist/src/knowledge-memory/repository.d.ts +48 -0
- package/dist/src/knowledge-memory/repository.js +168 -0
- package/dist/src/memory-maintenance/index.d.ts +2 -0
- package/dist/src/memory-maintenance/index.js +3 -0
- package/dist/src/memory-maintenance/schedule.d.ts +13 -0
- package/dist/src/memory-maintenance/schedule.js +51 -0
- package/dist/src/memory-maintenance/service.d.ts +28 -0
- package/dist/src/memory-maintenance/service.js +216 -0
- package/dist/src/notes/service.d.ts +1 -0
- package/dist/src/notes/service.js +7 -1
- package/dist/src/notes/types.d.ts +16 -0
- package/dist/src/notifications/planner.js +7 -3
- package/dist/src/proactive/actions/service.d.ts +0 -1
- package/dist/src/proactive/actions/service.js +1 -10
- package/dist/src/proactive/execution/context.d.ts +8 -10
- package/dist/src/proactive/execution/context.js +93 -42
- package/dist/src/proactive/execution/insight.d.ts +4 -1
- package/dist/src/proactive/execution/insight.js +5 -2
- package/dist/src/proactive/execution/repository.d.ts +1 -0
- package/dist/src/proactive/execution/repository.js +9 -1
- package/dist/src/proactive/execution/types.d.ts +0 -1
- package/dist/src/proactive/execution/worker.js +7 -5
- package/dist/src/proactive/inbox/repository.js +8 -2
- package/dist/src/proactive/inbox/service.js +2 -2
- package/dist/src/proactive/inbox/types.d.ts +1 -0
- package/dist/src/proactive/inbox/worker.d.ts +1 -0
- package/dist/src/proactive/inbox/worker.js +7 -0
- package/dist/src/proactive/index.d.ts +2 -1
- package/dist/src/proactive/index.js +3 -2
- package/dist/src/proactive/maintenance.d.ts +4 -0
- package/dist/src/proactive/maintenance.js +21 -0
- package/dist/src/proactive/scenarios/repository.d.ts +1 -1
- package/dist/src/proactive/scenarios/repository.js +10 -3
- package/dist/src/proactive/scenarios/types.d.ts +7 -0
- package/dist/src/proactive/service.d.ts +7 -0
- package/dist/src/proactive/service.js +17 -1
- package/dist/src/projects/index.d.ts +1 -1
- package/dist/src/projects/index.js +2 -2
- package/dist/src/projects/knowledge-bind.d.ts +1 -0
- package/dist/src/projects/knowledge-bind.js +15 -0
- package/dist/src/projects/project-loop.d.ts +3 -3
- package/dist/src/projects/project-loop.js +4 -4
- package/dist/src/projects/project-service.d.ts +2 -1
- package/dist/src/projects/project-service.js +3 -2
- package/dist/src/projects/project-store.js +2 -1
- package/dist/src/realtime/runtime.js +1 -0
- package/dist/src/runtime-tools/manager.js +1 -1
- package/dist/src/session/index.js +1 -1
- package/dist/src/session/store.js +5 -2
- package/dist/src/storage/sqlite/collaboration-rule-repository.d.ts +19 -0
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +54 -0
- package/dist/src/storage/sqlite/config-repository.js +1 -1
- package/dist/src/storage/sqlite/connection-wait-repository.d.ts +30 -0
- package/dist/src/storage/sqlite/connection-wait-repository.js +338 -0
- package/dist/src/storage/sqlite/connector-account-repository.js +1 -1
- package/dist/src/storage/sqlite/context-evidence-repository.d.ts +24 -0
- package/dist/src/storage/sqlite/context-evidence-repository.js +52 -0
- package/dist/src/storage/sqlite/index.d.ts +3 -5
- package/dist/src/storage/sqlite/index.js +6 -8
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +0 -19
- package/dist/src/storage/sqlite/knowledge-repository.js +1 -90
- package/dist/src/storage/sqlite/migrations/148_user_model_foundation.sql +554 -0
- package/dist/src/storage/sqlite/migrations/149_separate_source_index_from_memory.sql +18 -0
- package/dist/src/storage/sqlite/migrations/150_session_connection_waits.sql +47 -0
- package/dist/src/storage/sqlite/migrations/151_proactive_scope_cleanup.sql +6 -0
- package/dist/src/storage/sqlite/migrations/152_proactive_scenario_contract.sql +140 -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/notes-repository.d.ts +2 -1
- package/dist/src/storage/sqlite/notes-repository.js +37 -3
- package/dist/src/storage/sqlite/row-mappers.js +2 -2
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.d.ts +14 -2
- package/dist/src/storage/sqlite/session-input-repository.js +17 -14
- package/dist/src/storage/sqlite/session-instance-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/session-instance-repository.js +6 -0
- package/dist/src/storage/sqlite/session-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-repository.js +7 -6
- package/dist/src/storage/sqlite/transcript-repository.js +3 -2
- package/dist/src/tasks/home-query-service.js +35 -13
- package/dist/src/tasks/index.js +2 -2
- package/dist/src/tasks/project-monitoring-service.d.ts +2 -0
- package/dist/src/tasks/project-monitoring-service.js +4 -1
- package/dist/src/tasks/project-operating-view-service.js +1 -1
- package/dist/src/tasks/task-application-service.js +6 -1
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-context-repository.d.ts +0 -1
- package/dist/src/tasks/task-context-repository.js +1 -1
- package/dist/src/tasks/task-deletion-service.js +1 -1
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-read-model-projector.js +1 -1
- package/dist/src/tasks/task-run-coordinator.js +1 -1
- package/dist/src/tasks/task-run-dispatcher.js +1 -1
- package/dist/src/tasks/task-run-repository.js +1 -0
- package/dist/src/tasks/task-signal-service.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tool-summary.js +2 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/user-context/access-policy.d.ts +11 -0
- package/dist/src/user-context/access-policy.js +26 -0
- package/dist/src/user-context/changes.d.ts +1 -1
- package/dist/src/user-context/config.d.ts +135 -153
- package/dist/src/user-context/config.js +94 -99
- package/dist/src/user-context/relationship-continuity.d.ts +2 -2
- package/dist/src/user-context/relationship-continuity.js +34 -24
- package/dist/src/user-context/sources/activity-clustering.d.ts +9 -3
- package/dist/src/user-context/sources/index.js +2 -2
- package/dist/src/user-context/sources/repository.d.ts +1 -21
- package/dist/src/user-context/sources/repository.js +1 -183
- package/dist/src/user-context/sources/types.d.ts +0 -23
- package/dist/src/user-model/capture/executor.d.ts +50 -0
- package/dist/src/user-model/capture/executor.js +230 -0
- package/dist/src/user-model/capture/index.d.ts +2 -0
- package/dist/src/user-model/capture/index.js +3 -0
- package/dist/src/user-model/capture/semantic.d.ts +39 -0
- package/dist/src/user-model/capture/semantic.js +263 -0
- package/dist/src/user-model/domain.d.ts +93 -0
- package/dist/src/user-model/domain.js +33 -0
- package/dist/src/user-model/goals.d.ts +62 -0
- package/dist/src/user-model/goals.js +91 -0
- package/dist/src/user-model/importance.d.ts +11 -0
- package/dist/src/user-model/importance.js +17 -0
- package/dist/src/user-model/index.d.ts +5 -0
- package/dist/src/user-model/index.js +6 -0
- package/dist/src/user-model/repository.d.ts +23 -0
- package/dist/src/user-model/repository.js +268 -0
- package/dist/src/user-model/temporal.d.ts +10 -0
- package/dist/src/user-model/temporal.js +44 -0
- package/dist/src/voice/realtime/memory-context.d.ts +7 -2
- package/dist/src/voice/realtime/memory-context.js +39 -51
- package/dist/src/work-discovery/service.d.ts +3 -14
- package/dist/src/work-discovery/service.js +138 -99
- package/dist/src/work-discovery/types.d.ts +3 -3
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/dist/src/workflows/service/workflow-session-bridge.js +12 -20
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CUXApfcE.js +0 -1
- package/dist/gateway/static/root/assets/agents-DNq_GKuc.js +0 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-qfwAgyhQ.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-DqQVUpCC.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-dwIqYmXk.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-SkdcSZ0i.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CKCa6TvG.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DSp--zIZ.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-CMd2dDrI.js +0 -1
- package/dist/gateway/static/root/assets/cloud-C4-yfnnk.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-udWs5Kdm.js +0 -2
- package/dist/gateway/static/root/assets/dependency-picker-DpN3XZg9.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-DinCToZh.js +0 -1
- package/dist/gateway/static/root/assets/ellipsis-0k4rZLoy.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-DcguCgsH.js +0 -1
- package/dist/gateway/static/root/assets/eye-CABVeTq0.js +0 -1
- package/dist/gateway/static/root/assets/eye-off-DEAzt3g1.js +0 -1
- package/dist/gateway/static/root/assets/files-D6vf3S30.js +0 -1
- package/dist/gateway/static/root/assets/folder-open-CyzJ19I9.js +0 -1
- package/dist/gateway/static/root/assets/form-field-width-DJw_jULe.js +0 -1
- package/dist/gateway/static/root/assets/gateway-config-api-Br7lSf6H.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CdPoDMuj.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DHk1hawP.js +0 -1
- package/dist/gateway/static/root/assets/home-page-YGipe_W6.js +0 -1
- package/dist/gateway/static/root/assets/index-D5TQQpeb.js +0 -71
- package/dist/gateway/static/root/assets/index-DReBaaTX.css +0 -2
- package/dist/gateway/static/root/assets/interaction-BmQogeqz.js +0 -1
- package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +0 -1
- package/dist/gateway/static/root/assets/link-2-D_ZKYUW7.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CpyvYyrb.js +0 -2
- package/dist/gateway/static/root/assets/local-context-graph-BjUf7fQ9.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-CXKy6E_l.js +0 -2
- package/dist/gateway/static/root/assets/message-square-plus-XP0tGdlV.js +0 -1
- package/dist/gateway/static/root/assets/messages-CHNYp8EQ.js +0 -3
- package/dist/gateway/static/root/assets/minimize-2-DtOGrlpo.js +0 -1
- package/dist/gateway/static/root/assets/mobile-pairing-wizard-3NKCniSp.js +0 -1
- package/dist/gateway/static/root/assets/models-hub-cache-nCfkBN8M.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-DuqLahi6.js +0 -1
- package/dist/gateway/static/root/assets/notes-workbench-C7j9EdQk.js +0 -5
- package/dist/gateway/static/root/assets/oauth-api-8lP_qJpq.js +0 -1
- package/dist/gateway/static/root/assets/oauth-authorization-window-Cdolr2wE.js +0 -1
- package/dist/gateway/static/root/assets/page-tabs-BaEQMYm_.js +0 -1
- package/dist/gateway/static/root/assets/pencil-DmIY3Oa-.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-CsNVTKC0.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CfebYVX0.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-48GvzSVa.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-64xj_s2m.js +0 -1
- package/dist/gateway/static/root/assets/rotate-cw-LIg3Am9S.js +0 -1
- package/dist/gateway/static/root/assets/search-DA7gz22f.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CcwcdRN8.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BaN84CyW.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-DjWzRk4z.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DVVOCNbr.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DUYbYLi7.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BGyD0gB9.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-CjF8DTsN.js +0 -2
- package/dist/gateway/static/root/assets/system-settings-panel-BSYuRgFI.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-YZYSTJH7.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-FKUi9wDL.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-BCyiduKd.js +0 -2
- package/dist/gateway/static/root/assets/work-discovery-overlay-jhT2EzeH.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-DQC0TpMa.js +0 -5
- package/dist/src/agent/memory/builtin-provider.d.ts +0 -37
- package/dist/src/agent/memory/builtin-provider.js +0 -225
- package/dist/src/agent/memory/context/types.d.ts +0 -40
- package/dist/src/agent/memory/understanding/quality.d.ts +0 -8
- package/dist/src/agent/memory/understanding/quality.js +0 -18
- package/dist/src/agent/memory/understanding/service.d.ts +0 -19
- package/dist/src/agent/memory/understanding/service.js +0 -209
- package/dist/src/agent/memory/understanding/types.d.ts +0 -34
- package/dist/src/agent/memory/user-context-coordinator.d.ts +0 -23
- package/dist/src/agent/memory/user-context-coordinator.js +0 -113
- package/dist/src/agent/tools/dreaming-tool.js +0 -37
- package/dist/src/agent/tools/memory-tool.d.ts +0 -9
- package/dist/src/agent/tools/memory-tool.js +0 -119
- package/dist/src/gateway/dreaming-automation-reconciler.d.ts +0 -11
- package/dist/src/gateway/dreaming-automation-reconciler.js +0 -63
- package/dist/src/gateway/hono/routes/understanding-sources.d.ts +0 -21
- package/dist/src/gateway/hono/routes/understanding-sources.js +0 -387
- package/dist/src/gateway/hono/routes/you.d.ts +0 -3
- package/dist/src/gateway/hono/routes/you.js +0 -457
- package/dist/src/projects/memory-bind.d.ts +0 -1
- package/dist/src/projects/memory-bind.js +0 -14
- package/dist/src/storage/sqlite/context-consolidation-repository.d.ts +0 -37
- package/dist/src/storage/sqlite/context-consolidation-repository.js +0 -64
- package/dist/src/storage/sqlite/memory-records-repository.d.ts +0 -217
- package/dist/src/storage/sqlite/memory-records-repository.js +0 -715
- package/dist/src/storage/sqlite/remote-context-repository.d.ts +0 -3
- package/dist/src/storage/sqlite/remote-context-repository.js +0 -40
- package/dist/src/storage/sqlite/understanding-focus-exclusions.d.ts +0 -2
- package/dist/src/storage/sqlite/understanding-focus-exclusions.js +0 -24
- package/dist/src/storage/sqlite/user-context-quality-repository.d.ts +0 -49
- package/dist/src/storage/sqlite/user-context-quality-repository.js +0 -118
- package/dist/src/storage/sqlite/user-context-repository.d.ts +0 -85
- package/dist/src/storage/sqlite/user-context-repository.js +0 -535
- package/dist/src/user-context/automatic-context.d.ts +0 -17
- package/dist/src/user-context/automatic-context.js +0 -85
- package/dist/src/user-context/consolidation.d.ts +0 -27
- package/dist/src/user-context/consolidation.js +0 -187
- package/dist/src/user-context/context-objects.d.ts +0 -17
- package/dist/src/user-context/context-objects.js +0 -99
- package/dist/src/user-context/evaluation/harness.d.ts +0 -13
- package/dist/src/user-context/evaluation/harness.js +0 -31
- package/dist/src/user-context/extraction/executor.d.ts +0 -22
- package/dist/src/user-context/extraction/executor.js +0 -142
- package/dist/src/user-context/extraction/repair.d.ts +0 -19
- package/dist/src/user-context/extraction/repair.js +0 -71
- package/dist/src/user-context/extraction/semantic.d.ts +0 -18
- package/dist/src/user-context/extraction/semantic.js +0 -148
- package/dist/src/user-context/focus-lifecycle.d.ts +0 -2
- package/dist/src/user-context/focus-lifecycle.js +0 -26
- package/dist/src/user-context/manual-understanding.d.ts +0 -12
- package/dist/src/user-context/manual-understanding.js +0 -37
- package/dist/src/user-context/planner.d.ts +0 -17
- package/dist/src/user-context/planner.js +0 -465
- package/dist/src/user-context/relationships/indexer.d.ts +0 -13
- package/dist/src/user-context/relationships/indexer.js +0 -185
- package/dist/src/user-context/relationships/service.d.ts +0 -22
- package/dist/src/user-context/relationships/service.js +0 -50
- package/dist/src/user-context/retriever.d.ts +0 -15
- package/dist/src/user-context/retriever.js +0 -124
- package/dist/src/user-context/scope.d.ts +0 -7
- package/dist/src/user-context/scope.js +0 -9
- package/dist/src/user-context/selection-policy.d.ts +0 -20
- package/dist/src/user-context/selection-policy.js +0 -33
- package/dist/src/user-context/understanding.d.ts +0 -15
- package/dist/src/user-context/understanding.js +0 -24
- package/dist/src/user-context/understandingQuality.d.ts +0 -5
- package/dist/src/user-context/understandingQuality.js +0 -48
- /package/dist/src/agent/{memory/context/types.js → context/execution-context.types.js} +0 -0
- /package/dist/src/{agent/memory/understanding/types.js → knowledge-memory/domain.js} +0 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { getKnowledgeItem, knowledgeSourceAllowed, searchKnowledgeItems, writeKnowledgeItem } from "../../knowledge-memory/repository.js";
|
|
2
|
+
import "../../knowledge-memory/index.js";
|
|
3
|
+
import { Type } from "@sinclair/typebox";
|
|
4
|
+
//#region src/agent/tools/knowledge-memory-tool.ts
|
|
5
|
+
const SearchSchema = Type.Object({
|
|
6
|
+
query: Type.String(),
|
|
7
|
+
maxResults: Type.Optional(Type.Integer({
|
|
8
|
+
minimum: 1,
|
|
9
|
+
maximum: 50
|
|
10
|
+
}))
|
|
11
|
+
});
|
|
12
|
+
const GetSchema = Type.Object({ id: Type.String() });
|
|
13
|
+
const WriteSchema = Type.Object({
|
|
14
|
+
kind: Type.Union([
|
|
15
|
+
Type.Literal("project_fact"),
|
|
16
|
+
Type.Literal("workspace_fact"),
|
|
17
|
+
Type.Literal("decision"),
|
|
18
|
+
Type.Literal("task_lesson"),
|
|
19
|
+
Type.Literal("commitment"),
|
|
20
|
+
Type.Literal("open_question"),
|
|
21
|
+
Type.Literal("episode"),
|
|
22
|
+
Type.Literal("note")
|
|
23
|
+
]),
|
|
24
|
+
content: Type.String(),
|
|
25
|
+
canonicalKey: Type.String(),
|
|
26
|
+
scope: Type.Union([
|
|
27
|
+
Type.Literal("workspace"),
|
|
28
|
+
Type.Literal("project"),
|
|
29
|
+
Type.Literal("session")
|
|
30
|
+
]),
|
|
31
|
+
importance: Type.Optional(Type.Number({
|
|
32
|
+
minimum: 0,
|
|
33
|
+
maximum: 1
|
|
34
|
+
}))
|
|
35
|
+
});
|
|
36
|
+
function visibility(options) {
|
|
37
|
+
const projectId = options.getProjectId?.();
|
|
38
|
+
return {
|
|
39
|
+
agentId: options.agentId,
|
|
40
|
+
workspaceId: options.workspaceId,
|
|
41
|
+
sessionId: options.getSessionId() ?? "",
|
|
42
|
+
...projectId ? { projectId } : {}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function createKnowledgeSearchTool(options) {
|
|
46
|
+
return {
|
|
47
|
+
name: "knowledge_search",
|
|
48
|
+
label: "Knowledge Search",
|
|
49
|
+
description: "Search project, workspace, and session knowledge for prior decisions, facts, lessons, and commitments.",
|
|
50
|
+
parameters: SearchSchema,
|
|
51
|
+
async execute(_toolCallId, raw) {
|
|
52
|
+
if (!options.canRead()) return {
|
|
53
|
+
content: [{
|
|
54
|
+
type: "text",
|
|
55
|
+
text: "Knowledge memory is disabled for this session."
|
|
56
|
+
}],
|
|
57
|
+
details: { error: "knowledge_memory_disabled" }
|
|
58
|
+
};
|
|
59
|
+
const input = raw;
|
|
60
|
+
const results = searchKnowledgeItems({
|
|
61
|
+
query: input.query,
|
|
62
|
+
context: visibility(options),
|
|
63
|
+
sources: options.getSources(),
|
|
64
|
+
limit: input.maxResults ?? 12
|
|
65
|
+
});
|
|
66
|
+
return {
|
|
67
|
+
content: [{
|
|
68
|
+
type: "text",
|
|
69
|
+
text: JSON.stringify({ results }, null, 2)
|
|
70
|
+
}],
|
|
71
|
+
details: { results }
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function visibleItem(options, item) {
|
|
77
|
+
return item.scope.type === "global" || item.scope.type === "agent" && item.scope.id === options.agentId || item.scope.type === "workspace" && item.scope.id === options.workspaceId || item.scope.type === "project" && item.scope.id === options.getProjectId?.() || item.scope.type === "session" && item.scope.id === options.getSessionId();
|
|
78
|
+
}
|
|
79
|
+
function createKnowledgeGetTool(options) {
|
|
80
|
+
return {
|
|
81
|
+
name: "knowledge_get",
|
|
82
|
+
label: "Knowledge Get",
|
|
83
|
+
description: "Read one knowledge item returned by knowledge_search.",
|
|
84
|
+
parameters: GetSchema,
|
|
85
|
+
async execute(_toolCallId, raw) {
|
|
86
|
+
if (!options.canRead()) return {
|
|
87
|
+
content: [{
|
|
88
|
+
type: "text",
|
|
89
|
+
text: "Knowledge memory is disabled for this session."
|
|
90
|
+
}],
|
|
91
|
+
details: { error: "knowledge_memory_disabled" }
|
|
92
|
+
};
|
|
93
|
+
const id = raw.id;
|
|
94
|
+
const item = getKnowledgeItem(id);
|
|
95
|
+
return item && visibleItem(options, item) && knowledgeSourceAllowed(item, options.getSources()) ? {
|
|
96
|
+
content: [{
|
|
97
|
+
type: "text",
|
|
98
|
+
text: JSON.stringify(item, null, 2)
|
|
99
|
+
}],
|
|
100
|
+
details: { item }
|
|
101
|
+
} : {
|
|
102
|
+
content: [{
|
|
103
|
+
type: "text",
|
|
104
|
+
text: `Knowledge item not found: ${id}`
|
|
105
|
+
}],
|
|
106
|
+
details: { id }
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function createKnowledgeWriteTool(options) {
|
|
112
|
+
return {
|
|
113
|
+
name: "knowledge_write",
|
|
114
|
+
label: "Knowledge Write",
|
|
115
|
+
description: "Store scoped knowledge with provenance, subject to the configured write policy.",
|
|
116
|
+
parameters: WriteSchema,
|
|
117
|
+
async execute(_toolCallId, raw) {
|
|
118
|
+
if (!options.canWrite()) return {
|
|
119
|
+
content: [{
|
|
120
|
+
type: "text",
|
|
121
|
+
text: "Knowledge memory writes are disabled for this session."
|
|
122
|
+
}],
|
|
123
|
+
details: { error: "knowledge_memory_disabled" }
|
|
124
|
+
};
|
|
125
|
+
const writePolicy = options.getWritePolicy();
|
|
126
|
+
if (writePolicy === "deny") return {
|
|
127
|
+
content: [{
|
|
128
|
+
type: "text",
|
|
129
|
+
text: "Knowledge memory writes are denied by policy."
|
|
130
|
+
}],
|
|
131
|
+
details: { error: "knowledge_write_denied" }
|
|
132
|
+
};
|
|
133
|
+
const input = raw;
|
|
134
|
+
if (!options.getSources().includes(input.scope)) return {
|
|
135
|
+
content: [{
|
|
136
|
+
type: "text",
|
|
137
|
+
text: `Knowledge source is disabled: ${input.scope}`
|
|
138
|
+
}],
|
|
139
|
+
details: {
|
|
140
|
+
error: "knowledge_source_disabled",
|
|
141
|
+
source: input.scope
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
const sessionId = options.getSessionId();
|
|
145
|
+
if (input.scope === "session" && !sessionId) throw new Error("A current session is required for session knowledge.");
|
|
146
|
+
const projectId = options.getProjectId?.();
|
|
147
|
+
if (input.scope === "project" && !projectId) throw new Error("A current project is required for project knowledge.");
|
|
148
|
+
const details = {
|
|
149
|
+
...writeKnowledgeItem({
|
|
150
|
+
kind: input.kind,
|
|
151
|
+
scope: input.scope === "workspace" ? {
|
|
152
|
+
type: "workspace",
|
|
153
|
+
id: options.workspaceId
|
|
154
|
+
} : input.scope === "project" ? {
|
|
155
|
+
type: "project",
|
|
156
|
+
id: projectId
|
|
157
|
+
} : {
|
|
158
|
+
type: "session",
|
|
159
|
+
id: sessionId
|
|
160
|
+
},
|
|
161
|
+
content: input.content,
|
|
162
|
+
canonicalKey: input.canonicalKey,
|
|
163
|
+
status: writePolicy === "allow" ? "active" : "candidate",
|
|
164
|
+
confidence: .7,
|
|
165
|
+
importance: input.importance ?? .5,
|
|
166
|
+
originClass: "agent",
|
|
167
|
+
sourceAgentId: options.agentId,
|
|
168
|
+
...sessionId ? { sourceSessionId: sessionId } : {},
|
|
169
|
+
source: { tool: "knowledge_write" }
|
|
170
|
+
}),
|
|
171
|
+
writePolicy
|
|
172
|
+
};
|
|
173
|
+
return {
|
|
174
|
+
content: [{
|
|
175
|
+
type: "text",
|
|
176
|
+
text: JSON.stringify(details, null, 2)
|
|
177
|
+
}],
|
|
178
|
+
details
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
export { createKnowledgeGetTool, createKnowledgeSearchTool, createKnowledgeWriteTool };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { Config } from '../../config/schema.js';
|
|
3
|
-
export interface
|
|
3
|
+
export interface MemoryMaintenanceToolDeps {
|
|
4
4
|
getConfig: () => Config | undefined;
|
|
5
5
|
}
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function createMemoryMaintenanceTool(deps: MemoryMaintenanceToolDeps): AgentTool;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { resolveMemoryMaintenanceSchedules } from "../../memory-maintenance/schedule.js";
|
|
2
|
+
import { listMemoryMaintenanceRuns } from "../../memory-maintenance/service.js";
|
|
3
|
+
import "../../memory-maintenance/index.js";
|
|
4
|
+
import { Type } from "@sinclair/typebox";
|
|
5
|
+
//#region src/agent/tools/memory-maintenance-tool.ts
|
|
6
|
+
const StatusSchema = Type.Object({ action: Type.Literal("status") });
|
|
7
|
+
function createMemoryMaintenanceTool(deps) {
|
|
8
|
+
return {
|
|
9
|
+
name: "memory_maintenance",
|
|
10
|
+
label: "Memory maintenance",
|
|
11
|
+
description: "Show deterministic user-model and knowledge-memory maintenance schedules and runs.",
|
|
12
|
+
parameters: StatusSchema,
|
|
13
|
+
async execute() {
|
|
14
|
+
const config = deps.getConfig();
|
|
15
|
+
return {
|
|
16
|
+
content: [{
|
|
17
|
+
type: "text",
|
|
18
|
+
text: JSON.stringify({
|
|
19
|
+
enabled: Boolean(config && resolveMemoryMaintenanceSchedules(config).length),
|
|
20
|
+
schedules: config ? resolveMemoryMaintenanceSchedules(config) : [],
|
|
21
|
+
policy: "deterministic",
|
|
22
|
+
recentRuns: listMemoryMaintenanceRuns(20)
|
|
23
|
+
}, null, 2)
|
|
24
|
+
}],
|
|
25
|
+
details: {}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { createMemoryMaintenanceTool };
|
|
@@ -5,5 +5,6 @@ export interface SessionSearchToolDeps {
|
|
|
5
5
|
getSessionStore: () => SessionStore;
|
|
6
6
|
getPrimaryModel: () => Model<Api>;
|
|
7
7
|
getCurrentSessionKey?: () => string | undefined;
|
|
8
|
+
canAccess?: () => boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare function createSessionSearchTool(deps: SessionSearchToolDeps): AgentTool;
|
|
@@ -94,6 +94,13 @@ function createSessionSearchTool(deps) {
|
|
|
94
94
|
description: "Search other chat sessions by keywords and get short summaries, or omit `query` to list recent sessions (no LLM cost). Uses the same session store as the gateway. Narrow with roleFilter if needed.",
|
|
95
95
|
parameters: SessionSearchSchema,
|
|
96
96
|
async execute(_toolCallId, params, signal) {
|
|
97
|
+
if (deps.canAccess && !deps.canAccess()) return {
|
|
98
|
+
content: [{
|
|
99
|
+
type: "text",
|
|
100
|
+
text: "Cross-session history is disabled for this session."
|
|
101
|
+
}],
|
|
102
|
+
details: { error: "cross_session_history_disabled" }
|
|
103
|
+
};
|
|
97
104
|
const p = params;
|
|
98
105
|
const store = deps.getSessionStore();
|
|
99
106
|
const limit = Math.min(15, Math.max(1, p.limit ?? 5));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
|
+
export interface UserContextToolOptions {
|
|
3
|
+
agentId: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
getSessionId: () => string | undefined;
|
|
6
|
+
getProjectId?: () => string | undefined;
|
|
7
|
+
canRead: () => boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function createUserContextSearchTool(options: UserContextToolOptions): AgentTool;
|
|
10
|
+
export declare function createUserContextGetTool(options: UserContextToolOptions): AgentTool;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
2
|
+
import { getAssertionSlot, getUserAssertion, listUserAssertions } from "../../user-model/repository.js";
|
|
3
|
+
import "../../user-model/index.js";
|
|
4
|
+
import { Type } from "@sinclair/typebox";
|
|
5
|
+
//#region src/agent/tools/user-context-tool.ts
|
|
6
|
+
const SearchSchema = Type.Object({
|
|
7
|
+
query: Type.String(),
|
|
8
|
+
maxResults: Type.Optional(Type.Integer({
|
|
9
|
+
minimum: 1,
|
|
10
|
+
maximum: 50
|
|
11
|
+
}))
|
|
12
|
+
});
|
|
13
|
+
const GetSchema = Type.Object({ id: Type.String() });
|
|
14
|
+
function visible(options, slotId) {
|
|
15
|
+
const scope = getAssertionSlot(slotId)?.scope;
|
|
16
|
+
return scope?.type === "global" || scope?.type === "agent" && scope.id === options.agentId || scope?.type === "workspace" && scope.id === options.workspaceId || scope?.type === "project" && scope.id === options.getProjectId?.() || scope?.type === "session" && scope.id === options.getSessionId();
|
|
17
|
+
}
|
|
18
|
+
function referenceable(assertion) {
|
|
19
|
+
return assertion.status === "active" && assertion.authority !== "external_untrusted" && assertion.sensitivity !== "secret" && assertion.sensitivity !== "regulated" && assertion.disclosurePolicy !== "ask_before_reference";
|
|
20
|
+
}
|
|
21
|
+
function createUserContextSearchTool(options) {
|
|
22
|
+
return {
|
|
23
|
+
name: "user_context_search",
|
|
24
|
+
label: "User Context Search",
|
|
25
|
+
description: "Search typed user assertions such as identity, preferences, routines, and current state.",
|
|
26
|
+
parameters: SearchSchema,
|
|
27
|
+
async execute(_toolCallId, raw) {
|
|
28
|
+
if (!options.canRead()) return {
|
|
29
|
+
content: [{
|
|
30
|
+
type: "text",
|
|
31
|
+
text: "User context is disabled for this session."
|
|
32
|
+
}],
|
|
33
|
+
details: { error: "user_context_disabled" }
|
|
34
|
+
};
|
|
35
|
+
const input = raw;
|
|
36
|
+
const results = listUserAssertions({
|
|
37
|
+
statuses: ["active"],
|
|
38
|
+
limit: 1e3
|
|
39
|
+
}).filter((assertion) => visible(options, assertion.slotId)).filter(referenceable).map((assertion) => ({
|
|
40
|
+
assertion,
|
|
41
|
+
score: retrievalLexicalSimilarity(input.query, `${assertion.statement} ${assertion.normalizedValue}`)
|
|
42
|
+
})).filter((item) => item.score > 0).sort((left, right) => right.score - left.score).slice(0, input.maxResults ?? 12).map(({ assertion, score }) => ({
|
|
43
|
+
id: assertion.id,
|
|
44
|
+
kind: assertion.kind,
|
|
45
|
+
statement: assertion.statement,
|
|
46
|
+
status: assertion.status,
|
|
47
|
+
authority: assertion.authority,
|
|
48
|
+
score
|
|
49
|
+
}));
|
|
50
|
+
return {
|
|
51
|
+
content: [{
|
|
52
|
+
type: "text",
|
|
53
|
+
text: JSON.stringify({ results }, null, 2)
|
|
54
|
+
}],
|
|
55
|
+
details: { results }
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function createUserContextGetTool(options) {
|
|
61
|
+
return {
|
|
62
|
+
name: "user_context_get",
|
|
63
|
+
label: "User Context Get",
|
|
64
|
+
description: "Read one typed user assertion and its subject, predicate, and scope.",
|
|
65
|
+
parameters: GetSchema,
|
|
66
|
+
async execute(_toolCallId, raw) {
|
|
67
|
+
if (!options.canRead()) return {
|
|
68
|
+
content: [{
|
|
69
|
+
type: "text",
|
|
70
|
+
text: "User context is disabled for this session."
|
|
71
|
+
}],
|
|
72
|
+
details: { error: "user_context_disabled" }
|
|
73
|
+
};
|
|
74
|
+
const id = raw.id;
|
|
75
|
+
const assertion = getUserAssertion(id);
|
|
76
|
+
if (!assertion || !visible(options, assertion.slotId) || !referenceable(assertion)) return {
|
|
77
|
+
content: [{
|
|
78
|
+
type: "text",
|
|
79
|
+
text: `User assertion not found: ${id}`
|
|
80
|
+
}],
|
|
81
|
+
details: { id }
|
|
82
|
+
};
|
|
83
|
+
const result = {
|
|
84
|
+
assertion,
|
|
85
|
+
slot: getAssertionSlot(assertion.slotId)
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
content: [{
|
|
89
|
+
type: "text",
|
|
90
|
+
text: JSON.stringify(result, null, 2)
|
|
91
|
+
}],
|
|
92
|
+
details: result
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { createUserContextGetTool, createUserContextSearchTool };
|
|
@@ -2,14 +2,14 @@ import { runWithActivityContext } from "../../activity/context.js";
|
|
|
2
2
|
import { runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
3
3
|
import { TaskCommandSchema, TaskContextInputSchema } from "../../../packages/gateway-contract/src/tasks.js";
|
|
4
4
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
5
|
+
import { enqueueTaskChangedEvent } from "../../tasks/task-change-events.js";
|
|
6
|
+
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
5
7
|
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
6
8
|
import "../../storage/sqlite/index.js";
|
|
7
9
|
import { ObjectLinkService } from "../../activity/service.js";
|
|
8
10
|
import "../../activity/index.js";
|
|
9
11
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
10
12
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
11
|
-
import { enqueueTaskChangedEvent } from "../../tasks/task-change-events.js";
|
|
12
|
-
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
13
13
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
14
14
|
import { isValidProjectAgentId, normalizeProjectAgentId, resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
15
15
|
import "../../projects/index.js";
|
|
@@ -8,6 +8,7 @@ export declare class AutomationAlreadyRunningError extends Error {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class AutomationService {
|
|
10
10
|
private readonly signals?;
|
|
11
|
+
private readonly workspaceId;
|
|
11
12
|
private readonly executor;
|
|
12
13
|
private timer;
|
|
13
14
|
private stopped;
|
|
@@ -17,7 +18,7 @@ export declare class AutomationService {
|
|
|
17
18
|
private readonly activeRuns;
|
|
18
19
|
private readonly heartbeatTimers;
|
|
19
20
|
private readonly leaseOwner;
|
|
20
|
-
constructor(signals?: ProactiveSignalPublisher);
|
|
21
|
+
constructor(signals?: ProactiveSignalPublisher, workspaceId?: string);
|
|
21
22
|
setDeps(deps: AutomationDeps): void;
|
|
22
23
|
initialize(options?: {
|
|
23
24
|
maxConcurrentRuns?: number;
|
|
@@ -34,8 +34,9 @@ var AutomationService = class {
|
|
|
34
34
|
activeRuns = /* @__PURE__ */ new Map();
|
|
35
35
|
heartbeatTimers = /* @__PURE__ */ new Map();
|
|
36
36
|
leaseOwner = `automation-service:${process.pid}:${randomUUID()}`;
|
|
37
|
-
constructor(signals) {
|
|
37
|
+
constructor(signals, workspaceId = "default") {
|
|
38
38
|
this.signals = signals;
|
|
39
|
+
this.workspaceId = workspaceId;
|
|
39
40
|
}
|
|
40
41
|
setDeps(deps) {
|
|
41
42
|
this.deps = {
|
|
@@ -462,7 +463,10 @@ var AutomationService = class {
|
|
|
462
463
|
id: run.id
|
|
463
464
|
},
|
|
464
465
|
actor: { kind: "system" },
|
|
465
|
-
scope: {
|
|
466
|
+
scope: {
|
|
467
|
+
workspaceId: this.workspaceId,
|
|
468
|
+
...automation.projectId ? { projectId: automation.projectId } : {}
|
|
469
|
+
},
|
|
466
470
|
occurredAt: new Date(endedAtMs).toISOString(),
|
|
467
471
|
dedupeKey: `automation_run:${run.id}:failed`,
|
|
468
472
|
sensitivity: "personal",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { reconcileAssertion } from "../../user-model/repository.js";
|
|
2
|
+
import "../../user-model/index.js";
|
|
1
3
|
import { commandRegistry } from "../registry.js";
|
|
2
|
-
import {
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
3
5
|
//#region src/chat-commands/builtins/understanding.ts
|
|
4
6
|
function parseRememberArgs(args) {
|
|
5
7
|
const trimmed = args.trim();
|
|
@@ -30,20 +32,36 @@ const rememberCommand = {
|
|
|
30
32
|
content: "Usage: /remember [--session] <what xopc should know> (max 5000 characters)",
|
|
31
33
|
success: false
|
|
32
34
|
};
|
|
33
|
-
const result =
|
|
34
|
-
|
|
35
|
+
const result = reconcileAssertion({
|
|
36
|
+
subject: {
|
|
37
|
+
type: "user",
|
|
38
|
+
id: "self"
|
|
39
|
+
},
|
|
40
|
+
predicate: `remembered.${createHash("sha256").update(content.toLocaleLowerCase()).digest("hex").slice(0, 20)}`,
|
|
41
|
+
cardinality: "single",
|
|
42
|
+
value: content,
|
|
43
|
+
normalizedValue: content.toLocaleLowerCase(),
|
|
44
|
+
statement: content,
|
|
35
45
|
kind: "derived_insight",
|
|
36
46
|
scope: sessionOnly ? {
|
|
37
47
|
type: "session",
|
|
38
48
|
id: ctx.sessionKey
|
|
39
49
|
} : { type: "global" },
|
|
50
|
+
authority: "user_explicit",
|
|
51
|
+
confidence: 1,
|
|
52
|
+
declaredImportance: .8,
|
|
53
|
+
inferredImportance: .8,
|
|
54
|
+
consequence: "medium",
|
|
55
|
+
actionability: .7,
|
|
56
|
+
volatility: sessionOnly ? "dynamic" : "stable",
|
|
40
57
|
sensitivity: "normal",
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
disclosurePolicy: "referenceable",
|
|
59
|
+
observedAt: Date.now(),
|
|
60
|
+
createdBy: "user"
|
|
43
61
|
});
|
|
44
62
|
const scopeLabel = sessionOnly ? "this conversation" : "all conversations";
|
|
45
63
|
return {
|
|
46
|
-
content: result.created ? `Remembered for ${scopeLabel}. You can review or remove it in
|
|
64
|
+
content: result.action === "created" ? `Remembered for ${scopeLabel}. You can review or remove it in User Model.` : `This is already remembered for ${scopeLabel}.`,
|
|
47
65
|
success: true
|
|
48
66
|
};
|
|
49
67
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
2
|
-
import { register } from "../registry.js";
|
|
3
2
|
import { getStoreConnectorInstallPlan, installStoreConnector, listStoreConnectors } from "../../capabilities/store-connector.js";
|
|
3
|
+
import { register } from "../registry.js";
|
|
4
4
|
import { confirm } from "@inquirer/prompts";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
//#region src/cli/commands/connectors.ts
|
|
@@ -52,7 +52,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
52
52
|
id: "database-schema",
|
|
53
53
|
label: "Database schema",
|
|
54
54
|
status: "pass",
|
|
55
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
55
|
+
message: `SQLite schema v${status.dbVersion} (current release v152).`,
|
|
56
56
|
hints: []
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -1322,8 +1322,8 @@ export declare const UpdateAutoConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1322
1322
|
export declare const UpdateConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
1323
1323
|
checkOnStart: z.ZodDefault<z.ZodBoolean>;
|
|
1324
1324
|
channel: z.ZodDefault<z.ZodEnum<{
|
|
1325
|
-
beta: "beta";
|
|
1326
1325
|
stable: "stable";
|
|
1326
|
+
beta: "beta";
|
|
1327
1327
|
dev: "dev";
|
|
1328
1328
|
}>>;
|
|
1329
1329
|
auto: z.ZodOptional<z.ZodObject<{
|
|
@@ -1428,79 +1428,60 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1428
1428
|
"zh-CN": "zh-CN";
|
|
1429
1429
|
}>>;
|
|
1430
1430
|
}, z.core.$strict>>;
|
|
1431
|
-
|
|
1432
|
-
mode: z.ZodDefault<z.ZodEnum<{
|
|
1433
|
-
off: "off";
|
|
1434
|
-
auto: "auto";
|
|
1435
|
-
readOnly: "readOnly";
|
|
1436
|
-
confirmWrite: "confirmWrite";
|
|
1437
|
-
}>>;
|
|
1438
|
-
sources: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
1439
|
-
session: "session";
|
|
1440
|
-
workspace: "workspace";
|
|
1441
|
-
understanding: "understanding";
|
|
1442
|
-
agentProfile: "agentProfile";
|
|
1443
|
-
}>>>;
|
|
1444
|
-
writePolicy: z.ZodOptional<z.ZodObject<{
|
|
1445
|
-
agentProfile: z.ZodOptional<z.ZodEnum<{
|
|
1446
|
-
allow: "allow";
|
|
1447
|
-
confirm: "confirm";
|
|
1448
|
-
deny: "deny";
|
|
1449
|
-
}>>;
|
|
1450
|
-
understanding: z.ZodOptional<z.ZodEnum<{
|
|
1451
|
-
allow: "allow";
|
|
1452
|
-
confirm: "confirm";
|
|
1453
|
-
deny: "deny";
|
|
1454
|
-
}>>;
|
|
1455
|
-
workspace: z.ZodOptional<z.ZodEnum<{
|
|
1456
|
-
allow: "allow";
|
|
1457
|
-
confirm: "confirm";
|
|
1458
|
-
deny: "deny";
|
|
1459
|
-
}>>;
|
|
1460
|
-
}, z.core.$strict>>;
|
|
1461
|
-
retention: z.ZodOptional<z.ZodObject<{
|
|
1462
|
-
compaction: z.ZodDefault<z.ZodObject<{
|
|
1463
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1464
|
-
triggerThreshold: z.ZodDefault<z.ZodNumber>;
|
|
1465
|
-
reserveTokens: z.ZodDefault<z.ZodNumber>;
|
|
1466
|
-
minMessagesBeforeCompact: z.ZodDefault<z.ZodNumber>;
|
|
1467
|
-
keepRecentTokens: z.ZodDefault<z.ZodNumber>;
|
|
1468
|
-
recentTurnsPreserve: z.ZodDefault<z.ZodNumber>;
|
|
1469
|
-
summaryMaxTokens: z.ZodDefault<z.ZodNumber>;
|
|
1470
|
-
summaryChunkTokens: z.ZodDefault<z.ZodNumber>;
|
|
1471
|
-
summaryTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
1472
|
-
summaryRetries: z.ZodDefault<z.ZodNumber>;
|
|
1473
|
-
qualityGuard: z.ZodDefault<z.ZodBoolean>;
|
|
1474
|
-
gapAudit: z.ZodDefault<z.ZodBoolean>;
|
|
1475
|
-
model: z.ZodOptional<z.ZodString>;
|
|
1476
|
-
minToolResultKeepChars: z.ZodDefault<z.ZodNumber>;
|
|
1477
|
-
maxActiveTranscriptBytes: z.ZodDefault<z.ZodNumber>;
|
|
1478
|
-
postCompactionSections: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1479
|
-
}, z.core.$strict>>;
|
|
1480
|
-
maxAgeDays: z.ZodOptional<z.ZodNumber>;
|
|
1481
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1482
|
-
maxChars: z.ZodOptional<z.ZodNumber>;
|
|
1483
|
-
}, z.core.$strict>>;
|
|
1484
|
-
}, z.core.$strict>>;
|
|
1485
|
-
understanding: z.ZodDefault<z.ZodObject<{
|
|
1431
|
+
userModel: z.ZodDefault<z.ZodObject<{
|
|
1486
1432
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1433
|
+
writePolicy: z.ZodDefault<z.ZodEnum<{
|
|
1434
|
+
allow: "allow";
|
|
1435
|
+
confirm: "confirm";
|
|
1436
|
+
deny: "deny";
|
|
1437
|
+
}>>;
|
|
1438
|
+
sensitiveWritePolicy: z.ZodDefault<z.ZodEnum<{
|
|
1439
|
+
allow: "allow";
|
|
1440
|
+
confirm: "confirm";
|
|
1441
|
+
deny: "deny";
|
|
1442
|
+
}>>;
|
|
1487
1443
|
processingPolicy: z.ZodDefault<z.ZodEnum<{
|
|
1488
1444
|
local_only: "local_only";
|
|
1489
1445
|
remote_allowed: "remote_allowed";
|
|
1490
1446
|
}>>;
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1447
|
+
extraction: z.ZodDefault<z.ZodObject<{
|
|
1448
|
+
reviewIntervalTurns: z.ZodDefault<z.ZodNumber>;
|
|
1449
|
+
maxHistoryMessages: z.ZodDefault<z.ZodNumber>;
|
|
1450
|
+
maxDurationMs: z.ZodDefault<z.ZodNumber>;
|
|
1451
|
+
}, z.core.$strict>>;
|
|
1452
|
+
maintenance: z.ZodDefault<z.ZodObject<{
|
|
1453
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1454
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
1455
|
+
temporalSweepMinutes: z.ZodDefault<z.ZodNumber>;
|
|
1456
|
+
dailyTime: z.ZodDefault<z.ZodString>;
|
|
1457
|
+
weeklyDay: z.ZodDefault<z.ZodEnum<{
|
|
1458
|
+
sun: "sun";
|
|
1459
|
+
mon: "mon";
|
|
1460
|
+
tue: "tue";
|
|
1461
|
+
wed: "wed";
|
|
1462
|
+
thu: "thu";
|
|
1463
|
+
fri: "fri";
|
|
1464
|
+
sat: "sat";
|
|
1465
|
+
}>>;
|
|
1466
|
+
weeklyTime: z.ZodDefault<z.ZodString>;
|
|
1467
|
+
evidenceThreshold: z.ZodDefault<z.ZodNumber>;
|
|
1468
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
1469
|
+
staleRetentionDays: z.ZodDefault<z.ZodNumber>;
|
|
1470
|
+
}, z.core.$strict>>;
|
|
1495
1471
|
}, z.core.$strict>>;
|
|
1496
|
-
|
|
1497
|
-
|
|
1472
|
+
knowledgeMemory: z.ZodDefault<z.ZodObject<{
|
|
1473
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1474
|
+
writePolicy: z.ZodDefault<z.ZodEnum<{
|
|
1498
1475
|
allow: "allow";
|
|
1499
1476
|
confirm: "confirm";
|
|
1500
1477
|
deny: "deny";
|
|
1501
1478
|
}>>;
|
|
1502
|
-
|
|
1503
|
-
|
|
1479
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
1480
|
+
project: "project";
|
|
1481
|
+
session: "session";
|
|
1482
|
+
workspace: "workspace";
|
|
1483
|
+
connector: "connector";
|
|
1484
|
+
}>>>;
|
|
1504
1485
|
searchStrategy: z.ZodDefault<z.ZodEnum<{
|
|
1505
1486
|
"local-first": "local-first";
|
|
1506
1487
|
"external-first": "external-first";
|
|
@@ -1519,17 +1500,29 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1519
1500
|
allowedProviderIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1520
1501
|
autoWriteKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1521
1502
|
}, z.core.$strict>>;
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1503
|
+
contextPlanning: z.ZodDefault<z.ZodObject<{
|
|
1504
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1505
|
+
maxAssertions: z.ZodDefault<z.ZodNumber>;
|
|
1506
|
+
maxKnowledge: z.ZodDefault<z.ZodNumber>;
|
|
1507
|
+
maxChars: z.ZodDefault<z.ZodNumber>;
|
|
1508
|
+
compaction: z.ZodDefault<z.ZodObject<{
|
|
1509
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1510
|
+
triggerThreshold: z.ZodDefault<z.ZodNumber>;
|
|
1511
|
+
reserveTokens: z.ZodDefault<z.ZodNumber>;
|
|
1512
|
+
minMessagesBeforeCompact: z.ZodDefault<z.ZodNumber>;
|
|
1513
|
+
keepRecentTokens: z.ZodDefault<z.ZodNumber>;
|
|
1514
|
+
recentTurnsPreserve: z.ZodDefault<z.ZodNumber>;
|
|
1515
|
+
summaryMaxTokens: z.ZodDefault<z.ZodNumber>;
|
|
1516
|
+
summaryChunkTokens: z.ZodDefault<z.ZodNumber>;
|
|
1517
|
+
summaryTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
1518
|
+
summaryRetries: z.ZodDefault<z.ZodNumber>;
|
|
1519
|
+
qualityGuard: z.ZodDefault<z.ZodBoolean>;
|
|
1520
|
+
gapAudit: z.ZodDefault<z.ZodBoolean>;
|
|
1521
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1522
|
+
minToolResultKeepChars: z.ZodDefault<z.ZodNumber>;
|
|
1523
|
+
maxActiveTranscriptBytes: z.ZodDefault<z.ZodNumber>;
|
|
1524
|
+
postCompactionSections: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1530
1525
|
}, z.core.$strict>>;
|
|
1531
|
-
minEvidenceSources: z.ZodDefault<z.ZodNumber>;
|
|
1532
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
1533
1526
|
}, z.core.$strict>>;
|
|
1534
1527
|
}, z.core.$strict>>;
|
|
1535
1528
|
agents: z.ZodDefault<z.ZodObject<{
|
|
@@ -2275,8 +2268,8 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2275
2268
|
update: z.ZodOptional<z.ZodObject<{
|
|
2276
2269
|
checkOnStart: z.ZodDefault<z.ZodBoolean>;
|
|
2277
2270
|
channel: z.ZodDefault<z.ZodEnum<{
|
|
2278
|
-
beta: "beta";
|
|
2279
2271
|
stable: "stable";
|
|
2272
|
+
beta: "beta";
|
|
2280
2273
|
dev: "dev";
|
|
2281
2274
|
}>>;
|
|
2282
2275
|
auto: z.ZodOptional<z.ZodObject<{
|