eve 0.66.2 → 0.67.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 (398) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/src/channel/channel-address.d.ts +0 -2
  3. package/dist/src/channel/channel-address.js +1 -1
  4. package/dist/src/channel/channel-operations.d.ts +0 -5
  5. package/dist/src/channel/channel-operations.js +1 -1
  6. package/dist/src/channel/compiled-channel.d.ts +8 -0
  7. package/dist/src/channel/compiled-channel.js +2 -2
  8. package/dist/src/channel/conversation-context.js +1 -1
  9. package/dist/src/channel/routes.d.ts +1 -2
  10. package/dist/src/channel/schedule.d.ts +2 -2
  11. package/dist/src/channel/schedule.js +1 -1
  12. package/dist/src/channel/types.d.ts +8 -13
  13. package/dist/src/chunks/{use-eve-agent-PbSMyJ6e.js → use-eve-agent-DzdyI97Z.js} +0 -5
  14. package/dist/src/chunks/{use-eve-agent-Di1u2zKu.js → use-eve-agent-OCHP4s0z.js} +0 -5
  15. package/dist/src/cli/acp/command.js +3 -3
  16. package/dist/src/cli/commands/logs.d.ts +3 -3
  17. package/dist/src/cli/commands/logs.js +1 -1
  18. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  19. package/dist/src/cli/commands/registry-declared-setups.d.ts +0 -1
  20. package/dist/src/cli/commands/registry-declared-setups.js +1 -1
  21. package/dist/src/cli/commands/registry.d.ts +5 -1
  22. package/dist/src/cli/commands/registry.js +1 -1
  23. package/dist/src/cli/commands/trace.js +1 -1
  24. package/dist/src/cli/dev/command.d.ts +9 -5
  25. package/dist/src/cli/dev/command.js +1 -3
  26. package/dist/src/cli/dev/run-interactive-ui.d.ts +0 -1
  27. package/dist/src/cli/dev/run-interactive-ui.js +1 -1
  28. package/dist/src/cli/dev/tui/argument-typeahead.d.ts +1 -2
  29. package/dist/src/cli/dev/tui/argument-typeahead.js +2 -2
  30. package/dist/src/cli/dev/tui/blocks.d.ts +5 -1
  31. package/dist/src/cli/dev/tui/blocks.js +4 -4
  32. package/dist/src/cli/dev/tui/flow-drawer.d.ts +11 -0
  33. package/dist/src/cli/dev/tui/flow-drawer.js +1 -0
  34. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  35. package/dist/src/cli/dev/tui/prompt-commands.d.ts +199 -0
  36. package/dist/src/cli/dev/tui/prompt-commands.js +2 -2
  37. package/dist/src/cli/dev/tui/question-panel.d.ts +4 -4
  38. package/dist/src/cli/dev/tui/question-panel.js +1 -1
  39. package/dist/src/cli/dev/tui/registry-result-message.d.ts +15 -4
  40. package/dist/src/cli/dev/tui/registry-result-message.js +4 -4
  41. package/dist/src/cli/dev/tui/runner.d.ts +18 -6
  42. package/dist/src/cli/dev/tui/runner.js +3 -2
  43. package/dist/src/cli/dev/tui/setup-commands.d.ts +5 -22
  44. package/dist/src/cli/dev/tui/setup-commands.js +2 -1
  45. package/dist/src/cli/dev/tui/setup-flow.d.ts +2 -10
  46. package/dist/src/cli/dev/tui/setup-panel.d.ts +4 -23
  47. package/dist/src/cli/dev/tui/setup-panel.js +3 -3
  48. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +11 -7
  49. package/dist/src/cli/dev/tui/terminal-renderer.js +11 -11
  50. package/dist/src/cli/dev/tui/theme.d.ts +1 -1
  51. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  52. package/dist/src/cli/dev/tui/tui.js +1 -1
  53. package/dist/src/cli/dev/url-target.js +1 -1
  54. package/dist/src/cli/invoke/command.d.ts +2 -5
  55. package/dist/src/cli/invoke/command.js +1 -1
  56. package/dist/src/cli/invoke/invoke.d.ts +2 -2
  57. package/dist/src/cli/invoke/invoke.js +1 -1
  58. package/dist/src/cli/invoke/result.d.ts +14 -194
  59. package/dist/src/cli/invoke/result.js +1 -1
  60. package/dist/src/cli/run.d.ts +0 -4
  61. package/dist/src/cli/run.js +2 -2
  62. package/dist/src/cli/telemetry/index.js +1 -1
  63. package/dist/src/client/message-reducer.js +1 -1
  64. package/dist/src/compiled/.vendor-stamp.json +6 -6
  65. package/dist/src/compiled/@workflow/core/create-hook.d.ts +38 -1
  66. package/dist/src/compiled/@workflow/core/global.d.ts +2 -0
  67. package/dist/src/compiled/@workflow/core/index.js +2 -2
  68. package/dist/src/compiled/@workflow/core/private.js +1 -1
  69. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +9 -0
  70. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  71. package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +89 -0
  72. package/dist/src/compiled/@workflow/core/runtime/open-hook-wait-state.d.ts +55 -0
  73. package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +2 -0
  74. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +8 -1
  75. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  76. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +8 -0
  77. package/dist/src/compiled/@workflow/core/serialization.d.ts +8 -0
  78. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  79. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  80. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  81. package/dist/src/compiled/@workflow/errors/index.d.ts +23 -0
  82. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  83. package/dist/src/compiled/@workflow/world/events.d.ts +34 -0
  84. package/dist/src/compiled/@workflow/world/hooks.d.ts +27 -0
  85. package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
  86. package/dist/src/compiled/@workflow/world/interfaces.d.ts +24 -0
  87. package/dist/src/compiled/@workflow/world/spec-version.d.ts +32 -11
  88. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  89. package/dist/src/compiled/@workflow/world-vercel/index.js +17 -17
  90. package/dist/src/compiled/_chunks/workflow/{attribute-changes-89Nwz7XW.js → attribute-changes-DzJovO_f.js} +1 -1
  91. package/dist/src/compiled/_chunks/workflow/dist-BQSf8Hax.js +1 -0
  92. package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +3 -0
  93. package/dist/src/compiled/_chunks/workflow/frames-qKc30rjg.js +3 -0
  94. package/dist/src/compiled/_chunks/workflow/{global-DIlFoH2w.js → global-BQnKzRXo.js} +1 -1
  95. package/dist/src/compiled/_chunks/workflow/{helpers-k3zcudWr.js → helpers-CNMO7zB1.js} +1 -1
  96. package/dist/src/compiled/_chunks/workflow/{logger-Bzc8jWWj.js → logger-BCEj9caG.js} +1 -1
  97. package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +1 -0
  98. package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +1 -0
  99. package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +3 -0
  100. package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +1 -0
  101. package/dist/src/compiled/_chunks/workflow/{wait-until-DXLZx3tU.js → wait-until-Bo2U6ON9.js} +1 -1
  102. package/dist/src/compiled/_chunks/workflow/{ws-transport-BSM_Cl7a.js → ws-transport-BrsMYqJg.js} +1 -1
  103. package/dist/src/compiler/compile-from-memory.d.ts +0 -1
  104. package/dist/src/compiler/compile-from-memory.js +1 -1
  105. package/dist/src/compiler/extension-compatibility.d.ts +25 -18
  106. package/dist/src/compiler/extension-compatibility.js +1 -1
  107. package/dist/src/compiler/manifest.d.ts +48 -14
  108. package/dist/src/compiler/manifest.js +1 -1
  109. package/dist/src/compiler/normalize-agent-config.js +1 -1
  110. package/dist/src/compiler/normalize-channel.js +1 -1
  111. package/dist/src/compiler/normalize-connection.js +1 -1
  112. package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
  113. package/dist/src/compiler/normalize-subagent.d.ts +0 -2
  114. package/dist/src/compiler/normalize-subagent.js +1 -1
  115. package/dist/src/compiler/remote-agent-node.d.ts +0 -2
  116. package/dist/src/compiler/remote-agent-node.js +1 -1
  117. package/dist/src/compiler/workspace-resources.js +1 -1
  118. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  119. package/dist/src/context/keys.d.ts +0 -3
  120. package/dist/src/context/keys.js +1 -1
  121. package/dist/src/context/memory-lifecycle.d.ts +1 -0
  122. package/dist/src/context/memory-lifecycle.js +1 -1
  123. package/dist/src/discover/project.js +1 -1
  124. package/dist/src/eve-channel/create-request.d.ts +0 -3
  125. package/dist/src/eve-channel/create-request.js +1 -1
  126. package/dist/src/eve-channel/index.js +1 -1
  127. package/dist/src/eve-channel/request.js +1 -1
  128. package/dist/src/eve-channel/types.d.ts +1 -1
  129. package/dist/src/execution/delegated-session-context.d.ts +2 -0
  130. package/dist/src/execution/delegated-session-context.js +1 -0
  131. package/dist/src/execution/dynamic-connections.d.ts +4 -1
  132. package/dist/src/execution/dynamic-connections.js +1 -1
  133. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  134. package/dist/src/execution/effective-agent-config.js +1 -1
  135. package/dist/src/execution/legacy-session/input.d.ts +0 -2
  136. package/dist/src/execution/legacy-session/input.js +1 -1
  137. package/dist/src/execution/legacy-session/prepare-step.d.ts +0 -1
  138. package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
  139. package/dist/src/execution/node-step.d.ts +4 -2
  140. package/dist/src/execution/node-step.js +1 -1
  141. package/dist/src/execution/proxied-deliver-step.js +1 -1
  142. package/dist/src/execution/publish-channel-event.d.ts +23 -0
  143. package/dist/src/execution/publish-channel-event.js +1 -0
  144. package/dist/src/execution/runtime-context.js +1 -1
  145. package/dist/src/execution/session/entry-input.d.ts +4 -0
  146. package/dist/src/execution/session/entry-input.js +1 -1
  147. package/dist/src/execution/session/entry.js +1 -1
  148. package/dist/src/execution/session/event-sink.d.ts +1 -1
  149. package/dist/src/execution/session/event-sink.js +1 -1
  150. package/dist/src/execution/session/finalization.d.ts +1 -4
  151. package/dist/src/execution/session/finalization.js +1 -1
  152. package/dist/src/execution/session/handoff.d.ts +1 -3
  153. package/dist/src/execution/session/handoff.js +1 -1
  154. package/dist/src/execution/session/input-queue.d.ts +0 -1
  155. package/dist/src/execution/session/input-queue.js +1 -1
  156. package/dist/src/execution/session/next-input.d.ts +0 -1
  157. package/dist/src/execution/session/next-input.js +1 -1
  158. package/dist/src/execution/session/program.d.ts +0 -3
  159. package/dist/src/execution/session/program.js +1 -1
  160. package/dist/src/execution/session/turn-step-result.d.ts +1 -2
  161. package/dist/src/execution/session/turn-step-result.js +1 -1
  162. package/dist/src/execution/session/turn-step.js +1 -1
  163. package/dist/src/execution/session/turn.d.ts +2 -2
  164. package/dist/src/execution/session/turn.js +1 -1
  165. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  166. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  167. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  168. package/dist/src/execution/tools/agent-router.d.ts +0 -2
  169. package/dist/src/execution/tools/agent-router.js +1 -1
  170. package/dist/src/execution/tools/ask-question-workflow.js +1 -1
  171. package/dist/src/execution/tools/connection-search.d.ts +1 -0
  172. package/dist/src/execution/tools/connection-search.js +1 -1
  173. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  174. package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
  175. package/dist/src/execution/workflow-runtime.js +1 -1
  176. package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
  177. package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
  178. package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
  179. package/dist/src/framework/sources/registry.js +1 -1
  180. package/dist/src/harness/approval-delivery-coordinator.d.ts +3 -13
  181. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  182. package/dist/src/harness/emission.d.ts +2 -3
  183. package/dist/src/harness/emission.js +1 -1
  184. package/dist/src/harness/input-request-resolution.d.ts +2 -0
  185. package/dist/src/harness/input-request-resolution.js +1 -1
  186. package/dist/src/harness/input-requests.d.ts +3 -3
  187. package/dist/src/harness/input-requests.js +1 -1
  188. package/dist/src/harness/pending-input-batches.d.ts +3 -3
  189. package/dist/src/harness/pending-input-batches.js +1 -1
  190. package/dist/src/harness/proxy-input-requests.d.ts +2 -0
  191. package/dist/src/harness/proxy-input-requests.js +1 -1
  192. package/dist/src/harness/session-limit-enforcement.d.ts +2 -3
  193. package/dist/src/harness/session-limit-enforcement.js +1 -1
  194. package/dist/src/harness/tool-loop.js +2 -2
  195. package/dist/src/harness/tools.js +1 -1
  196. package/dist/src/harness/types.d.ts +11 -13
  197. package/dist/src/instrumentation/session-context.js +1 -1
  198. package/dist/src/instrumentation/session-init.js +1 -1
  199. package/dist/src/internal/application/package.js +1 -1
  200. package/dist/src/internal/authored-definition/core.js +1 -1
  201. package/dist/src/internal/authored-module-loader.js +1 -2
  202. package/dist/src/internal/authored-package-boundary.d.ts +0 -1
  203. package/dist/src/internal/authored-package-boundary.js +1 -1
  204. package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
  205. package/dist/src/internal/external-resources-snapshot.d.ts +46 -0
  206. package/dist/src/internal/external-resources-snapshot.js +1 -0
  207. package/dist/src/internal/external-resources.d.ts +20 -0
  208. package/dist/src/internal/external-resources.js +1 -0
  209. package/dist/src/internal/invocation/workflow-execution.d.ts +0 -2
  210. package/dist/src/internal/invocation/workflow-execution.js +1 -1
  211. package/dist/src/internal/nitro/host/build-application.js +1 -1
  212. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  213. package/dist/src/internal/nitro/host/instrumentation-entry.d.ts +3 -0
  214. package/dist/src/internal/nitro/host/instrumentation-entry.js +2 -0
  215. package/dist/src/internal/nitro/host/start-development-server.d.ts +0 -8
  216. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  217. package/dist/src/internal/nitro/host.d.ts +1 -1
  218. package/dist/src/internal/nitro/host.js +1 -1
  219. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  220. package/dist/src/internal/nitro/routes/index.js +72 -3
  221. package/dist/src/internal/workflow/development-world-client.js +1 -1
  222. package/dist/src/node_modules/.pnpm/{@vercel_cli-config@0.2.7 → @vercel_cli-config@0.3.0}/node_modules/@vercel/cli-config/dist/index.js +1 -1
  223. package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/authorization.js +1 -1
  224. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +1 -0
  225. package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/installation.js +1 -1
  226. package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/token.js +1 -1
  227. package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-util.js +1 -1
  228. package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token.js +1 -1
  229. package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/version.js +1 -1
  230. package/dist/src/protocol/message.d.ts +4 -0
  231. package/dist/src/protocol/message.js +1 -1
  232. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +0 -1
  233. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
  234. package/dist/src/public/channels/mcp.js +1 -1
  235. package/dist/src/public/channels/slack/activity-plan.d.ts +2 -1
  236. package/dist/src/public/channels/slack/activity-plan.js +1 -1
  237. package/dist/src/public/channels/slack/activity.d.ts +2 -0
  238. package/dist/src/public/channels/slack/activity.js +1 -1
  239. package/dist/src/public/channels/slack/api.d.ts +7 -0
  240. package/dist/src/public/channels/slack/api.js +1 -1
  241. package/dist/src/public/channels/slack/app-manifest.d.ts +9 -0
  242. package/dist/src/public/channels/slack/app-manifest.js +1 -0
  243. package/dist/src/public/channels/slack/attachments.d.ts +5 -2
  244. package/dist/src/public/channels/slack/attachments.js +1 -1
  245. package/dist/src/public/channels/slack/inbound-content.js +6 -3
  246. package/dist/src/public/channels/slack/index.d.ts +1 -0
  247. package/dist/src/public/channels/slack/input-response.d.ts +2 -0
  248. package/dist/src/public/channels/slack/input-response.js +1 -1
  249. package/dist/src/public/channels/slack/interaction-cards.js +1 -1
  250. package/dist/src/public/channels/slack/interactions.d.ts +2 -0
  251. package/dist/src/public/channels/slack/interactions.js +1 -1
  252. package/dist/src/public/channels/slack/slackChannel.d.ts +7 -1
  253. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  254. package/dist/src/public/channels/slack/slash-command.d.ts +5 -1
  255. package/dist/src/public/channels/slack/slash-command.js +1 -1
  256. package/dist/src/public/channels/slack/transport.d.ts +76 -0
  257. package/dist/src/public/channels/slack/transport.js +1 -0
  258. package/dist/src/public/definitions/remote-agent.d.ts +0 -9
  259. package/dist/src/public/definitions/workspace-agent.d.ts +0 -3
  260. package/dist/src/public/definitions/workspace-agent.js +1 -1
  261. package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
  262. package/dist/src/runtime/agent/bootstrap.js +1 -1
  263. package/dist/src/runtime/connections/mcp-client.js +1 -1
  264. package/dist/src/runtime/connections/mcp-tracing.d.ts +27 -0
  265. package/dist/src/runtime/connections/mcp-tracing.js +1 -0
  266. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  267. package/dist/src/runtime/resolve-agent.js +1 -1
  268. package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +0 -2
  269. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  270. package/dist/src/runtime/subagents/dynamic-remote-agent-config.d.ts +0 -2
  271. package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
  272. package/dist/src/runtime/types.d.ts +1 -2
  273. package/dist/src/services/dev-client/vercel-auth-error.d.ts +1 -1
  274. package/dist/src/setup/cli/channel-setup-prompter.d.ts +2 -9
  275. package/dist/src/setup/cli/channel-setup-prompter.js +1 -1
  276. package/dist/src/setup/cli/index.d.ts +1 -1
  277. package/dist/src/setup/connection-connector.js +1 -1
  278. package/dist/src/setup/flows/model-login-connection.d.ts +0 -16
  279. package/dist/src/setup/flows/model-login-connection.js +1 -1
  280. package/dist/src/setup/flows/model-login-options.d.ts +59 -0
  281. package/dist/src/setup/flows/model-login-options.js +1 -0
  282. package/dist/src/setup/flows/model-login.js +1 -1
  283. package/dist/src/setup/flows/model-source-change.d.ts +0 -2
  284. package/dist/src/setup/flows/model-source-change.js +1 -1
  285. package/dist/src/setup/flows/registry-session.d.ts +15 -13
  286. package/dist/src/setup/flows/registry-session.js +1 -1
  287. package/dist/src/setup/flows/registry.js +1 -1
  288. package/dist/src/setup/flows/vercel-model-login.js +1 -1
  289. package/dist/src/setup/integrations/photon/setup-flow.js +1 -1
  290. package/dist/src/setup/prompter.d.ts +2 -2
  291. package/dist/src/setup/registry-setup-client.js +1 -1
  292. package/dist/src/setup/registry-setup-protocol.d.ts +0 -4
  293. package/dist/src/setup/scaffold/create/project.js +1 -1
  294. package/dist/src/setup/slack-connect-lifecycle.js +1 -1
  295. package/dist/src/setup/verified-remote-agent.d.ts +1 -0
  296. package/dist/src/setup/verified-remote-agent.js +1 -1
  297. package/dist/src/shared/action-types.d.ts +2 -2
  298. package/dist/src/shared/agent-definition.d.ts +0 -9
  299. package/dist/src/shared/agent-turn-outcome.d.ts +1 -1
  300. package/dist/src/shared/channel-definition.d.ts +2 -2
  301. package/dist/src/shared/conversation-context.d.ts +0 -4
  302. package/dist/src/shared/conversation-context.js +1 -1
  303. package/dist/src/shared/validate-authorization.js +1 -1
  304. package/dist/src/shared/vercel-connect-metadata.d.ts +12 -0
  305. package/dist/src/shared/vercel-connect-metadata.js +1 -0
  306. package/dist/src/subagents/agent-handle-errors.d.ts +0 -4
  307. package/dist/src/subagents/agent-handle-errors.js +1 -1
  308. package/dist/src/subagents/callback-route.js +1 -1
  309. package/dist/src/subagents/callback-step.d.ts +0 -22
  310. package/dist/src/subagents/callback-step.js +1 -1
  311. package/dist/src/subagents/event-proxy-step.js +1 -1
  312. package/dist/src/subagents/hitl-proxy.d.ts +3 -5
  313. package/dist/src/subagents/hitl-proxy.js +1 -1
  314. package/dist/src/subagents/invocation.d.ts +5 -6
  315. package/dist/src/subagents/parent-notification.d.ts +1 -18
  316. package/dist/src/subagents/parent-notification.js +1 -1
  317. package/dist/src/subagents/remote-dispatch.js +1 -1
  318. package/dist/src/subagents/tool.d.ts +0 -3
  319. package/dist/src/subagents/tool.js +1 -1
  320. package/dist/src/svelte/index.js +1 -1
  321. package/dist/src/svelte/use-eve-agent.js +1 -1
  322. package/dist/src/tools/framework/agent-contract.d.ts +0 -2
  323. package/dist/src/tools/framework/agent-contract.js +1 -1
  324. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  325. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  326. package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
  327. package/dist/src/tracing/agent-otel-provider.js +2 -2
  328. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  329. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  330. package/dist/src/tracing/agent-tool-span-context.d.ts +15 -0
  331. package/dist/src/tracing/agent-tool-span-context.js +1 -0
  332. package/dist/src/tracing/otel-declaration.d.ts +4 -9
  333. package/dist/src/vue/index.js +1 -1
  334. package/dist/src/vue/use-eve-agent.js +1 -1
  335. package/docs/agent-config.md +12 -13
  336. package/docs/channels/chat-sdk.mdx +1 -1
  337. package/docs/channels/custom.mdx +1 -1
  338. package/docs/channels/eve.mdx +4 -4
  339. package/docs/channels/mcp.mdx +10 -10
  340. package/docs/channels/slack.mdx +32 -3
  341. package/docs/concepts/sessions-runs-and-streaming.md +5 -6
  342. package/docs/connections/overview.mdx +22 -0
  343. package/docs/guides/deployment/overview.md +1 -1
  344. package/docs/guides/deployment/self-hosting.md +1 -1
  345. package/docs/guides/deployment/vercel.mdx +2 -2
  346. package/docs/guides/dev-tui.md +7 -7
  347. package/docs/guides/dynamic-capabilities.md +2 -2
  348. package/docs/guides/frontend/overview.mdx +5 -3
  349. package/docs/guides/hooks.md +4 -2
  350. package/docs/guides/instrumentation/agent-runs.mdx +7 -7
  351. package/docs/guides/instrumentation/instrumentation.mdx +22 -5
  352. package/docs/guides/instrumentation/otel.mdx +30 -0
  353. package/docs/guides/remote-agents.md +3 -4
  354. package/docs/guides/self-modification.md +1 -1
  355. package/docs/memory/custom-provider.md +1 -1
  356. package/docs/protocols/acp.md +1 -1
  357. package/docs/reference/cli.md +91 -97
  358. package/docs/schedules.mdx +4 -5
  359. package/docs/subagents/index.mdx +5 -7
  360. package/docs/tools/human-in-the-loop.md +4 -0
  361. package/docs/tools/overview.mdx +2 -0
  362. package/docs/tools/workflows.mdx +1 -1
  363. package/docs/tutorial/remember-definitions.mdx +1 -1
  364. package/docs/tutorial/ship-it.mdx +1 -1
  365. package/package.json +8 -7
  366. package/dist/src/cli/commands/channels.d.ts +0 -9
  367. package/dist/src/cli/commands/channels.js +0 -1
  368. package/dist/src/compiled/_chunks/workflow/dist-CNT2vjZ4.js +0 -1
  369. package/dist/src/compiled/_chunks/workflow/dist-DtXwQbZr.js +0 -3
  370. package/dist/src/compiled/_chunks/workflow/frames-DnrfSd1P.js +0 -3
  371. package/dist/src/compiled/_chunks/workflow/resume-hook-BmJ263ZR.js +0 -1
  372. package/dist/src/compiled/_chunks/workflow/run-NLvREued.js +0 -1
  373. package/dist/src/compiled/_chunks/workflow/serialization-HCDeQWcR.js +0 -3
  374. package/dist/src/compiled/_chunks/workflow/sleep-Bi508qmg.js +0 -1
  375. package/dist/src/execution/effective-output-schema.d.ts +0 -22
  376. package/dist/src/execution/effective-output-schema.js +0 -1
  377. package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/connector.js +0 -1
  378. package/dist/src/public/channels/slack/api-errors.d.ts +0 -33
  379. package/dist/src/public/channels/slack/api-errors.js +0 -1
  380. package/dist/src/shared/run-mode.d.ts +0 -7
  381. package/dist/src/shared/run-mode.js +0 -1
  382. package/dist/src/subagents/parent-result.d.ts +0 -14
  383. package/dist/src/subagents/parent-result.js +0 -1
  384. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/index.js +0 -0
  385. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/base-url.js +0 -0
  386. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -0
  387. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/env.js +0 -0
  388. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -0
  389. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/auth-errors.js +0 -0
  390. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -0
  391. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-context.js +0 -0
  392. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -0
  393. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -0
  394. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/index.js +0 -0
  395. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/oauth.js +0 -0
  396. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-error.js +0 -0
  397. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-io.js +0 -0
  398. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -0
@@ -12,7 +12,7 @@ eve acp
12
12
  Without a URL, the client starts one process from the eve application root. It supervises a local development server, and closing the ACP connection stops that owned server. To bridge ACP to a deployed eve agent, pass its URL:
13
13
 
14
14
  ```sh
15
- eve acp https://agent.example.com
15
+ eve acp --url https://agent.example.com
16
16
  ```
17
17
 
18
18
  For a recognized Vercel deployment, eve verifies the exact origin and resolves a short-lived project-scoped OIDC token from the local Vercel session. Remote access requires an existing authorized Vercel session; account login runs during local deployment. Configure required Trusted Sources access in the target project before launching ACP. `VERCEL_AUTOMATION_BYPASS_SECRET` remains available for deployments configured with a Protection Bypass for Automation token.
@@ -1,37 +1,30 @@
1
1
  ---
2
2
  title: "CLI"
3
- description: "Reference for every eve CLI command: init, set, info, build, start, dev, logs, traces, link, deploy, eval, channels, extension, and telemetry."
3
+ description: "Reference for every eve CLI command."
4
4
  ---
5
5
 
6
6
  Relevant `eve` commands can run from the application root or any directory beneath it. Running `eve` with no command runs `eve init` when the current directory is not an eve project, or `eve dev` when it is.
7
7
 
8
8
  ## Commands
9
9
 
10
- | Command | Description |
11
- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
12
- | `eve` | Initialize the current directory, or start development when it is already an eve project |
13
- | `eve init [target]` | Create a new agent, or add an agent to an existing project |
14
- | `eve info` | Print the resolved application, including static instructions and discovered capabilities, routes, artifact paths, and diagnostics |
15
- | `eve build` | Compile `.eve/` artifacts and build the host output; prints the output directory |
16
- | `eve start` | Serve the built `.output/` app; prints the listening URL |
17
- | `eve dev` | Start the local dev server and open the terminal UI |
18
- | `eve dev <url>` | Connect the UI to an existing server URL (e.g. a remote deployment) instead of booting a local server |
19
- | `eve acp [url]` | Serve the local application or an existing eve server URL as a stable ACP v1 agent over stdio |
20
- | `eve logs [logid]` | Print an `eve dev` diagnostic log (the most recent when `logid` is omitted) |
21
- | `eve logs ls` | List `eve dev` diagnostic logs, most recent first |
22
- | `eve traces ls` | List locally captured agent traces, most recent first |
23
- | `eve traces [trace]` | Show a local span tree (the most recent when omitted) |
24
- | `eve telemetry <command>` | Show, enable, or disable CLI telemetry collection |
25
- | `eve link` | Link the directory to a Vercel project and pull AI Gateway credentials |
26
- | `eve deploy` | Deploy the agent to Vercel production (links first if needed) |
27
- | `eve eval` | Run evals against the local app or a remote target |
28
- | `eve channels list` | List user-authored channels |
29
- | `eve extension init [target]` | Create a new extension package |
30
- | `eve extension build` | Build the current package as an extension |
31
- | `eve set` | Change the root agent's model and reasoning effort |
32
- | `eve add <item>` | Install an item from the official or a configured shadcn registry |
33
- | `eve integration setup <kind>` | Run a built-in setup flow directly after its registry files are installed |
34
- | `eve registry <command>` | Add sources and list, search, or view registry catalog items |
10
+ | Command | Description |
11
+ | ---------------------------------------------- | ------------------------------------------------------ |
12
+ | `eve init [target]` | Create a new agent, or add one to an existing project |
13
+ | `eve dev` | Start the local development server and terminal UI |
14
+ | `eve remote connect --url <url>` | Open the terminal UI for an existing agent |
15
+ | `eve remote invoke --url <url> [prompt]` | Invoke an existing agent without a terminal UI |
16
+ | `eve remote info --url <url>` | Inspect an existing agent |
17
+ | `eve acp [url]` | Serve a local or existing agent through ACP over stdio |
18
+ | `eve info` | Inspect the local application |
19
+ | `eve set model [model] [--reasoning <effort>]` | Change model and reasoning settings |
20
+ | `eve build` / `eve start` | Build or serve the application |
21
+ | `eve logs show [logid]` / `eve logs list` | Inspect local diagnostic logs |
22
+ | `eve traces show [trace]` / `eve traces list` | Inspect local traces |
23
+ | `eve link` / `eve deploy` | Link or deploy a Vercel project |
24
+ | `eve eval` | Run evals against a local or remote target |
25
+ | `eve add [item]` / `eve registry <command>` | Install and browse registry items |
26
+ | `eve extension <command>` | Create and build extension packages |
27
+ | `eve telemetry <command>` | Manage CLI telemetry collection |
35
28
 
36
29
  When `eve build` fails on discovery errors, it prints the full diagnostics report (severity, message, source path) and the diagnostics artifact path.
37
30
 
@@ -101,19 +94,19 @@ Builds the complete agent-shaped extension tree into its configured dist root, e
101
94
  Change the root agent's AI Gateway model and reasoning effort without opening the dev TUI:
102
95
 
103
96
  ```bash
104
- eve set \
105
- --model openai/gpt-6-sol \
106
- --reasoning high
97
+ eve set model openai/gpt-6-sol --reasoning high
98
+ eve set model --reasoning medium
107
99
  ```
108
100
 
109
- Pass either flag by itself to change one setting. When you pass both, eve writes
110
- them to `agent/agent.ts` in one source edit. `--reasoning` accepts
101
+ Use `eve set model` to change the model, its reasoning effort, or both. Omit
102
+ the optional model argument to keep the current model. When you set both, eve
103
+ writes them to `agent/agent.ts` in one source edit. `--reasoning` accepts
111
104
  `provider-default`, `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`;
112
105
  `provider-default` removes the authored `reasoning` field.
113
106
 
114
107
  The command uses the same model ID validation and source editor as `/model` in
115
- the local dev TUI. It does not configure model credentials. The `--model` flag
116
- cannot rewrite models defined with `defineDynamic`, an environment expression,
108
+ the local dev TUI. It does not configure model credentials. The `model`
109
+ argument cannot rewrite models defined with `defineDynamic`, an environment expression,
117
110
  or a provider-authored SDK model; change those models in `agent.ts`.
118
111
  `--reasoning` can still update an editable root config when its model comes from
119
112
  an SDK call.
@@ -211,88 +204,99 @@ For self-hosted deployments, copy the app source, `.output/`, and installed depe
211
204
 
212
205
  ```bash
213
206
  eve dev [options]
214
- eve dev https://your-app.vercel.app
215
207
  ```
216
208
 
217
- Pass a bare URL and the UI connects to that server instead of booting a local one (same as `--url`), which lets you smoke-test a preview or production deployment. The interactive UI turns off in a non-TTY terminal.
218
-
219
- | Flag | Type | Default | Description |
220
- | ----------------------------------- | ------ | ------------------ | ----------------------------------------------------------------------------------------- |
221
- | `--host <host>` | string | all interfaces | Host interface to bind |
222
- | `--port <port>` | number | `$PORT`, then 2000 | Port to listen on |
223
- | `-u, --url <url>` | string | none | Connect to an existing server URL instead of starting one |
224
- | `-H, --header <header>` | string | none | Request header for a URL target, in `Name: value` form; repeat for multiple headers |
225
- | `--no-ui` | flag | UI on | Start the server without an interactive UI |
226
- | `--no-default-extensions` | flag | extensions on | Do not mount bundled development extensions |
227
- | `--name <name>` | string | app folder name | Title shown in the terminal UI |
228
- | `--input <text>` | string | none | Pre-fill the prompt input |
229
- | `--tools <mode>` | enum | `auto-collapsed` | Tool-call rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
230
- | `--reasoning <mode>` | enum | `full` | Reasoning rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
231
- | `--subagents <mode>` | enum | `auto-collapsed` | Subagent-section rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
232
- | `--connection-auth <mode>` | enum | `full` | Connection-authorization rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
233
- | `--assistant-response-stats <mode>` | enum | `tokensPerSecond` | Assistant header statistic: `tokens` \| `tokensPerSecond` |
234
- | `--context-size <tokens>` | number | none | Model context window size, shown as a usage percentage |
235
- | `--logs <mode>` | enum | `stderr` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
209
+ Starts a local development server and terminal UI. To connect the UI to an existing agent, use `eve remote connect --url <url>`.
210
+
211
+ | Flag | Type | Default | Description |
212
+ | ----------------------------------- | ------ | ------------------ | ------------------------------------------- |
213
+ | `--host <host>` | string | all interfaces | Host interface to bind |
214
+ | `--port <port>` | number | `$PORT`, then 2000 | Port to listen on |
215
+ | `--no-ui` | flag | UI on | Start the server without an interactive UI |
216
+ | `--no-default-extensions` | flag | extensions on | Do not mount bundled development extensions |
217
+ | `--name <name>` | string | app folder name | Title shown in the terminal UI |
218
+ | `--input <text>` | string | none | Pre-fill the prompt input |
219
+ | `--tools <mode>` | enum | `auto-collapsed` | Tool-call rendering |
220
+ | `--reasoning <mode>` | enum | `full` | Reasoning rendering |
221
+ | `--subagents <mode>` | enum | `auto-collapsed` | Subagent-section rendering |
222
+ | `--connection-auth <mode>` | enum | `full` | Connection-authorization rendering |
223
+ | `--assistant-response-stats <mode>` | enum | `tokensPerSecond` | Assistant header statistic |
224
+ | `--context-size <tokens>` | number | none | Model context window size |
225
+ | `--logs <mode>` | enum | `stderr` | Server and agent logs to show |
236
226
 
237
227
  Local development mounts bundled development extensions without adding files to your project. Pass `--no-default-extensions` to disable them. See [Self-Modification](../guides/self-modification) for details.
238
228
 
239
- `eve acp` reserves stdin and stdout for newline-delimited JSON-RPC and sends diagnostics to stderr. Without a URL, it supervises an isolated local development server. With a URL, it bridges ACP to that server's existing eve HTTP API and accepts the same URL credentials and request headers as `eve dev <url>`. Pass `--scope <team>` when the active Vercel scope does not own the deployment; `EVE_VERCEL_SCOPE` provides the same value for managed harnesses. See [Agent Client Protocol (ACP)](../protocols/acp) for client configuration and capability limits.
240
-
241
229
  A fresh `eve init` opens the TUI and reuses an available model connection or opens `/login`. No Vercel project, channels, integrations, or review step is required before chat. Use `/model` to change models and settings, and `/add` to install an addition. Other `--input` text stays editable in the prompt. See [Terminal UI](../guides/dev-tui) for credential precedence and login options.
242
230
 
243
- For a URL target protected by HTTP Basic auth, put the credentials in the URL. eve sends them as a Basic `Authorization` header and strips them from the server URL before connecting:
231
+ Local dev records the last ready URL per resolved app root in `.eve/dev-server-state.v1.json`. A second interactive `eve dev` reconnects only when that URL is loopback and healthy; each terminal UI creates a fresh client session while sharing the server process. A stale or malformed record is replaced when eve starts a new server. Passing `--host`, `--port`, or a `PORT` environment value skips reconnection and reports a healthy recorded server instead.
232
+
233
+ Local dev keeps immutable runtime generations under `.eve/dev-runtime/snapshots/` so in-flight turns hold a consistent code revision while new turns pick up rebuilds. Each generation contains the compiled authored module graph and runtime resources rather than a recursive copy of the app or workspace. The terminal REPL keeps its logical session across successful rebuilds, so the next turn continues the conversation on the latest generation; `/new` terminally retires that session before clearing the transcript, and the next prompt starts a fresh session with a new session-scoped sandbox on first sandbox use. After a generation is superseded, `eve dev` retains it for at least 30 minutes and also retains the five most recently superseded generations, regardless of the configured Workflow World. The active generation is never pruned. Old runtime snapshots and local sandbox templates are pruned in the background. For manual cleanup, stop `eve dev` before deleting `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/`. A turn that remains unfinished beyond the automatic retention window can no longer resume after its generation is pruned.
234
+
235
+ Local development records traces under `.eve/traces/` by default and bounds that store by age, size, and a keep-newest floor. Configure it with `EVE_TRACES*` in `.env.local`, or disable the destination with `agent/instrumentation/local.ts`; see [`eve traces`](#retention) for the rules and defaults.
236
+
237
+ `eve acp` reserves stdin and stdout for newline-delimited JSON-RPC and sends diagnostics to stderr. Without a URL, it supervises an isolated local development server. With a URL, it bridges ACP to that server's existing eve HTTP API. See [Agent Client Protocol (ACP)](../protocols/acp) for client configuration and capability limits.
238
+
239
+ ## `eve remote`
240
+
241
+ Use `eve remote` only with an explicit existing agent URL:
244
242
 
245
243
  ```bash
246
- eve dev https://user:pass@your-app.example.com
244
+ eve remote connect --url https://agent.example.com
245
+ eve remote invoke --url https://agent.example.com "Summarize station telemetry"
246
+ eve remote info --url https://agent.example.com
247
247
  ```
248
248
 
249
- For bearer tokens or custom schemes, pass explicit headers with `-H`.
249
+ `connect` opens the terminal UI. `info` verifies the target and prints its inspection response. Remote commands never start a local application.
250
+
251
+ ### `eve remote connect`
250
252
 
251
- ### `eve invoke`
253
+ ```bash
254
+ eve remote connect --url <url> [-H "Name: value"]
255
+ ```
252
256
 
253
- | Option | Type | Default | Description |
254
- | ----------------------- | ------ | ------- | ----------------------------------------------- |
255
- | `[prompt]` | string | none | Prompt, follow-up, or answer to a pending input |
256
- | `-u, --url <url>` | string | local | Invoke an existing server |
257
- | `-H, --header <header>` | string | none | Request header for a URL target; repeatable |
258
- | `--resume` | flag | off | Read a previous resumable result from stdin |
259
- | `--scope <team>` | string | current | Vercel team that owns the URL target |
260
- | `--json-schema` | flag | off | Print the result JSON Schema and exit |
257
+ Use `-H, --header <header>` for a bearer token or another custom request header; repeat it for multiple headers. For HTTP Basic authentication, put credentials in the URL. eve sends them as a Basic `Authorization` header and removes them from the target URL.
261
258
 
262
- Use `eve invoke` to submit a turn without opening the TUI. It emits JSON after the invocation completes or reaches a blocking input or authorization event.
259
+ ### `eve remote invoke`
263
260
 
264
261
  ```bash
265
- eve invoke "Summarize station telemetry"
266
- result=$(eve invoke "Deploy the application")
267
- printf '%s' "$result" | eve invoke --resume "approve"
268
- eve invoke --json-schema
262
+ eve remote invoke --url <url> [prompt] [--resume] [-H "Name: value"] [--scope <team>]
269
263
  ```
270
264
 
271
- `--resume` reads a complete previous result from stdin. Supply text for a `ready` follow-up or pending input; the agent harness resolves input text against all pending requests. A `ready` result includes the previous turn's completed or failed `outcome`. An `authorization-required` result lists every unresolved challenge in `authorizations`; complete them, then resume without text. Pass explicit headers again for protected remote servers. If the URL belongs to another Vercel team, pass its slug with `--scope`; this does not relink the current directory. Pass the scope again when resuming. Paused invocations exit `3`; failures exit `1`.
265
+ Invokes an existing agent without opening the terminal UI. It emits JSON after the invocation completes or reaches a blocking input or authorization event.
272
266
 
273
- Local callback-based connection authorization requires a persistent server. Run `eve dev`, then use `eve invoke --url <dev-url>` instead. If a waiting invocation receives `SIGINT` or `SIGTERM` after acceptance, it emits a final resumable `running` result before exiting.
267
+ | Option | Type | Default | Description |
268
+ | ----------------------- | ------ | -------- | ----------------------------------------------- |
269
+ | `<url>` | string | required | Existing eve agent URL |
270
+ | `[prompt]` | string | none | Prompt, follow-up, or answer to a pending input |
271
+ | `-H, --header <header>` | string | none | Request header for the URL target; repeatable |
272
+ | `--resume` | flag | off | Read a previous resumable result from stdin |
273
+ | `--scope <team>` | string | current | Vercel team that owns the URL target |
274
274
 
275
- Local dev records the last ready URL per resolved app root in `.eve/dev-server-state.v1.json`. A second interactive `eve dev` reconnects only when that URL is loopback and healthy; each terminal UI creates a fresh client session while sharing the server process. A stale or malformed record is replaced when eve starts a new server. Passing `--host`, `--port`, or a `PORT` environment value skips reconnection and reports a healthy recorded server instead.
275
+ `--resume` reads a complete previous result from stdin. Supply text for a `ready` follow-up or pending input. An `authorization-required` result lists every unresolved challenge; complete them, then resume without text. Pass headers and scope again when resuming. Paused invocations exit `3`; failures exit `1`. If a waiting invocation receives `SIGINT` or `SIGTERM` after acceptance, it emits a final resumable `running` result before exiting.
276
276
 
277
- Local dev keeps immutable runtime generations under `.eve/dev-runtime/snapshots/` so in-flight turns hold a consistent code revision while new turns pick up rebuilds. Each generation contains the compiled authored module graph and runtime resources rather than a recursive copy of the app or workspace. The terminal REPL keeps its logical session across successful rebuilds, so the next turn continues the conversation on the latest generation; `/new` terminally retires that session before clearing the transcript, and the next prompt starts a fresh session with a new session-scoped sandbox on first sandbox use. After a generation is superseded, `eve dev` retains it for at least 30 minutes and also retains the five most recently superseded generations, regardless of the configured Workflow World. The active generation is never pruned. Old runtime snapshots and local sandbox templates are pruned in the background. For manual cleanup, stop `eve dev` before deleting `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/`. A turn that remains unfinished beyond the automatic retention window can no longer resume after its generation is pruned.
277
+ ### `eve remote info`
278
278
 
279
- Local development records traces under `.eve/traces/` by default and bounds that store by age, size, and a keep-newest floor. Configure it with `EVE_TRACES*` in `.env.local`, or disable the destination with `agent/instrumentation/local.ts`; see [`eve traces`](#retention) for the rules and defaults.
279
+ ```bash
280
+ eve remote info --url <url> [-H "Name: value"] [--json]
281
+ ```
282
+
283
+ Verifies the existing agent and prints its inspection response. Use `-H, --header <header>` for protected targets; repeat it for multiple headers.
280
284
 
281
285
  ## `eve logs`
282
286
 
283
287
  ```bash
284
288
  eve logs # print the most recent diagnostic log
285
- eve logs ls # list logs, most recent first
286
- eve logs <logid> # print a specific log
289
+ eve logs list # list logs, most recent first
290
+ eve logs show <logid> # print a specific log
287
291
  eve logs --dump # prepend the log's environment dump
288
292
  eve logs --events # interleave session events from the local workflow store
289
293
  ```
290
294
 
291
295
  Each interactive `eve dev` process writes a private diagnostic log under `.eve/logs/` capturing stderr, stdout (including sandbox and rebuild lines), tool failures, workflow errors, and eve framework log records — regardless of what the transcript shows. The file is JSON Lines — every line is one JSON record with `at` and `source` fields. `eve logs` reads those files back.
292
296
 
293
- A log id is the file name without `.log` (for example `dev-2026-07-15T12-00-00.000Z-123`). `eve logs <logid>` also accepts the file name, the `.eve/logs/...` path printed in the dev transcript, or any unambiguous prefix of the id with or without the `dev-` lead — so `eve logs 2026-07-15` works when a single log matches. An ambiguous prefix fails and lists the candidates.
297
+ A log id is the file name without `.log` (for example `dev-2026-07-15T12-00-00.000Z-123`). `eve logs show <logid>` also accepts the file name, the `.eve/logs/...` path printed in the dev transcript, or any unambiguous prefix of the id with or without the `dev-` lead — so `eve logs 2026-07-15` works when a single log matches. An ambiguous prefix fails and lists the candidates.
294
298
 
295
- `eve logs` prints nothing but records — no path banner on either stream — so `eve logs 2>&1 | jq -c .` always parses. Discover ids and file paths with `eve logs ls`; `eve logs ls --json` emits a machine-readable array with `id`, `path`, `startedAt`, and `sizeBytes`.
299
+ `eve logs` prints nothing but records — no path banner on either stream — so `eve logs 2>&1 | jq -c .` always parses. Discover ids and file paths with `eve logs list`; `eve logs list --json` emits a machine-readable array with `id`, `path`, `startedAt`, and `sizeBytes`.
296
300
 
297
301
  `eve logs --events` resolves session events (`session.started`, `turn.failed`, message deltas, …) from the local workflow store (`.eve/.workflow-data`) at query time and interleaves them into the output by timestamp as `source: "event"` records — the log file itself never stores them, so nothing is duplicated at capture time. Selection is by the log's time window (its start through the next log's start), so events from concurrently running `eve dev` processes may appear.
298
302
 
@@ -301,10 +305,10 @@ Each log has a same-named `.dump` sibling holding environment diagnostics and se
301
305
  ## `eve traces`
302
306
 
303
307
  ```bash
304
- eve traces ls # list traces, most recent first
305
- eve traces ls --json # emit machine-readable trace summaries
306
- eve traces # show the most recent span tree
307
- eve traces <trace> # show one span tree
308
+ eve traces list # list traces, most recent first
309
+ eve traces list --json # emit machine-readable trace summaries
310
+ eve traces show # show the most recent span tree
311
+ eve traces show <trace> # show one span tree
308
312
  eve traces --verbose # expand every span with all attributes and events
309
313
  eve traces --json # dump the full trace as JSON
310
314
  ```
@@ -317,6 +321,8 @@ Every subagent activation starts its own trace. The first child's `invoke_agent`
317
321
 
318
322
  Each `agent()` call inside an authored workflow has its own `agent.action` caller span, including sequential, parallel, and background calls. A workflow tool that coordinates one of those calls has an enclosing `invoke_workflow <tool>` span; a workflow tool without agent calls remains `agent.action`. The tool also keeps its `execute_tool <tool>` span. Only agent execution uses `invoke_agent`.
319
323
 
324
+ Outbound MCP `tools/call` requests add MCP semantic attributes to the matching `execute_tool` span. When eve has no tool span to enrich, it creates a `CLIENT` `tools/call <tool>` span. Each `tools/list` discovery also has a `CLIENT` span. Configured OpenTelemetry propagation fields are injected into MCP `params._meta` for JSON-RPC bodies up to 1 MiB and propagation metadata up to 8 KiB; larger requests are sent unchanged. eve removes its audience and session-lineage baggage before forwarding, and keeps the input/output content-capture policy local.
325
+
320
326
  A durable conversation produces one bounded trace per turn. Worker replacements reuse the prepared context for the same turn, while a later turn or an independently replayed attempt starts a fresh trace. Passing the conversation ID shows every trace it produced, oldest first.
321
327
 
322
328
  Every span carries a real duration. A turn's root `invoke_agent` span is written when the turn settles, so a running turn shows only its steps.
@@ -383,18 +389,6 @@ Runs all discovered evals when no eval ids are given; ids match exactly or by di
383
389
 
384
390
  See [Evals](../evals/overview) for authoring evals.
385
391
 
386
- ## `eve channels list`
387
-
388
- ```bash
389
- eve channels list [--json]
390
- ```
391
-
392
- Lists the user-authored channels in the current project.
393
-
394
- | Flag | Type | Default | Description |
395
- | -------- | ---- | ------- | -------------- |
396
- | `--json` | flag | off | Output as JSON |
397
-
398
392
  ## Recommended loop
399
393
 
400
394
  1. Edit files under `agent/`.
@@ -14,7 +14,7 @@ Every schedule provides a `cron` and exactly one of `markdown` or `run`:
14
14
  ```ts
15
15
  interface ScheduleDefinition {
16
16
  cron: string;
17
- markdown?: string; // fire-and-forget prompt (task mode)
17
+ markdown?: string; // fire-and-forget prompt
18
18
  run?: (args: ScheduleHandlerArgs) => Promise<void> | void; // handler
19
19
  }
20
20
 
@@ -33,7 +33,7 @@ A TypeScript schedule with `markdown` is compile-only because eve stores the pro
33
33
 
34
34
  ## Markdown form (fire-and-forget)
35
35
 
36
- This is the minimal schedule. eve runs the agent on the prompt and throws away the output, though the agent can still call tools, write to backends, and log along the way. We call this task mode. A task-mode session runs to completion or fails, and cannot park to wait for a person or an OAuth sign-in.
36
+ This is the minimal schedule. eve runs the agent on the prompt and throws away the output, though the agent can still call tools, write to backends, and log along the way. The session has no channel, so it cannot ask a person for input, and nothing can send it a follow-up message. If the agent calls a tool that needs approval, the session fails instead of waiting for an answer. After its turn settles, the session parks like any other session until its [session timeout](./agent-config#runtime-limits) ends it.
37
37
 
38
38
  ```ts title="agent/schedules/heartbeat.ts"
39
39
  import { defineSchedule } from "eve/schedules";
@@ -86,7 +86,7 @@ The agent does not have to deliver a message on every run. When a prompt makes d
86
86
 
87
87
  The `auth` option controls which principal the session runs as. A handler may instead supply a user principal when scheduled work needs that user's grants; a session created by that dispatch still retains schedule provenance and conditional delivery behavior.
88
88
 
89
- A handler-form session runs on the same durable runtime engine as any other session, so it can park (durably suspend), for instance when the channel handoff is waiting for a Slack reply. Only markdown task mode is barred from waiting.
89
+ A handler-form session runs on the same durable runtime engine as any other session, so it can park (durably suspend), for instance when the channel handoff is waiting for a Slack reply. Markdown-form sessions park too, but no channel is attached, so they cannot receive follow-up messages.
90
90
 
91
91
  ## Background task results
92
92
 
@@ -118,8 +118,7 @@ its policy unless the send supplies an explicit value.
118
118
 
119
119
  Under `"auto"`, a model call may finish silently while related work is pending.
120
120
  Available results remain in the next reporting context so the parent can combine
121
- previously withheld outputs later. A scheduled task-mode session stays alive while
122
- it owns pending background tasks. See
121
+ previously withheld outputs later. See
123
122
  [Background task results](./channels/overview#background-task-results).
124
123
 
125
124
  ## Session continuity
@@ -51,9 +51,8 @@ The root session receives `agent` by default. The model calls it to delegate a t
51
51
 
52
52
  ```ts
53
53
  {
54
- message: string; // everything the child needs; it does not see the parent's history
55
- agentId?: string; // continue or steer an existing child
56
- outputSchema?: object; // require structured output for this turn
54
+ message: string; // everything the child needs; it does not see the parent's history
55
+ agentId?: string; // continue or steer an existing child
57
56
  }
58
57
  ```
59
58
 
@@ -239,7 +238,7 @@ The root built-in `agent` tool is the exception. Its children reuse the root's s
239
238
 
240
239
  ## What the parent sees
241
240
 
242
- eve lowers every tool-enabled subagent visible to the current agent (the root built-in copy, declared, or [remote](./guides/remote-agents)) into a model-visible tool with the same `{ message, agentId?, outputSchema? }` shape. The parent packs `message` with everything the child needs, since the child never sees the parent's history. Set `outputSchema` to require structured output for that turn; the child remains available for follow-up messages afterward.
241
+ eve lowers every tool-enabled subagent visible to the current agent (the root built-in copy, declared, or [remote](./guides/remote-agents)) into a model-visible tool with the same `{ message, agentId? }` shape. The parent packs `message` with everything the child needs, since the child never sees the parent's history. To require structured output from a child, call it from an authored workflow tool with [`ctx.agent(name, { message, outputSchema })`](./tools/workflows); the schema applies to that turn, and the child remains available for follow-up messages afterward.
243
242
 
244
243
  Declared subagents can call nested subagents defined under their own directories. eve does not apply a separate depth limit; nesting ends where the authored directory tree ends. The built-in `agent` follows the stricter root-only rule above, so `limits.maxSubagentDepth` no longer exists.
245
244
 
@@ -249,9 +248,8 @@ A directly declared subagent's tool name is the bare path-derived name, with no
249
248
 
250
249
  ```ts
251
250
  {
252
- message: string; // all context the child needs; it never sees the parent's history
253
- agentId?: string; // continue or steer an existing child
254
- outputSchema?: object; // require structured output for this turn
251
+ message: string; // all context the child needs; it never sees the parent's history
252
+ agentId?: string; // continue or steer an existing child
255
253
  }
256
254
  ```
257
255
 
@@ -121,6 +121,8 @@ The `response` policy receives:
121
121
 
122
122
  Return `{ status: "allowed" }` to accept the approval. Return `{ status: "rejected", reason }` to leave the shared request pending so another eligible responder can approve it.
123
123
 
124
+ When a response is refused without starting a turn, the session returns to `session.waiting`. The client finishes the submission and keeps the approval prompt answerable. Submitting an answer does not confirm approval: `approval.settled` or `input.resolved` records the server's decision. You can inspect `approval.candidate` events for the response policy's refusal reason.
125
+
124
126
  ### Skipping approval for schedule-dispatched turns
125
127
 
126
128
  `session.auth.current` identifies the caller of this turn. Markdown schedules use the app principal (`authenticator: "app"`, `principalId: "eve:app"`, `principalType: "runtime"`) automatically. A `run` schedule must pass its `appAuth` to `send(...)` for the child session to use that principal. Match all three fields to skip approval for automated turns while still prompting when a person calls the same tool:
@@ -197,6 +199,8 @@ Channels turn requests into native UI: the Slack adapter renders approvals as bu
197
199
 
198
200
  From your own frontend, scan all messages for pending requests and answer through the same session — see [Building a frontend](/docs/guides/frontend/overview#human-in-the-loop-prompts) for the client-side reducer and `inputResponses` shape.
199
201
 
202
+ The default message reducer waits for server confirmation before marking any input request answered. Use the store's `submitted` or `streaming` status to show that a response is being processed; submitting a response alone does not resolve an approval, question, or session-limit prompt. The `client.input.responded` event remains a submission notification for custom reducers, not confirmation that the server accepted the answer.
203
+
200
204
  ## What to read next
201
205
 
202
206
  - [Tools](/docs/tools): define the typed actions an approval gates
@@ -39,6 +39,8 @@ eve validates the model's input against `inputSchema` before `execute` runs:
39
39
  - eve treats `format` as an annotation and does not reject input for it.
40
40
  - When eve cannot evaluate a JSON Schema locally, for example because of an unknown `type` name or a `$ref` it cannot resolve, the model still receives the schema and eve passes the input to `execute` unvalidated.
41
41
 
42
+ Optional input fields remain optional for authored tools and connection tools. eve explicitly disables provider strict mode for function tools so providers such as OpenAI Responses do not implicitly require every property. Local input validation still follows the tool's schema.
43
+
42
44
  ### Hide a tool from delegated agents
43
45
 
44
46
  Set `availableInSubagents: false` when a tool should be callable only in a top-level root session:
@@ -441,7 +441,7 @@ import { agentRouter } from "eve/tools/agent-router";
441
441
  export default agentRouter();
442
442
  ```
443
443
 
444
- Its input is `{ message: string, outputSchema?: object }`. `agentRouter()` ignores entries without a non-empty description. With two or more described targets, it sends the message and effective descriptions to Jev, then invokes the selected name through `ctx.agent()`. It invokes a sole target without evaluation and forwards an optional `outputSchema` unchanged. In a top-level root session, the candidates include the root-copy `agent`; delegated root copies and declared subagent contexts include only their declared targets.
444
+ Its input is `{ message: string }`. `agentRouter()` ignores entries without a non-empty description. With two or more described targets, it sends the message and effective descriptions to Jev, then invokes the selected name through `ctx.agent()`. It invokes a sole target without evaluation. In a top-level root session, the candidates include the root-copy `agent`; delegated root copies and declared subagent contexts include only their declared targets.
445
445
 
446
446
  When an authored tool accepts a JSON Schema supplied by the model, represent that input with a permissive object such as `z.looseObject({})`. Avoid `z.record(z.string(), z.json())`: its generated JSON Schema uses `propertyNames`, which OpenAI does not support. Validate the supplied value at the point where your tool consumes it.
447
447
 
@@ -65,7 +65,7 @@ export default defineTool({
65
65
 
66
66
  The sample data has two high-value customers: Acme ($57) and Globex ($99). This definition works with the same fixed dataset whenever you run the tutorial. The second turn is a separate turn in the same session, yet the definition is still there. State checkpoints at step boundaries, so it's the same durability from [Step 2](./how-it-runs), now applied to your own data.
67
67
 
68
- State is scoped to a session and isolated per agent, so a subagent starts with fresh state and never sees the parent's. Need to reset something each turn? Call `update(() => fresh)` in a lifecycle hook. More in [State](../concepts/state).
68
+ State is scoped to a session and isolated per agent, so a subagent starts with fresh state and never sees the parent's. Need to clear the glossary each turn? Call `glossary.update(() => ({ terms: {} }))` in a lifecycle hook. More in [State](../concepts/state).
69
69
 
70
70
  → Next: [Team playbooks](./team-playbooks)
71
71
 
@@ -116,7 +116,7 @@ Open the HTTPS preview URL and enter the configured username and password. Creat
116
116
  The authenticated web app and eve runtime share the same origin, and the sandbox runs on Vercel Sandbox. You can also smoke-test the deployment through the authenticated CLI:
117
117
 
118
118
  ```bash
119
- npx eve dev https://your-analytics-app.vercel.app
119
+ npx eve remote connect --url https://your-analytics-app.vercel.app
120
120
  ```
121
121
 
122
122
  For a production deployment, add the username, password, and model credential to the Production environment too, then run `npx vercel@latest deploy --prod`. Missing Basic credentials keep browser access closed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.66.2",
3
+ "version": "0.67.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -510,24 +510,25 @@
510
510
  "@opentelemetry/otlp-transformer": "0.214.0",
511
511
  "@opentelemetry/sdk-trace-base": "2.6.1",
512
512
  "@photon-ai/chat-adapter-imessage": "3.2.0",
513
+ "@slack/web-api": "7.19.0",
513
514
  "@standard-schema/spec": "1.1.0",
514
515
  "@sveltejs/kit": "^2.0.0",
515
516
  "@types/json-schema": "7.0.15",
516
517
  "@types/react": "19.2.15",
517
518
  "@types/react-test-renderer": "19.1.0",
518
519
  "@vercel/blob": "2.8.0",
519
- "@vercel/connect": "2.2.0",
520
+ "@vercel/connect": "2.3.3",
520
521
  "@vercel/detect-agent": "1.2.3",
521
522
  "@vercel/oidc": "3.8.0",
522
523
  "@vercel/otel": "2.1.3",
523
524
  "@vercel/sandbox": "3.3.0",
524
525
  "@vercel/sdk": "1.28.8",
525
- "@workflow/core": "5.0.0-beta.55",
526
- "@workflow/errors": "5.0.0-beta.22",
526
+ "@workflow/core": "5.0.0-beta.56",
527
+ "@workflow/errors": "5.0.0-beta.23",
527
528
  "@workflow/serde": "5.0.0-beta.2",
528
- "@workflow/world": "5.0.0-beta.37",
529
- "@workflow/world-local": "5.0.0-beta.46",
530
- "@workflow/world-vercel": "5.0.0-beta.50",
529
+ "@workflow/world": "5.0.0-beta.38",
530
+ "@workflow/world-local": "5.0.0-beta.47",
531
+ "@workflow/world-vercel": "5.0.0-beta.51",
531
532
  "ai": "^7.0.105",
532
533
  "chat": "4.41.0",
533
534
  "chokidar": "5.0.0",
@@ -1,9 +0,0 @@
1
- import type { ResolvedDiscoveryProject } from "#discover/project.js";
2
- export interface CliLogger {
3
- error(message: string): void;
4
- log(message: string): void;
5
- }
6
- export interface ListChannelsCommandOptions {
7
- json?: boolean;
8
- }
9
- export declare function runChannelsListCommand(logger: CliLogger, project: ResolvedDiscoveryProject, options: ListChannelsCommandOptions): Promise<void>;
@@ -1 +0,0 @@
1
- import{listAuthoredChannels}from"#setup/scaffold/index.js";async function runChannelsListCommand(e,t,n){let r=await listAuthoredChannels(t.agentRoot);if(n.json){e.log(JSON.stringify({channels:r},null,2));return}if(r.length===0){e.log("No channels defined. Run `eve add <channel>` to add one.");return}for(let t of r)e.log(t)}export{runChannelsListCommand};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-B_knIduE.js";import*as t from"#compiled/zod/index.js";import{z as n}from"#compiled/zod/index.js";import r from"node:crypto";function i(e,t,n){let r=Symbol.for(`${e}/v${t}`),i=globalThis,a=i[r];if(a!==void 0)return a;let o=n();return i[r]=o,o}const a=Symbol.for(`@workflow/world//warnedEnvValues/v1`),o=globalThis,s=o[a]??=new Set;function c(e,t){s.has(e)||(s.add(e),console.warn(`[workflow] ${t}`))}function l(e,t,n={}){let r=process.env[e];if(r===void 0||r===``)return t;let{min:i=0,max:a,integer:o=!1}=n,s=Number(r);return!Number.isFinite(s)||o&&!Number.isInteger(s)?(c(`${e}=${r}`,`Ignoring ${e}: not a ${o?`finite integer`:`finite number`}; using default ${t}`),t):s<i?(c(`${e}=${r}`,`${e} below minimum ${i}; clamped`),i):a!==void 0&&s>a?(c(`${e}=${r}`,`${e} above maximum ${a}; clamped`),a):s}function u(e,t,n=process.env){let r=n[e];if(r===void 0||r===``)return t;let i=r.toLowerCase();return i===`0`||i===`false`?!1:i===`1`||i===`true`||(c(`${e}=${r}`,`Ignoring ${e}: expected 0/1/true/false; using default ${t}`),t)}const d=25e3;function ee(){let e=l(`WORKFLOW_MAX_EVENTS`,d,{integer:!0});return e>0?e:d}const f=`0123456789ABCDEFGHJKMNPQRSTVWXYZ`;var p;(function(e){e.Base32IncorrectEncoding=`B32_ENC_INVALID`,e.DecodeTimeInvalidCharacter=`DEC_TIME_CHAR`,e.DecodeTimeValueMalformed=`DEC_TIME_MALFORMED`,e.EncodeTimeNegative=`ENC_TIME_NEG`,e.EncodeTimeSizeExceeded=`ENC_TIME_SIZE_EXCEED`,e.EncodeTimeValueMalformed=`ENC_TIME_MALFORMED`,e.PRNGDetectFailure=`PRNG_DETECT`,e.ULIDInvalid=`ULID_INVALID`,e.Unexpected=`UNEXPECTED`,e.UUIDInvalid=`UUID_INVALID`})(p||={});var m=class extends Error{constructor(e,t){super(`${t} (${e})`),this.name=`ULIDError`,this.code=e}};function te(e){let t=Math.floor(e()*32)%32;return f.charAt(t)}function h(e,t,n){return t>e.length-1?e:e.substr(0,t)+n+e.substr(t+1)}function ne(e){let t,n=e.length,r,i,a=e;for(;!t&&n-->=0;){if(r=a[n],i=f.indexOf(r),i===-1)throw new m(p.Base32IncorrectEncoding,`Incorrectly encoded string`);if(i===31){a=h(a,n,f[0]);continue}t=h(a,n,f[i+1])}if(typeof t==`string`)return t;throw new m(p.Base32IncorrectEncoding,`Failed incrementing string`)}function re(e){if(e.length!==26)throw new m(p.DecodeTimeValueMalformed,`Malformed ULID`);let t=e.substr(0,10).toUpperCase().split(``).reverse().reduce((e,t,n)=>{let r=f.indexOf(t);if(r===-1)throw new m(p.DecodeTimeInvalidCharacter,`Time decode error: Invalid character: ${t}`);return e+=r*32**n},0);if(t>0xffffffffffff)throw new m(p.DecodeTimeValueMalformed,`Malformed ULID: timestamp too large: ${t}`);return t}function ie(e){let t=ae(),n=t&&(t.crypto||t.msCrypto)||(r===void 0?null:r);if(typeof n?.getRandomValues==`function`)return()=>{let e=new Uint8Array(1);return n.getRandomValues(e),e[0]/256};if(typeof n?.randomBytes==`function`)return()=>n.randomBytes(1).readUInt8()/256;if(r?.randomBytes)return()=>r.randomBytes(1).readUInt8()/256;throw new m(p.PRNGDetectFailure,`Failed to find a reliable PRNG`)}function ae(){return se()?self:typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:null}function oe(e,t){let n=``;for(;e>0;e--)n=te(t)+n;return n}function g(e,t=10){if(isNaN(e))throw new m(p.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>0xffffffffffff)throw new m(p.EncodeTimeSizeExceeded,`Cannot encode a time larger than 281474976710655: ${e}`);if(e<0)throw new m(p.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new m(p.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let n,r=``;for(let i=t;i>0;i--)n=e%32,r=f.charAt(n)+r,e=(e-n)/32;return r}function se(){return typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope}function ce(e){let t=e||ie(),n=0,r;return function(e){let i=!e||isNaN(e)?Date.now():e;if(i<=n){let e=r=ne(r);return g(n,10)+e}n=i;let a=r=oe(16,t);return g(i,10)+a}}function le(e,t){let n=t||ie();return g(!e||isNaN(e)?Date.now():e,10)+oe(16,n)}const ue=`$rootRunId`,de=`$parentRunId`,_=`$retention`,v=`default`,fe=/^(?:0|[1-9]\d*)$/;function pe(e){let t=e?.[_];return t===void 0?{mode:`default`,wellFormed:!1,unsupported:!1}:fe.test(t)?t===`0`?{mode:`none`,raw:t,wellFormed:!0,unsupported:!1}:{mode:`default`,raw:t,wellFormed:!0,unsupported:!0}:{mode:`default`,raw:t,wellFormed:!1,unsupported:t!==v}}const y=8192,b=new TextEncoder;var x=class extends Error{constructor(e){super(e),this.name=`AttributeValidationError`}};function me(e){let t=b.encode(JSON.stringify(e)).length;if(t>8192)throw new x(`Attribute eventData exceeds limit ${y} UTF-8 JSON bytes (received ${t} bytes). Split the changes into smaller setAttributes() calls.`)}function he(e,t){if(typeof e!=`string`)throw new x(`Attribute key must be a string, got ${typeof e}`);if(e.length===0)throw new x(`Attribute key must not be empty`);if(e.length>256)throw new x(`Attribute key length ${e.length} exceeds limit 256: ${JSON.stringify(e.slice(0,32))}…`);if(!t&&e.startsWith(`$`))throw new x(`Attribute key ${JSON.stringify(e)} starts with reserved prefix "\$" — that namespace is reserved for framework/library code. Set { allowReservedAttributes: true } only if your caller is framework-level.`)}function ge(e){if(e!==null&&typeof e!=`string`)throw new x(`Attribute value must be a string or null, got ${typeof e}`);if(e===null)return;let t=b.encode(e).length;if(t>256)throw new x(`Attribute value byte length ${t} exceeds limit 256`)}function _e(e,t,n){return t===null?n?.has(e)?-1:0:+(n===void 0||!n.has(e))}function S(e,t={}){let n=new Set,r=t.existingKeys===void 0?void 0:t.existingKeys instanceof Set?t.existingKeys:new Set(t.existingKeys),i=r?.size??0;for(let{key:t,value:a}of e){if(n.has(t))throw new x(`Attribute key ${JSON.stringify(t)} appears more than once in the same batch`);n.add(t),i+=_e(t,a,r)}if(i>64)throw new x(`Run attribute count would exceed limit 64 (post-merge ${i})`)}function ve(e,t={}){for(let{key:n,value:r}of e)he(n,t.allowReservedAttributes===!0),ge(r);S(e,t)}function ye(e,t){let n={...e??{}};for(let{key:e,value:r}of t)r===null?delete n[e]:n[e]=r;return n}const be=new TextEncoder,C=t.compile(t.string().min(1,{error:`Attribute key must not be empty`}).max(256,{error:`Attribute key exceeds limit 256`})),w=t.compile(t.string().refine(e=>be.encode(e).length<=256,{error:`Attribute value exceeds limit 256 UTF-8 bytes`}).nullable()),xe=t.compile(t.object({key:C,value:w})),Se=t.compile(t.array(xe).superRefine((e,t)=>{try{S(e)}catch(n){if(!(n instanceof x))throw n;t.addIssue({code:`custom`,message:n.message,input:e})}}));function T(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function Ce(e){return e.eventType===`noop`}const we={attr_set:`attr_set`,step_created:`step_created`,step_started:`step_started`,step_retrying:`step_retrying`,step_completed:`step_terminal`,step_failed:`step_terminal`,wait_created:`wait_created`,wait_completed:`wait_completed`,hook_created:`hook_created`,hook_disposed:`hook_disposed`,run_started:`run_started`};function Te(e){return T(we,e)}function Ee(e){let t=Te(e.eventType);if(t!==void 0)return t===`run_started`?{eventClass:t,entity:``}:e.correlationId?{eventClass:t,entity:e.correlationId}:void 0}const De={run_created:[`input`],run_started:[`input`],run_completed:[`output`],run_failed:[`error`],step_created:[`input`],step_started:[`input`],step_completed:[`result`],step_failed:[`error`],step_retrying:[`error`],hook_created:[`metadata`],hook_received:[`payload`]},Oe=[];function E(e){return T(De,e)??Oe}function ke(e){return E(e)[0]}const Ae=n.compile(n.instanceof(Uint8Array)),je=n.compile(n.any()),D=n.compile(n.union([Ae,je])),O=n.compile(n.enum([`run_created`,`run_started`,`run_completed`,`run_failed`,`run_cancelled`,`attr_set`,`step_created`,`step_completed`,`step_failed`,`step_retrying`,`step_started`,`hook_created`,`hook_received`,`hook_disposed`,`hook_conflict`,`wait_created`,`wait_completed`,`noop`]));n.compile(O.extract([`run_created`,`run_started`,`run_completed`,`run_failed`,`run_cancelled`])).options;const Me=n.compile(O.extract([`run_completed`,`run_failed`,`run_cancelled`])).options;function Ne(e){return Me.includes(e)}const Pe=n.compile(O.extract([`step_created`,`step_completed`,`step_failed`,`step_retrying`,`step_started`])).options;function Fe(e){return Pe.includes(e)}n.compile(O.extract([`step_completed`,`step_failed`])).options;const Ie=n.compile(O.extract([`hook_created`,`hook_received`,`hook_disposed`])).options;function Le(e){return Ie.includes(e)}const Re=n.compile(O.extract([`hook_disposed`,`hook_received`])).options;function ze(e){return Re.includes(e)}n.compile(O.extract([`wait_created`,`wait_completed`])).options;const Be=n.compile(O.extract([`step_created`,`hook_created`,`wait_created`])).options;function Ve(e){return Be.includes(e)}function He(e,t){if(t!==`none`||!(`eventData`in e))return e;let n=e.eventData;if(!n||typeof n!=`object`){let{eventData:t,...n}=e;return n}let r=E(e.eventType);if(r.length===0)return e;let i={...n};for(let e of r)delete i[e];let{eventData:a,...o}=e;return{...o,...Object.keys(i).length>0?{eventData:i}:{}}}const k=n.compile(n.object({eventType:O,correlationId:n.string().optional(),specVersion:n.number().optional()})),A={ttfs:n.number().optional(),stso:n.number().optional(),stepCount:n.number().int().positive().optional(),eventCount:n.number().int().positive().optional(),rsfs:n.number().optional(),finalSchedulingReplay:n.number().optional(),optimizations:n.array(n.string()).optional()},j=n.compile(k.extend({eventType:n.literal(`step_completed`),correlationId:n.string(),eventData:n.object({stepName:n.string().optional(),workflowName:n.string().optional(),result:D,...A})})),M=n.compile(k.extend({eventType:n.literal(`step_failed`),correlationId:n.string(),eventData:n.object({stepName:n.string().optional(),error:D,...A})})),N=n.compile(k.extend({eventType:n.literal(`step_retrying`),correlationId:n.string(),eventData:n.object({stepName:n.string().optional(),error:D,retryAfter:n.coerce.date().optional()})})),P=n.compile(k.extend({eventType:n.literal(`step_started`),correlationId:n.string(),eventData:n.object({stepName:n.string().optional(),attempt:n.number().optional(),workflowName:n.string().optional(),input:D.optional(),ownerMessageId:n.string().optional()}).optional()})),F=n.compile(k.extend({eventType:n.literal(`step_created`),correlationId:n.string(),eventData:n.object({stepName:n.string(),workflowName:n.string().optional(),input:D})})),I=n.compile(k.extend({eventType:n.literal(`hook_created`),correlationId:n.string(),eventData:n.object({token:n.string(),tokenRetentionUntil:n.coerce.date().optional(),metadata:D.optional(),isWebhook:n.boolean().optional(),isSystem:n.boolean().optional()})})),Ue=n.compile(k.extend({eventType:n.literal(`hook_received`),correlationId:n.string(),eventData:n.object({token:n.string().optional(),payload:D})})),L=n.compile(k.extend({eventType:n.literal(`hook_disposed`),correlationId:n.string(),eventData:n.object({token:n.string().optional()}).optional()})),We=n.compile(k.extend({eventType:n.literal(`hook_conflict`),correlationId:n.string(),eventData:n.object({token:n.string(),conflictingRunId:n.string().optional()})})),Ge=n.compile(k.extend({eventType:n.literal(`noop`),eventData:n.object({sealed:n.boolean().optional()}).passthrough().optional()})),R=n.compile(k.extend({eventType:n.literal(`wait_created`),correlationId:n.string(),eventData:n.object({resumeAt:n.coerce.date()})})),z=n.compile(k.extend({eventType:n.literal(`wait_completed`),correlationId:n.string(),eventData:n.object({resumeAt:n.coerce.date().optional()}).optional()})),Ke=n.compile(n.discriminatedUnion(`type`,[n.object({type:n.literal(`workflow`)}),n.object({type:n.literal(`step`),stepId:n.string(),attempt:n.number()})])),B=n.compile(k.extend({eventType:n.literal(`attr_set`),correlationId:n.string().optional(),eventData:n.object({changes:Se,writer:Ke,allowReservedAttributes:n.literal(!0).optional()})})),V=n.compile(k.extend({eventType:n.literal(`run_created`),eventData:n.object({deploymentId:n.string(),workflowName:n.string(),input:D,executionContext:n.record(n.string(),n.any()).optional(),attributes:n.record(n.string(),n.string()).optional(),allowReservedAttributes:n.literal(!0).optional(),encryptionPublicKey:n.string().optional()})})),H=n.compile(k.extend({eventType:n.literal(`run_started`),eventData:n.object({input:D.optional(),deploymentId:n.string().optional(),workflowName:n.string().optional(),executionContext:n.record(n.string(),n.any()).optional(),attributes:n.record(n.string(),n.string()).optional(),allowReservedAttributes:n.literal(!0).optional(),encryptionPublicKey:n.string().optional()}).optional()})),U=n.compile(k.extend({eventType:n.literal(`run_completed`),eventData:n.object({output:D.optional()})})),qe=n.compile(k.extend({eventType:n.literal(`run_failed`),eventData:n.object({error:D,errorCode:n.string().optional()})})),Je=n.compile(k.extend({eventType:n.literal(`run_cancelled`),eventData:n.object({cancelReason:n.string().max(512).optional()}).optional()}));n.compile(n.discriminatedUnion(`eventType`,[V,H,U,qe,Je,B,F,j,M,N,P,I,Ue,L,R,z]));const Ye=n.compile(n.discriminatedUnion(`eventType`,[V,H,U,qe,Je,B,F,j,M,N,P,I,Ue,L,We,R,z,Ge])),Xe=n.compile(Ye.and(n.object({runId:n.string(),eventId:n.string(),createdAt:n.coerce.date(),occurredAt:n.coerce.date().optional(),specVersion:n.number().optional(),resumeId:n.string().optional()})));function Ze(e){return Ve(e.eventType)?!0:e.eventType===`step_started`&&typeof e.eventData?.stepName==`string`&&e.eventData.input!==void 0}const W=n.compile(n.enum([`pending`,`running`,`completed`,`failed`,`cancelled`])),Qe=n.compile(W.extract([`completed`,`failed`,`cancelled`])).options;function $e(e){return Qe.includes(e)}const G=n.compile(n.object({runId:n.string(),status:W,deploymentId:n.string(),workflowName:n.string(),specVersion:n.number().optional(),executionContext:n.record(n.string(),n.any()).optional(),input:D.optional(),output:D.optional(),error:D.optional(),errorCode:n.string().optional(),attributes:n.record(n.string(),n.string()).default({}),encryptionPublicKey:n.string().optional(),expiredAt:n.coerce.date().optional(),startedAt:n.coerce.date().optional(),completedAt:n.coerce.date().optional(),createdAt:n.coerce.date(),updatedAt:n.coerce.date()})),et=n.compile(n.discriminatedUnion(`status`,[G.extend({status:n.enum([`pending`,`running`]),output:n.undefined().optional(),error:n.undefined().optional(),completedAt:n.undefined().optional()}),G.extend({status:n.literal(`cancelled`),output:n.undefined().optional(),error:n.undefined().optional(),completedAt:n.coerce.date()}),G.extend({status:n.literal(`completed`),output:D.optional(),error:n.undefined().optional(),completedAt:n.coerce.date()}),G.extend({status:n.literal(`failed`),output:n.undefined().optional(),error:D.optional(),completedAt:n.coerce.date()})])),tt=n.compile(n.object({runIds:n.array(n.string()).min(1).max(500).refine(e=>new Set(e).size===e.length,{message:`runIds must not contain duplicates`}),cancelReason:n.string().max(512).optional()})),nt=n.compile(n.discriminatedUnion(`outcome`,[n.object({runId:n.string(),outcome:n.literal(`cancelled`)}),n.object({runId:n.string(),outcome:n.literal(`already_cancelled`)}),n.object({runId:n.string(),outcome:n.literal(`not_cancellable`),status:n.string()}),n.object({runId:n.string(),outcome:n.literal(`not_found`)}),n.object({runId:n.string(),outcome:n.literal(`failed`),code:n.string(),retryable:n.boolean()})])),rt=n.compile(n.object({summary:n.object({requested:n.number(),cancelled:n.number(),alreadyCancelled:n.number(),notCancellable:n.number(),notFound:n.number(),failed:n.number()}),results:n.array(nt)})),K=n.compile(n.enum([`pending`,`running`,`completed`,`failed`,`cancelled`])),it=n.compile(n.object({runId:n.string(),stepId:n.string(),stepName:n.string(),status:K,input:D.optional(),output:D.optional(),error:D.optional(),attempt:n.number(),startedAt:n.coerce.date().optional(),completedAt:n.coerce.date().optional(),createdAt:n.coerce.date(),updatedAt:n.coerce.date(),retryAfter:n.coerce.date().optional(),specVersion:n.number().optional()})),at=n.compile(K.extract([`completed`,`failed`,`cancelled`])).options;function ot(e){return at.includes(e)}const st=n.compile(n.enum([`waiting`,`completed`])),ct=n.compile(n.object({waitId:n.string(),runId:n.string(),status:st,resumeAt:n.coerce.date().optional(),completedAt:n.coerce.date().optional(),createdAt:n.coerce.date(),updatedAt:n.coerce.date(),specVersion:n.number().optional()})),lt=/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:\.\d+)?$/,q=n.compile(n.preprocess(e=>typeof e==`string`&&lt.test(e)?`${e.replace(` `,`T`)}Z`:e,n.coerce.date())),J=n.compile(q.nullable().optional()),Y=n.compile(n.string().nullable().optional()),X=n.compile(n.boolean().nullable().optional()),ut=n.compile(n.object({runId:n.string(),status:W,deploymentId:n.string(),workflowName:n.string(),specVersion:n.coerce.number().optional(),attributes:n.record(n.string(),n.string()).default({}),createdAt:q,updatedAt:q,startedAt:J,completedAt:J,errorCode:Y,workflowCoreVersion:Y,workflowEncryptionEnabled:X})),dt=n.compile(n.object({runId:n.string(),stepId:n.string(),stepName:Y,status:K,attempt:n.number().optional(),createdAt:q,updatedAt:q,startedAt:J,completedAt:J,retryAfter:J,errorCode:Y,workflowCoreVersion:Y,workflowEncryptionEnabled:X,computeInstanceId:Y})),ft=n.compile(n.object({runId:n.string(),eventId:n.string(),eventType:O,correlationId:Y,entityId:Y,stepName:Y,workflowName:n.string(),deploymentId:n.string(),specVersion:n.coerce.number().optional(),runCreatedAt:q,createdAt:q,region:Y,vercelId:Y,requestId:Y,computeInstanceId:Y,resumeAt:J,retryAfter:J,errorCode:Y,workflowCoreVersion:Y,isWebhook:X,isSystem:X,workflowEncryptionEnabled:X})),pt=n.compile(n.object({runId:n.string(),hookId:n.string(),status:n.enum([`created`,`received`,`disposed`,`conflict`]),createdAt:q,updatedAt:q,receivedAt:J,disposedAt:J,isWebhook:X,isSystem:X,workflowCoreVersion:Y,workflowEncryptionEnabled:X})),mt=n.compile(n.object({runId:n.string(),waitId:n.string(),status:st,resumeAt:J,createdAt:q,updatedAt:q,completedAt:J,workflowCoreVersion:Y,workflowEncryptionEnabled:X})),ht=n.compile(n.object({key:n.string(),runCount:n.coerce.number(),firstSeenAt:q,lastSeenAt:q})),gt=1e3,_t=n.compile(n.string().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_workflow_$/,`Must match __wkf_workflow_ or __{namespace}_wkf_workflow_`)),vt=n.compile(n.string().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_workflow_.+$/,`Must be a valid queue name with a recognized prefix`)),yt=n.compile(n.string().regex(/^[a-z][a-z0-9]*$/,`Must be lowercase alphanumeric, starting with a letter`));function bt(e){return e??process.env.WORKFLOW_QUEUE_NAMESPACE??void 0}function xt(e,t){if(e!==`workflow`)throw Error(`Unsupported queue kind: ${e}`);return t===void 0?`__wkf_workflow_`:(yt.parse(t),`__${t}_wkf_workflow_`)}function St(e){let t=e.match(/^(__(?:[a-z][a-z0-9]*_)?wkf_workflow_)(.+)$/);if(!t)throw Error(`Invalid queue name: ${e}`);return{prefix:_t.parse(t[1]),id:t[2]}}const Ct=n.compile(n.string().brand().describe(`A stored queue message ID`)),wt=n.compile(n.record(n.string(),n.string())),Tt=n.compile(n.object({input:n.unknown(),deploymentId:n.string(),workflowName:n.string(),specVersion:n.number(),executionContext:n.record(n.string(),n.any()).optional(),attributes:n.record(n.string(),n.string()).optional(),allowReservedAttributes:n.literal(!0).optional(),environment:n.string().optional()})),Et=n.compile(n.object({input:n.custom(e=>e instanceof Uint8Array,{message:`stepInput.input must be a Uint8Array`})})),Dt=n.compile(n.object({deploymentId:n.string(),specVersion:n.number(),startedAt:n.number().optional(),rootRunId:n.string().optional()})),Ot=n.compile(n.object({resumeId:n.string(),hookId:n.string(),token:n.string(),payload:n.unknown(),payloadDigest:n.string(),deploymentId:n.string().optional()})),kt=n.compile(n.object({resumeRequestedAtMs:n.number(),queuePublishRequestedAtMs:n.number(),strategy:n.string().optional(),consumerStartedAtMs:n.number().optional(),replayStartedAtMs:n.number().optional(),nextStepEncounteredAtMs:n.number().optional(),setupSource:n.string().optional()})),At=n.compile(n.object({runId:n.string(),invoke:n.literal(!0).optional(),requestId:n.string().optional(),input:n.unknown().optional(),traceCarrier:wt.optional(),requestedAt:n.coerce.date().optional(),replayDivergence:n.object({eventId:n.string(),count:n.number().int().positive(),eventIds:n.array(n.string()).optional().catch(void 0)}).optional(),preconditionReinvocations:n.number().int().positive().optional(),serverErrorRetryCount:n.number().int().optional(),deploymentMismatchRetryCount:n.number().int().nonnegative().optional(),waitContinuation:n.object({correlationId:n.string(),attempt:n.number().int().nonnegative()}).optional().catch(void 0),stepId:n.string().optional(),stepName:n.string().optional(),runInput:Tt.optional(),hookInput:Ot.optional(),stepInput:Et.optional(),runContext:Dt.optional(),hookResumeTiming:kt.optional().catch(void 0)})),jt=n.compile(n.object({__healthCheck:n.literal(!0),correlationId:n.string(),runId:n.string().optional()})),Mt=n.compile(n.union([jt,At])),Nt=n.compile(n.object({deploymentId:n.string(),workflowName:n.string(),runSpecVersion:n.number().optional(),workflowCoreVersion:n.string().optional(),traceCarrier:wt.optional(),encryptionPublicKey:n.string().optional(),hookResumeInputVersion:n.number().optional()})),Pt=n.compile(n.object({hookResumeDedupVersion:n.number()})),Z=n.compile(n.object({runId:n.string(),hookId:n.string(),token:n.string(),ownerId:n.string(),projectId:n.string(),environment:n.string(),metadata:D.optional(),createdAt:n.coerce.date(),specVersion:n.number().optional(),isWebhook:n.boolean().optional(),isSystem:n.boolean().optional(),tokenRetentionUntil:n.coerce.date().optional(),resumeContext:Nt.optional(),resumeCapabilities:Pt.optional()})),Ft=`WORKFLOW_NODE_HTTP`;function It(e=process.env){return u(Ft,!1,e)}async function Lt(e,t,n,r){let i=xt(`workflow`,bt(r)),a=0,o,s=!0;for(;s;){let r=await e.list({status:[`pending`,`running`],resolveData:`none`,pagination:{cursor:o}});for(let e of r.data)try{await t(`${i}${e.workflowName}`,{runId:e.runId}),a++}catch(t){console.warn(`[${n}] Failed to re-enqueue run ${e.runId}: ${t}`)}s=r.hasMore,o=r.cursor??void 0}a>0&&Rt()&&console.debug(`[${n}] Re-enqueued ${a} active run(s) on startup`)}function Rt(){let e=typeof process<`u`?process.env.DEBUG:void 0;return typeof e==`string`?e.includes(`workflow:`)||e===`*`:!1}const zt=n.lazy(()=>n.union([n.string(),n.number(),n.boolean(),n.null(),n.array(zt),n.record(n.string(),zt)])),Bt=n.compile(n.object({currentLookbackDays:n.number(),maxLookbackDays:n.number(),currentWindowStart:n.coerce.date(),maxWindowStart:n.coerce.date(),upgradeAvailable:n.boolean()})),Vt=e=>n.compile(n.object({data:n.array(e),cursor:n.string().nullable(),hasMore:n.boolean(),pageInfo:Bt.optional()})),Ht=n.compile(n.object({message:n.string(),stack:n.string().optional(),code:n.string().optional()})),Ut=`evnt_`;function Q(e){if(e.length!==26)return!1;for(let t=0;t<10;t++)if(e[t]!==`0`)return!1;for(let t=10;t<26;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return!0}function Wt(e){let t=e.indexOf(`_`);return t===-1?e:e.slice(t+1)}function Gt(e){return Q(Wt(e))}function Kt(e){if(!Number.isSafeInteger(e)||e<1)throw RangeError(`Invalid event slot: ${e}`);return`${Ut}${String(e).padStart(26,`0`)}`}function qt(e){let t=Wt(e);if(!Q(t))return null;let n=Number(t);return Number.isSafeInteger(n)&&n>=1?n:null}function Jt(e){let t=qt(e);if(t===null)throw Error(`Event id is not slot-numbered: ${e}. This World allocates event positions the runtime cannot read.`);return t}function Yt(e=process.env){return u(`WORKFLOW_SEALED_LOG`,!0,e)?7:6}function Xt(e){return e==null||e<=1}function Zt(e){return e!=null&&e>7}const Qt=n.compile(n.string().ulid()),$t=n.compile(n.templateLiteral([`wrun_`,n.ulid()])),en=864e5,tn=3e5;function $(e){if(Q(e))return null;let t=Qt.safeParse(e);return t.success?new Date(re(t.data)):null}function nn(e,t,n=en,r=tn){let i=$(e.startsWith(t)?e.slice(t.length):e);if(!i)return`Invalid runId: "${e}" is not a valid ULID`;let a=new Date().getTime()-i.getTime();return a>0&&a<=n||a<=0&&-a<=r?null:`Invalid runId timestamp: embedded timestamp is ${Math.round(Math.abs(a)/1e3)}s in the ${a>0?`past`:`future`} (threshold: ${Math.round((a>0?n:r)/1e3)}s)`}var rn=e({ANALYTICS_EVENTS_GET_MANY_LIMIT:()=>100,ANALYTICS_MAX_ATTRIBUTE_FILTERS:()=>8,ANALYTICS_PAGE_LIMIT:()=>100,ANALYTICS_RUN_SCOPED_PAGE_LIMIT:()=>gt,ATTRIBUTE_EVENT_DATA_MAX_BYTES:()=>y,ATTRIBUTE_KEY_MAX_LENGTH:()=>256,ATTRIBUTE_MAX_PER_RUN:()=>64,ATTRIBUTE_VALUE_MAX_BYTES:()=>256,BULK_CANCEL_MAX_RUN_IDS:()=>500,DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS:()=>tn,DEFAULT_TIMESTAMP_THRESHOLD_MS:()=>DEFAULT_TIMESTAMP_THRESHOLD_MS,DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS:()=>en,EVENT_ID_BODY_LENGTH:()=>26,EVENT_ID_PREFIX:()=>Ut,FIRST_EVENT_SLOT:()=>1,HOOK_RESUME_DEDUP_VERSION:()=>1,HOOK_RESUME_INPUT_VERSION:()=>1,HookSchema:()=>Z,NODE_HTTP_DEFAULT:()=>!1,NODE_HTTP_ENV_VAR:()=>Ft,RESERVED_ATTRIBUTE_KEY_PREFIX:()=>`$`,RETENTION_DEFAULT:()=>v,RETENTION_ZERO:()=>`0`,RUN_ENTITY_KEY:()=>``,SEALED_LOG_ENV_VAR:()=>`WORKFLOW_SEALED_LOG`,SPEC_VERSION_CURRENT:()=>7,SPEC_VERSION_LEGACY:()=>1,SPEC_VERSION_MAX_SUPPORTED:()=>7,SPEC_VERSION_SUPPORTS_ATTRIBUTES:()=>4,SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT:()=>3,SPEC_VERSION_SUPPORTS_COMPRESSION:()=>5,SPEC_VERSION_SUPPORTS_EVENT_SOURCING:()=>2,SPEC_VERSION_SUPPORTS_SEALED_LOG:()=>7,SPEC_VERSION_SUPPORTS_SLOT_IDENTITY:()=>6});export{C as $,dt as A,Xe as B,St as C,ft as D,ht as E,tt as F,Fe as G,Ze as H,rt as I,D as J,Ne as K,G as L,ct as M,it as N,pt as O,ot as P,Ce as Q,et as R,xt as S,gt as T,ze as U,O as V,Le as W,ke as X,Ee as Y,E as Z,jt as _,Xt as a,ye as at,vt as b,qt as c,me as ct,Kt as d,le as dt,w as et,Vt as f,l as ft,Z as g,It as h,$t as i,ue as it,mt as j,ut as k,Gt as l,re as lt,Lt as m,i as mt,$ as n,de as nt,Yt as o,pe as ot,Ht as p,ee as pt,He as q,nn as r,_ as rt,Zt as s,ve as st,rn as t,x as tt,Jt as u,ce as ut,Ct as v,bt as w,At as x,Mt as y,$e as z};