@agent-native/core 0.118.0 → 0.119.0

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 (480) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +32 -0
  3. package/corpus/core/docs/content/a2a-protocol.mdx +15 -0
  4. package/corpus/core/docs/content/template-chat.mdx +1 -1
  5. package/corpus/core/docs/content/template-plan.mdx +3 -3
  6. package/corpus/core/package.json +1 -1
  7. package/corpus/core/src/a2a/activity.ts +371 -0
  8. package/corpus/core/src/a2a/client.ts +35 -11
  9. package/corpus/core/src/a2a/index.ts +21 -0
  10. package/corpus/core/src/a2a/types.ts +8 -0
  11. package/corpus/core/src/agent/model-config.ts +19 -23
  12. package/corpus/core/src/agent/production-agent.ts +167 -100
  13. package/corpus/core/src/agent/types.ts +16 -1
  14. package/corpus/core/src/cli/index.ts +18 -10
  15. package/corpus/core/src/cli/multi-frontier-runs.ts +5 -3
  16. package/corpus/core/src/cli/templates-meta.ts +0 -12
  17. package/corpus/core/src/cli/workspace-dev.ts +1 -1
  18. package/corpus/core/src/client/AgentPanel.tsx +9 -1
  19. package/corpus/core/src/client/RunStuckBanner.tsx +39 -47
  20. package/corpus/core/src/client/chat/action-chat-ui-surface.tsx +32 -0
  21. package/corpus/core/src/client/chat/message-components.tsx +53 -8
  22. package/corpus/core/src/client/chat/tool-call-display.tsx +214 -44
  23. package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +0 -1
  24. package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +7 -3
  25. package/corpus/core/src/client/chat-model-groups.ts +67 -27
  26. package/corpus/core/src/client/conversation/AgentConversation.tsx +12 -1
  27. package/corpus/core/src/client/error-capture.ts +2 -6
  28. package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +20 -14
  29. package/corpus/core/src/client/resources/ResourcesPanel.tsx +5 -1
  30. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +7 -17
  31. package/corpus/core/src/client/resources/mcp-integration-logos.ts +2 -2
  32. package/corpus/core/src/client/route-chunk-recovery.ts +5 -3
  33. package/corpus/core/src/client/session-replay.ts +3 -3
  34. package/corpus/core/src/client/settings/SettingsPanel.tsx +15 -6
  35. package/corpus/core/src/client/sharing/ShareButton.tsx +1 -27
  36. package/corpus/core/src/client/sharing/ShareDialog.tsx +0 -16
  37. package/corpus/core/src/client/sharing/useShareButtonController.ts +0 -7
  38. package/corpus/core/src/client/sharing/useShareDialogController.ts +0 -2
  39. package/corpus/core/src/client/sse-event-processor.ts +85 -1
  40. package/corpus/core/src/client/transcription/use-live-transcription.ts +64 -45
  41. package/corpus/core/src/deploy/build.ts +2 -1
  42. package/corpus/core/src/guards/db-tool-scoping.ts +1 -1
  43. package/corpus/core/src/integrations/adapters/slack.ts +84 -5
  44. package/corpus/core/src/integrations/index.ts +5 -1
  45. package/corpus/core/src/localization/default-messages.ts +7 -1
  46. package/corpus/core/src/mcp-client/oauth-routes.ts +45 -12
  47. package/corpus/core/src/scripts/agent-engines/list-agent-engines.ts +1 -18
  48. package/corpus/core/src/scripts/call-agent.ts +49 -6
  49. package/corpus/core/src/server/agent-chat-plugin.ts +50 -10
  50. package/corpus/core/src/server/realtime-voice.ts +4 -1
  51. package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +16 -0
  52. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
  53. package/corpus/core/src/terminal/cli-registry.ts +1 -1
  54. package/corpus/core/src/vite/client.ts +166 -1
  55. package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +13 -1
  56. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +10 -0
  57. package/corpus/templates/analytics/changelog/2026-07-22-show-a-useful-error-when-saving-a-dashboard-view-fails.md +6 -0
  58. package/corpus/templates/brain/app/routes/sources.tsx +181 -114
  59. package/corpus/templates/clips/AGENTS.md +8 -6
  60. package/corpus/templates/clips/actions/request-transcript.ts +90 -420
  61. package/corpus/templates/clips/actions/save-browser-transcript.ts +11 -28
  62. package/corpus/templates/clips/app/components/capture-install-options.tsx +5 -3
  63. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -136
  64. package/corpus/templates/clips/app/lib/capture-install-options.ts +15 -4
  65. package/corpus/templates/clips/app/routes/download.tsx +3 -2
  66. package/corpus/templates/clips/changelog/2026-07-22-fixed-an-intermittent-hydration-error-on-the-download-page.md +6 -0
  67. package/corpus/templates/clips/changelog/2026-07-22-fixed-transcript-generation-when-native-speech-capture-retur.md +6 -0
  68. package/corpus/templates/clips/changelog/2026-07-22-transcript-generation-now-retries-with-backup-speech-recogni.md +6 -0
  69. package/corpus/templates/clips/changelog/2026-07-23-fixed-recordings-failing-to-save-with-a-cancelled-or-cleanup.md +6 -0
  70. package/corpus/templates/clips/server/lib/public-agent-context.ts +2 -2
  71. package/corpus/templates/clips/server/plugins/db.ts +9 -1
  72. package/corpus/templates/clips/server/register-secrets.ts +7 -6
  73. package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +16 -84
  74. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +13 -7
  75. package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -2
  76. package/corpus/templates/content/app/i18n-data.ts +10 -0
  77. package/corpus/templates/design/server/lib/fig-file-decoder.ts +1 -0
  78. package/corpus/templates/plan/app/entry.client.tsx +3 -0
  79. package/corpus/templates/plan/changelog/2026-07-22-recover-stale-pages-after-a-deployment-refresh-automatically.md +6 -0
  80. package/corpus/templates/slides/app/hooks/use-agent-generating.ts +10 -3
  81. package/corpus/templates/slides/app/pages/Index.tsx +1 -0
  82. package/corpus/templates/slides/changelog/2026-07-22-new-deck-prompts-now-open-in-their-own-visible-chat-thread.md +6 -0
  83. package/corpus/toolkit/CHANGELOG.md +9 -0
  84. package/corpus/toolkit/package.json +1 -1
  85. package/corpus/toolkit/src/composer/PromptComposer.tsx +5 -1
  86. package/corpus/toolkit/src/composer/RealtimeVoiceMode.tsx +119 -31
  87. package/corpus/toolkit/src/composer/useRealtimeVoiceMode.tsx +30 -0
  88. package/corpus/toolkit/src/conformance/runner.tsx +153 -1
  89. package/corpus/toolkit/src/editor/SharedRichEditor.tsx +13 -2
  90. package/corpus/toolkit/src/editor/SlashCommandMenu.tsx +20 -0
  91. package/corpus/toolkit/src/editor/index.ts +2 -0
  92. package/corpus/toolkit/src/styles.css +52 -23
  93. package/dist/a2a/activity.d.ts +50 -0
  94. package/dist/a2a/activity.d.ts.map +1 -0
  95. package/dist/a2a/activity.js +236 -0
  96. package/dist/a2a/activity.js.map +1 -0
  97. package/dist/a2a/client.d.ts +5 -1
  98. package/dist/a2a/client.d.ts.map +1 -1
  99. package/dist/a2a/client.js +18 -13
  100. package/dist/a2a/client.js.map +1 -1
  101. package/dist/a2a/index.d.ts +2 -1
  102. package/dist/a2a/index.d.ts.map +1 -1
  103. package/dist/a2a/index.js +1 -0
  104. package/dist/a2a/index.js.map +1 -1
  105. package/dist/a2a/types.d.ts +1 -0
  106. package/dist/a2a/types.d.ts.map +1 -1
  107. package/dist/a2a/types.js.map +1 -1
  108. package/dist/agent/engine/anthropic-engine.d.ts +1 -1
  109. package/dist/agent/engine/builder-engine.d.ts +2 -2
  110. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  111. package/dist/agent/model-config.d.ts +16 -16
  112. package/dist/agent/model-config.d.ts.map +1 -1
  113. package/dist/agent/model-config.js +19 -23
  114. package/dist/agent/model-config.js.map +1 -1
  115. package/dist/agent/production-agent.d.ts +26 -0
  116. package/dist/agent/production-agent.d.ts.map +1 -1
  117. package/dist/agent/production-agent.js +137 -80
  118. package/dist/agent/production-agent.js.map +1 -1
  119. package/dist/agent/types.d.ts +10 -0
  120. package/dist/agent/types.d.ts.map +1 -1
  121. package/dist/agent/types.js.map +1 -1
  122. package/dist/cli/index.js +18 -8
  123. package/dist/cli/index.js.map +1 -1
  124. package/dist/cli/multi-frontier-runs.js +3 -3
  125. package/dist/cli/multi-frontier-runs.js.map +1 -1
  126. package/dist/cli/templates-meta.d.ts.map +1 -1
  127. package/dist/cli/templates-meta.js +0 -12
  128. package/dist/cli/templates-meta.js.map +1 -1
  129. package/dist/cli/workspace-dev.js +1 -1
  130. package/dist/cli/workspace-dev.js.map +1 -1
  131. package/dist/client/AgentPanel.d.ts.map +1 -1
  132. package/dist/client/AgentPanel.js +4 -1
  133. package/dist/client/AgentPanel.js.map +1 -1
  134. package/dist/client/RunStuckBanner.d.ts +3 -5
  135. package/dist/client/RunStuckBanner.d.ts.map +1 -1
  136. package/dist/client/RunStuckBanner.js +17 -18
  137. package/dist/client/RunStuckBanner.js.map +1 -1
  138. package/dist/client/chat/action-chat-ui-surface.d.ts +8 -0
  139. package/dist/client/chat/action-chat-ui-surface.d.ts.map +1 -0
  140. package/dist/client/chat/action-chat-ui-surface.js +10 -0
  141. package/dist/client/chat/action-chat-ui-surface.js.map +1 -0
  142. package/dist/client/chat/message-components.d.ts +3 -0
  143. package/dist/client/chat/message-components.d.ts.map +1 -1
  144. package/dist/client/chat/message-components.js +40 -7
  145. package/dist/client/chat/message-components.js.map +1 -1
  146. package/dist/client/chat/tool-call-display.d.ts +3 -1
  147. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  148. package/dist/client/chat/tool-call-display.js +76 -23
  149. package/dist/client/chat/tool-call-display.js.map +1 -1
  150. package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
  151. package/dist/client/chat/widgets/InlineExtensionWidget.js +1 -1
  152. package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
  153. package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
  154. package/dist/client/chat/widgets/builtin-tool-renderers.js +5 -3
  155. package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
  156. package/dist/client/chat-model-groups.d.ts.map +1 -1
  157. package/dist/client/chat-model-groups.js +44 -21
  158. package/dist/client/chat-model-groups.js.map +1 -1
  159. package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
  160. package/dist/client/conversation/AgentConversation.js +3 -2
  161. package/dist/client/conversation/AgentConversation.js.map +1 -1
  162. package/dist/client/error-capture.d.ts.map +1 -1
  163. package/dist/client/error-capture.js +2 -2
  164. package/dist/client/error-capture.js.map +1 -1
  165. package/dist/client/resources/McpConnectionSuggestion.d.ts +1 -0
  166. package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
  167. package/dist/client/resources/McpConnectionSuggestion.js +9 -8
  168. package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
  169. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  170. package/dist/client/resources/ResourcesPanel.js +3 -1
  171. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  172. package/dist/client/resources/mcp-integration-catalog.d.ts +1 -0
  173. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  174. package/dist/client/resources/mcp-integration-catalog.js +4 -17
  175. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  176. package/dist/client/resources/mcp-integration-logos.js +2 -2
  177. package/dist/client/resources/mcp-integration-logos.js.map +1 -1
  178. package/dist/client/route-chunk-recovery.d.ts.map +1 -1
  179. package/dist/client/route-chunk-recovery.js +5 -3
  180. package/dist/client/route-chunk-recovery.js.map +1 -1
  181. package/dist/client/session-replay.js +3 -3
  182. package/dist/client/session-replay.js.map +1 -1
  183. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  184. package/dist/client/settings/SettingsPanel.js +2 -2
  185. package/dist/client/settings/SettingsPanel.js.map +1 -1
  186. package/dist/client/sharing/ShareButton.d.ts +1 -1
  187. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  188. package/dist/client/sharing/ShareButton.js +3 -4
  189. package/dist/client/sharing/ShareButton.js.map +1 -1
  190. package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
  191. package/dist/client/sharing/ShareDialog.js +1 -2
  192. package/dist/client/sharing/ShareDialog.js.map +1 -1
  193. package/dist/client/sharing/useShareButtonController.d.ts +0 -1
  194. package/dist/client/sharing/useShareButtonController.d.ts.map +1 -1
  195. package/dist/client/sharing/useShareButtonController.js +0 -6
  196. package/dist/client/sharing/useShareButtonController.js.map +1 -1
  197. package/dist/client/sharing/useShareDialogController.d.ts +0 -1
  198. package/dist/client/sharing/useShareDialogController.d.ts.map +1 -1
  199. package/dist/client/sharing/useShareDialogController.js +0 -1
  200. package/dist/client/sharing/useShareDialogController.js.map +1 -1
  201. package/dist/client/sse-event-processor.d.ts +12 -0
  202. package/dist/client/sse-event-processor.d.ts.map +1 -1
  203. package/dist/client/sse-event-processor.js +63 -1
  204. package/dist/client/sse-event-processor.js.map +1 -1
  205. package/dist/client/transcription/use-live-transcription.d.ts +3 -3
  206. package/dist/client/transcription/use-live-transcription.d.ts.map +1 -1
  207. package/dist/client/transcription/use-live-transcription.js +22 -11
  208. package/dist/client/transcription/use-live-transcription.js.map +1 -1
  209. package/dist/collab/awareness.d.ts +2 -2
  210. package/dist/collab/awareness.d.ts.map +1 -1
  211. package/dist/deploy/build.d.ts.map +1 -1
  212. package/dist/deploy/build.js +1 -1
  213. package/dist/deploy/build.js.map +1 -1
  214. package/dist/guards/db-tool-scoping.js +1 -1
  215. package/dist/guards/db-tool-scoping.js.map +1 -1
  216. package/dist/integrations/adapters/slack.d.ts +1 -0
  217. package/dist/integrations/adapters/slack.d.ts.map +1 -1
  218. package/dist/integrations/adapters/slack.js +61 -5
  219. package/dist/integrations/adapters/slack.js.map +1 -1
  220. package/dist/integrations/index.d.ts +1 -1
  221. package/dist/integrations/index.d.ts.map +1 -1
  222. package/dist/integrations/index.js +1 -1
  223. package/dist/integrations/index.js.map +1 -1
  224. package/dist/localization/default-messages.d.ts +6 -0
  225. package/dist/localization/default-messages.d.ts.map +1 -1
  226. package/dist/localization/default-messages.js +7 -1
  227. package/dist/localization/default-messages.js.map +1 -1
  228. package/dist/mcp-client/oauth-routes.d.ts +3 -0
  229. package/dist/mcp-client/oauth-routes.d.ts.map +1 -1
  230. package/dist/mcp-client/oauth-routes.js +41 -12
  231. package/dist/mcp-client/oauth-routes.js.map +1 -1
  232. package/dist/observability/routes.d.ts +3 -3
  233. package/dist/provider-api/actions/custom-provider-registration.d.ts +8 -8
  234. package/dist/provider-api/actions/provider-api.d.ts +11 -11
  235. package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
  236. package/dist/scripts/agent-engines/list-agent-engines.js +1 -18
  237. package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
  238. package/dist/scripts/call-agent.d.ts.map +1 -1
  239. package/dist/scripts/call-agent.js +49 -6
  240. package/dist/scripts/call-agent.js.map +1 -1
  241. package/dist/secrets/routes.d.ts +6 -6
  242. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  243. package/dist/server/agent-chat-plugin.js +38 -10
  244. package/dist/server/agent-chat-plugin.js.map +1 -1
  245. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  246. package/dist/server/realtime-voice.d.ts.map +1 -1
  247. package/dist/server/realtime-voice.js +1 -1
  248. package/dist/server/realtime-voice.js.map +1 -1
  249. package/dist/server/transcribe-voice.d.ts +1 -1
  250. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +16 -0
  251. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
  252. package/dist/terminal/cli-registry.js +1 -1
  253. package/dist/terminal/cli-registry.js.map +1 -1
  254. package/dist/vite/client.d.ts +8 -1
  255. package/dist/vite/client.d.ts.map +1 -1
  256. package/dist/vite/client.js +113 -2
  257. package/dist/vite/client.js.map +1 -1
  258. package/docs/content/a2a-protocol.mdx +15 -0
  259. package/docs/content/template-chat.mdx +1 -1
  260. package/docs/content/template-plan.mdx +3 -3
  261. package/package.json +2 -2
  262. package/src/a2a/activity.ts +371 -0
  263. package/src/a2a/client.ts +35 -11
  264. package/src/a2a/index.ts +21 -0
  265. package/src/a2a/types.ts +8 -0
  266. package/src/agent/model-config.ts +19 -23
  267. package/src/agent/production-agent.ts +167 -100
  268. package/src/agent/types.ts +16 -1
  269. package/src/cli/index.ts +18 -10
  270. package/src/cli/multi-frontier-runs.ts +5 -3
  271. package/src/cli/templates-meta.ts +0 -12
  272. package/src/cli/workspace-dev.ts +1 -1
  273. package/src/client/AgentPanel.tsx +9 -1
  274. package/src/client/RunStuckBanner.tsx +39 -47
  275. package/src/client/chat/action-chat-ui-surface.tsx +32 -0
  276. package/src/client/chat/message-components.tsx +53 -8
  277. package/src/client/chat/tool-call-display.tsx +214 -44
  278. package/src/client/chat/widgets/InlineExtensionWidget.tsx +0 -1
  279. package/src/client/chat/widgets/builtin-tool-renderers.tsx +7 -3
  280. package/src/client/chat-model-groups.ts +67 -27
  281. package/src/client/conversation/AgentConversation.tsx +12 -1
  282. package/src/client/error-capture.ts +2 -6
  283. package/src/client/resources/McpConnectionSuggestion.tsx +20 -14
  284. package/src/client/resources/ResourcesPanel.tsx +5 -1
  285. package/src/client/resources/mcp-integration-catalog.ts +7 -17
  286. package/src/client/resources/mcp-integration-logos.ts +2 -2
  287. package/src/client/route-chunk-recovery.ts +5 -3
  288. package/src/client/session-replay.ts +3 -3
  289. package/src/client/settings/SettingsPanel.tsx +15 -6
  290. package/src/client/sharing/ShareButton.tsx +1 -27
  291. package/src/client/sharing/ShareDialog.tsx +0 -16
  292. package/src/client/sharing/useShareButtonController.ts +0 -7
  293. package/src/client/sharing/useShareDialogController.ts +0 -2
  294. package/src/client/sse-event-processor.ts +85 -1
  295. package/src/client/transcription/use-live-transcription.ts +64 -45
  296. package/src/deploy/build.ts +2 -1
  297. package/src/guards/db-tool-scoping.ts +1 -1
  298. package/src/integrations/adapters/slack.ts +84 -5
  299. package/src/integrations/index.ts +5 -1
  300. package/src/localization/default-messages.ts +7 -1
  301. package/src/mcp-client/oauth-routes.ts +45 -12
  302. package/src/scripts/agent-engines/list-agent-engines.ts +1 -18
  303. package/src/scripts/call-agent.ts +49 -6
  304. package/src/server/agent-chat-plugin.ts +50 -10
  305. package/src/server/realtime-voice.ts +4 -1
  306. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +16 -0
  307. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
  308. package/src/terminal/cli-registry.ts +1 -1
  309. package/src/vite/client.ts +166 -1
  310. package/corpus/core/src/observability/hosted-model-experiment.ts +0 -118
  311. package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +0 -115
  312. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +0 -177
  313. package/corpus/templates/crm/.agents/skills/crm/SKILL.md +0 -128
  314. package/corpus/templates/crm/.agents/skills/customizing-agent-native/SKILL.md +0 -220
  315. package/corpus/templates/crm/.agents/skills/feature-flags/SKILL.md +0 -169
  316. package/corpus/templates/crm/.agents/skills/upgrade-agent-native/SKILL.md +0 -100
  317. package/corpus/templates/crm/.env.example +0 -5
  318. package/corpus/templates/crm/AGENTS.md +0 -120
  319. package/corpus/templates/crm/CHANGELOG.md +0 -1
  320. package/corpus/templates/crm/DEVELOPING.md +0 -66
  321. package/corpus/templates/crm/README.md +0 -106
  322. package/corpus/templates/crm/_gitignore +0 -12
  323. package/corpus/templates/crm/actions/_crm-action-utils.ts +0 -87
  324. package/corpus/templates/crm/actions/_crm-dashboard.ts +0 -69
  325. package/corpus/templates/crm/actions/_crm-data-program-actions.ts +0 -15
  326. package/corpus/templates/crm/actions/_crm-signal-utils.ts +0 -79
  327. package/corpus/templates/crm/actions/apply-crm-proposals.ts +0 -203
  328. package/corpus/templates/crm/actions/attach-call-evidence.ts +0 -170
  329. package/corpus/templates/crm/actions/configure-crm-connection.ts +0 -126
  330. package/corpus/templates/crm/actions/configure-native-crm.ts +0 -44
  331. package/corpus/templates/crm/actions/create-crm-record.ts +0 -148
  332. package/corpus/templates/crm/actions/create-crm-signal-tracker.ts +0 -58
  333. package/corpus/templates/crm/actions/delete-staged-dataset.ts +0 -14
  334. package/corpus/templates/crm/actions/get-crm-automation-recipe.ts +0 -36
  335. package/corpus/templates/crm/actions/get-crm-dashboard-panel.ts +0 -35
  336. package/corpus/templates/crm/actions/get-crm-dashboard.ts +0 -14
  337. package/corpus/templates/crm/actions/get-crm-overview.ts +0 -13
  338. package/corpus/templates/crm/actions/get-crm-pipeline-data.ts +0 -61
  339. package/corpus/templates/crm/actions/get-crm-record.ts +0 -75
  340. package/corpus/templates/crm/actions/install-crm-pipeline-dashboard.ts +0 -81
  341. package/corpus/templates/crm/actions/list-crm-dashboard-revisions.ts +0 -15
  342. package/corpus/templates/crm/actions/list-crm-dashboards.ts +0 -15
  343. package/corpus/templates/crm/actions/list-crm-proposals.ts +0 -31
  344. package/corpus/templates/crm/actions/list-crm-records.ts +0 -79
  345. package/corpus/templates/crm/actions/list-crm-saved-views.ts +0 -15
  346. package/corpus/templates/crm/actions/list-crm-signal-hits.ts +0 -43
  347. package/corpus/templates/crm/actions/list-crm-signal-trackers.ts +0 -32
  348. package/corpus/templates/crm/actions/list-crm-tasks.ts +0 -22
  349. package/corpus/templates/crm/actions/list-staged-datasets.ts +0 -14
  350. package/corpus/templates/crm/actions/list-workspace-connections.ts +0 -47
  351. package/corpus/templates/crm/actions/manage-crm-signal-tracker.ts +0 -87
  352. package/corpus/templates/crm/actions/manage-crm-task.ts +0 -132
  353. package/corpus/templates/crm/actions/navigate.ts +0 -63
  354. package/corpus/templates/crm/actions/provider-api-catalog.ts +0 -22
  355. package/corpus/templates/crm/actions/provider-api-docs.ts +0 -54
  356. package/corpus/templates/crm/actions/provider-api-request.ts +0 -92
  357. package/corpus/templates/crm/actions/query-staged-dataset.ts +0 -44
  358. package/corpus/templates/crm/actions/record-crm-call-insight.ts +0 -160
  359. package/corpus/templates/crm/actions/record-crm-smart-signal.ts +0 -150
  360. package/corpus/templates/crm/actions/restore-crm-dashboard-revision.ts +0 -23
  361. package/corpus/templates/crm/actions/review-crm-signal.ts +0 -31
  362. package/corpus/templates/crm/actions/run-crm-saved-view-program.ts +0 -103
  363. package/corpus/templates/crm/actions/run-crm-signal-trackers.ts +0 -275
  364. package/corpus/templates/crm/actions/run.ts +0 -7
  365. package/corpus/templates/crm/actions/save-crm-dashboard.ts +0 -51
  366. package/corpus/templates/crm/actions/save-crm-saved-view.ts +0 -119
  367. package/corpus/templates/crm/actions/sync-crm.ts +0 -146
  368. package/corpus/templates/crm/actions/update-crm-record.ts +0 -510
  369. package/corpus/templates/crm/actions/view-screen.ts +0 -218
  370. package/corpus/templates/crm/agent-native.app-skill.json +0 -58
  371. package/corpus/templates/crm/app/components/crm/CreateCrmRecordDialog.tsx +0 -158
  372. package/corpus/templates/crm/app/components/crm/CrmDashboardPanel.tsx +0 -78
  373. package/corpus/templates/crm/app/components/crm/CrmSignalsPanel.tsx +0 -226
  374. package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +0 -414
  375. package/corpus/templates/crm/app/components/crm/RecordActions.tsx +0 -510
  376. package/corpus/templates/crm/app/components/crm/RecordGrid.tsx +0 -134
  377. package/corpus/templates/crm/app/components/crm/RecordWorkspace.tsx +0 -362
  378. package/corpus/templates/crm/app/components/crm/SavedViewDataProgram.tsx +0 -93
  379. package/corpus/templates/crm/app/components/crm/Surface.tsx +0 -97
  380. package/corpus/templates/crm/app/components/crm/WorkOverview.tsx +0 -180
  381. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +0 -112
  382. package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +0 -84
  383. package/corpus/templates/crm/app/components/ui/alert-dialog.tsx +0 -1
  384. package/corpus/templates/crm/app/components/ui/badge.tsx +0 -1
  385. package/corpus/templates/crm/app/components/ui/button.tsx +0 -1
  386. package/corpus/templates/crm/app/components/ui/card.tsx +0 -1
  387. package/corpus/templates/crm/app/components/ui/dialog.tsx +0 -1
  388. package/corpus/templates/crm/app/components/ui/input.tsx +0 -1
  389. package/corpus/templates/crm/app/components/ui/label.tsx +0 -1
  390. package/corpus/templates/crm/app/components/ui/select.tsx +0 -1
  391. package/corpus/templates/crm/app/components/ui/sheet.tsx +0 -1
  392. package/corpus/templates/crm/app/components/ui/skeleton.tsx +0 -1
  393. package/corpus/templates/crm/app/components/ui/switch.tsx +0 -1
  394. package/corpus/templates/crm/app/components/ui/table.tsx +0 -1
  395. package/corpus/templates/crm/app/components/ui/tabs.tsx +0 -1
  396. package/corpus/templates/crm/app/components/ui/textarea.tsx +0 -1
  397. package/corpus/templates/crm/app/components/ui/toolkit-provider.tsx +0 -17
  398. package/corpus/templates/crm/app/design-system.ts +0 -3
  399. package/corpus/templates/crm/app/entry.client.tsx +0 -16
  400. package/corpus/templates/crm/app/entry.server.tsx +0 -10
  401. package/corpus/templates/crm/app/global.css +0 -167
  402. package/corpus/templates/crm/app/hooks/use-navigation-state.ts +0 -60
  403. package/corpus/templates/crm/app/i18n/en-US.ts +0 -89
  404. package/corpus/templates/crm/app/i18n/index.ts +0 -34
  405. package/corpus/templates/crm/app/lib/dashboard.ts +0 -13
  406. package/corpus/templates/crm/app/lib/navigation.ts +0 -54
  407. package/corpus/templates/crm/app/lib/tab-id.ts +0 -1
  408. package/corpus/templates/crm/app/lib/types.ts +0 -172
  409. package/corpus/templates/crm/app/lib/utils.ts +0 -1
  410. package/corpus/templates/crm/app/root.tsx +0 -91
  411. package/corpus/templates/crm/app/routes/_index.tsx +0 -26
  412. package/corpus/templates/crm/app/routes/accounts.tsx +0 -41
  413. package/corpus/templates/crm/app/routes/agent.tsx +0 -5
  414. package/corpus/templates/crm/app/routes/ask.tsx +0 -53
  415. package/corpus/templates/crm/app/routes/dashboard.tsx +0 -118
  416. package/corpus/templates/crm/app/routes/opportunities.tsx +0 -41
  417. package/corpus/templates/crm/app/routes/people.tsx +0 -41
  418. package/corpus/templates/crm/app/routes/proposals.tsx +0 -266
  419. package/corpus/templates/crm/app/routes/records.$recordId.tsx +0 -35
  420. package/corpus/templates/crm/app/routes/settings.tsx +0 -63
  421. package/corpus/templates/crm/app/routes/setup.tsx +0 -308
  422. package/corpus/templates/crm/app/routes/tasks.tsx +0 -252
  423. package/corpus/templates/crm/app/routes/views.tsx +0 -333
  424. package/corpus/templates/crm/app/routes.ts +0 -17
  425. package/corpus/templates/crm/app/vite-env.d.ts +0 -6
  426. package/corpus/templates/crm/changelog/2026-07-21-agent-native-crm.md +0 -6
  427. package/corpus/templates/crm/changelog/2026-07-21-clips-call-evidence-review-recipe.md +0 -6
  428. package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-find-and-review-evidence-grounded-call-signals-w.md +0 -6
  429. package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-manage-keyword-and-smart-call-signal-trackers-fr.md +0 -6
  430. package/corpus/templates/crm/changelog/2026-07-21-delegated-local-crm-automation.md +0 -6
  431. package/corpus/templates/crm/changelog/2026-07-21-native-sql.md +0 -6
  432. package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboard.md +0 -6
  433. package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboards-now-install-correctly-from-the-crm-actio.md +0 -6
  434. package/corpus/templates/crm/changelog/2026-07-21-salesforce-connection.md +0 -6
  435. package/corpus/templates/crm/changelog/2026-07-22-crm-field-validation-now-explains-which-fields-cannot-be-edi.md +0 -6
  436. package/corpus/templates/crm/changelog/2026-07-22-fixed-hubspot-contact-syncs-missing-records-updated-after-th.md +0 -6
  437. package/corpus/templates/crm/changelog/2026-07-22-fixed-pipeline-dashboard-panels-so-their-opportunity-data-lo.md +0 -6
  438. package/corpus/templates/crm/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +0 -6
  439. package/corpus/templates/crm/components.json +0 -20
  440. package/corpus/templates/crm/docs/architecture/crm-contract.md +0 -180
  441. package/corpus/templates/crm/learnings.defaults.md +0 -5
  442. package/corpus/templates/crm/package.json +0 -59
  443. package/corpus/templates/crm/public/favicon.svg +0 -1
  444. package/corpus/templates/crm/public/icon-180.svg +0 -1
  445. package/corpus/templates/crm/public/manifest.json +0 -11
  446. package/corpus/templates/crm/react-router.config.ts +0 -7
  447. package/corpus/templates/crm/server/crm/adapter.ts +0 -32
  448. package/corpus/templates/crm/server/crm/crm-field-firewall.ts +0 -64
  449. package/corpus/templates/crm/server/crm/crm-mirror.ts +0 -711
  450. package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1146
  451. package/corpus/templates/crm/server/crm/native-adapter.ts +0 -1715
  452. package/corpus/templates/crm/server/crm/read-through.ts +0 -207
  453. package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1255
  454. package/corpus/templates/crm/server/db/crm-store.ts +0 -1170
  455. package/corpus/templates/crm/server/db/index.ts +0 -169
  456. package/corpus/templates/crm/server/db/schema.ts +0 -441
  457. package/corpus/templates/crm/server/lib/intelligence/default-detectors.ts +0 -65
  458. package/corpus/templates/crm/server/lib/intelligence/evidence.ts +0 -105
  459. package/corpus/templates/crm/server/lib/intelligence/keyword-detector.ts +0 -100
  460. package/corpus/templates/crm/server/lib/intelligence/smart-detector.ts +0 -144
  461. package/corpus/templates/crm/server/lib/intelligence/summary.ts +0 -141
  462. package/corpus/templates/crm/server/lib/provider-api.ts +0 -64
  463. package/corpus/templates/crm/server/middleware/auth.ts +0 -4
  464. package/corpus/templates/crm/server/plugins/agent-chat.ts +0 -68
  465. package/corpus/templates/crm/server/plugins/auth.ts +0 -14
  466. package/corpus/templates/crm/server/plugins/core-routes.ts +0 -17
  467. package/corpus/templates/crm/server/plugins/db.ts +0 -454
  468. package/corpus/templates/crm/server/routes/[...page].get.ts +0 -5
  469. package/corpus/templates/crm/shared/crm-automation-recipes.ts +0 -132
  470. package/corpus/templates/crm/shared/crm-contract.ts +0 -254
  471. package/corpus/templates/crm/shared/crm-sales-config.ts +0 -63
  472. package/corpus/templates/crm/ssr-entry.ts +0 -11
  473. package/corpus/templates/crm/tsconfig.json +0 -24
  474. package/corpus/templates/crm/vite.config.ts +0 -15
  475. package/corpus/templates/crm/vitest.config.ts +0 -5
  476. package/dist/observability/hosted-model-experiment.d.ts +0 -39
  477. package/dist/observability/hosted-model-experiment.d.ts.map +0 -1
  478. package/dist/observability/hosted-model-experiment.js +0 -90
  479. package/dist/observability/hosted-model-experiment.js.map +0 -1
  480. package/src/observability/hosted-model-experiment.ts +0 -118
@@ -1,3 +1,4 @@
1
+ import type { A2AAgentActivitySnapshot } from "../a2a/activity.js";
1
2
  import type { ActionChatUIConfig } from "../action-ui.js";
2
3
  import type { AgentMcpAppPayload } from "../mcp-client/app-result.js";
3
4
  import type { ReasoningEffort } from "../shared/reasoning-effort.js";
@@ -255,6 +256,8 @@ export type AgentChatEvent = {
255
256
  type: "agent_call";
256
257
  agent: string;
257
258
  status: "start" | "done" | "error";
259
+ agentCallId?: string;
260
+ durationMs?: number;
258
261
  } | {
259
262
  /**
260
263
  * Periodic liveness for an in-flight cross-app A2A call. Emitted by the
@@ -277,10 +280,17 @@ export type AgentChatEvent = {
277
280
  elapsedSeconds: number;
278
281
  /** Optional short text surfaced from the remote poll, when present. */
279
282
  detail?: string;
283
+ agentCallId?: string;
280
284
  } | {
281
285
  type: "agent_call_text";
282
286
  agent: string;
283
287
  text: string;
288
+ agentCallId?: string;
289
+ } | {
290
+ type: "agent_call_activity";
291
+ agent: string;
292
+ snapshot: A2AAgentActivitySnapshot;
293
+ agentCallId?: string;
284
294
  } | {
285
295
  type: "agent_task";
286
296
  taskId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,KAA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AAC;CACjB,GACD;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IACE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACH;;;GAGG;GACD;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9C;IACE;;;;;OAKG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EACF,aAAa,GACb,YAAY,GACZ,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,qBAAqB,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GACD;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtB,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ActionChatUIConfig } from \"../action-ui.js\";\nimport type { AgentMcpAppPayload } from \"../mcp-client/app-result.js\";\nimport type { ReasoningEffort } from \"../shared/reasoning-effort.js\";\n\nexport interface AgentNativeJsonSchema {\n type?: string | string[];\n description?: string;\n enum?: unknown[];\n const?: unknown;\n properties?: Record<string, AgentNativeJsonSchema>;\n required?: string[];\n additionalProperties?: boolean | AgentNativeJsonSchema;\n items?: AgentNativeJsonSchema;\n oneOf?: AgentNativeJsonSchema[];\n anyOf?: AgentNativeJsonSchema[];\n allOf?: AgentNativeJsonSchema[];\n not?: AgentNativeJsonSchema;\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n minimum?: number;\n maximum?: number;\n minItems?: number;\n maxItems?: number;\n}\n\nexport interface ActionTool {\n description: string;\n parameters?: AgentNativeJsonSchema & {\n type: \"object\";\n properties: Record<string, AgentNativeJsonSchema>;\n required?: string[];\n };\n}\n\n/** @deprecated Use `ActionTool` instead */\nexport type ScriptTool = ActionTool;\n\nexport interface AgentMessage {\n role: \"user\" | \"assistant\";\n content: string;\n}\n\nexport type AgentChatStructuredContentPart =\n | { type: \"text\"; text: string }\n | {\n type: \"tool-call\";\n id?: string;\n toolCallId?: string;\n name?: string;\n toolName?: string;\n input?: unknown;\n args?: unknown;\n }\n | {\n type: \"tool-result\";\n toolCallId: string;\n /** Persisted for replay; omitted in older rows is backfilled server-side. */\n toolName?: string;\n toolInput?: string;\n content: string;\n isError?: boolean;\n };\n\nexport interface AgentChatStructuredMessage {\n role: \"user\" | \"assistant\";\n content: AgentChatStructuredContentPart[];\n}\n\nexport interface AgentChatReference {\n type: \"file\" | \"skill\" | \"mention\" | \"agent\" | \"custom-agent\";\n path: string;\n name: string;\n source: string;\n refType?: string;\n refId?: string;\n slotKey?: string;\n slotLabel?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface MentionProviderItem {\n id: string;\n label: string;\n description?: string;\n icon?: string;\n refType: string;\n refId?: string;\n refPath?: string;\n slotKey?: string;\n slotLabel?: string;\n metadata?: Record<string, unknown>;\n clearsSlots?: string[];\n relatedReferences?: MentionProviderReference[];\n}\n\nexport interface MentionProviderReference {\n label: string;\n icon?: string;\n source?: string;\n refType: string;\n refId?: string | null;\n refPath?: string | null;\n slotKey?: string;\n slotLabel?: string;\n metadata?: Record<string, unknown>;\n clearsSlots?: string[];\n relatedReferences?: MentionProviderReference[];\n}\n\nexport interface MentionProvider {\n label: string;\n icon?: string;\n search: (\n query: string,\n /** The H3 event for the current request — use to make internal API calls */\n event?: any,\n ) => MentionProviderItem[] | Promise<MentionProviderItem[]>;\n}\n\nexport interface AgentChatAttachment {\n type: string;\n name: string;\n data?: string;\n contentType?: string;\n text?: string;\n}\n\nexport interface AgentChatScope {\n type: string;\n id: string;\n label?: string;\n}\n\nexport interface AgentChatRequest {\n message: string;\n /**\n * User-visible text to persist in chat history. `message` may be normalized\n * for the model (for example mention markup or internal continuation text).\n */\n displayMessage?: string;\n history?: AgentMessage[];\n /**\n * Provider-neutral transcript used for run recovery. Unlike `history`,\n * this preserves assistant tool calls and matching tool results so\n * continuation turns do not re-run completed read-only tools.\n */\n structuredHistory?: AgentChatStructuredMessage[];\n references?: AgentChatReference[];\n threadId?: string;\n attachments?: AgentChatAttachment[];\n /** Internal retry/continuation requests should not create visible user turns. */\n internalContinuation?: boolean;\n /**\n * Internal marker set ONLY by the durable-background self-dispatch (see\n * `AGENT_CHAT_BACKGROUND_RUN_FIELD`). Present when the agent-chat handler is\n * re-entered as the background worker: it carries the pre-claimed `runId` and\n * logical `turnId` so the worker runs the loop inline with the background\n * soft-timeout instead of re-claiming the slot or re-dispatching. Untrusted\n * on its own — the `_process-run` route HMAC-verifies the dispatch before\n * invoking the handler. Absent on every normal client request.\n */\n __backgroundRun?: {\n runId: string;\n turnId?: string;\n continuationReason?:\n | \"run_timeout\"\n | \"loop_limit\"\n | \"no_progress\"\n | \"stream_ended\"\n | \"gateway_timeout\"\n | \"network_interrupted\";\n actionPreparationTool?: string;\n /**\n * Number of server-driven background→background continuations already\n * chained into this logical turn (0 on the first chunk). The worker\n * increments this when it re-fires `_process-run` at a soft-timeout\n * boundary and refuses to chain past `MAX_BACKGROUND_RUN_CONTINUATIONS`.\n */\n continuationCount?: number;\n /**\n * True when the dispatcher expects the self-POST to land in a real\n * Netlify `-background` function rather than the ~60s synchronous function.\n * This is diagnostic only; the 15-minute budget is unlocked by the worker's\n * actual runtime marker.\n */\n backgroundFunctionRuntimeExpected?: boolean;\n /**\n * True when the dispatch body carries ONLY this marker and the worker\n * must rehydrate the full request body from the run row's\n * `dispatch_payload` column (`readRunDispatchPayload`). Keeps the\n * self-POST under Netlify's 256KB background-function body cap.\n */\n payloadRef?: boolean;\n };\n /**\n * Stable identity for the logical assistant turn this request belongs to.\n * The client sends the SAME turnId for the initial POST and every\n * auto-continuation re-POST of one turn, so the server can fold each\n * continuation run's output onto a single durable assistant message instead\n * of dropping the earlier chunks. Defaults to the run id when absent.\n */\n turnId?: string;\n /** Execution mode for this turn. Plan mode is read-only and proposes before acting. */\n mode?: \"act\" | \"plan\";\n /** Per-request model override (ephemeral, from the composer model picker). */\n model?: string;\n /** Per-request engine override (sent alongside model for cross-provider switches). */\n engine?: string;\n /** Per-request reasoning effort override (ephemeral, from the composer picker). */\n effort?: ReasoningEffort;\n /** Usage-tracking label for this call (e.g. \"chat\", \"summarize\"). Default: \"chat\". */\n usageLabel?: string;\n /** Stable browser tab id so screen/url context and navigation commands are tab-scoped. */\n browserTabId?: string;\n /** Resource scope for this chat thread, e.g. the deck currently bound to the tab. */\n scope?: AgentChatScope | null;\n /** When true, expose this chat turn as a user-visible run in RunsTray. */\n trackInRunsTray?: boolean;\n /**\n * Approval grants for human-in-the-loop actions. Each entry is a stable\n * approval key (see the `approval_required` event's `approvalKey`). When the\n * agent calls an action declared `needsApproval`, the loop pauses and emits\n * `approval_required`; the client re-issues the turn (typically an empty\n * continuation) with the approved call's key here so the gate lets it run.\n * Keys not present here keep the action paused. The model never sees or sets\n * this — it is supplied by the human's approve affordance.\n */\n approvedToolCalls?: string[];\n}\n\nexport type AgentToolInput = Record<string, unknown>;\n\nexport type AgentChatEvent =\n | { type: \"text\"; text: string }\n | { type: \"thinking\"; text: string }\n | {\n type: \"activity\";\n label: string;\n tool?: string;\n id?: string;\n progressBytes?: number;\n }\n | { type: \"stream_keepalive\" }\n | { type: \"tool_start\"; tool: string; id?: string; input: AgentToolInput }\n | {\n type: \"tool_done\";\n tool: string;\n id?: string;\n input?: AgentToolInput;\n result: string;\n isError?: boolean;\n completedSideEffect?: boolean;\n mcpApp?: AgentMcpAppPayload;\n chatUI?: ActionChatUIConfig;\n }\n | {\n /**\n * The agent tried to call an action declared `needsApproval` and the loop\n * paused instead of executing it. The client should surface an\n * approve/deny affordance; on approve, re-issue the turn with\n * `approvedToolCalls: [approvalKey]` so the gate lets this call run.\n */\n type: \"approval_required\";\n tool: string;\n input: Record<string, string>;\n /** Stable key the client echoes back in `approvedToolCalls` to approve. */\n approvalKey: string;\n /** The model-side tool-call id for this paused call, when available. */\n toolCallId?: string;\n }\n | {\n type: \"agent_call\";\n agent: string;\n status: \"start\" | \"done\" | \"error\";\n }\n | {\n /**\n * Periodic liveness for an in-flight cross-app A2A call. Emitted by the\n * `call-agent` action once per throttle window ONLY when a real poll\n * round-trip to the remote agent succeeds and reports a non-terminal\n * state — never on a timer, so a hung/dead remote emits nothing and the\n * stuck-detector can still fire. Counts as real progress in\n * `run-manager`'s `shouldBumpProgressForEvent` (any non-special event\n * type does), which keeps `last_progress_at` fresh so a slow-but-healthy\n * sub-agent call doesn't trip the client's stuck banner. A distinct\n * event type (not an `agent_call` status) so existing `agent_call`\n * consumers that treat \"not start/done\" as a failure don't render an\n * in-flight tick as an error.\n */\n type: \"agent_call_progress\";\n agent: string;\n /** Remote A2A task state for this poll, e.g. \"working\" | \"processing\". */\n state: string;\n /** Elapsed wall-clock seconds since the cross-app call began. */\n elapsedSeconds: number;\n /** Optional short text surfaced from the remote poll, when present. */\n detail?: string;\n }\n | { type: \"agent_call_text\"; agent: string; text: string }\n | {\n type: \"agent_task\";\n taskId: string;\n threadId: string;\n description: string;\n status: \"running\" | \"completed\" | \"errored\";\n }\n | {\n type: \"agent_task_update\";\n taskId: string;\n preview: string;\n currentStep?: string;\n }\n | {\n type: \"agent_task_complete\";\n taskId: string;\n summary: string;\n }\n | { type: \"done\" }\n | {\n type: \"error\";\n error: string;\n /**\n * Optional machine-readable error code. Builder gateway uses codes\n * like \"credits-limit-monthly\" / \"unauthorized\" / \"gateway_not_enabled\"\n * so the chat UI can render a structured CTA (e.g. upgrade button).\n */\n errorCode?: string;\n /** Optional link paired with errorCode — e.g. Builder billing page. */\n upgradeUrl?: string;\n /** Optional details for expandable UI/debugging. */\n details?: string;\n /** True when the user can reasonably continue/retry from partial work. */\n recoverable?: boolean;\n }\n /**\n * Legacy SSE terminal event. New streams emit\n * `{ type: \"error\", errorCode: \"missing_credentials\" }` instead.\n */\n | { type: \"missing_api_key\" }\n | { type: \"loop_limit\"; maxIterations?: number }\n | {\n /**\n * An in-loop `Processor` aborted the run via `abort()` (which throws a\n * `TripWire`). The loop catches it, emits this event, stops cleanly, and\n * surfaces the reason as a final assistant message. Structural hook for\n * real-time guardrails and a proof-of-done / coverage gate.\n */\n type: \"tripwire\";\n reason: string;\n /** Name of the processor that aborted, when it declared one. */\n processor?: string;\n }\n | {\n type: \"auto_continue\";\n reason:\n | \"run_timeout\"\n | \"loop_limit\"\n | \"no_progress\"\n | \"stream_ended\"\n | \"gateway_timeout\"\n | \"network_interrupted\";\n maxIterations?: number;\n }\n | { type: \"clear\" };\n\nexport interface RunEvent {\n seq: number;\n event: AgentChatEvent;\n}\n\nexport type RunStatus = \"running\" | \"completed\" | \"errored\" | \"aborted\";\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { A2AAgentActivitySnapshot } from \"../a2a/activity.js\";\nimport type { ActionChatUIConfig } from \"../action-ui.js\";\nimport type { AgentMcpAppPayload } from \"../mcp-client/app-result.js\";\nimport type { ReasoningEffort } from \"../shared/reasoning-effort.js\";\n\nexport interface AgentNativeJsonSchema {\n type?: string | string[];\n description?: string;\n enum?: unknown[];\n const?: unknown;\n properties?: Record<string, AgentNativeJsonSchema>;\n required?: string[];\n additionalProperties?: boolean | AgentNativeJsonSchema;\n items?: AgentNativeJsonSchema;\n oneOf?: AgentNativeJsonSchema[];\n anyOf?: AgentNativeJsonSchema[];\n allOf?: AgentNativeJsonSchema[];\n not?: AgentNativeJsonSchema;\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n minimum?: number;\n maximum?: number;\n minItems?: number;\n maxItems?: number;\n}\n\nexport interface ActionTool {\n description: string;\n parameters?: AgentNativeJsonSchema & {\n type: \"object\";\n properties: Record<string, AgentNativeJsonSchema>;\n required?: string[];\n };\n}\n\n/** @deprecated Use `ActionTool` instead */\nexport type ScriptTool = ActionTool;\n\nexport interface AgentMessage {\n role: \"user\" | \"assistant\";\n content: string;\n}\n\nexport type AgentChatStructuredContentPart =\n | { type: \"text\"; text: string }\n | {\n type: \"tool-call\";\n id?: string;\n toolCallId?: string;\n name?: string;\n toolName?: string;\n input?: unknown;\n args?: unknown;\n }\n | {\n type: \"tool-result\";\n toolCallId: string;\n /** Persisted for replay; omitted in older rows is backfilled server-side. */\n toolName?: string;\n toolInput?: string;\n content: string;\n isError?: boolean;\n };\n\nexport interface AgentChatStructuredMessage {\n role: \"user\" | \"assistant\";\n content: AgentChatStructuredContentPart[];\n}\n\nexport interface AgentChatReference {\n type: \"file\" | \"skill\" | \"mention\" | \"agent\" | \"custom-agent\";\n path: string;\n name: string;\n source: string;\n refType?: string;\n refId?: string;\n slotKey?: string;\n slotLabel?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface MentionProviderItem {\n id: string;\n label: string;\n description?: string;\n icon?: string;\n refType: string;\n refId?: string;\n refPath?: string;\n slotKey?: string;\n slotLabel?: string;\n metadata?: Record<string, unknown>;\n clearsSlots?: string[];\n relatedReferences?: MentionProviderReference[];\n}\n\nexport interface MentionProviderReference {\n label: string;\n icon?: string;\n source?: string;\n refType: string;\n refId?: string | null;\n refPath?: string | null;\n slotKey?: string;\n slotLabel?: string;\n metadata?: Record<string, unknown>;\n clearsSlots?: string[];\n relatedReferences?: MentionProviderReference[];\n}\n\nexport interface MentionProvider {\n label: string;\n icon?: string;\n search: (\n query: string,\n /** The H3 event for the current request — use to make internal API calls */\n event?: any,\n ) => MentionProviderItem[] | Promise<MentionProviderItem[]>;\n}\n\nexport interface AgentChatAttachment {\n type: string;\n name: string;\n data?: string;\n contentType?: string;\n text?: string;\n}\n\nexport interface AgentChatScope {\n type: string;\n id: string;\n label?: string;\n}\n\nexport interface AgentChatRequest {\n message: string;\n /**\n * User-visible text to persist in chat history. `message` may be normalized\n * for the model (for example mention markup or internal continuation text).\n */\n displayMessage?: string;\n history?: AgentMessage[];\n /**\n * Provider-neutral transcript used for run recovery. Unlike `history`,\n * this preserves assistant tool calls and matching tool results so\n * continuation turns do not re-run completed read-only tools.\n */\n structuredHistory?: AgentChatStructuredMessage[];\n references?: AgentChatReference[];\n threadId?: string;\n attachments?: AgentChatAttachment[];\n /** Internal retry/continuation requests should not create visible user turns. */\n internalContinuation?: boolean;\n /**\n * Internal marker set ONLY by the durable-background self-dispatch (see\n * `AGENT_CHAT_BACKGROUND_RUN_FIELD`). Present when the agent-chat handler is\n * re-entered as the background worker: it carries the pre-claimed `runId` and\n * logical `turnId` so the worker runs the loop inline with the background\n * soft-timeout instead of re-claiming the slot or re-dispatching. Untrusted\n * on its own — the `_process-run` route HMAC-verifies the dispatch before\n * invoking the handler. Absent on every normal client request.\n */\n __backgroundRun?: {\n runId: string;\n turnId?: string;\n continuationReason?:\n | \"run_timeout\"\n | \"loop_limit\"\n | \"no_progress\"\n | \"stream_ended\"\n | \"gateway_timeout\"\n | \"network_interrupted\";\n actionPreparationTool?: string;\n /**\n * Number of server-driven background→background continuations already\n * chained into this logical turn (0 on the first chunk). The worker\n * increments this when it re-fires `_process-run` at a soft-timeout\n * boundary and refuses to chain past `MAX_BACKGROUND_RUN_CONTINUATIONS`.\n */\n continuationCount?: number;\n /**\n * True when the dispatcher expects the self-POST to land in a real\n * Netlify `-background` function rather than the ~60s synchronous function.\n * This is diagnostic only; the 15-minute budget is unlocked by the worker's\n * actual runtime marker.\n */\n backgroundFunctionRuntimeExpected?: boolean;\n /**\n * True when the dispatch body carries ONLY this marker and the worker\n * must rehydrate the full request body from the run row's\n * `dispatch_payload` column (`readRunDispatchPayload`). Keeps the\n * self-POST under Netlify's 256KB background-function body cap.\n */\n payloadRef?: boolean;\n };\n /**\n * Stable identity for the logical assistant turn this request belongs to.\n * The client sends the SAME turnId for the initial POST and every\n * auto-continuation re-POST of one turn, so the server can fold each\n * continuation run's output onto a single durable assistant message instead\n * of dropping the earlier chunks. Defaults to the run id when absent.\n */\n turnId?: string;\n /** Execution mode for this turn. Plan mode is read-only and proposes before acting. */\n mode?: \"act\" | \"plan\";\n /** Per-request model override (ephemeral, from the composer model picker). */\n model?: string;\n /** Per-request engine override (sent alongside model for cross-provider switches). */\n engine?: string;\n /** Per-request reasoning effort override (ephemeral, from the composer picker). */\n effort?: ReasoningEffort;\n /** Usage-tracking label for this call (e.g. \"chat\", \"summarize\"). Default: \"chat\". */\n usageLabel?: string;\n /** Stable browser tab id so screen/url context and navigation commands are tab-scoped. */\n browserTabId?: string;\n /** Resource scope for this chat thread, e.g. the deck currently bound to the tab. */\n scope?: AgentChatScope | null;\n /** When true, expose this chat turn as a user-visible run in RunsTray. */\n trackInRunsTray?: boolean;\n /**\n * Approval grants for human-in-the-loop actions. Each entry is a stable\n * approval key (see the `approval_required` event's `approvalKey`). When the\n * agent calls an action declared `needsApproval`, the loop pauses and emits\n * `approval_required`; the client re-issues the turn (typically an empty\n * continuation) with the approved call's key here so the gate lets it run.\n * Keys not present here keep the action paused. The model never sees or sets\n * this — it is supplied by the human's approve affordance.\n */\n approvedToolCalls?: string[];\n}\n\nexport type AgentToolInput = Record<string, unknown>;\n\nexport type AgentChatEvent =\n | { type: \"text\"; text: string }\n | { type: \"thinking\"; text: string }\n | {\n type: \"activity\";\n label: string;\n tool?: string;\n id?: string;\n progressBytes?: number;\n }\n | { type: \"stream_keepalive\" }\n | { type: \"tool_start\"; tool: string; id?: string; input: AgentToolInput }\n | {\n type: \"tool_done\";\n tool: string;\n id?: string;\n input?: AgentToolInput;\n result: string;\n isError?: boolean;\n completedSideEffect?: boolean;\n mcpApp?: AgentMcpAppPayload;\n chatUI?: ActionChatUIConfig;\n }\n | {\n /**\n * The agent tried to call an action declared `needsApproval` and the loop\n * paused instead of executing it. The client should surface an\n * approve/deny affordance; on approve, re-issue the turn with\n * `approvedToolCalls: [approvalKey]` so the gate lets this call run.\n */\n type: \"approval_required\";\n tool: string;\n input: Record<string, string>;\n /** Stable key the client echoes back in `approvedToolCalls` to approve. */\n approvalKey: string;\n /** The model-side tool-call id for this paused call, when available. */\n toolCallId?: string;\n }\n | {\n type: \"agent_call\";\n agent: string;\n status: \"start\" | \"done\" | \"error\";\n agentCallId?: string;\n durationMs?: number;\n }\n | {\n /**\n * Periodic liveness for an in-flight cross-app A2A call. Emitted by the\n * `call-agent` action once per throttle window ONLY when a real poll\n * round-trip to the remote agent succeeds and reports a non-terminal\n * state — never on a timer, so a hung/dead remote emits nothing and the\n * stuck-detector can still fire. Counts as real progress in\n * `run-manager`'s `shouldBumpProgressForEvent` (any non-special event\n * type does), which keeps `last_progress_at` fresh so a slow-but-healthy\n * sub-agent call doesn't trip the client's stuck banner. A distinct\n * event type (not an `agent_call` status) so existing `agent_call`\n * consumers that treat \"not start/done\" as a failure don't render an\n * in-flight tick as an error.\n */\n type: \"agent_call_progress\";\n agent: string;\n /** Remote A2A task state for this poll, e.g. \"working\" | \"processing\". */\n state: string;\n /** Elapsed wall-clock seconds since the cross-app call began. */\n elapsedSeconds: number;\n /** Optional short text surfaced from the remote poll, when present. */\n detail?: string;\n agentCallId?: string;\n }\n | {\n type: \"agent_call_text\";\n agent: string;\n text: string;\n agentCallId?: string;\n }\n | {\n type: \"agent_call_activity\";\n agent: string;\n snapshot: A2AAgentActivitySnapshot;\n agentCallId?: string;\n }\n | {\n type: \"agent_task\";\n taskId: string;\n threadId: string;\n description: string;\n status: \"running\" | \"completed\" | \"errored\";\n }\n | {\n type: \"agent_task_update\";\n taskId: string;\n preview: string;\n currentStep?: string;\n }\n | {\n type: \"agent_task_complete\";\n taskId: string;\n summary: string;\n }\n | { type: \"done\" }\n | {\n type: \"error\";\n error: string;\n /**\n * Optional machine-readable error code. Builder gateway uses codes\n * like \"credits-limit-monthly\" / \"unauthorized\" / \"gateway_not_enabled\"\n * so the chat UI can render a structured CTA (e.g. upgrade button).\n */\n errorCode?: string;\n /** Optional link paired with errorCode — e.g. Builder billing page. */\n upgradeUrl?: string;\n /** Optional details for expandable UI/debugging. */\n details?: string;\n /** True when the user can reasonably continue/retry from partial work. */\n recoverable?: boolean;\n }\n /**\n * Legacy SSE terminal event. New streams emit\n * `{ type: \"error\", errorCode: \"missing_credentials\" }` instead.\n */\n | { type: \"missing_api_key\" }\n | { type: \"loop_limit\"; maxIterations?: number }\n | {\n /**\n * An in-loop `Processor` aborted the run via `abort()` (which throws a\n * `TripWire`). The loop catches it, emits this event, stops cleanly, and\n * surfaces the reason as a final assistant message. Structural hook for\n * real-time guardrails and a proof-of-done / coverage gate.\n */\n type: \"tripwire\";\n reason: string;\n /** Name of the processor that aborted, when it declared one. */\n processor?: string;\n }\n | {\n type: \"auto_continue\";\n reason:\n | \"run_timeout\"\n | \"loop_limit\"\n | \"no_progress\"\n | \"stream_ended\"\n | \"gateway_timeout\"\n | \"network_interrupted\";\n maxIterations?: number;\n }\n | { type: \"clear\" };\n\nexport interface RunEvent {\n seq: number;\n event: AgentChatEvent;\n}\n\nexport type RunStatus = \"running\" | \"completed\" | \"errored\" | \"aborted\";\n"]}
package/dist/cli/index.js CHANGED
@@ -175,10 +175,12 @@ function parseScaffoldArgs(argv) {
175
175
  // Track CLI usage (best-effort, non-blocking)
176
176
  function trackCli(event, props) {
177
177
  try {
178
- import("../tracking/registry.js").then((m) => {
179
- m.track(event, { command, ...props });
180
- });
181
- import("../tracking/providers.js").then((m) => m.registerBuiltinProviders());
178
+ void import("../tracking/registry.js")
179
+ .then((m) => m.track(event, { command, ...props }))
180
+ .catch(() => undefined);
181
+ void import("../tracking/providers.js")
182
+ .then((m) => m.registerBuiltinProviders())
183
+ .catch(() => undefined);
182
184
  }
183
185
  catch { }
184
186
  }
@@ -189,7 +191,9 @@ process.on("uncaughtException", (err) => {
189
191
  console.error(` Send feedback: ${FEEDBACK_URL}\n`);
190
192
  trackCli("cli.crash", { error: err.message });
191
193
  Sentry.captureException(err);
192
- Sentry.flush(2000).finally(() => process.exit(1));
194
+ void Sentry.flush(2000)
195
+ .catch(() => undefined)
196
+ .finally(() => process.exit(1));
193
197
  });
194
198
  process.on("unhandledRejection", (reason) => {
195
199
  console.error(`\n Unhandled error: ${reason?.message ?? reason}\n`);
@@ -197,7 +201,9 @@ process.on("unhandledRejection", (reason) => {
197
201
  console.error(` Send feedback: ${FEEDBACK_URL}\n`);
198
202
  trackCli("cli.crash", { error: reason?.message ?? String(reason) });
199
203
  Sentry.captureException(reason);
200
- Sentry.flush(2000).finally(() => process.exit(1));
204
+ void Sentry.flush(2000)
205
+ .catch(() => undefined)
206
+ .finally(() => process.exit(1));
201
207
  });
202
208
  // Surface a self-heal hint when an interrupted `npx @agent-native/core@latest ...`
203
209
  // leaves a half-extracted package in the npx cache and a follow-up run fails
@@ -847,13 +853,17 @@ switch (command) {
847
853
  break;
848
854
  }
849
855
  case "setup-agents": {
850
- import("./setup-agents.js").then((m) => m.runSetupAgents());
856
+ import("./setup-agents.js")
857
+ .then((m) => m.runSetupAgents())
858
+ .catch(handleScaffoldImportError);
851
859
  break;
852
860
  }
853
861
  case "info": {
854
862
  // Print read-only info about an installable package (e.g. @agent-native/scheduling).
855
863
  // Lists subpath exports, source paths in node_modules, and docs pointers.
856
- import("./info.js").then((m) => m.runInfo(args[0]));
864
+ import("./info.js")
865
+ .then((m) => m.runInfo(args[0]))
866
+ .catch(handleScaffoldImportError);
857
867
  break;
858
868
  }
859
869
  case "add": {
@@ -1 +1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AO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;QACtD,OAAO,CAAC,KAAK,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { execSync, spawn } from \"child_process\";\nimport fs from \"fs\";\nimport { createRequire } from \"module\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport * as Sentry from \"@sentry/node\";\n\nimport { resolveDeployPostBuildInvocation } from \"./deploy-build.js\";\n\n// Resolve version once at module scope — used by both --version and --help\nlet _version = \"unknown\";\ntry {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n // dist/cli/index.js → ../../package.json\n const pkg = JSON.parse(\n fs.readFileSync(path.resolve(__dirname, \"../../package.json\"), \"utf-8\"),\n );\n _version = pkg.version;\n} catch {}\n\n// Fail fast on unsupported Node versions. `engines.node: \">=22\"` is only\n// advisory — npx/pnpm merely warn — so without this an older Node (18/20)\n// first fails deep inside a scaffold dynamic import with a cryptic\n// ERR_MODULE / syntax error that `handleScaffoldImportError` misreports as a\n// corrupt npx cache. A clear up-front message saves that whole detour.\nconst REQUIRED_NODE_MAJOR = 22;\nconst _nodeMajor = Number(process.versions.node.split(\".\")[0]);\nif (Number.isFinite(_nodeMajor) && _nodeMajor < REQUIRED_NODE_MAJOR) {\n console.error(\n `agent-native requires Node.js ${REQUIRED_NODE_MAJOR} or newer, but you're on Node ${process.versions.node}.\\n` +\n `Upgrade Node (https://nodejs.org) and re-run. With nvm: \\`nvm install ${REQUIRED_NODE_MAJOR}\\`.`,\n );\n process.exit(1);\n}\n\n/**\n * Build a redacted \"command\" tag from process.argv. Strips the value that\n * follows any --token / --key / --secret / --password / --api-key flag so\n * we don't ship developer secrets to Sentry alongside the crash.\n *\n * Supports both `--token foo` (separate argv item) and `--token=foo`\n * (combined argv item) forms.\n */\nconst SECRET_FLAG_RE = /^--?(token|key|secret|password|api[_-]?key)$/i;\nconst SECRET_FLAG_EQ_RE =\n /^(--?(token|key|secret|password|api[_-]?key))=(.*)$/i;\nfunction buildRedactedCommandTag(argv: string[]): string {\n const out: string[] = [];\n for (let i = 0; i < argv.length; i++) {\n const a = argv[i];\n if (SECRET_FLAG_RE.test(a)) {\n out.push(a);\n // Consume the next argv item as the secret value\n if (i + 1 < argv.length) {\n out.push(\"<redacted>\");\n i++;\n }\n continue;\n }\n const m = a.match(SECRET_FLAG_EQ_RE);\n if (m) {\n out.push(`${m[1]}=<redacted>`);\n continue;\n }\n out.push(a);\n }\n return out.join(\" \");\n}\n\nSentry.init({\n dsn: \"https://0d384e9eff2f6542af468b92769f2f5b@o117565.ingest.us.sentry.io/4511270386466816\",\n release: `agent-native-cli@${_version}`,\n // Sentry's Http integration wraps outgoing fetch in a way that breaks the\n // hosted Plan MCP route negotiation used by recap CI smoke checks.\n integrations: (integrations) =>\n integrations.filter((integration) => integration.name !== \"Http\"),\n // sendDefaultPii MUST stay false — the CLI runs in third-party developer\n // environments and we never want to ship request headers, IPs, cookies,\n // or process env contents to Sentry without explicit consent.\n sendDefaultPii: false,\n beforeSend(event) {\n // Drop expected user-input rejections (validateRepoName, etc.) so they\n // don't pollute Sentry with non-bug noise.\n const exceptionType = event.exception?.values?.[0]?.type;\n if (\n exceptionType === \"ValidationError\" ||\n event.tags?.handled === \"validation\"\n ) {\n return null;\n }\n\n // Defense in depth: strip any sensitive fields that may have been\n // attached to the event despite sendDefaultPii: false (e.g. integrations\n // that capture request metadata).\n if (event.request) {\n if (event.request.headers) {\n const headers = event.request.headers as Record<string, string>;\n for (const k of Object.keys(headers)) {\n const lk = k.toLowerCase();\n if (\n lk === \"cookie\" ||\n lk === \"authorization\" ||\n lk === \"set-cookie\" ||\n lk === \"proxy-authorization\"\n ) {\n delete headers[k];\n }\n }\n }\n // Cookies are also exposed via event.request.cookies as a separate field\n delete (event.request as Record<string, unknown>).cookies;\n }\n // Keep user info that was explicitly set via Sentry.setUser (id/email)\n // so we can attribute crashes back to the operator. Always strip\n // ip_address — the CLI runs on third-party machines and the IP is auto-\n // collected without consent. If only auto-collected fields remain,\n // drop the user object entirely.\n if (event.user) {\n const user = event.user as Record<string, unknown>;\n delete user.ip_address;\n const hasIdentity =\n typeof user.id === \"string\" ||\n typeof user.email === \"string\" ||\n typeof user.username === \"string\";\n if (!hasIdentity) {\n delete event.user;\n }\n }\n // Sentry's contexts can carry process.env snapshots — strip env-shaped\n // contexts so we don't leak deployment secrets.\n if (event.contexts && typeof event.contexts === \"object\") {\n delete (event.contexts as Record<string, unknown>).runtime_env;\n }\n\n event.tags = {\n ...event.tags,\n // Build the command tag from process.argv with secrets redacted so\n // `agent-native ... --token foo` doesn't leak `foo` to Sentry.\n command: buildRedactedCommandTag(process.argv.slice(2)),\n subcommand: process.argv[2] ?? \"none\",\n nodeVersion: process.version,\n platform: process.platform,\n };\n return event;\n },\n});\n\n// Identify the operator so future CLI errors carry spaceId / builderUserId\n// that we can map back to a real Builder user. The CLI doesn't have a real\n// email today — only the env-managed identifiers from the workspace's .env.\n{\n const builderUserId = process.env.BUILDER_USER_ID;\n const builderPublicKey = process.env.BUILDER_PUBLIC_KEY;\n if (builderUserId) {\n Sentry.setUser({ id: builderUserId });\n Sentry.setTag(\"builderUserId\", builderUserId);\n }\n if (builderPublicKey) {\n Sentry.setTag(\"spaceId\", builderPublicKey);\n }\n}\n\nconst FEEDBACK_URL =\n \"https://forms.agent-native.com/f/agent-native-feedback/_16ewV?source=cli\";\nconst BUGS_URL = \"https://github.com/BuilderIO/agent-native/issues\";\n\nconst command = process.argv[2];\n// Filter out bare \"--\" separators that pnpm inserts between its args and script args\nconst args = process.argv.slice(3).filter((a) => a !== \"--\");\n\nfunction parseScaffoldArgs(argv: string[]): {\n name?: string;\n template?: string;\n standalone: boolean;\n headless: boolean;\n} {\n let name: string | undefined;\n let template: string | undefined;\n let standalone = false;\n let headless = false;\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === \"--template\" && argv[i + 1]) {\n template = argv[++i];\n } else if (arg.startsWith(\"--template=\")) {\n template = arg.slice(\"--template=\".length);\n } else if (arg === \"--standalone\") {\n standalone = true;\n } else if (arg === \"--headless\") {\n headless = true;\n } else if (!arg.startsWith(\"-\") && !name) {\n name = arg;\n }\n }\n\n return { name, template, standalone, headless };\n}\n\n// Track CLI usage (best-effort, non-blocking)\nfunction trackCli(event: string, props?: Record<string, unknown>): void {\n try {\n import(\"../tracking/registry.js\").then((m) => {\n m.track(event, { command, ...props });\n });\n import(\"../tracking/providers.js\").then((m) =>\n m.registerBuiltinProviders(),\n );\n } catch {}\n}\n\n// Global error handler — show feedback link on unhandled crashes\nprocess.on(\"uncaughtException\", (err) => {\n console.error(`\\n Unexpected error: ${err.message}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: err.message });\n Sentry.captureException(err);\n Sentry.flush(2000).finally(() => process.exit(1));\n});\n\nprocess.on(\"unhandledRejection\", (reason: any) => {\n console.error(`\\n Unhandled error: ${reason?.message ?? reason}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: reason?.message ?? String(reason) });\n Sentry.captureException(reason);\n Sentry.flush(2000).finally(() => process.exit(1));\n});\n\n// Surface a self-heal hint when an interrupted `npx @agent-native/core@latest ...`\n// leaves a half-extracted package in the npx cache and a follow-up run fails\n// to load one of our own sub-modules.\nfunction handleScaffoldImportError(err: any): never {\n const msg = err?.message ?? String(err);\n const looksLikeCorruptCache =\n err?.code === \"ERR_MODULE_NOT_FOUND\" ||\n err?.code === \"MODULE_NOT_FOUND\" ||\n err?.code === \"ENOENT\" ||\n /Cannot find module|tarball|integrity|EINTEGRITY|corrupt|truncated/i.test(\n msg,\n );\n if (looksLikeCorruptCache) {\n console.error(\n `\\n Failed to load the scaffolder. This usually means an earlier\\n \\`npx\\` run was interrupted and left a corrupt cache.\\n\\n Clear the npx cache and try again:\\n rm -rf ~/.npm/_npx\\n npx @agent-native/core@latest create\\n\\n Original error: ${msg}\\n`,\n );\n } else {\n console.error(`\\n Failed to load the scaffolder: ${msg}\\n`);\n }\n trackCli(\"cli.scaffold.import_error\", { error: msg });\n Sentry.captureException(err);\n Sentry.flush(2000).finally(() => process.exit(1));\n throw err;\n}\n\nfunction findBinUpwards(binName: string): string | undefined {\n let dir = process.cwd();\n for (let i = 0; i < 20; i++) {\n const candidate = path.join(dir, \"node_modules\", \".bin\", binName);\n if (fs.existsSync(candidate)) return candidate;\n const parent = path.dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n return undefined;\n}\n\nfunction findViteBin(): string {\n return findBinUpwards(\"vite\") ?? \"vite\";\n}\n\nfunction findTsxBin(): string {\n const localTsx = path.resolve(\"node_modules/.bin/tsx\");\n if (fs.existsSync(localTsx)) return localTsx;\n return \"tsx\";\n}\n\nfunction findTypeScriptCompilerBin(): string {\n const localTsc = path.resolve(\"node_modules/.bin/tsc\");\n if (fs.existsSync(localTsc)) return localTsc;\n\n // Prefer TypeScript 7's tsc; fall back to legacy tsgo if present.\n const localTsgo = path.resolve(\"node_modules/.bin/tsgo\");\n if (fs.existsSync(localTsgo)) return localTsgo;\n\n return \"tsc\";\n}\n\nfunction findReactRouterBin(): string {\n return findBinUpwards(\"react-router\") ?? \"react-router\";\n}\n\n/** Check if the project uses React Router framework mode (has react-router.config.ts) */\nfunction isReactRouterFramework(): boolean {\n return (\n fs.existsSync(path.resolve(\"react-router.config.ts\")) ||\n fs.existsSync(path.resolve(\"react-router.config.js\"))\n );\n}\n\nfunction canResolveFromProject(specifier: string): boolean {\n try {\n const requireFromProject = createRequire(path.resolve(\"package.json\"));\n requireFromProject.resolve(specifier);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction projectUsesFsRoutes(): boolean {\n for (const file of [\n path.resolve(\"app/routes.ts\"),\n path.resolve(\"app/routes.tsx\"),\n path.resolve(\"routes.ts\"),\n path.resolve(\"routes.tsx\"),\n ]) {\n try {\n if (\n fs.existsSync(file) &&\n fs.readFileSync(file, \"utf-8\").includes(\"@react-router/fs-routes\")\n ) {\n return true;\n }\n } catch {}\n }\n return false;\n}\n\nfunction validateReactRouterBuildDependencies(): void {\n const required: Array<[packageName: string, specifier: string]> = [\n [\"react-router\", \"react-router\"],\n [\"@react-router/dev\", \"@react-router/dev/vite\"],\n [\"vite\", \"vite\"],\n ];\n if (projectUsesFsRoutes()) {\n required.push([\"@react-router/fs-routes\", \"@react-router/fs-routes\"]);\n }\n\n const missing = required\n .filter(([, specifier]) => !canResolveFromProject(specifier))\n .map(([packageName]) => packageName);\n\n if (missing.length === 0) return;\n\n const packageManager = fs.existsSync(path.resolve(\"pnpm-lock.yaml\"))\n ? \"pnpm\"\n : fs.existsSync(path.resolve(\"yarn.lock\"))\n ? \"yarn\"\n : \"npm\";\n const installCommand =\n packageManager === \"pnpm\"\n ? `pnpm add ${missing.join(\" \")}`\n : packageManager === \"yarn\"\n ? `yarn add ${missing.join(\" \")}`\n : `npm install ${missing.join(\" \")}`;\n\n console.error(\n [\n \"React Router framework mode requires build packages that are not installed from this app root.\",\n `Missing: ${missing.join(\", \")}`,\n `Install them with: ${installCommand}`,\n ].join(\"\\n\"),\n );\n process.exit(1);\n}\n\nfunction isWorkspaceRoot(): boolean {\n const pkgPath = path.resolve(\"package.json\");\n if (!fs.existsSync(pkgPath)) return false;\n try {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n return (\n typeof pkg?.[\"agent-native\"]?.workspaceCore === \"string\" &&\n fs.existsSync(path.resolve(\"apps\"))\n );\n } catch {\n return false;\n }\n}\n\nfunction run(\n cmd: string,\n cmdArgs: string[],\n opts?: { stdio?: \"inherit\" | \"pipe\" },\n) {\n const child = spawn(cmd, cmdArgs, {\n stdio: opts?.stdio ?? \"inherit\",\n shell: process.platform === \"win32\",\n env: process.env,\n });\n child.on(\"exit\", (code) => process.exit(code ?? 0));\n // Forward signals to child so Cmd+C doesn't leave zombie processes holding ports\n for (const sig of [\"SIGINT\", \"SIGTERM\", \"SIGHUP\"] as const) {\n process.on(sig, () => {\n child.kill(sig);\n setTimeout(() => {\n try {\n child.kill(\"SIGKILL\");\n } catch {}\n process.exit(1);\n }, 5000).unref();\n });\n }\n return child;\n}\n\n/**\n * Walk up from `cwd` and try to figure out which template / app this build\n * is running for. We look for two patterns:\n *\n * - `templates/<name>/...` — building inside the framework monorepo\n * - `apps/<name>/...` — building inside a scaffolded workspace\n *\n * Both, neither, or one may match. Used purely as Sentry tags so we can\n * filter the noisy \"Command failed: react-router build\" issues by template.\n */\nfunction inferBuildContext(cwd: string): {\n template?: string;\n app?: string;\n} {\n const segs = cwd.split(path.sep);\n let template: string | undefined;\n let app: string | undefined;\n for (let i = 0; i < segs.length - 1; i++) {\n if (segs[i] === \"templates\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n template = segs[i + 1];\n if (segs[i] === \"apps\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n app = segs[i + 1];\n }\n return { template, app };\n}\n\n/**\n * Run a build subcommand, streaming its stdout/stderr to the user's terminal\n * in real time while also capturing bounded tails for Sentry. On non-zero\n * exit we report a structured event (template, app, exit code, stderr/stdout\n * tails) and exit with the child's code. We deliberately do NOT throw — the\n * global uncaughtException handler would re-capture with a generic\n * \"Error: Command failed\" title, collapsing every template's failure into\n * one issue (which is exactly what we're trying to fix here).\n */\nfunction runBuildStep(\n cmd: string,\n cmdArgs: string[],\n opts: { label: string; env?: NodeJS.ProcessEnv },\n): Promise<void> {\n return new Promise<void>((resolve) => {\n const STDERR_TAIL_BYTES = 8000;\n const STDOUT_TAIL_BYTES = 4000;\n let stderrBuf = \"\";\n let stdoutBuf = \"\";\n\n const child = spawn(cmd, cmdArgs, {\n stdio: [\"inherit\", \"pipe\", \"pipe\"],\n shell: process.platform === \"win32\",\n env: opts.env ?? process.env,\n });\n\n child.stdout?.on(\"data\", (chunk: Buffer) => {\n process.stdout.write(chunk);\n const next = stdoutBuf + chunk.toString(\"utf-8\");\n stdoutBuf =\n next.length > STDOUT_TAIL_BYTES ? next.slice(-STDOUT_TAIL_BYTES) : next;\n });\n child.stderr?.on(\"data\", (chunk: Buffer) => {\n process.stderr.write(chunk);\n const next = stderrBuf + chunk.toString(\"utf-8\");\n stderrBuf =\n next.length > STDERR_TAIL_BYTES ? next.slice(-STDERR_TAIL_BYTES) : next;\n });\n\n child.on(\"error\", (err) => {\n // Failure to spawn (ENOENT, etc.).\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: `${cmd} ${cmdArgs.join(\" \")}`,\n cwd,\n stage: \"spawn\",\n },\n });\n Sentry.flush(2000).finally(() => process.exit(1));\n });\n\n child.on(\"exit\", (code, signal) => {\n const exitCode = code ?? (signal ? 1 : 0);\n if (exitCode === 0) {\n resolve();\n return;\n }\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n const childCommand = `${cmd} ${cmdArgs.join(\" \")}`;\n const err = new Error(\n `Build step \"${opts.label}\" failed with exit code ${exitCode}` +\n (template ? ` (template=${template})` : \"\") +\n (app ? ` (app=${app})` : \"\"),\n );\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: childCommand,\n cwd,\n exitCode,\n signal: signal ?? null,\n stderrTail: stderrBuf,\n stdoutTail: stdoutBuf,\n },\n });\n // Don't throw — see comment on runBuildStep above.\n Sentry.flush(2000).finally(() => process.exit(exitCode));\n });\n });\n}\n\ntrackCli(\"cli.run\");\n\nswitch (command) {\n case \"dev\": {\n if (isWorkspaceRoot()) {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n const vite = findViteBin();\n run(vite, args);\n break;\n }\n\n case \"workspace-dev\": {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"build\": {\n // React Router framework mode uses `react-router build` which\n // internally runs `vite build` with proper environment orchestration.\n // Legacy SPA mode uses `vite build` directly.\n //\n // Each step uses runBuildStep so that on failure we get a Sentry event\n // tagged with template/app and including stderr/stdout tails. If the\n // child exits non-zero, runBuildStep calls process.exit itself; the\n // continuation only runs on success.\n (async () => {\n // Doctor pre-step: scans app source for the security-critical guard\n // invariants (see `agent-native doctor --help`). Warn-only by\n // default — prints findings to stderr and always continues. Only\n // fails the build when `agent-native build --strict` was passed or\n // `agent-native.json` sets `{ \"doctor\": { \"failOnBuild\": true } }`.\n try {\n const { runDoctorBuildHook } = await import(\"./doctor.js\");\n const hook = await runDoctorBuildHook({\n cwd: process.cwd(),\n strict: args.includes(\"--strict\"),\n });\n if (!hook.ok) {\n console.error(\n \"\\nBuild aborted by `agent-native doctor` (see findings above).\",\n );\n process.exit(1);\n }\n } catch (err) {\n console.warn(\n `[doctor] pre-build scan failed to run (continuing): ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n if (isReactRouterFramework()) {\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n console.log(\"Building (React Router framework mode)...\");\n await runBuildStep(rr, [\"build\"], { label: \"react-router-build\" });\n } else {\n const vite = findViteBin();\n console.log(\"Building...\");\n await runBuildStep(vite, [\"build\"], { label: \"vite-build\" });\n }\n\n // Post-build: framework-mode apps also need a Nitro server bundle for\n // `agent-native start` and for serverless presets.\n if (isReactRouterFramework()) {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n const deployBuild = resolveDeployPostBuildInvocation({\n cliDir: __dirname,\n findTsxBin,\n });\n if (deployBuild) {\n await runBuildStep(deployBuild.command, deployBuild.args, {\n label: \"deploy-build\",\n env: process.env,\n });\n } else {\n console.warn(\n \"[build] Deploy build script not found and no deploy preset is configured. Skipping post-build step.\",\n );\n }\n }\n\n console.log(\"\\nBuild complete.\");\n })().catch((err) => {\n // runBuildStep handles its own failures and exits, so reaching here\n // implies a programming error in the orchestration above. Capture\n // and exit so the global unhandledRejection handler doesn't double-\n // report with a generic title.\n Sentry.captureException(err);\n Sentry.flush(2000).finally(() => process.exit(1));\n });\n break;\n }\n\n case \"start\": {\n // Like `next start` — runs Nitro production server\n const serverEntry = path.resolve(\".output/server/index.mjs\");\n if (!fs.existsSync(serverEntry)) {\n console.error(\n 'No production build found. Run \"agent-native build\" first.',\n );\n process.exit(1);\n }\n run(\"node\", [serverEntry, ...args]);\n break;\n }\n\n case \"action\": {\n // Run an action from actions/ (or scripts/ for backwards compat)\n const actionName = args[0];\n if (!actionName) {\n console.error(\n `Usage: agent-native action <name> ['{\"arg\":\"value\"}'] [--args]`,\n );\n process.exit(1);\n }\n const tsxAction = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRun = path.resolve(\"actions/run.ts\");\n const scriptsRun = path.resolve(\"scripts/run.ts\");\n const runFile = fs.existsSync(actionsRun) ? actionsRun : scriptsRun;\n run(tsxAction, [runFile, ...args]);\n break;\n }\n\n case \"agent\": {\n import(\"./agent.js\")\n .then(async (m) => {\n const code = await m.runAgent(args);\n if (code !== 0) process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"script\": {\n // @deprecated — use `agent-native action` instead\n const scriptName = args[0];\n if (!scriptName) {\n console.error(\"Usage: agent-native script <name> [--args]\");\n process.exit(1);\n }\n const tsx = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRunScript = path.resolve(\"actions/run.ts\");\n const scriptsRunScript = path.resolve(\"scripts/run.ts\");\n const runFileScript = fs.existsSync(actionsRunScript)\n ? actionsRunScript\n : scriptsRunScript;\n run(tsx, [runFileScript, ...args]);\n break;\n }\n\n case \"typecheck\": {\n // Run TypeScript type checking\n // React Router framework mode generates route types first\n if (isReactRouterFramework()) {\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n try {\n execSync(`${rr} typegen`, { stdio: \"inherit\" });\n } catch {\n // typegen may fail if routes aren't set up yet; continue to TypeScript.\n }\n }\n run(findTypeScriptCompilerBin(), [\"--noEmit\", ...args]);\n break;\n }\n\n case \"create\": {\n // Defaults to creating a workspace with a multi-select template picker.\n // Use --standalone for the old single-app flow.\n // --template foo,bar Pre-select multiple templates in the picker\n // --standalone Scaffold a single standalone app\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.createApp(parsed.name, {\n template: parsed.headless ? \"headless\" : parsed.template,\n standalone: parsed.standalone,\n }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"invoke\": {\n import(\"./invoke.js\")\n .then(async (m) => {\n const code = await m.runInvoke(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"agents\": {\n import(\"./agents.js\")\n .then(async (m) => {\n const code = await m.runAgents(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"migrate\": {\n import(\"./migrate.js\")\n .then((m) => m.runMigrate(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"upgrade\": {\n // Bring an existing app/workspace to current @agent-native/* packages,\n // refresh scaffold skills, and verify — without framework patches.\n import(\"./upgrade.js\")\n .then(async (m) => {\n const code = await m.runUpgrade(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"doctor\": {\n // Scan app source for security-critical guard invariants (see\n // `agent-native doctor --help`). For dependency-pin health, see\n // `agent-native upgrade check` instead.\n import(\"./doctor.js\")\n .then(async (m) => {\n const code = await m.runDoctor(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"code\": {\n import(\"./code.js\")\n .then((m) => m.runCode(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"mcp\": {\n // Connect external coding agents (Claude Code, Cowork, Codex) over MCP.\n // `mcp serve` runs the stdio transport; install/uninstall/status/token\n // manage client configs + the local token.\n import(\"./mcp.js\")\n .then((m) => m.runMcp(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"connect\": {\n // Wire your local coding agent to a DEPLOYED agent-native app via a\n // browser device-code flow (no token copying). `--all` connects every\n // first-party hosted app; `--token` is the no-browser fallback.\n import(\"./connect.js\")\n .then(async (m) => {\n await m.runConnect(args);\n process.exit(process.exitCode ?? 0);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"reconnect\":\n case \"reauth\": {\n // Refresh an existing remote MCP auth/config entry without reinstalling\n // app skills or running the broader connector setup path.\n import(\"./connect.js\")\n .then((m) => m.runConnect([\"reconnect\", ...args]))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"app-skill\": {\n // Package or install an agent-native app as a skill-backed MCP/app bundle.\n import(\"./app-skill.js\")\n .then((m) => m.runAppSkill(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"skills\": {\n // Friendly skill install surface. Wraps open skills installation plus MCP.\n import(\"./skills.js\")\n .then((m) => m.runSkills(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"content\": {\n import(\"./content-local.js\")\n .then(async (m) => {\n const code = await m.runContentLocal(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"visualize-repo\": {\n import(\"./visualize-repo.js\")\n .then(async (m) => {\n const code = await m.runVisualizeRepo(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"design\": {\n import(\"./design-connect.js\")\n .then(async (m) => {\n const code = await m.runDesign(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"recap\": {\n // PR visual recap helpers used by the GitHub Action. Promoted to the CLI\n // so an installed repo's workflow can call `agent-native recap …` instead\n // of copying helper scripts. Run `agent-native recap help` for the full\n // subcommand list.\n import(\"./recap.js\")\n .then((m) => m.runRecap(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"plan\": {\n // Plan authoring helpers: local MDX preview plus a no-auth block catalog\n // fetcher for text-only/local installs.\n import(\"./plan-local.js\")\n .then((m) => m.runPlan(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"create-workspace\": {\n // Deprecated alias for `create` (since workspace is now the default).\n const parsed = parseScaffoldArgs(args);\n import(\"./create-workspace.js\")\n .then((m) =>\n m.createWorkspace({ name: parsed.name, template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"add-app\": {\n // Add one or more apps to the current workspace.\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.addAppToWorkspace(parsed.name, { template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"deploy\": {\n // Build and deploy the entire workspace as one unit. Each app is served\n // at /<app>/* under the same origin.\n import(\"../deploy/workspace-deploy.js\")\n .then((m) => m.runWorkspaceDeploy({ args }))\n .catch((err) => {\n console.error(\"Deploy failed:\", err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"setup-agents\": {\n import(\"./setup-agents.js\").then((m) => m.runSetupAgents());\n break;\n }\n\n case \"info\": {\n // Print read-only info about an installable package (e.g. @agent-native/scheduling).\n // Lists subpath exports, source paths in node_modules, and docs pointers.\n import(\"./info.js\").then((m) => m.runInfo(args[0]));\n break;\n }\n\n case \"add\": {\n // Blueprint installer (à la Flue's `flue add`): instead of scaffolding\n // files, emit a curated Markdown integration blueprint to stdout so it can\n // be piped into a coding agent — `agent-native add provider stripe | claude`.\n // A URL instead of a name yields a generic research-and-integrate blueprint.\n import(\"./add.js\")\n .then((m) => {\n const code = m.runAdd(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"package\": {\n import(\"./package-lifecycle.js\")\n .then(async (m) => {\n const code = await m.runPackageLifecycle(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eject\": {\n import(\"./eject.js\")\n .then(async (m) => {\n const code = await m.runEject(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"audit-agent-web\": {\n import(\"./audit-agent-web.js\")\n .then((m) => m.runAuditAgentWeb(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eval\": {\n // Discover and run the app's evals (**/*.eval.ts, evals/*.ts), score the\n // agent's output, and exit non-zero if any eval falls below its threshold.\n // Doubles as a CI deploy gate. `--json` emits a machine-readable report.\n import(\"./eval.js\")\n .then((m) => m.runEval(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"changelog\": {\n // Author and roll up the app's user-facing changelog (changeset-style\n // pending entry files → a dated CHANGELOG.md section).\n import(\"./changelog.js\")\n .then(async (m) => {\n const code = await m.runChangelog(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"--version\":\n case \"-v\": {\n console.log(_version);\n break;\n }\n\n case undefined:\n import(\"./code.js\")\n .then((m) => m.runCode([]))\n .catch(handleScaffoldImportError);\n break;\n\n case \"--help\":\n case \"-h\":\n console.log(`agent-native v${_version}\n\nUsage:\n agent-native Launch Agent-Native Code workspace\n agent-native \"fix tests\" Start an Agent-Native Code coding session\n agent-native dev Start development server\n (or the workspace gateway at a workspace root)\n agent-native build Build for production (client + server)\n agent-native start Start production server\n agent-native action <name> Run an action from actions/\n agent-native agent \"prompt\" Run the app-agent loop once against local actions\n agent-native agents list List connected/discoverable agents\n agent-native invoke <app> \"prompt\"\n Call another agent-native app over A2A\n agent-native script <name> Run an action (deprecated alias for 'action')\n agent-native typecheck Run TypeScript type checking\n agent-native create [name] Scaffold a new agent-native workspace with a\n multi-select template picker. Use --standalone\n for a single-app scaffold.\n agent-native code Launch Agent-Native Code workspace. Type a task or\n use goals like /migrate and /audit.\n agent-native code serve Run the Agent-Native Code remote connector.\n agent-native mcp <cmd> Connect external coding agents over MCP.\n cmds: serve | install | uninstall | status |\n token (--client claude-code|codex|cowork|\n cursor|opencode|github-copilot)\n agent-native connect <url> Authenticate your coding agent to a DEPLOYED app.\n OAuth-capable clients (Claude Code) get a /mcp\n authenticate prompt; Codex / Cowork use the\n browser device-code flow. --all connects every\n first-party app; --token is the no-browser\n fallback. Usually run for you by 'skills add'.\n agent-native reconnect [url] Re-authenticate an existing MCP entry without\n reinstalling app skills/connectors.\n agent-native app-skill <cmd> Install, launch, or package app-backed skills.\n cmds: ensure | launch | pack\n agent-native skills add assets|content|design-exploration|visual-edit|visual-plan|visual-recap|context-xray\n Install the skill instructions, register the MCP\n connector, AND authenticate it in one step.\n --no-connect skips auth (run 'connect' later);\n non-interactive shells print the connect command.\n --with-github-action also writes the PR Visual\n Recap workflow into .github/workflows/.\n agent-native content local-files <file-or-folder>\n Connect a local docs/content folder to normal\n database-backed Content. Use --no-open, --port N,\n or --profile docs/no-bookkeeping as needed.\n agent-native design connect Start a localhost Design bridge for a running\n dev server. Use --url, --port, --root, or\n --json to print the route/source manifest.\n agent-native recap <cmd> PR visual recap setup and GitHub Action helpers.\n Run 'agent-native recap help' for subcommands.\n agent-native plan <cmd> Plan helpers for block catalogs and local files.\n cmds: blocks | local init | local check |\n local serve | local verify | local preview\n agent-native migrate <source> Create an Agent-Native Code /migrate session, or use\n --emit for a portable own-agent dossier.\n agent-native upgrade Bring an existing app/workspace to current\n @agent-native/* packages, refresh scaffold\n skills, and typecheck. Prefer this over\n patching core/dispatch. 'upgrade check' is\n doctor-only.\n agent-native add-app [name] Add one or more apps to the current workspace\n agent-native workspace-dev Start the multi-app workspace gateway\n agent-native deploy Build & deploy every app in the workspace to\n a single origin (your-agents.com/<app>/*)\n agent-native setup-agents Create symlinks for all agent tools\n agent-native info <pkg> Print info about an installed package:\n exports, source paths, and docs links.\n agent-native add <kind> <name|url>\n Emit an integration blueprint to stdout for your\n coding agent to apply. Pipe it in:\n 'agent-native add provider stripe | claude'.\n kinds: provider | channel | sandbox | action.\n Pass a URL instead of a name for a generic\n research-and-integrate blueprint. --list to\n browse available blueprints.\n agent-native package <cmd> <package>\n Manifest package lifecycle: inspect | add | eject.\n add/eject are dry-run unless --apply; --json emits\n a machine-readable compatibility/change report.\n agent-native eject <unit> Copy a supported feature into app-owned source.\n --list discovers units; inspect/diff are read-only;\n eject/restore are dry-run unless --apply.\n agent-native changelog <cmd> Author the app's user-facing changelog.\n cmds: add \"<summary>\" [--type added|fixed|...] |\n release | list. Pending entries live in\n changelog/; 'release' rolls them into CHANGELOG.md.\n agent-native audit-agent-web Audit a public URL for agent-readable surfaces\n agent-native eval [pattern] Run the app's evals (**/*.eval.ts, evals/*.ts)\n and exit non-zero if any scores below its\n threshold. A CI deploy gate. --json for CI,\n --threshold N to override all thresholds.\n\nOptions:\n -h, --help Show this help message\n -v, --version Show version number\n --template <names> Comma-separated templates to pre-select\n (mail,calendar,analytics,...) — or\n github:user/repo for community templates\n --headless Create the primitive-first action-only scaffold\n --standalone Scaffold a single standalone app (no workspace)\n --emit [dir] With migrate, emit an own-agent dossier\n --describe <text> With migrate, describe URL/prose-only sources\n --preset <name> Workspace deploy preset:\n cloudflare_pages (default), netlify, or vercel\n --build-only Build workspace deploy artifacts without publishing\n --eager With workspace dev, start every app immediately\n --url <url> URL to audit with audit-agent-web\n\nFeedback: ${FEEDBACK_URL}\nBugs: ${BUGS_URL}`);\n break;\n\n default:\n if (command && !command.startsWith(\"-\")) {\n // A bare, single command-like token with no further args is almost\n // always a mistyped subcommand (e.g. `agent-native destory`). Silently\n // forwarding it to the coding agent would run an LLM with file-write\n // powers on a typo — a real footgun on a code-modifying tool. Refuse it\n // and point at the explicit forms. Intentional natural-language tasks\n // are still dispatched: a quoted phrase (`agent-native \"fix tests\"`,\n // which arrives as one argv token containing a space) or multi-word\n // input (`agent-native fix the tests`, which has trailing args).\n const looksLikeMistypedSubcommand =\n args.length === 0 && /^[a-z][a-z0-9-]*$/i.test(command);\n if (!looksLikeMistypedSubcommand) {\n import(\"./code.js\")\n .then((m) => m.runCode([command, ...args]))\n .catch(handleScaffoldImportError);\n break;\n }\n console.error(`Unknown command: ${command}`);\n console.error(\n `If you meant to start a coding session with this as the task, run:\\n` +\n ` agent-native code ${JSON.stringify(command)}\\n` +\n `or quote a natural-language task:\\n` +\n ` agent-native \"fix the failing tests\"`,\n );\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n }\n console.error(`Unknown command: ${command}`);\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,OAAO,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AAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { execSync, spawn } from \"child_process\";\nimport fs from \"fs\";\nimport { createRequire } from \"module\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport * as Sentry from \"@sentry/node\";\n\nimport { resolveDeployPostBuildInvocation } from \"./deploy-build.js\";\n\n// Resolve version once at module scope — used by both --version and --help\nlet _version = \"unknown\";\ntry {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n // dist/cli/index.js → ../../package.json\n const pkg = JSON.parse(\n fs.readFileSync(path.resolve(__dirname, \"../../package.json\"), \"utf-8\"),\n );\n _version = pkg.version;\n} catch {}\n\n// Fail fast on unsupported Node versions. `engines.node: \">=22\"` is only\n// advisory — npx/pnpm merely warn — so without this an older Node (18/20)\n// first fails deep inside a scaffold dynamic import with a cryptic\n// ERR_MODULE / syntax error that `handleScaffoldImportError` misreports as a\n// corrupt npx cache. A clear up-front message saves that whole detour.\nconst REQUIRED_NODE_MAJOR = 22;\nconst _nodeMajor = Number(process.versions.node.split(\".\")[0]);\nif (Number.isFinite(_nodeMajor) && _nodeMajor < REQUIRED_NODE_MAJOR) {\n console.error(\n `agent-native requires Node.js ${REQUIRED_NODE_MAJOR} or newer, but you're on Node ${process.versions.node}.\\n` +\n `Upgrade Node (https://nodejs.org) and re-run. With nvm: \\`nvm install ${REQUIRED_NODE_MAJOR}\\`.`,\n );\n process.exit(1);\n}\n\n/**\n * Build a redacted \"command\" tag from process.argv. Strips the value that\n * follows any --token / --key / --secret / --password / --api-key flag so\n * we don't ship developer secrets to Sentry alongside the crash.\n *\n * Supports both `--token foo` (separate argv item) and `--token=foo`\n * (combined argv item) forms.\n */\nconst SECRET_FLAG_RE = /^--?(token|key|secret|password|api[_-]?key)$/i;\nconst SECRET_FLAG_EQ_RE =\n /^(--?(token|key|secret|password|api[_-]?key))=(.*)$/i;\nfunction buildRedactedCommandTag(argv: string[]): string {\n const out: string[] = [];\n for (let i = 0; i < argv.length; i++) {\n const a = argv[i];\n if (SECRET_FLAG_RE.test(a)) {\n out.push(a);\n // Consume the next argv item as the secret value\n if (i + 1 < argv.length) {\n out.push(\"<redacted>\");\n i++;\n }\n continue;\n }\n const m = a.match(SECRET_FLAG_EQ_RE);\n if (m) {\n out.push(`${m[1]}=<redacted>`);\n continue;\n }\n out.push(a);\n }\n return out.join(\" \");\n}\n\nSentry.init({\n dsn: \"https://0d384e9eff2f6542af468b92769f2f5b@o117565.ingest.us.sentry.io/4511270386466816\",\n release: `agent-native-cli@${_version}`,\n // Sentry's Http integration wraps outgoing fetch in a way that breaks the\n // hosted Plan MCP route negotiation used by recap CI smoke checks.\n integrations: (integrations) =>\n integrations.filter((integration) => integration.name !== \"Http\"),\n // sendDefaultPii MUST stay false — the CLI runs in third-party developer\n // environments and we never want to ship request headers, IPs, cookies,\n // or process env contents to Sentry without explicit consent.\n sendDefaultPii: false,\n beforeSend(event) {\n // Drop expected user-input rejections (validateRepoName, etc.) so they\n // don't pollute Sentry with non-bug noise.\n const exceptionType = event.exception?.values?.[0]?.type;\n if (\n exceptionType === \"ValidationError\" ||\n event.tags?.handled === \"validation\"\n ) {\n return null;\n }\n\n // Defense in depth: strip any sensitive fields that may have been\n // attached to the event despite sendDefaultPii: false (e.g. integrations\n // that capture request metadata).\n if (event.request) {\n if (event.request.headers) {\n const headers = event.request.headers as Record<string, string>;\n for (const k of Object.keys(headers)) {\n const lk = k.toLowerCase();\n if (\n lk === \"cookie\" ||\n lk === \"authorization\" ||\n lk === \"set-cookie\" ||\n lk === \"proxy-authorization\"\n ) {\n delete headers[k];\n }\n }\n }\n // Cookies are also exposed via event.request.cookies as a separate field\n delete (event.request as Record<string, unknown>).cookies;\n }\n // Keep user info that was explicitly set via Sentry.setUser (id/email)\n // so we can attribute crashes back to the operator. Always strip\n // ip_address — the CLI runs on third-party machines and the IP is auto-\n // collected without consent. If only auto-collected fields remain,\n // drop the user object entirely.\n if (event.user) {\n const user = event.user as Record<string, unknown>;\n delete user.ip_address;\n const hasIdentity =\n typeof user.id === \"string\" ||\n typeof user.email === \"string\" ||\n typeof user.username === \"string\";\n if (!hasIdentity) {\n delete event.user;\n }\n }\n // Sentry's contexts can carry process.env snapshots — strip env-shaped\n // contexts so we don't leak deployment secrets.\n if (event.contexts && typeof event.contexts === \"object\") {\n delete (event.contexts as Record<string, unknown>).runtime_env;\n }\n\n event.tags = {\n ...event.tags,\n // Build the command tag from process.argv with secrets redacted so\n // `agent-native ... --token foo` doesn't leak `foo` to Sentry.\n command: buildRedactedCommandTag(process.argv.slice(2)),\n subcommand: process.argv[2] ?? \"none\",\n nodeVersion: process.version,\n platform: process.platform,\n };\n return event;\n },\n});\n\n// Identify the operator so future CLI errors carry spaceId / builderUserId\n// that we can map back to a real Builder user. The CLI doesn't have a real\n// email today — only the env-managed identifiers from the workspace's .env.\n{\n const builderUserId = process.env.BUILDER_USER_ID;\n const builderPublicKey = process.env.BUILDER_PUBLIC_KEY;\n if (builderUserId) {\n Sentry.setUser({ id: builderUserId });\n Sentry.setTag(\"builderUserId\", builderUserId);\n }\n if (builderPublicKey) {\n Sentry.setTag(\"spaceId\", builderPublicKey);\n }\n}\n\nconst FEEDBACK_URL =\n \"https://forms.agent-native.com/f/agent-native-feedback/_16ewV?source=cli\";\nconst BUGS_URL = \"https://github.com/BuilderIO/agent-native/issues\";\n\nconst command = process.argv[2];\n// Filter out bare \"--\" separators that pnpm inserts between its args and script args\nconst args = process.argv.slice(3).filter((a) => a !== \"--\");\n\nfunction parseScaffoldArgs(argv: string[]): {\n name?: string;\n template?: string;\n standalone: boolean;\n headless: boolean;\n} {\n let name: string | undefined;\n let template: string | undefined;\n let standalone = false;\n let headless = false;\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === \"--template\" && argv[i + 1]) {\n template = argv[++i];\n } else if (arg.startsWith(\"--template=\")) {\n template = arg.slice(\"--template=\".length);\n } else if (arg === \"--standalone\") {\n standalone = true;\n } else if (arg === \"--headless\") {\n headless = true;\n } else if (!arg.startsWith(\"-\") && !name) {\n name = arg;\n }\n }\n\n return { name, template, standalone, headless };\n}\n\n// Track CLI usage (best-effort, non-blocking)\nfunction trackCli(event: string, props?: Record<string, unknown>): void {\n try {\n void import(\"../tracking/registry.js\")\n .then((m) => m.track(event, { command, ...props }))\n .catch(() => undefined);\n void import(\"../tracking/providers.js\")\n .then((m) => m.registerBuiltinProviders())\n .catch(() => undefined);\n } catch {}\n}\n\n// Global error handler — show feedback link on unhandled crashes\nprocess.on(\"uncaughtException\", (err) => {\n console.error(`\\n Unexpected error: ${err.message}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: err.message });\n Sentry.captureException(err);\n void Sentry.flush(2000)\n .catch(() => undefined)\n .finally(() => process.exit(1));\n});\n\nprocess.on(\"unhandledRejection\", (reason: any) => {\n console.error(`\\n Unhandled error: ${reason?.message ?? reason}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: reason?.message ?? String(reason) });\n Sentry.captureException(reason);\n void Sentry.flush(2000)\n .catch(() => undefined)\n .finally(() => process.exit(1));\n});\n\n// Surface a self-heal hint when an interrupted `npx @agent-native/core@latest ...`\n// leaves a half-extracted package in the npx cache and a follow-up run fails\n// to load one of our own sub-modules.\nfunction handleScaffoldImportError(err: any): never {\n const msg = err?.message ?? String(err);\n const looksLikeCorruptCache =\n err?.code === \"ERR_MODULE_NOT_FOUND\" ||\n err?.code === \"MODULE_NOT_FOUND\" ||\n err?.code === \"ENOENT\" ||\n /Cannot find module|tarball|integrity|EINTEGRITY|corrupt|truncated/i.test(\n msg,\n );\n if (looksLikeCorruptCache) {\n console.error(\n `\\n Failed to load the scaffolder. This usually means an earlier\\n \\`npx\\` run was interrupted and left a corrupt cache.\\n\\n Clear the npx cache and try again:\\n rm -rf ~/.npm/_npx\\n npx @agent-native/core@latest create\\n\\n Original error: ${msg}\\n`,\n );\n } else {\n console.error(`\\n Failed to load the scaffolder: ${msg}\\n`);\n }\n trackCli(\"cli.scaffold.import_error\", { error: msg });\n Sentry.captureException(err);\n Sentry.flush(2000).finally(() => process.exit(1));\n throw err;\n}\n\nfunction findBinUpwards(binName: string): string | undefined {\n let dir = process.cwd();\n for (let i = 0; i < 20; i++) {\n const candidate = path.join(dir, \"node_modules\", \".bin\", binName);\n if (fs.existsSync(candidate)) return candidate;\n const parent = path.dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n return undefined;\n}\n\nfunction findViteBin(): string {\n return findBinUpwards(\"vite\") ?? \"vite\";\n}\n\nfunction findTsxBin(): string {\n const localTsx = path.resolve(\"node_modules/.bin/tsx\");\n if (fs.existsSync(localTsx)) return localTsx;\n return \"tsx\";\n}\n\nfunction findTypeScriptCompilerBin(): string {\n const localTsc = path.resolve(\"node_modules/.bin/tsc\");\n if (fs.existsSync(localTsc)) return localTsc;\n\n // Prefer TypeScript 7's tsc; fall back to legacy tsgo if present.\n const localTsgo = path.resolve(\"node_modules/.bin/tsgo\");\n if (fs.existsSync(localTsgo)) return localTsgo;\n\n return \"tsc\";\n}\n\nfunction findReactRouterBin(): string {\n return findBinUpwards(\"react-router\") ?? \"react-router\";\n}\n\n/** Check if the project uses React Router framework mode (has react-router.config.ts) */\nfunction isReactRouterFramework(): boolean {\n return (\n fs.existsSync(path.resolve(\"react-router.config.ts\")) ||\n fs.existsSync(path.resolve(\"react-router.config.js\"))\n );\n}\n\nfunction canResolveFromProject(specifier: string): boolean {\n try {\n const requireFromProject = createRequire(path.resolve(\"package.json\"));\n requireFromProject.resolve(specifier);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction projectUsesFsRoutes(): boolean {\n for (const file of [\n path.resolve(\"app/routes.ts\"),\n path.resolve(\"app/routes.tsx\"),\n path.resolve(\"routes.ts\"),\n path.resolve(\"routes.tsx\"),\n ]) {\n try {\n if (\n fs.existsSync(file) &&\n fs.readFileSync(file, \"utf-8\").includes(\"@react-router/fs-routes\")\n ) {\n return true;\n }\n } catch {}\n }\n return false;\n}\n\nfunction validateReactRouterBuildDependencies(): void {\n const required: Array<[packageName: string, specifier: string]> = [\n [\"react-router\", \"react-router\"],\n [\"@react-router/dev\", \"@react-router/dev/vite\"],\n [\"vite\", \"vite\"],\n ];\n if (projectUsesFsRoutes()) {\n required.push([\"@react-router/fs-routes\", \"@react-router/fs-routes\"]);\n }\n\n const missing = required\n .filter(([, specifier]) => !canResolveFromProject(specifier))\n .map(([packageName]) => packageName);\n\n if (missing.length === 0) return;\n\n const packageManager = fs.existsSync(path.resolve(\"pnpm-lock.yaml\"))\n ? \"pnpm\"\n : fs.existsSync(path.resolve(\"yarn.lock\"))\n ? \"yarn\"\n : \"npm\";\n const installCommand =\n packageManager === \"pnpm\"\n ? `pnpm add ${missing.join(\" \")}`\n : packageManager === \"yarn\"\n ? `yarn add ${missing.join(\" \")}`\n : `npm install ${missing.join(\" \")}`;\n\n console.error(\n [\n \"React Router framework mode requires build packages that are not installed from this app root.\",\n `Missing: ${missing.join(\", \")}`,\n `Install them with: ${installCommand}`,\n ].join(\"\\n\"),\n );\n process.exit(1);\n}\n\nfunction isWorkspaceRoot(): boolean {\n const pkgPath = path.resolve(\"package.json\");\n if (!fs.existsSync(pkgPath)) return false;\n try {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n return (\n typeof pkg?.[\"agent-native\"]?.workspaceCore === \"string\" &&\n fs.existsSync(path.resolve(\"apps\"))\n );\n } catch {\n return false;\n }\n}\n\nfunction run(\n cmd: string,\n cmdArgs: string[],\n opts?: { stdio?: \"inherit\" | \"pipe\" },\n) {\n const child = spawn(cmd, cmdArgs, {\n stdio: opts?.stdio ?? \"inherit\",\n shell: process.platform === \"win32\",\n env: process.env,\n });\n child.on(\"exit\", (code) => process.exit(code ?? 0));\n // Forward signals to child so Cmd+C doesn't leave zombie processes holding ports\n for (const sig of [\"SIGINT\", \"SIGTERM\", \"SIGHUP\"] as const) {\n process.on(sig, () => {\n child.kill(sig);\n setTimeout(() => {\n try {\n child.kill(\"SIGKILL\");\n } catch {}\n process.exit(1);\n }, 5000).unref();\n });\n }\n return child;\n}\n\n/**\n * Walk up from `cwd` and try to figure out which template / app this build\n * is running for. We look for two patterns:\n *\n * - `templates/<name>/...` — building inside the framework monorepo\n * - `apps/<name>/...` — building inside a scaffolded workspace\n *\n * Both, neither, or one may match. Used purely as Sentry tags so we can\n * filter the noisy \"Command failed: react-router build\" issues by template.\n */\nfunction inferBuildContext(cwd: string): {\n template?: string;\n app?: string;\n} {\n const segs = cwd.split(path.sep);\n let template: string | undefined;\n let app: string | undefined;\n for (let i = 0; i < segs.length - 1; i++) {\n if (segs[i] === \"templates\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n template = segs[i + 1];\n if (segs[i] === \"apps\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n app = segs[i + 1];\n }\n return { template, app };\n}\n\n/**\n * Run a build subcommand, streaming its stdout/stderr to the user's terminal\n * in real time while also capturing bounded tails for Sentry. On non-zero\n * exit we report a structured event (template, app, exit code, stderr/stdout\n * tails) and exit with the child's code. We deliberately do NOT throw — the\n * global uncaughtException handler would re-capture with a generic\n * \"Error: Command failed\" title, collapsing every template's failure into\n * one issue (which is exactly what we're trying to fix here).\n */\nfunction runBuildStep(\n cmd: string,\n cmdArgs: string[],\n opts: { label: string; env?: NodeJS.ProcessEnv },\n): Promise<void> {\n return new Promise<void>((resolve) => {\n const STDERR_TAIL_BYTES = 8000;\n const STDOUT_TAIL_BYTES = 4000;\n let stderrBuf = \"\";\n let stdoutBuf = \"\";\n\n const child = spawn(cmd, cmdArgs, {\n stdio: [\"inherit\", \"pipe\", \"pipe\"],\n shell: process.platform === \"win32\",\n env: opts.env ?? process.env,\n });\n\n child.stdout?.on(\"data\", (chunk: Buffer) => {\n process.stdout.write(chunk);\n const next = stdoutBuf + chunk.toString(\"utf-8\");\n stdoutBuf =\n next.length > STDOUT_TAIL_BYTES ? next.slice(-STDOUT_TAIL_BYTES) : next;\n });\n child.stderr?.on(\"data\", (chunk: Buffer) => {\n process.stderr.write(chunk);\n const next = stderrBuf + chunk.toString(\"utf-8\");\n stderrBuf =\n next.length > STDERR_TAIL_BYTES ? next.slice(-STDERR_TAIL_BYTES) : next;\n });\n\n child.on(\"error\", (err) => {\n // Failure to spawn (ENOENT, etc.).\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: `${cmd} ${cmdArgs.join(\" \")}`,\n cwd,\n stage: \"spawn\",\n },\n });\n Sentry.flush(2000).finally(() => process.exit(1));\n });\n\n child.on(\"exit\", (code, signal) => {\n const exitCode = code ?? (signal ? 1 : 0);\n if (exitCode === 0) {\n resolve();\n return;\n }\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n const childCommand = `${cmd} ${cmdArgs.join(\" \")}`;\n const err = new Error(\n `Build step \"${opts.label}\" failed with exit code ${exitCode}` +\n (template ? ` (template=${template})` : \"\") +\n (app ? ` (app=${app})` : \"\"),\n );\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: childCommand,\n cwd,\n exitCode,\n signal: signal ?? null,\n stderrTail: stderrBuf,\n stdoutTail: stdoutBuf,\n },\n });\n // Don't throw — see comment on runBuildStep above.\n Sentry.flush(2000).finally(() => process.exit(exitCode));\n });\n });\n}\n\ntrackCli(\"cli.run\");\n\nswitch (command) {\n case \"dev\": {\n if (isWorkspaceRoot()) {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n const vite = findViteBin();\n run(vite, args);\n break;\n }\n\n case \"workspace-dev\": {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"build\": {\n // React Router framework mode uses `react-router build` which\n // internally runs `vite build` with proper environment orchestration.\n // Legacy SPA mode uses `vite build` directly.\n //\n // Each step uses runBuildStep so that on failure we get a Sentry event\n // tagged with template/app and including stderr/stdout tails. If the\n // child exits non-zero, runBuildStep calls process.exit itself; the\n // continuation only runs on success.\n (async () => {\n // Doctor pre-step: scans app source for the security-critical guard\n // invariants (see `agent-native doctor --help`). Warn-only by\n // default — prints findings to stderr and always continues. Only\n // fails the build when `agent-native build --strict` was passed or\n // `agent-native.json` sets `{ \"doctor\": { \"failOnBuild\": true } }`.\n try {\n const { runDoctorBuildHook } = await import(\"./doctor.js\");\n const hook = await runDoctorBuildHook({\n cwd: process.cwd(),\n strict: args.includes(\"--strict\"),\n });\n if (!hook.ok) {\n console.error(\n \"\\nBuild aborted by `agent-native doctor` (see findings above).\",\n );\n process.exit(1);\n }\n } catch (err) {\n console.warn(\n `[doctor] pre-build scan failed to run (continuing): ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n if (isReactRouterFramework()) {\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n console.log(\"Building (React Router framework mode)...\");\n await runBuildStep(rr, [\"build\"], { label: \"react-router-build\" });\n } else {\n const vite = findViteBin();\n console.log(\"Building...\");\n await runBuildStep(vite, [\"build\"], { label: \"vite-build\" });\n }\n\n // Post-build: framework-mode apps also need a Nitro server bundle for\n // `agent-native start` and for serverless presets.\n if (isReactRouterFramework()) {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n const deployBuild = resolveDeployPostBuildInvocation({\n cliDir: __dirname,\n findTsxBin,\n });\n if (deployBuild) {\n await runBuildStep(deployBuild.command, deployBuild.args, {\n label: \"deploy-build\",\n env: process.env,\n });\n } else {\n console.warn(\n \"[build] Deploy build script not found and no deploy preset is configured. Skipping post-build step.\",\n );\n }\n }\n\n console.log(\"\\nBuild complete.\");\n })().catch((err) => {\n // runBuildStep handles its own failures and exits, so reaching here\n // implies a programming error in the orchestration above. Capture\n // and exit so the global unhandledRejection handler doesn't double-\n // report with a generic title.\n Sentry.captureException(err);\n Sentry.flush(2000).finally(() => process.exit(1));\n });\n break;\n }\n\n case \"start\": {\n // Like `next start` — runs Nitro production server\n const serverEntry = path.resolve(\".output/server/index.mjs\");\n if (!fs.existsSync(serverEntry)) {\n console.error(\n 'No production build found. Run \"agent-native build\" first.',\n );\n process.exit(1);\n }\n run(\"node\", [serverEntry, ...args]);\n break;\n }\n\n case \"action\": {\n // Run an action from actions/ (or scripts/ for backwards compat)\n const actionName = args[0];\n if (!actionName) {\n console.error(\n `Usage: agent-native action <name> ['{\"arg\":\"value\"}'] [--args]`,\n );\n process.exit(1);\n }\n const tsxAction = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRun = path.resolve(\"actions/run.ts\");\n const scriptsRun = path.resolve(\"scripts/run.ts\");\n const runFile = fs.existsSync(actionsRun) ? actionsRun : scriptsRun;\n run(tsxAction, [runFile, ...args]);\n break;\n }\n\n case \"agent\": {\n import(\"./agent.js\")\n .then(async (m) => {\n const code = await m.runAgent(args);\n if (code !== 0) process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"script\": {\n // @deprecated — use `agent-native action` instead\n const scriptName = args[0];\n if (!scriptName) {\n console.error(\"Usage: agent-native script <name> [--args]\");\n process.exit(1);\n }\n const tsx = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRunScript = path.resolve(\"actions/run.ts\");\n const scriptsRunScript = path.resolve(\"scripts/run.ts\");\n const runFileScript = fs.existsSync(actionsRunScript)\n ? actionsRunScript\n : scriptsRunScript;\n run(tsx, [runFileScript, ...args]);\n break;\n }\n\n case \"typecheck\": {\n // Run TypeScript type checking\n // React Router framework mode generates route types first\n if (isReactRouterFramework()) {\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n try {\n execSync(`${rr} typegen`, { stdio: \"inherit\" });\n } catch {\n // typegen may fail if routes aren't set up yet; continue to TypeScript.\n }\n }\n run(findTypeScriptCompilerBin(), [\"--noEmit\", ...args]);\n break;\n }\n\n case \"create\": {\n // Defaults to creating a workspace with a multi-select template picker.\n // Use --standalone for the old single-app flow.\n // --template foo,bar Pre-select multiple templates in the picker\n // --standalone Scaffold a single standalone app\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.createApp(parsed.name, {\n template: parsed.headless ? \"headless\" : parsed.template,\n standalone: parsed.standalone,\n }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"invoke\": {\n import(\"./invoke.js\")\n .then(async (m) => {\n const code = await m.runInvoke(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"agents\": {\n import(\"./agents.js\")\n .then(async (m) => {\n const code = await m.runAgents(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"migrate\": {\n import(\"./migrate.js\")\n .then((m) => m.runMigrate(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"upgrade\": {\n // Bring an existing app/workspace to current @agent-native/* packages,\n // refresh scaffold skills, and verify — without framework patches.\n import(\"./upgrade.js\")\n .then(async (m) => {\n const code = await m.runUpgrade(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"doctor\": {\n // Scan app source for security-critical guard invariants (see\n // `agent-native doctor --help`). For dependency-pin health, see\n // `agent-native upgrade check` instead.\n import(\"./doctor.js\")\n .then(async (m) => {\n const code = await m.runDoctor(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"code\": {\n import(\"./code.js\")\n .then((m) => m.runCode(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"mcp\": {\n // Connect external coding agents (Claude Code, Cowork, Codex) over MCP.\n // `mcp serve` runs the stdio transport; install/uninstall/status/token\n // manage client configs + the local token.\n import(\"./mcp.js\")\n .then((m) => m.runMcp(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"connect\": {\n // Wire your local coding agent to a DEPLOYED agent-native app via a\n // browser device-code flow (no token copying). `--all` connects every\n // first-party hosted app; `--token` is the no-browser fallback.\n import(\"./connect.js\")\n .then(async (m) => {\n await m.runConnect(args);\n process.exit(process.exitCode ?? 0);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"reconnect\":\n case \"reauth\": {\n // Refresh an existing remote MCP auth/config entry without reinstalling\n // app skills or running the broader connector setup path.\n import(\"./connect.js\")\n .then((m) => m.runConnect([\"reconnect\", ...args]))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"app-skill\": {\n // Package or install an agent-native app as a skill-backed MCP/app bundle.\n import(\"./app-skill.js\")\n .then((m) => m.runAppSkill(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"skills\": {\n // Friendly skill install surface. Wraps open skills installation plus MCP.\n import(\"./skills.js\")\n .then((m) => m.runSkills(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"content\": {\n import(\"./content-local.js\")\n .then(async (m) => {\n const code = await m.runContentLocal(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"visualize-repo\": {\n import(\"./visualize-repo.js\")\n .then(async (m) => {\n const code = await m.runVisualizeRepo(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"design\": {\n import(\"./design-connect.js\")\n .then(async (m) => {\n const code = await m.runDesign(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"recap\": {\n // PR visual recap helpers used by the GitHub Action. Promoted to the CLI\n // so an installed repo's workflow can call `agent-native recap …` instead\n // of copying helper scripts. Run `agent-native recap help` for the full\n // subcommand list.\n import(\"./recap.js\")\n .then((m) => m.runRecap(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"plan\": {\n // Plan authoring helpers: local MDX preview plus a no-auth block catalog\n // fetcher for text-only/local installs.\n import(\"./plan-local.js\")\n .then((m) => m.runPlan(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"create-workspace\": {\n // Deprecated alias for `create` (since workspace is now the default).\n const parsed = parseScaffoldArgs(args);\n import(\"./create-workspace.js\")\n .then((m) =>\n m.createWorkspace({ name: parsed.name, template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"add-app\": {\n // Add one or more apps to the current workspace.\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.addAppToWorkspace(parsed.name, { template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"deploy\": {\n // Build and deploy the entire workspace as one unit. Each app is served\n // at /<app>/* under the same origin.\n import(\"../deploy/workspace-deploy.js\")\n .then((m) => m.runWorkspaceDeploy({ args }))\n .catch((err) => {\n console.error(\"Deploy failed:\", err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"setup-agents\": {\n import(\"./setup-agents.js\")\n .then((m) => m.runSetupAgents())\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"info\": {\n // Print read-only info about an installable package (e.g. @agent-native/scheduling).\n // Lists subpath exports, source paths in node_modules, and docs pointers.\n import(\"./info.js\")\n .then((m) => m.runInfo(args[0]))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"add\": {\n // Blueprint installer (à la Flue's `flue add`): instead of scaffolding\n // files, emit a curated Markdown integration blueprint to stdout so it can\n // be piped into a coding agent — `agent-native add provider stripe | claude`.\n // A URL instead of a name yields a generic research-and-integrate blueprint.\n import(\"./add.js\")\n .then((m) => {\n const code = m.runAdd(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"package\": {\n import(\"./package-lifecycle.js\")\n .then(async (m) => {\n const code = await m.runPackageLifecycle(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eject\": {\n import(\"./eject.js\")\n .then(async (m) => {\n const code = await m.runEject(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"audit-agent-web\": {\n import(\"./audit-agent-web.js\")\n .then((m) => m.runAuditAgentWeb(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eval\": {\n // Discover and run the app's evals (**/*.eval.ts, evals/*.ts), score the\n // agent's output, and exit non-zero if any eval falls below its threshold.\n // Doubles as a CI deploy gate. `--json` emits a machine-readable report.\n import(\"./eval.js\")\n .then((m) => m.runEval(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"changelog\": {\n // Author and roll up the app's user-facing changelog (changeset-style\n // pending entry files → a dated CHANGELOG.md section).\n import(\"./changelog.js\")\n .then(async (m) => {\n const code = await m.runChangelog(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"--version\":\n case \"-v\": {\n console.log(_version);\n break;\n }\n\n case undefined:\n import(\"./code.js\")\n .then((m) => m.runCode([]))\n .catch(handleScaffoldImportError);\n break;\n\n case \"--help\":\n case \"-h\":\n console.log(`agent-native v${_version}\n\nUsage:\n agent-native Launch Agent-Native Code workspace\n agent-native \"fix tests\" Start an Agent-Native Code coding session\n agent-native dev Start development server\n (or the workspace gateway at a workspace root)\n agent-native build Build for production (client + server)\n agent-native start Start production server\n agent-native action <name> Run an action from actions/\n agent-native agent \"prompt\" Run the app-agent loop once against local actions\n agent-native agents list List connected/discoverable agents\n agent-native invoke <app> \"prompt\"\n Call another agent-native app over A2A\n agent-native script <name> Run an action (deprecated alias for 'action')\n agent-native typecheck Run TypeScript type checking\n agent-native create [name] Scaffold a new agent-native workspace with a\n multi-select template picker. Use --standalone\n for a single-app scaffold.\n agent-native code Launch Agent-Native Code workspace. Type a task or\n use goals like /migrate and /audit.\n agent-native code serve Run the Agent-Native Code remote connector.\n agent-native mcp <cmd> Connect external coding agents over MCP.\n cmds: serve | install | uninstall | status |\n token (--client claude-code|codex|cowork|\n cursor|opencode|github-copilot)\n agent-native connect <url> Authenticate your coding agent to a DEPLOYED app.\n OAuth-capable clients (Claude Code) get a /mcp\n authenticate prompt; Codex / Cowork use the\n browser device-code flow. --all connects every\n first-party app; --token is the no-browser\n fallback. Usually run for you by 'skills add'.\n agent-native reconnect [url] Re-authenticate an existing MCP entry without\n reinstalling app skills/connectors.\n agent-native app-skill <cmd> Install, launch, or package app-backed skills.\n cmds: ensure | launch | pack\n agent-native skills add assets|content|design-exploration|visual-edit|visual-plan|visual-recap|context-xray\n Install the skill instructions, register the MCP\n connector, AND authenticate it in one step.\n --no-connect skips auth (run 'connect' later);\n non-interactive shells print the connect command.\n --with-github-action also writes the PR Visual\n Recap workflow into .github/workflows/.\n agent-native content local-files <file-or-folder>\n Connect a local docs/content folder to normal\n database-backed Content. Use --no-open, --port N,\n or --profile docs/no-bookkeeping as needed.\n agent-native design connect Start a localhost Design bridge for a running\n dev server. Use --url, --port, --root, or\n --json to print the route/source manifest.\n agent-native recap <cmd> PR visual recap setup and GitHub Action helpers.\n Run 'agent-native recap help' for subcommands.\n agent-native plan <cmd> Plan helpers for block catalogs and local files.\n cmds: blocks | local init | local check |\n local serve | local verify | local preview\n agent-native migrate <source> Create an Agent-Native Code /migrate session, or use\n --emit for a portable own-agent dossier.\n agent-native upgrade Bring an existing app/workspace to current\n @agent-native/* packages, refresh scaffold\n skills, and typecheck. Prefer this over\n patching core/dispatch. 'upgrade check' is\n doctor-only.\n agent-native add-app [name] Add one or more apps to the current workspace\n agent-native workspace-dev Start the multi-app workspace gateway\n agent-native deploy Build & deploy every app in the workspace to\n a single origin (your-agents.com/<app>/*)\n agent-native setup-agents Create symlinks for all agent tools\n agent-native info <pkg> Print info about an installed package:\n exports, source paths, and docs links.\n agent-native add <kind> <name|url>\n Emit an integration blueprint to stdout for your\n coding agent to apply. Pipe it in:\n 'agent-native add provider stripe | claude'.\n kinds: provider | channel | sandbox | action.\n Pass a URL instead of a name for a generic\n research-and-integrate blueprint. --list to\n browse available blueprints.\n agent-native package <cmd> <package>\n Manifest package lifecycle: inspect | add | eject.\n add/eject are dry-run unless --apply; --json emits\n a machine-readable compatibility/change report.\n agent-native eject <unit> Copy a supported feature into app-owned source.\n --list discovers units; inspect/diff are read-only;\n eject/restore are dry-run unless --apply.\n agent-native changelog <cmd> Author the app's user-facing changelog.\n cmds: add \"<summary>\" [--type added|fixed|...] |\n release | list. Pending entries live in\n changelog/; 'release' rolls them into CHANGELOG.md.\n agent-native audit-agent-web Audit a public URL for agent-readable surfaces\n agent-native eval [pattern] Run the app's evals (**/*.eval.ts, evals/*.ts)\n and exit non-zero if any scores below its\n threshold. A CI deploy gate. --json for CI,\n --threshold N to override all thresholds.\n\nOptions:\n -h, --help Show this help message\n -v, --version Show version number\n --template <names> Comma-separated templates to pre-select\n (mail,calendar,analytics,...) — or\n github:user/repo for community templates\n --headless Create the primitive-first action-only scaffold\n --standalone Scaffold a single standalone app (no workspace)\n --emit [dir] With migrate, emit an own-agent dossier\n --describe <text> With migrate, describe URL/prose-only sources\n --preset <name> Workspace deploy preset:\n cloudflare_pages (default), netlify, or vercel\n --build-only Build workspace deploy artifacts without publishing\n --eager With workspace dev, start every app immediately\n --url <url> URL to audit with audit-agent-web\n\nFeedback: ${FEEDBACK_URL}\nBugs: ${BUGS_URL}`);\n break;\n\n default:\n if (command && !command.startsWith(\"-\")) {\n // A bare, single command-like token with no further args is almost\n // always a mistyped subcommand (e.g. `agent-native destory`). Silently\n // forwarding it to the coding agent would run an LLM with file-write\n // powers on a typo — a real footgun on a code-modifying tool. Refuse it\n // and point at the explicit forms. Intentional natural-language tasks\n // are still dispatched: a quoted phrase (`agent-native \"fix tests\"`,\n // which arrives as one argv token containing a space) or multi-word\n // input (`agent-native fix the tests`, which has trailing args).\n const looksLikeMistypedSubcommand =\n args.length === 0 && /^[a-z][a-z0-9-]*$/i.test(command);\n if (!looksLikeMistypedSubcommand) {\n import(\"./code.js\")\n .then((m) => m.runCode([command, ...args]))\n .catch(handleScaffoldImportError);\n break;\n }\n console.error(`Unknown command: ${command}`);\n console.error(\n `If you meant to start a coding session with this as the task, run:\\n` +\n ` agent-native code ${JSON.stringify(command)}\\n` +\n `or quote a natural-language task:\\n` +\n ` agent-native \"fix the failing tests\"`,\n );\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n }\n console.error(`Unknown command: ${command}`);\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n}\n"]}
@@ -145,8 +145,8 @@ export function transitionStoredMultiFrontierRun(collaborationId, updatedAt, tra
145
145
  }
146
146
  const isFullStoredRun = hasStoredRunTimestamps(candidate);
147
147
  if (!isFullStoredRun &&
148
- (Object.hasOwn(candidate, "createdAt") ||
149
- Object.hasOwn(candidate, "updatedAt"))) {
148
+ (Object.prototype.hasOwnProperty.call(candidate, "createdAt") ||
149
+ Object.prototype.hasOwnProperty.call(candidate, "updatedAt"))) {
150
150
  throw new Error("Invalid multi-frontier coordinator transition state.");
151
151
  }
152
152
  if (candidate.schemaVersion !== current.schemaVersion ||
@@ -584,7 +584,7 @@ function isCompleteMultiFrontierRunState(value) {
584
584
  function normalizeStoredRunDefaults(value) {
585
585
  if (!value || typeof value !== "object" || Array.isArray(value))
586
586
  return value;
587
- if (!Object.hasOwn(value, "autoContinueAfterAgreement")) {
587
+ if (!Object.prototype.hasOwnProperty.call(value, "autoContinueAfterAgreement")) {
588
588
  return { ...value, autoContinueAfterAgreement: false };
589
589
  }
590
590
  return value;