experimental-ash 0.44.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/docs/internals/discovery.md +1 -1
  3. package/dist/docs/internals/hooks.md +7 -10
  4. package/dist/docs/public/advanced/hooks.mdx +5 -68
  5. package/dist/docs/public/advanced/project-layout.md +14 -14
  6. package/dist/src/compiled/.vendor-stamp.json +4 -3
  7. package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -1
  8. package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
  9. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  10. package/dist/src/compiled/@ai-sdk/openai/index.js +1 -1
  11. package/dist/src/compiled/@chat-adapter/slack/index.js +4 -4
  12. package/dist/src/compiled/@vercel/oidc/index.js +2 -2
  13. package/dist/src/compiled/@vercel/sandbox/index.d.ts +12 -0
  14. package/dist/src/compiled/@vercel/sandbox/index.js +18 -18
  15. package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +1 -1
  16. package/dist/src/compiled/@workflow/core/define-hook.d.ts +1 -1
  17. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +1 -1
  18. package/dist/src/compiled/@workflow/core/index.js +2 -2
  19. package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +1 -1
  20. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +1 -1
  21. package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +1 -1
  22. package/dist/src/compiled/@workflow/core/runtime/run.d.ts +1 -1
  23. package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +1 -1
  24. package/dist/src/compiled/@workflow/core/runtime/start.d.ts +1 -1
  25. package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +3 -1
  26. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +1 -1
  27. package/dist/src/compiled/@workflow/core/runtime/world.d.ts +1 -1
  28. package/dist/src/compiled/@workflow/core/runtime.d.ts +1 -1
  29. package/dist/src/compiled/@workflow/core/runtime.js +22 -22
  30. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +6 -0
  31. package/dist/src/compiled/@workflow/core/serialization.d.ts +2 -1
  32. package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +2 -0
  33. package/dist/src/compiled/@workflow/core/symbols.d.ts +6 -0
  34. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  35. package/dist/src/compiled/@workflow/core/workflow/define-hook.d.ts +1 -1
  36. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  37. package/dist/src/compiled/@workflow/world/LICENSE.md +201 -0
  38. package/dist/src/compiled/@workflow/world/attributes.d.ts +110 -0
  39. package/dist/src/compiled/@workflow/world/events.d.ts +415 -0
  40. package/dist/src/compiled/@workflow/world/hooks.d.ts +72 -0
  41. package/dist/src/compiled/@workflow/world/index.d.ts +25 -0
  42. package/dist/src/compiled/@workflow/world/index.js +1 -0
  43. package/dist/src/compiled/@workflow/world/interfaces.d.ts +264 -0
  44. package/dist/src/compiled/@workflow/world/queue.d.ts +120 -0
  45. package/dist/src/compiled/@workflow/world/recovery.d.ts +13 -0
  46. package/dist/src/compiled/@workflow/world/runs.d.ts +144 -0
  47. package/dist/src/compiled/@workflow/world/serialization.d.ts +25 -0
  48. package/dist/src/compiled/@workflow/world/shared.d.ts +83 -0
  49. package/dist/src/compiled/@workflow/world/spec-version.d.ts +46 -0
  50. package/dist/src/compiled/@workflow/world/steps.d.ts +70 -0
  51. package/dist/src/compiled/@workflow/world/ulid.d.ts +35 -0
  52. package/dist/src/compiled/@workflow/world/waits.d.ts +21 -0
  53. package/dist/src/compiled/_chunks/node/{auth-CVVvWjaK.js → auth-BsyzphzW.js} +1 -1
  54. package/dist/src/compiled/_chunks/node/{token-CoIbMZkq.js → token-ORseRyWn.js} +1 -1
  55. package/dist/src/compiled/_chunks/node/{version-nR4RSpFw.js → version-BGue04qw.js} +1 -1
  56. package/dist/src/compiled/_chunks/workflow/{coerce-BhzIW-Hm.js → coerce-BTuSKQr5.js} +1 -1
  57. package/dist/src/compiled/_chunks/workflow/{compat-DcEvieoj.js → compat-CG1hDp-3.js} +1 -1
  58. package/dist/src/compiled/_chunks/workflow/{core-XWIi7wKc.js → core-5Woff_dW.js} +1 -1
  59. package/dist/src/compiled/_chunks/workflow/{dist-Dl-X5RB3.js → dist-Chj-QcBs.js} +1 -1
  60. package/dist/src/compiled/_chunks/workflow/resume-hook-BlALLgSA.js +12 -0
  61. package/dist/src/compiled/_chunks/workflow/{schemas-DmgDnhW3.js → schemas-DWOIBELG.js} +1 -1
  62. package/dist/src/compiled/_chunks/workflow/sleep-Bg0t23kF.js +1 -0
  63. package/dist/src/compiled/_chunks/workflow/{symbols-DygIC1sj.js → symbols-u476uwyR.js} +1 -1
  64. package/dist/src/compiled/_chunks/workflow/{token-D9z1dMB6.js → token-CcaAeZHd.js} +1 -1
  65. package/dist/src/compiled/_chunks/workflow/{token-DV7rQw_t.js → token-nK4u-N7w.js} +1 -1
  66. package/dist/src/compiled/commander/index.js +1 -1
  67. package/dist/src/compiled/experimental-ai-sdk-code-mode/index.js +1 -1
  68. package/dist/src/compiled/gray-matter/index.js +1 -1
  69. package/dist/src/compiled/just-bash/index.d.ts +8 -0
  70. package/dist/src/compiled/just-bash/index.js +1 -1
  71. package/dist/src/compiled/zod/index.js +1 -1
  72. package/dist/src/compiled/zod-validation-error/index.js +1 -1
  73. package/dist/src/compiler/manifest.d.ts +11 -0
  74. package/dist/src/compiler/manifest.js +1 -1
  75. package/dist/src/compiler/module-map.js +1 -1
  76. package/dist/src/compiler/normalize-instructions.d.ts +27 -4
  77. package/dist/src/compiler/normalize-instructions.js +1 -1
  78. package/dist/src/compiler/normalize-manifest.js +3 -1
  79. package/dist/src/compiler/normalize-subagent.js +1 -1
  80. package/dist/src/context/dynamic-instruction-lifecycle.d.ts +26 -0
  81. package/dist/src/context/dynamic-instruction-lifecycle.js +1 -0
  82. package/dist/src/context/dynamic-skill-lifecycle.d.ts +4 -3
  83. package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
  84. package/dist/src/context/hook-lifecycle.js +1 -1
  85. package/dist/src/context/keys.d.ts +11 -4
  86. package/dist/src/discover/filesystem.d.ts +2 -2
  87. package/dist/src/discover/filesystem.js +1 -1
  88. package/dist/src/discover/grammar.d.ts +16 -10
  89. package/dist/src/discover/grammar.js +1 -1
  90. package/dist/src/discover/manifest.d.ts +10 -7
  91. package/dist/src/discover/manifest.js +1 -1
  92. package/dist/src/execution/durable-session-store.js +1 -1
  93. package/dist/src/execution/sandbox/bindings/local.js +1 -1
  94. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  95. package/dist/src/execution/sandbox/session.js +1 -1
  96. package/dist/src/execution/workflow-steps.js +1 -1
  97. package/dist/src/harness/compaction.js +1 -1
  98. package/dist/src/harness/tool-loop.js +1 -1
  99. package/dist/src/harness/types.d.ts +2 -4
  100. package/dist/src/internal/application/package.js +1 -1
  101. package/dist/src/internal/authored-definition/core.d.ts +3 -1
  102. package/dist/src/internal/helpers/markdown.d.ts +1 -1
  103. package/dist/src/internal/helpers/markdown.js +1 -1
  104. package/dist/src/node_modules/.pnpm/autoevals@0.0.132_ws@8.21.0/node_modules/autoevals/jsdist/index.js +2 -2
  105. package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/client.js +1 -1
  106. package/dist/src/node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@3.25.76/node_modules/openai/version.js +1 -0
  107. package/dist/src/node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +1 -1
  108. package/dist/src/packages/ash-scaffold/src/channels.js +1 -1
  109. package/dist/src/public/channels/slack/blocks.js +1 -1
  110. package/dist/src/public/definitions/hook.d.ts +4 -19
  111. package/dist/src/public/definitions/instructions.d.ts +19 -7
  112. package/dist/src/public/definitions/instructions.js +1 -1
  113. package/dist/src/public/definitions/sandbox.d.ts +1 -1
  114. package/dist/src/public/hooks/index.d.ts +1 -1
  115. package/dist/src/public/instructions/index.d.ts +4 -1
  116. package/dist/src/public/instructions/index.js +1 -1
  117. package/dist/src/runtime/resolve-agent.js +1 -1
  118. package/dist/src/runtime/resolve-dynamic-instructions.d.ts +4 -0
  119. package/dist/src/runtime/resolve-dynamic-instructions.js +1 -0
  120. package/dist/src/runtime/types.d.ts +11 -0
  121. package/dist/src/shared/dynamic-tool-definition.d.ts +12 -0
  122. package/dist/src/shared/dynamic-tool-definition.js +1 -1
  123. package/dist/src/shared/sandbox-session.d.ts +21 -0
  124. package/dist/src/shared/skill-package.d.ts +7 -0
  125. package/dist/src/shared/skill-package.js +1 -1
  126. package/package.json +5 -5
  127. package/dist/src/compiled/@ai-sdk/anthropic/package.json +0 -7
  128. package/dist/src/compiled/@ai-sdk/google/package.json +0 -7
  129. package/dist/src/compiled/@ai-sdk/mcp/package.json +0 -7
  130. package/dist/src/compiled/@ai-sdk/openai/package.json +0 -7
  131. package/dist/src/compiled/@ai-sdk/otel/package.json +0 -7
  132. package/dist/src/compiled/@ai-sdk/provider/package.json +0 -7
  133. package/dist/src/compiled/@chat-adapter/slack/package.json +0 -7
  134. package/dist/src/compiled/@chat-adapter/state-memory/package.json +0 -7
  135. package/dist/src/compiled/@opentelemetry/api/package.json +0 -7
  136. package/dist/src/compiled/@standard-schema/spec/package.json +0 -7
  137. package/dist/src/compiled/@vercel/oidc/package.json +0 -7
  138. package/dist/src/compiled/@vercel/sandbox/package.json +0 -7
  139. package/dist/src/compiled/@workflow/core/_workflow-world.d.ts +0 -60
  140. package/dist/src/compiled/@workflow/core/package.json +0 -7
  141. package/dist/src/compiled/@workflow/errors/package.json +0 -7
  142. package/dist/src/compiled/_chunks/workflow/resume-hook-B2kqAsX6.js +0 -12
  143. package/dist/src/compiled/_chunks/workflow/sleep-kQ0UwHn0.js +0 -1
  144. package/dist/src/compiled/chat/package.json +0 -7
  145. package/dist/src/compiled/chokidar/package.json +0 -7
  146. package/dist/src/compiled/commander/package.json +0 -7
  147. package/dist/src/compiled/experimental-ai-sdk-code-mode/package.json +0 -7
  148. package/dist/src/compiled/gray-matter/package.json +0 -7
  149. package/dist/src/compiled/jose/package.json +0 -7
  150. package/dist/src/compiled/jsonc-parser/package.json +0 -7
  151. package/dist/src/compiled/just-bash/package.json +0 -7
  152. package/dist/src/compiled/picocolors/package.json +0 -7
  153. package/dist/src/compiled/turndown/package.json +0 -7
  154. package/dist/src/compiled/zod/package.json +0 -7
  155. package/dist/src/compiled/zod-validation-error/package.json +0 -7
  156. package/dist/src/node_modules/.pnpm/openai@6.39.0_ws@8.21.0_zod@3.25.76/node_modules/openai/version.js +0 -1
  157. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/_vendor/partial-json-parser/parser.js +0 -0
  158. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/auth/workload-identity-auth.js +0 -0
  159. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/azure.js +0 -0
  160. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/api-promise.js +0 -0
  161. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/error.js +0 -0
  162. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/pagination.js +0 -0
  163. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/resource.js +0 -0
  164. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/streaming.js +0 -0
  165. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/core/uploads.js +0 -0
  166. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/error.js +0 -0
  167. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/index.js +0 -0
  168. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/decoders/line.js +0 -0
  169. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/detect-platform.js +0 -0
  170. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/errors.js +0 -0
  171. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/headers.js +0 -0
  172. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/parse.js +0 -0
  173. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/qs/formats.js +0 -0
  174. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/qs/stringify.js +0 -0
  175. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/qs/utils.js +0 -0
  176. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/request-options.js +0 -0
  177. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/shims.js +0 -0
  178. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/to-file.js +0 -0
  179. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/tslib.js +0 -0
  180. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/uploads.js +0 -0
  181. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/base64.js +0 -0
  182. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/bytes.js +0 -0
  183. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/env.js +0 -0
  184. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/log.js +0 -0
  185. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/path.js +0 -0
  186. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/query.js +0 -0
  187. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/sleep.js +0 -0
  188. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/uuid.js +0 -0
  189. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils/values.js +0 -0
  190. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/internal/utils.js +0 -0
  191. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/AbstractChatCompletionRunner.js +0 -0
  192. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/AssistantStream.js +0 -0
  193. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ChatCompletionRunner.js +0 -0
  194. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ChatCompletionStream.js +0 -0
  195. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ChatCompletionStreamingRunner.js +0 -0
  196. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/EventStream.js +0 -0
  197. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/ResponsesParser.js +0 -0
  198. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/RunnableFunction.js +0 -0
  199. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/Util.js +0 -0
  200. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/chatCompletionUtils.js +0 -0
  201. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/parser.js +0 -0
  202. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/lib/responses/ResponseStream.js +0 -0
  203. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/admin.js +0 -0
  204. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/admin-api-keys.js +0 -0
  205. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/audit-logs.js +0 -0
  206. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/certificates.js +0 -0
  207. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/data-retention.js +0 -0
  208. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/groups.js +0 -0
  209. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/roles.js +0 -0
  210. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/groups/users.js +0 -0
  211. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/invites.js +0 -0
  212. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/organization.js +0 -0
  213. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/api-keys.js +0 -0
  214. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/certificates.js +0 -0
  215. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/data-retention.js +0 -0
  216. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/groups/groups.js +0 -0
  217. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/groups/roles.js +0 -0
  218. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +0 -0
  219. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/model-permissions.js +0 -0
  220. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/projects.js +0 -0
  221. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/rate-limits.js +0 -0
  222. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/roles.js +0 -0
  223. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/service-accounts.js +0 -0
  224. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +0 -0
  225. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/users/roles.js +0 -0
  226. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/projects/users/users.js +0 -0
  227. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/roles.js +0 -0
  228. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/spend-alerts.js +0 -0
  229. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/usage.js +0 -0
  230. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/users/roles.js +0 -0
  231. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/admin/organization/users/users.js +0 -0
  232. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/audio.js +0 -0
  233. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/speech.js +0 -0
  234. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/transcriptions.js +0 -0
  235. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/audio/translations.js +0 -0
  236. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/batches.js +0 -0
  237. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/assistants.js +0 -0
  238. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/beta.js +0 -0
  239. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/chatkit/chatkit.js +0 -0
  240. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/chatkit/sessions.js +0 -0
  241. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/chatkit/threads.js +0 -0
  242. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/realtime/realtime.js +0 -0
  243. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/realtime/sessions.js +0 -0
  244. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/realtime/transcription-sessions.js +0 -0
  245. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/messages.js +0 -0
  246. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/runs/runs.js +0 -0
  247. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/runs/steps.js +0 -0
  248. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/beta/threads/threads.js +0 -0
  249. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/chat.js +0 -0
  250. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/completions/completions.js +0 -0
  251. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/completions/index.js +0 -0
  252. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/completions/messages.js +0 -0
  253. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/chat/index.js +0 -0
  254. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/completions.js +0 -0
  255. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/containers/containers.js +0 -0
  256. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/containers/files/content.js +0 -0
  257. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/containers/files/files.js +0 -0
  258. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/conversations/conversations.js +0 -0
  259. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/conversations/items.js +0 -0
  260. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/embeddings.js +0 -0
  261. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/evals/evals.js +0 -0
  262. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/evals/runs/output-items.js +0 -0
  263. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/evals/runs/runs.js +0 -0
  264. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/files.js +0 -0
  265. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/alpha/alpha.js +0 -0
  266. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/alpha/graders.js +0 -0
  267. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.js +0 -0
  268. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +0 -0
  269. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/fine-tuning.js +0 -0
  270. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +0 -0
  271. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/jobs/jobs.js +0 -0
  272. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/fine-tuning/methods.js +0 -0
  273. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/graders/grader-models.js +0 -0
  274. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/graders/graders.js +0 -0
  275. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/images.js +0 -0
  276. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/index.js +0 -0
  277. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/models.js +0 -0
  278. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/moderations.js +0 -0
  279. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/realtime/calls.js +0 -0
  280. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/realtime/client-secrets.js +0 -0
  281. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/realtime/realtime.js +0 -0
  282. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/responses/input-items.js +0 -0
  283. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/responses/input-tokens.js +0 -0
  284. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/responses/responses.js +0 -0
  285. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/shared.js +0 -0
  286. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/content.js +0 -0
  287. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/skills.js +0 -0
  288. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/versions/content.js +0 -0
  289. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/skills/versions/versions.js +0 -0
  290. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/uploads/parts.js +0 -0
  291. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/uploads/uploads.js +0 -0
  292. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/vector-stores/file-batches.js +0 -0
  293. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/vector-stores/files.js +0 -0
  294. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/vector-stores/vector-stores.js +0 -0
  295. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/videos.js +0 -0
  296. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/webhooks/index.js +0 -0
  297. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/webhooks/webhooks.js +0 -0
  298. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/resources/webhooks.js +0 -0
  299. /package/dist/src/node_modules/.pnpm/{openai@6.39.0_ws@8.21.0_zod@3.25.76 → openai@6.39.1_ws@8.21.0_zod@3.25.76}/node_modules/openai/streaming.js +0 -0
@@ -18,6 +18,10 @@ export interface IFileSystem {
18
18
  getAllPaths(): string[];
19
19
  mkdir(path: string, options?: { recursive?: boolean | undefined }): Promise<void>;
20
20
  readFileBuffer(path: string): Promise<Uint8Array>;
21
+ rm(
22
+ path: string,
23
+ options?: { force?: boolean | undefined; recursive?: boolean | undefined },
24
+ ): Promise<void>;
21
25
  stat(path: string): Promise<{
22
26
  isDirectory: boolean;
23
27
  isFile: boolean;
@@ -51,6 +55,10 @@ export declare class InMemoryFs implements IFileSystem {
51
55
  getAllPaths(): string[];
52
56
  mkdir(path: string, options?: { recursive?: boolean | undefined }): Promise<void>;
53
57
  readFileBuffer(path: string): Promise<Uint8Array>;
58
+ rm(
59
+ path: string,
60
+ options?: { force?: boolean | undefined; recursive?: boolean | undefined },
61
+ ): Promise<void>;
54
62
  stat(path: string): Promise<{
55
63
  isDirectory: boolean;
56
64
  isFile: boolean;
@@ -1528,7 +1528,7 @@ ${e}\r
1528
1528
  `,2);r=t[e]}else if(o===`-P`){if(e++,e>=t.length)return Q(`compgen: -P: option requires an argument
1529
1529
  `,2);i=t[e]}else if(o===`-S`){if(e++,e>=t.length)return Q(`compgen: -S: option requires an argument
1530
1530
  `,2);a=t[e]}else if(o===`-o`){if(e++,e>=t.length)return Q(`compgen: -o: option requires an argument
1531
- `,2);let n=t[e];if(n===`plusdirs`)s=!0;else if(n===`dirnames`)c=!0;else if(n===`default`)l=!0;else if(!(n===`filenames`||n===`nospace`||n===`bashdefault`||n===`noquote`))return Q(`compgen: ${n}: invalid option name
1531
+ `,2);let n=t[e];if(n===`plusdirs`)s=!0;else if(n===`dirnames`)c=!0;else if(n==="default")l=!0;else if(!(n===`filenames`||n===`nospace`||n===`bashdefault`||n===`noquote`))return Q(`compgen: ${n}: invalid option name
1532
1532
  `,2)}else if(o===`-F`){if(e++,e>=t.length)return Q(`compgen: -F: option requires an argument
1533
1533
  `,2);d=t[e]}else if(o===`-C`){if(e++,e>=t.length)return Q(`compgen: -C: option requires an argument
1534
1534
  `,2);f=t[e]}else if(o===`-X`){if(e++,e>=t.length)return Q(`compgen: -X: option requires an argument
@@ -1 +1 @@
1
- import{n as e}from"../_chunks/workflow/chunk-DSjMdhoD.js";import{An as t,At as n,Bi as r,Bt as i,Dn as a,F as o,Ft as s,Gt as c,Ii as l,It as ee,Kt as te,Lt as ne,Mn as re,Mt as ie,Nt as ae,On as u,Qt as d,Ri as f,Rt as p,Si as m,Ut as h,Vi as g,W as _,Xt as v,Zt as y,_n as b,bi as x,dn as S,dt as C,en as w,gt as T,ht as E,jn as D,jt as O,kn as k,ln as A,nn as j,qt as M,ri as N,rn as P,t as F,tn as I,un as L,vi as R,vt as z,xi as B,yi as V,zt as H}from"../_chunks/workflow/core-XWIi7wKc.js";import{$ as U,$n as W,$t as G,A as K,An as q,At as J,B as oe,Bn as se,Bt as ce,C as le,Cn as ue,Cr as Y,Ct as de,D as fe,Dn as pe,Dt as me,E as he,En as ge,Et as _e,F as ve,Fn as ye,Ft as be,G as xe,Gn as Se,Gt as Ce,H as we,Hn as Te,Ht as Ee,I as De,In as Oe,It as ke,J as Ae,Jn as je,Jt as Me,K as Ne,Kn as Pe,Kt as Fe,L as Ie,Ln as Le,Lt as Re,M as ze,Mn as Be,Mt as Ve,N as He,Nn as Ue,Nt as We,O as Ge,On as Ke,Ot as qe,P as Je,Pn as Ye,Pt as Xe,Q as Ze,Qn as Qe,Qt as $e,R as et,Rn as tt,Rt as nt,S as rt,Sn as it,Sr as at,St as ot,T as st,Tn as ct,Tt as lt,U as ut,Un as dt,Ut as ft,V as pt,Vn as mt,Vt as ht,W as gt,Wn as _t,Wt as vt,X as yt,Xn as bt,Xt as xt,Y as St,Yn as Ct,Yt as wt,Z as Tt,Zn as Et,Zt as Dt,_ as Ot,_n as kt,_r as At,_t as jt,a as X,an as Mt,ar as Nt,at as Pt,b as Ft,bn as It,br as Lt,bt as Z,c as Rt,cn as zt,cr as Bt,ct as Vt,d as Ht,dn as Ut,dr as Wt,dt as Gt,en as Kt,er as qt,et as Jt,f as Yt,fn as Xt,fr as Zt,ft as Qt,g as $t,gn as en,gr as tn,gt as nn,h as rn,hn as an,hr as on,ht as sn,i as cn,in as ln,ir as un,it as dn,j as fn,jn as pn,jt as mn,k as hn,kn as gn,kt as _n,l as vn,ln as yn,lr as bn,lt as xn,m as Sn,mn as Cn,mr as wn,mt as Tn,n as En,nn as Dn,nr as On,nt as kn,o as An,on as jn,or as Mn,ot as Nn,p as Pn,pn as Fn,pr as In,pt as Ln,q as Rn,qn as zn,qt as Bn,r as Vn,rn as Hn,rr as Un,rt as Wn,s as Gn,sn as Kn,sr as qn,st as Jn,t as Yn,tn as Xn,tr as Zn,tt as Qn,u as $n,un as er,ur as tr,ut as nr,v as rr,vn as ir,vr as ar,vt as or,w as sr,wn as cr,wr as lr,wt as ur,x as dr,xn as fr,xr as pr,xt as mr,y as hr,yn as gr,yr as _r,yt as vr,z as yr,zn as br,zt as xr}from"../_chunks/workflow/schemas-DmgDnhW3.js";import{i as Sr,n as Cr,r as wr,t as Tr}from"../_chunks/workflow/compat-DcEvieoj.js";import{t as Er}from"../_chunks/workflow/coerce-BhzIW-Hm.js";const Q={...ye,...lr,iso:Y},Dr=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Or(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function kr(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Ar(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return Q.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Q.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=$(kr(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return Q.null();if(n.length===0)return Q.never();if(n.length===1)return Q.literal(n[0]);if(n.every(e=>typeof e==`string`))return Q.enum(n);let r=n.map(e=>Q.literal(e));return r.length<2?r[0]:Q.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>Ar({...e,type:n},t));return r.length===0?Q.never():r.length===1?r[0]:Q.union(r)}if(!n)return Q.any();let r;switch(n){case`string`:{let t=Q.string();if(e.format){let n=e.format;n===`email`?t=t.check(Q.email()):n===`uri`||n===`uri-reference`?t=t.check(Q.url()):n===`uuid`||n===`guid`?t=t.check(Q.uuid()):n===`date-time`?t=t.check(Q.iso.datetime()):n===`date`?t=t.check(Q.iso.date()):n===`time`?t=t.check(Q.iso.time()):n===`duration`?t=t.check(Q.iso.duration()):n===`ipv4`?t=t.check(Q.ipv4()):n===`ipv6`?t=t.check(Q.ipv6()):n===`mac`?t=t.check(Q.mac()):n===`cidr`?t=t.check(Q.cidrv4()):n===`cidr-v6`?t=t.check(Q.cidrv6()):n===`base64`?t=t.check(Q.base64()):n===`base64url`?t=t.check(Q.base64url()):n===`e164`?t=t.check(Q.e164()):n===`jwt`?t=t.check(Q.jwt()):n===`emoji`?t=t.check(Q.emoji()):n===`nanoid`?t=t.check(Q.nanoid()):n===`cuid`?t=t.check(Q.cuid()):n===`cuid2`?t=t.check(Q.cuid2()):n===`ulid`?t=t.check(Q.ulid()):n===`xid`?t=t.check(Q.xid()):n===`ksuid`&&(t=t.check(Q.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?Q.number().int():Q.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=Q.boolean();break;case`null`:r=Q.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=$(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=$(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?$(e.additionalProperties,t):Q.any();if(Object.keys(n).length===0){r=Q.record(i,a);break}let o=Q.object(n).passthrough(),s=Q.looseRecord(i,a);r=Q.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=$(i[e],t),r=Q.string().regex(new RegExp(e));o.push(Q.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(Q.object(n).passthrough()),s.push(...o),s.length===0)r=Q.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=Q.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=Q.intersection(e,s[t]);r=e}break}let o=Q.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall($(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>$(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?$(i,t):void 0;r=o?Q.tuple(a).rest(o):Q.tuple(a),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>$(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?$(e.additionalItems,t):void 0;r=a?Q.tuple(n).rest(a):Q.tuple(n),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(i!==void 0){let n=$(i,t),a=Q.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=Q.array(Q.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function $(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n=Ar(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>$(e,t)),a=Q.union(i);n=r?Q.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>$(e,t)),a=Q.xor(i);n=r?Q.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Q.any();else{let i=r?n:$(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=Q.intersection(i,$(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=Q.nullable(n)),e.readOnly===!0&&(n=Q.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))Dr.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function jr(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Or(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??k};return $(n,r)}var Mr=e({$brand:()=>f,$input:()=>a,$output:()=>u,NEVER:()=>r,TimePrecision:()=>_,ZodAny:()=>Yn,ZodArray:()=>En,ZodBase64:()=>Vn,ZodBase64URL:()=>cn,ZodBigInt:()=>X,ZodBigIntFormat:()=>An,ZodBoolean:()=>Gn,ZodCIDRv4:()=>Rt,ZodCIDRv6:()=>vn,ZodCUID:()=>$n,ZodCUID2:()=>Ht,ZodCatch:()=>Yt,ZodCodec:()=>Pn,ZodCustom:()=>Sn,ZodCustomStringFormat:()=>rn,ZodDate:()=>$t,ZodDefault:()=>Ot,ZodDiscriminatedUnion:()=>rr,ZodE164:()=>hr,ZodEmail:()=>Ft,ZodEmoji:()=>dr,ZodEnum:()=>rt,ZodError:()=>At,ZodExactOptional:()=>le,ZodFile:()=>sr,ZodFirstPartyTypeKind:()=>Tr,ZodFunction:()=>st,ZodGUID:()=>he,ZodIPv4:()=>fe,ZodIPv6:()=>Ge,ZodISODate:()=>_r,ZodISODateTime:()=>Lt,ZodISODuration:()=>pr,ZodISOTime:()=>at,ZodIntersection:()=>hn,ZodIssueCode:()=>Cr,ZodJWT:()=>K,ZodKSUID:()=>fn,ZodLazy:()=>ze,ZodLiteral:()=>He,ZodMAC:()=>Je,ZodMap:()=>ve,ZodNaN:()=>De,ZodNanoID:()=>Ie,ZodNever:()=>et,ZodNonOptional:()=>yr,ZodNull:()=>oe,ZodNullable:()=>pt,ZodNumber:()=>we,ZodNumberFormat:()=>ut,ZodObject:()=>gt,ZodOptional:()=>xe,ZodPipe:()=>Ne,ZodPrefault:()=>Rn,ZodPreprocess:()=>Ae,ZodPromise:()=>St,ZodReadonly:()=>yt,ZodRealError:()=>ar,ZodRecord:()=>Tt,ZodSet:()=>Ze,ZodString:()=>U,ZodStringFormat:()=>Jt,ZodSuccess:()=>Qn,ZodSymbol:()=>kn,ZodTemplateLiteral:()=>Wn,ZodTransform:()=>dn,ZodTuple:()=>Pt,ZodType:()=>Nn,ZodULID:()=>Jn,ZodURL:()=>Vt,ZodUUID:()=>xn,ZodUndefined:()=>nr,ZodUnion:()=>Gt,ZodUnknown:()=>Qt,ZodVoid:()=>Ln,ZodXID:()=>Tn,ZodXor:()=>sn,_ZodString:()=>nn,_default:()=>or,_function:()=>Z,any:()=>lt,array:()=>_e,base64:()=>me,base64url:()=>qe,bigint:()=>_n,boolean:()=>J,catch:()=>jt,check:()=>mn,cidrv4:()=>Ve,cidrv6:()=>We,clone:()=>m,codec:()=>Xe,coerce:()=>Er,config:()=>g,core:()=>F,cuid:()=>be,cuid2:()=>ke,custom:()=>Re,date:()=>nt,decode:()=>Nt,decodeAsync:()=>Mn,describe:()=>xr,discriminatedUnion:()=>ce,e164:()=>ht,email:()=>Ee,emoji:()=>ft,encode:()=>qn,encodeAsync:()=>Bt,endsWith:()=>C,enum:()=>vr,exactOptional:()=>vt,file:()=>Ce,flattenError:()=>R,float32:()=>Fe,float64:()=>Bn,formatError:()=>V,fromJSONSchema:()=>jr,function:()=>Z,getErrorMap:()=>wr,globalRegistry:()=>k,gt:()=>E,gte:()=>T,guid:()=>Me,hash:()=>wt,hex:()=>xt,hostname:()=>Dt,httpUrl:()=>$e,includes:()=>z,instanceof:()=>mr,int:()=>G,int32:()=>Kt,int64:()=>Xn,intersection:()=>Dn,invertCodec:()=>Hn,ipv4:()=>ln,ipv6:()=>Mt,iso:()=>Y,json:()=>jn,jwt:()=>Kn,keyof:()=>zt,ksuid:()=>yn,lazy:()=>er,length:()=>n,literal:()=>Ut,locales:()=>D,looseObject:()=>Xt,looseRecord:()=>Fn,lowercase:()=>O,lt:()=>ie,lte:()=>ae,mac:()=>Cn,map:()=>an,maxLength:()=>s,maxSize:()=>ee,meta:()=>en,mime:()=>ne,minLength:()=>p,minSize:()=>H,multipleOf:()=>i,nan:()=>kt,nanoid:()=>ir,nativeEnum:()=>gr,negative:()=>h,never:()=>It,nonnegative:()=>c,nonoptional:()=>fr,nonpositive:()=>te,normalize:()=>M,null:()=>ot,nullable:()=>it,nullish:()=>ue,number:()=>cr,object:()=>ct,optional:()=>ge,overwrite:()=>v,parse:()=>bn,parseAsync:()=>tr,partialRecord:()=>pe,pipe:()=>Ke,positive:()=>y,prefault:()=>gn,preprocess:()=>q,prettifyError:()=>x,promise:()=>pn,property:()=>d,readonly:()=>Be,record:()=>Ue,refine:()=>Ye,regex:()=>w,regexes:()=>N,registry:()=>t,safeDecode:()=>Wt,safeDecodeAsync:()=>Zt,safeEncode:()=>In,safeEncodeAsync:()=>wn,safeParse:()=>on,safeParseAsync:()=>tn,set:()=>Oe,setErrorMap:()=>Sr,size:()=>I,slugify:()=>j,startsWith:()=>P,strictObject:()=>Le,string:()=>tt,stringFormat:()=>br,stringbool:()=>se,success:()=>mt,superRefine:()=>Te,symbol:()=>dt,templateLiteral:()=>_t,toJSONSchema:()=>o,toLowerCase:()=>A,toUpperCase:()=>L,transform:()=>Se,treeifyError:()=>B,trim:()=>S,tuple:()=>Pe,uint32:()=>zn,uint64:()=>je,ulid:()=>Ct,undefined:()=>de,union:()=>bt,unknown:()=>Et,uppercase:()=>b,url:()=>Qe,util:()=>l,uuid:()=>W,uuidv4:()=>qt,uuidv6:()=>Zn,uuidv7:()=>On,void:()=>ur,xid:()=>Un,xor:()=>un});g(re());var Nr=Mr;export{f as $brand,a as $input,u as $output,r as NEVER,_ as TimePrecision,Yn as ZodAny,En as ZodArray,Vn as ZodBase64,cn as ZodBase64URL,X as ZodBigInt,An as ZodBigIntFormat,Gn as ZodBoolean,Rt as ZodCIDRv4,vn as ZodCIDRv6,$n as ZodCUID,Ht as ZodCUID2,Yt as ZodCatch,Pn as ZodCodec,Sn as ZodCustom,rn as ZodCustomStringFormat,$t as ZodDate,Ot as ZodDefault,rr as ZodDiscriminatedUnion,hr as ZodE164,Ft as ZodEmail,dr as ZodEmoji,rt as ZodEnum,At as ZodError,le as ZodExactOptional,sr as ZodFile,Tr as ZodFirstPartyTypeKind,st as ZodFunction,he as ZodGUID,fe as ZodIPv4,Ge as ZodIPv6,_r as ZodISODate,Lt as ZodISODateTime,pr as ZodISODuration,at as ZodISOTime,hn as ZodIntersection,Cr as ZodIssueCode,K as ZodJWT,fn as ZodKSUID,ze as ZodLazy,He as ZodLiteral,Je as ZodMAC,ve as ZodMap,De as ZodNaN,Ie as ZodNanoID,et as ZodNever,yr as ZodNonOptional,oe as ZodNull,pt as ZodNullable,we as ZodNumber,ut as ZodNumberFormat,gt as ZodObject,xe as ZodOptional,Ne as ZodPipe,Rn as ZodPrefault,Ae as ZodPreprocess,St as ZodPromise,yt as ZodReadonly,ar as ZodRealError,Tt as ZodRecord,Ze as ZodSet,U as ZodString,Jt as ZodStringFormat,Qn as ZodSuccess,kn as ZodSymbol,Wn as ZodTemplateLiteral,dn as ZodTransform,Pt as ZodTuple,Nn as ZodType,Jn as ZodULID,Vt as ZodURL,xn as ZodUUID,nr as ZodUndefined,Gt as ZodUnion,Qt as ZodUnknown,Ln as ZodVoid,Tn as ZodXID,sn as ZodXor,nn as _ZodString,or as _default,Z as _function,Z as function,lt as any,_e as array,me as base64,qe as base64url,_n as bigint,J as boolean,jt as catch,mn as check,Ve as cidrv4,We as cidrv6,m as clone,Xe as codec,Er as coerce,g as config,F as core,be as cuid,ke as cuid2,Re as custom,nt as date,Nt as decode,Mn as decodeAsync,Nr as default,xr as describe,ce as discriminatedUnion,ht as e164,Ee as email,ft as emoji,qn as encode,Bt as encodeAsync,C as endsWith,vr as enum,vt as exactOptional,Ce as file,R as flattenError,Fe as float32,Bn as float64,V as formatError,jr as fromJSONSchema,wr as getErrorMap,k as globalRegistry,E as gt,T as gte,Me as guid,wt as hash,xt as hex,Dt as hostname,$e as httpUrl,z as includes,mr as instanceof,G as int,Kt as int32,Xn as int64,Dn as intersection,Hn as invertCodec,ln as ipv4,Mt as ipv6,Y as iso,jn as json,Kn as jwt,zt as keyof,yn as ksuid,er as lazy,n as length,Ut as literal,D as locales,Xt as looseObject,Fn as looseRecord,O as lowercase,ie as lt,ae as lte,Cn as mac,an as map,s as maxLength,ee as maxSize,en as meta,ne as mime,p as minLength,H as minSize,i as multipleOf,kt as nan,ir as nanoid,gr as nativeEnum,h as negative,It as never,c as nonnegative,fr as nonoptional,te as nonpositive,M as normalize,ot as null,it as nullable,ue as nullish,cr as number,ct as object,ge as optional,v as overwrite,bn as parse,tr as parseAsync,pe as partialRecord,Ke as pipe,y as positive,gn as prefault,q as preprocess,x as prettifyError,pn as promise,d as property,Be as readonly,Ue as record,Ye as refine,w as regex,N as regexes,t as registry,Wt as safeDecode,Zt as safeDecodeAsync,In as safeEncode,wn as safeEncodeAsync,on as safeParse,tn as safeParseAsync,Oe as set,Sr as setErrorMap,I as size,j as slugify,P as startsWith,Le as strictObject,tt as string,br as stringFormat,se as stringbool,mt as success,Te as superRefine,dt as symbol,_t as templateLiteral,o as toJSONSchema,A as toLowerCase,L as toUpperCase,Se as transform,B as treeifyError,S as trim,Pe as tuple,zn as uint32,je as uint64,Ct as ulid,de as undefined,bt as union,Et as unknown,b as uppercase,Qe as url,l as util,W as uuid,qt as uuidv4,Zn as uuidv6,On as uuidv7,ur as void,Un as xid,un as xor,Mr as z};
1
+ import{n as e}from"../_chunks/workflow/chunk-DSjMdhoD.js";import{An as t,At as n,Bi as r,Bt as i,Dn as a,F as o,Ft as s,Gt as c,Ii as l,It as ee,Kt as te,Lt as ne,Mn as re,Mt as ie,Nt as ae,On as u,Qt as d,Ri as f,Rt as p,Si as m,Ut as h,Vi as g,W as _,Xt as v,Zt as y,_n as b,bi as x,dn as S,dt as C,en as w,gt as T,ht as E,jn as D,jt as O,kn as k,ln as A,nn as j,qt as M,ri as N,rn as P,t as F,tn as I,un as L,vi as R,vt as z,xi as B,yi as V,zt as H}from"../_chunks/workflow/core-5Woff_dW.js";import{$ as U,$n as W,$t as G,A as K,An as q,At as J,B as oe,Bn as se,Bt as ce,C as le,Cn as ue,Cr as Y,Ct as de,D as fe,Dn as pe,Dt as me,E as he,En as ge,Et as _e,F as ve,Fn as ye,Ft as be,G as xe,Gn as Se,Gt as Ce,H as we,Hn as Te,Ht as Ee,I as De,In as Oe,It as ke,J as Ae,Jn as je,Jt as Me,K as Ne,Kn as Pe,Kt as Fe,L as Ie,Ln as Le,Lt as Re,M as ze,Mn as Be,Mt as Ve,N as He,Nn as Ue,Nt as We,O as Ge,On as Ke,Ot as qe,P as Je,Pn as Ye,Pt as Xe,Q as Ze,Qn as Qe,Qt as $e,R as et,Rn as tt,Rt as nt,S as rt,Sn as it,Sr as at,St as ot,T as st,Tn as ct,Tt as lt,U as ut,Un as dt,Ut as ft,V as pt,Vn as mt,Vt as ht,W as gt,Wn as _t,Wt as vt,X as yt,Xn as bt,Xt as xt,Y as St,Yn as Ct,Yt as wt,Z as Tt,Zn as Et,Zt as Dt,_ as Ot,_n as kt,_r as At,_t as jt,a as X,an as Mt,ar as Nt,at as Pt,b as Ft,bn as It,br as Lt,bt as Z,c as Rt,cn as zt,cr as Bt,ct as Vt,d as Ht,dn as Ut,dr as Wt,dt as Gt,en as Kt,er as qt,et as Jt,f as Yt,fn as Xt,fr as Zt,ft as Qt,g as $t,gn as en,gr as tn,gt as nn,h as rn,hn as an,hr as on,ht as sn,i as cn,in as ln,ir as un,it as dn,j as fn,jn as pn,jt as mn,k as hn,kn as gn,kt as _n,l as vn,ln as yn,lr as bn,lt as xn,m as Sn,mn as Cn,mr as wn,mt as Tn,n as En,nn as Dn,nr as On,nt as kn,o as An,on as jn,or as Mn,ot as Nn,p as Pn,pn as Fn,pr as In,pt as Ln,q as Rn,qn as zn,qt as Bn,r as Vn,rn as Hn,rr as Un,rt as Wn,s as Gn,sn as Kn,sr as qn,st as Jn,t as Yn,tn as Xn,tr as Zn,tt as Qn,u as $n,un as er,ur as tr,ut as nr,v as rr,vn as ir,vr as ar,vt as or,w as sr,wn as cr,wr as lr,wt as ur,x as dr,xn as fr,xr as pr,xt as mr,y as hr,yn as gr,yr as _r,yt as vr,z as yr,zn as br,zt as xr}from"../_chunks/workflow/schemas-DWOIBELG.js";import{i as Sr,n as Cr,r as wr,t as Tr}from"../_chunks/workflow/compat-CG1hDp-3.js";import{t as Er}from"../_chunks/workflow/coerce-BTuSKQr5.js";const Q={...ye,...lr,iso:Y},Dr=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Or(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function kr(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Ar(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return Q.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Q.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=$(kr(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return Q.null();if(n.length===0)return Q.never();if(n.length===1)return Q.literal(n[0]);if(n.every(e=>typeof e==`string`))return Q.enum(n);let r=n.map(e=>Q.literal(e));return r.length<2?r[0]:Q.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>Ar({...e,type:n},t));return r.length===0?Q.never():r.length===1?r[0]:Q.union(r)}if(!n)return Q.any();let r;switch(n){case`string`:{let t=Q.string();if(e.format){let n=e.format;n===`email`?t=t.check(Q.email()):n===`uri`||n===`uri-reference`?t=t.check(Q.url()):n===`uuid`||n===`guid`?t=t.check(Q.uuid()):n===`date-time`?t=t.check(Q.iso.datetime()):n===`date`?t=t.check(Q.iso.date()):n===`time`?t=t.check(Q.iso.time()):n===`duration`?t=t.check(Q.iso.duration()):n===`ipv4`?t=t.check(Q.ipv4()):n===`ipv6`?t=t.check(Q.ipv6()):n===`mac`?t=t.check(Q.mac()):n===`cidr`?t=t.check(Q.cidrv4()):n===`cidr-v6`?t=t.check(Q.cidrv6()):n===`base64`?t=t.check(Q.base64()):n===`base64url`?t=t.check(Q.base64url()):n===`e164`?t=t.check(Q.e164()):n===`jwt`?t=t.check(Q.jwt()):n===`emoji`?t=t.check(Q.emoji()):n===`nanoid`?t=t.check(Q.nanoid()):n===`cuid`?t=t.check(Q.cuid()):n===`cuid2`?t=t.check(Q.cuid2()):n===`ulid`?t=t.check(Q.ulid()):n===`xid`?t=t.check(Q.xid()):n===`ksuid`&&(t=t.check(Q.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?Q.number().int():Q.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=Q.boolean();break;case`null`:r=Q.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=$(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=$(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?$(e.additionalProperties,t):Q.any();if(Object.keys(n).length===0){r=Q.record(i,a);break}let o=Q.object(n).passthrough(),s=Q.looseRecord(i,a);r=Q.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=$(i[e],t),r=Q.string().regex(new RegExp(e));o.push(Q.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(Q.object(n).passthrough()),s.push(...o),s.length===0)r=Q.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=Q.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=Q.intersection(e,s[t]);r=e}break}let o=Q.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall($(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>$(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?$(i,t):void 0;r=o?Q.tuple(a).rest(o):Q.tuple(a),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>$(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?$(e.additionalItems,t):void 0;r=a?Q.tuple(n).rest(a):Q.tuple(n),typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(i!==void 0){let n=$(i,t),a=Q.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=Q.array(Q.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function $(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n=Ar(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>$(e,t)),a=Q.union(i);n=r?Q.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>$(e,t)),a=Q.xor(i);n=r?Q.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Q.any();else{let i=r?n:$(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=Q.intersection(i,$(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=Q.nullable(n)),e.readOnly===!0&&(n=Q.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))Dr.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function jr(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Or(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??k};return $(n,r)}var Mr=e({$brand:()=>f,$input:()=>a,$output:()=>u,NEVER:()=>r,TimePrecision:()=>_,ZodAny:()=>Yn,ZodArray:()=>En,ZodBase64:()=>Vn,ZodBase64URL:()=>cn,ZodBigInt:()=>X,ZodBigIntFormat:()=>An,ZodBoolean:()=>Gn,ZodCIDRv4:()=>Rt,ZodCIDRv6:()=>vn,ZodCUID:()=>$n,ZodCUID2:()=>Ht,ZodCatch:()=>Yt,ZodCodec:()=>Pn,ZodCustom:()=>Sn,ZodCustomStringFormat:()=>rn,ZodDate:()=>$t,ZodDefault:()=>Ot,ZodDiscriminatedUnion:()=>rr,ZodE164:()=>hr,ZodEmail:()=>Ft,ZodEmoji:()=>dr,ZodEnum:()=>rt,ZodError:()=>At,ZodExactOptional:()=>le,ZodFile:()=>sr,ZodFirstPartyTypeKind:()=>Tr,ZodFunction:()=>st,ZodGUID:()=>he,ZodIPv4:()=>fe,ZodIPv6:()=>Ge,ZodISODate:()=>_r,ZodISODateTime:()=>Lt,ZodISODuration:()=>pr,ZodISOTime:()=>at,ZodIntersection:()=>hn,ZodIssueCode:()=>Cr,ZodJWT:()=>K,ZodKSUID:()=>fn,ZodLazy:()=>ze,ZodLiteral:()=>He,ZodMAC:()=>Je,ZodMap:()=>ve,ZodNaN:()=>De,ZodNanoID:()=>Ie,ZodNever:()=>et,ZodNonOptional:()=>yr,ZodNull:()=>oe,ZodNullable:()=>pt,ZodNumber:()=>we,ZodNumberFormat:()=>ut,ZodObject:()=>gt,ZodOptional:()=>xe,ZodPipe:()=>Ne,ZodPrefault:()=>Rn,ZodPreprocess:()=>Ae,ZodPromise:()=>St,ZodReadonly:()=>yt,ZodRealError:()=>ar,ZodRecord:()=>Tt,ZodSet:()=>Ze,ZodString:()=>U,ZodStringFormat:()=>Jt,ZodSuccess:()=>Qn,ZodSymbol:()=>kn,ZodTemplateLiteral:()=>Wn,ZodTransform:()=>dn,ZodTuple:()=>Pt,ZodType:()=>Nn,ZodULID:()=>Jn,ZodURL:()=>Vt,ZodUUID:()=>xn,ZodUndefined:()=>nr,ZodUnion:()=>Gt,ZodUnknown:()=>Qt,ZodVoid:()=>Ln,ZodXID:()=>Tn,ZodXor:()=>sn,_ZodString:()=>nn,_default:()=>or,_function:()=>Z,any:()=>lt,array:()=>_e,base64:()=>me,base64url:()=>qe,bigint:()=>_n,boolean:()=>J,catch:()=>jt,check:()=>mn,cidrv4:()=>Ve,cidrv6:()=>We,clone:()=>m,codec:()=>Xe,coerce:()=>Er,config:()=>g,core:()=>F,cuid:()=>be,cuid2:()=>ke,custom:()=>Re,date:()=>nt,decode:()=>Nt,decodeAsync:()=>Mn,describe:()=>xr,discriminatedUnion:()=>ce,e164:()=>ht,email:()=>Ee,emoji:()=>ft,encode:()=>qn,encodeAsync:()=>Bt,endsWith:()=>C,enum:()=>vr,exactOptional:()=>vt,file:()=>Ce,flattenError:()=>R,float32:()=>Fe,float64:()=>Bn,formatError:()=>V,fromJSONSchema:()=>jr,function:()=>Z,getErrorMap:()=>wr,globalRegistry:()=>k,gt:()=>E,gte:()=>T,guid:()=>Me,hash:()=>wt,hex:()=>xt,hostname:()=>Dt,httpUrl:()=>$e,includes:()=>z,instanceof:()=>mr,int:()=>G,int32:()=>Kt,int64:()=>Xn,intersection:()=>Dn,invertCodec:()=>Hn,ipv4:()=>ln,ipv6:()=>Mt,iso:()=>Y,json:()=>jn,jwt:()=>Kn,keyof:()=>zt,ksuid:()=>yn,lazy:()=>er,length:()=>n,literal:()=>Ut,locales:()=>D,looseObject:()=>Xt,looseRecord:()=>Fn,lowercase:()=>O,lt:()=>ie,lte:()=>ae,mac:()=>Cn,map:()=>an,maxLength:()=>s,maxSize:()=>ee,meta:()=>en,mime:()=>ne,minLength:()=>p,minSize:()=>H,multipleOf:()=>i,nan:()=>kt,nanoid:()=>ir,nativeEnum:()=>gr,negative:()=>h,never:()=>It,nonnegative:()=>c,nonoptional:()=>fr,nonpositive:()=>te,normalize:()=>M,null:()=>ot,nullable:()=>it,nullish:()=>ue,number:()=>cr,object:()=>ct,optional:()=>ge,overwrite:()=>v,parse:()=>bn,parseAsync:()=>tr,partialRecord:()=>pe,pipe:()=>Ke,positive:()=>y,prefault:()=>gn,preprocess:()=>q,prettifyError:()=>x,promise:()=>pn,property:()=>d,readonly:()=>Be,record:()=>Ue,refine:()=>Ye,regex:()=>w,regexes:()=>N,registry:()=>t,safeDecode:()=>Wt,safeDecodeAsync:()=>Zt,safeEncode:()=>In,safeEncodeAsync:()=>wn,safeParse:()=>on,safeParseAsync:()=>tn,set:()=>Oe,setErrorMap:()=>Sr,size:()=>I,slugify:()=>j,startsWith:()=>P,strictObject:()=>Le,string:()=>tt,stringFormat:()=>br,stringbool:()=>se,success:()=>mt,superRefine:()=>Te,symbol:()=>dt,templateLiteral:()=>_t,toJSONSchema:()=>o,toLowerCase:()=>A,toUpperCase:()=>L,transform:()=>Se,treeifyError:()=>B,trim:()=>S,tuple:()=>Pe,uint32:()=>zn,uint64:()=>je,ulid:()=>Ct,undefined:()=>de,union:()=>bt,unknown:()=>Et,uppercase:()=>b,url:()=>Qe,util:()=>l,uuid:()=>W,uuidv4:()=>qt,uuidv6:()=>Zn,uuidv7:()=>On,void:()=>ur,xid:()=>Un,xor:()=>un});g(re());var Nr=Mr;export{f as $brand,a as $input,u as $output,r as NEVER,_ as TimePrecision,Yn as ZodAny,En as ZodArray,Vn as ZodBase64,cn as ZodBase64URL,X as ZodBigInt,An as ZodBigIntFormat,Gn as ZodBoolean,Rt as ZodCIDRv4,vn as ZodCIDRv6,$n as ZodCUID,Ht as ZodCUID2,Yt as ZodCatch,Pn as ZodCodec,Sn as ZodCustom,rn as ZodCustomStringFormat,$t as ZodDate,Ot as ZodDefault,rr as ZodDiscriminatedUnion,hr as ZodE164,Ft as ZodEmail,dr as ZodEmoji,rt as ZodEnum,At as ZodError,le as ZodExactOptional,sr as ZodFile,Tr as ZodFirstPartyTypeKind,st as ZodFunction,he as ZodGUID,fe as ZodIPv4,Ge as ZodIPv6,_r as ZodISODate,Lt as ZodISODateTime,pr as ZodISODuration,at as ZodISOTime,hn as ZodIntersection,Cr as ZodIssueCode,K as ZodJWT,fn as ZodKSUID,ze as ZodLazy,He as ZodLiteral,Je as ZodMAC,ve as ZodMap,De as ZodNaN,Ie as ZodNanoID,et as ZodNever,yr as ZodNonOptional,oe as ZodNull,pt as ZodNullable,we as ZodNumber,ut as ZodNumberFormat,gt as ZodObject,xe as ZodOptional,Ne as ZodPipe,Rn as ZodPrefault,Ae as ZodPreprocess,St as ZodPromise,yt as ZodReadonly,ar as ZodRealError,Tt as ZodRecord,Ze as ZodSet,U as ZodString,Jt as ZodStringFormat,Qn as ZodSuccess,kn as ZodSymbol,Wn as ZodTemplateLiteral,dn as ZodTransform,Pt as ZodTuple,Nn as ZodType,Jn as ZodULID,Vt as ZodURL,xn as ZodUUID,nr as ZodUndefined,Gt as ZodUnion,Qt as ZodUnknown,Ln as ZodVoid,Tn as ZodXID,sn as ZodXor,nn as _ZodString,or as _default,Z as _function,Z as function,lt as any,_e as array,me as base64,qe as base64url,_n as bigint,J as boolean,jt as catch,mn as check,Ve as cidrv4,We as cidrv6,m as clone,Xe as codec,Er as coerce,g as config,F as core,be as cuid,ke as cuid2,Re as custom,nt as date,Nt as decode,Mn as decodeAsync,Nr as default,xr as describe,ce as discriminatedUnion,ht as e164,Ee as email,ft as emoji,qn as encode,Bt as encodeAsync,C as endsWith,vr as enum,vt as exactOptional,Ce as file,R as flattenError,Fe as float32,Bn as float64,V as formatError,jr as fromJSONSchema,wr as getErrorMap,k as globalRegistry,E as gt,T as gte,Me as guid,wt as hash,xt as hex,Dt as hostname,$e as httpUrl,z as includes,mr as instanceof,G as int,Kt as int32,Xn as int64,Dn as intersection,Hn as invertCodec,ln as ipv4,Mt as ipv6,Y as iso,jn as json,Kn as jwt,zt as keyof,yn as ksuid,er as lazy,n as length,Ut as literal,D as locales,Xt as looseObject,Fn as looseRecord,O as lowercase,ie as lt,ae as lte,Cn as mac,an as map,s as maxLength,ee as maxSize,en as meta,ne as mime,p as minLength,H as minSize,i as multipleOf,kt as nan,ir as nanoid,gr as nativeEnum,h as negative,It as never,c as nonnegative,fr as nonoptional,te as nonpositive,M as normalize,ot as null,it as nullable,ue as nullish,cr as number,ct as object,ge as optional,v as overwrite,bn as parse,tr as parseAsync,pe as partialRecord,Ke as pipe,y as positive,gn as prefault,q as preprocess,x as prettifyError,pn as promise,d as property,Be as readonly,Ue as record,Ye as refine,w as regex,N as regexes,t as registry,Wt as safeDecode,Zt as safeDecodeAsync,In as safeEncode,wn as safeEncodeAsync,on as safeParse,tn as safeParseAsync,Oe as set,Sr as setErrorMap,I as size,j as slugify,P as startsWith,Le as strictObject,tt as string,br as stringFormat,se as stringbool,mt as success,Te as superRefine,dt as symbol,_t as templateLiteral,o as toJSONSchema,A as toLowerCase,L as toUpperCase,Se as transform,B as treeifyError,S as trim,Pe as tuple,zn as uint32,je as uint64,Ct as ulid,de as undefined,bt as union,Et as unknown,b as uppercase,Qe as url,l as util,W as uuid,qt as uuidv4,Zn as uuidv6,On as uuidv7,ur as void,Un as xid,un as xor,Mr as z};
@@ -1 +1 @@
1
- import{_i as e}from"../_chunks/workflow/core-XWIi7wKc.js";function t(e){return e instanceof Object&&`name`in e&&(e.name===`ZodError`||e.name===`$ZodError`)&&`issues`in e&&Array.isArray(e.issues)}var n=`ZodValidationError`,r=class extends Error{name;details;constructor(e,t){super(e,t),this.name=n,this.details=i(t)}toString(){return this.message}};function i(e){if(e){let n=e.cause;if(t(n))return n.issues}return[]}function a(e){return e instanceof r}function o(e){return e instanceof Error&&e.name===n}function s(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function c(e){return{type:e.code,path:e.path,message:`unexpected element in ${e.origin}`}}function l(e){return{type:e.code,path:e.path,message:`unexpected key in ${e.origin}`}}var u=new Set([`a`,`e`,`i`,`o`,`u`,`h`]);function d(e){let t=e.charAt(0).toLowerCase();return[u.has(t)?`an`:`a`,e].join(` `)}function f(e){return e.description??``}function p(e,t={}){switch(typeof e){case`symbol`:return f(e);case`bigint`:case`number`:switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toString();default:return e.toLocaleString(t.localization)}case`string`:return t.wrapStringValueInQuote?`"${e}"`:e;default:if(e instanceof Date)switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toISOString();default:return e.toLocaleString(t.localization)}return String(e)}}function m(e,t){let n=``;switch(e.format){case`lowercase`:case`uppercase`:n+=`expected ${e.format} string`;break;case`starts_with`:n+=`expected string to start with "${e.prefix}"`;break;case`ends_with`:n+=`expected string to end with "${e.suffix}"`;break;case`includes`:n+=`expected string to include "${e.includes}"`;break;case`regex`:n+=`expected string to match pattern`,t.displayInvalidFormatDetails&&(n+=` "${e.pattern}"`);break;case`jwt`:n+=`expected a jwt`,t.displayInvalidFormatDetails&&e.inst&&`alg`in e.inst._zod.def&&(n+=`/${e.inst._zod.def.alg}`),n+=` token`;break;case`email`:n+=`expected an email address`;break;case`url`:case`uuid`:case`guid`:case`cuid`:case`cuid2`:case`ulid`:case`xid`:case`ksuid`:n+=`expected a ${e.format.toUpperCase()}`,e.inst&&`version`in e.inst._zod.def&&(n+=` ${e.inst._zod.def.version}`);break;case`date`:case`datetime`:case`time`:case`duration`:n+=`expected an ISO ${e.format}`;break;case`ipv4`:case`ipv6`:n+=`expected an ${e.format.slice(0,2).toUpperCase()}${e.format.slice(2)} address`;break;case`cidrv4`:case`cidrv6`:n+=`expected a ${e.format.slice(0,4).toUpperCase()}${e.format.slice(4)} address range`;break;case`base64`:case`base64url`:n+=`expected a ${e.format} encoded string`;break;case`e164`:n+=`expected an E.164 formatted phone number`;break;default:if(e.format.startsWith(`sha`)||e.format.startsWith(`md5`)){let[t,r]=e.format.split(`_`);n+=`expected a ${t.toUpperCase()}`,r&&(n+=` ${r}-encoded`),n+=` hash`;break}n+=`expected ${d(e.format)}`}if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function h(e){if(e===null)return!0;switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:case`symbol`:case`undefined`:return!0;default:return!1}}function g(e,t){let n=`expected ${e.expected}`;if(`input`in e&&t.reportInput!==!1){let r=e.input;if(n+=`, received ${_(r)}`,t.reportInput===`typeAndValue`){if(h(r)){let e=p(r,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=` (${e})`}else if(r instanceof Date){let e=p(r,{localization:t.dateLocalization});n+=` (${e})`}}}return{type:e.code,path:e.path,message:n}}function _(e){return typeof e==`object`?e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:e instanceof Date?`date`:e instanceof RegExp?`regexp`:e instanceof Map?`map`:e instanceof Set?`set`:e instanceof Error?`error`:e instanceof Function?`function`:`object`:typeof e}function v(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function y(e,t){let n=(t.maxValuesToDisplay?e.slice(0,t.maxValuesToDisplay):e).map(e=>p(e,{wrapStringValueInQuote:t.wrapStringValuesInQuote}));return n.length<e.length&&n.push(`${e.length-n.length} more value(s)`),n.reduce((e,r,i)=>(i>0&&(i===n.length-1&&t.lastSeparator?e+=t.lastSeparator:e+=t.separator),e+=r,e),``)}function b(e,t){let n;if(n=e.expected===`stringbool`?`expected boolean as string`:e.values.length===0?`invalid value`:e.values.length===1?`expected value to be ${p(e.values[0],{wrapStringValueInQuote:!0})}`:`expected value to be one of ${y(e.values,{separator:t.allowedValuesSeparator,lastSeparator:t.allowedValuesLastSeparator,wrapStringValuesInQuote:t.wrapAllowedValuesInQuote,maxValuesToDisplay:t.maxAllowedValuesToDisplay})}`,`input`in e&&t.reportInput===`typeAndValue`){if(h(e.input)){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}else if(e.input instanceof Date){let r=p(e.input,{localization:t.dateLocalization});n+=`, received ${r}`}}return{type:e.code,path:e.path,message:n}}function x(e,t){let n=`expected multiple of ${e.divisor}`;if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function S(e,t){let n=e.origin===`date`?p(new Date(e.maximum),{localization:t.dateLocalization}):p(e.maximum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be less than${e.inclusive?` or equal to`:``} ${n}`;break;case`string`:r+=`expected string to contain at most ${n} character(s)`;break;case`date`:r+=`expected date to be prior ${e.inclusive?`or equal to`:`to`} "${n}"`;break;case`array`:r+=`expected array to contain at most ${n} item(s)`;break;case`set`:r+=`expected set to contain at most ${n} item(s)`;break;case`file`:r+=`expected file to not exceed ${n} byte(s) in size`;break;default:r+=`expected value to be less than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function C(e,t){let n=e.origin===`date`?p(new Date(e.minimum),{localization:t.dateLocalization}):p(e.minimum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be greater than${e.inclusive?` or equal to`:``} ${n}`;break;case`date`:r+=`expected date to be ${e.inclusive?`later or equal to`:`later to`} "${n}"`;break;case`string`:r+=`expected string to contain at least ${n} character(s)`;break;case`array`:r+=`expected array to contain at least ${n} item(s)`;break;case`set`:r+=`expected set to contain at least ${n} item(s)`;break;case`file`:r+=`expected file to be at least ${n} byte(s) in size`;break;default:r+=`expected value to be greater than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function w(e,t){let n=y(e.keys,{separator:t.unrecognizedKeysSeparator,lastSeparator:t.unrecognizedKeysLastSeparator,wrapStringValuesInQuote:t.wrapUnrecognizedKeysInQuote,maxValuesToDisplay:t.maxUnrecognizedKeysToDisplay});return{type:e.code,path:e.path,message:`unrecognized key(s) ${n} in object`}}var T={invalid_type:g,too_big:S,too_small:C,invalid_format:m,invalid_value:b,invalid_element:c,not_multiple_of:x,unrecognized_keys:w,invalid_key:l,custom:s,invalid_union:v},E={reportInput:`type`,displayInvalidFormatDetails:!1,allowedValuesSeparator:`, `,allowedValuesLastSeparator:` or `,wrapAllowedValuesInQuote:!0,maxAllowedValuesToDisplay:10,unrecognizedKeysSeparator:`, `,unrecognizedKeysLastSeparator:` and `,wrapUnrecognizedKeysInQuote:!0,maxUnrecognizedKeysToDisplay:5,dateLocalization:!0,numberLocalization:!0};function D(e={}){let t={...E,...e};return e=>{if(e.code===void 0)return`Not supported issue type`;let n=T[e.code];return n(e,t).message}}function O(e){return e.length!==0}var k=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function A(e){if(e.length===1){let t=e[0];return typeof t==`symbol`&&(t=f(t)),t.toString()||`""`}return e.reduce((e,t)=>typeof t==`number`?e+`[`+t.toString()+`]`:(typeof t==`symbol`&&(t=f(t)),t.includes(`"`)?e+`["`+j(t)+`"]`:k.test(t)?e+(e.length===0?``:`.`)+t:e+`["`+t+`"]`),``)}function j(e){return e.replace(/"/g,`\\"`)}function M(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}var N={prefix:`Validation error`,prefixSeparator:`: `,maxIssuesInMessage:99,unionSeparator:` or `,issueSeparator:`; `,includePath:!0,forceTitleCase:!0};function P(e={}){let t={...N,...e};return function(e){return I(e.slice(0,t.maxIssuesInMessage).map(e=>F(e,t)).join(t.issueSeparator),t)}}function F(e,t){if(e.code===`invalid_union`&&O(e.errors)){let n=e.errors.map(n=>n.map(n=>F({...n,path:e.path.concat(n.path)},t)).join(t.issueSeparator));return Array.from(new Set(n)).join(t.unionSeparator)}let n=[];t.forceTitleCase?n.push(M(e.message)):n.push(e.message);pathCondition:if(t.includePath&&e.path!==void 0&&O(e.path)){if(e.path.length===1){let t=e.path[0];if(typeof t==`number`){n.push(` at index ${t}`);break pathCondition}}n.push(` at "${A(e.path)}"`)}return n.join(``)}function I(e,t){return t.prefix==null?e.length>0?e:N.prefix:e.length>0?[t.prefix,e].join(t.prefixSeparator):t.prefix}function L(e,n={}){if(!t(e))throw TypeError(`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${V.name}" method instead?`);return R(e,n)}function R(e,t={}){let n=e.issues,i;return i=O(n)?z(t)(n):e.message,new r(i,{cause:e})}function z(e){return`messageBuilder`in e?e.messageBuilder:P(e)}var B=(e={})=>n=>t(n)?R(n,e):n instanceof Error?new r(n.message,{cause:n}):new r(`Unknown error`);function V(e,t={}){return B(t)(e)}function H(t,n={}){return new r(U(n)([t]),{cause:new e([t])})}function U(e){return`messageBuilder`in e?e.messageBuilder:P(e)}export{r as ValidationError,D as createErrorMap,P as createMessageBuilder,V as fromError,L as fromZodError,H as fromZodIssue,a as isValidationError,o as isValidationErrorLike,t as isZodErrorLike,B as toValidationError};
1
+ import{_i as e}from"../_chunks/workflow/core-5Woff_dW.js";function t(e){return e instanceof Object&&`name`in e&&(e.name===`ZodError`||e.name===`$ZodError`)&&`issues`in e&&Array.isArray(e.issues)}var n=`ZodValidationError`,r=class extends Error{name;details;constructor(e,t){super(e,t),this.name=n,this.details=i(t)}toString(){return this.message}};function i(e){if(e){let n=e.cause;if(t(n))return n.issues}return[]}function a(e){return e instanceof r}function o(e){return e instanceof Error&&e.name===n}function s(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function c(e){return{type:e.code,path:e.path,message:`unexpected element in ${e.origin}`}}function l(e){return{type:e.code,path:e.path,message:`unexpected key in ${e.origin}`}}var u=new Set([`a`,`e`,`i`,`o`,`u`,`h`]);function d(e){let t=e.charAt(0).toLowerCase();return[u.has(t)?`an`:`a`,e].join(` `)}function f(e){return e.description??``}function p(e,t={}){switch(typeof e){case`symbol`:return f(e);case`bigint`:case`number`:switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toString();default:return e.toLocaleString(t.localization)}case`string`:return t.wrapStringValueInQuote?`"${e}"`:e;default:if(e instanceof Date)switch(t.localization){case!0:return e.toLocaleString();case!1:return e.toISOString();default:return e.toLocaleString(t.localization)}return String(e)}}function m(e,t){let n=``;switch(e.format){case`lowercase`:case`uppercase`:n+=`expected ${e.format} string`;break;case`starts_with`:n+=`expected string to start with "${e.prefix}"`;break;case`ends_with`:n+=`expected string to end with "${e.suffix}"`;break;case`includes`:n+=`expected string to include "${e.includes}"`;break;case`regex`:n+=`expected string to match pattern`,t.displayInvalidFormatDetails&&(n+=` "${e.pattern}"`);break;case`jwt`:n+=`expected a jwt`,t.displayInvalidFormatDetails&&e.inst&&`alg`in e.inst._zod.def&&(n+=`/${e.inst._zod.def.alg}`),n+=` token`;break;case`email`:n+=`expected an email address`;break;case`url`:case`uuid`:case`guid`:case`cuid`:case`cuid2`:case`ulid`:case`xid`:case`ksuid`:n+=`expected a ${e.format.toUpperCase()}`,e.inst&&`version`in e.inst._zod.def&&(n+=` ${e.inst._zod.def.version}`);break;case`date`:case`datetime`:case`time`:case`duration`:n+=`expected an ISO ${e.format}`;break;case`ipv4`:case`ipv6`:n+=`expected an ${e.format.slice(0,2).toUpperCase()}${e.format.slice(2)} address`;break;case`cidrv4`:case`cidrv6`:n+=`expected a ${e.format.slice(0,4).toUpperCase()}${e.format.slice(4)} address range`;break;case`base64`:case`base64url`:n+=`expected a ${e.format} encoded string`;break;case`e164`:n+=`expected an E.164 formatted phone number`;break;default:if(e.format.startsWith(`sha`)||e.format.startsWith(`md5`)){let[t,r]=e.format.split(`_`);n+=`expected a ${t.toUpperCase()}`,r&&(n+=` ${r}-encoded`),n+=` hash`;break}n+=`expected ${d(e.format)}`}if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function h(e){if(e===null)return!0;switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:case`symbol`:case`undefined`:return!0;default:return!1}}function g(e,t){let n=`expected ${e.expected}`;if(`input`in e&&t.reportInput!==!1){let r=e.input;if(n+=`, received ${_(r)}`,t.reportInput===`typeAndValue`){if(h(r)){let e=p(r,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=` (${e})`}else if(r instanceof Date){let e=p(r,{localization:t.dateLocalization});n+=` (${e})`}}}return{type:e.code,path:e.path,message:n}}function _(e){return typeof e==`object`?e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:e instanceof Date?`date`:e instanceof RegExp?`regexp`:e instanceof Map?`map`:e instanceof Set?`set`:e instanceof Error?`error`:e instanceof Function?`function`:`object`:typeof e}function v(e){return{type:e.code,path:e.path,message:e.message??`Invalid input`}}function y(e,t){let n=(t.maxValuesToDisplay?e.slice(0,t.maxValuesToDisplay):e).map(e=>p(e,{wrapStringValueInQuote:t.wrapStringValuesInQuote}));return n.length<e.length&&n.push(`${e.length-n.length} more value(s)`),n.reduce((e,r,i)=>(i>0&&(i===n.length-1&&t.lastSeparator?e+=t.lastSeparator:e+=t.separator),e+=r,e),``)}function b(e,t){let n;if(n=e.expected===`stringbool`?`expected boolean as string`:e.values.length===0?`invalid value`:e.values.length===1?`expected value to be ${p(e.values[0],{wrapStringValueInQuote:!0})}`:`expected value to be one of ${y(e.values,{separator:t.allowedValuesSeparator,lastSeparator:t.allowedValuesLastSeparator,wrapStringValuesInQuote:t.wrapAllowedValuesInQuote,maxValuesToDisplay:t.maxAllowedValuesToDisplay})}`,`input`in e&&t.reportInput===`typeAndValue`){if(h(e.input)){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}else if(e.input instanceof Date){let r=p(e.input,{localization:t.dateLocalization});n+=`, received ${r}`}}return{type:e.code,path:e.path,message:n}}function x(e,t){let n=`expected multiple of ${e.divisor}`;if(`input`in e&&t.reportInput===`typeAndValue`){let r=p(e.input,{wrapStringValueInQuote:!0,localization:t.numberLocalization});n+=`, received ${r}`}return{type:e.code,path:e.path,message:n}}function S(e,t){let n=e.origin===`date`?p(new Date(e.maximum),{localization:t.dateLocalization}):p(e.maximum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be less than${e.inclusive?` or equal to`:``} ${n}`;break;case`string`:r+=`expected string to contain at most ${n} character(s)`;break;case`date`:r+=`expected date to be prior ${e.inclusive?`or equal to`:`to`} "${n}"`;break;case`array`:r+=`expected array to contain at most ${n} item(s)`;break;case`set`:r+=`expected set to contain at most ${n} item(s)`;break;case`file`:r+=`expected file to not exceed ${n} byte(s) in size`;break;default:r+=`expected value to be less than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function C(e,t){let n=e.origin===`date`?p(new Date(e.minimum),{localization:t.dateLocalization}):p(e.minimum,{localization:t.numberLocalization}),r=``;switch(e.origin){case`number`:case`int`:case`bigint`:r+=`expected number to be greater than${e.inclusive?` or equal to`:``} ${n}`;break;case`date`:r+=`expected date to be ${e.inclusive?`later or equal to`:`later to`} "${n}"`;break;case`string`:r+=`expected string to contain at least ${n} character(s)`;break;case`array`:r+=`expected array to contain at least ${n} item(s)`;break;case`set`:r+=`expected set to contain at least ${n} item(s)`;break;case`file`:r+=`expected file to be at least ${n} byte(s) in size`;break;default:r+=`expected value to be greater than${e.inclusive?` or equal to`:``} ${n}`}if(`input`in e&&t.reportInput===`typeAndValue`){let n=e.input;if(h(n)){let e=p(n,{wrapStringValueInQuote:!0,localization:t.numberLocalization});r+=`, received ${e}`}else if(n instanceof Date){let e=p(n,{localization:t.dateLocalization});r+=`, received ${e}`}}return{type:e.code,path:e.path,message:r}}function w(e,t){let n=y(e.keys,{separator:t.unrecognizedKeysSeparator,lastSeparator:t.unrecognizedKeysLastSeparator,wrapStringValuesInQuote:t.wrapUnrecognizedKeysInQuote,maxValuesToDisplay:t.maxUnrecognizedKeysToDisplay});return{type:e.code,path:e.path,message:`unrecognized key(s) ${n} in object`}}var T={invalid_type:g,too_big:S,too_small:C,invalid_format:m,invalid_value:b,invalid_element:c,not_multiple_of:x,unrecognized_keys:w,invalid_key:l,custom:s,invalid_union:v},E={reportInput:`type`,displayInvalidFormatDetails:!1,allowedValuesSeparator:`, `,allowedValuesLastSeparator:` or `,wrapAllowedValuesInQuote:!0,maxAllowedValuesToDisplay:10,unrecognizedKeysSeparator:`, `,unrecognizedKeysLastSeparator:` and `,wrapUnrecognizedKeysInQuote:!0,maxUnrecognizedKeysToDisplay:5,dateLocalization:!0,numberLocalization:!0};function D(e={}){let t={...E,...e};return e=>{if(e.code===void 0)return`Not supported issue type`;let n=T[e.code];return n(e,t).message}}function O(e){return e.length!==0}var k=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function A(e){if(e.length===1){let t=e[0];return typeof t==`symbol`&&(t=f(t)),t.toString()||`""`}return e.reduce((e,t)=>typeof t==`number`?e+`[`+t.toString()+`]`:(typeof t==`symbol`&&(t=f(t)),t.includes(`"`)?e+`["`+j(t)+`"]`:k.test(t)?e+(e.length===0?``:`.`)+t:e+`["`+t+`"]`),``)}function j(e){return e.replace(/"/g,`\\"`)}function M(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}var N={prefix:`Validation error`,prefixSeparator:`: `,maxIssuesInMessage:99,unionSeparator:` or `,issueSeparator:`; `,includePath:!0,forceTitleCase:!0};function P(e={}){let t={...N,...e};return function(e){return I(e.slice(0,t.maxIssuesInMessage).map(e=>F(e,t)).join(t.issueSeparator),t)}}function F(e,t){if(e.code===`invalid_union`&&O(e.errors)){let n=e.errors.map(n=>n.map(n=>F({...n,path:e.path.concat(n.path)},t)).join(t.issueSeparator));return Array.from(new Set(n)).join(t.unionSeparator)}let n=[];t.forceTitleCase?n.push(M(e.message)):n.push(e.message);pathCondition:if(t.includePath&&e.path!==void 0&&O(e.path)){if(e.path.length===1){let t=e.path[0];if(typeof t==`number`){n.push(` at index ${t}`);break pathCondition}}n.push(` at "${A(e.path)}"`)}return n.join(``)}function I(e,t){return t.prefix==null?e.length>0?e:N.prefix:e.length>0?[t.prefix,e].join(t.prefixSeparator):t.prefix}function L(e,n={}){if(!t(e))throw TypeError(`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${V.name}" method instead?`);return R(e,n)}function R(e,t={}){let n=e.issues,i;return i=O(n)?z(t)(n):e.message,new r(i,{cause:e})}function z(e){return`messageBuilder`in e?e.messageBuilder:P(e)}var B=(e={})=>n=>t(n)?R(n,e):n instanceof Error?new r(n.message,{cause:n}):new r(`Unknown error`);function V(e,t={}){return B(t)(e)}function H(t,n={}){return new r(U(n)([t]),{cause:new e([t])})}function U(e){return`messageBuilder`in e?e.messageBuilder:P(e)}export{r as ValidationError,D as createErrorMap,P as createMessageBuilder,V as fromError,L as fromZodError,H as fromZodIssue,a as isValidationError,o as isValidationErrorLike,t as isZodErrorLike,B as toValidationError};
@@ -118,6 +118,14 @@ export interface CompiledDynamicSkillDefinition extends ModuleSourceRef {
118
118
  readonly slug: string;
119
119
  readonly eventNames: readonly string[];
120
120
  }
121
+ /**
122
+ * Compiled dynamic instructions resolver entry. The resolver produces
123
+ * {@link ModelMessage[]} at runtime rather than static markdown.
124
+ */
125
+ export interface CompiledDynamicInstructionsDefinition extends ModuleSourceRef {
126
+ readonly slug: string;
127
+ readonly eventNames: readonly string[];
128
+ }
121
129
  /**
122
130
  * Normalized authored hook entry preserved in the compiled manifest.
123
131
  *
@@ -231,6 +239,7 @@ declare const compiledAgentNodeManifestSchema: z.ZodObject<{
231
239
  warnings: z.ZodNumber;
232
240
  }, z.core.$strict>;
233
241
  disabledFrameworkTools: z.ZodReadonly<z.ZodArray<z.ZodString>>;
242
+ dynamicInstructions: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicInstructionsDefinition, unknown>>>>;
234
243
  dynamicSkills: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicSkillDefinition, unknown>>>>;
235
244
  dynamicTools: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicToolDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicToolDefinition, unknown>>>>;
236
245
  hooks: z.ZodArray<z.ZodType<CompiledHookDefinition, unknown, z.core.$ZodTypeInternals<CompiledHookDefinition, unknown>>>;
@@ -318,6 +327,7 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
318
327
  warnings: z.ZodNumber;
319
328
  }, z.core.$strict>;
320
329
  disabledFrameworkTools: z.ZodReadonly<z.ZodArray<z.ZodString>>;
330
+ dynamicInstructions: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicInstructionsDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicInstructionsDefinition, unknown>>>>;
321
331
  dynamicSkills: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicSkillDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicSkillDefinition, unknown>>>>;
322
332
  dynamicTools: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicToolDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicToolDefinition, unknown>>>>;
323
333
  hooks: z.ZodArray<z.ZodType<CompiledHookDefinition, unknown, z.core.$ZodTypeInternals<CompiledHookDefinition, unknown>>>;
@@ -407,6 +417,7 @@ export declare function createCompiledAgentNodeManifest(input: {
407
417
  readonly connections?: readonly CompiledConnectionDefinition[];
408
418
  readonly diagnosticsSummary?: DiscoverDiagnosticsSummary;
409
419
  readonly disabledFrameworkTools?: readonly string[];
420
+ readonly dynamicInstructions?: readonly CompiledDynamicInstructionsDefinition[];
410
421
  readonly dynamicSkills?: readonly CompiledDynamicSkillDefinition[];
411
422
  readonly dynamicTools?: readonly CompiledDynamicToolDefinition[];
412
423
  readonly hooks?: readonly CompiledHookDefinition[];
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";const COMPILED_AGENT_MANIFEST_KIND=`ash-agent-compiled-manifest`,ROOT_COMPILED_AGENT_NODE_ID=`__root__`,COMPILED_AGENT_MANIFEST_VERSION=25,moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),channelMethodSchema=z.union([z.literal(`GET`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`)]),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()}).strict(),disabledCompiledChannelEntrySchema=z.object({kind:z.literal(`disabled`),name:z.string(),logicalPath:z.string()}).strict(),compiledChannelEntrySchema=z.union([compiledChannelDefinitionSchema,disabledCompiledChannelEntrySchema]),compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),source:moduleSourceRefSchema.optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional()}).strict(),compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict(),compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict(),compiledAgentConfigSchema=z.object({build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),description:z.string().optional(),experimental:z.object({codeMode:z.boolean().optional()}).strict().optional(),model:compiledRuntimeModelReferenceSchema,name:z.string(),source:moduleSourceRefSchema.optional()}).strict(),compiledInstructionsSchema=z.object({name:z.string(),logicalPath:z.string(),markdown:z.string(),sourceId:z.string(),sourceKind:z.union([z.literal(`markdown`),z.literal(`module`)])}).strict(),compiledSkillBaseFields={name:z.string(),description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()},compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,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()]),compiledScheduleDefinitionSchema=z.object({cron:z.string(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string(),sourceKind:z.union([z.literal(`markdown`),z.literal(`module`)])}).strict(),compiledSandboxDefinitionSchema=z.object({description:z.string().optional(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict(),compiledWorkspaceResourceRootSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict(),compiledConnectionDefinitionSchema=z.object({connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:z.object({connector:z.string()}).strict().optional()}).strict(),compiledToolDefinitionSchema=z.object({description:z.string(),exportName:z.string().optional(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),name:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicToolDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicSkillDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledHookDefinitionSchema=z.object({exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledAgentNodeManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),channels:z.array(compiledChannelEntrySchema),config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),diagnosticsSummary:discoverDiagnosticsSummarySchema,disabledFrameworkTools:z.array(z.string()).readonly(),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),sandbox:compiledSandboxDefinitionSchema.nullable(),sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:compiledInstructionsSchema.optional(),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict(),compiledSubagentNodeSchema=z.object({agent:compiledAgentNodeManifestSchema,description:z.string(),entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),compiledSubagentEdgeSchema=z.object({childNodeId:z.string(),parentNodeId:z.string()}).strict(),compiledAgentManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),channels:z.array(compiledChannelEntrySchema),config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),diagnosticsSummary:discoverDiagnosticsSummarySchema,disabledFrameworkTools:z.array(z.string()).readonly(),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),remoteAgents:z.array(compiledRemoteAgentNodeSchema),sandbox:compiledSandboxDefinitionSchema.nullable(),sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),skills:z.array(compiledSkillSourceSchema).readonly(),subagentEdges:z.array(compiledSubagentEdgeSchema),subagents:z.array(compiledSubagentNodeSchema),instructions:compiledInstructionsSchema.optional(),tools:z.array(compiledToolDefinitionSchema),version:z.literal(25),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict();function createCompiledAgentNodeManifest(e){let t={agentRoot:e.agentRoot,appRoot:e.appRoot,channels:[...e.channels??[]],connections:[...e.connections??[]],config:{build:e.config.build===void 0?void 0:{externalDependencies:e.config.build.externalDependencies===void 0?void 0:[...e.config.build.externalDependencies]},compaction:{model:e.config.compaction?.model===void 0?void 0:cloneCompiledRuntimeModelReference(e.config.compaction.model),thresholdPercent:e.config.compaction?.thresholdPercent},description:e.config.description,experimental:e.config.experimental===void 0?void 0:{codeMode:e.config.experimental.codeMode},model:cloneCompiledRuntimeModelReference(e.config.model),name:e.config.name,source:e.config.source===void 0?void 0:{...e.config.source}},diagnosticsSummary:e.diagnosticsSummary??{errors:0,warnings:0},disabledFrameworkTools:[...e.disabledFrameworkTools??[]],dynamicSkills:[...e.dynamicSkills??[]],dynamicTools:[...e.dynamicTools??[]],hooks:[...e.hooks??[]],remoteAgents:[...e.remoteAgents??[]],sandbox:e.sandbox??null,sandboxWorkspaces:[...e.sandboxWorkspaces??[]],schedules:[...e.schedules??[]],skills:[...e.skills??[]],tools:[...e.tools??[]],workspaceResourceRoot:e.workspaceResourceRoot??{logicalPath:``,rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}};return e.instructions!==void 0&&(t.instructions=e.instructions),t}function deriveResourceRootEntries(e){let t=new Set;(e.skills??[]).length>0&&t.add(`skills/`);for(let n of e.sandboxWorkspaces??[])for(let e of n.rootEntries)t.add(e);return[...t].sort((e,t)=>e.localeCompare(t))}function createCompiledSubagentNodeId(e,t){return e===`__root__`?t:`${e}::${t}`}function createCompiledAgentManifest(e){return{...createCompiledAgentNodeManifest(e),kind:COMPILED_AGENT_MANIFEST_KIND,subagentEdges:[...e.subagentEdges??[]],subagents:[...e.subagents??[]],version:25}}function cloneCompiledRuntimeModelReference(e){return e.contextWindowTokens===void 0&&e.source===void 0&&e.providerOptions===void 0?{id:e.id}:e.source===void 0?e.providerOptions===void 0?{contextWindowTokens:e.contextWindowTokens,id:e.id}:{contextWindowTokens:e.contextWindowTokens,id:e.id,providerOptions:{...e.providerOptions}}:e.contextWindowTokens===void 0&&e.providerOptions===void 0?{id:e.id,source:{...e.source}}:{contextWindowTokens:e.contextWindowTokens,id:e.id,providerOptions:e.providerOptions===void 0?void 0:{...e.providerOptions},source:{...e.source}}}export{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION,ROOT_COMPILED_AGENT_NODE_ID,compiledAgentManifestSchema,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledSubagentNodeId,deriveResourceRootEntries};
1
+ import{z}from"#compiled/zod/index.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";const COMPILED_AGENT_MANIFEST_KIND=`ash-agent-compiled-manifest`,ROOT_COMPILED_AGENT_NODE_ID=`__root__`,COMPILED_AGENT_MANIFEST_VERSION=25,moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),channelMethodSchema=z.union([z.literal(`GET`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`)]),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()}).strict(),disabledCompiledChannelEntrySchema=z.object({kind:z.literal(`disabled`),name:z.string(),logicalPath:z.string()}).strict(),compiledChannelEntrySchema=z.union([compiledChannelDefinitionSchema,disabledCompiledChannelEntrySchema]),compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),source:moduleSourceRefSchema.optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional()}).strict(),compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict(),compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict(),compiledAgentConfigSchema=z.object({build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),description:z.string().optional(),experimental:z.object({codeMode:z.boolean().optional()}).strict().optional(),model:compiledRuntimeModelReferenceSchema,name:z.string(),source:moduleSourceRefSchema.optional()}).strict(),compiledInstructionsSchema=z.object({name:z.string(),logicalPath:z.string(),markdown:z.string(),sourceId:z.string(),sourceKind:z.union([z.literal(`markdown`),z.literal(`module`)])}).strict(),compiledSkillBaseFields={name:z.string(),description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()},compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,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()]),compiledScheduleDefinitionSchema=z.object({cron:z.string(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string(),sourceKind:z.union([z.literal(`markdown`),z.literal(`module`)])}).strict(),compiledSandboxDefinitionSchema=z.object({description:z.string().optional(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict(),compiledWorkspaceResourceRootSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict(),compiledConnectionDefinitionSchema=z.object({connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:z.object({connector:z.string()}).strict().optional()}).strict(),compiledToolDefinitionSchema=z.object({description:z.string(),exportName:z.string().optional(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),name:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicToolDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicSkillDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicInstructionsDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledHookDefinitionSchema=z.object({exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledAgentNodeManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),channels:z.array(compiledChannelEntrySchema),config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),diagnosticsSummary:discoverDiagnosticsSummarySchema,disabledFrameworkTools:z.array(z.string()).readonly(),dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),sandbox:compiledSandboxDefinitionSchema.nullable(),sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:compiledInstructionsSchema.optional(),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict(),compiledSubagentNodeSchema=z.object({agent:compiledAgentNodeManifestSchema,description:z.string(),entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),compiledSubagentEdgeSchema=z.object({childNodeId:z.string(),parentNodeId:z.string()}).strict(),compiledAgentManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),channels:z.array(compiledChannelEntrySchema),config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),diagnosticsSummary:discoverDiagnosticsSummarySchema,disabledFrameworkTools:z.array(z.string()).readonly(),dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),remoteAgents:z.array(compiledRemoteAgentNodeSchema),sandbox:compiledSandboxDefinitionSchema.nullable(),sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),skills:z.array(compiledSkillSourceSchema).readonly(),subagentEdges:z.array(compiledSubagentEdgeSchema),subagents:z.array(compiledSubagentNodeSchema),instructions:compiledInstructionsSchema.optional(),tools:z.array(compiledToolDefinitionSchema),version:z.literal(25),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict();function createCompiledAgentNodeManifest(e){let t={agentRoot:e.agentRoot,appRoot:e.appRoot,channels:[...e.channels??[]],connections:[...e.connections??[]],config:{build:e.config.build===void 0?void 0:{externalDependencies:e.config.build.externalDependencies===void 0?void 0:[...e.config.build.externalDependencies]},compaction:{model:e.config.compaction?.model===void 0?void 0:cloneCompiledRuntimeModelReference(e.config.compaction.model),thresholdPercent:e.config.compaction?.thresholdPercent},description:e.config.description,experimental:e.config.experimental===void 0?void 0:{codeMode:e.config.experimental.codeMode},model:cloneCompiledRuntimeModelReference(e.config.model),name:e.config.name,source:e.config.source===void 0?void 0:{...e.config.source}},diagnosticsSummary:e.diagnosticsSummary??{errors:0,warnings:0},disabledFrameworkTools:[...e.disabledFrameworkTools??[]],dynamicInstructions:[...e.dynamicInstructions??[]],dynamicSkills:[...e.dynamicSkills??[]],dynamicTools:[...e.dynamicTools??[]],hooks:[...e.hooks??[]],remoteAgents:[...e.remoteAgents??[]],sandbox:e.sandbox??null,sandboxWorkspaces:[...e.sandboxWorkspaces??[]],schedules:[...e.schedules??[]],skills:[...e.skills??[]],tools:[...e.tools??[]],workspaceResourceRoot:e.workspaceResourceRoot??{logicalPath:``,rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}};return e.instructions!==void 0&&(t.instructions=e.instructions),t}function deriveResourceRootEntries(e){let t=new Set;(e.skills??[]).length>0&&t.add(`skills/`);for(let n of e.sandboxWorkspaces??[])for(let e of n.rootEntries)t.add(e);return[...t].sort((e,t)=>e.localeCompare(t))}function createCompiledSubagentNodeId(e,t){return e===`__root__`?t:`${e}::${t}`}function createCompiledAgentManifest(e){return{...createCompiledAgentNodeManifest(e),kind:COMPILED_AGENT_MANIFEST_KIND,subagentEdges:[...e.subagentEdges??[]],subagents:[...e.subagents??[]],version:25}}function cloneCompiledRuntimeModelReference(e){return e.contextWindowTokens===void 0&&e.source===void 0&&e.providerOptions===void 0?{id:e.id}:e.source===void 0?e.providerOptions===void 0?{contextWindowTokens:e.contextWindowTokens,id:e.id}:{contextWindowTokens:e.contextWindowTokens,id:e.id,providerOptions:{...e.providerOptions}}:e.contextWindowTokens===void 0&&e.providerOptions===void 0?{id:e.id,source:{...e.source}}:{contextWindowTokens:e.contextWindowTokens,id:e.id,providerOptions:e.providerOptions===void 0?void 0:{...e.providerOptions},source:{...e.source}}}export{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION,ROOT_COMPILED_AGENT_NODE_ID,compiledAgentManifestSchema,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledSubagentNodeId,deriveResourceRootEntries};
@@ -1,5 +1,5 @@
1
1
  import{z}from"#compiled/zod/index.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{normalizeEsmImportSpecifier}from"#internal/application/import-specifier.js";const compiledModuleNodeScopeSchema=z.object({modules:z.record(z.string(),z.object({}).passthrough())}).strict(),compiledModuleMapSchema=z.object({nodes:z.record(z.string(),compiledModuleNodeScopeSchema)}).strict();function createCompiledModuleMapSource(e){let n=dirnameFilesystemPath(e.moduleMapPath),r=e.importSpecifierStyle??`relative`,i=0,a=[collectModuleNodeScope({agentRoot:e.manifest.agentRoot,importSpecifierStyle:r,manifest:e.manifest,moduleMapDirectory:n,nextBindingName(){return`module_${i++}`},nodeId:ROOT_COMPILED_AGENT_NODE_ID}),...[...e.manifest.subagents].sort((e,t)=>e.nodeId.localeCompare(t.nodeId)).map(e=>collectModuleNodeScope({agentRoot:e.agent.agentRoot,importSpecifierStyle:r,manifest:e.agent,moduleMapDirectory:n,nextBindingName(){return`module_${i++}`},nodeId:e.nodeId}))],o=a.flatMap(e=>e.modules.map(e=>`import * as ${e.bindingName} from ${JSON.stringify(e.importSpecifier)};`));return[`// Generated by Ash. Do not edit by hand.`,``,...o,...o.length>0?[``]:[],`export const moduleMap = ${renderModuleMap(a)};`,``,`export default moduleMap;`,``].join(`
2
- `)}function collectModuleNodeScope(e){return{modules:collectModuleRefsForManifest(e.manifest).sort((e,t)=>e.sourceId.localeCompare(t.sourceId)).map(t=>({bindingName:e.nextBindingName(),importSpecifier:createImportSpecifier({fromDirectory:e.moduleMapDirectory,importSpecifierStyle:e.importSpecifierStyle,targetPath:joinFilesystemPath(e.agentRoot,t.logicalPath)}),sourceId:t.sourceId})),nodeId:e.nodeId}}function collectModuleRefsForManifest(e){let t=new Map;e.config.source!==void 0&&t.set(e.config.source.sourceId,e.config.source),e.config.model.source!==void 0&&t.set(e.config.model.source.sourceId,e.config.model.source);for(let n of e.channels)n.kind!==`disabled`&&t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.connections)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.tools)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.dynamicSkills)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.dynamicTools)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.remoteAgents)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.hooks)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.schedules)n.sourceKind!==`module`||!n.hasRun||t.set(n.sourceId,{sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});return e.sandbox!==null&&t.set(e.sandbox.sourceId,{exportName:e.sandbox.exportName,sourceKind:`module`,logicalPath:e.sandbox.logicalPath,sourceId:e.sandbox.sourceId}),[...t.values()]}function createImportSpecifier(e){if(e.importSpecifierStyle===`absolute`)return normalizeEsmImportSpecifier(normalizeFilesystemPath(e.targetPath));let t=relativeFilesystemPath(e.fromDirectory,e.targetPath);return t.startsWith(`.`)?t:`./${t}`}function renderModuleMap(e){return renderFrozenObject([{key:`nodes`,value:renderFrozenObject(e.map(e=>({key:e.nodeId,value:renderFrozenObject([{key:`modules`,value:renderFrozenObject(e.modules.map(e=>({key:e.sourceId,value:e.bindingName})))}],3)})))}],0)}function renderFrozenObject(e,t=1){if(e.length===0)return`Object.freeze({})`;let n=` `.repeat(t),r=` `.repeat(t+1);return[`Object.freeze({`,e.map(e=>`${r}${JSON.stringify(e.key)}: ${e.value.replaceAll(`
2
+ `)}function collectModuleNodeScope(e){return{modules:collectModuleRefsForManifest(e.manifest).sort((e,t)=>e.sourceId.localeCompare(t.sourceId)).map(t=>({bindingName:e.nextBindingName(),importSpecifier:createImportSpecifier({fromDirectory:e.moduleMapDirectory,importSpecifierStyle:e.importSpecifierStyle,targetPath:joinFilesystemPath(e.agentRoot,t.logicalPath)}),sourceId:t.sourceId})),nodeId:e.nodeId}}function collectModuleRefsForManifest(e){let t=new Map;e.config.source!==void 0&&t.set(e.config.source.sourceId,e.config.source),e.config.model.source!==void 0&&t.set(e.config.model.source.sourceId,e.config.model.source);for(let n of e.channels)n.kind!==`disabled`&&t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.connections)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.tools)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.dynamicInstructions)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.dynamicSkills)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.dynamicTools)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.remoteAgents)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.hooks)t.set(n.sourceId,{exportName:n.exportName,sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});for(let n of e.schedules)n.sourceKind!==`module`||!n.hasRun||t.set(n.sourceId,{sourceKind:`module`,logicalPath:n.logicalPath,sourceId:n.sourceId});return e.sandbox!==null&&t.set(e.sandbox.sourceId,{exportName:e.sandbox.exportName,sourceKind:`module`,logicalPath:e.sandbox.logicalPath,sourceId:e.sandbox.sourceId}),[...t.values()]}function createImportSpecifier(e){if(e.importSpecifierStyle===`absolute`)return normalizeEsmImportSpecifier(normalizeFilesystemPath(e.targetPath));let t=relativeFilesystemPath(e.fromDirectory,e.targetPath);return t.startsWith(`.`)?t:`./${t}`}function renderModuleMap(e){return renderFrozenObject([{key:`nodes`,value:renderFrozenObject(e.map(e=>({key:e.nodeId,value:renderFrozenObject([{key:`modules`,value:renderFrozenObject(e.modules.map(e=>({key:e.sourceId,value:e.bindingName})))}],3)})))}],0)}function renderFrozenObject(e,t=1){if(e.length===0)return`Object.freeze({})`;let n=` `.repeat(t),r=` `.repeat(t+1);return[`Object.freeze({`,e.map(e=>`${r}${JSON.stringify(e.key)}: ${e.value.replaceAll(`
3
3
  `,`\n${r}`)}`).join(`,
4
4
  `),`${n}})`].join(`
5
5
  `)}function dirnameFilesystemPath(e){let t=splitFilesystemPath(e);return t.segments.length===0?t.root.length===0?`.`:t.root:createFilesystemPath(t.root,t.segments.slice(0,-1))}function joinFilesystemPath(e,t){let n=splitFilesystemPath(e),r=splitFilesystemPath(t);return r.root.length>0?createFilesystemPath(r.root,r.segments):createFilesystemPath(n.root,[...n.segments,...r.segments])}function relativeFilesystemPath(e,t){let n=splitFilesystemPath(e),r=splitFilesystemPath(t);if(n.root!==r.root)return normalizeFilesystemPath(t);let i=0;for(;i<n.segments.length&&i<r.segments.length&&n.segments[i]===r.segments[i];)i+=1;let a=[...Array.from({length:n.segments.length-i},()=>`..`),...r.segments.slice(i)];return a.length===0?`.`:a.join(`/`)}function normalizeFilesystemPath(e){let t=splitFilesystemPath(e);return createFilesystemPath(t.root,t.segments)}function splitFilesystemPath(e){let t=e.replaceAll(`\\`,`/`),n=``,r=t,i=t.match(/^[A-Za-z]:/);i===null?t.startsWith(`/`)&&(n=`/`,r=t.slice(1)):(n=i[0],r=t.slice(n.length),r.startsWith(`/`)&&(n=`${n}/`,r=r.slice(1)));let a=[];for(let e of r.split(`/`))if(!(e.length===0||e===`.`)){if(e===`..`){if(a.length>0&&a[a.length-1]!==`..`){a.pop();continue}n.length===0&&a.push(e);continue}a.push(e)}return{root:n,segments:a}}function createFilesystemPath(e,t){return e===`/`?t.length===0?`/`:`/${t.join(`/`)}`:e.endsWith(`/`)?t.length===0?e:`${e}${t.join(`/`)}`:e.length>0?t.length===0?e:`${e}/${t.join(`/`)}`:t.length===0?`.`:t.join(`/`)}export{collectModuleRefsForManifest,compiledModuleMapSchema,createCompiledModuleMapSource};
@@ -1,12 +1,35 @@
1
1
  import type { InstructionsSourceRef } from "#discover/manifest.js";
2
- import type { CompiledInstructions } from "#compiler/manifest.js";
2
+ import type { CompiledDynamicInstructionsDefinition, CompiledInstructions } from "#compiler/manifest.js";
3
+ /**
4
+ * Compiled instructions entry produced from one authored `instructions/*`
5
+ * file or flat `instructions.{md,ts,...}`.
6
+ *
7
+ * Either a static instructions definition or a dynamic resolver that
8
+ * produces model messages at runtime.
9
+ */
10
+ export type CompiledInstructionsEntry = {
11
+ readonly kind: "instructions";
12
+ readonly definition: CompiledInstructions;
13
+ } | {
14
+ readonly kind: "dynamic-instructions";
15
+ readonly definition: CompiledDynamicInstructionsDefinition;
16
+ };
3
17
  /**
4
18
  * Compiles one authored instructions prompt source (markdown or
5
19
  * module-backed `defineInstructions`) into the normalized shape consumed
6
20
  * by the runtime.
7
21
  *
8
- * Module-backed instructions sources execute once at build time — the
9
- * resulting markdown is captured into the compiled manifest. There is no
10
- * per-session re-evaluation at runtime.
22
+ * Module-backed static instructions sources execute once at build time —
23
+ * the resulting markdown is captured into the compiled manifest. There is
24
+ * no per-session re-evaluation at runtime.
25
+ *
26
+ * Module-backed dynamic instructions (exporting `defineDynamic`) are
27
+ * classified and their event names recorded; the resolver runs at
28
+ * runtime.
29
+ */
30
+ export declare function compileInstructionsEntry(agentRoot: string, source: InstructionsSourceRef): Promise<CompiledInstructionsEntry>;
31
+ /**
32
+ * @deprecated Use {@link compileInstructionsEntry} instead. Kept for
33
+ * backwards compatibility with callers that pass a single source.
11
34
  */
12
35
  export declare function compileInstructions(agentRoot: string, source: InstructionsSourceRef): Promise<CompiledInstructions>;
@@ -1 +1 @@
1
- import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeInstructionsDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileInstructions(e,t){let n=t.sourceKind===`markdown`?normalizeInstructionsDefinition(t.definition,`Expected the compiled instructions definition at "${t.logicalPath}" to match the public Ash shape.`):normalizeInstructionsDefinition(await loadModuleBackedDefinition({agentRoot:e,kind:`instructions`,source:t}),`Expected the instructions export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public Ash shape.`);return{name:stripLogicalPathExtension(t.logicalPath),logicalPath:t.logicalPath,markdown:n.markdown,sourceId:t.sourceId,sourceKind:t.sourceKind}}export{compileInstructions};
1
+ import{stripLogicalPathExtension}from"#discover/filesystem.js";import{normalizeInstructionsDefinition}from"#internal/authored-definition/core.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{isDynamicSentinel}from"#shared/dynamic-tool-definition.js";async function compileInstructionsEntry(r,i){if(i.sourceKind===`markdown`){let n=normalizeInstructionsDefinition(i.definition,`Expected the compiled instructions definition at "${i.logicalPath}" to match the public Ash shape.`);return{kind:`instructions`,definition:{name:stripLogicalPathExtension(i.logicalPath),logicalPath:i.logicalPath,markdown:n.markdown,sourceId:i.sourceId,sourceKind:i.sourceKind}}}let a=await loadModuleBackedDefinition({agentRoot:r,kind:`instructions`,source:i});if(isDynamicSentinel(a)){let t=stripLogicalPathExtension(i.logicalPath).replace(/^instructions\//,``);return{kind:`dynamic-instructions`,definition:{eventNames:Object.keys(a.events),exportName:i.exportName,logicalPath:i.logicalPath,slug:t,sourceId:i.sourceId,sourceKind:`module`}}}let o=normalizeInstructionsDefinition(a,`Expected the instructions export "${i.exportName??`default`}" from "${i.logicalPath}" to match the public Ash shape.`);return{kind:`instructions`,definition:{name:stripLogicalPathExtension(i.logicalPath),logicalPath:i.logicalPath,markdown:o.markdown,sourceId:i.sourceId,sourceKind:i.sourceKind}}}async function compileInstructions(e,t){let n=await compileInstructionsEntry(e,t);if(n.kind===`dynamic-instructions`)throw Error(`Expected static instructions from "${t.logicalPath}" but got a dynamic resolver. Use compileInstructionsEntry instead.`);return n.definition}export{compileInstructions,compileInstructionsEntry};
@@ -1 +1,3 @@
1
- import{compileChannelDefinition}from"#compiler/normalize-channel.js";import{ROOT_COMPILED_AGENT_NODE_ID,createCompiledAgentManifest,createCompiledAgentNodeManifest}from"#compiler/manifest.js";import{createCompiledRuntimeModelCatalogLoader}from"#compiler/model-catalog.js";import{compileAgentConfig}from"#compiler/normalize-agent-config.js";import{compileConnectionDefinition}from"#compiler/normalize-connection.js";import{compileHookEntry}from"#compiler/normalize-hook.js";import{compileSandboxDefinition}from"#compiler/normalize-sandbox.js";import{compileInstructions}from"#compiler/normalize-instructions.js";import{compileScheduleDefinition}from"#compiler/normalize-schedule.js";import{compileSkillSource}from"#compiler/normalize-skill.js";import{compileSubagentGraph}from"#compiler/normalize-subagent.js";import{compileToolEntry}from"#compiler/normalize-tool.js";async function compileAgentManifest(e){let r={modelCatalog:createCompiledRuntimeModelCatalogLoader(e.appRoot)},[a,o]=await Promise.all([compileAgentNodeManifest(e,r),compileSubagentGraph({appRoot:e.appRoot,compileAgentNodeManifest,context:r,parentNodeId:ROOT_COMPILED_AGENT_NODE_ID,subagents:e.subagents})]);return createCompiledAgentManifest({...a,remoteAgents:o.remoteAgents,subagentEdges:o.edges,subagents:o.nodes})}async function compileAgentNodeManifest(t,n){let i=await Promise.all(t.tools.map(e=>compileToolEntry(t.agentRoot,e))),s=[],c=[],l=[];for(let e of i)e.kind===`tool`?s.push(e.definition):e.kind===`dynamic-tool`?c.push(e.definition):l.push(e.name);let u=(await Promise.all(t.channels.map(n=>compileChannelDefinition(t.agentRoot,n)))).flat(),d=await Promise.all(t.skills.map(e=>compileSkillSource(t.agentRoot,e))),f=[],p=[];for(let e of d)e.kind===`skill`?f.push(e.definition):p.push(e.definition);return createCompiledAgentNodeManifest({agentRoot:t.agentRoot,appRoot:t.appRoot,channels:u,config:await compileAgentConfig(t,n),connections:await Promise.all(t.connections.map(e=>compileConnectionDefinition(t.agentRoot,e))),diagnosticsSummary:t.diagnosticsSummary,disabledFrameworkTools:l,dynamicSkills:p,dynamicTools:c,hooks:t.hooks.map(e=>compileHookEntry(e)),sandbox:t.sandbox===null?null:await compileSandboxDefinition(t.agentRoot,t.sandbox),sandboxWorkspaces:t.sandboxWorkspaces.map(e=>({logicalPath:e.logicalPath,rootEntries:[...e.rootEntries],sourceId:e.sourceId,sourcePath:e.sourcePath})),schedules:await Promise.all(t.schedules.map(e=>compileScheduleDefinition(t.agentRoot,e))),skills:f,instructions:t.instructions===void 0?void 0:await compileInstructions(t.agentRoot,t.instructions),tools:s})}export{compileAgentManifest};
1
+ import{compileChannelDefinition}from"#compiler/normalize-channel.js";import{ROOT_COMPILED_AGENT_NODE_ID,createCompiledAgentManifest,createCompiledAgentNodeManifest}from"#compiler/manifest.js";import{createCompiledRuntimeModelCatalogLoader}from"#compiler/model-catalog.js";import{compileAgentConfig}from"#compiler/normalize-agent-config.js";import{compileConnectionDefinition}from"#compiler/normalize-connection.js";import{compileHookEntry}from"#compiler/normalize-hook.js";import{compileSandboxDefinition}from"#compiler/normalize-sandbox.js";import{compileInstructionsEntry}from"#compiler/normalize-instructions.js";import{compileScheduleDefinition}from"#compiler/normalize-schedule.js";import{compileSkillSource}from"#compiler/normalize-skill.js";import{compileSubagentGraph}from"#compiler/normalize-subagent.js";import{compileToolEntry}from"#compiler/normalize-tool.js";async function compileAgentManifest(e){let r={modelCatalog:createCompiledRuntimeModelCatalogLoader(e.appRoot)},[a,o]=await Promise.all([compileAgentNodeManifest(e,r),compileSubagentGraph({appRoot:e.appRoot,compileAgentNodeManifest,context:r,parentNodeId:ROOT_COMPILED_AGENT_NODE_ID,subagents:e.subagents})]);return createCompiledAgentManifest({...a,remoteAgents:o.remoteAgents,subagentEdges:o.edges,subagents:o.nodes})}async function compileAgentNodeManifest(t,n){let i=await Promise.all(t.tools.map(e=>compileToolEntry(t.agentRoot,e))),s=[],c=[],l=[];for(let e of i)e.kind===`tool`?s.push(e.definition):e.kind===`dynamic-tool`?c.push(e.definition):l.push(e.name);let u=(await Promise.all(t.channels.map(n=>compileChannelDefinition(t.agentRoot,n)))).flat(),d=await Promise.all(t.skills.map(e=>compileSkillSource(t.agentRoot,e))),f=[],p=[];for(let e of d)e.kind===`skill`?f.push(e.definition):p.push(e.definition);let m=await Promise.all(t.instructions.map(e=>compileInstructionsEntry(t.agentRoot,e))),h=[],g=[];for(let e of m)e.kind===`instructions`?h.push(e.definition):g.push(e.definition);let _=h.length===0?void 0:h.length===1?h[0]:{name:`instructions`,logicalPath:`instructions`,markdown:h.map(e=>e.markdown).join(`
2
+
3
+ `),sourceId:h[0].sourceId,sourceKind:`module`};return createCompiledAgentNodeManifest({agentRoot:t.agentRoot,appRoot:t.appRoot,channels:u,config:await compileAgentConfig(t,n),connections:await Promise.all(t.connections.map(e=>compileConnectionDefinition(t.agentRoot,e))),diagnosticsSummary:t.diagnosticsSummary,disabledFrameworkTools:l,dynamicSkills:p,dynamicTools:c,hooks:t.hooks.map(e=>compileHookEntry(e)),sandbox:t.sandbox===null?null:await compileSandboxDefinition(t.agentRoot,t.sandbox),sandboxWorkspaces:t.sandboxWorkspaces.map(e=>({logicalPath:e.logicalPath,rootEntries:[...e.rootEntries],sourceId:e.sourceId,sourcePath:e.sourcePath})),schedules:await Promise.all(t.schedules.map(e=>compileScheduleDefinition(t.agentRoot,e))),dynamicInstructions:g,skills:f,instructions:_,tools:s})}export{compileAgentManifest};
@@ -1 +1 @@
1
- import{expectObjectRecord,expectOnlyKnownKeys,expectString}from"#internal/authored-module.js";import{ASH_CREATE_SESSION_ROUTE_PATH}from"#protocol/routes.js";import{createCompiledSubagentNodeId}from"#compiler/manifest.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{createPathDerivedSourceId}from"#discover/manifest.js";async function compileSubagentGraph(e){let t=[],n=[],r=[];for(let i of e.subagents){let a=await compileSubagentDefinition({appRoot:e.appRoot,compileAgentNodeManifest:e.compileAgentNodeManifest,context:e.context,parentNodeId:e.parentNodeId,source:i});if(a.kind===`remote`){r.push(a.node);continue}t.push(a.node,...a.descendants.nodes),n.push({childNodeId:a.node.nodeId,parentNodeId:e.parentNodeId},...a.descendants.edges)}return{edges:n,nodes:t,remoteAgents:r}}async function compileSubagentDefinition(e){let t=e.source.manifest.configModule;if(t===void 0)throw Error(`Subagent "${e.source.logicalPath}" is missing an agent config module.`);let n=await loadModuleBackedDefinition({agentRoot:e.source.manifest.agentRoot,kind:`subagent config`,source:t});return readAgentDefinitionKind(n)===`remote`?{kind:`remote`,node:compileRemoteAgent({source:e.source,value:n})}:{kind:`local`,...await compileLocalSubagent(e)}}async function compileSubagent(e){let t=createCompiledSubagentNodeId(e.parentNodeId,e.source.sourceId),n=e.source.subagentId,r=await e.compileAgentNodeManifest({...e.source.manifest,appRoot:e.appRoot},e.context),a=r.config.description;if(!a)throw Error(`Local subagent "${e.source.logicalPath}" is missing a "description" field on its agent config. Add \`description\` to \`defineAgent({ ... })\` so the parent agent can decide when to delegate to this subagent.`);let o=await compileSubagentGraph({appRoot:e.appRoot,compileAgentNodeManifest:e.compileAgentNodeManifest,context:e.context,parentNodeId:t,subagents:e.source.manifest.subagents});return{descendants:o,node:{agent:{...r,remoteAgents:[...o.remoteAgents]},description:a,entryPath:e.source.entryPath,logicalPath:e.source.logicalPath,name:n,nodeId:t,rootPath:e.source.rootPath,sourceId:e.source.sourceId,sourceKind:`module`}}}const compileLocalSubagent=compileSubagent;function compileRemoteAgent(e){let t=e.source.manifest.configModule;if(t===void 0)throw Error(`Remote agent "${e.source.logicalPath}" is missing a config module.`);assertRemoteAgentDefinitionHasNoLocalPackageEntries(e.source);let n=normalizeRemoteAgentDefinition(e.value,`Expected the remote agent config export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public Ash shape.`);return{...createRemoteAgentModuleSourceRef(e.source,t),description:n.description,entryPath:e.source.entryPath,name:e.source.subagentId,nodeId:e.source.sourceId,path:n.path,rootPath:e.source.rootPath,url:n.url}}function createRemoteAgentModuleSourceRef(e,t){let n=e.logicalPath===t.logicalPath?t.logicalPath:`${e.logicalPath}/${t.logicalPath}`,r={logicalPath:n,sourceId:createPathDerivedSourceId(n),sourceKind:`module`};return t.exportName!==void 0&&(r.exportName=t.exportName),r}function readAgentDefinitionKind(e){return typeof e!=`object`||!e?`local`:e.kind===`remote`?`remote`:`local`}function normalizeRemoteAgentDefinition(i,a){let o=expectObjectRecord(i,a);if(expectOnlyKnownKeys(o,[`auth`,`description`,`headers`,`kind`,`path`,`url`],a),o.kind!==`remote`)throw Error(`${a} Expected "kind" to be "remote".`);return{description:expectString(o.description,a),path:o.path===void 0?ASH_CREATE_SESSION_ROUTE_PATH:expectString(o.path,a),url:expectString(o.url,a)}}function assertRemoteAgentDefinitionHasNoLocalPackageEntries(e){let t=e.manifest,n=[t.connections.length>0?`connections/`:void 0,t.hooks.length>0?`hooks/`:void 0,t.instructions===void 0?void 0:`instructions`,t.lib.length>0?`lib/`:void 0,t.sandbox===null?void 0:`sandbox/`,t.sandboxWorkspaces.length>0?`sandbox/workspace/`:void 0,t.schedules.length>0?`schedules/`:void 0,t.skills.length>0?`skills/`:void 0,t.subagents.length>0?`subagents/`:void 0,t.tools.length>0?`tools/`:void 0].filter(e=>e!==void 0);if(n.length!==0)throw Error(`Remote subagent definition "${e.logicalPath}" cannot include local package entries. Remove unsupported entries: ${n.join(`, `)}.`)}export{compileSubagentGraph};
1
+ import{expectObjectRecord,expectOnlyKnownKeys,expectString}from"#internal/authored-module.js";import{ASH_CREATE_SESSION_ROUTE_PATH}from"#protocol/routes.js";import{createCompiledSubagentNodeId}from"#compiler/manifest.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{createPathDerivedSourceId}from"#discover/manifest.js";async function compileSubagentGraph(e){let t=[],n=[],r=[];for(let i of e.subagents){let a=await compileSubagentDefinition({appRoot:e.appRoot,compileAgentNodeManifest:e.compileAgentNodeManifest,context:e.context,parentNodeId:e.parentNodeId,source:i});if(a.kind===`remote`){r.push(a.node);continue}t.push(a.node,...a.descendants.nodes),n.push({childNodeId:a.node.nodeId,parentNodeId:e.parentNodeId},...a.descendants.edges)}return{edges:n,nodes:t,remoteAgents:r}}async function compileSubagentDefinition(e){let t=e.source.manifest.configModule;if(t===void 0)throw Error(`Subagent "${e.source.logicalPath}" is missing an agent config module.`);let n=await loadModuleBackedDefinition({agentRoot:e.source.manifest.agentRoot,kind:`subagent config`,source:t});return readAgentDefinitionKind(n)===`remote`?{kind:`remote`,node:compileRemoteAgent({source:e.source,value:n})}:{kind:`local`,...await compileLocalSubagent(e)}}async function compileSubagent(e){let t=createCompiledSubagentNodeId(e.parentNodeId,e.source.sourceId),n=e.source.subagentId,r=await e.compileAgentNodeManifest({...e.source.manifest,appRoot:e.appRoot},e.context),a=r.config.description;if(!a)throw Error(`Local subagent "${e.source.logicalPath}" is missing a "description" field on its agent config. Add \`description\` to \`defineAgent({ ... })\` so the parent agent can decide when to delegate to this subagent.`);let o=await compileSubagentGraph({appRoot:e.appRoot,compileAgentNodeManifest:e.compileAgentNodeManifest,context:e.context,parentNodeId:t,subagents:e.source.manifest.subagents});return{descendants:o,node:{agent:{...r,remoteAgents:[...o.remoteAgents]},description:a,entryPath:e.source.entryPath,logicalPath:e.source.logicalPath,name:n,nodeId:t,rootPath:e.source.rootPath,sourceId:e.source.sourceId,sourceKind:`module`}}}const compileLocalSubagent=compileSubagent;function compileRemoteAgent(e){let t=e.source.manifest.configModule;if(t===void 0)throw Error(`Remote agent "${e.source.logicalPath}" is missing a config module.`);assertRemoteAgentDefinitionHasNoLocalPackageEntries(e.source);let n=normalizeRemoteAgentDefinition(e.value,`Expected the remote agent config export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public Ash shape.`);return{...createRemoteAgentModuleSourceRef(e.source,t),description:n.description,entryPath:e.source.entryPath,name:e.source.subagentId,nodeId:e.source.sourceId,path:n.path,rootPath:e.source.rootPath,url:n.url}}function createRemoteAgentModuleSourceRef(e,t){let n=e.logicalPath===t.logicalPath?t.logicalPath:`${e.logicalPath}/${t.logicalPath}`,r={logicalPath:n,sourceId:createPathDerivedSourceId(n),sourceKind:`module`};return t.exportName!==void 0&&(r.exportName=t.exportName),r}function readAgentDefinitionKind(e){return typeof e!=`object`||!e?`local`:e.kind===`remote`?`remote`:`local`}function normalizeRemoteAgentDefinition(i,a){let o=expectObjectRecord(i,a);if(expectOnlyKnownKeys(o,[`auth`,`description`,`headers`,`kind`,`path`,`url`],a),o.kind!==`remote`)throw Error(`${a} Expected "kind" to be "remote".`);return{description:expectString(o.description,a),path:o.path===void 0?ASH_CREATE_SESSION_ROUTE_PATH:expectString(o.path,a),url:expectString(o.url,a)}}function assertRemoteAgentDefinitionHasNoLocalPackageEntries(e){let t=e.manifest,n=[t.connections.length>0?`connections/`:void 0,t.hooks.length>0?`hooks/`:void 0,t.instructions.length>0?`instructions`:void 0,t.lib.length>0?`lib/`:void 0,t.sandbox===null?void 0:`sandbox/`,t.sandboxWorkspaces.length>0?`sandbox/workspace/`:void 0,t.schedules.length>0?`schedules/`:void 0,t.skills.length>0?`skills/`:void 0,t.subagents.length>0?`subagents/`:void 0,t.tools.length>0?`tools/`:void 0].filter(e=>e!==void 0);if(n.length!==0)throw Error(`Remote subagent definition "${e.logicalPath}" cannot include local package entries. Remove unsupported entries: ${n.join(`, `)}.`)}export{compileSubagentGraph};
@@ -0,0 +1,26 @@
1
+ import type { ModelMessage } from "ai";
2
+ import type { HandleMessageStreamEvent } from "#protocol/message.js";
3
+ import type { ResolvedDynamicInstructionsResolver } from "#runtime/types.js";
4
+ import type { ContextContainer } from "#context/container.js";
5
+ import { ContextKey } from "#context/key.js";
6
+ /**
7
+ * Virtual (non-serialized) pending dynamic instruction messages. Set by
8
+ * {@link dispatchDynamicInstructionEvent} when resolvers produce
9
+ * messages. Read by the tool-loop to inject into the next model call.
10
+ *
11
+ * Virtual keys are cleared at workflow step boundaries, so messages
12
+ * are never persisted or duplicated across steps.
13
+ */
14
+ export declare const PendingDynamicInstructionMessagesKey: ContextKey<ModelMessage[]>;
15
+ /**
16
+ * Dispatches a stream event to dynamic instruction resolvers. On a
17
+ * matching event: runs handlers, validates branded returns, lowers
18
+ * results to messages, and stores them on a virtual context key for
19
+ * the tool-loop to inject.
20
+ */
21
+ export declare function dispatchDynamicInstructionEvent(input: {
22
+ readonly ctx: ContextContainer;
23
+ readonly resolvers: readonly ResolvedDynamicInstructionsResolver[];
24
+ readonly event: HandleMessageStreamEvent;
25
+ readonly messages: readonly ModelMessage[];
26
+ }): Promise<void>;
@@ -0,0 +1 @@
1
+ import{createLogger}from"#internal/logging.js";import{getAdapterKind}from"#channel/adapter.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{ALLOWED_DYNAMIC_TOOL_EVENTS,isBrandedInstructionsEntry}from"#shared/dynamic-tool-definition.js";import{ContextKey}from"#context/key.js";import{ChannelKey}from"#runtime/sessions/runtime-context-keys.js";const log=createLogger(`dynamic-instructions`),PendingDynamicInstructionMessagesKey=new ContextKey(`ash.pendingDynamicInstructionMessages`);function buildResolveContext(e,o){let s=e.get(SessionIdKey)??``,c=e.get(AuthKey)??null,l=e.get(InitiatorAuthKey)??null,d=e.get(ChannelKey),f=e.get(ContinuationTokenKey);return{session:{id:s,auth:{current:c,initiator:l}},channel:{kind:d===void 0?void 0:getAdapterKind(d),continuationToken:f},messages:o}}function lowerToMessages(e){let t=[];return e.markdown!==void 0&&e.markdown.trim().length>0&&t.push({role:`system`,content:e.markdown}),e.modelContext!==void 0&&t.push(...e.modelContext),t}async function dispatchDynamicInstructionEvent(e){let{ctx:t,resolvers:n,event:r,messages:i}=e;if(!ALLOWED_DYNAMIC_TOOL_EVENTS.has(r.type))return;let a=n.filter(e=>e.eventNames.includes(r.type));if(a.length===0)return;let l=buildResolveContext(t,i),u=[];for(let e of a){let t=e.events[r.type];if(t!==void 0)try{let n=await t(r,l);if(n==null)continue;if(!isBrandedInstructionsEntry(n)){log.error(`Dynamic instructions resolver "${e.slug}" returned an unbranded value — wrap with defineInstructions().`);continue}u.push(...lowerToMessages(n))}catch(t){log.error(`Dynamic instructions resolver "${e.slug}" (${r.type}) threw — skipping.`,{error:toErrorMessage(t)})}}if(u.length>0){let e=t.get(PendingDynamicInstructionMessagesKey)??[];t.setVirtualContext(PendingDynamicInstructionMessagesKey,[...e,...u])}}export{PendingDynamicInstructionMessagesKey,dispatchDynamicInstructionEvent};
@@ -4,9 +4,10 @@ import type { ResolvedDynamicSkillResolver } from "#runtime/types.js";
4
4
  import type { ContextContainer } from "#context/container.js";
5
5
  import { ContextKey } from "#context/key.js";
6
6
  /**
7
- * Virtual (non-serialized) pending skill announcement text. Set by
8
- * {@link dispatchDynamicSkillEvent} when skills are materialized. Read
9
- * by the tool-loop to inject the announcement into model context.
7
+ * Durable pending skill announcement text. Set by
8
+ * {@link dispatchDynamicSkillEvent} whenever the dynamic skill manifest
9
+ * changes. Read by the tool-loop to inject the announcement into model
10
+ * context.
10
11
  */
11
12
  export declare const PendingSkillAnnouncementKey: ContextKey<string>;
12
13
  /**
@@ -1 +1 @@
1
- import{createLogger}from"#internal/logging.js";import{getAdapterKind}from"#channel/adapter.js";import{AuthKey,ContinuationTokenKey,DynamicSkillManifestKey,InitiatorAuthKey,SandboxKey,SessionIdKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{ALLOWED_DYNAMIC_TOOL_EVENTS}from"#shared/dynamic-tool-definition.js";import{normalizeSkillPackage,writeSkillPackageToSandbox}from"#shared/skill-package.js";import{ContextKey}from"#context/key.js";import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";const log=createLogger(`dynamic-skills`),WORKSPACE_SKILLS_PREFIX=`/workspace/skills/`;function buildResolveContext(e,i){let o=e.get(SessionIdKey)??``,c=e.get(AuthKey)??null,l=e.get(InitiatorAuthKey)??null,u=e.get(ChannelKey),d=e.get(ContinuationTokenKey);return{session:{id:o,auth:{current:c,initiator:l}},channel:{kind:u===void 0?void 0:getAdapterKind(u),continuationToken:d},messages:i}}function qualifyDynamicSkillNames(e,t,n){let r=Object.keys(n),i=[];if(r.length===0)return i;if(t||r.length===1)return i.push({name:e,entryKey:r[0],entry:n[r[0]]}),i;for(let t of r)i.push({name:`${e}__${t}`,entryKey:t,entry:n[t]});return i}function isSkillEntry(e){return typeof e==`object`&&!!e&&typeof e.markdown==`string`&&typeof e.description==`string`}const PendingSkillAnnouncementKey=new ContextKey(`ash.pendingSkillAnnouncement`);async function dispatchDynamicSkillEvent(e){let{ctx:t,resolvers:n,event:r,messages:a}=e;if(!ALLOWED_DYNAMIC_TOOL_EVENTS.has(r.type))return;let s=n.filter(e=>e.eventNames.includes(r.type));if(s.length===0)return;let f=buildResolveContext(t,a),p=new Set(t.require(BundleKey).resolvedAgent.skills.map(e=>e.name)),m=t.get(DynamicSkillManifestKey)??{},h={...m},g=[],_=await Promise.allSettled(s.map(async e=>{let t=e.events[r.type];if(t===void 0)return null;let n=await t(r,f);if(n==null)return{resolver:e,entries:null};let i,a;return isSkillEntry(n)?(i={_single:n},a=!0):(i=n,a=!1),{resolver:e,entries:i,isSingle:a}})),v=await t.require(SandboxKey).get();for(let e of _){if(e.status===`rejected`){log.error(`Dynamic skill resolver (${r.type}) threw — skipping.`,{error:toErrorMessage(e.reason)});continue}if(e.value===null)continue;let{resolver:t,entries:n,isSingle:i}=e.value,a=m[t.slug]??[];if(n===null){if(a.length>0&&v!==null)for(let e of a)await v.run({command:`rm -rf ${WORKSPACE_SKILLS_PREFIX}${e}`});h[t.slug]=[];continue}let o=qualifyDynamicSkillNames(t.slug,i,n),s=new Set(o.map(e=>e.name));for(let{name:e}of o)if(p.has(e))throw Error(`Dynamic skill "${e}" from resolver "${t.slug}" conflicts with an authored skill.`);if(v!==null)for(let e of a)s.has(e)||await v.run({command:`rm -rf ${WORKSPACE_SKILLS_PREFIX}${e}`});if(v!==null)for(let{name:e,entry:t}of o){let n=normalizeSkillPackage({...t,name:e});await writeSkillPackageToSandbox({sandbox:v,skill:n}),g.push(n)}h[t.slug]=[...s]}if(t.set(DynamicSkillManifestKey,h),g.length>0){let e=formatAvailableSkillsSection(g);e!==null&&t.set(PendingSkillAnnouncementKey,e)}}export{PendingSkillAnnouncementKey,dispatchDynamicSkillEvent};
1
+ import{createLogger}from"#internal/logging.js";import{getAdapterKind}from"#channel/adapter.js";import{AuthKey,ContinuationTokenKey,DynamicSkillManifestKey,InitiatorAuthKey,SandboxKey,SessionIdKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{ALLOWED_DYNAMIC_TOOL_EVENTS}from"#shared/dynamic-tool-definition.js";import{normalizeSkillPackage,removeSkillPackageFromSandbox,writeSkillPackageToSandbox}from"#shared/skill-package.js";import{ContextKey}from"#context/key.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";const log=createLogger(`dynamic-skills`);function buildResolveContext(e,i){let o=e.get(SessionIdKey)??``,c=e.get(AuthKey)??null,l=e.get(InitiatorAuthKey)??null,u=e.get(ChannelKey),d=e.get(ContinuationTokenKey);return{session:{id:o,auth:{current:c,initiator:l}},channel:{kind:u===void 0?void 0:getAdapterKind(u),continuationToken:d},messages:i}}function qualifyDynamicSkillNames(e,t,n){let r=Object.keys(n),i=[];if(r.length===0)return i;if(t||r.length===1)return i.push({name:e,entryKey:r[0],entry:n[r[0]]}),i;for(let t of r)i.push({name:`${e}__${t}`,entryKey:t,entry:n[t]});return i}function formatDynamicSkillAnnouncement(e){return formatAvailableSkillsSection(Object.values(e).flat())??``}function isSkillEntry(e){return typeof e==`object`&&!!e&&typeof e.markdown==`string`&&typeof e.description==`string`}const PendingSkillAnnouncementKey=new ContextKey(`ash.pendingSkillAnnouncement`);async function dispatchDynamicSkillEvent(e){let{ctx:t,resolvers:n,event:r,messages:a}=e;if(!ALLOWED_DYNAMIC_TOOL_EVENTS.has(r.type))return;let s=n.filter(e=>e.eventNames.includes(r.type));if(s.length===0)return;let f=buildResolveContext(t,a),p=new Set(t.require(BundleKey).resolvedAgent.skills.map(e=>e.name)),m=t.get(DynamicSkillManifestKey)??{},h=[],g=await Promise.allSettled(s.map(async e=>{let t=e.events[r.type];if(t===void 0)return null;let n=await t(r,f);if(n==null)return{resolver:e,named:[]};let i,a;return isSkillEntry(n)?(i={_single:n},a=!0):(i=n,a=!1),{resolver:e,named:qualifyDynamicSkillNames(e.slug,a,i)}}));for(let e of g){if(e.status===`rejected`){log.error(`Dynamic skill resolver (${r.type}) threw — skipping.`,{error:toErrorMessage(e.reason)});continue}e.value!==null&&h.push({resolver:e.value.resolver,skills:e.value.named.map(({name:e,entry:t})=>normalizeSkillPackage({...t,name:e}))})}if(h.length===0)return;let _={...m};for(let{resolver:e,skills:t}of h)t.length===0?delete _[e.slug]:_[e.slug]=t.map(e=>({description:e.description,name:e.name}));let v=new Map;for(let[e,t]of Object.entries(_))for(let{name:n}of t){if(p.has(n))throw Error(`Dynamic skill "${n}" from resolver "${e}" conflicts with an authored skill.`);let t=v.get(n);if(t!==void 0)throw Error(`Dynamic skill "${n}" from resolver "${e}" conflicts with dynamic resolver "${t}".`);v.set(n,e)}let y=await t.require(SandboxKey).get();if(y!==null)for(let{resolver:e,skills:t}of h){let n=new Set((m[e.slug]??[]).map(e=>e.name)),r=new Set(t.map(e=>e.name));for(let e of n)r.has(e)||await removeSkillPackageFromSandbox({sandbox:y,name:e});for(let e of t)await writeSkillPackageToSandbox({sandbox:y,skill:e})}t.set(DynamicSkillManifestKey,_),t.set(PendingSkillAnnouncementKey,formatDynamicSkillAnnouncement(_))}export{PendingSkillAnnouncementKey,dispatchDynamicSkillEvent};
@@ -1 +1 @@
1
- import{ContinuationTokenKey,SessionPreparedKey}from"./keys.js";import{createLogger}from"#internal/logging.js";import{getAdapterKind}from"#channel/adapter.js";import{toErrorMessage}from"#shared/errors.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{emitRecoverableFailedTurn,emitTurnPreamble,getHarnessEmissionState,setHarnessEmissionState}from"#harness/emission.js";const log=createLogger(`hooks.lifecycle`);async function dispatchHookLifecycle(e){let{ctx:n,registry:r,emit:a}=e,o=getHarnessEmissionState(e.session.state),s=buildHookContext(n),u=[],d=e.session;if(r.session.length>0&&n.get(SessionPreparedKey)!==!0){n.set(SessionPreparedKey,!0);for(let e of r.session){let t=await e.handler(s);t?.modelContext!==void 0&&t.modelContext.length>0&&u.push(...t.modelContext)}}let f=!1,p=o;try{for(let e of r.turn){let t=await e.handler(s);t?.modelContext!==void 0&&t.modelContext.length>0&&u.push(...t.modelContext)}}catch(t){let n=toErrorMessage(t);try{return f||=(p=await emitTurnPreamble(a,{message:e.input.message},o,e.runtimeIdentity),!0),{kind:`turn-failed`,message:n,nextSession:setHarnessEmissionState(d,await emitRecoverableFailedTurn(a,p,{code:`HOOK_TURN_FAILED`,message:n}))}}catch(e){throw log.error(`Event hook threw while emitting the turn.failed cascade for a lifecycle.turn failure — escalating to session.failed.`,{error:toErrorMessage(e)}),e}}let m=e.input.modelContext??[],h=m.length===0?u:[...m,...u];return{kind:`proceed`,input:h.length>0?{...e.input,modelContext:h}:e.input,nextSession:d}}async function dispatchStreamEventHooks(e){let t=e.registry.streamEventsByType.get(e.event.type)??[],n=e.registry.streamEventsWildcard;if(t.length===0&&n.length===0)return;let r=buildHookContext(e.ctx);for(let n of t)await n.handler(e.event,r);for(let t of n)await t.handler(e.event,r)}function buildHookContext(t){let n=t.require(BundleKey),i=t.get(ChannelKey),c=t.get(ContinuationTokenKey),l=i===void 0?void 0:getAdapterKind(i);return{...buildCallbackContext(),agent:{name:n.resolvedAgent.config.name??`agent`,nodeId:n.nodeId},channel:{kind:l,continuationToken:c}}}async function runHookLifecycleStep(e,t){let n=await dispatchHookLifecycle(e);return n.kind===`turn-failed`?{next:e.mode===`conversation`?null:{done:!0,output:n.message},session:n.nextSession}:t(n.nextSession,n.input)}export{dispatchHookLifecycle,dispatchStreamEventHooks,runHookLifecycleStep};
1
+ import{ContinuationTokenKey,SessionPreparedKey}from"./keys.js";import{createLogger}from"#internal/logging.js";import{getAdapterKind}from"#channel/adapter.js";import{toErrorMessage}from"#shared/errors.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{emitRecoverableFailedTurn,emitTurnPreamble,getHarnessEmissionState,setHarnessEmissionState}from"#harness/emission.js";const log=createLogger(`hooks.lifecycle`);async function dispatchHookLifecycle(e){let{ctx:n,registry:r,emit:a}=e,o=getHarnessEmissionState(e.session.state),s=buildHookContext(n),u=e.session;if(r.session.length>0&&n.get(SessionPreparedKey)!==!0){n.set(SessionPreparedKey,!0);for(let e of r.session)await e.handler(s)}let d=!1,f=o;try{for(let e of r.turn)await e.handler(s)}catch(t){let n=toErrorMessage(t);try{return d||=(f=await emitTurnPreamble(a,{message:e.input.message},o,e.runtimeIdentity),!0),{kind:`turn-failed`,message:n,nextSession:setHarnessEmissionState(u,await emitRecoverableFailedTurn(a,f,{code:`HOOK_TURN_FAILED`,message:n}))}}catch(e){throw log.error(`Event hook threw while emitting the turn.failed cascade for a lifecycle.turn failure — escalating to session.failed.`,{error:toErrorMessage(e)}),e}}return{kind:`proceed`,input:e.input,nextSession:u}}async function dispatchStreamEventHooks(e){let t=e.registry.streamEventsByType.get(e.event.type)??[],n=e.registry.streamEventsWildcard;if(t.length===0&&n.length===0)return;let r=buildHookContext(e.ctx);for(let n of t)await n.handler(e.event,r);for(let t of n)await t.handler(e.event,r)}function buildHookContext(t){let n=t.require(BundleKey),i=t.get(ChannelKey),c=t.get(ContinuationTokenKey),l=i===void 0?void 0:getAdapterKind(i);return{...buildCallbackContext(),agent:{name:n.resolvedAgent.config.name??`agent`,nodeId:n.nodeId},channel:{kind:l,continuationToken:c}}}async function runHookLifecycleStep(e,t){let n=await dispatchHookLifecycle(e);return n.kind===`turn-failed`?{next:e.mode===`conversation`?null:{done:!0,output:n.message},session:n.nextSession}:t(n.nextSession,n.input)}export{dispatchHookLifecycle,dispatchStreamEventHooks,runHookLifecycleStep};
@@ -88,8 +88,15 @@ export interface DurableDynamicToolMetadata {
88
88
  }
89
89
  export declare const DynamicSessionToolMetadataKey: ContextKey<readonly DurableDynamicToolMetadata[]>;
90
90
  /**
91
- * Durable map from resolver slug to the qualified skill names it last
92
- * produced. Used to diff on re-resolution and clean up removed skills
93
- * from the sandbox.
91
+ * Durable metadata for one session-scoped dynamic skill.
94
92
  */
95
- export declare const DynamicSkillManifestKey: ContextKey<Record<string, readonly string[]>>;
93
+ export interface DurableDynamicSkillMetadata {
94
+ readonly name: string;
95
+ readonly description: string;
96
+ }
97
+ /**
98
+ * Durable map from resolver slug to the qualified skills it last produced.
99
+ * Used to diff on re-resolution, clean up removed skills from the sandbox,
100
+ * and rebuild the model-visible announcement across turns.
101
+ */
102
+ export declare const DynamicSkillManifestKey: ContextKey<Record<string, readonly DurableDynamicSkillMetadata[]>>;
@@ -15,11 +15,11 @@ export type DirectoryEntryType = "directory" | "file" | "other";
15
15
  /**
16
16
  * Classified root-level agent entry.
17
17
  */
18
- export type AgentRootEntryKind = "agent-config-module" | "channels-directory" | "connections-directory" | "hooks-directory" | "instructions-markdown" | "instructions-module" | "lib-directory" | "sandbox-directory" | "schedules-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
18
+ export type AgentRootEntryKind = "agent-config-module" | "channels-directory" | "connections-directory" | "hooks-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "lib-directory" | "sandbox-directory" | "schedules-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
19
19
  /**
20
20
  * Classified local-subagent root entry.
21
21
  */
22
- export type LocalSubagentEntryKind = "agent-config-module" | "connections-directory" | "hooks-directory" | "instructions-markdown" | "instructions-module" | "invalid-schedules-directory" | "lib-directory" | "sandbox-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
22
+ export type LocalSubagentEntryKind = "agent-config-module" | "connections-directory" | "hooks-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "invalid-schedules-directory" | "lib-directory" | "sandbox-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
23
23
  /**
24
24
  * Classified Agent Skills package entry.
25
25
  */
@@ -1 +1 @@
1
- import{sep}from"node:path";const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS=[`.cts`,`.mts`,`.cjs`,`.mjs`,`.ts`,`.js`],PROJECT_MARKER_FILE_NAMES=[`package.json`,`vercel.json`],PROJECT_MARKER_FILE_NAME_SET=new Set(PROJECT_MARKER_FILE_NAMES);function getDirectoryEntryType(e){return e.isDirectory()?`directory`:e.isFile()?`file`:`other`}function isProjectMarkerEntry(e,t){return t===`file`&&PROJECT_MARKER_FILE_NAME_SET.has(e)}function classifyAgentRootEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:e===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(e===`channels`)return`channels-directory`;if(e===`connections`)return`connections-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`lib`)return`lib-directory`;if(e===`skills`)return`skills-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`tools`)return`tools-directory`;if(e===`schedules`)return`schedules-directory`;if(e===`subagents`)return`subagents-directory`}return`unknown`}function classifyLocalSubagentEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:e===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(e===`connections`)return`connections-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`lib`)return`lib-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`skills`)return`skills-directory`;if(e===`tools`)return`tools-directory`;if(e===`subagents`)return`subagents-directory`;if(e===`schedules`)return`invalid-schedules-directory`}return`unknown`}function classifySkillPackageEntry(e,t){if(t===`file`)return e===`SKILL.md`?`skill-markdown`:`skill-resource`;if(t===`directory`){if(e===`scripts`)return`skill-scripts-directory`;if(e===`references`)return`skill-references-directory`;if(e===`assets`)return`skill-assets-directory`}return`skill-resource`}function classifySkillsDirectoryEntry(e,t){if(t===`directory`)return`skill-package-directory`;if(t===`file`){if(e.endsWith(`.md`))return`flat-skill-markdown`;if(getSupportedModuleBaseName(e)!==null)return`flat-skill-module`}return`unknown`}function normalizeLogicalPath(t){return t.replaceAll(sep,`/`).replace(/^\.\//,``).replace(/^\/+/,``)}function getSupportedModuleBaseName(e){for(let n of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS)if(e.endsWith(n)&&e.length>n.length)return e.slice(0,-n.length);return null}function matchesSupportedModuleBaseName(e,t){return getSupportedModuleBaseName(e)===t}function stripLogicalPathExtension(e){let t=normalizeLogicalPath(e),n=t.lastIndexOf(`/`),r=t.lastIndexOf(`.`);return r===-1||r<n?t:t.slice(0,r)}export{PROJECT_MARKER_FILE_NAMES,SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS,classifyAgentRootEntry,classifyLocalSubagentEntry,classifySkillPackageEntry,classifySkillsDirectoryEntry,getDirectoryEntryType,getSupportedModuleBaseName,isProjectMarkerEntry,matchesSupportedModuleBaseName,normalizeLogicalPath,stripLogicalPathExtension};
1
+ import{sep}from"node:path";const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS=[`.cts`,`.mts`,`.cjs`,`.mjs`,`.ts`,`.js`],PROJECT_MARKER_FILE_NAMES=[`package.json`,`vercel.json`],PROJECT_MARKER_FILE_NAME_SET=new Set(PROJECT_MARKER_FILE_NAMES);function getDirectoryEntryType(e){return e.isDirectory()?`directory`:e.isFile()?`file`:`other`}function isProjectMarkerEntry(e,t){return t===`file`&&PROJECT_MARKER_FILE_NAME_SET.has(e)}function classifyAgentRootEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:e===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(e===`channels`)return`channels-directory`;if(e===`connections`)return`connections-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`instructions`)return`instructions-directory`;if(e===`lib`)return`lib-directory`;if(e===`skills`)return`skills-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`tools`)return`tools-directory`;if(e===`schedules`)return`schedules-directory`;if(e===`subagents`)return`subagents-directory`}return`unknown`}function classifyLocalSubagentEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:e===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(e===`connections`)return`connections-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`instructions`)return`instructions-directory`;if(e===`lib`)return`lib-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`skills`)return`skills-directory`;if(e===`tools`)return`tools-directory`;if(e===`subagents`)return`subagents-directory`;if(e===`schedules`)return`invalid-schedules-directory`}return`unknown`}function classifySkillPackageEntry(e,t){if(t===`file`)return e===`SKILL.md`?`skill-markdown`:`skill-resource`;if(t===`directory`){if(e===`scripts`)return`skill-scripts-directory`;if(e===`references`)return`skill-references-directory`;if(e===`assets`)return`skill-assets-directory`}return`skill-resource`}function classifySkillsDirectoryEntry(e,t){if(t===`directory`)return`skill-package-directory`;if(t===`file`){if(e.endsWith(`.md`))return`flat-skill-markdown`;if(getSupportedModuleBaseName(e)!==null)return`flat-skill-module`}return`unknown`}function normalizeLogicalPath(t){return t.replaceAll(sep,`/`).replace(/^\.\//,``).replace(/^\/+/,``)}function getSupportedModuleBaseName(e){for(let n of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS)if(e.endsWith(n)&&e.length>n.length)return e.slice(0,-n.length);return null}function matchesSupportedModuleBaseName(e,t){return getSupportedModuleBaseName(e)===t}function stripLogicalPathExtension(e){let t=normalizeLogicalPath(e),n=t.lastIndexOf(`/`),r=t.lastIndexOf(`.`);return r===-1||r<n?t:t.slice(0,r)}export{PROJECT_MARKER_FILE_NAMES,SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS,classifyAgentRootEntry,classifyLocalSubagentEntry,classifySkillPackageEntry,classifySkillsDirectoryEntry,getDirectoryEntryType,getSupportedModuleBaseName,isProjectMarkerEntry,matchesSupportedModuleBaseName,normalizeLogicalPath,stripLogicalPathExtension};
@@ -1,8 +1,8 @@
1
1
  import type { Dirent } from "node:fs";
2
- import type { MarkdownSourceRef, ModuleSourceRef } from "#shared/source-ref.js";
3
- import type { InstructionsDefinition } from "#public/definitions/instructions.js";
2
+ import type { ModuleSourceRef } from "#shared/source-ref.js";
4
3
  import { type DiscoverDiagnostic } from "#discover/diagnostics.js";
5
4
  import { type DirectoryEntryType } from "#discover/filesystem.js";
5
+ import { type InstructionsSourceRef } from "#discover/manifest.js";
6
6
  import type { ProjectSource, ProjectSourceEntry } from "#discover/project-source.js";
7
7
  /**
8
8
  * Shared diagnostic emitted when a slot has multiple authored module sources.
@@ -55,6 +55,11 @@ export declare const DISCOVER_CONNECTION_NAME_INVALID = "discover/connection-nam
55
55
  * stability across manifest versions.
56
56
  */
57
57
  export declare const DISCOVER_SANDBOX_DIRECTORY_INVALID = "discover/sandbox-directory-invalid";
58
+ /**
59
+ * Shared diagnostic emitted when the authored `instructions/` root is not a
60
+ * directory.
61
+ */
62
+ export declare const DISCOVER_INSTRUCTIONS_DIRECTORY_INVALID = "discover/instructions-directory-invalid";
58
63
  /**
59
64
  * Shared diagnostic emitted when an authored `channels/**` filename or
60
65
  * directory segment does not satisfy the channel slug charset rule.
@@ -107,19 +112,20 @@ export declare const DISCOVER_UNSUPPORTED_DIRECTORY = "discover/unsupported-dire
107
112
  * {@link createDiskProjectSource} returns them directly.
108
113
  */
109
114
  export type StringDirent = Dirent<string>;
110
- type InstructionsSourceRef = MarkdownSourceRef<InstructionsDefinition> | ModuleSourceRef;
111
115
  /**
112
116
  * Reads one directory through `source` and returns its entries sorted by name.
113
117
  */
114
118
  export declare function readSortedDirectoryEntries(source: ProjectSource, directoryPath: string): Promise<ProjectSourceEntry[]>;
115
119
  /**
116
- * Discovers one required `instructions.md|ts|cts|mts|js|cjs|mjs` source
117
- * from a root directory.
120
+ * Discovers instructions sources from a root directory.
118
121
  *
119
- * For backwards compatibility, falls back to the deprecated
120
- * `system.{md,ts,...}` slot when no `instructions.*` source is present —
121
- * with a {@link DISCOVER_DEPRECATED_SYSTEM_SLOT} warning prompting the
122
- * author to rename the file.
122
+ * Supports three forms:
123
+ * 1. **Directory**: `agent/instructions/` with multiple `.md` and `.ts` files.
124
+ * 2. **Flat file**: `agent/instructions.md` or `agent/instructions.{ts,...}`.
125
+ * 3. **Legacy**: `agent/system.{md,ts,...}` with a deprecation warning.
126
+ *
127
+ * A flat file and a directory can coexist — the flat file appears first
128
+ * in the returned array.
123
129
  */
124
130
  export declare function discoverInstructionsSource(input: {
125
131
  required?: boolean;
@@ -128,7 +134,7 @@ export declare function discoverInstructionsSource(input: {
128
134
  source: ProjectSource;
129
135
  }): Promise<{
130
136
  diagnostics: DiscoverDiagnostic[];
131
- instructions?: InstructionsSourceRef;
137
+ instructions: InstructionsSourceRef[];
132
138
  }>;
133
139
  /**
134
140
  * Discovers one flat module slot such as `agent.ts` or `subagent.cjs`.