@warlock.js/ai 4.1.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 (490) hide show
  1. package/README.md +72 -0
  2. package/cjs/index.cjs +8625 -0
  3. package/cjs/index.cjs.map +1 -0
  4. package/esm/agent/agent-config.type.d.mts +160 -0
  5. package/esm/agent/agent-config.type.d.mts.map +1 -0
  6. package/esm/agent/agent-input-builder.mjs +111 -0
  7. package/esm/agent/agent-input-builder.mjs.map +1 -0
  8. package/esm/agent/agent-log-event.mjs +101 -0
  9. package/esm/agent/agent-log-event.mjs.map +1 -0
  10. package/esm/agent/agent-stream.d.mts +47 -0
  11. package/esm/agent/agent-stream.d.mts.map +1 -0
  12. package/esm/agent/agent-stream.mjs +82 -0
  13. package/esm/agent/agent-stream.mjs.map +1 -0
  14. package/esm/agent/agent-to-stream-event.mjs +86 -0
  15. package/esm/agent/agent-to-stream-event.mjs.map +1 -0
  16. package/esm/agent/agent.d.mts +38 -0
  17. package/esm/agent/agent.d.mts.map +1 -0
  18. package/esm/agent/agent.mjs +974 -0
  19. package/esm/agent/agent.mjs.map +1 -0
  20. package/esm/agent/index.d.mts +3 -0
  21. package/esm/agent/index.mjs +4 -0
  22. package/esm/agent/json-stream-guard.mjs +400 -0
  23. package/esm/agent/json-stream-guard.mjs.map +1 -0
  24. package/esm/ai.d.mts +64 -0
  25. package/esm/ai.d.mts.map +1 -0
  26. package/esm/ai.mjs +65 -0
  27. package/esm/ai.mjs.map +1 -0
  28. package/esm/config.d.mts +79 -0
  29. package/esm/config.d.mts.map +1 -0
  30. package/esm/config.mjs +43 -0
  31. package/esm/config.mjs.map +1 -0
  32. package/esm/contracts/agent/agent-options.type.d.mts +132 -0
  33. package/esm/contracts/agent/agent-options.type.d.mts.map +1 -0
  34. package/esm/contracts/agent/agent.contract.d.mts +92 -0
  35. package/esm/contracts/agent/agent.contract.d.mts.map +1 -0
  36. package/esm/contracts/agent/index.d.mts +2 -0
  37. package/esm/contracts/attachment.type.d.mts +100 -0
  38. package/esm/contracts/attachment.type.d.mts.map +1 -0
  39. package/esm/contracts/content-part.type.d.mts +55 -0
  40. package/esm/contracts/content-part.type.d.mts.map +1 -0
  41. package/esm/contracts/conversation-message.type.d.mts +51 -0
  42. package/esm/contracts/conversation-message.type.d.mts.map +1 -0
  43. package/esm/contracts/embedder.contract.d.mts +69 -0
  44. package/esm/contracts/embedder.contract.d.mts.map +1 -0
  45. package/esm/contracts/end.type.d.mts +53 -0
  46. package/esm/contracts/end.type.d.mts.map +1 -0
  47. package/esm/contracts/end.type.mjs +47 -0
  48. package/esm/contracts/end.type.mjs.map +1 -0
  49. package/esm/contracts/events/agent-events.type.d.mts +71 -0
  50. package/esm/contracts/events/agent-events.type.d.mts.map +1 -0
  51. package/esm/contracts/events/complete-event.type.d.mts +33 -0
  52. package/esm/contracts/events/complete-event.type.d.mts.map +1 -0
  53. package/esm/contracts/events/event-identity.type.d.mts +30 -0
  54. package/esm/contracts/events/event-identity.type.d.mts.map +1 -0
  55. package/esm/contracts/events/event-map.type.d.mts +80 -0
  56. package/esm/contracts/events/event-map.type.d.mts.map +1 -0
  57. package/esm/contracts/events/index.d.mts +7 -0
  58. package/esm/contracts/events/supervisor-events.type.d.mts +162 -0
  59. package/esm/contracts/events/supervisor-events.type.d.mts.map +1 -0
  60. package/esm/contracts/events/usage-event.type.d.mts +39 -0
  61. package/esm/contracts/events/usage-event.type.d.mts.map +1 -0
  62. package/esm/contracts/events/workflow-events.type.d.mts +51 -0
  63. package/esm/contracts/events/workflow-events.type.d.mts.map +1 -0
  64. package/esm/contracts/executable.contract.d.mts +25 -0
  65. package/esm/contracts/executable.contract.d.mts.map +1 -0
  66. package/esm/contracts/finish-reason.type.d.mts +17 -0
  67. package/esm/contracts/finish-reason.type.d.mts.map +1 -0
  68. package/esm/contracts/index.d.mts +63 -0
  69. package/esm/contracts/middleware/index.d.mts +3 -0
  70. package/esm/contracts/middleware/middleware-context.type.d.mts +99 -0
  71. package/esm/contracts/middleware/middleware-context.type.d.mts.map +1 -0
  72. package/esm/contracts/middleware/middleware-state.type.d.mts +34 -0
  73. package/esm/contracts/middleware/middleware-state.type.d.mts.map +1 -0
  74. package/esm/contracts/middleware/middleware.contract.d.mts +140 -0
  75. package/esm/contracts/middleware/middleware.contract.d.mts.map +1 -0
  76. package/esm/contracts/model-tool-call-request.type.d.mts +58 -0
  77. package/esm/contracts/model-tool-call-request.type.d.mts.map +1 -0
  78. package/esm/contracts/model.contract.d.mts +164 -0
  79. package/esm/contracts/model.contract.d.mts.map +1 -0
  80. package/esm/contracts/placeholders.type.d.mts +23 -0
  81. package/esm/contracts/placeholders.type.d.mts.map +1 -0
  82. package/esm/contracts/result/agent-result.type.d.mts +33 -0
  83. package/esm/contracts/result/agent-result.type.d.mts.map +1 -0
  84. package/esm/contracts/result/attempt-entry.type.d.mts +40 -0
  85. package/esm/contracts/result/attempt-entry.type.d.mts.map +1 -0
  86. package/esm/contracts/result/base-report.type.d.mts +137 -0
  87. package/esm/contracts/result/base-report.type.d.mts.map +1 -0
  88. package/esm/contracts/result/base-report.type.mjs +17 -0
  89. package/esm/contracts/result/base-report.type.mjs.map +1 -0
  90. package/esm/contracts/result/base-result.type.d.mts +26 -0
  91. package/esm/contracts/result/base-result.type.d.mts.map +1 -0
  92. package/esm/contracts/result/execute-result.type.d.mts +40 -0
  93. package/esm/contracts/result/execute-result.type.d.mts.map +1 -0
  94. package/esm/contracts/result/execution-report.type.d.mts +50 -0
  95. package/esm/contracts/result/execution-report.type.d.mts.map +1 -0
  96. package/esm/contracts/result/index.d.mts +14 -0
  97. package/esm/contracts/result/llm-trip.type.d.mts +36 -0
  98. package/esm/contracts/result/llm-trip.type.d.mts.map +1 -0
  99. package/esm/contracts/result/model-pricing.type.d.mts +51 -0
  100. package/esm/contracts/result/model-pricing.type.d.mts.map +1 -0
  101. package/esm/contracts/result/session-send-result.type.d.mts +29 -0
  102. package/esm/contracts/result/session-send-result.type.d.mts.map +1 -0
  103. package/esm/contracts/result/step-result.type.d.mts +43 -0
  104. package/esm/contracts/result/step-result.type.d.mts.map +1 -0
  105. package/esm/contracts/result/supervisor-result.type.d.mts +86 -0
  106. package/esm/contracts/result/supervisor-result.type.d.mts.map +1 -0
  107. package/esm/contracts/result/tool-call.type.d.mts +44 -0
  108. package/esm/contracts/result/tool-call.type.d.mts.map +1 -0
  109. package/esm/contracts/result/usage.type.d.mts +57 -0
  110. package/esm/contracts/result/usage.type.d.mts.map +1 -0
  111. package/esm/contracts/result/workflow-result.type.d.mts +45 -0
  112. package/esm/contracts/result/workflow-result.type.d.mts.map +1 -0
  113. package/esm/contracts/sdk-adapter.contract.d.mts +77 -0
  114. package/esm/contracts/sdk-adapter.contract.d.mts.map +1 -0
  115. package/esm/contracts/stream/stream-event.type.d.mts +68 -0
  116. package/esm/contracts/stream/stream-event.type.d.mts.map +1 -0
  117. package/esm/contracts/stream/stream.contract.d.mts +61 -0
  118. package/esm/contracts/stream/stream.contract.d.mts.map +1 -0
  119. package/esm/contracts/streaming-tool-guard-config.type.d.mts +78 -0
  120. package/esm/contracts/streaming-tool-guard-config.type.d.mts.map +1 -0
  121. package/esm/contracts/supervisor/ack-entry.type.d.mts +97 -0
  122. package/esm/contracts/supervisor/ack-entry.type.d.mts.map +1 -0
  123. package/esm/contracts/supervisor/classifier-context.type.d.mts +189 -0
  124. package/esm/contracts/supervisor/classifier-context.type.d.mts.map +1 -0
  125. package/esm/contracts/supervisor/dispatch-context.type.d.mts +235 -0
  126. package/esm/contracts/supervisor/dispatch-context.type.d.mts.map +1 -0
  127. package/esm/contracts/supervisor/evaluate-context.type.d.mts +124 -0
  128. package/esm/contracts/supervisor/evaluate-context.type.d.mts.map +1 -0
  129. package/esm/contracts/supervisor/index.d.mts +16 -0
  130. package/esm/contracts/supervisor/intent-entry.type.d.mts +254 -0
  131. package/esm/contracts/supervisor/intent-entry.type.d.mts.map +1 -0
  132. package/esm/contracts/supervisor/iteration-snapshot.type.d.mts +117 -0
  133. package/esm/contracts/supervisor/iteration-snapshot.type.d.mts.map +1 -0
  134. package/esm/contracts/supervisor/next.type.d.mts +25 -0
  135. package/esm/contracts/supervisor/next.type.d.mts.map +1 -0
  136. package/esm/contracts/supervisor/route-context.type.d.mts +91 -0
  137. package/esm/contracts/supervisor/route-context.type.d.mts.map +1 -0
  138. package/esm/contracts/supervisor/router-entry.type.d.mts +67 -0
  139. package/esm/contracts/supervisor/router-entry.type.d.mts.map +1 -0
  140. package/esm/contracts/supervisor/supervisor-config.type.d.mts +356 -0
  141. package/esm/contracts/supervisor/supervisor-config.type.d.mts.map +1 -0
  142. package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts +90 -0
  143. package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts.map +1 -0
  144. package/esm/contracts/supervisor/supervisor-input.type.d.mts +24 -0
  145. package/esm/contracts/supervisor/supervisor-input.type.d.mts.map +1 -0
  146. package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts +49 -0
  147. package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts.map +1 -0
  148. package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts +16 -0
  149. package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts.map +1 -0
  150. package/esm/contracts/supervisor/supervisor.contract.d.mts +126 -0
  151. package/esm/contracts/supervisor/supervisor.contract.d.mts.map +1 -0
  152. package/esm/contracts/system-prompt.contract.d.mts +118 -0
  153. package/esm/contracts/system-prompt.contract.d.mts.map +1 -0
  154. package/esm/contracts/tool.contract.d.mts +161 -0
  155. package/esm/contracts/tool.contract.d.mts.map +1 -0
  156. package/esm/contracts/workflow/index.d.mts +6 -0
  157. package/esm/contracts/workflow/next-step-result.type.d.mts +17 -0
  158. package/esm/contracts/workflow/next-step-result.type.d.mts.map +1 -0
  159. package/esm/contracts/workflow/retry-config.type.d.mts +19 -0
  160. package/esm/contracts/workflow/retry-config.type.d.mts.map +1 -0
  161. package/esm/contracts/workflow/step.contract.d.mts +189 -0
  162. package/esm/contracts/workflow/step.contract.d.mts.map +1 -0
  163. package/esm/contracts/workflow/workflow-context.type.d.mts +45 -0
  164. package/esm/contracts/workflow/workflow-context.type.d.mts.map +1 -0
  165. package/esm/contracts/workflow/workflow-snapshot.type.d.mts +24 -0
  166. package/esm/contracts/workflow/workflow-snapshot.type.d.mts.map +1 -0
  167. package/esm/contracts/workflow/workflow.contract.d.mts +142 -0
  168. package/esm/contracts/workflow/workflow.contract.d.mts.map +1 -0
  169. package/esm/errors/agent-cancelled-error.d.mts +49 -0
  170. package/esm/errors/agent-cancelled-error.d.mts.map +1 -0
  171. package/esm/errors/agent-cancelled-error.mjs +43 -0
  172. package/esm/errors/agent-cancelled-error.mjs.map +1 -0
  173. package/esm/errors/agent-execution-error.d.mts +32 -0
  174. package/esm/errors/agent-execution-error.d.mts.map +1 -0
  175. package/esm/errors/agent-execution-error.mjs +35 -0
  176. package/esm/errors/agent-execution-error.mjs.map +1 -0
  177. package/esm/errors/agent-max-trips-error.d.mts +45 -0
  178. package/esm/errors/agent-max-trips-error.d.mts.map +1 -0
  179. package/esm/errors/agent-max-trips-error.mjs +41 -0
  180. package/esm/errors/agent-max-trips-error.mjs.map +1 -0
  181. package/esm/errors/ai-error.d.mts +94 -0
  182. package/esm/errors/ai-error.d.mts.map +1 -0
  183. package/esm/errors/ai-error.mjs +68 -0
  184. package/esm/errors/ai-error.mjs.map +1 -0
  185. package/esm/errors/budget-exceeded-error.d.mts +41 -0
  186. package/esm/errors/budget-exceeded-error.d.mts.map +1 -0
  187. package/esm/errors/budget-exceeded-error.mjs +31 -0
  188. package/esm/errors/budget-exceeded-error.mjs.map +1 -0
  189. package/esm/errors/content-filter-error.d.mts +33 -0
  190. package/esm/errors/content-filter-error.d.mts.map +1 -0
  191. package/esm/errors/content-filter-error.mjs +28 -0
  192. package/esm/errors/content-filter-error.mjs.map +1 -0
  193. package/esm/errors/context-length-exceeded-error.d.mts +38 -0
  194. package/esm/errors/context-length-exceeded-error.d.mts.map +1 -0
  195. package/esm/errors/context-length-exceeded-error.mjs +31 -0
  196. package/esm/errors/context-length-exceeded-error.mjs.map +1 -0
  197. package/esm/errors/error-category.type.d.mts +30 -0
  198. package/esm/errors/error-category.type.d.mts.map +1 -0
  199. package/esm/errors/error-code.type.d.mts +19 -0
  200. package/esm/errors/error-code.type.d.mts.map +1 -0
  201. package/esm/errors/guardrail-violation-error.d.mts +55 -0
  202. package/esm/errors/guardrail-violation-error.d.mts.map +1 -0
  203. package/esm/errors/guardrail-violation-error.mjs +41 -0
  204. package/esm/errors/guardrail-violation-error.mjs.map +1 -0
  205. package/esm/errors/index.d.mts +29 -0
  206. package/esm/errors/index.mjs +29 -0
  207. package/esm/errors/invalid-request-error.d.mts +27 -0
  208. package/esm/errors/invalid-request-error.d.mts.map +1 -0
  209. package/esm/errors/invalid-request-error.mjs +31 -0
  210. package/esm/errors/invalid-request-error.mjs.map +1 -0
  211. package/esm/errors/max-iterations-error.d.mts +31 -0
  212. package/esm/errors/max-iterations-error.d.mts.map +1 -0
  213. package/esm/errors/max-iterations-error.mjs +32 -0
  214. package/esm/errors/max-iterations-error.mjs.map +1 -0
  215. package/esm/errors/max-steps-exceeded-error.d.mts +20 -0
  216. package/esm/errors/max-steps-exceeded-error.d.mts.map +1 -0
  217. package/esm/errors/max-steps-exceeded-error.mjs +21 -0
  218. package/esm/errors/max-steps-exceeded-error.mjs.map +1 -0
  219. package/esm/errors/provider-auth-error.d.mts +22 -0
  220. package/esm/errors/provider-auth-error.d.mts.map +1 -0
  221. package/esm/errors/provider-auth-error.mjs +26 -0
  222. package/esm/errors/provider-auth-error.mjs.map +1 -0
  223. package/esm/errors/provider-error.d.mts +38 -0
  224. package/esm/errors/provider-error.d.mts.map +1 -0
  225. package/esm/errors/provider-error.mjs +42 -0
  226. package/esm/errors/provider-error.mjs.map +1 -0
  227. package/esm/errors/provider-rate-limit-error.d.mts +34 -0
  228. package/esm/errors/provider-rate-limit-error.d.mts.map +1 -0
  229. package/esm/errors/provider-rate-limit-error.mjs +31 -0
  230. package/esm/errors/provider-rate-limit-error.mjs.map +1 -0
  231. package/esm/errors/provider-timeout-error.d.mts +22 -0
  232. package/esm/errors/provider-timeout-error.d.mts.map +1 -0
  233. package/esm/errors/provider-timeout-error.mjs +26 -0
  234. package/esm/errors/provider-timeout-error.mjs.map +1 -0
  235. package/esm/errors/quota-exceeded-error.d.mts +36 -0
  236. package/esm/errors/quota-exceeded-error.d.mts.map +1 -0
  237. package/esm/errors/quota-exceeded-error.mjs +40 -0
  238. package/esm/errors/quota-exceeded-error.mjs.map +1 -0
  239. package/esm/errors/routing-error.d.mts +23 -0
  240. package/esm/errors/routing-error.d.mts.map +1 -0
  241. package/esm/errors/routing-error.mjs +23 -0
  242. package/esm/errors/routing-error.mjs.map +1 -0
  243. package/esm/errors/schema-validation-error.d.mts +40 -0
  244. package/esm/errors/schema-validation-error.d.mts.map +1 -0
  245. package/esm/errors/schema-validation-error.mjs +37 -0
  246. package/esm/errors/schema-validation-error.mjs.map +1 -0
  247. package/esm/errors/step-failed-error.d.mts +20 -0
  248. package/esm/errors/step-failed-error.d.mts.map +1 -0
  249. package/esm/errors/step-failed-error.mjs +19 -0
  250. package/esm/errors/step-failed-error.mjs.map +1 -0
  251. package/esm/errors/supervisor-cancelled-error.d.mts +29 -0
  252. package/esm/errors/supervisor-cancelled-error.d.mts.map +1 -0
  253. package/esm/errors/supervisor-cancelled-error.mjs +29 -0
  254. package/esm/errors/supervisor-cancelled-error.mjs.map +1 -0
  255. package/esm/errors/supervisor-drift-error.d.mts +31 -0
  256. package/esm/errors/supervisor-drift-error.d.mts.map +1 -0
  257. package/esm/errors/supervisor-drift-error.mjs +30 -0
  258. package/esm/errors/supervisor-drift-error.mjs.map +1 -0
  259. package/esm/errors/supervisor-failed-error.d.mts +40 -0
  260. package/esm/errors/supervisor-failed-error.d.mts.map +1 -0
  261. package/esm/errors/supervisor-failed-error.mjs +43 -0
  262. package/esm/errors/supervisor-failed-error.mjs.map +1 -0
  263. package/esm/errors/supervisor-routing-error.d.mts +44 -0
  264. package/esm/errors/supervisor-routing-error.d.mts.map +1 -0
  265. package/esm/errors/supervisor-routing-error.mjs +39 -0
  266. package/esm/errors/supervisor-routing-error.mjs.map +1 -0
  267. package/esm/errors/tool-execution-error.d.mts +35 -0
  268. package/esm/errors/tool-execution-error.d.mts.map +1 -0
  269. package/esm/errors/tool-execution-error.mjs +32 -0
  270. package/esm/errors/tool-execution-error.mjs.map +1 -0
  271. package/esm/errors/workflow-cancelled-error.d.mts +23 -0
  272. package/esm/errors/workflow-cancelled-error.d.mts.map +1 -0
  273. package/esm/errors/workflow-cancelled-error.mjs +23 -0
  274. package/esm/errors/workflow-cancelled-error.mjs.map +1 -0
  275. package/esm/errors/workflow-drift-error.d.mts +25 -0
  276. package/esm/errors/workflow-drift-error.d.mts.map +1 -0
  277. package/esm/errors/workflow-drift-error.mjs +24 -0
  278. package/esm/errors/workflow-drift-error.mjs.map +1 -0
  279. package/esm/errors/workflow-error.d.mts +15 -0
  280. package/esm/errors/workflow-error.d.mts.map +1 -0
  281. package/esm/errors/workflow-error.mjs +18 -0
  282. package/esm/errors/workflow-error.mjs.map +1 -0
  283. package/esm/index.d.mts +137 -0
  284. package/esm/index.mjs +81 -0
  285. package/esm/middleware/builtins/budget.d.mts +103 -0
  286. package/esm/middleware/builtins/budget.d.mts.map +1 -0
  287. package/esm/middleware/builtins/budget.mjs +100 -0
  288. package/esm/middleware/builtins/budget.mjs.map +1 -0
  289. package/esm/middleware/builtins/guardrail.d.mts +92 -0
  290. package/esm/middleware/builtins/guardrail.d.mts.map +1 -0
  291. package/esm/middleware/builtins/guardrail.mjs +76 -0
  292. package/esm/middleware/builtins/guardrail.mjs.map +1 -0
  293. package/esm/middleware/builtins/semantic-cache.d.mts +106 -0
  294. package/esm/middleware/builtins/semantic-cache.d.mts.map +1 -0
  295. package/esm/middleware/builtins/semantic-cache.mjs +149 -0
  296. package/esm/middleware/builtins/semantic-cache.mjs.map +1 -0
  297. package/esm/middleware/helpers/compose.d.mts +42 -0
  298. package/esm/middleware/helpers/compose.d.mts.map +1 -0
  299. package/esm/middleware/helpers/compose.mjs +52 -0
  300. package/esm/middleware/helpers/compose.mjs.map +1 -0
  301. package/esm/middleware/helpers/for-tool.d.mts +55 -0
  302. package/esm/middleware/helpers/for-tool.d.mts.map +1 -0
  303. package/esm/middleware/helpers/for-tool.mjs +80 -0
  304. package/esm/middleware/helpers/for-tool.mjs.map +1 -0
  305. package/esm/middleware/helpers/index.d.mts +2 -0
  306. package/esm/middleware/index.d.mts +8 -0
  307. package/esm/middleware/index.mjs +10 -0
  308. package/esm/middleware/pipeline.d.mts +70 -0
  309. package/esm/middleware/pipeline.d.mts.map +1 -0
  310. package/esm/middleware/pipeline.mjs +100 -0
  311. package/esm/middleware/pipeline.mjs.map +1 -0
  312. package/esm/middleware/utils/extract-user-text.d.mts +33 -0
  313. package/esm/middleware/utils/extract-user-text.d.mts.map +1 -0
  314. package/esm/middleware/utils/extract-user-text.mjs +40 -0
  315. package/esm/middleware/utils/extract-user-text.mjs.map +1 -0
  316. package/esm/middleware/utils/index.d.mts +2 -0
  317. package/esm/middleware/utils/namespaced-state.d.mts +60 -0
  318. package/esm/middleware/utils/namespaced-state.d.mts.map +1 -0
  319. package/esm/middleware/utils/namespaced-state.mjs +60 -0
  320. package/esm/middleware/utils/namespaced-state.mjs.map +1 -0
  321. package/esm/mock/index.d.mts +4 -0
  322. package/esm/mock/index.mjs +5 -0
  323. package/esm/mock/mock-agent.d.mts +41 -0
  324. package/esm/mock/mock-agent.d.mts.map +1 -0
  325. package/esm/mock/mock-agent.mjs +39 -0
  326. package/esm/mock/mock-agent.mjs.map +1 -0
  327. package/esm/mock/mock-config.type.d.mts +31 -0
  328. package/esm/mock/mock-config.type.d.mts.map +1 -0
  329. package/esm/mock/mock-model.d.mts +94 -0
  330. package/esm/mock/mock-model.d.mts.map +1 -0
  331. package/esm/mock/mock-model.mjs +150 -0
  332. package/esm/mock/mock-model.mjs.map +1 -0
  333. package/esm/mock/mock-sdk.d.mts +25 -0
  334. package/esm/mock/mock-sdk.d.mts.map +1 -0
  335. package/esm/mock/mock-sdk.mjs +37 -0
  336. package/esm/mock/mock-sdk.mjs.map +1 -0
  337. package/esm/supervisor/as-tool.d.mts +45 -0
  338. package/esm/supervisor/as-tool.d.mts.map +1 -0
  339. package/esm/supervisor/as-tool.mjs +80 -0
  340. package/esm/supervisor/as-tool.mjs.map +1 -0
  341. package/esm/supervisor/cancellation.d.mts +12 -0
  342. package/esm/supervisor/cancellation.d.mts.map +1 -0
  343. package/esm/supervisor/cancellation.mjs +22 -0
  344. package/esm/supervisor/cancellation.mjs.map +1 -0
  345. package/esm/supervisor/decide.mjs +272 -0
  346. package/esm/supervisor/decide.mjs.map +1 -0
  347. package/esm/supervisor/emitter.d.mts +27 -0
  348. package/esm/supervisor/emitter.d.mts.map +1 -0
  349. package/esm/supervisor/emitter.mjs +47 -0
  350. package/esm/supervisor/emitter.mjs.map +1 -0
  351. package/esm/supervisor/entries.d.mts +141 -0
  352. package/esm/supervisor/entries.d.mts.map +1 -0
  353. package/esm/supervisor/entries.mjs +206 -0
  354. package/esm/supervisor/entries.mjs.map +1 -0
  355. package/esm/supervisor/execution.d.mts +637 -0
  356. package/esm/supervisor/execution.d.mts.map +1 -0
  357. package/esm/supervisor/execution.mjs +1868 -0
  358. package/esm/supervisor/execution.mjs.map +1 -0
  359. package/esm/supervisor/index.d.mts +11 -0
  360. package/esm/supervisor/index.mjs +12 -0
  361. package/esm/supervisor/router-prompt.d.mts +56 -0
  362. package/esm/supervisor/router-prompt.d.mts.map +1 -0
  363. package/esm/supervisor/router-prompt.mjs +52 -0
  364. package/esm/supervisor/router-prompt.mjs.map +1 -0
  365. package/esm/supervisor/signature.d.mts +28 -0
  366. package/esm/supervisor/signature.d.mts.map +1 -0
  367. package/esm/supervisor/signature.mjs +89 -0
  368. package/esm/supervisor/signature.mjs.map +1 -0
  369. package/esm/supervisor/snapshot.d.mts +54 -0
  370. package/esm/supervisor/snapshot.d.mts.map +1 -0
  371. package/esm/supervisor/snapshot.mjs +77 -0
  372. package/esm/supervisor/snapshot.mjs.map +1 -0
  373. package/esm/supervisor/supervisor-stream.d.mts +29 -0
  374. package/esm/supervisor/supervisor-stream.d.mts.map +1 -0
  375. package/esm/supervisor/supervisor-stream.mjs +89 -0
  376. package/esm/supervisor/supervisor-stream.mjs.map +1 -0
  377. package/esm/supervisor/supervisor.d.mts +27 -0
  378. package/esm/supervisor/supervisor.d.mts.map +1 -0
  379. package/esm/supervisor/supervisor.mjs +138 -0
  380. package/esm/supervisor/supervisor.mjs.map +1 -0
  381. package/esm/system-prompt/instruction.d.mts +52 -0
  382. package/esm/system-prompt/instruction.d.mts.map +1 -0
  383. package/esm/system-prompt/instruction.mjs +57 -0
  384. package/esm/system-prompt/instruction.mjs.map +1 -0
  385. package/esm/system-prompt/persona.d.mts +52 -0
  386. package/esm/system-prompt/persona.d.mts.map +1 -0
  387. package/esm/system-prompt/persona.mjs +57 -0
  388. package/esm/system-prompt/persona.mjs.map +1 -0
  389. package/esm/system-prompt/render-placeholders.d.mts +31 -0
  390. package/esm/system-prompt/render-placeholders.d.mts.map +1 -0
  391. package/esm/system-prompt/render-placeholders.mjs +58 -0
  392. package/esm/system-prompt/render-placeholders.mjs.map +1 -0
  393. package/esm/system-prompt/system-prompt.d.mts +117 -0
  394. package/esm/system-prompt/system-prompt.d.mts.map +1 -0
  395. package/esm/system-prompt/system-prompt.mjs +137 -0
  396. package/esm/system-prompt/system-prompt.mjs.map +1 -0
  397. package/esm/tool/index.d.mts +1 -0
  398. package/esm/tool/index.mjs +3 -0
  399. package/esm/tool/tool.d.mts +64 -0
  400. package/esm/tool/tool.d.mts.map +1 -0
  401. package/esm/tool/tool.mjs +184 -0
  402. package/esm/tool/tool.mjs.map +1 -0
  403. package/esm/utils/compute-cost.d.mts +58 -0
  404. package/esm/utils/compute-cost.d.mts.map +1 -0
  405. package/esm/utils/compute-cost.mjs +87 -0
  406. package/esm/utils/compute-cost.mjs.map +1 -0
  407. package/esm/utils/extract-json-payload.d.mts +33 -0
  408. package/esm/utils/extract-json-payload.d.mts.map +1 -0
  409. package/esm/utils/extract-json-payload.mjs +39 -0
  410. package/esm/utils/extract-json-payload.mjs.map +1 -0
  411. package/esm/utils/generate-run-id.d.mts +20 -0
  412. package/esm/utils/generate-run-id.d.mts.map +1 -0
  413. package/esm/utils/generate-run-id.mjs +23 -0
  414. package/esm/utils/generate-run-id.mjs.map +1 -0
  415. package/esm/utils/index.d.mts +9 -0
  416. package/esm/utils/index.mjs +11 -0
  417. package/esm/utils/json-schema.d.mts +57 -0
  418. package/esm/utils/json-schema.d.mts.map +1 -0
  419. package/esm/utils/json-schema.mjs +89 -0
  420. package/esm/utils/json-schema.mjs.map +1 -0
  421. package/esm/utils/prepare-attachment-part.d.mts +36 -0
  422. package/esm/utils/prepare-attachment-part.d.mts.map +1 -0
  423. package/esm/utils/prepare-attachment-part.mjs +140 -0
  424. package/esm/utils/prepare-attachment-part.mjs.map +1 -0
  425. package/esm/utils/resolve-attachment.d.mts +33 -0
  426. package/esm/utils/resolve-attachment.d.mts.map +1 -0
  427. package/esm/utils/resolve-attachment.mjs +73 -0
  428. package/esm/utils/resolve-attachment.mjs.map +1 -0
  429. package/esm/utils/safe-json-parse.d.mts +14 -0
  430. package/esm/utils/safe-json-parse.d.mts.map +1 -0
  431. package/esm/utils/safe-json-parse.mjs +22 -0
  432. package/esm/utils/safe-json-parse.mjs.map +1 -0
  433. package/esm/utils/stamp-report-lineage.d.mts +61 -0
  434. package/esm/utils/stamp-report-lineage.d.mts.map +1 -0
  435. package/esm/utils/stamp-report-lineage.mjs +47 -0
  436. package/esm/utils/stamp-report-lineage.mjs.map +1 -0
  437. package/esm/utils/token-count.d.mts +15 -0
  438. package/esm/utils/token-count.d.mts.map +1 -0
  439. package/esm/utils/token-count.mjs +18 -0
  440. package/esm/utils/token-count.mjs.map +1 -0
  441. package/esm/workflow/as-tool.mjs +55 -0
  442. package/esm/workflow/as-tool.mjs.map +1 -0
  443. package/esm/workflow/cancellation.mjs +44 -0
  444. package/esm/workflow/cancellation.mjs.map +1 -0
  445. package/esm/workflow/emitter.mjs +40 -0
  446. package/esm/workflow/emitter.mjs.map +1 -0
  447. package/esm/workflow/engine.mjs +362 -0
  448. package/esm/workflow/engine.mjs.map +1 -0
  449. package/esm/workflow/index.d.mts +3 -0
  450. package/esm/workflow/index.mjs +5 -0
  451. package/esm/workflow/retry.mjs +32 -0
  452. package/esm/workflow/retry.mjs.map +1 -0
  453. package/esm/workflow/router.mjs +56 -0
  454. package/esm/workflow/router.mjs.map +1 -0
  455. package/esm/workflow/run-scoped-emitter.mjs +32 -0
  456. package/esm/workflow/run-scoped-emitter.mjs.map +1 -0
  457. package/esm/workflow/signature.d.mts +7 -0
  458. package/esm/workflow/signature.d.mts.map +1 -0
  459. package/esm/workflow/signature.mjs +34 -0
  460. package/esm/workflow/signature.mjs.map +1 -0
  461. package/esm/workflow/snapshot.mjs +71 -0
  462. package/esm/workflow/snapshot.mjs.map +1 -0
  463. package/esm/workflow/state.mjs +37 -0
  464. package/esm/workflow/state.mjs.map +1 -0
  465. package/esm/workflow/step-runner.mjs +371 -0
  466. package/esm/workflow/step-runner.mjs.map +1 -0
  467. package/esm/workflow/step.d.mts +19 -0
  468. package/esm/workflow/step.d.mts.map +1 -0
  469. package/esm/workflow/step.mjs +37 -0
  470. package/esm/workflow/step.mjs.map +1 -0
  471. package/esm/workflow/workflow.d.mts +12 -0
  472. package/esm/workflow/workflow.d.mts.map +1 -0
  473. package/esm/workflow/workflow.mjs +116 -0
  474. package/esm/workflow/workflow.mjs.map +1 -0
  475. package/llms-full.txt +2293 -0
  476. package/llms.txt +20 -0
  477. package/package.json +37 -0
  478. package/skills/README.md +53 -0
  479. package/skills/ai-basics/SKILL.md +95 -0
  480. package/skills/attach-ai-middleware/SKILL.md +184 -0
  481. package/skills/define-ai-tool/SKILL.md +186 -0
  482. package/skills/embed-text/SKILL.md +105 -0
  483. package/skills/handle-ai-errors/SKILL.md +194 -0
  484. package/skills/log-ai-calls/SKILL.md +141 -0
  485. package/skills/persist-ai-data/SKILL.md +207 -0
  486. package/skills/pick-ai-provider/SKILL.md +164 -0
  487. package/skills/run-ai-agent/SKILL.md +267 -0
  488. package/skills/run-ai-workflow/SKILL.md +258 -0
  489. package/skills/run-supervisor/SKILL.md +309 -0
  490. package/skills/write-system-prompt/SKILL.md +129 -0
@@ -0,0 +1,235 @@
1
+ import { Message } from "../conversation-message.type.mjs";
2
+ import { AgentResult } from "../result/agent-result.type.mjs";
3
+ import { StreamContract } from "../stream/stream.contract.mjs";
4
+ import { AgentContract } from "../agent/agent.contract.mjs";
5
+ import { WorkflowResult } from "../result/workflow-result.type.mjs";
6
+ import { WorkflowInstance, WorkflowRunOptions } from "../workflow/workflow.contract.mjs";
7
+ import { IterationSnapshot } from "./iteration-snapshot.type.mjs";
8
+ import { SupervisorIntentValue } from "./intent-entry.type.mjs";
9
+ import { SupervisorExecuteOptions } from "./supervisor-execute-options.type.mjs";
10
+ import { SupervisorContract } from "./supervisor.contract.mjs";
11
+ import { ClassifierSnapshot } from "./classifier-context.type.mjs";
12
+ import { SupervisorResult } from "../result/supervisor-result.type.mjs";
13
+ import { AgentExecuteOptions } from "../agent/agent-options.type.mjs";
14
+
15
+ //#region ../../@warlock.js/ai/src/contracts/supervisor/dispatch-context.type.d.ts
16
+ /**
17
+ * Runner exposed on `DispatchContext.intents` for each registered
18
+ * intent. Two methods, mirroring the canonical execute / stream
19
+ * surface every executable primitive exposes:
20
+ *
21
+ * - `.execute(input?)` runs the named intent and returns its resolved
22
+ * output value (existing — Phase 3.3).
23
+ * - `.stream(input?)` runs the named intent in streaming mode and
24
+ * returns a `StreamContract` the caller can iterate or
25
+ * `await .result` on (Phase 6 / decisions §36). Stream events
26
+ * bubble up as `supervisor.agent.streaming` under the calling
27
+ * callback's intent name when the supervisor itself is being
28
+ * streamed.
29
+ *
30
+ * Without `input` → the dispatched primitive sees the calling
31
+ * callback's own `ctx.input`. With `input` → the override is
32
+ * forwarded.
33
+ *
34
+ * Throws `SupervisorFailedError` (`SUPERVISOR_DISPATCH_CYCLE`) when
35
+ * invoking would close a per-branch call cycle. Cycle detection is
36
+ * scoped per fan-out branch — sibling branches dispatching the same
37
+ * intent in parallel is NOT a cycle.
38
+ *
39
+ * Replaces the Phase-3.3 `ctx.dispatch.byName(name, input?)` helper
40
+ * with property-access + per-key autocomplete (Q5/Q6).
41
+ */
42
+ type IntentRunner = {
43
+ execute: (input?: unknown) => Promise<unknown>;
44
+ stream: (input?: unknown) => StreamContract<SupervisableResult>;
45
+ };
46
+ /**
47
+ * Discriminated union of executable primitives that `ctx.run`
48
+ * accepts (Phase 6 / decisions §36). Tools are deliberately
49
+ * excluded — they have a different lifecycle and compose via
50
+ * `agent.tools[]`, not via supervised inline dispatch.
51
+ */
52
+ type SupervisableExecutable = AgentContract<unknown> | WorkflowInstance<unknown, unknown> | SupervisorContract<unknown>;
53
+ /**
54
+ * Subset of `SupervisableExecutable` that exposes a native
55
+ * `.stream()` method. Workflows currently expose streaming only
56
+ * through `workflow.step.streaming` events on `.execute()`; their
57
+ * inline streaming via `ctx.stream` is deferred to a future phase.
58
+ * Workflows still work through `ctx.run` — their step-streaming
59
+ * events bubble through the supervisor's existing top-level forward
60
+ * chain.
61
+ */
62
+ type StreamableExecutable = AgentContract<unknown> | SupervisorContract<unknown>;
63
+ /**
64
+ * Result envelope returned by `ctx.run(executable, ...)` — discriminated
65
+ * by the executable's kind. Callbacks typically know which one they
66
+ * passed and TS narrows accordingly.
67
+ */
68
+ type SupervisableResult = AgentResult<unknown> | WorkflowResult<unknown> | SupervisorResult<unknown>;
69
+ /**
70
+ * Per-call options to `ctx.run` / `ctx.stream`. Each kind's native
71
+ * options pass through; the supervisor auto-merges `signal`,
72
+ * `toolCtx`, and `history` defaults under the option payload before
73
+ * forwarding. Per-call value REPLACES the auto-default — standard
74
+ * Warlock convention.
75
+ */
76
+ type SupervisableExecuteOptions = AgentExecuteOptions<unknown> | WorkflowRunOptions | SupervisorExecuteOptions;
77
+ /**
78
+ * Map of registered intents keyed by their name in the supervisor's
79
+ * `intents` config. Generic-typed against the supplied `intents`
80
+ * object so `ctx.intents.<TAB>` autocompletes against the literal
81
+ * keys the user supplied.
82
+ */
83
+ type IntentRunnerMap<TIntents extends Record<string, SupervisorIntentValue>> = { [K in keyof TIntents]: IntentRunner };
84
+ /**
85
+ * Context passed to callback intents and to per-intent
86
+ * `input(ctx)` / `output(ctx)` resolvers in entries (callback or
87
+ * agent/workflow alike, where the resolver opts into the dispatch
88
+ * shape rather than the legacy `RouteContext`).
89
+ *
90
+ * Sibling of `RouteContext` — same conceptual context, but carries
91
+ * dispatch-specific fields (`intent`, `result`, `intents`) that
92
+ * don't make sense pre-routing.
93
+ *
94
+ * Generic over `TIntents` for autocomplete on `ctx.intents.X`. Most
95
+ * users never write the generic explicitly — it's inferable from
96
+ * the `SupervisorConfig<TOutput, TIntents>` argument.
97
+ *
98
+ * @example
99
+ * intents: {
100
+ * refund: async (ctx) => {
101
+ * if (typeof ctx.input === "object" && (ctx.input as { amount: number }).amount > 1_000) {
102
+ * await ctx.intents.auditLog.execute();
103
+ * }
104
+ * return await callRefundAPI(ctx.input);
105
+ * },
106
+ * }
107
+ */
108
+ type DispatchContext<TState = Record<string, unknown>, TIntents extends Record<string, SupervisorIntentValue> = Record<string, SupervisorIntentValue>> = {
109
+ /** Zero-indexed iteration number — turn 0 is the first run. */iteration: number; /** This dispatch's intent name (the key from the `intents` map). */
110
+ intent: string;
111
+ /**
112
+ * Resolved input for this intent. Either the supervisor's
113
+ * original `execute(input)` value or the result of the entry's
114
+ * `input(ctx)` resolver when one was supplied.
115
+ */
116
+ input: unknown;
117
+ /**
118
+ * Per-execute typed accumulator. Built up across iterations as
119
+ * each intent contributes a slice via shallow-merge. Read-only
120
+ * from inside callbacks (Q3 — write via return value, not direct
121
+ * mutation). On the supervisor's clean termination, this is the
122
+ * value validated against `config.output` and returned as
123
+ * `result.data`.
124
+ *
125
+ * Defaults to `{}` when `config.state` is not declared. JSON-safe
126
+ * only — no functions / Maps / Sets / class instances (Q16) so
127
+ * snapshot resume works.
128
+ */
129
+ state: TState;
130
+ /**
131
+ * Current iteration's snapshot-in-progress — sibling branches
132
+ * that have already settled this iteration. Empty for the first
133
+ * branch dispatched in any iteration.
134
+ */
135
+ result: IterationSnapshot["result"];
136
+ /**
137
+ * Every completed iteration's snapshot, in chronological order.
138
+ * On turn 0 this is empty.
139
+ *
140
+ * Renamed from `history` (Q2) — the iteration trace is not
141
+ * conversation history; conversation memory is external to the
142
+ * supervisor (Q3).
143
+ */
144
+ iterations: IterationSnapshot[]; /** Cancellation signal — propagated from the `execute()` caller. */
145
+ signal: AbortSignal;
146
+ /**
147
+ * Registered intents accessible by key. Each entry is an
148
+ * `IntentRunner` exposing `.execute(input?)`. Property access on
149
+ * a typed map replaces the Phase-3.3 `ctx.dispatch.byName` string
150
+ * lookup — autocomplete + no typo crashes.
151
+ */
152
+ intents: IntentRunnerMap<TIntents>;
153
+ /**
154
+ * Read-only request-scoped bag supplied via
155
+ * `execute(input, { context })`. Shallow-copied + frozen at intake
156
+ * so callbacks can't mutate the caller's object. Defaults to a
157
+ * frozen `{}` when no context was passed. NOT persisted in
158
+ * snapshots — re-supply on `resume()`.
159
+ */
160
+ context: Readonly<Record<string, unknown>>;
161
+ /**
162
+ * Prior conversation messages supplied via
163
+ * `execute(input, { history })`. Read-only — passed by reference, not
164
+ * copied. Defaults to an empty array when no history was supplied.
165
+ * NOT persisted in snapshots — re-supply on `resume()`.
166
+ */
167
+ history: ReadonlyArray<Message>;
168
+ /**
169
+ * Resolved natural-language objective from `SupervisorConfig.goal`.
170
+ * `undefined` when the supervisor was configured without one.
171
+ * Read-only.
172
+ */
173
+ goal?: string;
174
+ /**
175
+ * Run an inline / un-registered executable under the supervisor's
176
+ * supervision (Phase 6 / decisions §36). The framework auto-merges
177
+ * `signal`, `toolCtx`, `history`, and report-nesting under the
178
+ * calling callback's intent name. Per-call `options` REPLACE
179
+ * auto-defaults (standard Warlock convention).
180
+ *
181
+ * Use when you need to compose an agent / workflow / supervisor
182
+ * inline that isn't in the `intents` map — e.g. an agent
183
+ * dynamically built from per-call config, or a delegate supervisor
184
+ * pulled from a registry.
185
+ *
186
+ * Returns the executable's full result envelope (`{ data, error,
187
+ * usage, report }`). Calls `.execute()` internally; for streaming,
188
+ * use `ctx.stream` instead.
189
+ *
190
+ * Cycle detection by executable `name` matches `ctx.intents.X.execute()`.
191
+ *
192
+ * @example
193
+ * intents: {
194
+ * classifyInline: async ctx => {
195
+ * const { data } = await ctx.run(classifierAgent, ctx.input);
196
+ * return { category: data.label };
197
+ * },
198
+ * }
199
+ */
200
+ run: (executable: SupervisableExecutable, input: unknown, options?: SupervisableExecuteOptions) => Promise<SupervisableResult>;
201
+ /**
202
+ * Stream an inline / un-registered executable under the
203
+ * supervisor's supervision (Phase 6 / decisions §36). Same auto-
204
+ * merge as `ctx.run` plus stream-event bubbling: deltas surface as
205
+ * `supervisor.agent.streaming { iteration, intent: "<callback name>",
206
+ * delta }` when the supervisor itself is being streamed.
207
+ *
208
+ * Returns the executable's own `StreamContract` — iterate with
209
+ * `for await`, `await .result`, or both. The framework attaches
210
+ * subscriptions transparently; the dev's existing usage of the
211
+ * returned stream is unchanged.
212
+ *
213
+ * @example
214
+ * intents: {
215
+ * chatInline: async ctx => {
216
+ * const { result } = ctx.stream(someAgent, enrich(ctx.input));
217
+ * const final = await result;
218
+ * return { reply: final.text };
219
+ * },
220
+ * }
221
+ */
222
+ stream: (executable: StreamableExecutable, input: unknown, options?: SupervisableExecuteOptions) => StreamContract<SupervisableResult>;
223
+ /**
224
+ * Forensic record of iter-0 classifier run (Phase 7 / decisions §37).
225
+ * Present when `SupervisorConfig.classifier` was configured AND
226
+ * iter 0 has completed; `undefined` otherwise. Callbacks can
227
+ * read `ctx.classifier?.intent` / `.reasoning` / `.confidence` to
228
+ * inspect the classification trail without round-tripping through
229
+ * state.
230
+ */
231
+ classifier?: Readonly<ClassifierSnapshot>;
232
+ };
233
+ //#endregion
234
+ export { DispatchContext, IntentRunner, IntentRunnerMap, StreamableExecutable, SupervisableExecutable, SupervisableExecuteOptions, SupervisableResult };
235
+ //# sourceMappingURL=dispatch-context.type.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch-context.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/supervisor/dispatch-context.type.ts"],"mappings":";;;;;;;;;;;;;;;;;AAwCA;;;;;;;;;;;;;;;;AAEgE;AAShE;;;;;;;KAXY,YAAA;EACV,OAAA,GAAU,KAAA,eAAoB,OAAA;EAC9B,MAAA,GAAS,KAAA,eAAoB,cAAA,CAAe,kBAAA;AAAA;;AAYxB;AAWtB;;;;KAdY,sBAAA,GACR,aAAA,YACA,gBAAA,qBACA,kBAAA;AAoBJ;;;;;;;;;AAAA,KATY,oBAAA,GACR,aAAA,YACA,kBAAkB;;;AAUF;AASpB;;KAZY,kBAAA,GACR,WAAA,YACA,cAAA,YACA,gBAAA;;;;;;;;KASQ,0BAAA,GACR,mBAAA,YACA,kBAAA,GACA,wBAAA;;AAAwB;AAQ5B;;;;KAAY,eAAA,kBAAiC,MAAA,SAAe,qBAAA,mBAC9C,QAAA,GAAW,YAAA;;;;;;;;;;AAAY;AA2BrC;;;;;;;;;;;;;;KAAY,eAAA,UACD,MAAA,oCACQ,MAAA,SAAe,qBAAA,IAAyB,MAAA,SAAe,qBAAA;EAwD/D,+DArDT,SAAA,UA4DS;EA1DT,MAAA;EA8FY;;;;;EAxFZ,KAAA;EAmHK;;;;;;;;;;;;EAtGL,KAAA,EAAO,MAAA;EAnBP;;;;;EAyBA,MAAA,EAAQ,iBAAA;EASR;;;;;;;;EAAA,UAAA,EAAY,iBAAA,IAiBM;EAflB,MAAA,EAAQ,WAAA;EAsBC;;;;;;EAfT,OAAA,EAAS,eAAA,CAAgB,QAAA;EAmDb;;;;;;;EA3CZ,OAAA,EAAS,QAAA,CAAS,MAAA;EAqEN;;;;;;EA9DZ,OAAA,EAAS,aAAA,CAAc,OAAA;EAwEiB;AAAA;;;;EAlExC,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BA,GAAA,GACE,UAAA,EAAY,sBAAA,EACZ,KAAA,WACA,OAAA,GAAU,0BAAA,KACP,OAAA,CAAQ,kBAAA;;;;;;;;;;;;;;;;;;;;;;EAsBb,MAAA,GACE,UAAA,EAAY,oBAAA,EACZ,KAAA,WACA,OAAA,GAAU,0BAAA,KACP,cAAA,CAAe,kBAAA;;;;;;;;;EASpB,UAAA,GAAa,QAAA,CAAS,kBAAA;AAAA"}
@@ -0,0 +1,124 @@
1
+ import { Message } from "../conversation-message.type.mjs";
2
+ import { AIError } from "../../errors/ai-error.mjs";
3
+ import { Usage } from "../result/usage.type.mjs";
4
+ import { IterationSnapshot } from "./iteration-snapshot.type.mjs";
5
+ import { SupervisorInput } from "./supervisor-input.type.mjs";
6
+ import { ClassifierSnapshot } from "./classifier-context.type.mjs";
7
+
8
+ //#region ../../@warlock.js/ai/src/contracts/supervisor/evaluate-context.type.d.ts
9
+ /**
10
+ * Per-branch summary passed to `evaluate` via
11
+ * `EvaluateContext.result[intent]`. Carries exactly what `evaluate`
12
+ * needs to judge the turn — the transformed output, timing, token
13
+ * usage, and any per-branch error that didn't abort the sibling
14
+ * dispatches.
15
+ *
16
+ * Distinct from `AgentBranchSnapshot` because it's the `evaluate`
17
+ * contract, not the persistence contract — snapshots mirror the same
18
+ * fields plus canonical timestamps and a frozen shape.
19
+ */
20
+ type EvaluateBranchResult = {
21
+ /** Output after the per-agent `output` transformer (if any). */output: unknown; /** The resolved input string sent to the agent this iteration. */
22
+ input: string;
23
+ usage: Usage;
24
+ durationMs: number;
25
+ /**
26
+ * Per-branch typed error. Set only when this specific branch
27
+ * failed; sibling branches and the evaluate pass still run.
28
+ */
29
+ error?: AIError;
30
+ };
31
+ /**
32
+ * Context passed to a supervisor's `evaluate` callback. Fires
33
+ * retrospectively after the iteration's agent(s) have settled —
34
+ * never before dispatch — so `result` is populated.
35
+ *
36
+ * `result` is a `Record` keyed by intent name (not an array) — see
37
+ * design §10 for why: it keeps consumer code uniform whether one
38
+ * agent or three ran, matches the `intents` config shape, and
39
+ * expresses "didn't run this iteration" cleanly as key absence.
40
+ *
41
+ * @example
42
+ * evaluate: (ctx) => {
43
+ * if (ctx.result.resolver?.output) { return { satisfied: true }; }
44
+ * if (!ctx.result.research) { return { reassignTo: "research" }; }
45
+ * return undefined;
46
+ * }
47
+ */
48
+ type EvaluateContext<TState = Record<string, unknown>> = {
49
+ iteration: number; /** The supervisor's original `execute(input)` value. */
50
+ input: SupervisorInput;
51
+ /**
52
+ * Per-execute typed accumulator AFTER this iteration's intents
53
+ * have merged their outputs. State-driven termination logic
54
+ * (`return ctx.state.reply ? { satisfied: true } : undefined`)
55
+ * lives here.
56
+ */
57
+ state: TState;
58
+ /**
59
+ * Outputs from this iteration's dispatched agents, keyed by intent
60
+ * name. Absent key = didn't run this iteration. Always an object —
61
+ * even single-agent iterations produce a one-key record.
62
+ */
63
+ result: Record<string, EvaluateBranchResult>;
64
+ /**
65
+ * Prior iterations' snapshots, in chronological order.
66
+ *
67
+ * Renamed from `history` (Q2).
68
+ */
69
+ iterations: IterationSnapshot[];
70
+ /**
71
+ * Read-only request-scoped bag supplied via
72
+ * `execute(input, { context })`. Shallow-copied + frozen at intake
73
+ * so callbacks can't mutate the caller's object. Defaults to a
74
+ * frozen `{}` when no context was passed. NOT persisted in
75
+ * snapshots — re-supply on `resume()`.
76
+ */
77
+ context: Readonly<Record<string, unknown>>;
78
+ /**
79
+ * Prior conversation messages supplied via
80
+ * `execute(input, { history })`. Read-only — passed by reference, not
81
+ * copied. Defaults to an empty array when no history was supplied.
82
+ * NOT persisted in snapshots — re-supply on `resume()`.
83
+ */
84
+ history: ReadonlyArray<Message>;
85
+ /**
86
+ * Resolved natural-language objective from `SupervisorConfig.goal`.
87
+ * `undefined` when the supervisor was configured without one.
88
+ * Read-only. Especially useful for goal-aware satisfaction checks:
89
+ * `evaluate` can compare `ctx.state` against `ctx.goal` semantics
90
+ * without hardcoded strings.
91
+ */
92
+ goal?: string;
93
+ /**
94
+ * Forensic record of iter-0 classifier run (Phase 7 / decisions §37).
95
+ * Present when `SupervisorConfig.classifier` was configured AND
96
+ * iter 0 has completed (classifier mode supervisors only). Lets
97
+ * `evaluate` factor the classification trail into satisfaction
98
+ * checks without re-reading from state.
99
+ */
100
+ classifier?: Readonly<ClassifierSnapshot>;
101
+ };
102
+ /**
103
+ * Verdict returned by `evaluate`. Fields may be combined:
104
+ *
105
+ * - `undefined` — trust the router/route; continue to the next
106
+ * iteration unchanged.
107
+ * - `{ satisfied: true }` — terminate the run successfully.
108
+ * - `{ reassignTo: string | string[] }` — override the next
109
+ * iteration's dispatch decision. Supports fan-out via array form.
110
+ * - `{ feedback: string }` — inject reviewer feedback into the next
111
+ * iteration's composed input.
112
+ *
113
+ * Combining works exactly as expected: `{ reassignTo: "critic",
114
+ * feedback: "focus on factual errors" }` forces a critic dispatch
115
+ * with the feedback threaded into its input.
116
+ */
117
+ type EvaluateResult = undefined | {
118
+ satisfied?: boolean;
119
+ reassignTo?: string | string[];
120
+ feedback?: string;
121
+ };
122
+ //#endregion
123
+ export { EvaluateBranchResult, EvaluateContext, EvaluateResult };
124
+ //# sourceMappingURL=evaluate-context.type.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-context.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/supervisor/evaluate-context.type.ts"],"mappings":";;;;;;;;;;AAkBA;;;;;;;;;KAAY,oBAAA;EAWF,gEATR,MAAA,WASe;EAPf,KAAA;EACA,KAAA,EAAO,KAAA;EACP,UAAA;EAyBmC;;;;EApBnC,KAAA,GAAQ,OAAO;AAAA;;;;;;;;;;;;;;;;;;KAoBL,eAAA,UAAyB,MAAA;EACnC,SAAA,UAqBY;EAnBZ,KAAA,EAAO,eAAA;EA2BE;;;;;;EApBT,KAAA,EAAO,MAAA;EA2CM;;;AAA2B;AAkB1C;EAvDE,MAAA,EAAQ,MAAA,SAAe,oBAAA;;;;;;EAMvB,UAAA,EAAY,iBAAA;EAsDA;;;;;;;EA9CZ,OAAA,EAAS,QAAA,CAAS,MAAA;;;;;;;EAOlB,OAAA,EAAS,aAAA,CAAc,OAAA;;;;;;;;EAQvB,IAAA;;;;;;;;EAQA,UAAA,GAAa,QAAA,CAAS,kBAAA;AAAA;;;;;;;;;;;;;;;;KAkBZ,cAAA;EAGN,SAAA;EACA,UAAA;EACA,QAAA;AAAA"}
@@ -0,0 +1,16 @@
1
+ import { END, EndSentinel } from "../end.type.mjs";
2
+ import { Next } from "./next.type.mjs";
3
+ import { AckSnapshot, AgentBranchSnapshot, DecisionSource, IterationDecision, IterationSnapshot } from "./iteration-snapshot.type.mjs";
4
+ import { SupervisorInput } from "./supervisor-input.type.mjs";
5
+ import { EvaluateBranchResult, EvaluateContext, EvaluateResult } from "./evaluate-context.type.mjs";
6
+ import { RouteContext } from "./route-context.type.mjs";
7
+ import { AckCallback, AckConfig, AckEntry, AckRunEntry } from "./ack-entry.type.mjs";
8
+ import { DispatchRawResult, IntentCallback, IntentEntry, IntentRunEntry, SupervisorIntentValue } from "./intent-entry.type.mjs";
9
+ import { RouterEntry } from "./router-entry.type.mjs";
10
+ import { SupervisorConfig, SupervisorEventHandler, SupervisorEventHandlers } from "./supervisor-config.type.mjs";
11
+ import { SupervisorExecuteOptions, SupervisorResumeOptions } from "./supervisor-execute-options.type.mjs";
12
+ import { SupervisorStreamEvent } from "./supervisor-stream-event.type.mjs";
13
+ import { SupervisorAsToolOptions, SupervisorContract } from "./supervisor.contract.mjs";
14
+ import { DispatchContext, IntentRunner, IntentRunnerMap } from "./dispatch-context.type.mjs";
15
+ import { ClassifierAgentEntry, ClassifierCallback, ClassifierConfig, ClassifierContext, ClassifierOutput, ClassifierRefineContext, ClassifierRefineResult, ClassifierRunEntry, ClassifierSnapshot } from "./classifier-context.type.mjs";
16
+ import { SupervisorSnapshot, SupervisorSnapshotStatus } from "./supervisor-snapshot.type.mjs";
@@ -0,0 +1,254 @@
1
+ import { Message } from "../conversation-message.type.mjs";
2
+ import { AgentResult } from "../result/agent-result.type.mjs";
3
+ import { AgentContract } from "../agent/agent.contract.mjs";
4
+ import { EndSentinel } from "../end.type.mjs";
5
+ import { WorkflowResult } from "../result/workflow-result.type.mjs";
6
+ import { WorkflowInstance } from "../workflow/workflow.contract.mjs";
7
+ import { RouteContext } from "./route-context.type.mjs";
8
+ import { DispatchContext } from "./dispatch-context.type.mjs";
9
+ import { StandardSchemaV1 } from "@standard-schema/spec";
10
+
11
+ //#region ../../@warlock.js/ai/src/contracts/supervisor/intent-entry.type.d.ts
12
+ /**
13
+ * Raw result produced by a dispatched unit — either an agent or a
14
+ * workflow — before any per-intent strip-merge runs.
15
+ *
16
+ * Exposed as a named alias so consumers reading
17
+ * `IterationSnapshot.result[intent].output` know the shape.
18
+ */
19
+ type DispatchRawResult = AgentResult<unknown> | WorkflowResult<unknown>;
20
+ /**
21
+ * Object form of an entry in a supervisor's `intents` map (agent
22
+ * variant). Use when you need to override the unit's `description`,
23
+ * customize the per-dispatch input string, declare a state slice via
24
+ * an `output` schema, or supply per-dispatch placeholder values for
25
+ * the agent's systemPrompt template.
26
+ *
27
+ * Every field other than `agent` is optional — the shorthand form
28
+ * (`intents: { triage: triageAgent }`) simply omits all of them.
29
+ *
30
+ * Phase 3.4 (Stage 4b) — `output` shifted from a transformer
31
+ * `(raw) => unknown` to a `StandardSchemaV1` schema (Q11/Q13). The
32
+ * schema declares the slice this intent contributes to supervisor
33
+ * state; agent output is strip-merged against it. `placeholders`
34
+ * is new — feeds into `agent.execute(input, { placeholders })`.
35
+ *
36
+ * @example
37
+ * intents: {
38
+ * classify: {
39
+ * agent: classifierAgent,
40
+ * description: "First-pass classifier",
41
+ * placeholders: (ctx) => ({ message: ctx.input }),
42
+ * output: v.object({ classification: v.enum(["billing", "shipping"]) }),
43
+ * },
44
+ * }
45
+ */
46
+ type IntentEntry = {
47
+ /** The underlying dispatchable unit — an agent or a workflow. */agent: AgentContract<unknown> | WorkflowInstance<unknown, unknown>;
48
+ /**
49
+ * Overrides the unit's own `description` when the router agent's
50
+ * per-turn context is assembled. Required fallback when the
51
+ * underlying agent/workflow doesn't carry one.
52
+ */
53
+ description?: string;
54
+ /**
55
+ * Per-intent input composer — escape hatch for the rare case where
56
+ * the agent's user message itself must vary per intent. Runs after
57
+ * routing decides this intent should dispatch. Without it, the
58
+ * agent receives the supervisor's `ctx.input` unchanged.
59
+ */
60
+ input?: (ctx: RouteContext) => string;
61
+ /**
62
+ * Per-dispatch placeholder values for the agent's `systemPrompt`
63
+ * template. Receives the upcoming `DispatchContext` so the
64
+ * computation can read `ctx.state`, `ctx.iterations`, etc. Result
65
+ * is forwarded as `agent.execute(input, { placeholders })` —
66
+ * filling in `{{key}}` references in the agent's systemPrompt.
67
+ *
68
+ * Phase 3.4 — replaces the dropped `composeAgentInput` mechanism
69
+ * for threading prior-iteration context into agents. Use this for
70
+ * "what should the agent know about state right now?" rather than
71
+ * for "what's the agent's user message?" (that's `input`).
72
+ */
73
+ placeholders?: (ctx: DispatchContext) => Record<string, unknown>;
74
+ /**
75
+ * Schema declaring the slice this intent contributes to supervisor
76
+ * state. Agent output is strip-merged against it: only validated
77
+ * keys land on `IterationSnapshot.result[intent].output` AND merge
78
+ * into supervisor `state`.
79
+ *
80
+ * Without `output`: the agent's full `data` (or `text` fallback)
81
+ * passes through to the snapshot but is NOT auto-merged into
82
+ * state — explicit opt-in keeps state clean.
83
+ *
84
+ * Validation failure surfaces as a per-branch error on the
85
+ * iteration snapshot; sibling branches still run.
86
+ */
87
+ output?: StandardSchemaV1<unknown>;
88
+ /**
89
+ * Per-intent successor directive (Phase 3.4 Stage 4d / Q24).
90
+ * After this intent runs and its slice merges into state, the
91
+ * supervisor calls `next(ctx)`:
92
+ *
93
+ * - Returns intent name (or array) → next iteration dispatches
94
+ * that. **No router LLM call.**
95
+ * - Returns `END` → terminate. **No router call, no evaluate.**
96
+ * - Returns `undefined` → fall back to router/route as today.
97
+ *
98
+ * Precedence: `evaluate` outranks `next`; `next` outranks
99
+ * router/route. Fan-out: each branch's `next` is collected after
100
+ * all branches settle; the union of unique intents drives the
101
+ * next iteration; any `END` terminates; silent branches abstain.
102
+ */
103
+ next?: (ctx: DispatchContext) => string | string[] | EndSentinel | undefined;
104
+ /**
105
+ * Custom history slicer for this intent's agent/workflow. When
106
+ * supplied, REPLACES the default slice (full history clipped by
107
+ * `SupervisorConfig.historyWindow.agents` if set).
108
+ *
109
+ * Precedence: entry `history` callback > `historyWindow.agents` >
110
+ * full history. Return `[]` to send no history at all (handy for
111
+ * pure-retrieval RAG agents that just need the current input).
112
+ *
113
+ * @example
114
+ * intents: {
115
+ * sales: {
116
+ * agent: salesAgent,
117
+ * history: (ctx) => ctx.history.slice(-15),
118
+ * },
119
+ * rag: { agent: ragAgent, history: () => [] },
120
+ * }
121
+ */
122
+ history?: (ctx: RouteContext) => Message[] | ReadonlyArray<Message>;
123
+ /**
124
+ * Dispatch mode (Phase 5 / decisions §34).
125
+ *
126
+ * - `"structured"` (default) — agent runs with the per-intent
127
+ * `output` schema (or a free-form completion if `output` is
128
+ * absent). Existing behavior; every prior intent keeps it.
129
+ * - `"stream"` — agent runs **without** structured-output coercion.
130
+ * Raw text deltas forward as `supervisor.agent.streaming` events;
131
+ * the assembled prose lands on `state[streamTo]` at completion.
132
+ *
133
+ * Stream mode is mutually exclusive with `output` at the intent
134
+ * level — a stream-mode intent declares its state contribution via
135
+ * `streamTo`, not via a schema. The factory throws
136
+ * `SUPERVISOR_INTENT_STREAM_AND_OUTPUT` if both are set, and
137
+ * `SUPERVISOR_INTENT_STREAM_TO_REQUIRED` if `mode === "stream"` and
138
+ * `streamTo` is missing.
139
+ *
140
+ * **Workflow entries do NOT support stream mode in v1** — workflows
141
+ * have no guaranteed single-LLM-text terminal contract. The factory
142
+ * throws if `mode: "stream"` is set on a workflow entry.
143
+ */
144
+ mode?: "structured" | "stream";
145
+ /**
146
+ * State key the assembled stream-mode prose writes into. Required
147
+ * when `mode === "stream"`; ignored otherwise. The supervisor
148
+ * builds `{ [streamTo]: assembledText }` as the branch's output
149
+ * slice and merges it into `state` like any other slice.
150
+ */
151
+ streamTo?: string;
152
+ };
153
+ /**
154
+ * Callback dispatch shorthand — an intent handled by dev code rather
155
+ * than by an agent or workflow. Same shape as `ai.step({ run })`.
156
+ *
157
+ * Receives a {@link DispatchContext} and returns a value (sync or
158
+ * async). The return value shallow-merges into supervisor state.
159
+ * The framework wraps the return value in a synthesized leaf report
160
+ * (`type: "callback"`, zero usage, real timing). Throws propagate
161
+ * as `SupervisorFailedError` with `cause` set.
162
+ *
163
+ * @example
164
+ * intents: {
165
+ * refund: async (ctx) => {
166
+ * const id = await callRefundAPI(ctx.input);
167
+ * return { refundId: id }; // shallow-merged into ctx.state
168
+ * },
169
+ * }
170
+ */
171
+ type IntentCallback = (ctx: DispatchContext) => unknown | Promise<unknown>;
172
+ /**
173
+ * Object form of a callback intent — preferred when you need a
174
+ * `description` (required under a router) or want per-intent
175
+ * `input` / `output` shapes.
176
+ *
177
+ * Mirrors `ai.step({ run, description, ... })` so users moving
178
+ * between workflow and supervisor see the same vocabulary.
179
+ *
180
+ * Phase 3.4 (Stage 4b) — `output` shifted from a transformer to
181
+ * a `StandardSchemaV1`. Without it, the callback's full return
182
+ * shallow-merges into state. With it, the return is strip-merged
183
+ * to declared keys only.
184
+ *
185
+ * @example
186
+ * intents: {
187
+ * cancel: {
188
+ * run: async (ctx) => ({ cancelledId: await cancelOrder(ctx.input) }),
189
+ * description: "Cancel an order on explicit customer request",
190
+ * output: v.object({ cancelledId: v.string() }),
191
+ * },
192
+ * }
193
+ */
194
+ type IntentRunEntry = {
195
+ /** The dispatch callback. Receives a {@link DispatchContext}. */run: IntentCallback;
196
+ /**
197
+ * Required when the supervisor is configured with a `router` —
198
+ * otherwise the router LLM has no signal for picking this intent.
199
+ * Optional in deterministic-route mode.
200
+ */
201
+ description?: string;
202
+ /**
203
+ * Per-intent input resolver. Receives a {@link DispatchContext}
204
+ * (the callback's eventual context) and returns the value passed
205
+ * as `ctx.input`. Defaults to the supervisor's input string.
206
+ */
207
+ input?: (ctx: DispatchContext) => unknown;
208
+ /**
209
+ * Per-dispatch placeholder values. Same role as on `IntentEntry` —
210
+ * available on callback entries for symmetry, though callbacks
211
+ * usually don't have a systemPrompt template to fill.
212
+ */
213
+ placeholders?: (ctx: DispatchContext) => Record<string, unknown>;
214
+ /**
215
+ * Schema declaring the slice this callback contributes to
216
+ * supervisor state. Without it, the full return value
217
+ * shallow-merges. With it, return is strip-merged to declared keys.
218
+ */
219
+ output?: StandardSchemaV1<unknown>;
220
+ /**
221
+ * Per-intent successor directive (Phase 3.4 Stage 4d / Q24). See
222
+ * `IntentEntry.next` — same semantics, available on callback
223
+ * intents too.
224
+ */
225
+ next?: (ctx: DispatchContext) => string | string[] | EndSentinel | undefined;
226
+ };
227
+ /**
228
+ * The accepted shapes for a value in the supervisor's
229
+ * `intents: Record<string, …>` config:
230
+ *
231
+ * - `AgentContract` — shorthand; description inferred from the agent.
232
+ * - `WorkflowInstance` — shorthand; description inferred from the
233
+ * workflow (must be present).
234
+ * - `IntentCallback` — bare async/sync function shorthand, dispatched
235
+ * as dev code. Description-less; allowed only in deterministic
236
+ * `route` mode. Under a router, upgrade to `IntentRunEntry`.
237
+ * - `IntentEntry` — full object form for an agent/workflow with
238
+ * optional overrides.
239
+ * - `IntentRunEntry` — full object form for a callback intent.
240
+ *
241
+ * The runtime resolver discriminates by checking, in order:
242
+ * `function → "run" in value → "agent" in value → instanceof`.
243
+ * Mixed dispatch fields (e.g. `{ agent, run }`) throw at construction.
244
+ *
245
+ * Every key must ultimately resolve to a non-empty description when
246
+ * the supervisor is configured with a `router` — the factory throws
247
+ * `SupervisorFailedError` (`SUPERVISOR_INTENT_DESCRIPTION_REQUIRED`)
248
+ * if any router-routed intent lacks one. Deterministic-route callers
249
+ * skip the check.
250
+ */
251
+ type SupervisorIntentValue = AgentContract<unknown> | WorkflowInstance<unknown, unknown> | IntentCallback | IntentEntry | IntentRunEntry;
252
+ //#endregion
253
+ export { DispatchRawResult, IntentCallback, IntentEntry, IntentRunEntry, SupervisorIntentValue };
254
+ //# sourceMappingURL=intent-entry.type.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent-entry.type.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/supervisor/intent-entry.type.ts"],"mappings":";;;;;;;;;;;;;AAiBA;;;;AAAqE;KAAzD,iBAAA,GAAoB,WAAA,YAAuB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BzD,WAAA;EA0CV,iEAxCA,KAAA,EAAO,aAAA,YAAyB,gBAAA;EAwDhC;;;;;EAlDA,WAAA;EAqEW;;;;;;EA9DX,KAAA,IAAS,GAAA,EAAK,YAAA;EA2FN;AAqBV;;;;;;;;AAAwE;AAwBxE;;EA3HE,YAAA,IAAgB,GAAA,EAAK,eAAA,KAAoB,MAAA;EA6HpC;;;;;;;;;;;;;EA/GL,MAAA,GAAS,gBAAA;EA2HA;;;;;;;;;;;;AAkBuD;AA2BlE;;EAxJE,IAAA,IAAQ,GAAA,EAAK,eAAA,yBAAwC,WAAA;EAyJnD;;;;;;;;;;;;;AAIc;;;;;EA1IhB,OAAA,IAAW,GAAA,EAAK,YAAA,KAAiB,OAAA,KAAY,aAAA,CAAc,OAAA;;;;;;;;;;;;;;;;;;;;;;EAsB3D,IAAA;;;;;;;EAOA,QAAA;AAAA;;;;;;;;;;;;;;;;;;;KAqBU,cAAA,IAAkB,GAAA,EAAK,eAAA,eAA8B,OAAO;;;;;;;;;;;;;;;;;;;;;;;KAwB5D,cAAA;mEAEV,GAAA,EAAK,cAAA;;;;;;EAML,WAAA;;;;;;EAMA,KAAA,IAAS,GAAA,EAAK,eAAA;;;;;;EAMd,YAAA,IAAgB,GAAA,EAAK,eAAA,KAAoB,MAAA;;;;;;EAMzC,MAAA,GAAS,gBAAA;;;;;;EAMT,IAAA,IAAQ,GAAA,EAAK,eAAA,yBAAwC,WAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;KA2B3C,qBAAA,GACR,aAAA,YACA,gBAAA,qBACA,cAAA,GACA,WAAA,GACA,cAAA"}