@xopcai/xopc 0.0.189 → 0.0.190
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/README.zh-CN.md +0 -3
- 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-DTFKTPs8.js → activity-store-DstnJCS5.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DqO25Qe5.js → agent-avatar-dicebear-9vAbkroX.js} +1 -1
- package/dist/gateway/static/root/assets/agents-D1t4SfMQ.js +68 -0
- package/dist/gateway/static/root/assets/{api-DWeXfwVU.js → api-BTL9kayv.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BRpV8PXG.js → app-management-settings-panel-DkFeIdBf.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-3ntKM9nQ.js → appearance-settings-Bxs8Fpaj.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Cgrgu5OW.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Df7Ycj_7.js → archive-plugin-Ch2RmLCC.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-UHgfZYtj.js → attachment-load-BhMQM_Ky.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-CtJxstKh.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BJah99wE.js → binary-plugins-D6CqlymH.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DNlY5KqF.js → block-editor-ClL6HEg9.js} +48 -48
- package/dist/gateway/static/root/assets/browser-settings-page-DW99iDmD.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-vyUfdzAd.js → browser-workflow-inputs-BYy48VhN.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-C1cKZjx-.js → browser-workflows-page-zgLibuMH.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CHUrT9EB.js +7 -0
- package/dist/gateway/static/root/assets/capability-presets-api-BB8t4Ja7.js +1 -0
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-Cycrv0YV.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-BGG2kpJB.js → channel-recipient-api-BThDGiO3.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-V96gPUAU.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-Cz7SAAkm.js +1 -0
- package/dist/gateway/static/root/assets/connectors-api-DS9ED-EL.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-BhlyQoQI.js +2 -0
- package/dist/gateway/static/root/assets/cron-expression-CkgsvhtW.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-BUuBEJuP.js → desktop-pet-Cv8rGhYW.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BGfVIJM3.js → desktop-pet-settings-CIeJdwfV.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DrQFfHH_.js → directory-picker-path-field-D8jXEiAY.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CEnIFOX-.js → extension-debug-page-CCZ9u6TZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CCqHbexs.js → extension-page-CV36ILRG.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-IyQrSILY.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-CgUE2Ii1.js → gateway-config-api-D4_r5iJM.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CYlntpBH.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DxhKNiCF.js → gateway-startup-retry-EO9mKvzE.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-D4SyWob8.js +1 -0
- package/dist/gateway/static/root/assets/home-page-B2Kagoh8.js +3 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DCFdc-HD.js → image-generation-api-Bu7PyVSh.js} +1 -1
- package/dist/gateway/static/root/assets/index-CYT5DOzr.js +150 -0
- package/dist/gateway/static/root/assets/index-D6e3tPL-.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-Bf2VLtXW.js → keyboard-shortcuts-settings-BMhCuVBZ.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BHYbFjqy.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Ca1RuI13.js → local-apps-page-ijIe7_y2.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-deR2zRaE.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-IIn8Tess.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-B3Eop1zn.js → management-settings--V_fovKD.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-BGOYjgnM.js → markdown-split-Dt9-in6W.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CT0txyM4.js → media-plugins-B3pj_iO0.js} +1 -1
- package/dist/gateway/static/root/assets/messages-B4XqB8I6.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-DfKgAe78.js → notes-page-DZ366lIT.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-S2sBVOLw.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-DNrbCgmC.js → page-tabs-C5ge434C.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BTqViDOR.js → preview-open-alternatives-BFa9DgSV.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-C_2L4_Iu.js → product-open-page-Dc9CcWdu.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BilzoCJ7.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-BoQUyacP.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-DUyUaCRF.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-BFLfkDGG.js → schema-form-B84DckWe.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-Dzxlq1F0.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-TzwlZxU6.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-Dp9itvdy.js +1 -0
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-C9a-EbTZ.js → settings-loading-skeleton-CCtlhoy7.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DI9qDH5x.js → settings-page-DQmMKf8r.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-D-LWQdI5.js → settings-page-layout-EQIOJa_L.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CJwmPvgs.js → setup-status-panel-Cwi-SPja.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BKSMG9r5.js → share-preview-page-C4_B2jvf.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CkyuGlZK.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-BJCePQK5.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-BYWLfmJi.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-zsz2HIlZ.js → skills-page.utils-Jhm24i4h.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-IWNDBI1O.js → system-settings-panel-Dpx2ags2.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CgtK02kP.js → task-detail-page-DLAdxI6e.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-BkJe7UDo.js → theme-store-DnBOcGXi.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-C07LGthO.js → typed-models-lib-DULmTHUB.js} +1 -1
- package/dist/gateway/static/root/assets/use-autosave-BrjVk5VH.js +1 -0
- package/dist/gateway/static/root/assets/user-context-page-9AAFpGAL.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-Boue1D46.js → voice-api-key-field-BISTPfq_.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-bbmvCmc8.js → work-discovery-overlay-Wr-uF7VA.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BWds95sL.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DlHv-GZC.js → workflow-run-setup-panel-DHqHP8_6.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-0b4_DFHr.js +11 -0
- package/dist/gateway/static/root/index.html +7 -7
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/tool-activity.js +0 -36
- package/dist/packages/realtime-client/src/index.js +105 -48
- package/dist/packages/realtime-protocol/src/index.js +6 -1
- package/dist/src/agent/agent-manager.d.ts +0 -1
- package/dist/src/agent/agent-manager.js +6 -13
- package/dist/src/agent/background-review/coordinator.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +5 -7
- package/dist/src/agent/bootstrap/bootstrap-cache.d.ts +0 -1
- package/dist/src/agent/bootstrap/bootstrap-cache.js +3 -4
- package/dist/src/agent/bootstrap/bootstrap-files.d.ts +0 -4
- package/dist/src/agent/bootstrap/bootstrap-files.js +3 -4
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -4
- package/dist/src/agent/bootstrap/load-bootstrap-files.d.ts +0 -1
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +1 -14
- package/dist/src/agent/bootstrap/types.d.ts +1 -1
- package/dist/src/agent/context/workspace-templates/SOUL.md +1 -1
- package/dist/src/agent/memory/builtin-provider.d.ts +2 -4
- package/dist/src/agent/memory/builtin-provider.js +35 -15
- package/dist/src/agent/memory/context/types.d.ts +3 -1
- package/dist/src/agent/memory/create-memory-manager.js +2 -0
- package/dist/src/agent/memory/index.d.ts +1 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/memory/manager.d.ts +9 -1
- package/dist/src/agent/memory/manager.js +39 -9
- package/dist/src/agent/memory/memory-config.d.ts +1 -1
- package/dist/src/agent/memory/memory-config.js +1 -1
- package/dist/src/agent/memory/source-origin.js +0 -2
- package/dist/src/agent/memory/types.d.ts +5 -1
- package/dist/src/agent/memory/understanding/service.d.ts +10 -10
- package/dist/src/agent/memory/understanding/service.js +108 -176
- package/dist/src/agent/memory/understanding/types.d.ts +7 -8
- package/dist/src/agent/memory/user-context-coordinator.d.ts +2 -1
- package/dist/src/agent/memory/user-context-coordinator.js +27 -41
- package/dist/src/agent/orchestration/agent-orchestrator.js +4 -7
- package/dist/src/agent/prompt/sections/memory-skills.js +4 -4
- package/dist/src/agent/prompt/sections/tooling.js +0 -10
- package/dist/src/agent/prompt/service-prompt-builder.d.ts +0 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +4 -33
- package/dist/src/agent/prompt/system-prompt.js +1 -2
- package/dist/src/agent/service/direct-turn-helpers.js +1 -1
- package/dist/src/agent/service.d.ts +1 -2
- package/dist/src/agent/service.js +4 -17
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +1 -1
- package/dist/src/agent/tools/dreaming-tool.d.ts +0 -2
- package/dist/src/agent/tools/dreaming-tool.js +13 -38
- package/dist/src/agent/tools/factory.d.ts +0 -3
- package/dist/src/agent/tools/factory.js +1 -10
- package/dist/src/agent/tools/index.d.ts +0 -1
- package/dist/src/agent/tools/index.js +1 -2
- package/dist/src/agent/tools/memory-tool.js +1 -1
- package/dist/src/agent/workspace-runtime/registry.d.ts +3 -5
- package/dist/src/agent/workspace-runtime/registry.js +2 -15
- package/dist/src/agent-manifest/schema.d.ts +17 -17
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/memory-runtime.d.ts +2 -2
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/automations/domain/validation.d.ts +28 -28
- package/dist/src/automations/draft/automation-draft-validator.d.ts +3 -3
- package/dist/src/chat-commands/builtins/understanding.js +2 -5
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/init.js +3 -22
- package/dist/src/cli/templates.js +1 -1
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/paths.d.ts +0 -5
- package/dist/src/config/paths.js +2 -11
- package/dist/src/config/schema.d.ts +24 -117
- package/dist/src/config/schema.js +9 -39
- package/dist/src/connectors/learning-coordinator.js +75 -3
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.js +0 -5
- package/dist/src/gateway/agents-admin.d.ts +0 -7
- package/dist/src/gateway/agents-admin.js +3 -32
- package/dist/src/gateway/dreaming-automation-reconciler.d.ts +3 -3
- package/dist/src/gateway/dreaming-automation-reconciler.js +48 -88
- package/dist/src/gateway/hono/lib/config-payload.d.ts +19 -7
- package/dist/src/gateway/hono/lib/config-payload.js +3 -1
- package/dist/src/gateway/hono/oauth-async.d.ts +1 -0
- package/dist/src/gateway/hono/oauth-async.js +17 -2
- package/dist/src/gateway/hono/routes/agents.js +1 -33
- package/dist/src/gateway/hono/routes/config-patch/misc.js +17 -1
- package/dist/src/gateway/hono/routes/connectors.js +13 -12
- package/dist/src/gateway/hono/routes/index.js +2 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -5
- package/dist/src/gateway/hono/routes/status.js +0 -7
- package/dist/src/gateway/hono/routes/understanding-sources.d.ts +3 -0
- package/dist/src/gateway/hono/routes/understanding-sources.js +203 -0
- package/dist/src/gateway/hono/routes/work-discovery.d.ts +2 -0
- package/dist/src/gateway/hono/routes/work-discovery.js +3 -134
- package/dist/src/gateway/hono/routes/you.d.ts +0 -22
- package/dist/src/gateway/hono/routes/you.js +234 -1118
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +2 -4
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge/connected-understanding-pipeline.d.ts +2 -4
- package/dist/src/knowledge/connected-understanding-pipeline.js +31 -81
- package/dist/src/knowledge/index.js +2 -2
- package/dist/src/knowledge/people-graph.d.ts +22 -25
- package/dist/src/knowledge/people-graph.js +76 -43
- package/dist/src/proactive/execution/context.js +8 -13
- package/dist/src/realtime/broker.d.ts +1 -0
- package/dist/src/realtime/broker.js +19 -2
- package/dist/src/realtime/runtime.js +6 -1
- package/dist/src/storage/sqlite/connector-account-repository.js +0 -1
- package/dist/src/storage/sqlite/context-consolidation-repository.d.ts +37 -0
- package/dist/src/storage/sqlite/context-consolidation-repository.js +64 -0
- package/dist/src/storage/sqlite/fts.d.ts +2 -0
- package/dist/src/storage/sqlite/fts.js +29 -1
- package/dist/src/storage/sqlite/index.d.ts +4 -6
- package/dist/src/storage/sqlite/index.js +5 -7
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +9 -2
- package/dist/src/storage/sqlite/knowledge-repository.js +58 -10
- package/dist/src/storage/sqlite/memory-records-repository.d.ts +7 -56
- package/dist/src/storage/sqlite/memory-records-repository.js +68 -218
- package/dist/src/storage/sqlite/migrations/113_memory_evidence_single_source.sql +54 -0
- package/dist/src/storage/sqlite/migrations/114_user_context_domain.sql +193 -0
- package/dist/src/storage/sqlite/migrations/115_remove_legacy_user_context.sql +6 -0
- package/dist/src/storage/sqlite/migrations/116_structured_context_consolidation.sql +38 -0
- package/dist/src/storage/sqlite/migrations/117_unified_understanding_sources.sql +110 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +0 -20
- package/dist/src/storage/sqlite/user-context-quality-repository.d.ts +34 -0
- package/dist/src/storage/sqlite/user-context-quality-repository.js +74 -0
- package/dist/src/storage/sqlite/user-context-repository.d.ts +64 -0
- package/dist/src/storage/sqlite/user-context-repository.js +383 -0
- package/dist/src/tui/tool-summary.js +1 -7
- package/dist/src/tui/tui-startup-resources.js +1 -2
- package/dist/src/user-context/config.d.ts +17 -210
- package/dist/src/user-context/config.js +19 -85
- package/dist/src/user-context/consolidation.d.ts +26 -0
- package/dist/src/user-context/consolidation.js +115 -0
- package/dist/src/user-context/domain.d.ts +75 -0
- package/dist/src/user-context/domain.js +4 -0
- package/dist/src/user-context/manual-understanding.d.ts +7 -14
- package/dist/src/user-context/manual-understanding.js +19 -54
- package/dist/src/{agent/memory/context → user-context}/planner.d.ts +5 -6
- package/dist/src/user-context/planner.js +311 -0
- package/dist/src/user-context/relationship-continuity.d.ts +3 -6
- package/dist/src/user-context/relationship-continuity.js +39 -32
- package/dist/src/user-context/sources/catalog.d.ts +2 -0
- package/dist/src/user-context/sources/catalog.js +149 -0
- package/dist/src/user-context/sources/index.d.ts +3 -0
- package/dist/src/user-context/sources/index.js +3 -0
- package/dist/src/user-context/sources/repository.d.ts +40 -0
- package/dist/src/user-context/sources/repository.js +164 -0
- package/dist/src/user-context/sources/types.d.ts +83 -0
- package/dist/src/work-discovery/analyzer.d.ts +4 -3
- package/dist/src/work-discovery/analyzer.js +21 -16
- package/dist/src/work-discovery/incremental-repository.js +42 -40
- package/dist/src/work-discovery/index.js +3 -3
- package/dist/src/work-discovery/service.d.ts +7 -7
- package/dist/src/work-discovery/service.js +241 -190
- package/dist/src/work-discovery/source-repository.js +42 -53
- package/dist/src/work-discovery/types.d.ts +2 -14
- package/package.json +3 -8
- package/dist/gateway/static/root/assets/agents-BvdqdER9.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-nKLsfy6C.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-Dh5bdZiN.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CRJ_nAuh.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DeQR5BZt.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-api-D7tkhDMv.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-D7uK3q1p.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-Bw6Dniyq.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-BrUTz4uU.js +0 -1
- package/dist/gateway/static/root/assets/connector-logo-8YU53RUT.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-k9tMiOL5.js +0 -2
- package/dist/gateway/static/root/assets/cron-expression-B3B1eqnr.js +0 -2
- package/dist/gateway/static/root/assets/extension-settings-page-DEZw_7zN.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Dg8qCiIp.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-27tRzDEo.js +0 -1
- package/dist/gateway/static/root/assets/home-page-VA511kMr.js +0 -3
- package/dist/gateway/static/root/assets/index-BvR-i-m6.js +0 -216
- package/dist/gateway/static/root/assets/index-zybP34zk.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CaJq4-wV.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-DUW5YE3R.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-BLTCg69e.js +0 -2
- package/dist/gateway/static/root/assets/messages-CMjnbdbn.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-Bp1w9UM1.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-CZmbPDQN.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D5pzqfm5.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CC-XhVGI.js +0 -1
- package/dist/gateway/static/root/assets/segmented-styles-BL8oLBEp.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-B2eTLVDV.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CRuZ_bl0.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-C4GXGeA4.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-YzSDS4G_.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CwOo8zZk.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-xd1cgSGN.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-CstQ___Y.js +0 -1
- package/dist/gateway/static/root/assets/use-save-bar-registration-CQYE0l6z.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-BnQAWS_B.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-CAszL1y8.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-DxGzo3-x.js +0 -11
- package/dist/src/agent/code-intelligence/binary.d.ts +0 -15
- package/dist/src/agent/code-intelligence/binary.js +0 -372
- package/dist/src/agent/code-intelligence/index.d.ts +0 -4
- package/dist/src/agent/code-intelligence/index.js +0 -4
- package/dist/src/agent/code-intelligence/runtime.d.ts +0 -34
- package/dist/src/agent/code-intelligence/runtime.js +0 -280
- package/dist/src/agent/code-intelligence/tool-gating.d.ts +0 -5
- package/dist/src/agent/code-intelligence/tool-gating.js +0 -6
- package/dist/src/agent/code-intelligence/tools.d.ts +0 -6
- package/dist/src/agent/code-intelligence/tools.js +0 -266
- package/dist/src/agent/code-intelligence/types.d.ts +0 -22
- package/dist/src/agent/memory/context/planner.js +0 -286
- package/dist/src/agent/memory/dreaming/config.d.ts +0 -48
- package/dist/src/agent/memory/dreaming/config.js +0 -98
- package/dist/src/agent/memory/dreaming/constants.d.ts +0 -12
- package/dist/src/agent/memory/dreaming/constants.js +0 -18
- package/dist/src/agent/memory/dreaming/deep-promotion.d.ts +0 -19
- package/dist/src/agent/memory/dreaming/deep-promotion.js +0 -152
- package/dist/src/agent/memory/dreaming/light-sweep.d.ts +0 -16
- package/dist/src/agent/memory/dreaming/light-sweep.js +0 -115
- package/dist/src/agent/memory/dreaming/preview.d.ts +0 -23
- package/dist/src/agent/memory/dreaming/preview.js +0 -52
- package/dist/src/agent/memory/dreaming/promotion-lifecycle.d.ts +0 -16
- package/dist/src/agent/memory/dreaming/promotion-lifecycle.js +0 -44
- package/dist/src/agent/memory/dreaming/rem-patterns.d.ts +0 -19
- package/dist/src/agent/memory/dreaming/rem-patterns.js +0 -150
- package/dist/src/agent/memory/dreaming/runner.d.ts +0 -10
- package/dist/src/agent/memory/dreaming/runner.js +0 -78
- package/dist/src/agent/memory/dreaming/schedule.d.ts +0 -23
- package/dist/src/agent/memory/dreaming/schedule.js +0 -38
- package/dist/src/agent/memory/dreaming/scope.d.ts +0 -11
- package/dist/src/agent/memory/dreaming/scope.js +0 -33
- package/dist/src/agent/memory/dreaming/utils.d.ts +0 -3
- package/dist/src/agent/memory/dreaming/utils.js +0 -31
- package/dist/src/gateway/hono/routes/memory.d.ts +0 -3
- package/dist/src/gateway/hono/routes/memory.js +0 -460
- package/dist/src/storage/sqlite/dreaming-repository.d.ts +0 -61
- package/dist/src/storage/sqlite/dreaming-repository.js +0 -88
- package/dist/src/storage/sqlite/memory-readiness-repository.d.ts +0 -7
- package/dist/src/storage/sqlite/memory-readiness-repository.js +0 -30
- package/dist/src/storage/sqlite/memory-reference-consent-repository.d.ts +0 -27
- package/dist/src/storage/sqlite/memory-reference-consent-repository.js +0 -107
- package/dist/src/storage/sqlite/user-claims-repository.d.ts +0 -101
- package/dist/src/storage/sqlite/user-claims-repository.js +0 -241
- package/dist/src/storage/sqlite/user-profile-setup-repository.d.ts +0 -3
- package/dist/src/storage/sqlite/user-profile-setup-repository.js +0 -32
- package/dist/src/user-context/actionableInsights.d.ts +0 -14
- package/dist/src/user-context/actionableInsights.js +0 -34
- package/dist/src/user-context/context-compiler.d.ts +0 -27
- package/dist/src/user-context/context-compiler.js +0 -48
- package/dist/src/user-context/import.d.ts +0 -12
- package/dist/src/user-context/import.js +0 -51
- package/dist/src/user-context/memory-episode-evaluator.d.ts +0 -32
- package/dist/src/user-context/memory-episode-evaluator.js +0 -35
- package/dist/src/user-context/memory-readiness.d.ts +0 -33
- package/dist/src/user-context/memory-readiness.js +0 -41
- package/dist/src/user-context/memory-use-audit.d.ts +0 -10
- package/dist/src/user-context/memory-use-audit.js +0 -26
- package/dist/src/user-context/personal-playbook.d.ts +0 -11
- package/dist/src/user-context/personal-playbook.js +0 -41
- package/dist/src/user-context/profile.d.ts +0 -37
- package/dist/src/user-context/profile.js +0 -163
- package/dist/src/user-context/projection.d.ts +0 -120
- package/dist/src/user-context/projection.js +0 -262
- package/dist/src/user-context/source-recommendations.d.ts +0 -13
- package/dist/src/user-context/source-recommendations.js +0 -85
- /package/dist/src/{agent/code-intelligence → user-context/sources}/types.js +0 -0
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
4
|
+
import { getUserProfile } from "../../storage/sqlite/user-context-repository.js";
|
|
4
5
|
import { buildInteractionStatePrompt } from "../../user-context/interaction-state.js";
|
|
5
6
|
import { getInteractionState } from "../../storage/sqlite/interaction-state-repository.js";
|
|
6
|
-
import { buildRelationshipPrompt, getRelationshipSettings } from "../../storage/sqlite/relationship-settings-repository.js";
|
|
7
|
-
import { listMemoryRecords } from "../../storage/sqlite/memory-records-repository.js";
|
|
8
7
|
import { DEFAULT_USER_TRUST_LEVEL } from "../../user-context/trust-policy.js";
|
|
9
8
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
10
9
|
import "../../storage/sqlite/index.js";
|
|
11
|
-
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
12
10
|
import { resolveSystemPromptBuildParams } from "./system-prompt-params.js";
|
|
13
11
|
import { buildSystemPrompt } from "./system-prompt.js";
|
|
14
12
|
import { resolveResponseLanguageForSession } from "./response-language.js";
|
|
15
13
|
import { buildTtsSystemPromptHint } from "../../voice/tts/directives.js";
|
|
16
14
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
17
|
-
import { buildPersonalPlaybookPrompt } from "../../user-context/personal-playbook.js";
|
|
18
|
-
import { buildRelationshipContinuityPrompt } from "../../user-context/relationship-continuity.js";
|
|
19
15
|
//#region src/agent/prompt/service-prompt-builder.ts
|
|
20
|
-
init_session_key();
|
|
21
16
|
init_logger();
|
|
22
17
|
const log = createLogger("SystemPromptBuilder");
|
|
23
18
|
var SystemPromptBuilder = class {
|
|
@@ -32,21 +27,10 @@ var SystemPromptBuilder = class {
|
|
|
32
27
|
build(contextFiles, options) {
|
|
33
28
|
const ws = options.workspaceOverride ?? this.workspace;
|
|
34
29
|
const actionTrustLevel = isXopcDatabaseOpen() ? getUserTrustPolicy().defaultActionLevel : DEFAULT_USER_TRUST_LEVEL;
|
|
35
|
-
const relationshipPrompt = isXopcDatabaseOpen() ? buildRelationshipPrompt(getRelationshipSettings()) : "";
|
|
36
30
|
const interactionState = isXopcDatabaseOpen() && options.sessionKey ? getInteractionState(options.sessionKey) : void 0;
|
|
37
|
-
const session = parseSessionKey(options.sessionKey);
|
|
38
|
-
const activeMemories = isXopcDatabaseOpen() ? listMemoryRecords({
|
|
39
|
-
status: "active",
|
|
40
|
-
limit: 500
|
|
41
|
-
}) : [];
|
|
42
|
-
const playbookPrompt = isXopcDatabaseOpen() ? buildPersonalPlaybookPrompt(activeMemories, {
|
|
43
|
-
...session ? { channel: session.source } : {},
|
|
44
|
-
...interactionState ? { supportNeed: interactionState.supportNeed } : {}
|
|
45
|
-
}) : "";
|
|
46
|
-
const continuityPrompt = buildRelationshipContinuityPrompt(activeMemories);
|
|
47
31
|
const interactionPrompt = interactionState ? buildInteractionStatePrompt(interactionState) : "";
|
|
48
32
|
const heartbeatEnabled = this.config.gateway?.heartbeat?.includeSystemPromptSection ?? false;
|
|
49
|
-
const userTimezone =
|
|
33
|
+
const userTimezone = isXopcDatabaseOpen() ? getUserProfile().timezone || void 0 : void 0;
|
|
50
34
|
const ttsMerged = mergeTtsConfigFromAppConfig(this.config.messages?.tts);
|
|
51
35
|
const reg = options.registeredToolNames ?? [];
|
|
52
36
|
const ttsSystemHint = buildTtsSystemPromptHint({
|
|
@@ -66,13 +50,7 @@ var SystemPromptBuilder = class {
|
|
|
66
50
|
externalMemoryInstructions: options.externalMemoryInstructions,
|
|
67
51
|
heartbeatEnabled,
|
|
68
52
|
ttsSystemHint,
|
|
69
|
-
extraSystemPrompt: [
|
|
70
|
-
options.extraSystemPrompt,
|
|
71
|
-
relationshipPrompt,
|
|
72
|
-
playbookPrompt,
|
|
73
|
-
interactionPrompt,
|
|
74
|
-
continuityPrompt
|
|
75
|
-
].filter(Boolean).join("\n\n"),
|
|
53
|
+
extraSystemPrompt: [options.extraSystemPrompt, interactionPrompt].filter(Boolean).join("\n\n"),
|
|
76
54
|
activeProjectContext: options.activeProjectContext,
|
|
77
55
|
modelRef: options.modelRef,
|
|
78
56
|
agentId: options.agentId,
|
|
@@ -122,13 +100,6 @@ var SystemPromptBuilder = class {
|
|
|
122
100
|
this.skillManager.reload();
|
|
123
101
|
return this.build(contextFiles, options);
|
|
124
102
|
}
|
|
125
|
-
extractTimezone(contextFiles) {
|
|
126
|
-
const userContext = contextFiles.find((file) => file.path.replace(/\\/g, "/").toLowerCase().endsWith("/user/profile.md"));
|
|
127
|
-
if (userContext?.content) {
|
|
128
|
-
const match = userContext.content.match(/Timezone:\s*(.+)/i);
|
|
129
|
-
if (match) return match[1].trim();
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
103
|
getSkillPrompt() {
|
|
133
104
|
return this.skillManager.getPrompt();
|
|
134
105
|
}
|
|
@@ -138,7 +109,7 @@ var SystemPromptBuilder = class {
|
|
|
138
109
|
workspaceDir: ws,
|
|
139
110
|
sessionKey: options?.sessionKey,
|
|
140
111
|
toolNames: options?.registeredToolNames,
|
|
141
|
-
userTimezone:
|
|
112
|
+
userTimezone: isXopcDatabaseOpen() ? getUserProfile().timezone || void 0 : void 0,
|
|
142
113
|
externalMemoryInstructions: options?.externalMemoryInstructions,
|
|
143
114
|
heartbeatEnabled: this.config.gateway?.heartbeat?.includeSystemPromptSection ?? false
|
|
144
115
|
});
|
|
@@ -117,8 +117,7 @@ function buildCoderHarnessSection() {
|
|
|
117
117
|
return [
|
|
118
118
|
"## Coder Harness",
|
|
119
119
|
"- Inspect relevant repository instructions, files, symbols, tests, and call sites before editing.",
|
|
120
|
-
"-
|
|
121
|
-
"- Treat code intelligence as indexed evidence, not ground truth: honor freshness and coverage warnings, and verify affected source directly before editing or making absence claims.",
|
|
120
|
+
"- Use grep and find to locate code, then read the current source before editing or claiming that something is absent.",
|
|
122
121
|
"- Make the smallest coherent source change that solves the requested behavior.",
|
|
123
122
|
"- Protect user work: do not discard or overwrite unrelated changes.",
|
|
124
123
|
"- After edits, inspect the diff and run the smallest meaningful verification; explain any skipped checks.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildTaskExecutionDirective } from "../../tasks/task-context-assembler.js";
|
|
2
2
|
import { resolveImageHandlingStrategy } from "../image/vision-detection.js";
|
|
3
3
|
import { hydrateUserTurnForLlm } from "../inbound/attachment-pipeline.js";
|
|
4
|
-
import { prependAgentContext } from "
|
|
4
|
+
import { prependAgentContext } from "../../user-context/planner.js";
|
|
5
5
|
import { extractAgentUserPlainText } from "../memory/user-message-text.js";
|
|
6
6
|
import { shouldSkipResetOverlapCommand } from "../../session/reset-triggers.js";
|
|
7
7
|
import { parseSlashCommand } from "../../chat-commands/command-parse.js";
|
|
@@ -130,7 +130,6 @@ export declare class AgentService {
|
|
|
130
130
|
takeTaskReviewStreamHint(sessionKey: string): import("./session/session-state-bag.js").TaskReviewStreamHint;
|
|
131
131
|
start(): Promise<void>;
|
|
132
132
|
stop(): Promise<void>;
|
|
133
|
-
reconcileDreamingNow(): Promise<void>;
|
|
134
133
|
/**
|
|
135
134
|
* Persist agent messages with the same sanitizer + transcript hygiene as AgentOrchestrator.
|
|
136
135
|
* Uses persistence hygiene so `thinking` blocks remain on disk for the web UI (LLM load path still drops them).
|
|
@@ -176,7 +175,7 @@ export declare class AgentService {
|
|
|
176
175
|
getEffectiveWorkspacePathForSession(sessionKey: string): Promise<string>;
|
|
177
176
|
/**
|
|
178
177
|
* Best-effort timezone resolution for webchat envelope timestamps.
|
|
179
|
-
* Reads the global user profile
|
|
178
|
+
* Reads the structured global user profile.
|
|
180
179
|
*/
|
|
181
180
|
resolveUserTimezoneForSession(sessionKey: string): string | undefined;
|
|
182
181
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getUserProfile } from "../storage/sqlite/user-context-repository.js";
|
|
3
4
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
5
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
6
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
6
7
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
7
8
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
8
|
-
import { init_paths, resolveUserProfilePath } from "../config/paths.js";
|
|
9
9
|
import { extractTextContent } from "./context/workspace.js";
|
|
10
10
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
11
11
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
@@ -57,19 +57,17 @@ import { SessionHydrator } from "./session/session-hydrator.js";
|
|
|
57
57
|
import { SessionInspector } from "./session/session-inspector.js";
|
|
58
58
|
import "./session/index.js";
|
|
59
59
|
import { AgentOrchestrator } from "./orchestration/agent-orchestrator.js";
|
|
60
|
-
import { AgentEventHandler
|
|
60
|
+
import { AgentEventHandler } from "./orchestration/agent-event-handler.js";
|
|
61
61
|
import "./orchestration/index.js";
|
|
62
62
|
import { getWorkflowProgressBroker } from "./workflow/progress-broker.js";
|
|
63
63
|
import "./workflow/index.js";
|
|
64
64
|
import { TaskJudgeService } from "./tasks/task-judge-service.js";
|
|
65
65
|
import { analyzeResponseLanguage } from "../i18n/language-consistency.js";
|
|
66
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
67
66
|
import { readFile } from "node:fs/promises";
|
|
68
67
|
//#region src/agent/service.ts
|
|
69
68
|
init_schema();
|
|
70
69
|
init_logger();
|
|
71
70
|
init_agent_scope();
|
|
72
|
-
init_paths();
|
|
73
71
|
const log = createLogger("AgentService");
|
|
74
72
|
function assistantMessageText(message) {
|
|
75
73
|
const content = message.content;
|
|
@@ -252,12 +250,6 @@ var AgentService = class {
|
|
|
252
250
|
errorPatternMatcher: this.errorPatternMatcher,
|
|
253
251
|
turnDiffTracker: this.turnDiffTracker
|
|
254
252
|
});
|
|
255
|
-
this.agentEventHandler.registerListener("tool_execution_end", (event, context) => {
|
|
256
|
-
const e = event;
|
|
257
|
-
if (e.isError) return;
|
|
258
|
-
const changedPaths = readChangedPathsFromToolEnd(e.toolName, e.args, e.result);
|
|
259
|
-
this.agentManager.markCodeIntelligenceDirty(context.sessionKey, changedPaths);
|
|
260
|
-
});
|
|
261
253
|
this.agentEventHandler.registerListener("message_end", (event, context) => {
|
|
262
254
|
const message = event.message;
|
|
263
255
|
if (message.role !== "assistant") return;
|
|
@@ -629,9 +621,6 @@ var AgentService = class {
|
|
|
629
621
|
log.debug("Agent service stopped");
|
|
630
622
|
return Promise.resolve();
|
|
631
623
|
}
|
|
632
|
-
async reconcileDreamingNow() {
|
|
633
|
-
return Promise.resolve();
|
|
634
|
-
}
|
|
635
624
|
/**
|
|
636
625
|
* Persist agent messages with the same sanitizer + transcript hygiene as AgentOrchestrator.
|
|
637
626
|
* Uses persistence hygiene so `thinking` blocks remain on disk for the web UI (LLM load path still drops them).
|
|
@@ -769,14 +758,12 @@ var AgentService = class {
|
|
|
769
758
|
}
|
|
770
759
|
/**
|
|
771
760
|
* Best-effort timezone resolution for webchat envelope timestamps.
|
|
772
|
-
* Reads the global user profile
|
|
761
|
+
* Reads the structured global user profile.
|
|
773
762
|
*/
|
|
774
763
|
resolveUserTimezoneForSession(sessionKey) {
|
|
775
764
|
try {
|
|
776
765
|
if (!this.effectiveAppConfig()) return void 0;
|
|
777
|
-
|
|
778
|
-
if (!existsSync(userPath)) return void 0;
|
|
779
|
-
return readFileSync(userPath, "utf-8").match(/Timezone:\s*(.+)/i)?.[1]?.trim() || void 0;
|
|
766
|
+
return getUserProfile().timezone || void 0;
|
|
780
767
|
} catch {
|
|
781
768
|
return;
|
|
782
769
|
}
|
|
@@ -202,7 +202,7 @@ function convertListItemToPackageItem(item) {
|
|
|
202
202
|
}
|
|
203
203
|
function convertSearchResultToPackageItem(item, enrichment) {
|
|
204
204
|
return {
|
|
205
|
-
id: item.
|
|
205
|
+
id: item.install?.reference ?? item.slug,
|
|
206
206
|
name: item.displayName || item.slug,
|
|
207
207
|
type: "skill",
|
|
208
208
|
description: item.summary || "",
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { Config } from '../../config/schema.js';
|
|
3
3
|
export interface DreamingToolDeps {
|
|
4
|
-
getWorkspace: () => string;
|
|
5
4
|
getConfig: () => Config | undefined;
|
|
6
|
-
getAgentId?: () => string | undefined;
|
|
7
5
|
}
|
|
8
6
|
export declare function createDreamingTool(deps: DreamingToolDeps): AgentTool;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { evaluateMemoryReadiness } from "../../user-context/memory-readiness.js";
|
|
3
|
-
import { getMemoryReadiness } from "../../storage/sqlite/memory-readiness-repository.js";
|
|
4
|
-
import { listDreamingRuns } from "../../storage/sqlite/dreaming-repository.js";
|
|
5
|
-
import { listMemorySignals } from "../../storage/sqlite/memory-records-repository.js";
|
|
1
|
+
import { listContextConsolidationRuns } from "../../storage/sqlite/context-consolidation-repository.js";
|
|
6
2
|
import "../../storage/sqlite/index.js";
|
|
7
|
-
import {
|
|
3
|
+
import { resolveContextConsolidationConfig } from "../../user-context/consolidation.js";
|
|
8
4
|
import { Type } from "@sinclair/typebox";
|
|
9
5
|
//#region src/agent/tools/dreaming-tool.ts
|
|
10
6
|
const DreamingSchema = Type.Object({ action: Type.Literal("status") });
|
|
@@ -12,44 +8,23 @@ function createDreamingTool(deps) {
|
|
|
12
8
|
return {
|
|
13
9
|
name: "dreaming",
|
|
14
10
|
label: "💤 Dreaming",
|
|
15
|
-
description: "Show
|
|
11
|
+
description: "Show structured user-context review configuration and recent activity.",
|
|
16
12
|
parameters: DreamingSchema,
|
|
17
13
|
async execute() {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
agentId,
|
|
22
|
-
workspaceId
|
|
23
|
-
}) : evaluateMemoryReadiness({
|
|
24
|
-
evaluatedTurns: 0,
|
|
25
|
-
helpfulTurns: 0,
|
|
26
|
-
recordFeedback: 0,
|
|
27
|
-
recordErrors: 0,
|
|
28
|
-
sensitiveFeedback: 0,
|
|
29
|
-
dreamingRuns: 0,
|
|
30
|
-
dreamingFailures: 0
|
|
31
|
-
});
|
|
32
|
-
const resolved = resolveDreamingConfig(deps.getConfig(), { automaticReady: readiness.ready });
|
|
33
|
-
const signals = listMemorySignals({
|
|
34
|
-
workspaceId,
|
|
35
|
-
limit: 500
|
|
36
|
-
});
|
|
37
|
-
const runs = listDreamingRuns({
|
|
38
|
-
agentId,
|
|
39
|
-
workspaceId,
|
|
40
|
-
limit: 20
|
|
41
|
-
});
|
|
14
|
+
const config = deps.getConfig();
|
|
15
|
+
const resolved = config ? resolveContextConsolidationConfig(config) : null;
|
|
16
|
+
const runs = listContextConsolidationRuns(20);
|
|
42
17
|
return {
|
|
43
18
|
content: [{
|
|
44
19
|
type: "text",
|
|
45
20
|
text: JSON.stringify({
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
21
|
+
enabled: resolved?.enabled ?? false,
|
|
22
|
+
schedule: resolved ? {
|
|
23
|
+
time: resolved.time,
|
|
24
|
+
timezone: resolved.timezone
|
|
25
|
+
} : null,
|
|
26
|
+
policy: "review_only",
|
|
27
|
+
storage: "sqlite://user_understandings",
|
|
53
28
|
lastRun: runs[0] ?? null
|
|
54
29
|
}, null, 2)
|
|
55
30
|
}],
|
|
@@ -25,7 +25,6 @@ import type { LocalAppService } from '../../local-apps/index.js';
|
|
|
25
25
|
import type { WorkflowRunServiceLike } from '../../workflows/service/workflow-run-service.types.js';
|
|
26
26
|
import type { SkillManager } from '../skills/skill-manager.js';
|
|
27
27
|
import { type ToolExecutorConfig } from './executor.js';
|
|
28
|
-
import type { CodeIntelligenceRuntimeLike } from '../code-intelligence/index.js';
|
|
29
28
|
export interface ToolFactoryDeps {
|
|
30
29
|
workspace: string;
|
|
31
30
|
extensionRegistry?: ExtensionRegistry;
|
|
@@ -77,8 +76,6 @@ export interface ToolFactoryDeps {
|
|
|
77
76
|
installSkillFromSource?: (opts: SkillInstallToolOptions) => Promise<SkillInstallToolResult>;
|
|
78
77
|
/** Install a managed skill from a built-in marketplace provider. */
|
|
79
78
|
installSkillFromMarketplace?: (opts: MarketplaceSkillInstallToolOptions) => Promise<MarketplaceSkillInstallToolResult>;
|
|
80
|
-
/** Workspace-scoped structural code intelligence runtime. */
|
|
81
|
-
getCodeIntelligenceRuntime?: (workspace: string) => CodeIntelligenceRuntimeLike;
|
|
82
79
|
}
|
|
83
80
|
export interface CreateCoreToolsOptions {
|
|
84
81
|
/** Workspace root for file/command tools (defaults to factory workspace). */
|
|
@@ -43,7 +43,6 @@ import { createSkillsMarketplaceSearchTool } from "./skills-marketplace-search-t
|
|
|
43
43
|
import { createSkillInstallTool } from "./skill-install-tool.js";
|
|
44
44
|
import { createToolManualTool } from "./tool-manual-tool.js";
|
|
45
45
|
import { createDesktopPetTool } from "./desktop-pet-tool.js";
|
|
46
|
-
import { createCodeIntelligenceTools } from "../code-intelligence/tools.js";
|
|
47
46
|
import { createManagedJobTool } from "./managed-job-tool.js";
|
|
48
47
|
import { createImageTool } from "./image-tool.js";
|
|
49
48
|
import { createImageGenerateTool } from "./image-generate-tool.js";
|
|
@@ -54,7 +53,6 @@ import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
|
54
53
|
import { createTextToSpeechTool } from "./tts-tool.js";
|
|
55
54
|
import { getAgentCapabilityToolNames } from "../capabilities/registry.js";
|
|
56
55
|
import "../capabilities/index.js";
|
|
57
|
-
import { isCodeIntelligenceEnabledForAgent } from "../code-intelligence/tool-gating.js";
|
|
58
56
|
//#region src/agent/tools/factory.ts
|
|
59
57
|
init_agent_scope();
|
|
60
58
|
init_logger();
|
|
@@ -175,9 +173,7 @@ var AgentToolsFactory = class {
|
|
|
175
173
|
workspace,
|
|
176
174
|
agentId: options?.agentId ?? (cfg ? resolveDefaultAgentId(cfg) : "main")
|
|
177
175
|
});
|
|
178
|
-
const codeIntelligenceConfig = cfg?.codeIntelligence;
|
|
179
176
|
const agentId = options?.agentId;
|
|
180
|
-
const codeIntelligenceTools = isCodeIntelligenceEnabledForAgent(codeIntelligenceConfig, agentId) && this.deps.getCodeIntelligenceRuntime ? createCodeIntelligenceTools({ getRuntime: () => this.deps.getCodeIntelligenceRuntime(workspace) }) : [];
|
|
181
177
|
const externalTools = createDefaultExternalToolGatewayTools({
|
|
182
178
|
workspace,
|
|
183
179
|
getConfig: () => this.deps.getConfig?.(),
|
|
@@ -199,11 +195,7 @@ var AgentToolsFactory = class {
|
|
|
199
195
|
const find = createFindTool(workspace);
|
|
200
196
|
return filterToolsByDisabledSet([
|
|
201
197
|
createSessionStatusTool(),
|
|
202
|
-
createDreamingTool({
|
|
203
|
-
getWorkspace: () => workspace,
|
|
204
|
-
getConfig: () => this.deps.getConfig?.(),
|
|
205
|
-
getAgentId: () => options?.agentId
|
|
206
|
-
}),
|
|
198
|
+
createDreamingTool({ getConfig: () => this.deps.getConfig?.() }),
|
|
207
199
|
createToolManualTool(),
|
|
208
200
|
createClarifyTool({ resolveAskUser: () => {
|
|
209
201
|
const req = this.deps.gatewayClarify?.requestClarification;
|
|
@@ -254,7 +246,6 @@ var AgentToolsFactory = class {
|
|
|
254
246
|
getSessionKey: () => this.deps.getCurrentContext()?.sessionKey
|
|
255
247
|
})] : [],
|
|
256
248
|
readTool,
|
|
257
|
-
...codeIntelligenceTools,
|
|
258
249
|
writeTool,
|
|
259
250
|
applyPatchTool,
|
|
260
251
|
listDir,
|
|
@@ -33,7 +33,6 @@ export { createSkillsMarketplaceSearchTool, type SkillsMarketplaceSearchToolDeps
|
|
|
33
33
|
export { createSkillInstallTool, type SkillInstallToolDeps, type SkillInstallToolOptions, type SkillInstallToolResult, type MarketplaceSkillInstallToolOptions, type MarketplaceSkillInstallToolResult, } from './skill-install-tool.js';
|
|
34
34
|
export { createToolManualTool } from './tool-manual-tool.js';
|
|
35
35
|
export { createDesktopPetTool, type DesktopPetCreateDetails } from './desktop-pet-tool.js';
|
|
36
|
-
export { createCodeIntelligenceTools } from '../code-intelligence/tools.js';
|
|
37
36
|
export { createManagedJobTool } from './managed-job-tool.js';
|
|
38
37
|
export { createImageTool, resolveImageModelConfigForTool } from './image-tool.js';
|
|
39
38
|
export { createImageGenerateTool, resolveImageGenerationModelConfigForTool } from './image-generate-tool.js';
|
|
@@ -37,9 +37,8 @@ import { createSkillsMarketplaceSearchTool } from "./skills-marketplace-search-t
|
|
|
37
37
|
import { createSkillInstallTool } from "./skill-install-tool.js";
|
|
38
38
|
import { createToolManualTool } from "./tool-manual-tool.js";
|
|
39
39
|
import { createDesktopPetTool } from "./desktop-pet-tool.js";
|
|
40
|
-
import { createCodeIntelligenceTools } from "../code-intelligence/tools.js";
|
|
41
40
|
import { createManagedJobTool } from "./managed-job-tool.js";
|
|
42
41
|
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
43
42
|
import { createImageTool } from "./image-tool.js";
|
|
44
43
|
import { createImageGenerateTool, resolveImageGenerationModelConfigForTool } from "./image-generate-tool.js";
|
|
45
|
-
export { BrowserManager, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, SANDBOX_ALLOWED_TOOLS, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, buildSandboxToolMap, createApplyPatchTool, createAutomationTool, createBrowserRecipeTool, createClarifyTool,
|
|
44
|
+
export { BrowserManager, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, SANDBOX_ALLOWED_TOOLS, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, buildSandboxToolMap, createApplyPatchTool, createAutomationTool, createBrowserRecipeTool, createClarifyTool, createCreateShareTool, createDelegateTool, createDesktopPetTool, createDreamingTool, createExecCommandTool, createExecuteCodeTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createListDirTool, createManagedJobTool, createMemoryGetTool, createMemorySearchTool, createMessageTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createWebExtractTool, createWebFetchTool, createWebSearchTool, createWorkflowTool, createWriteFileTool, createXopcUseTool, findTool, formatSize, fuzzyFindText, generateDiffString, getToolMetadata, grepTool, isShareToolAvailable, listDirTool, normalizeForFuzzyMatch, normalizeToLF, resolveImageGenerationModelConfigForTool, resolveImageModelConfigForTool, resolveToolLockMode, restoreLineEndings, stripBom, stripHtmlBoilerplate, truncateHead, truncateLine, truncateTail, writeFileTool };
|
|
@@ -10,7 +10,7 @@ function createMemorySearchTool(options) {
|
|
|
10
10
|
return {
|
|
11
11
|
name: "memory_search",
|
|
12
12
|
label: "🔍 Memory Search",
|
|
13
|
-
description: "Search
|
|
13
|
+
description: "Search workspace and connected-source memory records for prior work, decisions, dates, people, or todos; returns ranked snippets with stable record ids.",
|
|
14
14
|
parameters: MemorySearchSchema,
|
|
15
15
|
async execute(_toolCallId, params, _signal) {
|
|
16
16
|
const { query, maxResults, minScore } = params;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* `MemoryManager`) were created inline inside
|
|
6
6
|
* `AgentManager.getWorkspaceRuntime` and cached in a private Map. They live
|
|
7
7
|
* outside `AgentInstance` because multiple session keys for the same agent may
|
|
8
|
-
* share a workspace. Skill
|
|
9
|
-
*
|
|
8
|
+
* share a workspace. Skill and prompt state stays keyed by agent and workspace,
|
|
9
|
+
* while memory comes from one process-wide user context.
|
|
10
10
|
*
|
|
11
11
|
* Extracted so:
|
|
12
|
-
* - `AgentManager` no longer
|
|
12
|
+
* - `AgentManager` no longer owns workspace-scoped runtime caches.
|
|
13
13
|
* - Hot-reload teardown (`clearAll`) shuts down the shared user context once.
|
|
14
14
|
* - Future per-workspace runtimes (e.g. embedding store, vector cache) plug in
|
|
15
15
|
* through `getOrCreate` without touching `AgentManager`.
|
|
@@ -18,12 +18,10 @@ import type { Config } from '../../config/schema.js';
|
|
|
18
18
|
import type { MemoryManager } from '../memory/manager.js';
|
|
19
19
|
import { SkillManager } from '../skills/skill-manager.js';
|
|
20
20
|
import { SystemPromptBuilder } from '../prompt/service-prompt-builder.js';
|
|
21
|
-
import { CodeIntelligenceRuntime } from '../code-intelligence/index.js';
|
|
22
21
|
export interface WorkspaceRuntime {
|
|
23
22
|
skillManager: SkillManager;
|
|
24
23
|
systemPromptBuilder: SystemPromptBuilder;
|
|
25
24
|
memoryManager: MemoryManager;
|
|
26
|
-
codeIntelligence: CodeIntelligenceRuntime;
|
|
27
25
|
}
|
|
28
26
|
export interface WorkspaceRuntimeRegistryOptions {
|
|
29
27
|
/** Effective config snapshot accessor (must always return a value when called). */
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { createLogger } from "../../utils/logger/index.js";
|
|
2
|
-
import { init_logger } from "../../utils/logger.js";
|
|
3
1
|
import { init_agent_session_key, normalizeAgentId } from "../../routing/agent-session-key.js";
|
|
4
2
|
import { init_agent_scope, resolveAgentIdForWorkspacePath } from "../agent-scope.js";
|
|
5
3
|
import { SkillManager } from "../skills/skill-manager.js";
|
|
6
4
|
import { SystemPromptBuilder } from "../prompt/service-prompt-builder.js";
|
|
7
|
-
import { CodeIntelligenceRuntime } from "../code-intelligence/runtime.js";
|
|
8
|
-
import "../code-intelligence/index.js";
|
|
9
5
|
import { UserContextRuntimeRegistry } from "../../user-context/runtime.js";
|
|
10
6
|
//#region src/agent/workspace-runtime/registry.ts
|
|
11
7
|
init_agent_session_key();
|
|
12
8
|
init_agent_scope();
|
|
13
|
-
init_logger();
|
|
14
|
-
const log = createLogger("WorkspaceRuntimeRegistry");
|
|
15
9
|
var WorkspaceRuntimeRegistry = class {
|
|
16
10
|
runtimes = /* @__PURE__ */ new Map();
|
|
17
11
|
notifiedWorkspacePaths = /* @__PURE__ */ new Set();
|
|
@@ -41,11 +35,7 @@ var WorkspaceRuntimeRegistry = class {
|
|
|
41
35
|
config: cfg,
|
|
42
36
|
skillManager
|
|
43
37
|
}),
|
|
44
|
-
memoryManager
|
|
45
|
-
codeIntelligence: new CodeIntelligenceRuntime({
|
|
46
|
-
workspace: resolvedPath,
|
|
47
|
-
getConfig: this.getConfig
|
|
48
|
-
})
|
|
38
|
+
memoryManager
|
|
49
39
|
};
|
|
50
40
|
this.runtimes.set(runtimeKey, rt);
|
|
51
41
|
if (!this.notifiedWorkspacePaths.has(resolvedPath)) {
|
|
@@ -63,12 +53,9 @@ var WorkspaceRuntimeRegistry = class {
|
|
|
63
53
|
* Used by `AgentManager.updateAgentDefaults` and `AgentManager.dispose`.
|
|
64
54
|
*/
|
|
65
55
|
async clearAll() {
|
|
66
|
-
const toShutdown = [...this.runtimes.values()];
|
|
67
56
|
this.runtimes.clear();
|
|
68
57
|
this.notifiedWorkspacePaths.clear();
|
|
69
|
-
await
|
|
70
|
-
log.warn({ err }, "codeIntelligence.dispose failed");
|
|
71
|
-
}))]);
|
|
58
|
+
await this.userContextRuntimes.clear();
|
|
72
59
|
}
|
|
73
60
|
};
|
|
74
61
|
//#endregion
|
|
@@ -69,8 +69,8 @@ export declare const ModelPolicyPatchSchema: z.ZodObject<{
|
|
|
69
69
|
}, z.core.$strict>;
|
|
70
70
|
export declare const ToolModeSchema: z.ZodEnum<{
|
|
71
71
|
allow: "allow";
|
|
72
|
-
confirm: "confirm";
|
|
73
72
|
deny: "deny";
|
|
73
|
+
confirm: "confirm";
|
|
74
74
|
}>;
|
|
75
75
|
export declare const ToolScopeSchema: z.ZodEnum<{
|
|
76
76
|
workspace: "workspace";
|
|
@@ -80,8 +80,8 @@ export declare const ToolScopeSchema: z.ZodEnum<{
|
|
|
80
80
|
export declare const ToolPolicySchema: z.ZodObject<{
|
|
81
81
|
mode: z.ZodEnum<{
|
|
82
82
|
allow: "allow";
|
|
83
|
-
confirm: "confirm";
|
|
84
83
|
deny: "deny";
|
|
84
|
+
confirm: "confirm";
|
|
85
85
|
}>;
|
|
86
86
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
87
87
|
workspace: "workspace";
|
|
@@ -97,8 +97,8 @@ export declare const ToolPolicySetSchema: z.ZodDefault<z.ZodObject<{
|
|
|
97
97
|
builtin: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
98
98
|
mode: z.ZodEnum<{
|
|
99
99
|
allow: "allow";
|
|
100
|
-
confirm: "confirm";
|
|
101
100
|
deny: "deny";
|
|
101
|
+
confirm: "confirm";
|
|
102
102
|
}>;
|
|
103
103
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
104
104
|
workspace: "workspace";
|
|
@@ -114,8 +114,8 @@ export declare const ToolPolicySetSchema: z.ZodDefault<z.ZodObject<{
|
|
|
114
114
|
servers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
115
115
|
mode: z.ZodEnum<{
|
|
116
116
|
allow: "allow";
|
|
117
|
-
confirm: "confirm";
|
|
118
117
|
deny: "deny";
|
|
118
|
+
confirm: "confirm";
|
|
119
119
|
}>;
|
|
120
120
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
121
121
|
workspace: "workspace";
|
|
@@ -130,8 +130,8 @@ export declare const ToolPolicySetSchema: z.ZodDefault<z.ZodObject<{
|
|
|
130
130
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
131
131
|
mode: z.ZodEnum<{
|
|
132
132
|
allow: "allow";
|
|
133
|
-
confirm: "confirm";
|
|
134
133
|
deny: "deny";
|
|
134
|
+
confirm: "confirm";
|
|
135
135
|
}>;
|
|
136
136
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
137
137
|
workspace: "workspace";
|
|
@@ -149,8 +149,8 @@ export declare const ToolPolicySetPatchSchema: z.ZodObject<{
|
|
|
149
149
|
builtin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
150
150
|
mode: z.ZodEnum<{
|
|
151
151
|
allow: "allow";
|
|
152
|
-
confirm: "confirm";
|
|
153
152
|
deny: "deny";
|
|
153
|
+
confirm: "confirm";
|
|
154
154
|
}>;
|
|
155
155
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
156
156
|
workspace: "workspace";
|
|
@@ -166,8 +166,8 @@ export declare const ToolPolicySetPatchSchema: z.ZodObject<{
|
|
|
166
166
|
servers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
167
167
|
mode: z.ZodEnum<{
|
|
168
168
|
allow: "allow";
|
|
169
|
-
confirm: "confirm";
|
|
170
169
|
deny: "deny";
|
|
170
|
+
confirm: "confirm";
|
|
171
171
|
}>;
|
|
172
172
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
173
173
|
workspace: "workspace";
|
|
@@ -182,8 +182,8 @@ export declare const ToolPolicySetPatchSchema: z.ZodObject<{
|
|
|
182
182
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
183
183
|
mode: z.ZodEnum<{
|
|
184
184
|
allow: "allow";
|
|
185
|
-
confirm: "confirm";
|
|
186
185
|
deny: "deny";
|
|
186
|
+
confirm: "confirm";
|
|
187
187
|
}>;
|
|
188
188
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
189
189
|
workspace: "workspace";
|
|
@@ -319,8 +319,8 @@ export declare const AgentManifestSchema: z.ZodObject<{
|
|
|
319
319
|
builtin: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
320
320
|
mode: z.ZodEnum<{
|
|
321
321
|
allow: "allow";
|
|
322
|
-
confirm: "confirm";
|
|
323
322
|
deny: "deny";
|
|
323
|
+
confirm: "confirm";
|
|
324
324
|
}>;
|
|
325
325
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
326
326
|
workspace: "workspace";
|
|
@@ -336,8 +336,8 @@ export declare const AgentManifestSchema: z.ZodObject<{
|
|
|
336
336
|
servers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
337
337
|
mode: z.ZodEnum<{
|
|
338
338
|
allow: "allow";
|
|
339
|
-
confirm: "confirm";
|
|
340
339
|
deny: "deny";
|
|
340
|
+
confirm: "confirm";
|
|
341
341
|
}>;
|
|
342
342
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
343
343
|
workspace: "workspace";
|
|
@@ -352,8 +352,8 @@ export declare const AgentManifestSchema: z.ZodObject<{
|
|
|
352
352
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
353
353
|
mode: z.ZodEnum<{
|
|
354
354
|
allow: "allow";
|
|
355
|
-
confirm: "confirm";
|
|
356
355
|
deny: "deny";
|
|
356
|
+
confirm: "confirm";
|
|
357
357
|
}>;
|
|
358
358
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
359
359
|
workspace: "workspace";
|
|
@@ -451,8 +451,8 @@ export declare const AgentConfigEntrySchema: z.ZodObject<{
|
|
|
451
451
|
builtin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
452
452
|
mode: z.ZodEnum<{
|
|
453
453
|
allow: "allow";
|
|
454
|
-
confirm: "confirm";
|
|
455
454
|
deny: "deny";
|
|
455
|
+
confirm: "confirm";
|
|
456
456
|
}>;
|
|
457
457
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
458
458
|
workspace: "workspace";
|
|
@@ -468,8 +468,8 @@ export declare const AgentConfigEntrySchema: z.ZodObject<{
|
|
|
468
468
|
servers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
469
469
|
mode: z.ZodEnum<{
|
|
470
470
|
allow: "allow";
|
|
471
|
-
confirm: "confirm";
|
|
472
471
|
deny: "deny";
|
|
472
|
+
confirm: "confirm";
|
|
473
473
|
}>;
|
|
474
474
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
475
475
|
workspace: "workspace";
|
|
@@ -484,8 +484,8 @@ export declare const AgentConfigEntrySchema: z.ZodObject<{
|
|
|
484
484
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
485
485
|
mode: z.ZodEnum<{
|
|
486
486
|
allow: "allow";
|
|
487
|
-
confirm: "confirm";
|
|
488
487
|
deny: "deny";
|
|
488
|
+
confirm: "confirm";
|
|
489
489
|
}>;
|
|
490
490
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
491
491
|
workspace: "workspace";
|
|
@@ -569,8 +569,8 @@ export declare const CapabilityPresetSchema: z.ZodObject<{
|
|
|
569
569
|
builtin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
570
570
|
mode: z.ZodEnum<{
|
|
571
571
|
allow: "allow";
|
|
572
|
-
confirm: "confirm";
|
|
573
572
|
deny: "deny";
|
|
573
|
+
confirm: "confirm";
|
|
574
574
|
}>;
|
|
575
575
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
576
576
|
workspace: "workspace";
|
|
@@ -586,8 +586,8 @@ export declare const CapabilityPresetSchema: z.ZodObject<{
|
|
|
586
586
|
servers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
587
587
|
mode: z.ZodEnum<{
|
|
588
588
|
allow: "allow";
|
|
589
|
-
confirm: "confirm";
|
|
590
589
|
deny: "deny";
|
|
590
|
+
confirm: "confirm";
|
|
591
591
|
}>;
|
|
592
592
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
593
593
|
workspace: "workspace";
|
|
@@ -602,8 +602,8 @@ export declare const CapabilityPresetSchema: z.ZodObject<{
|
|
|
602
602
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
603
603
|
mode: z.ZodEnum<{
|
|
604
604
|
allow: "allow";
|
|
605
|
-
confirm: "confirm";
|
|
606
605
|
deny: "deny";
|
|
606
|
+
confirm: "confirm";
|
|
607
607
|
}>;
|
|
608
608
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
609
609
|
workspace: "workspace";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { buildMemoryRuntime } from "./memory-runtime.js";
|
|
1
2
|
import { checkBoundary } from "./boundary-guard.js";
|
|
2
3
|
import { resolveModelRole } from "./model-router.js";
|
|
3
4
|
import { buildRuntimeToolRegistry } from "./tool-registry.js";
|
|
4
|
-
import { buildMemoryRuntime } from "./memory-runtime.js";
|
|
5
5
|
import { resolveWorkflow, validateWorkflowForRuntime } from "./workflow-runtime.js";
|
|
6
6
|
import { buildAgentRuntimeProfile } from "./runtime-profile.js";
|
|
7
7
|
import { appendAgentRunEvent, createAgentRunTrace, finishAgentRunTrace, hashEffectiveManifest } from "./run-trace.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UserContextConfig } from '../user-context/config.js';
|
|
2
|
-
export type MemorySource = 'session' | '
|
|
3
|
-
export type MemoryWriteTarget = '
|
|
2
|
+
export type MemorySource = 'session' | 'agentProfile' | 'understanding' | 'workspace';
|
|
3
|
+
export type MemoryWriteTarget = 'agentProfile' | 'understanding' | 'workspace';
|
|
4
4
|
export type MemoryWriteDecision = 'allow' | 'confirm' | 'deny';
|
|
5
5
|
export interface MemoryCandidate {
|
|
6
6
|
target: MemoryWriteTarget;
|