@xopcai/xopc 0.0.410 → 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-byEnJz9H.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-BXssEuq3.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-C-puATkS.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-DBz_2AhG.js → binary-plugins-B0ispXo2.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BOO5kjIl.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-yfPUz5Wt.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-Dlzn80cK.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-DGjpqOKx.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-CwT1LcLR.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-DX-hX_d0.js → extension-debug-page-CTe7Molh.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Cji87mN9.js → extension-page-C0-oP7S_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BulzpwBD.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-BgTqMa_d.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-DQJXvbr_.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-Bfqez8Je.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-DSsANtha.js → runtime-tools-settings-panel-CbmiiLsq.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-vbhv4JE6.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-4nn0sb6v.js → settings-form-section-DD3iD5t5.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-_HB9FC08.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-CyO89DKl.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-DOUyF9Ew.js → tunnel-api-C6XfsSWy.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Bv3fdfw1.js → usage-page-DgqLD8Y5.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-D0MhLMD2.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-Ds_ADBQH.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-Di-oEpCt.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/run-background-review.js +2 -2
- 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/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 +6 -9
- 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.js +5 -1
- 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 +17 -64
- package/dist/src/history/ctx/format.js +1 -1
- package/dist/src/home-intelligence/capability-preflight.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- 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/usage-policy.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/memory-learning/forget-capture.js +3 -2
- package/dist/src/memory-learning/forgotten-history.d.ts +10 -0
- package/dist/src/memory-learning/forgotten-history.js +117 -13
- 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/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/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/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 +4 -33
- 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/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 +6 -7
- 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-ColV_Z1C.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-rgRXzBCX.js +0 -1
- package/dist/gateway/static/root/assets/agents-C1rSl_yE.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-B-Cl1lzt.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BfVMfjkC.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-b7MTHd-X.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-DMqDOJgO.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-KZStwhX7.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-CD6PzNK7.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-DeJuO2rf.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DPxL_3Km.js +0 -8
- package/dist/gateway/static/root/assets/channels-Cp4F9zPz.js +0 -1
- package/dist/gateway/static/root/assets/code-editor-CXIH8jQw.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-BXhmUWbA.js +0 -1
- package/dist/gateway/static/root/assets/connector-service-page-B1oJCj74.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Da_M7h3m.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-BfWUD3LG.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-CPEi55Vt.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CmQ_H-nM.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-BeTjXc3C.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-CIdEroWr.js +0 -1
- package/dist/gateway/static/root/assets/highlight-code-BH65IIbJ.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BSbYrVda.js +0 -2
- package/dist/gateway/static/root/assets/image-generation-api-BfPYnMoc.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-DYSOfHfw.js +0 -1
- package/dist/gateway/static/root/assets/index-D2hEKnTM.js +0 -267
- package/dist/gateway/static/root/assets/index-SmKNPEmJ.css +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-BwsGM6Yd.js +0 -1
- package/dist/gateway/static/root/assets/languages-BFe8nIOO.js +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-K6UR6cAx.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-page-gkdwtjDE.js +0 -1
- package/dist/gateway/static/root/assets/locale-store-D_migb9R.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-BAQNYk0e.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-CMVRLGox.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-Cx0bXBqu.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-1GCqp26U.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-B7RA-WsY.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-DnjlEdzM.js +0 -8
- package/dist/gateway/static/root/assets/page-context-capture-button-BAwI_3uh.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-XoLrcR0U.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-BjzIp3T5.js +0 -1
- package/dist/gateway/static/root/assets/plus-Q2yW6OE7.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-2YjwlRHu.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-DwmnNJvk.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-D7wLwrqj.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-1ueRCmXg.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CDQycMPo.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-YvVmZA4K.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-B3rPljgr.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Ch20Ptzp.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-L1HHrvzi.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-C4lC0W3d.js +0 -2
- package/dist/gateway/static/root/assets/shares-settings-DtHZ9z5K.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Drg356Pb.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-XhCLHKlK.js +0 -2
- package/dist/gateway/static/root/assets/source-workspace-editor-DunRD1gY.js +0 -1
- package/dist/gateway/static/root/assets/style-DTLpCnuA.js +0 -7
- package/dist/gateway/static/root/assets/system-settings-panel-bSogz4S-.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-CSv2x4q-.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-CZ5XLQmX.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-BD7WvhI0.js +0 -2
- package/dist/gateway/static/root/assets/work-discovery-overlay-CDJp2_l2.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-CR4fRhZZ.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-BeJw5liC.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
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const xopcUseManual = "# XOPC Use Tool Manual\n\n## Purpose\n\n`xopc_use` operates first-class XOPC product objects without editing SQLite or product files directly.\nLoad this manual before a non-trivial mutation. For focused configuration workflows use\n`tool_manual({tool:\"xopc_use\",topic:\"agent|settings|automation|connections\"})`.\nFor identity-only changes prefer `agent patch_profile {id,expectedRevision,patch,idempotencyKey?}`,\nwhich preserves omitted profile fields. Existing update keeps replacement semantics for profile.\n\n```json\n{\n \"mode\": \"agent | project | automation | note | task | task_run | chat_preview | local_app | settings\",\n \"command\": \"...\",\n \"args\": {},\n \"dryRun\": false\n}\n```\n\nSend one object command per call. Inspect the returned JSON `ok` field; a tool call can\ncomplete successfully while the product command returns `ok: false`.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\n| Agent definition and default Agent | `xopc_use` mode `agent` |\n| Project, milestone, project update | `xopc_use` mode `project` |\n| Automation | `xopc_use` mode `automation` |\n| Task intent and lifecycle | `xopc_use` mode `task` |\n| Task execution attempt, receipt, events and waits | `xopc_use` mode `task_run` |\n| Note | `xopc_use` mode `note` |\n| Lightweight UI preview | `xopc_use` mode `chat_preview` |\n| Local app | `xopc_use` mode `local_app` |\n| Settings jump target | `xopc_use` mode `settings` |\n| Workflow run | dedicated `workflow` tool; pass `taskId` to link it to a Task |\n| Session, memory, skill, connected app or workspace file | its dedicated tool |\n\nDo not emulate Workflow APIs through `xopc_use`. A Task is durable intent;\na TaskRun is one execution attempt; a WorkflowRun is a procedure execution and may belong\nto a TaskRun. Never treat these three objects as interchangeable.\n\n## Agents\n\nCommands: `list`, `get`, `create`, `update`, `set_default`, `disable`,\n`delete`, and `purge`.\n\nAn Agent profile stores `name` and optional `description`, `creature`, `style`, `language`,\n`emoji`, and `avatar` identity fields. Use `instructions` for short execution rules.\nPut personality in SOUL.md and ongoing work guidance in AGENTS.md.\n\n```json\n{\n \"mode\": \"agent\",\n \"command\": \"create\",\n \"args\": {\n \"id\": \"xiaomei\",\n \"profile\": {\n \"name\": \"\u5C0F\u7F8E\",\n \"description\": \"\u5E2E\u52A9\u6574\u7406\u65E5\u5E38\u4E8B\u9879\",\n \"language\": \"zh-CN\",\n \"style\": \"\u6E29\u67D4\u3001\u4EB2\u5207\",\n \"instructions\": \"\u7ED9\u51FA\u64CD\u4F5C\u5EFA\u8BAE\u524D\u5148\u6838\u5BF9\u5173\u952E\u4E8B\u5B9E\u3002\"\n },\n \"idempotencyKey\": \"create-agent-xiaomei\"\n }\n}\n```\n\nUse `list` before creating an Agent so an existing id is updated rather than duplicated.\nMutations other than `create` require the current `expectedRevision`; `set_default` uses\nthe catalog revision returned by `list`. `delete` preserves on-disk data, while `purge`\nalso removes it. Use `dryRun: true` to validate the exact same input contract without writing.\n\n## Reliable protocol\n\n1. Use `list` then `get` when an id is unknown.\n2. Read the current `version` before a Task mutation.\n3. Use `dryRun: true` for broad Project changes or uncertain mutations.\n4. Mutate once with the exact id and current concurrency token.\n5. Verify the returned object and preserve any \u201COpen in xopc\u201D delivery link.\n6. On a conflict, read again and reconsider the operation; do not blindly retry.\n\nTimestamps are Unix epoch milliseconds. Array fields are arrays of strings. Omission\npreserves a patchable field; an empty array intentionally clears it. Prefer explicit\n`projectId`, `taskId`, `runId`, `noteId`, and `localAppId` fields over `id`.\n\n## Projects\n\nCommands: `list`, `get`, `create`, `update`, `resolve_workspace`,\n`list_milestones`, `create_milestone`, `update_milestone`, `list_updates`,\nand `create_update`.\n\nProject statuses: `planned`, `active`, `paused`, `completed`, `cancelled`,\n`archived`. Health values: `unknown`, `on_track`, `at_risk`, `off_track`.\n\nA Project defines bounded shared context for related work. Its durable planning fields are `outcome`,\n`successCriteria`, `scope`, `nonGoals`, `ownerId`, `targetAt`, and `health`.\nUse `brief` for a concise description and `instructions` for durable operating guidance.\n\n### Create\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"AI Product Research\",\n \"outcome\": \"Choose a validated product direction\",\n \"successCriteria\": [\"Ten customer interviews\", \"Decision recorded\"],\n \"scope\": { \"market\": \"developer tools\" },\n \"nonGoals\": [\"Build the production product\"],\n \"health\": \"on_track\",\n \"targetAt\": 1760000000000,\n \"workspaceRoot\": \"/path/to/repo\"\n }\n}\n```\n\n### Update\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"status\": \"active\",\n \"health\": \"at_risk\",\n \"successCriteria\": [\"Ten interviews\", \"Evidence-backed decision\"]\n }\n}\n```\n\n### Resolve a workspace\n\nUse `autoCreate: false` for lookup. Set it to true only when creating a Project is authorized.\n\n```json\n{ \"mode\": \"project\", \"command\": \"resolve_workspace\", \"args\": { \"workspacePath\": \"/path/to/repo\", \"autoCreate\": false } }\n```\n\n### Milestones\n\nMilestone statuses: `planned`, `active`, `completed`, `cancelled`.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_milestone\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"title\": \"Finish discovery\",\n \"status\": \"active\",\n \"targetAt\": 1760000000000,\n \"sortOrder\": 10\n }\n}\n```\n\nUse `list_milestones` with `projectId`. Use `update_milestone` with both\n`projectId` and `milestoneId`. Milestone deletion is intentionally not exposed.\n\n### Immutable project updates\n\nProject updates are append-only progress snapshots. They also update Project health.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"health\": \"on_track\",\n \"summary\": \"Discovery is complete\",\n \"progress\": [\"Interviewed ten users\"],\n \"risks\": [\"Pricing remains unvalidated\"],\n \"nextSteps\": [\"Run pricing tests\"]\n }\n}\n```\n\nUse `list_updates` with `projectId` and optional `limit`. Updates cannot be edited.\n\n## Automations\n\nCommands: `list`, `get`, `create`, `update`, `delete`, `run`, `pause`,\n`resume`, and `history`.\n\nAutomation `create` automatically uses the current session Project when `projectId` is\nomitted. An explicit `projectId` takes precedence and is validated before mutation. Use an\nexplicit id when creating for a Project other than the current session Project.\n\n### Create in the current Project\n\n`trigger` and `action` use the same shapes as the Automation product API.\n\n```json\n{\n \"mode\": \"automation\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"Daily project review\",\n \"trigger\": { \"kind\": \"schedule\", \"schedule\": { \"kind\": \"cron\", \"expr\": \"0 9 * * 1-5\", \"tz\": \"Asia/Shanghai\" } },\n \"action\": { \"kind\": \"agent\", \"instruction\": \"Review the current project and summarize risks.\" }\n }\n}\n```\n\nTo override the inherited Project, add `\"projectId\": \"project_id\"` to `args`.\nThe create payload may also be nested under `args.automation`; top-level `args.projectId`\nhas precedence.\n\n### List and history\n\n`list` and unqualified `history` inherit the current session Project. Pass an explicit\n`projectId` to query another Project. Pass `automationId` to `history` for one Automation.\n\n### Update and operate\n\nUse `automationId` for `get`, `update`, `delete`, `run`, `pause`, and `resume`.\nFor `update`, patch fields may be direct args or nested under `args.patch`. Supplying a new\n`projectId` reassigns the Automation after validating the target Project.\n\n## Tasks\n\nTask locale follows the conversation response language, then the user request and profile.\nKeep every user-facing contract field (criteria, expected outputs, constraints, assumptions and risks)\nin that language, even when attached source material is English. Preserve paths, URLs and proper nouns.\nAn explicit locale must reflect the user\u2019s language choice.\n\nCommands: `list`, `get`, `create`, `delegated_tasks`, `collaboration`,\n`collaboration_post`, `update_dependencies`, `add_context`, `remove_context`,\n`command`, and `delete`.\n\nTask phases are `backlog`, `ready`, `active`, `review`, and `closed`.\nOperational state is projected separately as `idle`, `queued`, `running`, `waiting`,\n`verifying`, `succeeded`, `failed`, or `cancelled`. Never send either value as a\nfree-form status update.\n\n`task.get` returns the Task, its projected `model`, dependencies, dependents, context,\nauthority grants, TaskRuns, receipts, and waits.\nThe projected model is the correct source for current operational state and attention items.\n\n`delete` permanently removes the Task and its contracts, waits, context links, TaskRuns,\nreceipts, and Task-owned execution records. It does not delete linked Sessions, workspace files,\nor external artifacts. Cancel an active TaskRun before deletion, and use `dryRun: true` when\nthe user's intent is ambiguous.\n\n```json\n{ \"mode\": \"task\", \"command\": \"delete\", \"args\": { \"taskId\": \"task_id\" }, \"dryRun\": true }\n```\n\n### Capture or start\n\n`createMode` defaults to `capture`, which creates a backlog Task without executing it.\nUse `start` only when immediate execution is intended.\n\nFor an immediate delegated task, use the minimal call below. The objective can include the\nworker instructions and constraints; optional lists are unnecessary for a simple delegation.\n\n```json\n{ \"mode\": \"task\", \"command\": \"create\", \"args\": { \"objective\": \"Calculate the requested result and report progress\", \"createMode\": \"start\" } }\n```\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"create\",\n \"args\": {\n \"objective\": \"Complete the customer research report\",\n \"projectId\": \"project_id\",\n \"createMode\": \"capture\",\n \"priority\": \"high\",\n \"expectedOutputs\": [\"Research report\"],\n \"acceptanceCriteria\": [\"Sources are cited\"],\n \"constraints\": [\"Do not contact customers without approval\"],\n \"dependsOnTaskIds\": []\n }\n}\n```\n\n### Main Agent and worker collaboration\n\nThe user-facing Agent can call `delegated_tasks` to list Tasks created from this conversation,\nthen `collaboration` with `{ \"taskId\": \"...\", \"afterSequence\": 0 }` to read the ordered board.\nUse the Task and TaskRun receipt as the final source of execution status.\n\nUse `collaboration_post` with `taskId`, `kind`, `body`, and a stable `idempotencyKey`.\nThe main Agent may write `instruction`, `question`, or `answer`; answers include\n`causationId` of the worker's question. The worker may write `progress`, `question`,\nor `ack`; acknowledgements include `causationId` of the instruction. A worker question\npauses the active TaskRun. After posting it, stop the execution turn and wait for an answer.\nAn instruction is first recorded, then delivered to the worker conversation, and is only\nconfirmed when the worker acknowledges it. Ordinary progress does not interrupt the user.\n\n```json\n{ \"mode\": \"task\", \"command\": \"collaboration_post\", \"args\": { \"taskId\": \"task_id\", \"kind\": \"progress\", \"body\": \"Completed source review\", \"idempotencyKey\": \"stable-key\" } }\n```\n\n### Dependencies\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"update_dependencies\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"dependsOnTaskIds\": [\"dependency_task_id\"]\n }\n}\n```\n\n### Context links\n\nUse `add_context` to link a document, file, URL, session, memory, Task, artifact, or source\nas `input`, `reference`, `constraint`, `deliverable`, or `evidence` context.\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"add_context\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"targetKind\": \"file\",\n \"targetId\": \"/path/to/spec.md\",\n \"role\": \"input\",\n \"title\": \"Product specification\",\n \"pinned\": true,\n \"retrievalPolicy\": {},\n \"metadata\": {}\n }\n}\n```\n\nUse `remove_context` with `taskId` and the exact `edgeId` returned by `task.get`.\nDo not add authority grants through this tool; an Agent must not authorize itself.\n\n### Typed lifecycle commands\n\nEvery command requires `taskId`, the Task's current `expectedVersion`, a `type`, and\ntype-specific fields inside `commandArgs`.\n\nSupported command types:\n\n- `mark_ready`\n- `start`: `{ \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" } }`\n- `request_review`\n- `close`: `{ \"resolution\": \"done | cancelled | duplicate | wont_do\" }`\n- `reopen`: `{ \"phase\": \"ready | active\" }`\n- `add_wait`: `{ \"wait\": { \"kind\": \"dependency | approval | input | schedule | external | paused\", \"reason\": \"...\", \"condition\": {} } }`\n- `resolve_wait`: `{ \"waitId\": \"wait_id\", \"resolution\": {} }`\n- `delegate`: `{ \"agentId\": \"agent_id\" }`\n- `revise_contract`: `{ \"contract\": { ...complete contract... } }`\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"command\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"type\": \"start\",\n \"commandArgs\": {\n \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" }\n }\n }\n}\n```\n\nContract revision is replacement, not a patch. Read the Task and preserve all contract fields\nthe user did not ask to change. Resolve a wait through `resolve_wait`; do not directly mutate\na TaskRun or manufacture a phase transition.\n\n## TaskRuns\n\nTaskRun inspection is read-only except for explicit cancellation. Other execution state is\ncontrolled by Task commands and the runtime coordinator.\n\n### List attempts for a Task\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"list\", \"args\": { \"taskId\": \"task_id\", \"limit\": 20 } }\n```\n\nThe result contains run attempts, finalized receipts, and active waits.\n\n### Inspect one attempt\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"get\", \"args\": { \"runId\": \"run_id\" } }\n```\n\nThe result contains the TaskRun, its receipt when terminal, ordered events, and active Task waits.\n\n### Cancel an attempt\n\nRead the run first, then pass its current version. Cancellation creates a terminal receipt.\n\n```json\n{\n \"mode\": \"task_run\",\n \"command\": \"cancel\",\n \"args\": { \"runId\": \"run_id\", \"expectedVersion\": 2, \"reason\": \"User cancelled execution\" }\n}\n```\n\nDo not guess commands such as retry, force-complete, heartbeat, or transition; they are not Agent APIs.\n\n## Notes\n\nCommands: `list`, `get`, `create`, `append`, `preview_edit`, `update`, and `delete`.\nUse Notes for durable prose and reference material, not as a Task substitute. Prefer `append`\nwhen preserving user content. Use `preview_edit` before a canonical rewrite.\n\n```json\n{ \"mode\": \"note\", \"command\": \"create\", \"args\": { \"title\": \"Decision\", \"markdown\": \"...\", \"projectId\": \"project_id\" } }\n```\n\n```json\n{ \"mode\": \"note\", \"command\": \"append\", \"args\": { \"noteId\": \"note_id\", \"heading\": \"AI synthesis\", \"content\": \"...\" } }\n```\n\nUse `update` with `status: \"trashed\"` for a recoverable removal. `delete` permanently\nremoves the Note and its stored snapshots and media; use `dryRun: true` first when the\nuser's intent is ambiguous.\n\n```json\n{ \"mode\": \"note\", \"command\": \"delete\", \"args\": { \"noteId\": \"note_id\" }, \"dryRun\": true }\n```\n\n## Chat previews, local apps, and settings\n\nUse `chat_preview` by default when the user asks to design, mock up, or quickly show a UI in\nthe current conversation. It creates no Project and no Local App. Commands are `create`,\n`get`, and `revise`. Source consists of `markup`, `styles`, and optional `script`;\ndo not include a full HTML document or remote dependencies. Revision requires the exact\n`baseRevision` returned by the prior call.\n\nUse `local_app` only when the user explicitly asks for a durable, installable app or chooses\n\u201CSave as app\u201D on a chat preview. Do not create a Local App merely to render a UI draft.\n\nLocal app commands are `list`, `get`, `create`, and `validate`. Installation,\nactivation, rollback, and uninstall remain product runtime operations.\n\nSettings supports only `open` and returns an exact product jump target without changing config.\n\n## Error recovery\n\n| Result | Recovery |\n| --- | --- |\n| service unavailable | Stop retrying and report the unavailable capability. |\n| not found | Re-list in the intended scope; do not invent another id. |\n| conflict | Read the current object and reassess using its latest version. |\n| waiting | Inspect the Task projection and TaskRun waits; resolve only the real blocker. |\n| invalid command or state | Read the object and use only a documented transition. |\n| unsupported operation | Use the dedicated tool or product UI; never write storage directly. |\n\n## Deliberate boundaries\n\n- Project deletion and milestone deletion are not Agent APIs.\n- TaskRun mutation is internal to execution coordination except for optimistic cancellation.\n- Project updates are immutable.\n- Workflow and Automation operations remain in their dedicated tools.\n- Only the documented Task and TaskRun commands are valid; do not infer hidden aliases.\n";
|
|
1
|
+
export declare const xopcUseManual = "# XOPC Use Tool Manual\n\n## Purpose\n\n`xopc_use` operates first-class XOPC product objects without editing SQLite or product files directly.\nLoad this manual before a non-trivial mutation. For focused configuration workflows use\n`tool_manual({tool:\"xopc_use\",topic:\"agent|settings|automation|connections\"})`.\nFor identity-only changes prefer `agent patch_profile {id,expectedRevision,patch,idempotencyKey?}`,\nwhich preserves omitted profile fields. Existing update keeps replacement semantics for profile.\n\n```json\n{\n \"mode\": \"agent | project | automation | note | task | task_run | chat_preview | local_app | settings\",\n \"command\": \"...\",\n \"args\": {},\n \"dryRun\": false\n}\n```\n\nSend one object command per call. Inspect the returned JSON `ok` field; a tool call can\ncomplete successfully while the product command returns `ok: false`.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\n| Agent definition and default Agent | `xopc_use` mode `agent` |\n| Project, milestone, project update | `xopc_use` mode `project` |\n| Automation | `xopc_use` mode `automation` |\n| Task intent and lifecycle | `xopc_use` mode `task` |\n| Task execution attempt, receipt, events and waits | `xopc_use` mode `task_run` |\n| Note | `xopc_use` mode `note` |\n| Lightweight UI preview | `xopc_use` mode `chat_preview` |\n| Local app | `xopc_use` mode `local_app` |\n| Settings jump target | `xopc_use` mode `settings` |\n| Session, memory, skill, connected app or workspace file | its dedicated tool |\n\nA Task is durable intent; a TaskRun is one execution attempt.\n\n## Agents\n\nCommands: `list`, `get`, `create`, `update`, `set_default`, `disable`,\n`delete`, and `purge`.\n\nAn Agent profile stores `name` and optional `description`, `creature`, `style`, `language`,\n`emoji`, and `avatar` identity fields. Use `instructions` for short execution rules.\nPut personality in SOUL.md and ongoing work guidance in AGENTS.md.\n\n```json\n{\n \"mode\": \"agent\",\n \"command\": \"create\",\n \"args\": {\n \"id\": \"xiaomei\",\n \"profile\": {\n \"name\": \"\u5C0F\u7F8E\",\n \"description\": \"\u5E2E\u52A9\u6574\u7406\u65E5\u5E38\u4E8B\u9879\",\n \"language\": \"zh-CN\",\n \"style\": \"\u6E29\u67D4\u3001\u4EB2\u5207\",\n \"instructions\": \"\u7ED9\u51FA\u64CD\u4F5C\u5EFA\u8BAE\u524D\u5148\u6838\u5BF9\u5173\u952E\u4E8B\u5B9E\u3002\"\n },\n \"idempotencyKey\": \"create-agent-xiaomei\"\n }\n}\n```\n\nUse `list` before creating an Agent so an existing id is updated rather than duplicated.\nMutations other than `create` require the current `expectedRevision`; `set_default` uses\nthe catalog revision returned by `list`. `delete` preserves on-disk data, while `purge`\nalso removes it. Use `dryRun: true` to validate the exact same input contract without writing.\n\n## Reliable protocol\n\n1. Use `list` then `get` when an id is unknown.\n2. Read the current `version` before a Task mutation.\n3. Use `dryRun: true` for broad Project changes or uncertain mutations.\n4. Mutate once with the exact id and current concurrency token.\n5. Verify the returned object and preserve any \u201COpen in xopc\u201D delivery link.\n6. On a conflict, read again and reconsider the operation; do not blindly retry.\n\nTimestamps are Unix epoch milliseconds. Array fields are arrays of strings. Omission\npreserves a patchable field; an empty array intentionally clears it. Prefer explicit\n`projectId`, `taskId`, `runId`, `noteId`, and `localAppId` fields over `id`.\n\n## Projects\n\nCommands: `list`, `get`, `create`, `update`, `resolve_workspace`,\n`list_milestones`, `create_milestone`, `update_milestone`, `list_updates`,\nand `create_update`.\n\nProject statuses: `planned`, `active`, `paused`, `completed`, `cancelled`,\n`archived`. Health values: `unknown`, `on_track`, `at_risk`, `off_track`.\n\nA Project defines bounded shared context for related work. Its durable planning fields are `outcome`,\n`successCriteria`, `scope`, `nonGoals`, `ownerId`, `targetAt`, and `health`.\nUse `brief` for a concise description and `instructions` for durable operating guidance.\n\n### Create\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"AI Product Research\",\n \"outcome\": \"Choose a validated product direction\",\n \"successCriteria\": [\"Ten customer interviews\", \"Decision recorded\"],\n \"scope\": { \"market\": \"developer tools\" },\n \"nonGoals\": [\"Build the production product\"],\n \"health\": \"on_track\",\n \"targetAt\": 1760000000000,\n \"workspaceRoot\": \"/path/to/repo\"\n }\n}\n```\n\n### Update\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"status\": \"active\",\n \"health\": \"at_risk\",\n \"successCriteria\": [\"Ten interviews\", \"Evidence-backed decision\"]\n }\n}\n```\n\n### Resolve a workspace\n\nUse `autoCreate: false` for lookup. Set it to true only when creating a Project is authorized.\n\n```json\n{ \"mode\": \"project\", \"command\": \"resolve_workspace\", \"args\": { \"workspacePath\": \"/path/to/repo\", \"autoCreate\": false } }\n```\n\n### Milestones\n\nMilestone statuses: `planned`, `active`, `completed`, `cancelled`.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_milestone\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"title\": \"Finish discovery\",\n \"status\": \"active\",\n \"targetAt\": 1760000000000,\n \"sortOrder\": 10\n }\n}\n```\n\nUse `list_milestones` with `projectId`. Use `update_milestone` with both\n`projectId` and `milestoneId`. Milestone deletion is intentionally not exposed.\n\n### Immutable project updates\n\nProject updates are append-only progress snapshots. They also update Project health.\n\n```json\n{\n \"mode\": \"project\",\n \"command\": \"create_update\",\n \"args\": {\n \"projectId\": \"project_id\",\n \"health\": \"on_track\",\n \"summary\": \"Discovery is complete\",\n \"progress\": [\"Interviewed ten users\"],\n \"risks\": [\"Pricing remains unvalidated\"],\n \"nextSteps\": [\"Run pricing tests\"]\n }\n}\n```\n\nUse `list_updates` with `projectId` and optional `limit`. Updates cannot be edited.\n\n## Automations\n\nCommands: `list`, `get`, `create`, `update`, `delete`, `run`, `pause`,\n`resume`, and `history`.\n\nAutomation `create` automatically uses the current session Project when `projectId` is\nomitted. An explicit `projectId` takes precedence and is validated before mutation. Use an\nexplicit id when creating for a Project other than the current session Project.\n\n### Create in the current Project\n\n`trigger` and `action` use the same shapes as the Automation product API.\n\n```json\n{\n \"mode\": \"automation\",\n \"command\": \"create\",\n \"args\": {\n \"name\": \"Daily project review\",\n \"trigger\": { \"kind\": \"schedule\", \"schedule\": { \"kind\": \"cron\", \"expr\": \"0 9 * * 1-5\", \"tz\": \"Asia/Shanghai\" } },\n \"action\": { \"kind\": \"agent\", \"instruction\": \"Review the current project and summarize risks.\" }\n }\n}\n```\n\nTo override the inherited Project, add `\"projectId\": \"project_id\"` to `args`.\nThe create payload may also be nested under `args.automation`; top-level `args.projectId`\nhas precedence.\n\n### List and history\n\n`list` and unqualified `history` inherit the current session Project. Pass an explicit\n`projectId` to query another Project. Pass `automationId` to `history` for one Automation.\n\n### Update and operate\n\nUse `automationId` for `get`, `update`, `delete`, `run`, `pause`, and `resume`.\nFor `update`, patch fields may be direct args or nested under `args.patch`. Supplying a new\n`projectId` reassigns the Automation after validating the target Project.\n\n## Tasks\n\nTask locale follows the conversation response language, then the user request and profile.\nKeep every user-facing contract field (criteria, expected outputs, constraints, assumptions and risks)\nin that language, even when attached source material is English. Preserve paths, URLs and proper nouns.\nAn explicit locale must reflect the user\u2019s language choice.\n\nCommands: `list`, `get`, `create`, `delegated_tasks`, `collaboration`,\n`collaboration_post`, `update_dependencies`, `add_context`, `remove_context`,\n`command`, and `delete`.\n\nTask phases are `backlog`, `ready`, `active`, `review`, and `closed`.\nOperational state is projected separately as `idle`, `queued`, `running`, `waiting`,\n`verifying`, `succeeded`, `failed`, or `cancelled`. Never send either value as a\nfree-form status update.\n\n`task.get` returns the Task, its projected `model`, dependencies, dependents, context,\nauthority grants, TaskRuns, receipts, and waits.\nThe projected model is the correct source for current operational state and attention items.\n\n`delete` permanently removes the Task and its contracts, waits, context links, TaskRuns,\nreceipts, and Task-owned execution records. It does not delete linked Sessions, workspace files,\nor external artifacts. Cancel an active TaskRun before deletion, and use `dryRun: true` when\nthe user's intent is ambiguous.\n\n```json\n{ \"mode\": \"task\", \"command\": \"delete\", \"args\": { \"taskId\": \"task_id\" }, \"dryRun\": true }\n```\n\n### Capture or start\n\n`createMode` defaults to `capture`, which creates a backlog Task without executing it.\nUse `start` only when immediate execution is intended.\n\nFor an immediate delegated task, use the minimal call below. The objective can include the\nworker instructions and constraints; optional lists are unnecessary for a simple delegation.\n\n```json\n{ \"mode\": \"task\", \"command\": \"create\", \"args\": { \"objective\": \"Calculate the requested result and report progress\", \"createMode\": \"start\" } }\n```\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"create\",\n \"args\": {\n \"objective\": \"Complete the customer research report\",\n \"projectId\": \"project_id\",\n \"createMode\": \"capture\",\n \"priority\": \"high\",\n \"expectedOutputs\": [\"Research report\"],\n \"acceptanceCriteria\": [\"Sources are cited\"],\n \"constraints\": [\"Do not contact customers without approval\"],\n \"dependsOnTaskIds\": []\n }\n}\n```\n\n### Main Agent and worker collaboration\n\nThe user-facing Agent can call `delegated_tasks` to list Tasks created from this conversation,\nthen `collaboration` with `{ \"taskId\": \"...\", \"afterSequence\": 0 }` to read the ordered board.\nUse the Task and TaskRun receipt as the final source of execution status.\n\nUse `collaboration_post` with `taskId`, `kind`, `body`, and a stable `idempotencyKey`.\nThe main Agent may write `instruction`, `question`, or `answer`; answers include\n`causationId` of the worker's question. The worker may write `progress`, `question`,\nor `ack`; acknowledgements include `causationId` of the instruction. A worker question\npauses the active TaskRun. After posting it, stop the execution turn and wait for an answer.\nAn instruction is first recorded, then delivered to the worker conversation, and is only\nconfirmed when the worker acknowledges it. Ordinary progress does not interrupt the user.\n\n```json\n{ \"mode\": \"task\", \"command\": \"collaboration_post\", \"args\": { \"taskId\": \"task_id\", \"kind\": \"progress\", \"body\": \"Completed source review\", \"idempotencyKey\": \"stable-key\" } }\n```\n\n### Dependencies\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"update_dependencies\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"dependsOnTaskIds\": [\"dependency_task_id\"]\n }\n}\n```\n\n### Context links\n\nUse `add_context` to link a document, file, URL, session, memory, Task, artifact, or source\nas `input`, `reference`, `constraint`, `deliverable`, or `evidence` context.\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"add_context\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"targetKind\": \"file\",\n \"targetId\": \"/path/to/spec.md\",\n \"role\": \"input\",\n \"title\": \"Product specification\",\n \"pinned\": true,\n \"retrievalPolicy\": {},\n \"metadata\": {}\n }\n}\n```\n\nUse `remove_context` with `taskId` and the exact `edgeId` returned by `task.get`.\nDo not add authority grants through this tool; an Agent must not authorize itself.\n\n### Typed lifecycle commands\n\nEvery command requires `taskId`, the Task's current `expectedVersion`, a `type`, and\ntype-specific fields inside `commandArgs`.\n\nSupported command types:\n\n- `mark_ready`\n- `start`: `{ \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" } }`\n- `request_review`\n- `close`: `{ \"resolution\": \"done | cancelled | duplicate | wont_do\" }`\n- `reopen`: `{ \"phase\": \"ready | active\" }`\n- `add_wait`: `{ \"wait\": { \"kind\": \"dependency | approval | input | schedule | external | paused\", \"reason\": \"...\", \"condition\": {} } }`\n- `resolve_wait`: `{ \"waitId\": \"wait_id\", \"resolution\": {} }`\n- `delegate`: `{ \"agentId\": \"agent_id\" }`\n- `revise_contract`: `{ \"contract\": { ...complete contract... } }`\n\n```json\n{\n \"mode\": \"task\",\n \"command\": \"command\",\n \"args\": {\n \"taskId\": \"task_id\",\n \"expectedVersion\": 3,\n \"type\": \"start\",\n \"commandArgs\": {\n \"executor\": { \"kind\": \"agent\", \"agentId\": \"main\" }\n }\n }\n}\n```\n\nContract revision is replacement, not a patch. Read the Task and preserve all contract fields\nthe user did not ask to change. Resolve a wait through `resolve_wait`; do not directly mutate\na TaskRun or manufacture a phase transition.\n\n## TaskRuns\n\nTaskRun inspection is read-only except for explicit cancellation. Other execution state is\ncontrolled by Task commands and the runtime coordinator.\n\n### List attempts for a Task\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"list\", \"args\": { \"taskId\": \"task_id\", \"limit\": 20 } }\n```\n\nThe result contains run attempts, finalized receipts, and active waits.\n\n### Inspect one attempt\n\n```json\n{ \"mode\": \"task_run\", \"command\": \"get\", \"args\": { \"runId\": \"run_id\" } }\n```\n\nThe result contains the TaskRun, its receipt when terminal, ordered events, and active Task waits.\n\n### Cancel an attempt\n\nRead the run first, then pass its current version. Cancellation creates a terminal receipt.\n\n```json\n{\n \"mode\": \"task_run\",\n \"command\": \"cancel\",\n \"args\": { \"runId\": \"run_id\", \"expectedVersion\": 2, \"reason\": \"User cancelled execution\" }\n}\n```\n\nDo not guess commands such as retry, force-complete, heartbeat, or transition; they are not Agent APIs.\n\n## Notes\n\nCommands: `list`, `get`, `create`, `append`, `preview_edit`, `update`, and `delete`.\nUse Notes for durable prose and reference material, not as a Task substitute. Prefer `append`\nwhen preserving user content. Use `preview_edit` before a canonical rewrite.\n\n```json\n{ \"mode\": \"note\", \"command\": \"create\", \"args\": { \"title\": \"Decision\", \"markdown\": \"...\", \"projectId\": \"project_id\" } }\n```\n\n```json\n{ \"mode\": \"note\", \"command\": \"append\", \"args\": { \"noteId\": \"note_id\", \"heading\": \"AI synthesis\", \"content\": \"...\" } }\n```\n\nUse `update` with `status: \"trashed\"` for a recoverable removal. `delete` permanently\nremoves the Note and its stored snapshots and media; use `dryRun: true` first when the\nuser's intent is ambiguous.\n\n```json\n{ \"mode\": \"note\", \"command\": \"delete\", \"args\": { \"noteId\": \"note_id\" }, \"dryRun\": true }\n```\n\n## Chat previews, local apps, and settings\n\nUse `chat_preview` by default when the user asks to design, mock up, or quickly show a UI in\nthe current conversation. It creates no Project and no Local App. Commands are `create`,\n`get`, and `revise`. Source consists of `markup`, `styles`, and optional `script`;\ndo not include a full HTML document or remote dependencies. Revision requires the exact\n`baseRevision` returned by the prior call.\n\nUse `local_app` only when the user explicitly asks for a durable, installable app or chooses\n\u201CSave as app\u201D on a chat preview. Do not create a Local App merely to render a UI draft.\n\nLocal app commands are `list`, `get`, `create`, and `validate`. Installation,\nactivation, rollback, and uninstall remain product runtime operations.\n\nSettings supports only `open` and returns an exact product jump target without changing config.\n\n## Error recovery\n\n| Result | Recovery |\n| --- | --- |\n| service unavailable | Stop retrying and report the unavailable capability. |\n| not found | Re-list in the intended scope; do not invent another id. |\n| conflict | Read the current object and reassess using its latest version. |\n| waiting | Inspect the Task projection and TaskRun waits; resolve only the real blocker. |\n| invalid command or state | Read the object and use only a documented transition. |\n| unsupported operation | Use the dedicated tool or product UI; never write storage directly. |\n\n## Deliberate boundaries\n\n- Project deletion and milestone deletion are not Agent APIs.\n- TaskRun mutation is internal to execution coordination except for optimistic cancellation.\n- Project updates are immutable.\n- Automation operations remain in their dedicated tools.\n- Only the documented Task and TaskRun commands are valid; do not infer hidden aliases.\n";
|
|
@@ -34,12 +34,9 @@ complete successfully while the product command returns \`ok: false\`.
|
|
|
34
34
|
| Lightweight UI preview | \`xopc_use\` mode \`chat_preview\` |
|
|
35
35
|
| Local app | \`xopc_use\` mode \`local_app\` |
|
|
36
36
|
| Settings jump target | \`xopc_use\` mode \`settings\` |
|
|
37
|
-
| Workflow run | dedicated \`workflow\` tool; pass \`taskId\` to link it to a Task |
|
|
38
37
|
| Session, memory, skill, connected app or workspace file | its dedicated tool |
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
a TaskRun is one execution attempt; a WorkflowRun is a procedure execution and may belong
|
|
42
|
-
to a TaskRun. Never treat these three objects as interchangeable.
|
|
39
|
+
A Task is durable intent; a TaskRun is one execution attempt.
|
|
43
40
|
|
|
44
41
|
## Agents
|
|
45
42
|
|
|
@@ -463,7 +460,7 @@ Settings supports only \`open\` and returns an exact product jump target without
|
|
|
463
460
|
- Project deletion and milestone deletion are not Agent APIs.
|
|
464
461
|
- TaskRun mutation is internal to execution coordination except for optimistic cancellation.
|
|
465
462
|
- Project updates are immutable.
|
|
466
|
-
-
|
|
463
|
+
- Automation operations remain in their dedicated tools.
|
|
467
464
|
- Only the documented Task and TaskRun commands are valid; do not infer hidden aliases.
|
|
468
465
|
`;
|
|
469
466
|
//#endregion
|
|
@@ -90,7 +90,7 @@ function createAutomationTool(deps) {
|
|
|
90
90
|
return {
|
|
91
91
|
name: "automation",
|
|
92
92
|
label: "Automation",
|
|
93
|
-
description: "Manage product automations. Automations can be manual, scheduled, webhook-triggered, or product-event-triggered and can run an agent instruction
|
|
93
|
+
description: "Manage product automations. Automations can be manual, scheduled, webhook-triggered, or product-event-triggered and can run an agent instruction.",
|
|
94
94
|
parameters: AutomationToolSchema,
|
|
95
95
|
async execute(_toolCallId, params, signal) {
|
|
96
96
|
const service = deps.getAutomationService();
|
|
@@ -23,7 +23,6 @@ import type { BrowserAutomationService } from '../../browser/automations/index.j
|
|
|
23
23
|
import type { NotesService } from '../../notes/index.js';
|
|
24
24
|
import type { ProjectService } from '../../projects/index.js';
|
|
25
25
|
import type { LocalAppService } from '../../local-apps/index.js';
|
|
26
|
-
import type { WorkflowRunServiceLike } from '../../workflows/service/workflow-run-service.types.js';
|
|
27
26
|
import type { SkillManager } from '../skills/skill-manager.js';
|
|
28
27
|
import { type ToolExecutorConfig } from './executor.js';
|
|
29
28
|
export interface ToolFactoryDeps {
|
|
@@ -72,8 +71,6 @@ export interface ToolFactoryDeps {
|
|
|
72
71
|
dispatchTaskRuns?: () => void;
|
|
73
72
|
/** Gateway: refreshes Agent runtime state after xopc_use mutates the catalog. */
|
|
74
73
|
onAgentCatalogMutate?: () => void;
|
|
75
|
-
/** Gateway: starts persisted workflow runs (dedicated chat session per run). */
|
|
76
|
-
getWorkflowRunService?: () => WorkflowRunServiceLike | undefined;
|
|
77
74
|
/** Current session skill indexing (tool gating + allowlist); used by skills_list / skill_view. */
|
|
78
75
|
getSkillIndexingContext?: () => {
|
|
79
76
|
registeredToolNames: string[];
|
|
@@ -55,9 +55,6 @@ import { checkBrowserReadiness } from "../../browser/readiness.js";
|
|
|
55
55
|
import "../../browser/index.js";
|
|
56
56
|
import { getActiveTranscriptUserText, getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
57
57
|
import { createDelegateTool } from "./delegate-tool.js";
|
|
58
|
-
import { createWorkflowTool } from "./workflow-tool.js";
|
|
59
|
-
import { createWorkflowCatalog } from "../workflow/catalog.js";
|
|
60
|
-
import { createWorkflowManageTool } from "./workflow-manage-tool.js";
|
|
61
58
|
import { createAutomationTool } from "./automation-tool.js";
|
|
62
59
|
import { createBrowserAutomationTool } from "./browser-automation-tool.js";
|
|
63
60
|
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
@@ -446,6 +443,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
446
443
|
getConfig: () => this.deps.getConfig?.()
|
|
447
444
|
})] : [],
|
|
448
445
|
...personalToolsConfigured || allowed?.has("user_context_read") ? [createUserContextReadTool({
|
|
446
|
+
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
449
447
|
agentId: resolvedAgentId,
|
|
450
448
|
workspaceId: workspace,
|
|
451
449
|
getSessionId: currentConversationId,
|
|
@@ -453,6 +451,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
453
451
|
canRead: () => currentAccess().userModel
|
|
454
452
|
}, (command) => !disabled?.has(`user_context_${command}`) && (!isXopcDatabaseOpen() || resolveEffectiveAgentConfigForAgent(resolvedAgentId).config.tools[`user_context_${command}`]?.mode !== "deny"))] : [],
|
|
455
453
|
createUserContextSearchTool({
|
|
454
|
+
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
456
455
|
agentId: resolvedAgentId,
|
|
457
456
|
workspaceId: workspace,
|
|
458
457
|
getSessionId: currentConversationId,
|
|
@@ -460,6 +459,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
460
459
|
canRead: () => currentAccess().userModel
|
|
461
460
|
}),
|
|
462
461
|
createUserContextGetTool({
|
|
462
|
+
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
463
463
|
agentId: resolvedAgentId,
|
|
464
464
|
workspaceId: workspace,
|
|
465
465
|
getSessionId: currentConversationId,
|
|
@@ -479,6 +479,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
479
479
|
}
|
|
480
480
|
}),
|
|
481
481
|
...personalToolsConfigured || allowed?.has("knowledge_read") ? [createKnowledgeReadTool({
|
|
482
|
+
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
482
483
|
agentId: resolvedAgentId,
|
|
483
484
|
workspaceId: workspace,
|
|
484
485
|
getSessionId: currentConversationId,
|
|
@@ -489,6 +490,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
489
490
|
getReadPolicy: () => currentAccess().knowledgePolicy
|
|
490
491
|
}, (command) => !disabled?.has(`knowledge_${command}`) && (!isXopcDatabaseOpen() || resolveEffectiveAgentConfigForAgent(resolvedAgentId).config.tools[`knowledge_${command}`]?.mode !== "deny"))] : [],
|
|
491
492
|
createKnowledgeSearchTool({
|
|
493
|
+
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
492
494
|
agentId: resolvedAgentId,
|
|
493
495
|
workspaceId: workspace,
|
|
494
496
|
getSessionId: currentConversationId,
|
|
@@ -499,6 +501,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
499
501
|
getReadPolicy: () => currentAccess().knowledgePolicy
|
|
500
502
|
}),
|
|
501
503
|
createKnowledgeGetTool({
|
|
504
|
+
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
502
505
|
agentId: resolvedAgentId,
|
|
503
506
|
workspaceId: workspace,
|
|
504
507
|
getSessionId: currentConversationId,
|
|
@@ -580,12 +583,6 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
580
583
|
getTaskId: () => options?.conversationId ?? this.deps.getCurrentContext()?.conversationId ?? "default",
|
|
581
584
|
getReadiness: () => this.checkBrowserReadinessCached()
|
|
582
585
|
})] : [],
|
|
583
|
-
...primary ? [createWorkflowManageTool(), createWorkflowTool({
|
|
584
|
-
catalog: createWorkflowCatalog(),
|
|
585
|
-
getCurrentConversationId: () => this.deps.getCurrentContext()?.conversationId,
|
|
586
|
-
getConfig: () => this.deps.getConfig?.(),
|
|
587
|
-
startWorkflowRun: this.deps.getWorkflowRunService ? (params) => this.deps.getWorkflowRunService().startWorkflowRun(params) : void 0
|
|
588
|
-
})] : [],
|
|
589
586
|
...primary ? [createDelegateTool({
|
|
590
587
|
isWorkspaceTrusted: this.deps.isWorkspaceTrusted,
|
|
591
588
|
workspace,
|
|
@@ -27,8 +27,6 @@ export { createMemoryMaintenanceTool, type MemoryMaintenanceToolDeps } from './m
|
|
|
27
27
|
export { createClarifyTool, type ClarifyRequestPayload, type GatewayClarifyRequestFn, } from './clarify-tool.js';
|
|
28
28
|
export { BrowserRuntime, assertBrowserUrlAllowed } from '../../browser/index.js';
|
|
29
29
|
export { createDelegateTool, DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, } from './delegate-tool.js';
|
|
30
|
-
export { createWorkflowTool, type WorkflowToolDeps, type WorkflowToolInput } from './workflow-tool.js';
|
|
31
|
-
export { createWorkflowManageTool } from './workflow-manage-tool.js';
|
|
32
30
|
export { createAutomationTool, type AutomationToolDeps } from './automation-tool.js';
|
|
33
31
|
export { createBrowserAutomationTool } from './browser-automation-tool.js';
|
|
34
32
|
export { createXopcUseTool, type XopcUseToolDeps, type XopcUseToolInput } from './xopc-use-tool.js';
|
|
@@ -32,8 +32,6 @@ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
|
32
32
|
import "../../browser/index.js";
|
|
33
33
|
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
34
34
|
import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, createDelegateTool } from "./delegate-tool.js";
|
|
35
|
-
import { createWorkflowTool } from "./workflow-tool.js";
|
|
36
|
-
import { createWorkflowManageTool } from "./workflow-manage-tool.js";
|
|
37
35
|
import { createAutomationTool } from "./automation-tool.js";
|
|
38
36
|
import { createBrowserAutomationTool } from "./browser-automation-tool.js";
|
|
39
37
|
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
@@ -48,4 +46,4 @@ import { createImageTool } from "./image-tool.js";
|
|
|
48
46
|
import { createImageGenerateTool, resolveImageGenerationModelConfigForTool } from "./image-generate-tool.js";
|
|
49
47
|
import { createPersonalReadTool } from "./personal-read-tool.js";
|
|
50
48
|
import { createTaskCollaborationTool } from "./task-collaboration-tool.js";
|
|
51
|
-
export { BrowserRuntime, 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, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, createApplyPatchTool, createAutomationTool, createBrowserAutomationTool, createClarifyTool, createCreateShareTool, createDataBatchTool, createDelegateTool, createDesktopPetTool, createExecCommandTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createKnowledgeGetTool, createKnowledgeReadTool, createKnowledgeSearchTool, createKnowledgeWriteTool, createListDirTool, createManagedJobTool, createMemoryMaintenanceTool, createMessageTool, createPersonalReadTool, createPublishArtifactsTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionRecallTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTaskCollaborationTool, createTaskResultTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createUserContextGetTool, createUserContextReadTool, createUserContextSearchTool, createUserContextUpdateTool, createWebExtractTool, createWebFetchTool, createWebSearchTool,
|
|
49
|
+
export { BrowserRuntime, 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, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, createApplyPatchTool, createAutomationTool, createBrowserAutomationTool, createClarifyTool, createCreateShareTool, createDataBatchTool, createDelegateTool, createDesktopPetTool, createExecCommandTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createKnowledgeGetTool, createKnowledgeReadTool, createKnowledgeSearchTool, createKnowledgeWriteTool, createListDirTool, createManagedJobTool, createMemoryMaintenanceTool, createMessageTool, createPersonalReadTool, createPublishArtifactsTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionRecallTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTaskCollaborationTool, createTaskResultTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createUserContextGetTool, createUserContextReadTool, createUserContextSearchTool, createUserContextUpdateTool, createWebExtractTool, createWebFetchTool, createWebSearchTool, createWriteFileTool, createXopcUseTool, findTool, formatSize, fuzzyFindText, generateDiffString, getToolMetadata, grepTool, isShareToolAvailable, listDirTool, normalizeForFuzzyMatch, normalizeToLF, resolveImageGenerationModelConfigForTool, resolveImageModelConfigForTool, resolveToolLockMode, restoreLineEndings, stripBom, stripHtmlBoilerplate, truncateHead, truncateLine, truncateTail, writeFileTool };
|
|
@@ -9,6 +9,7 @@ export interface KnowledgeToolOptions {
|
|
|
9
9
|
canWrite: () => boolean;
|
|
10
10
|
getWritePolicy: () => 'deny' | 'allow';
|
|
11
11
|
getReadPolicy: () => KnowledgeReadPolicy;
|
|
12
|
+
getCurrentUserText?: () => string | undefined;
|
|
12
13
|
}
|
|
13
14
|
export declare function createKnowledgeSearchTool(options: KnowledgeToolOptions): AgentTool;
|
|
14
15
|
export declare function createKnowledgeGetTool(options: KnowledgeToolOptions): AgentTool;
|
|
@@ -3,6 +3,7 @@ import { canUseKnowledge } from "../../knowledge-memory/usage-policy.js";
|
|
|
3
3
|
import { getKnowledgeItem, searchKnowledgeItems, writeKnowledgeItem } from "../../knowledge-memory/repository.js";
|
|
4
4
|
import "../../knowledge-memory/index.js";
|
|
5
5
|
import "./local-read-budget.js";
|
|
6
|
+
import { projectForgottenEvidence } from "../../memory-learning/forgotten-history.js";
|
|
6
7
|
import { Type } from "@sinclair/typebox";
|
|
7
8
|
//#region src/agent/tools/knowledge-memory-tool.ts
|
|
8
9
|
const SearchSchema = Type.Object({
|
|
@@ -67,7 +68,10 @@ function createKnowledgeSearchTool(options) {
|
|
|
67
68
|
context: visibility(options),
|
|
68
69
|
policy: options.getReadPolicy(),
|
|
69
70
|
limit: input.maxResults ?? 12
|
|
70
|
-
})
|
|
71
|
+
}).map((item) => ({
|
|
72
|
+
...item,
|
|
73
|
+
source: projectForgottenEvidence(item.source, visibility(options), options.getCurrentUserText?.(), [item.sourceConversationId, item.sourceTurnId].filter((ref) => !!ref))
|
|
74
|
+
}));
|
|
71
75
|
return {
|
|
72
76
|
content: [{
|
|
73
77
|
type: "text",
|
|
@@ -95,13 +99,18 @@ function createKnowledgeGetTool(options) {
|
|
|
95
99
|
};
|
|
96
100
|
const id = raw.id;
|
|
97
101
|
const item = getKnowledgeItem(id);
|
|
98
|
-
|
|
102
|
+
const visible = item && canUseKnowledge(item, visibility(options), options.getReadPolicy());
|
|
103
|
+
const projected = visible && {
|
|
104
|
+
...item,
|
|
105
|
+
source: projectForgottenEvidence(item.source, visibility(options), options.getCurrentUserText?.(), [item.sourceConversationId, item.sourceTurnId].filter((ref) => !!ref))
|
|
106
|
+
};
|
|
107
|
+
return visible ? {
|
|
99
108
|
content: [{
|
|
100
109
|
type: "text",
|
|
101
|
-
text: JSON.stringify(
|
|
110
|
+
text: JSON.stringify(projected, null, 2)
|
|
102
111
|
}],
|
|
103
112
|
details: {
|
|
104
|
-
item,
|
|
113
|
+
item: projected,
|
|
105
114
|
complete: true
|
|
106
115
|
}
|
|
107
116
|
} : {
|
|
@@ -34,7 +34,6 @@ const PersonalTaskSchema = Type.Object({
|
|
|
34
34
|
Type.Literal("revise"),
|
|
35
35
|
Type.Literal("retry_allocation"),
|
|
36
36
|
Type.Literal("submit"),
|
|
37
|
-
Type.Literal("agents"),
|
|
38
37
|
Type.Literal("match"),
|
|
39
38
|
Type.Literal("selection"),
|
|
40
39
|
Type.Literal("create"),
|
|
@@ -261,27 +260,14 @@ function createPersonalTaskTool(deps) {
|
|
|
261
260
|
ownAgentId,
|
|
262
261
|
getConfig: deps.getConfig,
|
|
263
262
|
getAgentSkillAvailability: deps.getAgentSkillAvailability,
|
|
264
|
-
getAgentToolAvailability: deps.getAgentToolAvailability
|
|
265
|
-
legacyToolPolicyOnly: !input.requirements
|
|
263
|
+
getAgentToolAvailability: deps.getAgentToolAvailability
|
|
266
264
|
};
|
|
267
|
-
if (input.command === "match"
|
|
268
|
-
if (input.command === "agents" && requirements.requiredSkills?.length && !deps.getAgentSkillAvailability) throw new Error("Specialist Skill availability cannot be verified");
|
|
265
|
+
if (input.command === "match") {
|
|
269
266
|
const result = matchSpecialists(requirements, context, {
|
|
270
267
|
cursor: input.cursor,
|
|
271
|
-
limit:
|
|
268
|
+
limit: 10
|
|
272
269
|
});
|
|
273
|
-
|
|
274
|
-
let cursor = result.nextCursor;
|
|
275
|
-
while (cursor) {
|
|
276
|
-
const page = matchSpecialists(requirements, context, {
|
|
277
|
-
cursor,
|
|
278
|
-
limit: 50
|
|
279
|
-
});
|
|
280
|
-
result.candidates.push(...page.candidates);
|
|
281
|
-
cursor = page.nextCursor;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
const matchId = input.command === "match" ? randomUUID() : void 0;
|
|
270
|
+
const matchId = randomUUID();
|
|
285
271
|
if (matchId) {
|
|
286
272
|
if (matches.size >= 20) matches.delete(matches.keys().next().value);
|
|
287
273
|
matches.set(matchId, {
|
|
@@ -290,7 +276,7 @@ function createPersonalTaskTool(deps) {
|
|
|
290
276
|
result
|
|
291
277
|
});
|
|
292
278
|
}
|
|
293
|
-
const payload =
|
|
279
|
+
const payload = {
|
|
294
280
|
...result,
|
|
295
281
|
matchId
|
|
296
282
|
};
|
|
@@ -394,7 +380,7 @@ function createPersonalTaskTool(deps) {
|
|
|
394
380
|
requestHash,
|
|
395
381
|
requirements,
|
|
396
382
|
assessment,
|
|
397
|
-
source: input.selectionSource ?? "
|
|
383
|
+
source: input.selectionSource ?? "snapshot",
|
|
398
384
|
reason: input.selectionReason,
|
|
399
385
|
previousSelectionId: input.previousSelectionId,
|
|
400
386
|
status: "rejected"
|
|
@@ -408,7 +394,7 @@ function createPersonalTaskTool(deps) {
|
|
|
408
394
|
requestHash,
|
|
409
395
|
requirements,
|
|
410
396
|
assessment,
|
|
411
|
-
source: requirements.requestedAgentId ? "explicit" : matched ? "match" : input.selectionSource === "match" ? "snapshot" : input.selectionSource ?? "
|
|
397
|
+
source: requirements.requestedAgentId ? "explicit" : matched ? "match" : input.selectionSource === "match" ? "snapshot" : input.selectionSource ?? "snapshot",
|
|
412
398
|
reason: input.selectionReason,
|
|
413
399
|
previousSelectionId: input.previousSelectionId,
|
|
414
400
|
status: "start_failed"
|
|
@@ -429,7 +415,7 @@ function createPersonalTaskTool(deps) {
|
|
|
429
415
|
missing
|
|
430
416
|
})),
|
|
431
417
|
reason: input.selectionReason,
|
|
432
|
-
source: requirements.requestedAgentId ? "explicit" : matched ? "match" : input.selectionSource === "match" ? "snapshot" : input.selectionSource ?? (input.requirements ? "snapshot" : "
|
|
418
|
+
source: requirements.requestedAgentId ? "explicit" : matched ? "match" : input.selectionSource === "match" ? "snapshot" : input.selectionSource ?? (input.requirements ? "snapshot" : "snapshot"),
|
|
433
419
|
previousSelectionId: input.previousSelectionId
|
|
434
420
|
})
|
|
435
421
|
});
|
|
@@ -27,8 +27,8 @@ function classifySearchError(error, signal) {
|
|
|
27
27
|
if (error instanceof SearchError) return error;
|
|
28
28
|
const value = error;
|
|
29
29
|
const message = error instanceof Error ? error.message : String(error);
|
|
30
|
-
const
|
|
31
|
-
const status = typeof value?.status === "number" ? value.status : typeof value?.statusCode === "number" ? value.statusCode :
|
|
30
|
+
const httpStatus = /^HTTP (\d{3})\b/.exec(message)?.[1];
|
|
31
|
+
const status = typeof value?.status === "number" ? value.status : typeof value?.statusCode === "number" ? value.statusCode : httpStatus ? Number(httpStatus) : void 0;
|
|
32
32
|
const denied = [
|
|
33
33
|
"EACCES",
|
|
34
34
|
"EPERM",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FORGOTTEN_HISTORY_EXCERPT, forgottenHistoryEntries } from "../../memory-learning/forgotten-history.js";
|
|
1
|
+
import { FORGOTTEN_HISTORY_EXCERPT, explicitlyReadsOriginalHistory, forgottenHistoryEntries } from "../../memory-learning/forgotten-history.js";
|
|
2
2
|
import { Type } from "@sinclair/typebox";
|
|
3
3
|
//#region src/agent/tools/session-recall-tool.ts
|
|
4
4
|
const SessionRecallSchema = Type.Object({
|
|
@@ -74,6 +74,10 @@ function createSessionRecallTool(deps) {
|
|
|
74
74
|
query,
|
|
75
75
|
results,
|
|
76
76
|
count: results.length,
|
|
77
|
+
...explicitlyReadsOriginalHistory(deps.getCurrentUserText?.() ?? "") ? {
|
|
78
|
+
historyScope: "current_conversation_only",
|
|
79
|
+
guidance: "This tool cannot search other conversations. Use session_search for original records elsewhere; these results do not establish that no original record exists."
|
|
80
|
+
} : {},
|
|
77
81
|
...deps.maxOutputChars ? {
|
|
78
82
|
excerpts: true,
|
|
79
83
|
truncated: results.length < matches.length || results.some((result) => result.truncated)
|
|
@@ -2,6 +2,7 @@ import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssert
|
|
|
2
2
|
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
3
3
|
import "../../user-model/index.js";
|
|
4
4
|
import "./local-read-budget.js";
|
|
5
|
+
import { projectForgottenEvidence } from "../../memory-learning/forgotten-history.js";
|
|
5
6
|
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
6
7
|
import { Type } from "@sinclair/typebox";
|
|
7
8
|
//#region src/agent/tools/user-context-tool.ts
|
|
@@ -111,7 +112,12 @@ function createUserContextGetTool(options) {
|
|
|
111
112
|
const result = {
|
|
112
113
|
assertion,
|
|
113
114
|
slot: getAssertionSlot(assertion.slotId),
|
|
114
|
-
sources: listUserAssertionSources([assertion.id]).get(assertion.id) ?? []
|
|
115
|
+
sources: projectForgottenEvidence(listUserAssertionSources([assertion.id]).get(assertion.id) ?? [], {
|
|
116
|
+
agentId: options.agentId,
|
|
117
|
+
workspaceId: options.workspaceId,
|
|
118
|
+
conversationId: options.getSessionId() ?? "",
|
|
119
|
+
projectId: options.getProjectId?.()
|
|
120
|
+
}, options.getCurrentUserText?.())
|
|
115
121
|
};
|
|
116
122
|
return {
|
|
117
123
|
content: [{
|
|
@@ -52,7 +52,7 @@ const XopcUseToolSchema = Type.Object({
|
|
|
52
52
|
Type.Literal("agent"),
|
|
53
53
|
Type.Literal("settings")
|
|
54
54
|
]),
|
|
55
|
-
command: Type.String({ description: "Context resolve takes an explicit AppContextEnvelope; never guess a current page. Automation draft/repair_draft accept prompt/id, agentId?, language?, idempotencyKey?; simulate explains an automation without running it. Local_app record_acceptance records supplied checks and sourceHash, not proof that checks were executed. Agent profile-only changes: patch_profile {id, expectedRevision, patch:{name?,description?,style?,language?,...}, idempotencyKey?} preserves omitted fields. Agent commands: list, get {id}, create {id, profile, workspace?, models?, skills?, tools?,
|
|
55
|
+
command: Type.String({ description: "Context resolve takes an explicit AppContextEnvelope; never guess a current page. Automation draft/repair_draft accept prompt/id, agentId?, language?, idempotencyKey?; simulate explains an automation without running it. Local_app record_acceptance records supplied checks and sourceHash, not proof that checks were executed. Agent profile-only changes: patch_profile {id, expectedRevision, patch:{name?,description?,style?,language?,...}, idempotencyKey?} preserves omitted fields. Agent commands: list, get {id}, create {id, profile, workspace?, models?, skills?, tools?, runtime?, idempotencyKey?}, update {id, expectedRevision, patch, idempotencyKey?}, set_default {id, expectedRevision, idempotencyKey?}, disable/delete/purge {id, expectedRevision, idempotencyKey?}. Purge also removes on-disk data. Project create accepts idempotencyKey; update/pin/unpin/delete accepts {projectId, expectedVersion?, idempotencyKey?}; stable retries require the original expectedVersion. Delete preserves workspace files and does not confirm external execution stopped. Project milestone writes support idempotencyKey; update_milestone/delete_milestone require original expectedRevision for stable retries, and create_update requires original expectedVersion. TaskRun cancel accepts idempotencyKey and expectedVersion, and does not confirm external execution stopped. Automation diagnostics: get_run/run_events {runId}, metrics {}, events {eventType?, source?, limit?}, deliveries {runId?, limit?}, product_events {eventType, source?, payloadKey?, payloadValue?, limit?}; payload filters require both key and value. Recovery commands: replay_event {eventId, reason, idempotencyKey}, retry_delivery {runId, destinationKey, reason, idempotencyKey}. Automation also supports cancel/read {runId, idempotencyKey?} and read_all {projectId?, idempotencyKey?}; omitted projectId means all projects. Cancel acceptance is not confirmation of stopping. Object command. Supports project list/get/create/update/resolve_workspace/list_milestones/create_milestone/update_milestone/list_updates/create_update, automation list/get/create/update/delete/run/rerun/pause/resume/history (rerun takes runId; run/rerun accept idempotencyKey), note list/get/project_summaries/history {noteId}/snapshot {noteId, timestamp}/create/append/update/preview_edit/delete, task list/get/create/update_dependencies/add_context/remove_context/command/delete, task_run list/get/cancel, chat_preview create/revise/get, local_app list/get/create/validate, and settings open." }),
|
|
56
56
|
args: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
57
57
|
dryRun: Type.Optional(Type.Boolean({ description: "Validate and preview the action without mutating xopc state." }))
|
|
58
58
|
});
|
|
@@ -2,9 +2,8 @@ import { DEFAULT_AGENT_ID, STRICT_AGENT_ID_RE, deriveAgentIdFromDisplayName, ini
|
|
|
2
2
|
import { AgentCatalogRepository, defaultAgentDefaults, init_repository } from "./repository.js";
|
|
3
3
|
import { AgentCatalogService } from "./service.js";
|
|
4
4
|
import { registerAgentCapabilities } from "./capabilities.js";
|
|
5
|
-
import { cutoverLegacyAgentConfig } from "./migrations/legacy-config-cutover.js";
|
|
6
5
|
//#region src/agent-catalog/index.ts
|
|
7
6
|
init_repository();
|
|
8
7
|
init_id();
|
|
9
8
|
//#endregion
|
|
10
|
-
export { AgentCatalogRepository, AgentCatalogService, DEFAULT_AGENT_ID, STRICT_AGENT_ID_RE,
|
|
9
|
+
export { AgentCatalogRepository, AgentCatalogService, DEFAULT_AGENT_ID, STRICT_AGENT_ID_RE, defaultAgentDefaults, deriveAgentIdFromDisplayName, normalizeAgentId, registerAgentCapabilities, validateAgentIdForNewAgent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, ComputerModelRouteSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema,
|
|
2
|
+
import { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, ComputerModelRouteSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema, init_schema } from "./schema.js";
|
|
3
3
|
import { init_resolver, resolveEffectiveAgentConfig } from "./resolver.js";
|
|
4
4
|
//#region src/agent-config/index.ts
|
|
5
5
|
var init_agent_config = __esmMin((() => {
|
|
@@ -8,4 +8,4 @@ var init_agent_config = __esmMin((() => {
|
|
|
8
8
|
}));
|
|
9
9
|
//#endregion
|
|
10
10
|
init_agent_config();
|
|
11
|
-
export { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, ComputerModelRouteSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema,
|
|
11
|
+
export { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, ComputerModelRouteSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema, init_agent_config, resolveEffectiveAgentConfig };
|
|
@@ -87,11 +87,6 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
87
87
|
clearSources("skills", sources);
|
|
88
88
|
markObjectSources(skills, "agent", "skills", sources);
|
|
89
89
|
}
|
|
90
|
-
const workflows = {
|
|
91
|
-
...structuredClone(defaults.workflows),
|
|
92
|
-
...structuredClone(agent.workflows ?? {})
|
|
93
|
-
};
|
|
94
|
-
if (agent.workflows) markObjectSources(agent.workflows, "agent", "workflows", sources);
|
|
95
90
|
const runtime = {
|
|
96
91
|
...structuredClone(defaults.runtime),
|
|
97
92
|
...structuredClone(agent.runtime ?? {})
|
|
@@ -115,7 +110,6 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
115
110
|
skills,
|
|
116
111
|
tools,
|
|
117
112
|
...agent.toolAllowlist ? { toolAllowlist: [...agent.toolAllowlist] } : {},
|
|
118
|
-
workflows,
|
|
119
113
|
runtime
|
|
120
114
|
}),
|
|
121
115
|
sources
|
|
@@ -139,10 +139,6 @@ export declare const SkillOverrideSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
139
139
|
mode: z.ZodLiteral<"replace">;
|
|
140
140
|
include: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
141
141
|
}, z.core.$strict>], "mode">;
|
|
142
|
-
export declare const WorkflowPolicySchema: z.ZodObject<{
|
|
143
|
-
default: z.ZodOptional<z.ZodString>;
|
|
144
|
-
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
}, z.core.$strict>;
|
|
146
142
|
export declare const RuntimePolicySchema: z.ZodObject<{
|
|
147
143
|
codemode: z.ZodOptional<z.ZodObject<{
|
|
148
144
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -239,10 +235,6 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
|
|
|
239
235
|
maxCallsPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
240
236
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
241
237
|
}, z.core.$strict>>>;
|
|
242
|
-
workflows: z.ZodDefault<z.ZodObject<{
|
|
243
|
-
default: z.ZodOptional<z.ZodString>;
|
|
244
|
-
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
245
|
-
}, z.core.$strict>>;
|
|
246
238
|
runtime: z.ZodDefault<z.ZodObject<{
|
|
247
239
|
codemode: z.ZodOptional<z.ZodObject<{
|
|
248
240
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -398,10 +390,6 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
398
390
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
399
391
|
}, z.core.$strict>>>;
|
|
400
392
|
toolAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
401
|
-
workflows: z.ZodOptional<z.ZodObject<{
|
|
402
|
-
default: z.ZodOptional<z.ZodString>;
|
|
403
|
-
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
404
|
-
}, z.core.$strict>>;
|
|
405
393
|
runtime: z.ZodOptional<z.ZodObject<{
|
|
406
394
|
codemode: z.ZodOptional<z.ZodObject<{
|
|
407
395
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -538,10 +526,6 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
538
526
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
539
527
|
}, z.core.$strict>>;
|
|
540
528
|
toolAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
541
|
-
workflows: z.ZodObject<{
|
|
542
|
-
default: z.ZodOptional<z.ZodString>;
|
|
543
|
-
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
544
|
-
}, z.core.$strict>;
|
|
545
529
|
runtime: z.ZodObject<{
|
|
546
530
|
codemode: z.ZodOptional<z.ZodObject<{
|
|
547
531
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -3,7 +3,7 @@ import { SpecialistProfileSchema } from "../../packages/gateway-contract/src/spe
|
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/agent-config/schema.ts
|
|
6
|
-
var DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, AgentIdSchema, ModelRefSchema, ModelRouteSchema, ImageGenerationRouteSchema, ComputerModelRouteSchema, ModelIntentSchema, ModelIntentRoutesSchema, ModelIntentOverridesSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, ToolModeSchema, ToolPolicySchema, ToolPoliciesSchema, SkillDefaultsSchema, SkillOverrideSchema,
|
|
6
|
+
var DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, AgentIdSchema, ModelRefSchema, ModelRouteSchema, ImageGenerationRouteSchema, ComputerModelRouteSchema, ModelIntentSchema, ModelIntentRoutesSchema, ModelIntentOverridesSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, ToolModeSchema, ToolPolicySchema, ToolPoliciesSchema, SkillDefaultsSchema, SkillOverrideSchema, RuntimePolicySchema, AgentDefaultsSchema, AgentProfileSchema, AgentEntrySchema, EffectiveAgentConfigSchema;
|
|
7
7
|
var init_schema = __esmMin((() => {
|
|
8
8
|
init_src();
|
|
9
9
|
DEFAULT_AGENT_MODEL_REF = "xopc-cloud/auto";
|
|
@@ -92,10 +92,6 @@ var init_schema = __esmMin((() => {
|
|
|
92
92
|
mode: z.literal("replace"),
|
|
93
93
|
include: z.array(z.string().min(1)).default([])
|
|
94
94
|
}).strict()]);
|
|
95
|
-
WorkflowPolicySchema = z.object({
|
|
96
|
-
default: z.string().min(1).optional(),
|
|
97
|
-
allowed: z.array(z.string().min(1)).optional()
|
|
98
|
-
}).strict();
|
|
99
95
|
RuntimePolicySchema = z.object({
|
|
100
96
|
codemode: z.object({
|
|
101
97
|
enabled: z.boolean().default(false),
|
|
@@ -132,7 +128,6 @@ var init_schema = __esmMin((() => {
|
|
|
132
128
|
models: AgentModelsDefaultsSchema,
|
|
133
129
|
skills: SkillDefaultsSchema.default(DEFAULT_SKILL_POLICY),
|
|
134
130
|
tools: ToolPoliciesSchema.default({}),
|
|
135
|
-
workflows: WorkflowPolicySchema.default({}),
|
|
136
131
|
runtime: RuntimePolicySchema.default({})
|
|
137
132
|
}).strict();
|
|
138
133
|
AgentProfileSchema = z.object({
|
|
@@ -162,7 +157,6 @@ var init_schema = __esmMin((() => {
|
|
|
162
157
|
skills: SkillOverrideSchema.optional(),
|
|
163
158
|
tools: ToolPoliciesSchema.optional(),
|
|
164
159
|
toolAllowlist: z.array(z.string().min(1)).optional(),
|
|
165
|
-
workflows: WorkflowPolicySchema.optional(),
|
|
166
160
|
runtime: RuntimePolicySchema.optional()
|
|
167
161
|
}).strict();
|
|
168
162
|
EffectiveAgentConfigSchema = z.object({
|
|
@@ -176,10 +170,9 @@ var init_schema = __esmMin((() => {
|
|
|
176
170
|
skills: SkillDefaultsSchema,
|
|
177
171
|
tools: ToolPoliciesSchema,
|
|
178
172
|
toolAllowlist: z.array(z.string().min(1)).optional(),
|
|
179
|
-
workflows: WorkflowPolicySchema,
|
|
180
173
|
runtime: RuntimePolicySchema
|
|
181
174
|
}).strict();
|
|
182
175
|
}));
|
|
183
176
|
//#endregion
|
|
184
177
|
init_schema();
|
|
185
|
-
export { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, ComputerModelRouteSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema,
|
|
178
|
+
export { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, ComputerModelRouteSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema, init_schema };
|
|
@@ -15,7 +15,7 @@ export interface SelectionRecord {
|
|
|
15
15
|
requirements: SpecialistTaskRequirements;
|
|
16
16
|
assessment: SpecialistAssessment;
|
|
17
17
|
candidates?: Array<Pick<SpecialistAssessment, 'id' | 'revision' | 'eligibility' | 'checks' | 'matched' | 'missing'>>;
|
|
18
|
-
selectionSource: 'snapshot' | 'match' | 'explicit'
|
|
18
|
+
selectionSource: 'snapshot' | 'match' | 'explicit';
|
|
19
19
|
selectionReason: string;
|
|
20
20
|
reasonSource: 'model' | 'system';
|
|
21
21
|
status: SelectionStatus;
|