@athenaintel/react 0.23.2 → 0.24.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 (334) hide show
  1. package/README.md +46 -1
  2. package/dist/assets/AssetPanel.cjs +1 -1
  3. package/dist/assets/AssetPanel.cjs.map +1 -1
  4. package/dist/assets/AssetPanel.js +1 -1
  5. package/dist/assets/AssetPanel.js.map +1 -1
  6. package/dist/assets/AthenaAssetEmbed.cjs +1 -1
  7. package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
  8. package/dist/assets/AthenaAssetEmbed.js +1 -1
  9. package/dist/assets/AthenaAssetEmbed.js.map +1 -1
  10. package/dist/chat/AthenaChat.cjs +138 -46
  11. package/dist/chat/AthenaChat.cjs.map +1 -1
  12. package/dist/chat/AthenaChat.d.ts +37 -1
  13. package/dist/chat/AthenaChat.js +139 -47
  14. package/dist/chat/AthenaChat.js.map +1 -1
  15. package/dist/chat/StatewireApprovalCard.cjs +3 -18
  16. package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
  17. package/dist/chat/StatewireApprovalCard.js +3 -18
  18. package/dist/chat/StatewireApprovalCard.js.map +1 -1
  19. package/dist/chat/StatewireClientToolBridge.cjs +2 -16
  20. package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
  21. package/dist/chat/StatewireClientToolBridge.js +2 -16
  22. package/dist/chat/StatewireClientToolBridge.js.map +1 -1
  23. package/dist/chat/StatewireQueuedMessages.cjs +5 -16
  24. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  25. package/dist/chat/StatewireQueuedMessages.js +5 -16
  26. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  27. package/dist/chat/WaitingOnYouBanner.cjs +3 -18
  28. package/dist/chat/WaitingOnYouBanner.cjs.map +1 -1
  29. package/dist/chat/WaitingOnYouBanner.js +3 -18
  30. package/dist/chat/WaitingOnYouBanner.js.map +1 -1
  31. package/dist/chat/athena-composer-controls.js +1 -1
  32. package/dist/chat/run-activity.cjs +0 -16
  33. package/dist/chat/run-activity.cjs.map +1 -1
  34. package/dist/chat/run-activity.js +0 -16
  35. package/dist/chat/run-activity.js.map +1 -1
  36. package/dist/chat/statewire-client-tools.cjs +21 -17
  37. package/dist/chat/statewire-client-tools.cjs.map +1 -1
  38. package/dist/chat/statewire-client-tools.d.ts +27 -0
  39. package/dist/chat/statewire-client-tools.js +21 -17
  40. package/dist/chat/statewire-client-tools.js.map +1 -1
  41. package/dist/chat/super-grouping/activity-timeline.cjs +0 -16
  42. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
  43. package/dist/chat/super-grouping/activity-timeline.js +0 -16
  44. package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
  45. package/dist/chat/tiptap-text.cjs +1 -17
  46. package/dist/chat/tiptap-text.cjs.map +1 -1
  47. package/dist/chat/tiptap-text.js +1 -17
  48. package/dist/chat/tiptap-text.js.map +1 -1
  49. package/dist/chat/use-athena-run-live.cjs +0 -15
  50. package/dist/chat/use-athena-run-live.cjs.map +1 -1
  51. package/dist/chat/use-athena-run-live.d.ts +7 -0
  52. package/dist/chat/use-athena-run-live.js +0 -15
  53. package/dist/chat/use-athena-run-live.js.map +1 -1
  54. package/dist/chat/use-statewire-approval-request.cjs +4 -16
  55. package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
  56. package/dist/chat/use-statewire-approval-request.d.ts +2 -0
  57. package/dist/chat/use-statewire-approval-request.js +4 -16
  58. package/dist/chat/use-statewire-approval-request.js.map +1 -1
  59. package/dist/chat-ui/composer/tiptap-composer.cjs +17 -17
  60. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  61. package/dist/chat-ui/composer/tiptap-composer.js +17 -17
  62. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  63. package/dist/chat-ui/index.cjs +0 -16
  64. package/dist/chat-ui/index.cjs.map +1 -1
  65. package/dist/chat-ui/index.js +0 -16
  66. package/dist/chat-ui/index.js.map +1 -1
  67. package/dist/chat-ui/mentions/mention-chip.cjs +1 -16
  68. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  69. package/dist/chat-ui/mentions/mention-chip.js +1 -16
  70. package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
  71. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs +4 -6
  72. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs.map +1 -1
  73. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js +4 -6
  74. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js.map +1 -1
  75. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +2 -9
  76. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
  77. package/dist/chat-ui/mentions/suggestions/data/sources/index.js +2 -9
  78. package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
  79. package/dist/chat-ui/messages/message-components.cjs +5 -19
  80. package/dist/chat-ui/messages/message-components.cjs.map +1 -1
  81. package/dist/chat-ui/messages/message-components.js +5 -19
  82. package/dist/chat-ui/messages/message-components.js.map +1 -1
  83. package/dist/chat-ui/messages/runtime-message.cjs +1 -16
  84. package/dist/chat-ui/messages/runtime-message.cjs.map +1 -1
  85. package/dist/chat-ui/messages/runtime-message.js +1 -16
  86. package/dist/chat-ui/messages/runtime-message.js.map +1 -1
  87. package/dist/chat-ui/messages/statewire-continue-run.cjs +3 -15
  88. package/dist/chat-ui/messages/statewire-continue-run.cjs.map +1 -1
  89. package/dist/chat-ui/messages/statewire-continue-run.js +3 -15
  90. package/dist/chat-ui/messages/statewire-continue-run.js.map +1 -1
  91. package/dist/chat-ui/messages/user-edit-composer.cjs +0 -16
  92. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
  93. package/dist/chat-ui/messages/user-edit-composer.js +0 -16
  94. package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
  95. package/dist/chat-ui/messages/wake-marker.cjs +1 -16
  96. package/dist/chat-ui/messages/wake-marker.cjs.map +1 -1
  97. package/dist/chat-ui/messages/wake-marker.js +1 -16
  98. package/dist/chat-ui/messages/wake-marker.js.map +1 -1
  99. package/dist/chat-ui/statewire.cjs +0 -16
  100. package/dist/chat-ui/statewire.cjs.map +1 -1
  101. package/dist/chat-ui/statewire.js +0 -16
  102. package/dist/chat-ui/statewire.js.map +1 -1
  103. package/dist/chat-ui/thread/statewire-history-edge.cjs +2 -17
  104. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
  105. package/dist/chat-ui/thread/statewire-history-edge.js +2 -17
  106. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
  107. package/dist/composer/composer-handoff.cjs +121 -0
  108. package/dist/composer/composer-handoff.cjs.map +1 -0
  109. package/dist/composer/composer-handoff.d.ts +89 -0
  110. package/dist/composer/composer-handoff.js +121 -0
  111. package/dist/composer/composer-handoff.js.map +1 -0
  112. package/dist/composer/index.d.ts +2 -0
  113. package/dist/composer/useAppendToComposer.cjs +19 -7
  114. package/dist/composer/useAppendToComposer.cjs.map +1 -1
  115. package/dist/composer/useAppendToComposer.d.ts +22 -4
  116. package/dist/composer/useAppendToComposer.js +20 -8
  117. package/dist/composer/useAppendToComposer.js.map +1 -1
  118. package/dist/composer/useSendMessage.cjs +26 -8
  119. package/dist/composer/useSendMessage.cjs.map +1 -1
  120. package/dist/composer/useSendMessage.d.ts +8 -0
  121. package/dist/composer/useSendMessage.js +27 -9
  122. package/dist/composer/useSendMessage.js.map +1 -1
  123. package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
  124. package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
  125. package/dist/diagnostics/athena-diagnostics.js.map +1 -1
  126. package/dist/diagnostics/errors.cjs +2 -0
  127. package/dist/diagnostics/errors.cjs.map +1 -1
  128. package/dist/diagnostics/errors.d.ts +2 -0
  129. package/dist/diagnostics/errors.js +2 -0
  130. package/dist/diagnostics/errors.js.map +1 -1
  131. package/dist/dictation/DictationStrip.cjs +61 -0
  132. package/dist/dictation/DictationStrip.cjs.map +1 -0
  133. package/dist/dictation/DictationStrip.d.ts +27 -0
  134. package/dist/dictation/DictationStrip.js +61 -0
  135. package/dist/dictation/DictationStrip.js.map +1 -0
  136. package/dist/dictation/audio-level-history.cjs +68 -0
  137. package/dist/dictation/audio-level-history.cjs.map +1 -0
  138. package/dist/dictation/audio-level-history.d.ts +27 -0
  139. package/dist/dictation/audio-level-history.js +68 -0
  140. package/dist/dictation/audio-level-history.js.map +1 -0
  141. package/dist/dictation/dictation-controls.cjs +60 -0
  142. package/dist/dictation/dictation-controls.cjs.map +1 -0
  143. package/dist/dictation/dictation-controls.d.ts +15 -0
  144. package/dist/dictation/dictation-controls.js +60 -0
  145. package/dist/dictation/dictation-controls.js.map +1 -0
  146. package/dist/dictation/dictation-engine.cjs +128 -0
  147. package/dist/dictation/dictation-engine.cjs.map +1 -0
  148. package/dist/dictation/dictation-engine.d.ts +95 -0
  149. package/dist/dictation/dictation-engine.js +128 -0
  150. package/dist/dictation/dictation-engine.js.map +1 -0
  151. package/dist/dictation/dictation-state.cjs +68 -0
  152. package/dist/dictation/dictation-state.cjs.map +1 -0
  153. package/dist/dictation/dictation-state.d.ts +58 -0
  154. package/dist/dictation/dictation-state.js +68 -0
  155. package/dist/dictation/dictation-state.js.map +1 -0
  156. package/dist/dictation/recorded-dictation-engine.cjs +153 -0
  157. package/dist/dictation/recorded-dictation-engine.cjs.map +1 -0
  158. package/dist/dictation/recorded-dictation-engine.d.ts +66 -0
  159. package/dist/dictation/recorded-dictation-engine.js +153 -0
  160. package/dist/dictation/recorded-dictation-engine.js.map +1 -0
  161. package/dist/dictation/use-athena-dictation-engine.cjs +64 -0
  162. package/dist/dictation/use-athena-dictation-engine.cjs.map +1 -0
  163. package/dist/dictation/use-athena-dictation-engine.d.ts +25 -0
  164. package/dist/dictation/use-athena-dictation-engine.js +64 -0
  165. package/dist/dictation/use-athena-dictation-engine.js.map +1 -0
  166. package/dist/dictation/use-dictation.cjs +215 -0
  167. package/dist/dictation/use-dictation.cjs.map +1 -0
  168. package/dist/dictation/use-dictation.d.ts +63 -0
  169. package/dist/dictation/use-dictation.js +215 -0
  170. package/dist/dictation/use-dictation.js.map +1 -0
  171. package/dist/index.cjs +41 -39
  172. package/dist/index.cjs.map +1 -1
  173. package/dist/index.d.ts +14 -0
  174. package/dist/index.js +23 -21
  175. package/dist/index.js.map +1 -1
  176. package/dist/packages/agent-runtime/src/edit-command.cjs.map +1 -1
  177. package/dist/packages/agent-runtime/src/edit-command.js.map +1 -1
  178. package/dist/packages/agent-runtime/src/errors.cjs +18 -0
  179. package/dist/packages/agent-runtime/src/errors.cjs.map +1 -1
  180. package/dist/packages/agent-runtime/src/errors.js +19 -1
  181. package/dist/packages/agent-runtime/src/errors.js.map +1 -1
  182. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs +1 -0
  183. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  184. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js +1 -0
  185. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  186. package/dist/packages/agent-runtime/src/interrupts.cjs +61 -12
  187. package/dist/packages/agent-runtime/src/interrupts.cjs.map +1 -1
  188. package/dist/packages/agent-runtime/src/interrupts.js +61 -12
  189. package/dist/packages/agent-runtime/src/interrupts.js.map +1 -1
  190. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs +49 -0
  191. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  192. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js +49 -0
  193. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
  194. package/dist/packages/agent-runtime/src/thread-status.js +1 -1
  195. package/dist/packages/agent-runtime/src/tool-metadata.cjs +1 -37
  196. package/dist/packages/agent-runtime/src/tool-metadata.cjs.map +1 -1
  197. package/dist/packages/agent-runtime/src/tool-metadata.js +1 -37
  198. package/dist/packages/agent-runtime/src/tool-metadata.js.map +1 -1
  199. package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs +0 -1
  200. package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs.map +1 -1
  201. package/dist/packages/agent-runtime/src/use-deep-agent-config.js +0 -1
  202. package/dist/packages/agent-runtime/src/use-deep-agent-config.js.map +1 -1
  203. package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  204. package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
  205. package/dist/packages/react/package.json.cjs +1 -1
  206. package/dist/packages/react/package.json.js +1 -1
  207. package/dist/provider/AthenaProvider.cjs +45 -20
  208. package/dist/provider/AthenaProvider.cjs.map +1 -1
  209. package/dist/provider/AthenaProvider.d.ts +1 -1
  210. package/dist/provider/AthenaProvider.js +46 -21
  211. package/dist/provider/AthenaProvider.js.map +1 -1
  212. package/dist/runtime/statewire-lifecycle.cjs +0 -16
  213. package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
  214. package/dist/runtime/statewire-lifecycle.js +0 -16
  215. package/dist/runtime/statewire-lifecycle.js.map +1 -1
  216. package/dist/runtime/useAthenaStatewireRuntime.cjs +3 -17
  217. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  218. package/dist/runtime/useAthenaStatewireRuntime.js +3 -17
  219. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  220. package/dist/styles.css +1 -1
  221. package/dist/threads/statewire-thread-list.cjs +4 -17
  222. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  223. package/dist/threads/statewire-thread-list.js +4 -17
  224. package/dist/threads/statewire-thread-list.js.map +1 -1
  225. package/dist/threads/use-rest-conversation-history.cjs +2 -16
  226. package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
  227. package/dist/threads/use-rest-conversation-history.js +2 -16
  228. package/dist/threads/use-rest-conversation-history.js.map +1 -1
  229. package/dist/threads/use-statewire-conversation-history.cjs +2 -16
  230. package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
  231. package/dist/threads/use-statewire-conversation-history.js +2 -16
  232. package/dist/threads/use-statewire-conversation-history.js.map +1 -1
  233. package/dist/toolkits/index.cjs +0 -7
  234. package/dist/toolkits/index.cjs.map +1 -1
  235. package/dist/toolkits/index.d.ts +0 -2
  236. package/dist/toolkits/index.js +0 -7
  237. package/dist/toolkits/index.js.map +1 -1
  238. package/dist/tools/index.cjs +4 -20
  239. package/dist/tools/index.cjs.map +1 -1
  240. package/dist/tools/index.js +1 -17
  241. package/dist/tools/index.js.map +1 -1
  242. package/dist/tools/misc-tool-uis.cjs +2 -17
  243. package/dist/tools/misc-tool-uis.cjs.map +1 -1
  244. package/dist/tools/misc-tool-uis.js +2 -17
  245. package/dist/tools/misc-tool-uis.js.map +1 -1
  246. package/dist/tools/primitives.cjs +1 -16
  247. package/dist/tools/primitives.cjs.map +1 -1
  248. package/dist/tools/primitives.js +1 -16
  249. package/dist/tools/primitives.js.map +1 -1
  250. package/dist/tools/tool-fallback.cjs +2 -17
  251. package/dist/tools/tool-fallback.cjs.map +1 -1
  252. package/dist/tools/tool-fallback.js +2 -17
  253. package/dist/tools/tool-fallback.js.map +1 -1
  254. package/dist/tools/voice-update-tool-ui.cjs +1 -17
  255. package/dist/tools/voice-update-tool-ui.cjs.map +1 -1
  256. package/dist/tools/voice-update-tool-ui.js +1 -17
  257. package/dist/tools/voice-update-tool-ui.js.map +1 -1
  258. package/package.json +1 -1
  259. package/dist/node_modules/qrcode-generator/dist/qrcode.cjs +0 -32
  260. package/dist/node_modules/qrcode-generator/dist/qrcode.cjs.map +0 -1
  261. package/dist/node_modules/qrcode-generator/dist/qrcode.js +0 -31
  262. package/dist/node_modules/qrcode-generator/dist/qrcode.js.map +0 -1
  263. package/dist/node_modules/zod/v4/classic/errors.cjs +0 -44
  264. package/dist/node_modules/zod/v4/classic/errors.cjs.map +0 -1
  265. package/dist/node_modules/zod/v4/classic/errors.js +0 -44
  266. package/dist/node_modules/zod/v4/classic/errors.js.map +0 -1
  267. package/dist/node_modules/zod/v4/classic/iso.cjs +0 -43
  268. package/dist/node_modules/zod/v4/classic/iso.cjs.map +0 -1
  269. package/dist/node_modules/zod/v4/classic/iso.js +0 -43
  270. package/dist/node_modules/zod/v4/classic/iso.js.map +0 -1
  271. package/dist/node_modules/zod/v4/classic/parse.cjs +0 -29
  272. package/dist/node_modules/zod/v4/classic/parse.cjs.map +0 -1
  273. package/dist/node_modules/zod/v4/classic/parse.js +0 -29
  274. package/dist/node_modules/zod/v4/classic/parse.js.map +0 -1
  275. package/dist/node_modules/zod/v4/classic/schemas.cjs +0 -871
  276. package/dist/node_modules/zod/v4/classic/schemas.cjs.map +0 -1
  277. package/dist/node_modules/zod/v4/classic/schemas.js +0 -871
  278. package/dist/node_modules/zod/v4/classic/schemas.js.map +0 -1
  279. package/dist/node_modules/zod/v4/core/api.cjs +0 -570
  280. package/dist/node_modules/zod/v4/core/api.cjs.map +0 -1
  281. package/dist/node_modules/zod/v4/core/api.js +0 -570
  282. package/dist/node_modules/zod/v4/core/api.js.map +0 -1
  283. package/dist/node_modules/zod/v4/core/checks.cjs +0 -411
  284. package/dist/node_modules/zod/v4/core/checks.cjs.map +0 -1
  285. package/dist/node_modules/zod/v4/core/checks.js +0 -411
  286. package/dist/node_modules/zod/v4/core/checks.js.map +0 -1
  287. package/dist/node_modules/zod/v4/core/core.cjs +0 -77
  288. package/dist/node_modules/zod/v4/core/core.cjs.map +0 -1
  289. package/dist/node_modules/zod/v4/core/core.js +0 -77
  290. package/dist/node_modules/zod/v4/core/core.js.map +0 -1
  291. package/dist/node_modules/zod/v4/core/doc.cjs +0 -38
  292. package/dist/node_modules/zod/v4/core/doc.cjs.map +0 -1
  293. package/dist/node_modules/zod/v4/core/doc.js +0 -38
  294. package/dist/node_modules/zod/v4/core/doc.js.map +0 -1
  295. package/dist/node_modules/zod/v4/core/errors.cjs +0 -76
  296. package/dist/node_modules/zod/v4/core/errors.cjs.map +0 -1
  297. package/dist/node_modules/zod/v4/core/errors.js +0 -76
  298. package/dist/node_modules/zod/v4/core/errors.js.map +0 -1
  299. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +0 -312
  300. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +0 -1
  301. package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -312
  302. package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +0 -1
  303. package/dist/node_modules/zod/v4/core/parse.cjs +0 -96
  304. package/dist/node_modules/zod/v4/core/parse.cjs.map +0 -1
  305. package/dist/node_modules/zod/v4/core/parse.js +0 -96
  306. package/dist/node_modules/zod/v4/core/parse.js.map +0 -1
  307. package/dist/node_modules/zod/v4/core/regexes.cjs +0 -86
  308. package/dist/node_modules/zod/v4/core/regexes.cjs.map +0 -1
  309. package/dist/node_modules/zod/v4/core/regexes.js +0 -86
  310. package/dist/node_modules/zod/v4/core/regexes.js.map +0 -1
  311. package/dist/node_modules/zod/v4/core/registries.cjs +0 -52
  312. package/dist/node_modules/zod/v4/core/registries.cjs.map +0 -1
  313. package/dist/node_modules/zod/v4/core/registries.js +0 -52
  314. package/dist/node_modules/zod/v4/core/registries.js.map +0 -1
  315. package/dist/node_modules/zod/v4/core/schemas.cjs +0 -1412
  316. package/dist/node_modules/zod/v4/core/schemas.cjs.map +0 -1
  317. package/dist/node_modules/zod/v4/core/schemas.js +0 -1413
  318. package/dist/node_modules/zod/v4/core/schemas.js.map +0 -1
  319. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +0 -370
  320. package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +0 -1
  321. package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -370
  322. package/dist/node_modules/zod/v4/core/to-json-schema.js.map +0 -1
  323. package/dist/node_modules/zod/v4/core/util.cjs +0 -444
  324. package/dist/node_modules/zod/v4/core/util.cjs.map +0 -1
  325. package/dist/node_modules/zod/v4/core/util.js +0 -444
  326. package/dist/node_modules/zod/v4/core/util.js.map +0 -1
  327. package/dist/node_modules/zod/v4/core/versions.cjs +0 -9
  328. package/dist/node_modules/zod/v4/core/versions.cjs.map +0 -1
  329. package/dist/node_modules/zod/v4/core/versions.js +0 -9
  330. package/dist/node_modules/zod/v4/core/versions.js.map +0 -1
  331. package/dist/packages/agent-runtime/src/thread-handoff.cjs +0 -85
  332. package/dist/packages/agent-runtime/src/thread-handoff.cjs.map +0 -1
  333. package/dist/packages/agent-runtime/src/thread-handoff.js +0 -85
  334. package/dist/packages/agent-runtime/src/thread-handoff.js.map +0 -1
@@ -1,871 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsonSchemaProcessors = require("../core/json-schema-processors.cjs");
4
- const toJsonSchema = require("../core/to-json-schema.cjs");
5
- const iso = require("./iso.cjs");
6
- const parse = require("./parse.cjs");
7
- const util = require("../core/util.cjs");
8
- const api = require("../core/api.cjs");
9
- const core = require("../core/core.cjs");
10
- const schemas = require("../core/schemas.cjs");
11
- const registries = require("../core/registries.cjs");
12
- const _installedGroups = /* @__PURE__ */ new WeakMap();
13
- function _installLazyMethods(inst, group, methods) {
14
- const proto = Object.getPrototypeOf(inst);
15
- let installed = _installedGroups.get(proto);
16
- if (!installed) {
17
- installed = /* @__PURE__ */ new Set();
18
- _installedGroups.set(proto, installed);
19
- }
20
- if (installed.has(group))
21
- return;
22
- installed.add(group);
23
- for (const key in methods) {
24
- const fn = methods[key];
25
- Object.defineProperty(proto, key, {
26
- configurable: true,
27
- enumerable: false,
28
- get() {
29
- const bound = fn.bind(this);
30
- Object.defineProperty(this, key, {
31
- configurable: true,
32
- writable: true,
33
- enumerable: true,
34
- value: bound
35
- });
36
- return bound;
37
- },
38
- set(v) {
39
- Object.defineProperty(this, key, {
40
- configurable: true,
41
- writable: true,
42
- enumerable: true,
43
- value: v
44
- });
45
- }
46
- });
47
- }
48
- }
49
- const ZodType = /* @__PURE__ */ core.$constructor("ZodType", (inst, def) => {
50
- schemas.$ZodType.init(inst, def);
51
- Object.assign(inst["~standard"], {
52
- jsonSchema: {
53
- input: toJsonSchema.createStandardJSONSchemaMethod(inst, "input"),
54
- output: toJsonSchema.createStandardJSONSchemaMethod(inst, "output")
55
- }
56
- });
57
- inst.toJSONSchema = toJsonSchema.createToJSONSchemaMethod(inst, {});
58
- inst.def = def;
59
- inst.type = def.type;
60
- Object.defineProperty(inst, "_def", { value: def });
61
- inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
62
- inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
63
- inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
64
- inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
65
- inst.spa = inst.safeParseAsync;
66
- inst.encode = (data, params) => parse.encode(inst, data, params);
67
- inst.decode = (data, params) => parse.decode(inst, data, params);
68
- inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);
69
- inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);
70
- inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);
71
- inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);
72
- inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);
73
- inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);
74
- _installLazyMethods(inst, "ZodType", {
75
- check(...chks) {
76
- const def2 = this.def;
77
- return this.clone(util.mergeDefs(def2, {
78
- checks: [
79
- ...def2.checks ?? [],
80
- ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
81
- ]
82
- }), { parent: true });
83
- },
84
- with(...chks) {
85
- return this.check(...chks);
86
- },
87
- clone(def2, params) {
88
- return util.clone(this, def2, params);
89
- },
90
- brand() {
91
- return this;
92
- },
93
- register(reg, meta) {
94
- reg.add(this, meta);
95
- return this;
96
- },
97
- refine(check, params) {
98
- return this.check(refine(check, params));
99
- },
100
- superRefine(refinement, params) {
101
- return this.check(superRefine(refinement, params));
102
- },
103
- overwrite(fn) {
104
- return this.check(api._overwrite(fn));
105
- },
106
- optional() {
107
- return optional(this);
108
- },
109
- exactOptional() {
110
- return exactOptional(this);
111
- },
112
- nullable() {
113
- return nullable(this);
114
- },
115
- nullish() {
116
- return optional(nullable(this));
117
- },
118
- nonoptional(params) {
119
- return nonoptional(this, params);
120
- },
121
- array() {
122
- return array(this);
123
- },
124
- or(arg) {
125
- return union([this, arg]);
126
- },
127
- and(arg) {
128
- return intersection(this, arg);
129
- },
130
- transform(tx) {
131
- return pipe(this, transform(tx));
132
- },
133
- default(d) {
134
- return _default(this, d);
135
- },
136
- prefault(d) {
137
- return prefault(this, d);
138
- },
139
- catch(params) {
140
- return _catch(this, params);
141
- },
142
- pipe(target) {
143
- return pipe(this, target);
144
- },
145
- readonly() {
146
- return readonly(this);
147
- },
148
- describe(description) {
149
- const cl = this.clone();
150
- registries.globalRegistry.add(cl, { description });
151
- return cl;
152
- },
153
- meta(...args) {
154
- if (args.length === 0)
155
- return registries.globalRegistry.get(this);
156
- const cl = this.clone();
157
- registries.globalRegistry.add(cl, args[0]);
158
- return cl;
159
- },
160
- isOptional() {
161
- return this.safeParse(void 0).success;
162
- },
163
- isNullable() {
164
- return this.safeParse(null).success;
165
- },
166
- apply(fn) {
167
- return fn(this);
168
- }
169
- });
170
- Object.defineProperty(inst, "description", {
171
- get() {
172
- var _a;
173
- return (_a = registries.globalRegistry.get(inst)) == null ? void 0 : _a.description;
174
- },
175
- configurable: true
176
- });
177
- return inst;
178
- });
179
- const _ZodString = /* @__PURE__ */ core.$constructor("_ZodString", (inst, def) => {
180
- schemas.$ZodString.init(inst, def);
181
- ZodType.init(inst, def);
182
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.stringProcessor(inst, ctx, json);
183
- const bag = inst._zod.bag;
184
- inst.format = bag.format ?? null;
185
- inst.minLength = bag.minimum ?? null;
186
- inst.maxLength = bag.maximum ?? null;
187
- _installLazyMethods(inst, "_ZodString", {
188
- regex(...args) {
189
- return this.check(api._regex(...args));
190
- },
191
- includes(...args) {
192
- return this.check(api._includes(...args));
193
- },
194
- startsWith(...args) {
195
- return this.check(api._startsWith(...args));
196
- },
197
- endsWith(...args) {
198
- return this.check(api._endsWith(...args));
199
- },
200
- min(...args) {
201
- return this.check(api._minLength(...args));
202
- },
203
- max(...args) {
204
- return this.check(api._maxLength(...args));
205
- },
206
- length(...args) {
207
- return this.check(api._length(...args));
208
- },
209
- nonempty(...args) {
210
- return this.check(api._minLength(1, ...args));
211
- },
212
- lowercase(params) {
213
- return this.check(api._lowercase(params));
214
- },
215
- uppercase(params) {
216
- return this.check(api._uppercase(params));
217
- },
218
- trim() {
219
- return this.check(api._trim());
220
- },
221
- normalize(...args) {
222
- return this.check(api._normalize(...args));
223
- },
224
- toLowerCase() {
225
- return this.check(api._toLowerCase());
226
- },
227
- toUpperCase() {
228
- return this.check(api._toUpperCase());
229
- },
230
- slugify() {
231
- return this.check(api._slugify());
232
- }
233
- });
234
- });
235
- const ZodString = /* @__PURE__ */ core.$constructor("ZodString", (inst, def) => {
236
- schemas.$ZodString.init(inst, def);
237
- _ZodString.init(inst, def);
238
- inst.email = (params) => inst.check(api._email(ZodEmail, params));
239
- inst.url = (params) => inst.check(api._url(ZodURL, params));
240
- inst.jwt = (params) => inst.check(api._jwt(ZodJWT, params));
241
- inst.emoji = (params) => inst.check(api._emoji(ZodEmoji, params));
242
- inst.guid = (params) => inst.check(api._guid(ZodGUID, params));
243
- inst.uuid = (params) => inst.check(api._uuid(ZodUUID, params));
244
- inst.uuidv4 = (params) => inst.check(api._uuidv4(ZodUUID, params));
245
- inst.uuidv6 = (params) => inst.check(api._uuidv6(ZodUUID, params));
246
- inst.uuidv7 = (params) => inst.check(api._uuidv7(ZodUUID, params));
247
- inst.nanoid = (params) => inst.check(api._nanoid(ZodNanoID, params));
248
- inst.guid = (params) => inst.check(api._guid(ZodGUID, params));
249
- inst.cuid = (params) => inst.check(api._cuid(ZodCUID, params));
250
- inst.cuid2 = (params) => inst.check(api._cuid2(ZodCUID2, params));
251
- inst.ulid = (params) => inst.check(api._ulid(ZodULID, params));
252
- inst.base64 = (params) => inst.check(api._base64(ZodBase64, params));
253
- inst.base64url = (params) => inst.check(api._base64url(ZodBase64URL, params));
254
- inst.xid = (params) => inst.check(api._xid(ZodXID, params));
255
- inst.ksuid = (params) => inst.check(api._ksuid(ZodKSUID, params));
256
- inst.ipv4 = (params) => inst.check(api._ipv4(ZodIPv4, params));
257
- inst.ipv6 = (params) => inst.check(api._ipv6(ZodIPv6, params));
258
- inst.cidrv4 = (params) => inst.check(api._cidrv4(ZodCIDRv4, params));
259
- inst.cidrv6 = (params) => inst.check(api._cidrv6(ZodCIDRv6, params));
260
- inst.e164 = (params) => inst.check(api._e164(ZodE164, params));
261
- inst.datetime = (params) => inst.check(iso.datetime(params));
262
- inst.date = (params) => inst.check(iso.date(params));
263
- inst.time = (params) => inst.check(iso.time(params));
264
- inst.duration = (params) => inst.check(iso.duration(params));
265
- });
266
- function string(params) {
267
- return api._string(ZodString, params);
268
- }
269
- const ZodStringFormat = /* @__PURE__ */ core.$constructor("ZodStringFormat", (inst, def) => {
270
- schemas.$ZodStringFormat.init(inst, def);
271
- _ZodString.init(inst, def);
272
- });
273
- const ZodEmail = /* @__PURE__ */ core.$constructor("ZodEmail", (inst, def) => {
274
- schemas.$ZodEmail.init(inst, def);
275
- ZodStringFormat.init(inst, def);
276
- });
277
- const ZodGUID = /* @__PURE__ */ core.$constructor("ZodGUID", (inst, def) => {
278
- schemas.$ZodGUID.init(inst, def);
279
- ZodStringFormat.init(inst, def);
280
- });
281
- const ZodUUID = /* @__PURE__ */ core.$constructor("ZodUUID", (inst, def) => {
282
- schemas.$ZodUUID.init(inst, def);
283
- ZodStringFormat.init(inst, def);
284
- });
285
- const ZodURL = /* @__PURE__ */ core.$constructor("ZodURL", (inst, def) => {
286
- schemas.$ZodURL.init(inst, def);
287
- ZodStringFormat.init(inst, def);
288
- });
289
- const ZodEmoji = /* @__PURE__ */ core.$constructor("ZodEmoji", (inst, def) => {
290
- schemas.$ZodEmoji.init(inst, def);
291
- ZodStringFormat.init(inst, def);
292
- });
293
- const ZodNanoID = /* @__PURE__ */ core.$constructor("ZodNanoID", (inst, def) => {
294
- schemas.$ZodNanoID.init(inst, def);
295
- ZodStringFormat.init(inst, def);
296
- });
297
- const ZodCUID = /* @__PURE__ */ core.$constructor("ZodCUID", (inst, def) => {
298
- schemas.$ZodCUID.init(inst, def);
299
- ZodStringFormat.init(inst, def);
300
- });
301
- const ZodCUID2 = /* @__PURE__ */ core.$constructor("ZodCUID2", (inst, def) => {
302
- schemas.$ZodCUID2.init(inst, def);
303
- ZodStringFormat.init(inst, def);
304
- });
305
- const ZodULID = /* @__PURE__ */ core.$constructor("ZodULID", (inst, def) => {
306
- schemas.$ZodULID.init(inst, def);
307
- ZodStringFormat.init(inst, def);
308
- });
309
- const ZodXID = /* @__PURE__ */ core.$constructor("ZodXID", (inst, def) => {
310
- schemas.$ZodXID.init(inst, def);
311
- ZodStringFormat.init(inst, def);
312
- });
313
- const ZodKSUID = /* @__PURE__ */ core.$constructor("ZodKSUID", (inst, def) => {
314
- schemas.$ZodKSUID.init(inst, def);
315
- ZodStringFormat.init(inst, def);
316
- });
317
- const ZodIPv4 = /* @__PURE__ */ core.$constructor("ZodIPv4", (inst, def) => {
318
- schemas.$ZodIPv4.init(inst, def);
319
- ZodStringFormat.init(inst, def);
320
- });
321
- const ZodIPv6 = /* @__PURE__ */ core.$constructor("ZodIPv6", (inst, def) => {
322
- schemas.$ZodIPv6.init(inst, def);
323
- ZodStringFormat.init(inst, def);
324
- });
325
- const ZodCIDRv4 = /* @__PURE__ */ core.$constructor("ZodCIDRv4", (inst, def) => {
326
- schemas.$ZodCIDRv4.init(inst, def);
327
- ZodStringFormat.init(inst, def);
328
- });
329
- const ZodCIDRv6 = /* @__PURE__ */ core.$constructor("ZodCIDRv6", (inst, def) => {
330
- schemas.$ZodCIDRv6.init(inst, def);
331
- ZodStringFormat.init(inst, def);
332
- });
333
- const ZodBase64 = /* @__PURE__ */ core.$constructor("ZodBase64", (inst, def) => {
334
- schemas.$ZodBase64.init(inst, def);
335
- ZodStringFormat.init(inst, def);
336
- });
337
- const ZodBase64URL = /* @__PURE__ */ core.$constructor("ZodBase64URL", (inst, def) => {
338
- schemas.$ZodBase64URL.init(inst, def);
339
- ZodStringFormat.init(inst, def);
340
- });
341
- const ZodE164 = /* @__PURE__ */ core.$constructor("ZodE164", (inst, def) => {
342
- schemas.$ZodE164.init(inst, def);
343
- ZodStringFormat.init(inst, def);
344
- });
345
- const ZodJWT = /* @__PURE__ */ core.$constructor("ZodJWT", (inst, def) => {
346
- schemas.$ZodJWT.init(inst, def);
347
- ZodStringFormat.init(inst, def);
348
- });
349
- const ZodNumber = /* @__PURE__ */ core.$constructor("ZodNumber", (inst, def) => {
350
- schemas.$ZodNumber.init(inst, def);
351
- ZodType.init(inst, def);
352
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.numberProcessor(inst, ctx, json);
353
- _installLazyMethods(inst, "ZodNumber", {
354
- gt(value, params) {
355
- return this.check(api._gt(value, params));
356
- },
357
- gte(value, params) {
358
- return this.check(api._gte(value, params));
359
- },
360
- min(value, params) {
361
- return this.check(api._gte(value, params));
362
- },
363
- lt(value, params) {
364
- return this.check(api._lt(value, params));
365
- },
366
- lte(value, params) {
367
- return this.check(api._lte(value, params));
368
- },
369
- max(value, params) {
370
- return this.check(api._lte(value, params));
371
- },
372
- int(params) {
373
- return this.check(int(params));
374
- },
375
- safe(params) {
376
- return this.check(int(params));
377
- },
378
- positive(params) {
379
- return this.check(api._gt(0, params));
380
- },
381
- nonnegative(params) {
382
- return this.check(api._gte(0, params));
383
- },
384
- negative(params) {
385
- return this.check(api._lt(0, params));
386
- },
387
- nonpositive(params) {
388
- return this.check(api._lte(0, params));
389
- },
390
- multipleOf(value, params) {
391
- return this.check(api._multipleOf(value, params));
392
- },
393
- step(value, params) {
394
- return this.check(api._multipleOf(value, params));
395
- },
396
- finite() {
397
- return this;
398
- }
399
- });
400
- const bag = inst._zod.bag;
401
- inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
402
- inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
403
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
404
- inst.isFinite = true;
405
- inst.format = bag.format ?? null;
406
- });
407
- function number(params) {
408
- return api._number(ZodNumber, params);
409
- }
410
- const ZodNumberFormat = /* @__PURE__ */ core.$constructor("ZodNumberFormat", (inst, def) => {
411
- schemas.$ZodNumberFormat.init(inst, def);
412
- ZodNumber.init(inst, def);
413
- });
414
- function int(params) {
415
- return api._int(ZodNumberFormat, params);
416
- }
417
- const ZodBoolean = /* @__PURE__ */ core.$constructor("ZodBoolean", (inst, def) => {
418
- schemas.$ZodBoolean.init(inst, def);
419
- ZodType.init(inst, def);
420
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.booleanProcessor(inst, ctx, json);
421
- });
422
- function boolean(params) {
423
- return api._boolean(ZodBoolean, params);
424
- }
425
- const ZodUnknown = /* @__PURE__ */ core.$constructor("ZodUnknown", (inst, def) => {
426
- schemas.$ZodUnknown.init(inst, def);
427
- ZodType.init(inst, def);
428
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.unknownProcessor();
429
- });
430
- function unknown() {
431
- return api._unknown(ZodUnknown);
432
- }
433
- const ZodNever = /* @__PURE__ */ core.$constructor("ZodNever", (inst, def) => {
434
- schemas.$ZodNever.init(inst, def);
435
- ZodType.init(inst, def);
436
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.neverProcessor(inst, ctx, json);
437
- });
438
- function never(params) {
439
- return api._never(ZodNever, params);
440
- }
441
- const ZodArray = /* @__PURE__ */ core.$constructor("ZodArray", (inst, def) => {
442
- schemas.$ZodArray.init(inst, def);
443
- ZodType.init(inst, def);
444
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.arrayProcessor(inst, ctx, json, params);
445
- inst.element = def.element;
446
- _installLazyMethods(inst, "ZodArray", {
447
- min(n, params) {
448
- return this.check(api._minLength(n, params));
449
- },
450
- nonempty(params) {
451
- return this.check(api._minLength(1, params));
452
- },
453
- max(n, params) {
454
- return this.check(api._maxLength(n, params));
455
- },
456
- length(n, params) {
457
- return this.check(api._length(n, params));
458
- },
459
- unwrap() {
460
- return this.element;
461
- }
462
- });
463
- });
464
- function array(element, params) {
465
- return api._array(ZodArray, element, params);
466
- }
467
- const ZodObject = /* @__PURE__ */ core.$constructor("ZodObject", (inst, def) => {
468
- schemas.$ZodObjectJIT.init(inst, def);
469
- ZodType.init(inst, def);
470
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.objectProcessor(inst, ctx, json, params);
471
- util.defineLazy(inst, "shape", () => {
472
- return def.shape;
473
- });
474
- _installLazyMethods(inst, "ZodObject", {
475
- keyof() {
476
- return _enum(Object.keys(this._zod.def.shape));
477
- },
478
- catchall(catchall) {
479
- return this.clone({ ...this._zod.def, catchall });
480
- },
481
- passthrough() {
482
- return this.clone({ ...this._zod.def, catchall: unknown() });
483
- },
484
- loose() {
485
- return this.clone({ ...this._zod.def, catchall: unknown() });
486
- },
487
- strict() {
488
- return this.clone({ ...this._zod.def, catchall: never() });
489
- },
490
- strip() {
491
- return this.clone({ ...this._zod.def, catchall: void 0 });
492
- },
493
- extend(incoming) {
494
- return util.extend(this, incoming);
495
- },
496
- safeExtend(incoming) {
497
- return util.safeExtend(this, incoming);
498
- },
499
- merge(other) {
500
- return util.merge(this, other);
501
- },
502
- pick(mask) {
503
- return util.pick(this, mask);
504
- },
505
- omit(mask) {
506
- return util.omit(this, mask);
507
- },
508
- partial(...args) {
509
- return util.partial(ZodOptional, this, args[0]);
510
- },
511
- required(...args) {
512
- return util.required(ZodNonOptional, this, args[0]);
513
- }
514
- });
515
- });
516
- function object(shape, params) {
517
- const def = {
518
- type: "object",
519
- shape: shape ?? {},
520
- ...util.normalizeParams(params)
521
- };
522
- return new ZodObject(def);
523
- }
524
- const ZodUnion = /* @__PURE__ */ core.$constructor("ZodUnion", (inst, def) => {
525
- schemas.$ZodUnion.init(inst, def);
526
- ZodType.init(inst, def);
527
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.unionProcessor(inst, ctx, json, params);
528
- inst.options = def.options;
529
- });
530
- function union(options, params) {
531
- return new ZodUnion({
532
- type: "union",
533
- options,
534
- ...util.normalizeParams(params)
535
- });
536
- }
537
- const ZodDiscriminatedUnion = /* @__PURE__ */ core.$constructor("ZodDiscriminatedUnion", (inst, def) => {
538
- ZodUnion.init(inst, def);
539
- schemas.$ZodDiscriminatedUnion.init(inst, def);
540
- });
541
- function discriminatedUnion(discriminator, options, params) {
542
- return new ZodDiscriminatedUnion({
543
- type: "union",
544
- options,
545
- discriminator,
546
- ...util.normalizeParams(params)
547
- });
548
- }
549
- const ZodIntersection = /* @__PURE__ */ core.$constructor("ZodIntersection", (inst, def) => {
550
- schemas.$ZodIntersection.init(inst, def);
551
- ZodType.init(inst, def);
552
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.intersectionProcessor(inst, ctx, json, params);
553
- });
554
- function intersection(left, right) {
555
- return new ZodIntersection({
556
- type: "intersection",
557
- left,
558
- right
559
- });
560
- }
561
- const ZodEnum = /* @__PURE__ */ core.$constructor("ZodEnum", (inst, def) => {
562
- schemas.$ZodEnum.init(inst, def);
563
- ZodType.init(inst, def);
564
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.enumProcessor(inst, ctx, json);
565
- inst.enum = def.entries;
566
- inst.options = Object.values(def.entries);
567
- const keys = new Set(Object.keys(def.entries));
568
- inst.extract = (values, params) => {
569
- const newEntries = {};
570
- for (const value of values) {
571
- if (keys.has(value)) {
572
- newEntries[value] = def.entries[value];
573
- } else
574
- throw new Error(`Key ${value} not found in enum`);
575
- }
576
- return new ZodEnum({
577
- ...def,
578
- checks: [],
579
- ...util.normalizeParams(params),
580
- entries: newEntries
581
- });
582
- };
583
- inst.exclude = (values, params) => {
584
- const newEntries = { ...def.entries };
585
- for (const value of values) {
586
- if (keys.has(value)) {
587
- delete newEntries[value];
588
- } else
589
- throw new Error(`Key ${value} not found in enum`);
590
- }
591
- return new ZodEnum({
592
- ...def,
593
- checks: [],
594
- ...util.normalizeParams(params),
595
- entries: newEntries
596
- });
597
- };
598
- });
599
- function _enum(values, params) {
600
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
601
- return new ZodEnum({
602
- type: "enum",
603
- entries,
604
- ...util.normalizeParams(params)
605
- });
606
- }
607
- const ZodLiteral = /* @__PURE__ */ core.$constructor("ZodLiteral", (inst, def) => {
608
- schemas.$ZodLiteral.init(inst, def);
609
- ZodType.init(inst, def);
610
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.literalProcessor(inst, ctx, json);
611
- inst.values = new Set(def.values);
612
- Object.defineProperty(inst, "value", {
613
- get() {
614
- if (def.values.length > 1) {
615
- throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
616
- }
617
- return def.values[0];
618
- }
619
- });
620
- });
621
- function literal(value, params) {
622
- return new ZodLiteral({
623
- type: "literal",
624
- values: Array.isArray(value) ? value : [value],
625
- ...util.normalizeParams(params)
626
- });
627
- }
628
- const ZodTransform = /* @__PURE__ */ core.$constructor("ZodTransform", (inst, def) => {
629
- schemas.$ZodTransform.init(inst, def);
630
- ZodType.init(inst, def);
631
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.transformProcessor(inst, ctx);
632
- inst._zod.parse = (payload, _ctx) => {
633
- if (_ctx.direction === "backward") {
634
- throw new core.$ZodEncodeError(inst.constructor.name);
635
- }
636
- payload.addIssue = (issue) => {
637
- if (typeof issue === "string") {
638
- payload.issues.push(util.issue(issue, payload.value, def));
639
- } else {
640
- const _issue = issue;
641
- if (_issue.fatal)
642
- _issue.continue = false;
643
- _issue.code ?? (_issue.code = "custom");
644
- _issue.input ?? (_issue.input = payload.value);
645
- _issue.inst ?? (_issue.inst = inst);
646
- payload.issues.push(util.issue(_issue));
647
- }
648
- };
649
- const output = def.transform(payload.value, payload);
650
- if (output instanceof Promise) {
651
- return output.then((output2) => {
652
- payload.value = output2;
653
- payload.fallback = true;
654
- return payload;
655
- });
656
- }
657
- payload.value = output;
658
- payload.fallback = true;
659
- return payload;
660
- };
661
- });
662
- function transform(fn) {
663
- return new ZodTransform({
664
- type: "transform",
665
- transform: fn
666
- });
667
- }
668
- const ZodOptional = /* @__PURE__ */ core.$constructor("ZodOptional", (inst, def) => {
669
- schemas.$ZodOptional.init(inst, def);
670
- ZodType.init(inst, def);
671
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.optionalProcessor(inst, ctx, json, params);
672
- inst.unwrap = () => inst._zod.def.innerType;
673
- });
674
- function optional(innerType) {
675
- return new ZodOptional({
676
- type: "optional",
677
- innerType
678
- });
679
- }
680
- const ZodExactOptional = /* @__PURE__ */ core.$constructor("ZodExactOptional", (inst, def) => {
681
- schemas.$ZodExactOptional.init(inst, def);
682
- ZodType.init(inst, def);
683
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.optionalProcessor(inst, ctx, json, params);
684
- inst.unwrap = () => inst._zod.def.innerType;
685
- });
686
- function exactOptional(innerType) {
687
- return new ZodExactOptional({
688
- type: "optional",
689
- innerType
690
- });
691
- }
692
- const ZodNullable = /* @__PURE__ */ core.$constructor("ZodNullable", (inst, def) => {
693
- schemas.$ZodNullable.init(inst, def);
694
- ZodType.init(inst, def);
695
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.nullableProcessor(inst, ctx, json, params);
696
- inst.unwrap = () => inst._zod.def.innerType;
697
- });
698
- function nullable(innerType) {
699
- return new ZodNullable({
700
- type: "nullable",
701
- innerType
702
- });
703
- }
704
- const ZodDefault = /* @__PURE__ */ core.$constructor("ZodDefault", (inst, def) => {
705
- schemas.$ZodDefault.init(inst, def);
706
- ZodType.init(inst, def);
707
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.defaultProcessor(inst, ctx, json, params);
708
- inst.unwrap = () => inst._zod.def.innerType;
709
- inst.removeDefault = inst.unwrap;
710
- });
711
- function _default(innerType, defaultValue) {
712
- return new ZodDefault({
713
- type: "default",
714
- innerType,
715
- get defaultValue() {
716
- return typeof defaultValue === "function" ? defaultValue() : util.shallowClone(defaultValue);
717
- }
718
- });
719
- }
720
- const ZodPrefault = /* @__PURE__ */ core.$constructor("ZodPrefault", (inst, def) => {
721
- schemas.$ZodPrefault.init(inst, def);
722
- ZodType.init(inst, def);
723
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.prefaultProcessor(inst, ctx, json, params);
724
- inst.unwrap = () => inst._zod.def.innerType;
725
- });
726
- function prefault(innerType, defaultValue) {
727
- return new ZodPrefault({
728
- type: "prefault",
729
- innerType,
730
- get defaultValue() {
731
- return typeof defaultValue === "function" ? defaultValue() : util.shallowClone(defaultValue);
732
- }
733
- });
734
- }
735
- const ZodNonOptional = /* @__PURE__ */ core.$constructor("ZodNonOptional", (inst, def) => {
736
- schemas.$ZodNonOptional.init(inst, def);
737
- ZodType.init(inst, def);
738
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.nonoptionalProcessor(inst, ctx, json, params);
739
- inst.unwrap = () => inst._zod.def.innerType;
740
- });
741
- function nonoptional(innerType, params) {
742
- return new ZodNonOptional({
743
- type: "nonoptional",
744
- innerType,
745
- ...util.normalizeParams(params)
746
- });
747
- }
748
- const ZodCatch = /* @__PURE__ */ core.$constructor("ZodCatch", (inst, def) => {
749
- schemas.$ZodCatch.init(inst, def);
750
- ZodType.init(inst, def);
751
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.catchProcessor(inst, ctx, json, params);
752
- inst.unwrap = () => inst._zod.def.innerType;
753
- inst.removeCatch = inst.unwrap;
754
- });
755
- function _catch(innerType, catchValue) {
756
- return new ZodCatch({
757
- type: "catch",
758
- innerType,
759
- catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
760
- });
761
- }
762
- const ZodPipe = /* @__PURE__ */ core.$constructor("ZodPipe", (inst, def) => {
763
- schemas.$ZodPipe.init(inst, def);
764
- ZodType.init(inst, def);
765
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.pipeProcessor(inst, ctx, json, params);
766
- inst.in = def.in;
767
- inst.out = def.out;
768
- });
769
- function pipe(in_, out) {
770
- return new ZodPipe({
771
- type: "pipe",
772
- in: in_,
773
- out
774
- // ...util.normalizeParams(params),
775
- });
776
- }
777
- const ZodReadonly = /* @__PURE__ */ core.$constructor("ZodReadonly", (inst, def) => {
778
- schemas.$ZodReadonly.init(inst, def);
779
- ZodType.init(inst, def);
780
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.readonlyProcessor(inst, ctx, json, params);
781
- inst.unwrap = () => inst._zod.def.innerType;
782
- });
783
- function readonly(innerType) {
784
- return new ZodReadonly({
785
- type: "readonly",
786
- innerType
787
- });
788
- }
789
- const ZodCustom = /* @__PURE__ */ core.$constructor("ZodCustom", (inst, def) => {
790
- schemas.$ZodCustom.init(inst, def);
791
- ZodType.init(inst, def);
792
- inst._zod.processJSONSchema = (ctx, json, params) => jsonSchemaProcessors.customProcessor(inst, ctx);
793
- });
794
- function refine(fn, _params = {}) {
795
- return api._refine(ZodCustom, fn, _params);
796
- }
797
- function superRefine(fn, params) {
798
- return api._superRefine(fn, params);
799
- }
800
- exports.ZodArray = ZodArray;
801
- exports.ZodBase64 = ZodBase64;
802
- exports.ZodBase64URL = ZodBase64URL;
803
- exports.ZodBoolean = ZodBoolean;
804
- exports.ZodCIDRv4 = ZodCIDRv4;
805
- exports.ZodCIDRv6 = ZodCIDRv6;
806
- exports.ZodCUID = ZodCUID;
807
- exports.ZodCUID2 = ZodCUID2;
808
- exports.ZodCatch = ZodCatch;
809
- exports.ZodCustom = ZodCustom;
810
- exports.ZodDefault = ZodDefault;
811
- exports.ZodDiscriminatedUnion = ZodDiscriminatedUnion;
812
- exports.ZodE164 = ZodE164;
813
- exports.ZodEmail = ZodEmail;
814
- exports.ZodEmoji = ZodEmoji;
815
- exports.ZodEnum = ZodEnum;
816
- exports.ZodExactOptional = ZodExactOptional;
817
- exports.ZodGUID = ZodGUID;
818
- exports.ZodIPv4 = ZodIPv4;
819
- exports.ZodIPv6 = ZodIPv6;
820
- exports.ZodIntersection = ZodIntersection;
821
- exports.ZodJWT = ZodJWT;
822
- exports.ZodKSUID = ZodKSUID;
823
- exports.ZodLiteral = ZodLiteral;
824
- exports.ZodNanoID = ZodNanoID;
825
- exports.ZodNever = ZodNever;
826
- exports.ZodNonOptional = ZodNonOptional;
827
- exports.ZodNullable = ZodNullable;
828
- exports.ZodNumber = ZodNumber;
829
- exports.ZodNumberFormat = ZodNumberFormat;
830
- exports.ZodObject = ZodObject;
831
- exports.ZodOptional = ZodOptional;
832
- exports.ZodPipe = ZodPipe;
833
- exports.ZodPrefault = ZodPrefault;
834
- exports.ZodReadonly = ZodReadonly;
835
- exports.ZodString = ZodString;
836
- exports.ZodStringFormat = ZodStringFormat;
837
- exports.ZodTransform = ZodTransform;
838
- exports.ZodType = ZodType;
839
- exports.ZodULID = ZodULID;
840
- exports.ZodURL = ZodURL;
841
- exports.ZodUUID = ZodUUID;
842
- exports.ZodUnion = ZodUnion;
843
- exports.ZodUnknown = ZodUnknown;
844
- exports.ZodXID = ZodXID;
845
- exports._ZodString = _ZodString;
846
- exports._default = _default;
847
- exports.array = array;
848
- exports.boolean = boolean;
849
- exports.catch = _catch;
850
- exports.discriminatedUnion = discriminatedUnion;
851
- exports.enum = _enum;
852
- exports.exactOptional = exactOptional;
853
- exports.int = int;
854
- exports.intersection = intersection;
855
- exports.literal = literal;
856
- exports.never = never;
857
- exports.nonoptional = nonoptional;
858
- exports.nullable = nullable;
859
- exports.number = number;
860
- exports.object = object;
861
- exports.optional = optional;
862
- exports.pipe = pipe;
863
- exports.prefault = prefault;
864
- exports.readonly = readonly;
865
- exports.refine = refine;
866
- exports.string = string;
867
- exports.superRefine = superRefine;
868
- exports.transform = transform;
869
- exports.union = union;
870
- exports.unknown = unknown;
871
- //# sourceMappingURL=schemas.cjs.map