@loopingai/core 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/README.md +6 -4
  2. package/dist/a2a/agent-stub.d.ts +0 -1
  3. package/dist/a2a/agent-stub.js +0 -1
  4. package/dist/a2a/caller.d.ts +0 -1
  5. package/dist/a2a/caller.js +0 -1
  6. package/dist/a2a/card.d.ts +0 -1
  7. package/dist/a2a/card.js +0 -1
  8. package/dist/a2a/context.d.ts +0 -1
  9. package/dist/a2a/context.js +0 -1
  10. package/dist/a2a/executor.d.ts +0 -1
  11. package/dist/a2a/executor.js +0 -1
  12. package/dist/a2a/index.d.ts +0 -1
  13. package/dist/a2a/index.js +0 -1
  14. package/dist/a2a/notify.d.ts +4 -4
  15. package/dist/a2a/notify.js +4 -4
  16. package/dist/a2a/parts.d.ts +0 -1
  17. package/dist/a2a/parts.js +0 -1
  18. package/dist/a2a/push.d.ts +0 -1
  19. package/dist/a2a/push.js +0 -1
  20. package/dist/a2a/task-store.d.ts +0 -1
  21. package/dist/a2a/task-store.js +0 -1
  22. package/dist/a2a/task.d.ts +0 -1
  23. package/dist/a2a/task.js +0 -1
  24. package/dist/a2a/verify.d.ts +0 -1
  25. package/dist/a2a/verify.js +0 -1
  26. package/dist/agent/anthropic/index.d.ts +15 -0
  27. package/dist/agent/anthropic/index.js +19 -0
  28. package/dist/agent/anthropic/language-model.d.ts +59 -0
  29. package/dist/agent/anthropic/language-model.js +442 -0
  30. package/dist/agent/anthropic/prompt.d.ts +84 -0
  31. package/dist/agent/anthropic/prompt.js +541 -0
  32. package/dist/agent/anthropic/runtime.d.ts +79 -0
  33. package/dist/agent/anthropic/runtime.js +130 -0
  34. package/dist/agent/budget.d.ts +0 -1
  35. package/dist/agent/budget.js +0 -1
  36. package/dist/agent/control.d.ts +0 -1
  37. package/dist/agent/control.js +10 -10
  38. package/dist/agent/errors.d.ts +85 -0
  39. package/dist/agent/errors.js +64 -0
  40. package/dist/agent/final-reply.d.ts +14 -14
  41. package/dist/agent/final-reply.js +28 -12
  42. package/dist/agent/history.d.ts +3 -4
  43. package/dist/agent/history.js +2 -3
  44. package/dist/agent/index.d.ts +4 -3
  45. package/dist/agent/index.js +4 -3
  46. package/dist/agent/inference.d.ts +58 -2
  47. package/dist/agent/inference.js +44 -1
  48. package/dist/agent/model.d.ts +42 -26
  49. package/dist/agent/model.js +1 -49
  50. package/dist/agent/session.d.ts +6 -8
  51. package/dist/agent/session.js +3 -4
  52. package/dist/agent/workers-ai/index.d.ts +23 -0
  53. package/dist/agent/workers-ai/index.js +23 -0
  54. package/dist/agent/workers-ai/runtime.d.ts +42 -0
  55. package/dist/agent/workers-ai/runtime.js +63 -0
  56. package/dist/config.d.ts +49 -16
  57. package/dist/config.js +30 -2
  58. package/dist/contract/index.d.ts +0 -1
  59. package/dist/contract/index.js +0 -1
  60. package/dist/contract/plugin.d.ts +63 -4
  61. package/dist/contract/plugin.js +76 -1
  62. package/dist/contract/recipe.d.ts +16 -18
  63. package/dist/contract/recipe.js +0 -1
  64. package/dist/contract/validation.d.ts +0 -1
  65. package/dist/contract/validation.js +0 -1
  66. package/dist/db/db.d.ts +0 -2
  67. package/dist/db/db.js +0 -1
  68. package/dist/db/index.d.ts +0 -1
  69. package/dist/db/index.js +0 -1
  70. package/dist/db/migrations/index.d.ts +0 -1
  71. package/dist/db/migrations/index.js +8 -2
  72. package/dist/db/models/subtasks.d.ts +24 -26
  73. package/dist/db/models/subtasks.js +33 -77
  74. package/dist/db/models/tasks.d.ts +0 -1
  75. package/dist/db/models/tasks.js +0 -1
  76. package/dist/db/schema.d.ts +2 -22
  77. package/dist/db/schema.js +2 -5
  78. package/dist/env.d.ts +0 -1
  79. package/dist/env.js +0 -1
  80. package/dist/host/agent.d.ts +58 -5
  81. package/dist/host/agent.js +63 -10
  82. package/dist/host/index.d.ts +0 -1
  83. package/dist/host/index.js +0 -1
  84. package/dist/host/plugin-host.d.ts +0 -1
  85. package/dist/host/plugin-host.js +0 -1
  86. package/dist/index.d.ts +2 -3
  87. package/dist/index.js +2 -3
  88. package/dist/platform.d.ts +74 -12
  89. package/dist/platform.js +76 -14
  90. package/dist/round/agent.d.ts +36 -32
  91. package/dist/round/agent.js +61 -90
  92. package/dist/round/index.d.ts +3 -3
  93. package/dist/round/index.js +2 -3
  94. package/dist/round/policy.d.ts +2 -3
  95. package/dist/round/policy.js +0 -1
  96. package/dist/round/subagent.d.ts +19 -2
  97. package/dist/round/subagent.js +22 -6
  98. package/dist/round/turn.d.ts +32 -14
  99. package/dist/round/turn.js +83 -17
  100. package/dist/round/workflow.d.ts +30 -9
  101. package/dist/round/workflow.js +146 -78
  102. package/dist/runtime/index.d.ts +4 -3
  103. package/dist/runtime/index.js +6 -1
  104. package/dist/runtime/tool-families.d.ts +0 -1
  105. package/dist/runtime/tool-families.js +0 -1
  106. package/dist/subagent/fingerprint.d.ts +2 -3
  107. package/dist/subagent/fingerprint.js +8 -18
  108. package/dist/subagent/index.d.ts +6 -5
  109. package/dist/subagent/index.js +8 -7
  110. package/dist/subagent/prompt.d.ts +4 -6
  111. package/dist/subagent/prompt.js +0 -9
  112. package/dist/subagent/run.d.ts +8 -2
  113. package/dist/subagent/run.js +59 -10
  114. package/dist/subagent/workspace.d.ts +0 -1
  115. package/dist/subagent/workspace.js +0 -1
  116. package/dist/subtasks/catalog.d.ts +1 -2
  117. package/dist/subtasks/catalog.js +1 -2
  118. package/dist/subtasks/decomposition.d.ts +16 -21
  119. package/dist/subtasks/decomposition.js +27 -76
  120. package/dist/subtasks/delegate.d.ts +20 -2
  121. package/dist/subtasks/delegate.js +21 -17
  122. package/dist/subtasks/index.d.ts +1 -3
  123. package/dist/subtasks/index.js +1 -3
  124. package/dist/subtasks/subtask-types.d.ts +0 -9
  125. package/dist/subtasks/subtask-types.js +0 -8
  126. package/dist/subtasks/types.d.ts +45 -71
  127. package/dist/subtasks/types.js +0 -1
  128. package/dist/testing/auth.d.ts +0 -1
  129. package/dist/testing/auth.js +0 -1
  130. package/dist/testing/do.d.ts +0 -1
  131. package/dist/testing/do.js +0 -1
  132. package/dist/testing/fake-session.d.ts +0 -1
  133. package/dist/testing/fake-session.js +0 -1
  134. package/dist/testing/fixtures.d.ts +0 -1
  135. package/dist/testing/fixtures.js +0 -1
  136. package/dist/testing/harness.d.ts +0 -1
  137. package/dist/testing/harness.js +0 -1
  138. package/dist/testing/index.d.ts +0 -1
  139. package/dist/testing/index.js +0 -1
  140. package/dist/testing/mock-model.d.ts +35 -1
  141. package/dist/testing/mock-model.js +75 -1
  142. package/dist/testing/node.d.ts +0 -1
  143. package/dist/testing/node.js +0 -1
  144. package/dist/testing/vcr-global-setup.d.ts +1 -4
  145. package/dist/testing/vcr-global-setup.js +1 -4
  146. package/dist/testing/vcr-shared.d.ts +0 -1
  147. package/dist/testing/vcr-shared.js +0 -1
  148. package/dist/testing/vcr-spec.d.ts +0 -1
  149. package/dist/testing/vcr-spec.js +0 -1
  150. package/dist/testing/vcr-store.d.ts +0 -1
  151. package/dist/testing/vcr-store.js +0 -1
  152. package/dist/testing/vcr.d.ts +0 -1
  153. package/dist/testing/vcr.js +0 -1
  154. package/dist/worker/define-agent.d.ts +0 -1
  155. package/dist/worker/define-agent.js +0 -1
  156. package/dist/worker/index.d.ts +5 -13
  157. package/dist/worker/index.js +5 -13
  158. package/package.json +20 -2
  159. package/dist/a2a/agent-stub.d.ts.map +0 -1
  160. package/dist/a2a/agent-stub.js.map +0 -1
  161. package/dist/a2a/caller.d.ts.map +0 -1
  162. package/dist/a2a/caller.js.map +0 -1
  163. package/dist/a2a/card.d.ts.map +0 -1
  164. package/dist/a2a/card.js.map +0 -1
  165. package/dist/a2a/context.d.ts.map +0 -1
  166. package/dist/a2a/context.js.map +0 -1
  167. package/dist/a2a/executor.d.ts.map +0 -1
  168. package/dist/a2a/executor.js.map +0 -1
  169. package/dist/a2a/index.d.ts.map +0 -1
  170. package/dist/a2a/index.js.map +0 -1
  171. package/dist/a2a/notify.d.ts.map +0 -1
  172. package/dist/a2a/notify.js.map +0 -1
  173. package/dist/a2a/parts.d.ts.map +0 -1
  174. package/dist/a2a/parts.js.map +0 -1
  175. package/dist/a2a/push.d.ts.map +0 -1
  176. package/dist/a2a/push.js.map +0 -1
  177. package/dist/a2a/task-store.d.ts.map +0 -1
  178. package/dist/a2a/task-store.js.map +0 -1
  179. package/dist/a2a/task.d.ts.map +0 -1
  180. package/dist/a2a/task.js.map +0 -1
  181. package/dist/a2a/verify.d.ts.map +0 -1
  182. package/dist/a2a/verify.js.map +0 -1
  183. package/dist/agent/budget.d.ts.map +0 -1
  184. package/dist/agent/budget.js.map +0 -1
  185. package/dist/agent/control.d.ts.map +0 -1
  186. package/dist/agent/control.js.map +0 -1
  187. package/dist/agent/final-reply.d.ts.map +0 -1
  188. package/dist/agent/final-reply.js.map +0 -1
  189. package/dist/agent/history.d.ts.map +0 -1
  190. package/dist/agent/history.js.map +0 -1
  191. package/dist/agent/index.d.ts.map +0 -1
  192. package/dist/agent/index.js.map +0 -1
  193. package/dist/agent/inference.d.ts.map +0 -1
  194. package/dist/agent/inference.js.map +0 -1
  195. package/dist/agent/model.d.ts.map +0 -1
  196. package/dist/agent/model.js.map +0 -1
  197. package/dist/agent/session.d.ts.map +0 -1
  198. package/dist/agent/session.js.map +0 -1
  199. package/dist/config.d.ts.map +0 -1
  200. package/dist/config.js.map +0 -1
  201. package/dist/contract/index.d.ts.map +0 -1
  202. package/dist/contract/index.js.map +0 -1
  203. package/dist/contract/plugin.d.ts.map +0 -1
  204. package/dist/contract/plugin.js.map +0 -1
  205. package/dist/contract/recipe.d.ts.map +0 -1
  206. package/dist/contract/recipe.js.map +0 -1
  207. package/dist/contract/validation.d.ts.map +0 -1
  208. package/dist/contract/validation.js.map +0 -1
  209. package/dist/db/db.d.ts.map +0 -1
  210. package/dist/db/db.js.map +0 -1
  211. package/dist/db/index.d.ts.map +0 -1
  212. package/dist/db/index.js.map +0 -1
  213. package/dist/db/migrations/index.d.ts.map +0 -1
  214. package/dist/db/migrations/index.js.map +0 -1
  215. package/dist/db/models/subtasks.d.ts.map +0 -1
  216. package/dist/db/models/subtasks.js.map +0 -1
  217. package/dist/db/models/tasks.d.ts.map +0 -1
  218. package/dist/db/models/tasks.js.map +0 -1
  219. package/dist/db/schema.d.ts.map +0 -1
  220. package/dist/db/schema.js.map +0 -1
  221. package/dist/env.d.ts.map +0 -1
  222. package/dist/env.js.map +0 -1
  223. package/dist/host/agent.d.ts.map +0 -1
  224. package/dist/host/agent.js.map +0 -1
  225. package/dist/host/index.d.ts.map +0 -1
  226. package/dist/host/index.js.map +0 -1
  227. package/dist/host/plugin-host.d.ts.map +0 -1
  228. package/dist/host/plugin-host.js.map +0 -1
  229. package/dist/index.d.ts.map +0 -1
  230. package/dist/index.js.map +0 -1
  231. package/dist/platform.d.ts.map +0 -1
  232. package/dist/platform.js.map +0 -1
  233. package/dist/round/agent.d.ts.map +0 -1
  234. package/dist/round/agent.js.map +0 -1
  235. package/dist/round/index.d.ts.map +0 -1
  236. package/dist/round/index.js.map +0 -1
  237. package/dist/round/policy.d.ts.map +0 -1
  238. package/dist/round/policy.js.map +0 -1
  239. package/dist/round/subagent.d.ts.map +0 -1
  240. package/dist/round/subagent.js.map +0 -1
  241. package/dist/round/turn.d.ts.map +0 -1
  242. package/dist/round/turn.js.map +0 -1
  243. package/dist/round/workflow.d.ts.map +0 -1
  244. package/dist/round/workflow.js.map +0 -1
  245. package/dist/runtime/index.d.ts.map +0 -1
  246. package/dist/runtime/index.js.map +0 -1
  247. package/dist/runtime/tool-families.d.ts.map +0 -1
  248. package/dist/runtime/tool-families.js.map +0 -1
  249. package/dist/subagent/fingerprint.d.ts.map +0 -1
  250. package/dist/subagent/fingerprint.js.map +0 -1
  251. package/dist/subagent/index.d.ts.map +0 -1
  252. package/dist/subagent/index.js.map +0 -1
  253. package/dist/subagent/prompt.d.ts.map +0 -1
  254. package/dist/subagent/prompt.js.map +0 -1
  255. package/dist/subagent/run.d.ts.map +0 -1
  256. package/dist/subagent/run.js.map +0 -1
  257. package/dist/subagent/workspace.d.ts.map +0 -1
  258. package/dist/subagent/workspace.js.map +0 -1
  259. package/dist/subtasks/catalog.d.ts.map +0 -1
  260. package/dist/subtasks/catalog.js.map +0 -1
  261. package/dist/subtasks/decomposition.d.ts.map +0 -1
  262. package/dist/subtasks/decomposition.js.map +0 -1
  263. package/dist/subtasks/delegate.d.ts.map +0 -1
  264. package/dist/subtasks/delegate.js.map +0 -1
  265. package/dist/subtasks/index.d.ts.map +0 -1
  266. package/dist/subtasks/index.js.map +0 -1
  267. package/dist/subtasks/scheduler.d.ts +0 -49
  268. package/dist/subtasks/scheduler.d.ts.map +0 -1
  269. package/dist/subtasks/scheduler.js +0 -48
  270. package/dist/subtasks/scheduler.js.map +0 -1
  271. package/dist/subtasks/subtask-types.d.ts.map +0 -1
  272. package/dist/subtasks/subtask-types.js.map +0 -1
  273. package/dist/subtasks/types.d.ts.map +0 -1
  274. package/dist/subtasks/types.js.map +0 -1
  275. package/dist/testing/auth.d.ts.map +0 -1
  276. package/dist/testing/auth.js.map +0 -1
  277. package/dist/testing/do.d.ts.map +0 -1
  278. package/dist/testing/do.js.map +0 -1
  279. package/dist/testing/fake-session.d.ts.map +0 -1
  280. package/dist/testing/fake-session.js.map +0 -1
  281. package/dist/testing/fixtures.d.ts.map +0 -1
  282. package/dist/testing/fixtures.js.map +0 -1
  283. package/dist/testing/harness.d.ts.map +0 -1
  284. package/dist/testing/harness.js.map +0 -1
  285. package/dist/testing/index.d.ts.map +0 -1
  286. package/dist/testing/index.js.map +0 -1
  287. package/dist/testing/mock-model.d.ts.map +0 -1
  288. package/dist/testing/mock-model.js.map +0 -1
  289. package/dist/testing/node.d.ts.map +0 -1
  290. package/dist/testing/node.js.map +0 -1
  291. package/dist/testing/vcr-global-setup.d.ts.map +0 -1
  292. package/dist/testing/vcr-global-setup.js.map +0 -1
  293. package/dist/testing/vcr-shared.d.ts.map +0 -1
  294. package/dist/testing/vcr-shared.js.map +0 -1
  295. package/dist/testing/vcr-spec.d.ts.map +0 -1
  296. package/dist/testing/vcr-spec.js.map +0 -1
  297. package/dist/testing/vcr-store.d.ts.map +0 -1
  298. package/dist/testing/vcr-store.js.map +0 -1
  299. package/dist/testing/vcr.d.ts.map +0 -1
  300. package/dist/testing/vcr.js.map +0 -1
  301. package/dist/worker/define-agent.d.ts.map +0 -1
  302. package/dist/worker/define-agent.js.map +0 -1
  303. package/dist/worker/index.d.ts.map +0 -1
  304. package/dist/worker/index.js.map +0 -1
@@ -41,8 +41,22 @@ export declare function makeDelegateTool(types: SubtaskTypeRegistry, maxSubtasks
41
41
  /**
42
42
  * The call's id, derived from the parent Task and the round that emitted it —
43
43
  * deterministic and replay-safe, the same discipline as the Session message ids
44
- * it sits alongside (see {@link file://../history.ts}). Later rounds rebuild it
44
+ * it sits alongside (see {@link file://../agent/history.ts}). Later rounds rebuild it
45
45
  * rather than storing it.
46
+ *
47
+ * **Underscores, not colons, and this is load-bearing.** Unlike a Session message
48
+ * id, this one is sent to a provider as a `tool_use.id`, and Anthropic validates
49
+ * that field against `^[a-zA-Z0-9_-]+$`. The colon-separated form this used to
50
+ * return failed every round from the first delegation onwards — round 0 was fine
51
+ * because the model authors its own ids, and round 1 reconstructs this one, so
52
+ * the request 400d deterministically on both the primary and the fallback until
53
+ * the deterministic join fired. Workers AI never validated the field, which is
54
+ * why it took a Claude-backed agent to surface it.
55
+ *
56
+ * Nothing persists this: both halves of the pair are rebuilt together on every
57
+ * request, so changing the shape needs no migration. See
58
+ * {@link file://../agent/anthropic/prompt.ts providerSafeToolCallId} for the
59
+ * backstop that catches the next one of these.
46
60
  */
47
61
  export declare function delegateToolCallId(taskId: string, round: number): string;
48
62
  /**
@@ -71,8 +85,12 @@ export type DelegateSubtaskOutcome = {
71
85
  * `referenceIndexes` is omitted rather than faked: this round's references were
72
86
  * snapshotted verbatim onto the rows when it ran, and the catalog they were
73
87
  * chosen from is long gone.
88
+ *
89
+ * A subtask proposal carries no identifier of its own, so the model pairs each
90
+ * entry here with its outcome **by position**: both arrays are built from the
91
+ * same ordinal-ordered `branches`, and the outcome additionally repeats `type`
92
+ * and carries the durable `subtaskId`.
74
93
  */
75
94
  export declare function delegateCallInput(reply: string, branches: CompositionBranch[]): DecompositionProposal;
76
95
  /** Rebuild one round's call result from its durable rows, in stable ordinal order. */
77
96
  export declare function delegateCallOutput(branches: CompositionBranch[]): DelegateSubtaskOutcome[];
78
- //# sourceMappingURL=delegate.d.ts.map
@@ -47,23 +47,25 @@ export function makeDelegateTool(types, maxSubtasks) {
47
47
  /**
48
48
  * The call's id, derived from the parent Task and the round that emitted it —
49
49
  * deterministic and replay-safe, the same discipline as the Session message ids
50
- * it sits alongside (see {@link file://../history.ts}). Later rounds rebuild it
50
+ * it sits alongside (see {@link file://../agent/history.ts}). Later rounds rebuild it
51
51
  * rather than storing it.
52
- */
53
- export function delegateToolCallId(taskId, round) {
54
- return `task:${taskId}:round:${round}:delegate`;
55
- }
56
- /**
57
- * The draft-local key a reconstructed call uses for a durable Subtask.
58
52
  *
59
- * A row does not keep the `localKey` its round's model chose the data layer
60
- * resolved it to a SQLite id and dropped it. So reconstruction derives a stable
61
- * key from that id instead: the *same* id the matching outcome carries in
62
- * {@link DelegateSubtaskOutcome}, so the model can line each result up with the
63
- * work that produced it.
53
+ * **Underscores, not colons, and this is load-bearing.** Unlike a Session message
54
+ * id, this one is sent to a provider as a `tool_use.id`, and Anthropic validates
55
+ * that field against `^[a-zA-Z0-9_-]+$`. The colon-separated form this used to
56
+ * return failed every round from the first delegation onwards round 0 was fine
57
+ * because the model authors its own ids, and round 1 reconstructs this one, so
58
+ * the request 400d deterministically on both the primary and the fallback until
59
+ * the deterministic join fired. Workers AI never validated the field, which is
60
+ * why it took a Claude-backed agent to surface it.
61
+ *
62
+ * Nothing persists this: both halves of the pair are rebuilt together on every
63
+ * request, so changing the shape needs no migration. See
64
+ * {@link file://../agent/anthropic/prompt.ts providerSafeToolCallId} for the
65
+ * backstop that catches the next one of these.
64
66
  */
65
- function localKeyForId(id) {
66
- return `s${id}`;
67
+ export function delegateToolCallId(taskId, round) {
68
+ return `task_${taskId}_round_${round}_delegate`;
67
69
  }
68
70
  /**
69
71
  * Rebuild one round's call input from its durable rows, in stable ordinal order.
@@ -74,15 +76,18 @@ function localKeyForId(id) {
74
76
  * `referenceIndexes` is omitted rather than faked: this round's references were
75
77
  * snapshotted verbatim onto the rows when it ran, and the catalog they were
76
78
  * chosen from is long gone.
79
+ *
80
+ * A subtask proposal carries no identifier of its own, so the model pairs each
81
+ * entry here with its outcome **by position**: both arrays are built from the
82
+ * same ordinal-ordered `branches`, and the outcome additionally repeats `type`
83
+ * and carries the durable `subtaskId`.
77
84
  */
78
85
  export function delegateCallInput(reply, branches) {
79
86
  return {
80
87
  reply,
81
88
  subtasks: branches.map((branch) => ({
82
- localKey: localKeyForId(branch.subtaskId),
83
89
  type: branch.type,
84
90
  prompt: branch.prompt,
85
- dependsOn: branch.dependsOn.map(localKeyForId),
86
91
  // Reconstructed verbatim from the row: a later round must see the same
87
92
  // params the call really carried, or it cannot reason about what ran.
88
93
  params: branch.params
@@ -100,4 +105,3 @@ export function delegateCallOutput(branches) {
100
105
  : null
101
106
  }));
102
107
  }
103
- //# sourceMappingURL=delegate.js.map
@@ -1,11 +1,9 @@
1
1
  /**
2
2
  * `@loopingai/core/subtasks` — the delegation layer: what a round may hand out,
3
- * how a proposal becomes durable drafts, and which of them may run next.
3
+ * and how a proposal becomes durable drafts.
4
4
  */
5
5
  export { makeSubtaskTypes, SubtaskParamsError, type SubtaskTypeRegistry } from "./subtask-types.js";
6
6
  export { DecompositionValidationError, makeDecompositionProposalSchema, nonBlank, resolveDecomposition } from "./decomposition.js";
7
7
  export { DELEGATE_TOOL_NAME, makeDelegateTool, delegateToolCallId, delegateCallInput, delegateCallOutput, type DelegateSubtaskOutcome } from "./delegate.js";
8
- export { selectWave, type WaveDecision } from "./scheduler.js";
9
8
  export { isCatalogEligible, type ReferenceCatalogEntry } from "./catalog.js";
10
9
  export * from "./types.js";
11
- //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1,9 @@
1
1
  /**
2
2
  * `@loopingai/core/subtasks` — the delegation layer: what a round may hand out,
3
- * how a proposal becomes durable drafts, and which of them may run next.
3
+ * and how a proposal becomes durable drafts.
4
4
  */
5
5
  export { makeSubtaskTypes, SubtaskParamsError } from "./subtask-types.js";
6
6
  export { DecompositionValidationError, makeDecompositionProposalSchema, nonBlank, resolveDecomposition } from "./decomposition.js";
7
7
  export { DELEGATE_TOOL_NAME, makeDelegateTool, delegateToolCallId, delegateCallInput, delegateCallOutput } from "./delegate.js";
8
- export { selectWave } from "./scheduler.js";
9
8
  export { isCatalogEligible } from "./catalog.js";
10
9
  export * from "./types.js";
11
- //# sourceMappingURL=index.js.map
@@ -78,14 +78,6 @@ export interface SubtaskTypeRegistry {
78
78
  paramProperties(): Record<string, z.ZodType<string | undefined>>;
79
79
  /** The type catalogue as the delegating model is shown it. */
80
80
  renderTypes(): string;
81
- /**
82
- * Every type's {@link SubtaskTypeSpec.capability}, for the main agent's soul.
83
- *
84
- * Returns `""` when no type declares one, and that case is worth naming: it is
85
- * what lets each call site append unconditionally instead of emitting a
86
- * separator around nothing.
87
- */
88
- renderCapabilities(): string;
89
81
  /** Every type's {@link SubtaskTypeSpec.delegationGuidance}, for the round contract. */
90
82
  renderDelegationGuidance(names: DelegationNames): string;
91
83
  }
@@ -97,4 +89,3 @@ export interface SubtaskTypeRegistry {
97
89
  * routed to the wrong domain.
98
90
  */
99
91
  export declare function makeSubtaskTypes(specs: readonly SubtaskTypeSpec[]): SubtaskTypeRegistry;
100
- //# sourceMappingURL=subtask-types.d.ts.map
@@ -91,13 +91,6 @@ export function makeSubtaskTypes(specs) {
91
91
  })
92
92
  .join("\n");
93
93
  },
94
- renderCapabilities() {
95
- const blocks = [];
96
- for (const s of specs)
97
- if (s.capability)
98
- blocks.push(s.capability);
99
- return blocks.join("\n\n");
100
- },
101
94
  renderDelegationGuidance(names) {
102
95
  const sections = [];
103
96
  for (const s of specs) {
@@ -108,4 +101,3 @@ export function makeSubtaskTypes(specs) {
108
101
  }
109
102
  };
110
103
  }
111
- //# sourceMappingURL=subtask-types.js.map
@@ -1,5 +1,6 @@
1
1
  import type { ResolvedRecipe, SubtaskParams } from "../contract/recipe.js";
2
- export type SubtaskStatus = "pending" | "running" | "completed" | "failed" | "skipped" | "canceled";
2
+ import type { RoundFailureKind } from "../agent/inference.js";
3
+ export type SubtaskStatus = "pending" | "running" | "completed" | "failed" | "canceled";
3
4
  /** A per-caller, SQLite-assigned, monotonically increasing Subtask identifier. */
4
5
  export type SubtaskId = number;
5
6
  /**
@@ -22,18 +23,15 @@ export interface SubtaskResultPart {
22
23
  text: string;
23
24
  }
24
25
  /**
25
- * Creation input for one Subtask, before it is persisted. `dependsOn` uses
26
- * draft-local keys (not yet-unknown {@link SubtaskId}s); the data layer resolves
27
- * them to SQLite-assigned ids when the decomposition is created. `ordinal` is
28
- * derived from the draft's position in the decomposition array.
26
+ * Creation input for one Subtask, before it is persisted. `ordinal` is derived
27
+ * from the draft's position in the decomposition array, which is the only thing
28
+ * that distinguishes one draft of a decomposition from another they carry no
29
+ * identity of their own until the data layer assigns a {@link SubtaskId}.
29
30
  */
30
31
  export interface SubtaskDraft {
31
- localKey: string;
32
32
  type: string;
33
33
  prompt: string;
34
34
  references: SubtaskReference[];
35
- /** Draft-local keys of prerequisite drafts. */
36
- dependsOn: string[];
37
35
  /** The type's required inputs, already validated for shape. */
38
36
  params: SubtaskParams;
39
37
  }
@@ -93,24 +91,11 @@ export interface SubtaskChunkOutcome {
93
91
  status: SubtaskStatus;
94
92
  progress: ProgressEvent[];
95
93
  }
96
- /**
97
- * Generated output of one completed prerequisite Subtask, loaded by the parent
98
- * from its durable row for a dependent's invocation. `type` is the
99
- * prerequisite's semantic type — used only to label the rendered section;
100
- * dependency output is always presented as generated, never as conversation
101
- * evidence.
102
- */
103
- export interface DependencyResult {
104
- subtaskId: SubtaskId;
105
- type: string;
106
- resultParts: SubtaskResultPart[];
107
- }
108
94
  /**
109
95
  * RPC-safe input for one isolated `RecipeSubagent` execution, assembled by the
110
96
  * parent at execution start: the already-resolved (and code-validated) Recipe,
111
- * the Subtask's non-session prompt, its verbatim reference snapshots, and the
112
- * generated results of its completed dependencies. The child re-validates the
113
- * Recipe defensively but never resolves one itself.
97
+ * the Subtask's non-session prompt, and its verbatim reference snapshots. The
98
+ * child re-validates the Recipe defensively but never resolves one itself.
114
99
  */
115
100
  export interface RecipeExecutionRequest {
116
101
  taskId: string;
@@ -124,7 +109,6 @@ export interface RecipeExecutionRequest {
124
109
  recipe: ResolvedRecipe;
125
110
  prompt: string;
126
111
  references: SubtaskReference[];
127
- dependencyResults: DependencyResult[];
128
112
  /**
129
113
  * The Subtask's validated params. Part of the execution's identity — two plays
130
114
  * of different games are different work — so this IS fingerprinted, unlike
@@ -154,11 +138,9 @@ export type RecipeExecutionResult = {
154
138
  * One Subtask as the delegating model emits it. The model selects references
155
139
  * by **catalog index only** — it never emits reference text, and application code
156
140
  * snapshots the catalog entry's exact role+text onto the Subtask (see
157
- * `agent/subtasks/decomposition.ts`). `dependsOn` uses draft-local keys, resolved
158
- * to SQLite-assigned {@link SubtaskId}s by the data layer.
141
+ * `agent/subtasks/decomposition.ts`).
159
142
  */
160
143
  export interface SubtaskProposal {
161
- localKey: string;
162
144
  type: string;
163
145
  prompt: string;
164
146
  /**
@@ -167,8 +149,6 @@ export interface SubtaskProposal {
167
149
  * *reconstructed* historical call, whose references were resolved rounds ago.
168
150
  */
169
151
  referenceIndexes?: number[];
170
- /** Draft-local keys of prerequisite proposals. */
171
- dependsOn: string[];
172
152
  /** The type's required inputs; omitted for a type that takes none. */
173
153
  params?: SubtaskParams;
174
154
  }
@@ -188,18 +168,19 @@ export interface DecompositionProposal {
188
168
  *
189
169
  * `replied` is the terminal answer — the round chose to answer the user rather
190
170
  * than delegate, and the Workflow delivers it. `delegated` means the round's
191
- * Subtask rows are durable and Phase 2 should run them, after which another round
192
- * begins. `failed` means both models produced unusable output; no Subtask is ever
193
- * synthesized to cover for it. `canceled` means the caller cancelled during the
194
- * round: nothing was persisted and nothing was published. Transient platform
195
- * faults are not results: they throw so the enclosing Workflow step can retry
196
- * (mirrors {@link RecipeExecutionResult}).
171
+ * Subtask rows are durable and the Workflow should execute them, after which
172
+ * another round begins. `failed` means the round produced no answer, with
173
+ * {@link RoundFailureKind} carrying why; no Subtask is ever synthesized to cover
174
+ * for it. `canceled` means the caller cancelled during the round: nothing was
175
+ * persisted and nothing was published. Transient platform faults are not
176
+ * results: they throw so the enclosing Workflow step can retry (mirrors
177
+ * {@link RecipeExecutionResult}).
197
178
  *
198
179
  * `turns` is what this round cost, which the Workflow meters against the Task's
199
180
  * budget. This is the **only** type that carries it, and it carries it because the
200
181
  * count has to cross an RPC boundary to reach a Workflow in another isolate;
201
- * everything inside the DO shares one mutable {@link file://../budget.ts TurnBudget}
202
- * instead. The field is attached in a single place — see `runTaskTurn` — so no
182
+ * everything inside the DO shares one mutable
183
+ * {@link file://../agent/budget.ts TurnBudget} instead. The field is attached in a single place — see `runTaskTurn` — so no
203
184
  * branch can drop it and no branch can invent it.
204
185
  *
205
186
  * The idempotent recovery paths — a round replayed from durable rows rather than
@@ -220,8 +201,17 @@ export type TurnTaskResult = {
220
201
  reply: string;
221
202
  subtasks: Subtask[];
222
203
  turns: number;
223
- } | {
204
+ }
205
+ /**
206
+ * `kind` distinguishes a round that spent both models and got nothing usable
207
+ * (`exhausted`) from one that stopped on a fault no attempt could clear —
208
+ * where the fallback was deliberately *not* tried, and the kind is what lets
209
+ * the host say why in words an operator can act on. Same terminal Task either
210
+ * way; only the words differ.
211
+ */
212
+ | {
224
213
  status: "failed";
214
+ kind: RoundFailureKind;
225
215
  error: string;
226
216
  turns: number;
227
217
  } | {
@@ -243,15 +233,13 @@ export type TurnVerdict = WithoutTurns<TurnTaskResult>;
243
233
  /**
244
234
  * One branch's outcome as a later round sees it — a plain, RPC-safe subset of the
245
235
  * durable {@link Subtask} row, loaded across **every** round in stable ordinal
246
- * order. Completed, failed, and skipped branches are all included so the reply
247
- * can use available successes and disclose relevant failures.
236
+ * order. Completed and failed branches are both included so the reply can use
237
+ * available successes and disclose relevant failures.
248
238
  *
249
- * Carries `round`, `prompt` and `dependsOn` — not for composing, but for
250
- * reconstructing the per-round `delegate` call that produced these branches (see
251
- * `agent/subtasks/delegate.ts`). Unlike {@link SubtaskNode}, this projection is
252
- * built inside the DO and returns only a reply, so the 1 MiB Workflow-step cap
253
- * that keeps the scheduler's view narrow does not apply. `references` still stays
254
- * out: it is unbounded history text, and the call's shape does not need it.
239
+ * Carries `round` and `prompt` — not for composing, but for reconstructing the
240
+ * per-round `delegate` call that produced these branches (see
241
+ * `agent/subtasks/delegate.ts`). `references` stays out: it is unbounded history
242
+ * text, and the call's shape does not need it.
255
243
  */
256
244
  export interface CompositionBranch {
257
245
  subtaskId: SubtaskId;
@@ -259,41 +247,29 @@ export interface CompositionBranch {
259
247
  ordinal: number;
260
248
  type: string;
261
249
  prompt: string;
262
- dependsOn: SubtaskId[];
263
250
  params: SubtaskParams;
264
251
  status: SubtaskStatus;
265
252
  resultParts: SubtaskResultPart[] | null;
266
253
  error: string | null;
267
254
  }
268
255
  /**
269
- * The `scan:<n>` wave projection (RPC-safe): either the caller cancelled, or the
270
- * refreshed DAG after blocked branches were skipped. Returning the verdict with
271
- * the nodes is what lets the Workflow drop its separate cancellation probe — one
272
- * round trip, and no gap between asking and acting.
256
+ * The `scan:<round>` projection (RPC-safe): either the caller cancelled, or the
257
+ * ids of the round's Subtasks that still owe an outcome, in ordinal order.
258
+ * Returning the verdict with the ids is what lets the Workflow drop its separate
259
+ * cancellation probe — one round trip, and no gap between asking and acting.
260
+ *
261
+ * Ids and nothing else, deliberately: a Workflow step return is capped at 1 MiB
262
+ * and a Subtask carries verbatim history snapshots bounded only by
263
+ * `MAX_INBOUND_TEXT_BYTES`, so a scan returning rows would overflow on a large
264
+ * task. The durable rows are the source of truth; the Workflow carries
265
+ * references to them and re-reads through the parent when it needs more.
273
266
  */
274
267
  export type SubtaskScan = {
275
268
  canceled: true;
276
269
  } | {
277
270
  canceled: false;
278
- nodes: SubtaskNode[];
271
+ ids: SubtaskId[];
279
272
  };
280
- /**
281
- * The scheduler's view of one Subtask (Phase 2) — everything needed to pick the
282
- * next dependency-ready wave, and nothing else.
283
- *
284
- * Deliberately excludes `prompt`, `references`, and `resultParts`: a Workflow
285
- * step return is capped at 1 MiB, and a reference is a verbatim history snapshot
286
- * bounded only by `MAX_INBOUND_TEXT_BYTES`, so a wave scan returning full rows
287
- * would overflow on a large task. The durable rows — not Workflow state — are the
288
- * source of truth, so the Workflow carries ids and statuses and re-reads the rest
289
- * through the parent when it actually needs it.
290
- */
291
- export interface SubtaskNode {
292
- id: SubtaskId;
293
- ordinal: number;
294
- status: SubtaskStatus;
295
- dependsOn: SubtaskId[];
296
- }
297
273
  /** Durable state owned by the main agent for one delegated unit of work. */
298
274
  export interface Subtask {
299
275
  id: SubtaskId;
@@ -307,7 +283,6 @@ export interface Subtask {
307
283
  recipeVersion: number | null;
308
284
  prompt: string;
309
285
  references: SubtaskReference[];
310
- dependsOn: SubtaskId[];
311
286
  /** The type's required inputs, validated at delegation time. */
312
287
  params: SubtaskParams;
313
288
  status: SubtaskStatus;
@@ -318,4 +293,3 @@ export interface Subtask {
318
293
  completedAt: number | null;
319
294
  }
320
295
  export {};
321
- //# sourceMappingURL=types.d.ts.map
@@ -13,4 +13,3 @@
13
13
  export function runtimeAs(runtime) {
14
14
  return runtime;
15
15
  }
16
- //# sourceMappingURL=types.js.map
@@ -32,4 +32,3 @@ export interface GatewayTokenOptions {
32
32
  export declare const TEST_TENANT = "main";
33
33
  /** Sign a short-lived EdDSA gateway JWT using the test gateway key. */
34
34
  export declare function makeGatewayToken(options?: GatewayTokenOptions): Promise<string>;
35
- //# sourceMappingURL=auth.d.ts.map
@@ -33,4 +33,3 @@ export async function makeGatewayToken(options = {}) {
33
33
  .setExpirationTime(options.expiresIn ?? "5m")
34
34
  .sign(privateKey));
35
35
  }
36
- //# sourceMappingURL=auth.js.map
@@ -27,4 +27,3 @@ export declare function doStorage(instance: unknown): DurableObjectStorage;
27
27
  * ```
28
28
  */
29
29
  export declare function makeDoHelpers(ns: DurableObjectNamespace, defaults?: AgentDBOptions): DoTestHelpers;
30
- //# sourceMappingURL=do.d.ts.map
@@ -23,4 +23,3 @@ export function makeDoHelpers(ns, defaults = { maxSubtasks: 8 }) {
23
23
  }
24
24
  };
25
25
  }
26
- //# sourceMappingURL=do.js.map
@@ -24,4 +24,3 @@ export declare class FakeSession implements SessionLike {
24
24
  tools(): Promise<ToolSet>;
25
25
  getCompactions(): Promise<unknown[]>;
26
26
  }
27
- //# sourceMappingURL=fake-session.d.ts.map
@@ -35,4 +35,3 @@ export class FakeSession {
35
35
  return this.compactions;
36
36
  }
37
37
  }
38
- //# sourceMappingURL=fake-session.js.map
@@ -62,4 +62,3 @@ export declare function testStatus(state: TaskState, message?: Message): NonNull
62
62
  export declare function testAgentMessage(messageId: string, text: string, contextId?: string, taskId?: string): Message;
63
63
  /** A complete v1.0 `Task` in the given state. */
64
64
  export declare function testTask(id: string, contextId: string, state: TaskState, message?: Message): Task;
65
- //# sourceMappingURL=fixtures.d.ts.map
@@ -102,4 +102,3 @@ export function testTask(id, contextId, state, message) {
102
102
  metadata: undefined
103
103
  };
104
104
  }
105
- //# sourceMappingURL=fixtures.js.map
@@ -95,4 +95,3 @@ export interface AgentHarness {
95
95
  readonly callbacks: CapturedCallback[];
96
96
  }
97
97
  export declare function createAgentHarness<TEnv>(options: AgentHarnessOptions<TEnv>): AgentHarness;
98
- //# sourceMappingURL=harness.d.ts.map
@@ -136,4 +136,3 @@ export function createAgentHarness(options) {
136
136
  }
137
137
  };
138
138
  }
139
- //# sourceMappingURL=harness.js.map
@@ -29,4 +29,3 @@ export { makeGatewayToken, type GatewayTokenOptions } from "./auth.js";
29
29
  export { AGENT_ORIGIN, GATEWAY_ORIGIN, TEST_AGENT_PRIVATE_JWK, TEST_GATEWAY_PRIVATE_JWK, TEST_MODELS, gatewayPublicJwks, testAgentMessage, testStatus, testTask } from "./fixtures.js";
30
30
  export { doStorage, makeDoHelpers, type DoTestHelpers } from "./do.js";
31
31
  export { createAgentHarness, type AgentHarness, type AgentHarnessOptions, type CapturedCallback, type HarnessWorker } from "./harness.js";
32
- //# sourceMappingURL=index.d.ts.map
@@ -29,4 +29,3 @@ export { makeGatewayToken } from "./auth.js";
29
29
  export { AGENT_ORIGIN, GATEWAY_ORIGIN, TEST_AGENT_PRIVATE_JWK, TEST_GATEWAY_PRIVATE_JWK, TEST_MODELS, gatewayPublicJwks, testAgentMessage, testStatus, testTask } from "./fixtures.js";
30
30
  export { doStorage, makeDoHelpers } from "./do.js";
31
31
  export { createAgentHarness } from "./harness.js";
32
- //# sourceMappingURL=index.js.map
@@ -40,4 +40,38 @@ export declare function finalReply(text: string, opts?: {
40
40
  * last step.
41
41
  */
42
42
  export declare function mockModel(...steps: MockStep[]): MockLanguageModelV3;
43
- //# sourceMappingURL=mock-model.d.ts.map
43
+ /**
44
+ * A model whose every call throws, and a count of how many times it was asked.
45
+ *
46
+ * The count is the point. Several of the attempt ladder's rules are about a call
47
+ * that must *not* happen — a fallback slot left unspent, a repair not attempted
48
+ * — and those are invisible to an assertion on the returned outcome alone, which
49
+ * can be right for the wrong reason.
50
+ */
51
+ export declare function throwingModel(error: unknown): {
52
+ model: MockLanguageModelV3;
53
+ calls: () => number;
54
+ };
55
+ /** {@link mockModel}, plus the same call count {@link throwingModel} reports. */
56
+ export declare function countingModel(...steps: MockStep[]): {
57
+ model: MockLanguageModelV3;
58
+ calls: () => number;
59
+ };
60
+ /**
61
+ * A model that fails the first `failures` calls with a retryable `APICallError`,
62
+ * then behaves like {@link mockModel}.
63
+ *
64
+ * Exists for the one behaviour a scripted-outcome assertion cannot see: whether
65
+ * a rate limit was *waited out on the same model* or fell straight through to
66
+ * the fallback. Only the call count distinguishes them — both produce a
67
+ * successful round.
68
+ *
69
+ * `retry-after: 0` is deliberate. The AI SDK honours the header and its own
70
+ * backoff opens at two seconds, which would spend real seconds asserting
71
+ * something that has nothing to do with duration. Zero exercises the identical
72
+ * path — header parsed, preferred over the exponential delay, waited — for free.
73
+ */
74
+ export declare function rateLimitedModel(failures: number, ...steps: MockStep[]): {
75
+ model: MockLanguageModelV3;
76
+ calls: () => number;
77
+ };
@@ -1,4 +1,9 @@
1
1
  import { MockLanguageModelV3 } from "ai/test";
2
+ // From `ai`, not `@ai-sdk/provider`. `ai` re-exports the class and is a declared
3
+ // peer; reaching for the provider package directly makes this module — which is
4
+ // on the published `/testing` subpath every consumer loads — depend on a package
5
+ // core does not declare and only resolves today by hoisting.
6
+ import { APICallError } from "ai";
2
7
  /**
3
8
  * Test doubles for the LLM. Lets the tool-loop / executor specs run the real
4
9
  * `generateText` machinery (tool execution, multi-step, fallback) against a
@@ -59,4 +64,73 @@ export function mockModel(...steps) {
59
64
  doGenerate: async () => stepResult(steps[Math.min(i++, steps.length - 1)])
60
65
  });
61
66
  }
62
- //# sourceMappingURL=mock-model.js.map
67
+ /**
68
+ * A model whose every call throws, and a count of how many times it was asked.
69
+ *
70
+ * The count is the point. Several of the attempt ladder's rules are about a call
71
+ * that must *not* happen — a fallback slot left unspent, a repair not attempted
72
+ * — and those are invisible to an assertion on the returned outcome alone, which
73
+ * can be right for the wrong reason.
74
+ */
75
+ export function throwingModel(error) {
76
+ let calls = 0;
77
+ return {
78
+ model: new MockLanguageModelV3({
79
+ doGenerate: async () => {
80
+ calls += 1;
81
+ throw error;
82
+ }
83
+ }),
84
+ calls: () => calls
85
+ };
86
+ }
87
+ /** {@link mockModel}, plus the same call count {@link throwingModel} reports. */
88
+ export function countingModel(...steps) {
89
+ let calls = 0;
90
+ let i = 0;
91
+ return {
92
+ model: new MockLanguageModelV3({
93
+ doGenerate: async () => {
94
+ calls += 1;
95
+ return stepResult(steps[Math.min(i++, steps.length - 1)]);
96
+ }
97
+ }),
98
+ calls: () => calls
99
+ };
100
+ }
101
+ /**
102
+ * A model that fails the first `failures` calls with a retryable `APICallError`,
103
+ * then behaves like {@link mockModel}.
104
+ *
105
+ * Exists for the one behaviour a scripted-outcome assertion cannot see: whether
106
+ * a rate limit was *waited out on the same model* or fell straight through to
107
+ * the fallback. Only the call count distinguishes them — both produce a
108
+ * successful round.
109
+ *
110
+ * `retry-after: 0` is deliberate. The AI SDK honours the header and its own
111
+ * backoff opens at two seconds, which would spend real seconds asserting
112
+ * something that has nothing to do with duration. Zero exercises the identical
113
+ * path — header parsed, preferred over the exponential delay, waited — for free.
114
+ */
115
+ export function rateLimitedModel(failures, ...steps) {
116
+ let calls = 0;
117
+ let i = 0;
118
+ return {
119
+ model: new MockLanguageModelV3({
120
+ doGenerate: async () => {
121
+ calls += 1;
122
+ if (calls <= failures) {
123
+ throw new APICallError({
124
+ message: "429 Wholesale Rate limited",
125
+ url: "anthropic:messages:test",
126
+ requestBodyValues: {},
127
+ statusCode: 429,
128
+ responseHeaders: { "retry-after": "0" }
129
+ });
130
+ }
131
+ return stepResult(steps[Math.min(i++, steps.length - 1)]);
132
+ }
133
+ }),
134
+ calls: () => calls
135
+ };
136
+ }
@@ -54,4 +54,3 @@
54
54
  export { createVcr, recordFromEnv, closeVcr, type Vcr, type VcrOptions, type VcrRequest, type VcrRequestHeaders, type VcrOutboundService } from "./vcr.js";
55
55
  export { Cassette, requestKey, replayable, type CassetteEntry, type CassetteOptions, type RecordedRequest, type RecordedResponse, type ReplayableResponse } from "./vcr-store.js";
56
56
  export { VCR_CONTROL_ORIGIN, VCR_MARKER_HEADER, CASSETTE_NAME_RE, type VcrReleaseResult } from "./vcr-shared.js";
57
- //# sourceMappingURL=node.d.ts.map
@@ -54,4 +54,3 @@
54
54
  export { createVcr, recordFromEnv, closeVcr } from "./vcr.js";
55
55
  export { Cassette, requestKey, replayable } from "./vcr-store.js";
56
56
  export { VCR_CONTROL_ORIGIN, VCR_MARKER_HEADER, CASSETTE_NAME_RE } from "./vcr-shared.js";
57
- //# sourceMappingURL=node.js.map
@@ -6,10 +6,7 @@
6
6
  * Belt and braces rather than load-bearing — each cassette is already flushed
7
7
  * when its test releases it, so a run that ends normally has nothing left to do
8
8
  * here, and a run that dies mid-test keeps everything recorded up to that point.
9
- * (Under the old undici recorder this step was mandatory: it held real sockets
10
- * and a self-refreshing auto-flush timer open, and a `RECORD=1` run hung on
11
- * "close timed out" without it. Neither exists now.)
9
+ * The recorder holds no sockets and no timers, so nothing here has to close.
12
10
  */
13
11
  export declare function setup(): void;
14
12
  export declare function teardown(): Promise<void>;
15
- //# sourceMappingURL=vcr-global-setup.d.ts.map
@@ -7,12 +7,9 @@ import { closeVcr } from "./vcr.js";
7
7
  * Belt and braces rather than load-bearing — each cassette is already flushed
8
8
  * when its test releases it, so a run that ends normally has nothing left to do
9
9
  * here, and a run that dies mid-test keeps everything recorded up to that point.
10
- * (Under the old undici recorder this step was mandatory: it held real sockets
11
- * and a self-refreshing auto-flush timer open, and a `RECORD=1` run hung on
12
- * "close timed out" without it. Neither exists now.)
10
+ * The recorder holds no sockets and no timers, so nothing here has to close.
13
11
  */
14
12
  export function setup() { }
15
13
  export async function teardown() {
16
14
  await closeVcr();
17
15
  }
18
- //# sourceMappingURL=vcr-global-setup.js.map