@xopcai/xopc 0.0.409 → 0.0.411
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 +12 -6
- package/README.zh-CN.md +12 -6
- package/dist/browser-ext/dist/assets/{page-context-A5RCibM_.js → page-context-MuzjMBlJ.js} +1 -1
- package/dist/browser-ext/dist/background.js +1 -1
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/gateway-setup.js +9 -3
- package/dist/extensions/feishu/src/plugin.d.ts +0 -3
- package/dist/extensions/feishu/src/plugin.js +1 -11
- package/dist/extensions/feishu/src/schema/config-schema.d.ts +0 -2
- package/dist/extensions/feishu/src/schema/config-schema.js +9 -21
- package/dist/extensions/feishu/src/state/accounts.js +3 -7
- package/dist/extensions/telegram/src/plugin.d.ts +0 -3
- package/dist/extensions/telegram/src/plugin.js +0 -9
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/plugin.d.ts +0 -3
- package/dist/extensions/weixin/src/plugin.js +1 -12
- package/dist/gateway/static/root/assets/agent-avatar-dicebear-sGJnq-SA.js +1 -0
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BI7OTo-T.js +1 -0
- package/dist/gateway/static/root/assets/agents-RIXL0p7_.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-D0UyB0Y_.js → agents-admin-api-uGDeJR1f.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-BGzhSS6H.js +1 -0
- package/dist/gateway/static/root/assets/{appearance-settings-Dzhmj_ZO.js → appearance-settings-DtEZq4b2.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DZqBof2D.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-D4r4P5uG.js → archive-plugin-CGdU_E5B.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-display-DCkjVzA0.js → automation-display-BFN7zWBg.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BlNe3DXU.js → automations-page-BAPZY56r.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CI-yQnSj.js +8 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DuN5L6lm.js → binary-plugins-B0ispXo2.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DUSVn51h.js → block-editor-B9Ci-prO.js} +40 -40
- package/dist/gateway/static/root/assets/{browser-automation-inputs-D8bZ9iz2.js → browser-automation-inputs-D4-vQc4g.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-Xzdif447.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-Bhu-83eC.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-B9b5KCBb.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-BIc0Zlsw.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CQEfpLdj.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-oBPqUlbj.js → capability-header-actions-Cic05oWh.js} +1 -1
- package/dist/gateway/static/root/assets/channels-DQbEoo_o.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BLs3NaOP.js → chat-terminal-dock-Bm-IGeDe.js} +2 -2
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-B2HK1psj.js → chunk-KS7C4IRE-BvcCCgTW.js} +2 -2
- package/dist/gateway/static/root/assets/computer-settings-page-C9xMfwXK.js +1 -0
- package/dist/gateway/static/root/assets/connector-service-page-DcdASUU9.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-eh-xpMPK.js +1 -0
- package/dist/gateway/static/root/assets/date-formatters-DukWSVwc.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-DVlbwrYg.js → date-picker-gVLWu9R0.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-C0LARyok.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-B_-j-D4W.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-v_le3sCs.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-CxG_FcQ6.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-QZ0p-uNa.js → directory-picker-path-field-CBefVUPR.js} +1 -1
- package/dist/gateway/static/root/assets/electron-env-Dit0bHgy.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DoVPUHu_.js → extension-debug-page-CTe7Molh.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BNe8n3iJ.js → extension-page-C0-oP7S_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DxNpjGJD.js → extension-settings-page-DYJmgMUg.js} +1 -1
- package/dist/gateway/static/root/assets/files-Bw4SBGdM.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-CTXr917C.js → gateway-config-swr-BVqYVaGy.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-CY1LBGBS.js +1 -0
- package/dist/gateway/static/root/assets/gateway-realtime-store-Dafw95ol.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-C13P4lQd.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DD2fsxdd.js → gateway-startup-retry-CPKGkr6D.js} +1 -1
- package/dist/gateway/static/root/assets/highlight-code-CslBKXdS.js +1 -0
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-DrZq5KTj.js → highlighted-body-KQOG7T2V-CN5PNRN3.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-B_XrkGmA.js +2 -0
- package/dist/gateway/static/root/assets/image-generation-api-DRLXG9Ws.js +1 -0
- package/dist/gateway/static/root/assets/imports-page--cuF5vwU.js +1 -0
- package/dist/gateway/static/root/assets/index-6YjAt50A.js +710 -0
- package/dist/gateway/static/root/assets/index-caRW34rg.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-5g2PxgBs.js +1 -0
- package/dist/gateway/static/root/assets/languages-byq_L2Ae.js +2 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-B6U1HQpp.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-BChE6nUD.js +1 -0
- package/dist/gateway/static/root/assets/{local-session-drafts-TqLFKwYo.js → local-session-drafts-BCaC-1rH.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-DAgpZxAS.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-B9mq03SK.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-2W_qJsha.js +1 -0
- package/dist/gateway/static/root/assets/markdown-editor-phTQ0mox.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-s6EqtAUQ.js → media-plugins-BmLuWkkZ.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-61Il2HQR.js +1 -0
- package/dist/gateway/static/root/assets/messages-DMXSIJUO.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-C4gZsNBL.js +5 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-XqJIaaRV.js +1 -0
- package/dist/gateway/static/root/assets/notes-page-Chdwrjni.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-B7rDRlS7.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-mQl9BftY.js +1 -0
- package/dist/gateway/static/root/assets/personal-settings-panel-BgcJLmZN.js +1 -0
- package/dist/gateway/static/root/assets/plugin-details-dialog-FvwSxZPB.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-Z4NM7_Dn.js +1 -0
- package/dist/gateway/static/root/assets/product-delivery-BqNm-8S5.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BPWSqtRt.js → product-open-page-C5TcIaJj.js} +1 -1
- package/dist/gateway/static/root/assets/product-preview-content-5xID6jIj.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-CGOyx7zX.js +7 -0
- package/dist/gateway/static/root/assets/projects-page-Dd11tbRX.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-4NZOh0iz.js → registry-api-B6kqbuw8.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Bintk9nL.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-api-CY3R7unQ.js +5 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CNCx2RnO.js → runtime-tools-settings-panel-CbmiiLsq.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-nRDA2XfI.js → schema-form-DtPkiYwm.js} +1 -1
- package/dist/gateway/static/root/assets/session-api-D6-Vz8xK.js +1 -0
- package/dist/gateway/static/root/assets/{session-manager-D2sLfkw-.js → session-manager-DWbcMHcj.js} +3 -3
- package/dist/gateway/static/root/assets/sessions-page-BBlEP7y3.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BCQUth4g.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-_ALUREPr.js → settings-form-section-DD3iD5t5.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-29ptuMYZ.js → settings-page-iLY3LRDq.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-v4P0IAkG.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-B8h9lqDL.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-DMzej6z2.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-C-T0K7Oo.js → skill-api-C9RsrvOp.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-B20x7EE9.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-C_ulsnv7.js +2 -0
- package/dist/gateway/static/root/assets/source-workspace-editor-BIvi89Zx.js +1 -0
- package/dist/gateway/static/root/assets/system-settings-panel-PTRGMKkq.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-DEPwo4vf.js +2 -0
- package/dist/gateway/static/root/assets/task-result-evidence-DjNWPpn_.js +1 -0
- package/dist/gateway/static/root/assets/tasks-TVRjEggr.js +1 -0
- package/dist/gateway/static/root/assets/tracing-settings-page-CVJt7IXC.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-DcDUSAjv.js → tunnel-api-C6XfsSWy.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Hut0SDqn.js → usage-page-DgqLD8Y5.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C4TUlpsu.js → use-autosave-DO-Twmbm.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-BwK37aob.js +2 -0
- package/dist/gateway/static/root/assets/{vendor-codemirror-DFxP3B9T.js → vendor-codemirror-Qdcjid65.js} +16 -16
- package/dist/gateway/static/root/assets/{voice-api-key-field-CMdihbPb.js → voice-api-key-field-MGe3HkS_.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-4yGMrp7J.js → voice-config-api-CPKzUb4R.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-DptHqYh5.js +1 -0
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-ClQKM2RA.js → xopc-cloud-account-card-Y_UIryBH.js} +1 -1
- package/dist/gateway/static/root/index.html +27 -35
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +0 -12
- package/dist/packages/gateway-contract/src/home.js +3 -3
- package/dist/packages/gateway-contract/src/product-delivery.js +0 -4
- package/dist/packages/gateway-contract/src/project-operating.js +0 -6
- package/dist/packages/gateway-contract/src/session-identity.js +0 -1
- package/dist/packages/gateway-contract/src/task-runs.js +0 -1
- package/dist/packages/gateway-contract/src/tasks.js +0 -6
- package/dist/src/activity/types.d.ts +4 -4
- package/dist/src/agent/agent-manager.d.ts +0 -3
- package/dist/src/agent/agent-manager.js +0 -43
- package/dist/src/agent/background-review/prompts.d.ts +8 -0
- package/dist/src/agent/background-review/prompts.js +9 -2
- package/dist/src/agent/background-review/run-background-review.js +73 -11
- package/dist/src/agent/capabilities/definitions.d.ts +2 -18
- package/dist/src/agent/capabilities/definitions.js +0 -17
- package/dist/src/agent/child-agent-factory.d.ts +1 -1
- package/dist/src/agent/client-error-format.d.ts +1 -1
- package/dist/src/agent/client-error-format.js +1 -1
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/context/execution-scope.d.ts +2 -8
- package/dist/src/agent/context/execution-scope.js +6 -23
- package/dist/src/agent/embedded/index.d.ts +0 -1
- package/dist/src/agent/embedded/index.js +1 -2
- package/dist/src/agent/embedded/run-turn.js +25 -2
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +0 -2
- package/dist/src/agent/external-tools/gateway-tools.js +6 -6
- package/dist/src/agent/inbound/attachment-pipeline.d.ts +2 -0
- package/dist/src/agent/inbound/attachment-pipeline.js +10 -5
- package/dist/src/agent/mcp/connection-setup.js +2 -2
- package/dist/src/agent/memory/compaction-ledger.d.ts +1 -1
- package/dist/src/agent/memory/compaction-ledger.js +1 -1
- package/dist/src/agent/memory/compaction-promotion.js +1 -1
- package/dist/src/agent/memory/source-origin.js +1 -5
- package/dist/src/agent/memory/turn-provenance.js +1 -3
- package/dist/src/agent/memory/types.d.ts +1 -1
- package/dist/src/agent/messaging/command-handler.d.ts +0 -3
- package/dist/src/agent/messaging/command-handler.js +1 -4
- package/dist/src/agent/prompt/sections/behavior.js +2 -2
- package/dist/src/agent/prompt/sections/tooling.js +1 -5
- package/dist/src/agent/prompt/voice-presentation.d.ts +1 -1
- package/dist/src/agent/prompt/voice-presentation.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +0 -6
- package/dist/src/agent/service.d.ts +0 -2
- package/dist/src/agent/service.js +0 -11
- package/dist/src/agent/service.types.d.ts +0 -2
- package/dist/src/agent/session/session-config-service.d.ts +0 -2
- package/dist/src/agent/session/session-config-service.js +1 -1
- package/dist/src/agent/session/session-inspector.d.ts +0 -1
- package/dist/src/agent/session/session-inspector.js +0 -1
- package/dist/src/agent/skills/required-env-vars.d.ts +1 -1
- package/dist/src/agent/skills/required-env-vars.js +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +2 -5
- package/dist/src/agent/tools/automation-tool.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +0 -3
- package/dist/src/agent/tools/factory.js +21 -10
- package/dist/src/agent/tools/index.d.ts +0 -2
- package/dist/src/agent/tools/index.js +1 -3
- package/dist/src/agent/tools/knowledge-memory-tool.d.ts +1 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +13 -4
- package/dist/src/agent/tools/personal-task-tool.js +8 -22
- package/dist/src/agent/tools/search/errors.js +2 -2
- package/dist/src/agent/tools/session-recall-tool.d.ts +3 -0
- package/dist/src/agent/tools/session-recall-tool.js +7 -0
- package/dist/src/agent/tools/session-search-tool.d.ts +3 -0
- package/dist/src/agent/tools/session-search-tool.js +20 -4
- package/dist/src/agent/tools/user-context-tool.js +7 -1
- package/dist/src/agent/tools/xopc-use-tool.js +1 -1
- package/dist/src/agent-catalog/index.d.ts +0 -1
- package/dist/src/agent-catalog/index.js +1 -2
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/resolver.js +0 -6
- package/dist/src/agent-config/schema.d.ts +0 -16
- package/dist/src/agent-config/schema.js +2 -9
- package/dist/src/agent-matching/selection-repository.d.ts +1 -1
- package/dist/src/agent-matching/selection-repository.js +1 -1
- package/dist/src/agent-matching/service.d.ts +1 -2
- package/dist/src/agent-matching/service.js +3 -7
- package/dist/src/ai-assist/text-assist.d.ts +1 -1
- package/dist/src/ai-assist/text-assist.js +0 -72
- package/dist/src/automations/capabilities/write.d.ts +0 -40
- package/dist/src/automations/domain/types.d.ts +0 -15
- package/dist/src/automations/domain/validation.d.ts +0 -80
- package/dist/src/automations/domain/validation.js +0 -17
- package/dist/src/automations/draft/automation-draft-prompt.js +0 -3
- package/dist/src/automations/draft/automation-draft-validator.d.ts +0 -20
- package/dist/src/automations/draft/automation-draft-validator.js +0 -1
- package/dist/src/automations/events/event-catalog.js +0 -6
- package/dist/src/automations/service/action-executor.d.ts +0 -1
- package/dist/src/automations/service/action-executor.js +1 -110
- package/dist/src/automations/service/automation-service.js +0 -2
- package/dist/src/automations/storage/automation-run-repository.js +6 -7
- package/dist/src/backup/archive.js +1 -1
- package/dist/src/bootstrap/application-state.d.ts +2 -10
- package/dist/src/bootstrap/application-state.js +5 -18
- package/dist/src/channels/manager.d.ts +0 -2
- package/dist/src/channels/manager.js +0 -4
- package/dist/src/channels/pairing/index.d.ts +2 -1
- package/dist/src/channels/pairing/pairing-service.d.ts +0 -1
- package/dist/src/chat-commands/context.d.ts +0 -3
- package/dist/src/chat-commands/context.js +0 -5
- package/dist/src/chat-commands/index.d.ts +0 -1
- package/dist/src/chat-commands/index.js +1 -3
- package/dist/src/chat-commands/types.d.ts +0 -5
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/config.js +2 -10
- package/dist/src/cli/commands/doctor/checks/database-relations.js +0 -3
- package/dist/src/cli/commands/doctor/checks/database-schema.js +4 -25
- package/dist/src/cli/commands/gateway/run-foreground.js +1 -1
- package/dist/src/cli/commands/setup-shared/prompts.d.ts +2 -2
- package/dist/src/cli/commands/setup-shared/prompts.js +2 -2
- package/dist/src/cli/commands/tui-runner.js +2 -2
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/index.d.ts +0 -1
- package/dist/src/cli/index.js +2 -2
- package/dist/src/cli/utils/init-workspace-core.js +3 -6
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/loader.d.ts +0 -1
- package/dist/src/config/loader.js +1 -13
- package/dist/src/config/paths.d.ts +1 -1
- package/dist/src/config/paths.js +1 -1
- package/dist/src/connectors/composio-catalog.js +1 -3
- package/dist/src/connectors/composio.js +1 -2
- package/dist/src/connectors/connected-source-ingestion.js +1 -1
- package/dist/src/connectors/connected-source-understanding.js +1 -1
- package/dist/src/connectors/learning-coordinator.js +1 -1
- package/dist/src/connectors/principal.js +1 -22
- package/dist/src/connectors/{workflow-preflight.d.ts → requirements-preflight.d.ts} +9 -8
- package/dist/src/connectors/{workflow-preflight.js → requirements-preflight.js} +2 -10
- package/dist/src/connectors/types.d.ts +1 -1
- package/dist/src/daemon/types.d.ts +0 -9
- package/dist/src/discussions/long-review.js +0 -11
- package/dist/src/endpoint-tools/policy.js +13 -14
- package/dist/src/extensions/agent-plugins/auth.js +1 -3
- package/dist/src/extensions/agent-plugins/formats.js +2 -4
- package/dist/src/extensions/agent-plugins/mcp-format.d.ts +1 -1
- package/dist/src/extensions/agent-plugins/mcp-format.js +2 -2
- package/dist/src/extensions/bundled-extension-activation.d.ts +0 -2
- package/dist/src/extensions/bundled-extension-activation.js +1 -3
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/types/tui.d.ts +1 -2
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -7
- package/dist/src/gateway/agent-builtin-tools.js +0 -7
- package/dist/src/gateway/agents-admin.d.ts +0 -1
- package/dist/src/gateway/agents-admin.js +0 -1
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +0 -8
- package/dist/src/gateway/hono/lib/config-payload.js +1 -2
- package/dist/src/gateway/hono/lib/config-write-lock.d.ts +1 -1
- package/dist/src/gateway/hono/lib/config-write-lock.js +1 -1
- package/dist/src/gateway/hono/middleware/auth.js +2 -2
- package/dist/src/gateway/hono/routes/activity.js +0 -1
- package/dist/src/gateway/hono/routes/agents.js +2 -9
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +0 -22
- package/dist/src/gateway/hono/routes/chat-model-config.d.ts +0 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -3
- package/dist/src/gateway/hono/routes/config.js +2 -21
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/devices.js +2 -2
- package/dist/src/gateway/hono/routes/home.js +3 -20
- package/dist/src/gateway/hono/routes/lazy-bundles.js +0 -8
- package/dist/src/gateway/hono/routes/memory-learning.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +0 -16
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
- package/dist/src/gateway/hono/routes/sessions.js +0 -3
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +1 -1
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/run-loop.js +2 -2
- package/dist/src/gateway/security/device-request-proof.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +0 -1
- package/dist/src/gateway/service/active-execution.d.ts +1 -1
- package/dist/src/gateway/service/active-execution.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -1
- package/dist/src/gateway/service/sessions-api.d.ts +1 -2
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service/task-conversation-query-service.d.ts +0 -4
- package/dist/src/gateway/service/types.d.ts +2 -0
- package/dist/src/gateway/service.d.ts +1 -8
- package/dist/src/gateway/service.js +20 -67
- package/dist/src/history/ctx/format.js +1 -1
- package/dist/src/home-intelligence/capability-preflight.js +1 -1
- package/dist/src/infra/unhandled-rejections.js +2 -2
- package/dist/src/infra/update-runner.d.ts +1 -2
- package/dist/src/infra/update-runner.js +2 -2
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge/local-folder-adapter.js +2 -5
- package/dist/src/knowledge-memory/repository.d.ts +3 -1
- package/dist/src/knowledge-memory/repository.js +10 -3
- package/dist/src/knowledge-memory/usage-policy.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/memory-learning/forget-capture.d.ts +14 -0
- package/dist/src/memory-learning/forget-capture.js +101 -0
- package/dist/src/memory-learning/forgotten-history.d.ts +15 -0
- package/dist/src/memory-learning/forgotten-history.js +137 -0
- package/dist/src/memory-learning/owner-directive.d.ts +2 -0
- package/dist/src/memory-learning/owner-directive.js +10 -0
- package/dist/src/memory-learning/service.js +0 -2
- package/dist/src/memory-learning/source-learning.js +1 -1
- package/dist/src/memory-learning/task-receipts.js +1 -1
- package/dist/src/memory-learning/work-capture.js +2 -1
- package/dist/src/migrations/index.js +2 -2
- package/dist/src/migrations/runner.d.ts +1 -2
- package/dist/src/migrations/runner.js +2 -5
- package/dist/src/notes/service.js +3 -3
- package/dist/src/notes/types.d.ts +1 -2
- package/dist/src/personal-agent/communication.d.ts +0 -3
- package/dist/src/personal-agent/communication.js +1 -12
- package/dist/src/personal-agent/persona.d.ts +0 -4
- package/dist/src/personal-agent/persona.js +1 -5
- package/dist/src/personal-agent/proactivity/repository.js +2 -6
- package/dist/src/personal-agent/prompt-context.js +1 -1
- package/dist/src/personal-agent/prompts.d.ts +0 -3
- package/dist/src/personal-agent/prompts.js +7 -146
- package/dist/src/personal-agent/reply-composer.js +3 -3
- package/dist/src/personal-agent/reply-style.d.ts +1 -13
- package/dist/src/personal-agent/reply-style.js +3 -123
- package/dist/src/personal-agent/request-delivery.d.ts +1 -1
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-service.js +2 -2
- package/dist/src/personal-agent/specialist-capabilities.js +0 -1
- package/dist/src/personal-agent/task-cancel.js +2 -1
- package/dist/src/platform/client.d.ts +0 -1
- package/dist/src/platform/contracts.d.ts +0 -1
- package/dist/src/platform/contracts.js +1 -4
- package/dist/src/projects/index.d.ts +0 -1
- package/dist/src/projects/index.js +1 -2
- package/dist/src/projects/project-loop.d.ts +2 -12
- package/dist/src/projects/project-loop.js +19 -42
- package/dist/src/projects/project-store.d.ts +0 -1
- package/dist/src/projects/project-store.js +0 -11
- package/dist/src/projects/types.d.ts +0 -6
- package/dist/src/providers/model-usage.js +0 -5
- package/dist/src/realtime/runtime.js +0 -1
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/session/manager.js +1 -1
- package/dist/src/session/store.d.ts +1 -0
- package/dist/src/session/types.d.ts +2 -6
- package/dist/src/storage/sqlite/connection-wait-repository.js +0 -33
- package/dist/src/storage/sqlite/connection.js +2 -2
- package/dist/src/storage/sqlite/device-access-repository.d.ts +2 -2
- package/dist/src/storage/sqlite/device-access-repository.js +4 -8
- package/dist/src/storage/sqlite/fts.d.ts +4 -0
- package/dist/src/storage/sqlite/fts.js +13 -4
- package/dist/src/storage/sqlite/home-attention-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/index.d.ts +1 -3
- package/dist/src/storage/sqlite/index.js +4 -8
- package/dist/src/storage/sqlite/{migrations/conversation-backup.d.ts → offline-access.d.ts} +1 -4
- package/dist/src/storage/sqlite/{migrations/conversation-backup.js → offline-access.js} +6 -25
- package/dist/src/storage/sqlite/row-mappers.d.ts +0 -8
- package/dist/src/storage/sqlite/row-mappers.js +0 -8
- package/dist/src/storage/sqlite/{migrations/errors.d.ts → schema-errors.d.ts} +0 -6
- package/dist/src/storage/sqlite/schema-errors.js +28 -0
- package/dist/src/storage/sqlite/schema.d.ts +4 -5
- package/dist/src/storage/sqlite/schema.js +23 -19
- package/dist/src/storage/sqlite/schema.sql +1099 -427
- package/dist/src/storage/sqlite/session-identity-sql.js +1 -2
- package/dist/src/storage/sqlite/session-read-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-read-repository.js +1 -2
- package/dist/src/storage/sqlite/session-repository.js +10 -36
- package/dist/src/storage/sqlite/transcript-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/transcript-repository.js +14 -12
- package/dist/src/storage/sqlite/{migrations/conversation-windows-owners.js → windows-database-owners.js} +3 -3
- package/dist/src/tasks/attention-governor.d.ts +1 -0
- package/dist/src/tasks/attention-governor.js +2 -2
- package/dist/src/tasks/capabilities/management.d.ts +0 -1
- package/dist/src/tasks/capabilities/relations.d.ts +2 -2
- package/dist/src/tasks/execution-context.d.ts +1 -1
- package/dist/src/tasks/execution-context.js +0 -2
- package/dist/src/tasks/home-query-service.d.ts +2 -16
- package/dist/src/tasks/home-query-service.js +37 -67
- package/dist/src/tasks/index.d.ts +0 -1
- package/dist/src/tasks/index.js +1 -2
- package/dist/src/tasks/project-operating-view-service.js +0 -1
- package/dist/src/tasks/task-application-service.js +0 -5
- package/dist/src/tasks/task-repository.d.ts +1 -1
- package/dist/src/tasks/task-run-coordinator.js +4 -2
- package/dist/src/tui/backends/embedded-backend.d.ts +1 -4
- package/dist/src/tui/backends/embedded-backend.js +3 -59
- package/dist/src/tui/backends/gateway-realtime-backend.d.ts +1 -2
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -27
- package/dist/src/tui/components/chat-log.d.ts +0 -2
- package/dist/src/tui/components/chat-log.js +0 -18
- package/dist/src/tui/extension-host/runtime-context.js +0 -1
- package/dist/src/tui/tui-backend.d.ts +0 -15
- package/dist/src/tui/tui-command-formatters.d.ts +0 -3
- package/dist/src/tui/tui-command-formatters.js +1 -28
- package/dist/src/tui/tui-commands.d.ts +1 -14
- package/dist/src/tui/tui-commands.js +4 -89
- package/dist/src/tui/tui-startup-resources.js +0 -2
- package/dist/src/tui/tui-startup-text.js +2 -3
- package/dist/src/tui/tui.js +1 -49
- package/dist/src/user-context/trust-policy.js +1 -1
- package/dist/src/user-model/capture/semantic.d.ts +18 -1
- package/dist/src/user-model/capture/semantic.js +26 -1
- package/dist/src/user-model/usage-policy.js +1 -1
- package/dist/src/utils/index.js +1 -1
- package/dist/src/utils/logger/index.js +1 -1
- package/dist/src/utils/logger.js +1 -1
- package/dist/src/voice/realtime/agentBroker.js +2 -3
- package/dist/src/voice/realtime/memory-context.js +2 -2
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/service.js +2 -2
- package/package.json +5 -6
- package/dist/extensions/feishu/src/workflow-progress.d.ts +0 -27
- package/dist/extensions/feishu/src/workflow-progress.js +0 -98
- package/dist/extensions/telegram/src/workflow-progress.d.ts +0 -24
- package/dist/extensions/telegram/src/workflow-progress.js +0 -72
- package/dist/extensions/weixin/src/workflow-progress.d.ts +0 -26
- package/dist/extensions/weixin/src/workflow-progress.js +0 -98
- package/dist/gateway/static/root/assets/agent-avatar-dicebear-lMrejpsz.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-lXwR3Rff.js +0 -1
- package/dist/gateway/static/root/assets/agents-DFwBf95X.js +0 -77
- package/dist/gateway/static/root/assets/app-link-BV_eGr7l.js +0 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-Cja3eV7H.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-C3xbCdYa.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CWvHbJBK.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-BtvOURHQ.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-C_OeE79S.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-CD6PzNK7.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-BKF6q_tC.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B7qOaUZs.js +0 -8
- package/dist/gateway/static/root/assets/channels-3M9-anCN.js +0 -1
- package/dist/gateway/static/root/assets/code-editor-CXIH8jQw.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-LaekhDG6.js +0 -1
- package/dist/gateway/static/root/assets/connector-service-page-DJP1n1_n.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DmQqMy6l.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-BhElpD_6.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-ByvV-cDD.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-BBruQu-_.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C3zOy8PO.js +0 -1
- package/dist/gateway/static/root/assets/dist-BGTk37IG.js +0 -1
- package/dist/gateway/static/root/assets/file-archive-DanfQJNe.js +0 -1
- package/dist/gateway/static/root/assets/file-braces-BoAMI_k9.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-CP6L2jIR.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-yXB4a40_.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CzrFZ0lB.js +0 -1
- package/dist/gateway/static/root/assets/highlight-code-BH65IIbJ.js +0 -1
- package/dist/gateway/static/root/assets/home-page-cXmd8x0S.js +0 -2
- package/dist/gateway/static/root/assets/image-generation-api-C6su4n9B.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-CsXYryWS.js +0 -1
- package/dist/gateway/static/root/assets/index-BZlryZm8.css +0 -1
- package/dist/gateway/static/root/assets/index-uAJlrGvo.js +0 -267
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-GYKLt0oF.js +0 -1
- package/dist/gateway/static/root/assets/languages-BFe8nIOO.js +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-Dw-i6VkX.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-page-DslilwNE.js +0 -1
- package/dist/gateway/static/root/assets/locale-store-D_migb9R.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-4N8bGPIE.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-CPmxI1k0.js +0 -1
- package/dist/gateway/static/root/assets/markdown-editor-BhBJANcx.js +0 -1
- package/dist/gateway/static/root/assets/markdown-view-Ljt0bhfF.js +0 -324
- package/dist/gateway/static/root/assets/markdown-view-ixUWAmoy.css +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Ba-WQCki.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-render-604gISVe.js +0 -134
- package/dist/gateway/static/root/assets/messages-D__oW2yE.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-CjTm5gxS.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-hbSbEEfN.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-DkESStKc.js +0 -8
- package/dist/gateway/static/root/assets/page-context-capture-button-eyzTNrCe.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-DZxbFQvF.js +0 -1
- package/dist/gateway/static/root/assets/personal-settings-panel-DzubCRqj.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-BjVLbxZM.js +0 -1
- package/dist/gateway/static/root/assets/plus-Q2yW6OE7.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-7pUtUL4O.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-DwmnNJvk.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-COo4zwp9.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CrIH6nEy.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D4swvBmH.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DltfIMtv.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-api-CmEWVrOg.js +0 -5
- package/dist/gateway/static/root/assets/session-api-aQLptIs9.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CfYU53aw.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BJBoWYbO.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DZgVMRXr.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-C2LHd_Nl.js +0 -2
- package/dist/gateway/static/root/assets/shares-settings-C5MTc6t-.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BcdA9ezU.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BMw8XbKL.js +0 -2
- package/dist/gateway/static/root/assets/source-workspace-editor-DunRD1gY.js +0 -1
- package/dist/gateway/static/root/assets/style-DR0-RKaL.js +0 -7
- package/dist/gateway/static/root/assets/system-settings-panel-2Kr9Y-FJ.js +0 -1
- package/dist/gateway/static/root/assets/tab-completion-input.utils-BP3NH_du.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-7kPco8Ys.js +0 -2
- package/dist/gateway/static/root/assets/task-expandable-content-4s_FTl-9.js +0 -1
- package/dist/gateway/static/root/assets/tasks-B4bZpO6O.js +0 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-D53wxq60.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-KRy50OBd.js +0 -2
- package/dist/gateway/static/root/assets/work-discovery-overlay-Bd9HLsds.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-C9mAiHBd.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-CGg4GWwt.js +0 -6
- package/dist/gateway/static/root/assets/x-B_N4OPjy.js +0 -1
- package/dist/gateway/static/root/assets/xml-_d7dTN2Q.js +0 -3
- package/dist/src/agent/embedded/session-manager-init.d.ts +0 -4
- package/dist/src/agent/embedded/session-manager-init.js +0 -48
- package/dist/src/agent/tools/workflow-manage-tool.d.ts +0 -2
- package/dist/src/agent/tools/workflow-manage-tool.js +0 -225
- package/dist/src/agent/tools/workflow-tool.d.ts +0 -20
- package/dist/src/agent/tools/workflow-tool.js +0 -155
- package/dist/src/agent/workflow/agent-progress.d.ts +0 -5
- package/dist/src/agent/workflow/agent-progress.js +0 -65
- package/dist/src/agent/workflow/builtins/index.d.ts +0 -2
- package/dist/src/agent/workflow/builtins/index.js +0 -374
- package/dist/src/agent/workflow/catalog.d.ts +0 -52
- package/dist/src/agent/workflow/catalog.js +0 -150
- package/dist/src/agent/workflow/channel-capability.d.ts +0 -76
- package/dist/src/agent/workflow/channel-capability.js +0 -1
- package/dist/src/agent/workflow/index.d.ts +0 -10
- package/dist/src/agent/workflow/index.js +0 -9
- package/dist/src/agent/workflow/progress-broker.d.ts +0 -80
- package/dist/src/agent/workflow/progress-broker.js +0 -261
- package/dist/src/agent/workflow/snapshot-empty.d.ts +0 -2
- package/dist/src/agent/workflow/snapshot-empty.js +0 -17
- package/dist/src/agent/workflow/snapshot.d.ts +0 -28
- package/dist/src/agent/workflow/snapshot.js +0 -267
- package/dist/src/agent/workflow/step-labels.d.ts +0 -8
- package/dist/src/agent/workflow/step-labels.js +0 -50
- package/dist/src/agent/workflow/structured-output-tool.d.ts +0 -33
- package/dist/src/agent/workflow/structured-output-tool.js +0 -56
- package/dist/src/agent/workflow/subagent-runner.d.ts +0 -46
- package/dist/src/agent/workflow/subagent-runner.js +0 -221
- package/dist/src/agent/workflow/types.d.ts +0 -252
- package/dist/src/agent/workflow/types.js +0 -1
- package/dist/src/agent/workflow/workflow-child-tools.d.ts +0 -4
- package/dist/src/agent/workflow/workflow-child-tools.js +0 -38
- package/dist/src/agent-catalog/migrations/identity-markdown-cutover.d.ts +0 -5
- package/dist/src/agent-catalog/migrations/identity-markdown-cutover.js +0 -94
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.d.ts +0 -11
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +0 -194
- package/dist/src/chat-commands/builtins/workflow.d.ts +0 -18
- package/dist/src/chat-commands/builtins/workflow.js +0 -249
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +0 -23
- package/dist/src/gateway/gateway-workflow-host.types.js +0 -1
- package/dist/src/gateway/hono/routes/workflows.d.ts +0 -3
- package/dist/src/gateway/hono/routes/workflows.js +0 -572
- package/dist/src/knowledge-memory/repair-evidence.d.ts +0 -2
- package/dist/src/knowledge-memory/repair-evidence.js +0 -57
- package/dist/src/migrations/cloud-public-models.d.ts +0 -7
- package/dist/src/migrations/cloud-public-models.js +0 -157
- package/dist/src/migrations/memory-config.d.ts +0 -2
- package/dist/src/migrations/memory-config.js +0 -76
- package/dist/src/migrations/retired-local-stt.d.ts +0 -2
- package/dist/src/migrations/retired-local-stt.js +0 -52
- package/dist/src/projects/workflow-bind.d.ts +0 -1
- package/dist/src/projects/workflow-bind.js +0 -15
- package/dist/src/storage/sqlite/migrations/218_core_relation_indexes.sql +0 -26
- package/dist/src/storage/sqlite/migrations/219_json_contracts.sql +0 -123
- package/dist/src/storage/sqlite/migrations/220_normalize_timestamps.sql +0 -339
- package/dist/src/storage/sqlite/migrations/221_ai_usage_retention_index.sql +0 -2
- package/dist/src/storage/sqlite/migrations/222_session_config_authority.sql +0 -13
- package/dist/src/storage/sqlite/migrations/223_session_creation_receipts.sql +0 -59
- package/dist/src/storage/sqlite/migrations/224_task_origin_links.sql +0 -8
- package/dist/src/storage/sqlite/migrations/225_task_collaboration.sql +0 -32
- package/dist/src/storage/sqlite/migrations/226_task_main_updates.sql +0 -9
- package/dist/src/storage/sqlite/migrations/227_task_main_update_decisions.sql +0 -8
- package/dist/src/storage/sqlite/migrations/228_task_main_agent_links.sql +0 -14
- package/dist/src/storage/sqlite/migrations/229_task_criterion_reviews.sql +0 -12
- package/dist/src/storage/sqlite/migrations/230_personal_agent_onboarding.sql +0 -8
- package/dist/src/storage/sqlite/migrations/231_task_result_deliveries.sql +0 -32
- package/dist/src/storage/sqlite/migrations/232_personal_requests.sql +0 -28
- package/dist/src/storage/sqlite/migrations/233_observability_usage_links.sql +0 -3
- package/dist/src/storage/sqlite/migrations/234_task_result_reply.sql +0 -14
- package/dist/src/storage/sqlite/migrations/235_personal_conversation_priority.sql +0 -3
- package/dist/src/storage/sqlite/migrations/236_personal_proactivity.sql +0 -53
- package/dist/src/storage/sqlite/migrations/237_personal_strategy_versions.sql +0 -18
- package/dist/src/storage/sqlite/migrations/238_browser_record_replay.sql +0 -45
- package/dist/src/storage/sqlite/migrations/239_clarification_notifications.sql +0 -26
- package/dist/src/storage/sqlite/migrations/240_device_settings.sql +0 -5
- package/dist/src/storage/sqlite/migrations/241_device_grant_audit.sql +0 -13
- package/dist/src/storage/sqlite/migrations/242_cloud_usage_receipts.sql +0 -5
- package/dist/src/storage/sqlite/migrations/243_voice_opening_greetings.sql +0 -12
- package/dist/src/storage/sqlite/migrations/244_device_request_proofs.sql +0 -8
- package/dist/src/storage/sqlite/migrations/245_memory_learning.sql +0 -125
- package/dist/src/storage/sqlite/migrations/246_personal_session_thinking.sql +0 -22
- package/dist/src/storage/sqlite/migrations/247_agent_selection_records.sql +0 -32
- package/dist/src/storage/sqlite/migrations/248_next_turn_suggestions.sql +0 -20
- package/dist/src/storage/sqlite/migrations/249_task_allocations.sql +0 -17
- package/dist/src/storage/sqlite/migrations/250_research_checkpoints.sql +0 -15
- package/dist/src/storage/sqlite/migrations/251_personal_result_reads.sql +0 -40
- package/dist/src/storage/sqlite/migrations/252_task_work_revisions.sql +0 -15
- package/dist/src/storage/sqlite/migrations/253_discussion_processing_recovery.sql +0 -20
- package/dist/src/storage/sqlite/migrations/254_discussion_annotations.sql +0 -17
- package/dist/src/storage/sqlite/migrations/255_discussion_chapter_progress.sql +0 -10
- package/dist/src/storage/sqlite/migrations/256_task_main_update_retries.sql +0 -21
- package/dist/src/storage/sqlite/migrations/257_session_composer_history.sql +0 -11
- package/dist/src/storage/sqlite/migrations/258_task_phase_changes.sql +0 -20
- package/dist/src/storage/sqlite/migrations/259_personal_default_style.sql +0 -10
- package/dist/src/storage/sqlite/migrations/discover.d.ts +0 -4
- package/dist/src/storage/sqlite/migrations/discover.js +0 -40
- package/dist/src/storage/sqlite/migrations/errors.js +0 -40
- package/dist/src/storage/sqlite/migrations/runner.d.ts +0 -22
- package/dist/src/storage/sqlite/migrations/runner.js +0 -112
- package/dist/src/storage/sqlite/migrations/types.d.ts +0 -12
- package/dist/src/storage/sqlite/migrations/types.js +0 -1
- package/dist/src/tasks/task-workflow-coordinator.d.ts +0 -5
- package/dist/src/tasks/task-workflow-coordinator.js +0 -55
- package/dist/src/tui/tui-workflow-slash.d.ts +0 -29
- package/dist/src/tui/tui-workflow-slash.js +0 -58
- package/dist/src/workflows/authoring/index.d.ts +0 -2
- package/dist/src/workflows/authoring/index.js +0 -3
- package/dist/src/workflows/authoring/workflow-draft-defaults.d.ts +0 -3
- package/dist/src/workflows/authoring/workflow-draft-defaults.js +0 -63
- package/dist/src/workflows/authoring/workflow-draft-store.d.ts +0 -29
- package/dist/src/workflows/authoring/workflow-draft-store.js +0 -52
- package/dist/src/workflows/context/workflow-context-snapshot-repository.d.ts +0 -21
- package/dist/src/workflows/context/workflow-context-snapshot-repository.js +0 -41
- package/dist/src/workflows/context/workflow-context.d.ts +0 -18
- package/dist/src/workflows/context/workflow-context.js +0 -164
- package/dist/src/workflows/domain/command.d.ts +0 -19
- package/dist/src/workflows/domain/command.js +0 -1
- package/dist/src/workflows/domain/definition-utils.d.ts +0 -18
- package/dist/src/workflows/domain/definition-utils.js +0 -90
- package/dist/src/workflows/domain/definition.d.ts +0 -164
- package/dist/src/workflows/domain/definition.js +0 -1
- package/dist/src/workflows/domain/event.d.ts +0 -88
- package/dist/src/workflows/domain/event.js +0 -1
- package/dist/src/workflows/domain/index.d.ts +0 -8
- package/dist/src/workflows/domain/index.js +0 -5
- package/dist/src/workflows/domain/result.d.ts +0 -68
- package/dist/src/workflows/domain/result.js +0 -1
- package/dist/src/workflows/domain/run.d.ts +0 -257
- package/dist/src/workflows/domain/run.js +0 -12
- package/dist/src/workflows/domain/schema-validation.d.ts +0 -8
- package/dist/src/workflows/domain/schema-validation.js +0 -26
- package/dist/src/workflows/domain/validation.d.ts +0 -22
- package/dist/src/workflows/domain/validation.js +0 -318
- package/dist/src/workflows/engine/index.d.ts +0 -2
- package/dist/src/workflows/engine/index.js +0 -3
- package/dist/src/workflows/engine/projector.d.ts +0 -3
- package/dist/src/workflows/engine/projector.js +0 -276
- package/dist/src/workflows/engine/workflow-engine.d.ts +0 -88
- package/dist/src/workflows/engine/workflow-engine.js +0 -719
- package/dist/src/workflows/index.d.ts +0 -11
- package/dist/src/workflows/index.js +0 -19
- package/dist/src/workflows/project-presets/project-workflow-preset-repository.d.ts +0 -20
- package/dist/src/workflows/project-presets/project-workflow-preset-repository.js +0 -39
- package/dist/src/workflows/registry/catalog-workflow-definition-registry.d.ts +0 -9
- package/dist/src/workflows/registry/catalog-workflow-definition-registry.js +0 -30
- package/dist/src/workflows/registry/index.d.ts +0 -2
- package/dist/src/workflows/registry/index.js +0 -2
- package/dist/src/workflows/registry/workflow-definition-registry.d.ts +0 -15
- package/dist/src/workflows/registry/workflow-definition-registry.js +0 -1
- package/dist/src/workflows/runtime/graph-workflow-runtime.d.ts +0 -10
- package/dist/src/workflows/runtime/graph-workflow-runtime.js +0 -289
- package/dist/src/workflows/runtime/index.d.ts +0 -2
- package/dist/src/workflows/runtime/index.js +0 -2
- package/dist/src/workflows/runtime/workflow-runtime-port.d.ts +0 -13
- package/dist/src/workflows/runtime/workflow-runtime-port.js +0 -1
- package/dist/src/workflows/service/run-view-to-snapshot.d.ts +0 -4
- package/dist/src/workflows/service/run-view-to-snapshot.js +0 -64
- package/dist/src/workflows/service/workflow-run-service.d.ts +0 -63
- package/dist/src/workflows/service/workflow-run-service.js +0 -892
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +0 -62
- package/dist/src/workflows/service/workflow-run-service.types.js +0 -1
- package/dist/src/workflows/service/workflow-session-bridge.d.ts +0 -33
- package/dist/src/workflows/service/workflow-session-bridge.js +0 -244
- package/dist/src/workflows/service/workflow-session-key.d.ts +0 -3
- package/dist/src/workflows/service/workflow-session-key.js +0 -19
- package/dist/src/workflows/service/workflow-writeback-service.d.ts +0 -9
- package/dist/src/workflows/service/workflow-writeback-service.js +0 -107
- package/dist/src/workflows/store/event-store.d.ts +0 -16
- package/dist/src/workflows/store/event-store.js +0 -38
- package/dist/src/workflows/store/paths.d.ts +0 -5
- package/dist/src/workflows/store/paths.js +0 -18
- package/dist/src/workflows/store/run-index-store.d.ts +0 -9
- package/dist/src/workflows/store/run-index-store.js +0 -64
- package/dist/src/workflows/store/run-store.d.ts +0 -16
- package/dist/src/workflows/store/run-store.js +0 -40
- package/skills/engineering/workflow-authoring/SKILL.md +0 -32
- /package/dist/gateway/static/root/assets/{style-DLioOiRN.css → project-detail-page-DLioOiRN.css} +0 -0
- /package/dist/src/storage/sqlite/{migrations/conversation-windows-owners.d.ts → windows-database-owners.d.ts} +0 -0
|
@@ -15,8 +15,7 @@ var init_session_identity_sql = __esmMin((() => {
|
|
|
15
15
|
ELSE 'other' END)`;
|
|
16
16
|
SESSION_PURPOSE_SQL = `(CASE
|
|
17
17
|
WHEN ${SESSION_SOURCE_SQL} = 'system' THEN 'system'
|
|
18
|
-
WHEN s.session_type = '
|
|
19
|
-
WHEN s.session_type = 'workflow-run' THEN 'workflow'
|
|
18
|
+
WHEN s.session_type = 'subagent' THEN 'subagent'
|
|
20
19
|
WHEN ${SESSION_SOURCE_SQL} = 'automation' THEN 'automation'
|
|
21
20
|
ELSE 'chat' END)`;
|
|
22
21
|
}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
2
|
import type { SessionMetadata } from '../../session/types.js';
|
|
3
3
|
import { type SessionRow } from './row-mappers.js';
|
|
4
|
-
export declare const SESSION_COLUMNS = "\n s.conversation_id, s.agent_id, s.active_transcript_id, s.status, s.name, s.tags_json,\n s.created_at, s.updated_at, s.last_accessed_at, s.session_started_at, s.last_interaction_at,\n s.source_channel, s.source_chat_id, s.session_type, s.hidden_from_session_list,\n s.parent_conversation_id, s.
|
|
4
|
+
export declare const SESSION_COLUMNS = "\n s.conversation_id, s.agent_id, s.active_transcript_id, s.status, s.name, s.tags_json,\n s.created_at, s.updated_at, s.last_accessed_at, s.session_started_at, s.last_interaction_at,\n s.source_channel, s.source_chat_id, s.session_type, s.hidden_from_session_list,\n s.parent_conversation_id, s.project_id, s.routing_json, s.custom_data_json,\n s.message_count, s.estimated_tokens, s.compacted_count,\n s.last_flushed_at, s.flush_count,\n t.cwd AS cwd\n";
|
|
5
5
|
export declare const SESSION_FROM_JOIN = "\n FROM sessions s\n LEFT JOIN transcripts t ON t.transcript_id = s.active_transcript_id\n";
|
|
6
6
|
export declare function readSessionRow(db: DatabaseSync, conversationId: string): SessionRow | undefined;
|
|
7
7
|
/** Read metadata without importing session lifecycle operations. */
|
|
@@ -18,8 +18,7 @@ var init_session_read_repository = __esmMin((() => {
|
|
|
18
18
|
s.conversation_id, s.agent_id, s.active_transcript_id, s.status, s.name, s.tags_json,
|
|
19
19
|
s.created_at, s.updated_at, s.last_accessed_at, s.session_started_at, s.last_interaction_at,
|
|
20
20
|
s.source_channel, s.source_chat_id, s.session_type, s.hidden_from_session_list,
|
|
21
|
-
s.parent_conversation_id, s.
|
|
22
|
-
s.project_id, s.routing_json, s.custom_data_json,
|
|
21
|
+
s.parent_conversation_id, s.project_id, s.routing_json, s.custom_data_json,
|
|
23
22
|
s.message_count, s.estimated_tokens, s.compacted_count,
|
|
24
23
|
s.last_flushed_at, s.flush_count,
|
|
25
24
|
t.cwd AS cwd
|
|
@@ -10,7 +10,7 @@ import { buildGlobalSessionStats, init_row_mappers, metadataToSessionInsert, ses
|
|
|
10
10
|
import { cancelConnectionObjective, init_connection_wait_repository } from "./connection-wait-repository.js";
|
|
11
11
|
import { init_changes, notifyUserContextChange } from "../../user-context/changes.js";
|
|
12
12
|
import { SESSION_PURPOSE_SQL, SESSION_SOURCE_SQL, init_session_identity_sql } from "./session-identity-sql.js";
|
|
13
|
-
import { buildFts5SearchQuery, init_fts } from "./fts.js";
|
|
13
|
+
import { buildFts5SearchQuery, escapeSqlLike, init_fts, sessionHanSearchTerms } from "./fts.js";
|
|
14
14
|
import { SESSION_COLUMNS, SESSION_FROM_JOIN, getSessionMetadata, init_session_read_repository, readSessionRow } from "./session-read-repository.js";
|
|
15
15
|
import { randomUUID } from "node:crypto";
|
|
16
16
|
//#region src/storage/sqlite/session-repository.ts
|
|
@@ -20,18 +20,10 @@ function insertSessionAndTranscript(db, conversationId, transcriptId, cwd, metad
|
|
|
20
20
|
conversation_id, agent_id, active_transcript_id, status, name, tags_json,
|
|
21
21
|
created_at, updated_at, last_accessed_at, session_started_at, last_interaction_at,
|
|
22
22
|
source_channel, source_chat_id, session_type, hidden_from_session_list,
|
|
23
|
-
parent_conversation_id,
|
|
24
|
-
project_id, routing_json, custom_data_json,
|
|
23
|
+
parent_conversation_id, project_id, routing_json, custom_data_json,
|
|
25
24
|
message_count, estimated_tokens, compacted_count,
|
|
26
25
|
last_flushed_at, flush_count
|
|
27
|
-
) VALUES (
|
|
28
|
-
?, ?, ?, ?, ?,
|
|
29
|
-
?, ?, ?, ?, ?,
|
|
30
|
-
?, ?, ?, ?,
|
|
31
|
-
?, ?, ?, ?, ?,
|
|
32
|
-
?, ?, ?,
|
|
33
|
-
?, ?, ?, ?, ?, ?
|
|
34
|
-
)`).run(row.conversationId, row.agentId, row.transcriptId, row.status, row.name, row.tagsJson, row.createdAt, row.updatedAt, row.lastAccessedAt, row.sessionStartedAt, row.lastInteractionAt, row.sourceChannel, row.sourceChatId, row.sessionType, row.hiddenFromSessionList, row.parentConversationId, row.workflowRunId, row.workflowDefinitionId, row.workflowAgentId, row.workflowAgentLabel, row.projectId, row.routingJson, row.customDataJson, row.messageCount, row.estimatedTokens, row.compactedCount, row.lastFlushedAt, row.flushCount);
|
|
26
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(row.conversationId, row.agentId, row.transcriptId, row.status, row.name, row.tagsJson, row.createdAt, row.updatedAt, row.lastAccessedAt, row.sessionStartedAt, row.lastInteractionAt, row.sourceChannel, row.sourceChatId, row.sessionType, row.hiddenFromSessionList, row.parentConversationId, row.projectId, row.routingJson, row.customDataJson, row.messageCount, row.estimatedTokens, row.compactedCount, row.lastFlushedAt, row.flushCount);
|
|
35
27
|
const now = Date.now();
|
|
36
28
|
db.prepare(`INSERT INTO transcripts (transcript_id, conversation_id, status, created_at, cwd)
|
|
37
29
|
VALUES (?, ?, 'active', ?, ?)`).run(transcriptId, conversationId, now, cwd);
|
|
@@ -66,24 +58,7 @@ function listSessionMetadata(query = {}) {
|
|
|
66
58
|
const params = [];
|
|
67
59
|
if (!query.includeHidden) {
|
|
68
60
|
conditions.push(`s.hidden_from_session_list = 0`);
|
|
69
|
-
conditions.push(`NOT (
|
|
70
|
-
s.source_channel = 'automation'
|
|
71
|
-
AND (
|
|
72
|
-
COALESCE(CASE WHEN json_valid(s.custom_data_json)
|
|
73
|
-
THEN json_extract(s.custom_data_json, '$.systemInternal') END, 0) = 1
|
|
74
|
-
OR COALESCE(CASE WHEN json_valid(s.custom_data_json)
|
|
75
|
-
THEN json_extract(s.custom_data_json, '$.automationId') END, '') LIKE 'system-memory-%'
|
|
76
|
-
)
|
|
77
|
-
)`);
|
|
78
|
-
conditions.push(`(
|
|
79
|
-
s.source_channel NOT IN ('automation', 'workflow')
|
|
80
|
-
OR COALESCE(TRIM(s.name), '') != ''
|
|
81
|
-
OR EXISTS (
|
|
82
|
-
SELECT 1 FROM transcript_entries visible_output
|
|
83
|
-
WHERE visible_output.transcript_id = s.active_transcript_id
|
|
84
|
-
AND visible_output.role IN ('assistant', 'toolResult')
|
|
85
|
-
)
|
|
86
|
-
)`);
|
|
61
|
+
conditions.push(`NOT (s.source_channel = 'automation' AND (COALESCE(CASE WHEN json_valid(s.custom_data_json) THEN json_extract(s.custom_data_json, '$.systemInternal') END, 0) = 1 OR COALESCE(CASE WHEN json_valid(s.custom_data_json) THEN json_extract(s.custom_data_json, '$.automationId') END, '') LIKE 'system-memory-%'))`);
|
|
87
62
|
}
|
|
88
63
|
if (query.rootConversationsOnly && !query.search?.trim()) {
|
|
89
64
|
conditions.push(`NOT EXISTS (
|
|
@@ -166,14 +141,17 @@ function listSessionMetadata(query = {}) {
|
|
|
166
141
|
if (query.search?.trim()) {
|
|
167
142
|
const rawSearch = query.search.trim();
|
|
168
143
|
const like = `%${rawSearch.toLowerCase()}%`;
|
|
144
|
+
const hanTerms = sessionHanSearchTerms(rawSearch);
|
|
169
145
|
conditions.push(`(s.conversation_id IN (
|
|
170
146
|
SELECT conversation_id FROM transcript_fts WHERE transcript_fts MATCH ?
|
|
171
|
-
) OR
|
|
147
|
+
) ${hanTerms.length ? `OR s.conversation_id IN (
|
|
148
|
+
SELECT conversation_id FROM transcript_fts WHERE ${hanTerms.map(() => "content LIKE ? ESCAPE '\\'").join(" OR ")}
|
|
149
|
+
)` : ""} OR LOWER(s.conversation_id) LIKE ?
|
|
172
150
|
OR LOWER(COALESCE(s.name, '')) LIKE ?
|
|
173
151
|
OR LOWER(s.source_channel) LIKE ?
|
|
174
152
|
OR LOWER(s.source_chat_id) LIKE ?
|
|
175
153
|
OR LOWER(s.tags_json) LIKE ?)`);
|
|
176
|
-
params.push(buildFts5SearchQuery(rawSearch), like, like, like, like, like);
|
|
154
|
+
params.push(buildFts5SearchQuery(rawSearch), ...hanTerms.map((term) => `%${escapeSqlLike(term)}%`), like, like, like, like, like);
|
|
177
155
|
}
|
|
178
156
|
const where = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
|
|
179
157
|
const sortColumn = sessionSortColumn(query.sortBy);
|
|
@@ -228,10 +206,6 @@ function patchSessionMetadata(conversationId, updates) {
|
|
|
228
206
|
session_type = ?,
|
|
229
207
|
hidden_from_session_list = ?,
|
|
230
208
|
parent_conversation_id = ?,
|
|
231
|
-
workflow_run_id = ?,
|
|
232
|
-
workflow_definition_id = ?,
|
|
233
|
-
workflow_agent_id = ?,
|
|
234
|
-
workflow_agent_label = ?,
|
|
235
209
|
project_id = ?,
|
|
236
210
|
routing_json = ?,
|
|
237
211
|
custom_data_json = ?,
|
|
@@ -240,7 +214,7 @@ function patchSessionMetadata(conversationId, updates) {
|
|
|
240
214
|
compacted_count = ?,
|
|
241
215
|
last_flushed_at = ?,
|
|
242
216
|
flush_count = ?
|
|
243
|
-
WHERE conversation_id = ?`).run(merged.status, merged.name ?? null, JSON.stringify(merged.tags ?? []), Date.parse(merged.updatedAt) || now, Date.parse(merged.lastAccessedAt) || now, merged.sessionStartedAt ? Date.parse(merged.sessionStartedAt) : existing.session_started_at, merged.lastInteractionAt ? Date.parse(merged.lastInteractionAt) : existing.last_interaction_at, merged.sourceChannel, merged.sourceChatId, merged.sessionType, merged.hiddenFromSessionList ? 1 : 0, merged.parentConversationId ?? null, merged.
|
|
217
|
+
WHERE conversation_id = ?`).run(merged.status, merged.name ?? null, JSON.stringify(merged.tags ?? []), Date.parse(merged.updatedAt) || now, Date.parse(merged.lastAccessedAt) || now, merged.sessionStartedAt ? Date.parse(merged.sessionStartedAt) : existing.session_started_at, merged.lastInteractionAt ? Date.parse(merged.lastInteractionAt) : existing.last_interaction_at, merged.sourceChannel, merged.sourceChatId, merged.sessionType, merged.hiddenFromSessionList ? 1 : 0, merged.parentConversationId ?? null, merged.projectId ?? null, merged.routing ? JSON.stringify(merged.routing) : null, merged.customData ? JSON.stringify(merged.customData) : null, merged.messageCount, merged.estimatedTokens, merged.compactedCount, optionalTimestampToMs(merged.lastFlushedAt), merged.flushCount ?? 0, conversationId);
|
|
244
218
|
const row = readSessionRow(db, conversationId);
|
|
245
219
|
if (!row) throw new Error(`Session not found after patch: ${conversationId}`);
|
|
246
220
|
return sessionRowToMetadata(conversationId, row);
|
|
@@ -34,6 +34,7 @@ export declare function searchSessionTranscript(conversationId: string, query: s
|
|
|
34
34
|
limit?: number;
|
|
35
35
|
beforeSeq?: number;
|
|
36
36
|
orderBySeq?: boolean;
|
|
37
|
+
matchMode?: 'keyword' | 'phrase';
|
|
37
38
|
}): SessionTranscriptRecallMatch[];
|
|
38
39
|
export declare function loadTranscriptRowsForSession(conversationId: string): TranscriptStoredRow[];
|
|
39
40
|
export declare function loadTranscriptHistoryRowsForSession(conversationId: string): TranscriptStoredRow[];
|
|
@@ -3,7 +3,7 @@ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "
|
|
|
3
3
|
import { readCurrentTranscriptId } from "./session-instance-repository.js";
|
|
4
4
|
import { buildSessionContextForLlm, init_session_context_for_llm, isRuntimeOnlyTranscriptMessage } from "../../session/session-context-for-llm.js";
|
|
5
5
|
import { classifyStoredRow, estimateTokensFromMessages, extractFtsContent, init_row_mappers, transcriptEntryRowToStoredRow } from "./row-mappers.js";
|
|
6
|
-
import { escapeFts5Query, init_fts } from "./fts.js";
|
|
6
|
+
import { buildFts5SearchQuery, escapeFts5Query, escapeSqlLike, init_fts, sessionHanSearchTerms } from "./fts.js";
|
|
7
7
|
import { getCurrentTranscriptId, init_session_repository } from "./session-repository.js";
|
|
8
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/storage/sqlite/transcript-repository.ts
|
|
@@ -167,25 +167,27 @@ function searchSessionTranscript(conversationId, query, options = {}) {
|
|
|
167
167
|
const limit = Math.min(20, Math.max(1, options.limit ?? 8));
|
|
168
168
|
const beforeSeq = options.beforeSeq ?? Number.MAX_SAFE_INTEGER;
|
|
169
169
|
const db = getSqliteDatabase();
|
|
170
|
+
const phrase = options.matchMode !== "keyword";
|
|
171
|
+
const hanTerms = phrase ? [] : sessionHanSearchTerms(normalized);
|
|
170
172
|
const ftsRows = db.prepare(`SELECT e.entry_id, e.seq, e.role, e.created_at, f.content
|
|
171
173
|
FROM transcript_fts f
|
|
172
174
|
JOIN transcript_entries e
|
|
173
175
|
ON e.transcript_id = f.transcript_id AND e.entry_id = f.entry_id
|
|
174
|
-
WHERE transcript_fts MATCH ?
|
|
176
|
+
WHERE (transcript_fts MATCH ?)
|
|
175
177
|
AND f.transcript_id = ?
|
|
176
178
|
AND e.entry_kind <> 'compaction'
|
|
177
179
|
AND e.seq < ?
|
|
178
180
|
ORDER BY ${options.orderBySeq ? "e.seq DESC" : "bm25(transcript_fts), e.seq DESC"}
|
|
179
|
-
LIMIT ?`).all(escapeFts5Query(normalized), transcriptId, beforeSeq, limit);
|
|
180
|
-
const
|
|
181
|
-
const literalRows = db.prepare(`SELECT entry_id, seq, role, created_at, payload_json AS content
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
LIMIT ?`).all(phrase ? escapeFts5Query(normalized) : buildFts5SearchQuery(normalized), transcriptId, beforeSeq, limit);
|
|
182
|
+
const literalTerms = [normalized, ...hanTerms];
|
|
183
|
+
const literalRows = phrase ? db.prepare(`SELECT entry_id, seq, role, created_at, payload_json AS content
|
|
184
|
+
FROM transcript_entries WHERE transcript_id = ? AND entry_kind <> 'compaction' AND seq < ?
|
|
185
|
+
AND payload_json LIKE ? ESCAPE '\\' ORDER BY seq DESC LIMIT ?`).all(transcriptId, beforeSeq, `%${escapeSqlLike(normalized)}%`, limit) : db.prepare(`SELECT e.entry_id, e.seq, e.role, e.created_at, f.content
|
|
186
|
+
FROM transcript_fts f JOIN transcript_entries e
|
|
187
|
+
ON e.transcript_id = f.transcript_id AND e.entry_id = f.entry_id
|
|
188
|
+
WHERE f.transcript_id = ? AND e.entry_kind <> 'compaction' AND e.seq < ?
|
|
189
|
+
AND (${literalTerms.map(() => "f.content LIKE ? ESCAPE '\\'").join(" OR ")})
|
|
190
|
+
ORDER BY e.seq DESC LIMIT ?`).all(transcriptId, beforeSeq, ...literalTerms.map((term) => `%${escapeSqlLike(term)}%`), limit);
|
|
189
191
|
const seen = /* @__PURE__ */ new Set();
|
|
190
192
|
const matches = [...ftsRows, ...literalRows].flatMap((row) => {
|
|
191
193
|
const result = row;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { execFileSync } from "node:child_process";
|
|
4
|
-
//#region src/storage/sqlite/
|
|
4
|
+
//#region src/storage/sqlite/windows-database-owners.ts
|
|
5
5
|
const script = String.raw`
|
|
6
6
|
$ErrorActionPreference = 'Stop'
|
|
7
7
|
Add-Type -TypeDefinition @'
|
|
@@ -58,7 +58,7 @@ public static class XopcDatabaseOwners {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
'@
|
|
61
|
-
[XopcDatabaseOwners]::Read([string[]](ConvertFrom-Json $env:
|
|
61
|
+
[XopcDatabaseOwners]::Read([string[]](ConvertFrom-Json $env:XOPC_DATABASE_FILES)) | ForEach-Object { $_ }
|
|
62
62
|
`;
|
|
63
63
|
function windowsDatabaseOwners(databasePath, execute = execFileSync) {
|
|
64
64
|
const paths = [
|
|
@@ -77,7 +77,7 @@ function windowsDatabaseOwners(databasePath, execute = execFileSync) {
|
|
|
77
77
|
windowsHide: true,
|
|
78
78
|
env: {
|
|
79
79
|
...process.env,
|
|
80
|
-
|
|
80
|
+
XOPC_DATABASE_FILES: JSON.stringify(paths)
|
|
81
81
|
},
|
|
82
82
|
stdio: [
|
|
83
83
|
"ignore",
|
|
@@ -21,8 +21,8 @@ var AttentionGovernor = class {
|
|
|
21
21
|
seen.add(key);
|
|
22
22
|
return true;
|
|
23
23
|
});
|
|
24
|
-
const attention = [...input.attention].sort((left, right) => right.updatedAt - left.updatedAt).slice(0, maxAttention);
|
|
25
|
-
const decisions = eligible.slice(0, maxDecisions);
|
|
24
|
+
const attention = [...input.attention].sort((left, right) => right.updatedAt - left.updatedAt).slice(0, input.includeAll ? void 0 : maxAttention);
|
|
25
|
+
const decisions = eligible.slice(0, input.includeAll ? void 0 : maxDecisions);
|
|
26
26
|
return {
|
|
27
27
|
decisions,
|
|
28
28
|
attention,
|
|
@@ -172,8 +172,8 @@ export declare const TaskContextMutationOutputSchema: z.ZodObject<{
|
|
|
172
172
|
targetKind: z.ZodEnum<{
|
|
173
173
|
session: "session";
|
|
174
174
|
task: "task";
|
|
175
|
-
file: "file";
|
|
176
175
|
memory: "memory";
|
|
176
|
+
file: "file";
|
|
177
177
|
url: "url";
|
|
178
178
|
document: "document";
|
|
179
179
|
source: "source";
|
|
@@ -209,8 +209,8 @@ export declare const TaskContextMutationOutputSchema: z.ZodObject<{
|
|
|
209
209
|
targetKind: z.ZodEnum<{
|
|
210
210
|
session: "session";
|
|
211
211
|
task: "task";
|
|
212
|
-
file: "file";
|
|
213
212
|
memory: "memory";
|
|
213
|
+
file: "file";
|
|
214
214
|
url: "url";
|
|
215
215
|
document: "document";
|
|
216
216
|
source: "source";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionMetadata } from '../session/types.js';
|
|
2
2
|
import type { ExecutionEnvironmentKind } from '../execution-environments/types.js';
|
|
3
|
-
export type ExecutionOrigin = 'chat' | 'task' | '
|
|
3
|
+
export type ExecutionOrigin = 'chat' | 'task' | 'automation' | 'browser' | 'heartbeat';
|
|
4
4
|
export type ExecutionTrigger = 'user' | 'schedule' | 'webhook' | 'heartbeat' | 'retry';
|
|
5
5
|
export interface ExecutionContext {
|
|
6
6
|
runId: string;
|
|
@@ -7,7 +7,6 @@ init_sqlite();
|
|
|
7
7
|
const ORIGINS = new Set([
|
|
8
8
|
"chat",
|
|
9
9
|
"task",
|
|
10
|
-
"workflow",
|
|
11
10
|
"automation",
|
|
12
11
|
"browser",
|
|
13
12
|
"heartbeat"
|
|
@@ -26,7 +25,6 @@ function metadataOrigin(metadata, taskId) {
|
|
|
26
25
|
const explicit = optionalString(metadata.customData?.origin);
|
|
27
26
|
if (explicit && ORIGINS.has(explicit)) return explicit;
|
|
28
27
|
if (taskId) return "task";
|
|
29
|
-
if (metadata.sessionType === "workflow-run" || metadata.sessionType === "workflow-subagent") return "workflow";
|
|
30
28
|
if (metadata.sessionType === "cron") return "automation";
|
|
31
29
|
if (metadata.sessionType === "heartbeat") return "heartbeat";
|
|
32
30
|
if (optionalString(metadata.customData?.browserRecipeId)) return "browser";
|
|
@@ -2,21 +2,8 @@ import type { HomeAttention, HomeAdvisor, HomeDecision, HomeResponse } from '@xo
|
|
|
2
2
|
import type { AutomationService } from '../automations/service/automation-service.js';
|
|
3
3
|
import type { Config } from '../config/schema.js';
|
|
4
4
|
import type { ProjectService } from '../projects/project-service.js';
|
|
5
|
-
import type { WorkflowRunSummary } from '../workflows/domain/index.js';
|
|
6
|
-
import type { WorkflowRunService } from '../workflows/service/workflow-run-service.js';
|
|
7
5
|
import { type TaskAggregate } from './task-repository.js';
|
|
8
6
|
import { type TaskReadModel } from './task-read-model-projector.js';
|
|
9
|
-
type HomeWorkflowRun = {
|
|
10
|
-
id: string;
|
|
11
|
-
definitionId: string;
|
|
12
|
-
title: string;
|
|
13
|
-
status: WorkflowRunSummary['status'];
|
|
14
|
-
conversationId?: string;
|
|
15
|
-
createdAtMs: number;
|
|
16
|
-
startedAtMs?: number;
|
|
17
|
-
completedAtMs?: number;
|
|
18
|
-
metrics: WorkflowRunSummary['metrics'];
|
|
19
|
-
};
|
|
20
7
|
type HomeAutomation = {
|
|
21
8
|
id: string;
|
|
22
9
|
name?: string;
|
|
@@ -42,15 +29,14 @@ interface HomeGatewayPort {
|
|
|
42
29
|
};
|
|
43
30
|
} | null>;
|
|
44
31
|
};
|
|
45
|
-
createWorkflowRunService(): WorkflowRunService;
|
|
46
32
|
}
|
|
47
33
|
export declare function decisionFromTask(model: TaskReadModel, projectName?: string, locale?: string): HomeDecision | null;
|
|
48
34
|
export declare function buildHomeWorkbench(input: {
|
|
49
35
|
locale?: string;
|
|
50
36
|
decisions: HomeDecision[];
|
|
51
37
|
attention: HomeAttention[];
|
|
52
|
-
activeWorkflowRuns: HomeWorkflowRun[];
|
|
53
38
|
runningTasks: TaskAggregate[];
|
|
39
|
+
waitingTaskReasons?: Record<string, string>;
|
|
54
40
|
scheduled: HomeAutomation[];
|
|
55
41
|
nowMs: number;
|
|
56
42
|
}): Pick<HomeResponse, 'needsUser' | 'background' | 'backgroundCount'>;
|
|
@@ -59,6 +45,6 @@ export declare class HomeQueryService {
|
|
|
59
45
|
private readonly service;
|
|
60
46
|
private readonly getAdvisor;
|
|
61
47
|
constructor(service: HomeGatewayPort, getAdvisor?: (locale?: string) => HomeAdvisor);
|
|
62
|
-
getSnapshot(locale?: string): Promise<HomeResponse>;
|
|
48
|
+
getSnapshot(locale?: string, includeAll?: boolean): Promise<HomeResponse>;
|
|
63
49
|
}
|
|
64
50
|
export {};
|
|
@@ -1,28 +1,16 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
2
|
+
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
2
3
|
import { isHomeAttentionAcknowledged } from "../storage/sqlite/home-attention-repository.js";
|
|
3
4
|
import { listConnectorApprovals } from "../storage/sqlite/connector-repository.js";
|
|
4
5
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
5
6
|
import { TaskReadModelProjector } from "./task-read-model-projector.js";
|
|
6
7
|
import "../automations/domain/defaults.js";
|
|
7
8
|
import { AttentionGovernor } from "./attention-governor.js";
|
|
8
|
-
import { listGatewayAgents } from "../gateway/agents-admin.js";
|
|
9
9
|
import "../automations/index.js";
|
|
10
10
|
//#region src/tasks/home-query-service.ts
|
|
11
11
|
init_sqlite();
|
|
12
12
|
init_task_repository();
|
|
13
|
-
|
|
14
|
-
return {
|
|
15
|
-
id: run.id,
|
|
16
|
-
definitionId: run.definitionId,
|
|
17
|
-
title: run.title,
|
|
18
|
-
status: run.status,
|
|
19
|
-
conversationId: run.metadata?.conversationId,
|
|
20
|
-
createdAtMs: run.createdAtMs,
|
|
21
|
-
startedAtMs: run.startedAtMs,
|
|
22
|
-
completedAtMs: run.completedAtMs,
|
|
23
|
-
metrics: run.metrics
|
|
24
|
-
};
|
|
25
|
-
}
|
|
13
|
+
init_task_run_repository();
|
|
26
14
|
function triggerLabel(automation) {
|
|
27
15
|
const trigger = automation.trigger;
|
|
28
16
|
if (trigger.kind === "manual") return "manual";
|
|
@@ -34,7 +22,6 @@ function triggerLabel(automation) {
|
|
|
34
22
|
return schedule.expr;
|
|
35
23
|
}
|
|
36
24
|
function actionLabel(automation) {
|
|
37
|
-
if (automation.action.kind === "workflow") return `workflow:${automation.action.workflowId}`;
|
|
38
25
|
if (automation.action.kind === "browser_automation") return `browser-automation:${automation.action.automationId}`;
|
|
39
26
|
if (automation.action.kind === "task_command") return `task:${automation.action.command.type}`;
|
|
40
27
|
if (automation.action.kind === "system") return `system:${automation.action.capability}`;
|
|
@@ -60,14 +47,18 @@ function attentionDetail(kind, status, locale, timeoutSeconds) {
|
|
|
60
47
|
const duration = seconds % 60 === 0 ? `${seconds / 60} ${isChinese ? "分钟" : seconds === 60 ? "minute" : "minutes"}` : `${seconds} ${isChinese ? "秒" : seconds === 1 ? "second" : "seconds"}`;
|
|
61
48
|
return isChinese ? `运行超过 ${duration},系统已停止本次执行。` : `The run exceeded ${duration} and was stopped.`;
|
|
62
49
|
}
|
|
63
|
-
|
|
64
|
-
return kind === "automation_run" ? "The automation did not complete. Review the details and retry." : "The workflow did not complete. Review the details and retry.";
|
|
50
|
+
return isChinese ? "自动化未能完成,请查看详情后重试。" : "The automation did not complete. Review the details and retry.";
|
|
65
51
|
}
|
|
66
52
|
function decisionFromTask(model, projectName, locale) {
|
|
67
53
|
const task = model.task;
|
|
68
54
|
if (task.phase === "closed" || model.operationalState === "waiting" && model.attention.length === 0) return null;
|
|
69
55
|
const isChinese = locale?.toLowerCase().startsWith("zh") ?? task.locale === "zh";
|
|
70
|
-
|
|
56
|
+
const waitingAttention = model.attention.some((item) => [
|
|
57
|
+
"input_required",
|
|
58
|
+
"approval_required",
|
|
59
|
+
"dependency_blocked"
|
|
60
|
+
].includes(item.kind));
|
|
61
|
+
if (task.phase === "review" && !waitingAttention) return {
|
|
71
62
|
id: `task:${task.id}:review`,
|
|
72
63
|
response: {
|
|
73
64
|
kind: "task",
|
|
@@ -88,12 +79,13 @@ function decisionFromTask(model, projectName, locale) {
|
|
|
88
79
|
const item = model.attention.find((candidate) => [
|
|
89
80
|
"input_required",
|
|
90
81
|
"approval_required",
|
|
82
|
+
"dependency_blocked",
|
|
91
83
|
"run_failed",
|
|
92
84
|
"verification_failed",
|
|
93
85
|
"overdue"
|
|
94
86
|
].includes(candidate.kind));
|
|
95
87
|
if (!item) return null;
|
|
96
|
-
const reason = item.kind === "input_required" ? "needs_input" : item.kind === "approval_required" ? "approval_required" : item.kind === "run_failed" || item.kind === "verification_failed" ? "retry" : item.kind === "overdue" ? "overdue" : void 0;
|
|
88
|
+
const reason = item.kind === "input_required" ? "needs_input" : item.kind === "approval_required" ? "approval_required" : item.kind === "dependency_blocked" ? "dependency" : item.kind === "run_failed" || item.kind === "verification_failed" ? "retry" : item.kind === "overdue" ? "overdue" : void 0;
|
|
97
89
|
if (!reason) return null;
|
|
98
90
|
return {
|
|
99
91
|
id: `task:${task.id}`,
|
|
@@ -129,7 +121,8 @@ function homeActionCopy(locale) {
|
|
|
129
121
|
viewProgress: "查看进度",
|
|
130
122
|
viewSchedule: "查看计划",
|
|
131
123
|
runningTask: "任务正在推进",
|
|
132
|
-
|
|
124
|
+
waitingTask: "等待条件",
|
|
125
|
+
dependencyRecommendation: "先查看并处理依赖任务,再继续推进。",
|
|
133
126
|
scheduled: "下一项定时工作",
|
|
134
127
|
inputRecommendation: "建议补充所需信息,让工作继续推进。",
|
|
135
128
|
approvalRecommendation: "建议先确认操作范围;符合预期后允许本次操作。",
|
|
@@ -145,7 +138,8 @@ function homeActionCopy(locale) {
|
|
|
145
138
|
viewProgress: "View progress",
|
|
146
139
|
viewSchedule: "View schedule",
|
|
147
140
|
runningTask: "Task in progress",
|
|
148
|
-
|
|
141
|
+
waitingTask: "Waiting",
|
|
142
|
+
dependencyRecommendation: "Resolve the dependency before continuing.",
|
|
149
143
|
scheduled: "Next scheduled work",
|
|
150
144
|
inputRecommendation: "Provide the missing information so the work can continue.",
|
|
151
145
|
approvalRecommendation: "Confirm the operation scope, then allow it if it matches your intent.",
|
|
@@ -165,6 +159,7 @@ function formatScheduleDistance(value, nowMs, locale) {
|
|
|
165
159
|
function decisionRecommendation(decision, copy) {
|
|
166
160
|
if (decision.reason === "needs_input" || decision.reason === "user_input") return copy.inputRecommendation;
|
|
167
161
|
if (decision.reason === "approval_required" || decision.reason === "user_approval") return copy.approvalRecommendation;
|
|
162
|
+
if (decision.reason === "dependency") return copy.dependencyRecommendation;
|
|
168
163
|
if (decision.reason === "retry") return copy.retryRecommendation;
|
|
169
164
|
return copy.reviewRecommendation;
|
|
170
165
|
}
|
|
@@ -244,23 +239,6 @@ function buildHomeWorkbench(input) {
|
|
|
244
239
|
runId: item.runId
|
|
245
240
|
}]
|
|
246
241
|
}));
|
|
247
|
-
const workflows = input.activeWorkflowRuns.map((run) => {
|
|
248
|
-
const openAction = {
|
|
249
|
-
type: "open",
|
|
250
|
-
label: copy.viewProgress,
|
|
251
|
-
href: run.conversationId ? `/chat/${encodeURIComponent(run.conversationId)}` : `/workflows?runId=${encodeURIComponent(run.id)}`
|
|
252
|
-
};
|
|
253
|
-
return {
|
|
254
|
-
id: `workflow:${run.id}`,
|
|
255
|
-
kind: "running",
|
|
256
|
-
title: run.title,
|
|
257
|
-
summary: copy.runningWorkflow,
|
|
258
|
-
statusLabel: run.metrics.agentCount > 0 ? `${run.metrics.doneAgentCount}/${run.metrics.agentCount}` : void 0,
|
|
259
|
-
updatedAt: run.startedAtMs ?? run.createdAtMs,
|
|
260
|
-
openAction,
|
|
261
|
-
secondaryActions: []
|
|
262
|
-
};
|
|
263
|
-
});
|
|
264
242
|
const tasks = input.runningTasks.map((task) => {
|
|
265
243
|
const openAction = {
|
|
266
244
|
type: "open",
|
|
@@ -271,7 +249,8 @@ function buildHomeWorkbench(input) {
|
|
|
271
249
|
id: `task:${task.id}`,
|
|
272
250
|
kind: "running",
|
|
273
251
|
title: task.title,
|
|
274
|
-
summary: copy.runningTask,
|
|
252
|
+
summary: input.waitingTaskReasons?.[task.id] ?? copy.runningTask,
|
|
253
|
+
...input.waitingTaskReasons?.[task.id] ? { statusLabel: copy.waitingTask } : {},
|
|
275
254
|
updatedAt: task.updatedAt,
|
|
276
255
|
openAction,
|
|
277
256
|
secondaryActions: []
|
|
@@ -298,14 +277,10 @@ function buildHomeWorkbench(input) {
|
|
|
298
277
|
});
|
|
299
278
|
failures.sort((left, right) => right.updatedAt - left.updatedAt);
|
|
300
279
|
const needsUser = [...decisions, ...failures];
|
|
301
|
-
const allBackground = [
|
|
302
|
-
...workflows,
|
|
303
|
-
...tasks,
|
|
304
|
-
...scheduled
|
|
305
|
-
];
|
|
280
|
+
const allBackground = [...tasks, ...scheduled];
|
|
306
281
|
return {
|
|
307
282
|
needsUser,
|
|
308
|
-
background: allBackground
|
|
283
|
+
background: allBackground,
|
|
309
284
|
backgroundCount: allBackground.length
|
|
310
285
|
};
|
|
311
286
|
}
|
|
@@ -320,15 +295,11 @@ var HomeQueryService = class {
|
|
|
320
295
|
this.service = service;
|
|
321
296
|
this.getAdvisor = getAdvisor;
|
|
322
297
|
}
|
|
323
|
-
async getSnapshot(locale) {
|
|
324
|
-
const agents = await listGatewayAgents();
|
|
325
|
-
const defaultAgent = agents.agents.find((agent) => agent.id === agents.defaultId) ?? agents.agents[0];
|
|
326
|
-
const workflowRunStore = this.service.createWorkflowRunService().createRunStore(defaultAgent?.id ?? agents.defaultId);
|
|
298
|
+
async getSnapshot(locale, includeAll = false) {
|
|
327
299
|
const nowMs = Date.now();
|
|
328
300
|
const tasks = this.#tasks.list({ limit: 60 });
|
|
329
301
|
const activeRuns = this.service.sessions.listActiveRuns();
|
|
330
|
-
const [
|
|
331
|
-
workflowRunStore.listRunSummaries(20),
|
|
302
|
+
const [automations, automationRuns, projects, connectorApprovals, activeRunSessions] = await Promise.all([
|
|
332
303
|
this.service.automationServiceInstance.list(),
|
|
333
304
|
this.service.automationServiceInstance.listRuns({ limit: 10 }),
|
|
334
305
|
this.service.projects.list({ limit: 500 }),
|
|
@@ -355,8 +326,6 @@ var HomeQueryService = class {
|
|
|
355
326
|
}).sort((left, right) => right.updatedAt - left.updatedAt);
|
|
356
327
|
const activeTasks = tasks.filter((task) => task.phase !== "closed");
|
|
357
328
|
const projectsById = new Map(projects.items.map((project) => [project.id, project]));
|
|
358
|
-
const activeWorkflowRuns = workflowRuns.filter((run) => run.status === "queued" || run.status === "running").map(toHomeWorkflowRun);
|
|
359
|
-
const failedWorkflowRuns = workflowRuns.filter((run) => run.status === "failed" || run.status === "timeout").slice(0, 5).map(toHomeWorkflowRun);
|
|
360
329
|
const upcomingAutomations = automations.filter((automation) => automation.delivery.notificationPolicy !== "none").map(toHomeAutomation).filter((automation) => Boolean(automation)).sort((a, b) => Date.parse(a.nextRunAt) - Date.parse(b.nextRunAt));
|
|
361
330
|
const latestAutomationRuns = [...automationRuns].sort((left, right) => right.createdAtMs - left.createdAtMs).filter((run, index, all) => all.findIndex((candidate) => candidate.automationId === run.automationId) === index);
|
|
362
331
|
const automationsById = new Map(automations.map((automation) => [automation.id, automation]));
|
|
@@ -374,17 +343,7 @@ var HomeQueryService = class {
|
|
|
374
343
|
approvalId: approval.id
|
|
375
344
|
}
|
|
376
345
|
}))];
|
|
377
|
-
const attentionCandidates = [...
|
|
378
|
-
id: `workflow_run:${run.id}`,
|
|
379
|
-
kind: "workflow_run",
|
|
380
|
-
runId: run.id,
|
|
381
|
-
title: run.title,
|
|
382
|
-
detail: attentionDetail("workflow_run", run.status === "timeout" ? "timeout" : "failed", locale),
|
|
383
|
-
reason: run.status === "timeout" ? "run_timeout" : "run_failed",
|
|
384
|
-
href: `/workflows?runId=${encodeURIComponent(run.id)}`,
|
|
385
|
-
updatedAt: run.completedAtMs ?? run.startedAtMs ?? run.createdAtMs,
|
|
386
|
-
conversationId: run.conversationId
|
|
387
|
-
})), ...latestAutomationRuns.filter((run) => run.status === "failed" || run.status === "timeout").filter((run) => automationsById.get(run.automationId)?.delivery.notificationPolicy !== "none").filter((run) => !isHomeAttentionAcknowledged("automation_run", run.id)).map((run) => ({
|
|
346
|
+
const attentionCandidates = [...latestAutomationRuns.filter((run) => run.status === "failed" || run.status === "timeout").filter((run) => automationsById.get(run.automationId)?.delivery.notificationPolicy !== "none").filter((run) => !isHomeAttentionAcknowledged("automation_run", run.id)).map((run) => ({
|
|
388
347
|
id: `automation_run:${run.id}`,
|
|
389
348
|
kind: "automation_run",
|
|
390
349
|
runId: run.id,
|
|
@@ -396,21 +355,32 @@ var HomeQueryService = class {
|
|
|
396
355
|
conversationId: run.conversationId
|
|
397
356
|
}))].sort((left, right) => right.updatedAt - left.updatedAt);
|
|
398
357
|
const governed = this.#attentionGovernor.project({
|
|
358
|
+
includeAll,
|
|
399
359
|
decisions: decisionCandidates,
|
|
400
360
|
attention: attentionCandidates
|
|
401
361
|
});
|
|
402
362
|
const decisions = governed.decisions;
|
|
403
363
|
const attention = governed.attention;
|
|
364
|
+
const waitingTaskReasons = {};
|
|
404
365
|
return {
|
|
405
366
|
...buildHomeWorkbench({
|
|
406
367
|
locale,
|
|
407
368
|
decisions,
|
|
408
369
|
attention,
|
|
409
|
-
activeWorkflowRuns,
|
|
410
370
|
runningTasks: tasks.filter((task) => {
|
|
411
|
-
|
|
412
|
-
|
|
371
|
+
if (task.phase === "closed") return false;
|
|
372
|
+
const model = this.#projector.project(task);
|
|
373
|
+
if (model.operationalState === "waiting" && model.attention.length === 0) {
|
|
374
|
+
waitingTaskReasons[task.id] = new TaskRunRepository().listActiveWaits(task.id)[0]?.reason ?? homeActionCopy(locale).waitingTask;
|
|
375
|
+
return true;
|
|
376
|
+
}
|
|
377
|
+
return [
|
|
378
|
+
"queued",
|
|
379
|
+
"running",
|
|
380
|
+
"verifying"
|
|
381
|
+
].includes(model.operationalState);
|
|
413
382
|
}),
|
|
383
|
+
waitingTaskReasons,
|
|
414
384
|
scheduled: upcomingAutomations,
|
|
415
385
|
nowMs
|
|
416
386
|
}),
|
|
@@ -2,7 +2,6 @@ export * from './execution-context.js';
|
|
|
2
2
|
export * from './attention-governor.js';
|
|
3
3
|
export * from './home-query-service.js';
|
|
4
4
|
export * from './task-repository.js';
|
|
5
|
-
export * from './task-workflow-coordinator.js';
|
|
6
5
|
export * from './task-contract-definition.js';
|
|
7
6
|
export * from './task-contract-planner.js';
|
|
8
7
|
export * from './task-context-assembler.js';
|
package/dist/src/tasks/index.js
CHANGED
|
@@ -13,7 +13,6 @@ import { TaskSignalService } from "./task-signal-service.js";
|
|
|
13
13
|
import { resolveExecutionContext } from "./execution-context.js";
|
|
14
14
|
import { AttentionGovernor } from "./attention-governor.js";
|
|
15
15
|
import { HomeQueryService, buildHomeWorkbench, decisionFromTask } from "./home-query-service.js";
|
|
16
|
-
import { TaskWorkflowCoordinator } from "./task-workflow-coordinator.js";
|
|
17
16
|
import { ModelTaskContractPlanner, parseTaskContractResponse } from "./task-contract-planner.js";
|
|
18
17
|
import { assembleTaskContext, buildDelegatedTaskDirective, buildTaskExecutionDirective, getTaskContextManifest, getTaskExecutionBrief } from "./task-context-assembler.js";
|
|
19
18
|
import { TaskRunCoordinator } from "./task-run-coordinator.js";
|
|
@@ -25,4 +24,4 @@ init_task_repository();
|
|
|
25
24
|
init_task_change_events();
|
|
26
25
|
init_task_run_repository();
|
|
27
26
|
//#endregion
|
|
28
|
-
export { AttentionGovernor, HomeQueryService, ModelTaskContractPlanner, ProjectOperatingViewService, TaskApplicationService, TaskContextRepository, TaskConversationConflictError, TaskConversationRepository, TaskDeletionService, TaskDependencyError, TaskDependencyService, TaskHandoffService, TaskReadModelProjector, TaskRepository, TaskRunCoordinator, TaskRunDispatcher, TaskRunRepository, TaskSignalService, TaskValueMetricsService,
|
|
27
|
+
export { AttentionGovernor, HomeQueryService, ModelTaskContractPlanner, ProjectOperatingViewService, TaskApplicationService, TaskContextRepository, TaskConversationConflictError, TaskConversationRepository, TaskDeletionService, TaskDependencyError, TaskDependencyService, TaskHandoffService, TaskReadModelProjector, TaskRepository, TaskRunCoordinator, TaskRunDispatcher, TaskRunRepository, TaskSignalService, TaskValueMetricsService, assembleTaskContext, buildDelegatedTaskDirective, buildHomeWorkbench, buildTaskExecutionDirective, buildTaskRunMessage, decisionFromTask, defineTaskContract, enqueueTaskAttentionRequiredEvent, enqueueTaskChanged, enqueueTaskChangedEvent, getTaskContextManifest, getTaskExecutionBrief, parseTaskContractResponse, resolveExecutionContext, summarizeProjectOperatingView };
|
|
@@ -93,7 +93,6 @@ var ProjectOperatingViewService = class {
|
|
|
93
93
|
href: `/tasks/${encodeURIComponent(card.id)}`,
|
|
94
94
|
updatedAt: card.updatedAt
|
|
95
95
|
}))),
|
|
96
|
-
running: project.recentWorkflowRuns.filter((run) => run.status === "queued" || run.status === "running"),
|
|
97
96
|
recentResults,
|
|
98
97
|
digest: {
|
|
99
98
|
health: cards.length === 0 ? "empty" : attentionCount > 0 ? "attention" : "healthy",
|
|
@@ -32,11 +32,6 @@ function requestHash(value) {
|
|
|
32
32
|
function executorRef(executor) {
|
|
33
33
|
switch (executor.kind) {
|
|
34
34
|
case "agent": return { agentId: executor.agentId };
|
|
35
|
-
case "workflow": return {
|
|
36
|
-
workflowId: executor.workflowId,
|
|
37
|
-
...executor.workflowVersion ? { workflowVersion: executor.workflowVersion } : {},
|
|
38
|
-
...executor.input === void 0 ? {} : { input: executor.input }
|
|
39
|
-
};
|
|
40
35
|
case "human": return { actorId: executor.actorId };
|
|
41
36
|
case "external": return {
|
|
42
37
|
provider: executor.provider,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ActorRef, Task, TaskAcceptancePolicy, TaskContract, TaskPhase, TaskPriority, TaskResolution, TaskPhaseChange, TaskChangeSource } from '@xopcai/gateway-contract';
|
|
2
|
-
export type TaskExecutionSource = 'chat' | 'cli' | 'cron' | '
|
|
2
|
+
export type TaskExecutionSource = 'chat' | 'cli' | 'cron' | 'channel' | 'api';
|
|
3
3
|
export type TaskUiLocale = 'en' | 'zh';
|
|
4
4
|
export type TaskAggregate = Task;
|
|
5
5
|
type TaskListQuery = {
|