@xopcai/xopc 0.0.248 → 0.0.249
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-B759R_qf.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BmKxSM1k.js → agent-avatar-dicebear-BUu7EnwM.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-C1rXNUAG.js +1 -0
- package/dist/gateway/static/root/assets/agents-DK9HjHO0.js +1 -0
- package/dist/gateway/static/root/assets/{api-B0-hLuZ1.js → api-Cg0v7Lpn.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-C9DkCW_d.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-CFggS95Y.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-jOvT-fzU.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BnMSgZvR.js → archive-plugin-BQrilVVv.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CejsQMev.js → attachment-load-BG0BliqV.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-RC8EyoAf.js → automations-page-Bo4RiTkh.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BKjKTlW8.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DGjppLSG.js → binary-plugins-BCnyNU0C.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CWdP4bUc.js → block-editor-Db8DlVvg.js} +50 -50
- package/dist/gateway/static/root/assets/browser-settings-page-Dzq18pO1.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BQ1Ilw_o.js → browser-workflow-inputs-C71vfl0b.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-CJh4NyxT.js → browser-workflows-page-vvmSYKsO.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DW4SBQf4.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-57OGuewD.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-Ohhee4vm.js → channels-status-swr-CKyV3jY5.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BOtoKTK3.js → chat-terminal-dock-B1Xd6OFB.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-CT_I3kbR.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-DTj1V3Sw.js → cron-expression-D-F9vjtE.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-Yr6OCvGL.js → date-picker-B2OoYvic.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-BiGx9Sbj.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-DbGzggPF.js → desktop-pet-BNMRqipe.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-DeYbIV7A.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DgTtk4KC.js → extension-debug-page-COyn05ub.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DtQeiP6f.js → extension-page-oH43chS2.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BMO59994.js +1 -0
- package/dist/gateway/static/root/assets/gateway-config-api-cimpViGk.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-DXuXtU1w.js → gateway-config-swr-BGdHwT4e.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-BHJtnSic.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CzBzglzQ.js → gateway-startup-retry-CuaM3b4c.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DNhrZHqx.js +1 -0
- package/dist/gateway/static/root/assets/home-page-BiHwiBnQ.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-TIgsn04n.js → image-generation-api-D7duj7Uj.js} +1 -1
- package/dist/gateway/static/root/assets/index-DGeGmj4k.css +2 -0
- package/dist/gateway/static/root/assets/index-aBs0EfQB.js +72 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-wsWuoa8p.js → keyboard-shortcuts-settings-D8Zw_lYd.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CpyvYyrb.js → local-app-workbench-page-eBFVWmtH.js} +2 -2
- package/dist/gateway/static/root/assets/{local-apps-page-CXrbrGo8.js → local-apps-page-CvPDPRwb.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BJFLQY8O.js → locale-store-zEL8bkwx.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-ClvcWlL6.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-BdJZFR7U.js → management-settings-D8moh99U.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-NK3ACVG2.js → markdown-split-D7V3j0vE.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DTF9v1gg.js → markdown-view-DGRN-8wP.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-F0jcUxyl.js → media-plugins-BLaE5b1Y.js} +1 -1
- package/dist/gateway/static/root/assets/messages-W5P19VTF.js +11 -0
- package/dist/gateway/static/root/assets/mobile-pairing-wizard-DiVDuCxl.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-CEEvR-fV.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-BLqgXNCx.js +8 -0
- package/dist/gateway/static/root/assets/page-tabs-BFMGjA60.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-DNEWZN7H.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-CxGGlWA8.js → product-open-page-Co5u7asH.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CIiFJ5tk.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-B3UF-Pfm.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CIsNlSBi.js → registry-api-Cg92zSod.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BUtpkJPG.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-YkjhiQfA.js → runtime-tools-settings-panel-C0ByNmlV.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-oFGf3G3s.js → schema-form-Dq_VQpuY.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-UgJmG-V4.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DDCzpdkl.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-CZu6FX4k.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-C7VWs0IT.js → settings-page-S8ekeUZd.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BdVmwXMv.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-t5oz18rh.js → share-preview-page-D2fEidbn.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BdsqnCYj.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-ghzAQKna.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-AYiPlgZE.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-DEDTYs2W.js → skills-page.utils-DGzl-ib-.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-5Xd5mIiR.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-BQAUaCDD.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-O597U8q_.js → theme-store-ZVClZKQ0.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-CdZN1Jin.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-B5eUJ6Zq.js → use-autosave-czRI0NBc.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-W3GTm6nA.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-CMKSwz4C.js → voice-api-key-field-8YEvA3cU.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-q7B6fOFB.js → voice-config-api-CopF64lY.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-keLtqYYJ.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DZmvLZjb.js → workflow-run-setup-panel-Dy5WgYMO.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BbAV3h7n.js +5 -0
- package/dist/gateway/static/root/index.html +10 -26
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +2 -2
- package/dist/src/agent/agent-manager.d.ts +4 -4
- package/dist/src/agent/agent-manager.js +31 -15
- 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 +24 -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 +36 -0
- package/dist/src/agent/context/audit.js +97 -0
- package/dist/src/agent/context/coordinator.d.ts +26 -0
- package/dist/src/agent/context/coordinator.js +72 -0
- package/dist/src/agent/context/execution-context.d.ts +54 -0
- package/dist/src/agent/context/execution-context.js +147 -0
- package/dist/src/agent/context/execution-scope.js +1 -1
- 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 +3 -3
- package/dist/src/agent/context/project-context.js +26 -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.js +1 -1
- 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/memory/compaction-policy.js +1 -1
- package/dist/src/agent/memory/compaction-promotion.js +45 -77
- package/dist/src/agent/memory/create-memory-manager.js +1 -3
- package/dist/src/agent/memory/index.d.ts +0 -5
- package/dist/src/agent/memory/index.js +2 -5
- 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.js +1 -1
- 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/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.js +6 -23
- package/dist/src/agent/service/process-direct-streaming.js +5 -3
- 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.js +36 -19
- 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 +9 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +129 -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/user-context-tool.d.ts +8 -0
- package/dist/src/agent/tools/user-context-tool.js +81 -0
- package/dist/src/agent/tools/xopc-use-tool.js +2 -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 +42 -0
- package/dist/src/connectors/connection-recovery-service.js +396 -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/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 +7 -15
- 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/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 +2 -2
- 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/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 +45 -14
- 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 +35 -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 +45 -0
- package/dist/src/knowledge-memory/repository.js +154 -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/proactive/execution/context.d.ts +2 -2
- package/dist/src/proactive/execution/context.js +16 -11
- package/dist/src/proactive/index.d.ts +1 -1
- package/dist/src/proactive/index.js +2 -2
- 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-store.js +2 -1
- package/dist/src/realtime/runtime.js +1 -0
- package/dist/src/runtime-tools/manager.js +1 -1
- package/dist/src/storage/sqlite/collaboration-rule-repository.d.ts +17 -0
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +54 -0
- 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 +4 -6
- 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/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/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 +16 -13
- package/dist/src/storage/sqlite/session-repository.js +4 -1
- package/dist/src/storage/sqlite/transcript-repository.js +1 -1
- package/dist/src/tasks/index.js +2 -2
- 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/tool-summary.js +2 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- 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 +40 -0
- package/dist/src/user-model/capture/executor.js +134 -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 +21 -0
- package/dist/src/user-model/capture/semantic.js +197 -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 +58 -0
- package/dist/src/user-model/goals.js +89 -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 +1 -1
- 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/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-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/understanding/types.js +0 -1
- 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 → knowledge-memory/domain.js} +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260713-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-aBs0EfQB.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-W5P19VTF.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-zEL8bkwx.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/schemas-BHS7bo06.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-CV4pDOtG.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-DGRN-8wP.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/dist-DLmwHyAh.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
@@ -40,39 +40,23 @@
|
|
|
40
40
|
<link rel="modulepreload" crossorigin href="/assets/settings-shell-layer-context-DCp6ykjQ.js">
|
|
41
41
|
<link rel="modulepreload" crossorigin href="/assets/popover-select-C-Hj-nXR.js">
|
|
42
42
|
<link rel="modulepreload" crossorigin href="/assets/circle-check-C23XjkUj.js">
|
|
43
|
-
<link rel="modulepreload" crossorigin href="/assets/cloud-C4-yfnnk.js">
|
|
44
43
|
<link rel="modulepreload" crossorigin href="/assets/copy-Dv6d4Dvw.js">
|
|
45
|
-
<link rel="modulepreload" crossorigin href="/assets/ellipsis-0k4rZLoy.js">
|
|
46
44
|
<link rel="modulepreload" crossorigin href="/assets/external-link-DjqjBmc3.js">
|
|
47
|
-
<link rel="modulepreload" crossorigin href="/assets/eye-off-DEAzt3g1.js">
|
|
48
|
-
<link rel="modulepreload" crossorigin href="/assets/eye-CABVeTq0.js">
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/folder-open-CyzJ19I9.js">
|
|
50
45
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
51
|
-
<link rel="modulepreload" crossorigin href="/assets/link-2-D_ZKYUW7.js">
|
|
52
46
|
<link rel="modulepreload" crossorigin href="/assets/loader-circle-CifKLtgG.js">
|
|
53
|
-
<link rel="modulepreload" crossorigin href="/assets/message-square-plus-XP0tGdlV.js">
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/assets/minimize-2-DtOGrlpo.js">
|
|
55
|
-
<link rel="modulepreload" crossorigin href="/assets/pencil-DmIY3Oa-.js">
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/rotate-cw-LIg3Am9S.js">
|
|
57
|
-
<link rel="modulepreload" crossorigin href="/assets/search-DA7gz22f.js">
|
|
58
47
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
59
48
|
<link rel="modulepreload" crossorigin href="/assets/files-D6vf3S30.js">
|
|
60
49
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-R8V9l6nk.js">
|
|
61
50
|
<link rel="modulepreload" crossorigin href="/assets/button-CtTvuElV.js">
|
|
62
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
63
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-CuaM3b4c.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-Cg92zSod.js">
|
|
64
53
|
<link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
|
|
65
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
66
|
-
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-nCfkBN8M.js">
|
|
54
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-BGdHwT4e.js">
|
|
67
55
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-DH5wF8X8.js">
|
|
68
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
69
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
70
|
-
<link rel="modulepreload" crossorigin href="/assets/interaction-BmQogeqz.js">
|
|
71
|
-
<link rel="modulepreload" crossorigin href="/assets/is-masked-secret-DOkL5b_X.js">
|
|
72
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-etpmyV7S.js">
|
|
73
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-O597U8q_.js">
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-B759R_qf.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-ZVClZKQ0.js">
|
|
74
58
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Y68dCxuc.css">
|
|
75
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
59
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DGeGmj4k.css">
|
|
76
60
|
</head>
|
|
77
61
|
<body>
|
|
78
62
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -44,9 +44,9 @@ export interface AgentInstanceGateway {
|
|
|
44
44
|
/** Last assistant text from the in-memory agent (empty when no agent / no assistant yet). */
|
|
45
45
|
getLastAssistantContent(sessionKey: string): string | null;
|
|
46
46
|
/** Build the bounded, policy-filtered context used for this model turn. */
|
|
47
|
-
prepareUserTurnContext(userMessage: AgentMessage, sessionKey: string, turnId: string): Promise<import('./
|
|
47
|
+
prepareUserTurnContext(userMessage: AgentMessage, sessionKey: string, turnId: string): Promise<import('./context/coordinator.js').ExecutionContextPlan>;
|
|
48
48
|
/** Post-turn: sync external memory providers, queue next prefetch. */
|
|
49
|
-
afterAgentTurn(sessionKey: string, userPlainText: string, turnId: string): Promise<import('
|
|
49
|
+
afterAgentTurn(sessionKey: string, userPlainText: string, turnId: string): Promise<import('../user-model/capture/index.js').UserModelCaptureResult | undefined>;
|
|
50
50
|
/** Bump the per-session "turns since memory review" counter. */
|
|
51
51
|
beginBackgroundReviewUserTurn(sessionKey: string): void;
|
|
52
52
|
/** Fire-and-forget review (memory + skill nudges) once the main turn finishes. */
|
|
@@ -22,7 +22,7 @@ import type { SessionContext } from './session/session-context.js';
|
|
|
22
22
|
import type { Skill, SkillDiagnostic, SkillMarkdownPreviewPayload, SkillRuntimeStatus } from './skills/types.js';
|
|
23
23
|
import { type SkillHubLockEntry } from './skills/hub-lock.js';
|
|
24
24
|
import type { MemoryManager } from './memory/manager.js';
|
|
25
|
-
import type
|
|
25
|
+
import { type ExecutionContextPlan } from './context/coordinator.js';
|
|
26
26
|
import { type AgentTurnPolicy } from './orchestration/agent-turn-policy.js';
|
|
27
27
|
export interface SkillCatalogEntry {
|
|
28
28
|
directoryId: string;
|
|
@@ -151,7 +151,7 @@ export declare class AgentManager implements AgentInstanceGateway {
|
|
|
151
151
|
private credentialCache;
|
|
152
152
|
private credentialResolver;
|
|
153
153
|
private workspaceRuntimes;
|
|
154
|
-
private
|
|
154
|
+
private executionContext;
|
|
155
155
|
private backgroundReview;
|
|
156
156
|
private skillFilesystemWatcher;
|
|
157
157
|
private skillDiskRefreshInProgress;
|
|
@@ -196,12 +196,12 @@ export declare class AgentManager implements AgentInstanceGateway {
|
|
|
196
196
|
getMemoryManager(): MemoryManager;
|
|
197
197
|
getMemoryManagerForSession(sessionKey: string): MemoryManager;
|
|
198
198
|
/** Build the bounded, policy-filtered context used for this model turn. */
|
|
199
|
-
prepareUserTurnContext(userMessage: AgentMessage, sessionKey: string, turnId: string): Promise<
|
|
199
|
+
prepareUserTurnContext(userMessage: AgentMessage, sessionKey: string, turnId: string): Promise<ExecutionContextPlan>;
|
|
200
200
|
/**
|
|
201
201
|
* After a completed turn: sync external providers and queue next-turn prefetch.
|
|
202
202
|
* Delegates to {@link UserContextCoordinator}.
|
|
203
203
|
*/
|
|
204
|
-
afterAgentTurn(sessionKey: string, userPlainText: string, turnId: string): Promise<import('
|
|
204
|
+
afterAgentTurn(sessionKey: string, userPlainText: string, turnId: string): Promise<import('../user-model/capture/index.js').UserModelCaptureResult | undefined>;
|
|
205
205
|
/**
|
|
206
206
|
* Call once per user turn before the main embedded agent turn.
|
|
207
207
|
* Delegates to {@link BackgroundReviewCoordinator}.
|
|
@@ -36,9 +36,10 @@ import { sortToolsForPromptCache } from "./tools/cache-stability.js";
|
|
|
36
36
|
import { AgentToolsFactory } from "./tools/factory.js";
|
|
37
37
|
import "./mcp/bundle-mcp-tools.js";
|
|
38
38
|
import { isMemorySubsystemEnabled } from "./memory/memory-config.js";
|
|
39
|
-
import {
|
|
39
|
+
import { evaluateToolGate } from "./context/execution-context.js";
|
|
40
|
+
import { ExecutionContextCoordinator } from "./context/coordinator.js";
|
|
40
41
|
import { WorkspaceRuntimeRegistry } from "./workspace-runtime/registry.js";
|
|
41
|
-
import {
|
|
42
|
+
import { runTurnUserModelCapture } from "./background-review/run-background-review.js";
|
|
42
43
|
import { BackgroundReviewCoordinator } from "./background-review/coordinator.js";
|
|
43
44
|
import { maybeRequestChannelExecApproval } from "../channels/exec-approval-runtime.js";
|
|
44
45
|
import { SkillFilesystemWatcher } from "./skills/filesystem-watcher.js";
|
|
@@ -105,7 +106,7 @@ var AgentManager = class {
|
|
|
105
106
|
credentialCache = /* @__PURE__ */ new Map();
|
|
106
107
|
credentialResolver;
|
|
107
108
|
workspaceRuntimes;
|
|
108
|
-
|
|
109
|
+
executionContext;
|
|
109
110
|
backgroundReview;
|
|
110
111
|
skillFilesystemWatcher;
|
|
111
112
|
skillDiskRefreshInProgress = false;
|
|
@@ -130,13 +131,11 @@ var AgentManager = class {
|
|
|
130
131
|
this.skillFilesystemWatcher.watchWorkspace(resolvedPath);
|
|
131
132
|
}
|
|
132
133
|
});
|
|
133
|
-
this.
|
|
134
|
+
this.executionContext = new ExecutionContextCoordinator({
|
|
134
135
|
getConfig: () => this.config.config,
|
|
135
136
|
isEnabledForSession: (sessionKey) => this.isUserContextEnabledForSession(sessionKey),
|
|
136
137
|
getWorkspaceIdForSession: (sk) => this.getResolvedWorkspaceForSession(sk),
|
|
137
|
-
getProjectIdForSession: (sk) => getSessionMetadata(sk)?.projectId
|
|
138
|
-
getMemoryManagerForSession: (sk) => this.getMemoryManagerForSession(sk),
|
|
139
|
-
getLastAssistantContent: (sk) => this.getLastAssistantContent(sk)
|
|
138
|
+
getProjectIdForSession: (sk) => getSessionMetadata(sk)?.projectId
|
|
140
139
|
});
|
|
141
140
|
this.backgroundReview = new BackgroundReviewCoordinator({ getConfig: () => this.mergedConfig() });
|
|
142
141
|
this.toolsFactory = new AgentToolsFactory(this.buildToolsFactoryDeps());
|
|
@@ -152,7 +151,7 @@ var AgentManager = class {
|
|
|
152
151
|
}
|
|
153
152
|
isUserContextEnabledForSession(sessionKey) {
|
|
154
153
|
const mode = getSessionConfig(sessionKey)?.userContextMode;
|
|
155
|
-
return Boolean(this.config.config?.userContext.enabled && this.config.config.userContext.
|
|
154
|
+
return Boolean(this.config.config?.userContext.enabled && this.config.config.userContext.userModel.enabled && (mode === void 0 || mode === "enabled"));
|
|
156
155
|
}
|
|
157
156
|
computeBaseWorkspacePath() {
|
|
158
157
|
const cfg = this.config.config;
|
|
@@ -289,25 +288,24 @@ var AgentManager = class {
|
|
|
289
288
|
}
|
|
290
289
|
/** Build the bounded, policy-filtered context used for this model turn. */
|
|
291
290
|
prepareUserTurnContext(userMessage, sessionKey, turnId) {
|
|
292
|
-
return this.
|
|
291
|
+
return this.executionContext.prepare(userMessage, sessionKey, turnId);
|
|
293
292
|
}
|
|
294
293
|
/**
|
|
295
294
|
* After a completed turn: sync external providers and queue next-turn prefetch.
|
|
296
295
|
* Delegates to {@link UserContextCoordinator}.
|
|
297
296
|
*/
|
|
298
297
|
async afterAgentTurn(sessionKey, userPlainText, turnId) {
|
|
299
|
-
await this.userContext.afterTurn(sessionKey, userPlainText);
|
|
300
298
|
if (!this.isUserContextEnabledForSession(sessionKey)) return void 0;
|
|
301
299
|
const parsed = parseSessionKey(sessionKey);
|
|
302
300
|
if (parsed && parsed.peerKind !== "direct") return void 0;
|
|
303
301
|
const instance = this.agents.get(sessionKey);
|
|
304
302
|
if (!instance) return void 0;
|
|
305
|
-
return
|
|
303
|
+
return runTurnUserModelCapture({
|
|
306
304
|
sessionKey,
|
|
307
305
|
turnId,
|
|
308
306
|
userText: userPlainText,
|
|
309
307
|
mainAgent: instance.agent,
|
|
310
|
-
|
|
308
|
+
workspaceId: this.getResolvedWorkspaceForSession(sessionKey),
|
|
311
309
|
getConfig: () => this.mergedConfig()
|
|
312
310
|
});
|
|
313
311
|
}
|
|
@@ -330,7 +328,7 @@ var AgentManager = class {
|
|
|
330
328
|
sessionKey,
|
|
331
329
|
agent: inst.agent,
|
|
332
330
|
lastAssistantText: this.getLastAssistantContent(sessionKey),
|
|
333
|
-
|
|
331
|
+
workspaceId: this.getResolvedWorkspaceForSession(sessionKey)
|
|
334
332
|
});
|
|
335
333
|
}
|
|
336
334
|
/**
|
|
@@ -792,7 +790,7 @@ var AgentManager = class {
|
|
|
792
790
|
instance.agent.abort();
|
|
793
791
|
evictEmbeddedSessionRunner(sessionKey, "agent_removed");
|
|
794
792
|
this.agents.delete(sessionKey);
|
|
795
|
-
this.
|
|
793
|
+
this.executionContext.forgetSession(sessionKey);
|
|
796
794
|
clearBootstrapSnapshot(sessionKey);
|
|
797
795
|
this.config.getModelManager?.().clearSessionProfileDefault(sessionKey);
|
|
798
796
|
log.info({
|
|
@@ -872,7 +870,7 @@ var AgentManager = class {
|
|
|
872
870
|
for (const instance of this.agents.values()) instance.agent.abort();
|
|
873
871
|
this.agents.clear();
|
|
874
872
|
this.runtimeListeners.clear();
|
|
875
|
-
this.
|
|
873
|
+
this.executionContext.clear();
|
|
876
874
|
this.sessionWorkspaceOverrides.clear();
|
|
877
875
|
this.workspaceRuntimes.clearAll();
|
|
878
876
|
log.debug("All agent instances disposed");
|
|
@@ -976,6 +974,23 @@ var AgentManager = class {
|
|
|
976
974
|
},
|
|
977
975
|
authorizeToolCall: async ({ toolCall, args }) => {
|
|
978
976
|
const toolName = toolCall.name;
|
|
977
|
+
const operation = {
|
|
978
|
+
message: "external_send",
|
|
979
|
+
send_media: "external_send",
|
|
980
|
+
exec_command: "command_execute",
|
|
981
|
+
write_file: "filesystem_write",
|
|
982
|
+
apply_patch: "filesystem_write",
|
|
983
|
+
xopc_tool_execute: "external_tool"
|
|
984
|
+
}[toolName] ?? toolName;
|
|
985
|
+
const executionGate = this.executionContext.getCurrent(sessionKey);
|
|
986
|
+
if (executionGate) {
|
|
987
|
+
const decision = evaluateToolGate(executionGate, operation);
|
|
988
|
+
if (!decision.allowed) return {
|
|
989
|
+
block: true,
|
|
990
|
+
terminate: true,
|
|
991
|
+
reason: decision.reason ?? "Blocked by collaboration rule."
|
|
992
|
+
};
|
|
993
|
+
}
|
|
979
994
|
const policy = this.resolveToolPolicy(profile, toolName, args);
|
|
980
995
|
const detail = JSON.stringify(args ?? {});
|
|
981
996
|
if (policy?.mode === "ask") {
|
|
@@ -1039,6 +1054,7 @@ var AgentManager = class {
|
|
|
1039
1054
|
const request = this.config.gatewayClarify?.requestClarification;
|
|
1040
1055
|
if (!request) return false;
|
|
1041
1056
|
return await request(sessionKey, {
|
|
1057
|
+
kind: "approval",
|
|
1042
1058
|
question: `Allow ${toolName} to run once?\n${detail.slice(0, 500)}`,
|
|
1043
1059
|
choices: ["Allow once", "Deny"],
|
|
1044
1060
|
default: "Deny"
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Agent } from '@earendil-works/pi-agent-core';
|
|
12
12
|
import type { Config } from '../../config/schema.js';
|
|
13
|
-
import type { WorkspaceRuntime } from '../workspace-runtime/registry.js';
|
|
14
13
|
export interface BackgroundReviewCoordinatorOptions {
|
|
15
14
|
/** Effective config snapshot used to look up review-cadence settings. */
|
|
16
15
|
getConfig: () => Config | undefined;
|
|
@@ -20,7 +19,7 @@ export interface ScheduleReviewContext {
|
|
|
20
19
|
agent: Agent;
|
|
21
20
|
/** Last assistant text — review is skipped when empty. */
|
|
22
21
|
lastAssistantText: string | null;
|
|
23
|
-
|
|
22
|
+
workspaceId: string;
|
|
24
23
|
}
|
|
25
24
|
export declare class BackgroundReviewCoordinator {
|
|
26
25
|
private readonly opts;
|
|
@@ -34,7 +33,7 @@ export declare class BackgroundReviewCoordinator {
|
|
|
34
33
|
/**
|
|
35
34
|
* Fire-and-forget review after the main user turn. Decides whether to run a
|
|
36
35
|
* understanding sweep based on the counter state + last assistant text,
|
|
37
|
-
* and delegates the actual review to {@link
|
|
36
|
+
* and delegates the actual review to {@link runBackgroundUserModelReview}.
|
|
38
37
|
*/
|
|
39
38
|
scheduleAfterUserTurn(ctx: ScheduleReviewContext): void;
|
|
40
39
|
/** Tear down state for a session (called by `AgentManager.removeAgent`). */
|
|
@@ -42,6 +41,5 @@ export declare class BackgroundReviewCoordinator {
|
|
|
42
41
|
/** Clear every counter (`AgentManager.dispose` / hot reload). */
|
|
43
42
|
clear(): void;
|
|
44
43
|
private ensureState;
|
|
45
|
-
private resolveReviewInterval;
|
|
46
44
|
private runReviewIfNeeded;
|
|
47
45
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { summarizeUserUnderstandingQuality } from "../../storage/sqlite/user-context-quality-repository.js";
|
|
4
|
-
import "../../storage/sqlite/index.js";
|
|
5
3
|
import { isAssistantTurnAborted, isAssistantTurnFailed } from "../orchestration/llm-turn-retry.js";
|
|
6
|
-
import { resolveAdaptiveUnderstandingCadence } from "../memory/understanding/quality.js";
|
|
7
4
|
import { resolveBackgroundReviewSettings } from "./settings.js";
|
|
8
|
-
import {
|
|
5
|
+
import { runBackgroundUserModelReview } from "./run-background-review.js";
|
|
9
6
|
//#region src/agent/background-review/coordinator.ts
|
|
10
7
|
init_logger();
|
|
11
8
|
const log = createLogger("BackgroundReviewCoordinator");
|
|
@@ -23,7 +20,7 @@ var BackgroundReviewCoordinator = class {
|
|
|
23
20
|
const cfg = resolveBackgroundReviewSettings(this.opts.getConfig());
|
|
24
21
|
if (!cfg.enabled) return;
|
|
25
22
|
const state = this.ensureState(sessionKey);
|
|
26
|
-
const intervalTurns =
|
|
23
|
+
const intervalTurns = cfg.reviewIntervalTurns;
|
|
27
24
|
state.turnsSinceReview += 1;
|
|
28
25
|
if (state.turnsSinceReview >= intervalTurns) {
|
|
29
26
|
state.pendingReview = true;
|
|
@@ -33,7 +30,7 @@ var BackgroundReviewCoordinator = class {
|
|
|
33
30
|
/**
|
|
34
31
|
* Fire-and-forget review after the main user turn. Decides whether to run a
|
|
35
32
|
* understanding sweep based on the counter state + last assistant text,
|
|
36
|
-
* and delegates the actual review to {@link
|
|
33
|
+
* and delegates the actual review to {@link runBackgroundUserModelReview}.
|
|
37
34
|
*/
|
|
38
35
|
scheduleAfterUserTurn(ctx) {
|
|
39
36
|
this.runReviewIfNeeded(ctx).catch((err) => {
|
|
@@ -61,28 +58,6 @@ var BackgroundReviewCoordinator = class {
|
|
|
61
58
|
this.states.set(sessionKey, state);
|
|
62
59
|
return state;
|
|
63
60
|
}
|
|
64
|
-
resolveReviewInterval(settings, state) {
|
|
65
|
-
if (!settings.adaptiveCadence) return settings.reviewIntervalTurns;
|
|
66
|
-
const now = Date.now();
|
|
67
|
-
if (state.adaptiveIntervalTurns != null && (state.adaptiveIntervalExpiresAt ?? 0) > now) return state.adaptiveIntervalTurns;
|
|
68
|
-
try {
|
|
69
|
-
const metrics = summarizeUserUnderstandingQuality({
|
|
70
|
-
windowDays: 30,
|
|
71
|
-
nowMs: now
|
|
72
|
-
});
|
|
73
|
-
const decision = resolveAdaptiveUnderstandingCadence(settings.reviewIntervalTurns, metrics);
|
|
74
|
-
state.adaptiveIntervalTurns = decision.effectiveIntervalTurns;
|
|
75
|
-
state.adaptiveIntervalExpiresAt = now + 5 * 6e4;
|
|
76
|
-
if (decision.slowed) log.debug({
|
|
77
|
-
baseIntervalTurns: decision.baseIntervalTurns,
|
|
78
|
-
effectiveIntervalTurns: decision.effectiveIntervalTurns,
|
|
79
|
-
reasons: decision.reasons
|
|
80
|
-
}, "User-understanding review cadence slowed by quality signals");
|
|
81
|
-
return decision.effectiveIntervalTurns;
|
|
82
|
-
} catch {
|
|
83
|
-
return settings.reviewIntervalTurns;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
61
|
async runReviewIfNeeded(ctx) {
|
|
87
62
|
const state = this.states.get(ctx.sessionKey);
|
|
88
63
|
if (!state) return;
|
|
@@ -93,11 +68,11 @@ var BackgroundReviewCoordinator = class {
|
|
|
93
68
|
const shouldReview = state.pendingReview;
|
|
94
69
|
state.pendingReview = false;
|
|
95
70
|
if (!shouldReview) return;
|
|
96
|
-
await
|
|
71
|
+
await runBackgroundUserModelReview({
|
|
97
72
|
sessionKey: ctx.sessionKey,
|
|
98
73
|
mainAgent: ctx.agent,
|
|
99
74
|
settings,
|
|
100
|
-
|
|
75
|
+
workspaceId: ctx.workspaceId,
|
|
101
76
|
getConfig: () => this.opts.getConfig()
|
|
102
77
|
});
|
|
103
78
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare function
|
|
1
|
+
export declare const USER_MODEL_INTERPRETER_SYSTEM_PROMPT = "You are xopc's user-model interpreter. You do not chat with the user and cannot write storage. Distinguish explicit memory commands, corrections, forgetting, durable user assertions, and ordinary task requests. Return strict JSON only. Assistant text is never evidence about the user.";
|
|
2
|
+
export declare function buildUserModelInterpreterPrompt(options: {
|
|
3
3
|
mode: 'turn' | 'transcript';
|
|
4
|
+
evidenceTimestamp: string;
|
|
5
|
+
timezone: string;
|
|
4
6
|
availableTargets?: Array<{
|
|
5
7
|
id: string;
|
|
6
8
|
statement: string;
|
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
import { USER_FACING_UNDERSTANDING_WRITING_GUIDANCE } from "../../user-context/understanding-writing.js";
|
|
2
1
|
//#region src/agent/background-review/prompts.ts
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const targets = options.availableTargets?.length ? `\
|
|
2
|
+
const USER_MODEL_INTERPRETER_SYSTEM_PROMPT = `You are xopc's user-model interpreter. You do not chat with the user and cannot write storage. Distinguish explicit memory commands, corrections, forgetting, durable user assertions, and ordinary task requests. Return strict JSON only. Assistant text is never evidence about the user.`;
|
|
3
|
+
function buildUserModelInterpreterPrompt(options) {
|
|
4
|
+
const targets = options.availableTargets?.length ? `\nThese assertion IDs may be targeted for confirm, correction, or forgetting:\n${options.availableTargets.map((item) => `- ${item.id}: ${item.statement}`).join("\n")}` : "\nNo existing assertion IDs are available to target.";
|
|
6
5
|
return `Interpret the evidence-tagged conversation above for ${options.mode === "turn" ? "the latest user turn" : "durable transcript synthesis"}.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
{
|
|
7
|
+
Evidence time: ${options.evidenceTimestamp}
|
|
8
|
+
User timezone: ${options.timezone}
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
Return exactly this top-level shape:
|
|
11
|
+
{"intent":"none","candidates":[],"targetAssertionIds":[],"abstentionReason":"..."}
|
|
12
12
|
|
|
13
13
|
Candidate shape:
|
|
14
|
-
{"
|
|
14
|
+
{"subject":{"type":"user","id":"self"},"predicate":"preference.response.detail","cardinality":"single","scope":{"type":"global"},"kind":"preference","value":"concise","normalizedValue":"concise","statement":"The user prefers concise answers.","authority":"user_observed","confidence":0.9,"declaredImportance":0.8,"inferredImportance":0.6,"consequence":"medium","actionability":1,"volatility":"stable","sensitivity":"normal","disclosurePolicy":"referenceable","applicability":{"operation":"response"},"temporalResolution":"exact","evidence":[{"ref":"entry-id","quote":"exact quote"}],"selfContained":true,"unresolvedReferences":[]}
|
|
15
15
|
|
|
16
|
-
Allowed
|
|
16
|
+
Allowed intents: remember, query, confirm, correct, forget, user_assertion, task, none.
|
|
17
|
+
Allowed subject types: user, person, goal, project, topic.
|
|
18
|
+
Allowed kinds: identity, preference, value, routine, capability, relationship, current_state, derived_insight.
|
|
19
|
+
Allowed scopes: global without id; agent, workspace, project, or session with the exact supplied id.
|
|
17
20
|
|
|
18
21
|
Rules:
|
|
19
|
-
- A question
|
|
20
|
-
- A request to create, summarize, update, investigate, or track
|
|
21
|
-
- Every candidate needs an exact quote from
|
|
22
|
-
- Extract zero to eight independent candidates
|
|
23
|
-
-
|
|
24
|
-
-
|
|
22
|
+
- A question about what is remembered uses query and creates no candidate.
|
|
23
|
+
- A request to create, summarize, update, investigate, or track work uses task, not a user assertion.
|
|
24
|
+
- Every candidate needs an exact quote from a user message. Assistant messages can resolve context but are never evidence.
|
|
25
|
+
- Extract zero to eight independent candidates. Each candidate represents one stable predicate and one value.
|
|
26
|
+
- predicate is a stable language-neutral lowercase identifier. The value is excluded from predicate identity.
|
|
27
|
+
- Preserve importance stated by the user in declaredImportance; estimate inferredImportance separately.
|
|
28
|
+
- Use current_state or event volatility only with a bounded validTo. If relative time cannot be resolved, use temporalResolution=unresolved and omit resolved time fields.
|
|
29
|
+
- Resolve relative time using the evidence time and timezone. Put ISO 8601 timestamps with offsets in validFrom, validTo, and reviewAt.
|
|
30
|
+
- For an explicit correction, set correctionOfAssertionId on the replacement candidate.
|
|
31
|
+
- Set selfContained=false and list unresolvedReferences for unresolved pronouns or references.
|
|
25
32
|
- Omit temporary reactions and one-off task instructions.
|
|
26
33
|
- Never include passwords, credentials, regulated identifiers, or speculative diagnoses.
|
|
27
|
-
-
|
|
34
|
+
- In transcript mode, use system_inferred unless a quoted user message is itself an explicit memory command.
|
|
28
35
|
- If evidence is insufficient, return candidates=[] and explain abstentionReason.
|
|
29
|
-
|
|
30
|
-
${USER_FACING_UNDERSTANDING_WRITING_GUIDANCE}
|
|
31
36
|
${targets}`;
|
|
32
37
|
}
|
|
33
38
|
//#endregion
|
|
34
|
-
export {
|
|
39
|
+
export { USER_MODEL_INTERPRETER_SYSTEM_PROMPT, buildUserModelInterpreterPrompt };
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { Agent } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { Config } from '../../config/schema.js';
|
|
3
|
-
import type
|
|
4
|
-
import type { UnderstandingReviewResult } from '../memory/understanding/types.js';
|
|
3
|
+
import { type UserModelCaptureResult } from '../../user-model/capture/index.js';
|
|
5
4
|
import type { BackgroundReviewSettings } from './settings.js';
|
|
6
|
-
export interface
|
|
5
|
+
export interface RunUserModelReviewParams {
|
|
7
6
|
sessionKey: string;
|
|
8
7
|
mainAgent: Agent;
|
|
9
8
|
settings: BackgroundReviewSettings;
|
|
10
|
-
|
|
9
|
+
workspaceId: string;
|
|
11
10
|
getConfig: () => Config | undefined;
|
|
12
11
|
}
|
|
13
|
-
export interface
|
|
12
|
+
export interface RunTurnUserModelCaptureParams extends Omit<RunUserModelReviewParams, 'settings'> {
|
|
14
13
|
turnId: string;
|
|
15
14
|
userText: string;
|
|
16
15
|
maxHistoryMessages?: number;
|
|
17
16
|
}
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
17
|
+
export declare function runTurnUserModelCapture(params: RunTurnUserModelCaptureParams): Promise<UserModelCaptureResult>;
|
|
18
|
+
export declare function runBackgroundUserModelReview(params: RunUserModelReviewParams): Promise<void>;
|