eve 1.0.0-rc.13 → 1.0.0-rc.14

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 (350) hide show
  1. package/CHANGELOG.md +8 -9
  2. package/dist/src/channel/route-args.d.ts +35 -0
  3. package/dist/src/channel/route-args.js +1 -0
  4. package/dist/src/chunks/{use-eve-agent-CaMLdv1n.js → use-eve-agent-58yJtCoN.js} +1 -0
  5. package/dist/src/chunks/{use-eve-agent-DQtKP7gy.js → use-eve-agent-uJrouq3q.js} +1 -0
  6. package/dist/src/client/agent-info-schema.d.ts +1 -0
  7. package/dist/src/client/agent-info-schema.js +1 -1
  8. package/dist/src/client/agent-info-types.d.ts +1 -0
  9. package/dist/src/compiled/.vendor-stamp.json +2 -1
  10. package/dist/src/compiled/croner/LICENSE +22 -0
  11. package/dist/src/compiled/croner/index.d.ts +8 -0
  12. package/dist/src/compiled/croner/index.js +1 -0
  13. package/dist/src/compiler/artifact-contract.d.ts +43 -0
  14. package/dist/src/compiler/artifact-contract.js +1 -0
  15. package/dist/src/compiler/artifacts.d.ts +1 -37
  16. package/dist/src/compiler/artifacts.js +1 -1
  17. package/dist/src/compiler/compile-agent.d.ts +2 -1
  18. package/dist/src/compiler/compile-agent.js +1 -1
  19. package/dist/src/compiler/manifest-schema.d.ts +11 -0
  20. package/dist/src/compiler/manifest-schema.js +1 -1
  21. package/dist/src/compiler/normalize-channel.js +1 -1
  22. package/dist/src/compiler/normalize-schedule.js +1 -1
  23. package/dist/src/compiler/normalize-tool.js +1 -1
  24. package/dist/src/context/keys.d.ts +1 -1
  25. package/dist/src/context/providers/connection.js +1 -1
  26. package/dist/src/context/providers/sandbox.js +1 -1
  27. package/dist/src/context/run-step.js +1 -1
  28. package/dist/src/context/serialize.js +1 -1
  29. package/dist/src/definitions/agent-definitions.d.ts +57 -0
  30. package/dist/src/definitions/agent-definitions.js +1 -0
  31. package/dist/src/definitions/agent.d.ts +4 -4
  32. package/dist/src/definitions/agent.js +1 -1
  33. package/dist/src/definitions/compiled-agent.d.ts +12 -0
  34. package/dist/src/definitions/compiled-agent.js +1 -0
  35. package/dist/src/definitions/connections.js +1 -1
  36. package/dist/src/definitions/hooks.js +1 -1
  37. package/dist/src/definitions/instructions.js +1 -1
  38. package/dist/src/definitions/model.js +1 -1
  39. package/dist/src/definitions/session-agent.d.ts +26 -0
  40. package/dist/src/definitions/session-agent.js +1 -0
  41. package/dist/src/definitions/skills.js +1 -1
  42. package/dist/src/definitions/subagents.js +1 -1
  43. package/dist/src/definitions/tools.js +1 -1
  44. package/dist/src/eve-channel/descendant-stream.js +1 -1
  45. package/dist/src/eve-channel/index.js +1 -1
  46. package/dist/src/eve-channel/request.js +1 -1
  47. package/dist/src/eve-channel/support.js +1 -1
  48. package/dist/src/execution/agent-sessions/context.d.ts +5 -9
  49. package/dist/src/execution/agent-sessions/context.js +1 -1
  50. package/dist/src/execution/agent-sessions/metadata.d.ts +6 -2
  51. package/dist/src/execution/agent-sessions/metadata.js +1 -1
  52. package/dist/src/execution/agent-sessions/owner.d.ts +21 -0
  53. package/dist/src/execution/agent-sessions/owner.js +1 -0
  54. package/dist/src/execution/agent-sessions/remote-session.d.ts +16 -0
  55. package/dist/src/execution/agent-sessions/remote-session.js +1 -0
  56. package/dist/src/execution/agent-sessions/remote.js +1 -1
  57. package/dist/src/execution/agent-sessions/roster.d.ts +34 -0
  58. package/dist/src/execution/agent-sessions/roster.js +1 -0
  59. package/dist/src/execution/agent-sessions/session.js +1 -1
  60. package/dist/src/execution/agent-sessions/sessions-over.d.ts +29 -0
  61. package/dist/src/execution/agent-sessions/sessions-over.js +1 -0
  62. package/dist/src/execution/agent-sessions/start.d.ts +162 -0
  63. package/dist/src/execution/agent-sessions/start.js +1 -0
  64. package/dist/src/execution/agent-sessions/steps.d.ts +2 -69
  65. package/dist/src/execution/agent-sessions/steps.js +1 -1
  66. package/dist/src/execution/agent-sessions/target.js +1 -1
  67. package/dist/src/execution/catalog/step-catalog.js +1 -1
  68. package/dist/src/execution/coordination-dispatch-shared.d.ts +3 -3
  69. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  70. package/dist/src/execution/coordination-dispatch-step.d.ts +8 -8
  71. package/dist/src/execution/coordination-dispatch-step.js +1 -1
  72. package/dist/src/execution/create-session-step.js +1 -1
  73. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  74. package/dist/src/execution/effective-agent-config.d.ts +5 -4
  75. package/dist/src/execution/effective-agent-config.js +1 -1
  76. package/dist/src/execution/framework-workflow-bodies.d.ts +7 -0
  77. package/dist/src/execution/framework-workflow-bodies.js +1 -0
  78. package/dist/src/execution/hook-ownership.d.ts +4 -0
  79. package/dist/src/execution/hook-ownership.js +1 -1
  80. package/dist/src/execution/hosts.d.ts +114 -0
  81. package/dist/src/execution/hosts.js +1 -0
  82. package/dist/src/execution/initial-entry.d.ts +30 -0
  83. package/dist/src/execution/initial-entry.js +1 -0
  84. package/dist/src/execution/invoke-tool.js +1 -1
  85. package/dist/src/execution/legacy-session/authorization.js +1 -1
  86. package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
  87. package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
  88. package/dist/src/execution/node-step.d.ts +12 -4
  89. package/dist/src/execution/node-step.js +1 -1
  90. package/dist/src/execution/proxied-deliver-step.d.ts +3 -3
  91. package/dist/src/execution/proxied-deliver-step.js +1 -1
  92. package/dist/src/execution/publish-session-events.d.ts +23 -7
  93. package/dist/src/execution/publish-session-events.js +1 -1
  94. package/dist/src/execution/run-host.d.ts +46 -0
  95. package/dist/src/execution/run-host.js +1 -0
  96. package/dist/src/execution/runtime-context.d.ts +2 -2
  97. package/dist/src/execution/runtime-context.js +1 -1
  98. package/dist/src/execution/session/active-turn.d.ts +1 -1
  99. package/dist/src/execution/session/admission.d.ts +2 -1
  100. package/dist/src/execution/session/admission.js +1 -1
  101. package/dist/src/execution/session/checkpoint-migrations.d.ts +1 -1
  102. package/dist/src/execution/session/checkpoint-migrations.js +1 -1
  103. package/dist/src/execution/session/checkpoint.d.ts +27 -0
  104. package/dist/src/execution/session/checkpoint.js +1 -0
  105. package/dist/src/execution/session/entry-input.d.ts +1 -1
  106. package/dist/src/execution/session/entry.d.ts +5 -10
  107. package/dist/src/execution/session/entry.js +1 -1
  108. package/dist/src/execution/session/finalization.js +1 -1
  109. package/dist/src/execution/session/handoff-steps.d.ts +4 -3
  110. package/dist/src/execution/session/handoff-steps.js +1 -1
  111. package/dist/src/execution/session/handoff.d.ts +1 -26
  112. package/dist/src/execution/session/handoff.js +1 -1
  113. package/dist/src/execution/session/owner-boot.d.ts +31 -0
  114. package/dist/src/execution/session/owner-boot.js +1 -0
  115. package/dist/src/execution/session/pre-v27-checkpoint.d.ts +1 -1
  116. package/dist/src/execution/session/pre-v27-checkpoint.js +1 -1
  117. package/dist/src/execution/session/program.d.ts +19 -2
  118. package/dist/src/execution/session/program.js +1 -1
  119. package/dist/src/execution/session/settle-control-delivery-step.d.ts +2 -2
  120. package/dist/src/execution/session/settle-duplicate-delivery-step.d.ts +2 -2
  121. package/dist/src/execution/session/state-cursor.d.ts +4 -4
  122. package/dist/src/execution/session/step-state-delta.d.ts +2 -1
  123. package/dist/src/execution/session/step-state-delta.js +1 -1
  124. package/dist/src/execution/session/timeout-control.d.ts +6 -3
  125. package/dist/src/execution/session/timeout-steps.js +1 -1
  126. package/dist/src/execution/session/turn-step.d.ts +26 -2
  127. package/dist/src/execution/session/turn-step.js +1 -1
  128. package/dist/src/execution/session/turn.d.ts +29 -2
  129. package/dist/src/execution/session/turn.js +1 -1
  130. package/dist/src/execution/session/workflow-host.d.ts +7 -0
  131. package/dist/src/execution/session/workflow-host.js +1 -0
  132. package/dist/src/execution/session-callback-request.js +1 -1
  133. package/dist/src/execution/session-commands.d.ts +7 -0
  134. package/dist/src/execution/session-commands.js +1 -0
  135. package/dist/src/execution/session-event-stream.d.ts +2 -3
  136. package/dist/src/execution/session-event-stream.js +1 -1
  137. package/dist/src/execution/session-inbox/address.d.ts +2 -0
  138. package/dist/src/execution/session-inbox/address.js +1 -1
  139. package/dist/src/execution/session-inbox/end-stranded-session.js +1 -1
  140. package/dist/src/execution/session-inbox/inbox.d.ts +36 -2
  141. package/dist/src/execution/session-inbox/inbox.js +1 -1
  142. package/dist/src/execution/session-inbox/resume.d.ts +0 -2
  143. package/dist/src/execution/session-inbox/resume.js +1 -1
  144. package/dist/src/execution/session-inbox/stranded-replay-guard.js +1 -1
  145. package/dist/src/execution/session-inbox/workflow-transport.d.ts +10 -0
  146. package/dist/src/execution/session-inbox/workflow-transport.js +1 -0
  147. package/dist/src/execution/session-line-store.d.ts +19 -0
  148. package/dist/src/execution/session-line-store.js +1 -0
  149. package/dist/src/execution/session-workflow-tool-run.d.ts +1 -1
  150. package/dist/src/execution/session-workflow-tool-run.js +1 -1
  151. package/dist/src/execution/settle-cancelled-turn-step.d.ts +3 -3
  152. package/dist/src/execution/stop-runs.js +1 -1
  153. package/dist/src/execution/tasks/start.js +1 -1
  154. package/dist/src/execution/tasks/steps.d.ts +2 -2
  155. package/dist/src/execution/tasks/steps.js +1 -1
  156. package/dist/src/execution/tasks/workflow-target.d.ts +1 -3
  157. package/dist/src/execution/tasks/workflow-target.js +1 -1
  158. package/dist/src/execution/tool-stub-host.d.ts +20 -0
  159. package/dist/src/execution/tool-stub-host.js +1 -0
  160. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  161. package/dist/src/execution/tools/channel-to.d.ts +6 -3
  162. package/dist/src/execution/tools/channel-to.js +1 -1
  163. package/dist/src/execution/tools/workflow/answer.js +1 -1
  164. package/dist/src/execution/tools/workflow/apply-run-messages-step.d.ts +3 -24
  165. package/dist/src/execution/tools/workflow/apply-run-messages-step.js +1 -1
  166. package/dist/src/execution/tools/workflow/apply-run-messages.d.ts +36 -0
  167. package/dist/src/execution/tools/workflow/apply-run-messages.js +1 -0
  168. package/dist/src/execution/tools/workflow/ask.d.ts +3 -0
  169. package/dist/src/execution/tools/workflow/body.d.ts +5 -2
  170. package/dist/src/execution/tools/workflow/body.js +1 -1
  171. package/dist/src/execution/tools/workflow/interrupt.js +1 -1
  172. package/dist/src/execution/tools/workflow/messages.d.ts +1 -1
  173. package/dist/src/execution/tools/workflow/resume-hook-step.d.ts +1 -1
  174. package/dist/src/execution/tools/workflow/resume-hook-step.js +1 -1
  175. package/dist/src/execution/tools/workflow/resume-hook.d.ts +4 -0
  176. package/dist/src/execution/tools/workflow/resume-hook.js +1 -0
  177. package/dist/src/execution/tools/workflow/run.d.ts +8 -0
  178. package/dist/src/execution/tools/workflow/run.js +1 -0
  179. package/dist/src/execution/tools/workflow/serve.js +1 -1
  180. package/dist/src/execution/tools/workflow/start.d.ts +10 -2
  181. package/dist/src/execution/tools/workflow/start.js +1 -1
  182. package/dist/src/execution/tools/workflow/step-context.d.ts +7 -5
  183. package/dist/src/execution/tools/workflow/step-execution.js +1 -1
  184. package/dist/src/execution/tools/workflow/step.js +1 -1
  185. package/dist/src/execution/tools/workflow/withdraw-step.d.ts +3 -3
  186. package/dist/src/execution/tools/workflow/withdraw-step.js +1 -1
  187. package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +2 -1
  188. package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
  189. package/dist/src/execution/tools/workflow/workflow-run-host.d.ts +2 -0
  190. package/dist/src/execution/tools/workflow/workflow-run-host.js +1 -0
  191. package/dist/src/execution/tools/workflow/workflow.js +1 -1
  192. package/dist/src/execution/workflow-host/dispatch-step.d.ts +9 -0
  193. package/dist/src/execution/workflow-host/dispatch-step.js +1 -0
  194. package/dist/src/execution/workflow-host/host.d.ts +5 -0
  195. package/dist/src/execution/workflow-host/host.js +1 -0
  196. package/dist/src/execution/workflow-host/start-run.d.ts +6 -0
  197. package/dist/src/execution/workflow-host/start-run.js +1 -0
  198. package/dist/src/execution/workflow-host/tool-stubs.d.ts +7 -0
  199. package/dist/src/execution/workflow-host/tool-stubs.js +1 -0
  200. package/dist/src/execution/workflow-host/turn-step.d.ts +3 -0
  201. package/dist/src/execution/workflow-host/turn-step.js +1 -0
  202. package/dist/src/execution/workflow-references.d.ts +23 -0
  203. package/dist/src/execution/workflow-references.js +1 -0
  204. package/dist/src/execution/workflow-runtime.d.ts +2 -37
  205. package/dist/src/execution/workflow-runtime.js +1 -1
  206. package/dist/src/framework/host-inventory.js +1 -1
  207. package/dist/src/framework/sources/default-tools.d.ts +36 -0
  208. package/dist/src/framework/sources/default-tools.js +1 -0
  209. package/dist/src/framework/sources/modules/home-channel.js +1 -1
  210. package/dist/src/framework/sources/registry.js +1 -1
  211. package/dist/src/harness/call-executor.js +1 -1
  212. package/dist/src/harness/compaction/step.js +1 -1
  213. package/dist/src/harness/coordination.d.ts +2 -0
  214. package/dist/src/harness/coordination.js +1 -1
  215. package/dist/src/harness/hitl/index.d.ts +1 -1
  216. package/dist/src/harness/hitl/index.js +1 -1
  217. package/dist/src/harness/hitl/intake.js +1 -1
  218. package/dist/src/harness/hitl/sign-in-callbacks.d.ts +16 -1
  219. package/dist/src/harness/hitl/sign-in-callbacks.js +1 -1
  220. package/dist/src/harness/kernel.js +1 -1
  221. package/dist/src/harness/model-call/call.js +1 -1
  222. package/dist/src/harness/model-call/run.js +1 -1
  223. package/dist/src/harness/provider-tool-schemas.d.ts +1 -1
  224. package/dist/src/harness/provider-tool-schemas.js +1 -1
  225. package/dist/src/harness/step/after-model.d.ts +24 -0
  226. package/dist/src/harness/step/after-model.js +1 -1
  227. package/dist/src/harness/step/intake.d.ts +3 -1
  228. package/dist/src/harness/step/intake.js +1 -1
  229. package/dist/src/harness/workflow-admission.d.ts +6 -0
  230. package/dist/src/harness/workflow-admission.js +1 -0
  231. package/dist/src/instrumentation/decide.js +1 -1
  232. package/dist/src/instrumentation/providers.js +1 -1
  233. package/dist/src/internal/application/dev-transport.d.ts +4 -0
  234. package/dist/src/internal/application/dev-transport.js +1 -0
  235. package/dist/src/internal/application/paths.js +1 -1
  236. package/dist/src/internal/application/stamped-package-version.js +1 -1
  237. package/dist/src/internal/authored-definition/core.js +1 -1
  238. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  239. package/dist/src/internal/model-auth/development-broker-client.js +1 -1
  240. package/dist/src/internal/model-auth/development-broker-server.js +1 -1
  241. package/dist/src/internal/nitro/dev-client-address.js +1 -1
  242. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  243. package/dist/src/internal/nitro/host/create-host-nitro.js +2 -1
  244. package/dist/src/internal/nitro/host/dev-workflow-world-setup.js +1 -1
  245. package/dist/src/internal/nitro/host/host-routes.d.ts +1 -0
  246. package/dist/src/internal/nitro/host/host-routes.js +1 -1
  247. package/dist/src/internal/nitro/host/host-spec.d.ts +1 -1
  248. package/dist/src/internal/nitro/host/host-spec.js +1 -1
  249. package/dist/src/internal/nitro/host/timezone-schedules-runtime.d.ts +13 -0
  250. package/dist/src/internal/nitro/host/timezone-schedules-runtime.js +1 -0
  251. package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +7 -0
  252. package/dist/src/internal/nitro/host/vercel-build-output-config.js +1 -1
  253. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  254. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  255. package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
  256. package/dist/src/internal/nitro/routes/connection-events.js +1 -1
  257. package/dist/src/internal/nitro/routes/route-invoke-tool.js +1 -1
  258. package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
  259. package/dist/src/internal/nitro/routes/schedule-collection-consumer.js +1 -1
  260. package/dist/src/internal/nitro/routes/schedule-task.js +1 -1
  261. package/dist/src/internal/vercel-agent-summary.d.ts +1 -0
  262. package/dist/src/internal/workflow/builtins.d.ts +3 -10
  263. package/dist/src/internal/workflow/builtins.js +1 -1
  264. package/dist/src/internal/workflow/cancel-expired-development-run.js +1 -1
  265. package/dist/src/internal/workflow/development-world-client.js +1 -1
  266. package/dist/src/internal/workflow/development-world-protocol.d.ts +0 -4
  267. package/dist/src/internal/workflow/development-world-protocol.js +1 -1
  268. package/dist/src/internal/workflow/development-world-server.js +1 -1
  269. package/dist/src/memory/definition.js +1 -1
  270. package/dist/src/protocol/routes.d.ts +4 -0
  271. package/dist/src/protocol/routes.js +1 -1
  272. package/dist/src/public/channels/mcp.js +1 -1
  273. package/dist/src/runtime/connections/events/actions.js +1 -1
  274. package/dist/src/runtime/connections/events/dispatch-step.js +1 -1
  275. package/dist/src/runtime/connections/events/lifecycle-step.js +1 -1
  276. package/dist/src/runtime/connections/events/owner.js +1 -1
  277. package/dist/src/runtime/connections/events/owners.d.ts +15 -0
  278. package/dist/src/runtime/connections/events/owners.js +1 -0
  279. package/dist/src/runtime/durable-compiled-artifacts-source.js +1 -1
  280. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +1 -1
  281. package/dist/src/runtime/loaders/compile-metadata.d.ts +1 -1
  282. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  283. package/dist/src/runtime/local-dev-capability.js +1 -1
  284. package/dist/src/runtime/prompt/compose.d.ts +1 -1
  285. package/dist/src/runtime/schedules/collection-client.js +1 -1
  286. package/dist/src/runtime/schedules/dispatch-occurrence.d.ts +5 -0
  287. package/dist/src/runtime/schedules/dispatch-occurrence.js +1 -1
  288. package/dist/src/runtime/schedules/register.d.ts +1 -0
  289. package/dist/src/runtime/schedules/register.js +1 -1
  290. package/dist/src/runtime/schedules/resolve-schedule.js +1 -1
  291. package/dist/src/runtime/schedules/validation.js +1 -1
  292. package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +1 -1
  293. package/dist/src/runtime/sessions/compiled-session-agent.d.ts +13 -0
  294. package/dist/src/runtime/sessions/compiled-session-agent.js +1 -0
  295. package/dist/src/runtime/sessions/runtime-context-keys.d.ts +15 -3
  296. package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
  297. package/dist/src/runtime/sessions/session-agent.d.ts +86 -0
  298. package/dist/src/runtime/sessions/session-agent.js +1 -0
  299. package/dist/src/runtime/subagents/workflow.d.ts +2 -0
  300. package/dist/src/runtime/subagents/workflow.js +1 -1
  301. package/dist/src/runtime/types.d.ts +1 -0
  302. package/dist/src/setup/scaffold/create/project.js +1 -1
  303. package/dist/src/shared/action-types.d.ts +4 -0
  304. package/dist/src/shared/action-types.js +1 -1
  305. package/dist/src/shared/poll-until.d.ts +5 -0
  306. package/dist/src/shared/poll-until.js +1 -0
  307. package/dist/src/shared/run-errors.d.ts +38 -0
  308. package/dist/src/shared/run-errors.js +1 -0
  309. package/dist/src/shared/schedule-definition.d.ts +6 -0
  310. package/dist/src/shared/schedule-timezone.d.ts +6 -0
  311. package/dist/src/shared/schedule-timezone.js +1 -0
  312. package/dist/src/subagents/adapter.js +1 -1
  313. package/dist/src/subagents/event-proxy-step.d.ts +3 -18
  314. package/dist/src/subagents/event-proxy-step.js +1 -1
  315. package/dist/src/subagents/parent-notification.js +1 -1
  316. package/dist/src/svelte/index.js +1 -1
  317. package/dist/src/svelte/use-eve-agent.js +1 -1
  318. package/dist/src/tool-stubs/execute.js +1 -1
  319. package/dist/src/tools/provided/ask-question-body.d.ts +10 -0
  320. package/dist/src/tools/provided/ask-question-body.js +1 -0
  321. package/dist/src/tools/provided/ask-question-workflow.d.ts +2 -8
  322. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  323. package/dist/src/tools/provided/ask-question.js +1 -1
  324. package/dist/src/tools/provided/bash.js +1 -1
  325. package/dist/src/tools/provided/read-file.js +1 -1
  326. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  327. package/dist/src/tools/provided/web-search.d.ts +4 -0
  328. package/dist/src/tools/provided/web-search.js +1 -1
  329. package/dist/src/tools/workflow-body.d.ts +15 -0
  330. package/dist/src/tools/workflow-body.js +1 -0
  331. package/dist/src/tools/workflow-definition.d.ts +7 -1
  332. package/dist/src/tracing/eve/connection-events.js +1 -1
  333. package/dist/src/vue/index.js +1 -1
  334. package/dist/src/vue/use-eve-agent.js +1 -1
  335. package/docs/memory/index.mdx +1 -2
  336. package/docs/reference/typescript-api.md +1 -1
  337. package/docs/schedules.mdx +21 -2
  338. package/docs/tools/index.mdx +1 -1
  339. package/docs/tools/workflows.mdx +41 -0
  340. package/package.json +2 -1
  341. package/dist/src/context/node.d.ts +0 -7
  342. package/dist/src/context/node.js +0 -1
  343. package/dist/src/context/providers/tool-stubs.d.ts +0 -10
  344. package/dist/src/context/providers/tool-stubs.js +0 -1
  345. package/dist/src/internal/workflow/is-inactive-workflow-run-error.d.ts +0 -4
  346. package/dist/src/internal/workflow/is-inactive-workflow-run-error.js +0 -1
  347. /package/dist/src/{internal/workflow/development-generation-context.d.ts → runtime/development-generation.d.ts} +0 -0
  348. /package/dist/src/{internal/workflow/development-generation-context.js → runtime/development-generation.js} +0 -0
  349. /package/dist/src/{internal/workflow/reference.d.ts → shared/workflow-function-id.d.ts} +0 -0
  350. /package/dist/src/{internal/workflow/reference.js → shared/workflow-function-id.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,14 +1,13 @@
1
- # eve 1.0.0-rc.13
1
+ # eve 1.0.0-rc.14
2
2
 
3
- Released 2026-11-12 · [Compare with 1.0.0-rc.12](https://github.com/vercel/eve/compare/eve%401.0.0-rc.12...eve%401.0.0-rc.13)
3
+ Released 2026-11-13 · [Compare with 1.0.0-rc.13](https://github.com/vercel/eve/compare/eve%401.0.0-rc.13...eve%401.0.0-rc.14)
4
4
 
5
5
  ## Features
6
6
 
7
- - eve now targets Node.js 26: new projects pin `engines.node` and `@types/node` to `26.x`, so Vercel deploys them on the `nodejs26.x` runtime, and the default sandbox image and generated Discord relay Dockerfile run Node.js 26.
8
- eve still supports Node.js 24 and later. When eve updates the `package.json` of an existing project that pins `engines.node` to another major, such as `24.x`, it now sets `26.x` and prints a warning. SvelteKit apps deployed to Vercel need `@sveltejs/adapter-vercel` 6.3.5 or later to build on Node.js 26. ([#6304](https://github.com/vercel/eve/pull/6304))
7
+ - Add optional IANA timezones to fixed schedules so jobs can keep a local time across daylight saving changes.
8
+ Set `timezone` in `defineSchedule` or Markdown frontmatter on Vercel and self-hosted Node servers. Omitting it preserves the host's existing behavior. Other Nitro presets reject explicit timezones. ([#6311](https://github.com/vercel/eve/pull/6311))
9
+ - `defineWorkflowTool` tools with an `execute` entry point now accept `endsTurn`, so a workflow that waits for the user can end the turn without a model reply.
10
+ Pass `true`, or a function that receives the call's output. `task` and `serve` entry points still reject it.
11
+ Thanks @matchai for requesting this, and @xcscxr for the implementation plan in #5337. ([#6336](https://github.com/vercel/eve/pull/6336))
9
12
 
10
- ## Bug Fixes
11
-
12
- - `eve dev` no longer answers every second request with an empty `400 Bad Request` when the client sends `Connection: close` and the agent replies with a keep-alive response such as an MCP SSE stream, as happens behind the `vercel dev` proxy. ([#6298](https://github.com/vercel/eve/pull/6298))
13
-
14
- For an upgrade across multiple releases, review each version between the installed and target versions in the [target version's changelog](https://raw.githubusercontent.com/vercel/eve/refs/tags/eve%401.0.0-rc.13/packages/eve/CHANGELOG.md).
13
+ For an upgrade across multiple releases, review each version between the installed and target versions in the [target version's changelog](https://raw.githubusercontent.com/vercel/eve/refs/tags/eve%401.0.0-rc.14/packages/eve/CHANGELOG.md).
@@ -0,0 +1,35 @@
1
+ import type { ChannelAdapter } from "#channel/adapter.js";
2
+ import type { CrossChannelToFn } from "#channel/cross-channel-receive.js";
3
+ import { type ChannelDeliverySource } from "#channel/delivery-metadata.js";
4
+ import type { RouteHandlerArgs } from "#channel/routes.js";
5
+ import type { SkillFileSource } from "#channel/skill-files.js";
6
+ import type { Runtime, TurnPolicy } from "#channel/types.js";
7
+ import { type RemoteAgentStreamHeadersResolver } from "#internal/nitro/routes/channel-route-context.js";
8
+ /** What a host supplies for one request to a channel route, such as Nitro's dispatch. */
9
+ export interface ChannelRoutePorts {
10
+ /** Where the channel's sessions run. */
11
+ readonly runtime: Runtime;
12
+ /** The adapter the channel's deliveries go through. */
13
+ readonly adapter: ChannelAdapter;
14
+ /** Where the request came from; its `channelName` namespaces continuation tokens. */
15
+ readonly deliverySource: ChannelDeliverySource;
16
+ readonly turnPolicy?: TurnPolicy;
17
+ readonly agentName: string;
18
+ readonly params: Readonly<Record<string, string>>;
19
+ readonly requestIp: string | null;
20
+ /** The agent as callers see it, and its tools outside a turn. */
21
+ readonly agent: Pick<RouteHandlerArgs, "describe" | "invokeTool" | "listSkillFiles" | "readSkill">;
22
+ /** Answers `GET /eve/v1/info`. */
23
+ readonly agentInfo: () => Promise<Response>;
24
+ readonly to: CrossChannelToFn;
25
+ /** Keeps work going after the response; the host logs a task that fails. */
26
+ readonly waitUntil: (task: Promise<unknown>) => void;
27
+ readonly skillFiles?: SkillFileSource;
28
+ readonly remoteAgentStreamHeaders?: RemoteAgentStreamHeadersResolver;
29
+ }
30
+ /**
31
+ * The arguments a channel route handler gets, from what its host supplies: the channel
32
+ * operations, `attachSession`, and the framework's own fields that eve's channels read (the
33
+ * session creator, `/info`, the channel and agent names, skill files, remote stream headers).
34
+ */
35
+ export declare function createChannelRouteArgs(ports: ChannelRoutePorts): RouteHandlerArgs;
@@ -0,0 +1 @@
1
+ import{createAttachSessionFn}from"#channel/session.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{createChannelOperations}from"#channel/channel-operations.js";import{attachAgentInfoRouteResponse,attachHomeRouteMetadata,attachRemoteAgentStreamHeadersResolver,attachRouteChannelName,attachRouteSessionCreator,attachSkillFileSource}from"#internal/nitro/routes/channel-route-context.js";function createChannelRouteArgs(e){let{adapter:t,deliverySource:n,runtime:r,turnPolicy:i}=e;let{channelName:a}=n;let o=attachRouteSessionCreator(attachHomeRouteMetadata(attachRouteChannelName(attachAgentInfoRouteResponse({attachSession:createAttachSessionFn(r,{...n,turnPolicy:i}),...createChannelOperations({adapter:t,channelName:a,metadata:n,runtime:r,turnPolicy:i}),...e.agent,params:e.params,requestIp:e.requestIp,to:e.to,waitUntil:e.waitUntil},e.agentInfo),a),{agentName:e.agentName}),async({deliveryId:e,...i})=>{let o=createChannelDeliveryMetadata(n);let s=e===void 0?o:{...o,deliveryId:e};return{...await r.createSession({...i,adapter:t,channelName:a,continuationToken:i.continuationToken===void 0?void 0:`${a}:${i.continuationToken}`,delivery:s,requestId:n.requestId}),deliveryId:s.deliveryId}});return e.skillFiles!==void 0&&attachSkillFileSource(o,e.skillFiles),e.remoteAgentStreamHeaders!==void 0&&attachRemoteAgentStreamHeadersResolver(o,e.remoteAgentStreamHeaders),o}export{createChannelRouteArgs};
@@ -252,6 +252,7 @@ const instructions = entry.extend({
252
252
  });
253
253
  const schedule = entry.extend({
254
254
  cron: z.string(),
255
+ timezone: z.string().optional(),
255
256
  hasRun: z.boolean(),
256
257
  markdown: z.string().optional()
257
258
  });
@@ -251,6 +251,7 @@ const instructions = entry.extend({
251
251
  });
252
252
  const schedule = entry.extend({
253
253
  cron: z.string(),
254
+ timezone: z.string().optional(),
254
255
  hasRun: z.boolean(),
255
256
  markdown: z.string().optional()
256
257
  });
@@ -986,6 +986,7 @@ export declare const AgentInfoResultSchema: z.ZodObject<{
986
986
  }>, z.ZodPipe<z.ZodString, z.ZodTransform<"unrecognized", string>>]>;
987
987
  name: z.ZodString;
988
988
  cron: z.ZodString;
989
+ timezone: z.ZodOptional<z.ZodString>;
989
990
  hasRun: z.ZodBoolean;
990
991
  markdown: z.ZodOptional<z.ZodString>;
991
992
  }, z.core.$strip>>;
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{mountIdSchema}from"#shared/extension-mount.js";const AGENT_INFO_VERSION=5;function openEnum(e){return z.union([z.enum(e),z.string().transform(()=>`unrecognized`)])}const owner=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}),z.object({feature:z.string(),kind:z.literal(`framework`)}),z.object({kind:z.literal(`extension`),mountId:mountIdSchema.optional(),namespace:z.string(),packageName:z.string()})]);const moduleBacking=z.discriminatedUnion(`kind`,[z.object({externalDependencies:z.array(z.string()),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).optional(),kind:z.literal(`filesystem`),mountId:z.string().optional(),sourcePath:z.string()}),z.object({kind:z.literal(`programmatic`),mountId:z.string().optional(),moduleId:z.string(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()})]);const binding=z.object({backing:moduleBacking,logicalPath:z.string(),owner});const source=z.object({binding:binding.optional(),exportName:z.string().optional(),logicalPath:z.string(),owner,sourceId:z.string(),sourceKind:openEnum([`markdown`,`module`,`skill-package`])});const entry=source.extend({name:z.string()});const dynamicResolver=source.extend({slug:z.string()});const modelRouting=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}),z.object({kind:z.literal(`external`),provider:z.string()})]);const modelEndpoint=z.union([z.object({kind:z.literal(`external`),provider:z.string()}),z.object({kind:z.literal(`chatgpt`),state:openEnum([`checking`,`ready`,`signed-out`,`reauth-required`,`unavailable`]),accountLabel:z.string().optional()}),z.object({kind:z.literal(`gateway`),connected:z.literal(!0),credential:openEnum([`api-key`,`oidc`,`oauth`]),team:z.optional(z.string())}),z.object({kind:z.literal(`gateway`),connected:z.literal(!1)})]);const modelBaseFields={contextWindowTokens:z.number().optional(),providerOptions:z.unknown().optional(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional().catch(void 0),source:source.optional()};const agentModel=z.union([z.object({...modelBaseFields,endpoint:modelEndpoint.optional(),id:z.string(),routing:modelRouting}),z.object({...modelBaseFields,endpoint:z.never().optional(),id:z.never().optional(),routing:z.object({kind:z.literal(`dynamic`),resolver:dynamicResolver})})]);const tool=entry.extend({description:z.string(),hasAuth:z.boolean(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),hasOutputSchema:z.boolean(),inputSchema:z.unknown(),outputSchema:z.unknown().optional(),requiresApproval:z.boolean()});const skill=entry.extend({description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional()});const instructions=entry.extend({content:z.string(),role:openEnum([`system`,`user`])});const schedule=entry.extend({cron:z.string(),hasRun:z.boolean(),markdown:z.string().optional()});const channelMethod=openEnum([`GET`,`HEAD`,`POST`,`PUT`,`PATCH`,`DELETE`,`OPTIONS`,`WEBSOCKET`]);const channelRoute=entry.extend({adapterKind:z.string().optional(),method:channelMethod,urlPath:z.string()});const sourceDescriptor=z.object({backing:z.union([moduleBacking,z.object({kind:z.literal(`resource`),sourcePath:z.string()})]),form:openEnum([`derived`,`direct`]),layer:openEnum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner,sourceId:z.string()});const shadowedChannelRoute=z.object({method:channelMethod,source:sourceDescriptor,urlPath:z.string(),winnerSourceId:z.string()});const connection=source.extend({connectionName:z.string(),description:z.string(),hasApproval:z.boolean(),hasAuthorization:z.boolean(),hasHeaders:z.boolean(),protocol:z.string(),toolFilter:z.unknown().optional(),url:z.string()});const hook=source.extend({eventNames:z.array(z.string()),slug:z.string()});const memory=source.extend({description:z.string().optional(),slot:z.string()});const sandbox=source.extend({provider:z.string().optional(),environmentExportName:z.string().optional(),revisionHash:z.string()});const subagent=entry.extend({configResolver:dynamicResolver.optional(),description:z.string().optional(),entryPath:z.string(),nodeId:z.string(),parentNodeId:z.string(),rootPath:z.string(),summary:z.object({channels:z.number(),connections:z.number(),hooks:z.number(),instructions:z.number(),memories:z.number(),schedules:z.number(),skills:z.number(),tools:z.number()})});const remoteAgent=entry.extend({description:z.string(),nodeId:z.string(),parentNodeId:z.string(),url:z.string().optional()});const kernelEffect=z.object({action:openEnum([`subagent-call`,`workflow-tool-call`]).optional(),audience:z.array(openEnum([`root-session`])),kind:openEnum([`dispatch`,`provider-tool`]),sourceId:z.string()});const compositionDiagnostic=z.object({kind:openEnum([`disabled`,`shadowed`]),logicalPath:z.string(),owner,sourceId:z.string(),winnerSourceId:z.string().optional()});const AgentInfoResultSchema=z.object({agent:z.object({agentRoot:z.string(),appRoot:z.string(),config:source.extend({binding}),description:z.string().optional(),model:agentModel,name:z.string(),nodeId:z.string(),outputSchema:z.unknown().optional()}),capabilities:z.object({devRoutes:z.boolean()}),channels:z.object({routes:z.array(channelRoute),shadowed:z.array(shadowedChannelRoute)}),composition:z.object({disabled:z.array(compositionDiagnostic),shadowed:z.array(compositionDiagnostic)}),connections:z.array(connection),diagnostics:z.object({discoveryErrors:z.number(),discoveryWarnings:z.number()}),hooks:z.array(hook),instructions:z.object({dynamic:z.array(dynamicResolver),static:z.array(instructions)}),instrumentation:source.optional(),kernelEffects:z.array(kernelEffect),kind:z.literal(`eve-agent-info`),memories:z.array(memory),mode:openEnum([`development`,`production`]),remoteAgents:z.object({entries:z.array(remoteAgent),total:z.number()}),sandbox,schedules:z.array(schedule),skills:z.object({dynamic:z.array(dynamicResolver),static:z.array(skill)}),subagents:z.object({local:z.array(subagent),total:z.number()}),tools:z.object({dynamic:z.array(dynamicResolver),static:z.array(tool)}),version:z.literal(5),workspace:z.object({resourceRoot:z.unknown(),rootEntries:z.array(z.string())})}).superRefine((e,t)=>{let assertUnique=(e,n,r)=>{let i=new Set;e.forEach((e,a)=>{let o=n(e);o!==void 0&&(i.has(o)&&t.addIssue({code:`custom`,message:`Duplicate public identity "${o}".`,path:[...r,a]}),i.add(o))})};let assertTotal=(e,n,r)=>{(!Number.isSafeInteger(e)||e<0||e!==n.length)&&t.addIssue({code:`custom`,message:`Expected total ${n.length}, received ${e}.`,path:[...r]})};assertUnique(e.tools.static,e=>e.name,[`tools`,`static`]),assertUnique(e.tools.dynamic,e=>e.slug,[`tools`,`dynamic`]),assertUnique(e.skills.static,e=>e.name,[`skills`,`static`]),assertUnique(e.skills.dynamic,e=>e.slug,[`skills`,`dynamic`]),assertUnique(e.instructions.static,e=>e.name,[`instructions`,`static`]),assertUnique(e.instructions.dynamic,e=>e.slug,[`instructions`,`dynamic`]),assertUnique(e.schedules,e=>e.name,[`schedules`]),assertUnique(e.connections,e=>e.connectionName,[`connections`]),assertUnique(e.hooks,e=>e.slug,[`hooks`]),assertUnique(e.memories,e=>e.slot,[`memories`]),assertUnique(e.channels.routes,e=>e.method===`unrecognized`?void 0:`${e.method} ${normalizeRoutePattern(e.urlPath)}`,[`channels`,`routes`]),assertUnique(e.subagents.local,e=>e.nodeId,[`subagents`,`local`]),assertUnique(e.remoteAgents.entries,e=>e.nodeId,[`remoteAgents`,`entries`]),assertTotal(e.subagents.total,e.subagents.local,[`subagents`,`total`]),assertTotal(e.remoteAgents.total,e.remoteAgents.entries,[`remoteAgents`,`total`]);let n=[[e.agent.config,[`agent`,`config`]],...e.agent.model.source===void 0?[]:[[e.agent.model.source,[`agent`,`model`,`source`]]],...e.agent.model.routing.kind===`dynamic`?[[e.agent.model.routing.resolver,[`agent`,`model`,`routing`,`resolver`]]]:[],...e.channels.routes.map((e,t)=>[e,[`channels`,`routes`,t]]),...e.connections.map((e,t)=>[e,[`connections`,t]]),...e.hooks.map((e,t)=>[e,[`hooks`,t]]),...e.instructions.dynamic.map((e,t)=>[e,[`instructions`,`dynamic`,t]]),...e.instructions.static.map((e,t)=>[e,[`instructions`,`static`,t]]),...e.memories.map((e,t)=>[e,[`memories`,t]]),...e.instrumentation===void 0?[]:[[e.instrumentation,[`instrumentation`]]],...e.remoteAgents.entries.map((e,t)=>[e,[`remoteAgents`,`entries`,t]]),...e.schedules.map((e,t)=>[e,[`schedules`,t]]),...e.skills.dynamic.map((e,t)=>[e,[`skills`,`dynamic`,t]]),...e.skills.static.map((e,t)=>[e,[`skills`,`static`,t]]),...e.subagents.local.flatMap((e,t)=>e.configResolver===void 0?[]:[[e.configResolver,[`subagents`,`local`,t,`configResolver`]]]),...e.tools.dynamic.map((e,t)=>[e,[`tools`,`dynamic`,t]]),...e.tools.static.map((e,t)=>[e,[`tools`,`static`,t]]),[e.sandbox,[`sandbox`]]];for(let[e,r]of n)e.sourceKind===`module`&&e.binding===void 0?t.addIssue({code:`custom`,message:`Module source is missing its compiled binding.`,path:[...r,`binding`]}):e.sourceKind!==`module`&&e.sourceKind!==`unrecognized`&&e.binding!==void 0?t.addIssue({code:`custom`,message:`${e.sourceKind} source cannot carry a module binding.`,path:[...r,`binding`]}):e.binding!==void 0&&(e.binding.logicalPath!==e.logicalPath&&t.addIssue({code:`custom`,message:`Source and binding logical paths do not match.`,path:[...r,`binding`,`logicalPath`]}),JSON.stringify(e.binding.owner)!==JSON.stringify(e.owner)&&t.addIssue({code:`custom`,message:`Source and binding owners do not match.`,path:[...r,`binding`,`owner`]}))});function describeAgentInfoVersionMismatch(e){if(typeof e!=`object`||!e)return;let{kind:t,version:n}=e;return t!==`eve-agent-info`||typeof n!=`number`||n===5?void 0:`version: the server sent agent-info version ${n}, but this client reads version 5. ${n<5?`Upgrade eve in the agent and redeploy it`:`Upgrade the eve package this client runs from`}.`}function normalizeRoutePattern(e){return e.replace(/^\/+|\/+$/g,``).split(`/`).map(e=>e.startsWith(`:`)||/^\[[^\]]+\]$/.test(e)?`:`:e).join(`/`)}export{AGENT_INFO_VERSION,AgentInfoResultSchema,describeAgentInfoVersionMismatch};
1
+ import{z}from"#compiled/zod/index.js";import{mountIdSchema}from"#shared/extension-mount.js";const AGENT_INFO_VERSION=5;function openEnum(e){return z.union([z.enum(e),z.string().transform(()=>`unrecognized`)])}const owner=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}),z.object({feature:z.string(),kind:z.literal(`framework`)}),z.object({kind:z.literal(`extension`),mountId:mountIdSchema.optional(),namespace:z.string(),packageName:z.string()})]);const moduleBacking=z.discriminatedUnion(`kind`,[z.object({externalDependencies:z.array(z.string()),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).optional(),kind:z.literal(`filesystem`),mountId:z.string().optional(),sourcePath:z.string()}),z.object({kind:z.literal(`programmatic`),mountId:z.string().optional(),moduleId:z.string(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()})]);const binding=z.object({backing:moduleBacking,logicalPath:z.string(),owner});const source=z.object({binding:binding.optional(),exportName:z.string().optional(),logicalPath:z.string(),owner,sourceId:z.string(),sourceKind:openEnum([`markdown`,`module`,`skill-package`])});const entry=source.extend({name:z.string()});const dynamicResolver=source.extend({slug:z.string()});const modelRouting=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}),z.object({kind:z.literal(`external`),provider:z.string()})]);const modelEndpoint=z.union([z.object({kind:z.literal(`external`),provider:z.string()}),z.object({kind:z.literal(`chatgpt`),state:openEnum([`checking`,`ready`,`signed-out`,`reauth-required`,`unavailable`]),accountLabel:z.string().optional()}),z.object({kind:z.literal(`gateway`),connected:z.literal(!0),credential:openEnum([`api-key`,`oidc`,`oauth`]),team:z.optional(z.string())}),z.object({kind:z.literal(`gateway`),connected:z.literal(!1)})]);const modelBaseFields={contextWindowTokens:z.number().optional(),providerOptions:z.unknown().optional(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional().catch(void 0),source:source.optional()};const agentModel=z.union([z.object({...modelBaseFields,endpoint:modelEndpoint.optional(),id:z.string(),routing:modelRouting}),z.object({...modelBaseFields,endpoint:z.never().optional(),id:z.never().optional(),routing:z.object({kind:z.literal(`dynamic`),resolver:dynamicResolver})})]);const tool=entry.extend({description:z.string(),hasAuth:z.boolean(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),hasOutputSchema:z.boolean(),inputSchema:z.unknown(),outputSchema:z.unknown().optional(),requiresApproval:z.boolean()});const skill=entry.extend({description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional()});const instructions=entry.extend({content:z.string(),role:openEnum([`system`,`user`])});const schedule=entry.extend({cron:z.string(),timezone:z.string().optional(),hasRun:z.boolean(),markdown:z.string().optional()});const channelMethod=openEnum([`GET`,`HEAD`,`POST`,`PUT`,`PATCH`,`DELETE`,`OPTIONS`,`WEBSOCKET`]);const channelRoute=entry.extend({adapterKind:z.string().optional(),method:channelMethod,urlPath:z.string()});const sourceDescriptor=z.object({backing:z.union([moduleBacking,z.object({kind:z.literal(`resource`),sourcePath:z.string()})]),form:openEnum([`derived`,`direct`]),layer:openEnum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner,sourceId:z.string()});const shadowedChannelRoute=z.object({method:channelMethod,source:sourceDescriptor,urlPath:z.string(),winnerSourceId:z.string()});const connection=source.extend({connectionName:z.string(),description:z.string(),hasApproval:z.boolean(),hasAuthorization:z.boolean(),hasHeaders:z.boolean(),protocol:z.string(),toolFilter:z.unknown().optional(),url:z.string()});const hook=source.extend({eventNames:z.array(z.string()),slug:z.string()});const memory=source.extend({description:z.string().optional(),slot:z.string()});const sandbox=source.extend({provider:z.string().optional(),environmentExportName:z.string().optional(),revisionHash:z.string()});const subagent=entry.extend({configResolver:dynamicResolver.optional(),description:z.string().optional(),entryPath:z.string(),nodeId:z.string(),parentNodeId:z.string(),rootPath:z.string(),summary:z.object({channels:z.number(),connections:z.number(),hooks:z.number(),instructions:z.number(),memories:z.number(),schedules:z.number(),skills:z.number(),tools:z.number()})});const remoteAgent=entry.extend({description:z.string(),nodeId:z.string(),parentNodeId:z.string(),url:z.string().optional()});const kernelEffect=z.object({action:openEnum([`subagent-call`,`workflow-tool-call`]).optional(),audience:z.array(openEnum([`root-session`])),kind:openEnum([`dispatch`,`provider-tool`]),sourceId:z.string()});const compositionDiagnostic=z.object({kind:openEnum([`disabled`,`shadowed`]),logicalPath:z.string(),owner,sourceId:z.string(),winnerSourceId:z.string().optional()});const AgentInfoResultSchema=z.object({agent:z.object({agentRoot:z.string(),appRoot:z.string(),config:source.extend({binding}),description:z.string().optional(),model:agentModel,name:z.string(),nodeId:z.string(),outputSchema:z.unknown().optional()}),capabilities:z.object({devRoutes:z.boolean()}),channels:z.object({routes:z.array(channelRoute),shadowed:z.array(shadowedChannelRoute)}),composition:z.object({disabled:z.array(compositionDiagnostic),shadowed:z.array(compositionDiagnostic)}),connections:z.array(connection),diagnostics:z.object({discoveryErrors:z.number(),discoveryWarnings:z.number()}),hooks:z.array(hook),instructions:z.object({dynamic:z.array(dynamicResolver),static:z.array(instructions)}),instrumentation:source.optional(),kernelEffects:z.array(kernelEffect),kind:z.literal(`eve-agent-info`),memories:z.array(memory),mode:openEnum([`development`,`production`]),remoteAgents:z.object({entries:z.array(remoteAgent),total:z.number()}),sandbox,schedules:z.array(schedule),skills:z.object({dynamic:z.array(dynamicResolver),static:z.array(skill)}),subagents:z.object({local:z.array(subagent),total:z.number()}),tools:z.object({dynamic:z.array(dynamicResolver),static:z.array(tool)}),version:z.literal(5),workspace:z.object({resourceRoot:z.unknown(),rootEntries:z.array(z.string())})}).superRefine((e,t)=>{let assertUnique=(e,n,r)=>{let i=new Set;e.forEach((e,a)=>{let o=n(e);o!==void 0&&(i.has(o)&&t.addIssue({code:`custom`,message:`Duplicate public identity "${o}".`,path:[...r,a]}),i.add(o))})};let assertTotal=(e,n,r)=>{(!Number.isSafeInteger(e)||e<0||e!==n.length)&&t.addIssue({code:`custom`,message:`Expected total ${n.length}, received ${e}.`,path:[...r]})};assertUnique(e.tools.static,e=>e.name,[`tools`,`static`]),assertUnique(e.tools.dynamic,e=>e.slug,[`tools`,`dynamic`]),assertUnique(e.skills.static,e=>e.name,[`skills`,`static`]),assertUnique(e.skills.dynamic,e=>e.slug,[`skills`,`dynamic`]),assertUnique(e.instructions.static,e=>e.name,[`instructions`,`static`]),assertUnique(e.instructions.dynamic,e=>e.slug,[`instructions`,`dynamic`]),assertUnique(e.schedules,e=>e.name,[`schedules`]),assertUnique(e.connections,e=>e.connectionName,[`connections`]),assertUnique(e.hooks,e=>e.slug,[`hooks`]),assertUnique(e.memories,e=>e.slot,[`memories`]),assertUnique(e.channels.routes,e=>e.method===`unrecognized`?void 0:`${e.method} ${normalizeRoutePattern(e.urlPath)}`,[`channels`,`routes`]),assertUnique(e.subagents.local,e=>e.nodeId,[`subagents`,`local`]),assertUnique(e.remoteAgents.entries,e=>e.nodeId,[`remoteAgents`,`entries`]),assertTotal(e.subagents.total,e.subagents.local,[`subagents`,`total`]),assertTotal(e.remoteAgents.total,e.remoteAgents.entries,[`remoteAgents`,`total`]);let n=[[e.agent.config,[`agent`,`config`]],...e.agent.model.source===void 0?[]:[[e.agent.model.source,[`agent`,`model`,`source`]]],...e.agent.model.routing.kind===`dynamic`?[[e.agent.model.routing.resolver,[`agent`,`model`,`routing`,`resolver`]]]:[],...e.channels.routes.map((e,t)=>[e,[`channels`,`routes`,t]]),...e.connections.map((e,t)=>[e,[`connections`,t]]),...e.hooks.map((e,t)=>[e,[`hooks`,t]]),...e.instructions.dynamic.map((e,t)=>[e,[`instructions`,`dynamic`,t]]),...e.instructions.static.map((e,t)=>[e,[`instructions`,`static`,t]]),...e.memories.map((e,t)=>[e,[`memories`,t]]),...e.instrumentation===void 0?[]:[[e.instrumentation,[`instrumentation`]]],...e.remoteAgents.entries.map((e,t)=>[e,[`remoteAgents`,`entries`,t]]),...e.schedules.map((e,t)=>[e,[`schedules`,t]]),...e.skills.dynamic.map((e,t)=>[e,[`skills`,`dynamic`,t]]),...e.skills.static.map((e,t)=>[e,[`skills`,`static`,t]]),...e.subagents.local.flatMap((e,t)=>e.configResolver===void 0?[]:[[e.configResolver,[`subagents`,`local`,t,`configResolver`]]]),...e.tools.dynamic.map((e,t)=>[e,[`tools`,`dynamic`,t]]),...e.tools.static.map((e,t)=>[e,[`tools`,`static`,t]]),[e.sandbox,[`sandbox`]]];for(let[e,r]of n)e.sourceKind===`module`&&e.binding===void 0?t.addIssue({code:`custom`,message:`Module source is missing its compiled binding.`,path:[...r,`binding`]}):e.sourceKind!==`module`&&e.sourceKind!==`unrecognized`&&e.binding!==void 0?t.addIssue({code:`custom`,message:`${e.sourceKind} source cannot carry a module binding.`,path:[...r,`binding`]}):e.binding!==void 0&&(e.binding.logicalPath!==e.logicalPath&&t.addIssue({code:`custom`,message:`Source and binding logical paths do not match.`,path:[...r,`binding`,`logicalPath`]}),JSON.stringify(e.binding.owner)!==JSON.stringify(e.owner)&&t.addIssue({code:`custom`,message:`Source and binding owners do not match.`,path:[...r,`binding`,`owner`]}))});function describeAgentInfoVersionMismatch(e){if(typeof e!=`object`||!e)return;let{kind:t,version:n}=e;return t!==`eve-agent-info`||typeof n!=`number`||n===5?void 0:`version: the server sent agent-info version ${n}, but this client reads version 5. ${n<5?`Upgrade eve in the agent and redeploy it`:`Upgrade the eve package this client runs from`}.`}function normalizeRoutePattern(e){return e.replace(/^\/+|\/+$/g,``).split(`/`).map(e=>e.startsWith(`:`)||/^\[[^\]]+\]$/.test(e)?`:`:e).join(`/`)}export{AGENT_INFO_VERSION,AgentInfoResultSchema,describeAgentInfoVersionMismatch};
@@ -75,6 +75,7 @@ export interface AgentInfoInstructionsEntry extends AgentInfoEntry {
75
75
  /** An inspected schedule. */
76
76
  export interface AgentInfoScheduleEntry extends AgentInfoEntry {
77
77
  readonly cron: string;
78
+ readonly timezone?: string;
78
79
  readonly hasRun: boolean;
79
80
  readonly markdown?: string;
80
81
  }
@@ -16,6 +16,7 @@
16
16
  "@clack/core": "1.3.1",
17
17
  "chokidar": "5.0.0",
18
18
  "commander": "14.0.3",
19
+ "croner": "11.0.0",
19
20
  "eventsource-parser": "3.1.0",
20
21
  "env-runner": "0.3.11",
21
22
  "@eve/catalog": "0.0.1",
@@ -61,7 +62,7 @@
61
62
  "zod": "4.6.7",
62
63
  "zod-validation-error": "5.0.0"
63
64
  },
64
- "scriptHash": "4a59c4be757a304488261bb58dca0d435dd973df8999dfb57a4468152520b38b",
65
+ "scriptHash": "8ea9a43cf5ffebb50e4483ac7a0cbe4f3875fee00e4a1721921211d028eed012",
65
66
  "toolVersions": {
66
67
  "env-runner>crossws": "0.4.17",
67
68
  "env-runner>srvx": "1.0.8",
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2021 Hexagon <github.com/Hexagon>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,8 @@
1
+ export class Cron {
2
+ constructor(
3
+ pattern: string,
4
+ options: { timezone: string; unref?: boolean },
5
+ callback: () => void | Promise<void>,
6
+ );
7
+ stop(): void;
8
+ }
@@ -0,0 +1 @@
1
+ function e(e){return Date.UTC(e.y,e.m-1,e.d,e.h,e.i,e.s)}function t(e,t){return e.y===t.y&&e.m===t.m&&e.d===t.d&&e.h===t.h&&e.i===t.i&&e.s===t.s}function n(e){let t=e.substring(9);return t.includes(`Z`)||t.includes(`+`)||t.includes(`-`)}function r(e,t){let r=new Date(Date.parse(e));if(isNaN(r))throw Error(`Invalid ISO8601 passed to timezone parser.`);return n(e)?{tp:p(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),`Etc/UTC`),ms:r.getUTCMilliseconds()}:{tp:p(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),t),ms:r.getMilliseconds()}}function i(e,t,n){let{tp:i,ms:o}=r(e,t);return new Date(a(i,n).getTime()+o)}function a(e,t){let n=o(e);if(n.kind===`single`)return n.date;if(n.kind===`ambiguous`)return n.earlier;if(t)throw Error(`Invalid date passed to fromTZ()`);return n.after}function o(n){let r=e(n),i=e=>c(new Date(e),n.tz),a=r-i(r),o=f(new Date(a),n.tz);if(t(o,n)){let r=e(o)-a,c=a-(i(a-s)-r);if(c<a&&t(f(new Date(c),n.tz),n))return{kind:`ambiguous`,earlier:new Date(c),later:new Date(a)};let l=a+(r-i(a+s));return l>a&&t(f(new Date(l),n.tz),n)?{kind:`ambiguous`,earlier:new Date(a),later:new Date(l)}:{kind:`single`,date:new Date(a)}}let l=r-(e(o)-a);return t(f(new Date(l),n.tz),n)?{kind:`single`,date:new Date(l)}:{kind:`gap`,before:new Date(Math.min(a,l)),after:new Date(Math.max(a,l))}}var s=108e5;function c(t,n){return e(f(t,n))-(t.getTime()-t.getUTCMilliseconds())}function l(e,t,n){let r=c(new Date(e),n);for(;t-e>1e3;){let i=e+Math.floor((t-e)/2e3)*1e3;c(new Date(i),n)===r?e=i:t=i}return t}function u(e,t){let n=o(f(new Date(e),t));if(n.kind===`ambiguous`)return e<n.later.getTime()?`earlier`:`later`}var d=new Map;function f(e,t){if(t===void 0)return p(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());let n=d.get(t),r;try{n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,hour12:!1}),d.set(t,n)),r=n.formatToParts(e)}catch(e){let n=e instanceof Error?e.message:String(e);throw RangeError(`toTZ: Invalid timezone '${t}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${n}`)}let i={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let e of r)(e.type===`year`||e.type===`month`||e.type===`day`||e.type===`hour`||e.type===`minute`||e.type===`second`)&&(i[e.type]=parseInt(e.value,10));if(isNaN(i.year)||isNaN(i.month)||isNaN(i.day)||isNaN(i.hour)||isNaN(i.minute)||isNaN(i.second))throw Error(`toTZ: Failed to parse all date components from timezone '${t}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(i)}`);return i.hour===24&&(i.hour=0),{y:i.year,m:i.month,d:i.day,h:i.hour,i:i.minute,s:i.second,tz:t}}function p(e,t,n,r,i,a,o){return{y:e,m:t,d:n,h:r,i,s:a,tz:o}}var m=[1,2,4,8,16],h=class e{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;isFixedTime;constructor(e,t,n){this.pattern=e,this.timezone=t,this.mode=n?.mode??`auto`,this.alternativeWeekdays=n?.alternativeWeekdays??!1,this.sloppyRanges=n?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.isFixedTime=!1,this.parse()}parse(){if(!(typeof this.pattern==`string`||this.pattern instanceof String))throw TypeError(`CronPattern: Pattern has to be of type string.`);this.pattern.indexOf(`@`)>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.match(/\S+/g)||[``],n=t.length;if(t.length<5||t.length>7)throw TypeError(`CronPattern: invalid configuration format ('`+this.pattern+`'), exactly five, six, or seven space separated parts are required.`);if(this.mode!==`auto`){let e;switch(this.mode){case`5-part`:e=5;break;case`6-part`:e=6;break;case`7-part`:e=7;break;case`5-or-6-parts`:e=[5,6];break;case`6-or-7-parts`:e=[6,7];break;default:e=0}if(!(Array.isArray(e)?e.includes(n):n===e)){let t=Array.isArray(e)?e.join(` or `):e.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${t} parts, but pattern '${this.pattern}' has ${n} parts.`)}}if(t.length===5&&t.unshift(`0`),t.length===6&&t.push(`*`),this.pattern.indexOf(`?`)>=0)for(let e=0;e<t.length;e++)t[e]=t[e].replace(/\?/g,`*`);if(t[3].toUpperCase()===`LW`?(this.lastWeekday=!0,t[3]=``):t[3].toUpperCase().indexOf(`L`)>=0&&(t[3]=t[3].replace(/L/gi,``),this.lastDayOfMonth=!0),t[3]==`*`&&(this.starDOM=!0),t[6]==`*`&&(this.starYear=!0),t[4].length>=3&&(t[4]=this.replaceAlpha(t[4],e.MONTH_NAMES)),t[5].length>=3&&(t[5]=this.alternativeWeekdays?this.replaceAlpha(t[5],e.DAY_NAMES_QUARTZ):this.replaceAlpha(t[5],e.DAY_NAMES)),t[5].startsWith(`+`)&&(this.useAndLogic=!0,t[5]=t[5].substring(1),t[5]===``))throw TypeError(`CronPattern: Day-of-week field cannot be empty after '+' modifier.`);switch(t[5]==`*`&&(this.starDOW=!0),this.mode){case`5-part`:t[0]=`0`,t[6]=`*`;break;case`6-part`:t[6]=`*`;break;case`5-or-6-parts`:t[6]=`*`}this.throwAtIllegalCharacters(t),this.partToArray(`second`,t[0],0,1),this.partToArray(`minute`,t[1],0,1),this.partToArray(`hour`,t[2],0,1),this.partToArray(`day`,t[3],-1,1),this.partToArray(`month`,t[4],-1,1);let r=this.alternativeWeekdays?-1:0;this.partToArray(`dayOfWeek`,t[5],r,63),this.partToArray(`year`,t[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7]);let i=(e,t)=>!e.includes(`*`)&&!e.includes(`/`)&&t.filter(e=>e).length===1;this.isFixedTime=i(t[0],this.second)&&i(t[1],this.minute)&&i(t[2],this.hour)}partToArray(e,t,n,r){let i=this[e];if(t===``&&(e!==`day`||!this.lastDayOfMonth&&!this.lastWeekday))throw TypeError(`CronPattern: configuration entry `+e+` (`+t+`) is empty, check for trailing spaces.`);if(t===`*`)return i.fill(r);let a=t.split(`,`);if(a.length>1)for(let t of a)this.partToArray(e,t,n,r);else t.includes(`-`)&&t.includes(`/`)?this.handleRangeWithStepping(t,e,n,r):t.includes(`-`)?this.handleRange(t,e,n,r):t.includes(`/`)?this.handleStepping(t,e,n,r):t!==``&&this.handleNumber(t,e,n,r)}throwAtIllegalCharacters(e){for(let t=0;t<e.length;t++)if((t===3?/[^/*0-9,\-WwLl]+/:t===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(e[t]))throw TypeError(`CronPattern: configuration entry `+t+` (`+e[t]+`) contains illegal characters.`)}handleNumber(e,t,n,r){let i=this.extractNth(e,t),a=e.toUpperCase().includes(`W`);if(t!==`day`&&a)throw TypeError(`CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.`);a&&(t=`nearestWeekdays`);let o=parseInt(i[0],10)+n;if(isNaN(o))throw TypeError(`CronPattern: `+t+` is not a number: '`+e+`'`);this.setPart(t,o,i[1]||r)}setPart(e,t,n){if(!Object.prototype.hasOwnProperty.call(this,e))throw TypeError(`CronPattern: Invalid part specified: `+e);if(e===`dayOfWeek`){if(t===7&&(t=0),t<0||t>6)throw RangeError(`CronPattern: Invalid value for dayOfWeek: `+t);this.setNthWeekdayOfMonth(t,n)}else{if(e===`second`||e===`minute`){if(t<0||t>=60)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`hour`){if(t<0||t>=24)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`day`||e===`nearestWeekdays`){if(t<0||t>=31)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`month`){if(t<0||t>=12)throw RangeError(`CronPattern: Invalid value for `+e+`: `+t)}else if(e===`year`&&(t<1||t>=1e4))throw RangeError(`CronPattern: Invalid value for `+e+`: `+t+` (supported range: 1-9999)`);this[e][t]=n}}validateNotNaN(e,t){if(isNaN(e))throw TypeError(t)}validateRange(e,t,n,r,i){if(e>t)throw TypeError(`CronPattern: From value is larger than to value: '`+i+`'`);if(n!==void 0){if(n===0)throw TypeError(`CronPattern: Syntax error, illegal stepping: 0`);if(n>this[r].length)throw TypeError(`CronPattern: Syntax error, steps cannot be greater than maximum value of part (`+this[r].length+`)`)}}handleRangeWithStepping(e,t,n,r){if(e.toUpperCase().includes(`W`))throw TypeError(`CronPattern: Syntax error, W is not allowed in ranges with stepping.`);let i=this.extractNth(e,t),a=i[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(a===null)throw TypeError(`CronPattern: Syntax error, illegal range with stepping: '`+e+`'`);let[,o,s,c]=a,l=parseInt(o,10)+n,u=parseInt(s,10)+n,d=parseInt(c,10);this.validateNotNaN(l,`CronPattern: Syntax error, illegal lower range (NaN)`),this.validateNotNaN(u,`CronPattern: Syntax error, illegal upper range (NaN)`),this.validateNotNaN(d,`CronPattern: Syntax error, illegal stepping: (NaN)`),this.validateRange(l,u,d,t,e);for(let e=l;e<=u;e+=d)this.setPart(t,e,i[1]||r)}extractNth(e,t){let n=e,r;if(n.includes(`#`)){if(t!==`dayOfWeek`)throw Error(`CronPattern: nth (#) only allowed in day-of-week field`);r=n.split(`#`)[1],n=n.split(`#`)[0]}else if(n.toUpperCase().endsWith(`L`)){if(t!==`dayOfWeek`)throw Error(`CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)`);r=`L`,n=n.slice(0,-1)}return[n,r]}handleRange(e,t,n,r){if(e.toUpperCase().includes(`W`))throw TypeError(`CronPattern: Syntax error, W is not allowed in a range.`);let i=this.extractNth(e,t),a=i[0].split(`-`);if(a.length!==2)throw TypeError(`CronPattern: Syntax error, illegal range: '`+e+`'`);let o=parseInt(a[0],10)+n,s=parseInt(a[1],10)+n;this.validateNotNaN(o,`CronPattern: Syntax error, illegal lower range (NaN)`),this.validateNotNaN(s,`CronPattern: Syntax error, illegal upper range (NaN)`),this.validateRange(o,s,void 0,t,e);for(let e=o;e<=s;e++)this.setPart(t,e,i[1]||r)}handleStepping(e,t,n,r){if(e.toUpperCase().includes(`W`))throw TypeError(`CronPattern: Syntax error, W is not allowed in parts with stepping.`);let i=this.extractNth(e,t),a=i[0].split(`/`);if(a.length!==2)throw TypeError(`CronPattern: Syntax error, illegal stepping: '`+e+`'`);if(this.sloppyRanges)a[0]===``&&(a[0]=`*`);else{if(a[0]===``)throw TypeError(`CronPattern: Syntax error, stepping with missing prefix ('`+e+`') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.`);if(a[0]!==`*`)throw TypeError(`CronPattern: Syntax error, stepping with numeric prefix ('`+e+`') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.`)}let o=0;a[0]!==`*`&&(o=parseInt(a[0],10)+n);let s=parseInt(a[1],10);this.validateNotNaN(s,`CronPattern: Syntax error, illegal stepping: (NaN)`),this.validateRange(0,this[t].length-1,s,t,e);for(let e=o;e<this[t].length;e+=s)t===`year`&&e===0||this.setPart(t,e,i[1]||r)}replaceAlpha(e,t){let n=e;for(let[e,r]of Object.entries(t))n=n.replace(new RegExp(e,`gi`),r);return n}static DAY_NAMES={"-sun":`-7`,sun:`0`,mon:`1`,tue:`2`,wed:`3`,thu:`4`,fri:`5`,sat:`6`};static DAY_NAMES_QUARTZ={sun:`1`,mon:`2`,tue:`3`,wed:`4`,thu:`5`,fri:`6`,sat:`7`};static MONTH_NAMES={jan:`1`,feb:`2`,mar:`3`,apr:`4`,may:`5`,jun:`6`,jul:`7`,aug:`8`,sep:`9`,oct:`10`,nov:`11`,dec:`12`};static NICKNAME_MAP={"@yearly":`0 0 1 1 *`,"@annually":`0 0 1 1 *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * 0`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`};handleNicknames(t){let n=t.trim().toLowerCase();if(n===`@reboot`)throw TypeError(`CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.`);return e.NICKNAME_MAP[n]||t}setNthWeekdayOfMonth(e,t){if(typeof t!=`number`&&t.toUpperCase()===`L`)this.dayOfWeek[e]=this.dayOfWeek[e]|32;else if(t===63)this.dayOfWeek[e]=63;else if(t<6&&t>0)this.dayOfWeek[e]=this.dayOfWeek[e]|m[t-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${t}, Type: ${typeof t}`)}},g=[31,28,31,30,31,30,31,31,30,31,30,31],_=[[`month`,`year`,0],[`day`,`month`,-1],[`hour`,`day`,0],[`minute`,`hour`,0],[`second`,`minute`,0]],v=class e{tz;instantMs;instantFields;ms;second;minute;hour;day;month;year;constructor(t,n){if(this.tz=n,t&&t instanceof Date){if(!isNaN(t))this.fromDate(t);else throw TypeError(`CronDate: Invalid date passed to CronDate constructor`)}else if(t==null)this.fromDate(new Date);else if(t&&typeof t==`string`)this.fromString(t);else if(t instanceof e)this.fromCronDate(t);else throw TypeError(`CronDate: Invalid type (`+typeof t+`) passed to CronDate constructor`)}getLastDayOfMonth(e,t){return t===1?new Date(Date.UTC(e,t+1,0)).getUTCDate():g[t]}getLastWeekday(e,t){let n=this.getLastDayOfMonth(e,t),r=new Date(Date.UTC(e,t,n)).getUTCDay();return r===0?n-2:r===6?n-1:n}getNearestWeekday(e,t,n){let r=this.getLastDayOfMonth(e,t);if(n>r)return-1;let i=new Date(Date.UTC(e,t,n)).getUTCDay();return i===0?n===r?n-2:n+1:i===6?n===1?n+2:n-1:n}isNthWeekdayOfMonth(e,t,n,r){let i=new Date(Date.UTC(e,t,n)).getUTCDay(),a=0;for(let r=1;r<=n;r++)new Date(Date.UTC(e,t,r)).getUTCDay()===i&&a++;if(r&63&&m[a-1]&r)return!0;if(r&32){let r=this.getLastDayOfMonth(e,t);for(let a=n+1;a<=r;a++)if(new Date(Date.UTC(e,t,a)).getUTCDay()===i)return!1;return!0}return!1}fromDate(e){if(this.tz!==void 0){if(typeof this.tz==`number`)this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else try{let t=f(e,this.tz);this.ms=e.getMilliseconds(),this.second=t.s,this.minute=t.i,this.hour=t.h,this.day=t.d,this.month=t.m-1,this.year=t.y,this.cacheInstant(e.getTime()-this.ms)}catch(e){let t=e instanceof Error?e.message:String(e);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${t}`)}}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear(),this.cacheInstant(e.getTime()-this.ms)}cacheInstant(e){this.instantMs=e;let{year:t,month:n,day:r,hour:i,minute:a,second:o}=this;this.instantFields=[t,n,r,i,a,o,this.tz]}cachedInstant(){let e=this.instantFields;if(e!==void 0&&e[6]===this.tz&&e[5]===this.second&&e[4]===this.minute&&e[3]===this.hour&&e[2]===this.day&&e[1]===this.month&&e[0]===this.year)return this.instantMs}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms,this.instantMs=e.instantMs,this.instantFields=e.instantFields}apply(){if(this.month>11||this.month<0||this.day>this.getLastDayOfMonth(this.year,this.month)||this.day<1||this.hour>23||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let e=new Date(0);return e.setUTCFullYear(this.year,this.month,this.day),e.setUTCHours(this.hour,this.minute,this.second,this.ms),this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}return!1}fromString(e){if(typeof this.tz==`number`){if(n(e))return this.fromDate(i(e));let t=i(e,`Etc/UTC`);this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes(),this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),this.apply()}else return this.fromDate(i(e,this.tz))}findNext(e,t,n,r){return this._findMatch(e,t,n,r,1)}_matchDayValue(e,t,n,r){let i=e;if(!i){for(let e=0;e<n.nearestWeekdays.length;e++)if(n.nearestWeekdays[e]){let n=this.getNearestWeekday(this.year,this.month,e+1);if(n!==-1&&n===t){i=1;break}}}if(n.lastWeekday&&t===this.getLastWeekday(this.year,this.month)&&(i=1),n.lastDayOfMonth&&t===this.getLastDayOfMonth(this.year,this.month)&&(i=1),!n.starDOW){let e=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),a=n.dayOfWeek[(e+(t-1))%7];a&&a&63&&(a=+!!this.isNthWeekdayOfMonth(this.year,this.month,t,a)),n.useAndLogic?i&&=a:!r.domAndDow&&!n.starDOM?i||=a:i&&=a}return i}_findMatch(e,t,n,r,i){let a=this[t],o=this[t]+r,s=i===1?e=>e<n[t].length:e=>e>=0;for(let c=o;s(c);c+=i){let i=n[t][c];if(t===`day`&&(i=this._matchDayValue(i,c-r,n,e)),i)return this[t]=c-r,a===this[t]?1:2}return 3}recurse(e,t,n){let r=this.year,i=n;for(;typeof i==`number`;){if(e.starYear&&Math.abs(this.year-r)>400)return null;i=this.recurseStep(e,t,i)}return i}recurseStep(e,t,n){if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let t=-1;for(let n=this.year+1;n<e.year.length&&n<1e4;n++)if(e.year[n]===1){t=n;break}if(t===-1)return null;this.year=t,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let r=this.findNext(t,_[n][0],e,_[n][2]);if(r>1){let t=n+1;for(;t<_.length;)this[_[t][0]]=-_[t][2],t++;if(r===3){if(this[_[n][1]]++,this[_[n][0]]=-_[n][2],this.apply(),n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=e.year.length)return null}return 0}if(this.apply())return n-1}return n+=1,n>=_.length?this:(e.starYear?this.year>=3e3:this.year>=1e4)?null:n}increment(e,t,n){return this.instantMs=void 0,this.instantFields=void 0,this.second+=t.interval!==void 0&&t.interval>1&&n?t.interval:1,this.ms=0,this.apply(),this.recurse(e,t,0)}decrement(e,t){return this.instantMs=void 0,this.instantFields=void 0,this.second-=t.interval!==void 0&&t.interval>1?t.interval:1,this.ms=0,this.apply(),this.recurseBackward(e,t,0)}recurseBackward(e,t,n){let r=this.year,i=n;for(;typeof i==`number`;){if(e.starYear&&Math.abs(this.year-r)>400)return null;i=this.recurseBackwardStep(e,t,i)}return i}recurseBackwardStep(e,t,n){if(n===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let t=-1;for(let n=this.year-1;n>=0;n--)if(e.year[n]===1){t=n;break}if(t===-1)return null;this.year=t,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let r=this.findPrevious(t,_[n][0],e,_[n][2]);if(r>1){let t=n+1;for(;t<_.length;){let n=_[t][0],r=_[t][2],i=this.getMaxPatternValue(n,e,r);this[n]=i,t++}if(r===3){if(this[_[n][1]]--,n===0){let e=this.getLastDayOfMonth(this.year,this.month);this.day>e&&(this.day=e)}if(n===1){if(this.day<=0)this.day=1;else{let e=this.year,t=this.month;for(;t<0;)t+=12,e--;for(;t>11;)t-=12,e++;let n=this.getLastDayOfMonth(e,t);this.day>n&&(this.day=n)}}this.apply();let t=_[n][0],r=_[n][2];if(this[t]=this.getMaxPatternValue(t,e,r),this.apply(),n===0){let t=_[1][2],n=this.getMaxPatternValue(`day`,e,t);n!==this.day&&(this.day=n,this.hour=this.getMaxPatternValue(`hour`,e,_[2][2]),this.minute=this.getMaxPatternValue(`minute`,e,_[3][2]),this.second=this.getMaxPatternValue(`second`,e,_[4][2]))}if(n===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0;)this.year--;if(this.year<0)return null}return 0}if(this.apply())return n-1}return n+=1,n>=_.length?this:this.year<0?null:n}getMaxPatternValue(e,t,n){let r=t[e].length-1-n;for(let i=t[e].length-1;i>=0;i--)if(t[e][i]){r=i-n;break}if(e===`day`){let e=this.getLastDayOfMonth(this.year,this.month);return t.lastDayOfMonth||!t.starDOW?e:Math.min(r,e)}return r}findPrevious(e,t,n,r){return this._findMatch(e,t,n,r,-1)}getDate(e){if(!e&&typeof this.tz!=`number`){let e=this.cachedInstant();if(e!==void 0)return new Date(e+(this.tz===void 0?this.ms:0))}return e||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz==`number`?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):a(p(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(e,t){if(!e.starYear&&(this.year<0||this.year>=e.year.length||e.year[this.year]===0))return!1;for(let n=0;n<_.length;n++){let r=_[n][0],i=_[n][2],a=this[r];if(a+i<0||a+i>=e[r].length)return!1;let o=e[r][a+i];if(r===`day`&&(o=this._matchDayValue(o,a,e,t)),!o)return!1}return!0}};function y(e){e===void 0&&(e={}),delete e.name,e.legacyMode!==void 0&&e.domAndDow===void 0?e.domAndDow=!e.legacyMode:e.domAndDow===void 0&&(e.domAndDow=!1),e.legacyMode=!e.domAndDow;let t=(e,t)=>e===void 0?t:e;if(e.paused=t(e.paused,!1),e.maxRuns=t(e.maxRuns,1/0),e.catch=t(e.catch,!1),e.unref=t(e.unref,!1),e.mode=t(e.mode,`auto`),e.alternativeWeekdays=t(e.alternativeWeekdays,!1),e.sloppyRanges=t(e.sloppyRanges,!1),e.allowPast=t(e.allowPast,!1),e.interval=e.interval===void 0?0:parseInt(e.interval.toString(),10),e.utcOffset=e.utcOffset===void 0?void 0:parseInt(e.utcOffset.toString(),10),e.dayOffset=e.dayOffset===void 0?0:parseInt(e.dayOffset.toString(),10),![`auto`,`5-part`,`6-part`,`7-part`,`5-or-6-parts`,`6-or-7-parts`].includes(e.mode))throw Error(`CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.`);e.timezone===``&&(e.timezone=void 0);let n=e.timezone??e.utcOffset;if(e.startAt&&(e.startAt=b(new v(e.startAt,n))),e.stopAt&&(e.stopAt=b(new v(e.stopAt,n))),e.interval!==null){if(isNaN(e.interval))throw Error(`CronOptions: Supplied value for interval is not a number`);if(e.interval<0)throw Error(`CronOptions: Supplied value for interval can not be negative`)}if(e.utcOffset!==void 0){if(isNaN(e.utcOffset))throw Error(`CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.`);if(e.utcOffset<-870||e.utcOffset>870)throw Error(`CronOptions: utcOffset out of bounds.`);if(e.utcOffset!==void 0&&e.timezone)throw Error(`CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.`)}if(e.unref!==!0&&e.unref!==!1)throw Error(`CronOptions: Unref should be either true, false or undefined(false).`);if(e.dayOffset!==void 0&&e.dayOffset!==0&&isNaN(e.dayOffset))throw Error(`CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.`);return e}function b(e){return e.ms?(e.ms=0,new v(new Date(e.getTime()+1e3),e.tz)):e}function x(e){return typeof e==`function`}function S(e){return x(e)}function C(e){typeof Deno<`u`&&typeof Deno.unrefTimer<`u`?Deno.unrefTimer(e):e&&typeof e.unref<`u`&&e.unref()}var w=864e5,T=3e4,E=[],D=class{name;options;_states;fn;_startAtRoundingMs=0;getTz(){return this.options.timezone??this.options.utcOffset}applyDayOffset(e){let t=this._offsetMs();return t?new Date(e.getTime()+t):e}_offsetMs(){return(this.options.dayOffset??0)*w}get _startAt(){return this.options.startAt}get _stopAt(){return this.options.stopAt}_nextTarget(e,t){let n=this._offsetMs(),r=this._next(this._shift(e),new Date(t.getTime()-n),{startAt:this._shift(this._startAt),stopAt:this._shift(this._stopAt)});return r?this.applyDayOffset(r.getDate(!1)):null}_previousTarget(e,t){let n=this._previous(this._shift(e??t),{startAt:this._shift(this._startAt),stopAt:this._shift(this._stopAt)});return n?this.applyDayOffset(n.getDate(!1)):null}_shift(e){if(e!=null)return new v(new Date(this._toMs(e)-this._offsetMs()),this.getTz())}constructor(e,t,n){let r,i;if(x(t))i=t;else if(typeof t==`object`)r=t;else if(t!==void 0)throw Error(`Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).`);if(x(n))i=n;else if(typeof n==`object`)r=n;else if(n!==void 0)throw Error(`Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).`);this.name=r?.name;let a=r?.startAt;if(this.options=y(r),a&&this._startAt&&(this._startAtRoundingMs=this._startAt.getTime()-new v(a,this.getTz()).getTime()),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:r?r.maxRuns:void 0,paused:r?r.paused:!1,pattern:new h(`* * * * *`,void 0,{mode:`auto`})},e&&(e instanceof Date||typeof e==`string`&&e.indexOf(`:`)>0)?this._states.once=new v(e,this.getTz()):this._states.pattern=new h(e,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(E.find(e=>e.name===this.name))throw Error(`Cron: Tried to initialize new named job '`+this.name+`', but name already taken.`);E.push(this)}return i!==void 0&&S(i)&&(this.fn=i,this.schedule()),this}nextRun(e){return this._nextTarget(e,new Date)}nextRuns(e,t){this._states.maxRuns!==void 0&&e>this._states.maxRuns&&(e=this._states.maxRuns);let n=t||this._states.currentRun||void 0;return this._enumerateRuns(e,n,`next`)}previousRuns(e,t){return this._enumerateRuns(e,t||void 0,`previous`)}enumerate(e){return new O(this,e)}_enumerateRuns(e,t,n){let r=[],i=new Date,a=t;for(;e-->0;){let e=n===`next`?this._nextTarget(a,i):this._previousTarget(a,i);if(!e)break;r.push(e),a=e}return r}match(e){if(this._states.once){let t=new v(e,this.getTz());t.ms=0;let n=new v(this._states.once,this.getTz());return n.ms=0,t.getTime()===n.getTime()}let t=new v(e,this.getTz());return t.ms=0,t.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){return!this._states.paused&&!this._states.kill&&this.fn!==void 0&&this._nextTarget(this._states.currentRun,new Date)!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(e){let t=new Date,n=this._nextTarget(e,t);return n?n.getTime()-this._toMs(e??t):null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let e=E.indexOf(this);e>=0&&E.splice(e,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(e){return this._schedule(e)}_schedule(e,t){if(e&&this.fn)throw Error(`Cron: It is not allowed to schedule two functions using the same Croner instance.`);e&&(this.fn=e);let n=t??new Date,r=this._nextTarget(void 0,n),i=r?r.getTime()-n.getTime():null,a=this._states.currentRun;a&&a.getTime()>n.getTime()&&(a=void 0);let o=this._nextTarget(a,n);return i===null||isNaN(i)||o===null||(i>T&&(i=T),i<0&&(i=this._states.paused?1e3:0),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(o),i),this._states.currentTimeout&&this.options.unref&&C(this._states.currentTimeout)),this}async _trigger(e=new Date){this._states.blocking=!0,this._states.currentRun=new v(e,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(e){if(x(this.options.catch))try{this.options.catch(e,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new v(e,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(e){let t=new Date,n=!this._states.paused&&t.getTime()>=e.getTime(),r=this._states.blocking&&this.options.protect;n&&!r?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger(t)):n&&r&&x(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this._schedule(void 0,n?void 0:t)}_next(e,t,n){let r=n?n.startAt:this._startAt,i=n?n.stopAt:this._stopAt,a=!!e,o=!!(e||this._states.currentRun),s=!1;!e&&r&&this.options.interval&&(e=this._calculatePreviousRun(r,t),e&&(o=!0),s=!e);let c=e??t??new Date,l=this._toMs(c);e=new v(c,this.getTz()),r&&l<r.getTime()&&(e=s?r:new v(new Date(r.getTime()-1e3),this.getTz()),l=e.getTime());let u=this._states.once||new v(e,this.getTz());if(!s&&u!==this._states.once&&(u=this._findOccurrence(e,l,1,o)),this._states.once){let e=this._states.once.getTime(),t=l-e;if(r&&e<r.getTime()-this._startAtRoundingMs||this._states.currentRun&&this.applyDayOffset(this._states.once.getDate()).getTime()<=this._states.currentRun.getTime()||(a?t>=0:t>1e3&&!this.options.allowPast))return null}return u===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||i&&u.getTime()>=i.getTime()?null:u}_previous(e,t){let n=this._toMs(e??new Date);if(t.stopAt&&n>t.stopAt.getTime()&&(n=t.stopAt.getTime()),this._states.once)return this._states.once.getTime()<n?this._states.once:null;let r=this._findOccurrence(new v(new Date(n),this.getTz()),n,-1);return r===null||t.startAt&&r.getTime()<t.startAt.getTime()?null:r}_toMs(e){return e instanceof Date?e.getTime():new v(e,this.getTz()).getTime()}_findOccurrence(e,t,n,r=!1){let i=this._walk(e,t,n,r),a=this.getTz();if(this._states.pattern.isFixedTime&&n===1||typeof a==`number`||u(t,a)!==(n===1?`earlier`:`later`))return i;let o=Math.floor(t/1e3)*1e3,s=n===1?l(o,o+w,a):l(o-w,o,a)-1e3;if(i&&(s-i.getTime())*n>0)return i;let c=this._walk(new v(new Date(s),a),s-n,n,!1,!0);return!i||!c?i??c:(i.getTime()-c.getTime())*n>0?c:i}_walk(e,t,n,r,i=!1){let a=this._states.pattern,o=(e,t)=>n===1?e.increment(a,this.options,t):e.decrement(a,this.options),s=new v(e,this.getTz());for(i&&s.match(a,this.options)||(s=o(s,r));s;){let e=this._runAt(s,t,n);if(e)return new v(e,this.getTz());s=o(s,!1)}return null}_runAt(e,t,n){let r=e=>(e.getTime()-t)*n>0,i=e.tz;if(typeof i==`number`){let t=e.getDate();return r(t)?t:null}let a=p(e.year,e.month+1,e.day,e.hour,e.minute,e.second,i),s=o(a),c=this._states.pattern.isFixedTime;if(s.kind===`single`)return r(s.date)?s.date:null;if(s.kind===`ambiguous`){let{earlier:e,later:t}=s;return(c?[e]:n===1?[e,t]:[t,e]).find(r)??null}if(!c)return null;let u=new Date(l(s.before.getTime(),s.after.getTime(),i)),d=f(u,i);return d.y===a.y&&d.m===a.m&&d.d===a.d&&r(u)?u:null}_calculatePreviousRun(e,t){let n=new v(t,this.getTz()).getTime();if(e.getTime()>n)return;let r=this.options.interval*1e3,i=e;for(;i.getTime()+r<=n;){let e=new v(i,this.getTz()).increment(this._states.pattern,this.options,!0);if(e===null)break;i=e}return i}},O=class{cron;cursor;now;done;initialMaxRuns;remainingRuns;constructor(e,t){this.cron=e,this.initialMaxRuns=e.runsLeft()??1/0,this.reset(t)}next(){if(this.done||this.remainingRuns<=0)return this.done=!0,{value:void 0,done:!0};let e=this.cron._nextTarget(this.cursor,this.now);return e===null?(this.done=!0,{value:void 0,done:!0}):(this.cursor=e,this.remainingRuns--,{value:e,done:!1})}peek(){return this.done||this.remainingRuns<=0?null:this.cron._nextTarget(this.cursor,this.now)}reset(e){this.cursor=e instanceof Date?new Date(e.getTime()):e??void 0,this.now=new Date,this.done=!1,this.remainingRuns=this.initialMaxRuns}[Symbol.iterator](){return this}};export{D as Cron,v as CronDate,O as CronIterator,h as CronPattern,E as scheduledJobs};
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The compiled-artifact contract the runtime reads: kinds, versions and shapes, with no imports
3
+ * from the compiler's build side, so loading compiled artifacts doesn't load the compiler.
4
+ */
5
+ import type { DiscoverDiagnosticsSummary } from "#discover/diagnostics.js";
6
+ /**
7
+ * Stable compile metadata artifact kind emitted by the compiler.
8
+ */
9
+ export declare const COMPILE_METADATA_KIND = "eve-compile-metadata";
10
+ /**
11
+ * Current compile metadata schema version.
12
+ */
13
+ export declare const COMPILE_METADATA_VERSION = 6;
14
+ /**
15
+ * One artifact digest recorded in compile metadata.
16
+ */
17
+ interface CompileArtifactDigest {
18
+ path: string;
19
+ sha256: string;
20
+ }
21
+ /**
22
+ * Minimal compiler metadata artifact with versioning and hashes.
23
+ */
24
+ export interface CompileMetadata {
25
+ compile: {
26
+ manifest: CompileArtifactDigest;
27
+ moduleMap: CompileArtifactDigest;
28
+ };
29
+ discovery: {
30
+ diagnostics: CompileArtifactDigest;
31
+ manifest: CompileArtifactDigest;
32
+ sourceGraphHash: string;
33
+ summary: DiscoverDiagnosticsSummary;
34
+ };
35
+ generator: {
36
+ name: string;
37
+ version: string;
38
+ };
39
+ kind: typeof COMPILE_METADATA_KIND;
40
+ status: "failed" | "ready";
41
+ version: typeof COMPILE_METADATA_VERSION;
42
+ }
43
+ export {};
@@ -0,0 +1 @@
1
+ const COMPILE_METADATA_KIND=`eve-compile-metadata`;const COMPILE_METADATA_VERSION=6;export{COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION};
@@ -1,6 +1,7 @@
1
1
  import type { DiscoverDiagnostic, DiscoverDiagnosticsSummary } from "#discover/diagnostics.js";
2
2
  import type { AgentSourceManifest } from "#discover/manifest.js";
3
3
  import type { CompiledAgentManifest } from "#compiler/manifest.js";
4
+ import { type CompileMetadata } from "#compiler/artifact-contract.js";
4
5
  import { type CompilerDiagnostic } from "#compiler/diagnostics.js";
5
6
  import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
6
7
  /**
@@ -11,14 +12,6 @@ declare const COMPILER_DIAGNOSTICS_ARTIFACT_KIND = "eve-compiler-diagnostics";
11
12
  * Current diagnostics artifact schema version.
12
13
  */
13
14
  declare const COMPILER_DIAGNOSTICS_ARTIFACT_VERSION = 2;
14
- /**
15
- * Stable compile metadata artifact kind emitted by the compiler.
16
- */
17
- export declare const COMPILE_METADATA_KIND = "eve-compile-metadata";
18
- /**
19
- * Current compile metadata schema version.
20
- */
21
- export declare const COMPILE_METADATA_VERSION = 6;
22
15
  /**
23
16
  * Structured paths for compiler-owned artifacts under `.eve/`.
24
17
  */
@@ -43,35 +36,6 @@ interface CompilerDiagnosticsArtifact {
43
36
  summary: DiscoverDiagnosticsSummary;
44
37
  version: typeof COMPILER_DIAGNOSTICS_ARTIFACT_VERSION;
45
38
  }
46
- /**
47
- * One artifact digest recorded in compile metadata.
48
- */
49
- interface CompileArtifactDigest {
50
- path: string;
51
- sha256: string;
52
- }
53
- /**
54
- * Minimal compiler metadata artifact with versioning and hashes.
55
- */
56
- export interface CompileMetadata {
57
- compile: {
58
- manifest: CompileArtifactDigest;
59
- moduleMap: CompileArtifactDigest;
60
- };
61
- discovery: {
62
- diagnostics: CompileArtifactDigest;
63
- manifest: CompileArtifactDigest;
64
- sourceGraphHash: string;
65
- summary: DiscoverDiagnosticsSummary;
66
- };
67
- generator: {
68
- name: string;
69
- version: string;
70
- };
71
- kind: typeof COMPILE_METADATA_KIND;
72
- status: "failed" | "ready";
73
- version: typeof COMPILE_METADATA_VERSION;
74
- }
75
39
  export interface CompilerArtifactLocations {
76
40
  readonly publishedRoot: string;
77
41
  readonly writeRoot: string;
@@ -1 +1 @@
1
- import{createHash}from"node:crypto";import{mkdir,writeFile}from"node:fs/promises";import{join,relative,resolve}from"node:path";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{projectDiscoverDiagnostic,summarizeCompilerDiagnostics}from"#compiler/diagnostics.js";import{createCompiledRuntimeModelCatalogLoader}from"#compiler/model-catalog.js";import{createCompiledModuleMapSource}from"#compiler/module-map.js";import{compileAgentManifest}from"#compiler/normalize-manifest.js";import{materializeWorkspaceResources}from"#compiler/workspace-resources.js";import{createSandboxPreparedArtifactsManifest}from"#shared/sandbox-prepared-artifacts.js";const COMPILE_METADATA_KIND=`eve-compile-metadata`;const COMPILE_METADATA_VERSION=6;function resolveCompilerArtifactPaths(e){return resolveCompilerArtifactPathsAt(e,join(resolve(e),`.eve`))}function resolveCompilerArtifactPathsAt(e,t){let n=resolve(e);let r=resolve(t);let i=join(r,`discovery`);let a=join(r,`compile`);return{appRoot:n,compiledManifestPath:join(a,`compiled-agent-manifest.json`),compileDirectoryPath:a,compileMetadataPath:join(a,`compile-metadata.json`),diagnosticsPath:join(i,`diagnostics.json`),discoveryManifestPath:join(i,`agent-discovery-manifest.json`),discoveryDirectoryPath:i,modelMetadataPath:join(a,`model-metadata.json`),moduleMapPath:join(a,`module-map.mjs`),sandboxPreparedArtifactsPath:join(a,`sandbox-prepared-artifacts.json`)}}function createCompilerDiagnosticsArtifact(e){return{diagnostics:[...e],kind:`eve-compiler-diagnostics`,summary:summarizeCompilerDiagnostics(e),version:2}}function createCompileMetadata(e){let t=resolveInstalledPackageInfo();let n=createContentHash(e.compiledManifestJson);let r=createContentHash(e.discoveryManifestJson);let i=createContentHash(e.diagnosticsArtifactJson);let a=createContentHash(e.moduleMapSource);return{compile:{manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.compiledManifestPath),sha256:n},moduleMap:{path:toArtifactRelativePath(e.appRoot,e.paths.moduleMapPath),sha256:a}},discovery:{diagnostics:{path:toArtifactRelativePath(e.appRoot,e.paths.diagnosticsPath),sha256:i},manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.discoveryManifestPath),sha256:r},sourceGraphHash:createContentHash(`${n}:${r}:${i}:${a}`),summary:e.diagnosticsSummary},generator:{name:t.name,version:t.version},kind:COMPILE_METADATA_KIND,status:e.diagnosticsSummary.errors>0?`failed`:`ready`,version:6}}async function writeCompilerArtifacts(e){let t=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.writeRoot);let n=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.publishedRoot);let r=e.diagnostics.map(e=>projectDiscoverDiagnostic(e,ROOT_COMPILED_AGENT_NODE_ID));let i=createCompiledRuntimeModelCatalogLoader(e.manifest.appRoot);(await i.loadModelMetadata()).fetchedAt===null&&r.push(createModelMetadataUnavailableDiagnostic(t.modelMetadataPath));let a=await materializeWorkspaceResources({compileDirectoryPath:t.compileDirectoryPath,manifest:await compileAgentManifest(e.manifest,{developmentExtensions:e.developmentExtensions,diagnostics:r,modelCatalog:i})});let o=await i.loadModelMetadata();let s=createCompilerDiagnosticsArtifact(r);let c=serializeArtifactJson(a);let l=serializeArtifactJson(e.manifest);let u=serializeArtifactJson(s);let d=createCompiledModuleMapSource({manifest:a,moduleMapPath:n.moduleMapPath});let f=createCompileMetadata({appRoot:e.appRoot,compiledManifestJson:c,diagnosticsArtifactJson:u,diagnosticsSummary:s.summary,discoveryManifestJson:l,moduleMapSource:d,paths:n});let p=serializeArtifactJson(f);let m=serializeArtifactJson(createSandboxPreparedArtifactsManifest([]));return await mkdir(t.discoveryDirectoryPath,{recursive:!0}),await mkdir(t.compileDirectoryPath,{recursive:!0}),await Promise.all([writeFile(t.compiledManifestPath,c),writeFile(t.diagnosticsPath,u),writeFile(t.discoveryManifestPath,l),writeFile(t.moduleMapPath,d),writeFile(t.compileMetadataPath,p),writeFile(t.modelMetadataPath,serializeArtifactJson(o)),writeFile(t.sandboxPreparedArtifactsPath,m)]),{compiledManifest:a,diagnosticsArtifact:s,metadata:f,moduleMapSource:d,paths:t}}function createModelMetadataUnavailableDiagnostic(e){return{code:`compile/model-metadata-unavailable`,message:`The AI Gateway model catalog was unavailable, so this build has no model metadata. Runtime model selections that omit modelContextWindowTokens, such as dynamic models and ctx.agent() model overrides, fail until you rebuild with network access to ai-gateway.vercel.sh or set modelContextWindowTokens on each selection.`,severity:`warning`,sources:[{nodeId:ROOT_COMPILED_AGENT_NODE_ID,sourcePath:e}]}}function createContentHash(e){return createHash(`sha256`).update(e).digest(`hex`)}function serializeArtifactJson(e){return`${JSON.stringify(e,null,2)}\n`}function toArtifactRelativePath(e,t){return normalizeLogicalPath(relative(resolve(e),t))}export{COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION,createCompileMetadata,resolveCompilerArtifactPaths,writeCompilerArtifacts};
1
+ import{createHash}from"node:crypto";import{mkdir,writeFile}from"node:fs/promises";import{join,relative,resolve}from"node:path";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION}from"#compiler/artifact-contract.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{projectDiscoverDiagnostic,summarizeCompilerDiagnostics}from"#compiler/diagnostics.js";import{createCompiledRuntimeModelCatalogLoader}from"#compiler/model-catalog.js";import{createCompiledModuleMapSource}from"#compiler/module-map.js";import{compileAgentManifest}from"#compiler/normalize-manifest.js";import{materializeWorkspaceResources}from"#compiler/workspace-resources.js";import{createSandboxPreparedArtifactsManifest}from"#shared/sandbox-prepared-artifacts.js";function resolveCompilerArtifactPaths(e){return resolveCompilerArtifactPathsAt(e,join(resolve(e),`.eve`))}function resolveCompilerArtifactPathsAt(e,t){let n=resolve(e);let r=resolve(t);let i=join(r,`discovery`);let a=join(r,`compile`);return{appRoot:n,compiledManifestPath:join(a,`compiled-agent-manifest.json`),compileDirectoryPath:a,compileMetadataPath:join(a,`compile-metadata.json`),diagnosticsPath:join(i,`diagnostics.json`),discoveryManifestPath:join(i,`agent-discovery-manifest.json`),discoveryDirectoryPath:i,modelMetadataPath:join(a,`model-metadata.json`),moduleMapPath:join(a,`module-map.mjs`),sandboxPreparedArtifactsPath:join(a,`sandbox-prepared-artifacts.json`)}}function createCompilerDiagnosticsArtifact(e){return{diagnostics:[...e],kind:`eve-compiler-diagnostics`,summary:summarizeCompilerDiagnostics(e),version:2}}function createCompileMetadata(e){let t=resolveInstalledPackageInfo();let n=createContentHash(e.compiledManifestJson);let r=createContentHash(e.discoveryManifestJson);let i=createContentHash(e.diagnosticsArtifactJson);let a=createContentHash(e.moduleMapSource);return{compile:{manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.compiledManifestPath),sha256:n},moduleMap:{path:toArtifactRelativePath(e.appRoot,e.paths.moduleMapPath),sha256:a}},discovery:{diagnostics:{path:toArtifactRelativePath(e.appRoot,e.paths.diagnosticsPath),sha256:i},manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.discoveryManifestPath),sha256:r},sourceGraphHash:createContentHash(`${n}:${r}:${i}:${a}`),summary:e.diagnosticsSummary},generator:{name:t.name,version:t.version},kind:COMPILE_METADATA_KIND,status:e.diagnosticsSummary.errors>0?`failed`:`ready`,version:COMPILE_METADATA_VERSION}}async function writeCompilerArtifacts(e){let t=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.writeRoot);let n=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.publishedRoot);let r=e.diagnostics.map(e=>projectDiscoverDiagnostic(e,ROOT_COMPILED_AGENT_NODE_ID));let i=createCompiledRuntimeModelCatalogLoader(e.manifest.appRoot);(await i.loadModelMetadata()).fetchedAt===null&&r.push(createModelMetadataUnavailableDiagnostic(t.modelMetadataPath));let a=await materializeWorkspaceResources({compileDirectoryPath:t.compileDirectoryPath,manifest:await compileAgentManifest(e.manifest,{developmentExtensions:e.developmentExtensions,diagnostics:r,modelCatalog:i})});let o=await i.loadModelMetadata();let s=createCompilerDiagnosticsArtifact(r);let c=serializeArtifactJson(a);let l=serializeArtifactJson(e.manifest);let u=serializeArtifactJson(s);let d=createCompiledModuleMapSource({manifest:a,moduleMapPath:n.moduleMapPath});let f=createCompileMetadata({appRoot:e.appRoot,compiledManifestJson:c,diagnosticsArtifactJson:u,diagnosticsSummary:s.summary,discoveryManifestJson:l,moduleMapSource:d,paths:n});let p=serializeArtifactJson(f);let m=serializeArtifactJson(createSandboxPreparedArtifactsManifest([]));return await mkdir(t.discoveryDirectoryPath,{recursive:!0}),await mkdir(t.compileDirectoryPath,{recursive:!0}),await Promise.all([writeFile(t.compiledManifestPath,c),writeFile(t.diagnosticsPath,u),writeFile(t.discoveryManifestPath,l),writeFile(t.moduleMapPath,d),writeFile(t.compileMetadataPath,p),writeFile(t.modelMetadataPath,serializeArtifactJson(o)),writeFile(t.sandboxPreparedArtifactsPath,m)]),{compiledManifest:a,diagnosticsArtifact:s,metadata:f,moduleMapSource:d,paths:t}}function createModelMetadataUnavailableDiagnostic(e){return{code:`compile/model-metadata-unavailable`,message:`The AI Gateway model catalog was unavailable, so this build has no model metadata. Runtime model selections that omit modelContextWindowTokens, such as dynamic models and ctx.agent() model overrides, fail until you rebuild with network access to ai-gateway.vercel.sh or set modelContextWindowTokens on each selection.`,severity:`warning`,sources:[{nodeId:ROOT_COMPILED_AGENT_NODE_ID,sourcePath:e}]}}function createContentHash(e){return createHash(`sha256`).update(e).digest(`hex`)}function serializeArtifactJson(e){return`${JSON.stringify(e,null,2)}\n`}function toArtifactRelativePath(e,t){return normalizeLogicalPath(relative(resolve(e),t))}export{createCompileMetadata,resolveCompilerArtifactPaths,writeCompilerArtifacts};
@@ -1,6 +1,7 @@
1
1
  import type { ResolvedDiscoveryProject } from "#discover/project.js";
2
2
  import { type ProjectSource } from "#discover/project-source.js";
3
- import { type CompileMetadata, type CompilerArtifactLocations, type CompilerArtifactPaths } from "#compiler/artifacts.js";
3
+ import { type CompilerArtifactLocations, type CompilerArtifactPaths } from "#compiler/artifacts.js";
4
+ import { type CompileMetadata } from "#compiler/artifact-contract.js";
4
5
  import type { CompiledAgentManifest } from "#compiler/manifest.js";
5
6
  import { type CompilerDiagnostic } from "#compiler/diagnostics.js";
6
7
  import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
@@ -1,3 +1,3 @@
1
- import{join}from"node:path";import{resolveDiscoveryProject}from"#discover/project.js";import{summarizeCompilerDiagnostics}from"#compiler/diagnostics.js";import{discoverAgent}from"#discover/discover-agent.js";import{createDiskProjectSource}from"#discover/project-source.js";import{writeCompilerArtifacts}from"#compiler/artifacts.js";var CompileAgentError=class CompileAgentError extends Error{result;constructor(e,t){super(t),this.name=`CompileAgentError`,this.result=e}static fromDurableArtifacts(e){let[t,...n]=formatCompileAgentErrorLines(e.diagnostics);return new CompileAgentError(e,[t,`Diagnostics artifact: ${e.paths.diagnosticsPath}`,...n].join(`
1
+ import{join}from"node:path";import{resolveDiscoveryProject}from"#discover/project.js";import"#compiler/artifact-contract.js";import{summarizeCompilerDiagnostics}from"#compiler/diagnostics.js";import{discoverAgent}from"#discover/discover-agent.js";import{createDiskProjectSource}from"#discover/project-source.js";import{writeCompilerArtifacts}from"#compiler/artifacts.js";var CompileAgentError=class CompileAgentError extends Error{result;constructor(e,t){super(t),this.name=`CompileAgentError`,this.result=e}static fromDurableArtifacts(e){let[t,...n]=formatCompileAgentErrorLines(e.diagnostics);return new CompileAgentError(e,[t,`Diagnostics artifact: ${e.paths.diagnosticsPath}`,...n].join(`
2
2
  `))}static fromTransientArtifacts(e){return new CompileAgentError(e,formatCompileAgentErrorLines(e.diagnostics).join(`
3
3
  `))}};async function compileAgent(e={}){let t=await discoverAgentForCompilation(e);let n=join(t.project.appRoot,`.eve`);return finishAgentCompilation(await writeAgentCompilation(t,{publishedRoot:n,writeRoot:n}),CompileAgentError.fromDurableArtifacts)}async function compileAgentInWorkspace(e){return finishAgentCompilation(await writeAgentCompilation(await discoverAgentForCompilation({developmentExtensions:e.developmentExtensions,startPath:e.startPath}),e.artifactLocations),CompileAgentError.fromTransientArtifacts)}async function discoverAgentForCompilation(e){let t=e.source??createDiskProjectSource();let n=await resolveDiscoveryProject(e.startPath,{source:t});let r=await discoverAgent({...n,source:t});return{developmentExtensions:e.developmentExtensions,diagnostics:r.diagnostics,manifest:r.manifest,project:n}}async function writeAgentCompilation(e,t){let n=await writeCompilerArtifacts({appRoot:e.project.appRoot,artifactLocations:t,diagnostics:e.diagnostics,developmentExtensions:e.developmentExtensions,manifest:e.manifest});return{diagnostics:n.diagnosticsArtifact.diagnostics,manifest:n.compiledManifest,metadata:n.metadata,paths:n.paths,project:e.project}}function finishAgentCompilation(e,t){if(e.diagnostics.some(e=>e.severity===`error`))throw t(e);return reportDiscoverWarnings(e.diagnostics),e}function reportDiscoverWarnings(e){let t=e.filter(e=>e.severity===`warning`);if(t.length!==0)for(let e of t)console.warn(`Warning [${e.code}]: ${e.message}\n source: ${formatDiagnosticSources(e)}`)}function formatCompileAgentErrorLines(e){let t=summarizeCompilerDiagnostics(e);let n=[`Discovery failed with ${t.errors} error(s) and ${t.warnings} warning(s).`];if(e.length===0)return n;n.push(`Discovery diagnostics:`);for(let t of e)n.push(`- ${formatDiagnosticSeverity(t.severity)}: ${t.message}`),n.push(` source: ${formatDiagnosticSources(t)}`);return n}function formatDiagnosticSources(e){return e.sources.map(e=>e.sourcePath??e.logicalPath??e.sourceId??e.nodeId).join(`, `)}function formatDiagnosticSeverity(e){return e===`error`?`Error`:`Warning`}export{CompileAgentError,compileAgent,compileAgentInWorkspace};
@@ -176,6 +176,7 @@ export declare const compiledSkillBaseFields: {
176
176
  export declare const compiledSkillSourceSchema: z.ZodType<CompiledSkillDefinition>;
177
177
  export declare const compiledScheduleBaseFields: {
178
178
  cron: z.ZodString;
179
+ timezone: z.ZodOptional<z.ZodString>;
179
180
  hasRun: z.ZodBoolean;
180
181
  name: z.ZodString;
181
182
  logicalPath: z.ZodString;
@@ -184,6 +185,7 @@ export declare const compiledScheduleBaseFields: {
184
185
  };
185
186
  export declare const compiledScheduleDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
186
187
  cron: z.ZodString;
188
+ timezone: z.ZodOptional<z.ZodString>;
187
189
  hasRun: z.ZodBoolean;
188
190
  name: z.ZodString;
189
191
  logicalPath: z.ZodString;
@@ -193,6 +195,7 @@ export declare const compiledScheduleDefinitionSchema: z.ZodDiscriminatedUnion<[
193
195
  sourceKind: z.ZodLiteral<"markdown">;
194
196
  }, z.core.$strict>, z.ZodObject<{
195
197
  cron: z.ZodString;
198
+ timezone: z.ZodOptional<z.ZodString>;
196
199
  hasRun: z.ZodBoolean;
197
200
  name: z.ZodString;
198
201
  logicalPath: z.ZodString;
@@ -339,6 +342,7 @@ export declare const compiledAgentResourceFields: {
339
342
  }, z.core.$strict>>;
340
343
  schedules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
341
344
  cron: z.ZodString;
345
+ timezone: z.ZodOptional<z.ZodString>;
342
346
  hasRun: z.ZodBoolean;
343
347
  name: z.ZodString;
344
348
  logicalPath: z.ZodString;
@@ -348,6 +352,7 @@ export declare const compiledAgentResourceFields: {
348
352
  sourceKind: z.ZodLiteral<"markdown">;
349
353
  }, z.core.$strict>, z.ZodObject<{
350
354
  cron: z.ZodString;
355
+ timezone: z.ZodOptional<z.ZodString>;
351
356
  hasRun: z.ZodBoolean;
352
357
  name: z.ZodString;
353
358
  logicalPath: z.ZodString;
@@ -480,6 +485,7 @@ export declare const compiledAgentResourcesSchema: z.ZodObject<{
480
485
  }, z.core.$strict>>;
481
486
  schedules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
482
487
  cron: z.ZodString;
488
+ timezone: z.ZodOptional<z.ZodString>;
483
489
  hasRun: z.ZodBoolean;
484
490
  name: z.ZodString;
485
491
  logicalPath: z.ZodString;
@@ -489,6 +495,7 @@ export declare const compiledAgentResourcesSchema: z.ZodObject<{
489
495
  sourceKind: z.ZodLiteral<"markdown">;
490
496
  }, z.core.$strict>, z.ZodObject<{
491
497
  cron: z.ZodString;
498
+ timezone: z.ZodOptional<z.ZodString>;
492
499
  hasRun: z.ZodBoolean;
493
500
  name: z.ZodString;
494
501
  logicalPath: z.ZodString;
@@ -621,6 +628,7 @@ export declare const compiledAgentNodeManifestSchema: z.ZodObject<{
621
628
  }, z.core.$strict>>;
622
629
  schedules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
623
630
  cron: z.ZodString;
631
+ timezone: z.ZodOptional<z.ZodString>;
624
632
  hasRun: z.ZodBoolean;
625
633
  name: z.ZodString;
626
634
  logicalPath: z.ZodString;
@@ -630,6 +638,7 @@ export declare const compiledAgentNodeManifestSchema: z.ZodObject<{
630
638
  sourceKind: z.ZodLiteral<"markdown">;
631
639
  }, z.core.$strict>, z.ZodObject<{
632
640
  cron: z.ZodString;
641
+ timezone: z.ZodOptional<z.ZodString>;
633
642
  hasRun: z.ZodBoolean;
634
643
  name: z.ZodString;
635
644
  logicalPath: z.ZodString;
@@ -789,6 +798,7 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
789
798
  }, z.core.$strict>>;
790
799
  schedules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
791
800
  cron: z.ZodString;
801
+ timezone: z.ZodOptional<z.ZodString>;
792
802
  hasRun: z.ZodBoolean;
793
803
  name: z.ZodString;
794
804
  logicalPath: z.ZodString;
@@ -798,6 +808,7 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
798
808
  sourceKind: z.ZodLiteral<"markdown">;
799
809
  }, z.core.$strict>, z.ZodObject<{
800
810
  cron: z.ZodString;
811
+ timezone: z.ZodOptional<z.ZodString>;
801
812
  hasRun: z.ZodBoolean;
802
813
  name: z.ZodString;
803
814
  logicalPath: z.ZodString;
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{mountIdSchema}from"#shared/extension-mount.js";import{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION}from"#compiler/manifest.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";import{WEB_SEARCH_FALLBACK_PROVIDERS,WEB_SEARCH_PROVIDERS}from"#shared/web-search.js";import{AGENT_WORKFLOW_RETENTION_VALUES,ANTHROPIC_PROMPT_CACHE_TTLS}from"#shared/agent-definition.js";const agentSourceOwnerSchema=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string().min(1),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),mountId:mountIdSchema,namespace:z.string().min(1),packageName:z.string().min(1)}).strict()]);const moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict();const filesystemModuleBackingSchema=z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),mountId:z.string().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict();const programmaticModuleBackingSchema=z.object({kind:z.literal(`programmatic`),mountId:z.string().optional(),moduleId:z.string(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict();const resourceSourceBackingSchema=z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict();const agentModuleBackingSchema=z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema]);const compiledModuleBindingSchema=z.object({backing:agentModuleBackingSchema,logicalPath:z.string(),owner:agentSourceOwnerSchema,usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict();const agentSourceDescriptorSchema=z.object({backing:z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner:agentSourceOwnerSchema,sourceId:z.string()}).strict();const agentSourceCompositionSchema=z.object({entries:z.array(z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`shadowed`),source:agentSourceDescriptorSchema,winnerSourceId:z.string()}).strict(),z.object({kind:z.literal(`disabled`),source:agentSourceDescriptorSchema}).strict()])).readonly()}).strict();const compiledDynamicModelDefinitionSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict();const channelMethodSchema=z.union([z.literal(`GET`),z.literal(`HEAD`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`),z.literal(`OPTIONS`),z.literal(`WEBSOCKET`)]);const compiledChannelCorsSchema=z.object({origin:z.union([z.literal(`*`),z.literal(`null`),z.array(z.string())]).optional(),methods:z.union([z.literal(`*`),z.array(z.string())]).optional(),allowHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),exposeHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),credentials:z.boolean().optional(),maxAge:z.union([z.string(),z.literal(!1)]).optional(),preflight:z.object({statusCode:z.number().int().min(100).max(599).optional()}).strict().optional()}).strict();const compiledVercelConnectMetadataSchema=z.object({connector:z.string(),requirement:z.object({method:z.string().optional(),reference:z.string(),service:z.string(),subjectTypes:z.array(z.enum([`app`,`user`])).readonly()}).strict().optional()}).strict();const compiledChannelDefinitionSchema=z.object({kind:z.literal(`channel`),name:z.string(),logicalPath:z.string(),method:channelMethodSchema,urlPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional(),adapterKind:z.string().optional(),cors:compiledChannelCorsSchema.optional(),manifest:jsonObjectSchema.optional(),vercelConnect:compiledVercelConnectMetadataSchema.optional()}).strict();const compiledChannelPreflightDefinitionSchema=z.object({cors:compiledChannelCorsSchema,method:z.literal(`OPTIONS`),sourceIds:z.array(z.string()).readonly(),urlPath:z.string()}).strict();const compiledShadowedChannelRouteSchema=z.object({method:channelMethodSchema,source:agentSourceDescriptorSchema,urlPath:z.string(),winnerSourceId:z.string()}).strict();const compiledChannelRoutePlanSchema=z.object({effective:z.array(compiledChannelDefinitionSchema).readonly(),preflight:z.array(compiledChannelPreflightDefinitionSchema).readonly(),shadowed:z.array(compiledShadowedChannelRouteSchema).readonly()}).strict();const modelRoutingSchema=z.union([z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]);const compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),source:moduleSourceRefSchema.optional(),sourceField:z.literal(`compaction.model`).optional(),promptCache:z.object({anthropic:z.object({ttl:z.literal(ANTHROPIC_PROMPT_CACHE_TTLS).optional()}).strict().optional()}).strict().optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional(),routing:modelRoutingSchema}).strict();const compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict();const compiledAgentWorkflowWorldDefinitionSchema=z.string();const compiledAgentWorkflowDefinitionSchema=z.object({modelCallsPerStep:z.number().int().positive().optional(),retention:z.literal(AGENT_WORKFLOW_RETENTION_VALUES).optional(),world:compiledAgentWorkflowWorldDefinitionSchema.optional()}).strict();const compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict();const sessionTimeoutSchema=z.union([z.number().int().positive(),z.literal(!1)]);const compiledAgentLimitsDefinitionSchema=z.object({sessionTimeoutMs:sessionTimeoutSchema.optional(),sessionUsage:z.boolean().optional()}).strict();const compiledAgentConfigBaseFields={approval:z.boolean().optional(),build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),defaultTools:z.boolean().optional(),description:z.string().optional(),experimental:z.object({workflow:compiledAgentWorkflowDefinitionSchema.optional()}).strict().optional(),name:z.string(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional(),source:moduleSourceRefSchema,tool:z.union([z.boolean(),z.literal(`deferred`)]).optional(),limits:compiledAgentLimitsDefinitionSchema.optional()};const compiledAgentConfigSchema=z.union([z.object({...compiledAgentConfigBaseFields,model:compiledRuntimeModelReferenceSchema}).strict(),z.object({...compiledAgentConfigBaseFields,dynamicModel:compiledDynamicModelDefinitionSchema}).strict()]);const compiledInstructionsBaseFields={content:z.string(),name:z.string(),logicalPath:z.string(),role:z.enum([`system`,`user`]),sourceId:z.string()};const compiledInstructionsSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledInstructionsBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledInstructionsBaseFields,sourceKind:z.literal(`module`)}).strict()]);const compiledSkillBaseFields={name:z.string(),deferred:z.boolean().optional(),description:z.string(),license:z.string().optional(),content:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()};const compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`skill-package`),skillId:z.string(),skillFilePath:z.string(),rootPath:z.string(),assetsPath:z.string().optional(),referencesPath:z.string().optional(),scriptsPath:z.string().optional()}).strict()]);const compiledScheduleBaseFields={cron:z.string(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string()};const compiledScheduleDefinitionSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledScheduleBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledScheduleBaseFields,sourceKind:z.literal(`module`)}).strict()]);const compiledScheduleCollectionDefinitionSchema=z.object({application:z.string(),description:z.string().optional(),logicalPath:z.string(),name:z.string(),providerKind:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),tools:z.union([z.boolean(),z.literal(`deferred`)]).optional()}).strict();const compiledSandboxDefinitionSchema=z.object({providerName:z.string().optional(),environmentExportName:z.string().optional(),inheritsParent:z.boolean().optional(),exportName:z.string().optional(),logicalPath:z.string(),revisionHash:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict();const compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict();const compiledWorkspaceResourceRootSchema=z.object({contentHash:z.string().optional(),logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict();const compiledConnectionDefinitionSchema=z.object({experimental_events:z.literal(!0).optional(),connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),protocol:z.enum([`mcp`,`openapi`]).default(`mcp`),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:compiledVercelConnectMetadataSchema.optional()}).strict();const compiledToolBehaviorSchema=z.object({availability:z.array(z.literal(`root-session`)).readonly(),handling:z.discriminatedUnion(`kind`,[z.object({action:z.literal(`self-agent`),kind:z.literal(`dispatch`)}).strict(),z.object({fallback:z.enum(WEB_SEARCH_FALLBACK_PROVIDERS).optional(),kind:z.literal(`provider-tool`),provider:z.enum(WEB_SEARCH_PROVIDERS)}).strict(),z.object({entryPoint:z.enum([`execute`,`task`,`serve`]),kind:z.literal(`workflow-tool`),workflowId:z.string()}).strict()]).optional(),shape:z.object({suspend:z.enum([`none`,`workflow`])}).strict().optional()}).strict();const compiledToolDefinitionSchema=z.object({availableInSubagents:z.boolean().optional(),behavior:compiledToolBehaviorSchema.optional(),deferred:z.boolean().optional(),description:z.string(),exportName:z.string().optional(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),modelInputSchema:jsonObjectSchema.optional(),name:z.string(),outputSchema:jsonObjectSchema.optional(),requiresApproval:z.boolean(),sourceId:z.string(),sourceKind:z.literal(`module`),workflowProgram:z.object({maxSubagents:z.number().int().positive()}).strict().optional()}).strict();const compiledDefinitionSchema=z.object({description:z.string().optional(),eventNames:z.array(z.string()).readonly().optional(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),kind:z.enum([`connection`,`hook`,`instructions`,`memory`,`skill`,`tool`]),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict();const compiledExtensionMountSchema=z.object({externalDependencies:z.array(z.string()).readonly(),namespace:z.string(),packageName:z.string(),specifier:z.string(),mountId:mountIdSchema,sourceRoot:z.string(),mountSourceId:z.string(),mountSourcePath:z.string(),mountLogicalPath:z.string(),programmaticImport:z.object({specifier:z.string(),entryPath:z.string(),config:jsonObjectSchema}).strict().optional()}).strict();const compiledAgentResourceFields={agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),channelRoutes:compiledChannelRoutePlanSchema,connections:z.array(compiledConnectionDefinitionSchema),definitions:z.array(compiledDefinitionSchema),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,extensionMounts:z.array(compiledExtensionMountSchema).default([]),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),scheduleCollections:z.array(compiledScheduleCollectionDefinitionSchema).default([]),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema};const compiledAgentResourcesSchema=z.object(compiledAgentResourceFields).strict();const compiledAgentNodeManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema}).strict();const compiledSubagentNodeBaseFields={backing:resourceSourceBackingSchema,entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:agentSourceOwnerSchema,parentNodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()};const compiledDynamicSubagentDefinitionSchema=z.object({exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict();const compiledSubagentNodeSchema=z.union([z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentNodeManifestSchema,description:z.string()}).strict(),z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentResourcesSchema,configResolver:compiledDynamicSubagentDefinitionSchema}).strict()]);const compiledAgentManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema,kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),subagents:z.array(compiledSubagentNodeSchema),version:z.literal(COMPILED_AGENT_MANIFEST_VERSION)}).strict();export{agentModuleBackingSchema,agentSourceCompositionSchema,agentSourceDescriptorSchema,agentSourceOwnerSchema,channelMethodSchema,compiledAgentBuildDefinitionSchema,compiledAgentCompactionDefinitionSchema,compiledAgentConfigBaseFields,compiledAgentConfigSchema,compiledAgentLimitsDefinitionSchema,compiledAgentManifestSchema,compiledAgentNodeManifestSchema,compiledAgentResourceFields,compiledAgentResourcesSchema,compiledAgentWorkflowDefinitionSchema,compiledAgentWorkflowWorldDefinitionSchema,compiledChannelCorsSchema,compiledChannelDefinitionSchema,compiledChannelPreflightDefinitionSchema,compiledChannelRoutePlanSchema,compiledConnectionDefinitionSchema,compiledDefinitionSchema,compiledDynamicModelDefinitionSchema,compiledDynamicSubagentDefinitionSchema,compiledExtensionMountSchema,compiledInstructionsBaseFields,compiledInstructionsSchema,compiledModuleBindingSchema,compiledRuntimeModelReferenceSchema,compiledSandboxDefinitionSchema,compiledSandboxWorkspaceSchema,compiledScheduleBaseFields,compiledScheduleCollectionDefinitionSchema,compiledScheduleDefinitionSchema,compiledShadowedChannelRouteSchema,compiledSkillBaseFields,compiledSkillSourceSchema,compiledSubagentNodeBaseFields,compiledSubagentNodeSchema,compiledToolBehaviorSchema,compiledToolDefinitionSchema,compiledVercelConnectMetadataSchema,compiledWorkspaceResourceRootSchema,filesystemModuleBackingSchema,modelRoutingSchema,moduleSourceRefSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema,sessionTimeoutSchema};
1
+ import{z}from"#compiled/zod/index.js";import{mountIdSchema}from"#shared/extension-mount.js";import{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION}from"#compiler/manifest.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";import{WEB_SEARCH_FALLBACK_PROVIDERS,WEB_SEARCH_PROVIDERS}from"#shared/web-search.js";import{AGENT_WORKFLOW_RETENTION_VALUES,ANTHROPIC_PROMPT_CACHE_TTLS}from"#shared/agent-definition.js";const agentSourceOwnerSchema=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string().min(1),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),mountId:mountIdSchema,namespace:z.string().min(1),packageName:z.string().min(1)}).strict()]);const moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict();const filesystemModuleBackingSchema=z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),mountId:z.string().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict();const programmaticModuleBackingSchema=z.object({kind:z.literal(`programmatic`),mountId:z.string().optional(),moduleId:z.string(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict();const resourceSourceBackingSchema=z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict();const agentModuleBackingSchema=z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema]);const compiledModuleBindingSchema=z.object({backing:agentModuleBackingSchema,logicalPath:z.string(),owner:agentSourceOwnerSchema,usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict();const agentSourceDescriptorSchema=z.object({backing:z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner:agentSourceOwnerSchema,sourceId:z.string()}).strict();const agentSourceCompositionSchema=z.object({entries:z.array(z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`shadowed`),source:agentSourceDescriptorSchema,winnerSourceId:z.string()}).strict(),z.object({kind:z.literal(`disabled`),source:agentSourceDescriptorSchema}).strict()])).readonly()}).strict();const compiledDynamicModelDefinitionSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict();const channelMethodSchema=z.union([z.literal(`GET`),z.literal(`HEAD`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`),z.literal(`OPTIONS`),z.literal(`WEBSOCKET`)]);const compiledChannelCorsSchema=z.object({origin:z.union([z.literal(`*`),z.literal(`null`),z.array(z.string())]).optional(),methods:z.union([z.literal(`*`),z.array(z.string())]).optional(),allowHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),exposeHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),credentials:z.boolean().optional(),maxAge:z.union([z.string(),z.literal(!1)]).optional(),preflight:z.object({statusCode:z.number().int().min(100).max(599).optional()}).strict().optional()}).strict();const compiledVercelConnectMetadataSchema=z.object({connector:z.string(),requirement:z.object({method:z.string().optional(),reference:z.string(),service:z.string(),subjectTypes:z.array(z.enum([`app`,`user`])).readonly()}).strict().optional()}).strict();const compiledChannelDefinitionSchema=z.object({kind:z.literal(`channel`),name:z.string(),logicalPath:z.string(),method:channelMethodSchema,urlPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional(),adapterKind:z.string().optional(),cors:compiledChannelCorsSchema.optional(),manifest:jsonObjectSchema.optional(),vercelConnect:compiledVercelConnectMetadataSchema.optional()}).strict();const compiledChannelPreflightDefinitionSchema=z.object({cors:compiledChannelCorsSchema,method:z.literal(`OPTIONS`),sourceIds:z.array(z.string()).readonly(),urlPath:z.string()}).strict();const compiledShadowedChannelRouteSchema=z.object({method:channelMethodSchema,source:agentSourceDescriptorSchema,urlPath:z.string(),winnerSourceId:z.string()}).strict();const compiledChannelRoutePlanSchema=z.object({effective:z.array(compiledChannelDefinitionSchema).readonly(),preflight:z.array(compiledChannelPreflightDefinitionSchema).readonly(),shadowed:z.array(compiledShadowedChannelRouteSchema).readonly()}).strict();const modelRoutingSchema=z.union([z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]);const compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),source:moduleSourceRefSchema.optional(),sourceField:z.literal(`compaction.model`).optional(),promptCache:z.object({anthropic:z.object({ttl:z.literal(ANTHROPIC_PROMPT_CACHE_TTLS).optional()}).strict().optional()}).strict().optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional(),routing:modelRoutingSchema}).strict();const compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict();const compiledAgentWorkflowWorldDefinitionSchema=z.string();const compiledAgentWorkflowDefinitionSchema=z.object({modelCallsPerStep:z.number().int().positive().optional(),retention:z.literal(AGENT_WORKFLOW_RETENTION_VALUES).optional(),world:compiledAgentWorkflowWorldDefinitionSchema.optional()}).strict();const compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict();const sessionTimeoutSchema=z.union([z.number().int().positive(),z.literal(!1)]);const compiledAgentLimitsDefinitionSchema=z.object({sessionTimeoutMs:sessionTimeoutSchema.optional(),sessionUsage:z.boolean().optional()}).strict();const compiledAgentConfigBaseFields={approval:z.boolean().optional(),build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),defaultTools:z.boolean().optional(),description:z.string().optional(),experimental:z.object({workflow:compiledAgentWorkflowDefinitionSchema.optional()}).strict().optional(),name:z.string(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional(),source:moduleSourceRefSchema,tool:z.union([z.boolean(),z.literal(`deferred`)]).optional(),limits:compiledAgentLimitsDefinitionSchema.optional()};const compiledAgentConfigSchema=z.union([z.object({...compiledAgentConfigBaseFields,model:compiledRuntimeModelReferenceSchema}).strict(),z.object({...compiledAgentConfigBaseFields,dynamicModel:compiledDynamicModelDefinitionSchema}).strict()]);const compiledInstructionsBaseFields={content:z.string(),name:z.string(),logicalPath:z.string(),role:z.enum([`system`,`user`]),sourceId:z.string()};const compiledInstructionsSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledInstructionsBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledInstructionsBaseFields,sourceKind:z.literal(`module`)}).strict()]);const compiledSkillBaseFields={name:z.string(),deferred:z.boolean().optional(),description:z.string(),license:z.string().optional(),content:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()};const compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`skill-package`),skillId:z.string(),skillFilePath:z.string(),rootPath:z.string(),assetsPath:z.string().optional(),referencesPath:z.string().optional(),scriptsPath:z.string().optional()}).strict()]);const compiledScheduleBaseFields={cron:z.string(),timezone:z.string().optional(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string()};const compiledScheduleDefinitionSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledScheduleBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledScheduleBaseFields,sourceKind:z.literal(`module`)}).strict()]);const compiledScheduleCollectionDefinitionSchema=z.object({application:z.string(),description:z.string().optional(),logicalPath:z.string(),name:z.string(),providerKind:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),tools:z.union([z.boolean(),z.literal(`deferred`)]).optional()}).strict();const compiledSandboxDefinitionSchema=z.object({providerName:z.string().optional(),environmentExportName:z.string().optional(),inheritsParent:z.boolean().optional(),exportName:z.string().optional(),logicalPath:z.string(),revisionHash:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict();const compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict();const compiledWorkspaceResourceRootSchema=z.object({contentHash:z.string().optional(),logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict();const compiledConnectionDefinitionSchema=z.object({experimental_events:z.literal(!0).optional(),connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),protocol:z.enum([`mcp`,`openapi`]).default(`mcp`),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:compiledVercelConnectMetadataSchema.optional()}).strict();const compiledToolBehaviorSchema=z.object({availability:z.array(z.literal(`root-session`)).readonly(),handling:z.discriminatedUnion(`kind`,[z.object({action:z.literal(`self-agent`),kind:z.literal(`dispatch`)}).strict(),z.object({fallback:z.enum(WEB_SEARCH_FALLBACK_PROVIDERS).optional(),kind:z.literal(`provider-tool`),provider:z.enum(WEB_SEARCH_PROVIDERS)}).strict(),z.object({entryPoint:z.enum([`execute`,`task`,`serve`]),kind:z.literal(`workflow-tool`),workflowId:z.string()}).strict()]).optional(),shape:z.object({suspend:z.enum([`none`,`workflow`])}).strict().optional()}).strict();const compiledToolDefinitionSchema=z.object({availableInSubagents:z.boolean().optional(),behavior:compiledToolBehaviorSchema.optional(),deferred:z.boolean().optional(),description:z.string(),exportName:z.string().optional(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),modelInputSchema:jsonObjectSchema.optional(),name:z.string(),outputSchema:jsonObjectSchema.optional(),requiresApproval:z.boolean(),sourceId:z.string(),sourceKind:z.literal(`module`),workflowProgram:z.object({maxSubagents:z.number().int().positive()}).strict().optional()}).strict();const compiledDefinitionSchema=z.object({description:z.string().optional(),eventNames:z.array(z.string()).readonly().optional(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),kind:z.enum([`connection`,`hook`,`instructions`,`memory`,`skill`,`tool`]),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict();const compiledExtensionMountSchema=z.object({externalDependencies:z.array(z.string()).readonly(),namespace:z.string(),packageName:z.string(),specifier:z.string(),mountId:mountIdSchema,sourceRoot:z.string(),mountSourceId:z.string(),mountSourcePath:z.string(),mountLogicalPath:z.string(),programmaticImport:z.object({specifier:z.string(),entryPath:z.string(),config:jsonObjectSchema}).strict().optional()}).strict();const compiledAgentResourceFields={agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),channelRoutes:compiledChannelRoutePlanSchema,connections:z.array(compiledConnectionDefinitionSchema),definitions:z.array(compiledDefinitionSchema),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,extensionMounts:z.array(compiledExtensionMountSchema).default([]),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),scheduleCollections:z.array(compiledScheduleCollectionDefinitionSchema).default([]),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema};const compiledAgentResourcesSchema=z.object(compiledAgentResourceFields).strict();const compiledAgentNodeManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema}).strict();const compiledSubagentNodeBaseFields={backing:resourceSourceBackingSchema,entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:agentSourceOwnerSchema,parentNodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()};const compiledDynamicSubagentDefinitionSchema=z.object({exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict();const compiledSubagentNodeSchema=z.union([z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentNodeManifestSchema,description:z.string()}).strict(),z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentResourcesSchema,configResolver:compiledDynamicSubagentDefinitionSchema}).strict()]);const compiledAgentManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema,kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),subagents:z.array(compiledSubagentNodeSchema),version:z.literal(COMPILED_AGENT_MANIFEST_VERSION)}).strict();export{agentModuleBackingSchema,agentSourceCompositionSchema,agentSourceDescriptorSchema,agentSourceOwnerSchema,channelMethodSchema,compiledAgentBuildDefinitionSchema,compiledAgentCompactionDefinitionSchema,compiledAgentConfigBaseFields,compiledAgentConfigSchema,compiledAgentLimitsDefinitionSchema,compiledAgentManifestSchema,compiledAgentNodeManifestSchema,compiledAgentResourceFields,compiledAgentResourcesSchema,compiledAgentWorkflowDefinitionSchema,compiledAgentWorkflowWorldDefinitionSchema,compiledChannelCorsSchema,compiledChannelDefinitionSchema,compiledChannelPreflightDefinitionSchema,compiledChannelRoutePlanSchema,compiledConnectionDefinitionSchema,compiledDefinitionSchema,compiledDynamicModelDefinitionSchema,compiledDynamicSubagentDefinitionSchema,compiledExtensionMountSchema,compiledInstructionsBaseFields,compiledInstructionsSchema,compiledModuleBindingSchema,compiledRuntimeModelReferenceSchema,compiledSandboxDefinitionSchema,compiledSandboxWorkspaceSchema,compiledScheduleBaseFields,compiledScheduleCollectionDefinitionSchema,compiledScheduleDefinitionSchema,compiledShadowedChannelRouteSchema,compiledSkillBaseFields,compiledSkillSourceSchema,compiledSubagentNodeBaseFields,compiledSubagentNodeSchema,compiledToolBehaviorSchema,compiledToolDefinitionSchema,compiledVercelConnectMetadataSchema,compiledWorkspaceResourceRootSchema,filesystemModuleBackingSchema,modelRoutingSchema,moduleSourceRefSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema,sessionTimeoutSchema};
@@ -1 +1 @@
1
- import{getChannelBuildMetadata}from"#channel/compiled-channel.js";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{extractVercelConnectMetadata}from"#shared/vercel-connect-metadata.js";import{isDisabledRouteSentinel}from"#public/definitions/channel.js";import{readWorkflowFunctionId}from"#internal/workflow/reference.js";import{workflowCallbackErrorMessage}from"#shared/workflow-tool-context.js";async function compileChannelDefinition(e,t,n){let r=await loadModuleBackedDefinition({binding:n.binding,kind:`channel`,loadNamespace:n.loadNamespace,source:t});let i=stripLogicalPathExtension(t.logicalPath).replace(/^channels\//,``);if(isDisabledRouteSentinel(r))return{kind:`disabled`,name:i};let a=normalizeChannelDefinition(r,`Expected the channel export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`);let o=getChannelBuildMetadata(a,i);for(let e of a.routes)if(readWorkflowFunctionId(e.handler)!==void 0)throw Error(`${t.logicalPath} (${e.method} ${e.path}): ${workflowCallbackErrorMessage(`channel`)}`);return{definitions:a.routes.map(e=>({kind:`channel`,name:i,logicalPath:t.logicalPath,method:e.method.toUpperCase(),urlPath:e.path,sourceId:t.sourceId,sourceKind:`module`,exportName:t.exportName,adapterKind:extractAdapterKind(a.adapter),cors:a.cors,manifest:o?.manifest,vercelConnect:extractVercelConnectMetadata(o?.externalCredentials)})),kind:`channel`}}function extractAdapterKind(e){if(typeof e!=`object`||!e)return;let t=e.kind;return typeof t==`string`&&t.length>0?t:void 0}export{compileChannelDefinition};
1
+ import{getChannelBuildMetadata}from"#channel/compiled-channel.js";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{extractVercelConnectMetadata}from"#shared/vercel-connect-metadata.js";import{isDisabledRouteSentinel}from"#public/definitions/channel.js";import{readWorkflowFunctionId}from"#shared/workflow-function-id.js";import{workflowCallbackErrorMessage}from"#shared/workflow-tool-context.js";async function compileChannelDefinition(e,t,n){let r=await loadModuleBackedDefinition({binding:n.binding,kind:`channel`,loadNamespace:n.loadNamespace,source:t});let i=stripLogicalPathExtension(t.logicalPath).replace(/^channels\//,``);if(isDisabledRouteSentinel(r))return{kind:`disabled`,name:i};let a=normalizeChannelDefinition(r,`Expected the channel export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`);let o=getChannelBuildMetadata(a,i);for(let e of a.routes)if(readWorkflowFunctionId(e.handler)!==void 0)throw Error(`${t.logicalPath} (${e.method} ${e.path}): ${workflowCallbackErrorMessage(`channel`)}`);return{definitions:a.routes.map(e=>({kind:`channel`,name:i,logicalPath:t.logicalPath,method:e.method.toUpperCase(),urlPath:e.path,sourceId:t.sourceId,sourceKind:`module`,exportName:t.exportName,adapterKind:extractAdapterKind(a.adapter),cors:a.cors,manifest:o?.manifest,vercelConnect:extractVercelConnectMetadata(o?.externalCredentials)})),kind:`channel`}}function extractAdapterKind(e){if(typeof e!=`object`||!e)return;let t=e.kind;return typeof t==`string`&&t.length>0?t:void 0}export{compileChannelDefinition};