@athenaintel/react 0.23.3 → 0.24.1

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