brass-runtime 1.16.0 → 1.16.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 (210) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +283 -18
  3. package/dist/agent/cli/main.cjs +38 -38
  4. package/dist/agent/cli/main.js +6 -6
  5. package/dist/agent/cli/main.mjs +6 -6
  6. package/dist/agent/index.cjs +7 -7
  7. package/dist/agent/index.d.ts +1 -1
  8. package/dist/agent/index.js +6 -6
  9. package/dist/agent/index.mjs +6 -6
  10. package/dist/chunk-2HQTDLHF.mjs +683 -0
  11. package/dist/chunk-36I3M4UC.mjs +370 -0
  12. package/dist/{chunk-QY5FKYEQ.js → chunk-3AYM6WPJ.js} +570 -51
  13. package/dist/chunk-3LOYJFRR.cjs +300 -0
  14. package/dist/chunk-3Y2RIUMM.js +300 -0
  15. package/dist/{chunk-N6VHMOWB.cjs → chunk-4ROBZFL6.cjs} +128 -128
  16. package/dist/{chunk-NC5SDRYE.js → chunk-52OB2ROS.js} +4 -4
  17. package/dist/{chunk-JX3LZQJH.cjs → chunk-52PPNNI4.cjs} +82 -20
  18. package/dist/{chunk-5YOQOXEQ.cjs → chunk-5EC274J5.cjs} +676 -293
  19. package/dist/chunk-5QC7LRZ3.js +229 -0
  20. package/dist/{chunk-7TL2LHQJ.js → chunk-5VRJNBLZ.mjs} +524 -141
  21. package/dist/chunk-62AZW6UT.cjs +313 -0
  22. package/dist/chunk-6IXXWIUM.js +683 -0
  23. package/dist/chunk-74ZTY6CP.js +2871 -0
  24. package/dist/chunk-76YMRMH2.cjs +777 -0
  25. package/dist/chunk-7CMJS3QE.mjs +2871 -0
  26. package/dist/{chunk-2WC63LJK.mjs → chunk-7JIJOVCT.js} +20 -10
  27. package/dist/{chunk-FM4W4QPL.js → chunk-A2OM6NEH.mjs} +5 -4
  28. package/dist/chunk-AGR5B2BC.cjs +683 -0
  29. package/dist/chunk-AVNQLJ5V.js +777 -0
  30. package/dist/chunk-B33ICAKP.js +313 -0
  31. package/dist/{chunk-J3H54ZRV.mjs → chunk-B5JD23U7.mjs} +1 -1
  32. package/dist/chunk-BABBZK4Y.js +2024 -0
  33. package/dist/{chunk-U5KWK3PX.mjs → chunk-C3MDXTRZ.js} +11 -0
  34. package/dist/{chunk-F5EUMJL7.mjs → chunk-CIZFIMK5.js} +55 -5
  35. package/dist/{chunk-SPUEME2B.cjs → chunk-CZIVE6NT.cjs} +12 -1
  36. package/dist/{chunk-TDVMADDN.js → chunk-DNFJLJMW.mjs} +11 -0
  37. package/dist/chunk-DNFO2EIZ.mjs +777 -0
  38. package/dist/{chunk-XDZOO4L5.js → chunk-EJ6BPYVR.mjs} +79 -17
  39. package/dist/{chunk-JNFRRJYH.cjs → chunk-ENKODRU3.cjs} +242 -192
  40. package/dist/chunk-EOC4UHBS.mjs +229 -0
  41. package/dist/{chunk-7LVI2GIN.js → chunk-FH2X7BVP.js} +507 -72
  42. package/dist/{chunk-OOGJ73B6.js → chunk-FHQGHPMO.mjs} +20 -10
  43. package/dist/{chunk-WQ5QNU5R.cjs → chunk-GLE2WY7Z.cjs} +652 -217
  44. package/dist/{chunk-G6IQOE4P.mjs → chunk-GYM3LLGS.mjs} +507 -72
  45. package/dist/chunk-HLWLMW2F.mjs +2024 -0
  46. package/dist/{chunk-TVN5I4U6.cjs → chunk-JF5WGYJJ.cjs} +25 -24
  47. package/dist/{chunk-CY33PGEX.mjs → chunk-KH4SYAOS.mjs} +570 -51
  48. package/dist/chunk-KN32XNTH.mjs +313 -0
  49. package/dist/chunk-KQLYONSE.cjs +2871 -0
  50. package/dist/{chunk-7HUOJA4W.cjs → chunk-KZJQ723N.cjs} +90 -80
  51. package/dist/{chunk-CCKHV5BT.mjs → chunk-L2SYFEBS.js} +5 -4
  52. package/dist/{chunk-IJT6RRQ5.cjs → chunk-L6VB5N7Q.cjs} +20 -9
  53. package/dist/{chunk-ZGLD4TVZ.mjs → chunk-MBEJI5HF.mjs} +4 -4
  54. package/dist/{chunk-PRWCB3QL.mjs → chunk-MIIYDLGM.js} +524 -141
  55. package/dist/{chunk-H55LI6WY.js → chunk-MOO4L7F4.mjs} +15 -4
  56. package/dist/{chunk-7XOPAB5Q.js → chunk-MT3OWDPC.mjs} +55 -5
  57. package/dist/chunk-MVGUEJ5Z.cjs +370 -0
  58. package/dist/chunk-PD4EJTQC.cjs +229 -0
  59. package/dist/chunk-PWC3RBQE.mjs +300 -0
  60. package/dist/{chunk-MWXMNYJS.cjs → chunk-Q2I37RP3.cjs} +643 -124
  61. package/dist/{chunk-VFIUZG7J.mjs → chunk-RKGKFN2A.js} +79 -17
  62. package/dist/{chunk-NYL4D7SK.cjs → chunk-SA6HUJVI.cjs} +5 -5
  63. package/dist/{chunk-K2T3DV26.mjs → chunk-TRM4JUZQ.js} +15 -4
  64. package/dist/chunk-UB4B6OFY.js +370 -0
  65. package/dist/{chunk-G3XGCZDQ.js → chunk-UCUBNWM2.js} +1 -1
  66. package/dist/chunk-VN44DYYT.cjs +2024 -0
  67. package/dist/{client-CtFmoDvM.d.ts → client-CZHU674n.d.ts} +211 -36
  68. package/dist/core/index.cjs +135 -9
  69. package/dist/core/index.d.ts +238 -33
  70. package/dist/core/index.js +155 -29
  71. package/dist/core/index.mjs +155 -29
  72. package/dist/{effect-CGNl5Rqp.d.ts → effect-DIUHZ9IN.d.ts} +89 -1
  73. package/dist/effectRunner-CFLC32IK.cjs +8 -0
  74. package/dist/{effectRunner-A4CHJXJI.js → effectRunner-L4S7IPT3.js} +2 -2
  75. package/dist/{effectRunner-OPUF6QRN.mjs → effectRunner-NNGG75QA.mjs} +2 -2
  76. package/dist/http/index.cjs +324 -2986
  77. package/dist/http/index.d.ts +54 -68
  78. package/dist/http/index.js +238 -2900
  79. package/dist/http/index.mjs +238 -2900
  80. package/dist/http/testing.cjs +14 -12
  81. package/dist/http/testing.d.ts +5 -4
  82. package/dist/http/testing.js +10 -8
  83. package/dist/http/testing.mjs +10 -8
  84. package/dist/index.cjs +423 -255
  85. package/dist/index.d.ts +87 -69
  86. package/dist/index.js +301 -133
  87. package/dist/index.mjs +301 -133
  88. package/dist/observability/index.cjs +16 -531
  89. package/dist/observability/index.d.ts +81 -8
  90. package/dist/observability/index.js +23 -538
  91. package/dist/observability/index.mjs +23 -538
  92. package/dist/perf/cli.cjs +401 -0
  93. package/dist/perf/cli.d.ts +1 -0
  94. package/dist/perf/cli.js +401 -0
  95. package/dist/perf/cli.mjs +401 -0
  96. package/dist/perf/index.cjs +141 -0
  97. package/dist/perf/index.d.ts +483 -0
  98. package/dist/perf/index.js +141 -0
  99. package/dist/perf/index.mjs +141 -0
  100. package/dist/schedule-CK3Ml_7p.d.ts +259 -0
  101. package/dist/schema/index.cjs +6 -2
  102. package/dist/schema/index.d.ts +3 -1
  103. package/dist/schema/index.js +5 -1
  104. package/dist/schema/index.mjs +5 -1
  105. package/dist/{server-C8hDXA74.d.ts → server-GJPg8ZSG.d.ts} +4 -3
  106. package/dist/{stream-dvSs0QS5.d.ts → stream-B4oK9JFP.d.ts} +1 -1
  107. package/dist/{tracer-B5tRH9H7.d.ts → tracer-Hwt1cl7h.d.ts} +13 -54
  108. package/dist/{tracing-Dt9S_6V8.d.ts → tracing-DqbTKGcf.d.ts} +1 -1
  109. package/docs/ARCHITECTURE.md +292 -0
  110. package/docs/README.md +63 -0
  111. package/docs/adr/0001-ai-context-pack.md +32 -0
  112. package/docs/agent-apply-mode.md +104 -0
  113. package/docs/agent-approvals.md +110 -0
  114. package/docs/agent-batch.md +185 -0
  115. package/docs/agent-boundaries.md +112 -0
  116. package/docs/agent-chat-sessions.md +160 -0
  117. package/docs/agent-ci.md +17 -0
  118. package/docs/agent-cli.md +405 -0
  119. package/docs/agent-config.md +480 -0
  120. package/docs/agent-context-discovery.md +159 -0
  121. package/docs/agent-copilot-like-dx.md +126 -0
  122. package/docs/agent-declarative-optimized-planning.md +138 -0
  123. package/docs/agent-dx.md +224 -0
  124. package/docs/agent-env-files.md +126 -0
  125. package/docs/agent-follow-up-context.md +43 -0
  126. package/docs/agent-global-usage.md +180 -0
  127. package/docs/agent-init.md +109 -0
  128. package/docs/agent-install-and-configure.md +516 -0
  129. package/docs/agent-language-workspace-ux.md +99 -0
  130. package/docs/agent-llm-adapters.md +123 -0
  131. package/docs/agent-local-install.md +190 -0
  132. package/docs/agent-local-tests.md +51 -0
  133. package/docs/agent-observability.md +155 -0
  134. package/docs/agent-patch-quality-loop.md +162 -0
  135. package/docs/agent-presets.md +22 -0
  136. package/docs/agent-project-commands.md +237 -0
  137. package/docs/agent-project-intelligence.md +156 -0
  138. package/docs/agent-redaction.md +18 -0
  139. package/docs/agent-release-readiness.md +76 -0
  140. package/docs/agent-rollback-safety.md +162 -0
  141. package/docs/agent-rollback.md +23 -0
  142. package/docs/agent-run-artifacts.md +16 -0
  143. package/docs/agent-vscode-auto-discovery.md +137 -0
  144. package/docs/agent-vscode-batch-runner.md +100 -0
  145. package/docs/agent-vscode-chat-layout.md +90 -0
  146. package/docs/agent-vscode-clean-install.md +147 -0
  147. package/docs/agent-vscode-code-actions.md +70 -0
  148. package/docs/agent-vscode-diff-preview.md +45 -0
  149. package/docs/agent-vscode-inline-assist.md +56 -0
  150. package/docs/agent-vscode-install.md +186 -0
  151. package/docs/agent-vscode-model-setup.md +97 -0
  152. package/docs/agent-vscode-patch-preview.md +92 -0
  153. package/docs/agent-vscode-problems.md +79 -0
  154. package/docs/agent-vscode-project-dashboard.md +106 -0
  155. package/docs/agent-vscode-run-history.md +92 -0
  156. package/docs/agent-vscode-ux.md +73 -0
  157. package/docs/ai/INVARIANTS.md +84 -0
  158. package/docs/ai/PROJECT_MAP.md +338 -0
  159. package/docs/ai/PUBLIC_API.md +336 -0
  160. package/docs/ai/VALIDATION_MATRIX.md +67 -0
  161. package/docs/api-polish.md +37 -0
  162. package/docs/cancellation.md +162 -0
  163. package/docs/coverage.md +46 -0
  164. package/docs/getting-started.md +159 -0
  165. package/docs/guides/README.md +40 -0
  166. package/docs/guides/circuit-breaker.md +89 -0
  167. package/docs/guides/error-handling.md +91 -0
  168. package/docs/guides/getting-started.md +107 -0
  169. package/docs/guides/layers.md +189 -0
  170. package/docs/guides/metrics.md +101 -0
  171. package/docs/guides/resource-management.md +141 -0
  172. package/docs/guides/retry.md +215 -0
  173. package/docs/guides/semaphore.md +66 -0
  174. package/docs/guides/streams.md +117 -0
  175. package/docs/guides/supervisors.md +98 -0
  176. package/docs/guides/testing.md +162 -0
  177. package/docs/guides/tracing.md +71 -0
  178. package/docs/http-recipes.md +399 -0
  179. package/docs/http.md +749 -0
  180. package/docs/modules.md +285 -0
  181. package/docs/observability-collector-smoke.md +31 -0
  182. package/docs/observability-framework-examples.md +98 -0
  183. package/docs/observability.md +542 -0
  184. package/docs/otel-collector-smoke.yaml +27 -0
  185. package/docs/performance-profiler.md +199 -0
  186. package/docs/production-readiness.md +73 -0
  187. package/docs/recipes/README.md +12 -0
  188. package/docs/recipes/http-server.md +45 -0
  189. package/docs/recipes/layers.md +44 -0
  190. package/docs/recipes/performance.md +47 -0
  191. package/docs/recipes/runtime.md +41 -0
  192. package/docs/recipes/testing.md +41 -0
  193. package/docs/release.md +53 -0
  194. package/docs/wasm-bounded-queues.md +44 -0
  195. package/docs/wasm-engine-observability-benchmarks.md +85 -0
  196. package/docs/wasm-fiber-engine.md +117 -0
  197. package/docs/wasm-scheduler-state-machine.md +122 -0
  198. package/docs/wasm-stream-chunks.md +54 -0
  199. package/package.json +22 -2
  200. package/dist/chunk-45F7OKGT.cjs +0 -104
  201. package/dist/chunk-7V4KY4RL.mjs +0 -104
  202. package/dist/chunk-DJQ7OMMB.cjs +0 -144
  203. package/dist/chunk-GOV47PPB.mjs +0 -552
  204. package/dist/chunk-JF4XXPZ5.cjs +0 -552
  205. package/dist/chunk-KCPT2D6G.js +0 -552
  206. package/dist/chunk-NOYZIMUJ.mjs +0 -144
  207. package/dist/chunk-PNVFW245.js +0 -144
  208. package/dist/chunk-ROJC3NBJ.js +0 -104
  209. package/dist/effectRunner-3ZHAD3LE.cjs +0 -8
  210. package/dist/schedule-Fque9Abz.d.ts +0 -70
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkNYL4D7SKcjs = require('./chunk-NYL4D7SK.cjs');
3
+ var _chunkSA6HUJVIcjs = require('./chunk-SA6HUJVI.cjs');
4
4
 
5
5
 
6
- var _chunkTVN5I4U6cjs = require('./chunk-TVN5I4U6.cjs');
6
+ var _chunkJF5WGYJJcjs = require('./chunk-JF5WGYJJ.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- var _chunkWQ5QNU5Rcjs = require('./chunk-WQ5QNU5R.cjs');
11
+ var _chunkGLE2WY7Zcjs = require('./chunk-GLE2WY7Z.cjs');
12
12
 
13
13
 
14
14
 
@@ -28,10 +28,10 @@ var _chunkWQ5QNU5Rcjs = require('./chunk-WQ5QNU5R.cjs');
28
28
 
29
29
 
30
30
 
31
- var _chunkDJQ7OMMBcjs = require('./chunk-DJQ7OMMB.cjs');
31
+ var _chunkMVGUEJ5Zcjs = require('./chunk-MVGUEJ5Z.cjs');
32
32
 
33
33
  // src/core/stream/stream.ts
34
- var widenOpt = (opt) => opt._tag === "None" ? _chunkDJQ7OMMBcjs.none : _chunkDJQ7OMMBcjs.some.call(void 0, opt.value);
34
+ var widenOpt = (opt) => opt._tag === "None" ? _chunkMVGUEJ5Zcjs.none : _chunkMVGUEJ5Zcjs.some.call(void 0, opt.value);
35
35
  var fromPull = (pull) => ({
36
36
  _tag: "FromPull",
37
37
  pull
@@ -76,28 +76,34 @@ function streamToRaceWithHandler(winnerSide, leftStream, rightStream, flip, id)
76
76
  const [a, tailWin] = exit.value;
77
77
  otherFiber.interrupt();
78
78
  const next = winnerSide === "L" ? fromPull(makeMergePull(tailWin, rightStream, !flip, id)) : fromPull(makeMergePull(leftStream, tailWin, !flip, id));
79
- return _chunkDJQ7OMMBcjs.asyncSucceed.call(void 0, [a, next]);
79
+ return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [a, next]);
80
80
  }
81
- if (exit.cause._tag === "Interrupt") {
82
- return _chunkDJQ7OMMBcjs.asyncEffect.call(void 0, (_env, cb) => {
83
- cb(_chunkDJQ7OMMBcjs.Exit.failCause(_chunkDJQ7OMMBcjs.Cause.interrupt()));
81
+ if (_chunkMVGUEJ5Zcjs.Cause.isInterruptedOnly(exit.cause)) {
82
+ return _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
83
+ cb(_chunkMVGUEJ5Zcjs.Exit.failCause(_chunkMVGUEJ5Zcjs.Cause.interrupt()));
84
84
  });
85
85
  }
86
- const opt = exit.cause.error;
86
+ const failure = _chunkMVGUEJ5Zcjs.Cause.firstFailure(exit.cause);
87
+ if (failure._tag === "None") {
88
+ return _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
89
+ cb(_chunkMVGUEJ5Zcjs.Exit.failCause(exit.cause));
90
+ });
91
+ }
92
+ const opt = failure.value;
87
93
  if (opt._tag === "None") {
88
94
  return winnerSide === "L" ? uncons(rightStream) : uncons(leftStream);
89
95
  }
90
- return _chunkDJQ7OMMBcjs.asyncFail.call(void 0, opt);
96
+ return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt);
91
97
  };
92
98
  }
93
99
  function makeMergePull(onLeft, onRight, flip, mergePullId) {
94
100
  const id = ++mergePullId;
95
101
  const onLeftHandler = streamToRaceWithHandler("L", onLeft, onRight, flip, id);
96
102
  const onRightHandler = streamToRaceWithHandler("R", onLeft, onRight, flip, id);
97
- return _chunkDJQ7OMMBcjs.asyncEffect.call(void 0, (_env, cb) => {
98
- const runtime = _chunkWQ5QNU5Rcjs.unsafeGetCurrentRuntime.call(void 0, );
99
- const scope = new (0, _chunkTVN5I4U6cjs.Scope)(runtime);
100
- const handler = _chunkNYL4D7SKcjs.raceWith.call(void 0,
103
+ return _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_env, cb) => {
104
+ const runtime = _chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime.call(void 0, );
105
+ const scope = new (0, _chunkJF5WGYJJcjs.Scope)(runtime);
106
+ const handler = _chunkSA6HUJVIcjs.raceWith.call(void 0,
101
107
  uncons(onLeft),
102
108
  uncons(onRight),
103
109
  scope,
@@ -116,33 +122,33 @@ function merge(left, right) {
116
122
  function uncons(self) {
117
123
  switch (self._tag) {
118
124
  case "Empty":
119
- return _chunkDJQ7OMMBcjs.fail.call(void 0, _chunkDJQ7OMMBcjs.none);
125
+ return _chunkMVGUEJ5Zcjs.fail.call(void 0, _chunkMVGUEJ5Zcjs.none);
120
126
  case "FromArray": {
121
127
  const arr = self.values;
122
- if (arr.length === 0) return _chunkDJQ7OMMBcjs.fail.call(void 0, _chunkDJQ7OMMBcjs.none);
128
+ if (arr.length === 0) return _chunkMVGUEJ5Zcjs.fail.call(void 0, _chunkMVGUEJ5Zcjs.none);
123
129
  const tail = arr.length === 1 ? EMPTY_STREAM : { _tag: "FromArray", values: arr.slice(1) };
124
- return _chunkDJQ7OMMBcjs.succeed.call(void 0, [arr[0], tail]);
130
+ return _chunkMVGUEJ5Zcjs.succeed.call(void 0, [arr[0], tail]);
125
131
  }
126
132
  case "Emit":
127
- return _chunkDJQ7OMMBcjs.map.call(void 0,
128
- _chunkDJQ7OMMBcjs.mapError.call(void 0, self.value, (e) => _chunkDJQ7OMMBcjs.some.call(void 0, e)),
133
+ return _chunkMVGUEJ5Zcjs.map.call(void 0,
134
+ _chunkMVGUEJ5Zcjs.mapError.call(void 0, self.value, (e) => _chunkMVGUEJ5Zcjs.some.call(void 0, e)),
129
135
  (a) => [a, EMPTY_STREAM]
130
136
  );
131
137
  case "FromPull":
132
138
  return self.pull;
133
139
  case "Concat":
134
- return _chunkDJQ7OMMBcjs.orElseOptional.call(void 0,
135
- _chunkDJQ7OMMBcjs.map.call(void 0,
140
+ return _chunkMVGUEJ5Zcjs.orElseOptional.call(void 0,
141
+ _chunkMVGUEJ5Zcjs.map.call(void 0,
136
142
  uncons(self.left),
137
143
  ([a, tail]) => [a, concatStream(tail, self.right)]
138
144
  ),
139
145
  () => uncons(self.right)
140
146
  );
141
147
  case "Flatten":
142
- return _chunkDJQ7OMMBcjs.flatMap.call(void 0,
148
+ return _chunkMVGUEJ5Zcjs.flatMap.call(void 0,
143
149
  uncons(self.stream),
144
- ([head, tail]) => _chunkDJQ7OMMBcjs.orElseOptional.call(void 0,
145
- _chunkDJQ7OMMBcjs.map.call(void 0,
150
+ ([head, tail]) => _chunkMVGUEJ5Zcjs.orElseOptional.call(void 0,
151
+ _chunkMVGUEJ5Zcjs.map.call(void 0,
146
152
  uncons(head),
147
153
  ([a, as]) => [
148
154
  a,
@@ -155,10 +161,10 @@ function uncons(self) {
155
161
  case "Merge":
156
162
  return makeMergePull(self.left, self.right, self.flip, 0);
157
163
  case "Scoped":
158
- return _chunkDJQ7OMMBcjs.asyncEffect.call(void 0, (env, cb) => {
159
- const runtime = _chunkWQ5QNU5Rcjs.unsafeGetCurrentRuntime.call(void 0, );
160
- const scope = new (0, _chunkTVN5I4U6cjs.Scope)(runtime);
161
- const fiber = _chunkWQ5QNU5Rcjs.getCurrentFiber.call(void 0, );
164
+ return _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (env, cb) => {
165
+ const runtime = _chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime.call(void 0, );
166
+ const scope = new (0, _chunkJF5WGYJJcjs.Scope)(runtime);
167
+ const fiber = _chunkGLE2WY7Zcjs.getCurrentFiber.call(void 0, );
162
168
  _optionalChain([fiber, 'optionalAccess', _2 => _2.addFinalizer, 'call', _3 => _3((exit) => {
163
169
  try {
164
170
  scope.close(exit);
@@ -167,7 +173,8 @@ function uncons(self) {
167
173
  })]);
168
174
  const closeWith = (exit) => {
169
175
  if (exit._tag === "Failure") {
170
- const err = exit.cause.error;
176
+ const failure = _chunkMVGUEJ5Zcjs.Cause.firstFailure(exit.cause);
177
+ const err = failure._tag === "Some" ? failure.value : void 0;
171
178
  if (err && typeof err === "object" && err._tag === "None") {
172
179
  scope.close({ _tag: "Success", value: void 0 });
173
180
  return;
@@ -176,18 +183,18 @@ function uncons(self) {
176
183
  scope.close(exit);
177
184
  };
178
185
  const wrap = (s) => fromPull(
179
- _chunkDJQ7OMMBcjs.asyncEffect.call(void 0, (env2, cb2) => {
186
+ _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (env2, cb2) => {
180
187
  const pull = uncons(s);
181
- _chunkWQ5QNU5Rcjs.unsafeRunFoldWithEnv.call(void 0,
188
+ _chunkGLE2WY7Zcjs.unsafeRunFoldWithEnv.call(void 0,
182
189
  pull,
183
190
  env2,
184
191
  (cause) => {
185
- const ex = _chunkDJQ7OMMBcjs.Exit.failCause(cause);
192
+ const ex = _chunkMVGUEJ5Zcjs.Exit.failCause(cause);
186
193
  closeWith(ex);
187
194
  cb2(ex);
188
195
  },
189
196
  ([a, tail]) => {
190
- cb2(_chunkDJQ7OMMBcjs.Exit.succeed([a, wrap(tail)]));
197
+ cb2(_chunkMVGUEJ5Zcjs.Exit.succeed([a, wrap(tail)]));
191
198
  }
192
199
  );
193
200
  })
@@ -195,19 +202,20 @@ function uncons(self) {
195
202
  scope.fork(self.acquire).join((ex) => {
196
203
  if (ex._tag === "Failure") {
197
204
  closeWith(ex);
198
- cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkDJQ7OMMBcjs.some.call(void 0, ex.cause.error) } });
205
+ const failure = _chunkMVGUEJ5Zcjs.Cause.firstFailure(ex.cause);
206
+ cb(failure._tag === "Some" ? { _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkMVGUEJ5Zcjs.some.call(void 0, failure.value)) } : { _tag: "Failure", cause: ex.cause });
199
207
  return;
200
208
  }
201
209
  scope.addFinalizer((exit) => self.release(exit));
202
210
  const inner = ex.value;
203
- _chunkWQ5QNU5Rcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(uncons(wrap(inner))).join(cb);
211
+ _chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(uncons(wrap(inner))).join(cb);
204
212
  });
205
213
  });
206
214
  case "Managed":
207
- return _chunkDJQ7OMMBcjs.asyncEffect.call(void 0, (env, cb) => {
208
- const runtime = _chunkWQ5QNU5Rcjs.unsafeGetCurrentRuntime.call(void 0, );
209
- const scope = new (0, _chunkTVN5I4U6cjs.Scope)(runtime);
210
- _optionalChain([_chunkWQ5QNU5Rcjs.getCurrentFiber.call(void 0, ), 'optionalAccess', _4 => _4.addFinalizer, 'call', _5 => _5((exit) => {
215
+ return _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (env, cb) => {
216
+ const runtime = _chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime.call(void 0, );
217
+ const scope = new (0, _chunkJF5WGYJJcjs.Scope)(runtime);
218
+ _optionalChain([_chunkGLE2WY7Zcjs.getCurrentFiber.call(void 0, ), 'optionalAccess', _4 => _4.addFinalizer, 'call', _5 => _5((exit) => {
211
219
  try {
212
220
  scope.close(exit);
213
221
  } catch (e4) {
@@ -215,7 +223,8 @@ function uncons(self) {
215
223
  })]);
216
224
  const closeWith = (exit) => {
217
225
  if (exit._tag === "Failure") {
218
- const err = exit.cause.error;
226
+ const failure = _chunkMVGUEJ5Zcjs.Cause.firstFailure(exit.cause);
227
+ const err = failure._tag === "Some" ? failure.value : void 0;
219
228
  if (err && typeof err === "object" && err._tag === "None") {
220
229
  scope.close({ _tag: "Success", value: void 0 });
221
230
  return;
@@ -226,28 +235,29 @@ function uncons(self) {
226
235
  scope.fork(self.acquire).join((ex) => {
227
236
  if (ex._tag === "Failure") {
228
237
  scope.close(ex);
229
- cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkDJQ7OMMBcjs.some.call(void 0, ex.cause.error) } });
238
+ const failure = _chunkMVGUEJ5Zcjs.Cause.firstFailure(ex.cause);
239
+ cb(failure._tag === "Some" ? { _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(_chunkMVGUEJ5Zcjs.some.call(void 0, failure.value)) } : { _tag: "Failure", cause: ex.cause });
230
240
  return;
231
241
  }
232
242
  const { stream: inner, release } = ex.value;
233
243
  scope.addFinalizer((exit) => release(exit));
234
244
  const wrap = (s) => fromPull(
235
- _chunkDJQ7OMMBcjs.asyncEffect.call(void 0, (env2, cb2) => {
236
- _chunkWQ5QNU5Rcjs.unsafeRunFoldWithEnv.call(void 0,
245
+ _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (env2, cb2) => {
246
+ _chunkGLE2WY7Zcjs.unsafeRunFoldWithEnv.call(void 0,
237
247
  uncons(s),
238
248
  env2,
239
249
  (cause) => {
240
- const ex2 = _chunkDJQ7OMMBcjs.Exit.failCause(cause);
250
+ const ex2 = _chunkMVGUEJ5Zcjs.Exit.failCause(cause);
241
251
  closeWith(ex2);
242
252
  cb2(ex2);
243
253
  },
244
254
  ([a, tail]) => {
245
- cb2(_chunkDJQ7OMMBcjs.Exit.succeed([a, wrap(tail)]));
255
+ cb2(_chunkMVGUEJ5Zcjs.Exit.succeed([a, wrap(tail)]));
246
256
  }
247
257
  );
248
258
  })
249
259
  );
250
- _chunkWQ5QNU5Rcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(uncons(wrap(inner))).join(cb);
260
+ _chunkGLE2WY7Zcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(uncons(wrap(inner))).join(cb);
251
261
  });
252
262
  });
253
263
  }
@@ -262,10 +272,10 @@ function mapStream(self, f) {
262
272
  case "FromArray":
263
273
  return { _tag: "FromArray", values: self.values.map(f) };
264
274
  case "Emit":
265
- return emitStream(_chunkDJQ7OMMBcjs.map.call(void 0, self.value, f));
275
+ return emitStream(_chunkMVGUEJ5Zcjs.map.call(void 0, self.value, f));
266
276
  case "FromPull":
267
277
  return fromPull(
268
- _chunkDJQ7OMMBcjs.map.call(void 0, self.pull, ([a, tail]) => [f(a), mapStream(tail, f)])
278
+ _chunkMVGUEJ5Zcjs.map.call(void 0, self.pull, ([a, tail]) => [f(a), mapStream(tail, f)])
269
279
  );
270
280
  case "Concat":
271
281
  return concatStream(mapStream(self.left, f), mapStream(self.right, f));
@@ -284,12 +294,12 @@ function mapStream(self, f) {
284
294
  );
285
295
  case "Scoped":
286
296
  return unwrapScoped(
287
- _chunkDJQ7OMMBcjs.map.call(void 0, self.acquire, (s) => mapStream(s, f)),
297
+ _chunkMVGUEJ5Zcjs.map.call(void 0, self.acquire, (s) => mapStream(s, f)),
288
298
  self.release
289
299
  );
290
300
  case "Managed":
291
301
  return managedStream(
292
- _chunkDJQ7OMMBcjs.map.call(void 0, self.acquire, ({ stream, release }) => ({
302
+ _chunkMVGUEJ5Zcjs.map.call(void 0, self.acquire, ({ stream, release }) => ({
293
303
  stream: mapStream(stream, f),
294
304
  release
295
305
  }))
@@ -300,19 +310,19 @@ function mapStream(self, f) {
300
310
  }
301
311
  function rangeStream(start, end) {
302
312
  const go = (i) => fromPull(
303
- i > end ? _chunkDJQ7OMMBcjs.asyncFail.call(void 0, _chunkDJQ7OMMBcjs.none) : _chunkDJQ7OMMBcjs.asyncSucceed.call(void 0, [i, go(i + 1)])
313
+ i > end ? _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, _chunkMVGUEJ5Zcjs.none) : _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [i, go(i + 1)])
304
314
  );
305
315
  return go(start);
306
316
  }
307
317
  function zip(left, right) {
308
- const pull = _chunkDJQ7OMMBcjs.asyncFold.call(void 0,
309
- _chunkDJQ7OMMBcjs.asyncMapError.call(void 0, uncons(left), (opt) => widenOpt(opt)),
318
+ const pull = _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
319
+ _chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, uncons(left), (opt) => widenOpt(opt)),
310
320
  // si left termina o falla, el zip termina/falla igual
311
- (opt) => _chunkDJQ7OMMBcjs.asyncFail.call(void 0, opt),
312
- ([a, tailL]) => _chunkDJQ7OMMBcjs.asyncFold.call(void 0,
313
- _chunkDJQ7OMMBcjs.asyncMapError.call(void 0, uncons(right), (opt) => widenOpt(opt)),
314
- (opt) => _chunkDJQ7OMMBcjs.asyncFail.call(void 0, opt),
315
- ([b, tailR]) => _chunkDJQ7OMMBcjs.asyncSucceed.call(void 0, [
321
+ (opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
322
+ ([a, tailL]) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
323
+ _chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, uncons(right), (opt) => widenOpt(opt)),
324
+ (opt) => _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt),
325
+ ([b, tailR]) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, [
316
326
  [a, b],
317
327
  zip(tailL, tailR)
318
328
  ])
@@ -321,26 +331,26 @@ function zip(left, right) {
321
331
  return fromPull(pull);
322
332
  }
323
333
  function foreachStream(stream, f) {
324
- const loop = (cur) => _chunkDJQ7OMMBcjs.asyncFold.call(void 0,
334
+ const loop = (cur) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
325
335
  // uncons: Option<E> -> Option<E|E2>
326
- _chunkDJQ7OMMBcjs.asyncMapError.call(void 0, uncons(cur), (opt) => widenOpt(opt)),
336
+ _chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, uncons(cur), (opt) => widenOpt(opt)),
327
337
  (opt) => {
328
- if (opt._tag === "None") return _chunkDJQ7OMMBcjs.asyncSucceed.call(void 0, void 0);
329
- return _chunkDJQ7OMMBcjs.asyncFail.call(void 0, opt);
338
+ if (opt._tag === "None") return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0);
339
+ return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt);
330
340
  },
331
- ([a, tail]) => _chunkDJQ7OMMBcjs.asyncFlatMap.call(void 0,
341
+ ([a, tail]) => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
332
342
  // f(a): E2 -> Option<E|E2>
333
- _chunkDJQ7OMMBcjs.asyncMapError.call(void 0, f(a), (e2) => _chunkDJQ7OMMBcjs.some.call(void 0, e2)),
343
+ _chunkMVGUEJ5Zcjs.asyncMapError.call(void 0, f(a), (e2) => _chunkMVGUEJ5Zcjs.some.call(void 0, e2)),
334
344
  () => loop(tail)
335
345
  )
336
346
  );
337
- return _chunkDJQ7OMMBcjs.asyncFold.call(void 0,
347
+ return _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
338
348
  loop(stream),
339
349
  (opt) => {
340
- if (opt._tag === "None") return _chunkDJQ7OMMBcjs.asyncSucceed.call(void 0, void 0);
341
- return _chunkDJQ7OMMBcjs.asyncFail.call(void 0, opt.value);
350
+ if (opt._tag === "None") return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0);
351
+ return _chunkMVGUEJ5Zcjs.asyncFail.call(void 0, opt.value);
342
352
  },
343
- () => _chunkDJQ7OMMBcjs.asyncSucceed.call(void 0, void 0)
353
+ () => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0)
344
354
  );
345
355
  }
346
356
  function fromArray(values) {
@@ -350,20 +360,20 @@ function fromArray(values) {
350
360
  function collectStream(stream) {
351
361
  const syncResult = drainStreamSyncFull(stream);
352
362
  if (syncResult !== null) {
353
- return _chunkDJQ7OMMBcjs.asyncSucceed.call(void 0, syncResult);
363
+ return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, syncResult);
354
364
  }
355
- const loop = (cur, acc) => _chunkDJQ7OMMBcjs.asyncFold.call(void 0,
365
+ const loop = (cur, acc) => _chunkMVGUEJ5Zcjs.asyncFold.call(void 0,
356
366
  uncons(cur),
357
367
  (opt) => {
358
- if (opt._tag === "None") return _chunkDJQ7OMMBcjs.succeed.call(void 0, acc);
359
- return _chunkDJQ7OMMBcjs.fail.call(void 0, opt);
368
+ if (opt._tag === "None") return _chunkMVGUEJ5Zcjs.succeed.call(void 0, acc);
369
+ return _chunkMVGUEJ5Zcjs.fail.call(void 0, opt);
360
370
  },
361
371
  ([a, tail]) => {
362
372
  acc.push(a);
363
373
  return loop(tail, acc);
364
374
  }
365
375
  );
366
- return _chunkDJQ7OMMBcjs.mapError.call(void 0, loop(stream, []), (opt) => {
376
+ return _chunkMVGUEJ5Zcjs.mapError.call(void 0, loop(stream, []), (opt) => {
367
377
  if (opt._tag === "Some") return opt.value;
368
378
  throw new Error("unreachable: stream end handled as success");
369
379
  });
@@ -405,7 +415,7 @@ function drainStreamSyncFull(stream) {
405
415
  }
406
416
  }
407
417
  function readerStream(reader, normalizeError, signal) {
408
- const pull = _chunkDJQ7OMMBcjs.asyncEffect.call(void 0, (_, cb) => {
418
+ const pull = _chunkMVGUEJ5Zcjs.asyncEffect.call(void 0, (_, cb) => {
409
419
  let done = false;
410
420
  const cleanup = () => _optionalChain([signal, 'optionalAccess', _6 => _6.removeEventListener, 'call', _7 => _7("abort", abort)]);
411
421
  const finish = (exit) => {
@@ -420,7 +430,7 @@ function readerStream(reader, normalizeError, signal) {
420
430
  } catch (e5) {
421
431
  }
422
432
  const error = typeof DOMException === "function" ? new DOMException("aborted", "AbortError") : new Error("aborted");
423
- finish({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkDJQ7OMMBcjs.some.call(void 0, normalizeError(error)) } });
433
+ finish({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkMVGUEJ5Zcjs.some.call(void 0, normalizeError(error)) } });
424
434
  };
425
435
  if (_optionalChain([signal, 'optionalAccess', _8 => _8.aborted])) {
426
436
  abort();
@@ -429,7 +439,7 @@ function readerStream(reader, normalizeError, signal) {
429
439
  _optionalChain([signal, 'optionalAccess', _9 => _9.addEventListener, 'call', _10 => _10("abort", abort, { once: true })]);
430
440
  reader.read().then(({ done: done2, value }) => {
431
441
  if (done2) {
432
- finish({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkDJQ7OMMBcjs.none } });
442
+ finish({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkMVGUEJ5Zcjs.none } });
433
443
  return;
434
444
  }
435
445
  finish({
@@ -437,7 +447,7 @@ function readerStream(reader, normalizeError, signal) {
437
447
  value: [value, fromPull(pull)]
438
448
  });
439
449
  }).catch((e) => {
440
- finish({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkDJQ7OMMBcjs.some.call(void 0, normalizeError(e)) } });
450
+ finish({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkMVGUEJ5Zcjs.some.call(void 0, normalizeError(e)) } });
441
451
  });
442
452
  return () => {
443
453
  cleanup();
@@ -454,12 +464,12 @@ function streamFromReadableStream(body, normalizeError, options = {}) {
454
464
  let reader;
455
465
  return unwrapScoped(
456
466
  // acquire: produce un ZStream
457
- _chunkDJQ7OMMBcjs.sync.call(void 0, () => {
467
+ _chunkMVGUEJ5Zcjs.sync.call(void 0, () => {
458
468
  reader = body.getReader();
459
469
  return readerStream(reader, normalizeError, options.signal);
460
470
  }),
461
471
  // release: se corre en fin / error / interrupción
462
- () => _chunkDJQ7OMMBcjs.asyncSync.call(void 0, () => {
472
+ () => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => {
463
473
  try {
464
474
  _optionalChain([reader, 'optionalAccess', _11 => _11.cancel, 'call', _12 => _12()]);
465
475
  } catch (e7) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getCurrentFiber
3
- } from "./chunk-G6IQOE4P.mjs";
3
+ } from "./chunk-FH2X7BVP.js";
4
4
  import {
5
5
  Cause,
6
6
  Exit,
@@ -8,7 +8,7 @@ import {
8
8
  asyncFlatMap,
9
9
  asyncFold,
10
10
  unit
11
- } from "./chunk-NOYZIMUJ.mjs";
11
+ } from "./chunk-UB4B6OFY.js";
12
12
 
13
13
  // src/core/runtime/scope.ts
14
14
  var nextScopeId = 1;
@@ -77,12 +77,13 @@ var Scope = class _Scope {
77
77
  /** Emit the scope.close event if hooks are active. */
78
78
  emitCloseEvent(exit) {
79
79
  if (this.runtime.hasActiveHooks()) {
80
- const status = exit._tag === "Success" ? "success" : exit.cause._tag === "Interrupt" ? "interrupted" : "failure";
80
+ const status = exit._tag === "Success" ? "success" : Cause.isInterruptedOnly(exit.cause) ? "interrupted" : "failure";
81
+ const failure = exit._tag === "Failure" ? Cause.firstFailure(exit.cause) : void 0;
81
82
  this.runtime.emit({
82
83
  type: "scope.close",
83
84
  scopeId: this.id,
84
85
  status,
85
- error: exit._tag === "Failure" && exit.cause._tag === "Fail" ? exit.cause.error : void 0
86
+ error: failure?._tag === "Some" ? failure.value : exit._tag === "Failure" ? exit.cause : void 0
86
87
  });
87
88
  }
88
89
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkDJQ7OMMBcjs = require('./chunk-DJQ7OMMB.cjs');
3
+ var _chunkMVGUEJ5Zcjs = require('./chunk-MVGUEJ5Z.cjs');
4
4
 
5
5
  // src/http/effectRunner.ts
6
6
  function registerHttpEffect(effect, env, cb) {
@@ -19,13 +19,13 @@ function registerHttpEffect(effect, env, cb) {
19
19
  cont({ _tag: "Success", value: current.value });
20
20
  return;
21
21
  case "Fail":
22
- cont({ _tag: "Failure", cause: _chunkDJQ7OMMBcjs.Cause.fail(current.error) });
22
+ cont({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.fail(current.error) });
23
23
  return;
24
24
  case "Sync":
25
25
  try {
26
26
  cont({ _tag: "Success", value: current.thunk(env) });
27
27
  } catch (e) {
28
- cont({ _tag: "Failure", cause: _chunkDJQ7OMMBcjs.Cause.die(e) });
28
+ cont({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.die(e) });
29
29
  }
30
30
  return;
31
31
  case "Async": {
@@ -47,7 +47,7 @@ function registerHttpEffect(effect, env, cb) {
47
47
  try {
48
48
  run(current.andThen(exit.value), cont);
49
49
  } catch (e) {
50
- cont({ _tag: "Failure", cause: _chunkDJQ7OMMBcjs.Cause.die(e) });
50
+ cont({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.die(e) });
51
51
  }
52
52
  });
53
53
  return;
@@ -59,19 +59,30 @@ function registerHttpEffect(effect, env, cb) {
59
59
  run(current.onSuccess(exit.value), cont);
60
60
  return;
61
61
  }
62
- if (exit.cause._tag === "Fail") {
63
- run(current.onFailure(exit.cause.error), cont);
64
- return;
62
+ if (_chunkMVGUEJ5Zcjs.Cause.isFailureOnly(exit.cause)) {
63
+ const failure = _chunkMVGUEJ5Zcjs.Cause.firstFailure(exit.cause);
64
+ if (failure._tag === "Some") {
65
+ run(current.onFailure(failure.value), cont);
66
+ return;
67
+ }
65
68
  }
66
69
  cont(exit);
67
70
  } catch (e) {
68
- cont({ _tag: "Failure", cause: _chunkDJQ7OMMBcjs.Cause.die(e) });
71
+ cont({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.die(e) });
69
72
  }
70
73
  });
71
74
  return;
72
75
  case "Fork":
73
76
  cont({ _tag: "Success", value: void 0 });
74
77
  return;
78
+ case "Interruptibility":
79
+ case "InterruptibilityRestore":
80
+ case "FiberRefLocally":
81
+ run(current.effect, cont);
82
+ return;
83
+ case "InterruptibilityMask":
84
+ run(current.body((effect2) => effect2), cont);
85
+ return;
75
86
  }
76
87
  };
77
88
  run(effect, finish);
@@ -83,7 +94,7 @@ function registerHttpEffect(effect, env, cb) {
83
94
  try {
84
95
  _optionalChain([cancel, 'optionalCall', _ => _()]);
85
96
  } finally {
86
- cb({ _tag: "Failure", cause: _chunkDJQ7OMMBcjs.Cause.interrupt() });
97
+ cb({ _tag: "Failure", cause: _chunkMVGUEJ5Zcjs.Cause.interrupt() });
87
98
  }
88
99
  };
89
100
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  race
3
- } from "./chunk-J3H54ZRV.mjs";
3
+ } from "./chunk-B5JD23U7.mjs";
4
4
  import {
5
5
  withScopeAsync
6
- } from "./chunk-CCKHV5BT.mjs";
6
+ } from "./chunk-A2OM6NEH.mjs";
7
7
  import {
8
8
  fromPromiseAbortable
9
- } from "./chunk-G6IQOE4P.mjs";
9
+ } from "./chunk-GYM3LLGS.mjs";
10
10
  import {
11
11
  Cause,
12
12
  Exit,
@@ -17,7 +17,7 @@ import {
17
17
  asyncMap,
18
18
  asyncSucceed,
19
19
  asyncSync
20
- } from "./chunk-NOYZIMUJ.mjs";
20
+ } from "./chunk-36I3M4UC.mjs";
21
21
 
22
22
  // src/agent/core/state.ts
23
23
  var initialAgentState = (goal) => ({