@xopcai/xopc 0.0.115 → 0.0.116

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 (487) hide show
  1. package/README.md +5 -4
  2. package/README.zh-CN.md +5 -4
  3. package/dist/browser-ext/manifest.json +1 -1
  4. package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
  5. package/dist/extensions/feishu/src/workflow-progress.js +1 -1
  6. package/dist/extensions/telegram/src/adapters/streaming-adapter.js +1 -1
  7. package/dist/extensions/telegram/src/inbound-processor.js +1 -1
  8. package/dist/extensions/telegram/src/plugin.js +1 -1
  9. package/dist/extensions/telegram/src/routing-integration.js +2 -2
  10. package/dist/extensions/telegram/src/update-offset-store.js +1 -1
  11. package/dist/extensions/telegram/src/workflow-progress.js +1 -1
  12. package/dist/extensions/telegram/xopc.extension.json +1 -1
  13. package/dist/extensions/weixin/src/api/api.js +2 -2
  14. package/dist/extensions/weixin/src/auth/accounts.js +1 -1
  15. package/dist/extensions/weixin/src/cdn/upload.js +1 -1
  16. package/dist/extensions/weixin/src/media/data-url.js +1 -1
  17. package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
  18. package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
  19. package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
  20. package/dist/extensions/weixin/src/plugin.js +1 -1
  21. package/dist/extensions/weixin/src/storage/sync-buf.js +1 -1
  22. package/dist/extensions/weixin/src/workflow-progress.js +1 -1
  23. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DVnBfANm.js → agent-avatar-dicebear-CWM1UU5P.js} +1 -1
  24. package/dist/gateway/static/root/assets/agent-browser-settings-page-D1SyFYeh.js +6 -0
  25. package/dist/gateway/static/root/assets/agent-defaults-tabbed-page-C9YxgvuI.js +1 -0
  26. package/dist/gateway/static/root/assets/agents-CteVs3UO.js +71 -0
  27. package/dist/gateway/static/root/assets/app-management-settings-panel-yXSXY_bu.js +1 -0
  28. package/dist/gateway/static/root/assets/{appearance-settings-BQpPSTHD.js → appearance-settings-DjY1P_ug.js} +1 -1
  29. package/dist/gateway/static/root/assets/apps-page-CVQ1M8Ax.js +1 -0
  30. package/dist/gateway/static/root/assets/{archive-plugin-CXu-Csep.js → archive-plugin-CytE5j-e.js} +1 -1
  31. package/dist/gateway/static/root/assets/{attachment-load-BAjgOoGY.js → attachment-load-BvvrN6rF.js} +1 -1
  32. package/dist/gateway/static/root/assets/{binary-plugins-BSBgB2hO.js → binary-plugins-IBWSitnj.js} +1 -1
  33. package/dist/gateway/static/root/assets/{block-editor-BpXw9TTR.js → block-editor-C-wDpsf-.js} +3 -3
  34. package/dist/gateway/static/root/assets/{channels-settings-BbPUpzWB.js → channels-settings-Cd3JbeQ1.js} +1 -1
  35. package/dist/gateway/static/root/assets/{config-api-NOoPiIYz.js → config-api-C4RAtTKW.js} +1 -1
  36. package/dist/gateway/static/root/assets/connectors-page-MsMa5qBr.js +2 -0
  37. package/dist/gateway/static/root/assets/{cron-api-C9BOqAXd.js → cron-api-sJNMqB6P.js} +1 -1
  38. package/dist/gateway/static/root/assets/cron-page-D30CSwkn.js +3 -0
  39. package/dist/gateway/static/root/assets/dreaming-settings-6fCUWRQf.js +1 -0
  40. package/dist/gateway/static/root/assets/{extension-debug-page-D9kgUHCc.js → extension-debug-page-BAIyjDlq.js} +1 -1
  41. package/dist/gateway/static/root/assets/{extension-page-CGyhXqzR.js → extension-page-DEhv2GpC.js} +1 -1
  42. package/dist/gateway/static/root/assets/{extension-settings-page-DL8Xquqd.js → extension-settings-page-DOuAxTDW.js} +1 -1
  43. package/dist/gateway/static/root/assets/{fetch-D0VXA932.js → fetch-CTsREQIe.js} +1 -1
  44. package/dist/gateway/static/root/assets/{format-interval-label-Be8SmgUw.js → format-interval-label-D35Bfhtx.js} +1 -1
  45. package/dist/gateway/static/root/assets/{gateway-config-api-C-xjn__h.js → gateway-config-api-C6989a-W.js} +1 -1
  46. package/dist/gateway/static/root/assets/gateway-settings-BpF26t91.js +1 -0
  47. package/dist/gateway/static/root/assets/{gateway-startup-retry-DERUH61L.js → gateway-startup-retry-C1KAHrd2.js} +1 -1
  48. package/dist/gateway/static/root/assets/goal-detail-page-DOjhmRyf.js +1 -0
  49. package/dist/gateway/static/root/assets/{goals-config-api-BPmqWk90.js → goals-config-api-KnLGpu6h.js} +1 -1
  50. package/dist/gateway/static/root/assets/goals-page-Xl9_wrFc.js +2 -0
  51. package/dist/gateway/static/root/assets/goals-settings-DtPtqZi8.js +1 -0
  52. package/dist/gateway/static/root/assets/{heartbeat-config-api-Bfdzr8oV.js → heartbeat-config-api-uKw1f0IG.js} +1 -1
  53. package/dist/gateway/static/root/assets/heartbeat-settings-DN9vEj9P.js +1 -0
  54. package/dist/gateway/static/root/assets/index-C8ytlAF2.js +122 -0
  55. package/dist/gateway/static/root/assets/index-CVpJW2NS.css +1 -0
  56. package/dist/gateway/static/root/assets/{interval-presets-utKbuCRY.js → interval-presets-Dq0FXJ65.js} +1 -1
  57. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CjqS6c6V.js → keyboard-shortcuts-settings-C9_t4m7t.js} +1 -1
  58. package/dist/gateway/static/root/assets/logs-page-SNkWzidV.js +2 -0
  59. package/dist/gateway/static/root/assets/{markdown-split-DW8C47iB.js → markdown-split-Ca87W8-h.js} +1 -1
  60. package/dist/gateway/static/root/assets/{media-plugins-D6HwDhDT.js → media-plugins-BAcUjPRJ.js} +1 -1
  61. package/dist/gateway/static/root/assets/messages-BqzIDrlr.js +3 -0
  62. package/dist/gateway/static/root/assets/models-hub-panel-BO4o-GmO.js +2 -0
  63. package/dist/gateway/static/root/assets/note-detail-page-DLV_XDmT.js +2 -0
  64. package/dist/gateway/static/root/assets/{note-image-lightbox-pJM35Pz5.js → note-image-lightbox-hnSX5SSn.js} +1 -1
  65. package/dist/gateway/static/root/assets/notes-page-ycsDlkFA.js +1 -0
  66. package/dist/gateway/static/root/assets/{preview-open-alternatives-CVwHuyN6.js → preview-open-alternatives-CNgM20H5.js} +1 -1
  67. package/dist/gateway/static/root/assets/remote-access-hub-DQpnE8K9.js +1 -0
  68. package/dist/gateway/static/root/assets/{save-bar-controls-Ba-UEk7x.js → save-bar-controls-CcdjGcfT.js} +1 -1
  69. package/dist/gateway/static/root/assets/{schedule-field-CNN9595U.js → schedule-field-CYr39z76.js} +1 -1
  70. package/dist/gateway/static/root/assets/{schema-form-DnNMmtD5.js → schema-form-BRAJgZQ2.js} +1 -1
  71. package/dist/gateway/static/root/assets/sessions-page-BZui7iAY.js +1 -0
  72. package/dist/gateway/static/root/assets/settings-advanced-gate-DEfzZ1ax.js +1 -0
  73. package/dist/gateway/static/root/assets/{settings-collapsible-section-CmOz80i5.js → settings-collapsible-section-BhzjeGWi.js} +1 -1
  74. package/dist/gateway/static/root/assets/{settings-form-section-BmK7JJOV.js → settings-form-section-Cz3Pcr9b.js} +1 -1
  75. package/dist/gateway/static/root/assets/settings-page-CLuSsu1-.js +1 -0
  76. package/dist/gateway/static/root/assets/setup-status-panel-Cq4qpXLi.js +1 -0
  77. package/dist/gateway/static/root/assets/{share-preview-page-Dp2qGrHC.js → share-preview-page-DL4y9K5e.js} +1 -1
  78. package/dist/gateway/static/root/assets/shares-settings-B9F3HyYQ.js +1 -0
  79. package/dist/gateway/static/root/assets/skill-reload-api-Bp9UPPwm.js +1 -0
  80. package/dist/gateway/static/root/assets/skills-page-BIoBsfSV.js +2 -0
  81. package/dist/gateway/static/root/assets/system-settings-panel-FD2jxRZ3.js +1 -0
  82. package/dist/gateway/static/root/assets/use-agent-defaults-form-Cz2_pPzu.js +1 -0
  83. package/dist/gateway/static/root/assets/{use-channel-catalog-CHlO8J9G.js → use-channel-catalog-BInPrfR5.js} +1 -1
  84. package/dist/gateway/static/root/assets/{use-settings-tab-guard-CW5JORnl.js → use-settings-tab-guard-nuHMmZQv.js} +1 -1
  85. package/dist/gateway/static/root/assets/voice-api-key-field-BUIrKb8s.js +1 -0
  86. package/dist/gateway/static/root/assets/{voice-player-store-DDDWYHvg.js → voice-player-store-1U3vFppm.js} +1 -1
  87. package/dist/gateway/static/root/assets/workflows-page-qE3SexnO.js +18 -0
  88. package/dist/gateway/static/root/index.html +5 -5
  89. package/dist/package.js +1 -1
  90. package/dist/src/agent/agent-manager.js +6 -6
  91. package/dist/src/agent/agent-scope.js +1 -1
  92. package/dist/src/agent/bootstrap/load-bootstrap-files.js +1 -1
  93. package/dist/src/agent/bootstrap/project-agents-context.js +1 -1
  94. package/dist/src/agent/context/workspace-seed.js +2 -2
  95. package/dist/src/agent/context/workspace-state.js +1 -1
  96. package/dist/src/agent/context/workspace.js +1 -1
  97. package/dist/src/agent/goals/checklist-judge.d.ts +1 -0
  98. package/dist/src/agent/goals/checklist-judge.js +1 -1
  99. package/dist/src/agent/goals/checklist-judge.js.map +1 -1
  100. package/dist/src/agent/goals/evaluate-turn.d.ts +1 -0
  101. package/dist/src/agent/goals/evaluate-turn.js +1 -0
  102. package/dist/src/agent/goals/evaluate-turn.js.map +1 -1
  103. package/dist/src/agent/goals/goal-locale.js +2 -2
  104. package/dist/src/agent/goals/post-turn.js +11 -4
  105. package/dist/src/agent/goals/post-turn.js.map +1 -1
  106. package/dist/src/agent/image/load-image-media.js +2 -2
  107. package/dist/src/agent/image/understanding/pi-ai-provider.js +5 -2
  108. package/dist/src/agent/image/understanding/pi-ai-provider.js.map +1 -1
  109. package/dist/src/agent/image/understanding/provider-registry.d.ts +1 -0
  110. package/dist/src/agent/image/understanding/provider-registry.js +16 -2
  111. package/dist/src/agent/image/understanding/provider-registry.js.map +1 -1
  112. package/dist/src/agent/ipc/inbox.js +3 -3
  113. package/dist/src/agent/ipc/socket.js +1 -1
  114. package/dist/src/agent/mcp/bundle-mcp-materialize.js +1 -1
  115. package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
  116. package/dist/src/agent/mcp/mcp-transport-config.js +1 -1
  117. package/dist/src/agent/mcp/mcp-transport.js +1 -1
  118. package/dist/src/agent/memory/builtin-memory-store.js +1 -1
  119. package/dist/src/agent/memory/dreaming/deep-promotion.js +1 -1
  120. package/dist/src/agent/memory/dreaming/events.js +1 -1
  121. package/dist/src/agent/memory/dreaming/last-run.js +1 -1
  122. package/dist/src/agent/memory/dreaming/light-sweep.js +1 -1
  123. package/dist/src/agent/memory/dreaming/preview.js +1 -1
  124. package/dist/src/agent/memory/dreaming/rem-patterns.js +1 -1
  125. package/dist/src/agent/memory/dreaming/short-term-store.js +1 -1
  126. package/dist/src/agent/memory/dreaming/utils.js +1 -1
  127. package/dist/src/agent/memory/memory-flush.js +1 -1
  128. package/dist/src/agent/memory/plugin-discovery.js +1 -1
  129. package/dist/src/agent/models/manager.js +1 -1
  130. package/dist/src/agent/prompt/memory/index.js +1 -1
  131. package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
  132. package/dist/src/agent/reply/post-compaction-context.js +1 -1
  133. package/dist/src/agent/reply/workspace-boundary-read.js +1 -1
  134. package/dist/src/agent/sandbox/path-policy.js +2 -2
  135. package/dist/src/agent/service.js +4 -4
  136. package/dist/src/agent/session/session-inspector.js +1 -1
  137. package/dist/src/agent/skills/config.js +2 -2
  138. package/dist/src/agent/skills/filesystem-watcher.js +1 -1
  139. package/dist/src/agent/skills/hub-hash.js +2 -2
  140. package/dist/src/agent/skills/hub-lock.js +1 -1
  141. package/dist/src/agent/skills/hub-pull.js +2 -2
  142. package/dist/src/agent/skills/index.js +2 -2
  143. package/dist/src/agent/skills/installer.js +2 -2
  144. package/dist/src/agent/skills/managed-store.js +1 -1
  145. package/dist/src/agent/skills/skill-manage-ops.js +1 -1
  146. package/dist/src/agent/skills/skill-manager.js +1 -1
  147. package/dist/src/agent/skills/skill-view-path.js +1 -1
  148. package/dist/src/agent/skills/test-framework.js +1 -1
  149. package/dist/src/agent/starter-agents.js +1 -1
  150. package/dist/src/agent/tools/composio-tool.d.ts +8 -0
  151. package/dist/src/agent/tools/composio-tool.js +46 -0
  152. package/dist/src/agent/tools/composio-tool.js.map +1 -0
  153. package/dist/src/agent/tools/dreaming-tool.js +1 -1
  154. package/dist/src/agent/tools/factory.js +13 -8
  155. package/dist/src/agent/tools/factory.js.map +1 -1
  156. package/dist/src/agent/tools/find.js +1 -1
  157. package/dist/src/agent/tools/grep.js +1 -1
  158. package/dist/src/agent/tools/image-generate-tool.js +1 -1
  159. package/dist/src/agent/tools/index.d.ts +1 -0
  160. package/dist/src/agent/tools/index.js +2 -1
  161. package/dist/src/agent/tools/skill-manage-tool.js +1 -1
  162. package/dist/src/agent/tools/workflow-tool.js +1 -1
  163. package/dist/src/agent/workflow/builtins/audit-repo.d.ts +1 -1
  164. package/dist/src/agent/workflow/builtins/audit-repo.js +15 -2
  165. package/dist/src/agent/workflow/builtins/audit-repo.js.map +1 -1
  166. package/dist/src/agent/workflow/builtins/client-proposal.d.ts +1 -1
  167. package/dist/src/agent/workflow/builtins/client-proposal.js +10 -1
  168. package/dist/src/agent/workflow/builtins/client-proposal.js.map +1 -1
  169. package/dist/src/agent/workflow/builtins/competitor-scan.d.ts +1 -1
  170. package/dist/src/agent/workflow/builtins/competitor-scan.js +16 -2
  171. package/dist/src/agent/workflow/builtins/competitor-scan.js.map +1 -1
  172. package/dist/src/agent/workflow/builtins/content-draft.d.ts +1 -1
  173. package/dist/src/agent/workflow/builtins/content-draft.js +15 -2
  174. package/dist/src/agent/workflow/builtins/content-draft.js.map +1 -1
  175. package/dist/src/agent/workflow/builtins/content-repurpose.d.ts +1 -1
  176. package/dist/src/agent/workflow/builtins/content-repurpose.js +10 -1
  177. package/dist/src/agent/workflow/builtins/content-repurpose.js.map +1 -1
  178. package/dist/src/agent/workflow/builtins/debug-incident.d.ts +1 -1
  179. package/dist/src/agent/workflow/builtins/debug-incident.js +9 -1
  180. package/dist/src/agent/workflow/builtins/debug-incident.js.map +1 -1
  181. package/dist/src/agent/workflow/builtins/decision-compare.d.ts +1 -1
  182. package/dist/src/agent/workflow/builtins/decision-compare.js +16 -2
  183. package/dist/src/agent/workflow/builtins/decision-compare.js.map +1 -1
  184. package/dist/src/agent/workflow/builtins/implementation-plan.d.ts +1 -1
  185. package/dist/src/agent/workflow/builtins/implementation-plan.js +11 -1
  186. package/dist/src/agent/workflow/builtins/implementation-plan.js.map +1 -1
  187. package/dist/src/agent/workflow/builtins/inbox-triage.d.ts +1 -1
  188. package/dist/src/agent/workflow/builtins/inbox-triage.js +11 -1
  189. package/dist/src/agent/workflow/builtins/inbox-triage.js.map +1 -1
  190. package/dist/src/agent/workflow/builtins/meeting-prep.d.ts +1 -1
  191. package/dist/src/agent/workflow/builtins/meeting-prep.js +9 -1
  192. package/dist/src/agent/workflow/builtins/meeting-prep.js.map +1 -1
  193. package/dist/src/agent/workflow/builtins/multi-perspective-review.d.ts +1 -1
  194. package/dist/src/agent/workflow/builtins/multi-perspective-review.js +9 -1
  195. package/dist/src/agent/workflow/builtins/multi-perspective-review.js.map +1 -1
  196. package/dist/src/agent/workflow/builtins/offer-design.d.ts +1 -1
  197. package/dist/src/agent/workflow/builtins/offer-design.js +10 -1
  198. package/dist/src/agent/workflow/builtins/offer-design.js.map +1 -1
  199. package/dist/src/agent/workflow/builtins/pr-review.d.ts +1 -1
  200. package/dist/src/agent/workflow/builtins/pr-review.js +9 -1
  201. package/dist/src/agent/workflow/builtins/pr-review.js.map +1 -1
  202. package/dist/src/agent/workflow/builtins/release-check.d.ts +1 -1
  203. package/dist/src/agent/workflow/builtins/release-check.js +10 -1
  204. package/dist/src/agent/workflow/builtins/release-check.js.map +1 -1
  205. package/dist/src/agent/workflow/builtins/research.d.ts +1 -1
  206. package/dist/src/agent/workflow/builtins/research.js +16 -2
  207. package/dist/src/agent/workflow/builtins/research.js.map +1 -1
  208. package/dist/src/agent/workflow/builtins/weekly-review.d.ts +1 -1
  209. package/dist/src/agent/workflow/builtins/weekly-review.js +9 -1
  210. package/dist/src/agent/workflow/builtins/weekly-review.js.map +1 -1
  211. package/dist/src/agent/workflow/catalog.js +1 -1
  212. package/dist/src/ai-assist/text-assist.js +1 -1
  213. package/dist/src/auth/credentials.js +2 -2
  214. package/dist/src/auth/profiles/store.js +2 -2
  215. package/dist/src/auth/sync-provider-auth.js +1 -1
  216. package/dist/src/browser/cache-dir-policy.js +1 -1
  217. package/dist/src/browser/cdp-local-launcher.js +2 -2
  218. package/dist/src/browser/pipeline/source.js +1 -1
  219. package/dist/src/browser/providers/browser-ext-install.js +4 -4
  220. package/dist/src/browser/providers/cloakbrowser.js +5 -5
  221. package/dist/src/browser/providers/playwright-doctor.js +1 -1
  222. package/dist/src/browser/stealth.js +1 -1
  223. package/dist/src/channels/catalog/channel-catalog-service.js +1 -1
  224. package/dist/src/channels/outbound/persist-store.js +1 -1
  225. package/dist/src/channels/pairing/allow-from-file.js +1 -1
  226. package/dist/src/channels/pairing/pairing-store.js +2 -2
  227. package/dist/src/chat-commands/agent-edit.js +2 -2
  228. package/dist/src/chat-commands/builtins/config.js +2 -2
  229. package/dist/src/cli/commands/config.js +1 -1
  230. package/dist/src/cli/commands/doctor/checks/config-health.js +1 -1
  231. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  232. package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
  233. package/dist/src/cli/commands/doctor/checks/state-integrity.js +1 -1
  234. package/dist/src/cli/commands/doctor/checks/workspace-status.js +1 -1
  235. package/dist/src/cli/commands/extension-create.js +1 -1
  236. package/dist/src/cli/commands/extension-dev.js +2 -2
  237. package/dist/src/cli/commands/extension-marketplace.js +2 -2
  238. package/dist/src/cli/commands/extension-pack.js +2 -2
  239. package/dist/src/cli/commands/extension.js +3 -3
  240. package/dist/src/cli/commands/gateway/logs.js +1 -1
  241. package/dist/src/cli/commands/image.js +1 -1
  242. package/dist/src/cli/commands/init.js +2 -2
  243. package/dist/src/cli/commands/models.js +1 -1
  244. package/dist/src/cli/commands/skills-test.js +1 -1
  245. package/dist/src/cli/templates.js +1 -1
  246. package/dist/src/cli/utils/gateway-client.js +1 -1
  247. package/dist/src/cli/utils/init-workspace-core.js +2 -2
  248. package/dist/src/config/agent-profile.js +1 -1
  249. package/dist/src/config/agent-typed-models.js +1 -1
  250. package/dist/src/config/gateway-bind.js +1 -1
  251. package/dist/src/config/index.js +8 -8
  252. package/dist/src/config/loader.js +4 -4
  253. package/dist/src/config/models-json.js +2 -2
  254. package/dist/src/config/paths-state.js +1 -1
  255. package/dist/src/config/paths.js +1 -1
  256. package/dist/src/config/profile.js +1 -1
  257. package/dist/src/config/reload.js +1 -1
  258. package/dist/src/config/schema.d.ts +7 -0
  259. package/dist/src/config/schema.js +5 -3
  260. package/dist/src/config/schema.js.map +1 -1
  261. package/dist/src/config/workspace-path.js +1 -1
  262. package/dist/src/connectors/composio-triggers.d.ts +10 -0
  263. package/dist/src/connectors/composio-triggers.js +32 -0
  264. package/dist/src/connectors/composio-triggers.js.map +1 -0
  265. package/dist/src/connectors/composio.d.ts +54 -0
  266. package/dist/src/connectors/composio.js +334 -0
  267. package/dist/src/connectors/composio.js.map +1 -0
  268. package/dist/src/connectors/health.js +16 -1
  269. package/dist/src/connectors/health.js.map +1 -1
  270. package/dist/src/connectors/install.d.ts +2 -1
  271. package/dist/src/connectors/install.js +50 -13
  272. package/dist/src/connectors/install.js.map +1 -1
  273. package/dist/src/connectors/instances.js +57 -6
  274. package/dist/src/connectors/instances.js.map +1 -1
  275. package/dist/src/connectors/lifecycle.d.ts +3 -0
  276. package/dist/src/connectors/lifecycle.js +23 -0
  277. package/dist/src/connectors/lifecycle.js.map +1 -0
  278. package/dist/src/connectors/materialize.js +2 -1
  279. package/dist/src/connectors/materialize.js.map +1 -1
  280. package/dist/src/connectors/providers.d.ts +1 -0
  281. package/dist/src/connectors/providers.js +10 -2
  282. package/dist/src/connectors/providers.js.map +1 -1
  283. package/dist/src/connectors/registries/modelscope.d.ts +2 -0
  284. package/dist/src/connectors/registries/modelscope.js +205 -0
  285. package/dist/src/connectors/registries/modelscope.js.map +1 -0
  286. package/dist/src/connectors/registries/official-mcp.d.ts +2 -0
  287. package/dist/src/connectors/registries/official-mcp.js +142 -0
  288. package/dist/src/connectors/registries/official-mcp.js.map +1 -0
  289. package/dist/src/connectors/registries/search.d.ts +12 -0
  290. package/dist/src/connectors/registries/search.js +89 -0
  291. package/dist/src/connectors/registries/search.js.map +1 -0
  292. package/dist/src/connectors/registries/smithery.d.ts +2 -0
  293. package/dist/src/connectors/registries/smithery.js +98 -0
  294. package/dist/src/connectors/registries/smithery.js.map +1 -0
  295. package/dist/src/connectors/registries/types.d.ts +20 -0
  296. package/dist/src/connectors/registries/types.js +1 -0
  297. package/dist/src/connectors/secret-store.js +4 -2
  298. package/dist/src/connectors/secret-store.js.map +1 -1
  299. package/dist/src/connectors/setup-secrets.d.ts +15 -0
  300. package/dist/src/connectors/setup-secrets.js +64 -0
  301. package/dist/src/connectors/setup-secrets.js.map +1 -0
  302. package/dist/src/connectors/supervisor.d.ts +15 -0
  303. package/dist/src/connectors/supervisor.js +73 -0
  304. package/dist/src/connectors/supervisor.js.map +1 -0
  305. package/dist/src/connectors/types.d.ts +27 -3
  306. package/dist/src/connectors/usage.js +6 -1
  307. package/dist/src/connectors/usage.js.map +1 -1
  308. package/dist/src/cron/executor.js +1 -1
  309. package/dist/src/cron/service.js +1 -1
  310. package/dist/src/daemon/constants.js +1 -1
  311. package/dist/src/daemon/install-plan.js +2 -2
  312. package/dist/src/daemon/launchd.js +2 -2
  313. package/dist/src/daemon/schtasks.js +2 -2
  314. package/dist/src/daemon/systemd.js +2 -2
  315. package/dist/src/extensions/bundle-mcp.js +1 -1
  316. package/dist/src/extensions/discover-extensions.js +2 -2
  317. package/dist/src/extensions/health.js +1 -1
  318. package/dist/src/extensions/install.js +2 -2
  319. package/dist/src/extensions/loader.js +2 -2
  320. package/dist/src/extensions/lockfile.js +3 -3
  321. package/dist/src/extensions/security.js +1 -1
  322. package/dist/src/extensions/update.js +2 -2
  323. package/dist/src/gateway/agents-admin.js +2 -2
  324. package/dist/src/gateway/file-path-classifier.js +2 -2
  325. package/dist/src/gateway/hono/lib/config-payload.js +1 -1
  326. package/dist/src/gateway/hono/lib/extension-store.js +2 -2
  327. package/dist/src/gateway/hono/lib/static-ui.js +2 -2
  328. package/dist/src/gateway/hono/routes/agents.js +1 -1
  329. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  330. package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
  331. package/dist/src/gateway/hono/routes/connectors.js +230 -3
  332. package/dist/src/gateway/hono/routes/connectors.js.map +1 -1
  333. package/dist/src/gateway/hono/routes/dreaming.js +1 -1
  334. package/dist/src/gateway/hono/routes/goals.js +52 -5
  335. package/dist/src/gateway/hono/routes/goals.js.map +1 -1
  336. package/dist/src/gateway/hono/routes/host-fs.js +2 -2
  337. package/dist/src/gateway/hono/routes/models.js +1 -1
  338. package/dist/src/gateway/hono/routes/shares.js +1 -1
  339. package/dist/src/gateway/hono/routes/voice.js +14 -1
  340. package/dist/src/gateway/hono/routes/voice.js.map +1 -1
  341. package/dist/src/gateway/hono/routes/workflows.js +1 -1
  342. package/dist/src/gateway/hono/routes/workspace.js +2 -2
  343. package/dist/src/gateway/hono/sse.js.map +1 -1
  344. package/dist/src/gateway/lock.js +3 -3
  345. package/dist/src/gateway/ports.js +1 -1
  346. package/dist/src/gateway/service/agent-runner.d.ts +5 -12
  347. package/dist/src/gateway/service/agent-runner.js +8 -8
  348. package/dist/src/gateway/service/agent-runner.js.map +1 -1
  349. package/dist/src/gateway/service/config-coordinator.js +1 -1
  350. package/dist/src/gateway/service/marketplace-service.js +2 -2
  351. package/dist/src/gateway/service/run-gateway-agent.d.ts +2 -10
  352. package/dist/src/gateway/service/run-gateway-agent.js.map +1 -1
  353. package/dist/src/gateway/service.d.ts +1 -1
  354. package/dist/src/gateway/service.js +13 -8
  355. package/dist/src/gateway/service.js.map +1 -1
  356. package/dist/src/gateway/user-turn-input.d.ts +18 -0
  357. package/dist/src/gateway/user-turn-input.js +16 -0
  358. package/dist/src/gateway/user-turn-input.js.map +1 -0
  359. package/dist/src/gateway/workspace-fs-file-list.js +1 -1
  360. package/dist/src/goals/goal-queue-store.d.ts +2 -1
  361. package/dist/src/goals/goal-queue-store.js +2 -2
  362. package/dist/src/goals/goal-queue-store.js.map +1 -1
  363. package/dist/src/goals/goal-queue-types.d.ts +4 -3
  364. package/dist/src/goals/goal-runner.js +25 -3
  365. package/dist/src/goals/goal-runner.js.map +1 -1
  366. package/dist/src/goals/goal-service.d.ts +6 -1
  367. package/dist/src/goals/goal-service.js +9 -2
  368. package/dist/src/goals/goal-service.js.map +1 -1
  369. package/dist/src/goals/goal-store.d.ts +7 -1
  370. package/dist/src/goals/goal-store.js +42 -0
  371. package/dist/src/goals/goal-store.js.map +1 -1
  372. package/dist/src/goals/goal-workflow-judge.js +2 -2
  373. package/dist/src/goals/types.d.ts +10 -0
  374. package/dist/src/i18n/goals-bundle.js +1 -1
  375. package/dist/src/i18n/index.js +1 -1
  376. package/dist/src/i18n/share-tool-bundle.js +2 -2
  377. package/dist/src/infra/brew.js +1 -1
  378. package/dist/src/infra/package-json.js +1 -1
  379. package/dist/src/infra/package-update-steps.js +1 -1
  380. package/dist/src/infra/path-env.js +2 -2
  381. package/dist/src/infra/restart.js +1 -1
  382. package/dist/src/infra/stable-node-path.js +1 -1
  383. package/dist/src/infra/update-check.js +1 -1
  384. package/dist/src/infra/update-global.js +1 -1
  385. package/dist/src/infra/update-lock.js +2 -2
  386. package/dist/src/infra/update-restart.js +1 -1
  387. package/dist/src/infra/update-runner.js +1 -1
  388. package/dist/src/infra/update-startup.js +1 -1
  389. package/dist/src/infra/write-file-atomic.js +2 -2
  390. package/dist/src/media/store.js +1 -1
  391. package/dist/src/notes/agent-context.js +1 -1
  392. package/dist/src/notes/service.js +1 -1
  393. package/dist/src/notes/store.js +2 -2
  394. package/dist/src/project-trust/trust-store.js +2 -2
  395. package/dist/src/providers/auth-runtime/auth-profile-store.js +1 -1
  396. package/dist/src/providers/index.js +1 -1
  397. package/dist/src/providers/model-registry.js +4 -4
  398. package/dist/src/session/init-session-turn.js +1 -1
  399. package/dist/src/session/resolve-session.js +1 -1
  400. package/dist/src/session/session-title.js +2 -2
  401. package/dist/src/session/store.js +1 -1
  402. package/dist/src/share/share-auto.js +2 -2
  403. package/dist/src/share/share-store.js +3 -3
  404. package/dist/src/share/share-thumbnail.js +2 -2
  405. package/dist/src/share/share-zip.js +1 -1
  406. package/dist/src/share/site-share-store.js +3 -3
  407. package/dist/src/share/site-static-serve.js +1 -1
  408. package/dist/src/storage/sqlite/connection.js +1 -1
  409. package/dist/src/storage/sqlite/memory-index-repository.js +2 -2
  410. package/dist/src/storage/sqlite/migrations/011_goal_context_messages.sql +8 -0
  411. package/dist/src/storage/sqlite/migrations/discover.js +1 -1
  412. package/dist/src/storage/sqlite/migrations/runner.d.ts +2 -2
  413. package/dist/src/storage/sqlite/migrations/runner.js +5 -5
  414. package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
  415. package/dist/src/storage/sqlite/migrations/runner.ts +2 -2
  416. package/dist/src/storage/sqlite/schema.js +4 -4
  417. package/dist/src/storage/sqlite/schema.sql +9 -0
  418. package/dist/src/tui/backends/embedded-backend.js +1 -1
  419. package/dist/src/tui/clipboard-image.js +3 -3
  420. package/dist/src/tui/extension-host/load-extensions.js +1 -1
  421. package/dist/src/tui/theme-manager.js +1 -1
  422. package/dist/src/tui/tui-command-formatters.js +4 -4
  423. package/dist/src/tui/tui-commands.js +2 -2
  424. package/dist/src/tui/tui-keybindings-file.js +1 -1
  425. package/dist/src/tui/tui-scoped-models.js +2 -2
  426. package/dist/src/tui/tui-settings.js +1 -1
  427. package/dist/src/tui/tui-startup-resources.js +1 -1
  428. package/dist/src/tui/tui.js +6 -6
  429. package/dist/src/tunnel/frpc-binary.js +4 -4
  430. package/dist/src/tunnel/frpc-config.js +1 -1
  431. package/dist/src/tunnel/frpc-extract.js +1 -1
  432. package/dist/src/tunnel/tunnel-state.js +1 -1
  433. package/dist/src/utils/logger/audit.js +1 -1
  434. package/dist/src/utils/logger/log-store.js +1 -1
  435. package/dist/src/utils/logger/rotation.js +1 -1
  436. package/dist/src/utils/logger/streams.js +1 -1
  437. package/dist/src/voice/tts/audio.js +1 -1
  438. package/dist/src/voice/tts/openai-compatible-speech.d.ts +1 -1
  439. package/dist/src/voice/tts/openai-compatible-speech.js.map +1 -1
  440. package/dist/src/voice/tts/providers/edge-speech.js +15 -3
  441. package/dist/src/voice/tts/providers/edge-speech.js.map +1 -1
  442. package/dist/src/voice/tts/speak-core.js +3 -3
  443. package/dist/src/voice/tts/speak-core.js.map +1 -1
  444. package/dist/src/voice/tts/speech-provider-types.d.ts +2 -2
  445. package/dist/src/voice/tts/types.js +1 -1
  446. package/dist/src/voice/tts/types.js.map +1 -1
  447. package/dist/src/workflows/domain/result.d.ts +0 -1
  448. package/dist/src/workflows/draft/workflow-draft-service.js +1 -1
  449. package/dist/src/workflows/engine/workflow-engine.js +7 -23
  450. package/dist/src/workflows/engine/workflow-engine.js.map +1 -1
  451. package/dist/src/workflows/service/workflow-run-service.js +1 -1
  452. package/dist/src/workflows/store/event-store.js +1 -1
  453. package/dist/src/workflows/store/run-store.js +1 -1
  454. package/package.json +2 -2
  455. package/dist/gateway/static/root/assets/agent-browser-settings-page-DPXc4hz8.js +0 -6
  456. package/dist/gateway/static/root/assets/agent-defaults-tabbed-page-CTJ0YnRQ.js +0 -1
  457. package/dist/gateway/static/root/assets/agents-zJXQfJ_W.js +0 -71
  458. package/dist/gateway/static/root/assets/app-management-settings-panel-DzGbdr04.js +0 -1
  459. package/dist/gateway/static/root/assets/apps-page-CPjfyzSD.js +0 -1
  460. package/dist/gateway/static/root/assets/connectors-settings-CAXYMOdp.js +0 -2
  461. package/dist/gateway/static/root/assets/cron-page-DuUbBeKI.js +0 -3
  462. package/dist/gateway/static/root/assets/dreaming-settings-DQ4DtiK1.js +0 -1
  463. package/dist/gateway/static/root/assets/gateway-settings-BMPwIjKI.js +0 -1
  464. package/dist/gateway/static/root/assets/goal-detail-page-BJsyjJnF.js +0 -1
  465. package/dist/gateway/static/root/assets/goals-page-BerDgIhw.js +0 -2
  466. package/dist/gateway/static/root/assets/goals-settings-ByTjeAto.js +0 -1
  467. package/dist/gateway/static/root/assets/heartbeat-settings-TbHgcjTn.js +0 -1
  468. package/dist/gateway/static/root/assets/index-AkTrf6Pb.js +0 -122
  469. package/dist/gateway/static/root/assets/index-fh5sXTj9.css +0 -1
  470. package/dist/gateway/static/root/assets/logs-page-DGXuPf5B.js +0 -2
  471. package/dist/gateway/static/root/assets/messages-upgxw6Ub.js +0 -3
  472. package/dist/gateway/static/root/assets/models-hub-panel-Bot16nn7.js +0 -2
  473. package/dist/gateway/static/root/assets/note-detail-page-Brlyou8M.js +0 -2
  474. package/dist/gateway/static/root/assets/notes-page-DvZ4pwc-.js +0 -1
  475. package/dist/gateway/static/root/assets/remote-access-hub-BZEDmxbZ.js +0 -1
  476. package/dist/gateway/static/root/assets/sessions-page-DdGGlsfn.js +0 -1
  477. package/dist/gateway/static/root/assets/settings-advanced-gate-DlkEkPf9.js +0 -1
  478. package/dist/gateway/static/root/assets/settings-page-DFPTrsPF.js +0 -1
  479. package/dist/gateway/static/root/assets/setup-status-panel-CYCCfgh4.js +0 -1
  480. package/dist/gateway/static/root/assets/shares-settings-Bff1pGd0.js +0 -1
  481. package/dist/gateway/static/root/assets/skill-reload-api-CJGKpBur.js +0 -1
  482. package/dist/gateway/static/root/assets/skills-page-C6ocduTD.js +0 -2
  483. package/dist/gateway/static/root/assets/system-settings-panel-5jrIEr5b.js +0 -1
  484. package/dist/gateway/static/root/assets/use-agent-defaults-form-BuiXLIs5.js +0 -1
  485. package/dist/gateway/static/root/assets/voice-api-key-field-DDoQyghO.js +0 -1
  486. package/dist/gateway/static/root/assets/workflow-page.utils-CKjeEGqx.js +0 -1
  487. package/dist/gateway/static/root/assets/workflows-page-B604ehHG.js +0 -18
@@ -8,4 +8,4 @@
8
8
  * - target: release candidate, branch, commit range, or feature summary
9
9
  * - checks: optional subset of check keys
10
10
  */
11
- export declare const RELEASE_CHECK_SCRIPT = "export const meta = {\n name: 'release_check',\n description: 'Assess whether a change is ready to release with parallel risk checks and a go/no-go verdict.',\n whenToUse: 'User is near the end of implementation and wants a release-quality readiness check before shipping.',\n examplePrompts: [\n { field: 'target', text: 'Is this repo ready to release v1.2?' },\n { field: 'target', text: 'Pre-release readiness check for the current branch' },\n ],\n i18n: {\n zh: {\n description: '\u5E76\u884C\u68C0\u67E5\u53D1\u5E03\u98CE\u9669\uFF0C\u5224\u65AD\u53D8\u66F4\u662F\u5426\u8FBE\u5230\u53EF\u53D1\u5E03\u6807\u51C6\u3002',\n whenToUse: '\u7528\u6237\u63A5\u8FD1\u5F00\u53D1\u5C3E\u58F0\uFF0C\u60F3\u5728\u53D1\u5E03\u524D\u505A\u53D1\u5E03\u8D28\u91CF/\u5C31\u7EEA\u68C0\u67E5\u65F6\u3002',\n examplePrompts: [\n { field: 'target', text: '\u8FD9\u4E2A\u4ED3\u5E93\u662F\u5426\u51C6\u5907\u597D\u53D1\u5E03 v1.2\uFF1F' },\n { field: 'target', text: '\u5BF9\u5F53\u524D\u5206\u652F\u505A\u53D1\u5E03\u524D\u5C31\u7EEA\u68C0\u67E5' },\n ],\n },\n },\n tags: ['release', 'quality', 'validation'],\n estimatedAgents: { min: 6, max: 7 },\n phases: [\n { title: 'Scope' },\n { title: 'Checks' },\n { title: 'Verdict' },\n ],\n}\n\nconst READ_ONLY_TOOLS = ['read_file', 'grep', 'find', 'list_dir', 'shell']\n\nconst target = args && typeof args === 'object' && args.target\n ? String(args.target)\n : 'Current working tree or release candidate from the conversation context.'\n\nconst ALL_CHECKS = [\n { key: 'regression', focus: 'Behavior changes, compatibility breaks, edge cases, and accidental scope creep.' },\n { key: 'tests', focus: 'Relevant automated tests, missing regression cases, flaky or weak assertions, and manual coverage gaps.' },\n { key: 'build', focus: 'Typecheck, lint, build, packaging, lazy imports, generated assets, and dependency correctness.' },\n { key: 'security', focus: 'Secrets, auth/authz, input validation, unsafe shell/file/network access, and data exposure.' },\n { key: 'ops', focus: 'Logging, observability, migrations, persistence, rollback, failure modes, and supportability.' },\n]\n\nlet checks = ALL_CHECKS\nif (args && typeof args === 'object' && Array.isArray(args.checks) && args.checks.length) {\n const selected = new Set(args.checks.map((check) => String(check)))\n checks = ALL_CHECKS.filter((check) => selected.has(check.key))\n if (!checks.length) checks = ALL_CHECKS\n}\n\nphase('Scope')\nconst scope = await agent(\n 'Identify the release candidate scope. Inspect the working tree or target if useful. Return changed areas, user-visible behavior, and likely blast radius.\\n\\n' +\n 'TARGET:\\n' + target,\n {\n label: 'release scope',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n changedAreas: { type: 'array', items: { type: 'string' } },\n userVisibleChanges: { type: 'array', items: { type: 'string' } },\n blastRadius: { type: 'string' },\n },\n required: ['changedAreas', 'blastRadius'],\n },\n },\n)\n\nphase('Checks')\nconst reports = await parallel(\n checks.map((check) => () =>\n agent(\n 'Run a release-readiness check through the ' + check.key + ' lens.\\n' +\n 'Focus: ' + check.focus + '\\n\\n' +\n 'TARGET:\\n' + target + '\\n\\n' +\n 'SCOPE:\\n' + JSON.stringify(scope, null, 2) + '\\n\\n' +\n 'Return blockers, warnings, evidence, and concrete fixes. Prefer specific files/commands over generic statements.',\n {\n label: check.key + ' check',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n blockers: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence', 'fix'],\n },\n },\n warnings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence'],\n },\n },\n recommendedCommands: { type: 'array', items: { type: 'string' } },\n },\n required: ['blockers', 'warnings'],\n },\n },\n ),\n ),\n)\n\nphase('Verdict')\nconst byCheck = {}\nfor (let i = 0; i < checks.length; i++) {\n byCheck[checks[i].key] = reports[i] ?? { blockers: [], warnings: [], recommendedCommands: [] }\n}\n\nconst verdict = await agent(\n 'Synthesize a release go/no-go verdict. Block if any credible blocker remains. If not blocked, distinguish ship_now from ship_after_checks. ' +\n 'Deduplicate issues and produce the shortest checklist that would make this release safe.\\n\\n' +\n JSON.stringify({ target, scope, byCheck }, null, 2),\n {\n label: 'release verdict',\n schema: {\n type: 'object',\n properties: {\n recommendation: { type: 'string', enum: ['ship_now', 'ship_after_checks', 'block'] },\n summary: { type: 'string' },\n blockers: { type: 'array', items: { type: 'string' } },\n finalChecklist: { type: 'array', items: { type: 'string' } },\n commandsToRun: { type: 'array', items: { type: 'string' } },\n },\n required: ['recommendation', 'summary', 'blockers', 'finalChecklist'],\n },\n },\n)\n\nreturn {\n ok: true,\n target,\n checks: checks.map((check) => check.key),\n scope,\n ...(verdict ?? { recommendation: 'ship_after_checks', summary: 'verdict failed', blockers: [], finalChecklist: [] }),\n byCheck,\n}\n";
11
+ export declare const RELEASE_CHECK_SCRIPT = "export const meta = {\n name: 'release_check',\n description: 'Assess whether a change is ready to release with parallel risk checks and a go/no-go verdict.',\n whenToUse: 'User is near the end of implementation and wants a release-quality readiness check before shipping.',\n examplePrompts: [\n { field: 'target', text: 'Is this repo ready to release v1.2?' },\n { field: 'target', text: 'Pre-release readiness check for the current branch' },\n ],\n i18n: {\n zh: {\n description: '\u5E76\u884C\u68C0\u67E5\u53D1\u5E03\u98CE\u9669\uFF0C\u5224\u65AD\u53D8\u66F4\u662F\u5426\u8FBE\u5230\u53EF\u53D1\u5E03\u6807\u51C6\u3002',\n whenToUse: '\u7528\u6237\u63A5\u8FD1\u5F00\u53D1\u5C3E\u58F0\uFF0C\u60F3\u5728\u53D1\u5E03\u524D\u505A\u53D1\u5E03\u8D28\u91CF/\u5C31\u7EEA\u68C0\u67E5\u65F6\u3002',\n examplePrompts: [\n { field: 'target', text: '\u8FD9\u4E2A\u4ED3\u5E93\u662F\u5426\u51C6\u5907\u597D\u53D1\u5E03 v1.2\uFF1F' },\n { field: 'target', text: '\u5BF9\u5F53\u524D\u5206\u652F\u505A\u53D1\u5E03\u524D\u5C31\u7EEA\u68C0\u67E5' },\n ],\n },\n },\n tags: ['release', 'quality', 'validation'],\n estimatedAgents: { min: 6, max: 7 },\n phases: [\n { title: 'Scope' },\n { title: 'Checks' },\n { title: 'Verdict' },\n ],\n}\n\nconst READ_ONLY_TOOLS = ['read_file', 'grep', 'find', 'list_dir', 'shell']\n\nconst target = args && typeof args === 'object' && args.target\n ? String(args.target)\n : 'Current working tree or release candidate from the conversation context.'\n\nconst ALL_CHECKS = [\n { key: 'regression', focus: 'Behavior changes, compatibility breaks, edge cases, and accidental scope creep.' },\n { key: 'tests', focus: 'Relevant automated tests, missing regression cases, flaky or weak assertions, and manual coverage gaps.' },\n { key: 'build', focus: 'Typecheck, lint, build, packaging, lazy imports, generated assets, and dependency correctness.' },\n { key: 'security', focus: 'Secrets, auth/authz, input validation, unsafe shell/file/network access, and data exposure.' },\n { key: 'ops', focus: 'Logging, observability, migrations, persistence, rollback, failure modes, and supportability.' },\n]\n\nlet checks = ALL_CHECKS\nif (args && typeof args === 'object' && Array.isArray(args.checks) && args.checks.length) {\n const selected = new Set(args.checks.map((check) => String(check)))\n checks = ALL_CHECKS.filter((check) => selected.has(check.key))\n if (!checks.length) checks = ALL_CHECKS\n}\n\nphase('Scope')\nconst scope = await agent(\n 'Identify the release candidate scope. Inspect the working tree or target if useful. Return changed areas, user-visible behavior, and likely blast radius.\\n\\n' +\n 'TARGET:\\n' + target,\n {\n label: 'release scope',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n changedAreas: { type: 'array', items: { type: 'string' } },\n userVisibleChanges: { type: 'array', items: { type: 'string' } },\n blastRadius: { type: 'string' },\n },\n required: ['changedAreas', 'blastRadius'],\n },\n },\n)\n\nphase('Checks')\nconst reports = await parallel(\n checks.map((check) => () =>\n agent(\n 'Run a release-readiness check through the ' + check.key + ' lens.\\n' +\n 'Focus: ' + check.focus + '\\n\\n' +\n 'TARGET:\\n' + target + '\\n\\n' +\n 'SCOPE:\\n' + JSON.stringify(scope, null, 2) + '\\n\\n' +\n 'Return blockers, warnings, evidence, and concrete fixes. Prefer specific files/commands over generic statements.',\n {\n label: check.key + ' check',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n blockers: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence', 'fix'],\n },\n },\n warnings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence'],\n },\n },\n recommendedCommands: { type: 'array', items: { type: 'string' } },\n },\n required: ['blockers', 'warnings'],\n },\n },\n ),\n ),\n)\n\nphase('Verdict')\nconst byCheck = {}\nfor (let i = 0; i < checks.length; i++) {\n byCheck[checks[i].key] = reports[i] ?? { blockers: [], warnings: [], recommendedCommands: [] }\n}\n\nconst verdict = await agent(\n 'Synthesize a release go/no-go verdict. Block if any credible blocker remains. If not blocked, distinguish ship_now from ship_after_checks. ' +\n 'Deduplicate issues and produce the shortest checklist that would make this release safe.\\n\\n' +\n JSON.stringify({ target, scope, byCheck }, null, 2),\n {\n label: 'release verdict',\n schema: {\n type: 'object',\n properties: {\n recommendation: { type: 'string', enum: ['ship_now', 'ship_after_checks', 'block'] },\n summary: { type: 'string' },\n blockers: { type: 'array', items: { type: 'string' } },\n finalChecklist: { type: 'array', items: { type: 'string' } },\n commandsToRun: { type: 'array', items: { type: 'string' } },\n },\n required: ['recommendation', 'summary', 'blockers', 'finalChecklist'],\n },\n },\n)\n\nconst output = {\n ok: true,\n target,\n checks: checks.map((check) => check.key),\n scope,\n ...(verdict ?? { recommendation: 'ship_after_checks', summary: 'verdict failed', blockers: [], finalChecklist: [] }),\n byCheck,\n}\nreturn {\n summary: output.summary,\n sections: [\n { kind: 'risks', title: 'Blockers', items: output.blockers.map((title) => ({ title, severity: 'high' })) },\n { kind: 'questions', title: 'Final checklist', items: output.finalChecklist },\n { kind: 'questions', title: 'Commands to run', items: output.commandsToRun ?? [] },\n ],\n structuredOutput: output,\n}\n";
@@ -150,7 +150,7 @@ const verdict = await agent(
150
150
  },
151
151
  )
152
152
 
153
- return {
153
+ const output = {
154
154
  ok: true,
155
155
  target,
156
156
  checks: checks.map((check) => check.key),
@@ -158,6 +158,15 @@ return {
158
158
  ...(verdict ?? { recommendation: 'ship_after_checks', summary: 'verdict failed', blockers: [], finalChecklist: [] }),
159
159
  byCheck,
160
160
  }
161
+ return {
162
+ summary: output.summary,
163
+ sections: [
164
+ { kind: 'risks', title: 'Blockers', items: output.blockers.map((title) => ({ title, severity: 'high' })) },
165
+ { kind: 'questions', title: 'Final checklist', items: output.finalChecklist },
166
+ { kind: 'questions', title: 'Commands to run', items: output.commandsToRun ?? [] },
167
+ ],
168
+ structuredOutput: output,
169
+ }
161
170
  `;
162
171
  //#endregion
163
172
  export { RELEASE_CHECK_SCRIPT };
@@ -1 +1 @@
1
- {"version":3,"file":"release-check.js","names":[],"sources":["../../../../../src/agent/workflow/builtins/release-check.ts"],"sourcesContent":["/**\n * Built-in workflow: `release_check`\n *\n * Runs a release-readiness review for a finished change. It inspects the diff,\n * validates risk areas in parallel, and produces a go/no-go checklist.\n *\n * Args:\n * - target: release candidate, branch, commit range, or feature summary\n * - checks: optional subset of check keys\n */\n\nexport const RELEASE_CHECK_SCRIPT = `export const meta = {\n name: 'release_check',\n description: 'Assess whether a change is ready to release with parallel risk checks and a go/no-go verdict.',\n whenToUse: 'User is near the end of implementation and wants a release-quality readiness check before shipping.',\n examplePrompts: [\n { field: 'target', text: 'Is this repo ready to release v1.2?' },\n { field: 'target', text: 'Pre-release readiness check for the current branch' },\n ],\n i18n: {\n zh: {\n description: '并行检查发布风险,判断变更是否达到可发布标准。',\n whenToUse: '用户接近开发尾声,想在发布前做发布质量/就绪检查时。',\n examplePrompts: [\n { field: 'target', text: '这个仓库是否准备好发布 v1.2?' },\n { field: 'target', text: '对当前分支做发布前就绪检查' },\n ],\n },\n },\n tags: ['release', 'quality', 'validation'],\n estimatedAgents: { min: 6, max: 7 },\n phases: [\n { title: 'Scope' },\n { title: 'Checks' },\n { title: 'Verdict' },\n ],\n}\n\nconst READ_ONLY_TOOLS = ['read_file', 'grep', 'find', 'list_dir', 'shell']\n\nconst target = args && typeof args === 'object' && args.target\n ? String(args.target)\n : 'Current working tree or release candidate from the conversation context.'\n\nconst ALL_CHECKS = [\n { key: 'regression', focus: 'Behavior changes, compatibility breaks, edge cases, and accidental scope creep.' },\n { key: 'tests', focus: 'Relevant automated tests, missing regression cases, flaky or weak assertions, and manual coverage gaps.' },\n { key: 'build', focus: 'Typecheck, lint, build, packaging, lazy imports, generated assets, and dependency correctness.' },\n { key: 'security', focus: 'Secrets, auth/authz, input validation, unsafe shell/file/network access, and data exposure.' },\n { key: 'ops', focus: 'Logging, observability, migrations, persistence, rollback, failure modes, and supportability.' },\n]\n\nlet checks = ALL_CHECKS\nif (args && typeof args === 'object' && Array.isArray(args.checks) && args.checks.length) {\n const selected = new Set(args.checks.map((check) => String(check)))\n checks = ALL_CHECKS.filter((check) => selected.has(check.key))\n if (!checks.length) checks = ALL_CHECKS\n}\n\nphase('Scope')\nconst scope = await agent(\n 'Identify the release candidate scope. Inspect the working tree or target if useful. Return changed areas, user-visible behavior, and likely blast radius.\\\\n\\\\n' +\n 'TARGET:\\\\n' + target,\n {\n label: 'release scope',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n changedAreas: { type: 'array', items: { type: 'string' } },\n userVisibleChanges: { type: 'array', items: { type: 'string' } },\n blastRadius: { type: 'string' },\n },\n required: ['changedAreas', 'blastRadius'],\n },\n },\n)\n\nphase('Checks')\nconst reports = await parallel(\n checks.map((check) => () =>\n agent(\n 'Run a release-readiness check through the ' + check.key + ' lens.\\\\n' +\n 'Focus: ' + check.focus + '\\\\n\\\\n' +\n 'TARGET:\\\\n' + target + '\\\\n\\\\n' +\n 'SCOPE:\\\\n' + JSON.stringify(scope, null, 2) + '\\\\n\\\\n' +\n 'Return blockers, warnings, evidence, and concrete fixes. Prefer specific files/commands over generic statements.',\n {\n label: check.key + ' check',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n blockers: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence', 'fix'],\n },\n },\n warnings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence'],\n },\n },\n recommendedCommands: { type: 'array', items: { type: 'string' } },\n },\n required: ['blockers', 'warnings'],\n },\n },\n ),\n ),\n)\n\nphase('Verdict')\nconst byCheck = {}\nfor (let i = 0; i < checks.length; i++) {\n byCheck[checks[i].key] = reports[i] ?? { blockers: [], warnings: [], recommendedCommands: [] }\n}\n\nconst verdict = await agent(\n 'Synthesize a release go/no-go verdict. Block if any credible blocker remains. If not blocked, distinguish ship_now from ship_after_checks. ' +\n 'Deduplicate issues and produce the shortest checklist that would make this release safe.\\\\n\\\\n' +\n JSON.stringify({ target, scope, byCheck }, null, 2),\n {\n label: 'release verdict',\n schema: {\n type: 'object',\n properties: {\n recommendation: { type: 'string', enum: ['ship_now', 'ship_after_checks', 'block'] },\n summary: { type: 'string' },\n blockers: { type: 'array', items: { type: 'string' } },\n finalChecklist: { type: 'array', items: { type: 'string' } },\n commandsToRun: { type: 'array', items: { type: 'string' } },\n },\n required: ['recommendation', 'summary', 'blockers', 'finalChecklist'],\n },\n },\n)\n\nreturn {\n ok: true,\n target,\n checks: checks.map((check) => check.key),\n scope,\n ...(verdict ?? { recommendation: 'ship_after_checks', summary: 'verdict failed', blockers: [], finalChecklist: [] }),\n byCheck,\n}\n`\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,uBAAuB"}
1
+ {"version":3,"file":"release-check.js","names":[],"sources":["../../../../../src/agent/workflow/builtins/release-check.ts"],"sourcesContent":["/**\n * Built-in workflow: `release_check`\n *\n * Runs a release-readiness review for a finished change. It inspects the diff,\n * validates risk areas in parallel, and produces a go/no-go checklist.\n *\n * Args:\n * - target: release candidate, branch, commit range, or feature summary\n * - checks: optional subset of check keys\n */\n\nexport const RELEASE_CHECK_SCRIPT = `export const meta = {\n name: 'release_check',\n description: 'Assess whether a change is ready to release with parallel risk checks and a go/no-go verdict.',\n whenToUse: 'User is near the end of implementation and wants a release-quality readiness check before shipping.',\n examplePrompts: [\n { field: 'target', text: 'Is this repo ready to release v1.2?' },\n { field: 'target', text: 'Pre-release readiness check for the current branch' },\n ],\n i18n: {\n zh: {\n description: '并行检查发布风险,判断变更是否达到可发布标准。',\n whenToUse: '用户接近开发尾声,想在发布前做发布质量/就绪检查时。',\n examplePrompts: [\n { field: 'target', text: '这个仓库是否准备好发布 v1.2?' },\n { field: 'target', text: '对当前分支做发布前就绪检查' },\n ],\n },\n },\n tags: ['release', 'quality', 'validation'],\n estimatedAgents: { min: 6, max: 7 },\n phases: [\n { title: 'Scope' },\n { title: 'Checks' },\n { title: 'Verdict' },\n ],\n}\n\nconst READ_ONLY_TOOLS = ['read_file', 'grep', 'find', 'list_dir', 'shell']\n\nconst target = args && typeof args === 'object' && args.target\n ? String(args.target)\n : 'Current working tree or release candidate from the conversation context.'\n\nconst ALL_CHECKS = [\n { key: 'regression', focus: 'Behavior changes, compatibility breaks, edge cases, and accidental scope creep.' },\n { key: 'tests', focus: 'Relevant automated tests, missing regression cases, flaky or weak assertions, and manual coverage gaps.' },\n { key: 'build', focus: 'Typecheck, lint, build, packaging, lazy imports, generated assets, and dependency correctness.' },\n { key: 'security', focus: 'Secrets, auth/authz, input validation, unsafe shell/file/network access, and data exposure.' },\n { key: 'ops', focus: 'Logging, observability, migrations, persistence, rollback, failure modes, and supportability.' },\n]\n\nlet checks = ALL_CHECKS\nif (args && typeof args === 'object' && Array.isArray(args.checks) && args.checks.length) {\n const selected = new Set(args.checks.map((check) => String(check)))\n checks = ALL_CHECKS.filter((check) => selected.has(check.key))\n if (!checks.length) checks = ALL_CHECKS\n}\n\nphase('Scope')\nconst scope = await agent(\n 'Identify the release candidate scope. Inspect the working tree or target if useful. Return changed areas, user-visible behavior, and likely blast radius.\\\\n\\\\n' +\n 'TARGET:\\\\n' + target,\n {\n label: 'release scope',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n changedAreas: { type: 'array', items: { type: 'string' } },\n userVisibleChanges: { type: 'array', items: { type: 'string' } },\n blastRadius: { type: 'string' },\n },\n required: ['changedAreas', 'blastRadius'],\n },\n },\n)\n\nphase('Checks')\nconst reports = await parallel(\n checks.map((check) => () =>\n agent(\n 'Run a release-readiness check through the ' + check.key + ' lens.\\\\n' +\n 'Focus: ' + check.focus + '\\\\n\\\\n' +\n 'TARGET:\\\\n' + target + '\\\\n\\\\n' +\n 'SCOPE:\\\\n' + JSON.stringify(scope, null, 2) + '\\\\n\\\\n' +\n 'Return blockers, warnings, evidence, and concrete fixes. Prefer specific files/commands over generic statements.',\n {\n label: check.key + ' check',\n toolset: READ_ONLY_TOOLS,\n schema: {\n type: 'object',\n properties: {\n blockers: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence', 'fix'],\n },\n },\n warnings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n evidence: { type: 'string' },\n fix: { type: 'string' },\n },\n required: ['title', 'evidence'],\n },\n },\n recommendedCommands: { type: 'array', items: { type: 'string' } },\n },\n required: ['blockers', 'warnings'],\n },\n },\n ),\n ),\n)\n\nphase('Verdict')\nconst byCheck = {}\nfor (let i = 0; i < checks.length; i++) {\n byCheck[checks[i].key] = reports[i] ?? { blockers: [], warnings: [], recommendedCommands: [] }\n}\n\nconst verdict = await agent(\n 'Synthesize a release go/no-go verdict. Block if any credible blocker remains. If not blocked, distinguish ship_now from ship_after_checks. ' +\n 'Deduplicate issues and produce the shortest checklist that would make this release safe.\\\\n\\\\n' +\n JSON.stringify({ target, scope, byCheck }, null, 2),\n {\n label: 'release verdict',\n schema: {\n type: 'object',\n properties: {\n recommendation: { type: 'string', enum: ['ship_now', 'ship_after_checks', 'block'] },\n summary: { type: 'string' },\n blockers: { type: 'array', items: { type: 'string' } },\n finalChecklist: { type: 'array', items: { type: 'string' } },\n commandsToRun: { type: 'array', items: { type: 'string' } },\n },\n required: ['recommendation', 'summary', 'blockers', 'finalChecklist'],\n },\n },\n)\n\nconst output = {\n ok: true,\n target,\n checks: checks.map((check) => check.key),\n scope,\n ...(verdict ?? { recommendation: 'ship_after_checks', summary: 'verdict failed', blockers: [], finalChecklist: [] }),\n byCheck,\n}\nreturn {\n summary: output.summary,\n sections: [\n { kind: 'risks', title: 'Blockers', items: output.blockers.map((title) => ({ title, severity: 'high' })) },\n { kind: 'questions', title: 'Final checklist', items: output.finalChecklist },\n { kind: 'questions', title: 'Commands to run', items: output.commandsToRun ?? [] },\n ],\n structuredOutput: output,\n}\n`\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,uBAAuB"}
@@ -10,4 +10,4 @@
10
10
  * - question: research question
11
11
  * - depth: 'quick' (2 angles) | 'standard' (4) | 'deep' (6)
12
12
  */
13
- export declare const RESEARCH_SCRIPT = "export const meta = {\n name: 'research',\n description: 'Multi-angle research on a question with parallel exploration and a cited synthesis.',\n whenToUse: 'User asks a non-trivial research question that benefits from multiple search angles or source reads.',\n examplePrompts: [\n { field: 'question', text: 'Compare Bun vs Node startup performance' },\n { field: 'question', text: 'What are the trade-offs of SQLite vs Postgres for this app?' },\n ],\n i18n: {\n zh: {\n description: '\u591A\u89D2\u5EA6\u5E76\u884C\u8C03\u7814\u4E00\u4E2A\u95EE\u9898\uFF0C\u5E76\u4EA7\u51FA\u5E26\u5F15\u7528\u7684\u7EFC\u5408\u62A5\u544A\u3002',\n whenToUse: '\u7528\u6237\u63D0\u51FA\u9700\u8981\u591A\u89D2\u5EA6\u68C0\u7D22\u3001\u9605\u8BFB\u6765\u6E90\u7684\u975E\u5E73\u51E1\u8C03\u7814\u95EE\u9898\u65F6\u3002',\n examplePrompts: [\n { field: 'question', text: '\u6BD4\u8F83 Bun \u4E0E Node \u7684\u542F\u52A8\u6027\u80FD' },\n { field: 'question', text: '\u8FD9\u4E2A\u5E94\u7528\u7528 SQLite \u8FD8\u662F Postgres \u5404\u6709\u4EC0\u4E48\u6743\u8861\uFF1F' },\n ],\n },\n },\n tags: ['research', 'investigation'],\n estimatedAgents: { min: 4, max: 8 },\n phases: [\n { title: 'Frame' },\n { title: 'Sweep' },\n { title: 'Synthesize' },\n ],\n}\n\nconst RESEARCH_TOOLS = ['web_search', 'web_fetch', 'read_file', 'grep', 'find', 'list_dir']\n\nconst question = args && typeof args === 'object' && args.question\n ? String(args.question)\n : 'No explicit question supplied; infer from the most recent user turn.'\n\nconst depth = args && typeof args === 'object' && args.depth\n ? String(args.depth)\n : 'standard'\nconst maxAngles = depth === 'quick' ? 2 : depth === 'deep' ? 6 : 4\n\nphase('Frame')\nconst frame = await agent(\n 'Frame this research question. Return exactly ' + maxAngles + ' distinct angles worth investigating, ' +\n 'each with the single most decisive sub-question. Be concrete.\\n\\nQUESTION:\\n' +\n question,\n {\n label: 'framing',\n schema: {\n type: 'object',\n properties: {\n angles: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n key_question: { type: 'string' },\n },\n required: ['title', 'key_question'],\n },\n },\n },\n required: ['angles'],\n },\n },\n)\n\nif (!frame || !frame.angles?.length) {\n return { ok: false, reason: 'framing failed', question, depth }\n}\n\nconst angles = frame.angles.slice(0, maxAngles)\n\nphase('Sweep')\nconst angleReports = await parallel(\n angles.map((a) => () =>\n agent(\n 'Investigate this angle. Use search and source-read tools liberally. Distinguish what you can confirm from what is conjecture.\\n\\n' +\n 'ANGLE: ' + a.title + '\\n' +\n 'KEY QUESTION: ' + a.key_question + '\\n\\n' +\n 'Return: 3\u20136 grounded findings (each with a 1-line claim and a source URL or file path), plus the strongest counter-evidence.',\n {\n label: a.title,\n toolset: RESEARCH_TOOLS,\n maxIterations: depth === 'deep' ? 40 : 30,\n schema: {\n type: 'object',\n properties: {\n findings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n confidence: { type: 'string', enum: ['low', 'med', 'high'] },\n },\n required: ['claim', 'source', 'confidence'],\n },\n },\n counterEvidence: { type: 'string' },\n },\n required: ['findings'],\n },\n },\n ),\n ),\n)\n\nphase('Synthesize')\nconst live = angleReports.filter(Boolean)\nconst synthesis = await agent(\n 'Synthesize a cited research report from these angle-level findings. Drop unsupported or duplicate claims. Use the highest-confidence source per claim. ' +\n 'Explicitly list contradictions where angles disagree. Return: an executive summary (max 5 sentences), top findings with inline source URLs, open questions, and contradictions.\\n\\n' +\n 'QUESTION:\\n' + question + '\\n\\n' +\n JSON.stringify({ angles, reports: live }, null, 2),\n {\n label: 'synthesis',\n schema: {\n type: 'object',\n properties: {\n executiveSummary: { type: 'string' },\n topFindings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n },\n required: ['claim', 'source'],\n },\n },\n openQuestions: { type: 'array', items: { type: 'string' } },\n contradictions: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n topic: { type: 'string' },\n sides: { type: 'array', items: { type: 'string' } },\n },\n required: ['topic', 'sides'],\n },\n },\n },\n required: ['executiveSummary', 'topFindings'],\n },\n },\n)\n\nreturn {\n ok: true,\n question,\n depth,\n angleCount: angles.length,\n ...(synthesis ?? { executiveSummary: 'synthesis failed', topFindings: [], contradictions: [] }),\n}\n";
13
+ export declare const RESEARCH_SCRIPT = "export const meta = {\n name: 'research',\n description: 'Multi-angle research on a question with parallel exploration and a cited synthesis.',\n whenToUse: 'User asks a non-trivial research question that benefits from multiple search angles or source reads.',\n examplePrompts: [\n { field: 'question', text: 'Compare Bun vs Node startup performance' },\n { field: 'question', text: 'What are the trade-offs of SQLite vs Postgres for this app?' },\n ],\n i18n: {\n zh: {\n description: '\u591A\u89D2\u5EA6\u5E76\u884C\u8C03\u7814\u4E00\u4E2A\u95EE\u9898\uFF0C\u5E76\u4EA7\u51FA\u5E26\u5F15\u7528\u7684\u7EFC\u5408\u62A5\u544A\u3002',\n whenToUse: '\u7528\u6237\u63D0\u51FA\u9700\u8981\u591A\u89D2\u5EA6\u68C0\u7D22\u3001\u9605\u8BFB\u6765\u6E90\u7684\u975E\u5E73\u51E1\u8C03\u7814\u95EE\u9898\u65F6\u3002',\n examplePrompts: [\n { field: 'question', text: '\u6BD4\u8F83 Bun \u4E0E Node \u7684\u542F\u52A8\u6027\u80FD' },\n { field: 'question', text: '\u8FD9\u4E2A\u5E94\u7528\u7528 SQLite \u8FD8\u662F Postgres \u5404\u6709\u4EC0\u4E48\u6743\u8861\uFF1F' },\n ],\n },\n },\n tags: ['research', 'investigation'],\n estimatedAgents: { min: 4, max: 8 },\n phases: [\n { title: 'Frame' },\n { title: 'Sweep' },\n { title: 'Synthesize' },\n ],\n}\n\nconst RESEARCH_TOOLS = ['web_search', 'web_fetch', 'read_file', 'grep', 'find', 'list_dir']\n\nconst question = args && typeof args === 'object' && args.question\n ? String(args.question)\n : 'No explicit question supplied; infer from the most recent user turn.'\n\nconst depth = args && typeof args === 'object' && args.depth\n ? String(args.depth)\n : 'standard'\nconst maxAngles = depth === 'quick' ? 2 : depth === 'deep' ? 6 : 4\n\nphase('Frame')\nconst frame = await agent(\n 'Frame this research question. Return exactly ' + maxAngles + ' distinct angles worth investigating, ' +\n 'each with the single most decisive sub-question. Be concrete.\\n\\nQUESTION:\\n' +\n question,\n {\n label: 'framing',\n schema: {\n type: 'object',\n properties: {\n angles: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n key_question: { type: 'string' },\n },\n required: ['title', 'key_question'],\n },\n },\n },\n required: ['angles'],\n },\n },\n)\n\nif (!frame || !frame.angles?.length) {\n const output = { ok: false, reason: 'framing failed', question, depth }\n return {\n summary: output.reason,\n sections: [{ kind: 'json', title: 'Research framing', value: output }],\n structuredOutput: output,\n }\n}\n\nconst angles = frame.angles.slice(0, maxAngles)\n\nphase('Sweep')\nconst angleReports = await parallel(\n angles.map((a) => () =>\n agent(\n 'Investigate this angle. Use search and source-read tools liberally. Distinguish what you can confirm from what is conjecture.\\n\\n' +\n 'ANGLE: ' + a.title + '\\n' +\n 'KEY QUESTION: ' + a.key_question + '\\n\\n' +\n 'Return: 3\u20136 grounded findings (each with a 1-line claim and a source URL or file path), plus the strongest counter-evidence.',\n {\n label: a.title,\n toolset: RESEARCH_TOOLS,\n maxIterations: depth === 'deep' ? 40 : 30,\n schema: {\n type: 'object',\n properties: {\n findings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n confidence: { type: 'string', enum: ['low', 'med', 'high'] },\n },\n required: ['claim', 'source', 'confidence'],\n },\n },\n counterEvidence: { type: 'string' },\n },\n required: ['findings'],\n },\n },\n ),\n ),\n)\n\nphase('Synthesize')\nconst live = angleReports.filter(Boolean)\nconst synthesis = await agent(\n 'Synthesize a cited research report from these angle-level findings. Drop unsupported or duplicate claims. Use the highest-confidence source per claim. ' +\n 'Explicitly list contradictions where angles disagree. Return: an executive summary (max 5 sentences), top findings with inline source URLs, open questions, and contradictions.\\n\\n' +\n 'QUESTION:\\n' + question + '\\n\\n' +\n JSON.stringify({ angles, reports: live }, null, 2),\n {\n label: 'synthesis',\n schema: {\n type: 'object',\n properties: {\n executiveSummary: { type: 'string' },\n topFindings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n },\n required: ['claim', 'source'],\n },\n },\n openQuestions: { type: 'array', items: { type: 'string' } },\n contradictions: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n topic: { type: 'string' },\n sides: { type: 'array', items: { type: 'string' } },\n },\n required: ['topic', 'sides'],\n },\n },\n },\n required: ['executiveSummary', 'topFindings'],\n },\n },\n)\n\nconst output = {\n ok: true,\n question,\n depth,\n angleCount: angles.length,\n ...(synthesis ?? { executiveSummary: 'synthesis failed', topFindings: [], contradictions: [] }),\n}\nreturn {\n summary: output.executiveSummary,\n sections: [\n { kind: 'findings', title: 'Top findings', items: output.topFindings.map((item) => ({ title: item.claim, detail: item.source })) },\n { kind: 'questions', title: 'Open questions', items: output.openQuestions ?? [] },\n { kind: 'json', title: 'Contradictions', value: output.contradictions ?? [] },\n ],\n structuredOutput: output,\n}\n";
@@ -77,7 +77,12 @@ const frame = await agent(
77
77
  )
78
78
 
79
79
  if (!frame || !frame.angles?.length) {
80
- return { ok: false, reason: 'framing failed', question, depth }
80
+ const output = { ok: false, reason: 'framing failed', question, depth }
81
+ return {
82
+ summary: output.reason,
83
+ sections: [{ kind: 'json', title: 'Research framing', value: output }],
84
+ structuredOutput: output,
85
+ }
81
86
  }
82
87
 
83
88
  const angles = frame.angles.slice(0, maxAngles)
@@ -160,13 +165,22 @@ const synthesis = await agent(
160
165
  },
161
166
  )
162
167
 
163
- return {
168
+ const output = {
164
169
  ok: true,
165
170
  question,
166
171
  depth,
167
172
  angleCount: angles.length,
168
173
  ...(synthesis ?? { executiveSummary: 'synthesis failed', topFindings: [], contradictions: [] }),
169
174
  }
175
+ return {
176
+ summary: output.executiveSummary,
177
+ sections: [
178
+ { kind: 'findings', title: 'Top findings', items: output.topFindings.map((item) => ({ title: item.claim, detail: item.source })) },
179
+ { kind: 'questions', title: 'Open questions', items: output.openQuestions ?? [] },
180
+ { kind: 'json', title: 'Contradictions', value: output.contradictions ?? [] },
181
+ ],
182
+ structuredOutput: output,
183
+ }
170
184
  `;
171
185
  //#endregion
172
186
  export { RESEARCH_SCRIPT };
@@ -1 +1 @@
1
- {"version":3,"file":"research.js","names":[],"sources":["../../../../../src/agent/workflow/builtins/research.ts"],"sourcesContent":["/**\n * Built-in workflow: `research`\n *\n * Multi-modal research sweep on a question (args.question). Fans out search /\n * exploration / source-reading angles in parallel, then synthesises a cited\n * report. Each angle is its own subagent so source reading does not pollute the\n * parent context.\n *\n * Args:\n * - question: research question\n * - depth: 'quick' (2 angles) | 'standard' (4) | 'deep' (6)\n */\n\nexport const RESEARCH_SCRIPT = `export const meta = {\n name: 'research',\n description: 'Multi-angle research on a question with parallel exploration and a cited synthesis.',\n whenToUse: 'User asks a non-trivial research question that benefits from multiple search angles or source reads.',\n examplePrompts: [\n { field: 'question', text: 'Compare Bun vs Node startup performance' },\n { field: 'question', text: 'What are the trade-offs of SQLite vs Postgres for this app?' },\n ],\n i18n: {\n zh: {\n description: '多角度并行调研一个问题,并产出带引用的综合报告。',\n whenToUse: '用户提出需要多角度检索、阅读来源的非平凡调研问题时。',\n examplePrompts: [\n { field: 'question', text: '比较 Bun 与 Node 的启动性能' },\n { field: 'question', text: '这个应用用 SQLite 还是 Postgres 各有什么权衡?' },\n ],\n },\n },\n tags: ['research', 'investigation'],\n estimatedAgents: { min: 4, max: 8 },\n phases: [\n { title: 'Frame' },\n { title: 'Sweep' },\n { title: 'Synthesize' },\n ],\n}\n\nconst RESEARCH_TOOLS = ['web_search', 'web_fetch', 'read_file', 'grep', 'find', 'list_dir']\n\nconst question = args && typeof args === 'object' && args.question\n ? String(args.question)\n : 'No explicit question supplied; infer from the most recent user turn.'\n\nconst depth = args && typeof args === 'object' && args.depth\n ? String(args.depth)\n : 'standard'\nconst maxAngles = depth === 'quick' ? 2 : depth === 'deep' ? 6 : 4\n\nphase('Frame')\nconst frame = await agent(\n 'Frame this research question. Return exactly ' + maxAngles + ' distinct angles worth investigating, ' +\n 'each with the single most decisive sub-question. Be concrete.\\\\n\\\\nQUESTION:\\\\n' +\n question,\n {\n label: 'framing',\n schema: {\n type: 'object',\n properties: {\n angles: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n key_question: { type: 'string' },\n },\n required: ['title', 'key_question'],\n },\n },\n },\n required: ['angles'],\n },\n },\n)\n\nif (!frame || !frame.angles?.length) {\n return { ok: false, reason: 'framing failed', question, depth }\n}\n\nconst angles = frame.angles.slice(0, maxAngles)\n\nphase('Sweep')\nconst angleReports = await parallel(\n angles.map((a) => () =>\n agent(\n 'Investigate this angle. Use search and source-read tools liberally. Distinguish what you can confirm from what is conjecture.\\\\n\\\\n' +\n 'ANGLE: ' + a.title + '\\\\n' +\n 'KEY QUESTION: ' + a.key_question + '\\\\n\\\\n' +\n 'Return: 3–6 grounded findings (each with a 1-line claim and a source URL or file path), plus the strongest counter-evidence.',\n {\n label: a.title,\n toolset: RESEARCH_TOOLS,\n maxIterations: depth === 'deep' ? 40 : 30,\n schema: {\n type: 'object',\n properties: {\n findings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n confidence: { type: 'string', enum: ['low', 'med', 'high'] },\n },\n required: ['claim', 'source', 'confidence'],\n },\n },\n counterEvidence: { type: 'string' },\n },\n required: ['findings'],\n },\n },\n ),\n ),\n)\n\nphase('Synthesize')\nconst live = angleReports.filter(Boolean)\nconst synthesis = await agent(\n 'Synthesize a cited research report from these angle-level findings. Drop unsupported or duplicate claims. Use the highest-confidence source per claim. ' +\n 'Explicitly list contradictions where angles disagree. Return: an executive summary (max 5 sentences), top findings with inline source URLs, open questions, and contradictions.\\\\n\\\\n' +\n 'QUESTION:\\\\n' + question + '\\\\n\\\\n' +\n JSON.stringify({ angles, reports: live }, null, 2),\n {\n label: 'synthesis',\n schema: {\n type: 'object',\n properties: {\n executiveSummary: { type: 'string' },\n topFindings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n },\n required: ['claim', 'source'],\n },\n },\n openQuestions: { type: 'array', items: { type: 'string' } },\n contradictions: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n topic: { type: 'string' },\n sides: { type: 'array', items: { type: 'string' } },\n },\n required: ['topic', 'sides'],\n },\n },\n },\n required: ['executiveSummary', 'topFindings'],\n },\n },\n)\n\nreturn {\n ok: true,\n question,\n depth,\n angleCount: angles.length,\n ...(synthesis ?? { executiveSummary: 'synthesis failed', topFindings: [], contradictions: [] }),\n}\n`\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAa,kBAAkB"}
1
+ {"version":3,"file":"research.js","names":[],"sources":["../../../../../src/agent/workflow/builtins/research.ts"],"sourcesContent":["/**\n * Built-in workflow: `research`\n *\n * Multi-modal research sweep on a question (args.question). Fans out search /\n * exploration / source-reading angles in parallel, then synthesises a cited\n * report. Each angle is its own subagent so source reading does not pollute the\n * parent context.\n *\n * Args:\n * - question: research question\n * - depth: 'quick' (2 angles) | 'standard' (4) | 'deep' (6)\n */\n\nexport const RESEARCH_SCRIPT = `export const meta = {\n name: 'research',\n description: 'Multi-angle research on a question with parallel exploration and a cited synthesis.',\n whenToUse: 'User asks a non-trivial research question that benefits from multiple search angles or source reads.',\n examplePrompts: [\n { field: 'question', text: 'Compare Bun vs Node startup performance' },\n { field: 'question', text: 'What are the trade-offs of SQLite vs Postgres for this app?' },\n ],\n i18n: {\n zh: {\n description: '多角度并行调研一个问题,并产出带引用的综合报告。',\n whenToUse: '用户提出需要多角度检索、阅读来源的非平凡调研问题时。',\n examplePrompts: [\n { field: 'question', text: '比较 Bun 与 Node 的启动性能' },\n { field: 'question', text: '这个应用用 SQLite 还是 Postgres 各有什么权衡?' },\n ],\n },\n },\n tags: ['research', 'investigation'],\n estimatedAgents: { min: 4, max: 8 },\n phases: [\n { title: 'Frame' },\n { title: 'Sweep' },\n { title: 'Synthesize' },\n ],\n}\n\nconst RESEARCH_TOOLS = ['web_search', 'web_fetch', 'read_file', 'grep', 'find', 'list_dir']\n\nconst question = args && typeof args === 'object' && args.question\n ? String(args.question)\n : 'No explicit question supplied; infer from the most recent user turn.'\n\nconst depth = args && typeof args === 'object' && args.depth\n ? String(args.depth)\n : 'standard'\nconst maxAngles = depth === 'quick' ? 2 : depth === 'deep' ? 6 : 4\n\nphase('Frame')\nconst frame = await agent(\n 'Frame this research question. Return exactly ' + maxAngles + ' distinct angles worth investigating, ' +\n 'each with the single most decisive sub-question. Be concrete.\\\\n\\\\nQUESTION:\\\\n' +\n question,\n {\n label: 'framing',\n schema: {\n type: 'object',\n properties: {\n angles: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n key_question: { type: 'string' },\n },\n required: ['title', 'key_question'],\n },\n },\n },\n required: ['angles'],\n },\n },\n)\n\nif (!frame || !frame.angles?.length) {\n const output = { ok: false, reason: 'framing failed', question, depth }\n return {\n summary: output.reason,\n sections: [{ kind: 'json', title: 'Research framing', value: output }],\n structuredOutput: output,\n }\n}\n\nconst angles = frame.angles.slice(0, maxAngles)\n\nphase('Sweep')\nconst angleReports = await parallel(\n angles.map((a) => () =>\n agent(\n 'Investigate this angle. Use search and source-read tools liberally. Distinguish what you can confirm from what is conjecture.\\\\n\\\\n' +\n 'ANGLE: ' + a.title + '\\\\n' +\n 'KEY QUESTION: ' + a.key_question + '\\\\n\\\\n' +\n 'Return: 3–6 grounded findings (each with a 1-line claim and a source URL or file path), plus the strongest counter-evidence.',\n {\n label: a.title,\n toolset: RESEARCH_TOOLS,\n maxIterations: depth === 'deep' ? 40 : 30,\n schema: {\n type: 'object',\n properties: {\n findings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n confidence: { type: 'string', enum: ['low', 'med', 'high'] },\n },\n required: ['claim', 'source', 'confidence'],\n },\n },\n counterEvidence: { type: 'string' },\n },\n required: ['findings'],\n },\n },\n ),\n ),\n)\n\nphase('Synthesize')\nconst live = angleReports.filter(Boolean)\nconst synthesis = await agent(\n 'Synthesize a cited research report from these angle-level findings. Drop unsupported or duplicate claims. Use the highest-confidence source per claim. ' +\n 'Explicitly list contradictions where angles disagree. Return: an executive summary (max 5 sentences), top findings with inline source URLs, open questions, and contradictions.\\\\n\\\\n' +\n 'QUESTION:\\\\n' + question + '\\\\n\\\\n' +\n JSON.stringify({ angles, reports: live }, null, 2),\n {\n label: 'synthesis',\n schema: {\n type: 'object',\n properties: {\n executiveSummary: { type: 'string' },\n topFindings: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n claim: { type: 'string' },\n source: { type: 'string' },\n },\n required: ['claim', 'source'],\n },\n },\n openQuestions: { type: 'array', items: { type: 'string' } },\n contradictions: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n topic: { type: 'string' },\n sides: { type: 'array', items: { type: 'string' } },\n },\n required: ['topic', 'sides'],\n },\n },\n },\n required: ['executiveSummary', 'topFindings'],\n },\n },\n)\n\nconst output = {\n ok: true,\n question,\n depth,\n angleCount: angles.length,\n ...(synthesis ?? { executiveSummary: 'synthesis failed', topFindings: [], contradictions: [] }),\n}\nreturn {\n summary: output.executiveSummary,\n sections: [\n { kind: 'findings', title: 'Top findings', items: output.topFindings.map((item) => ({ title: item.claim, detail: item.source })) },\n { kind: 'questions', title: 'Open questions', items: output.openQuestions ?? [] },\n { kind: 'json', title: 'Contradictions', value: output.contradictions ?? [] },\n ],\n structuredOutput: output,\n}\n`\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAa,kBAAkB"}
@@ -9,4 +9,4 @@
9
9
  * - blockers: what stalled or frustrated progress
10
10
  * - carryover: unfinished items (optional)
11
11
  */
12
- export declare const WEEKLY_REVIEW_SCRIPT = "export const meta = {\n name: 'weekly_review',\n description: 'Review the week and produce 3\u20135 prioritized actions for next week.',\n whenToUse: 'Solo founder or super-individual doing a weekly retrospective and planning session.',\n examplePrompts: [\n { field: 'wins', text: 'Shipped landing page, got 2 demo calls, published one newsletter' },\n { field: 'blockers', text: 'Pricing still unclear, one client ghosted, distracted by side tasks' },\n ],\n i18n: {\n zh: {\n description: '\u590D\u76D8\u672C\u5468\u5E76\u4EA7\u51FA\u4E0B\u5468 3\u20135 \u9879\u4F18\u5148\u884C\u52A8\u3002',\n whenToUse: '\u4E00\u4EBA\u516C\u53F8\u6216\u8D85\u7EA7\u4E2A\u4F53\u505A\u5468\u590D\u76D8\u4E0E\u4E0B\u5468\u89C4\u5212\u65F6\u3002',\n examplePrompts: [\n { field: 'wins', text: '\u4E0A\u7EBF\u4E86\u843D\u5730\u9875\u3001\u62FF\u5230 2 \u4E2A demo\u3001\u53D1\u4E86\u4E00\u671F newsletter' },\n { field: 'blockers', text: '\u5B9A\u4EF7\u8FD8\u4E0D\u6E05\u6670\u3001\u4E00\u4E2A\u5BA2\u6237\u5931\u8054\u3001\u88AB\u6742\u4E8B\u5206\u5FC3' },\n ],\n },\n },\n tags: ['productivity', 'brainstorm'],\n estimatedAgents: { min: 3, max: 4 },\n phases: [\n { title: 'Collect' },\n { title: 'Analyze' },\n { title: 'Plan' },\n ],\n}\n\nconst wins = args && typeof args === 'object' && args.wins\n ? String(args.wins)\n : 'Infer wins from the most recent user turn.'\n\nconst blockers = args && typeof args === 'object' && args.blockers\n ? String(args.blockers)\n : 'None specified \u2014 infer from context if possible.'\n\nconst carryover = args && typeof args === 'object' && args.carryover\n ? String(args.carryover)\n : ''\n\nphase('Collect')\nconst collected = await agent(\n 'Normalize this weekly input into structured facts: wins, blockers, carryover, energy level signals, and revenue/impact signals if mentioned. Be concise.\\n\\n' +\n 'WINS:\\n' + wins + '\\nBLOCKERS:\\n' + blockers + '\\nCARRYOVER:\\n' + (carryover || '(none)'),\n {\n label: 'collect',\n schema: {\n type: 'object',\n properties: {\n wins: { type: 'array', items: { type: 'string' } },\n blockers: { type: 'array', items: { type: 'string' } },\n carryover: { type: 'array', items: { type: 'string' } },\n themes: { type: 'array', items: { type: 'string' } },\n },\n required: ['wins', 'blockers'],\n },\n },\n)\n\nphase('Analyze')\nconst analysis = await agent(\n 'Analyze this week for a solo operator. Identify patterns, root causes of blockers, what to stop doing, what to double down on, and one honest lesson.\\n\\n' +\n JSON.stringify(collected, null, 2),\n {\n label: 'analyze',\n schema: {\n type: 'object',\n properties: {\n patterns: { type: 'array', items: { type: 'string' } },\n rootCauses: { type: 'array', items: { type: 'string' } },\n stopDoing: { type: 'array', items: { type: 'string' } },\n doubleDown: { type: 'array', items: { type: 'string' } },\n lesson: { type: 'string' },\n },\n required: ['patterns', 'lesson'],\n },\n },\n)\n\nphase('Plan')\nconst plan = await agent(\n 'Produce next week plan for a solo founder: exactly 3\u20135 prioritized actions (each with why, estimated effort, and success signal), plus one optional stretch goal. Be realistic for ~20\u201330 focused hours.\\n\\n' +\n JSON.stringify({ collected, analysis }, null, 2),\n {\n label: 'plan',\n schema: {\n type: 'object',\n properties: {\n priorities: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n action: { type: 'string' },\n why: { type: 'string' },\n effort: { type: 'string', enum: ['low', 'med', 'high'] },\n successSignal: { type: 'string' },\n },\n required: ['action', 'why', 'successSignal'],\n },\n },\n stretchGoal: { type: 'string' },\n weeklyTheme: { type: 'string' },\n },\n required: ['priorities', 'weeklyTheme'],\n },\n },\n)\n\nreturn {\n ok: true,\n collected,\n analysis,\n ...(plan ?? { priorities: [], weeklyTheme: 'planning failed' }),\n}\n";
12
+ export declare const WEEKLY_REVIEW_SCRIPT = "export const meta = {\n name: 'weekly_review',\n description: 'Review the week and produce 3\u20135 prioritized actions for next week.',\n whenToUse: 'Solo founder or super-individual doing a weekly retrospective and planning session.',\n examplePrompts: [\n { field: 'wins', text: 'Shipped landing page, got 2 demo calls, published one newsletter' },\n { field: 'blockers', text: 'Pricing still unclear, one client ghosted, distracted by side tasks' },\n ],\n i18n: {\n zh: {\n description: '\u590D\u76D8\u672C\u5468\u5E76\u4EA7\u51FA\u4E0B\u5468 3\u20135 \u9879\u4F18\u5148\u884C\u52A8\u3002',\n whenToUse: '\u4E00\u4EBA\u516C\u53F8\u6216\u8D85\u7EA7\u4E2A\u4F53\u505A\u5468\u590D\u76D8\u4E0E\u4E0B\u5468\u89C4\u5212\u65F6\u3002',\n examplePrompts: [\n { field: 'wins', text: '\u4E0A\u7EBF\u4E86\u843D\u5730\u9875\u3001\u62FF\u5230 2 \u4E2A demo\u3001\u53D1\u4E86\u4E00\u671F newsletter' },\n { field: 'blockers', text: '\u5B9A\u4EF7\u8FD8\u4E0D\u6E05\u6670\u3001\u4E00\u4E2A\u5BA2\u6237\u5931\u8054\u3001\u88AB\u6742\u4E8B\u5206\u5FC3' },\n ],\n },\n },\n tags: ['productivity', 'brainstorm'],\n estimatedAgents: { min: 3, max: 4 },\n phases: [\n { title: 'Collect' },\n { title: 'Analyze' },\n { title: 'Plan' },\n ],\n}\n\nconst wins = args && typeof args === 'object' && args.wins\n ? String(args.wins)\n : 'Infer wins from the most recent user turn.'\n\nconst blockers = args && typeof args === 'object' && args.blockers\n ? String(args.blockers)\n : 'None specified \u2014 infer from context if possible.'\n\nconst carryover = args && typeof args === 'object' && args.carryover\n ? String(args.carryover)\n : ''\n\nphase('Collect')\nconst collected = await agent(\n 'Normalize this weekly input into structured facts: wins, blockers, carryover, energy level signals, and revenue/impact signals if mentioned. Be concise.\\n\\n' +\n 'WINS:\\n' + wins + '\\nBLOCKERS:\\n' + blockers + '\\nCARRYOVER:\\n' + (carryover || '(none)'),\n {\n label: 'collect',\n schema: {\n type: 'object',\n properties: {\n wins: { type: 'array', items: { type: 'string' } },\n blockers: { type: 'array', items: { type: 'string' } },\n carryover: { type: 'array', items: { type: 'string' } },\n themes: { type: 'array', items: { type: 'string' } },\n },\n required: ['wins', 'blockers'],\n },\n },\n)\n\nphase('Analyze')\nconst analysis = await agent(\n 'Analyze this week for a solo operator. Identify patterns, root causes of blockers, what to stop doing, what to double down on, and one honest lesson.\\n\\n' +\n JSON.stringify(collected, null, 2),\n {\n label: 'analyze',\n schema: {\n type: 'object',\n properties: {\n patterns: { type: 'array', items: { type: 'string' } },\n rootCauses: { type: 'array', items: { type: 'string' } },\n stopDoing: { type: 'array', items: { type: 'string' } },\n doubleDown: { type: 'array', items: { type: 'string' } },\n lesson: { type: 'string' },\n },\n required: ['patterns', 'lesson'],\n },\n },\n)\n\nphase('Plan')\nconst plan = await agent(\n 'Produce next week plan for a solo founder: exactly 3\u20135 prioritized actions (each with why, estimated effort, and success signal), plus one optional stretch goal. Be realistic for ~20\u201330 focused hours.\\n\\n' +\n JSON.stringify({ collected, analysis }, null, 2),\n {\n label: 'plan',\n schema: {\n type: 'object',\n properties: {\n priorities: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n action: { type: 'string' },\n why: { type: 'string' },\n effort: { type: 'string', enum: ['low', 'med', 'high'] },\n successSignal: { type: 'string' },\n },\n required: ['action', 'why', 'successSignal'],\n },\n },\n stretchGoal: { type: 'string' },\n weeklyTheme: { type: 'string' },\n },\n required: ['priorities', 'weeklyTheme'],\n },\n },\n)\n\nconst output = {\n ok: true,\n collected,\n analysis,\n ...(plan ?? { priorities: [], weeklyTheme: 'planning failed' }),\n}\nreturn {\n summary: output.weeklyTheme,\n sections: [\n { kind: 'json', title: 'Priorities', value: output.priorities },\n { kind: 'json', title: 'Analysis', value: output.analysis },\n ],\n structuredOutput: output,\n}\n";
@@ -118,12 +118,20 @@ const plan = await agent(
118
118
  },
119
119
  )
120
120
 
121
- return {
121
+ const output = {
122
122
  ok: true,
123
123
  collected,
124
124
  analysis,
125
125
  ...(plan ?? { priorities: [], weeklyTheme: 'planning failed' }),
126
126
  }
127
+ return {
128
+ summary: output.weeklyTheme,
129
+ sections: [
130
+ { kind: 'json', title: 'Priorities', value: output.priorities },
131
+ { kind: 'json', title: 'Analysis', value: output.analysis },
132
+ ],
133
+ structuredOutput: output,
134
+ }
127
135
  `;
128
136
  //#endregion
129
137
  export { WEEKLY_REVIEW_SCRIPT };
@@ -1 +1 @@
1
- {"version":3,"file":"weekly-review.js","names":[],"sources":["../../../../../src/agent/workflow/builtins/weekly-review.ts"],"sourcesContent":["/**\n * Built-in workflow: `weekly_review`\n *\n * Weekly retrospective for solopreneurs — collect wins, blockers, and carryover,\n * then synthesize next-week priorities.\n *\n * Args:\n * - wins: what went well this week\n * - blockers: what stalled or frustrated progress\n * - carryover: unfinished items (optional)\n */\n\nexport const WEEKLY_REVIEW_SCRIPT = `export const meta = {\n name: 'weekly_review',\n description: 'Review the week and produce 3–5 prioritized actions for next week.',\n whenToUse: 'Solo founder or super-individual doing a weekly retrospective and planning session.',\n examplePrompts: [\n { field: 'wins', text: 'Shipped landing page, got 2 demo calls, published one newsletter' },\n { field: 'blockers', text: 'Pricing still unclear, one client ghosted, distracted by side tasks' },\n ],\n i18n: {\n zh: {\n description: '复盘本周并产出下周 3–5 项优先行动。',\n whenToUse: '一人公司或超级个体做周复盘与下周规划时。',\n examplePrompts: [\n { field: 'wins', text: '上线了落地页、拿到 2 个 demo、发了一期 newsletter' },\n { field: 'blockers', text: '定价还不清晰、一个客户失联、被杂事分心' },\n ],\n },\n },\n tags: ['productivity', 'brainstorm'],\n estimatedAgents: { min: 3, max: 4 },\n phases: [\n { title: 'Collect' },\n { title: 'Analyze' },\n { title: 'Plan' },\n ],\n}\n\nconst wins = args && typeof args === 'object' && args.wins\n ? String(args.wins)\n : 'Infer wins from the most recent user turn.'\n\nconst blockers = args && typeof args === 'object' && args.blockers\n ? String(args.blockers)\n : 'None specified — infer from context if possible.'\n\nconst carryover = args && typeof args === 'object' && args.carryover\n ? String(args.carryover)\n : ''\n\nphase('Collect')\nconst collected = await agent(\n 'Normalize this weekly input into structured facts: wins, blockers, carryover, energy level signals, and revenue/impact signals if mentioned. Be concise.\\\\n\\\\n' +\n 'WINS:\\\\n' + wins + '\\\\nBLOCKERS:\\\\n' + blockers + '\\\\nCARRYOVER:\\\\n' + (carryover || '(none)'),\n {\n label: 'collect',\n schema: {\n type: 'object',\n properties: {\n wins: { type: 'array', items: { type: 'string' } },\n blockers: { type: 'array', items: { type: 'string' } },\n carryover: { type: 'array', items: { type: 'string' } },\n themes: { type: 'array', items: { type: 'string' } },\n },\n required: ['wins', 'blockers'],\n },\n },\n)\n\nphase('Analyze')\nconst analysis = await agent(\n 'Analyze this week for a solo operator. Identify patterns, root causes of blockers, what to stop doing, what to double down on, and one honest lesson.\\\\n\\\\n' +\n JSON.stringify(collected, null, 2),\n {\n label: 'analyze',\n schema: {\n type: 'object',\n properties: {\n patterns: { type: 'array', items: { type: 'string' } },\n rootCauses: { type: 'array', items: { type: 'string' } },\n stopDoing: { type: 'array', items: { type: 'string' } },\n doubleDown: { type: 'array', items: { type: 'string' } },\n lesson: { type: 'string' },\n },\n required: ['patterns', 'lesson'],\n },\n },\n)\n\nphase('Plan')\nconst plan = await agent(\n 'Produce next week plan for a solo founder: exactly 3–5 prioritized actions (each with why, estimated effort, and success signal), plus one optional stretch goal. Be realistic for ~20–30 focused hours.\\\\n\\\\n' +\n JSON.stringify({ collected, analysis }, null, 2),\n {\n label: 'plan',\n schema: {\n type: 'object',\n properties: {\n priorities: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n action: { type: 'string' },\n why: { type: 'string' },\n effort: { type: 'string', enum: ['low', 'med', 'high'] },\n successSignal: { type: 'string' },\n },\n required: ['action', 'why', 'successSignal'],\n },\n },\n stretchGoal: { type: 'string' },\n weeklyTheme: { type: 'string' },\n },\n required: ['priorities', 'weeklyTheme'],\n },\n },\n)\n\nreturn {\n ok: true,\n collected,\n analysis,\n ...(plan ?? { priorities: [], weeklyTheme: 'planning failed' }),\n}\n`\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,uBAAuB"}
1
+ {"version":3,"file":"weekly-review.js","names":[],"sources":["../../../../../src/agent/workflow/builtins/weekly-review.ts"],"sourcesContent":["/**\n * Built-in workflow: `weekly_review`\n *\n * Weekly retrospective for solopreneurs — collect wins, blockers, and carryover,\n * then synthesize next-week priorities.\n *\n * Args:\n * - wins: what went well this week\n * - blockers: what stalled or frustrated progress\n * - carryover: unfinished items (optional)\n */\n\nexport const WEEKLY_REVIEW_SCRIPT = `export const meta = {\n name: 'weekly_review',\n description: 'Review the week and produce 3–5 prioritized actions for next week.',\n whenToUse: 'Solo founder or super-individual doing a weekly retrospective and planning session.',\n examplePrompts: [\n { field: 'wins', text: 'Shipped landing page, got 2 demo calls, published one newsletter' },\n { field: 'blockers', text: 'Pricing still unclear, one client ghosted, distracted by side tasks' },\n ],\n i18n: {\n zh: {\n description: '复盘本周并产出下周 3–5 项优先行动。',\n whenToUse: '一人公司或超级个体做周复盘与下周规划时。',\n examplePrompts: [\n { field: 'wins', text: '上线了落地页、拿到 2 个 demo、发了一期 newsletter' },\n { field: 'blockers', text: '定价还不清晰、一个客户失联、被杂事分心' },\n ],\n },\n },\n tags: ['productivity', 'brainstorm'],\n estimatedAgents: { min: 3, max: 4 },\n phases: [\n { title: 'Collect' },\n { title: 'Analyze' },\n { title: 'Plan' },\n ],\n}\n\nconst wins = args && typeof args === 'object' && args.wins\n ? String(args.wins)\n : 'Infer wins from the most recent user turn.'\n\nconst blockers = args && typeof args === 'object' && args.blockers\n ? String(args.blockers)\n : 'None specified — infer from context if possible.'\n\nconst carryover = args && typeof args === 'object' && args.carryover\n ? String(args.carryover)\n : ''\n\nphase('Collect')\nconst collected = await agent(\n 'Normalize this weekly input into structured facts: wins, blockers, carryover, energy level signals, and revenue/impact signals if mentioned. Be concise.\\\\n\\\\n' +\n 'WINS:\\\\n' + wins + '\\\\nBLOCKERS:\\\\n' + blockers + '\\\\nCARRYOVER:\\\\n' + (carryover || '(none)'),\n {\n label: 'collect',\n schema: {\n type: 'object',\n properties: {\n wins: { type: 'array', items: { type: 'string' } },\n blockers: { type: 'array', items: { type: 'string' } },\n carryover: { type: 'array', items: { type: 'string' } },\n themes: { type: 'array', items: { type: 'string' } },\n },\n required: ['wins', 'blockers'],\n },\n },\n)\n\nphase('Analyze')\nconst analysis = await agent(\n 'Analyze this week for a solo operator. Identify patterns, root causes of blockers, what to stop doing, what to double down on, and one honest lesson.\\\\n\\\\n' +\n JSON.stringify(collected, null, 2),\n {\n label: 'analyze',\n schema: {\n type: 'object',\n properties: {\n patterns: { type: 'array', items: { type: 'string' } },\n rootCauses: { type: 'array', items: { type: 'string' } },\n stopDoing: { type: 'array', items: { type: 'string' } },\n doubleDown: { type: 'array', items: { type: 'string' } },\n lesson: { type: 'string' },\n },\n required: ['patterns', 'lesson'],\n },\n },\n)\n\nphase('Plan')\nconst plan = await agent(\n 'Produce next week plan for a solo founder: exactly 3–5 prioritized actions (each with why, estimated effort, and success signal), plus one optional stretch goal. Be realistic for ~20–30 focused hours.\\\\n\\\\n' +\n JSON.stringify({ collected, analysis }, null, 2),\n {\n label: 'plan',\n schema: {\n type: 'object',\n properties: {\n priorities: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n action: { type: 'string' },\n why: { type: 'string' },\n effort: { type: 'string', enum: ['low', 'med', 'high'] },\n successSignal: { type: 'string' },\n },\n required: ['action', 'why', 'successSignal'],\n },\n },\n stretchGoal: { type: 'string' },\n weeklyTheme: { type: 'string' },\n },\n required: ['priorities', 'weeklyTheme'],\n },\n },\n)\n\nconst output = {\n ok: true,\n collected,\n analysis,\n ...(plan ?? { priorities: [], weeklyTheme: 'planning failed' }),\n}\nreturn {\n summary: output.weeklyTheme,\n sections: [\n { kind: 'json', title: 'Priorities', value: output.priorities },\n { kind: 'json', title: 'Analysis', value: output.analysis },\n ],\n structuredOutput: output,\n}\n`\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,uBAAuB"}
@@ -1,8 +1,8 @@
1
1
  import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
2
2
  import { BUILTIN_WORKFLOWS } from "./builtins/index.js";
3
3
  import { parseWorkflowScript } from "./parser.js";
4
- import { join } from "node:path";
5
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
+ import { join } from "node:path";
6
6
  //#region src/agent/workflow/catalog.ts
7
7
  /**
8
8
  * Catalog for named workflows.
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { getApiKey, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
4
- import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
5
4
  import { getAssistantMessageErrorReason, stripCodeFences } from "../agent/goals/judge.js";
5
+ import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
6
6
  //#region src/ai-assist/text-assist.ts
7
7
  init_providers();
8
8
  init_logger();
@@ -1,8 +1,8 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
+ import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
3
+ import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
2
4
  import { createLogger } from "../utils/logger/index.js";
3
5
  import { init_logger } from "../utils/logger.js";
4
- import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
5
- import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
6
6
  import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
7
7
  import { dirname, join } from "path";
8
8
  import { mkdir, readFile, readdir, rm } from "fs/promises";
@@ -1,7 +1,7 @@
1
- import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
2
1
  import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
3
- import path from "node:path";
2
+ import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
4
3
  import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
4
+ import path from "node:path";
5
5
  //#region src/auth/profiles/store.ts
6
6
  /**
7
7
  * Auth Profile Store
@@ -1,7 +1,7 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
- import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
3
2
  import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
4
3
  import { init_loader, loadConfig } from "../config/loader.js";
4
+ import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  //#region src/auth/sync-provider-auth.ts
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
- import { homedir } from "node:os";
3
2
  import { isAbsolute, relative, resolve, sep } from "node:path";
3
+ import { homedir } from "node:os";
4
4
  //#region src/browser/cache-dir-policy.ts
5
5
  function expandHome(input) {
6
6
  if (input === "~") return homedir();
@@ -2,10 +2,10 @@ import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { loadPlaywrightCoreModule } from "./providers/playwright-doctor.js";
4
4
  import { pickFreePort } from "./free-port.js";
5
- import { homedir, platform } from "node:os";
6
- import { join } from "node:path";
7
5
  import { existsSync } from "node:fs";
8
6
  import { mkdir, rm } from "node:fs/promises";
7
+ import { join } from "node:path";
8
+ import { homedir, platform } from "node:os";
9
9
  import { spawn } from "node:child_process";
10
10
  //#region src/browser/cdp-local-launcher.ts
11
11
  /**
@@ -1,5 +1,5 @@
1
- import { dirname, resolve } from "node:path";
2
1
  import { readFile } from "node:fs/promises";
2
+ import { dirname, resolve } from "node:path";
3
3
  //#region src/browser/pipeline/source.ts
4
4
  const DEFAULT_PIPELINE_SOURCE_TIMEOUT_MS = 3e4;
5
5
  const MAX_PIPELINE_SOURCE_BYTES = 1024 * 1024;
@@ -1,13 +1,13 @@
1
1
  import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
2
- import { assertCacheDir, init_cache_dir_policy } from "../cache-dir-policy.js";
2
+ import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
3
+ import { init_paths, resolveBinDir } from "../../config/paths.js";
3
4
  import { createLogger } from "../../utils/logger/index.js";
4
5
  import { init_logger } from "../../utils/logger.js";
5
- import { init_paths, resolveBinDir } from "../../config/paths.js";
6
- import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
6
+ import { assertCacheDir, init_cache_dir_policy } from "../cache-dir-policy.js";
7
7
  import { resolvePackageRoot } from "../../infra/update-check.js";
8
- import { dirname, join } from "node:path";
9
8
  import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
10
9
  import { readFile, readdir, rm } from "node:fs/promises";
10
+ import { dirname, join } from "node:path";
11
11
  import { fileURLToPath } from "node:url";
12
12
  import { spawn } from "node:child_process";
13
13
  //#region src/browser/providers/browser-ext-install.ts
@@ -1,15 +1,15 @@
1
- import { assertCacheDir, expandHome, init_cache_dir_policy } from "../cache-dir-policy.js";
1
+ import { init_paths, resolveBinDir } from "../../config/paths.js";
2
2
  import { createLogger } from "../../utils/logger/index.js";
3
3
  import { init_logger } from "../../utils/logger.js";
4
- import { init_paths, resolveBinDir } from "../../config/paths.js";
4
+ import { assertCacheDir, expandHome, init_cache_dir_policy } from "../cache-dir-policy.js";
5
5
  import { loadPlaywrightCoreModule } from "./playwright-doctor.js";
6
6
  import { WEBDRIVER_OVERRIDE_SCRIPT, buildStealthArgs, filterCloakBrowserExtraArgs, generateFingerprintSeed, makeExecutable, removeQuarantineAttr } from "../stealth.js";
7
7
  import { pickFreePort } from "../free-port.js";
8
- import { arch, platform, tmpdir } from "node:os";
9
- import { join, resolve } from "node:path";
10
- import { createReadStream, createWriteStream } from "node:fs";
11
8
  import { createHash } from "node:crypto";
9
+ import { createReadStream, createWriteStream } from "node:fs";
12
10
  import { mkdir, mkdtemp, rm, stat } from "node:fs/promises";
11
+ import { join, resolve } from "node:path";
12
+ import { arch, platform, tmpdir } from "node:os";
13
13
  import { spawn } from "node:child_process";
14
14
  import { Readable, Transform } from "node:stream";
15
15
  import AdmZip from "adm-zip";
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "node:module";
2
- import { dirname, join } from "node:path";
3
2
  import { existsSync } from "node:fs";
4
3
  import { stat } from "node:fs/promises";
4
+ import { dirname, join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  //#region src/browser/providers/playwright-doctor.ts
7
7
  /** Root directory of the `playwright-core` package (Electron extraResources or node_modules). */
@@ -1,7 +1,7 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { platform } from "node:os";
4
3
  import { chmod, stat } from "node:fs/promises";
4
+ import { platform } from "node:os";
5
5
  import { exec } from "node:child_process";
6
6
  import { promisify } from "node:util";
7
7
  //#region src/browser/stealth.ts
@@ -1,8 +1,8 @@
1
1
  import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
2
2
  import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
3
3
  import { buildExtensionMetadataSnapshot, init_extension_metadata_snapshot, resolveExtensionLoaderOptionsFromConfig } from "../../extensions/extension-metadata-snapshot.js";
4
- import { join } from "node:path";
5
4
  import { existsSync, readFileSync } from "node:fs";
5
+ import { join } from "node:path";
6
6
  //#region src/channels/catalog/channel-catalog-service.ts
7
7
  function normalizeChannelId(raw) {
8
8
  return raw.trim().toLowerCase();
@@ -1,7 +1,7 @@
1
1
  import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
2
- import { join } from "path";
3
2
  import { existsSync, mkdirSync, readFileSync } from "fs";
4
3
  import { randomUUID } from "node:crypto";
4
+ import { join } from "path";
5
5
  //#region src/channels/outbound/persist-store.ts
6
6
  /**
7
7
  * Durable outbound queue (crash recovery): JSON file under agent internal dir.
@@ -1,5 +1,5 @@
1
- import path from "node:path";
2
1
  import fs from "node:fs";
2
+ import path from "node:path";
3
3
  //#region src/channels/pairing/allow-from-file.ts
4
4
  function readAllowFromFile(filePath) {
5
5
  try {
@@ -1,8 +1,8 @@
1
1
  import { appendAllowFromIdSync } from "./allow-from-file.js";
2
2
  import "./pairing-constants.js";
3
- import path from "node:path";
4
- import fs from "node:fs";
5
3
  import crypto from "node:crypto";
4
+ import fs from "node:fs";
5
+ import path from "node:path";
6
6
  //#region src/channels/pairing/pairing-store.ts
7
7
  const PAIRING_CODE_LENGTH = 8;
8
8
  const PAIRING_CODE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
@@ -1,9 +1,9 @@
1
1
  import { init_agent_scope, normalizeAgentId, resolveAgentProfileDir } from "../agent/agent-scope.js";
2
- import { init_agent_session_key, resolveAgentIdFromSessionKey } from "../routing/agent-session-key.js";
3
2
  import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
3
+ import { init_agent_session_key, resolveAgentIdFromSessionKey } from "../routing/agent-session-key.js";
4
4
  import { commandRegistry } from "./registry.js";
5
- import { join } from "node:path";
6
5
  import { readFile } from "node:fs/promises";
6
+ import { join } from "node:path";
7
7
  //#region src/chat-commands/agent-edit.ts
8
8
  /**
9
9
  * /agent-edit — open the current chat as an agent profile editing session.
@@ -1,7 +1,7 @@
1
- import { ConfigSchema, init_schema } from "../../config/schema.js";
1
+ import { init_paths, resolveConfigPath } from "../../config/paths.js";
2
2
  import { createLogger } from "../../utils/logger/index.js";
3
3
  import { init_logger } from "../../utils/logger.js";
4
- import { init_paths, resolveConfigPath } from "../../config/paths.js";
4
+ import { ConfigSchema, init_schema } from "../../config/schema.js";
5
5
  import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
6
6
  import { commandRegistry } from "../registry.js";
7
7
  import { parseConfigValue } from "../config-value.js";
@@ -1,5 +1,5 @@
1
- import { ConfigSchema, init_schema } from "../../config/schema.js";
2
1
  import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
2
+ import { ConfigSchema, init_schema } from "../../config/schema.js";
3
3
  import { resolveGatewayLocalClientHost } from "../../config/gateway-bind.js";
4
4
  import { formatExamples, register } from "../registry.js";
5
5
  import { existsSync, readFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import { ConfigSchema, init_schema } from "../../../../config/schema.js";
2
2
  import { init_loader, loadConfig, saveConfig } from "../../../../config/loader.js";
3
- import { dirname } from "node:path";
4
3
  import { existsSync, mkdirSync, readFileSync } from "node:fs";
4
+ import { dirname } from "node:path";
5
5
  //#region src/cli/commands/doctor/checks/config-health.ts
6
6
  init_loader();
7
7
  init_schema();
@@ -52,7 +52,7 @@ async function checkDatabaseSchema(ctx) {
52
52
  id: "database-schema",
53
53
  label: "Database schema",
54
54
  status: "pass",
55
- message: `SQLite schema v${status.dbVersion} (current release v10).`,
55
+ message: `SQLite schema v${status.dbVersion} (current release v11).`,
56
56
  hints: []
57
57
  };
58
58
  }
@@ -1,6 +1,6 @@
1
+ import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
1
2
  import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
2
3
  import { init_loader, loadConfig } from "../../../../config/loader.js";
3
- import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
4
4
  import { existsSync } from "node:fs";
5
5
  //#region src/cli/commands/doctor/checks/provider-auth.ts
6
6
  init_loader();
@@ -1,5 +1,5 @@
1
- import { join } from "node:path";
2
1
  import { accessSync, chmodSync, constants, existsSync, mkdirSync, statSync } from "node:fs";
2
+ import { join } from "node:path";
3
3
  //#region src/cli/commands/doctor/checks/state-integrity.ts
4
4
  function isWritable(dir) {
5
5
  try {
@@ -1,8 +1,8 @@
1
1
  import { init_agent_scope, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../../../agent/agent-scope.js";
2
2
  import { WORKSPACE_FILES, init_paths } from "../../../../config/paths.js";
3
3
  import { init_loader, loadConfig } from "../../../../config/loader.js";
4
- import { join } from "node:path";
5
4
  import { existsSync } from "node:fs";
5
+ import { join } from "node:path";
6
6
  //#region src/cli/commands/doctor/checks/workspace-status.ts
7
7
  init_agent_scope();
8
8
  init_loader();
@@ -1,7 +1,7 @@
1
1
  import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
2
2
  import { colors } from "../utils/colors.js";
3
- import { join, resolve } from "node:path";
4
3
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
4
+ import { join, resolve } from "node:path";
5
5
  import { Command } from "commander";
6
6
  //#region src/cli/commands/extension-create.ts
7
7
  init_package_version();
@@ -1,7 +1,7 @@
1
1
  import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
2
+ import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../../config/paths.js";
2
3
  import { createLogger } from "../../utils/logger/index.js";
3
4
  import { init_logger } from "../../utils/logger.js";
4
- import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../../config/paths.js";
5
5
  import { init_normalize_manifest, normalizeExtensionManifest } from "../../extensions/normalize-manifest.js";
6
6
  import { init_loader, loadConfig } from "../../config/loader.js";
7
7
  import { checkEngineCompatibility } from "../../extensions/engine-check.js";
@@ -11,8 +11,8 @@ import { runGatewayLoop } from "../../gateway/run-loop.js";
11
11
  import "../../gateway/index.js";
12
12
  import { colors } from "../utils/colors.js";
13
13
  import { initWorkspace } from "../utils/init-workspace.js";
14
- import { join, resolve } from "node:path";
15
14
  import { existsSync, mkdirSync, readFileSync, symlinkSync, unlinkSync, watch } from "node:fs";
15
+ import { join, resolve } from "node:path";
16
16
  import { Command } from "commander";
17
17
  //#region src/cli/commands/extension-dev.ts
18
18
  init_loader();