@xopcai/xopc 0.0.278 → 0.0.282

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.
Files changed (441) hide show
  1. package/dist/browser-ext/_locales/en/messages.json +34 -4
  2. package/dist/browser-ext/_locales/zh_CN/messages.json +34 -4
  3. package/dist/browser-ext/dist/assets/{auth-ClQTK565.js → auth-DB30ywek.js} +18 -53
  4. package/dist/browser-ext/dist/assets/pcm-capture-worklet-CGN9Mlhg.js +39 -0
  5. package/dist/browser-ext/dist/assets/{sidepanel-CeGqObOa.css → sidepanel-BbSQr-6P.css} +40 -6
  6. package/dist/browser-ext/dist/background.js +1 -1
  7. package/dist/browser-ext/dist/sidepanel.html +2 -2
  8. package/dist/browser-ext/dist/sidepanel.js +1219 -191
  9. package/dist/browser-ext/manifest.json +2 -1
  10. package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
  11. package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
  12. package/dist/extensions/telegram/src/inbound-processor.js +2 -2
  13. package/dist/extensions/telegram/src/outbound-sender.js +1 -1
  14. package/dist/extensions/telegram/src/plugin.js +2 -2
  15. package/dist/extensions/telegram/xopc.extension.json +1 -1
  16. package/dist/extensions/weixin/src/api/api.js +2 -2
  17. package/dist/extensions/weixin/src/auth/accounts.js +12 -12
  18. package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
  19. package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
  20. package/dist/gateway/static/root/assets/{activity-store-SJZ5fS17.js → activity-store-iPtG94qr.js} +1 -1
  21. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-lRVOwbrK.js → agent-avatar-dicebear-Cny5rATT.js} +1 -1
  22. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-OyQ8OVZv.js +1 -0
  23. package/dist/gateway/static/root/assets/{agents-DNQNTDkU.js → agents-DJeh_Ewo.js} +1 -1
  24. package/dist/gateway/static/root/assets/{api-CnJAVHBu.js → api-KMJzMqvZ.js} +1 -1
  25. package/dist/gateway/static/root/assets/{app-management-settings-panel-oHTY5PDs.js → app-management-settings-panel-ZqQKaZEI.js} +1 -1
  26. package/dist/gateway/static/root/assets/{appearance-settings-B0YnZ3ig.js → appearance-settings-CfXsQkKO.js} +1 -1
  27. package/dist/gateway/static/root/assets/apps-page-k-QnVhKW.js +1 -0
  28. package/dist/gateway/static/root/assets/{archive-plugin-D4x142le.js → archive-plugin-BrW53Hap.js} +1 -1
  29. package/dist/gateway/static/root/assets/{attachment-load-zibD2Hod.js → attachment-load-DkfFWHiS.js} +1 -1
  30. package/dist/gateway/static/root/assets/{automations-page-Dkp7gp_S.js → automations-page-e-5we6kD.js} +1 -1
  31. package/dist/gateway/static/root/assets/automations-workspace-DPnlkws1.js +6 -0
  32. package/dist/gateway/static/root/assets/{binary-plugins-CfUzu1Hc.js → binary-plugins-CWIswfXA.js} +1 -1
  33. package/dist/gateway/static/root/assets/{block-editor-r5nCBBan.js → block-editor-CfeF1OmA.js} +3 -3
  34. package/dist/gateway/static/root/assets/{browser-automation-inputs-DcVLoIzc.js → browser-automation-inputs-BTIufVbM.js} +1 -1
  35. package/dist/gateway/static/root/assets/{browser-automations-page-BnL4JnTM.js → browser-automations-page-DnsuWKRu.js} +2 -2
  36. package/dist/gateway/static/root/assets/browser-settings-page-C8xyhnxx.js +8 -0
  37. package/dist/gateway/static/root/assets/capabilities-settings-panel-CBllOLTT.js +8 -0
  38. package/dist/gateway/static/root/assets/channels-settings-C-A-VUE2.js +1 -0
  39. package/dist/gateway/static/root/assets/{channels-status-swr-BTT2sIGg.js → channels-status-swr-DMYQNs-J.js} +1 -1
  40. package/dist/gateway/static/root/assets/{chat-terminal-dock-CWVnJtBp.js → chat-terminal-dock-C_Fw1R3A.js} +2 -2
  41. package/dist/gateway/static/root/assets/connectors-page-CtsMo3H4.js +2 -0
  42. package/dist/gateway/static/root/assets/{date-picker-XjPSlgq_.js → date-picker-CPFxjTrN.js} +1 -1
  43. package/dist/gateway/static/root/assets/{dependency-picker-CkyfEP88.js → dependency-picker-C_5KqzjI.js} +1 -1
  44. package/dist/gateway/static/root/assets/{desktop-pet-BAE_NVx5.js → desktop-pet-DLJsC5D6.js} +1 -1
  45. package/dist/gateway/static/root/assets/{desktop-pet-settings-BUw6V2R9.js → desktop-pet-settings-BdI1iSgz.js} +1 -1
  46. package/dist/gateway/static/root/assets/device-pairing-wizard-BnvPLhc9.js +1 -0
  47. package/dist/gateway/static/root/assets/{extension-debug-page-giBeIVUT.js → extension-debug-page-BNS_TkZQ.js} +1 -1
  48. package/dist/gateway/static/root/assets/{extension-page-Bqo9bNtx.js → extension-page-DMSDZ7Mb.js} +1 -1
  49. package/dist/gateway/static/root/assets/{extension-settings-page-BX-6AA3k.js → extension-settings-page-CeGCWMt0.js} +1 -1
  50. package/dist/gateway/static/root/assets/gateway-config-swr-Cpmyrr6j.js +1 -0
  51. package/dist/gateway/static/root/assets/gateway-settings-DKOTYUma.js +1 -0
  52. package/dist/gateway/static/root/assets/{gateway-startup-retry-CVTa5HSS.js → gateway-startup-retry-DoiPeb65.js} +1 -1
  53. package/dist/gateway/static/root/assets/{heartbeat-settings-DWFAopk_.js → heartbeat-settings-gsdL_Yij.js} +1 -1
  54. package/dist/gateway/static/root/assets/home-page-CbeAdS1T.js +1 -0
  55. package/dist/gateway/static/root/assets/{image-generation-api-DtMRG1oF.js → image-generation-api-CqjHWl2T.js} +1 -1
  56. package/dist/gateway/static/root/assets/index-B_Sg5BKz.css +2 -0
  57. package/dist/gateway/static/root/assets/index-enFXJJCU.js +74 -0
  58. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BKGPpBnV.js → keyboard-shortcuts-settings-CCLtJ8s8.js} +1 -1
  59. package/dist/gateway/static/root/assets/local-app-workbench-page-DzC6SrXj.js +2 -0
  60. package/dist/gateway/static/root/assets/{local-apps-page-B06ToOxB.js → local-apps-page-3LdgP3NO.js} +1 -1
  61. package/dist/gateway/static/root/assets/{locale-store-BkJ7g35d.js → locale-store-1urrBBCQ.js} +1 -1
  62. package/dist/gateway/static/root/assets/{logs-page-DibI1GsP.js → logs-page-DHClKtm6.js} +2 -2
  63. package/dist/gateway/static/root/assets/{management-settings-DJ6yMZCd.js → management-settings-BaCo9Nuo.js} +1 -1
  64. package/dist/gateway/static/root/assets/{markdown-view-DF3aJP_5.js → markdown-view-BZmcFIWa.js} +1 -1
  65. package/dist/gateway/static/root/assets/{media-plugins-CdrLNAks.js → media-plugins-BMjJppvG.js} +1 -1
  66. package/dist/gateway/static/root/assets/messages-DYFcjtmG.js +3 -0
  67. package/dist/gateway/static/root/assets/note-detail-panel-hYO2jNhL.js +5 -0
  68. package/dist/gateway/static/root/assets/notes-page-BT66x22W.js +8 -0
  69. package/dist/gateway/static/root/assets/{page-tabs-B7LA4z-x.js → page-tabs-BCszXX_F.js} +1 -1
  70. package/dist/gateway/static/root/assets/{preview-open-alternatives-DTQRN7WR.js → preview-open-alternatives-CyM0sanh.js} +1 -1
  71. package/dist/gateway/static/root/assets/proactive-page-CVDGA5sB.js +1 -0
  72. package/dist/gateway/static/root/assets/{product-open-page-BazdmFYo.js → product-open-page-lXAbj85Z.js} +1 -1
  73. package/dist/gateway/static/root/assets/project-detail-page-Bp6TAMPM.js +1 -0
  74. package/dist/gateway/static/root/assets/projects-page-UhOIiDcg.js +1 -0
  75. package/dist/gateway/static/root/assets/{registry-api-CTq8EECj.js → registry-api-CxQstD00.js} +1 -1
  76. package/dist/gateway/static/root/assets/remote-access-hub-DJIkMFT4.js +1 -0
  77. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D-DZf4I1.js → runtime-tools-settings-panel-BUFCgRdZ.js} +2 -2
  78. package/dist/gateway/static/root/assets/{schema-form-B-Yj9DVW.js → schema-form-B01ksA8M.js} +1 -1
  79. package/dist/gateway/static/root/assets/sessions-page-CQOAwPDt.js +1 -0
  80. package/dist/gateway/static/root/assets/settings-advanced-gate-CFuqbGI-.js +1 -0
  81. package/dist/gateway/static/root/assets/{settings-form-section-BxPUqwY6.js → settings-form-section-DvnjZBa3.js} +1 -1
  82. package/dist/gateway/static/root/assets/{settings-page-zLn8lIrs.js → settings-page-DZRkpbCh.js} +1 -1
  83. package/dist/gateway/static/root/assets/setup-status-panel-DVaEiAVY.js +1 -0
  84. package/dist/gateway/static/root/assets/{share-preview-page-DAc_FkVc.js → share-preview-page-vz0UK56q.js} +1 -1
  85. package/dist/gateway/static/root/assets/shares-settings-XiCqMDAe.js +1 -0
  86. package/dist/gateway/static/root/assets/skill-reload-api-C3D8WanU.js +1 -0
  87. package/dist/gateway/static/root/assets/skills-page-CxMWwR6A.js +2 -0
  88. package/dist/gateway/static/root/assets/{skills-page.utils-BR5bk2vT.js → skills-page.utils-BryVNYll.js} +1 -1
  89. package/dist/gateway/static/root/assets/{system-settings-panel-C0ptJutB.js → system-settings-panel-mKFDe6aZ.js} +1 -1
  90. package/dist/gateway/static/root/assets/task-detail-page-Cb0RZNcJ.js +1 -0
  91. package/dist/gateway/static/root/assets/{theme-store-mV6Cm2vj.js → theme-store-Dc5s20V3.js} +1 -1
  92. package/dist/gateway/static/root/assets/tunnel-api-FcI3wKy3.js +1 -0
  93. package/dist/gateway/static/root/assets/{use-autosave-Dc5aN2px.js → use-autosave-CDgdtjTC.js} +1 -1
  94. package/dist/gateway/static/root/assets/user-model-page-Cnshc-Un.js +2 -0
  95. package/dist/gateway/static/root/assets/{voice-api-key-field-CY0DpJui.js → voice-api-key-field-Ce8cb5mN.js} +1 -1
  96. package/dist/gateway/static/root/assets/{voice-config-api-D3DdcH4H.js → voice-config-api-Mk78BrpP.js} +1 -1
  97. package/dist/gateway/static/root/assets/{work-discovery-overlay-Brg9yJBr.js → work-discovery-overlay-CacFTtXe.js} +1 -1
  98. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D3fq7boB.js → workflow-run-setup-panel-V-5HuEUq.js} +2 -2
  99. package/dist/gateway/static/root/assets/workflows-page-1OJimIfo.js +6 -0
  100. package/dist/gateway/static/root/index.html +10 -11
  101. package/dist/package.js +1 -1
  102. package/dist/packages/gateway-contract/src/discussions.js +17 -0
  103. package/dist/packages/gateway-contract/src/proactive.js +4 -2
  104. package/dist/src/agent/agent-manager.js +14 -14
  105. package/dist/src/agent/agent-scope.js +2 -2
  106. package/dist/src/agent/background-review/run-background-review.js +3 -3
  107. package/dist/src/agent/context/coordinator.js +3 -3
  108. package/dist/src/agent/context/execution-context.js +4 -4
  109. package/dist/src/agent/context/execution-scope.js +2 -2
  110. package/dist/src/agent/context/project-context.d.ts +1 -0
  111. package/dist/src/agent/context/project-context.js +16 -8
  112. package/dist/src/agent/embedded/index.js +2 -2
  113. package/dist/src/agent/embedded/run-for-session.js +4 -4
  114. package/dist/src/agent/embedded/run-turn.js +2 -2
  115. package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
  116. package/dist/src/agent/external-tools/composio-provider.js +1 -1
  117. package/dist/src/agent/external-tools/gateway-tools.js +1 -1
  118. package/dist/src/agent/external-tools/mcp-provider.js +2 -2
  119. package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
  120. package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
  121. package/dist/src/agent/image/generation/providers/fal.js +1 -1
  122. package/dist/src/agent/image/generation/providers/google.js +1 -1
  123. package/dist/src/agent/image/generation/runtime.js +1 -1
  124. package/dist/src/agent/image/index.js +1 -1
  125. package/dist/src/agent/image/load-image-media.js +1 -1
  126. package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
  127. package/dist/src/agent/inbound/inbound-loop.js +2 -2
  128. package/dist/src/agent/index.js +1 -1
  129. package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -1
  130. package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
  131. package/dist/src/agent/mcp/index.js +2 -2
  132. package/dist/src/agent/mcp/mcp-transport.js +1 -1
  133. package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +1 -1
  134. package/dist/src/agent/memory/index.js +2 -2
  135. package/dist/src/agent/messaging/outbound-coordinator.js +1 -1
  136. package/dist/src/agent/orchestration/agent-orchestrator.js +5 -5
  137. package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
  138. package/dist/src/agent/sandbox/exec-policy.js +1 -1
  139. package/dist/src/agent/service/direct-turn-helpers.js +6 -6
  140. package/dist/src/agent/service/process-direct-one-shot.js +1 -1
  141. package/dist/src/agent/service/process-direct-streaming.js +5 -5
  142. package/dist/src/agent/service/webchat-tts.js +2 -2
  143. package/dist/src/agent/service.js +18 -18
  144. package/dist/src/agent/skills/filesystem-watcher.js +1 -1
  145. package/dist/src/agent/skills/hub-pull.js +3 -3
  146. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
  147. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
  148. package/dist/src/agent/source-context/task-context.d.ts +3 -0
  149. package/dist/src/agent/source-context/task-context.js +24 -0
  150. package/dist/src/agent/source-context/types.d.ts +2 -2
  151. package/dist/src/agent/source-context/types.js +1 -1
  152. package/dist/src/agent/tasks/task-judge-service.js +2 -2
  153. package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
  154. package/dist/src/agent/tool-manuals/xopc-use.js +1 -0
  155. package/dist/src/agent/tools/create-share-tool.js +3 -3
  156. package/dist/src/agent/tools/delegate-tool.js +3 -3
  157. package/dist/src/agent/tools/executor.js +1 -1
  158. package/dist/src/agent/tools/factory.js +13 -13
  159. package/dist/src/agent/tools/image-generate-tool.js +3 -3
  160. package/dist/src/agent/tools/index.js +5 -5
  161. package/dist/src/agent/tools/list-dir.js +1 -1
  162. package/dist/src/agent/tools/publish-artifacts.js +2 -2
  163. package/dist/src/agent/tools/read.js +1 -1
  164. package/dist/src/agent/tools/review-workspace.js +1 -1
  165. package/dist/src/agent/tools/send-media.js +2 -2
  166. package/dist/src/agent/tools/skills-tools.js +1 -1
  167. package/dist/src/agent/tools/tts-tool.js +1 -1
  168. package/dist/src/agent/tools/user-context-tool.js +1 -1
  169. package/dist/src/agent/tools/write.js +2 -2
  170. package/dist/src/agent/tools/xopc-use-tool.js +4 -4
  171. package/dist/src/agent/workflow/subagent-runner.js +1 -1
  172. package/dist/src/capabilities/store-connector.js +1 -1
  173. package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
  174. package/dist/src/channels/index.js +2 -2
  175. package/dist/src/channels/outbound-sender.js +1 -1
  176. package/dist/src/channels/pairing/allow-from-file.js +9 -9
  177. package/dist/src/channels/pairing/pairing-store.js +6 -6
  178. package/dist/src/chat-commands/builtins/config.js +2 -2
  179. package/dist/src/chat-commands/builtins/review.js +1 -1
  180. package/dist/src/chat-commands/builtins/session.js +1 -1
  181. package/dist/src/chat-commands/builtins/thinking.js +1 -1
  182. package/dist/src/chat-commands/builtins/tts.js +1 -1
  183. package/dist/src/chat-commands/builtins/understanding.js +1 -1
  184. package/dist/src/chat-commands/builtins/workflow.js +2 -2
  185. package/dist/src/chat-commands/context.js +2 -2
  186. package/dist/src/chat-commands/index.js +3 -3
  187. package/dist/src/cli/commands/agent.js +6 -6
  188. package/dist/src/cli/commands/agents.js +1 -1
  189. package/dist/src/cli/commands/config.js +1 -1
  190. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  191. package/dist/src/cli/commands/extension-dev.js +1 -1
  192. package/dist/src/cli/commands/extension.js +1 -1
  193. package/dist/src/cli/commands/gateway/shared.js +1 -1
  194. package/dist/src/cli/commands/gateway/token.js +1 -1
  195. package/dist/src/cli/commands/image.js +1 -1
  196. package/dist/src/cli/commands/init.js +1 -1
  197. package/dist/src/cli/commands/onboard.js +1 -1
  198. package/dist/src/cli/commands/project.js +2 -2
  199. package/dist/src/cli/commands/runtime.js +1 -1
  200. package/dist/src/cli/commands/skills.js +2 -2
  201. package/dist/src/cli/commands/tui.js +1 -1
  202. package/dist/src/cli/commands/tunnel.js +3 -3
  203. package/dist/src/cli/extension-cli-register.js +4 -4
  204. package/dist/src/cli/utils/gateway-client.js +1 -1
  205. package/dist/src/config/index.js +2 -2
  206. package/dist/src/connectors/connected-source-understanding.js +2 -2
  207. package/dist/src/connectors/connection-recovery-service.js +3 -3
  208. package/dist/src/discussions/action-tasks.d.ts +21 -0
  209. package/dist/src/discussions/action-tasks.js +93 -0
  210. package/dist/src/discussions/analyzer.d.ts +21 -1
  211. package/dist/src/discussions/analyzer.js +229 -62
  212. package/dist/src/discussions/audio-repair.d.ts +8 -0
  213. package/dist/src/discussions/audio-repair.js +41 -0
  214. package/dist/src/discussions/edits.d.ts +22 -0
  215. package/dist/src/discussions/edits.js +81 -0
  216. package/dist/src/discussions/errors.d.ts +4 -0
  217. package/dist/src/discussions/errors.js +10 -0
  218. package/dist/src/discussions/export.d.ts +2 -0
  219. package/dist/src/discussions/export.js +23 -0
  220. package/dist/src/discussions/index.js +3 -2
  221. package/dist/src/discussions/live-worker.js +2 -2
  222. package/dist/src/discussions/organizer-worker.js +14 -5
  223. package/dist/src/discussions/organizer.d.ts +1 -1
  224. package/dist/src/discussions/organizer.js +60 -24
  225. package/dist/src/discussions/reconcile.d.ts +22 -0
  226. package/dist/src/discussions/reconcile.js +55 -0
  227. package/dist/src/discussions/recording.d.ts +9 -0
  228. package/dist/src/discussions/recording.js +219 -0
  229. package/dist/src/discussions/recordingJobs.d.ts +14 -0
  230. package/dist/src/discussions/recordingJobs.js +69 -0
  231. package/dist/src/discussions/repository.d.ts +4 -2
  232. package/dist/src/discussions/repository.js +15 -10
  233. package/dist/src/discussions/revisions.d.ts +12 -0
  234. package/dist/src/discussions/revisions.js +36 -0
  235. package/dist/src/discussions/sealer.d.ts +1 -0
  236. package/dist/src/discussions/sealer.js +62 -12
  237. package/dist/src/discussions/service.d.ts +16 -15
  238. package/dist/src/discussions/service.js +177 -91
  239. package/dist/src/discussions/types.d.ts +4 -139
  240. package/dist/src/discussions/types.js +1 -11
  241. package/dist/src/extensions/api.js +3 -3
  242. package/dist/src/extensions/bundled-extension-activation.js +1 -1
  243. package/dist/src/extensions/index.js +1 -1
  244. package/dist/src/extensions/loader.js +1 -1
  245. package/dist/src/extensions/sdk/index.js +1 -1
  246. package/dist/src/files/file-service.d.ts +1 -0
  247. package/dist/src/files/file-service.js +77 -0
  248. package/dist/src/gateway/agents-admin.js +3 -3
  249. package/dist/src/gateway/chat-stream/mapper.js +2 -2
  250. package/dist/src/gateway/device-routes.js +2 -2
  251. package/dist/src/gateway/file-path-classifier.js +1 -1
  252. package/dist/src/gateway/heartbeat/service.js +1 -1
  253. package/dist/src/gateway/hono/app.js +6 -5
  254. package/dist/src/gateway/hono/lib/config-payload.js +2 -2
  255. package/dist/src/gateway/hono/lib/static-ui.js +1 -0
  256. package/dist/src/gateway/hono/routes/agents.js +1 -1
  257. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  258. package/dist/src/gateway/hono/routes/browser.js +1 -1
  259. package/dist/src/gateway/hono/routes/commands-skills.js +3 -3
  260. package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
  261. package/dist/src/gateway/hono/routes/context-sources.js +1 -2
  262. package/dist/src/gateway/hono/routes/discussions.js +126 -19
  263. package/dist/src/gateway/hono/routes/files.js +1 -22
  264. package/dist/src/gateway/hono/routes/index.js +0 -2
  265. package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
  266. package/dist/src/gateway/hono/routes/mcp.js +2 -2
  267. package/dist/src/gateway/hono/routes/media.js +1 -1
  268. package/dist/src/gateway/hono/routes/models.js +4 -4
  269. package/dist/src/gateway/hono/routes/notes.js +1 -1
  270. package/dist/src/gateway/hono/routes/proactive-control.js +4 -38
  271. package/dist/src/gateway/hono/routes/project-understanding.d.ts +3 -0
  272. package/dist/src/gateway/hono/routes/project-understanding.js +65 -0
  273. package/dist/src/gateway/hono/routes/projects.js +22 -6
  274. package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
  275. package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
  276. package/dist/src/gateway/hono/routes/sessions.js +1 -1
  277. package/dist/src/gateway/hono/routes/shares.js +3 -3
  278. package/dist/src/gateway/hono/routes/site-shares.js +1 -1
  279. package/dist/src/gateway/hono/routes/status.js +1 -1
  280. package/dist/src/gateway/hono/routes/tasks.js +4 -3
  281. package/dist/src/gateway/hono/routes/user-model.js +4 -4
  282. package/dist/src/gateway/hono/routes/voice.js +3 -3
  283. package/dist/src/gateway/hono/routes/work-discovery.d.ts +0 -2
  284. package/dist/src/gateway/hono/routes/work-discovery.js +2 -16
  285. package/dist/src/gateway/hono/routes/workflows.js +4 -4
  286. package/dist/src/gateway/image-generation-setup.js +1 -1
  287. package/dist/src/gateway/lock.js +10 -10
  288. package/dist/src/gateway/media-access.js +2 -2
  289. package/dist/src/gateway/ports.js +6 -6
  290. package/dist/src/gateway/security/gateway-scopes.js +1 -2
  291. package/dist/src/gateway/server.js +1 -1
  292. package/dist/src/gateway/service/agent-runner.js +2 -2
  293. package/dist/src/gateway/service/config-coordinator.js +3 -3
  294. package/dist/src/gateway/service/marketplace-service.js +3 -3
  295. package/dist/src/gateway/service/run-gateway-agent.js +3 -3
  296. package/dist/src/gateway/service.d.ts +3 -0
  297. package/dist/src/gateway/service.js +42 -27
  298. package/dist/src/gateway/session-context-summary.js +2 -2
  299. package/dist/src/gateway/workspace-editor-path.js +2 -2
  300. package/dist/src/heartbeat/index.js +1 -1
  301. package/dist/src/infra/gateway-processes.js +2 -2
  302. package/dist/src/infra/path-env.js +3 -3
  303. package/dist/src/infra/update-global.js +10 -10
  304. package/dist/src/knowledge-memory/repository.d.ts +2 -0
  305. package/dist/src/knowledge-memory/repository.js +3 -1
  306. package/dist/src/local-apps/service.js +1 -1
  307. package/dist/src/media-shared/http/ssrf-guard.js +1 -1
  308. package/dist/src/media-understanding/audio-transcription-runner.d.ts +1 -0
  309. package/dist/src/media-understanding/audio-transcription-runner.js +1 -0
  310. package/dist/src/media-understanding/runner.js +1 -0
  311. package/dist/src/media-understanding/types.d.ts +8 -0
  312. package/dist/src/notes/agent-context.js +3 -3
  313. package/dist/src/notes/service.d.ts +3 -1
  314. package/dist/src/notes/store.d.ts +3 -1
  315. package/dist/src/notes/store.js +5 -3
  316. package/dist/src/proactive/actions/service.js +1 -1
  317. package/dist/src/proactive/execution/agent-executor.js +1 -1
  318. package/dist/src/proactive/execution/context.js +1 -1
  319. package/dist/src/proactive/execution/worker.js +1 -1
  320. package/dist/src/proactive/experience.d.ts +38 -21
  321. package/dist/src/proactive/experience.js +109 -13
  322. package/dist/src/proactive/follow-ups.js +1 -1
  323. package/dist/src/proactive/inbox/cards.js +9 -3
  324. package/dist/src/proactive/inbox/delivery.js +2 -2
  325. package/dist/src/proactive/inbox/digest.js +2 -2
  326. package/dist/src/proactive/inbox/notification-policy.js +1 -1
  327. package/dist/src/proactive/inbox/repository.js +1 -1
  328. package/dist/src/proactive/inbox/service.js +1 -1
  329. package/dist/src/proactive/index.js +1 -1
  330. package/dist/src/proactive/maintenance.js +0 -1
  331. package/dist/src/proactive/scenarios/control.d.ts +0 -35
  332. package/dist/src/proactive/scenarios/control.js +7 -53
  333. package/dist/src/proactive/temporal/worker.js +1 -1
  334. package/dist/src/projects/project-skill-service.js +2 -2
  335. package/dist/src/projects/project-store.js +6 -4
  336. package/dist/src/providers/model-reference-auditor.js +1 -1
  337. package/dist/src/remote-access/exposure-manager.js +1 -1
  338. package/dist/src/session/client-history.d.ts +1 -1
  339. package/dist/src/session/client-history.js +1 -1
  340. package/dist/src/session/index.js +2 -2
  341. package/dist/src/session/session-title.js +1 -1
  342. package/dist/src/session/store.js +3 -3
  343. package/dist/src/session/thinking-resolve.js +1 -1
  344. package/dist/src/share/share-store.js +1 -1
  345. package/dist/src/share/share-thumbnail.js +1 -1
  346. package/dist/src/share/site-share-store.js +1 -1
  347. package/dist/src/storage/sqlite/connection.js +9 -9
  348. package/dist/src/storage/sqlite/migrations/166_remove_proactive_previews.sql +1 -0
  349. package/dist/src/storage/sqlite/migrations/167_discussion_recording_chunks.sql +7 -0
  350. package/dist/src/storage/sqlite/migrations/168_discussion_evidence.sql +16 -0
  351. package/dist/src/storage/sqlite/migrations/169_discussion_action_tasks.sql +8 -0
  352. package/dist/src/storage/sqlite/migrations/170_discussion_edits.sql +8 -0
  353. package/dist/src/storage/sqlite/migrations/171_discussion_recording_jobs.sql +14 -0
  354. package/dist/src/storage/sqlite/migrations/172_project_understanding.sql +3 -0
  355. package/dist/src/storage/sqlite/migrations/173_mobile_discussion_source.sql +5 -0
  356. package/dist/src/storage/sqlite/migrations/__tests__/mobile-discussion-source.test.ts +20 -0
  357. package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
  358. package/dist/src/storage/sqlite/migrations/runner.js +3 -3
  359. package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
  360. package/dist/src/storage/sqlite/schema.js +1 -1
  361. package/dist/src/tasks/execution-context.js +1 -1
  362. package/dist/src/tasks/home-query-service.js +1 -1
  363. package/dist/src/tasks/index.js +3 -3
  364. package/dist/src/tasks/task-application-service.js +1 -1
  365. package/dist/src/tasks/task-context-assembler.js +1 -1
  366. package/dist/src/tasks/task-handoff-service.js +1 -1
  367. package/dist/src/tasks/task-repository.d.ts +1 -0
  368. package/dist/src/tasks/task-repository.js +4 -0
  369. package/dist/src/tasks/task-run-coordinator.js +1 -1
  370. package/dist/src/tui/backends/embedded-backend.js +9 -9
  371. package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
  372. package/dist/src/tui/extension-host/load-extensions.js +1 -1
  373. package/dist/src/tui/tui-command-formatters.js +1 -1
  374. package/dist/src/tui/tui-commands.js +5 -5
  375. package/dist/src/tui/tui-picker-overlay.js +1 -1
  376. package/dist/src/tui/tui-skills-autocomplete.js +1 -1
  377. package/dist/src/tui/tui-startup-resources.js +4 -4
  378. package/dist/src/tui/tui.js +2 -2
  379. package/dist/src/tunnel/gateway-lifecycle.js +1 -1
  380. package/dist/src/voice/audio/normalize.js +28 -5
  381. package/dist/src/voice/local/runtime-worker.js +1 -1
  382. package/dist/src/voice/realtime/memory-context.js +3 -3
  383. package/dist/src/voice/stt/index.js +2 -2
  384. package/dist/src/voice/stt/preflight.js +1 -1
  385. package/dist/src/voice/stt/providers/local-transcription.js +1 -1
  386. package/dist/src/voice/stt/transcribe-core.js +2 -1
  387. package/dist/src/voice/stt/types.d.ts +1 -0
  388. package/dist/src/voice/tts/index.js +3 -3
  389. package/dist/src/voice/tts/merge-config.js +1 -1
  390. package/dist/src/voice/tts/payload.js +1 -1
  391. package/dist/src/voice/tts/speak-core.js +1 -1
  392. package/dist/src/work-discovery/analyzer.d.ts +1 -0
  393. package/dist/src/work-discovery/analyzer.js +28 -22
  394. package/dist/src/work-discovery/index.js +3 -3
  395. package/dist/src/work-discovery/investigator.js +1 -1
  396. package/dist/src/work-discovery/project-understanding.d.ts +7 -0
  397. package/dist/src/work-discovery/project-understanding.js +38 -0
  398. package/dist/src/work-discovery/repository.d.ts +3 -1
  399. package/dist/src/work-discovery/repository.js +18 -5
  400. package/dist/src/work-discovery/service.d.ts +8 -0
  401. package/dist/src/work-discovery/service.js +164 -16
  402. package/dist/src/work-discovery/types.d.ts +2 -0
  403. package/dist/src/workflows/context/workflow-context.js +1 -1
  404. package/dist/src/workflows/service/workflow-run-service.js +4 -4
  405. package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
  406. package/package.json +3 -3
  407. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DAqn5DdL.js +0 -1
  408. package/dist/gateway/static/root/assets/apps-page-Bh0etSmL.js +0 -1
  409. package/dist/gateway/static/root/assets/automations-workspace-w4McwueN.js +0 -6
  410. package/dist/gateway/static/root/assets/browser-settings-page-DxX-t0EJ.js +0 -8
  411. package/dist/gateway/static/root/assets/capabilities-settings-panel-CvacBQAI.js +0 -8
  412. package/dist/gateway/static/root/assets/channels-settings-CJzSNo-L.js +0 -1
  413. package/dist/gateway/static/root/assets/config-reload-event-Bjh2zoKp.js +0 -1
  414. package/dist/gateway/static/root/assets/connectors-page-DNBhBT0b.js +0 -2
  415. package/dist/gateway/static/root/assets/device-pairing-wizard-DsR5NQEC.js +0 -1
  416. package/dist/gateway/static/root/assets/gateway-config-swr-cd8owslz.js +0 -1
  417. package/dist/gateway/static/root/assets/gateway-settings-Dil7vuyU.js +0 -1
  418. package/dist/gateway/static/root/assets/home-page-Dpeuvazg.js +0 -1
  419. package/dist/gateway/static/root/assets/index-B03HGpzt.js +0 -74
  420. package/dist/gateway/static/root/assets/index-CXF9-BpI.css +0 -2
  421. package/dist/gateway/static/root/assets/local-app-workbench-page-CBtemxFc.js +0 -2
  422. package/dist/gateway/static/root/assets/messages-BGc-OJWg.js +0 -3
  423. package/dist/gateway/static/root/assets/note-detail-panel-GOxomxOK.js +0 -5
  424. package/dist/gateway/static/root/assets/notes-page-CQBgk3_x.js +0 -8
  425. package/dist/gateway/static/root/assets/proactive-card-BF3741px.js +0 -1
  426. package/dist/gateway/static/root/assets/proactive-page-1EM217v0.js +0 -1
  427. package/dist/gateway/static/root/assets/project-detail-page-B1Pm-fQd.js +0 -1
  428. package/dist/gateway/static/root/assets/projects-page-DUrxyNR9.js +0 -1
  429. package/dist/gateway/static/root/assets/remote-access-hub-C6VzHUwx.js +0 -1
  430. package/dist/gateway/static/root/assets/sessions-page-DtemHfkv.js +0 -1
  431. package/dist/gateway/static/root/assets/settings-advanced-gate-ByEVQe0c.js +0 -1
  432. package/dist/gateway/static/root/assets/setup-status-panel-BwIrk3Jx.js +0 -1
  433. package/dist/gateway/static/root/assets/shares-settings-Dwdv6QyS.js +0 -1
  434. package/dist/gateway/static/root/assets/skill-reload-api-CDzQWN60.js +0 -1
  435. package/dist/gateway/static/root/assets/skills-page-CO5XVkbY.js +0 -2
  436. package/dist/gateway/static/root/assets/task-detail-page-DOjcKOzQ.js +0 -1
  437. package/dist/gateway/static/root/assets/tunnel-api-BABuQvGD.js +0 -1
  438. package/dist/gateway/static/root/assets/user-model-page-UhsSP_pC.js +0 -2
  439. package/dist/gateway/static/root/assets/workflows-page-S7XXNBWa.js +0 -6
  440. package/dist/src/proactive/scenarios/preview.d.ts +0 -13
  441. package/dist/src/proactive/scenarios/preview.js +0 -81
@@ -4,30 +4,38 @@ import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
4
4
  import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
5
5
  import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
6
6
  import { init_providers, resolveModel } from "../providers/index.js";
7
- import { removeSkillsLockEntry } from "./skills/hub-lock.js";
8
- import { installSkillFromZip } from "./skills/managed-store.js";
7
+ import { applyConfigOverrides } from "../config/runtime-overrides.js";
9
8
  import { extractProfileAgentId } from "../config/agent-profile.js";
9
+ import { extractTextContent } from "./context/workspace.js";
10
10
  import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
11
11
  import { getProjectForSession } from "../projects/workspace.js";
12
- import { getUserTimezone } from "../user-model/repository.js";
13
- import "../user-model/index.js";
14
- import { initializeCommands } from "../chat-commands/index.js";
15
- import { applyConfigOverrides } from "../config/runtime-overrides.js";
16
- import { ExtensionHookRunner } from "../extensions/hooks.js";
17
- import "../extensions/index.js";
12
+ import { runWithEmbeddedExecutionSession } from "./embedded/execution-context.js";
18
13
  import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
14
+ import { removeSkillsLockEntry } from "./skills/hub-lock.js";
15
+ import { installSkillFromZip } from "./skills/managed-store.js";
19
16
  import { pullSkillFromSource } from "./skills/hub-pull.js";
20
- import { extractTextContent } from "./context/workspace.js";
17
+ import { getUserTimezone } from "../user-model/repository.js";
18
+ import "../user-model/index.js";
19
+ import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
20
+ import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
21
+ import { persistInboundAttachments } from "../channels/attachments/inbound-persist.js";
22
+ import { buildTranscriptUserMessage, hydrateUserTurnForLlm } from "./inbound/attachment-pipeline.js";
23
+ import { runXopcEmbeddedTurn } from "./embedded/run-turn.js";
24
+ import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
25
+ import { normalizeSkillInstallTarget } from "./skills/install-target.js";
26
+ import { AgentManager } from "./agent-manager.js";
21
27
  import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
22
28
  import { maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle } from "../session/session-title.js";
23
29
  import { resolveCompactionPolicy } from "./memory/compaction-policy.js";
24
30
  import { SessionStore } from "../session/store.js";
25
- import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
26
31
  import { SessionConfigStore } from "../session/config-store.js";
27
32
  import "../session/index.js";
33
+ import { ExtensionHookRunner } from "../extensions/hooks.js";
34
+ import "../extensions/index.js";
28
35
  import { SessionTracker } from "./session/tracker.js";
29
36
  import { ModelManager } from "./models/manager.js";
30
37
  import "./models/index.js";
38
+ import { initializeCommands } from "../chat-commands/index.js";
31
39
  import { HookHandler } from "./lifecycle/hook-handler.js";
32
40
  import { ToolErrorTracker } from "./tools/error-tracker.js";
33
41
  import { RequestLimiter } from "./models/request-limiter.js";
@@ -39,11 +47,6 @@ import { ContextMiddleware } from "./middleware/context.js";
39
47
  import "./middleware/index.js";
40
48
  import { LifecycleManager } from "./lifecycle/manager.js";
41
49
  import "./lifecycle/index.js";
42
- import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
43
- import { persistInboundAttachments } from "../channels/attachments/inbound-persist.js";
44
- import { buildTranscriptUserMessage, hydrateUserTurnForLlm } from "./inbound/attachment-pipeline.js";
45
- import { runXopcEmbeddedTurn } from "./embedded/run-turn.js";
46
- import { runWithEmbeddedExecutionSession } from "./embedded/execution-context.js";
47
50
  import { MessageRouter } from "./messaging/message-router.js";
48
51
  import { CommandHandler } from "./messaging/command-handler.js";
49
52
  import { StreamManager } from "./messaging/stream-manager.js";
@@ -62,10 +65,7 @@ import { AgentOrchestrator } from "./orchestration/agent-orchestrator.js";
62
65
  import { AgentEventHandler } from "./orchestration/agent-event-handler.js";
63
66
  import "./orchestration/index.js";
64
67
  import { getWorkflowProgressBroker } from "./workflow/progress-broker.js";
65
- import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
66
68
  import "./workflow/index.js";
67
- import { normalizeSkillInstallTarget } from "./skills/install-target.js";
68
- import { AgentManager } from "./agent-manager.js";
69
69
  import { TaskJudgeService } from "./tasks/task-judge-service.js";
70
70
  import { analyzeResponseLanguage } from "../i18n/language-consistency.js";
71
71
  import { readFile } from "node:fs/promises";
@@ -2,10 +2,10 @@ import { resolveStateDir } from "../../config/paths-state.js";
2
2
  import { createLogger } from "../../utils/logger/index.js";
3
3
  import { init_logger } from "../../utils/logger.js";
4
4
  import { init_paths, resolveSkillsDir } from "../../config/paths.js";
5
- import { isManagedSkillTransientDirName } from "./managed-store.js";
6
5
  import { createSkillConfigManager } from "./config.js";
7
6
  import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
8
7
  import { resolveAgentsSkillsDir, resolveWorkspaceAgentsSkillsDir } from "./skill-sources.js";
8
+ import { isManagedSkillTransientDirName } from "./managed-store.js";
9
9
  import path from "node:path";
10
10
  import chokidar from "chokidar";
11
11
  //#region src/agent/skills/filesystem-watcher.ts
@@ -1,15 +1,15 @@
1
1
  import { parseFrontmatter } from "../../markdown/frontmatter.js";
2
- import { getSkillsLockEntry, recordSkillsHubInstall } from "./hub-lock.js";
3
- import { installSkillFromZip, isIgnorableZipEntry, isValidSkillId, prepareManagedSkillTempDir, promoteManagedSkillTempDir } from "./managed-store.js";
4
2
  import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
5
3
  import { computeSkillTreeHashSync } from "./hub-hash.js";
4
+ import { getSkillsLockEntry, recordSkillsHubInstall } from "./hub-lock.js";
5
+ import { installSkillFromZip, isIgnorableZipEntry, isValidSkillId, prepareManagedSkillTempDir, promoteManagedSkillTempDir } from "./managed-store.js";
6
6
  import { tmpdir } from "node:os";
7
7
  import { basename, dirname, join, normalize, resolve, sep } from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
9
9
  import { fileURLToPath } from "node:url";
10
10
  import { execFileSync } from "node:child_process";
11
- import AdmZip from "adm-zip";
12
11
  import { fetch } from "undici";
12
+ import AdmZip from "adm-zip";
13
13
  //#region src/agent/skills/hub-pull.ts
14
14
  /**
15
15
  * CLI / hub: install or update skills from git or archive (zip / tar.gz) into ~/.xopc/skills.
@@ -1,6 +1,6 @@
1
- import { downloadSkillZipBuffer, fetchMarketplacePackageDetail, listSkillCategories, listSkillPackages, resolveSkillZipDownloadUrl, resolveSkillsStoreBaseUrl, skillIdForMarketplaceInstall, verifyStoreArtifactSha256 } from "./store-api-client.js";
2
1
  import { registerMarketplaceAdapter } from "../../registry.js";
3
2
  import { buildSkillMarkdownPreviewFromRaw } from "../../../skill-markdown-preview-from-raw.js";
3
+ import { downloadSkillZipBuffer, fetchMarketplacePackageDetail, listSkillCategories, listSkillPackages, resolveSkillZipDownloadUrl, resolveSkillsStoreBaseUrl, skillIdForMarketplaceInstall, verifyStoreArtifactSha256 } from "./store-api-client.js";
4
4
  //#region src/agent/skills/marketplace/adapters/store/adapter.ts
5
5
  const storeMarketplaceAdapter = {
6
6
  id: "store",
@@ -1,6 +1,6 @@
1
1
  import { init_resolution, resolveConnectedPlatformEndpoint } from "../../../../../platform/resolution.js";
2
- import { MAX_EXTENSION_STORE_ZIP_BYTES } from "../../../../../extensions/store-zip-limits.js";
3
2
  import { MAX_SKILL_ZIP_BYTES, isValidSkillId } from "../../../managed-store.js";
3
+ import { MAX_EXTENSION_STORE_ZIP_BYTES } from "../../../../../extensions/store-zip-limits.js";
4
4
  import { createHash } from "node:crypto";
5
5
  //#region src/agent/skills/marketplace/adapters/store/store-api-client.ts
6
6
  /**
@@ -0,0 +1,3 @@
1
+ import type { TaskAggregate } from '../../tasks/task-repository.js';
2
+ import type { AgentSourceContext } from './types.js';
3
+ export declare function buildTaskAgentContext(task: TaskAggregate | undefined, expectedVersion?: string): AgentSourceContext | null;
@@ -0,0 +1,24 @@
1
+ //#region src/agent/source-context/task-context.ts
2
+ function buildTaskAgentContext(task, expectedVersion) {
3
+ if (!task || expectedVersion && expectedVersion !== String(task.version)) return null;
4
+ const text = JSON.stringify({
5
+ title: task.title,
6
+ body: task.body,
7
+ phase: task.phase,
8
+ resolution: task.resolution,
9
+ priority: task.priority,
10
+ dueAt: task.dueAt,
11
+ contract: task.contract
12
+ }, null, 2);
13
+ const limit = 24e3;
14
+ return {
15
+ kind: "task",
16
+ sourceId: task.id,
17
+ version: String(task.version),
18
+ title: task.title,
19
+ text: text.slice(0, limit),
20
+ truncated: text.length > limit
21
+ };
22
+ }
23
+ //#endregion
24
+ export { buildTaskAgentContext };
@@ -6,7 +6,7 @@ export interface SessionSourceBinding {
6
6
  attachedAt: number;
7
7
  }
8
8
  export interface TurnContextRef {
9
- kind: 'note';
9
+ kind: 'note' | 'task';
10
10
  sourceId: string;
11
11
  expectedVersion?: string;
12
12
  }
@@ -22,7 +22,7 @@ export interface SourceContextRefSummary {
22
22
  documentId?: string;
23
23
  }
24
24
  export interface AgentSourceContext {
25
- kind: SessionSourceBinding['kind'] | 'browser_page';
25
+ kind: SessionSourceBinding['kind'] | 'task' | 'browser_page';
26
26
  sourceId: string;
27
27
  version: string;
28
28
  title: string;
@@ -15,7 +15,7 @@ function summarizeSourceContext(context) {
15
15
  function isTurnContextRef(value) {
16
16
  if (!value || typeof value !== "object") return false;
17
17
  const row = value;
18
- return row.kind === "note" && typeof row.sourceId === "string" && row.sourceId.trim().length > 0 && (row.expectedVersion === void 0 || typeof row.expectedVersion === "string");
18
+ return (row.kind === "note" || row.kind === "task") && typeof row.sourceId === "string" && row.sourceId.trim().length > 0 && (row.expectedVersion === void 0 || typeof row.expectedVersion === "string");
19
19
  }
20
20
  function parseTurnContextRefs(value, max = 5) {
21
21
  if (value === void 0) return [];
@@ -6,10 +6,10 @@ import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
6
6
  import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
7
7
  import { completeWithResolvedCredentials } from "../../providers/model-call.js";
8
8
  import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
9
- import { readWorkspaceRevision } from "../coding/workspace-revision.js";
10
9
  import { TaskRepository } from "../../tasks/task-repository.js";
11
- import { TaskApplicationService } from "../../tasks/task-application-service.js";
12
10
  import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
11
+ import { readWorkspaceRevision } from "../coding/workspace-revision.js";
12
+ import { TaskApplicationService } from "../../tasks/task-application-service.js";
13
13
  //#region src/agent/tasks/task-judge-service.ts
14
14
  init_schema();
15
15
  init_providers();
@@ -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.\n\n```json\n{\n \"mode\": \"project | proactive | automation | note | task | task_run | 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## Proactive delegation\n\nUse mode proactive only for explicit user delegation. Inspect list before start; edit existing subscriptions instead of duplicating them.\nFor one email thread, call mail_sources, then follow_up with sourceItemId, instructions and dueAt (ISO timestamp).\nUse update_follow_up with the current expectedRevision to pause, resume, adjust the deadline or end the delegation.\nOn a communication card, continue_card with its id reads current work and binds this conversation to the delegation.\nUse the returned exact connectionId when retrieving or replying to the thread. Review current recipients and the full draft with the user and retain connector confirmation for sending. Never mark sent from an approval alone; require a successful provider receipt. The delegation continues watching synchronized replies until explicitly ended.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\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| 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## 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## Proactive delegated work\n\nUse mode `proactive` for work the user asks the assistant to keep following.\nUse `list` before starting; update existing delegations instead of duplicating them.\n- `start`: {scenarioKey: \"project_delivery_risk\" | \"meeting_preparation\" | \"discussion_follow_up\", projectId?: string, instructions: string}.\n- `update`: {id, expectedRevision, userInstructions?, enabled?, completedAt?}. Read the revision from list. completedAt is an ISO timestamp; ending work also sets enabled false.\n- `check`: {id}, for project checks.\n- `get_card`: {id}, reads the current authorized artifact and action state before discussing it.\nInstructions adjust what to watch; they never grant new action permissions. Distinguish a task being created from its work being completed. Do not claim a draft was sent.\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\nCommands: `list`, `get`, `create`, `update_dependencies`, `add_context`,\n`remove_context`, `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\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### 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## Local apps and settings\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.\n\n```json\n{\n \"mode\": \"project | proactive | automation | note | task | task_run | 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## Proactive delegation\n\nUse mode proactive only for explicit user delegation. Inspect list before start; edit existing subscriptions instead of duplicating them.\nWhen the user adopts a one-off result and repeating it would materially reduce future effort, offer one short natural-language upgrade such as \u201C\u4EE5\u540E\u8FD9\u7C7B\u4F1A\u8BAE\u90FD\u8FD9\u6837\u51C6\u5907\u5417\uFF1F\u201D. Start or update a proactive scene only after the user explicitly accepts. Confirm the moment, scope, promised help, notification timing and action boundary in ordinary language; do not expose scenario keys, schedules or runs.\nFor one email thread, call mail_sources, then follow_up with sourceItemId, instructions and dueAt (ISO timestamp).\nUse update_follow_up with the current expectedRevision to pause, resume, adjust the deadline or end the delegation.\nOn a communication card, continue_card with its id reads current work and binds this conversation to the delegation.\nUse the returned exact connectionId when retrieving or replying to the thread. Review current recipients and the full draft with the user and retain connector confirmation for sending. Never mark sent from an approval alone; require a successful provider receipt. The delegation continues watching synchronized replies until explicitly ended.\n\n## Object routing\n\n| Object | Tool |\n| --- | --- |\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| 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## 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## Proactive delegated work\n\nUse mode `proactive` for work the user asks the assistant to keep following.\nUse `list` before starting; update existing delegations instead of duplicating them.\n- `start`: {scenarioKey: \"project_delivery_risk\" | \"meeting_preparation\" | \"discussion_follow_up\", projectId?: string, instructions: string}.\n- `update`: {id, expectedRevision, userInstructions?, enabled?, completedAt?}. Read the revision from list. completedAt is an ISO timestamp; ending work also sets enabled false.\n- `check`: {id}, for project checks.\n- `get_card`: {id}, reads the current authorized artifact and action state before discussing it.\nInstructions adjust what to watch; they never grant new action permissions. Distinguish a task being created from its work being completed. Do not claim a draft was sent.\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\nCommands: `list`, `get`, `create`, `update_dependencies`, `add_context`,\n`remove_context`, `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\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### 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## Local apps and settings\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";
@@ -21,6 +21,7 @@ complete successfully while the product command returns \`ok: false\`.
21
21
  ## Proactive delegation
22
22
 
23
23
  Use mode proactive only for explicit user delegation. Inspect list before start; edit existing subscriptions instead of duplicating them.
24
+ When the user adopts a one-off result and repeating it would materially reduce future effort, offer one short natural-language upgrade such as “以后这类会议都这样准备吗?”. Start or update a proactive scene only after the user explicitly accepts. Confirm the moment, scope, promised help, notification timing and action boundary in ordinary language; do not expose scenario keys, schedules or runs.
24
25
  For one email thread, call mail_sources, then follow_up with sourceItemId, instructions and dueAt (ISO timestamp).
25
26
  Use update_follow_up with the current expectedRevision to pause, resume, adjust the deadline or end the delegation.
26
27
  On a communication card, continue_card with its id reads current work and binds this conversation to the delegation.
@@ -1,14 +1,14 @@
1
1
  import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
2
- import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
3
- import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
4
- import { resolvePathUnderWorkspace } from "./tool-paths.js";
5
2
  import { assertWorkspaceTreeReadable, checkedFilePath } from "../sandbox/fileAccess.js";
3
+ import { resolvePathUnderWorkspace } from "./tool-paths.js";
4
+ import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
6
5
  import { resolveShareConfig } from "../../share/share-config.js";
7
6
  import { mergeWithDefaults } from "../../share/site-share-config.js";
8
7
  import { getShareStore } from "../../share/share-store.js";
9
8
  import { getSiteShareStore } from "../../share/site-share-store.js";
10
9
  import { resolveShareUrl, resolveSiteShareUrl } from "../../share/share-url.js";
11
10
  import { publishHostedStaticSite } from "../../share/hosted-static-site-publish.js";
11
+ import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
12
12
  import { audienceDefaults, decideShareKind, makeDescription, makeTitle, probeShareTarget, rememberStagedSite, stageSingleHtmlAsSite } from "../../share/share-auto.js";
13
13
  import { scheduleThumbnail } from "../../share/share-thumbnail.js";
14
14
  import { resolveToolLocale, shareToolErrorLine, shareToolSuccessLines } from "../../i18n/share-tool-bundle.js";
@@ -1,10 +1,10 @@
1
- import { runGit } from "../../execution-environments/git.js";
2
- import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
3
- import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
4
1
  import { readWorkspaceRevision } from "../coding/workspace-revision.js";
5
2
  import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
6
3
  import "../external-tools/index.js";
7
4
  import { createDelegateChildHandle } from "../child-agent-factory.js";
5
+ import { runGit } from "../../execution-environments/git.js";
6
+ import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
7
+ import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
8
8
  import { Type } from "@sinclair/typebox";
9
9
  //#region src/agent/tools/delegate-tool.ts
10
10
  const DEFAULT_DELEGATE_TOOLS = [
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
- import { withRetry } from "../../infra/retry.js";
4
3
  import { commandTimeout } from "../commands/command-registry.js";
5
4
  import { DEFAULT_TOOL_EXECUTION_TIMEOUT_MS, TimeoutError, executeWithTimeout } from "../lifecycle/timeout-wrapper.js";
5
+ import { withRetry } from "../../infra/retry.js";
6
6
  import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
7
7
  //#region src/agent/tools/executor.ts
8
8
  init_logger();
@@ -7,24 +7,15 @@ import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
7
7
  import { getSessionTaskPlan, setSessionTaskPlan } from "../../storage/sqlite/session-task-plan-repository.js";
8
8
  import "../../storage/sqlite/index.js";
9
9
  import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
10
- import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
11
- import "../../../packages/browser-control-contract/src/index.js";
12
- import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
13
- import { checkBrowserReadiness } from "../../browser/readiness.js";
14
- import "../../browser/index.js";
15
- import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
16
10
  import { resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
17
- import { createWorkflowCatalog } from "../workflow/catalog.js";
18
- import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
19
- import { skillEnvironmentId } from "../skills/installer.js";
11
+ import "../../../packages/browser-control-contract/src/index.js";
12
+ import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
20
13
  import { wrapToolsWithProtection } from "./executor.js";
21
14
  import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
15
+ import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
22
16
  import { createDefaultExternalToolGatewayTools } from "../external-tools/index.js";
23
- import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
24
- import { getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
25
- import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
26
- import { createDelegateTool } from "./delegate-tool.js";
27
17
  import { createReadFileTool } from "./read.js";
18
+ import { skillEnvironmentId } from "../skills/installer.js";
28
19
  import { createWriteFileTool } from "./write.js";
29
20
  import { createListDirTool } from "./list-dir.js";
30
21
  import { createPublishArtifactsTool } from "./publish-artifacts.js";
@@ -47,6 +38,12 @@ import { createUpdatePlanTool } from "./update-plan-tool.js";
47
38
  import { createSessionStatusTool } from "./session-status-tool.js";
48
39
  import { createMemoryMaintenanceTool } from "./memory-maintenance-tool.js";
49
40
  import { createClarifyTool } from "./clarify-tool.js";
41
+ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
42
+ import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
43
+ import { checkBrowserReadiness } from "../../browser/readiness.js";
44
+ import "../../browser/index.js";
45
+ import { getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
46
+ import { createDelegateTool } from "./delegate-tool.js";
50
47
  import { createWorkflowTool } from "./workflow-tool.js";
51
48
  import { createAutomationTool } from "./automation-tool.js";
52
49
  import { createBrowserAutomationTool } from "./browser-automation-tool.js";
@@ -61,9 +58,12 @@ import { createManagedJobTool } from "./managed-job-tool.js";
61
58
  import { createImageTool } from "./image-tool.js";
62
59
  import { createImageGenerateTool } from "./image-generate-tool.js";
63
60
  import "./index.js";
61
+ import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
64
62
  import { createBrowserUseTool } from "./browser/tool/browser-use-tool.js";
65
63
  import { createReviewWorkspaceTool } from "./review-workspace.js";
66
64
  import { createLanguageDiagnosticsTool } from "./language-diagnostics.js";
65
+ import { createWorkflowCatalog } from "../workflow/catalog.js";
66
+ import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
67
67
  import { createTextToSpeechTool } from "./tts-tool.js";
68
68
  import { getAgentCapabilityToolNames } from "../capabilities/registry.js";
69
69
  import "../capabilities/index.js";
@@ -1,12 +1,12 @@
1
1
  import { getAgentDefaultImageGenerationModelConfig, init_schema } from "../../config/schema.js";
2
+ import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
2
3
  import { imageAssetFromDataUrl, imageFileExtensionForMimeType, mimeTypeFromFileName, parseImageDataUrl, sniffImageMimeType } from "../image/generation/image-assets.js";
3
- import { getImageGenerationProvider } from "../image/generation/provider-registry.js";
4
+ import { persistToolMedia } from "./tool-media.js";
4
5
  import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
5
6
  import "../../capabilities/readiness/index.js";
6
7
  import { applyImageGenerationModelConfigDefaults } from "../image/image-helpers.js";
7
- import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
8
- import { persistToolMedia } from "./tool-media.js";
9
8
  import { isFailoverError } from "../failover-error.js";
9
+ import { getImageGenerationProvider } from "../image/generation/provider-registry.js";
10
10
  import { generateImage, listImageGenerationProvidersSummary } from "../image/generation/runtime.js";
11
11
  import path from "node:path";
12
12
  import { randomBytes } from "node:crypto";
@@ -1,10 +1,5 @@
1
- import { assertBrowserUrlAllowed } from "../../browser/url-policy.js";
2
- import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
3
- import "../../browser/index.js";
4
1
  import { DEFAULT_TOOL_METADATA, getToolMetadata } from "./metadata.js";
5
2
  import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
6
- import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
7
- import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, createDelegateTool } from "./delegate-tool.js";
8
3
  import { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, GREP_MAX_LINE_LENGTH, formatSize, truncateHead, truncateLine, truncateTail } from "./truncate.js";
9
4
  import { createReadFileTool } from "./read.js";
10
5
  import { createWriteFileTool, writeFileTool } from "./write.js";
@@ -30,6 +25,11 @@ import { createUpdatePlanTool } from "./update-plan-tool.js";
30
25
  import { createSessionStatusTool } from "./session-status-tool.js";
31
26
  import { createMemoryMaintenanceTool } from "./memory-maintenance-tool.js";
32
27
  import { createClarifyTool } from "./clarify-tool.js";
28
+ import { assertBrowserUrlAllowed } from "../../browser/url-policy.js";
29
+ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
30
+ import "../../browser/index.js";
31
+ import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
32
+ import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, createDelegateTool } from "./delegate-tool.js";
33
33
  import { createWorkflowTool } from "./workflow-tool.js";
34
34
  import { createAutomationTool } from "./automation-tool.js";
35
35
  import { createBrowserAutomationTool } from "./browser-automation-tool.js";
@@ -1,5 +1,5 @@
1
- import { resolvePathUnderWorkspace } from "./tool-paths.js";
2
1
  import { checkedFilePath } from "../sandbox/fileAccess.js";
2
+ import { resolvePathUnderWorkspace } from "./tool-paths.js";
3
3
  import { readdir } from "fs/promises";
4
4
  import { Type } from "@sinclair/typebox";
5
5
  //#region src/agent/tools/list-dir.ts
@@ -1,8 +1,8 @@
1
1
  import { turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
2
- import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
3
- import { resolvePathUnderWorkspace } from "./tool-paths.js";
4
2
  import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
5
3
  import { readWorkspaceFile } from "../sandbox/fileAccess.js";
4
+ import { resolvePathUnderWorkspace } from "./tool-paths.js";
5
+ import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
6
6
  import { persistToolMedia } from "./tool-media.js";
7
7
  import { basename, isAbsolute, relative, sep } from "node:path";
8
8
  import { realpath } from "node:fs/promises";
@@ -1,7 +1,7 @@
1
- import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
2
1
  import { checkedFilePath, readWorkspaceFile } from "../sandbox/fileAccess.js";
3
2
  import { checkFileSafety } from "../prompt/safety.js";
4
3
  import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
4
+ import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
5
5
  import { stat } from "fs/promises";
6
6
  import { Type } from "@sinclair/typebox";
7
7
  //#region src/agent/tools/read.ts
@@ -1,5 +1,5 @@
1
- import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
2
1
  import { readWorkspaceRevision } from "../coding/workspace-revision.js";
2
+ import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
3
3
  import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
4
4
  import { checkedFilePath, readWorkspaceFile } from "../sandbox/fileAccess.js";
5
5
  import { resolve } from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
2
- import { resolvePathUnderWorkspace } from "./tool-paths.js";
3
- import { MEDIA_MAX_BYTES } from "../../media/store.js";
4
2
  import { readWorkspaceFile } from "../sandbox/fileAccess.js";
5
3
  import { checkFileSafety } from "../prompt/safety.js";
4
+ import { resolvePathUnderWorkspace } from "./tool-paths.js";
5
+ import { MEDIA_MAX_BYTES } from "../../media/store.js";
6
6
  import { persistToolMedia } from "./tool-media.js";
7
7
  import { basename } from "node:path";
8
8
  import { Type } from "@sinclair/typebox";
@@ -1,7 +1,7 @@
1
1
  import { resolveStateDir } from "../../config/paths-state.js";
2
2
  import { init_paths } from "../../config/paths.js";
3
- import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
4
3
  import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
4
+ import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
5
5
  import { resolveSkillReadablePath } from "../skills/skill-view-path.js";
6
6
  import { readFileSync, statSync } from "fs";
7
7
  import { Type } from "@sinclair/typebox";
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
+ import { speak } from "../../voice/tts/speak-core.js";
3
4
  import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
4
5
  import { getChannelOutputFormat } from "../../voice/tts/service.js";
5
- import { speak } from "../../voice/tts/speak-core.js";
6
6
  import { compressAudio } from "../../voice/tts/audio.js";
7
7
  import { persistOutboundTtsAudio } from "../../channels/attachments/outbound-tts-persist.js";
8
8
  import { Type } from "@sinclair/typebox";
@@ -1,7 +1,7 @@
1
+ import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
1
2
  import { getAssertionSlot, getUserAssertion, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
2
3
  import { isWorkingAssumption } from "../../user-model/usage-policy.js";
3
4
  import "../../user-model/index.js";
4
- import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
5
5
  import { Type } from "@sinclair/typebox";
6
6
  //#region src/agent/tools/user-context-tool.ts
7
7
  const SearchSchema = Type.Object({
@@ -1,8 +1,8 @@
1
1
  import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
2
- import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
3
- import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
4
2
  import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
5
3
  import { checkFileSafety } from "../prompt/safety.js";
4
+ import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
5
+ import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
6
6
  import { basename, relative, sep } from "path";
7
7
  import { realpath } from "fs/promises";
8
8
  import { Type } from "@sinclair/typebox";
@@ -11,16 +11,16 @@ import "../../activity/index.js";
11
11
  import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
12
12
  import { CreateAutomationSchema, UpdateAutomationSchema } from "../../automations/domain/validation.js";
13
13
  import "../../automations/index.js";
14
+ import { TaskRepository } from "../../tasks/task-repository.js";
15
+ import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
14
16
  import { isValidProjectAgentId, normalizeProjectAgentId, resolveProjectAgentId } from "../../projects/project-agent.js";
15
17
  import "../../projects/index.js";
18
+ import { updateControlledSubscription } from "../../proactive/scenarios/control.js";
19
+ import { continueMailFollowUp, mailFollowUpSources, startMailFollowUp, updateMailFollowUp } from "../../proactive/follow-ups.js";
16
20
  import { TaskContextRepository } from "../../tasks/task-context-repository.js";
17
- import { TaskRepository } from "../../tasks/task-repository.js";
18
- import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
19
21
  import { TaskDependencyError, TaskDependencyService } from "../../tasks/task-dependency-service.js";
20
22
  import { TaskApplicationService } from "../../tasks/task-application-service.js";
21
- import { updateControlledSubscription } from "../../proactive/scenarios/control.js";
22
23
  import { getCard } from "../../proactive/inbox/cards.js";
23
- import { continueMailFollowUp, mailFollowUpSources, startMailFollowUp, updateMailFollowUp } from "../../proactive/follow-ups.js";
24
24
  import { checkDelegation, delegationOverview, startDelegation } from "../../proactive/experience.js";
25
25
  import { defineTaskContract } from "../../tasks/task-contract-definition.js";
26
26
  import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
@@ -1,9 +1,9 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
3
  import { createSqliteTranscriptRuntime } from "../embedded/transcript-runtime.js";
4
- import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
5
4
  import { createDelegateChildHandle } from "../child-agent-factory.js";
6
5
  import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS } from "../tools/delegate-tool.js";
6
+ import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
7
7
  //#region src/agent/workflow/subagent-runner.ts
8
8
  init_logger();
9
9
  const log = createLogger("Agent:WorkflowSubagent");
@@ -1,5 +1,5 @@
1
- import { installConnectorDefinition } from "../connectors/install.js";
2
1
  import { downloadConnectorStoreZipBuffer, fetchStoreConnectorPackageDetail, listConnectorPackages, resolveSkillsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
2
+ import { installConnectorDefinition } from "../connectors/install.js";
3
3
  import { createHash } from "node:crypto";
4
4
  import { isIP } from "node:net";
5
5
  import AdmZip from "adm-zip";
@@ -1,9 +1,9 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
- import { isSTTAvailable } from "../../voice/stt/availability.js";
3
+ import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
4
4
  import { transcribe } from "../../voice/stt/transcribe-core.js";
5
+ import { isSTTAvailable } from "../../voice/stt/availability.js";
5
6
  import "../../voice/stt/index.js";
6
- import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
7
7
  //#region src/channels/attachments/voice-stt-webchat.ts
8
8
  init_logger();
9
9
  const STT_MAX_BYTES = 25 * 1024 * 1024;