eve 0.69.0 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/src/acp/adapter.js +1 -1
  3. package/dist/src/channel/task-card.d.ts +3 -3
  4. package/dist/src/channel/task-card.js +1 -1
  5. package/dist/src/channel/types.d.ts +18 -0
  6. package/dist/src/chunks/{use-eve-agent-Dab2MnT2.js → use-eve-agent-CJQeE7-t.js} +1873 -1236
  7. package/dist/src/chunks/{use-eve-agent-D_5129A9.js → use-eve-agent-DdemtY6C.js} +1874 -1234
  8. package/dist/src/cli/dev/command.js +1 -1
  9. package/dist/src/cli/dev/console-records-preload.d.ts +1 -0
  10. package/dist/src/cli/dev/console-records-preload.js +1 -0
  11. package/dist/src/cli/dev/console-records.d.ts +17 -0
  12. package/dist/src/cli/dev/console-records.js +3 -0
  13. package/dist/src/cli/dev/diagnostic-sink.d.ts +1 -0
  14. package/dist/src/cli/dev/local-server-process.js +1 -1
  15. package/dist/src/cli/dev/tui/blocks.d.ts +2 -1
  16. package/dist/src/cli/dev/tui/blocks.js +3 -3
  17. package/dist/src/cli/dev/tui/conversation-view.d.ts +54 -0
  18. package/dist/src/cli/dev/tui/conversation-view.js +1 -0
  19. package/dist/src/cli/dev/tui/flow-drawer.d.ts +5 -2
  20. package/dist/src/cli/dev/tui/flow-drawer.js +1 -1
  21. package/dist/src/cli/dev/tui/log-display-mode.d.ts +4 -10
  22. package/dist/src/cli/dev/tui/log-display-mode.js +1 -1
  23. package/dist/src/cli/dev/tui/message-queue.d.ts +7 -63
  24. package/dist/src/cli/dev/tui/message-queue.js +3 -1
  25. package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
  26. package/dist/src/cli/dev/tui/question-panel.d.ts +3 -1
  27. package/dist/src/cli/dev/tui/question-panel.js +1 -1
  28. package/dist/src/cli/dev/tui/runner.d.ts +56 -193
  29. package/dist/src/cli/dev/tui/runner.js +3 -3
  30. package/dist/src/cli/dev/tui/task-activity.d.ts +11 -7
  31. package/dist/src/cli/dev/tui/task-activity.js +1 -1
  32. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +15 -37
  33. package/dist/src/cli/dev/tui/terminal-renderer.js +10 -13
  34. package/dist/src/cli/dev/tui/terminal-tool-part.d.ts +2 -0
  35. package/dist/src/cli/dev/tui/terminal-tool-part.js +1 -0
  36. package/dist/src/cli/dev/tui/test/fake-eve-server.d.ts +34 -0
  37. package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -0
  38. package/dist/src/cli/dev/tui/test/index.d.ts +1 -0
  39. package/dist/src/cli/dev/tui/test/index.js +1 -1
  40. package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
  41. package/dist/src/cli/dev/tui/tool-presentation.d.ts +1 -0
  42. package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
  43. package/dist/src/cli/dev/tui/tool-rows.d.ts +1 -0
  44. package/dist/src/cli/dev/tui/tool-rows.js +2 -2
  45. package/dist/src/cli/dev/tui/transcript-parts.d.ts +73 -0
  46. package/dist/src/cli/dev/tui/transcript-parts.js +3 -0
  47. package/dist/src/cli/dev/tui/transcript.d.ts +47 -0
  48. package/dist/src/cli/dev/tui/transcript.js +1 -0
  49. package/dist/src/cli/dev/tui/tui.js +1 -1
  50. package/dist/src/cli/dev/tui/turn-clock.d.ts +11 -26
  51. package/dist/src/cli/dev/tui/turn-clock.js +1 -1
  52. package/dist/src/cli/dev/tui/types.d.ts +2 -4
  53. package/dist/src/cli/dev/ui-options.js +1 -1
  54. package/dist/src/client/agent-stream-follower.d.ts +26 -0
  55. package/dist/src/client/agent-stream-follower.js +1 -0
  56. package/dist/src/client/authorization-message-parts.js +1 -1
  57. package/dist/src/client/conversation-client.d.ts +40 -0
  58. package/dist/src/client/conversation-client.js +1 -0
  59. package/dist/src/client/conversation-reducer.d.ts +29 -0
  60. package/dist/src/client/conversation-reducer.js +1 -0
  61. package/dist/src/client/conversation-state.d.ts +110 -0
  62. package/dist/src/client/conversation-state.js +1 -0
  63. package/dist/src/client/eve-agent-projection.d.ts +24 -7
  64. package/dist/src/client/eve-agent-projection.js +1 -1
  65. package/dist/src/client/eve-agent-store-helpers.d.ts +21 -2
  66. package/dist/src/client/eve-agent-store-helpers.js +2 -2
  67. package/dist/src/client/eve-agent-store-state.d.ts +15 -3
  68. package/dist/src/client/eve-agent-store.d.ts +10 -1
  69. package/dist/src/client/eve-agent-store.js +1 -1
  70. package/dist/src/client/index.d.ts +4 -1
  71. package/dist/src/client/index.js +1 -1
  72. package/dist/src/client/message-reducer-primitives.d.ts +1 -2
  73. package/dist/src/client/message-reducer-primitives.js +1 -1
  74. package/dist/src/client/message-reducer-types.d.ts +9 -2
  75. package/dist/src/client/message-reducer.js +1 -1
  76. package/dist/src/client/message-response.js +1 -1
  77. package/dist/src/client/message-run-parts.d.ts +10 -6
  78. package/dist/src/client/message-run-parts.js +1 -1
  79. package/dist/src/client/optimistic-message-submissions.d.ts +6 -4
  80. package/dist/src/client/optimistic-message-submissions.js +1 -1
  81. package/dist/src/client/reducer.d.ts +5 -1
  82. package/dist/src/client/session-turn-dispatch.d.ts +15 -0
  83. package/dist/src/client/session-turn-dispatch.js +1 -0
  84. package/dist/src/client/session-utils.d.ts +27 -10
  85. package/dist/src/client/session-utils.js +1 -1
  86. package/dist/src/client/session.js +1 -1
  87. package/dist/src/client/types.d.ts +2 -1
  88. package/dist/src/compiled/.vendor-stamp.json +1 -1
  89. package/dist/src/compiler/extension-compatibility.d.ts +18 -18
  90. package/dist/src/compiler/extension-compatibility.js +1 -1
  91. package/dist/src/compiler/load-binding-namespace.js +1 -1
  92. package/dist/src/context/keys.d.ts +5 -2
  93. package/dist/src/context/keys.js +1 -1
  94. package/dist/src/context/provider.d.ts +5 -9
  95. package/dist/src/context/run-step.d.ts +4 -4
  96. package/dist/src/context/run-step.js +1 -1
  97. package/dist/src/evals/runner/derive-run-facts.js +1 -1
  98. package/dist/src/evals/runner/execute-task.js +1 -1
  99. package/dist/src/evals/session.js +2 -2
  100. package/dist/src/evals/types.d.ts +16 -0
  101. package/dist/src/eve-channel/index.js +1 -1
  102. package/dist/src/execution/agent-sessions/context.d.ts +4 -2
  103. package/dist/src/execution/agent-sessions/context.js +1 -1
  104. package/dist/src/execution/agent-sessions/steps.js +1 -1
  105. package/dist/src/execution/cancelled-model-call-batch.js +1 -1
  106. package/dist/src/execution/coordination-dispatch-shared.d.ts +6 -4
  107. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  108. package/dist/src/execution/create-session-step.d.ts +4 -2
  109. package/dist/src/execution/create-session-step.js +1 -1
  110. package/dist/src/execution/durable-session-store.d.ts +10 -4
  111. package/dist/src/execution/durable-session-store.js +1 -1
  112. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  113. package/dist/src/execution/legacy-session/completion-step.d.ts +2 -0
  114. package/dist/src/execution/legacy-session/completion-step.js +1 -1
  115. package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
  116. package/dist/src/execution/legacy-session/prepare-step.d.ts +1 -0
  117. package/dist/src/execution/legacy-session/prepare-step.js +1 -1
  118. package/dist/src/execution/legacy-session/snapshot.d.ts +8 -4
  119. package/dist/src/execution/legacy-session/snapshot.js +1 -1
  120. package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
  121. package/dist/src/execution/proxied-deliver-step.js +1 -1
  122. package/dist/src/execution/publish-session-events.d.ts +27 -7
  123. package/dist/src/execution/publish-session-events.js +1 -1
  124. package/dist/src/execution/reconcile-session-continuation-token.d.ts +2 -2
  125. package/dist/src/execution/runtime-context.js +1 -1
  126. package/dist/src/execution/session/active-turn.d.ts +97 -0
  127. package/dist/src/execution/session/active-turn.js +1 -0
  128. package/dist/src/execution/session/entry.js +1 -1
  129. package/dist/src/execution/session/finalization.js +1 -1
  130. package/dist/src/execution/session/handoff.d.ts +5 -3
  131. package/dist/src/execution/session/handoff.js +1 -1
  132. package/dist/src/execution/session/input-queue.d.ts +19 -13
  133. package/dist/src/execution/session/input-queue.js +1 -1
  134. package/dist/src/execution/session/next-input.d.ts +2 -10
  135. package/dist/src/execution/session/next-input.js +1 -1
  136. package/dist/src/execution/session/program.d.ts +2 -0
  137. package/dist/src/execution/session/program.js +1 -1
  138. package/dist/src/execution/session/state-cursor.d.ts +22 -16
  139. package/dist/src/execution/session/state-cursor.js +1 -1
  140. package/dist/src/execution/session/state-delta.d.ts +8 -1
  141. package/dist/src/execution/session/state-delta.js +1 -1
  142. package/dist/src/execution/session/turn-event-handler.js +1 -1
  143. package/dist/src/execution/session/turn-step-result.js +1 -1
  144. package/dist/src/execution/session/turn-step-types.d.ts +13 -4
  145. package/dist/src/execution/session/turn-step.js +1 -1
  146. package/dist/src/execution/session/turn-waiting-step.js +1 -1
  147. package/dist/src/execution/session/turn.d.ts +8 -1
  148. package/dist/src/execution/session/turn.js +1 -1
  149. package/dist/src/execution/session.d.ts +5 -5
  150. package/dist/src/execution/session.js +2 -2
  151. package/dist/src/execution/settle-cancelled-turn-step.d.ts +5 -4
  152. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  153. package/dist/src/execution/tasks/start.d.ts +2 -2
  154. package/dist/src/execution/tasks/task-id-input.d.ts +1 -1
  155. package/dist/src/execution/tasks/task-id-input.js +1 -1
  156. package/dist/src/execution/terminal-session-completion-step.d.ts +2 -0
  157. package/dist/src/execution/terminal-session-completion-step.js +1 -1
  158. package/dist/src/execution/terminal-session-failure-step.d.ts +2 -0
  159. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  160. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  161. package/dist/src/execution/tools/connection-target.d.ts +5 -0
  162. package/dist/src/execution/tools/connection-target.js +1 -1
  163. package/dist/src/execution/tools/connection-tools.js +2 -2
  164. package/dist/src/execution/tools/workflow/start.d.ts +3 -3
  165. package/dist/src/harness/authorization.d.ts +15 -2
  166. package/dist/src/harness/authorization.js +1 -1
  167. package/dist/src/harness/cancelled-turn-emission.d.ts +2 -1
  168. package/dist/src/harness/cancelled-turn-emission.js +1 -1
  169. package/dist/src/harness/coordination.d.ts +5 -3
  170. package/dist/src/harness/emission.d.ts +5 -2
  171. package/dist/src/harness/emission.js +1 -1
  172. package/dist/src/harness/held-requests.d.ts +18 -0
  173. package/dist/src/harness/held-requests.js +1 -0
  174. package/dist/src/harness/hitl/approval-input-requests.d.ts +16 -0
  175. package/dist/src/harness/hitl/approval-input-requests.js +1 -1
  176. package/dist/src/harness/input-extraction.js +1 -1
  177. package/dist/src/harness/input-requests.d.ts +0 -4
  178. package/dist/src/harness/input-requests.js +1 -1
  179. package/dist/src/harness/model-call-error.js +1 -1
  180. package/dist/src/harness/proxy-input-requests.d.ts +4 -4
  181. package/dist/src/harness/session-limit-enforcement.js +1 -1
  182. package/dist/src/harness/stale-input-responses.js +1 -1
  183. package/dist/src/harness/tool-loop.js +2 -2
  184. package/dist/src/harness/turn-tag-state.d.ts +2 -0
  185. package/dist/src/harness/turn-tag-state.js +1 -1
  186. package/dist/src/harness/types.d.ts +23 -11
  187. package/dist/src/instrumentation/channel-delivery.d.ts +1 -0
  188. package/dist/src/instrumentation/channel-delivery.js +1 -1
  189. package/dist/src/instrumentation/lifecycle.d.ts +4 -0
  190. package/dist/src/instrumentation/memory.d.ts +2 -0
  191. package/dist/src/instrumentation/memory.js +1 -1
  192. package/dist/src/instrumentation/native-events.d.ts +1 -0
  193. package/dist/src/instrumentation/native-events.js +1 -1
  194. package/dist/src/instrumentation/runtime.d.ts +4 -3
  195. package/dist/src/instrumentation/runtime.js +1 -1
  196. package/dist/src/instrumentation/session-init.js +1 -1
  197. package/dist/src/internal/application/package.js +1 -1
  198. package/dist/src/internal/authored-module-loader.d.ts +14 -6
  199. package/dist/src/internal/authored-module-loader.js +1 -1
  200. package/dist/src/internal/authored-package-boundary.d.ts +1 -1
  201. package/dist/src/internal/authored-package-boundary.js +1 -1
  202. package/dist/src/internal/bundler/extension-mount-plugin.js +1 -1
  203. package/dist/src/internal/workflow-bundle/dynamic-remote-agent-transform.js +1 -1
  204. package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +27 -1
  205. package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.js +1 -1
  206. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +2 -2
  207. package/dist/src/protocol/message.d.ts +41 -3
  208. package/dist/src/protocol/message.js +2 -2
  209. package/dist/src/public/channels/slack/action-status.d.ts +2 -2
  210. package/dist/src/public/channels/slack/action-status.js +1 -1
  211. package/dist/src/public/channels/slack/approval-cards.d.ts +15 -0
  212. package/dist/src/public/channels/slack/approval-cards.js +2 -0
  213. package/dist/src/public/channels/slack/auth.d.ts +2 -0
  214. package/dist/src/public/channels/slack/auth.js +1 -1
  215. package/dist/src/public/channels/slack/connections.d.ts +15 -11
  216. package/dist/src/public/channels/slack/connections.js +1 -1
  217. package/dist/src/public/channels/slack/defaults.d.ts +1 -15
  218. package/dist/src/public/channels/slack/defaults.js +3 -4
  219. package/dist/src/public/channels/slack/hitl.js +1 -1
  220. package/dist/src/public/channels/slack/inbound.d.ts +10 -2
  221. package/dist/src/public/channels/slack/inbound.js +1 -1
  222. package/dist/src/public/channels/slack/index.d.ts +2 -0
  223. package/dist/src/public/channels/slack/index.js +1 -1
  224. package/dist/src/public/channels/slack/input-response.js +1 -1
  225. package/dist/src/public/channels/slack/interaction-cards.js +1 -1
  226. package/dist/src/public/channels/slack/interactions.js +1 -1
  227. package/dist/src/public/channels/slack/limits.d.ts +5 -3
  228. package/dist/src/public/channels/slack/private-approval-delivery.js +1 -1
  229. package/dist/src/public/channels/slack/renderers.d.ts +1 -1
  230. package/dist/src/public/channels/slack/renderers.js +1 -1
  231. package/dist/src/public/channels/slack/reply-delivery.d.ts +72 -0
  232. package/dist/src/public/channels/slack/reply-delivery.js +1 -0
  233. package/dist/src/public/channels/slack/sign-in-cancel.d.ts +20 -0
  234. package/dist/src/public/channels/slack/sign-in-cancel.js +1 -0
  235. package/dist/src/public/channels/slack/slackChannel.d.ts +15 -0
  236. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  237. package/dist/src/public/channels/slack/task-card.js +1 -1
  238. package/dist/src/public/channels/teams/defaults.d.ts +1 -1
  239. package/dist/src/public/channels/teams/defaults.js +2 -2
  240. package/dist/src/public/definitions/channel.d.ts +1 -0
  241. package/dist/src/public/definitions/channel.js +1 -1
  242. package/dist/src/public/next/index.js +1 -1
  243. package/dist/src/public/next/server.d.ts +2 -0
  244. package/dist/src/public/next/server.js +1 -2
  245. package/dist/src/public/nuxt/module.d.ts +6 -0
  246. package/dist/src/public/nuxt/module.js +1 -1
  247. package/dist/src/react/index.d.ts +3 -0
  248. package/dist/src/react/index.js +1 -1
  249. package/dist/src/react/use-eve-agent.d.ts +7 -5
  250. package/dist/src/react/use-eve-agent.js +1 -1
  251. package/dist/src/runtime/connections/scoped-authorization.d.ts +2 -0
  252. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  253. package/dist/src/setup/boxes/deploy-project.js +1 -1
  254. package/dist/src/setup/integrations/web/setup.js +6 -2
  255. package/dist/src/setup/scaffold/create/project.js +1 -1
  256. package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
  257. package/dist/src/setup/scaffold/create/web-template.js +28 -9
  258. package/dist/src/setup/vercel-project-framework.js +1 -1
  259. package/dist/src/shared/display-name.d.ts +15 -0
  260. package/dist/src/shared/display-name.js +1 -0
  261. package/dist/src/shared/framework-eve-server.d.ts +43 -0
  262. package/dist/src/shared/framework-eve-server.js +2 -0
  263. package/dist/src/shared/token-usage.d.ts +2 -0
  264. package/dist/src/shared/token-usage.js +1 -1
  265. package/dist/src/shared/trace-root.d.ts +8 -0
  266. package/dist/src/shared/trace-root.js +1 -0
  267. package/dist/src/subagents/hitl-proxy.d.ts +3 -3
  268. package/dist/src/subagents/hitl-proxy.js +1 -1
  269. package/dist/src/subagents/invocation.d.ts +3 -1
  270. package/dist/src/subagents/tool.js +1 -1
  271. package/dist/src/svelte/index.d.ts +3 -0
  272. package/dist/src/svelte/index.js +2 -2
  273. package/dist/src/svelte/use-eve-agent.d.ts +7 -4
  274. package/dist/src/svelte/use-eve-agent.js +1 -1
  275. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  276. package/dist/src/tools/provided/load-skill.js +1 -1
  277. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  278. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  279. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  280. package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
  281. package/dist/src/tracing/agent-otel-attributes.d.ts +6 -0
  282. package/dist/src/tracing/agent-otel-attributes.js +1 -1
  283. package/dist/src/tracing/agent-otel-provider.js +2 -2
  284. package/dist/src/tracing/agent-otel-runtime-context.d.ts +1 -1
  285. package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
  286. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  287. package/dist/src/tracing/agent-span-contract.js +1 -1
  288. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  289. package/dist/src/tracing/agent-trace-context-codec.d.ts +4 -0
  290. package/dist/src/tracing/agent-trace-context-codec.js +1 -1
  291. package/dist/src/tracing/agent-trace-span-processor.js +1 -1
  292. package/dist/src/tracing/agent-trace-state.d.ts +3 -0
  293. package/dist/src/tracing/conversation-context.d.ts +10 -0
  294. package/dist/src/tracing/conversation-context.js +1 -1
  295. package/dist/src/tracing/otel-registration.js +1 -1
  296. package/dist/src/vue/index.d.ts +3 -0
  297. package/dist/src/vue/index.js +2 -2
  298. package/dist/src/vue/use-eve-agent.d.ts +7 -3
  299. package/dist/src/vue/use-eve-agent.js +1 -1
  300. package/docs/channels/slack.mdx +60 -13
  301. package/docs/concepts/built-in-tools.md +3 -2
  302. package/docs/concepts/sessions-runs-and-streaming.md +4 -4
  303. package/docs/connections/overview.mdx +9 -3
  304. package/docs/evals/reporters.mdx +4 -0
  305. package/docs/extensions.md +11 -0
  306. package/docs/guides/client/streaming.mdx +7 -6
  307. package/docs/guides/deployment/vercel.mdx +2 -1
  308. package/docs/guides/dev-tui.md +15 -15
  309. package/docs/guides/dynamic-capabilities.md +1 -1
  310. package/docs/guides/frontend/nuxt.mdx +24 -4
  311. package/docs/guides/frontend/overview.mdx +44 -38
  312. package/docs/guides/frontend/use-eve-agent-svelte.mdx +4 -10
  313. package/docs/guides/frontend/use-eve-agent-vue.mdx +4 -10
  314. package/docs/guides/instrumentation/otel.mdx +24 -6
  315. package/docs/guides/remote-agents.md +26 -8
  316. package/docs/reference/cli.md +4 -4
  317. package/docs/tools/human-in-the-loop.md +4 -4
  318. package/docs/tools/overview.mdx +1 -1
  319. package/docs/tools/tasks.md +8 -8
  320. package/package.json +1 -1
  321. package/dist/src/cli/dev/tui/steering-stream.d.ts +0 -15
  322. package/dist/src/cli/dev/tui/steering-stream.js +0 -1
  323. package/dist/src/cli/dev/tui/subagent-pump.d.ts +0 -134
  324. package/dist/src/cli/dev/tui/subagent-pump.js +0 -1
  325. package/dist/src/public/nuxt/dev-server.d.ts +0 -25
  326. package/dist/src/public/nuxt/dev-server.js +0 -1
@@ -233,8 +233,8 @@ continues once the person answers or signs in.
233
233
  In every session, `turn.completed` comes only when the turn really ends. The TypeScript client's
234
234
  `send(...).result()` and the MCP channel's `agent_get` read past `turn.waiting` and report the
235
235
  final reply rather than the text written before the wait. `result()` stops at `turn.waiting` only
236
- while a question is pending, and returns `status: "waiting"` with it; `respond()` then reads the
237
- same turn to its end. See [Aggregate a turn](/docs/guides/client/streaming#aggregate-a-turn).
236
+ while a question is pending or the turn waits on a sign-in or approval, and returns
237
+ `status: "waiting"`; `respond()` then reads the same turn to its end. See [Aggregate a turn](/docs/guides/client/streaming#aggregate-a-turn).
238
238
  Channels such as [Slack](/docs/channels/slack) post a root session's text before the wait as an
239
239
  ordinary reply, then post the reply after the results as another message. Slack also shows each
240
240
  turn's tasks in a live [task card](/docs/channels/slack#task-card).
@@ -263,12 +263,12 @@ same `taskId` continues where it left off. A `serve` body that doesn't return to
263
263
 
264
264
  ## Stream events
265
265
 
266
- | Event | When | Data |
267
- | --------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
268
- | `task.started` | A call starts a task, or reaches a resumable task by its `taskId` | `taskId`, `callId`, `turnId`, the tool `name`, and `kind` |
269
- | `task.settled` | A reply, return, failure, or cancel settles one call | `taskId`, `callId`, `turnId`, `name`, `kind`, `status`, and `output`, `error`, or `cancel` |
270
- | `agent.started` | A workflow run, including an agent tool's, opens a session with an agent | `callId`, `turnId`, `taskId`, `name`, `sessionId`, `streamPath` |
271
- | `turn.waiting` | An open turn parks on its tasks, a `task_wait`, a question, or a sign-in | `turnId` and `sequence` |
266
+ | Event | When | Data |
267
+ | --------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
268
+ | `task.started` | A call starts a task, or reaches a resumable task by its `taskId` | `taskId`, `callId`, `turnId`, the tool `name`, and `kind` |
269
+ | `task.settled` | A reply, return, failure, or cancel settles one call | `taskId`, `callId`, `turnId`, `name`, `kind`, `status`, and `output`, `error`, or `cancel` |
270
+ | `agent.started` | A workflow run, including an agent tool's, opens a session with an agent | `callId`, `turnId`, `taskId`, `name`, `sessionId`, `streamPath` |
271
+ | `turn.waiting` | An open turn parks on its tasks, a `task_wait`, a question, a sign-in, or an approval | `turnId`, `sequence`, and `on`: `"input"` when a person must act, otherwise `"tasks"` |
272
272
 
273
273
  `task.started` and `task.settled` come once each per call, and `(taskId, callId)` identifies the
274
274
  call. Both carry that call's `turnId`, which for a resumable task's later call can be a later turn
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.69.0",
3
+ "version": "0.70.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -1,15 +0,0 @@
1
- import { type MessageStreamEvent } from "#protocol/message.js";
2
- /**
3
- * Follows accepted messages through their boundary, including a send racing
4
- * settlement. Delivery responses may overlap; stream event IDs deduplicate them.
5
- */
6
- export declare class SteeringStream implements AsyncIterable<MessageStreamEvent> {
7
- private readonly session;
8
- private readonly streams;
9
- private closed;
10
- private readonly controller;
11
- constructor(initial: AsyncIterable<MessageStreamEvent>, session: SteeringStream["session"]);
12
- send(message: string): Promise<void>;
13
- abort(): void;
14
- [Symbol.asyncIterator](): AsyncGenerator<MessageStreamEvent>;
15
- }
@@ -1 +0,0 @@
1
- import{createEventDeduper}from"#protocol/event-dedupe.js";import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";var SteeringStream=class{session;streams;closed=!1;controller=new AbortController;constructor(e,t){this.session=t,this.streams=[Promise.resolve(e)]}async send(e){if(this.closed)throw Error(`The active stream ended before steering was sent.`);let t=this.session.send(e,{turnPolicy:`steer`,signal:this.controller.signal});this.streams.push(t.then(e=>e,()=>void 0)),await t}abort(){this.closed=!0,this.controller.abort()}async*[Symbol.asyncIterator](){let e=createEventDeduper(),t;try{for(;this.streams.length>0;){let n=await this.streams.shift();if(n!==void 0){for await(let r of n)if(e.admit(r)){if(isCurrentTurnBoundaryEvent(r)){t=r;break}yield r}}}t!==void 0&&(yield t)}finally{this.abort()}}};export{SteeringStream};
@@ -1,134 +0,0 @@
1
- /**
2
- * The subagent child-stream subsystem: for every call to an agent task on
3
- * the parent stream, a parallel pump over the agent's session folds its
4
- * events into the renderer's view of what that agent is doing. Extracted
5
- * from the runner — the subsystem touches nothing but its own run state, the
6
- * client, and the {@link SubagentView} seam.
7
- */
8
- import type { Client } from "#client/index.js";
9
- import { type ActionResultStreamEvent, type AgentStartedStreamEvent, type TaskStartedStreamEvent } from "#protocol/message.js";
10
- /**
11
- * The renderer's view of each agent task's own activity. One cohesive
12
- * capability: a renderer that implements it shows what every working agent
13
- * is doing, and a renderer without it simply shows none. Individually
14
- * optional methods would let a renderer implement a type-legal subset that
15
- * ghosts placeholders or duplicates parent tool rows. The task's start and
16
- * end reach the renderer on the parent stream, not through this view.
17
- */
18
- export interface SubagentView {
19
- /**
20
- * The pump follows the agent a call reaches. The agent's last events can
21
- * trail the parent's `task.settled`, so the task's end waits for {@link end}.
22
- */
23
- begin(update: {
24
- callId: string;
25
- }): void;
26
- /** The followed agent's own stream ended, or the pump stopped following it. */
27
- end(update: {
28
- callId: string;
29
- }): void;
30
- upsertStep(update: SubagentStepUpdate): void;
31
- upsertTool(update: SubagentToolUpdate): void;
32
- /**
33
- * Drops a child tool call that never materialized, or one the session
34
- * refused for the model to retry (`reason` says why).
35
- */
36
- removeTool(update: {
37
- callId: string;
38
- childCallId: string;
39
- reason?: string;
40
- }): void;
41
- /** Suppresses the parent-level tool row for a child-owned call id. */
42
- markChildToolCallId(callId: string): void;
43
- }
44
- type SubagentChildStep = {
45
- reasoning: string;
46
- message: string;
47
- finalized: boolean;
48
- };
49
- type SubagentToolStatus = "preparing" | "approval-requested" | "executing" | "done" | "failed" | "rejected";
50
- type SubagentToolState = {
51
- toolName: string;
52
- input: unknown;
53
- status: SubagentToolStatus;
54
- output?: unknown;
55
- errorText?: string;
56
- label?: string;
57
- /** The child's call started an agent task of its own. */
58
- agentTask?: boolean;
59
- };
60
- export type SubagentRun = {
61
- name: string;
62
- childSessionId: string;
63
- /** Parent turn that originated this dispatch; cancellation is scoped to it. */
64
- parentTurnId: string;
65
- /** Only the child's own boundary ends the run: its last events can trail the parent's. */
66
- done: boolean;
67
- /** The parent session, whose client follows the child stream. */
68
- parentSessionId: string;
69
- /** The agent task's session, whose stream this run follows. */
70
- started: AgentStartedStreamEvent;
71
- /**
72
- * One entry per logical "child message" — independent of the child's
73
- * `stepIndex` field, which the harness can reuse across multiple
74
- * assistant messages within a turn (e.g. a message before a tool call
75
- * and another message after the tool result both arrive under
76
- * `stepIndex: 0`). The key is a monotonic counter so each
77
- * `message.completed` opens a new box on the next inbound delta.
78
- */
79
- steps: Map<number, SubagentChildStep>;
80
- /**
81
- * Section currently accepting reasoning/message deltas. `null` means
82
- * the next delta opens a new section.
83
- */
84
- currentSectionKey: number | null;
85
- /** Monotonic counter for new section keys. */
86
- nextSectionKey: number;
87
- tools: Map<string, SubagentToolState>;
88
- /** Child calls that started tasks: their `action.result` is only a receipt. */
89
- taskCallIds: Set<string>;
90
- };
91
- export type SubagentStepUpdate = {
92
- callId: string;
93
- subagentName: string;
94
- sectionKey: number;
95
- reasoning: string;
96
- message: string;
97
- finalized: boolean;
98
- };
99
- export type SubagentToolUpdate = {
100
- callId: string;
101
- subagentName: string;
102
- childCallId: string;
103
- toolName: string;
104
- input: unknown;
105
- status: SubagentToolStatus;
106
- output?: unknown;
107
- errorText?: string;
108
- /** The tool's own label copy, when it defines one. */
109
- label?: string;
110
- /** The call started an agent task, so it reads as a delegation. */
111
- agentTask?: boolean;
112
- };
113
- export interface SubagentPumpOptions {
114
- client?: Client;
115
- view?: SubagentView;
116
- formatActionResultError: (event: ActionResultStreamEvent) => string;
117
- /** Runs TUI-owned handling after a child tool result becomes visible. */
118
- onToolCompleted?: (subagentName: string, toolName: string, output: unknown) => Promise<void>;
119
- }
120
- export declare class SubagentPump {
121
- #private;
122
- constructor(options: SubagentPumpOptions);
123
- /** A call started or reached a task. A call to an agent task starts following it at once. */
124
- taskStarted(event: TaskStartedStreamEvent, parentSessionId: string | undefined): void;
125
- /**
126
- * A run opened a session. The session an agent task opens is its agent's;
127
- * sessions other tools open are not followed.
128
- */
129
- agentStarted(started: AgentStartedStreamEvent, parentSessionId: string | undefined): void;
130
- abortAll(): void;
131
- /** Settles and aborts the descendants of the cancelled parent turn. */
132
- settleCancelledTurn(turnId: string): void;
133
- }
134
- export {};
@@ -1 +0,0 @@
1
- import{isTaskControlTool,isTaskRetryRefusal}from"#protocol/task-tools.js";import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";const childStreamReconnectPolicy={streamIdleReconnectPolicy:{maxAttempts:1/0},streamOpenReconnectPolicy:{maxAttempts:1/0}};var SubagentPump=class{#e;#t;#n;#r;#i=new Map;#a=new Map;#o=new Map;#s=new Map;#c=new Map;#l=new Map;constructor(e){this.#e=e.client,this.#t=e.view,this.#n=e.formatActionResultError,this.#r=e.onToolCompleted}taskStarted(e,t){let{callId:n,kind:r,taskId:i,turnId:a}=e.data;if(r!==`agent`)return;let o=this.#a.get(i);if(o===void 0){this.#a.set(i,{});return}o.started!==void 0&&t!==void 0&&this.#u({callId:n,parentSessionId:t,parentTurnId:a,started:o.started})}agentStarted(e,t){let{callId:n,taskId:r,turnId:i}=e.data,a=r===void 0?void 0:this.#a.get(r);a!==void 0&&(a.started??=e,t!==void 0&&this.#u({callId:n,parentSessionId:t,parentTurnId:i,started:a.started}))}#u(e){let{callId:t,started:n}=e,r=this.#i.get(t);r===void 0?this.#i.set(t,{name:n.data.name,childSessionId:n.data.sessionId,parentSessionId:e.parentSessionId,parentTurnId:e.parentTurnId,done:!1,started:n,steps:new Map,currentSectionKey:null,nextSectionKey:0,tools:new Map,taskCallIds:new Set}):r.name=n.data.name,this.#t?.markChildToolCallId(t),r===void 0&&(this.#t?.begin({callId:t}),this.#d(t))}abortAll(){for(let e of this.#o.values())e.abort();this.#o.clear(),this.#i.clear(),this.#a.clear(),this.#s.clear(),this.#c.clear(),this.#l.clear()}settleCancelledTurn(e){for(let[t,n]of this.#i)n.parentTurnId===e&&(this.#h(t),this.#o.get(t)?.abort(),this.#o.delete(t))}#d(e){let t=this.#i.get(e);if(t===void 0||t.done)return;let n=this.#c.get(t.childSessionId);if(n===void 0){this.#c.set(t.childSessionId,e),this.#f(e);return}if(n===e)return;let r=this.#l.get(t.childSessionId)??[];r.includes(e)||r.push(e),this.#l.set(t.childSessionId,r)}#f(e){if(this.#o.has(e))return;let t=this.#e;if(!t)return;let n=this.#i.get(e);if(n===void 0||n.done)return;let r=new AbortController;this.#o.set(e,r),(async()=>{let{childSessionId:i}=n,a=this.#s.get(i)??0;try{let o=t.sessions.attach(n.parentSessionId).agent(n.started).stream({signal:r.signal,startIndex:a,streamReconnectPolicy:childStreamReconnectPolicy});for await(let t of o){if(r.signal.aborted)return;this.#s.set(i,a+=1);let o=this.#v(e,t);if(o!==void 0&&await o,isCurrentTurnBoundaryEvent(t)&&!(t.type===`session.waiting`&&hasPendingChildApproval(n))){this.#h(e);return}}}catch{r.signal.aborted||this.#t?.end({callId:e})}finally{r.abort(),this.#o.get(e)===r&&this.#o.delete(e)}})()}#p(e,t,n){let r=t.tools.get(n.childCallId),i=r??{toolName:n.toolName,input:n.input,status:n.status};if(n.label!==void 0&&(i.label=n.label),r){let e=r.status===`done`||r.status===`failed`||r.status===`rejected`;if(n.status===`approval-requested`&&!e)r.status=n.status;else{let e={preparing:0,"approval-requested":1,executing:2,done:3,failed:3,rejected:3};e[n.status]>e[r.status]&&(r.status=n.status)}n.input!==void 0&&(r.input=n.input)}else t.tools.set(n.childCallId,i);this.#t?.markChildToolCallId(n.childCallId),this.#m(e,t,n.childCallId,i)}#m(e,t,n,r){let i={callId:e,subagentName:t.name,childCallId:n,toolName:r.toolName,input:r.input,status:r.status};r.output!==void 0&&(i.output=r.output),r.errorText!==void 0&&(i.errorText=r.errorText),r.label!==void 0&&(i.label=r.label),r.agentTask===!0&&(i.agentTask=!0),this.#t?.upsertTool(i)}#h(e){let t=this.#i.get(e);if(t&&!t.done){t.done=!0;for(let[n,r]of t.steps)r.finalized||(r.finalized=!0,this.#t?.upsertStep({callId:e,subagentName:t.name,sectionKey:n,reasoning:r.reasoning,message:r.message,finalized:!0}));t.currentSectionKey=null,this.#_(e,t),this.#t?.end({callId:e}),this.#g(e,t.childSessionId)}}#g(e,t){let n=(this.#l.get(t)??[]).filter(t=>t!==e);if(this.#c.get(t)!==e){n.length===0?this.#l.delete(t):this.#l.set(t,n);return}for(this.#c.delete(t);n.length>0;){let e=n.shift(),r=this.#i.get(e);if(!(r===void 0||r.done)){n.length===0?this.#l.delete(t):this.#l.set(t,n),this.#c.set(t,e),this.#f(e);return}}this.#l.delete(t)}#_(e,t){for(let[n,r]of t.tools)r.status===`preparing`&&(t.tools.delete(n),this.#t?.removeTool({callId:e,childCallId:n}))}#v(e,t){let n=this.#i.get(e);if(!n)return;let r=this.#t,emit=(t,i)=>{r?.upsertStep({callId:e,subagentName:n.name,sectionKey:t,reasoning:i.reasoning,message:i.message,finalized:i.finalized})},finalizeCurrent=()=>{if(n.currentSectionKey===null)return;let e=n.steps.get(n.currentSectionKey);e&&(e.finalized=!0,emit(n.currentSectionKey,e)),n.currentSectionKey=null};switch(t.type){case`reasoning.appended`:{let{key:e,step:r}=openCurrentSubagentSection(n);r.reasoning+=t.data.reasoningDelta,emit(e,r);break}case`reasoning.completed`:break;case`message.appended`:{let{key:e,step:r}=openCurrentSubagentSection(n);r.message+=t.data.messageDelta,emit(e,r);break}case`message.completed`:{let{key:e,step:r}=openCurrentSubagentSection(n);r.message.length===0&&(r.message=t.data.message),r.finalized=!0,emit(e,r),n.currentSectionKey=null;break}case`step.completed`:finalizeCurrent(),this.#_(e,n);break;case`action.input.appended`:{let{callId:r,toolName:i}=t.data;if(n.tools.has(r)||isTaskControlTool(i))break;this.#p(e,n,{childCallId:r,toolName:i,input:void 0,status:`preparing`});break}case`actions.requested`:finalizeCurrent();for(let r of t.data.actions)r.kind!==`tool-call`||isTaskControlTool(r.toolName)||r.parentCallId===void 0&&this.#p(e,n,{childCallId:r.callId,toolName:r.toolName,input:r.input,status:`executing`,...labelOf(t.data.presentation,r.callId)});break;case`input.requested`:finalizeCurrent();for(let r of t.data.requests)r.action.kind===`tool-call`&&(isTaskControlTool(r.action.toolName)||this.#p(e,n,{childCallId:r.action.callId,toolName:r.action.toolName,input:r.action.input,status:`approval-requested`}));break;case`action.result`:{let i=t.data.result;if(i.kind!==`tool-result`||n.taskCallIds.has(i.callId))break;let a=n.tools.get(i.callId);if(!a)break;if(isTaskRetryRefusal(t)){n.tools.delete(i.callId),r?.removeTool({callId:e,childCallId:i.callId,reason:this.#n(t)});break}let o=labelOf(t.data.presentation,i.callId).label;switch(o!==void 0&&(a.label=o),t.data.status){case`completed`:a.status=`done`,a.output=i.output;break;case`failed`:a.status=`failed`,a.errorText=this.#n(t);break;case`rejected`:a.status=`rejected`,a.errorText=this.#n(t)}if(this.#m(e,n,i.callId,a),t.data.status===`completed`)return this.#r?.(n.name,a.toolName,i.output);break}case`task.started`:{n.taskCallIds.add(t.data.callId);let r=n.tools.get(t.data.callId);if(r===void 0||t.data.kind!==`agent`)break;r.agentTask=!0,this.#m(e,n,t.data.callId,r);break}case`task.settled`:{let r=n.tools.get(t.data.callId);if(r===void 0)break;switch(t.data.status){case`completed`:r.status=`done`,t.data.output!==void 0&&(r.output=t.data.output);break;case`failed`:r.status=`failed`,r.errorText=t.data.error?.message??`Failed.`;break;case`cancelled`:r.status=`rejected`,r.errorText=`Stopped.`}this.#m(e,n,t.data.callId,r);break}}}};function labelOf(e,t){let n=e?.[t]?.label;return n===void 0?{}:{label:n}}function hasPendingChildApproval(e){return[...e.tools.values()].some(e=>e.status===`approval-requested`)}function openCurrentSubagentSection(e){e.currentSectionKey===null&&(e.currentSectionKey=e.nextSectionKey++,e.steps.set(e.currentSectionKey,{reasoning:``,message:``,finalized:!1}));let t=e.steps.get(e.currentSectionKey);if(!t)throw Error(`invariant: subagent section state missing for current key`);return{key:e.currentSectionKey,step:t}}export{SubagentPump};
@@ -1,25 +0,0 @@
1
- import { type ChildProcess } from "node:child_process";
2
- export declare const EVE_BASE_URL_ENV = "EVE_BASE_URL";
3
- interface EveProcessHandle {
4
- readonly origin: string;
5
- readonly process?: ChildProcess;
6
- }
7
- interface EveDevServerRegistry {
8
- readonly appRoot: string;
9
- readonly origin: string;
10
- readonly pid: number | null;
11
- readonly updatedAt: string;
12
- }
13
- /**
14
- * Parse and validate a persisted dev-server registry record. Returns
15
- * `undefined` for anything that is not a well-formed registry so callers fall
16
- * back to spawning a fresh server.
17
- */
18
- export declare function normalizeDevServerRegistry(value: unknown): EveDevServerRegistry | undefined;
19
- /**
20
- * Resolve a shared eve dev server for {@link appRoot}, reusing a healthy
21
- * registered server when one exists and otherwise spawning a new one behind a
22
- * cross-process lock so concurrent Nuxt processes don't each boot eve.
23
- */
24
- export declare function resolveSharedEveDevServer(appRoot: string): Promise<EveProcessHandle>;
25
- export {};
@@ -1 +0,0 @@
1
- import{normalizeOrigin}from"./routing.js";import{mkdir,open,readFile,rm,stat,writeFile}from"node:fs/promises";import{resolvePackageRoot}from"#internal/application/package.js";import{join}from"node:path";import{spawn}from"node:child_process";import{readDevelopmentRuntimeArtifactsRevision}from"#services/dev-client/runtime-artifacts.js";const EVE_BASE_URL_ENV=`EVE_BASE_URL`,DEFAULT_SERVER_READY_TIMEOUT_MS=3e4,DEV_SERVER_REGISTRY_TIMEOUT_MS=3e4,LOCAL_SERVER_URL_PATTERN=/https?:\/\/(?:\[[^\]\s]+\]|[^\s/:[\]]+)(?::\d+)?/;function isNodeErrorWithCode(e,t){return e instanceof Error&&`code`in e&&e.code===t}function delay(e){return new Promise(t=>setTimeout(t,e))}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function resolveEveCacheDirectory(e){return join(e,`.eve`)}function resolveEveDevServerRegistryPath(e){return join(resolveEveCacheDirectory(e),`nuxt-dev-server.json`)}function resolveEveDevServerLockPath(e){return join(resolveEveCacheDirectory(e),`nuxt-dev-server.lock`)}function normalizeDevServerRegistry(e){if(isRecord(e)&&typeof e.appRoot==`string`&&typeof e.origin==`string`&&typeof e.updatedAt==`string`&&(e.pid===null||typeof e.pid==`number`))try{return{appRoot:e.appRoot,origin:normalizeOrigin(e.origin),pid:e.pid,updatedAt:e.updatedAt}}catch{return}}async function readUsableEveDevServerRegistry(e){try{let t=normalizeDevServerRegistry(JSON.parse(await readFile(resolveEveDevServerRegistryPath(e),`utf8`)));return t===void 0||t.appRoot!==e||await readDevelopmentRuntimeArtifactsRevision({serverUrl:t.origin,timeoutMs:1e3})===void 0?void 0:t.origin}catch(e){if(isNodeErrorWithCode(e,`ENOENT`))return;throw e}}async function writeEveDevServerRegistry(e,t){await mkdir(resolveEveCacheDirectory(e),{recursive:!0}),await writeFile(resolveEveDevServerRegistryPath(e),`${JSON.stringify({appRoot:e,origin:t.origin,pid:t.process?.pid??null,updatedAt:new Date().toISOString()},null,2)}\n`)}async function removeStaleEveDevServerLock(e){try{let t=await stat(e);Date.now()-t.mtimeMs>3e4&&await rm(e,{force:!0})}catch(e){if(!isNodeErrorWithCode(e,`ENOENT`))throw e}}async function acquireEveDevServerLock(e){let t=resolveEveCacheDirectory(e),n=resolveEveDevServerLockPath(e),r=Date.now()+DEV_SERVER_REGISTRY_TIMEOUT_MS;for(await mkdir(t,{recursive:!0});;)try{let e=await open(n,`wx`);return await e.writeFile(`${String(process.pid)}\n`),await e.close(),async()=>{await rm(n,{force:!0})}}catch(t){if(!isNodeErrorWithCode(t,`EEXIST`))throw t;if(await readUsableEveDevServerRegistry(e)!==void 0)return async()=>{};if(await removeStaleEveDevServerLock(n),Date.now()>r)throw Error(`Timed out after ${DEV_SERVER_REGISTRY_TIMEOUT_MS}ms waiting for another Nuxt process to start eve.`);await delay(100)}}function createEveBinaryPath(){return join(resolvePackageRoot(),`bin`,`eve.js`)}function startServerProcess(e){return new Promise((t,n)=>{let r=spawn(e.command,e.args,{cwd:e.cwd,env:{...process.env,...e.env},stdio:[`ignore`,`pipe`,`pipe`]}),i=setTimeout(()=>{r.kill(),n(Error(`Timed out after ${DEFAULT_SERVER_READY_TIMEOUT_MS}ms waiting for eve to print its server URL.`))},DEFAULT_SERVER_READY_TIMEOUT_MS),cleanup=()=>{clearTimeout(i),r.off(`error`,handleError),r.off(`exit`,handleEarlyExit)},handleError=e=>{cleanup(),n(e)},handleEarlyExit=(e,t)=>{cleanup(),n(Error(`eve server process exited before printing its server URL (code ${String(e)}, signal ${String(t)}).`))},a=!1,handleOutput=e=>{if(a)return;let n=LOCAL_SERVER_URL_PATTERN.exec(e.toString(`utf8`));n!==null&&(a=!0,cleanup(),t({origin:normalizeOrigin(n[0]),process:r}))};r.once(`error`,handleError),r.once(`exit`,handleEarlyExit),r.stdout.on(`data`,e=>{process.stdout.write(e),handleOutput(e)}),r.stderr.on(`data`,e=>{process.stderr.write(e),handleOutput(e)})})}function installProcessShutdown(e){let t=e.process;if(t===void 0)return e;let close=()=>{process.off(`beforeExit`,close),process.off(`exit`,close),t.killed||t.kill()};return process.once(`beforeExit`,close),process.once(`exit`,close),e}function startEveDevServer(e){return startServerProcess({args:[createEveBinaryPath(),`dev`,`--no-ui`,`--port`,`0`],command:process.execPath,cwd:e}).then(e=>(process.env[EVE_BASE_URL_ENV]=e.origin,installProcessShutdown(e)))}async function resolveSharedEveDevServer(e){let t=await readUsableEveDevServerRegistry(e);if(t!==void 0)return process.env[EVE_BASE_URL_ENV]=t,{origin:t};let n=await acquireEveDevServerLock(e);try{let t=await readUsableEveDevServerRegistry(e);if(t!==void 0)return process.env[EVE_BASE_URL_ENV]=t,{origin:t};let n=await startEveDevServer(e);return await writeEveDevServerRegistry(e,n),n}finally{await n()}}export{EVE_BASE_URL_ENV,normalizeDevServerRegistry,resolveSharedEveDevServer};