@xopcai/xopc 0.0.142 → 0.0.143

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 (543) hide show
  1. package/README.md +1 -1
  2. package/dist/browser-ext/manifest.json +1 -1
  3. package/dist/extensions/telegram/xopc.extension.json +1 -1
  4. package/dist/gateway/static/root/assets/activity-center-store-jITiX2vJ.js +1 -0
  5. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BawPxiu5.js → agent-avatar-dicebear-DiME9u_P.js} +1 -1
  6. package/dist/gateway/static/root/assets/agents-DzBXhZXO.js +2 -0
  7. package/dist/gateway/static/root/assets/{app-management-settings-panel-81xd1p9R.js → app-management-settings-panel-Cuo7SbUP.js} +1 -1
  8. package/dist/gateway/static/root/assets/{appearance-settings-DYeQsYU8.js → appearance-settings-DUfdNQqk.js} +1 -1
  9. package/dist/gateway/static/root/assets/apps-page-CKuKK5AU.js +1 -0
  10. package/dist/gateway/static/root/assets/{archive-plugin-D_oa7oti.js → archive-plugin-B-Qk6cGr.js} +1 -1
  11. package/dist/gateway/static/root/assets/{attachment-load-Cd-bwI2N.js → attachment-load-Di6EEbQX.js} +1 -1
  12. package/dist/gateway/static/root/assets/automation-suggestion-card-DGxvRxtO.js +1 -0
  13. package/dist/gateway/static/root/assets/automations-page-D-FF_WKV.js +4 -0
  14. package/dist/gateway/static/root/assets/{binary-plugins-O8svLKWw.js → binary-plugins-ZaOZDH2I.js} +1 -1
  15. package/dist/gateway/static/root/assets/block-editor-BTFhjWfg.js +184 -0
  16. package/dist/gateway/static/root/assets/browser-settings-page-BvKLdEQt.js +8 -0
  17. package/dist/gateway/static/root/assets/{capability-presets-api-dJy1Eqgx.js → capability-presets-api-BU-pVZiZ.js} +1 -1
  18. package/dist/gateway/static/root/assets/capability-presets-settings-panel-DgyeEwzh.js +2 -0
  19. package/dist/gateway/static/root/assets/{channel-recipient-api-Bfuhp2ty.js → channel-recipient-api-DuulnhIj.js} +1 -1
  20. package/dist/gateway/static/root/assets/channels-settings-BbVsdD_I.js +1 -0
  21. package/dist/gateway/static/root/assets/channels-status-swr-B5lVrUsN.js +1 -0
  22. package/dist/gateway/static/root/assets/check-BODqo66o.js +1 -0
  23. package/dist/gateway/static/root/assets/chunk-QUQL4437-DXsxWP7r.js +4 -0
  24. package/dist/gateway/static/root/assets/circle-alert-RzVebuX2.js +1 -0
  25. package/dist/gateway/static/root/assets/connectors-page-B8QqVy3I.js +2 -0
  26. package/dist/gateway/static/root/assets/{desktop-pet-DFMfIb5F.js → desktop-pet---yzVxVR.js} +1 -1
  27. package/dist/gateway/static/root/assets/desktop-pet-settings-Dc3gqBJE.js +1 -0
  28. package/dist/gateway/static/root/assets/{directory-picker-path-field-BrYt1gAr.js → directory-picker-path-field-DCmOGLtK.js} +1 -1
  29. package/dist/gateway/static/root/assets/dreaming-settings-BgT5KZVe.js +3 -0
  30. package/dist/gateway/static/root/assets/{extension-debug-page-Bh630pLD.js → extension-debug-page-ByaKTTq4.js} +1 -1
  31. package/dist/gateway/static/root/assets/extension-page-BmRzHAZr.js +1 -0
  32. package/dist/gateway/static/root/assets/extension-settings-page-JUtwIhbF.js +1 -0
  33. package/dist/gateway/static/root/assets/{fetch-B1WtuprY.js → fetch-8QNN25Sh.js} +1 -1
  34. package/dist/gateway/static/root/assets/{gateway-config-api-De2N821l.js → gateway-config-api-CxicF50_.js} +1 -1
  35. package/dist/gateway/static/root/assets/gateway-settings-Bz2I_EO5.js +1 -0
  36. package/dist/gateway/static/root/assets/{gateway-startup-retry-nEujFSDj.js → gateway-startup-retry-5YBnS9Fj.js} +1 -1
  37. package/dist/gateway/static/root/assets/goal-create-dialog-VcoyuZGN.js +1 -0
  38. package/dist/gateway/static/root/assets/goal-detail-page-Cilkap2G.js +4 -0
  39. package/dist/gateway/static/root/assets/{goals-config-api-DUy3eEse.js → goals-config-api-CwcHRdC0.js} +1 -1
  40. package/dist/gateway/static/root/assets/goals-page-C6eoni4z.js +2 -0
  41. package/dist/gateway/static/root/assets/goals-settings-o4i-qAOS.js +1 -0
  42. package/dist/gateway/static/root/assets/heartbeat-settings-DQQkETX8.js +1 -0
  43. package/dist/gateway/static/root/assets/index-BKRqeRHm.js +257 -0
  44. package/dist/gateway/static/root/assets/index-CphxClbs.css +1 -0
  45. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CVIwwM15.js → keyboard-shortcuts-settings-LT6qB-ua.js} +1 -1
  46. package/dist/gateway/static/root/assets/logs-page-Dli2e3fS.js +7 -0
  47. package/dist/gateway/static/root/assets/{markdown-split-B_6us9j7.js → markdown-split-Dw-yE2-y.js} +1 -1
  48. package/dist/gateway/static/root/assets/{media-plugins-D_fryIyj.js → media-plugins-D9NNNUgE.js} +1 -1
  49. package/dist/gateway/static/root/assets/messages-CzKxM6I4.js +5 -0
  50. package/dist/gateway/static/root/assets/models-hub-panel-DVn2Q1Ik.js +2 -0
  51. package/dist/gateway/static/root/assets/notes-page-CRgbJGgk.js +1 -0
  52. package/dist/gateway/static/root/assets/notes-workbench-BxZRHLWx.js +2 -0
  53. package/dist/gateway/static/root/assets/{page-tabs-D_8jGlqx.js → page-tabs-D4hkWVt_.js} +1 -1
  54. package/dist/gateway/static/root/assets/{preview-open-alternatives-BBLMK8Mp.js → preview-open-alternatives-CIckv0uy.js} +1 -1
  55. package/dist/gateway/static/root/assets/project-detail-page-Doz53xLn.js +1 -0
  56. package/dist/gateway/static/root/assets/projects-page-DoMtcRLg.js +1 -0
  57. package/dist/gateway/static/root/assets/remote-access-hub-BeHVEgrm.js +1 -0
  58. package/dist/gateway/static/root/assets/{save-bar-controls-DVS3FR5r.js → save-bar-controls-B0b42kB2.js} +1 -1
  59. package/dist/gateway/static/root/assets/{schedule-field-D6vKd6-T.js → schedule-field-BtjEkczK.js} +1 -1
  60. package/dist/gateway/static/root/assets/{schema-form-BPy4lbIh.js → schema-form-Bf0bk3i6.js} +1 -1
  61. package/dist/gateway/static/root/assets/sessions-page-Bk4bQsBe.js +1 -0
  62. package/dist/gateway/static/root/assets/settings-advanced-gate-DdFyaRMm.js +1 -0
  63. package/dist/gateway/static/root/assets/{settings-collapsible-section-WzdikxPt.js → settings-collapsible-section-BTKTdTNX.js} +1 -1
  64. package/dist/gateway/static/root/assets/{settings-form-section-CvfzhBV-.js → settings-form-section-DL4P0sAj.js} +1 -1
  65. package/dist/gateway/static/root/assets/{settings-loading-skeleton-BxR-Ulhi.js → settings-loading-skeleton-BV6KFNj4.js} +1 -1
  66. package/dist/gateway/static/root/assets/settings-page-B_4DsX5W.js +1 -0
  67. package/dist/gateway/static/root/assets/{settings-page-layout-CKefvbYi.js → settings-page-layout-CyGlrInB.js} +1 -1
  68. package/dist/gateway/static/root/assets/setup-status-panel-DJ1_MLgX.js +1 -0
  69. package/dist/gateway/static/root/assets/share-preview-page-BQBV7YrV.js +2 -0
  70. package/dist/gateway/static/root/assets/shares-settings-0VuFLBeU.js +1 -0
  71. package/dist/gateway/static/root/assets/skill-reload-api-DO87Ckeo.js +1 -0
  72. package/dist/gateway/static/root/assets/skills-page-D3VdtxAn.js +2 -0
  73. package/dist/gateway/static/root/assets/{system-settings-panel-BokgAgf7.js → system-settings-panel-D85fBBuI.js} +1 -1
  74. package/dist/gateway/static/root/assets/{typed-models-lib-BwHlNL3L.js → typed-models-lib-CwEuYrHX.js} +1 -1
  75. package/dist/gateway/static/root/assets/{use-channel-catalog-DR11ap3A.js → use-channel-catalog-COXIfXcl.js} +1 -1
  76. package/dist/gateway/static/root/assets/user-context-page-m9JVQ73F.js +1 -0
  77. package/dist/gateway/static/root/assets/user-profile-fields-editor-DtQiuY7E.js +1 -0
  78. package/dist/gateway/static/root/assets/user-profile-settings-panel-CWM0fEpb.js +1 -0
  79. package/dist/gateway/static/root/assets/{utils-BKUWB-TT.js → utils--BO6xT3u.js} +1 -1
  80. package/dist/gateway/static/root/assets/voice-api-key-field-LoT3wgZ9.js +1 -0
  81. package/dist/gateway/static/root/assets/with-selector-aYPsXwdl.js +1 -0
  82. package/dist/gateway/static/root/assets/work-item-detail-page-DSTMz_mO.js +1 -0
  83. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CL_rnAUB.js → workflow-run-setup-panel-B35lJzvm.js} +2 -2
  84. package/dist/gateway/static/root/assets/workflows-page-BfSm9oR8.js +11 -0
  85. package/dist/gateway/static/root/assets/workflows-page-DLioOiRN.css +1 -0
  86. package/dist/gateway/static/root/connector-icons/README.md +11 -0
  87. package/dist/gateway/static/root/connector-icons/airtable.svg +13 -0
  88. package/dist/gateway/static/root/connector-icons/asana.svg +15 -0
  89. package/dist/gateway/static/root/connector-icons/brave-search.svg +1 -0
  90. package/dist/gateway/static/root/connector-icons/clickup.svg +19 -0
  91. package/dist/gateway/static/root/connector-icons/composio.svg +266 -0
  92. package/dist/gateway/static/root/connector-icons/discord.svg +15 -0
  93. package/dist/gateway/static/root/connector-icons/dropbox.svg +152 -0
  94. package/dist/gateway/static/root/connector-icons/excel.svg +56 -0
  95. package/dist/gateway/static/root/connector-icons/fetch.svg +6 -0
  96. package/dist/gateway/static/root/connector-icons/figma.svg +178 -0
  97. package/dist/gateway/static/root/connector-icons/filesystem.svg +6 -0
  98. package/dist/gateway/static/root/connector-icons/github.svg +10 -0
  99. package/dist/gateway/static/root/connector-icons/gmail.svg +3 -0
  100. package/dist/gateway/static/root/connector-icons/google-calendar.svg +3 -0
  101. package/dist/gateway/static/root/connector-icons/google-docs.svg +25 -0
  102. package/dist/gateway/static/root/connector-icons/google-drive.svg +25 -0
  103. package/dist/gateway/static/root/connector-icons/google-sheets.svg +1 -0
  104. package/dist/gateway/static/root/connector-icons/hubspot.svg +142 -0
  105. package/dist/gateway/static/root/connector-icons/jira.svg +15 -0
  106. package/dist/gateway/static/root/connector-icons/linear.svg +5 -0
  107. package/dist/gateway/static/root/connector-icons/memory.svg +5 -0
  108. package/dist/gateway/static/root/connector-icons/microsoft-teams.svg +33 -0
  109. package/dist/gateway/static/root/connector-icons/notion.svg +5 -0
  110. package/dist/gateway/static/root/connector-icons/one-drive.svg +13 -0
  111. package/dist/gateway/static/root/connector-icons/outlook.svg +76 -0
  112. package/dist/gateway/static/root/connector-icons/playwright.svg +9 -0
  113. package/dist/gateway/static/root/connector-icons/salesforce.svg +17 -0
  114. package/dist/gateway/static/root/connector-icons/sequential-thinking.svg +8 -0
  115. package/dist/gateway/static/root/connector-icons/shopify.svg +5 -0
  116. package/dist/gateway/static/root/connector-icons/slack.svg +9 -0
  117. package/dist/gateway/static/root/connector-icons/spotify.svg +43 -0
  118. package/dist/gateway/static/root/connector-icons/stripe.svg +11 -0
  119. package/dist/gateway/static/root/connector-icons/telegram.svg +130 -0
  120. package/dist/gateway/static/root/connector-icons/time.svg +6 -0
  121. package/dist/gateway/static/root/connector-icons/todoist.svg +277 -0
  122. package/dist/gateway/static/root/connector-icons/trello.svg +19 -0
  123. package/dist/gateway/static/root/connector-icons/twitter.svg +128 -0
  124. package/dist/gateway/static/root/connector-icons/whatsapp.svg +61 -0
  125. package/dist/gateway/static/root/connector-icons/youtube.svg +11 -0
  126. package/dist/gateway/static/root/index.html +9 -6
  127. package/dist/package.js +1 -1
  128. package/dist/src/agent/agent-manager.d.ts +2 -0
  129. package/dist/src/agent/agent-manager.js +8 -0
  130. package/dist/src/agent/agent-manager.js.map +1 -1
  131. package/dist/src/agent/background-review/prompts.d.ts +1 -1
  132. package/dist/src/agent/background-review/prompts.js +3 -2
  133. package/dist/src/agent/background-review/prompts.js.map +1 -1
  134. package/dist/src/agent/embedded/session-tool-result-guard.js +1 -1
  135. package/dist/src/agent/embedded/xopc-tools-bridge.d.ts +9 -0
  136. package/dist/src/agent/embedded/xopc-tools-bridge.js +71 -3
  137. package/dist/src/agent/embedded/xopc-tools-bridge.js.map +1 -1
  138. package/dist/src/agent/goals/post-turn.js +5 -4
  139. package/dist/src/agent/goals/post-turn.js.map +1 -1
  140. package/dist/src/agent/mcp/mcp-transport.js +4 -1
  141. package/dist/src/agent/mcp/mcp-transport.js.map +1 -1
  142. package/dist/src/agent/memory/context/planner.d.ts +1 -0
  143. package/dist/src/agent/memory/context/planner.js +60 -14
  144. package/dist/src/agent/memory/context/planner.js.map +1 -1
  145. package/dist/src/agent/memory/context/types.d.ts +3 -1
  146. package/dist/src/agent/memory/lifecycle.d.ts +11 -0
  147. package/dist/src/agent/memory/lifecycle.js +50 -0
  148. package/dist/src/agent/memory/lifecycle.js.map +1 -0
  149. package/dist/src/agent/memory/source-origin.d.ts +3 -0
  150. package/dist/src/agent/memory/source-origin.js +19 -0
  151. package/dist/src/agent/memory/source-origin.js.map +1 -0
  152. package/dist/src/agent/memory/understanding/service.js +5 -0
  153. package/dist/src/agent/memory/understanding/service.js.map +1 -1
  154. package/dist/src/agent/memory/user-context-coordinator.js +7 -2
  155. package/dist/src/agent/memory/user-context-coordinator.js.map +1 -1
  156. package/dist/src/agent/prompt/sections/behavior.d.ts +2 -0
  157. package/dist/src/agent/prompt/sections/behavior.js +30 -1
  158. package/dist/src/agent/prompt/sections/behavior.js.map +1 -1
  159. package/dist/src/agent/prompt/sections/tooling.js +1 -1
  160. package/dist/src/agent/prompt/sections/tooling.js.map +1 -1
  161. package/dist/src/agent/prompt/service-prompt-builder.js +8 -1
  162. package/dist/src/agent/prompt/service-prompt-builder.js.map +1 -1
  163. package/dist/src/agent/prompt/system-prompt.d.ts +2 -0
  164. package/dist/src/agent/prompt/system-prompt.js +6 -3
  165. package/dist/src/agent/prompt/system-prompt.js.map +1 -1
  166. package/dist/src/agent/service/process-direct-streaming.js +22 -0
  167. package/dist/src/agent/service/process-direct-streaming.js.map +1 -1
  168. package/dist/src/agent/service.d.ts +2 -0
  169. package/dist/src/agent/service.js +9 -3
  170. package/dist/src/agent/service.js.map +1 -1
  171. package/dist/src/agent/starter-agents.js +1 -1
  172. package/dist/src/agent/starter-agents.js.map +1 -1
  173. package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
  174. package/dist/src/agent/tool-manuals/xopc-use.js +1 -1
  175. package/dist/src/agent/tool-manuals/xopc-use.js.map +1 -1
  176. package/dist/src/agent/tools/composio-tool.d.ts +18 -5
  177. package/dist/src/agent/tools/composio-tool.js +252 -35
  178. package/dist/src/agent/tools/composio-tool.js.map +1 -1
  179. package/dist/src/agent/tools/factory.js +7 -3
  180. package/dist/src/agent/tools/factory.js.map +1 -1
  181. package/dist/src/agent/tools/index.d.ts +1 -1
  182. package/dist/src/agent/tools/index.js +2 -2
  183. package/dist/src/agent/tools/workflow-tool.d.ts +0 -1
  184. package/dist/src/agent/tools/workflow-tool.js +3 -16
  185. package/dist/src/agent/tools/workflow-tool.js.map +1 -1
  186. package/dist/src/agent/workflow/builtins/index.d.ts +2 -28
  187. package/dist/src/agent/workflow/builtins/index.js +226 -41
  188. package/dist/src/agent/workflow/builtins/index.js.map +1 -1
  189. package/dist/src/agent/workflow/catalog.d.ts +32 -34
  190. package/dist/src/agent/workflow/catalog.js +158 -154
  191. package/dist/src/agent/workflow/catalog.js.map +1 -1
  192. package/dist/src/agent/workflow/index.d.ts +4 -6
  193. package/dist/src/agent/workflow/index.js +2 -5
  194. package/dist/src/agent/workflow/snapshot.d.ts +2 -2
  195. package/dist/src/agent/workflow/snapshot.js +2 -2
  196. package/dist/src/agent/workflow/snapshot.js.map +1 -1
  197. package/dist/src/agent/workflow/structured-output-tool.d.ts +2 -2
  198. package/dist/src/agent/workflow/structured-output-tool.js +2 -2
  199. package/dist/src/agent/workflow/structured-output-tool.js.map +1 -1
  200. package/dist/src/agent/workflow/subagent-runner.js +1 -1
  201. package/dist/src/agent/workflow/types.d.ts +31 -26
  202. package/dist/src/agent-manifest/index.d.ts +1 -0
  203. package/dist/src/agent-manifest/index.js +3 -1
  204. package/dist/src/agent-manifest/index.js.map +1 -1
  205. package/dist/src/agent-manifest/preset-chain.d.ts +10 -0
  206. package/dist/src/agent-manifest/preset-chain.js +32 -0
  207. package/dist/src/agent-manifest/preset-chain.js.map +1 -0
  208. package/dist/src/agent-manifest/resolver.js +3 -10
  209. package/dist/src/agent-manifest/resolver.js.map +1 -1
  210. package/dist/src/agent-manifest/schema.d.ts +4 -4
  211. package/dist/src/automations/api/routes.js +13 -1
  212. package/dist/src/automations/api/routes.js.map +1 -1
  213. package/dist/src/automations/domain/validation.d.ts +14 -14
  214. package/dist/src/automations/draft/automation-draft-validator.d.ts +3 -3
  215. package/dist/src/browser/providers/browser-ext-install.d.ts +11 -1
  216. package/dist/src/browser/providers/browser-ext-install.js +39 -14
  217. package/dist/src/browser/providers/browser-ext-install.js.map +1 -1
  218. package/dist/src/capabilities/store-connector.d.ts +0 -1
  219. package/dist/src/capabilities/store-connector.js +3 -5
  220. package/dist/src/capabilities/store-connector.js.map +1 -1
  221. package/dist/src/chat-commands/builtins/review.js +72 -73
  222. package/dist/src/chat-commands/builtins/review.js.map +1 -1
  223. package/dist/src/chat-commands/builtins/workflow.js +9 -54
  224. package/dist/src/chat-commands/builtins/workflow.js.map +1 -1
  225. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  226. package/dist/src/cli/commands/extension-create.js +2 -2
  227. package/dist/src/cli/commands/extension-create.js.map +1 -1
  228. package/dist/src/cli/commands/extension-marketplace.js +42 -36
  229. package/dist/src/cli/commands/extension-marketplace.js.map +1 -1
  230. package/dist/src/cli/commands/extension-pack.d.ts +6 -0
  231. package/dist/src/cli/commands/extension-pack.js +3 -2
  232. package/dist/src/cli/commands/extension-pack.js.map +1 -1
  233. package/dist/src/commands/agents.config.d.ts +1 -0
  234. package/dist/src/commands/agents.config.js +1 -0
  235. package/dist/src/commands/agents.config.js.map +1 -1
  236. package/dist/src/config/schema.d.ts +6 -6
  237. package/dist/src/config/schema.js +6 -22
  238. package/dist/src/config/schema.js.map +1 -1
  239. package/dist/src/config/web-patch.d.ts +1 -1
  240. package/dist/src/connectors/approval.d.ts +2 -0
  241. package/dist/src/connectors/approval.js +33 -0
  242. package/dist/src/connectors/approval.js.map +1 -0
  243. package/dist/src/connectors/auth-provider-registry.d.ts +9 -0
  244. package/dist/src/connectors/auth-provider-registry.js +17 -0
  245. package/dist/src/connectors/auth-provider-registry.js.map +1 -0
  246. package/dist/src/connectors/builtin-catalog.js +55 -116
  247. package/dist/src/connectors/builtin-catalog.js.map +1 -1
  248. package/dist/src/connectors/catalog.js +7 -2
  249. package/dist/src/connectors/catalog.js.map +1 -1
  250. package/dist/src/connectors/composio-catalog.d.ts +19 -0
  251. package/dist/src/connectors/composio-catalog.js +237 -0
  252. package/dist/src/connectors/composio-catalog.js.map +1 -0
  253. package/dist/src/connectors/composio-logo.d.ts +1 -0
  254. package/dist/src/connectors/composio-logo.js +51 -0
  255. package/dist/src/connectors/composio-logo.js.map +1 -0
  256. package/dist/src/connectors/composio-sessions.d.ts +116 -0
  257. package/dist/src/connectors/composio-sessions.js +296 -0
  258. package/dist/src/connectors/composio-sessions.js.map +1 -0
  259. package/dist/src/connectors/composio-triggers.d.ts +17 -0
  260. package/dist/src/connectors/composio-triggers.js +48 -5
  261. package/dist/src/connectors/composio-triggers.js.map +1 -1
  262. package/dist/src/connectors/composio.d.ts +31 -2
  263. package/dist/src/connectors/composio.js +374 -151
  264. package/dist/src/connectors/composio.js.map +1 -1
  265. package/dist/src/connectors/connector-memory-sync.d.ts +15 -0
  266. package/dist/src/connectors/connector-memory-sync.js +90 -0
  267. package/dist/src/connectors/connector-memory-sync.js.map +1 -0
  268. package/dist/src/connectors/install.js +35 -92
  269. package/dist/src/connectors/install.js.map +1 -1
  270. package/dist/src/connectors/instances.js +6 -2
  271. package/dist/src/connectors/instances.js.map +1 -1
  272. package/dist/src/connectors/integration-strategy.d.ts +3 -0
  273. package/dist/src/connectors/integration-strategy.js +29 -0
  274. package/dist/src/connectors/integration-strategy.js.map +1 -0
  275. package/dist/src/connectors/policy.d.ts +13 -0
  276. package/dist/src/connectors/policy.js +48 -0
  277. package/dist/src/connectors/policy.js.map +1 -0
  278. package/dist/src/connectors/providers.js +1 -1
  279. package/dist/src/connectors/runtime-adapter-registry.d.ts +25 -0
  280. package/dist/src/connectors/runtime-adapter-registry.js +154 -0
  281. package/dist/src/connectors/runtime-adapter-registry.js.map +1 -0
  282. package/dist/src/connectors/types.d.ts +113 -4
  283. package/dist/src/connectors/workflow-preflight.d.ts +20 -0
  284. package/dist/src/connectors/workflow-preflight.js +70 -0
  285. package/dist/src/connectors/workflow-preflight.js.map +1 -0
  286. package/dist/src/extensions/install-transaction.d.ts +16 -0
  287. package/dist/src/extensions/install-transaction.js +76 -0
  288. package/dist/src/extensions/install-transaction.js.map +1 -0
  289. package/dist/src/extensions/install.d.ts +2 -0
  290. package/dist/src/extensions/install.js +23 -1
  291. package/dist/src/extensions/install.js.map +1 -1
  292. package/dist/src/gateway/agents-admin.d.ts +2 -0
  293. package/dist/src/gateway/agents-admin.js +7 -0
  294. package/dist/src/gateway/agents-admin.js.map +1 -1
  295. package/dist/src/gateway/capability-presets-admin.d.ts +11 -0
  296. package/dist/src/gateway/capability-presets-admin.js +11 -4
  297. package/dist/src/gateway/capability-presets-admin.js.map +1 -1
  298. package/dist/src/gateway/chat-stream/mapper.js +17 -0
  299. package/dist/src/gateway/chat-stream/mapper.js.map +1 -1
  300. package/dist/src/gateway/chat-stream/protocol.d.ts +18 -1
  301. package/dist/src/gateway/hono/lib/config-payload.d.ts +3 -3
  302. package/dist/src/gateway/hono/routes/agents.js +3 -0
  303. package/dist/src/gateway/hono/routes/agents.js.map +1 -1
  304. package/dist/src/gateway/hono/routes/capability-presets.js +19 -1
  305. package/dist/src/gateway/hono/routes/capability-presets.js.map +1 -1
  306. package/dist/src/gateway/hono/routes/connectors.js +188 -25
  307. package/dist/src/gateway/hono/routes/connectors.js.map +1 -1
  308. package/dist/src/gateway/hono/routes/goals.js +22 -3
  309. package/dist/src/gateway/hono/routes/goals.js.map +1 -1
  310. package/dist/src/gateway/hono/routes/home.d.ts +60 -1
  311. package/dist/src/gateway/hono/routes/home.js +244 -18
  312. package/dist/src/gateway/hono/routes/home.js.map +1 -1
  313. package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
  314. package/dist/src/gateway/hono/routes/lazy-bundles.js.map +1 -1
  315. package/dist/src/gateway/hono/routes/memory.js +14 -1
  316. package/dist/src/gateway/hono/routes/memory.js.map +1 -1
  317. package/dist/src/gateway/hono/routes/projects.js +103 -2
  318. package/dist/src/gateway/hono/routes/projects.js.map +1 -1
  319. package/dist/src/gateway/hono/routes/public-gateway.js +93 -0
  320. package/dist/src/gateway/hono/routes/public-gateway.js.map +1 -1
  321. package/dist/src/gateway/hono/routes/workflows.js +137 -22
  322. package/dist/src/gateway/hono/routes/workflows.js.map +1 -1
  323. package/dist/src/gateway/hono/routes/you.d.ts +23 -0
  324. package/dist/src/gateway/hono/routes/you.js +538 -0
  325. package/dist/src/gateway/hono/routes/you.js.map +1 -0
  326. package/dist/src/gateway/hono/sse.d.ts +2 -1
  327. package/dist/src/gateway/hono/sse.js +2 -1
  328. package/dist/src/gateway/hono/sse.js.map +1 -1
  329. package/dist/src/gateway/service/marketplace-service.d.ts +13 -1
  330. package/dist/src/gateway/service/marketplace-service.js +96 -40
  331. package/dist/src/gateway/service/marketplace-service.js.map +1 -1
  332. package/dist/src/gateway/service.d.ts +2 -0
  333. package/dist/src/gateway/service.js +7 -1
  334. package/dist/src/gateway/service.js.map +1 -1
  335. package/dist/src/goals/goal-service.d.ts +7 -5
  336. package/dist/src/goals/goal-service.js +25 -13
  337. package/dist/src/goals/goal-service.js.map +1 -1
  338. package/dist/src/goals/goal-store.js +46 -7
  339. package/dist/src/goals/goal-store.js.map +1 -1
  340. package/dist/src/goals/types.d.ts +24 -0
  341. package/dist/src/storage/sqlite/connector-repository.d.ts +49 -0
  342. package/dist/src/storage/sqlite/connector-repository.js +385 -0
  343. package/dist/src/storage/sqlite/connector-repository.js.map +1 -0
  344. package/dist/src/storage/sqlite/index.d.ts +3 -0
  345. package/dist/src/storage/sqlite/index.js +4 -1
  346. package/dist/src/storage/sqlite/migrations/030_connectors.sql +94 -0
  347. package/dist/src/storage/sqlite/migrations/031_connector_approvals.sql +24 -0
  348. package/dist/src/storage/sqlite/migrations/032_connector_webhook_deliveries.sql +15 -0
  349. package/dist/src/storage/sqlite/migrations/033_user_trust_policies.sql +6 -0
  350. package/dist/src/storage/sqlite/migrations/034_allow_global_auto_trust.sql +14 -0
  351. package/dist/src/storage/sqlite/migrations/035_user_profile_prompt_state.sql +7 -0
  352. package/dist/src/storage/sqlite/migrations/036_goal_outcome_metric.sql +12 -0
  353. package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
  354. package/dist/src/storage/sqlite/migrations/runner.js +3 -3
  355. package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
  356. package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
  357. package/dist/src/storage/sqlite/schema.js +1 -1
  358. package/dist/src/storage/sqlite/user-profile-setup-repository.d.ts +3 -0
  359. package/dist/src/storage/sqlite/user-profile-setup-repository.js +34 -0
  360. package/dist/src/storage/sqlite/user-profile-setup-repository.js.map +1 -0
  361. package/dist/src/storage/sqlite/user-trust-repository.d.ts +3 -0
  362. package/dist/src/storage/sqlite/user-trust-repository.js +34 -0
  363. package/dist/src/storage/sqlite/user-trust-repository.js.map +1 -0
  364. package/dist/src/tui/components/assistant-message.js +15 -0
  365. package/dist/src/tui/components/assistant-message.js.map +1 -1
  366. package/dist/src/tui/tui-agent-events.js +85 -1
  367. package/dist/src/tui/tui-agent-events.js.map +1 -1
  368. package/dist/src/tui/tui-command-formatters.js +7 -7
  369. package/dist/src/tui/tui-command-formatters.js.map +1 -1
  370. package/dist/src/tui/tui-commands.js +1 -1
  371. package/dist/src/tui/tui-startup-resources.js +1 -1
  372. package/dist/src/user-context/import.d.ts +12 -0
  373. package/dist/src/user-context/import.js +48 -0
  374. package/dist/src/user-context/import.js.map +1 -0
  375. package/dist/src/user-context/profile.d.ts +37 -0
  376. package/dist/src/user-context/profile.js +165 -0
  377. package/dist/src/user-context/profile.js.map +1 -0
  378. package/dist/src/user-context/projection.d.ts +54 -0
  379. package/dist/src/user-context/projection.js +121 -0
  380. package/dist/src/user-context/projection.js.map +1 -0
  381. package/dist/src/user-context/source-recommendations.d.ts +13 -0
  382. package/dist/src/user-context/source-recommendations.js +86 -0
  383. package/dist/src/user-context/source-recommendations.js.map +1 -0
  384. package/dist/src/user-context/trust-policy.d.ts +11 -0
  385. package/dist/src/user-context/trust-policy.js +31 -0
  386. package/dist/src/user-context/trust-policy.js.map +1 -0
  387. package/dist/src/workflows/authoring/index.d.ts +1 -0
  388. package/dist/src/workflows/authoring/index.js +2 -0
  389. package/dist/src/workflows/authoring/workflow-draft-store.d.ts +33 -0
  390. package/dist/src/workflows/authoring/workflow-draft-store.js +74 -0
  391. package/dist/src/workflows/authoring/workflow-draft-store.js.map +1 -0
  392. package/dist/src/workflows/domain/definition-utils.d.ts +6 -4
  393. package/dist/src/workflows/domain/definition-utils.js +28 -26
  394. package/dist/src/workflows/domain/definition-utils.js.map +1 -1
  395. package/dist/src/workflows/domain/definition.d.ts +79 -6
  396. package/dist/src/workflows/domain/event.d.ts +18 -2
  397. package/dist/src/workflows/domain/index.js +3 -3
  398. package/dist/src/workflows/domain/run.d.ts +16 -2
  399. package/dist/src/workflows/domain/run.js.map +1 -1
  400. package/dist/src/workflows/domain/validation.d.ts +9 -5
  401. package/dist/src/workflows/domain/validation.js +183 -40
  402. package/dist/src/workflows/domain/validation.js.map +1 -1
  403. package/dist/src/workflows/draft/workflow-draft-prompt.d.ts +2 -3
  404. package/dist/src/workflows/draft/workflow-draft-prompt.js +31 -73
  405. package/dist/src/workflows/draft/workflow-draft-prompt.js.map +1 -1
  406. package/dist/src/workflows/draft/workflow-draft-service.js +4 -8
  407. package/dist/src/workflows/draft/workflow-draft-service.js.map +1 -1
  408. package/dist/src/workflows/draft/workflow-draft-validator.js +29 -37
  409. package/dist/src/workflows/draft/workflow-draft-validator.js.map +1 -1
  410. package/dist/src/workflows/draft/workflow-draft.types.d.ts +4 -4
  411. package/dist/src/workflows/engine/projector.js +43 -1
  412. package/dist/src/workflows/engine/projector.js.map +1 -1
  413. package/dist/src/workflows/engine/workflow-engine.d.ts +2 -3
  414. package/dist/src/workflows/engine/workflow-engine.js +24 -4
  415. package/dist/src/workflows/engine/workflow-engine.js.map +1 -1
  416. package/dist/src/workflows/index.js +4 -7
  417. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js +1 -9
  418. package/dist/src/workflows/registry/catalog-workflow-definition-registry.js.map +1 -1
  419. package/dist/src/workflows/runtime/graph-workflow-runtime.d.ts +10 -0
  420. package/dist/src/workflows/runtime/graph-workflow-runtime.js +295 -0
  421. package/dist/src/workflows/runtime/graph-workflow-runtime.js.map +1 -0
  422. package/dist/src/workflows/runtime/index.d.ts +1 -2
  423. package/dist/src/workflows/runtime/index.js +2 -5
  424. package/dist/src/workflows/runtime/workflow-runtime-port.d.ts +5 -8
  425. package/dist/src/workflows/service/workflow-run-service.js +15 -1
  426. package/dist/src/workflows/service/workflow-run-service.js.map +1 -1
  427. package/dist/src/workflows/service/workflow-run-service.types.d.ts +2 -1
  428. package/package.json +4 -3
  429. package/dist/gateway/static/root/assets/agents-CyvCIHnB.js +0 -2
  430. package/dist/gateway/static/root/assets/apps-page-DK_Vx6nl.js +0 -1
  431. package/dist/gateway/static/root/assets/automation-suggestion-card-B1LV3YYv.js +0 -1
  432. package/dist/gateway/static/root/assets/automations-page-fzrovqhv.js +0 -4
  433. package/dist/gateway/static/root/assets/block-editor-Dhj5f4Bx.js +0 -184
  434. package/dist/gateway/static/root/assets/browser-settings-page-BDn-n-UB.js +0 -8
  435. package/dist/gateway/static/root/assets/capability-presets-settings-panel-Co5ipo_Q.js +0 -1
  436. package/dist/gateway/static/root/assets/channels-settings-BWlpaxg9.js +0 -1
  437. package/dist/gateway/static/root/assets/channels-status-swr-D_jkIZLV.js +0 -1
  438. package/dist/gateway/static/root/assets/connectors-page-BcekbW4q.js +0 -2
  439. package/dist/gateway/static/root/assets/desktop-pet-settings-BJCUuL8Y.js +0 -1
  440. package/dist/gateway/static/root/assets/dreaming-settings-BN1Z2mIo.js +0 -3
  441. package/dist/gateway/static/root/assets/extension-page-B-1KxvVy.js +0 -1
  442. package/dist/gateway/static/root/assets/extension-settings-page-BF9NACI3.js +0 -1
  443. package/dist/gateway/static/root/assets/gateway-settings-DN9sNREz.js +0 -1
  444. package/dist/gateway/static/root/assets/goal-create-dialog-BpoQW8cD.js +0 -1
  445. package/dist/gateway/static/root/assets/goal-detail-page-CBRSPd0b.js +0 -4
  446. package/dist/gateway/static/root/assets/goals-page-BCcBi407.js +0 -2
  447. package/dist/gateway/static/root/assets/goals-settings-pkTXzXkh.js +0 -1
  448. package/dist/gateway/static/root/assets/heartbeat-settings-ezsufgLQ.js +0 -1
  449. package/dist/gateway/static/root/assets/index-B8s8Pq5U.css +0 -1
  450. package/dist/gateway/static/root/assets/index-DcUaXYeb.js +0 -262
  451. package/dist/gateway/static/root/assets/logs-page-DQtTRXtj.js +0 -7
  452. package/dist/gateway/static/root/assets/messages-BXNELNBa.js +0 -3
  453. package/dist/gateway/static/root/assets/models-hub-panel-BP2M9n6Q.js +0 -2
  454. package/dist/gateway/static/root/assets/notes-page-CspveYaO.js +0 -1
  455. package/dist/gateway/static/root/assets/notes-workbench-BHwzJ0OC.js +0 -2
  456. package/dist/gateway/static/root/assets/project-detail-page-Dy3rsobs.js +0 -1
  457. package/dist/gateway/static/root/assets/projects-page-CWKpPE0L.js +0 -1
  458. package/dist/gateway/static/root/assets/remote-access-hub-CqNRyXEo.js +0 -1
  459. package/dist/gateway/static/root/assets/sessions-page-MEME7ivF.js +0 -1
  460. package/dist/gateway/static/root/assets/settings-advanced-gate-JVd0qaSF.js +0 -1
  461. package/dist/gateway/static/root/assets/settings-page-DYEbB1EV.js +0 -1
  462. package/dist/gateway/static/root/assets/setup-status-panel-dWN8BJ3z.js +0 -1
  463. package/dist/gateway/static/root/assets/share-preview-page-D8foINzP.js +0 -2
  464. package/dist/gateway/static/root/assets/shares-settings-Tgbv1s7G.js +0 -1
  465. package/dist/gateway/static/root/assets/skill-reload-api-D_YK0b_Z.js +0 -1
  466. package/dist/gateway/static/root/assets/skills-page-DGytfoZK.js +0 -2
  467. package/dist/gateway/static/root/assets/toast-z0toXu32.js +0 -1
  468. package/dist/gateway/static/root/assets/user-profile-settings-panel-8YtygcJp.js +0 -1
  469. package/dist/gateway/static/root/assets/voice-api-key-field-BVH71EFf.js +0 -1
  470. package/dist/gateway/static/root/assets/work-item-detail-page-JeTE7XNM.js +0 -1
  471. package/dist/gateway/static/root/assets/workflow-start-dialog-_u8Uc1ze.js +0 -1
  472. package/dist/gateway/static/root/assets/workflows-page-ixgk_y1l.js +0 -18
  473. package/dist/src/agent/workflow/builtins/audit-repo.d.ts +0 -13
  474. package/dist/src/agent/workflow/builtins/audit-repo.js +0 -183
  475. package/dist/src/agent/workflow/builtins/audit-repo.js.map +0 -1
  476. package/dist/src/agent/workflow/builtins/client-proposal.d.ts +0 -12
  477. package/dist/src/agent/workflow/builtins/client-proposal.js +0 -164
  478. package/dist/src/agent/workflow/builtins/client-proposal.js.map +0 -1
  479. package/dist/src/agent/workflow/builtins/competitor-scan.d.ts +0 -12
  480. package/dist/src/agent/workflow/builtins/competitor-scan.js +0 -164
  481. package/dist/src/agent/workflow/builtins/competitor-scan.js.map +0 -1
  482. package/dist/src/agent/workflow/builtins/content-draft.d.ts +0 -13
  483. package/dist/src/agent/workflow/builtins/content-draft.js +0 -159
  484. package/dist/src/agent/workflow/builtins/content-draft.js.map +0 -1
  485. package/dist/src/agent/workflow/builtins/content-repurpose.d.ts +0 -11
  486. package/dist/src/agent/workflow/builtins/content-repurpose.js +0 -146
  487. package/dist/src/agent/workflow/builtins/content-repurpose.js.map +0 -1
  488. package/dist/src/agent/workflow/builtins/debug-incident.d.ts +0 -13
  489. package/dist/src/agent/workflow/builtins/debug-incident.js +0 -177
  490. package/dist/src/agent/workflow/builtins/debug-incident.js.map +0 -1
  491. package/dist/src/agent/workflow/builtins/decision-compare.d.ts +0 -13
  492. package/dist/src/agent/workflow/builtins/decision-compare.js +0 -187
  493. package/dist/src/agent/workflow/builtins/decision-compare.js.map +0 -1
  494. package/dist/src/agent/workflow/builtins/implementation-plan.d.ts +0 -12
  495. package/dist/src/agent/workflow/builtins/implementation-plan.js +0 -185
  496. package/dist/src/agent/workflow/builtins/implementation-plan.js.map +0 -1
  497. package/dist/src/agent/workflow/builtins/inbox-triage.d.ts +0 -11
  498. package/dist/src/agent/workflow/builtins/inbox-triage.js +0 -158
  499. package/dist/src/agent/workflow/builtins/inbox-triage.js.map +0 -1
  500. package/dist/src/agent/workflow/builtins/meeting-prep.d.ts +0 -12
  501. package/dist/src/agent/workflow/builtins/meeting-prep.js +0 -152
  502. package/dist/src/agent/workflow/builtins/meeting-prep.js.map +0 -1
  503. package/dist/src/agent/workflow/builtins/multi-perspective-review.d.ts +0 -14
  504. package/dist/src/agent/workflow/builtins/multi-perspective-review.js +0 -171
  505. package/dist/src/agent/workflow/builtins/multi-perspective-review.js.map +0 -1
  506. package/dist/src/agent/workflow/builtins/offer-design.d.ts +0 -12
  507. package/dist/src/agent/workflow/builtins/offer-design.js +0 -170
  508. package/dist/src/agent/workflow/builtins/offer-design.js.map +0 -1
  509. package/dist/src/agent/workflow/builtins/pr-review.d.ts +0 -12
  510. package/dist/src/agent/workflow/builtins/pr-review.js +0 -178
  511. package/dist/src/agent/workflow/builtins/pr-review.js.map +0 -1
  512. package/dist/src/agent/workflow/builtins/release-check.d.ts +0 -11
  513. package/dist/src/agent/workflow/builtins/release-check.js +0 -174
  514. package/dist/src/agent/workflow/builtins/release-check.js.map +0 -1
  515. package/dist/src/agent/workflow/builtins/research.d.ts +0 -13
  516. package/dist/src/agent/workflow/builtins/research.js +0 -188
  517. package/dist/src/agent/workflow/builtins/research.js.map +0 -1
  518. package/dist/src/agent/workflow/builtins/weekly-review.d.ts +0 -12
  519. package/dist/src/agent/workflow/builtins/weekly-review.js +0 -139
  520. package/dist/src/agent/workflow/builtins/weekly-review.js.map +0 -1
  521. package/dist/src/agent/workflow/last-run-memory.d.ts +0 -42
  522. package/dist/src/agent/workflow/last-run-memory.js +0 -60
  523. package/dist/src/agent/workflow/last-run-memory.js.map +0 -1
  524. package/dist/src/agent/workflow/lint.d.ts +0 -38
  525. package/dist/src/agent/workflow/lint.js +0 -74
  526. package/dist/src/agent/workflow/lint.js.map +0 -1
  527. package/dist/src/agent/workflow/meta-locale.d.ts +0 -12
  528. package/dist/src/agent/workflow/meta-locale.js +0 -62
  529. package/dist/src/agent/workflow/meta-locale.js.map +0 -1
  530. package/dist/src/agent/workflow/parser.d.ts +0 -20
  531. package/dist/src/agent/workflow/parser.js +0 -152
  532. package/dist/src/agent/workflow/parser.js.map +0 -1
  533. package/dist/src/agent/workflow/runtime.d.ts +0 -34
  534. package/dist/src/agent/workflow/runtime.js +0 -402
  535. package/dist/src/agent/workflow/runtime.js.map +0 -1
  536. package/dist/src/connectors/oauth.d.ts +0 -22
  537. package/dist/src/connectors/oauth.js +0 -99
  538. package/dist/src/connectors/oauth.js.map +0 -1
  539. package/dist/src/workflows/runtime/script-runtime.d.ts +0 -3
  540. package/dist/src/workflows/runtime/script-runtime.js +0 -3
  541. package/dist/src/workflows/runtime/script-workflow-runtime.d.ts +0 -5
  542. package/dist/src/workflows/runtime/script-workflow-runtime.js +0 -15
  543. package/dist/src/workflows/runtime/script-workflow-runtime.js.map +0 -1
@@ -1,174 +0,0 @@
1
- //#region src/agent/workflow/builtins/release-check.ts
2
- /**
3
- * Built-in workflow: `release_check`
4
- *
5
- * Runs a release-readiness review for a finished change. It inspects the diff,
6
- * validates risk areas in parallel, and produces a go/no-go checklist.
7
- *
8
- * Args:
9
- * - target: release candidate, branch, commit range, or feature summary
10
- * - checks: optional subset of check keys
11
- */
12
- const RELEASE_CHECK_SCRIPT = `export const meta = {
13
- name: 'release_check',
14
- description: 'Assess whether a change is ready to release with parallel risk checks and a go/no-go verdict.',
15
- whenToUse: 'User is near the end of implementation and wants a release-quality readiness check before shipping.',
16
- examplePrompts: [
17
- { field: 'target', text: 'Is this repo ready to release v1.2?' },
18
- { field: 'target', text: 'Pre-release readiness check for the current branch' },
19
- ],
20
- i18n: {
21
- zh: {
22
- description: '并行检查发布风险,判断变更是否达到可发布标准。',
23
- whenToUse: '用户接近开发尾声,想在发布前做发布质量/就绪检查时。',
24
- examplePrompts: [
25
- { field: 'target', text: '这个仓库是否准备好发布 v1.2?' },
26
- { field: 'target', text: '对当前分支做发布前就绪检查' },
27
- ],
28
- },
29
- },
30
- tags: ['release', 'quality', 'validation'],
31
- estimatedAgents: { min: 6, max: 7 },
32
- phases: [
33
- { title: 'Scope' },
34
- { title: 'Checks' },
35
- { title: 'Verdict' },
36
- ],
37
- }
38
-
39
- const READ_ONLY_TOOLS = ['read_file', 'grep', 'find', 'list_dir', 'exec_command']
40
-
41
- const target = args && typeof args === 'object' && args.target
42
- ? String(args.target)
43
- : 'Current working tree or release candidate from the conversation context.'
44
-
45
- const ALL_CHECKS = [
46
- { key: 'regression', focus: 'Behavior changes, compatibility breaks, edge cases, and accidental scope creep.' },
47
- { key: 'tests', focus: 'Relevant automated tests, missing regression cases, flaky or weak assertions, and manual coverage gaps.' },
48
- { key: 'build', focus: 'Typecheck, lint, build, packaging, lazy imports, generated assets, and dependency correctness.' },
49
- { key: 'security', focus: 'Secrets, auth/authz, input validation, unsafe shell/file/network access, and data exposure.' },
50
- { key: 'ops', focus: 'Logging, observability, migrations, persistence, rollback, failure modes, and supportability.' },
51
- ]
52
-
53
- let checks = ALL_CHECKS
54
- if (args && typeof args === 'object' && Array.isArray(args.checks) && args.checks.length) {
55
- const selected = new Set(args.checks.map((check) => String(check)))
56
- checks = ALL_CHECKS.filter((check) => selected.has(check.key))
57
- if (!checks.length) checks = ALL_CHECKS
58
- }
59
-
60
- phase('Scope')
61
- const scope = await agent(
62
- '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' +
63
- 'TARGET:\\n' + target,
64
- {
65
- label: 'release scope',
66
- toolset: READ_ONLY_TOOLS,
67
- schema: {
68
- type: 'object',
69
- properties: {
70
- changedAreas: { type: 'array', items: { type: 'string' } },
71
- userVisibleChanges: { type: 'array', items: { type: 'string' } },
72
- blastRadius: { type: 'string' },
73
- },
74
- required: ['changedAreas', 'blastRadius'],
75
- },
76
- },
77
- )
78
-
79
- phase('Checks')
80
- const reports = await parallel(
81
- checks.map((check) => () =>
82
- agent(
83
- 'Run a release-readiness check through the ' + check.key + ' lens.\\n' +
84
- 'Focus: ' + check.focus + '\\n\\n' +
85
- 'TARGET:\\n' + target + '\\n\\n' +
86
- 'SCOPE:\\n' + JSON.stringify(scope, null, 2) + '\\n\\n' +
87
- 'Return blockers, warnings, evidence, and concrete fixes. Prefer specific files/commands over generic statements.',
88
- {
89
- label: check.key + ' check',
90
- toolset: READ_ONLY_TOOLS,
91
- schema: {
92
- type: 'object',
93
- properties: {
94
- blockers: {
95
- type: 'array',
96
- items: {
97
- type: 'object',
98
- properties: {
99
- title: { type: 'string' },
100
- evidence: { type: 'string' },
101
- fix: { type: 'string' },
102
- },
103
- required: ['title', 'evidence', 'fix'],
104
- },
105
- },
106
- warnings: {
107
- type: 'array',
108
- items: {
109
- type: 'object',
110
- properties: {
111
- title: { type: 'string' },
112
- evidence: { type: 'string' },
113
- fix: { type: 'string' },
114
- },
115
- required: ['title', 'evidence'],
116
- },
117
- },
118
- recommendedCommands: { type: 'array', items: { type: 'string' } },
119
- },
120
- required: ['blockers', 'warnings'],
121
- },
122
- },
123
- ),
124
- ),
125
- )
126
-
127
- phase('Verdict')
128
- const byCheck = {}
129
- for (let i = 0; i < checks.length; i++) {
130
- byCheck[checks[i].key] = reports[i] ?? { blockers: [], warnings: [], recommendedCommands: [] }
131
- }
132
-
133
- const verdict = await agent(
134
- 'Synthesize a release go/no-go verdict. Block if any credible blocker remains. If not blocked, distinguish ship_now from ship_after_checks. ' +
135
- 'Deduplicate issues and produce the shortest checklist that would make this release safe.\\n\\n' +
136
- JSON.stringify({ target, scope, byCheck }, null, 2),
137
- {
138
- label: 'release verdict',
139
- schema: {
140
- type: 'object',
141
- properties: {
142
- recommendation: { type: 'string', enum: ['ship_now', 'ship_after_checks', 'block'] },
143
- summary: { type: 'string' },
144
- blockers: { type: 'array', items: { type: 'string' } },
145
- finalChecklist: { type: 'array', items: { type: 'string' } },
146
- commandsToRun: { type: 'array', items: { type: 'string' } },
147
- },
148
- required: ['recommendation', 'summary', 'blockers', 'finalChecklist'],
149
- },
150
- },
151
- )
152
-
153
- const output = {
154
- ok: true,
155
- target,
156
- checks: checks.map((check) => check.key),
157
- scope,
158
- ...(verdict ?? { recommendation: 'ship_after_checks', summary: 'verdict failed', blockers: [], finalChecklist: [] }),
159
- byCheck,
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
- }
170
- `;
171
- //#endregion
172
- export { RELEASE_CHECK_SCRIPT };
173
-
174
- //# sourceMappingURL=release-check.js.map
@@ -1 +0,0 @@
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', 'exec_command']\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"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Built-in workflow: `research`
3
- *
4
- * Multi-modal research sweep on a question (args.question). Fans out search /
5
- * exploration / source-reading angles in parallel, then synthesises a cited
6
- * report. Each angle is its own subagent so source reading does not pollute the
7
- * parent context.
8
- *
9
- * Args:
10
- * - question: research question
11
- * - depth: 'quick' (2 angles) | 'standard' (4) | 'deep' (6)
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 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";
@@ -1,188 +0,0 @@
1
- //#region src/agent/workflow/builtins/research.ts
2
- /**
3
- * Built-in workflow: `research`
4
- *
5
- * Multi-modal research sweep on a question (args.question). Fans out search /
6
- * exploration / source-reading angles in parallel, then synthesises a cited
7
- * report. Each angle is its own subagent so source reading does not pollute the
8
- * parent context.
9
- *
10
- * Args:
11
- * - question: research question
12
- * - depth: 'quick' (2 angles) | 'standard' (4) | 'deep' (6)
13
- */
14
- const RESEARCH_SCRIPT = `export const meta = {
15
- name: 'research',
16
- description: 'Multi-angle research on a question with parallel exploration and a cited synthesis.',
17
- whenToUse: 'User asks a non-trivial research question that benefits from multiple search angles or source reads.',
18
- examplePrompts: [
19
- { field: 'question', text: 'Compare Bun vs Node startup performance' },
20
- { field: 'question', text: 'What are the trade-offs of SQLite vs Postgres for this app?' },
21
- ],
22
- i18n: {
23
- zh: {
24
- description: '多角度并行调研一个问题,并产出带引用的综合报告。',
25
- whenToUse: '用户提出需要多角度检索、阅读来源的非平凡调研问题时。',
26
- examplePrompts: [
27
- { field: 'question', text: '比较 Bun 与 Node 的启动性能' },
28
- { field: 'question', text: '这个应用用 SQLite 还是 Postgres 各有什么权衡?' },
29
- ],
30
- },
31
- },
32
- tags: ['research', 'investigation'],
33
- estimatedAgents: { min: 4, max: 8 },
34
- phases: [
35
- { title: 'Frame' },
36
- { title: 'Sweep' },
37
- { title: 'Synthesize' },
38
- ],
39
- }
40
-
41
- const RESEARCH_TOOLS = ['web_search', 'web_fetch', 'read_file', 'grep', 'find', 'list_dir']
42
-
43
- const question = args && typeof args === 'object' && args.question
44
- ? String(args.question)
45
- : 'No explicit question supplied; infer from the most recent user turn.'
46
-
47
- const depth = args && typeof args === 'object' && args.depth
48
- ? String(args.depth)
49
- : 'standard'
50
- const maxAngles = depth === 'quick' ? 2 : depth === 'deep' ? 6 : 4
51
-
52
- phase('Frame')
53
- const frame = await agent(
54
- 'Frame this research question. Return exactly ' + maxAngles + ' distinct angles worth investigating, ' +
55
- 'each with the single most decisive sub-question. Be concrete.\\n\\nQUESTION:\\n' +
56
- question,
57
- {
58
- label: 'framing',
59
- schema: {
60
- type: 'object',
61
- properties: {
62
- angles: {
63
- type: 'array',
64
- items: {
65
- type: 'object',
66
- properties: {
67
- title: { type: 'string' },
68
- key_question: { type: 'string' },
69
- },
70
- required: ['title', 'key_question'],
71
- },
72
- },
73
- },
74
- required: ['angles'],
75
- },
76
- },
77
- )
78
-
79
- if (!frame || !frame.angles?.length) {
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
- }
86
- }
87
-
88
- const angles = frame.angles.slice(0, maxAngles)
89
-
90
- phase('Sweep')
91
- const angleReports = await parallel(
92
- angles.map((a) => () =>
93
- agent(
94
- 'Investigate this angle. Use search and source-read tools liberally. Distinguish what you can confirm from what is conjecture.\\n\\n' +
95
- 'ANGLE: ' + a.title + '\\n' +
96
- 'KEY QUESTION: ' + a.key_question + '\\n\\n' +
97
- 'Return: 3–6 grounded findings (each with a 1-line claim and a source URL or file path), plus the strongest counter-evidence.',
98
- {
99
- label: a.title,
100
- toolset: RESEARCH_TOOLS,
101
- maxIterations: depth === 'deep' ? 40 : 30,
102
- schema: {
103
- type: 'object',
104
- properties: {
105
- findings: {
106
- type: 'array',
107
- items: {
108
- type: 'object',
109
- properties: {
110
- claim: { type: 'string' },
111
- source: { type: 'string' },
112
- confidence: { type: 'string', enum: ['low', 'med', 'high'] },
113
- },
114
- required: ['claim', 'source', 'confidence'],
115
- },
116
- },
117
- counterEvidence: { type: 'string' },
118
- },
119
- required: ['findings'],
120
- },
121
- },
122
- ),
123
- ),
124
- )
125
-
126
- phase('Synthesize')
127
- const live = angleReports.filter(Boolean)
128
- const synthesis = await agent(
129
- 'Synthesize a cited research report from these angle-level findings. Drop unsupported or duplicate claims. Use the highest-confidence source per claim. ' +
130
- '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' +
131
- 'QUESTION:\\n' + question + '\\n\\n' +
132
- JSON.stringify({ angles, reports: live }, null, 2),
133
- {
134
- label: 'synthesis',
135
- schema: {
136
- type: 'object',
137
- properties: {
138
- executiveSummary: { type: 'string' },
139
- topFindings: {
140
- type: 'array',
141
- items: {
142
- type: 'object',
143
- properties: {
144
- claim: { type: 'string' },
145
- source: { type: 'string' },
146
- },
147
- required: ['claim', 'source'],
148
- },
149
- },
150
- openQuestions: { type: 'array', items: { type: 'string' } },
151
- contradictions: {
152
- type: 'array',
153
- items: {
154
- type: 'object',
155
- properties: {
156
- topic: { type: 'string' },
157
- sides: { type: 'array', items: { type: 'string' } },
158
- },
159
- required: ['topic', 'sides'],
160
- },
161
- },
162
- },
163
- required: ['executiveSummary', 'topFindings'],
164
- },
165
- },
166
- )
167
-
168
- const output = {
169
- ok: true,
170
- question,
171
- depth,
172
- angleCount: angles.length,
173
- ...(synthesis ?? { executiveSummary: 'synthesis failed', topFindings: [], contradictions: [] }),
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
- }
184
- `;
185
- //#endregion
186
- export { RESEARCH_SCRIPT };
187
-
188
- //# sourceMappingURL=research.js.map
@@ -1 +0,0 @@
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"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Built-in workflow: `weekly_review`
3
- *
4
- * Weekly retrospective for solopreneurs — collect wins, blockers, and carryover,
5
- * then synthesize next-week priorities.
6
- *
7
- * Args:
8
- * - wins: what went well this week
9
- * - blockers: what stalled or frustrated progress
10
- * - carryover: unfinished items (optional)
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\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";
@@ -1,139 +0,0 @@
1
- //#region src/agent/workflow/builtins/weekly-review.ts
2
- /**
3
- * Built-in workflow: `weekly_review`
4
- *
5
- * Weekly retrospective for solopreneurs — collect wins, blockers, and carryover,
6
- * then synthesize next-week priorities.
7
- *
8
- * Args:
9
- * - wins: what went well this week
10
- * - blockers: what stalled or frustrated progress
11
- * - carryover: unfinished items (optional)
12
- */
13
- const WEEKLY_REVIEW_SCRIPT = `export const meta = {
14
- name: 'weekly_review',
15
- description: 'Review the week and produce 3–5 prioritized actions for next week.',
16
- whenToUse: 'Solo founder or super-individual doing a weekly retrospective and planning session.',
17
- examplePrompts: [
18
- { field: 'wins', text: 'Shipped landing page, got 2 demo calls, published one newsletter' },
19
- { field: 'blockers', text: 'Pricing still unclear, one client ghosted, distracted by side tasks' },
20
- ],
21
- i18n: {
22
- zh: {
23
- description: '复盘本周并产出下周 3–5 项优先行动。',
24
- whenToUse: '一人公司或超级个体做周复盘与下周规划时。',
25
- examplePrompts: [
26
- { field: 'wins', text: '上线了落地页、拿到 2 个 demo、发了一期 newsletter' },
27
- { field: 'blockers', text: '定价还不清晰、一个客户失联、被杂事分心' },
28
- ],
29
- },
30
- },
31
- tags: ['productivity', 'brainstorm'],
32
- estimatedAgents: { min: 3, max: 4 },
33
- phases: [
34
- { title: 'Collect' },
35
- { title: 'Analyze' },
36
- { title: 'Plan' },
37
- ],
38
- }
39
-
40
- const wins = args && typeof args === 'object' && args.wins
41
- ? String(args.wins)
42
- : 'Infer wins from the most recent user turn.'
43
-
44
- const blockers = args && typeof args === 'object' && args.blockers
45
- ? String(args.blockers)
46
- : 'None specified — infer from context if possible.'
47
-
48
- const carryover = args && typeof args === 'object' && args.carryover
49
- ? String(args.carryover)
50
- : ''
51
-
52
- phase('Collect')
53
- const collected = await agent(
54
- 'Normalize this weekly input into structured facts: wins, blockers, carryover, energy level signals, and revenue/impact signals if mentioned. Be concise.\\n\\n' +
55
- 'WINS:\\n' + wins + '\\nBLOCKERS:\\n' + blockers + '\\nCARRYOVER:\\n' + (carryover || '(none)'),
56
- {
57
- label: 'collect',
58
- schema: {
59
- type: 'object',
60
- properties: {
61
- wins: { type: 'array', items: { type: 'string' } },
62
- blockers: { type: 'array', items: { type: 'string' } },
63
- carryover: { type: 'array', items: { type: 'string' } },
64
- themes: { type: 'array', items: { type: 'string' } },
65
- },
66
- required: ['wins', 'blockers'],
67
- },
68
- },
69
- )
70
-
71
- phase('Analyze')
72
- const analysis = await agent(
73
- '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' +
74
- JSON.stringify(collected, null, 2),
75
- {
76
- label: 'analyze',
77
- schema: {
78
- type: 'object',
79
- properties: {
80
- patterns: { type: 'array', items: { type: 'string' } },
81
- rootCauses: { type: 'array', items: { type: 'string' } },
82
- stopDoing: { type: 'array', items: { type: 'string' } },
83
- doubleDown: { type: 'array', items: { type: 'string' } },
84
- lesson: { type: 'string' },
85
- },
86
- required: ['patterns', 'lesson'],
87
- },
88
- },
89
- )
90
-
91
- phase('Plan')
92
- const plan = await agent(
93
- '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' +
94
- JSON.stringify({ collected, analysis }, null, 2),
95
- {
96
- label: 'plan',
97
- schema: {
98
- type: 'object',
99
- properties: {
100
- priorities: {
101
- type: 'array',
102
- items: {
103
- type: 'object',
104
- properties: {
105
- action: { type: 'string' },
106
- why: { type: 'string' },
107
- effort: { type: 'string', enum: ['low', 'med', 'high'] },
108
- successSignal: { type: 'string' },
109
- },
110
- required: ['action', 'why', 'successSignal'],
111
- },
112
- },
113
- stretchGoal: { type: 'string' },
114
- weeklyTheme: { type: 'string' },
115
- },
116
- required: ['priorities', 'weeklyTheme'],
117
- },
118
- },
119
- )
120
-
121
- const output = {
122
- ok: true,
123
- collected,
124
- analysis,
125
- ...(plan ?? { priorities: [], weeklyTheme: 'planning failed' }),
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
- }
135
- `;
136
- //#endregion
137
- export { WEEKLY_REVIEW_SCRIPT };
138
-
139
- //# sourceMappingURL=weekly-review.js.map
@@ -1 +0,0 @@
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,42 +0,0 @@
1
- /**
2
- * Per-session memory of the most recent workflow script that ran successfully.
3
- *
4
- * Purpose: enable `/workflow save <name>` — the user sees a workflow run,
5
- * likes it, types `/workflow save audit_repo_strict`, and the model-generated
6
- * script lands in `~/.xopc/workflows/`.
7
- *
8
- * Scope decision (KISS):
9
- * - In-memory only, keyed by sessionKey. Cleared on process restart. OPC is
10
- * long-lived per session, so the practical window is "from when the user
11
- * ran the workflow until they save it" — minutes, not days. Persisting
12
- * across restarts would require either session-store coupling or a separate
13
- * sidecar file, both bigger than the value.
14
- * - Records on EVERY successful workflow tool execution, including runs by
15
- * name (so users can re-save a slightly modified built-in too).
16
- * - Bounded by a small LRU so a runaway never grows the heap.
17
- */
18
- export interface LastWorkflowEntry {
19
- /** Raw workflow script as the runtime saw it (post-fence-strip, pre-parse). */
20
- script: string;
21
- /** meta.name from the script (used to default a save target). */
22
- metaName: string;
23
- /** Where the script came from on this run — for save-time UX hints. */
24
- source: 'name' | 'script';
25
- /** ms since epoch when recorded — UI uses this for "ran 2 min ago". */
26
- recordedAt: number;
27
- }
28
- declare class LastWorkflowMemoryImpl {
29
- private readonly maxEntries;
30
- private readonly entries;
31
- constructor(maxEntries?: number);
32
- record(sessionKey: string | undefined, entry: LastWorkflowEntry): void;
33
- get(sessionKey: string | undefined): LastWorkflowEntry | undefined;
34
- clear(sessionKey?: string): void;
35
- /** Visible for tests; do not consume from production code. */
36
- _size(): number;
37
- }
38
- export type LastWorkflowMemory = LastWorkflowMemoryImpl;
39
- export declare function getLastWorkflowMemory(): LastWorkflowMemoryImpl;
40
- /** Reset the singleton (tests only). */
41
- export declare function _resetLastWorkflowMemoryForTests(): void;
42
- export {};