@warlock.js/ai 4.8.2 → 4.9.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 (1169) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/cjs/index.cjs +263 -241
  3. package/cjs/index.cjs.map +1 -1
  4. package/cjs/{magic-string.es-BtxW4VqG.cjs → magic-string.es-BoSa5xIt.cjs} +3 -3
  5. package/cjs/magic-string.es-BoSa5xIt.cjs.map +1 -0
  6. package/cjs/{matcher-logic-SBnzYohQ.cjs → matcher-logic-07fFOz7r.cjs} +3 -3
  7. package/cjs/matcher-logic-07fFOz7r.cjs.map +1 -0
  8. package/cjs/{matchers-BBh3gyB-.cjs → matchers-DnV47KR_.cjs} +24 -24
  9. package/cjs/matchers-DnV47KR_.cjs.map +1 -0
  10. package/esm/agent/agent-config.type.d.mts +1 -1
  11. package/esm/agent/agent-config.type.d.mts.map +1 -1
  12. package/esm/agent/agent-input-builder.mjs +1 -1
  13. package/esm/agent/agent-input-builder.mjs.map +1 -1
  14. package/esm/agent/agent-log-event.mjs +1 -1
  15. package/esm/agent/agent-log-event.mjs.map +1 -1
  16. package/esm/agent/agent-stream.d.mts +1 -1
  17. package/esm/agent/agent-stream.d.mts.map +1 -1
  18. package/esm/agent/agent-stream.mjs +1 -1
  19. package/esm/agent/agent-stream.mjs.map +1 -1
  20. package/esm/agent/agent-to-stream-event.mjs +1 -1
  21. package/esm/agent/agent-to-stream-event.mjs.map +1 -1
  22. package/esm/agent/agent.d.mts +1 -1
  23. package/esm/agent/agent.d.mts.map +1 -1
  24. package/esm/agent/agent.mjs +1 -1
  25. package/esm/agent/agent.mjs.map +1 -1
  26. package/esm/agent/json-stream-guard.mjs +1 -1
  27. package/esm/agent/json-stream-guard.mjs.map +1 -1
  28. package/esm/agent/judge-config.type.d.mts +1 -1
  29. package/esm/agent/judge-config.type.d.mts.map +1 -1
  30. package/esm/agent/judge-config.type.mjs +1 -1
  31. package/esm/agent/judge-config.type.mjs.map +1 -1
  32. package/esm/agent/signature.mjs +1 -1
  33. package/esm/agent/signature.mjs.map +1 -1
  34. package/esm/agent/snapshot.mjs +1 -1
  35. package/esm/agent/snapshot.mjs.map +1 -1
  36. package/esm/agent/spawn-sub-agent.d.mts +1 -1
  37. package/esm/agent/spawn-sub-agent.d.mts.map +1 -1
  38. package/esm/agent/spawn-sub-agent.mjs +1 -1
  39. package/esm/agent/spawn-sub-agent.mjs.map +1 -1
  40. package/esm/ai.d.mts +1 -1
  41. package/esm/ai.d.mts.map +1 -1
  42. package/esm/ai.mjs +1 -1
  43. package/esm/ai.mjs.map +1 -1
  44. package/esm/batch/batch.d.mts +1 -1
  45. package/esm/batch/batch.d.mts.map +1 -1
  46. package/esm/batch/batch.mjs +1 -1
  47. package/esm/batch/batch.mjs.map +1 -1
  48. package/esm/batch/batch.type.d.mts +1 -1
  49. package/esm/batch/batch.type.d.mts.map +1 -1
  50. package/esm/batch/run-batch-item.mjs +1 -1
  51. package/esm/batch/run-batch-item.mjs.map +1 -1
  52. package/esm/batch/run-with-concurrency.mjs +1 -1
  53. package/esm/batch/run-with-concurrency.mjs.map +1 -1
  54. package/esm/checkpoint/memory.d.mts +1 -1
  55. package/esm/checkpoint/memory.d.mts.map +1 -1
  56. package/esm/checkpoint/memory.mjs +0 -0
  57. package/esm/checkpoint/memory.mjs.map +1 -1
  58. package/esm/checkpoint/pg.d.mts +1 -1
  59. package/esm/checkpoint/pg.d.mts.map +1 -1
  60. package/esm/checkpoint/pg.mjs +1 -1
  61. package/esm/checkpoint/pg.mjs.map +1 -1
  62. package/esm/checkpoint/redis.d.mts +1 -1
  63. package/esm/checkpoint/redis.d.mts.map +1 -1
  64. package/esm/checkpoint/redis.mjs +1 -1
  65. package/esm/checkpoint/redis.mjs.map +1 -1
  66. package/esm/config.d.mts +1 -1
  67. package/esm/config.d.mts.map +1 -1
  68. package/esm/config.mjs +1 -1
  69. package/esm/config.mjs.map +1 -1
  70. package/esm/contracts/agent/agent-options.type.d.mts +1 -1
  71. package/esm/contracts/agent/agent-options.type.d.mts.map +1 -1
  72. package/esm/contracts/agent/agent-snapshot.type.d.mts +1 -1
  73. package/esm/contracts/agent/agent-snapshot.type.d.mts.map +1 -1
  74. package/esm/contracts/agent/agent.contract.d.mts +1 -1
  75. package/esm/contracts/agent/agent.contract.d.mts.map +1 -1
  76. package/esm/contracts/agent/eval.type.d.mts +1 -1
  77. package/esm/contracts/agent/eval.type.d.mts.map +1 -1
  78. package/esm/contracts/attachment-policy.type.d.mts +1 -1
  79. package/esm/contracts/attachment-policy.type.d.mts.map +1 -1
  80. package/esm/contracts/attachment.type.d.mts +1 -1
  81. package/esm/contracts/attachment.type.d.mts.map +1 -1
  82. package/esm/contracts/content-part.type.d.mts +1 -1
  83. package/esm/contracts/content-part.type.d.mts.map +1 -1
  84. package/esm/contracts/conversation-message.type.d.mts +1 -1
  85. package/esm/contracts/conversation-message.type.d.mts.map +1 -1
  86. package/esm/contracts/embedder.contract.d.mts +1 -1
  87. package/esm/contracts/embedder.contract.d.mts.map +1 -1
  88. package/esm/contracts/end.type.d.mts +1 -1
  89. package/esm/contracts/end.type.d.mts.map +1 -1
  90. package/esm/contracts/end.type.mjs +1 -1
  91. package/esm/contracts/end.type.mjs.map +1 -1
  92. package/esm/contracts/events/agent-events.type.d.mts +1 -1
  93. package/esm/contracts/events/agent-events.type.d.mts.map +1 -1
  94. package/esm/contracts/events/complete-event.type.d.mts +1 -1
  95. package/esm/contracts/events/complete-event.type.d.mts.map +1 -1
  96. package/esm/contracts/events/event-identity.type.d.mts +1 -1
  97. package/esm/contracts/events/event-identity.type.d.mts.map +1 -1
  98. package/esm/contracts/events/event-map.type.d.mts +1 -1
  99. package/esm/contracts/events/event-map.type.d.mts.map +1 -1
  100. package/esm/contracts/events/supervisor-events.type.d.mts +1 -1
  101. package/esm/contracts/events/supervisor-events.type.d.mts.map +1 -1
  102. package/esm/contracts/events/usage-event.type.d.mts +1 -1
  103. package/esm/contracts/events/usage-event.type.d.mts.map +1 -1
  104. package/esm/contracts/events/workflow-events.type.d.mts +1 -1
  105. package/esm/contracts/events/workflow-events.type.d.mts.map +1 -1
  106. package/esm/contracts/executable.contract.d.mts +1 -1
  107. package/esm/contracts/executable.contract.d.mts.map +1 -1
  108. package/esm/contracts/fallback-model.contract.d.mts +1 -1
  109. package/esm/contracts/fallback-model.contract.d.mts.map +1 -1
  110. package/esm/contracts/finish-reason.type.d.mts +1 -1
  111. package/esm/contracts/finish-reason.type.d.mts.map +1 -1
  112. package/esm/contracts/image-model.contract.d.mts +1 -1
  113. package/esm/contracts/image-model.contract.d.mts.map +1 -1
  114. package/esm/contracts/memory/memory-config.type.d.mts +1 -1
  115. package/esm/contracts/memory/memory-config.type.d.mts.map +1 -1
  116. package/esm/contracts/memory/memory-item.type.d.mts +1 -1
  117. package/esm/contracts/memory/memory-item.type.d.mts.map +1 -1
  118. package/esm/contracts/memory/memory.contract.d.mts +1 -1
  119. package/esm/contracts/memory/memory.contract.d.mts.map +1 -1
  120. package/esm/contracts/memory/recall-options.type.d.mts +1 -1
  121. package/esm/contracts/memory/recall-options.type.d.mts.map +1 -1
  122. package/esm/contracts/middleware/middleware-context.type.d.mts +1 -1
  123. package/esm/contracts/middleware/middleware-context.type.d.mts.map +1 -1
  124. package/esm/contracts/middleware/middleware-state.type.d.mts +1 -1
  125. package/esm/contracts/middleware/middleware-state.type.d.mts.map +1 -1
  126. package/esm/contracts/middleware/middleware.contract.d.mts +1 -1
  127. package/esm/contracts/middleware/middleware.contract.d.mts.map +1 -1
  128. package/esm/contracts/model-tool-call-request.type.d.mts +1 -1
  129. package/esm/contracts/model-tool-call-request.type.d.mts.map +1 -1
  130. package/esm/contracts/model.contract.d.mts +9 -1
  131. package/esm/contracts/model.contract.d.mts.map +1 -1
  132. package/esm/contracts/orchestrator/checkpoint-store.contract.d.mts +1 -1
  133. package/esm/contracts/orchestrator/checkpoint-store.contract.d.mts.map +1 -1
  134. package/esm/contracts/orchestrator/orchestrator-commands.type.d.mts +1 -1
  135. package/esm/contracts/orchestrator/orchestrator-commands.type.d.mts.map +1 -1
  136. package/esm/contracts/orchestrator/orchestrator-config.type.d.mts +1 -1
  137. package/esm/contracts/orchestrator/orchestrator-config.type.d.mts.map +1 -1
  138. package/esm/contracts/orchestrator/orchestrator-event.type.d.mts +1 -1
  139. package/esm/contracts/orchestrator/orchestrator-event.type.d.mts.map +1 -1
  140. package/esm/contracts/orchestrator/orchestrator-execute-options.type.d.mts +1 -1
  141. package/esm/contracts/orchestrator/orchestrator-execute-options.type.d.mts.map +1 -1
  142. package/esm/contracts/orchestrator/orchestrator.contract.d.mts +1 -1
  143. package/esm/contracts/orchestrator/orchestrator.contract.d.mts.map +1 -1
  144. package/esm/contracts/orchestrator/session-lock.contract.d.mts +1 -1
  145. package/esm/contracts/orchestrator/session-lock.contract.d.mts.map +1 -1
  146. package/esm/contracts/orchestrator/session.contract.d.mts +1 -1
  147. package/esm/contracts/orchestrator/session.contract.d.mts.map +1 -1
  148. package/esm/contracts/orchestrator/snapshot-store.contract.d.mts +1 -1
  149. package/esm/contracts/orchestrator/snapshot-store.contract.d.mts.map +1 -1
  150. package/esm/contracts/placeholders.type.d.mts +1 -1
  151. package/esm/contracts/placeholders.type.d.mts.map +1 -1
  152. package/esm/contracts/planner/planner-capability.type.d.mts +1 -1
  153. package/esm/contracts/planner/planner-capability.type.d.mts.map +1 -1
  154. package/esm/contracts/planner/planner-config.type.d.mts +1 -1
  155. package/esm/contracts/planner/planner-config.type.d.mts.map +1 -1
  156. package/esm/contracts/planner/planner-execute-options.type.d.mts +1 -1
  157. package/esm/contracts/planner/planner-execute-options.type.d.mts.map +1 -1
  158. package/esm/contracts/planner/planner-plan.type.d.mts +1 -1
  159. package/esm/contracts/planner/planner-plan.type.d.mts.map +1 -1
  160. package/esm/contracts/planner/planner-result.type.d.mts +1 -1
  161. package/esm/contracts/planner/planner-result.type.d.mts.map +1 -1
  162. package/esm/contracts/planner/planner-snapshot.type.d.mts +1 -1
  163. package/esm/contracts/planner/planner-snapshot.type.d.mts.map +1 -1
  164. package/esm/contracts/planner/planner.contract.d.mts +1 -1
  165. package/esm/contracts/planner/planner.contract.d.mts.map +1 -1
  166. package/esm/contracts/result/agent-result.type.d.mts +1 -1
  167. package/esm/contracts/result/agent-result.type.d.mts.map +1 -1
  168. package/esm/contracts/result/attempt-entry.type.d.mts +1 -1
  169. package/esm/contracts/result/attempt-entry.type.d.mts.map +1 -1
  170. package/esm/contracts/result/base-report.type.d.mts +1 -1
  171. package/esm/contracts/result/base-report.type.d.mts.map +1 -1
  172. package/esm/contracts/result/base-report.type.mjs +1 -1
  173. package/esm/contracts/result/base-report.type.mjs.map +1 -1
  174. package/esm/contracts/result/base-result.type.d.mts +1 -1
  175. package/esm/contracts/result/base-result.type.d.mts.map +1 -1
  176. package/esm/contracts/result/execute-result.type.d.mts +1 -1
  177. package/esm/contracts/result/execute-result.type.d.mts.map +1 -1
  178. package/esm/contracts/result/execution-report.type.d.mts +1 -1
  179. package/esm/contracts/result/execution-report.type.d.mts.map +1 -1
  180. package/esm/contracts/result/llm-trip.type.d.mts +1 -1
  181. package/esm/contracts/result/llm-trip.type.d.mts.map +1 -1
  182. package/esm/contracts/result/model-pricing.type.d.mts +1 -1
  183. package/esm/contracts/result/model-pricing.type.d.mts.map +1 -1
  184. package/esm/contracts/result/orchestrator-result.type.d.mts +1 -1
  185. package/esm/contracts/result/orchestrator-result.type.d.mts.map +1 -1
  186. package/esm/contracts/result/session-send-result.type.d.mts +1 -1
  187. package/esm/contracts/result/session-send-result.type.d.mts.map +1 -1
  188. package/esm/contracts/result/step-result.type.d.mts +12 -2
  189. package/esm/contracts/result/step-result.type.d.mts.map +1 -1
  190. package/esm/contracts/result/supervisor-result.type.d.mts +1 -1
  191. package/esm/contracts/result/supervisor-result.type.d.mts.map +1 -1
  192. package/esm/contracts/result/tool-call.type.d.mts +1 -1
  193. package/esm/contracts/result/tool-call.type.d.mts.map +1 -1
  194. package/esm/contracts/result/usage.type.d.mts +1 -1
  195. package/esm/contracts/result/usage.type.d.mts.map +1 -1
  196. package/esm/contracts/result/workflow-result.type.d.mts +1 -1
  197. package/esm/contracts/result/workflow-result.type.d.mts.map +1 -1
  198. package/esm/contracts/sdk-adapter.contract.d.mts +1 -1
  199. package/esm/contracts/sdk-adapter.contract.d.mts.map +1 -1
  200. package/esm/contracts/speech-model.contract.d.mts +1 -1
  201. package/esm/contracts/speech-model.contract.d.mts.map +1 -1
  202. package/esm/contracts/stream/stream-event.type.d.mts +1 -1
  203. package/esm/contracts/stream/stream-event.type.d.mts.map +1 -1
  204. package/esm/contracts/stream/stream.contract.d.mts +1 -1
  205. package/esm/contracts/stream/stream.contract.d.mts.map +1 -1
  206. package/esm/contracts/streaming-tool-guard-config.type.d.mts +1 -1
  207. package/esm/contracts/streaming-tool-guard-config.type.d.mts.map +1 -1
  208. package/esm/contracts/supervisor/ack-entry.type.d.mts +1 -1
  209. package/esm/contracts/supervisor/ack-entry.type.d.mts.map +1 -1
  210. package/esm/contracts/supervisor/classifier-context.type.d.mts +1 -1
  211. package/esm/contracts/supervisor/classifier-context.type.d.mts.map +1 -1
  212. package/esm/contracts/supervisor/dispatch-context.type.d.mts +1 -1
  213. package/esm/contracts/supervisor/dispatch-context.type.d.mts.map +1 -1
  214. package/esm/contracts/supervisor/evaluate-context.type.d.mts +1 -1
  215. package/esm/contracts/supervisor/evaluate-context.type.d.mts.map +1 -1
  216. package/esm/contracts/supervisor/intent-entry.type.d.mts +1 -1
  217. package/esm/contracts/supervisor/intent-entry.type.d.mts.map +1 -1
  218. package/esm/contracts/supervisor/iteration-snapshot.type.d.mts +1 -1
  219. package/esm/contracts/supervisor/iteration-snapshot.type.d.mts.map +1 -1
  220. package/esm/contracts/supervisor/next.type.d.mts +1 -1
  221. package/esm/contracts/supervisor/next.type.d.mts.map +1 -1
  222. package/esm/contracts/supervisor/route-context.type.d.mts +1 -1
  223. package/esm/contracts/supervisor/route-context.type.d.mts.map +1 -1
  224. package/esm/contracts/supervisor/router-entry.type.d.mts +1 -1
  225. package/esm/contracts/supervisor/router-entry.type.d.mts.map +1 -1
  226. package/esm/contracts/supervisor/supervisor-config.type.d.mts +1 -1
  227. package/esm/contracts/supervisor/supervisor-config.type.d.mts.map +1 -1
  228. package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts +1 -1
  229. package/esm/contracts/supervisor/supervisor-execute-options.type.d.mts.map +1 -1
  230. package/esm/contracts/supervisor/supervisor-input.type.d.mts +1 -1
  231. package/esm/contracts/supervisor/supervisor-input.type.d.mts.map +1 -1
  232. package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts +1 -1
  233. package/esm/contracts/supervisor/supervisor-snapshot.type.d.mts.map +1 -1
  234. package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts +1 -1
  235. package/esm/contracts/supervisor/supervisor-stream-event.type.d.mts.map +1 -1
  236. package/esm/contracts/supervisor/supervisor.contract.d.mts +1 -1
  237. package/esm/contracts/supervisor/supervisor.contract.d.mts.map +1 -1
  238. package/esm/contracts/system-prompt.contract.d.mts +1 -1
  239. package/esm/contracts/system-prompt.contract.d.mts.map +1 -1
  240. package/esm/contracts/team/team-config.type.d.mts +1 -1
  241. package/esm/contracts/team/team-config.type.d.mts.map +1 -1
  242. package/esm/contracts/tool.contract.d.mts +1 -1
  243. package/esm/contracts/tool.contract.d.mts.map +1 -1
  244. package/esm/contracts/transcription-model.contract.d.mts +1 -1
  245. package/esm/contracts/transcription-model.contract.d.mts.map +1 -1
  246. package/esm/contracts/workflow/next-step-result.type.d.mts +1 -1
  247. package/esm/contracts/workflow/next-step-result.type.d.mts.map +1 -1
  248. package/esm/contracts/workflow/retry-config.type.d.mts +1 -1
  249. package/esm/contracts/workflow/retry-config.type.d.mts.map +1 -1
  250. package/esm/contracts/workflow/step.contract.d.mts +1 -1
  251. package/esm/contracts/workflow/step.contract.d.mts.map +1 -1
  252. package/esm/contracts/workflow/workflow-context.type.d.mts +1 -1
  253. package/esm/contracts/workflow/workflow-context.type.d.mts.map +1 -1
  254. package/esm/contracts/workflow/workflow-snapshot.type.d.mts +1 -1
  255. package/esm/contracts/workflow/workflow-snapshot.type.d.mts.map +1 -1
  256. package/esm/contracts/workflow/workflow.contract.d.mts +1 -1
  257. package/esm/contracts/workflow/workflow.contract.d.mts.map +1 -1
  258. package/esm/errors/agent-cancelled-error.d.mts +1 -1
  259. package/esm/errors/agent-cancelled-error.d.mts.map +1 -1
  260. package/esm/errors/agent-cancelled-error.mjs +1 -1
  261. package/esm/errors/agent-cancelled-error.mjs.map +1 -1
  262. package/esm/errors/agent-drift-error.d.mts +1 -1
  263. package/esm/errors/agent-drift-error.d.mts.map +1 -1
  264. package/esm/errors/agent-drift-error.mjs +1 -1
  265. package/esm/errors/agent-drift-error.mjs.map +1 -1
  266. package/esm/errors/agent-execution-error.d.mts +1 -1
  267. package/esm/errors/agent-execution-error.d.mts.map +1 -1
  268. package/esm/errors/agent-execution-error.mjs +1 -1
  269. package/esm/errors/agent-execution-error.mjs.map +1 -1
  270. package/esm/errors/agent-max-trips-error.d.mts +1 -1
  271. package/esm/errors/agent-max-trips-error.d.mts.map +1 -1
  272. package/esm/errors/agent-max-trips-error.mjs +1 -1
  273. package/esm/errors/agent-max-trips-error.mjs.map +1 -1
  274. package/esm/errors/ai-error.d.mts +1 -1
  275. package/esm/errors/ai-error.d.mts.map +1 -1
  276. package/esm/errors/ai-error.mjs +1 -1
  277. package/esm/errors/ai-error.mjs.map +1 -1
  278. package/esm/errors/budget-exceeded-error.d.mts +1 -1
  279. package/esm/errors/budget-exceeded-error.d.mts.map +1 -1
  280. package/esm/errors/budget-exceeded-error.mjs +1 -1
  281. package/esm/errors/budget-exceeded-error.mjs.map +1 -1
  282. package/esm/errors/content-filter-error.d.mts +1 -1
  283. package/esm/errors/content-filter-error.d.mts.map +1 -1
  284. package/esm/errors/content-filter-error.mjs +1 -1
  285. package/esm/errors/content-filter-error.mjs.map +1 -1
  286. package/esm/errors/context-length-exceeded-error.d.mts +1 -1
  287. package/esm/errors/context-length-exceeded-error.d.mts.map +1 -1
  288. package/esm/errors/context-length-exceeded-error.mjs +1 -1
  289. package/esm/errors/context-length-exceeded-error.mjs.map +1 -1
  290. package/esm/errors/error-category.type.d.mts +1 -1
  291. package/esm/errors/error-category.type.d.mts.map +1 -1
  292. package/esm/errors/error-code.type.d.mts +1 -1
  293. package/esm/errors/error-code.type.d.mts.map +1 -1
  294. package/esm/errors/guardrail-violation-error.d.mts +1 -1
  295. package/esm/errors/guardrail-violation-error.d.mts.map +1 -1
  296. package/esm/errors/guardrail-violation-error.mjs +1 -1
  297. package/esm/errors/guardrail-violation-error.mjs.map +1 -1
  298. package/esm/errors/invalid-request-error.d.mts +1 -1
  299. package/esm/errors/invalid-request-error.d.mts.map +1 -1
  300. package/esm/errors/invalid-request-error.mjs +1 -1
  301. package/esm/errors/invalid-request-error.mjs.map +1 -1
  302. package/esm/errors/max-iterations-error.d.mts +1 -1
  303. package/esm/errors/max-iterations-error.d.mts.map +1 -1
  304. package/esm/errors/max-iterations-error.mjs +1 -1
  305. package/esm/errors/max-iterations-error.mjs.map +1 -1
  306. package/esm/errors/max-steps-exceeded-error.d.mts +1 -1
  307. package/esm/errors/max-steps-exceeded-error.d.mts.map +1 -1
  308. package/esm/errors/max-steps-exceeded-error.mjs +1 -1
  309. package/esm/errors/max-steps-exceeded-error.mjs.map +1 -1
  310. package/esm/errors/orchestrator-cancelled-error.d.mts +1 -1
  311. package/esm/errors/orchestrator-cancelled-error.d.mts.map +1 -1
  312. package/esm/errors/orchestrator-cancelled-error.mjs +1 -1
  313. package/esm/errors/orchestrator-cancelled-error.mjs.map +1 -1
  314. package/esm/errors/orchestrator-config-error.d.mts +1 -1
  315. package/esm/errors/orchestrator-config-error.d.mts.map +1 -1
  316. package/esm/errors/orchestrator-config-error.mjs +1 -1
  317. package/esm/errors/orchestrator-config-error.mjs.map +1 -1
  318. package/esm/errors/orchestrator-drift-error.d.mts +1 -1
  319. package/esm/errors/orchestrator-drift-error.d.mts.map +1 -1
  320. package/esm/errors/orchestrator-drift-error.mjs +1 -1
  321. package/esm/errors/orchestrator-drift-error.mjs.map +1 -1
  322. package/esm/errors/orchestrator-failed-error.d.mts +1 -1
  323. package/esm/errors/orchestrator-failed-error.d.mts.map +1 -1
  324. package/esm/errors/orchestrator-failed-error.mjs +1 -1
  325. package/esm/errors/orchestrator-failed-error.mjs.map +1 -1
  326. package/esm/errors/outbound-policy-error.d.mts +1 -1
  327. package/esm/errors/outbound-policy-error.d.mts.map +1 -1
  328. package/esm/errors/outbound-policy-error.mjs +1 -1
  329. package/esm/errors/outbound-policy-error.mjs.map +1 -1
  330. package/esm/errors/planner-cancelled-error.d.mts +1 -1
  331. package/esm/errors/planner-cancelled-error.d.mts.map +1 -1
  332. package/esm/errors/planner-cancelled-error.mjs +1 -1
  333. package/esm/errors/planner-cancelled-error.mjs.map +1 -1
  334. package/esm/errors/planner-drift-error.d.mts +1 -1
  335. package/esm/errors/planner-drift-error.d.mts.map +1 -1
  336. package/esm/errors/planner-drift-error.mjs +1 -1
  337. package/esm/errors/planner-drift-error.mjs.map +1 -1
  338. package/esm/errors/planner-failed-error.d.mts +1 -1
  339. package/esm/errors/planner-failed-error.d.mts.map +1 -1
  340. package/esm/errors/planner-failed-error.mjs +1 -1
  341. package/esm/errors/planner-failed-error.mjs.map +1 -1
  342. package/esm/errors/planner-plan-invalid-error.d.mts +1 -1
  343. package/esm/errors/planner-plan-invalid-error.d.mts.map +1 -1
  344. package/esm/errors/planner-plan-invalid-error.mjs +1 -1
  345. package/esm/errors/planner-plan-invalid-error.mjs.map +1 -1
  346. package/esm/errors/prompt-refinement-error.d.mts +1 -1
  347. package/esm/errors/prompt-refinement-error.d.mts.map +1 -1
  348. package/esm/errors/prompt-refinement-error.mjs +1 -1
  349. package/esm/errors/prompt-refinement-error.mjs.map +1 -1
  350. package/esm/errors/provider-auth-error.d.mts +1 -1
  351. package/esm/errors/provider-auth-error.d.mts.map +1 -1
  352. package/esm/errors/provider-auth-error.mjs +1 -1
  353. package/esm/errors/provider-auth-error.mjs.map +1 -1
  354. package/esm/errors/provider-error.d.mts +1 -1
  355. package/esm/errors/provider-error.d.mts.map +1 -1
  356. package/esm/errors/provider-error.mjs +1 -1
  357. package/esm/errors/provider-error.mjs.map +1 -1
  358. package/esm/errors/provider-rate-limit-error.d.mts +1 -1
  359. package/esm/errors/provider-rate-limit-error.d.mts.map +1 -1
  360. package/esm/errors/provider-rate-limit-error.mjs +1 -1
  361. package/esm/errors/provider-rate-limit-error.mjs.map +1 -1
  362. package/esm/errors/provider-timeout-error.d.mts +1 -1
  363. package/esm/errors/provider-timeout-error.d.mts.map +1 -1
  364. package/esm/errors/provider-timeout-error.mjs +1 -1
  365. package/esm/errors/provider-timeout-error.mjs.map +1 -1
  366. package/esm/errors/quota-exceeded-error.d.mts +1 -1
  367. package/esm/errors/quota-exceeded-error.d.mts.map +1 -1
  368. package/esm/errors/quota-exceeded-error.mjs +1 -1
  369. package/esm/errors/quota-exceeded-error.mjs.map +1 -1
  370. package/esm/errors/routing-error.d.mts +1 -1
  371. package/esm/errors/routing-error.d.mts.map +1 -1
  372. package/esm/errors/routing-error.mjs +1 -1
  373. package/esm/errors/routing-error.mjs.map +1 -1
  374. package/esm/errors/schema-validation-error.d.mts +1 -1
  375. package/esm/errors/schema-validation-error.d.mts.map +1 -1
  376. package/esm/errors/schema-validation-error.mjs +1 -1
  377. package/esm/errors/schema-validation-error.mjs.map +1 -1
  378. package/esm/errors/step-failed-error.d.mts +1 -1
  379. package/esm/errors/step-failed-error.d.mts.map +1 -1
  380. package/esm/errors/step-failed-error.mjs +1 -1
  381. package/esm/errors/step-failed-error.mjs.map +1 -1
  382. package/esm/errors/supervisor-cancelled-error.d.mts +1 -1
  383. package/esm/errors/supervisor-cancelled-error.d.mts.map +1 -1
  384. package/esm/errors/supervisor-cancelled-error.mjs +1 -1
  385. package/esm/errors/supervisor-cancelled-error.mjs.map +1 -1
  386. package/esm/errors/supervisor-drift-error.d.mts +1 -1
  387. package/esm/errors/supervisor-drift-error.d.mts.map +1 -1
  388. package/esm/errors/supervisor-drift-error.mjs +1 -1
  389. package/esm/errors/supervisor-drift-error.mjs.map +1 -1
  390. package/esm/errors/supervisor-failed-error.d.mts +1 -1
  391. package/esm/errors/supervisor-failed-error.d.mts.map +1 -1
  392. package/esm/errors/supervisor-failed-error.mjs +1 -1
  393. package/esm/errors/supervisor-failed-error.mjs.map +1 -1
  394. package/esm/errors/supervisor-routing-error.d.mts +1 -1
  395. package/esm/errors/supervisor-routing-error.d.mts.map +1 -1
  396. package/esm/errors/supervisor-routing-error.mjs +1 -1
  397. package/esm/errors/supervisor-routing-error.mjs.map +1 -1
  398. package/esm/errors/tool-execution-error.d.mts +1 -1
  399. package/esm/errors/tool-execution-error.d.mts.map +1 -1
  400. package/esm/errors/tool-execution-error.mjs +1 -1
  401. package/esm/errors/tool-execution-error.mjs.map +1 -1
  402. package/esm/errors/workflow-cancelled-error.d.mts +1 -1
  403. package/esm/errors/workflow-cancelled-error.d.mts.map +1 -1
  404. package/esm/errors/workflow-cancelled-error.mjs +1 -1
  405. package/esm/errors/workflow-cancelled-error.mjs.map +1 -1
  406. package/esm/errors/workflow-drift-error.d.mts +1 -1
  407. package/esm/errors/workflow-drift-error.d.mts.map +1 -1
  408. package/esm/errors/workflow-drift-error.mjs +1 -1
  409. package/esm/errors/workflow-drift-error.mjs.map +1 -1
  410. package/esm/errors/workflow-error.d.mts +1 -1
  411. package/esm/errors/workflow-error.d.mts.map +1 -1
  412. package/esm/errors/workflow-error.mjs +1 -1
  413. package/esm/errors/workflow-error.mjs.map +1 -1
  414. package/esm/eval/dataset.d.mts +1 -1
  415. package/esm/eval/dataset.d.mts.map +1 -1
  416. package/esm/eval/dataset.mjs +1 -1
  417. package/esm/eval/dataset.mjs.map +1 -1
  418. package/esm/eval/dataset.type.d.mts +1 -1
  419. package/esm/eval/dataset.type.d.mts.map +1 -1
  420. package/esm/eval/eval-runner.d.mts +1 -1
  421. package/esm/eval/eval-runner.d.mts.map +1 -1
  422. package/esm/eval/eval-runner.mjs +1 -1
  423. package/esm/eval/eval-runner.mjs.map +1 -1
  424. package/esm/eval/index.d.mts +1 -1
  425. package/esm/eval/index.d.mts.map +1 -1
  426. package/esm/eval/index.mjs +1 -1
  427. package/esm/eval/index.mjs.map +1 -1
  428. package/esm/eval/judge-scorer.d.mts +1 -1
  429. package/esm/eval/judge-scorer.d.mts.map +1 -1
  430. package/esm/eval/judge-scorer.mjs +1 -1
  431. package/esm/eval/judge-scorer.mjs.map +1 -1
  432. package/esm/eval/regression.d.mts +1 -1
  433. package/esm/eval/regression.d.mts.map +1 -1
  434. package/esm/eval/regression.mjs +1 -1
  435. package/esm/eval/regression.mjs.map +1 -1
  436. package/esm/eval/report-json.d.mts +1 -1
  437. package/esm/eval/report-json.d.mts.map +1 -1
  438. package/esm/eval/report-json.mjs +1 -1
  439. package/esm/eval/report-json.mjs.map +1 -1
  440. package/esm/eval/report-junit.d.mts +1 -1
  441. package/esm/eval/report-junit.d.mts.map +1 -1
  442. package/esm/eval/report-junit.mjs +1 -1
  443. package/esm/eval/report-junit.mjs.map +1 -1
  444. package/esm/eval/scorers.d.mts +1 -1
  445. package/esm/eval/scorers.d.mts.map +1 -1
  446. package/esm/eval/scorers.mjs +1 -1
  447. package/esm/eval/scorers.mjs.map +1 -1
  448. package/esm/guard/contracts/guard-options.type.d.mts +1 -1
  449. package/esm/guard/contracts/guard-options.type.d.mts.map +1 -1
  450. package/esm/guard/contracts/guardrail.contract.d.mts +1 -1
  451. package/esm/guard/contracts/guardrail.contract.d.mts.map +1 -1
  452. package/esm/guard/contracts/openai-client.contract.d.mts +1 -1
  453. package/esm/guard/contracts/openai-client.contract.d.mts.map +1 -1
  454. package/esm/guard/contracts/verdict.type.d.mts +1 -1
  455. package/esm/guard/contracts/verdict.type.d.mts.map +1 -1
  456. package/esm/guard/detectors/injection.d.mts +1 -1
  457. package/esm/guard/detectors/injection.d.mts.map +1 -1
  458. package/esm/guard/detectors/injection.mjs +1 -1
  459. package/esm/guard/detectors/injection.mjs.map +1 -1
  460. package/esm/guard/detectors/moderation.d.mts +1 -1
  461. package/esm/guard/detectors/moderation.d.mts.map +1 -1
  462. package/esm/guard/detectors/moderation.mjs +1 -1
  463. package/esm/guard/detectors/moderation.mjs.map +1 -1
  464. package/esm/guard/detectors/pii.d.mts +1 -1
  465. package/esm/guard/detectors/pii.d.mts.map +1 -1
  466. package/esm/guard/detectors/pii.mjs +1 -1
  467. package/esm/guard/detectors/pii.mjs.map +1 -1
  468. package/esm/guard/detectors/topic.d.mts +1 -1
  469. package/esm/guard/detectors/topic.d.mts.map +1 -1
  470. package/esm/guard/detectors/topic.mjs +1 -1
  471. package/esm/guard/detectors/topic.mjs.map +1 -1
  472. package/esm/guard/errors.d.mts +1 -1
  473. package/esm/guard/errors.d.mts.map +1 -1
  474. package/esm/guard/errors.mjs +1 -1
  475. package/esm/guard/errors.mjs.map +1 -1
  476. package/esm/guard/guard.d.mts +1 -1
  477. package/esm/guard/guard.d.mts.map +1 -1
  478. package/esm/guard/guard.mjs +1 -1
  479. package/esm/guard/guard.mjs.map +1 -1
  480. package/esm/guard/guardrail.d.mts +1 -1
  481. package/esm/guard/guardrail.d.mts.map +1 -1
  482. package/esm/guard/guardrail.mjs +1 -1
  483. package/esm/guard/guardrail.mjs.map +1 -1
  484. package/esm/human/contracts/approval.type.d.mts +1 -1
  485. package/esm/human/contracts/approval.type.d.mts.map +1 -1
  486. package/esm/human/contracts/human-approval.type.d.mts +1 -1
  487. package/esm/human/contracts/human-approval.type.d.mts.map +1 -1
  488. package/esm/human/contracts/interrupt-store.contract.d.mts +1 -1
  489. package/esm/human/contracts/interrupt-store.contract.d.mts.map +1 -1
  490. package/esm/human/contracts/resume.type.d.mts +1 -1
  491. package/esm/human/contracts/resume.type.d.mts.map +1 -1
  492. package/esm/human/errors.d.mts +1 -1
  493. package/esm/human/errors.d.mts.map +1 -1
  494. package/esm/human/errors.mjs +1 -1
  495. package/esm/human/errors.mjs.map +1 -1
  496. package/esm/human/human-approval.d.mts +1 -1
  497. package/esm/human/human-approval.d.mts.map +1 -1
  498. package/esm/human/human-approval.mjs +1 -1
  499. package/esm/human/human-approval.mjs.map +1 -1
  500. package/esm/human/policy.d.mts +1 -1
  501. package/esm/human/policy.d.mts.map +1 -1
  502. package/esm/human/policy.mjs +1 -1
  503. package/esm/human/policy.mjs.map +1 -1
  504. package/esm/human/register.mjs +1 -1
  505. package/esm/human/register.mjs.map +1 -1
  506. package/esm/human/resume-seed.mjs +1 -1
  507. package/esm/human/resume-seed.mjs.map +1 -1
  508. package/esm/human/resume.d.mts +1 -1
  509. package/esm/human/resume.d.mts.map +1 -1
  510. package/esm/human/resume.mjs +1 -1
  511. package/esm/human/resume.mjs.map +1 -1
  512. package/esm/human/stores/memory.d.mts +1 -1
  513. package/esm/human/stores/memory.d.mts.map +1 -1
  514. package/esm/human/stores/memory.mjs +1 -1
  515. package/esm/human/stores/memory.mjs.map +1 -1
  516. package/esm/human/stores/pg.d.mts +1 -1
  517. package/esm/human/stores/pg.d.mts.map +1 -1
  518. package/esm/human/stores/pg.mjs +1 -1
  519. package/esm/human/stores/pg.mjs.map +1 -1
  520. package/esm/human/stores/redis.d.mts +1 -1
  521. package/esm/human/stores/redis.d.mts.map +1 -1
  522. package/esm/human/stores/redis.mjs +1 -1
  523. package/esm/human/stores/redis.mjs.map +1 -1
  524. package/esm/image/image-cost.d.mts +1 -1
  525. package/esm/image/image-cost.d.mts.map +1 -1
  526. package/esm/image/image-cost.mjs +1 -1
  527. package/esm/image/image-cost.mjs.map +1 -1
  528. package/esm/image/image.d.mts +1 -1
  529. package/esm/image/image.d.mts.map +1 -1
  530. package/esm/image/image.mjs +1 -1
  531. package/esm/image/image.mjs.map +1 -1
  532. package/esm/memory/derive-id.mjs +1 -1
  533. package/esm/memory/derive-id.mjs.map +1 -1
  534. package/esm/memory/episodic-memory.mjs +1 -1
  535. package/esm/memory/episodic-memory.mjs.map +1 -1
  536. package/esm/memory/memory.d.mts +1 -1
  537. package/esm/memory/memory.d.mts.map +1 -1
  538. package/esm/memory/memory.mjs +1 -1
  539. package/esm/memory/memory.mjs.map +1 -1
  540. package/esm/memory/procedural-memory.mjs +1 -1
  541. package/esm/memory/procedural-memory.mjs.map +1 -1
  542. package/esm/memory/semantic-memory.mjs +1 -1
  543. package/esm/memory/semantic-memory.mjs.map +1 -1
  544. package/esm/memory/working-memory.mjs +1 -1
  545. package/esm/memory/working-memory.mjs.map +1 -1
  546. package/esm/middleware/builtins/budget-contract.type.d.mts +1 -1
  547. package/esm/middleware/builtins/budget-contract.type.d.mts.map +1 -1
  548. package/esm/middleware/builtins/budget.d.mts +1 -1
  549. package/esm/middleware/builtins/budget.d.mts.map +1 -1
  550. package/esm/middleware/builtins/budget.mjs +1 -1
  551. package/esm/middleware/builtins/budget.mjs.map +1 -1
  552. package/esm/middleware/builtins/guardrail.d.mts +1 -1
  553. package/esm/middleware/builtins/guardrail.d.mts.map +1 -1
  554. package/esm/middleware/builtins/guardrail.mjs +1 -1
  555. package/esm/middleware/builtins/guardrail.mjs.map +1 -1
  556. package/esm/middleware/builtins/semantic-cache.d.mts +1 -1
  557. package/esm/middleware/builtins/semantic-cache.d.mts.map +1 -1
  558. package/esm/middleware/builtins/semantic-cache.mjs +1 -1
  559. package/esm/middleware/builtins/semantic-cache.mjs.map +1 -1
  560. package/esm/middleware/helpers/compose.d.mts +1 -1
  561. package/esm/middleware/helpers/compose.d.mts.map +1 -1
  562. package/esm/middleware/helpers/compose.mjs +1 -1
  563. package/esm/middleware/helpers/compose.mjs.map +1 -1
  564. package/esm/middleware/helpers/for-tool.d.mts +1 -1
  565. package/esm/middleware/helpers/for-tool.d.mts.map +1 -1
  566. package/esm/middleware/helpers/for-tool.mjs +1 -1
  567. package/esm/middleware/helpers/for-tool.mjs.map +1 -1
  568. package/esm/middleware/pipeline.d.mts +1 -1
  569. package/esm/middleware/pipeline.d.mts.map +1 -1
  570. package/esm/middleware/pipeline.mjs +1 -1
  571. package/esm/middleware/pipeline.mjs.map +1 -1
  572. package/esm/middleware/utils/extract-user-text.d.mts +1 -1
  573. package/esm/middleware/utils/extract-user-text.d.mts.map +1 -1
  574. package/esm/middleware/utils/extract-user-text.mjs +1 -1
  575. package/esm/middleware/utils/extract-user-text.mjs.map +1 -1
  576. package/esm/middleware/utils/namespaced-state.d.mts +1 -1
  577. package/esm/middleware/utils/namespaced-state.d.mts.map +1 -1
  578. package/esm/middleware/utils/namespaced-state.mjs +1 -1
  579. package/esm/middleware/utils/namespaced-state.mjs.map +1 -1
  580. package/esm/mock/mock-agent.d.mts +1 -1
  581. package/esm/mock/mock-agent.d.mts.map +1 -1
  582. package/esm/mock/mock-agent.mjs +1 -1
  583. package/esm/mock/mock-agent.mjs.map +1 -1
  584. package/esm/mock/mock-config.type.d.mts +1 -1
  585. package/esm/mock/mock-config.type.d.mts.map +1 -1
  586. package/esm/mock/mock-image-model.d.mts +1 -1
  587. package/esm/mock/mock-image-model.d.mts.map +1 -1
  588. package/esm/mock/mock-image-model.mjs +1 -1
  589. package/esm/mock/mock-image-model.mjs.map +1 -1
  590. package/esm/mock/mock-model.d.mts +1 -1
  591. package/esm/mock/mock-model.d.mts.map +1 -1
  592. package/esm/mock/mock-model.mjs +1 -1
  593. package/esm/mock/mock-model.mjs.map +1 -1
  594. package/esm/mock/mock-router.d.mts +1 -1
  595. package/esm/mock/mock-router.d.mts.map +1 -1
  596. package/esm/mock/mock-router.mjs +1 -1
  597. package/esm/mock/mock-router.mjs.map +1 -1
  598. package/esm/mock/mock-sdk.d.mts +1 -1
  599. package/esm/mock/mock-sdk.d.mts.map +1 -1
  600. package/esm/mock/mock-sdk.mjs +1 -1
  601. package/esm/mock/mock-sdk.mjs.map +1 -1
  602. package/esm/mock/mock-speech-model.d.mts +1 -1
  603. package/esm/mock/mock-speech-model.d.mts.map +1 -1
  604. package/esm/mock/mock-speech-model.mjs +1 -1
  605. package/esm/mock/mock-speech-model.mjs.map +1 -1
  606. package/esm/mock/mock-transcription-model.d.mts +1 -1
  607. package/esm/mock/mock-transcription-model.d.mts.map +1 -1
  608. package/esm/mock/mock-transcription-model.mjs +1 -1
  609. package/esm/mock/mock-transcription-model.mjs.map +1 -1
  610. package/esm/model/fallback-model.d.mts +1 -1
  611. package/esm/model/fallback-model.d.mts.map +1 -1
  612. package/esm/model/fallback-model.mjs +1 -1
  613. package/esm/model/fallback-model.mjs.map +1 -1
  614. package/esm/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +1 -1
  615. package/esm/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -1
  616. package/esm/node_modules/@vitest/expect/dist/index.mjs +1 -1
  617. package/esm/node_modules/@vitest/expect/dist/index.mjs.map +1 -1
  618. package/esm/node_modules/@vitest/pretty-format/dist/index.mjs +1 -1
  619. package/esm/node_modules/@vitest/pretty-format/dist/index.mjs.map +1 -1
  620. package/esm/node_modules/@vitest/runner/dist/chunk-artifact.mjs +1 -1
  621. package/esm/node_modules/@vitest/runner/dist/chunk-artifact.mjs.map +1 -1
  622. package/esm/node_modules/@vitest/snapshot/dist/index.mjs +1 -1
  623. package/esm/node_modules/@vitest/snapshot/dist/index.mjs.map +1 -1
  624. package/esm/node_modules/@vitest/spy/dist/index.mjs +1 -1
  625. package/esm/node_modules/@vitest/spy/dist/index.mjs.map +1 -1
  626. package/esm/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs +1 -1
  627. package/esm/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs.map +1 -1
  628. package/esm/node_modules/@vitest/utils/dist/diff.mjs +1 -1
  629. package/esm/node_modules/@vitest/utils/dist/diff.mjs.map +1 -1
  630. package/esm/node_modules/@vitest/utils/dist/display.mjs +1 -1
  631. package/esm/node_modules/@vitest/utils/dist/display.mjs.map +1 -1
  632. package/esm/node_modules/@vitest/utils/dist/error.mjs +1 -1
  633. package/esm/node_modules/@vitest/utils/dist/error.mjs.map +1 -1
  634. package/esm/node_modules/@vitest/utils/dist/helpers.mjs +1 -1
  635. package/esm/node_modules/@vitest/utils/dist/helpers.mjs.map +1 -1
  636. package/esm/node_modules/@vitest/utils/dist/offset.mjs +1 -1
  637. package/esm/node_modules/@vitest/utils/dist/offset.mjs.map +1 -1
  638. package/esm/node_modules/@vitest/utils/dist/serialize.mjs +1 -1
  639. package/esm/node_modules/@vitest/utils/dist/serialize.mjs.map +1 -1
  640. package/esm/node_modules/@vitest/utils/dist/source-map.mjs +1 -1
  641. package/esm/node_modules/@vitest/utils/dist/source-map.mjs.map +1 -1
  642. package/esm/node_modules/@vitest/utils/dist/timers.mjs +1 -1
  643. package/esm/node_modules/@vitest/utils/dist/timers.mjs.map +1 -1
  644. package/esm/node_modules/chai/index.mjs +1 -1
  645. package/esm/node_modules/chai/index.mjs.map +1 -1
  646. package/esm/node_modules/magic-string/dist/magic-string.es.mjs +1 -1
  647. package/esm/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -1
  648. package/esm/node_modules/tinyrainbow/dist/index.mjs +1 -1
  649. package/esm/node_modules/tinyrainbow/dist/index.mjs.map +1 -1
  650. package/esm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs +1 -1
  651. package/esm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs.map +1 -1
  652. package/esm/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs +1 -1
  653. package/esm/node_modules/vitest/dist/chunks/rpc.MzXet3jl.mjs.map +1 -1
  654. package/esm/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs +1 -1
  655. package/esm/node_modules/vitest/dist/chunks/test.DNmyFkvJ.mjs.map +1 -1
  656. package/esm/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs +1 -1
  657. package/esm/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.mjs.map +1 -1
  658. package/esm/object-stream/parse-partial-json.d.mts +1 -1
  659. package/esm/object-stream/parse-partial-json.d.mts.map +1 -1
  660. package/esm/object-stream/parse-partial-json.mjs +1 -1
  661. package/esm/object-stream/parse-partial-json.mjs.map +1 -1
  662. package/esm/object-stream/stream-object.d.mts +1 -1
  663. package/esm/object-stream/stream-object.d.mts.map +1 -1
  664. package/esm/object-stream/stream-object.mjs +1 -1
  665. package/esm/object-stream/stream-object.mjs.map +1 -1
  666. package/esm/observe/observer-registry.d.mts +1 -1
  667. package/esm/observe/observer-registry.d.mts.map +1 -1
  668. package/esm/observe/observer-registry.mjs +1 -1
  669. package/esm/observe/observer-registry.mjs.map +1 -1
  670. package/esm/observe/observer.contract.d.mts +1 -1
  671. package/esm/observe/observer.contract.d.mts.map +1 -1
  672. package/esm/observe/resolve-observers.d.mts +1 -1
  673. package/esm/observe/resolve-observers.d.mts.map +1 -1
  674. package/esm/observe/resolve-observers.mjs +1 -1
  675. package/esm/observe/resolve-observers.mjs.map +1 -1
  676. package/esm/orchestrator/as-tool.d.mts +1 -1
  677. package/esm/orchestrator/as-tool.d.mts.map +1 -1
  678. package/esm/orchestrator/as-tool.mjs +1 -1
  679. package/esm/orchestrator/as-tool.mjs.map +1 -1
  680. package/esm/orchestrator/checkpoint.mjs +1 -1
  681. package/esm/orchestrator/checkpoint.mjs.map +1 -1
  682. package/esm/orchestrator/commands.d.mts +1 -1
  683. package/esm/orchestrator/commands.d.mts.map +1 -1
  684. package/esm/orchestrator/commands.mjs +1 -1
  685. package/esm/orchestrator/commands.mjs.map +1 -1
  686. package/esm/orchestrator/compaction.mjs +1 -1
  687. package/esm/orchestrator/compaction.mjs.map +1 -1
  688. package/esm/orchestrator/dispatch.mjs +1 -1
  689. package/esm/orchestrator/dispatch.mjs.map +1 -1
  690. package/esm/orchestrator/emitter-port.type.d.mts +1 -1
  691. package/esm/orchestrator/emitter-port.type.d.mts.map +1 -1
  692. package/esm/orchestrator/emitter.d.mts +1 -1
  693. package/esm/orchestrator/emitter.d.mts.map +1 -1
  694. package/esm/orchestrator/emitter.mjs +1 -1
  695. package/esm/orchestrator/emitter.mjs.map +1 -1
  696. package/esm/orchestrator/engine-context.type.d.mts +1 -1
  697. package/esm/orchestrator/engine-context.type.d.mts.map +1 -1
  698. package/esm/orchestrator/execution.d.mts +1 -1
  699. package/esm/orchestrator/execution.d.mts.map +1 -1
  700. package/esm/orchestrator/execution.mjs +1 -1
  701. package/esm/orchestrator/execution.mjs.map +1 -1
  702. package/esm/orchestrator/load.mjs +1 -1
  703. package/esm/orchestrator/load.mjs.map +1 -1
  704. package/esm/orchestrator/lock.mjs +1 -1
  705. package/esm/orchestrator/lock.mjs.map +1 -1
  706. package/esm/orchestrator/memory.d.mts +1 -1
  707. package/esm/orchestrator/memory.d.mts.map +1 -1
  708. package/esm/orchestrator/memory.mjs +1 -1
  709. package/esm/orchestrator/memory.mjs.map +1 -1
  710. package/esm/orchestrator/orchestrator-stream.d.mts +1 -1
  711. package/esm/orchestrator/orchestrator-stream.d.mts.map +1 -1
  712. package/esm/orchestrator/orchestrator-stream.mjs +1 -1
  713. package/esm/orchestrator/orchestrator-stream.mjs.map +1 -1
  714. package/esm/orchestrator/orchestrator.d.mts +1 -1
  715. package/esm/orchestrator/orchestrator.d.mts.map +1 -1
  716. package/esm/orchestrator/orchestrator.mjs +1 -1
  717. package/esm/orchestrator/orchestrator.mjs.map +1 -1
  718. package/esm/orchestrator/resume.mjs +1 -1
  719. package/esm/orchestrator/resume.mjs.map +1 -1
  720. package/esm/orchestrator/session-lock.d.mts +1 -1
  721. package/esm/orchestrator/session-lock.d.mts.map +1 -1
  722. package/esm/orchestrator/session-lock.mjs +1 -1
  723. package/esm/orchestrator/session-lock.mjs.map +1 -1
  724. package/esm/orchestrator/signature.d.mts +1 -1
  725. package/esm/orchestrator/signature.d.mts.map +1 -1
  726. package/esm/orchestrator/signature.mjs +1 -1
  727. package/esm/orchestrator/signature.mjs.map +1 -1
  728. package/esm/orchestrator/window.mjs +1 -1
  729. package/esm/orchestrator/window.mjs.map +1 -1
  730. package/esm/planner/dag-scheduler.mjs +1 -1
  731. package/esm/planner/dag-scheduler.mjs.map +1 -1
  732. package/esm/planner/plan-prompt.d.mts +1 -1
  733. package/esm/planner/plan-prompt.d.mts.map +1 -1
  734. package/esm/planner/plan-prompt.mjs +1 -1
  735. package/esm/planner/plan-prompt.mjs.map +1 -1
  736. package/esm/planner/plan-schema.d.mts +1 -1
  737. package/esm/planner/plan-schema.d.mts.map +1 -1
  738. package/esm/planner/plan-schema.mjs +1 -1
  739. package/esm/planner/plan-schema.mjs.map +1 -1
  740. package/esm/planner/planner-run.d.mts +1 -1
  741. package/esm/planner/planner-run.d.mts.map +1 -1
  742. package/esm/planner/planner-run.mjs +1 -1
  743. package/esm/planner/planner-run.mjs.map +1 -1
  744. package/esm/planner/planner.d.mts +1 -1
  745. package/esm/planner/planner.d.mts.map +1 -1
  746. package/esm/planner/planner.mjs +1 -1
  747. package/esm/planner/planner.mjs.map +1 -1
  748. package/esm/planner/signature.d.mts +1 -1
  749. package/esm/planner/signature.d.mts.map +1 -1
  750. package/esm/planner/signature.mjs +1 -1
  751. package/esm/planner/signature.mjs.map +1 -1
  752. package/esm/planner/snapshot.mjs +1 -1
  753. package/esm/planner/snapshot.mjs.map +1 -1
  754. package/esm/prompt/errors.d.mts +1 -1
  755. package/esm/prompt/errors.d.mts.map +1 -1
  756. package/esm/prompt/errors.mjs +1 -1
  757. package/esm/prompt/errors.mjs.map +1 -1
  758. package/esm/prompt/prompt-langfuse-sync.mjs +1 -1
  759. package/esm/prompt/prompt-langfuse-sync.mjs.map +1 -1
  760. package/esm/prompt/prompt-langfuse-sync.type.d.mts +1 -1
  761. package/esm/prompt/prompt-langfuse-sync.type.d.mts.map +1 -1
  762. package/esm/prompt/prompt-validate.mjs +1 -1
  763. package/esm/prompt/prompt-validate.mjs.map +1 -1
  764. package/esm/prompt/prompt.d.mts +1 -1
  765. package/esm/prompt/prompt.d.mts.map +1 -1
  766. package/esm/prompt/prompt.mjs +1 -1
  767. package/esm/prompt/prompt.mjs.map +1 -1
  768. package/esm/prompt/prompt.type.d.mts +1 -1
  769. package/esm/prompt/prompt.type.d.mts.map +1 -1
  770. package/esm/prompts/prompts-manager.contract.d.mts +1 -1
  771. package/esm/prompts/prompts-manager.contract.d.mts.map +1 -1
  772. package/esm/prompts/prompts-manager.d.mts +1 -1
  773. package/esm/prompts/prompts-manager.d.mts.map +1 -1
  774. package/esm/prompts/prompts-manager.mjs +1 -1
  775. package/esm/prompts/prompts-manager.mjs.map +1 -1
  776. package/esm/prompts/prompts-manager.type.d.mts +1 -1
  777. package/esm/prompts/prompts-manager.type.d.mts.map +1 -1
  778. package/esm/prompts/prompts-validate.d.mts +1 -1
  779. package/esm/prompts/prompts-validate.d.mts.map +1 -1
  780. package/esm/prompts/prompts-validate.mjs +0 -0
  781. package/esm/prompts/prompts-validate.mjs.map +1 -1
  782. package/esm/rag/as-tool.mjs +1 -1
  783. package/esm/rag/as-tool.mjs.map +1 -1
  784. package/esm/rag/chunk/chunk.d.mts +1 -1
  785. package/esm/rag/chunk/chunk.d.mts.map +1 -1
  786. package/esm/rag/chunk/chunk.mjs +1 -1
  787. package/esm/rag/chunk/chunk.mjs.map +1 -1
  788. package/esm/rag/chunk/fixed.mjs +1 -1
  789. package/esm/rag/chunk/fixed.mjs.map +1 -1
  790. package/esm/rag/chunk/markdown.mjs +1 -1
  791. package/esm/rag/chunk/markdown.mjs.map +1 -1
  792. package/esm/rag/chunk/recursive.mjs +1 -1
  793. package/esm/rag/chunk/recursive.mjs.map +1 -1
  794. package/esm/rag/chunk/sentence.mjs +1 -1
  795. package/esm/rag/chunk/sentence.mjs.map +1 -1
  796. package/esm/rag/contracts/chunk-options.type.d.mts +1 -1
  797. package/esm/rag/contracts/chunk-options.type.d.mts.map +1 -1
  798. package/esm/rag/contracts/citation.type.d.mts +1 -1
  799. package/esm/rag/contracts/citation.type.d.mts.map +1 -1
  800. package/esm/rag/contracts/rag-config.type.d.mts +1 -1
  801. package/esm/rag/contracts/rag-config.type.d.mts.map +1 -1
  802. package/esm/rag/contracts/rag-document.type.d.mts +1 -1
  803. package/esm/rag/contracts/rag-document.type.d.mts.map +1 -1
  804. package/esm/rag/hybrid/bm25.d.mts +1 -1
  805. package/esm/rag/hybrid/bm25.d.mts.map +1 -1
  806. package/esm/rag/hybrid/bm25.mjs +1 -1
  807. package/esm/rag/hybrid/bm25.mjs.map +1 -1
  808. package/esm/rag/hybrid/hybrid-rank.d.mts +1 -1
  809. package/esm/rag/hybrid/hybrid-rank.d.mts.map +1 -1
  810. package/esm/rag/hybrid/hybrid-rank.mjs +1 -1
  811. package/esm/rag/hybrid/hybrid-rank.mjs.map +1 -1
  812. package/esm/rag/hybrid/rrf.d.mts +1 -1
  813. package/esm/rag/hybrid/rrf.d.mts.map +1 -1
  814. package/esm/rag/hybrid/rrf.mjs +1 -1
  815. package/esm/rag/hybrid/rrf.mjs.map +1 -1
  816. package/esm/rag/loaders/errors.d.mts +1 -1
  817. package/esm/rag/loaders/errors.d.mts.map +1 -1
  818. package/esm/rag/loaders/errors.mjs +1 -1
  819. package/esm/rag/loaders/errors.mjs.map +1 -1
  820. package/esm/rag/loaders/load-html.d.mts +1 -1
  821. package/esm/rag/loaders/load-html.d.mts.map +1 -1
  822. package/esm/rag/loaders/load-html.mjs +1 -1
  823. package/esm/rag/loaders/load-html.mjs.map +1 -1
  824. package/esm/rag/loaders/load-pdf.d.mts +1 -1
  825. package/esm/rag/loaders/load-pdf.d.mts.map +1 -1
  826. package/esm/rag/loaders/load-pdf.mjs +1 -1
  827. package/esm/rag/loaders/load-pdf.mjs.map +1 -1
  828. package/esm/rag/loaders/load-text.d.mts +1 -1
  829. package/esm/rag/loaders/load-text.d.mts.map +1 -1
  830. package/esm/rag/loaders/load-text.mjs +1 -1
  831. package/esm/rag/loaders/load-text.mjs.map +1 -1
  832. package/esm/rag/loaders/load-web.d.mts +1 -1
  833. package/esm/rag/loaders/load-web.d.mts.map +1 -1
  834. package/esm/rag/loaders/load-web.mjs +1 -1
  835. package/esm/rag/loaders/load-web.mjs.map +1 -1
  836. package/esm/rag/loaders/loader.type.d.mts +1 -1
  837. package/esm/rag/loaders/loader.type.d.mts.map +1 -1
  838. package/esm/rag/rag.d.mts +1 -1
  839. package/esm/rag/rag.d.mts.map +1 -1
  840. package/esm/rag/rag.mjs +1 -1
  841. package/esm/rag/rag.mjs.map +1 -1
  842. package/esm/rag/rerank/keyword-reranker.d.mts +1 -1
  843. package/esm/rag/rerank/keyword-reranker.d.mts.map +1 -1
  844. package/esm/rag/rerank/keyword-reranker.mjs +1 -1
  845. package/esm/rag/rerank/keyword-reranker.mjs.map +1 -1
  846. package/esm/rag/rerank/llm-reranker.d.mts +1 -1
  847. package/esm/rag/rerank/llm-reranker.d.mts.map +1 -1
  848. package/esm/rag/rerank/llm-reranker.mjs +1 -1
  849. package/esm/rag/rerank/llm-reranker.mjs.map +1 -1
  850. package/esm/rag/rerank/reranker.contract.d.mts +1 -1
  851. package/esm/rag/rerank/reranker.contract.d.mts.map +1 -1
  852. package/esm/rag/retrieve.mjs +1 -1
  853. package/esm/rag/retrieve.mjs.map +1 -1
  854. package/esm/rag/store/cache-vector-store.d.mts +1 -1
  855. package/esm/rag/store/cache-vector-store.d.mts.map +1 -1
  856. package/esm/rag/store/cache-vector-store.mjs +1 -1
  857. package/esm/rag/store/cache-vector-store.mjs.map +1 -1
  858. package/esm/rag/store/pg-vector-store.d.mts +1 -1
  859. package/esm/rag/store/pg-vector-store.d.mts.map +1 -1
  860. package/esm/rag/store/pg-vector-store.mjs +1 -1
  861. package/esm/rag/store/pg-vector-store.mjs.map +1 -1
  862. package/esm/rag/store/vector-store.contract.d.mts +1 -1
  863. package/esm/rag/store/vector-store.contract.d.mts.map +1 -1
  864. package/esm/rag/transforms/multi-query.d.mts +1 -1
  865. package/esm/rag/transforms/multi-query.d.mts.map +1 -1
  866. package/esm/rag/transforms/multi-query.mjs +1 -1
  867. package/esm/rag/transforms/multi-query.mjs.map +1 -1
  868. package/esm/security/outbound-policy.d.mts +1 -1
  869. package/esm/security/outbound-policy.d.mts.map +1 -1
  870. package/esm/security/outbound-policy.mjs +1 -1
  871. package/esm/security/outbound-policy.mjs.map +1 -1
  872. package/esm/security/outbound-policy.type.d.mts +1 -1
  873. package/esm/security/outbound-policy.type.d.mts.map +1 -1
  874. package/esm/security/private-ip.d.mts +1 -1
  875. package/esm/security/private-ip.d.mts.map +1 -1
  876. package/esm/security/private-ip.mjs +1 -1
  877. package/esm/security/private-ip.mjs.map +1 -1
  878. package/esm/security/redact.d.mts +1 -1
  879. package/esm/security/redact.d.mts.map +1 -1
  880. package/esm/security/redact.mjs +1 -1
  881. package/esm/security/redact.mjs.map +1 -1
  882. package/esm/serve/serve.d.mts +1 -1
  883. package/esm/serve/serve.d.mts.map +1 -1
  884. package/esm/serve/serve.mjs +1 -1
  885. package/esm/serve/serve.mjs.map +1 -1
  886. package/esm/serve/sse.d.mts +1 -1
  887. package/esm/serve/sse.d.mts.map +1 -1
  888. package/esm/serve/sse.mjs +1 -1
  889. package/esm/serve/sse.mjs.map +1 -1
  890. package/esm/serve/stream-to-sse.d.mts +1 -1
  891. package/esm/serve/stream-to-sse.d.mts.map +1 -1
  892. package/esm/serve/stream-to-sse.mjs +1 -1
  893. package/esm/serve/stream-to-sse.mjs.map +1 -1
  894. package/esm/skills/catalog.d.mts +1 -1
  895. package/esm/skills/catalog.d.mts.map +1 -1
  896. package/esm/skills/catalog.mjs +1 -1
  897. package/esm/skills/catalog.mjs.map +1 -1
  898. package/esm/skills/contracts/skill-record.type.d.mts +1 -1
  899. package/esm/skills/contracts/skill-record.type.d.mts.map +1 -1
  900. package/esm/skills/contracts/skills-config.type.d.mts +1 -1
  901. package/esm/skills/contracts/skills-config.type.d.mts.map +1 -1
  902. package/esm/skills/contracts/skills-store.contract.d.mts +1 -1
  903. package/esm/skills/contracts/skills-store.contract.d.mts.map +1 -1
  904. package/esm/skills/contracts/skills.contract.d.mts +1 -1
  905. package/esm/skills/contracts/skills.contract.d.mts.map +1 -1
  906. package/esm/skills/load-skill-tool.d.mts +1 -1
  907. package/esm/skills/load-skill-tool.d.mts.map +1 -1
  908. package/esm/skills/load-skill-tool.mjs +1 -1
  909. package/esm/skills/load-skill-tool.mjs.map +1 -1
  910. package/esm/skills/review-gate.d.mts +1 -1
  911. package/esm/skills/review-gate.d.mts.map +1 -1
  912. package/esm/skills/review-gate.mjs +1 -1
  913. package/esm/skills/review-gate.mjs.map +1 -1
  914. package/esm/skills/save-skill-tool.d.mts +1 -1
  915. package/esm/skills/save-skill-tool.d.mts.map +1 -1
  916. package/esm/skills/save-skill-tool.mjs +1 -1
  917. package/esm/skills/save-skill-tool.mjs.map +1 -1
  918. package/esm/skills/skills.d.mts +1 -1
  919. package/esm/skills/skills.d.mts.map +1 -1
  920. package/esm/skills/skills.mjs +1 -1
  921. package/esm/skills/skills.mjs.map +1 -1
  922. package/esm/skills/sources/directory-source.d.mts +1 -1
  923. package/esm/skills/sources/directory-source.d.mts.map +1 -1
  924. package/esm/skills/sources/directory-source.mjs +1 -1
  925. package/esm/skills/sources/directory-source.mjs.map +1 -1
  926. package/esm/skills/sources/index.d.mts +1 -1
  927. package/esm/skills/sources/index.d.mts.map +1 -1
  928. package/esm/skills/sources/index.mjs +1 -1
  929. package/esm/skills/sources/index.mjs.map +1 -1
  930. package/esm/skills/sources/parse-frontmatter.d.mts +1 -1
  931. package/esm/skills/sources/parse-frontmatter.d.mts.map +1 -1
  932. package/esm/skills/sources/parse-frontmatter.mjs +1 -1
  933. package/esm/skills/sources/parse-frontmatter.mjs.map +1 -1
  934. package/esm/skills/sources/store-source.d.mts +1 -1
  935. package/esm/skills/sources/store-source.d.mts.map +1 -1
  936. package/esm/skills/sources/store-source.mjs +1 -1
  937. package/esm/skills/sources/store-source.mjs.map +1 -1
  938. package/esm/skills/sources/url-source.d.mts +1 -1
  939. package/esm/skills/sources/url-source.d.mts.map +1 -1
  940. package/esm/skills/sources/url-source.mjs +1 -1
  941. package/esm/skills/sources/url-source.mjs.map +1 -1
  942. package/esm/skills/store/mock-skills-store.d.mts +1 -1
  943. package/esm/skills/store/mock-skills-store.d.mts.map +1 -1
  944. package/esm/skills/store/mock-skills-store.mjs +1 -1
  945. package/esm/skills/store/mock-skills-store.mjs.map +1 -1
  946. package/esm/skills/store/procedural-skill-store.d.mts +1 -1
  947. package/esm/skills/store/procedural-skill-store.d.mts.map +1 -1
  948. package/esm/skills/store/procedural-skill-store.mjs +1 -1
  949. package/esm/skills/store/procedural-skill-store.mjs.map +1 -1
  950. package/esm/snapshot/memory.d.mts +1 -1
  951. package/esm/snapshot/memory.d.mts.map +1 -1
  952. package/esm/snapshot/memory.mjs +1 -1
  953. package/esm/snapshot/memory.mjs.map +1 -1
  954. package/esm/snapshot/pg.d.mts +1 -1
  955. package/esm/snapshot/pg.d.mts.map +1 -1
  956. package/esm/snapshot/pg.mjs +1 -1
  957. package/esm/snapshot/pg.mjs.map +1 -1
  958. package/esm/snapshot/redis.d.mts +1 -1
  959. package/esm/snapshot/redis.d.mts.map +1 -1
  960. package/esm/snapshot/redis.mjs +1 -1
  961. package/esm/snapshot/redis.mjs.map +1 -1
  962. package/esm/speech/speech.d.mts +1 -1
  963. package/esm/speech/speech.d.mts.map +1 -1
  964. package/esm/speech/speech.mjs +1 -1
  965. package/esm/speech/speech.mjs.map +1 -1
  966. package/esm/supervisor/as-tool.d.mts +1 -1
  967. package/esm/supervisor/as-tool.d.mts.map +1 -1
  968. package/esm/supervisor/as-tool.mjs +1 -1
  969. package/esm/supervisor/as-tool.mjs.map +1 -1
  970. package/esm/supervisor/cancellation.d.mts +1 -1
  971. package/esm/supervisor/cancellation.d.mts.map +1 -1
  972. package/esm/supervisor/cancellation.mjs +1 -1
  973. package/esm/supervisor/cancellation.mjs.map +1 -1
  974. package/esm/supervisor/decide.mjs +1 -1
  975. package/esm/supervisor/decide.mjs.map +1 -1
  976. package/esm/supervisor/emitter.d.mts +1 -1
  977. package/esm/supervisor/emitter.d.mts.map +1 -1
  978. package/esm/supervisor/emitter.mjs +1 -1
  979. package/esm/supervisor/emitter.mjs.map +1 -1
  980. package/esm/supervisor/entries.d.mts +1 -1
  981. package/esm/supervisor/entries.d.mts.map +1 -1
  982. package/esm/supervisor/entries.mjs +1 -1
  983. package/esm/supervisor/entries.mjs.map +1 -1
  984. package/esm/supervisor/execution.d.mts +1 -1
  985. package/esm/supervisor/execution.d.mts.map +1 -1
  986. package/esm/supervisor/execution.mjs +1 -1
  987. package/esm/supervisor/execution.mjs.map +1 -1
  988. package/esm/supervisor/fan-out.d.mts +1 -1
  989. package/esm/supervisor/fan-out.d.mts.map +1 -1
  990. package/esm/supervisor/fan-out.mjs +1 -1
  991. package/esm/supervisor/fan-out.mjs.map +1 -1
  992. package/esm/supervisor/router-factory.d.mts +1 -1
  993. package/esm/supervisor/router-factory.d.mts.map +1 -1
  994. package/esm/supervisor/router-factory.mjs +1 -1
  995. package/esm/supervisor/router-factory.mjs.map +1 -1
  996. package/esm/supervisor/router-prompt.d.mts +1 -1
  997. package/esm/supervisor/router-prompt.d.mts.map +1 -1
  998. package/esm/supervisor/router-prompt.mjs +1 -1
  999. package/esm/supervisor/router-prompt.mjs.map +1 -1
  1000. package/esm/supervisor/signature.d.mts +1 -1
  1001. package/esm/supervisor/signature.d.mts.map +1 -1
  1002. package/esm/supervisor/signature.mjs +1 -1
  1003. package/esm/supervisor/signature.mjs.map +1 -1
  1004. package/esm/supervisor/snapshot.d.mts +1 -1
  1005. package/esm/supervisor/snapshot.d.mts.map +1 -1
  1006. package/esm/supervisor/snapshot.mjs +1 -1
  1007. package/esm/supervisor/snapshot.mjs.map +1 -1
  1008. package/esm/supervisor/supervisor-stream.d.mts +1 -1
  1009. package/esm/supervisor/supervisor-stream.d.mts.map +1 -1
  1010. package/esm/supervisor/supervisor-stream.mjs +1 -1
  1011. package/esm/supervisor/supervisor-stream.mjs.map +1 -1
  1012. package/esm/supervisor/supervisor.d.mts +1 -1
  1013. package/esm/supervisor/supervisor.d.mts.map +1 -1
  1014. package/esm/supervisor/supervisor.mjs +1 -1
  1015. package/esm/supervisor/supervisor.mjs.map +1 -1
  1016. package/esm/system-prompt/instruction.d.mts +1 -1
  1017. package/esm/system-prompt/instruction.d.mts.map +1 -1
  1018. package/esm/system-prompt/instruction.mjs +1 -1
  1019. package/esm/system-prompt/instruction.mjs.map +1 -1
  1020. package/esm/system-prompt/persona.d.mts +1 -1
  1021. package/esm/system-prompt/persona.d.mts.map +1 -1
  1022. package/esm/system-prompt/persona.mjs +1 -1
  1023. package/esm/system-prompt/persona.mjs.map +1 -1
  1024. package/esm/system-prompt/refined-system-prompt.d.mts +1 -1
  1025. package/esm/system-prompt/refined-system-prompt.d.mts.map +1 -1
  1026. package/esm/system-prompt/refined-system-prompt.mjs +1 -1
  1027. package/esm/system-prompt/refined-system-prompt.mjs.map +1 -1
  1028. package/esm/system-prompt/render-placeholders.d.mts +1 -1
  1029. package/esm/system-prompt/render-placeholders.d.mts.map +1 -1
  1030. package/esm/system-prompt/render-placeholders.mjs +1 -1
  1031. package/esm/system-prompt/render-placeholders.mjs.map +1 -1
  1032. package/esm/system-prompt/system-prompt.d.mts +1 -1
  1033. package/esm/system-prompt/system-prompt.d.mts.map +1 -1
  1034. package/esm/system-prompt/system-prompt.mjs +1 -1
  1035. package/esm/system-prompt/system-prompt.mjs.map +1 -1
  1036. package/esm/team/gates.mjs +1 -1
  1037. package/esm/team/gates.mjs.map +1 -1
  1038. package/esm/team/team.d.mts +1 -1
  1039. package/esm/team/team.d.mts.map +1 -1
  1040. package/esm/team/team.mjs +1 -1
  1041. package/esm/team/team.mjs.map +1 -1
  1042. package/esm/testing/matcher-logic.d.mts +1 -1
  1043. package/esm/testing/matcher-logic.d.mts.map +1 -1
  1044. package/esm/testing/matcher-logic.mjs +1 -1
  1045. package/esm/testing/matcher-logic.mjs.map +1 -1
  1046. package/esm/testing/matchers.d.mts +1 -1
  1047. package/esm/testing/matchers.d.mts.map +1 -1
  1048. package/esm/testing/matchers.mjs +1 -1
  1049. package/esm/testing/matchers.mjs.map +1 -1
  1050. package/esm/testing/register-lazy.d.mts +1 -1
  1051. package/esm/testing/register-lazy.d.mts.map +1 -1
  1052. package/esm/testing/register-lazy.mjs +1 -1
  1053. package/esm/testing/register-lazy.mjs.map +1 -1
  1054. package/esm/tool/executable-as-tool.d.mts +1 -1
  1055. package/esm/tool/executable-as-tool.d.mts.map +1 -1
  1056. package/esm/tool/executable-as-tool.mjs +1 -1
  1057. package/esm/tool/executable-as-tool.mjs.map +1 -1
  1058. package/esm/tool/tool.d.mts +1 -1
  1059. package/esm/tool/tool.d.mts.map +1 -1
  1060. package/esm/tool/tool.mjs +1 -1
  1061. package/esm/tool/tool.mjs.map +1 -1
  1062. package/esm/transcribe/audio-input.d.mts +1 -1
  1063. package/esm/transcribe/audio-input.d.mts.map +1 -1
  1064. package/esm/transcribe/audio-input.mjs +1 -1
  1065. package/esm/transcribe/audio-input.mjs.map +1 -1
  1066. package/esm/transcribe/transcribe.d.mts +1 -1
  1067. package/esm/transcribe/transcribe.d.mts.map +1 -1
  1068. package/esm/transcribe/transcribe.mjs +1 -1
  1069. package/esm/transcribe/transcribe.mjs.map +1 -1
  1070. package/esm/utils/compute-cost.d.mts +1 -1
  1071. package/esm/utils/compute-cost.d.mts.map +1 -1
  1072. package/esm/utils/compute-cost.mjs +1 -1
  1073. package/esm/utils/compute-cost.mjs.map +1 -1
  1074. package/esm/utils/extract-json-lenient.d.mts +1 -1
  1075. package/esm/utils/extract-json-lenient.d.mts.map +1 -1
  1076. package/esm/utils/extract-json-lenient.mjs +1 -1
  1077. package/esm/utils/extract-json-lenient.mjs.map +1 -1
  1078. package/esm/utils/extract-json-payload.d.mts +1 -1
  1079. package/esm/utils/extract-json-payload.d.mts.map +1 -1
  1080. package/esm/utils/extract-json-payload.mjs +1 -1
  1081. package/esm/utils/extract-json-payload.mjs.map +1 -1
  1082. package/esm/utils/generate-run-id.d.mts +1 -1
  1083. package/esm/utils/generate-run-id.d.mts.map +1 -1
  1084. package/esm/utils/generate-run-id.mjs +1 -1
  1085. package/esm/utils/generate-run-id.mjs.map +1 -1
  1086. package/esm/utils/json-schema.d.mts +1 -1
  1087. package/esm/utils/json-schema.d.mts.map +1 -1
  1088. package/esm/utils/json-schema.mjs +1 -1
  1089. package/esm/utils/json-schema.mjs.map +1 -1
  1090. package/esm/utils/prepare-attachment-part.d.mts +1 -1
  1091. package/esm/utils/prepare-attachment-part.d.mts.map +1 -1
  1092. package/esm/utils/prepare-attachment-part.mjs +1 -1
  1093. package/esm/utils/prepare-attachment-part.mjs.map +1 -1
  1094. package/esm/utils/resolve-attachment.d.mts +1 -1
  1095. package/esm/utils/resolve-attachment.d.mts.map +1 -1
  1096. package/esm/utils/resolve-attachment.mjs +1 -1
  1097. package/esm/utils/resolve-attachment.mjs.map +1 -1
  1098. package/esm/utils/run-context.d.mts +1 -1
  1099. package/esm/utils/run-context.d.mts.map +1 -1
  1100. package/esm/utils/run-context.mjs +1 -1
  1101. package/esm/utils/run-context.mjs.map +1 -1
  1102. package/esm/utils/safe-json-parse.d.mts +1 -1
  1103. package/esm/utils/safe-json-parse.d.mts.map +1 -1
  1104. package/esm/utils/safe-json-parse.mjs +1 -1
  1105. package/esm/utils/safe-json-parse.mjs.map +1 -1
  1106. package/esm/utils/stamp-report-lineage.d.mts +1 -1
  1107. package/esm/utils/stamp-report-lineage.d.mts.map +1 -1
  1108. package/esm/utils/stamp-report-lineage.mjs +1 -1
  1109. package/esm/utils/stamp-report-lineage.mjs.map +1 -1
  1110. package/esm/utils/token-count.d.mts +1 -1
  1111. package/esm/utils/token-count.d.mts.map +1 -1
  1112. package/esm/utils/token-count.mjs +1 -1
  1113. package/esm/utils/token-count.mjs.map +1 -1
  1114. package/esm/vcr/cassette-io.mjs +1 -1
  1115. package/esm/vcr/cassette-io.mjs.map +1 -1
  1116. package/esm/vcr/errors.d.mts +1 -1
  1117. package/esm/vcr/errors.d.mts.map +1 -1
  1118. package/esm/vcr/errors.mjs +1 -1
  1119. package/esm/vcr/errors.mjs.map +1 -1
  1120. package/esm/vcr/hash-request.d.mts +1 -1
  1121. package/esm/vcr/hash-request.d.mts.map +1 -1
  1122. package/esm/vcr/hash-request.mjs +1 -1
  1123. package/esm/vcr/hash-request.mjs.map +1 -1
  1124. package/esm/vcr/vcr.d.mts +1 -1
  1125. package/esm/vcr/vcr.d.mts.map +1 -1
  1126. package/esm/vcr/vcr.mjs +1 -1
  1127. package/esm/vcr/vcr.mjs.map +1 -1
  1128. package/esm/vcr/vcr.type.d.mts +1 -1
  1129. package/esm/vcr/vcr.type.d.mts.map +1 -1
  1130. package/esm/workflow/as-tool.mjs +1 -1
  1131. package/esm/workflow/as-tool.mjs.map +1 -1
  1132. package/esm/workflow/cancellation.mjs +1 -1
  1133. package/esm/workflow/cancellation.mjs.map +1 -1
  1134. package/esm/workflow/emitter.mjs +1 -1
  1135. package/esm/workflow/emitter.mjs.map +1 -1
  1136. package/esm/workflow/engine.mjs +5 -2
  1137. package/esm/workflow/engine.mjs.map +1 -1
  1138. package/esm/workflow/retry.mjs +1 -1
  1139. package/esm/workflow/retry.mjs.map +1 -1
  1140. package/esm/workflow/router.mjs +1 -1
  1141. package/esm/workflow/router.mjs.map +1 -1
  1142. package/esm/workflow/run-scoped-emitter.mjs +1 -1
  1143. package/esm/workflow/run-scoped-emitter.mjs.map +1 -1
  1144. package/esm/workflow/signature.d.mts +1 -1
  1145. package/esm/workflow/signature.d.mts.map +1 -1
  1146. package/esm/workflow/signature.mjs +1 -1
  1147. package/esm/workflow/signature.mjs.map +1 -1
  1148. package/esm/workflow/snapshot.mjs +1 -1
  1149. package/esm/workflow/snapshot.mjs.map +1 -1
  1150. package/esm/workflow/state.mjs +1 -1
  1151. package/esm/workflow/state.mjs.map +1 -1
  1152. package/esm/workflow/step-runner.mjs +25 -6
  1153. package/esm/workflow/step-runner.mjs.map +1 -1
  1154. package/esm/workflow/step.d.mts +1 -1
  1155. package/esm/workflow/step.d.mts.map +1 -1
  1156. package/esm/workflow/step.mjs +1 -1
  1157. package/esm/workflow/step.mjs.map +1 -1
  1158. package/esm/workflow/workflow.d.mts +1 -1
  1159. package/esm/workflow/workflow.d.mts.map +1 -1
  1160. package/esm/workflow/workflow.mjs +1 -1
  1161. package/esm/workflow/workflow.mjs.map +1 -1
  1162. package/llms-full.txt +23 -2
  1163. package/package.json +4 -4
  1164. package/skills/observe-ai-flows/SKILL.md +2 -2
  1165. package/skills/run-ai-workflow/SKILL.md +19 -0
  1166. package/skills/run-supervisor/SKILL.md +2 -0
  1167. package/cjs/magic-string.es-BtxW4VqG.cjs.map +0 -1
  1168. package/cjs/matcher-logic-SBnzYohQ.cjs.map +0 -1
  1169. package/cjs/matchers-BBh3gyB-.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"step.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/workflow/step.ts"],"mappings":";;;;;AAeA;;;;;;;;;;iBAAgB,IAAA,4BAEL,MAAA,uCAGT,UAAA,EAAY,cAAA,CAAe,MAAA,EAAQ,MAAA,EAAQ,QAAA,IAC1C,cAAA,CAAe,MAAA,EAAQ,MAAA,EAAQ,QAAA"}
1
+ {"version":3,"file":"step.d.mts","names":[],"sources":["../../../../../../../ai/src/workflow/step.ts"],"mappings":";;;;;AAeA;;;;;;;;;;iBAAgB,IAAA,4BAEL,MAAA,uCAGT,UAAA,EAAY,cAAA,CAAe,MAAA,EAAQ,MAAA,EAAQ,QAAA,IAC1C,cAAA,CAAe,MAAA,EAAQ,MAAA,EAAQ,QAAA"}
@@ -1,7 +1,7 @@
1
1
  import { WorkflowError } from "../errors/workflow-error.mjs";
2
2
  import "../errors/index.mjs";
3
3
 
4
- //#region ../@warlock.js/ai/src/workflow/step.ts
4
+ //#region ../ai/src/workflow/step.ts
5
5
  /**
6
6
  * `ai.step(def)` — pass-through factory used for authoring. Returns
7
7
  * the definition object verbatim so the workflow engine can read it
@@ -1 +1 @@
1
- {"version":3,"file":"step.mjs","names":[],"sources":["../../../../../../../@warlock.js/ai/src/workflow/step.ts"],"sourcesContent":["import type { StepDefinition } from \"../contracts/workflow/step.contract\";\nimport { WorkflowError } from \"../errors\";\n\n/**\n * `ai.step(def)` — pass-through factory used for authoring. Returns\n * the definition object verbatim so the workflow engine can read it\n * during execution; the factory exists for API symmetry with\n * `ai.workflow()` and to leave room for future validation or\n * metadata annotation.\n *\n * Generics flow from the enclosing `ai.workflow<...>()` call when the\n * step is declared inline inside `steps: [...]`. To author a step\n * outside that context with full typing, pass them explicitly:\n * `ai.step<MyInput, MyState, MyContext>({ ... })`.\n */\nexport function step<\n TInput = unknown,\n TState = Record<string, unknown>,\n TContext = unknown,\n>(\n definition: StepDefinition<TInput, TState, TContext>,\n): StepDefinition<TInput, TState, TContext> {\n validate(definition);\n return definition;\n}\n\nfunction validate<TInput, TState, TContext>(\n def: StepDefinition<TInput, TState, TContext>,\n): void {\n if (!def.name || typeof def.name !== \"string\") {\n throw new WorkflowError(\"ai.step: `name` is required\");\n }\n\n const hasRun = typeof def.run === \"function\";\n const hasAgent = def.agent !== undefined;\n const hasParallel = Array.isArray(def.parallel) && def.parallel.length > 0;\n\n const modes = [hasRun, hasAgent, hasParallel].filter(Boolean).length;\n\n if (modes === 0) {\n throw new WorkflowError(\n `ai.step(\"${def.name}\"): must define exactly one of run | agent | parallel`,\n );\n }\n\n if (modes > 1) {\n throw new WorkflowError(\n `ai.step(\"${def.name}\"): define only one of run | agent | parallel`,\n );\n }\n\n if (hasAgent && typeof def.input !== \"function\") {\n throw new WorkflowError(\n `ai.step(\"${def.name}\"): \\`input(ctx)\\` is required when \\`agent\\` is set`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAgB,KAKd,YAC0C;CAC1C,SAAS,UAAU;CACnB,OAAO;AACT;AAEA,SAAS,SACP,KACM;CACN,IAAI,CAAC,IAAI,QAAQ,OAAO,IAAI,SAAS,UACnC,MAAM,IAAI,cAAc,6BAA6B;CAGvD,MAAM,SAAS,OAAO,IAAI,QAAQ;CAClC,MAAM,WAAW,IAAI,UAAU;CAG/B,MAAM,QAAQ;EAAC;EAAQ;EAFH,MAAM,QAAQ,IAAI,QAAQ,KAAK,IAAI,SAAS,SAAS;CAE7B,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC;CAE9D,IAAI,UAAU,GACZ,MAAM,IAAI,cACR,YAAY,IAAI,KAAK,sDACvB;CAGF,IAAI,QAAQ,GACV,MAAM,IAAI,cACR,YAAY,IAAI,KAAK,8CACvB;CAGF,IAAI,YAAY,OAAO,IAAI,UAAU,YACnC,MAAM,IAAI,cACR,YAAY,IAAI,KAAK,qDACvB;AAEJ"}
1
+ {"version":3,"file":"step.mjs","names":[],"sources":["../../../../../../../ai/src/workflow/step.ts"],"sourcesContent":["import type { StepDefinition } from \"../contracts/workflow/step.contract\";\nimport { WorkflowError } from \"../errors\";\n\n/**\n * `ai.step(def)` — pass-through factory used for authoring. Returns\n * the definition object verbatim so the workflow engine can read it\n * during execution; the factory exists for API symmetry with\n * `ai.workflow()` and to leave room for future validation or\n * metadata annotation.\n *\n * Generics flow from the enclosing `ai.workflow<...>()` call when the\n * step is declared inline inside `steps: [...]`. To author a step\n * outside that context with full typing, pass them explicitly:\n * `ai.step<MyInput, MyState, MyContext>({ ... })`.\n */\nexport function step<\n TInput = unknown,\n TState = Record<string, unknown>,\n TContext = unknown,\n>(\n definition: StepDefinition<TInput, TState, TContext>,\n): StepDefinition<TInput, TState, TContext> {\n validate(definition);\n return definition;\n}\n\nfunction validate<TInput, TState, TContext>(\n def: StepDefinition<TInput, TState, TContext>,\n): void {\n if (!def.name || typeof def.name !== \"string\") {\n throw new WorkflowError(\"ai.step: `name` is required\");\n }\n\n const hasRun = typeof def.run === \"function\";\n const hasAgent = def.agent !== undefined;\n const hasParallel = Array.isArray(def.parallel) && def.parallel.length > 0;\n\n const modes = [hasRun, hasAgent, hasParallel].filter(Boolean).length;\n\n if (modes === 0) {\n throw new WorkflowError(\n `ai.step(\"${def.name}\"): must define exactly one of run | agent | parallel`,\n );\n }\n\n if (modes > 1) {\n throw new WorkflowError(\n `ai.step(\"${def.name}\"): define only one of run | agent | parallel`,\n );\n }\n\n if (hasAgent && typeof def.input !== \"function\") {\n throw new WorkflowError(\n `ai.step(\"${def.name}\"): \\`input(ctx)\\` is required when \\`agent\\` is set`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAgB,KAKd,YAC0C;CAC1C,SAAS,UAAU;CACnB,OAAO;AACT;AAEA,SAAS,SACP,KACM;CACN,IAAI,CAAC,IAAI,QAAQ,OAAO,IAAI,SAAS,UACnC,MAAM,IAAI,cAAc,6BAA6B;CAGvD,MAAM,SAAS,OAAO,IAAI,QAAQ;CAClC,MAAM,WAAW,IAAI,UAAU;CAG/B,MAAM,QAAQ;EAAC;EAAQ;EAFH,MAAM,QAAQ,IAAI,QAAQ,KAAK,IAAI,SAAS,SAAS;CAE7B,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC;CAE9D,IAAI,UAAU,GACZ,MAAM,IAAI,cACR,YAAY,IAAI,KAAK,sDACvB;CAGF,IAAI,QAAQ,GACV,MAAM,IAAI,cACR,YAAY,IAAI,KAAK,8CACvB;CAGF,IAAI,YAAY,OAAO,IAAI,UAAU,YACnC,MAAM,IAAI,cACR,YAAY,IAAI,KAAK,qDACvB;AAEJ"}
@@ -1,6 +1,6 @@
1
1
  import { WorkflowDefinition, WorkflowInstance } from "../contracts/workflow/workflow.contract.mjs";
2
2
 
3
- //#region ../@warlock.js/ai/src/workflow/workflow.d.ts
3
+ //#region ../ai/src/workflow/workflow.d.ts
4
4
  /**
5
5
  * `ai.workflow(def)` — construct a `WorkflowInstance`. Validates the
6
6
  * definition, computes a stable structural signature, and wires up the
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/workflow/workflow.ts"],"mappings":";;;;;AAyBA;;;iBAAgB,QAAA,+CAGL,MAAA,uCAGT,UAAA,EAAY,kBAAA,CAAmB,MAAA,EAAQ,OAAA,EAAS,MAAA,EAAQ,QAAA,IACvD,gBAAA,CAAiB,MAAA,EAAQ,OAAA,EAAS,MAAA,EAAQ,QAAA"}
1
+ {"version":3,"file":"workflow.d.mts","names":[],"sources":["../../../../../../../ai/src/workflow/workflow.ts"],"mappings":";;;;;AAyBA;;;iBAAgB,QAAA,+CAGL,MAAA,uCAGT,UAAA,EAAY,kBAAA,CAAmB,MAAA,EAAQ,OAAA,EAAS,MAAA,EAAQ,QAAA,IACvD,gBAAA,CAAiB,MAAA,EAAQ,OAAA,EAAS,MAAA,EAAQ,QAAA"}
@@ -7,7 +7,7 @@ import { loadSnapshotForResume } from "./snapshot.mjs";
7
7
  import { runWorkflow } from "./engine.mjs";
8
8
  import { computeSignature } from "./signature.mjs";
9
9
 
10
- //#region ../@warlock.js/ai/src/workflow/workflow.ts
10
+ //#region ../ai/src/workflow/workflow.ts
11
11
  /**
12
12
  * `ai.workflow(def)` — construct a `WorkflowInstance`. Validates the
13
13
  * definition, computes a stable structural signature, and wires up the
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.mjs","names":["combined"],"sources":["../../../../../../../@warlock.js/ai/src/workflow/workflow.ts"],"sourcesContent":["import type { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport type { WorkflowEventMap } from \"../contracts/events/event-map.type\";\nimport type { ExecutionReport } from \"../contracts/result/execution-report.type\";\nimport type { WorkflowResult } from \"../contracts/result/workflow-result.type\";\nimport type {\n WorkflowDefinition,\n WorkflowEventHandler,\n WorkflowExecuteOptions,\n WorkflowInstance,\n WorkflowResumeOptions,\n WorkflowRunOptions,\n} from \"../contracts/workflow/workflow.contract\";\nimport { WorkflowError } from \"../errors\";\nimport { notifyObservers } from \"../observe/resolve-observers\";\nimport type { ToolContract } from \"../tool/tool\";\nimport { asTool } from \"./as-tool\";\nimport { WorkflowEmitter } from \"./emitter\";\nimport { loadSnapshotForResume, runWorkflow } from \"./engine\";\nimport { computeSignature } from \"./signature\";\n\n/**\n * `ai.workflow(def)` — construct a `WorkflowInstance`. Validates the\n * definition, computes a stable structural signature, and wires up the\n * three-tier event subscription model.\n */\nexport function workflow<\n TInput = unknown,\n TOutput = unknown,\n TState = Record<string, unknown>,\n TContext = unknown,\n>(\n definition: WorkflowDefinition<TInput, TOutput, TState, TContext>,\n): WorkflowInstance<TInput, TOutput, TState, TContext> {\n validate(definition);\n const signature = computeSignature(definition);\n const emitter = new WorkflowEmitter(definition.on);\n\n async function execute(\n inputOrOptions: TInput | WorkflowExecuteOptions<TInput, TContext>,\n maybeOptions?: WorkflowRunOptions<TContext>,\n ): Promise<WorkflowResult<TOutput>> {\n const { input, options } = normalizeExecuteArgs<TInput, TContext>(\n inputOrOptions,\n maybeOptions,\n );\n const runId = options?.runId ?? generateRunId();\n const result = await runWorkflow<TOutput>({\n definition,\n signature,\n emitter,\n input,\n context: options?.context,\n runId,\n signal: options?.signal,\n executionHandlers: options?.on,\n sessionId: options?.sessionId,\n });\n\n // Route the finished report to any resolved observers (F1/F3).\n // Gated by `definition.observe` + the global observe-all flag;\n // observer errors are swallowed inside `notifyObservers`. Bridge the\n // pre-existing `WorkflowReport = Omit<BaseReport, \"type\">` drift (the\n // report carries `type: \"workflow\"` at runtime — engine sets it) so\n // this call site adds no new type error beyond the documented baseline.\n await notifyObservers(definition.observe, result.report as unknown as ExecutionReport);\n\n return result;\n }\n\n async function resume(\n runId: string,\n options?: WorkflowResumeOptions<TContext>,\n ): Promise<WorkflowResult<TOutput>> {\n const snapshot = await loadSnapshotForResume({\n definition,\n signature,\n runId,\n options,\n });\n\n const result = await runWorkflow<TOutput>({\n definition,\n signature,\n emitter,\n input: snapshot.input,\n context: options?.context,\n runId,\n signal: options?.signal,\n executionHandlers: options?.on,\n sessionId: options?.sessionId,\n resumeFrom: snapshot,\n });\n\n await notifyObservers(definition.observe, result.report as unknown as ExecutionReport);\n\n return result;\n }\n\n const instance: WorkflowInstance<TInput, TOutput, TState, TContext> = {\n name: definition.name,\n description: definition.description,\n inputSchema: definition.inputSchema,\n signature,\n version: definition.version,\n execute,\n resume,\n on<K extends keyof WorkflowEventMap>(event: K, handler: WorkflowEventHandler<K>) {\n return emitter.on(event, handler);\n },\n off<K extends keyof WorkflowEventMap>(event: K, handler: WorkflowEventHandler<K>) {\n emitter.off(event, handler);\n },\n asTool<TToolInput = TInput>(options: {\n description?: string;\n inputSchema: StandardSchemaV1<TToolInput>;\n }): ToolContract<TToolInput, TOutput> {\n return asTool<TInput, TOutput, TToolInput>(instance, options);\n },\n };\n\n return instance;\n}\n\n/**\n * Resolve the overloaded `execute()` call shape. If the caller passed\n * a single plain object with an `input` field, treat it as the\n * combined `WorkflowExecuteOptions`. Otherwise the first arg is the\n * raw workflow input and the second is the run options.\n *\n * Ambiguity note: if your real workflow `input` is itself an object\n * with a top-level `input` key, prefer `execute(rawInput, options)`\n * explicitly — the single-arg detection heuristic would mis-classify\n * it.\n */\nfunction normalizeExecuteArgs<TInput, TContext>(\n inputOrOptions: TInput | WorkflowExecuteOptions<TInput, TContext>,\n maybeOptions: WorkflowRunOptions<TContext> | undefined,\n): { input: TInput; options?: WorkflowRunOptions<TContext> } {\n if (\n maybeOptions === undefined &&\n inputOrOptions !== null &&\n typeof inputOrOptions === \"object\" &&\n \"input\" in (inputOrOptions as object)\n ) {\n const combined = inputOrOptions as WorkflowExecuteOptions<TInput, TContext>;\n const { input, ...options } = combined;\n return { input, options };\n }\n\n return { input: inputOrOptions as TInput, options: maybeOptions };\n}\n\nfunction validate<TInput, TOutput, TState, TContext>(\n definition: WorkflowDefinition<TInput, TOutput, TState, TContext>,\n): void {\n if (!definition.name || typeof definition.name !== \"string\") {\n throw new WorkflowError(\"ai.workflow: `name` is required\");\n }\n\n if (!Array.isArray(definition.steps) || definition.steps.length === 0) {\n throw new WorkflowError(`ai.workflow(\"${definition.name}\"): at least one step is required`);\n }\n\n const seen = new Set<string>();\n const walk = (name: string) => {\n if (seen.has(name)) {\n throw new WorkflowError(`ai.workflow(\"${definition.name}\"): duplicate step name \"${name}\"`);\n }\n seen.add(name);\n };\n\n for (const step of definition.steps) {\n walk(step.name);\n\n if (step.parallel) {\n for (const child of step.parallel) {\n walk(child.name);\n }\n }\n }\n}\n\nfunction generateRunId(): string {\n // Non-crypto random — adequate for ephemeral workflow runs.\n return `wf_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,SAAgB,SAMd,YACqD;CACrD,SAAS,UAAU;CACnB,MAAM,YAAY,iBAAiB,UAAU;CAC7C,MAAM,UAAU,IAAI,gBAAgB,WAAW,EAAE;CAEjD,eAAe,QACb,gBACA,cACkC;EAClC,MAAM,EAAE,OAAO,YAAY,qBACzB,gBACA,YACF;EACA,MAAM,QAAQ,SAAS,SAAS,cAAc;EAC9C,MAAM,SAAS,MAAM,YAAqB;GACxC;GACA;GACA;GACA;GACA,SAAS,SAAS;GAClB;GACA,QAAQ,SAAS;GACjB,mBAAmB,SAAS;GAC5B,WAAW,SAAS;EACtB,CAAC;EAQD,MAAM,gBAAgB,WAAW,SAAS,OAAO,MAAoC;EAErF,OAAO;CACT;CAEA,eAAe,OACb,OACA,SACkC;EAClC,MAAM,WAAW,MAAM,sBAAsB;GAC3C;GACA;GACA;GACA;EACF,CAAC;EAED,MAAM,SAAS,MAAM,YAAqB;GACxC;GACA;GACA;GACA,OAAO,SAAS;GAChB,SAAS,SAAS;GAClB;GACA,QAAQ,SAAS;GACjB,mBAAmB,SAAS;GAC5B,WAAW,SAAS;GACpB,YAAY;EACd,CAAC;EAED,MAAM,gBAAgB,WAAW,SAAS,OAAO,MAAoC;EAErF,OAAO;CACT;CAEA,MAAM,WAAgE;EACpE,MAAM,WAAW;EACjB,aAAa,WAAW;EACxB,aAAa,WAAW;EACxB;EACA,SAAS,WAAW;EACpB;EACA;EACA,GAAqC,OAAU,SAAkC;GAC/E,OAAO,QAAQ,GAAG,OAAO,OAAO;EAClC;EACA,IAAsC,OAAU,SAAkC;GAChF,QAAQ,IAAI,OAAO,OAAO;EAC5B;EACA,OAA4B,SAGU;GACpC,OAAO,OAAoC,UAAU,OAAO;EAC9D;CACF;CAEA,OAAO;AACT;;;;;;;;;;;;AAaA,SAAS,qBACP,gBACA,cAC2D;CAC3D,IACE,iBAAiB,UACjB,mBAAmB,QACnB,OAAO,mBAAmB,YAC1B,WAAY,gBACZ;EAEA,MAAM,EAAE,OAAO,GAAG,YAAYA;EAC9B,OAAO;GAAE;GAAO;EAAQ;CAC1B;CAEA,OAAO;EAAE,OAAO;EAA0B,SAAS;CAAa;AAClE;AAEA,SAAS,SACP,YACM;CACN,IAAI,CAAC,WAAW,QAAQ,OAAO,WAAW,SAAS,UACjD,MAAM,IAAI,cAAc,iCAAiC;CAG3D,IAAI,CAAC,MAAM,QAAQ,WAAW,KAAK,KAAK,WAAW,MAAM,WAAW,GAClE,MAAM,IAAI,cAAc,gBAAgB,WAAW,KAAK,kCAAkC;CAG5F,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,QAAQ,SAAiB;EAC7B,IAAI,KAAK,IAAI,IAAI,GACf,MAAM,IAAI,cAAc,gBAAgB,WAAW,KAAK,2BAA2B,KAAK,EAAE;EAE5F,KAAK,IAAI,IAAI;CACf;CAEA,KAAK,MAAM,QAAQ,WAAW,OAAO;EACnC,KAAK,KAAK,IAAI;EAEd,IAAI,KAAK,UACP,KAAK,MAAM,SAAS,KAAK,UACvB,KAAK,MAAM,IAAI;CAGrB;AACF;AAEA,SAAS,gBAAwB;CAE/B,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,GAAG,EAAE;AAChF"}
1
+ {"version":3,"file":"workflow.mjs","names":["combined"],"sources":["../../../../../../../ai/src/workflow/workflow.ts"],"sourcesContent":["import type { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport type { WorkflowEventMap } from \"../contracts/events/event-map.type\";\nimport type { ExecutionReport } from \"../contracts/result/execution-report.type\";\nimport type { WorkflowResult } from \"../contracts/result/workflow-result.type\";\nimport type {\n WorkflowDefinition,\n WorkflowEventHandler,\n WorkflowExecuteOptions,\n WorkflowInstance,\n WorkflowResumeOptions,\n WorkflowRunOptions,\n} from \"../contracts/workflow/workflow.contract\";\nimport { WorkflowError } from \"../errors\";\nimport { notifyObservers } from \"../observe/resolve-observers\";\nimport type { ToolContract } from \"../tool/tool\";\nimport { asTool } from \"./as-tool\";\nimport { WorkflowEmitter } from \"./emitter\";\nimport { loadSnapshotForResume, runWorkflow } from \"./engine\";\nimport { computeSignature } from \"./signature\";\n\n/**\n * `ai.workflow(def)` — construct a `WorkflowInstance`. Validates the\n * definition, computes a stable structural signature, and wires up the\n * three-tier event subscription model.\n */\nexport function workflow<\n TInput = unknown,\n TOutput = unknown,\n TState = Record<string, unknown>,\n TContext = unknown,\n>(\n definition: WorkflowDefinition<TInput, TOutput, TState, TContext>,\n): WorkflowInstance<TInput, TOutput, TState, TContext> {\n validate(definition);\n const signature = computeSignature(definition);\n const emitter = new WorkflowEmitter(definition.on);\n\n async function execute(\n inputOrOptions: TInput | WorkflowExecuteOptions<TInput, TContext>,\n maybeOptions?: WorkflowRunOptions<TContext>,\n ): Promise<WorkflowResult<TOutput>> {\n const { input, options } = normalizeExecuteArgs<TInput, TContext>(\n inputOrOptions,\n maybeOptions,\n );\n const runId = options?.runId ?? generateRunId();\n const result = await runWorkflow<TOutput>({\n definition,\n signature,\n emitter,\n input,\n context: options?.context,\n runId,\n signal: options?.signal,\n executionHandlers: options?.on,\n sessionId: options?.sessionId,\n });\n\n // Route the finished report to any resolved observers (F1/F3).\n // Gated by `definition.observe` + the global observe-all flag;\n // observer errors are swallowed inside `notifyObservers`. Bridge the\n // pre-existing `WorkflowReport = Omit<BaseReport, \"type\">` drift (the\n // report carries `type: \"workflow\"` at runtime — engine sets it) so\n // this call site adds no new type error beyond the documented baseline.\n await notifyObservers(definition.observe, result.report as unknown as ExecutionReport);\n\n return result;\n }\n\n async function resume(\n runId: string,\n options?: WorkflowResumeOptions<TContext>,\n ): Promise<WorkflowResult<TOutput>> {\n const snapshot = await loadSnapshotForResume({\n definition,\n signature,\n runId,\n options,\n });\n\n const result = await runWorkflow<TOutput>({\n definition,\n signature,\n emitter,\n input: snapshot.input,\n context: options?.context,\n runId,\n signal: options?.signal,\n executionHandlers: options?.on,\n sessionId: options?.sessionId,\n resumeFrom: snapshot,\n });\n\n await notifyObservers(definition.observe, result.report as unknown as ExecutionReport);\n\n return result;\n }\n\n const instance: WorkflowInstance<TInput, TOutput, TState, TContext> = {\n name: definition.name,\n description: definition.description,\n inputSchema: definition.inputSchema,\n signature,\n version: definition.version,\n execute,\n resume,\n on<K extends keyof WorkflowEventMap>(event: K, handler: WorkflowEventHandler<K>) {\n return emitter.on(event, handler);\n },\n off<K extends keyof WorkflowEventMap>(event: K, handler: WorkflowEventHandler<K>) {\n emitter.off(event, handler);\n },\n asTool<TToolInput = TInput>(options: {\n description?: string;\n inputSchema: StandardSchemaV1<TToolInput>;\n }): ToolContract<TToolInput, TOutput> {\n return asTool<TInput, TOutput, TToolInput>(instance, options);\n },\n };\n\n return instance;\n}\n\n/**\n * Resolve the overloaded `execute()` call shape. If the caller passed\n * a single plain object with an `input` field, treat it as the\n * combined `WorkflowExecuteOptions`. Otherwise the first arg is the\n * raw workflow input and the second is the run options.\n *\n * Ambiguity note: if your real workflow `input` is itself an object\n * with a top-level `input` key, prefer `execute(rawInput, options)`\n * explicitly — the single-arg detection heuristic would mis-classify\n * it.\n */\nfunction normalizeExecuteArgs<TInput, TContext>(\n inputOrOptions: TInput | WorkflowExecuteOptions<TInput, TContext>,\n maybeOptions: WorkflowRunOptions<TContext> | undefined,\n): { input: TInput; options?: WorkflowRunOptions<TContext> } {\n if (\n maybeOptions === undefined &&\n inputOrOptions !== null &&\n typeof inputOrOptions === \"object\" &&\n \"input\" in (inputOrOptions as object)\n ) {\n const combined = inputOrOptions as WorkflowExecuteOptions<TInput, TContext>;\n const { input, ...options } = combined;\n return { input, options };\n }\n\n return { input: inputOrOptions as TInput, options: maybeOptions };\n}\n\nfunction validate<TInput, TOutput, TState, TContext>(\n definition: WorkflowDefinition<TInput, TOutput, TState, TContext>,\n): void {\n if (!definition.name || typeof definition.name !== \"string\") {\n throw new WorkflowError(\"ai.workflow: `name` is required\");\n }\n\n if (!Array.isArray(definition.steps) || definition.steps.length === 0) {\n throw new WorkflowError(`ai.workflow(\"${definition.name}\"): at least one step is required`);\n }\n\n const seen = new Set<string>();\n const walk = (name: string) => {\n if (seen.has(name)) {\n throw new WorkflowError(`ai.workflow(\"${definition.name}\"): duplicate step name \"${name}\"`);\n }\n seen.add(name);\n };\n\n for (const step of definition.steps) {\n walk(step.name);\n\n if (step.parallel) {\n for (const child of step.parallel) {\n walk(child.name);\n }\n }\n }\n}\n\nfunction generateRunId(): string {\n // Non-crypto random — adequate for ephemeral workflow runs.\n return `wf_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,SAAgB,SAMd,YACqD;CACrD,SAAS,UAAU;CACnB,MAAM,YAAY,iBAAiB,UAAU;CAC7C,MAAM,UAAU,IAAI,gBAAgB,WAAW,EAAE;CAEjD,eAAe,QACb,gBACA,cACkC;EAClC,MAAM,EAAE,OAAO,YAAY,qBACzB,gBACA,YACF;EACA,MAAM,QAAQ,SAAS,SAAS,cAAc;EAC9C,MAAM,SAAS,MAAM,YAAqB;GACxC;GACA;GACA;GACA;GACA,SAAS,SAAS;GAClB;GACA,QAAQ,SAAS;GACjB,mBAAmB,SAAS;GAC5B,WAAW,SAAS;EACtB,CAAC;EAQD,MAAM,gBAAgB,WAAW,SAAS,OAAO,MAAoC;EAErF,OAAO;CACT;CAEA,eAAe,OACb,OACA,SACkC;EAClC,MAAM,WAAW,MAAM,sBAAsB;GAC3C;GACA;GACA;GACA;EACF,CAAC;EAED,M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O;EACnC,KAAK,KAAK,IAAI;EAEd,IAAI,KAAK,UACP,KAAK,MAAM,SAAS,KAAK,UACvB,KAAK,MAAM,IAAI;CAGrB;AACF;AAEA,SAAS,gBAAwB;CAE/B,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,GAAG,EAAE;AAChF"}
package/llms-full.txt CHANGED
@@ -2702,9 +2702,9 @@ report.messages; // CapturedMessage[] — every role (system/user/assistant/tool
2702
2702
 
2703
2703
  A `CapturedMessage` is a JSON-safe projection: `{ role, content, toolCalls?, toolCallId? }` — `content` is always a string (tool results stringified), assistant turns that triggered tools carry `toolCalls`, tool-result turns carry the `toolCallId` they answer. Unlike `trips[].input` (which stubs non-first trips with `"[tool results]"`), this preserves the **real** turn array. Omitted ⇒ the field is **absent** and the report is byte-for-byte as before. Opt-in because messages can be large and sensitive (full prompts, tool inputs/outputs) — and **required for panoptic full-history capture**.
2704
2704
 
2705
- ## Callback sub-agents nest in the report tree
2705
+ ## Callback / run-step sub-agents nest in the report tree
2706
2706
 
2707
- The `ExecutionReport` an observer receives reflects **full** lineage: a supervisor / team / orchestrator callback that calls `agent.execute()` directly auto-nests `callback agent → tool` (via an ambient `RunFrame`), so usage / cost roll up and panoptic renders the sub-agent under its callback instead of as a lone `$0` span. No observer-side change is needed — the tree arrives already nested. A team's root span carries `type: "team"` (a first-class `ReportType`, not `"supervisor"`), so observers can distinguish, group, and label team runs as their own type. See [`@warlock.js/ai/run-supervisor/SKILL.md`](@warlock.js/ai/run-supervisor/SKILL.md).
2707
+ The `ExecutionReport` an observer receives reflects **full** lineage: a supervisor / team / orchestrator callback, OR a workflow `run` step, that calls `agent.execute()` directly auto-nests `→ agent → tool` (via an ambient `RunFrame`), so usage / cost roll up and panoptic renders the sub-agent under its enclosing node instead of as a lone `$0` span AND a disconnected second top-level trace. No observer-side change is needed — the tree arrives already nested. A team's root span carries `type: "team"` (a first-class `ReportType`, not `"supervisor"`), so observers can distinguish, group, and label team runs as their own type. See [`@warlock.js/ai/run-supervisor/SKILL.md`](@warlock.js/ai/run-supervisor/SKILL.md) and [`@warlock.js/ai/run-ai-workflow/SKILL.md`](@warlock.js/ai/run-ai-workflow/SKILL.md).
2708
2708
 
2709
2709
  ## The config seam — `onConfigApplied`
2710
2710
 
@@ -4227,6 +4227,25 @@ type WorkflowResult<TOutput> = {
4227
4227
 
4228
4228
  `report.steps[name]` holds a frozen `StepSnapshot` with `output`, `status`, `attempts`, `attemptHistory`, timings, nested children for parallel groups.
4229
4229
 
4230
+ ### Run-step sub-agent nesting
4231
+
4232
+ `report.children` collects every step's captured executable report — a `step.agent`'s report, AND (mirroring the supervisor/team/orchestrator callback pattern — [`@warlock.js/ai/run-supervisor/SKILL.md`](@warlock.js/ai/run-supervisor/SKILL.md)) anything a `run` step's callback invoked DIRECTLY, e.g. `agent.execute(...)` rather than the declarative `agent` field:
4233
+
4234
+ ```ts
4235
+ ai.step({
4236
+ name: "summarize",
4237
+ run: async (ctx) => {
4238
+ const result = await summarizerAgent.execute(ctx.input.text); // direct call — still nested
4239
+ return { prose: result.text };
4240
+ },
4241
+ }),
4242
+ // report.children → [ agentReport("summarizer") ] — usage/cost rolled up into
4243
+ // report.usage, and the agent does NOT also appear as a separate top-level
4244
+ // observed trace (an ambient RunFrame suppresses that self-routing).
4245
+ ```
4246
+
4247
+ No manual id threading, no separate observer wiring — an `Observer` (or Panoptic's dashboard) sees ONE tree: `workflow → agent → tool`, not a disconnected `workflow` trace next to a disconnected `agent` trace. `sessionId` propagates onto the captured subtree the same way. A `run` step's captures land as DIRECT children of the workflow report (the same tree position a `step.agent` report already occupies) — there's no intermediate "step" node, unlike supervisor's "callback" node. Only a step's LAST retry attempt's captures survive into the final snapshot; a failed attempt that called an agent and then threw never leaks that capture into a subsequent successful retry. A standalone `agent.execute()` call OUTSIDE any workflow step is unaffected — it keeps its own self-root, same as always.
4248
+
4230
4249
  ## Step lifecycle
4231
4250
 
4232
4251
  ```
@@ -5005,6 +5024,8 @@ ai.supervisor({
5005
5024
 
5006
5025
  Same behavior across `ai.supervisor`, `ai.team` (member callbacks), and `ai.orchestrator` (turn callbacks) — and `sessionId` propagates onto the captured subtree. `ctx.run(agent)` is captured **exactly once** (the explicit path does not double-count via the ambient frame), and a standalone `agent.execute()` **outside** any callback keeps its own self-root (no frame leakage). This is what an `Observer` / panoptic sees — see [`@warlock.js/ai/observe-ai-flows/SKILL.md`](@warlock.js/ai/observe-ai-flows/SKILL.md).
5007
5026
 
5027
+ `ai.workflow`'s `run` steps get the same ambient-frame treatment (see [`@warlock.js/ai/run-ai-workflow/SKILL.md`](@warlock.js/ai/run-ai-workflow/SKILL.md#run-step-sub-agent-nesting)) — with one shape difference: workflow has no intermediate "callback" report node, so a `run` step's captured agent lands as a DIRECT child of the workflow report (same tree position `step.agent`'s report already occupies), not nested one level deeper under a step-named node.
5028
+
5008
5029
  ## Per-call options
5009
5030
 
5010
5031
  ```ts
package/package.json CHANGED
@@ -15,16 +15,16 @@
15
15
  "@standard-schema/spec": "^1.0.0"
16
16
  },
17
17
  "peerDependencies": {
18
- "@warlock.js/ai-openai": "4.8.2",
19
- "@warlock.js/cache": "4.8.2",
20
- "@warlock.js/logger": "4.8.2",
18
+ "@warlock.js/ai-openai": "4.9.1",
19
+ "@warlock.js/cache": "4.9.1",
20
+ "@warlock.js/logger": "4.9.1",
21
21
  "langfuse": "*",
22
22
  "openai": "*",
23
23
  "pdf-parse": "*",
24
24
  "pg": "*",
25
25
  "redis": "*"
26
26
  },
27
- "version": "4.8.2",
27
+ "version": "4.9.1",
28
28
  "main": "./cjs/index.cjs",
29
29
  "module": "./esm/index.mjs",
30
30
  "types": "./esm/index.d.mts",
@@ -66,9 +66,9 @@ report.messages; // CapturedMessage[] — every role (system/user/assistant/tool
66
66
 
67
67
  A `CapturedMessage` is a JSON-safe projection: `{ role, content, toolCalls?, toolCallId? }` — `content` is always a string (tool results stringified), assistant turns that triggered tools carry `toolCalls`, tool-result turns carry the `toolCallId` they answer. Unlike `trips[].input` (which stubs non-first trips with `"[tool results]"`), this preserves the **real** turn array. Omitted ⇒ the field is **absent** and the report is byte-for-byte as before. Opt-in because messages can be large and sensitive (full prompts, tool inputs/outputs) — and **required for panoptic full-history capture**.
68
68
 
69
- ## Callback sub-agents nest in the report tree
69
+ ## Callback / run-step sub-agents nest in the report tree
70
70
 
71
- The `ExecutionReport` an observer receives reflects **full** lineage: a supervisor / team / orchestrator callback that calls `agent.execute()` directly auto-nests `callback agent → tool` (via an ambient `RunFrame`), so usage / cost roll up and panoptic renders the sub-agent under its callback instead of as a lone `$0` span. No observer-side change is needed — the tree arrives already nested. A team's root span carries `type: "team"` (a first-class `ReportType`, not `"supervisor"`), so observers can distinguish, group, and label team runs as their own type. See [`@warlock.js/ai/run-supervisor/SKILL.md`](@warlock.js/ai/run-supervisor/SKILL.md).
71
+ The `ExecutionReport` an observer receives reflects **full** lineage: a supervisor / team / orchestrator callback, OR a workflow `run` step, that calls `agent.execute()` directly auto-nests `→ agent → tool` (via an ambient `RunFrame`), so usage / cost roll up and panoptic renders the sub-agent under its enclosing node instead of as a lone `$0` span AND a disconnected second top-level trace. No observer-side change is needed — the tree arrives already nested. A team's root span carries `type: "team"` (a first-class `ReportType`, not `"supervisor"`), so observers can distinguish, group, and label team runs as their own type. See [`@warlock.js/ai/run-supervisor/SKILL.md`](@warlock.js/ai/run-supervisor/SKILL.md) and [`@warlock.js/ai/run-ai-workflow/SKILL.md`](@warlock.js/ai/run-ai-workflow/SKILL.md).
72
72
 
73
73
  ## The config seam — `onConfigApplied`
74
74
 
@@ -111,6 +111,25 @@ type WorkflowResult<TOutput> = {
111
111
 
112
112
  `report.steps[name]` holds a frozen `StepSnapshot` with `output`, `status`, `attempts`, `attemptHistory`, timings, nested children for parallel groups.
113
113
 
114
+ ### Run-step sub-agent nesting
115
+
116
+ `report.children` collects every step's captured executable report — a `step.agent`'s report, AND (mirroring the supervisor/team/orchestrator callback pattern — [`@warlock.js/ai/run-supervisor/SKILL.md`](@warlock.js/ai/run-supervisor/SKILL.md)) anything a `run` step's callback invoked DIRECTLY, e.g. `agent.execute(...)` rather than the declarative `agent` field:
117
+
118
+ ```ts
119
+ ai.step({
120
+ name: "summarize",
121
+ run: async (ctx) => {
122
+ const result = await summarizerAgent.execute(ctx.input.text); // direct call — still nested
123
+ return { prose: result.text };
124
+ },
125
+ }),
126
+ // report.children → [ agentReport("summarizer") ] — usage/cost rolled up into
127
+ // report.usage, and the agent does NOT also appear as a separate top-level
128
+ // observed trace (an ambient RunFrame suppresses that self-routing).
129
+ ```
130
+
131
+ No manual id threading, no separate observer wiring — an `Observer` (or Panoptic's dashboard) sees ONE tree: `workflow → agent → tool`, not a disconnected `workflow` trace next to a disconnected `agent` trace. `sessionId` propagates onto the captured subtree the same way. A `run` step's captures land as DIRECT children of the workflow report (the same tree position a `step.agent` report already occupies) — there's no intermediate "step" node, unlike supervisor's "callback" node. Only a step's LAST retry attempt's captures survive into the final snapshot; a failed attempt that called an agent and then threw never leaks that capture into a subsequent successful retry. A standalone `agent.execute()` call OUTSIDE any workflow step is unaffected — it keeps its own self-root, same as always.
132
+
114
133
  ## Step lifecycle
115
134
 
116
135
  ```
@@ -286,6 +286,8 @@ ai.supervisor({
286
286
 
287
287
  Same behavior across `ai.supervisor`, `ai.team` (member callbacks), and `ai.orchestrator` (turn callbacks) — and `sessionId` propagates onto the captured subtree. `ctx.run(agent)` is captured **exactly once** (the explicit path does not double-count via the ambient frame), and a standalone `agent.execute()` **outside** any callback keeps its own self-root (no frame leakage). This is what an `Observer` / panoptic sees — see [`@warlock.js/ai/observe-ai-flows/SKILL.md`](@warlock.js/ai/observe-ai-flows/SKILL.md).
288
288
 
289
+ `ai.workflow`'s `run` steps get the same ambient-frame treatment (see [`@warlock.js/ai/run-ai-workflow/SKILL.md`](@warlock.js/ai/run-ai-workflow/SKILL.md#run-step-sub-agent-nesting)) — with one shape difference: workflow has no intermediate "callback" report node, so a `run` step's captured agent lands as a DIRECT child of the workflow report (same tree position `step.agent`'s report already occupies), not nested one level deeper under a step-named node.
290
+
289
291
  ## Per-call options
290
292
 
291
293
  ```ts
@@ -1 +0,0 @@
1
- {"version":3,"file":"magic-string.es-BtxW4VqG.cjs","names":[],"sources":["../../../../../../@warlock.js/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../../../../../../@warlock.js/node_modules/magic-string/dist/magic-string.es.mjs"],"sourcesContent":["// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nclass BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n\nclass Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t{\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nclass SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n\nfunction guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n\nfunction getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n\nconst toString = Object.prototype.toString;\n\nfunction isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n\nfunction getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n\nconst wordRegex = /\\w/;\n\nclass Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nclass MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\tif (this.outro) {\n\t\t\tmappings.advance(this.outro);\n\t\t}\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tlet previousChunk = chunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\n\t\t\t// Prevent infinite loop (e.g. via empty chunks, where start === end)\n\t\t\tif (chunk === previousChunk) return;\n\n\t\t\tpreviousChunk = chunk;\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tif (typeof replacement === 'function') {\n\t\t\t\treplacement = replacement(string, index, original);\n\t\t\t}\n\t\t\tif (string !== replacement) {\n\t\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tlet _replacement = replacement;\n\t\t\tif (typeof replacement === 'function') {\n\t\t\t\t_replacement = replacement(previous, index, original);\n\t\t\t}\n\t\t\tif (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nclass Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n\nexport { Bundle, SourceMap, MagicString as default };\n//# sourceMappingURL=magic-string.es.mjs.map\n"],"x_google_ignoreList":[0,1],"mappings":";;AACA,IAAI,QAAQ,IAAI,WAAW,CAAC;AAC5B,IAAI,YAAY,IAAI,WAAW,CAAC;AAChC,IAAI,QAAQ;AACZ,IAAI,YAAY,IAAI,WAAW,EAAE;AACjC,IAAI,YAAY,IAAI,WAAW,GAAG;AAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACrC,MAAM,IAAI,MAAM,WAAW,CAAC;CAC5B,UAAU,KAAK;CACf,UAAU,KAAK;AACjB;AAkBA,SAAS,cAAc,SAAS,KAAK,UAAU;CAC7C,IAAI,QAAQ,MAAM;CAClB,QAAQ,QAAQ,IAAI,CAAC,SAAS,IAAI,IAAI,SAAS;CAC/C,GAAG;EACD,IAAI,UAAU,QAAQ;EACtB,WAAW;EACX,IAAI,QAAQ,GAAG,WAAW;EAC1B,QAAQ,MAAM,UAAU,QAAQ;CAClC,SAAS,QAAQ;CACjB,OAAO;AACT;AAOA,IAAI,YAAY,OAAO;AACvB,IAAI,KAAK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,SAAS,QAAQ,MAAM;EAErC,IAAI,UAAU,IAAI;GACjB,IAAI,OAAO,gBAAgB,YAC1B,cAAc,YAAY,QAAQ,OAAO,QAAQ;GAElD,IAAI,WAAW,aACd,KAAK,UAAU,OAAO,QAAQ,OAAO,QAAQ,WAAW;EAE1D;EAEA,OAAO;CACR;CAEA,QAAQ,aAAa,aAAa;EACjC,IAAI,OAAO,gBAAgB,UAC1B,OAAO,KAAK,eAAe,aAAa,WAAW;EAGpD,OAAO,KAAK,eAAe,aAAa,WAAW;CACpD;CAEA,kBAAkB,QAAQ,aAAa;EACtC,MAAM,EAAE,aAAa;EACrB,MAAM,eAAe,OAAO;EAC5B,KACC,IAAI,QAAQ,SAAS,QAAQ,MAAM,GACnC,UAAU,IACV,QAAQ,SAAS,QAAQ,QAAQ,QAAQ,YAAY,GACpD;GACD,MAAM,WAAW,SAAS,MAAM,OAAO,QAAQ,YAAY;GAC3D,IAAI,eAAe;GACnB,IAAI,OAAO,gBAAgB,YAC1B,eAAe,YAAY,UAAU,OAAO,QAAQ;GAErD,IAAI,aAAa,cAAc,KAAK,UAAU,OAAO,QAAQ,cAAc,YAAY;EACxF;EAEA,OAAO;CACR;CAEA,WAAW,aAAa,aAAa;EACpC,IAAI,OAAO,gBAAgB,UAC1B,OAAO,KAAK,kBAAkB,aAAa,WAAW;EAGvD,IAAI,CAAC,YAAY,QAChB,MAAM,IAAI,UACT,2EACD;EAGD,OAAO,KAAK,eAAe,aAAa,WAAW;CACpD;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"matcher-logic-SBnzYohQ.cjs","names":[],"sources":["../../../../../../@warlock.js/ai/src/contracts/end.type.ts","../../../../../../@warlock.js/ai/src/testing/matcher-logic.ts"],"sourcesContent":["/**\n * Framework-global termination sentinel. Emitted by any primitive\n * whose control flow is routed through JSON-serializable strings —\n * supervisor (router agent's `next`, deterministic `route` callback),\n * future planner (plan steps), future orchestrator (session\n * directive), any future primitive that needs to say \"stop\" across a\n * wire that can't carry `null`.\n *\n * **Why one shared literal.** Consumers learn one word. Cross-\n * primitive pipes — a planner feeding a supervisor, a supervisor\n * nested as a tool inside an orchestrator — can pass the sentinel\n * through without translation.\n *\n * **Why this specific string.** Brand-prefixed (`__warlock:`) so it\n * can't collide with a realistic user-chosen intent / step / route\n * key (`\"end\"`, `\"done\"`, `\"stop\"` are all valid user keys).\n * Underscore-surrounded so it stands out in logs and snapshots.\n * JSON-safe so a router agent emits it verbatim.\n *\n * **Not used by every primitive.** Workflow's `nextStep` returns\n * `null` to end — a callback-level mechanism that predates this\n * sentinel. Workflows keep `null`; the sentinel is for primitives\n * whose \"end\" must survive a JSON boundary.\n *\n * @example\n * import { END } from \"@warlock.js/ai\";\n *\n * // Supervisor route callback\n * ai.supervisor({\n * intents: { writer, critic },\n * route: (ctx) => (ctx.iteration >= 5 ? END : \"writer\"),\n * });\n *\n * // Router agent output schema\n * const router = ai.agent({\n * model,\n * output: z.object({\n * next: z.union([z.string(), z.array(z.string()), z.literal(END)]),\n * }),\n * });\n */\nexport const END = \"__warlock:end__\" as const;\n\n/**\n * Value type of `END`. Exposed so consumers building Zod / Standard\n * Schema output schemas can write `z.literal(END)` without\n * hard-coding the string, and so generic helpers that accept \"the\n * end sentinel\" can type-narrow correctly.\n */\nexport type EndSentinel = typeof END;\n","import type { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport { END } from \"../contracts/end.type\";\nimport type { BaseReport } from \"../contracts/result/base-report.type\";\nimport type { SupervisorReport } from \"../contracts/result/supervisor-result.type\";\nimport type { WorkflowReport } from \"../contracts/result/workflow-result.type\";\n\n/**\n * Normalized matcher verdict — the library-agnostic shape every\n * matcher in this module returns. Vitest's `expect.extend` consumes\n * the same `{ pass, message }` contract, so the registration layer\n * forwards these verbatim.\n */\nexport type MatcherVerdict = {\n /** Whether the assertion passed. */\n pass: boolean;\n /** Lazy message factory — Vitest calls it only when reporting. */\n message: () => string;\n};\n\n/**\n * Any unified result envelope a matcher can be handed. Accepts the\n * full `{ report, ... }` result or a bare `BaseReport` so callers can\n * assert against either `await x.execute()` or `result.report`.\n */\ntype ReportLike = BaseReport | { report: BaseReport };\n\n/**\n * Coerce a matcher target into its `BaseReport`. Accepts the result\n * envelope (`{ report }`) or a report directly.\n */\nfunction toReport(received: ReportLike): BaseReport {\n if (\"report\" in received && received.report) {\n return received.report;\n }\n\n return received as BaseReport;\n}\n\n/** Narrow a `BaseReport` to a `SupervisorReport` by its discriminator. */\nfunction asSupervisorReport(report: BaseReport): SupervisorReport | undefined {\n return report.type === \"supervisor\" ? (report as SupervisorReport) : undefined;\n}\n\n/** Narrow a `BaseReport` to a `WorkflowReport` by its discriminator. */\nfunction asWorkflowReport(report: BaseReport): WorkflowReport | undefined {\n return report.type === \"workflow\" ? (report as WorkflowReport) : undefined;\n}\n\n/**\n * Collect every intent name dispatched by a supervisor across all\n * iterations — the keys of each iteration snapshot's `result` record.\n */\nfunction dispatchedIntents(report: SupervisorReport): string[] {\n const intents = new Set<string>();\n\n for (const snapshot of report.snapshots) {\n for (const intent of Object.keys(snapshot.result)) {\n intents.add(intent);\n }\n }\n\n return [...intents];\n}\n\n/**\n * Assert that a supervisor routed to (dispatched) the named intent at\n * least once across its iterations. Targets a `SupervisorResult` or a\n * `SupervisorReport`.\n *\n * @example\n * expect(await supervisor.execute(input)).toRouteTo(\"critic\");\n */\nexport function matchRouteTo(received: ReportLike, intent: string): MatcherVerdict {\n const report = toReport(received);\n const supervisorReport = asSupervisorReport(report);\n\n if (!supervisorReport) {\n return {\n pass: false,\n message: () =>\n `toRouteTo expects a supervisor result, but received a \"${report.type}\" report`,\n };\n }\n\n const intents = dispatchedIntents(supervisorReport);\n const pass = intents.includes(intent);\n\n return {\n pass,\n message: () =>\n pass\n ? `expected supervisor not to route to \"${intent}\", but it did`\n : `expected supervisor to route to \"${intent}\", but it routed to [${intents.join(\", \")}]`,\n };\n}\n\n/**\n * Assert that a supervisor converged — terminated on its own decision\n * (`router` / `route` / `evaluate` / `classifier`) with a\n * `\"completed\"` status, rather than hitting the iteration cap, being\n * cancelled, or erroring. Targets a `SupervisorResult` or\n * `SupervisorReport`.\n *\n * @example\n * expect(await supervisor.execute(input)).toConverge();\n */\nexport function matchConverge(received: ReportLike): MatcherVerdict {\n const report = toReport(received);\n const supervisorReport = asSupervisorReport(report);\n\n if (!supervisorReport) {\n return {\n pass: false,\n message: () =>\n `toConverge expects a supervisor result, but received a \"${report.type}\" report`,\n };\n }\n\n const nonConvergent = new Set([\"max-iterations\", \"cancelled\", \"error\"]);\n const pass =\n supervisorReport.status === \"completed\" &&\n !nonConvergent.has(supervisorReport.terminatedBy);\n\n return {\n pass,\n message: () =>\n pass\n ? `expected supervisor not to converge, but it terminated via \"${supervisorReport.terminatedBy}\"`\n : `expected supervisor to converge, but status=\"${supervisorReport.status}\" terminatedBy=\"${supervisorReport.terminatedBy}\" after ${supervisorReport.iterations} iteration(s)`,\n };\n}\n\n/**\n * Assert that a workflow step completed successfully. Targets a\n * `WorkflowResult` or `WorkflowReport`; looks the step up by name in\n * `report.steps` and checks its status is `\"completed\"`.\n *\n * @example\n * expect(await workflow.execute(input)).toPassStep(\"draft\");\n */\nexport function matchPassStep(received: ReportLike, stepName: string): MatcherVerdict {\n const report = toReport(received);\n const workflowReport = asWorkflowReport(report);\n\n if (!workflowReport) {\n return {\n pass: false,\n message: () =>\n `toPassStep expects a workflow result, but received a \"${report.type}\" report`,\n };\n }\n\n const step = workflowReport.steps[stepName];\n\n if (!step) {\n const known = Object.keys(workflowReport.steps).join(\", \");\n return {\n pass: false,\n message: () =>\n `expected workflow to have a step \"${stepName}\", but steps are [${known}]`,\n };\n }\n\n const pass = step.status === \"completed\";\n\n return {\n pass,\n message: () =>\n pass\n ? `expected step \"${stepName}\" not to pass, but it completed`\n : `expected step \"${stepName}\" to pass, but its status was \"${step.status}\"`,\n };\n}\n\n/**\n * Result envelope carrying a typed `data` payload — what\n * `matchOutputShape` validates against a schema.\n */\ntype DataResult = { data?: unknown };\n\n/**\n * Assert that a result's `data` validates against a Standard Schema.\n * Targets any result envelope with a `data` field (agent / workflow /\n * supervisor). Runs the schema's `~standard.validate` and passes only\n * when it reports no issues.\n *\n * Synchronous-only: a schema whose `validate` returns a Promise is\n * rejected with a clear message rather than silently passing — the\n * async variant belongs on a dedicated async matcher if needed.\n *\n * @example\n * expect(await agent.execute(input, { output: schema })).toOutputShape(schema);\n */\nexport function matchOutputShape(\n received: DataResult,\n schema: StandardSchemaV1,\n): MatcherVerdict {\n const data = received.data;\n\n if (data === undefined) {\n return {\n pass: false,\n message: () => \"toOutputShape expected result.data to be defined, but it was undefined\",\n };\n }\n\n const validation = schema[\"~standard\"].validate(data);\n\n if (validation instanceof Promise) {\n return {\n pass: false,\n message: () =>\n \"toOutputShape received an async schema; use a synchronous Standard Schema for this matcher\",\n };\n }\n\n const pass = validation.issues === undefined;\n\n return {\n pass,\n message: () => {\n if (pass) {\n return \"expected result.data not to match the schema, but it did\";\n }\n\n const summary = (validation.issues ?? []).map((issue) => issue.message).join(\"; \");\n return `expected result.data to match the schema, but validation failed: ${summary}`;\n },\n };\n}\n\n// Re-exported so matcher consumers and tests can reference the\n// termination sentinel without reaching into contracts.\nexport { END };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,MAAM;;;;;;;;ACXnB,SAAS,SAAS,UAAkC;CAClD,IAAI,YAAY,YAAY,SAAS,QACnC,OAAO,SAAS;CAGlB,OAAO;AACT;;AAGA,SAAS,mBAAmB,QAAkD;CAC5E,OAAO,OAAO,SAAS,eAAgB,SAA8B;AACvE;;AAGA,SAAS,iBAAiB,QAAgD;CACxE,OAAO,OAAO,SAAS,aAAc,SAA4B;AACnE;;;;;AAMA,SAAS,kBAAkB,QAAoC;CAC7D,MAAM,0BAAU,IAAI,IAAY;CAEhC,KAAK,MAAM,YAAY,OAAO,WAC5B,KAAK,MAAM,UAAU,OAAO,KAAK,SAAS,MAAM,GAC9C,QAAQ,IAAI,M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