eve 0.50.0 → 0.51.1

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 (734) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/src/acp/adapter.js +1 -1
  3. package/dist/src/channel/session.d.ts +2 -1
  4. package/dist/src/channel/session.js +1 -1
  5. package/dist/src/channel/types.d.ts +16 -20
  6. package/dist/src/chunks/{use-eve-agent-B5I-k6Ek.js → use-eve-agent-3DZuvuWE.js} +21 -10
  7. package/dist/src/chunks/{use-eve-agent-DUMU6dap.js → use-eve-agent-D7apPojZ.js} +21 -10
  8. package/dist/src/cli/acp/command.d.ts +1 -1
  9. package/dist/src/cli/acp/command.js +2 -2
  10. package/dist/src/cli/agent-command.d.ts +5 -0
  11. package/dist/src/cli/agent-command.js +1 -0
  12. package/dist/src/cli/application-command.d.ts +2 -0
  13. package/dist/src/cli/commands/agent-instructions.d.ts +3 -1
  14. package/dist/src/cli/commands/agent-instructions.js +1 -1
  15. package/dist/src/cli/commands/build.d.ts +1 -1
  16. package/dist/src/cli/commands/build.js +1 -1
  17. package/dist/src/cli/commands/deploy.d.ts +2 -0
  18. package/dist/src/cli/commands/deploy.js +1 -1
  19. package/dist/src/cli/commands/init-agent-workspace.d.ts +14 -0
  20. package/dist/src/cli/commands/init-agent-workspace.js +1 -0
  21. package/dist/src/cli/commands/init.d.ts +2 -13
  22. package/dist/src/cli/commands/init.js +1 -1
  23. package/dist/src/cli/commands/link.d.ts +2 -0
  24. package/dist/src/cli/commands/link.js +1 -1
  25. package/dist/src/cli/commands/preconditions.d.ts +15 -0
  26. package/dist/src/cli/commands/preconditions.js +1 -1
  27. package/dist/src/cli/commands/register-integration-commands.d.ts +1 -1
  28. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  29. package/dist/src/cli/commands/register-project-commands.d.ts +1 -1
  30. package/dist/src/cli/commands/register-project-commands.js +1 -1
  31. package/dist/src/cli/commands/register-registry-commands.js +2 -2
  32. package/dist/src/cli/dev/environment.d.ts +1 -1
  33. package/dist/src/cli/dev/environment.js +1 -1
  34. package/dist/src/cli/dev/local-server-process.js +1 -1
  35. package/dist/src/cli/dev/run-interactive-ui.js +1 -1
  36. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  37. package/dist/src/cli/dev/tui/runner.js +1 -1
  38. package/dist/src/cli/dev/tui/setup-commands.d.ts +3 -1
  39. package/dist/src/cli/dev/tui/setup-commands.js +1 -1
  40. package/dist/src/cli/invoke/command.d.ts +1 -1
  41. package/dist/src/cli/invoke/command.js +1 -1
  42. package/dist/src/cli/option-parsers.d.ts +1 -0
  43. package/dist/src/cli/option-parsers.js +1 -1
  44. package/dist/src/cli/run.js +3 -3
  45. package/dist/src/client/agent-info-schema.d.ts +0 -1
  46. package/dist/src/client/agent-info-schema.js +1 -1
  47. package/dist/src/client/message-action-parts.js +1 -1
  48. package/dist/src/client/open-stream.js +1 -1
  49. package/dist/src/client/session-controls.d.ts +3 -0
  50. package/dist/src/client/session-controls.js +1 -1
  51. package/dist/src/client/session.d.ts +4 -1
  52. package/dist/src/compiled/.vendor-stamp.json +11 -11
  53. package/dist/src/compiled/@clack/core/LICENSE +9 -0
  54. package/dist/src/compiled/@clack/core/index.d.ts +363 -0
  55. package/dist/src/compiled/@clack/core/index.js +20 -0
  56. package/dist/src/compiled/@eve/catalog/index.js +1 -1
  57. package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +34 -92
  58. package/dist/src/compiled/@vercel/sandbox/api-client/base-client.d.ts +1 -1
  59. package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +1 -1
  60. package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +13 -29
  61. package/dist/src/compiled/@vercel/sandbox/constants.d.ts +11 -1
  62. package/dist/src/compiled/@vercel/sandbox/index.d.ts +3 -3
  63. package/dist/src/compiled/@vercel/sandbox/index.js +9 -9
  64. package/dist/src/compiled/@vercel/sandbox/sandbox-user.d.ts +5 -6
  65. package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +79 -67
  66. package/dist/src/compiled/@vercel/sandbox/session.d.ts +5 -3
  67. package/dist/src/compiled/@vercel/sandbox/snapshot.d.ts +9 -0
  68. package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/api-client.d.ts +86 -1
  69. package/dist/src/compiled/@vercel/sandbox-drives/api-client/index.d.ts +2 -0
  70. package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/validators.d.ts +26 -1
  71. package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/constants.d.ts +2 -2
  72. package/dist/src/compiled/@vercel/{sandbox → sandbox-drives}/drive.d.ts +10 -0
  73. package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/index.d.ts +3 -2
  74. package/dist/src/compiled/@vercel/sandbox-drives/index.js +9 -0
  75. package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/sandbox.d.ts +35 -6
  76. package/dist/src/compiled/@workflow/core/index.js +1 -1
  77. package/dist/src/compiled/@workflow/core/private.d.ts +2 -4
  78. package/dist/src/compiled/@workflow/core/private.js +1 -1
  79. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +9 -7
  80. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +13 -0
  81. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +54 -1
  82. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  83. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +7 -0
  84. package/dist/src/compiled/@workflow/core/serialization.d.ts +24 -2
  85. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  86. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  87. package/dist/src/compiled/@workflow/errors/error-codes.d.ts +2 -0
  88. package/dist/src/compiled/@workflow/errors/index.d.ts +19 -0
  89. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  90. package/dist/src/compiled/@workflow/world/analytics.d.ts +46 -2
  91. package/dist/src/compiled/@workflow/world/events.d.ts +26 -1
  92. package/dist/src/compiled/@workflow/world/index.d.ts +1 -1
  93. package/dist/src/compiled/@workflow/world/runs.d.ts +2 -2
  94. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  95. package/dist/src/compiled/@workflow/world-vercel/index.js +12 -12
  96. package/dist/src/compiled/_chunks/node/{auth-BSKyPAEP.js → auth-Bx1Aoyfo.js} +1 -1
  97. package/dist/src/compiled/_chunks/node/{auth-YpKlwhP1.js → auth-CA8ZMfB8.js} +1 -1
  98. package/dist/src/compiled/_chunks/node/esm-CE0tAvRh.js +7 -0
  99. package/dist/src/compiled/_chunks/node/version-BC6t2Txc.js +1 -0
  100. package/dist/src/compiled/_chunks/node/version-DSQqVZ5T.js +1 -0
  101. package/dist/src/compiled/_chunks/workflow/{attribute-changes-BwAadFfB.js → attribute-changes-03lzo29R.js} +1 -1
  102. package/dist/src/compiled/_chunks/workflow/dist-BIdMK5N8.js +40 -0
  103. package/dist/src/compiled/_chunks/workflow/dist-DMQ3CtWt.js +3 -0
  104. package/dist/src/compiled/_chunks/workflow/frames-Boesh7kU.js +3 -0
  105. package/dist/src/compiled/_chunks/workflow/{private-CZFMABEf.js → private-CKx3PkSS.js} +1 -1
  106. package/dist/src/compiled/_chunks/workflow/{resume-hook-BToMtPbH.js → resume-hook-C6eL-S_T.js} +1 -1
  107. package/dist/src/compiled/_chunks/workflow/run-BV0S6Zc2.js +1 -0
  108. package/dist/src/compiled/_chunks/workflow/sleep-Bh3jP9ii.js +1 -0
  109. package/dist/src/compiled/_chunks/workflow/wait-until-l-cwfJvm.js +15 -0
  110. package/dist/src/compiled/_chunks/workflow/{ws-transport-PnVVxT0R.js → ws-transport-BagXNxCE.js} +1 -1
  111. package/dist/src/compiler/compile-from-memory.d.ts +1 -0
  112. package/dist/src/compiler/extension-compatibility.d.ts +20 -20
  113. package/dist/src/compiler/extension-compatibility.js +1 -1
  114. package/dist/src/compiler/manifest.d.ts +2 -2
  115. package/dist/src/compiler/manifest.js +1 -1
  116. package/dist/src/compiler/normalize-agent-config.js +1 -1
  117. package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
  118. package/dist/src/compiler/normalize-manifest.js +1 -1
  119. package/dist/src/compiler/normalize-tool.js +1 -1
  120. package/dist/src/context/build-dynamic-tools.js +1 -1
  121. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  122. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  123. package/dist/src/context/dynamic-tool-metadata.d.ts +1 -0
  124. package/dist/src/context/keys.d.ts +0 -3
  125. package/dist/src/context/keys.js +1 -1
  126. package/dist/src/discover/extensions.d.ts +2 -0
  127. package/dist/src/discover/extensions.js +1 -1
  128. package/dist/src/discover/filesystem.d.ts +1 -0
  129. package/dist/src/discover/filesystem.js +1 -1
  130. package/dist/src/discover/project.js +1 -1
  131. package/dist/src/evals/cli/eval.js +1 -1
  132. package/dist/src/evals/mock-model.js +1 -1
  133. package/dist/src/evals/runner/execute-task.js +1 -1
  134. package/dist/src/evals/session-cleanup.d.ts +7 -0
  135. package/dist/src/evals/session-cleanup.js +1 -0
  136. package/dist/src/evals/session.d.ts +4 -0
  137. package/dist/src/evals/session.js +1 -1
  138. package/dist/src/eve-channel/index.js +1 -1
  139. package/dist/src/eve-channel/request.d.ts +1 -0
  140. package/dist/src/eve-channel/request.js +1 -1
  141. package/dist/src/execution/activity-collector.js +1 -1
  142. package/dist/src/execution/activity-work-id.js +1 -1
  143. package/dist/src/execution/activity-work.d.ts +8 -0
  144. package/dist/src/execution/activity-work.js +1 -1
  145. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  146. package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +6 -0
  147. package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -0
  148. package/dist/src/execution/channel-context.js +1 -1
  149. package/dist/src/execution/coordination-dispatch-shared.d.ts +103 -0
  150. package/dist/src/execution/coordination-dispatch-shared.js +1 -0
  151. package/dist/src/execution/coordination-dispatch-step.d.ts +7 -0
  152. package/dist/src/execution/coordination-dispatch-step.js +1 -0
  153. package/dist/src/execution/create-session-step.d.ts +1 -2
  154. package/dist/src/execution/create-session-step.js +1 -1
  155. package/dist/src/execution/deliver-payloads.js +1 -1
  156. package/dist/src/execution/dispatch-action-failures.d.ts +5 -5
  157. package/dist/src/execution/dispatch-action-failures.js +1 -1
  158. package/dist/src/execution/dispatch-start-operation.d.ts +1 -1
  159. package/dist/src/execution/dispatch-start-operation.js +1 -1
  160. package/dist/src/execution/durable-session-store.d.ts +1 -1
  161. package/dist/src/execution/eve-workflow-attributes.d.ts +1 -1
  162. package/dist/src/execution/inline-turn.d.ts +2 -0
  163. package/dist/src/execution/inline-turn.js +1 -1
  164. package/dist/src/execution/next-driver-action.d.ts +7 -13
  165. package/dist/src/execution/node-step.d.ts +1 -2
  166. package/dist/src/execution/node-step.js +1 -1
  167. package/dist/src/execution/parked-delivery-wait.js +1 -1
  168. package/dist/src/execution/pending-turn-state.d.ts +1 -2
  169. package/dist/src/execution/pending-turn-state.js +1 -1
  170. package/dist/src/execution/proxied-deliver-step.js +1 -1
  171. package/dist/src/execution/route-child-delivery.js +1 -1
  172. package/dist/src/execution/run-session-limits.d.ts +5 -5
  173. package/dist/src/execution/runtime-context.js +1 -1
  174. package/dist/src/execution/sandbox/bindings/vercel-create-sdk.js +1 -1
  175. package/dist/src/execution/sandbox/bindings/vercel-sdk-types.d.ts +4 -4
  176. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  177. package/dist/src/execution/session-activity-projection.js +1 -1
  178. package/dist/src/execution/session-activity.js +1 -1
  179. package/dist/src/execution/session-command-inbox.d.ts +2 -3
  180. package/dist/src/execution/session-timeout-workflow.js +1 -1
  181. package/dist/src/execution/session.d.ts +2 -1
  182. package/dist/src/execution/session.js +2 -2
  183. package/dist/src/execution/settle-cancelled-turn-step.d.ts +1 -1
  184. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  185. package/dist/src/execution/stable-workflow-names.d.ts +1 -1
  186. package/dist/src/execution/stable-workflow-names.js +1 -1
  187. package/dist/src/execution/task-event-callback.js +1 -1
  188. package/dist/src/execution/tasks/child/steps.d.ts +19 -11
  189. package/dist/src/execution/tasks/child/steps.js +1 -1
  190. package/dist/src/execution/tasks/child/update-step.d.ts +6 -0
  191. package/dist/src/execution/tasks/child/update-step.js +1 -0
  192. package/dist/src/execution/tasks/child/update.d.ts +7 -10
  193. package/dist/src/execution/tasks/child/update.js +1 -1
  194. package/dist/src/execution/tasks/child/workflow.d.ts +21 -27
  195. package/dist/src/execution/tasks/child/workflow.js +1 -1
  196. package/dist/src/execution/tasks/parent/control-shared.d.ts +6 -17
  197. package/dist/src/execution/tasks/parent/control-shared.js +1 -1
  198. package/dist/src/execution/tasks/parent/delegate.d.ts +15 -48
  199. package/dist/src/execution/tasks/parent/delegate.js +1 -1
  200. package/dist/src/execution/tasks/parent/dispatch.d.ts +19 -34
  201. package/dist/src/execution/tasks/parent/dispatch.js +1 -1
  202. package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +5 -15
  203. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  204. package/dist/src/execution/tasks/parent/run-parent.d.ts +2 -2
  205. package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +26 -0
  206. package/dist/src/execution/tasks/parent/subagent-task-projection.js +1 -0
  207. package/dist/src/execution/tasks/parent/task-cancel.d.ts +11 -0
  208. package/dist/src/execution/tasks/parent/task-cancel.js +1 -0
  209. package/dist/src/execution/tasks/parent/tool-execution.d.ts +2 -3
  210. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  211. package/dist/src/execution/terminate-child-sessions-step.js +1 -1
  212. package/dist/src/execution/tools/sleep-workflow.d.ts +3 -0
  213. package/dist/src/execution/tools/sleep-workflow.js +1 -0
  214. package/dist/src/execution/tools/sleep.d.ts +1 -5
  215. package/dist/src/execution/tools/sleep.js +1 -1
  216. package/dist/src/execution/tools/subagent/accept-event-step.d.ts +7 -0
  217. package/dist/src/execution/tools/subagent/accept-event-step.js +1 -0
  218. package/dist/src/execution/tools/subagent/emit-called-step.d.ts +9 -0
  219. package/dist/src/execution/tools/subagent/emit-called-step.js +1 -0
  220. package/dist/src/execution/tools/subagent/invoke-agent.d.ts +51 -0
  221. package/dist/src/execution/tools/subagent/invoke-agent.js +1 -0
  222. package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +37 -0
  223. package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -0
  224. package/dist/src/execution/tools/subagent/invoke-step.d.ts +55 -0
  225. package/dist/src/execution/tools/subagent/invoke-step.js +1 -0
  226. package/dist/src/execution/tools/subagent/receipt-identity.d.ts +11 -0
  227. package/dist/src/execution/tools/subagent/receipt-identity.js +1 -0
  228. package/dist/src/execution/{dispatch-runtime-actions-start.d.ts → tools/subagent/start.d.ts} +17 -5
  229. package/dist/src/execution/tools/subagent/start.js +1 -0
  230. package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +24 -0
  231. package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -0
  232. package/dist/src/execution/tools/subagent/task-cancel.d.ts +10 -0
  233. package/dist/src/execution/tools/subagent/task-cancel.js +1 -0
  234. package/dist/src/execution/tools/tasks.d.ts +10 -0
  235. package/dist/src/execution/tools/tasks.js +1 -0
  236. package/dist/src/execution/{tool-run → tools/workflow}/answer.d.ts +1 -1
  237. package/dist/src/execution/tools/workflow/answer.js +1 -0
  238. package/dist/src/execution/tools/workflow/ask.d.ts +22 -0
  239. package/dist/src/execution/tools/workflow/ask.js +1 -0
  240. package/dist/src/execution/tools/workflow/background.d.ts +18 -0
  241. package/dist/src/execution/tools/workflow/background.js +1 -0
  242. package/dist/src/execution/tools/workflow/body.d.ts +25 -0
  243. package/dist/src/execution/tools/workflow/body.js +1 -0
  244. package/dist/src/execution/tools/workflow/cancel.d.ts +11 -0
  245. package/dist/src/execution/tools/workflow/cancel.js +1 -0
  246. package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +7 -0
  247. package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -0
  248. package/dist/src/execution/tools/workflow/messages.d.ts +88 -0
  249. package/dist/src/execution/tools/workflow/messages.js +1 -0
  250. package/dist/src/execution/tools/workflow/owner-inbox.d.ts +13 -0
  251. package/dist/src/execution/tools/workflow/owner-inbox.js +1 -0
  252. package/dist/src/execution/tools/workflow/owner.d.ts +13 -0
  253. package/dist/src/execution/tools/workflow/owner.js +1 -0
  254. package/dist/src/execution/tools/workflow/run-control.d.ts +18 -0
  255. package/dist/src/execution/tools/workflow/run-control.js +1 -0
  256. package/dist/src/execution/tools/workflow/start.d.ts +33 -0
  257. package/dist/src/execution/tools/workflow/start.js +1 -0
  258. package/dist/src/execution/tools/workflow/types.d.ts +26 -0
  259. package/dist/src/execution/tools/workflow/types.js +1 -0
  260. package/dist/src/execution/tools/workflow/workflow.d.ts +3 -0
  261. package/dist/src/execution/tools/workflow/workflow.js +1 -0
  262. package/dist/src/execution/turn-cancellation-control.d.ts +1 -0
  263. package/dist/src/execution/turn-cancellation-control.js +1 -1
  264. package/dist/src/execution/turn-cancellation-token.d.ts +1 -0
  265. package/dist/src/execution/turn-control-receiver.d.ts +3 -0
  266. package/dist/src/execution/turn-control-receiver.js +1 -1
  267. package/dist/src/execution/turn-dispatch.d.ts +2 -0
  268. package/dist/src/execution/turn-dispatch.js +1 -1
  269. package/dist/src/execution/turn-workflow-tool-run.d.ts +16 -0
  270. package/dist/src/execution/turn-workflow-tool-run.js +1 -0
  271. package/dist/src/execution/turn-workflow.js +1 -1
  272. package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
  273. package/dist/src/execution/wire/session-inbox-contract.js +1 -1
  274. package/dist/src/execution/wire/session-inbox-encoder.d.ts +14 -2
  275. package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
  276. package/dist/src/execution/wire/session-inbox-resume.js +1 -1
  277. package/dist/src/execution/wire/session-inbox-wire.d.ts +3 -3
  278. package/dist/src/execution/wire/session-inbox-wire.js +1 -1
  279. package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
  280. package/dist/src/execution/wire/session-inbox-wire.v4.d.ts +267 -0
  281. package/dist/src/execution/wire/session-inbox-wire.v4.js +1 -0
  282. package/dist/src/execution/wire/session-inbox-wire.v4.migration.d.ts +3 -0
  283. package/dist/src/execution/wire/session-inbox-wire.v4.migration.js +1 -0
  284. package/dist/src/execution/wire/session-inbox-wire.v5.d.ts +341 -0
  285. package/dist/src/execution/wire/session-inbox-wire.v5.js +1 -0
  286. package/dist/src/execution/wire/session-inbox-wire.v5.migration.d.ts +3 -0
  287. package/dist/src/execution/wire/session-inbox-wire.v5.migration.js +1 -0
  288. package/dist/src/execution/wire/session-inbox-wire.v6.d.ts +341 -0
  289. package/dist/src/execution/wire/session-inbox-wire.v6.js +1 -0
  290. package/dist/src/execution/workflow-entry-finalization.d.ts +6 -0
  291. package/dist/src/execution/workflow-entry-finalization.js +1 -1
  292. package/dist/src/execution/workflow-entry.d.ts +2 -1
  293. package/dist/src/execution/workflow-entry.js +1 -1
  294. package/dist/src/execution/workflow-runtime.d.ts +1 -1
  295. package/dist/src/execution/workflow-runtime.js +1 -1
  296. package/dist/src/execution/workflow-steps.js +1 -1
  297. package/dist/src/framework/sources/registry.js +1 -1
  298. package/dist/src/harness/advertised-tools.d.ts +1 -7
  299. package/dist/src/harness/advertised-tools.js +1 -1
  300. package/dist/src/harness/background-tools.d.ts +8 -2
  301. package/dist/src/harness/{runtime-actions.d.ts → coordination.d.ts} +40 -27
  302. package/dist/src/harness/coordination.js +1 -0
  303. package/dist/src/harness/emission.d.ts +9 -2
  304. package/dist/src/harness/emission.js +1 -1
  305. package/dist/src/harness/execute-tool.d.ts +52 -0
  306. package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
  307. package/dist/src/harness/input-requests.js +1 -1
  308. package/dist/src/harness/proxy-input-requests.d.ts +6 -2
  309. package/dist/src/harness/session-limit-continuation.d.ts +5 -5
  310. package/dist/src/harness/session-limit-continuation.js +1 -1
  311. package/dist/src/harness/session-limit-enforcement.d.ts +4 -4
  312. package/dist/src/harness/session-limit-enforcement.js +1 -1
  313. package/dist/src/harness/session-usage-limits.d.ts +48 -0
  314. package/dist/src/harness/session-usage-limits.js +1 -0
  315. package/dist/src/harness/stale-input-responses.js +1 -1
  316. package/dist/src/harness/step-hooks.d.ts +1 -2
  317. package/dist/src/harness/step-hooks.js +1 -1
  318. package/dist/src/harness/tool-call-action.js +1 -1
  319. package/dist/src/harness/tool-call-input-errors.js +1 -1
  320. package/dist/src/harness/tool-loop.js +2 -2
  321. package/dist/src/harness/tools.js +1 -1
  322. package/dist/src/harness/turn-tag-state.d.ts +20 -21
  323. package/dist/src/harness/turn-tag-state.js +1 -1
  324. package/dist/src/harness/types.d.ts +9 -7
  325. package/dist/src/harness/workflow-interrupt-state.js +1 -1
  326. package/dist/src/harness/workflow-lifecycle.d.ts +10 -0
  327. package/dist/src/harness/workflow-lifecycle.js +1 -1
  328. package/dist/src/harness/workflow-sandbox.d.ts +1 -1
  329. package/dist/src/harness/workflow-sandbox.js +2 -2
  330. package/dist/src/harness/workflow-subagent-limit.d.ts +7 -7
  331. package/dist/src/harness/workflow-subagent-limit.js +1 -1
  332. package/dist/src/harness/workflow-task-state.d.ts +9 -0
  333. package/dist/src/harness/workflow-task-state.js +1 -0
  334. package/dist/src/harness/workflow-tool-runs.d.ts +27 -0
  335. package/dist/src/harness/workflow-tool-runs.js +1 -0
  336. package/dist/src/instrumentation/native-events.js +1 -1
  337. package/dist/src/instrumentation/parent-lineage.js +1 -1
  338. package/dist/src/internal/agent-name.d.ts +4 -0
  339. package/dist/src/internal/agent-name.js +1 -0
  340. package/dist/src/internal/application/build-output-environment.d.ts +1 -0
  341. package/dist/src/internal/application/build-output-environment.js +1 -1
  342. package/dist/src/internal/application/package.js +1 -1
  343. package/dist/src/internal/application/paths.js +1 -1
  344. package/dist/src/internal/authored-definition/core.js +1 -1
  345. package/dist/src/internal/eve-project-root.d.ts +8 -0
  346. package/dist/src/internal/eve-project-root.js +1 -0
  347. package/dist/src/internal/invocation/workflow-execution.js +1 -1
  348. package/dist/src/internal/nitro/host/build-application.js +1 -1
  349. package/dist/src/internal/nitro/host/create-application-nitro.d.ts +1 -0
  350. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  351. package/dist/src/internal/nitro/host/start-development-server.js +1 -1
  352. package/dist/src/internal/nitro/host/start-production-server.js +3 -3
  353. package/dist/src/internal/nitro/host/types.d.ts +2 -0
  354. package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +1 -0
  355. package/dist/src/internal/nitro/host/vercel-build-output-config.js +1 -1
  356. package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
  357. package/dist/src/internal/project-context.d.ts +31 -0
  358. package/dist/src/internal/project-context.js +1 -0
  359. package/dist/src/internal/vercel/assemble-eve-services.d.ts +17 -0
  360. package/dist/src/internal/vercel/assemble-eve-services.js +1 -0
  361. package/dist/src/internal/vercel/build-agent-workspace.d.ts +3 -0
  362. package/dist/src/internal/vercel/build-agent-workspace.js +1 -0
  363. package/dist/src/internal/vercel/build-command.d.ts +4 -0
  364. package/dist/src/internal/vercel/build-command.js +1 -0
  365. package/dist/src/internal/vercel/eve-service-contribution.d.ts +28 -0
  366. package/dist/src/internal/vercel/eve-service-contribution.js +1 -0
  367. package/dist/src/internal/vercel/vercel-service-config-operations.d.ts +18 -0
  368. package/dist/src/internal/vercel/vercel-service-config-operations.js +1 -0
  369. package/dist/src/internal/vercel/vercel-service-name.d.ts +6 -0
  370. package/dist/src/internal/vercel/vercel-service-name.js +1 -0
  371. package/dist/src/internal/vercel/vercel-services-config.d.ts +53 -0
  372. package/dist/src/internal/vercel/vercel-services-config.js +1 -0
  373. package/dist/src/internal/workflow/reference.d.ts +2 -0
  374. package/dist/src/internal/workflow/reference.js +1 -0
  375. package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +0 -9
  376. package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +1 -1
  377. package/dist/src/internal/workflow-bundle/builder.js +1 -1
  378. package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +1 -1
  379. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  380. package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +1 -1
  381. package/dist/src/internal/workflow-bundle/workflow-transformer.js +1 -1
  382. package/dist/src/protocol/message.d.ts +2 -0
  383. package/dist/src/protocol/message.js +1 -1
  384. package/dist/src/public/channels/slack/action-status.js +1 -1
  385. package/dist/src/public/channels/slack/activity-plan.d.ts +4 -0
  386. package/dist/src/public/channels/slack/activity-plan.js +1 -0
  387. package/dist/src/public/channels/slack/activity.d.ts +45 -2
  388. package/dist/src/public/channels/slack/activity.js +2 -1
  389. package/dist/src/public/channels/slack/index.d.ts +1 -1
  390. package/dist/src/public/channels/slack/index.js +1 -1
  391. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  392. package/dist/src/public/memory/file/backends/vercel-blob.js +1 -1
  393. package/dist/src/public/memory/index.js +1 -1
  394. package/dist/src/public/next/index.js +1 -1
  395. package/dist/src/public/next/vercel-output-config.js +1 -1
  396. package/dist/src/public/nuxt/index.js +1 -1
  397. package/dist/src/public/nuxt/module.d.ts +3 -2
  398. package/dist/src/public/nuxt/module.js +1 -1
  399. package/dist/src/public/sandbox/vercel-sandbox.d.ts +9 -5
  400. package/dist/src/public/sandbox/vercel.d.ts +1 -1
  401. package/dist/src/public/sandbox/vercel.js +1 -1
  402. package/dist/src/public/workflow/index.d.ts +3 -1
  403. package/dist/src/public/workflow/index.js +1 -1
  404. package/dist/src/runtime/actions/results.d.ts +3 -3
  405. package/dist/src/runtime/actions/results.js +1 -1
  406. package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
  407. package/dist/src/runtime/agent/bootstrap.d.ts +1 -0
  408. package/dist/src/runtime/agent/bootstrap.js +1 -1
  409. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  410. package/dist/src/runtime/channels/registry.js +1 -1
  411. package/dist/src/runtime/prompt/compose.d.ts +0 -1
  412. package/dist/src/runtime/prompt/compose.js +1 -1
  413. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  414. package/dist/src/runtime/resolve-agent.js +1 -1
  415. package/dist/src/runtime/sessions/turn.d.ts +16 -1
  416. package/dist/src/runtime/subagents/registry.js +1 -1
  417. package/dist/src/runtime/subagents/workflow-reference.d.ts +5 -0
  418. package/dist/src/runtime/subagents/workflow-reference.js +1 -0
  419. package/dist/src/runtime/subagents/workflow.d.ts +8 -0
  420. package/dist/src/runtime/subagents/workflow.js +1 -0
  421. package/dist/src/runtime/tools/registry.js +1 -1
  422. package/dist/src/self-modification/agent.d.ts +22 -0
  423. package/dist/src/self-modification/agent.js +1 -0
  424. package/dist/src/self-modification/extension/classify-registry-item.d.ts +19 -0
  425. package/dist/src/self-modification/extension/classify-registry-item.js +1 -0
  426. package/dist/src/self-modification/extension/eve-add.d.ts +56 -0
  427. package/dist/src/self-modification/extension/eve-add.js +2 -0
  428. package/dist/src/self-modification/extension/extension.d.ts +2 -0
  429. package/dist/src/self-modification/extension/extension.js +1 -0
  430. package/dist/src/self-modification/extension/instructions.d.ts +4 -0
  431. package/dist/src/self-modification/extension/instructions.js +23 -0
  432. package/dist/src/self-modification/extension/source-lock.d.ts +2 -0
  433. package/dist/src/self-modification/extension/source-lock.js +1 -0
  434. package/dist/src/self-modification/extension/tools/edit_file.d.ts +16 -0
  435. package/dist/src/self-modification/extension/tools/edit_file.js +1 -0
  436. package/dist/src/self-modification/extension/tools/registry_add.d.ts +52 -0
  437. package/dist/src/self-modification/extension/tools/registry_add.js +1 -0
  438. package/dist/src/self-modification/extension/tools/search_models.d.ts +22 -0
  439. package/dist/src/self-modification/extension/tools/search_models.js +1 -0
  440. package/dist/src/self-modification/extension/tools/search_registry.d.ts +103 -0
  441. package/dist/src/self-modification/extension/tools/search_registry.js +1 -0
  442. package/dist/src/self-modification/filesystem.d.ts +6 -0
  443. package/dist/src/self-modification/filesystem.js +1 -0
  444. package/dist/src/self-modification/sandbox.d.ts +2 -0
  445. package/dist/src/self-modification/sandbox.js +1 -0
  446. package/dist/src/services/dev-client/target.d.ts +3 -1
  447. package/dist/src/setup/boxes/select-model.d.ts +3 -21
  448. package/dist/src/setup/boxes/select-model.js +1 -1
  449. package/dist/src/setup/cli/prompt-ui.js +4 -4
  450. package/dist/src/setup/cli/select-component.d.ts +1 -1
  451. package/dist/src/setup/cli/select-component.js +1 -1
  452. package/dist/src/setup/flows/model.d.ts +3 -0
  453. package/dist/src/setup/flows/model.js +1 -1
  454. package/dist/src/setup/integrations/discord/setup.js +1 -1
  455. package/dist/src/setup/integrations/file-memory/vercel.js +1 -1
  456. package/dist/src/setup/integrations/linear/setup.js +1 -1
  457. package/dist/src/setup/integrations/linq/setup.js +3 -3
  458. package/dist/src/setup/integrations/shopify/setup.js +1 -1
  459. package/dist/src/setup/prompter.js +1 -1
  460. package/dist/src/setup/scaffold/create/project.js +1 -1
  461. package/dist/src/setup/scaffold/update/channels.d.ts +4 -12
  462. package/dist/src/setup/scaffold/update/channels.js +1 -1
  463. package/dist/src/setup/scaffold/update/web-options.js +1 -1
  464. package/dist/src/shared/action-types.d.ts +103 -30
  465. package/dist/src/shared/action-types.js +1 -1
  466. package/dist/src/shared/agent-definition.d.ts +13 -0
  467. package/dist/src/shared/agent-turn-outcome.d.ts +2 -0
  468. package/dist/src/shared/agent-turn-outcome.js +1 -1
  469. package/dist/src/shared/extension-package-contract.d.ts +2 -0
  470. package/dist/src/shared/extension-package-contract.js +1 -1
  471. package/dist/src/shared/gateway-model-catalog.d.ts +21 -0
  472. package/dist/src/shared/gateway-model-catalog.js +1 -0
  473. package/dist/src/shared/json.js +1 -1
  474. package/dist/src/shared/sandbox-network-policy.d.ts +1 -1
  475. package/dist/src/shared/token-usage.d.ts +11 -15
  476. package/dist/src/shared/token-usage.js +1 -1
  477. package/dist/src/shared/workflow-sandbox.d.ts +1 -1
  478. package/dist/src/{execution/subagent-adapter-state.d.ts → subagents/adapter-state.d.ts} +2 -0
  479. package/dist/src/{execution/subagent-adapter-state.js → subagents/adapter-state.js} +1 -1
  480. package/dist/src/subagents/adapter.js +1 -0
  481. package/dist/src/{harness → subagents}/agent-handle-errors.d.ts +6 -0
  482. package/dist/src/subagents/agent-handle-errors.js +1 -0
  483. package/dist/src/subagents/callback-route.js +1 -0
  484. package/dist/src/subagents/callback-step.js +1 -0
  485. package/dist/src/{execution/agent-continuation-bundle.d.ts → subagents/continuation-bundle.d.ts} +1 -1
  486. package/dist/src/subagents/continuation-bundle.js +1 -0
  487. package/dist/src/{execution/subagent-event-proxy-step.d.ts → subagents/event-proxy-step.d.ts} +2 -8
  488. package/dist/src/subagents/event-proxy-step.js +1 -0
  489. package/dist/src/subagents/handle-dispatch.d.ts +54 -0
  490. package/dist/src/subagents/handle-dispatch.js +1 -0
  491. package/dist/src/{harness → subagents}/handles/prompt.d.ts +4 -4
  492. package/dist/src/{harness → subagents}/handles/prompt.js +1 -1
  493. package/dist/src/{harness → subagents}/handles/query.d.ts +8 -2
  494. package/dist/src/subagents/handles/query.js +1 -0
  495. package/dist/src/subagents/handles/rebase.d.ts +4 -0
  496. package/dist/src/subagents/handles/rebase.js +1 -0
  497. package/dist/src/{harness → subagents}/handles/store.d.ts +90 -15
  498. package/dist/src/subagents/handles/store.js +1 -0
  499. package/dist/src/subagents/handles/transitions.d.ts +103 -0
  500. package/dist/src/subagents/handles/transitions.js +1 -0
  501. package/dist/src/{execution/delegated-parent-notification.d.ts → subagents/parent-notification.d.ts} +1 -7
  502. package/dist/src/subagents/parent-notification.js +1 -0
  503. package/dist/src/subagents/parent-result.js +1 -0
  504. package/dist/src/{execution/remote-agent-dispatch.d.ts → subagents/remote-dispatch.d.ts} +3 -2
  505. package/dist/src/subagents/remote-dispatch.js +1 -0
  506. package/dist/src/{execution/subagent-start-local.d.ts → subagents/start-local.d.ts} +5 -6
  507. package/dist/src/subagents/start-local.js +1 -0
  508. package/dist/src/{execution/subagent-start-remote.d.ts → subagents/start-remote.d.ts} +5 -5
  509. package/dist/src/subagents/start-remote.js +1 -0
  510. package/dist/src/subagents/token-budget.js +1 -0
  511. package/dist/src/{execution/subagent-tool.d.ts → subagents/tool.d.ts} +5 -3
  512. package/dist/src/subagents/tool.js +1 -0
  513. package/dist/src/svelte/index.js +1 -1
  514. package/dist/src/svelte/use-eve-agent.js +1 -1
  515. package/dist/src/tasks/json.js +1 -1
  516. package/dist/src/tasks/session-index.d.ts +2 -3
  517. package/dist/src/tasks/session-index.js +1 -1
  518. package/dist/src/tasks/task-id.d.ts +3 -4
  519. package/dist/src/tasks/task-id.js +1 -1
  520. package/dist/src/tasks/transitions.d.ts +3 -47
  521. package/dist/src/tasks/transitions.js +1 -1
  522. package/dist/src/tasks/types.d.ts +70 -247
  523. package/dist/src/tasks/types.js +1 -1
  524. package/dist/src/tools/dynamic.d.ts +3 -1
  525. package/dist/src/tools/framework/agent.d.ts +18 -2
  526. package/dist/src/tools/framework/agent.js +1 -1
  527. package/dist/src/tools/framework/task-cancel.d.ts +2 -6
  528. package/dist/src/tools/framework/task-contract.d.ts +44 -65
  529. package/dist/src/tools/framework/task-contract.js +1 -1
  530. package/dist/src/tools/framework/task-update.d.ts +1 -0
  531. package/dist/src/tools/framework/task-update.js +1 -1
  532. package/dist/src/tools/provided/sleep.d.ts +2 -2
  533. package/dist/src/vue/index.js +1 -1
  534. package/dist/src/vue/use-eve-agent.js +1 -1
  535. package/docs/agent-config.md +24 -19
  536. package/docs/channels/eve.mdx +1 -1
  537. package/docs/concepts/built-in-tools.md +10 -91
  538. package/docs/concepts/context-control.md +2 -2
  539. package/docs/concepts/execution-model-and-durability.mdx +1 -1
  540. package/docs/concepts/sessions-runs-and-streaming.md +11 -3
  541. package/docs/guides/client/streaming.mdx +1 -1
  542. package/docs/guides/deployment/vercel.mdx +20 -2
  543. package/docs/guides/dynamic-capabilities.md +2 -2
  544. package/docs/guides/frontend/overview.mdx +1 -1
  545. package/docs/guides/instrumentation-providers.md +242 -0
  546. package/docs/guides/instrumentation.md +2 -0
  547. package/docs/guides/meta.json +1 -0
  548. package/docs/guides/remote-agents.md +8 -9
  549. package/docs/memory/overview.mdx +1 -1
  550. package/docs/reference/cli.md +5 -2
  551. package/docs/sandbox.mdx +3 -1
  552. package/docs/subagents/index.mdx +9 -8
  553. package/docs/tools/overview.mdx +11 -10
  554. package/docs/tools/workflows.mdx +52 -18
  555. package/package.json +38 -13
  556. package/dist/src/compiled/@vercel/sandbox-delete/api-client/index.d.ts +0 -2
  557. package/dist/src/compiled/@vercel/sandbox-delete/index.js +0 -9
  558. package/dist/src/compiled/@vercel/sandbox-stable/LICENSE +0 -201
  559. package/dist/src/compiled/@vercel/sandbox-stable/_async-retry.d.ts +0 -8
  560. package/dist/src/compiled/@vercel/sandbox-stable/_workflow-serde.d.ts +0 -5
  561. package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-client.d.ts +0 -1456
  562. package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-error.d.ts +0 -29
  563. package/dist/src/compiled/@vercel/sandbox-stable/api-client/base-client.d.ts +0 -39
  564. package/dist/src/compiled/@vercel/sandbox-stable/api-client/file-writer.d.ts +0 -66
  565. package/dist/src/compiled/@vercel/sandbox-stable/api-client/index.d.ts +0 -2
  566. package/dist/src/compiled/@vercel/sandbox-stable/api-client/validators.d.ts +0 -899
  567. package/dist/src/compiled/@vercel/sandbox-stable/api-client/with-retry.d.ts +0 -10
  568. package/dist/src/compiled/@vercel/sandbox-stable/auth/error.d.ts +0 -15
  569. package/dist/src/compiled/@vercel/sandbox-stable/auth/file.d.ts +0 -18
  570. package/dist/src/compiled/@vercel/sandbox-stable/auth/index.d.ts +0 -6
  571. package/dist/src/compiled/@vercel/sandbox-stable/auth/oauth.d.ts +0 -111
  572. package/dist/src/compiled/@vercel/sandbox-stable/auth/poll-for-token.d.ts +0 -28
  573. package/dist/src/compiled/@vercel/sandbox-stable/auth/project.d.ts +0 -40
  574. package/dist/src/compiled/@vercel/sandbox-stable/command.d.ts +0 -292
  575. package/dist/src/compiled/@vercel/sandbox-stable/constants.d.ts +0 -5
  576. package/dist/src/compiled/@vercel/sandbox-stable/execution-context.d.ts +0 -116
  577. package/dist/src/compiled/@vercel/sandbox-stable/filesystem.d.ts +0 -258
  578. package/dist/src/compiled/@vercel/sandbox-stable/index.d.ts +0 -12
  579. package/dist/src/compiled/@vercel/sandbox-stable/index.js +0 -1
  580. package/dist/src/compiled/@vercel/sandbox-stable/network-policy.d.ts +0 -169
  581. package/dist/src/compiled/@vercel/sandbox-stable/proxy.d.ts +0 -55
  582. package/dist/src/compiled/@vercel/sandbox-stable/sandbox-user.d.ts +0 -212
  583. package/dist/src/compiled/@vercel/sandbox-stable/sandbox.d.ts +0 -1216
  584. package/dist/src/compiled/@vercel/sandbox-stable/session.d.ts +0 -433
  585. package/dist/src/compiled/@vercel/sandbox-stable/snapshot.d.ts +0 -229
  586. package/dist/src/compiled/@vercel/sandbox-stable/utils/get-credentials.d.ts +0 -21
  587. package/dist/src/compiled/@vercel/sandbox-stable/utils/paginator.d.ts +0 -16
  588. package/dist/src/compiled/@vercel/sandbox-stable/utils/resolveSignal.d.ts +0 -15
  589. package/dist/src/compiled/@vercel/sandbox-stable/utils/sandbox-snapshot.d.ts +0 -11
  590. package/dist/src/compiled/@vercel/sandbox-stable/utils/types.d.ts +0 -11
  591. package/dist/src/compiled/_chunks/node/decode_jwt-Col8JOnf.js +0 -7
  592. package/dist/src/compiled/_chunks/node/version-BYHw-SDY.js +0 -1
  593. package/dist/src/compiled/_chunks/node/version-DH6yRy-M.js +0 -1
  594. package/dist/src/compiled/_chunks/workflow/dist-CgbVZs5l.js +0 -40
  595. package/dist/src/compiled/_chunks/workflow/dist-DjojkP5e.js +0 -3
  596. package/dist/src/compiled/_chunks/workflow/frames-CZ9eHShe.js +0 -3
  597. package/dist/src/compiled/_chunks/workflow/run-DzyAoGh4.js +0 -1
  598. package/dist/src/compiled/_chunks/workflow/sleep-3_A5uOp-.js +0 -1
  599. package/dist/src/compiled/_chunks/workflow/wait-until-BtySPYD0.js +0 -15
  600. package/dist/src/execution/agent-continuation-bundle.js +0 -1
  601. package/dist/src/execution/agent-handle-dispatch.d.ts +0 -79
  602. package/dist/src/execution/agent-handle-dispatch.js +0 -1
  603. package/dist/src/execution/delegated-parent-notification.js +0 -1
  604. package/dist/src/execution/delegated-parent-result.js +0 -1
  605. package/dist/src/execution/delegation-tool.d.ts +0 -10
  606. package/dist/src/execution/delegation-tool.js +0 -1
  607. package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +0 -165
  608. package/dist/src/execution/dispatch-runtime-actions-shared.js +0 -1
  609. package/dist/src/execution/dispatch-runtime-actions-start.js +0 -1
  610. package/dist/src/execution/dispatch-runtime-actions-step.d.ts +0 -18
  611. package/dist/src/execution/dispatch-runtime-actions-step.js +0 -1
  612. package/dist/src/execution/dispatch-workflow-runtime-actions-step.d.ts +0 -18
  613. package/dist/src/execution/dispatch-workflow-runtime-actions-step.js +0 -1
  614. package/dist/src/execution/finalize-terminal-session.d.ts +0 -17
  615. package/dist/src/execution/finalize-terminal-session.js +0 -1
  616. package/dist/src/execution/prepared-agent-action.d.ts +0 -7
  617. package/dist/src/execution/prepared-agent-action.js +0 -1
  618. package/dist/src/execution/remote-agent-dispatch.js +0 -1
  619. package/dist/src/execution/session-callback-route.js +0 -1
  620. package/dist/src/execution/session-callback-step.js +0 -1
  621. package/dist/src/execution/subagent-adapter.js +0 -1
  622. package/dist/src/execution/subagent-event-proxy-step.js +0 -1
  623. package/dist/src/execution/subagent-start-local.js +0 -1
  624. package/dist/src/execution/subagent-start-remote.js +0 -1
  625. package/dist/src/execution/subagent-tool.js +0 -1
  626. package/dist/src/execution/tasks/child/instructions.d.ts +0 -3
  627. package/dist/src/execution/tasks/child/instructions.js +0 -1
  628. package/dist/src/execution/tasks/parent/agent-identity.d.ts +0 -13
  629. package/dist/src/execution/tasks/parent/agent-identity.js +0 -1
  630. package/dist/src/execution/tasks/parent/agent-views.d.ts +0 -7
  631. package/dist/src/execution/tasks/parent/agent-views.js +0 -1
  632. package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +0 -43
  633. package/dist/src/execution/tasks/parent/continuation-dispatch.js +0 -1
  634. package/dist/src/execution/tasks/parent/dispatch-task-step.d.ts +0 -19
  635. package/dist/src/execution/tasks/parent/dispatch-task-step.js +0 -1
  636. package/dist/src/execution/tool-run/answer.js +0 -1
  637. package/dist/src/execution/tool-run/background.d.ts +0 -14
  638. package/dist/src/execution/tool-run/background.js +0 -1
  639. package/dist/src/execution/tool-run/cancel.d.ts +0 -7
  640. package/dist/src/execution/tool-run/cancel.js +0 -1
  641. package/dist/src/execution/tool-run/dispatch.d.ts +0 -24
  642. package/dist/src/execution/tool-run/dispatch.js +0 -1
  643. package/dist/src/execution/tool-run/emit-run-report-step.d.ts +0 -7
  644. package/dist/src/execution/tool-run/emit-run-report-step.js +0 -1
  645. package/dist/src/execution/tool-run/messages.d.ts +0 -70
  646. package/dist/src/execution/tool-run/messages.js +0 -1
  647. package/dist/src/execution/tool-run/owner-inbox.d.ts +0 -11
  648. package/dist/src/execution/tool-run/owner-inbox.js +0 -1
  649. package/dist/src/execution/tool-run/owner.d.ts +0 -13
  650. package/dist/src/execution/tool-run/owner.js +0 -1
  651. package/dist/src/execution/tool-run/run-control.d.ts +0 -18
  652. package/dist/src/execution/tool-run/run-control.js +0 -1
  653. package/dist/src/execution/tool-run/start.d.ts +0 -11
  654. package/dist/src/execution/tool-run/start.js +0 -1
  655. package/dist/src/execution/tool-run/types.d.ts +0 -21
  656. package/dist/src/execution/tool-run/types.js +0 -1
  657. package/dist/src/execution/tool-run/workflow.d.ts +0 -9
  658. package/dist/src/execution/tool-run/workflow.js +0 -1
  659. package/dist/src/execution/tools/subagent/local.d.ts +0 -40
  660. package/dist/src/execution/tools/subagent/local.js +0 -1
  661. package/dist/src/execution/tools/subagent/remote.d.ts +0 -26
  662. package/dist/src/execution/tools/subagent/remote.js +0 -1
  663. package/dist/src/harness/agent-handle-errors.js +0 -1
  664. package/dist/src/harness/handles/query.js +0 -1
  665. package/dist/src/harness/handles/store.js +0 -1
  666. package/dist/src/harness/handles/transitions.d.ts +0 -167
  667. package/dist/src/harness/handles/transitions.js +0 -1
  668. package/dist/src/harness/runtime-actions.js +0 -1
  669. package/dist/src/harness/session-token-limits.d.ts +0 -41
  670. package/dist/src/harness/session-token-limits.js +0 -1
  671. package/dist/src/harness/subagent-depth.d.ts +0 -10
  672. package/dist/src/harness/subagent-depth.js +0 -1
  673. package/dist/src/harness/subagent-token-budget.js +0 -1
  674. package/dist/src/harness/tool-runs.d.ts +0 -21
  675. package/dist/src/harness/tool-runs.js +0 -1
  676. package/dist/src/harness/turn-sleep.d.ts +0 -12
  677. package/dist/src/harness/turn-sleep.js +0 -1
  678. package/dist/src/harness/workflow-runtime-action-state.d.ts +0 -9
  679. package/dist/src/harness/workflow-runtime-action-state.js +0 -1
  680. package/dist/src/node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js +0 -16
  681. package/dist/src/node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js +0 -1
  682. package/dist/src/node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js +0 -1
  683. package/dist/src/node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js +0 -1
  684. package/dist/src/node_modules/.pnpm/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js +0 -5
  685. package/dist/src/node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js +0 -1
  686. package/dist/src/runtime/actions/keys.d.ts +0 -14
  687. package/dist/src/runtime/actions/keys.js +0 -1
  688. package/dist/src/tasks/wire.d.ts +0 -25
  689. package/dist/src/tasks/wire.js +0 -1
  690. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/LICENSE +0 -0
  691. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/_async-retry.d.ts +0 -0
  692. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/_workflow-serde.d.ts +0 -0
  693. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/api-error.d.ts +0 -0
  694. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/base-client.d.ts +0 -0
  695. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/file-writer.d.ts +0 -0
  696. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/with-retry.d.ts +0 -0
  697. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/error.d.ts +0 -0
  698. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/file.d.ts +0 -0
  699. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/index.d.ts +0 -0
  700. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/oauth.d.ts +0 -0
  701. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/poll-for-token.d.ts +0 -0
  702. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/project.d.ts +0 -0
  703. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/command.d.ts +0 -0
  704. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/execution-context.d.ts +0 -0
  705. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/filesystem.d.ts +0 -0
  706. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/network-policy.d.ts +0 -0
  707. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/proxy.d.ts +0 -0
  708. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/sandbox-user.d.ts +0 -0
  709. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/session.d.ts +0 -0
  710. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/snapshot.d.ts +0 -0
  711. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/get-credentials.d.ts +0 -0
  712. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/paginator.d.ts +0 -0
  713. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/resolveSignal.d.ts +0 -0
  714. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/sandbox-snapshot.d.ts +0 -0
  715. /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/types.d.ts +0 -0
  716. /package/dist/src/execution/{tool-run → tools/workflow}/owner-channels.d.ts +0 -0
  717. /package/dist/src/execution/{tool-run → tools/workflow}/owner-channels.js +0 -0
  718. /package/dist/src/execution/{tool-run → tools/workflow}/resume-hook-step.d.ts +0 -0
  719. /package/dist/src/execution/{tool-run → tools/workflow}/resume-hook-step.js +0 -0
  720. /package/dist/src/{execution/subagent-adapter.d.ts → subagents/adapter.d.ts} +0 -0
  721. /package/dist/src/{execution/session-callback-route.d.ts → subagents/callback-route.d.ts} +0 -0
  722. /package/dist/src/{execution/session-callback-step.d.ts → subagents/callback-step.d.ts} +0 -0
  723. /package/dist/src/{harness → subagents}/handles/operation-id.d.ts +0 -0
  724. /package/dist/src/{harness → subagents}/handles/operation-id.js +0 -0
  725. /package/dist/src/{harness → subagents}/handles/state-key.d.ts +0 -0
  726. /package/dist/src/{harness → subagents}/handles/state-key.js +0 -0
  727. /package/dist/src/{execution/subagent-hitl-proxy.d.ts → subagents/hitl-proxy.d.ts} +0 -0
  728. /package/dist/src/{execution/subagent-hitl-proxy.js → subagents/hitl-proxy.js} +0 -0
  729. /package/dist/src/{execution/subagent-invocation.d.ts → subagents/invocation.d.ts} +0 -0
  730. /package/dist/src/{execution/subagent-invocation.js → subagents/invocation.js} +0 -0
  731. /package/dist/src/{execution/delegated-parent-result.d.ts → subagents/parent-result.d.ts} +0 -0
  732. /package/dist/src/{execution/remote-agent-route-url.d.ts → subagents/remote-route-url.d.ts} +0 -0
  733. /package/dist/src/{execution/remote-agent-route-url.js → subagents/remote-route-url.js} +0 -0
  734. /package/dist/src/{harness/subagent-token-budget.d.ts → subagents/token-budget.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # eve
2
2
 
3
+ ## 0.51.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 38fd8d9: Honor the `image` option passed to `vercel()` when creating fresh Vercel Sandbox instances.
8
+ - 9d0df26: Extension packages can expose built-in extension distributions from package export subpaths.
9
+ - 98f45ea: Avoid loading interactive prompt dependencies when running non-interactive CLI commands such as `eve build` in an agent workspace.
10
+ - 3b73073: Run each opt-in `sleep` tool call as its own durable workflow. Parallel calls still resume the turn after the longest wait, while sleep now follows the same execution and cancellation lifecycle as other workflow-backed tools.
11
+ - 4ee6715: Release local Workflow stream listeners when client stream followers reconnect or stop.
12
+ - 9091777: Allow clients to cancel every background task owned by a session with `session.cancel({ tasks: true })`. Timed-out eval cases now reset their owned sessions before the next case starts so background work cannot leak across cases.
13
+ - 73aec25: Add an optional per-session model token-cost limit in US dollars. Sessions pause for approval before another model call after reported cost reaches the limit, following the existing token-limit continuation flow.
14
+ - 98f45ea: Only classify agent-shaped, package-less `agents/` children as eve workspace members. Independently packaged agents remain standalone, while unrelated `agents/` directories no longer override flat standalone projects.
15
+ - 30a6325: Allow Slack channels to register experimental custom activity renderers that consume activity snapshots and retain renderer-owned state between updates.
16
+ - 1909295: Fix multi-agent setup flows so `eve init --agents` asks which agent to run, while shared AI Gateway, integration, and deployment setup uses the project root.
17
+ - 0ca3ef7: Expose workflow run and Vercel deployment references for failed MCP invocations instead of opaque workflow error payloads.
18
+ - d594b94: Separate default memory namespaces for agents mounted under different route prefixes in the same Vercel project.
19
+ - a6e72c4: `eve/self-modification` now uses the same AI Gateway model catalog validation as `/model`.
20
+ - 0e2e10d: Resolve eve project ownership from the nearest `package.json` that declares `dependencies.eve`, then classify its `agent/` or `agents/` shape. This avoids incorrect environment and CLI behavior in repositories that only use eve as development tooling.
21
+ - 30a6325: Add experimental Unicode tree and native streaming plan Slack activity renderers. The plan keeps stable top-level tasks, appends descendant lifecycle updates, and compacts completed streams to top-level work.
22
+ - 9de667a: Refresh workspace tooling and vendored dependencies, including stable Next.js releases and the latest Drives-capable Vercel Sandbox v3 beta.
23
+ - e83e50e: Update eve's bundled Workflow SDK packages to the latest 5.0.0 beta releases (`@workflow/core` 5.0.0-beta.48). Sessions now claim their inbox hook in-process instead of taking an extra queue hop at start, so a new session reaches its first turn one delivery sooner.
24
+ - 00cc672: The experimental self-modification extension is bundled with eve, so registry installs no longer add a separate package.
25
+
26
+ ## 0.51.0
27
+
28
+ ### Minor Changes
29
+
30
+ - aae2631: Background workflow tools now execute as their task's durable workflow run, subagents can be invoked directly from waiting workflow tools and workflow sandboxes, and workflow `agent()` calls require a replay-stable `key`.
31
+
32
+ ### Patch Changes
33
+
34
+ - fc123f4: Discover multi-agent projects from their `agents/` directory, add consistent `--agent` selection to agent-scoped CLI commands, and let `eve init --agents <name,...>` create or extend an agent workspace.
35
+ - b03290a: Preserve background execution for durable dynamic tools so replayed callbacks receive their task runtime.
36
+ - 6e630b4: Deploy conventional `agents/<name>/agent/` workspaces as inferred peer Vercel services at `/<name>/eve/v1/*`, with no generated `vercel.json` step.
37
+ - ecf0b6a: Prevent Vercel Blob file memory from receiving compressed responses with weak ETags that cannot be used for conditional writes. Blob reads now request identity encoding so memory documents continue saving as they grow.
38
+ - 4c45d2f: Fix file-memory setup failing after it creates a Vercel Blob store when the project uses Vercel CLI 57. Setup now connects the store without passing that release an unsupported output flag, so retrying repairs the partial setup normally.
39
+ - bad0813: Fix the sandbox base image so a non-interactive `bash -lc` login shell exits cleanly as `vercel-sandbox`. Ubuntu's default `.bash_logout` ran `clear_console` on exit, which wrote `TERM environment variable not set.` to stderr and, under `set -e`, turned a successful `exit 0` into exit 1 on Vercel Sandbox. `sudo` no longer warns about unresolvable sandbox hostnames, `$HOME/.local/bin` exists on `PATH` for user-scoped installs, and Node is root-owned on every architecture.
40
+ - f9b760a: Ignore unrelated ancestor `agents/` directories when resolving standalone projects so local CLI commands do not misclassify neighboring repositories as agent workspaces.
41
+ - 3cccd71: Preserve inherited channel audience metadata when local subagents persist adapter state. Public parent traces now continue capturing local child inputs and outputs while destination-specific redaction remains independent.
42
+ - 29b9056: Run approved background tool calls even when the AI SDK skips its input callback during resume.
43
+
3
44
  ## 0.50.0
4
45
 
5
46
  ### Minor Changes
@@ -1 +1 @@
1
- import{randomUUID}from"node:crypto";import{realpath}from"node:fs/promises";import{PROTOCOL_VERSION,RequestError,methods}from"#compiled/@agentclientprotocol/sdk/index.js";import{Client,ClientError}from"#client/index.js";const ANSWER_FIELD=`answer`,ERROR_CODE_EVE=-32002;var EveAcpAdapter=class{#e;#t;#n;#r=!1;#i=new Map;constructor(e){this.#t=e.eveVersion,this.#n=e.workspaceRoot,this.#e=e.client??new Client({auth:e.auth,headers:e.headers,host:e.serverUrl,redirect:`manual`})}initialize(e){return this.#r=e.clientCapabilities?.elicitation?.form!==void 0,{protocolVersion:PROTOCOL_VERSION,agentCapabilities:{loadSession:!1,promptCapabilities:{},sessionCapabilities:{close:{}}},agentInfo:{name:`eve`,title:`eve`,version:this.#t},authMethods:[]}}async newSession(t){if(t.mcpServers.length>0)throw unsupported(`Client-provided MCP servers are not supported by eve ACP mode.`);if((t.additionalDirectories?.length??0)>0)throw unsupported(`Additional workspace directories are not supported by eve ACP mode.`);if(this.#n!==void 0){let e=await normalizedRealpath(t.cwd,`session/new.cwd`),n=await normalizedRealpath(this.#n,`the eve application root`);if(e!==n)throw RequestError.invalidParams({cwd:t.cwd,workspaceRoot:n},`ACP cwd must be the eve application root`)}let n=randomUUID();return this.#i.set(n,{tools:new Map}),{sessionId:n}}async prompt(e,t,n){let i=this.#s(e.sessionId);if(i.active!==void 0)throw new RequestError(-32001,`ACP session ${e.sessionId} already has an active prompt.`);let a=promptContent(e);i.tools.clear();let o=Promise.withResolvers(),s={cancelRequested:!1,protocolCancelled:!1,outboundController:new AbortController,settled:o.promise,resolveSettled:o.resolve};i.active=s;let onProtocolCancel=()=>{s.protocolCancelled=!0,this.#o(i).catch(()=>void 0)};n.aborted?onProtocolCancel():n.addEventListener(`abort`,onProtocolCancel,{once:!0});try{if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});let o={message:a};for(;;){let a;if(i.client===void 0){if(o.message===void 0)throw Error(`ACP session has not started.`);let e=await this.#e.sessions.create({...o,message:o.message});i.client=e.session,a=e.response}else a=o.inputResponses===void 0?await i.client.send(o.message):await i.client.respond(o.inputResponses);(s.cancelRequested||s.protocolCancelled)&&await this.#o(i);let c=[],l=!1,u,d;for await(let n of a){let r=`data`in n&&`turnId`in n.data?n.data.turnId:void 0;typeof r==`string`&&(s.turnId=r),n.type===`input.requested`&&c.push(...n.data.requests),n.type===`authorization.required`&&(d=unsupported(`Connection authorization cannot be completed through eve ACP mode.`)),n.type===`turn.cancelled`&&(l=!0),(n.type===`turn.failed`||n.type===`session.failed`)&&(u=n),await this.#c(e.sessionId,i,n,t)}if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(l||s.cancelRequested)return{stopReason:`cancelled`};if(u!==void 0)throw eveFailure(u);if(d!==void 0)throw d;if(c.length===0)return{stopReason:`end_turn`};let f;try{f=await Promise.all(c.map(r=>this.#l(e.sessionId,i,r,t,n)))}catch(t){if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(s.cancelRequested)return{stopReason:`cancelled`};throw t}if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(s.cancelRequested)return{stopReason:`cancelled`};o={inputResponses:f}}}catch(e){throw acpRequestError(e)}finally{n.removeEventListener(`abort`,onProtocolCancel),i.tools.clear(),s.resolveSettled(),i.active===s&&(i.active=void 0)}}async cancel(e){let t=this.#i.get(e);t===void 0||t.active===void 0||(t.active.cancelRequested=!0,await this.#o(t))}async closeSession(e){let t=this.#s(e);this.#i.delete(e),await this.#a(t)}async close(){let e=[...this.#i.values()];this.#i.clear(),await Promise.allSettled(e.map(e=>this.#a(e)))}async#a(e){let t;if(e.active!==void 0){let n=e.active;n.cancelRequested=!0;try{await this.#o(e)}catch(e){t=e}await n.settled}try{await e.client?.reset()}catch(e){throw t===void 0?e:AggregateError([t,e],`Could not cancel or reset the eve session`)}if(t!==void 0)throw t}async#o(e){e.active?.outboundController.abort(),e.client!==void 0&&await e.client.cancel(e.active?.turnId===void 0?void 0:{turnId:e.active.turnId})}#s(e){let t=this.#i.get(e);if(t===void 0)throw RequestError.invalidParams({sessionId:e},`Unknown or closed ACP session`);return t}async#c(e,t,n,r){switch(n.type){case`message.appended`:await notifyUpdate(r,e,{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:n.data.messageDelta},messageId:`${n.data.turnId}:message:${n.data.stepIndex}`});return;case`reasoning.appended`:await notifyUpdate(r,e,{sessionUpdate:`agent_thought_chunk`,content:{type:`text`,text:n.data.reasoningDelta},messageId:`${n.data.turnId}:thought:${n.data.stepIndex}`});return;case`actions.requested`:for(let i of n.data.actions){let n=toolCallForAction(i);t.tools.set(i.callId,n),await notifyUpdate(r,e,{sessionUpdate:`tool_call`,...n})}return;case`action.result`:{let t=n.data.result,i=n.data.status!==`completed`||t.isError?`failed`:`completed`;await notifyUpdate(r,e,{sessionUpdate:`tool_call_update`,toolCallId:t.callId,status:i,content:[{type:`content`,content:{type:`text`,text:stringifyOutput(t.output)}}],rawOutput:t.output});return}default:return}}async#l(e,t,n,a,o){let c=AbortSignal.any([o,t.active.outboundController.signal]);if(n.display===`confirmation`){let o=`${n.requestId}:approve`,s=`${n.requestId}:deny`,l=t.tools.get(n.action.callId)??toolCallForAction(n.action),u=await a.request(methods.client.session.requestPermission,{sessionId:e,toolCall:l,options:[{kind:`allow_once`,name:`Approve`,optionId:o},{kind:`reject_once`,name:`Deny`,optionId:s}]},{cancellationSignal:c});if(u.outcome.outcome===`cancelled`)return this.#u(t),{requestId:n.requestId};if(u.outcome.optionId===o)return{requestId:n.requestId,optionId:`approve`};if(u.outcome.optionId===s)return{requestId:n.requestId,optionId:`deny`};throw RequestError.invalidParams({optionId:u.outcome.optionId},`Unknown ACP permission option`)}if(!this.#r)throw unsupported(`The ACP client does not support form elicitation required by this eve question.`);let l=elicitationProperty(n),u=await a.request(methods.client.elicitation.create,{mode:`form`,sessionId:e,message:n.prompt,requestedSchema:{type:`object`,properties:{[ANSWER_FIELD]:l},required:[ANSWER_FIELD]}},{cancellationSignal:c});if(u.action!==`accept`)return this.#u(t),{requestId:n.requestId};let d=u.content?.[ANSWER_FIELD];if(typeof d!=`string`)throw RequestError.invalidParams(u.content,`ACP elicitation response must contain a string answer`);if(n.display===`select`){if(!n.options?.some(e=>e.id===d))throw RequestError.invalidParams({answer:d},`Unknown eve question option`);return{requestId:n.requestId,optionId:d}}return{requestId:n.requestId,text:d}}#u(e){let t=e.active;t.cancelRequested=!0,t.outboundController.abort()}};async function normalizedRealpath(e,n){try{return await realpath(e)}catch(t){throw RequestError.invalidParams({path:e},`Could not resolve ${n}: ${errorMessage(t)}`)}}function promptContent(e){let t=e.prompt.map(e=>{if(e.type!==`text`)throw unsupported(`ACP prompt content type ${JSON.stringify(e.type)} is not supported.`);return{type:`text`,text:e.text}});if(t.every(e=>e.text.length===0))throw RequestError.invalidParams(e.prompt,`ACP prompt must contain at least one non-empty text block`);return t}function toolCallForAction(e){let t=e.kind===`tool-call`?e.toolName:e.kind===`load-skill`?`Load skill`:e.name;return{toolCallId:e.callId,title:t,kind:`other`,status:`pending`,rawInput:e.input}}function elicitationProperty(e){if(e.display===`select`&&e.allowFreeform!==!0&&e.options?.length)return{type:`string`,title:e.prompt,oneOf:e.options.map(e=>({const:e.id,title:e.label,description:e.description}))};if(e.display===`text`&&e.allowFreeform!==!1)return{type:`string`,title:e.prompt,minLength:1};throw unsupported(`This eve question shape cannot be represented by ACP form elicitation.`)}async function notifyUpdate(e,t,n){await e.notify(methods.client.session.update,{sessionId:t,update:n})}function stringifyOutput(e){return typeof e==`string`?e:JSON.stringify(e,null,2)}function unsupported(e){return new RequestError(-32003,e)}function eveFailure(e){return new RequestError(ERROR_CODE_EVE,e.data.message,{code:e.data.code,details:e.data.details})}function acpRequestError(e){return e instanceof RequestError?e:e instanceof ClientError?new RequestError(ERROR_CODE_EVE,e.message,{httpStatus:e.status}):new RequestError(ERROR_CODE_EVE,errorMessage(e))}function errorMessage(e){return e instanceof Error?e.message:String(e)}export{EveAcpAdapter};
1
+ import{randomUUID}from"node:crypto";import{realpath}from"node:fs/promises";import{PROTOCOL_VERSION,RequestError,methods}from"#compiled/@agentclientprotocol/sdk/index.js";import{Client,ClientError}from"#client/index.js";const ANSWER_FIELD=`answer`,ERROR_CODE_EVE=-32002;var EveAcpAdapter=class{#e;#t;#n;#r=!1;#i=new Map;constructor(e){this.#t=e.eveVersion,this.#n=e.workspaceRoot,this.#e=e.client??new Client({auth:e.auth,headers:e.headers,host:e.serverUrl,redirect:`manual`})}initialize(e){return this.#r=e.clientCapabilities?.elicitation?.form!==void 0,{protocolVersion:PROTOCOL_VERSION,agentCapabilities:{loadSession:!1,promptCapabilities:{},sessionCapabilities:{close:{}}},agentInfo:{name:`eve`,title:`eve`,version:this.#t},authMethods:[]}}async newSession(t){if(t.mcpServers.length>0)throw unsupported(`Client-provided MCP servers are not supported by eve ACP mode.`);if((t.additionalDirectories?.length??0)>0)throw unsupported(`Additional workspace directories are not supported by eve ACP mode.`);if(this.#n!==void 0){let e=await normalizedRealpath(t.cwd,`session/new.cwd`),n=await normalizedRealpath(this.#n,`the eve application root`);if(e!==n)throw RequestError.invalidParams({cwd:t.cwd,workspaceRoot:n},`ACP cwd must be the eve application root`)}let n=randomUUID();return this.#i.set(n,{tools:new Map}),{sessionId:n}}async prompt(e,t,n){let i=this.#s(e.sessionId);if(i.active!==void 0)throw new RequestError(-32001,`ACP session ${e.sessionId} already has an active prompt.`);let a=promptContent(e);i.tools.clear();let o=Promise.withResolvers(),s={cancelRequested:!1,protocolCancelled:!1,outboundController:new AbortController,settled:o.promise,resolveSettled:o.resolve};i.active=s;let onProtocolCancel=()=>{s.protocolCancelled=!0,this.#o(i).catch(()=>void 0)};n.aborted?onProtocolCancel():n.addEventListener(`abort`,onProtocolCancel,{once:!0});try{if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});let o={message:a};for(;;){let a;if(i.client===void 0){if(o.message===void 0)throw Error(`ACP session has not started.`);let e=await this.#e.sessions.create({...o,message:o.message});i.client=e.session,a=e.response}else a=o.inputResponses===void 0?await i.client.send(o.message):await i.client.respond(o.inputResponses);(s.cancelRequested||s.protocolCancelled)&&await this.#o(i);let c=[],l=!1,u,d;for await(let n of a){let r=`data`in n&&`turnId`in n.data?n.data.turnId:void 0;typeof r==`string`&&(s.turnId=r),n.type===`input.requested`&&c.push(...n.data.requests),n.type===`authorization.required`&&(d=unsupported(`Connection authorization cannot be completed through eve ACP mode.`)),n.type===`turn.cancelled`&&(l=!0),(n.type===`turn.failed`||n.type===`session.failed`)&&(u=n),await this.#c(e.sessionId,i,n,t)}if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(l||s.cancelRequested)return{stopReason:`cancelled`};if(u!==void 0)throw eveFailure(u);if(d!==void 0)throw d;if(c.length===0)return{stopReason:`end_turn`};let f;try{f=await Promise.all(c.map(r=>this.#l(e.sessionId,i,r,t,n)))}catch(t){if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(s.cancelRequested)return{stopReason:`cancelled`};throw t}if(s.protocolCancelled)throw RequestError.requestCancelled({sessionId:e.sessionId});if(s.cancelRequested)return{stopReason:`cancelled`};o={inputResponses:f}}}catch(e){throw acpRequestError(e)}finally{n.removeEventListener(`abort`,onProtocolCancel),i.tools.clear(),s.resolveSettled(),i.active===s&&(i.active=void 0)}}async cancel(e){let t=this.#i.get(e);t===void 0||t.active===void 0||(t.active.cancelRequested=!0,await this.#o(t))}async closeSession(e){let t=this.#s(e);this.#i.delete(e),await this.#a(t)}async close(){let e=[...this.#i.values()];this.#i.clear(),await Promise.allSettled(e.map(e=>this.#a(e)))}async#a(e){let t;if(e.active!==void 0){let n=e.active;n.cancelRequested=!0;try{await this.#o(e)}catch(e){t=e}await n.settled}try{await e.client?.reset()}catch(e){throw t===void 0?e:AggregateError([t,e],`Could not cancel or reset the eve session`)}if(t!==void 0)throw t}async#o(e){e.active?.outboundController.abort(),e.client!==void 0&&await e.client.cancel(e.active?.turnId===void 0?void 0:{turnId:e.active.turnId})}#s(e){let t=this.#i.get(e);if(t===void 0)throw RequestError.invalidParams({sessionId:e},`Unknown or closed ACP session`);return t}async#c(e,t,n,r){switch(n.type){case`message.appended`:await notifyUpdate(r,e,{sessionUpdate:`agent_message_chunk`,content:{type:`text`,text:n.data.messageDelta},messageId:`${n.data.turnId}:message:${n.data.stepIndex}`});return;case`reasoning.appended`:await notifyUpdate(r,e,{sessionUpdate:`agent_thought_chunk`,content:{type:`text`,text:n.data.reasoningDelta},messageId:`${n.data.turnId}:thought:${n.data.stepIndex}`});return;case`actions.requested`:for(let i of n.data.actions){let n=toolCallForAction(i);t.tools.set(i.callId,n),await notifyUpdate(r,e,{sessionUpdate:`tool_call`,...n})}return;case`action.result`:{let t=n.data.result,i=n.data.status!==`completed`||t.isError?`failed`:`completed`;await notifyUpdate(r,e,{sessionUpdate:`tool_call_update`,toolCallId:t.callId,status:i,content:[{type:`content`,content:{type:`text`,text:stringifyOutput(t.output)}}],rawOutput:t.output});return}default:return}}async#l(e,t,n,a,o){let c=AbortSignal.any([o,t.active.outboundController.signal]);if(n.display===`confirmation`){let o=`${n.requestId}:approve`,s=`${n.requestId}:deny`,l=t.tools.get(n.action.callId)??toolCallForAction(n.action),u=await a.request(methods.client.session.requestPermission,{sessionId:e,toolCall:l,options:[{kind:`allow_once`,name:`Approve`,optionId:o},{kind:`reject_once`,name:`Deny`,optionId:s}]},{cancellationSignal:c});if(u.outcome.outcome===`cancelled`)return this.#u(t),{requestId:n.requestId};if(u.outcome.optionId===o)return{requestId:n.requestId,optionId:`approve`};if(u.outcome.optionId===s)return{requestId:n.requestId,optionId:`deny`};throw RequestError.invalidParams({optionId:u.outcome.optionId},`Unknown ACP permission option`)}if(!this.#r)throw unsupported(`The ACP client does not support form elicitation required by this eve question.`);let l=elicitationProperty(n),u=await a.request(methods.client.elicitation.create,{mode:`form`,sessionId:e,message:n.prompt,requestedSchema:{type:`object`,properties:{[ANSWER_FIELD]:l},required:[ANSWER_FIELD]}},{cancellationSignal:c});if(u.action!==`accept`)return this.#u(t),{requestId:n.requestId};let d=u.content?.[ANSWER_FIELD];if(typeof d!=`string`)throw RequestError.invalidParams(u.content,`ACP elicitation response must contain a string answer`);if(n.display===`select`){if(!n.options?.some(e=>e.id===d))throw RequestError.invalidParams({answer:d},`Unknown eve question option`);return{requestId:n.requestId,optionId:d}}return{requestId:n.requestId,text:d}}#u(e){let t=e.active;t.cancelRequested=!0,t.outboundController.abort()}};async function normalizedRealpath(e,n){try{return await realpath(e)}catch(t){throw RequestError.invalidParams({path:e},`Could not resolve ${n}: ${errorMessage(t)}`)}}function promptContent(e){let t=e.prompt.map(e=>{if(e.type!==`text`)throw unsupported(`ACP prompt content type ${JSON.stringify(e.type)} is not supported.`);return{type:`text`,text:e.text}});if(t.every(e=>e.text.length===0))throw RequestError.invalidParams(e.prompt,`ACP prompt must contain at least one non-empty text block`);return t}function toolCallForAction(e){let t=e.kind===`tool-call`||e.kind===`workflow-tool-call`?e.toolName:e.kind===`load-skill`?`Load skill`:e.name;return{toolCallId:e.callId,title:t,kind:`other`,status:`pending`,rawInput:e.input}}function elicitationProperty(e){if(e.display===`select`&&e.allowFreeform!==!0&&e.options?.length)return{type:`string`,title:e.prompt,oneOf:e.options.map(e=>({const:e.id,title:e.label,description:e.description}))};if(e.display===`text`&&e.allowFreeform!==!1)return{type:`string`,title:e.prompt,minLength:1};throw unsupported(`This eve question shape cannot be represented by ACP form elicitation.`)}async function notifyUpdate(e,t,n){await e.notify(methods.client.session.update,{sessionId:t,update:n})}function stringifyOutput(e){return typeof e==`string`?e:JSON.stringify(e,null,2)}function unsupported(e){return new RequestError(-32003,e)}function eveFailure(e){return new RequestError(ERROR_CODE_EVE,e.data.message,{code:e.data.code,details:e.data.details})}function acpRequestError(e){return e instanceof RequestError?e:e instanceof ClientError?new RequestError(ERROR_CODE_EVE,e.message,{httpStatus:e.status}):new RequestError(ERROR_CODE_EVE,errorMessage(e))}function errorMessage(e){return e instanceof Error?e.message:String(e)}export{EveAcpAdapter};
@@ -13,9 +13,10 @@ export interface Session {
13
13
  send(message: string | UserContent, options: SessionSendOptions): Promise<SessionSendCommandResult>;
14
14
  /** Answers pending input requests on this exact session ID. */
15
15
  respond<const TResponses extends readonly InputResponse[]>(inputResponses: StrictInputResponses<TResponses>, options: SessionRespondOptions): Promise<SessionSendCommandResult>;
16
- /** Requests cancellation of this exact session's active turn or one owned task. */
16
+ /** Requests cancellation of this exact session's active turn and optionally its owned tasks. */
17
17
  cancel(options?: {
18
18
  taskId?: string;
19
+ tasks?: boolean;
19
20
  turnId?: string;
20
21
  }): Promise<CancelTurnResult>;
21
22
  /** Queues compaction on this exact session ID. */
@@ -1 +1 @@
1
- import{attachClientContext,readClientContext}from"#internal/client-context.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{parseInputResponses}from"#shared/input.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(n,o,s={}){return{id:n,async send(a,c){let l=createDelivery(s),u=sessionCallbackToTurnCaller(c.callback,c.activityObserver),d=attachClientContext({message:serializeUrlFilePartsInMessage(a)},readClientContext(c));c.context!==void 0&&(d.context=c.context),c.outputSchema!==void 0&&(d.outputSchema=c.outputSchema);let f={auth:c.auth,delivery:l,kind:`send`,payload:d,requestId:s.requestId,turnPolicy:c.turnPolicy??s.turnPolicy??DEFAULT_TURN_POLICY};return await o.dispatchSession({command:u===void 0?f:{...f,caller:u},sessionId:n})},async respond(r,i){if(r.length===0)throw Error(`respond() requires at least one input response.`);let c=parseInputResponses(r),l=sessionCallbackToTurnCaller(i.callback,i.activityObserver),u=createDelivery(s),d=attachClientContext({inputResponses:c},readClientContext(i));i.context!==void 0&&(d.context=i.context),i.outputSchema!==void 0&&(d.outputSchema=i.outputSchema);let f={auth:i.auth,delivery:u,kind:`send`,payload:d,requestId:s.requestId};return await o.dispatchSession({command:l===void 0?f:{...f,caller:l},sessionId:n})},async cancel(e){return await o.dispatchSession({command:{kind:`cancel`,taskId:e?.taskId,turnId:e?.turnId},sessionId:n})},async compact(){return await o.dispatchSession({command:{kind:`compact`},sessionId:n})},async clear(){return await o.dispatchSession({command:{kind:`clear`},sessionId:n})},async reset(e){return await o.dispatchSession({command:{kind:`reset`,reason:e?.reason},sessionId:n})},async getEventStream(e){return o.getEventStream(n,e)},async getStreamTailIndex(){return o.getStreamTailIndex(n)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function createDelivery(e){return e.channelKind!==void 0&&e.channelName!==void 0?createChannelDeliveryMetadata(e):void 0}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(!(t===void 0||t.length===0))return{token:toChannelLocalContinuationToken(t),rekey(n){let r=namespaceContinuationToken(t,n);t!==r&&e.set(ContinuationTokenKey,r)}}}}}function namespaceContinuationToken(e,t){let n=e.indexOf(`:`);if(n<=0)throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`);return`${e.slice(0,n+1)}${t}`}function sessionCallbackToTurnCaller(e,t){return e===void 0?void 0:{activityObserver:t,callId:e.callId,replyTo:{kind:`callback`,token:e.token,url:e.url},subagentName:e.subagentName,taskId:e.taskId}}export{buildSessionHandle,createAttachSessionFn,createSession,sessionCallbackToTurnCaller};
1
+ import{attachClientContext,readClientContext}from"#internal/client-context.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{parseInputResponses}from"#shared/input.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(n,o,s={}){return{id:n,async send(a,c){let l=createDelivery(s),u=sessionCallbackToTurnCaller(c.callback,c.activityObserver),d=attachClientContext({message:serializeUrlFilePartsInMessage(a)},readClientContext(c));c.context!==void 0&&(d.context=c.context),c.outputSchema!==void 0&&(d.outputSchema=c.outputSchema);let f={auth:c.auth,delivery:l,kind:`send`,payload:d,requestId:s.requestId,turnPolicy:c.turnPolicy??s.turnPolicy??DEFAULT_TURN_POLICY};return await o.dispatchSession({command:u===void 0?f:{...f,caller:u},sessionId:n})},async respond(r,i){if(r.length===0)throw Error(`respond() requires at least one input response.`);let c=parseInputResponses(r),l=sessionCallbackToTurnCaller(i.callback,i.activityObserver),u=createDelivery(s),d=attachClientContext({inputResponses:c},readClientContext(i));i.context!==void 0&&(d.context=i.context),i.outputSchema!==void 0&&(d.outputSchema=i.outputSchema);let f={auth:i.auth,delivery:u,kind:`send`,payload:d,requestId:s.requestId};return await o.dispatchSession({command:l===void 0?f:{...f,caller:l},sessionId:n})},async cancel(e){let t={kind:`cancel`};return e?.taskId!==void 0&&(t.taskId=e.taskId),e?.tasks!==void 0&&(t.tasks=e.tasks),e?.turnId!==void 0&&(t.turnId=e.turnId),await o.dispatchSession({command:t,sessionId:n})},async compact(){return await o.dispatchSession({command:{kind:`compact`},sessionId:n})},async clear(){return await o.dispatchSession({command:{kind:`clear`},sessionId:n})},async reset(e){return await o.dispatchSession({command:{kind:`reset`,reason:e?.reason},sessionId:n})},async getEventStream(e){return o.getEventStream(n,e)},async getStreamTailIndex(){return o.getStreamTailIndex(n)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function createDelivery(e){return e.channelKind!==void 0&&e.channelName!==void 0?createChannelDeliveryMetadata(e):void 0}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(!(t===void 0||t.length===0))return{token:toChannelLocalContinuationToken(t),rekey(n){let r=namespaceContinuationToken(t,n);t!==r&&e.set(ContinuationTokenKey,r)}}}}}function namespaceContinuationToken(e,t){let n=e.indexOf(`:`);if(n<=0)throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`);return`${e.slice(0,n+1)}${t}`}function sessionCallbackToTurnCaller(e,t){return e===void 0?void 0:{activityObserver:t,callId:e.callId,replyTo:{kind:`callback`,token:e.token,url:e.url},subagentName:e.subagentName,taskId:e.taskId}}export{buildSessionHandle,createAttachSessionFn,createSession,sessionCallbackToTurnCaller};
@@ -2,23 +2,25 @@ import type { UserContent } from "ai";
2
2
  import type { MessageStreamEvent, UnstampedMessageStreamEvent } from "#protocol/message.js";
3
3
  import type { CancelTurnResult as ProtocolCancelTurnResult } from "#protocol/cancel-turn.js";
4
4
  import type { RunMode } from "#shared/run-mode.js";
5
- import type { RuntimeSubagentChildResult, RuntimeToolResultActionResult } from "#shared/action-types.js";
5
+ import type { RuntimeSubagentChildResult, RuntimeSubagentDispatchFailure, RuntimeToolResultActionResult } from "#shared/action-types.js";
6
6
  import type { InputRequest, InputResponse } from "#shared/input.js";
7
7
  import type { ChannelAdapter } from "#channel/adapter.js";
8
8
  import type { AgentLimitsDefinition } from "#shared/agent-definition.js";
9
9
  import type { JsonObject } from "#shared/json.js";
10
10
  import type { InstrumentationDecision } from "#shared/instrumentation-decision.js";
11
11
  import type { ForwardedTraceAssertion } from "#shared/forwarded-trace-policy.js";
12
- import type { TaskView } from "#tasks/types.js";
12
+ import type { TaskAgentRequestDelivery, TaskAuthorizationEventDelivery, TaskInputRequestDelivery, TaskView } from "#tasks/types.js";
13
13
  export type { ContextAccessor } from "#context/key.js";
14
14
  export type { ChannelInstrumentationProjection } from "#channel/instrumentation.js";
15
15
  import type { ChannelInstrumentationProjection } from "#channel/instrumentation.js";
16
- export type RunSessionLimits = Pick<AgentLimitsDefinition, "maxInputTokensPerSession" | "maxOutputTokensPerSession">;
16
+ export type RunSessionLimits = Pick<AgentLimitsDefinition, "maxInputTokensPerSession" | "maxOutputTokensPerSession" | "maxTokenCostUsdPerSession">;
17
17
  /** Identifies the session turn to cancel. */
18
18
  export interface CancelTurnInput {
19
19
  readonly sessionId: string;
20
20
  /** Framework task whose queued child deliveries should be discarded. */
21
21
  readonly taskId?: string;
22
+ /** Cancels every nonterminal task owned by the session. */
23
+ readonly tasks?: boolean;
22
24
  /** Limits the request to the turn the caller observed. */
23
25
  readonly turnId?: string;
24
26
  }
@@ -150,15 +152,11 @@ export interface DeliverPayload {
150
152
  /** Framework-only task envelopes consumed before adapter/model delivery. */
151
153
  readonly task?: {
152
154
  /** Task HITL input-request batches for the parent's pre-model router. */
153
- readonly inputRequests?: readonly {
154
- readonly hookPayload: SubagentInputRequestHookPayload;
155
- readonly taskId: string;
156
- }[];
157
- /** Task authorization events projected through the parent channel. */
158
- readonly authorizationEvents?: readonly {
159
- readonly hookPayload: SubagentAuthorizationEventHookPayload;
160
- readonly taskId: string;
161
- }[];
155
+ readonly inputRequests?: readonly TaskInputRequestDelivery[];
156
+ /** Agent spawn/settlement requests a task-owned workflow run needs the parent to apply. */
157
+ readonly agentRequests?: readonly TaskAgentRequestDelivery[];
158
+ /** Task child authorization events re-emitted through the parent channel. */
159
+ readonly authorizationEvents?: readonly TaskAuthorizationEventDelivery[];
162
160
  /** Terminal views cached before task-run retention expires. */
163
161
  readonly views?: readonly TaskView[];
164
162
  };
@@ -186,6 +184,7 @@ export type SessionCommand = {
186
184
  } | {
187
185
  readonly kind: "cancel";
188
186
  readonly taskId?: string;
187
+ readonly tasks?: boolean;
189
188
  readonly turnId?: string;
190
189
  } | {
191
190
  readonly kind: "compact";
@@ -265,11 +264,12 @@ export interface ClearSessionHookPayload {
265
264
  /**
266
265
  * Results resumed back into a parked parent workflow by the work it
267
266
  * dispatched: child-produced subagent results and authored workflow tool
268
- * results. Parent-produced dispatch results never travel through this hook.
267
+ * results. Workflow-owner dispatch failures use the same private reply hook so
268
+ * `agent()` can settle instead of waiting forever.
269
269
  */
270
270
  export interface RuntimeActionResultHookPayload {
271
271
  readonly kind: "runtime-action-result";
272
- readonly results: readonly (RuntimeSubagentChildResult | RuntimeToolResultActionResult)[];
272
+ readonly results: readonly (RuntimeSubagentChildResult | RuntimeSubagentDispatchFailure | RuntimeToolResultActionResult)[];
273
273
  }
274
274
  /**
275
275
  * Event coordinates attached to a proxied `input.requested` batch.
@@ -376,6 +376,8 @@ export interface SessionCapabilities {
376
376
  */
377
377
  export interface RunInput {
378
378
  readonly adapter: ChannelAdapter<any>;
379
+ /** Framework task that owns this run, when the run is a task executor. */
380
+ readonly taskId?: string;
379
381
  /**
380
382
  * Registered channel name for root sessions started from an authored
381
383
  * channel route. Framework runs omit this and use their framework
@@ -457,12 +459,6 @@ export interface RunInput {
457
459
  * for that axis.
458
460
  */
459
461
  readonly limits?: RunSessionLimits;
460
- /**
461
- * Framework-owned depth of delegated local subagent sessions. Root sessions
462
- * omit this and are treated as depth 0; each local child receives
463
- * parent depth + 1.
464
- */
465
- readonly subagentDepth?: number;
466
462
  /** Framework-owned metadata for a protocol-neutral external invocation. */
467
463
  readonly externalInvocation?: {
468
464
  readonly continuationToken: string;
@@ -322,8 +322,7 @@ const kernelEffect = z.object({
322
322
  audience: z.array(z.enum([
323
323
  "root-session",
324
324
  "delegated-task-child",
325
- "requires-request-input",
326
- "below-subagent-depth"
325
+ "requires-request-input"
327
326
  ])),
328
327
  kind: z.enum([
329
328
  "request-input",
@@ -1132,9 +1131,15 @@ async function openStreamBody(input) {
1132
1131
  }
1133
1132
  if (response.ok) {
1134
1133
  if (!response.body) throw new ClientError(response.status, "Response body is null.", response.headers);
1134
+ let closed = false;
1135
1135
  return {
1136
1136
  body: response.body,
1137
- close: () => connectionController.abort(),
1137
+ close: () => {
1138
+ if (closed) return;
1139
+ closed = true;
1140
+ response.body?.cancel().catch(() => {});
1141
+ connectionController.abort();
1142
+ },
1138
1143
  streamVersion: readMessageStreamVersion(response.headers),
1139
1144
  tailIndex: parseTailIndexHeader(response.headers)
1140
1145
  };
@@ -1218,11 +1223,13 @@ const ResetResponseSchema = z.discriminatedUnion("status", [z.object({
1218
1223
  //#endregion
1219
1224
  //#region src/client/session-controls.ts
1220
1225
  async function cancelClientSession(input) {
1226
+ const { signal, ...body } = input.options ?? {};
1221
1227
  const { payload, response } = await postJson({
1222
- body: input.options,
1228
+ body,
1223
1229
  context: input.context,
1224
1230
  operation: "Cancel",
1225
- path: createEveSessionCancelRoutePath(input.sessionId)
1231
+ path: createEveSessionCancelRoutePath(input.sessionId),
1232
+ signal
1226
1233
  });
1227
1234
  const result = CancelTurnResponseSchema.safeParse(payload);
1228
1235
  if (!result.success || result.data.status === "accepted" && result.data.sessionId !== input.sessionId) throw new Error(`Cancel route returned an invalid response (${response.status}).`);
@@ -1258,11 +1265,13 @@ async function compactClientSession(input) {
1258
1265
  } : { status: "no_active_session" };
1259
1266
  }
1260
1267
  async function resetClientSession(input) {
1268
+ const { signal, ...body } = input.options ?? {};
1261
1269
  const { payload } = await postJson({
1262
- body: input.options,
1270
+ body,
1263
1271
  context: input.context,
1264
1272
  operation: "Reset",
1265
- path: createEveSessionResetRoutePath(input.sessionId)
1273
+ path: createEveSessionResetRoutePath(input.sessionId),
1274
+ signal
1266
1275
  });
1267
1276
  const result = ResetResponseSchema.safeParse(payload);
1268
1277
  if (!result.success || result.data.status === "reset" && result.data.previousSessionId !== input.sessionId) throw new Error("Reset route returned an invalid response.");
@@ -1277,7 +1286,8 @@ async function postJson(input) {
1277
1286
  const response = await fetch(createClientUrl(input.context.host, input.path), withRedirectPolicy$1({
1278
1287
  body: input.body === void 0 ? void 0 : JSON.stringify(input.body),
1279
1288
  headers,
1280
- method: "POST"
1289
+ method: "POST",
1290
+ signal: input.signal
1281
1291
  }, input.context.redirect));
1282
1292
  const text = await response.text();
1283
1293
  if (!response.ok) throw new ClientError(response.status, text, response.headers);
@@ -1343,7 +1353,7 @@ function isJsonObjectValue(value) {
1343
1353
  }
1344
1354
  function isPlainObject(value) {
1345
1355
  const prototype = Object.getPrototypeOf(value);
1346
- return prototype === null || prototype === Object.prototype;
1356
+ return prototype === null || Object.getPrototypeOf(prototype) === null;
1347
1357
  }
1348
1358
 
1349
1359
  //#endregion
@@ -2309,7 +2319,8 @@ function normalizeActionRequest(action) {
2309
2319
  name: "load_skill",
2310
2320
  toolName: "eve:load-skill"
2311
2321
  };
2312
- case "tool-call": return {
2322
+ case "tool-call":
2323
+ case "workflow-tool-call": return {
2313
2324
  kind: "tool-call",
2314
2325
  name: action.toolName,
2315
2326
  toolName: action.toolName
@@ -322,8 +322,7 @@ const kernelEffect = z.object({
322
322
  audience: z.array(z.enum([
323
323
  "root-session",
324
324
  "delegated-task-child",
325
- "requires-request-input",
326
- "below-subagent-depth"
325
+ "requires-request-input"
327
326
  ])),
328
327
  kind: z.enum([
329
328
  "request-input",
@@ -1132,9 +1131,15 @@ async function openStreamBody(input) {
1132
1131
  }
1133
1132
  if (response.ok) {
1134
1133
  if (!response.body) throw new ClientError(response.status, "Response body is null.", response.headers);
1134
+ let closed = false;
1135
1135
  return {
1136
1136
  body: response.body,
1137
- close: () => connectionController.abort(),
1137
+ close: () => {
1138
+ if (closed) return;
1139
+ closed = true;
1140
+ response.body?.cancel().catch(() => {});
1141
+ connectionController.abort();
1142
+ },
1138
1143
  streamVersion: readMessageStreamVersion(response.headers),
1139
1144
  tailIndex: parseTailIndexHeader(response.headers)
1140
1145
  };
@@ -1218,11 +1223,13 @@ const ResetResponseSchema = z.discriminatedUnion("status", [z.object({
1218
1223
  //#endregion
1219
1224
  //#region src/client/session-controls.ts
1220
1225
  async function cancelClientSession(input) {
1226
+ const { signal, ...body } = input.options ?? {};
1221
1227
  const { payload, response } = await postJson({
1222
- body: input.options,
1228
+ body,
1223
1229
  context: input.context,
1224
1230
  operation: "Cancel",
1225
- path: createEveSessionCancelRoutePath(input.sessionId)
1231
+ path: createEveSessionCancelRoutePath(input.sessionId),
1232
+ signal
1226
1233
  });
1227
1234
  const result = CancelTurnResponseSchema.safeParse(payload);
1228
1235
  if (!result.success || result.data.status === "accepted" && result.data.sessionId !== input.sessionId) throw new Error(`Cancel route returned an invalid response (${response.status}).`);
@@ -1258,11 +1265,13 @@ async function compactClientSession(input) {
1258
1265
  } : { status: "no_active_session" };
1259
1266
  }
1260
1267
  async function resetClientSession(input) {
1268
+ const { signal, ...body } = input.options ?? {};
1261
1269
  const { payload } = await postJson({
1262
- body: input.options,
1270
+ body,
1263
1271
  context: input.context,
1264
1272
  operation: "Reset",
1265
- path: createEveSessionResetRoutePath(input.sessionId)
1273
+ path: createEveSessionResetRoutePath(input.sessionId),
1274
+ signal
1266
1275
  });
1267
1276
  const result = ResetResponseSchema.safeParse(payload);
1268
1277
  if (!result.success || result.data.status === "reset" && result.data.previousSessionId !== input.sessionId) throw new Error("Reset route returned an invalid response.");
@@ -1277,7 +1286,8 @@ async function postJson(input) {
1277
1286
  const response = await fetch(createClientUrl(input.context.host, input.path), withRedirectPolicy$1({
1278
1287
  body: input.body === void 0 ? void 0 : JSON.stringify(input.body),
1279
1288
  headers,
1280
- method: "POST"
1289
+ method: "POST",
1290
+ signal: input.signal
1281
1291
  }, input.context.redirect));
1282
1292
  const text = await response.text();
1283
1293
  if (!response.ok) throw new ClientError(response.status, text, response.headers);
@@ -1343,7 +1353,7 @@ function isJsonObjectValue(value) {
1343
1353
  }
1344
1354
  function isPlainObject(value) {
1345
1355
  const prototype = Object.getPrototypeOf(value);
1346
- return prototype === null || prototype === Object.prototype;
1356
+ return prototype === null || Object.getPrototypeOf(prototype) === null;
1347
1357
  }
1348
1358
 
1349
1359
  //#endregion
@@ -2309,7 +2319,8 @@ function normalizeActionRequest(action) {
2309
2319
  name: "load_skill",
2310
2320
  toolName: "eve:load-skill"
2311
2321
  };
2312
- case "tool-call": return {
2322
+ case "tool-call":
2323
+ case "workflow-tool-call": return {
2313
2324
  kind: "tool-call",
2314
2325
  name: action.toolName,
2315
2326
  toolName: action.toolName
@@ -1,5 +1,5 @@
1
1
  import { Command } from "#compiled/commander/index.js";
2
- import { type CliApplicationContext } from "#cli/application-command.js";
2
+ import type { CliApplicationContext } from "#cli/application-command.js";
3
3
  import type { ClientOptions } from "#client/types.js";
4
4
  import type { DevelopmentServer, DevelopmentServerOptions } from "#internal/nitro/host/types.js";
5
5
  export type RunAcpServer = (input: {
@@ -1,4 +1,4 @@
1
- import"#compiled/commander/index.js";import{applicationCommand}from"#cli/application-command.js";import{loadDevelopmentEnvironmentFiles}from"#cli/dev/environment.js";import{parseDevelopmentHeaderOption,resolveDevelopmentUrlTarget}from"#cli/dev/url-target.js";import{parseDevelopmentServerUrl}from"#cli/dev/url.js";import{FORCED_EXIT_BACKSTOP_MS,installShutdownSignal}from"#cli/shutdown.js";function registerAcpCommand(s){applicationCommand(s.program.command(`acp`),s.applicationContext,e=>resolveDevelopmentUrlTarget(e.opts(),e.processedArgs[0])===void 0).description(`Serve an eve agent through stable ACP v1 over stdio.`).argument(`[url]`,`Connect to an existing server URL`,parseDevelopmentServerUrl).option(`-u, --url <url>`,`Connect to an existing server URL`,parseDevelopmentServerUrl).option(`--scope <team>`,`Vercel team that owns the URL target`).option(`-H, --header <header>`,`Request header for a URL target, in "Name: value" form (repeatable)`,parseDevelopmentHeaderOption).addHelpText(`after`,`
1
+ import"#compiled/commander/index.js";import{agentCommand}from"#cli/agent-command.js";import{loadDevelopmentEnvironmentFiles}from"#cli/dev/environment.js";import{parseDevelopmentHeaderOption,resolveDevelopmentUrlTarget}from"#cli/dev/url-target.js";import{parseDevelopmentServerUrl}from"#cli/dev/url.js";import{FORCED_EXIT_BACKSTOP_MS,installShutdownSignal}from"#cli/shutdown.js";function registerAcpCommand(s){agentCommand(s.program.command(`acp`),s.applicationContext,e=>resolveDevelopmentUrlTarget(e.opts(),e.processedArgs[0])===void 0).description(`Serve an eve agent through stable ACP v1 over stdio.`).argument(`[url]`,`Connect to an existing server URL`,parseDevelopmentServerUrl).option(`-u, --url <url>`,`Connect to an existing server URL`,parseDevelopmentServerUrl).option(`--scope <team>`,`Vercel team that owns the URL target`).option(`-H, --header <header>`,`Request header for a URL target, in "Name: value" form (repeatable)`,parseDevelopmentHeaderOption).addHelpText(`after`,`
2
2
  Without a URL, eve supervises a local development server. You can also pass a bare URL, for example: eve acp https://example.com
3
3
  ACP does not grant the agent access to the client's workspace or terminal.
4
- `).action(async(e,n)=>{let i=resolveDevelopmentUrlTarget(n,e);loadDevelopmentEnvironmentFiles(s.applicationContext.root);let c=installShutdownSignal({exitAfterMs:FORCED_EXIT_BACKSTOP_MS});if(i!==void 0){try{await runAcp(s,{headers:i.headers,serverUrl:i.serverUrl,signal:c.signal,vercelScope:n.scope??process.env.EVE_VERCEL_SCOPE})}finally{c.dispose()}return}let l,u,closeServer=()=>l===void 0?Promise.resolve():(u??=l.close(),u.catch(()=>void 0),u);c.signal.addEventListener(`abort`,()=>void closeServer(),{once:!0});try{l=(s.startHost??await loadStartHost())(s.applicationContext.root,{existing:`reject`,host:`127.0.0.1`,output:`stderr`,port:0});let e=await Promise.race([l.start(),c.stopped.then(()=>void 0)]);if(e===void 0)return;await runAcp(s,{serverUrl:e.url,signal:c.signal,workspaceRoot:e.appRoot}),c.requestStop()}finally{await closeServer(),c.dispose()}})}async function runAcp(e,t){let n=e.runAcpServer??(await import(`#acp/server.js`)).runAcpServer,{vercelScope:r,...i}=t,a=typeof i.headers==`function`?void 0:i.headers,o=Object.keys(a??{}).some(e=>e.toLowerCase()===`authorization`);if(i.workspaceRoot!==void 0||o){await n({eveVersion:e.eveVersion,...i});return}let{options:s}=await(e.resolveVerifiedRemoteDevelopmentClient??(await import(`#setup/verified-remote-client.js`)).resolveVerifiedRemoteDevelopmentClient)({headers:a,serverUrl:i.serverUrl,signal:i.signal,vercelScope:r,workspaceRoot:e.applicationContext.root});await n({auth:s.auth,eveVersion:e.eveVersion,headers:s.headers,serverUrl:i.serverUrl,signal:i.signal})}async function loadStartHost(){return(await import(`#cli/dev/local-server-process.js`)).createDevelopmentServer}export{registerAcpCommand};
4
+ `).action(async(e,n)=>{let i=resolveDevelopmentUrlTarget(n,e);await loadDevelopmentEnvironmentFiles(s.applicationContext.root);let c=installShutdownSignal({exitAfterMs:FORCED_EXIT_BACKSTOP_MS});if(i!==void 0){try{await runAcp(s,{headers:i.headers,serverUrl:i.serverUrl,signal:c.signal,vercelScope:n.scope??process.env.EVE_VERCEL_SCOPE})}finally{c.dispose()}return}let l,u,closeServer=()=>l===void 0?Promise.resolve():(u??=l.close(),u.catch(()=>void 0),u);c.signal.addEventListener(`abort`,()=>void closeServer(),{once:!0});try{l=(s.startHost??await loadStartHost())(s.applicationContext.root,{existing:`reject`,host:`127.0.0.1`,output:`stderr`,port:0});let e=await Promise.race([l.start(),c.stopped.then(()=>void 0)]);if(e===void 0)return;await runAcp(s,{serverUrl:e.url,signal:c.signal,workspaceRoot:e.appRoot}),c.requestStop()}finally{await closeServer(),c.dispose()}})}async function runAcp(e,t){let n=e.runAcpServer??(await import(`#acp/server.js`)).runAcpServer,{vercelScope:r,...i}=t,a=typeof i.headers==`function`?void 0:i.headers,o=Object.keys(a??{}).some(e=>e.toLowerCase()===`authorization`);if(i.workspaceRoot!==void 0||o){await n({eveVersion:e.eveVersion,...i});return}let{options:s}=await(e.resolveVerifiedRemoteDevelopmentClient??(await import(`#setup/verified-remote-client.js`)).resolveVerifiedRemoteDevelopmentClient)({headers:a,serverUrl:i.serverUrl,signal:i.signal,vercelScope:r,workspaceRoot:e.applicationContext.root});await n({auth:s.auth,eveVersion:e.eveVersion,headers:s.headers,serverUrl:i.serverUrl,signal:i.signal})}async function loadStartHost(){return(await import(`#cli/dev/local-server-process.js`)).createDevelopmentServer}export{registerAcpCommand};
@@ -0,0 +1,5 @@
1
+ import type { Command } from "#compiled/commander/index.js";
2
+ import type { CliApplicationContext } from "./application-command.js";
3
+ export type AgentCommandRequirement = (command: Command) => boolean;
4
+ /** Adds consistent workspace-agent selection to an agent-scoped command. */
5
+ export declare function agentCommand(command: Command, applicationContext: CliApplicationContext, requirement?: AgentCommandRequirement): Command;
@@ -0,0 +1 @@
1
+ async function selectWorkspaceAgent(e,t){let n=e.members.map(e=>e.name);if(t!==void 0){let r=e.members.find(e=>e.name===t);if(r===void 0)throw Error(`Unknown agent ${JSON.stringify(t)}. Available agents: ${n.join(`, `)}.`);return r.appRoot}if(e.members.length===1)return e.members[0].appRoot;if(!(process.stdin.isTTY&&process.stdout.isTTY))throw Error(`This command requires a specific agent. Pass --agent <name>. Available agents: ${n.join(`, `)}.`);let{createPrompter:r}=await import(`#setup/prompter.js`),i=await r().select({message:`Select an agent`,options:e.members.map(e=>({label:e.name,value:e.name})),search:e.members.length>8});return e.members.find(e=>e.name===i).appRoot}function agentCommand(e,t,n=()=>!0){return e.option(`--agent <name>`,`Select an agent from an agents/ workspace`),e.hook(`preAction`,async(e,r)=>{let i=r.opts().agent;if(!n(r)){if(i!==void 0)throw Error(`--agent cannot be combined with a remote URL target.`);return}let a=await t.resolveAgent();if(a.kind===`workspace`){t.root=await selectWorkspaceAgent(a.workspace,i),await t.resolve();return}await t.resolve();let o=await t.resolveAgent();if(i!==void 0&&(o.kind!==`workspace-member`||o.member.name!==i))throw Error(`--agent can only select a member of the enclosing agents/ workspace.`)})}export{agentCommand};
@@ -1,9 +1,11 @@
1
1
  import type { Command } from "#compiled/commander/index.js";
2
2
  import type { ResolvedDiscoveryProject } from "#discover/project.js";
3
+ import type { EveProjectContext } from "#internal/project-context.js";
3
4
  export interface CliApplicationContext {
4
5
  root: string;
5
6
  project?: ResolvedDiscoveryProject;
6
7
  resolve(): Promise<void>;
8
+ resolveAgent(): Promise<EveProjectContext>;
7
9
  }
8
10
  export type CliApplicationRootRequirement = (command: Command) => boolean;
9
11
  /** Adds application-root resolution to a project-scoped CLI command. */
@@ -9,7 +9,9 @@ export declare const HANDOFF_SECTIONS: readonly ["intro-handoff.md", "collect-in
9
9
  */
10
10
  export declare function initAgentInstructions(): string;
11
11
  /** Concise scaffold facts printed only when a coding agent launched `eve init`. */
12
- export declare function initAgentReadySummary(model: string | undefined, projectPath: string): string;
12
+ export declare function initAgentReadySummary(model: string | undefined, projectPath: string, options?: {
13
+ workspace?: boolean;
14
+ }): string;
13
15
  /** The post-scaffold handoff printed after a coding agent runs `eve init`. */
14
16
  export declare function initAgentDevHandoff(options: {
15
17
  projectPath: string;
@@ -1,6 +1,6 @@
1
1
  import{join}from"node:path";import pc from"#compiled/picocolors/index.js";import{readFileSync}from"node:fs";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";const SETUP_SECTIONS=[`intro-setup.md`,`collect-intent.md`,`vercel-connect.md`,`scaffold.md`,`build-and-verify.md`],HANDOFF_SECTIONS=[`intro-handoff.md`,`collect-intent.md`,`vercel-connect.md`,`build-and-verify.md`];function compose(e,t){let r=e.map(e=>readFileSync(new URL(`./agent-prompt/${e}`,import.meta.url),`utf8`).trim()).join(`
2
2
 
3
- `).replaceAll(`{{devCommand}}`,()=>t.devCommand),{workingDirectory:i}=t;return i===void 0?r:r.replaceAll(`{{workingDirectory}}`,()=>i)}function initAgentInstructions(){return compose(SETUP_SECTIONS,{devCommand:`npx eve dev`})}function initAgentReadySummary(n,i){let a=n??DEFAULT_AGENT_MODEL_ID,o=n===void 0?pc.dim(` (eve default)`):``;return[`${pc.green(`✓`)} Model ${pc.bold(a)}${o}`,`${pc.green(`✓`)} Instructions ${pc.bold(join(i,`agent/instructions.md`))}`].join(`
3
+ `).replaceAll(`{{devCommand}}`,()=>t.devCommand),{workingDirectory:i}=t;return i===void 0?r:r.replaceAll(`{{workingDirectory}}`,()=>i)}function initAgentInstructions(){return compose(SETUP_SECTIONS,{devCommand:`npx eve dev`})}function initAgentReadySummary(n,i,a={}){let o=n??DEFAULT_AGENT_MODEL_ID,s=n===void 0?pc.dim(` (eve default)`):``,c=a.workspace?`${pc.green(`✓`)} Agents ${pc.bold(join(i,`agents`))}`:`${pc.green(`✓`)} Instructions ${pc.bold(join(i,`agent/instructions.md`))}`;return[`${pc.green(`✓`)} Model ${pc.bold(o)}${s}`,c].join(`
4
4
  `)}function initAgentDevHandoff(e){return compose(HANDOFF_SECTIONS,{devCommand:e.devCommand,workingDirectory:e.projectPath})}function initAgentReplPrompt(e){return compose(HANDOFF_SECTIONS,{devCommand:e.devCommand,workingDirectory:`.`})}function initExtensionInstructions(){return[`You are scaffolding an eve extension package (a reusable package of tools,`,`connections, skills, and hooks that a consuming agent mounts under`,`agent/extensions/).`,``,`Ask the user for a package directory name, then run:`,``,` npx eve@latest extension init <name>`,``,`That creates the package, installs dependencies, and initializes Git. It`,`prints what was set up and how to author, build, and mount the extension —`,`it does not start eve dev (extensions are not standalone agents).`,``,"Build with `eve extension build` (or the package `build` script)."].join(`
5
5
  `)}function initExtensionHandoff(e){return[``,`What we set up:`,` - package.json with eve.extension source/dist roots, peer+dev eve, and zod`,` - extension/extension.ts (config schema via defineExtension)`,` - build/prepare scripts → eve extension build`,``,`Next:`,` - Add tools, skills, hooks, or connections under extension/`,` (see AGENTS.md and node_modules/eve/docs/extensions.md)`,` - ${`${e.packageManager} run build`} # builds dist/extension and package exports`,` - Mount from a consumer agent:`,` // agent/extensions/${e.packageName}.ts`,` import ext from "${e.packageName}";`,` export default ext({ apiKey: process.env.API_KEY });`,``,`Working directory: ${e.projectPath}`].join(`
6
6
  `)}export{HANDOFF_SECTIONS,SETUP_SECTIONS,initAgentDevHandoff,initAgentInstructions,initAgentReadySummary,initAgentReplPrompt,initExtensionHandoff,initExtensionInstructions};
@@ -1,5 +1,5 @@
1
1
  import type { Command } from "#compiled/commander/index.js";
2
- import { type CliApplicationContext } from "#cli/application-command.js";
2
+ import type { CliApplicationContext } from "#cli/application-command.js";
3
3
  import type { ApplicationBuildOptions } from "#internal/nitro/host/types.js";
4
4
  export type BuildHost = (appRoot: string, options: ApplicationBuildOptions) => Promise<string>;
5
5
  interface BuildCommandLogger {
@@ -1 +1 @@
1
- import{applicationCommand}from"#cli/application-command.js";import{resolve}from"node:path";import{resolveInternalVercelServiceOutput}from"#cli/vercel-service-output.js";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{EVE_PUBLIC_ROUTE_PREFIX_ENV,normalizePublicRoutePrefix}from"#shared/public-route-prefix.js";function registerBuildCommand(n){let r=createCliTheme();applicationCommand(n.program.command(`build`),n.applicationContext).description(`Build the current eve application.`).option(`--profile <path>`,`Write best-effort timing and output-size profile JSON to a file`).option(`--skip-sandbox-prewarm`,`Skip sandbox template prewarm for a Vercel build; output may not be deployable`).action(async e=>{let{loadDevelopmentEnvironmentFiles:t}=await import(`#cli/dev/environment.js`);t(n.applicationContext.root);let i=n.buildHost??(await import(`#internal/nitro/host.js`)).buildApplication,a=e.profile===void 0?void 0:resolve(n.applicationContext.root,e.profile),o={publicRoutePrefix:normalizePublicRoutePrefix(process.env[EVE_PUBLIC_ROUTE_PREFIX_ENV]),skipVercelSandboxPrewarm:e.skipSandboxPrewarm===!0,vercelServiceOutput:resolveInternalVercelServiceOutput(n.applicationContext.root)};a!==void 0&&(o.profileOutputPath=a);let s=await i(n.applicationContext.root,o);n.logger.log(renderCliTaggedLine(r,{message:`built output at ${s}`,tag:`build`,tone:`success`}))})}export{registerBuildCommand};
1
+ import{resolve}from"node:path";import{resolveInternalVercelServiceOutput}from"#cli/vercel-service-output.js";import{createCliTheme,renderCliTaggedLine}from"#cli/ui/output.js";import{EVE_INTERNAL_AGENT_WORKSPACE_MEMBER_ENV}from"#internal/application/build-output-environment.js";import{EVE_PUBLIC_ROUTE_PREFIX_ENV,normalizePublicRoutePrefix}from"#shared/public-route-prefix.js";function registerBuildCommand(r){let i=createCliTheme();r.program.command(`build`).hook(`preAction`,async()=>{(await r.applicationContext.resolveAgent()).kind!==`workspace`&&await r.applicationContext.resolve()}).description(`Build the current eve application.`).option(`--profile <path>`,`Write best-effort timing and output-size profile JSON to a file`).option(`--skip-sandbox-prewarm`,`Skip sandbox template prewarm for a Vercel build; output may not be deployable`).action(async n=>{let{loadDevelopmentEnvironmentFiles:a}=await import(`#cli/dev/environment.js`);await a(r.applicationContext.root);let o=await r.applicationContext.resolveAgent();if(o.kind===`workspace`){if(n.profile!==void 0||n.skipSandboxPrewarm===!0)throw Error(`Workspace builds do not support --profile or --skip-sandbox-prewarm. Run those options from an individual agent directory.`);let{buildAgentWorkspace:e}=await import(`#internal/vercel/build-agent-workspace.js`),t=await e(o.workspace);r.logger.log(renderCliTaggedLine(i,{message:`built output at ${t}`,tag:`build`,tone:`success`}));return}let s=r.buildHost??(await import(`#internal/nitro/host.js`)).buildApplication,c=n.profile===void 0?void 0:resolve(r.applicationContext.root,n.profile),l={publicRoutePrefix:normalizePublicRoutePrefix(process.env[EVE_PUBLIC_ROUTE_PREFIX_ENV]),skipVercelSandboxPrewarm:n.skipSandboxPrewarm===!0,vercelServiceOutput:resolveInternalVercelServiceOutput(r.applicationContext.root),workspaceMember:o.kind===`workspace-member`||process.env[EVE_INTERNAL_AGENT_WORKSPACE_MEMBER_ENV]===`1`};c!==void 0&&(l.profileOutputPath=c);let u=await s(r.applicationContext.root,l);r.logger.log(renderCliTaggedLine(i,{message:`built output at ${u}`,tag:`build`,tone:`success`}))})}export{registerBuildCommand};
@@ -1,3 +1,4 @@
1
+ import { isEveProject } from "#setup/scaffold/index.js";
1
2
  import { type DeployFlowDeps } from "#setup/flows/deploy.js";
2
3
  import { type Prompter } from "#setup/prompter.js";
3
4
  import { type VercelProjectCliOptions } from "./vercel-non-interactive.js";
@@ -8,6 +9,7 @@ export interface DeployCliLogger {
8
9
  export interface DeployCommandDependencies {
9
10
  createPrompter?: () => Prompter;
10
11
  hasInteractiveTerminal(): boolean;
12
+ isEveProject?: typeof isEveProject;
11
13
  /** Test seam into the flow's detection and box effects. */
12
14
  flowDeps?: Partial<DeployFlowDeps>;
13
15
  }
@@ -1 +1 @@
1
- import{hasInteractiveTerminal}from"./preconditions.js";import{isNonInteractiveProjectCommand,runNonInteractiveLink}from"./vercel-non-interactive.js";import{runDeployFlow}from"#setup/flows/deploy.js";import{createPrompter}from"#setup/prompter.js";const defaultDependencies={hasInteractiveTerminal};async function runDeployCommand(e,r,i=defaultDependencies,a={}){if(isNonInteractiveProjectCommand(a)){if(a.yes!==!0){e.error("`eve deploy --non-interactive` requires `--yes` to confirm production deployment."),process.exitCode=1;return}if(a.project!==void 0&&!await runNonInteractiveLink({logger:e,appRoot:r,options:a}))return}let o=i.createPrompter?.()??createPrompter();o.intro(`Deploy your eve agent to Vercel`);try{let n=await runDeployFlow({appRoot:r,prompter:o,interactive:!isNonInteractiveProjectCommand(a)&&i.hasInteractiveTerminal(),deps:i.flowDeps});if(n.kind===`needs-link`){e.error("This directory is not linked to a Vercel project. Run `eve link` first, or name the project on the deploy itself: `eve deploy --project <name-or-id> --non-interactive --yes`."),process.exitCode=1;return}if(n.kind===`local-model`){e.error("ChatGPT subscription models use local Codex credentials and cannot be deployed. Switch to an AI Gateway or server-authenticated model before running `eve deploy`."),process.exitCode=1;return}o.outro(n.kind===`cancelled`?`Cancelled.`:n.productionUrl===void 0?`Deployed.`:`Deployed: ${n.productionUrl}`)}catch(t){e.error(t instanceof Error?t.message:String(t)),process.exitCode=1}}export{runDeployCommand};
1
+ import{hasInteractiveTerminal,validateWorkspaceProjectCommand}from"./preconditions.js";import{isNonInteractiveProjectCommand,runNonInteractiveLink}from"./vercel-non-interactive.js";import{isEveProject}from"#setup/scaffold/index.js";import{runDeployFlow}from"#setup/flows/deploy.js";import{createPrompter}from"#setup/prompter.js";const defaultDependencies={hasInteractiveTerminal,isEveProject};async function runDeployCommand(e,n,r=defaultDependencies,i={}){if(!await validateWorkspaceProjectCommand({appRoot:n,isEveProject:r.isEveProject,logger:e,workspaceMemberMessage:e=>`This agent belongs to the workspace at ${e.root}. Run \`eve deploy\` from the workspace root to deploy every peer agent together.`}))return;if(isNonInteractiveProjectCommand(i)){if(i.yes!==!0){e.error("`eve deploy --non-interactive` requires `--yes` to confirm production deployment."),process.exitCode=1;return}if(i.project!==void 0&&!await runNonInteractiveLink({logger:e,appRoot:n,options:i}))return}let a=r.createPrompter?.()??createPrompter();a.intro(`Deploy your eve agent to Vercel`);try{let t=await runDeployFlow({appRoot:n,prompter:a,interactive:!isNonInteractiveProjectCommand(i)&&r.hasInteractiveTerminal(),deps:r.flowDeps});if(t.kind===`needs-link`){e.error("This directory is not linked to a Vercel project. Run `eve link` first, or name the project on the deploy itself: `eve deploy --project <name-or-id> --non-interactive --yes`."),process.exitCode=1;return}if(t.kind===`local-model`){e.error("ChatGPT subscription models use local Codex credentials and cannot be deployed. Switch to an AI Gateway or server-authenticated model before running `eve deploy`."),process.exitCode=1;return}a.outro(t.kind===`cancelled`?`Cancelled.`:t.productionUrl===void 0?`Deployed.`:`Deployed: ${t.productionUrl}`)}catch(t){e.error(t instanceof Error?t.message:String(t)),process.exitCode=1}}export{runDeployCommand};
@@ -0,0 +1,14 @@
1
+ import type { AgentReasoningDefinition } from "#shared/agent-definition.js";
2
+ import { validateModelSlug } from "#setup/flows/model-source-change.js";
3
+ export interface InitCommandOptions {
4
+ agents?: readonly string[];
5
+ channelWebNextjs?: boolean;
6
+ model?: string;
7
+ reasoning?: AgentReasoningDefinition;
8
+ }
9
+ export interface InitCliLogger {
10
+ error(message: string): void;
11
+ log(message: string): void;
12
+ }
13
+ export declare function convertScaffoldToAgentWorkspace(projectRoot: string, names: readonly string[], options: InitCommandOptions): Promise<void>;
14
+ export declare function addAgentsToWorkspace(logger: InitCliLogger, workspaceRoot: string, target: string | undefined, options: InitCommandOptions, validateModel?: typeof validateModelSlug): Promise<boolean>;
@@ -0,0 +1 @@
1
+ import{mkdir,readFile,rename}from"node:fs/promises";import{join}from"node:path";import pc from"#compiled/picocolors/index.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";import{createPrompter}from"#setup/prompter.js";import{findEveProjectContext}from"#internal/project-context.js";import{pathExists}from"#setup/path-exists.js";import{agentTemplateFiles}from"#setup/scaffold/create/project.js";import{assertValidPublicAgentName}from"#internal/agent-name.js";import{validateModelSlug}from"#setup/flows/model-source-change.js";import{writeTextFile}from"#setup/scaffold/files.js";function validateAgentNames(e){if(e.length===0)throw Error(`--agents requires at least one agent name.`);let t=new Set;for(let n of e){if(assertValidPublicAgentName(n,`Agent`),t.has(n))throw Error(`Agent name ${JSON.stringify(n)} is repeated.`);t.add(n)}}async function writeWorkspaceAgent(e,t,n){let i=join(e,`agents`,t);if(await pathExists(i))throw Error(`Cannot create agent ${JSON.stringify(t)} because ${i} already exists.`);let o=agentTemplateFiles(n.model??DEFAULT_AGENT_MODEL_ID,n.reasoning);await Promise.all(Object.entries(o).map(([e,t])=>writeTextFile(join(i,e),t)))}async function convertScaffoldToAgentWorkspace(i,a,o){if(validateAgentNames(a),o.channelWebNextjs===!0)throw Error(`--channel-web-nextjs cannot be combined with --agents.`);let[s,...c]=a;await mkdir(join(i,`agents`,s),{recursive:!0}),await rename(join(i,`agent`),join(i,`agents`,s,`agent`));let l=join(i,`tsconfig.json`);await writeTextFile(l,(await readFile(l,`utf8`)).replace(`"agent/**/*.ts"`,`"agents/**/*.ts"`),{force:!0});for(let e of c)await writeWorkspaceAgent(i,e,o)}async function addAgentsToWorkspace(e,t,n,r,a=validateModelSlug){if((await findEveProjectContext(t))?.kind!==`workspace`)return!1;if(r.channelWebNextjs===!0)throw Error(`--channel-web-nextjs is not supported when adding a workspace agent.`);let c=r.agents;if(n!==void 0&&c!==void 0)throw Error(`Pass either an agent name or --agents, not both.`);if(c===void 0&&n!==void 0&&(c=[n]),c===void 0){if(!(process.stdin.isTTY&&process.stdout.isTTY))throw Error(`This directory is an eve agent workspace. Pass an agent name, for example: eve init billing.`);c=[await createPrompter().text({message:`Name the new agent`})]}if(validateAgentNames(c),r.model!==void 0){let e=await a(t,r.model);if(e!==null)throw Error(e)}for(let e of c)await writeWorkspaceAgent(t,e,r);return e.log(`${pc.green(`✓`)} Added ${c.length===1?`agent`:`agents`} ${c.map(e=>pc.bold(e)).join(`, `)}`),e.log(pc.dim(`$ eve dev --agent <name>`)),!0}export{addAgentsToWorkspace,convertScaffoldToAgentWorkspace};
@@ -1,25 +1,14 @@
1
1
  import { isCodingAgentLaunch } from "#cli/agent-detection.js";
2
- import type { AgentReasoningDefinition } from "#shared/agent-definition.js";
3
2
  import { detectInvokingPackageManager, detectPackageManager } from "#setup/package-manager.js";
4
3
  import { runPackageManagerInstall, spawnPackageManager } from "#setup/primitives/index.js";
5
4
  import { addAgentToProject } from "#setup/scaffold/create/add-to-project.js";
6
5
  import { ensureChannel, scaffoldBaseProject } from "#setup/scaffold/index.js";
7
6
  import { validateModelSlug } from "#setup/flows/model-source-change.js";
7
+ import { type InitCliLogger, type InitCommandOptions } from "./init-agent-workspace.js";
8
8
  import { confirmInitInNonEmptyDirectory } from "./init-confirm.js";
9
9
  import { tryInitializeGit } from "./init-git.js";
10
10
  import { selectInitHandoff, spawnCodingAgentRepl } from "./init-repl.js";
11
- export interface InitCliLogger {
12
- error(message: string): void;
13
- log(message: string): void;
14
- }
15
- export interface InitCommandOptions {
16
- /** Add the Web Chat channel (a Next.js app). Set by `--channel-web-nextjs`. */
17
- channelWebNextjs?: boolean;
18
- /** Model id written to the root agent config. Set by `--model`. */
19
- model?: string;
20
- /** Reasoning effort written to the root agent config. Set by `--reasoning`. */
21
- reasoning?: AgentReasoningDefinition;
22
- }
11
+ export type { InitCliLogger, InitCommandOptions } from "./init-agent-workspace.js";
23
12
  export interface InitCommandDependencies {
24
13
  addAgentToProject: typeof addAgentToProject;
25
14
  confirmInitInNonEmptyDirectory: typeof confirmInitInNonEmptyDirectory;