clanka 0.8.3 → 0.8.5

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 (40) hide show
  1. package/dist/AgentExecutor.d.ts.map +1 -1
  2. package/dist/AgentExecutor.js +1 -1
  3. package/dist/AgentExecutor.js.map +1 -1
  4. package/dist/AgentExecutor.test.d.ts +2 -0
  5. package/dist/AgentExecutor.test.d.ts.map +1 -0
  6. package/dist/AgentExecutor.test.js +87 -0
  7. package/dist/AgentExecutor.test.js.map +1 -0
  8. package/dist/AgentSkills.test.js +1 -0
  9. package/dist/AgentSkills.test.js.map +1 -1
  10. package/dist/AgentTools.d.ts.map +1 -1
  11. package/dist/AgentTools.js +2 -1
  12. package/dist/AgentTools.js.map +1 -1
  13. package/dist/Compaction.test.js +1 -0
  14. package/dist/Compaction.test.js.map +1 -1
  15. package/dist/bin/{Effect-BCeySOy1.mjs → Effect-BEUn4I5E.mjs} +339 -288
  16. package/dist/bin/Effect-BEUn4I5E.mjs.map +1 -0
  17. package/dist/bin/{McpClient-DP4jlaD1.mjs → McpClient-C0FVuDj2.mjs} +218 -62
  18. package/dist/bin/McpClient-C0FVuDj2.mjs.map +1 -0
  19. package/dist/bin/{OutputFormatter-Ch8yFytV.mjs → OutputFormatter-DffD5oxX.mjs} +8 -8
  20. package/dist/bin/OutputFormatter-DffD5oxX.mjs.map +1 -0
  21. package/dist/bin/{Schema-C9JQ5hI0.mjs → Schema-CjUGw2Xh.mjs} +480 -384
  22. package/dist/bin/Schema-CjUGw2Xh.mjs.map +1 -0
  23. package/dist/bin/{SemanticSearch-BJGnYhFt.mjs → SemanticSearch-CFB73IPb.mjs} +321 -268
  24. package/dist/bin/SemanticSearch-CFB73IPb.mjs.map +1 -0
  25. package/dist/bin/{Stream-CgH3SuLu.mjs → Stream-Cu6P7ZHo.mjs} +180 -172
  26. package/dist/bin/Stream-Cu6P7ZHo.mjs.map +1 -0
  27. package/dist/bin/cli.mjs +306 -259
  28. package/dist/bin/cli.mjs.map +1 -1
  29. package/package.json +20 -20
  30. package/src/AgentExecutor.test.ts +133 -0
  31. package/src/AgentExecutor.ts +1 -2
  32. package/src/AgentSkills.test.ts +1 -0
  33. package/src/AgentTools.ts +2 -1
  34. package/src/Compaction.test.ts +1 -0
  35. package/dist/bin/Effect-BCeySOy1.mjs.map +0 -1
  36. package/dist/bin/McpClient-DP4jlaD1.mjs.map +0 -1
  37. package/dist/bin/OutputFormatter-Ch8yFytV.mjs.map +0 -1
  38. package/dist/bin/Schema-C9JQ5hI0.mjs.map +0 -1
  39. package/dist/bin/SemanticSearch-BJGnYhFt.mjs.map +0 -1
  40. package/dist/bin/Stream-CgH3SuLu.mjs.map +0 -1
package/dist/bin/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env -S node --optimize-for-size
2
- import { $ as isEffect, $a as map$8, $i as headUnsafe, $n as buildWithScope, $o as symbol$2, $t as uninterruptibleMask, A as ensuring, Aa as getOrUndefined$1, Ai as ParentSpan, An as StackTrace, Ao as assignProperty, Ar as isDone, At as result, B as fnUntraced, Ba as flatMapNullishOr, Bi as headNonEmpty, Bn as hasInterrupts, Br as succeed$3, Bt as sleep, C as catch_, Ca as zero, Cr as MinimumLogLevel, Cs as constUndefined, Ct as promise, Da as empty$7, Dn as Done, Dr as doneUnsafe, Ds as flow, Dt as raceFirst, E as contextWith, Ea as add, En as nextBetween, Es as dual, Et as provideService, F as filterOrFail, Fa as merge$2, Fi as findFirst, Fn as done, Fo as NodeInspectSymbol, Fr as failCause$1, G as forkIn, Ga as getOrElse, Gi as last$1, Go as equals, Gt as tap, H as forEach$2, Hi as isCanonicalArrayIndex, Hn as interruptors, Ho as redact$1, Ht as succeedNone, I as flatMap$1, Ia as all, Ii as findFirstIndex, In as fail$4, Io as toJson, Ir as interrupt$1, It as scope, Ja as getOrUndefined, Ji as match$3, Jt as timeoutOrElse, K as forkScoped, Ka as getOrNull, Kn as isTimeoutError, Ko as symbol$1, Kt as tapCause, L as flatMapEager, La as exists, Li as findLast, Ln as filterInterruptors, Lo as format, Lt as scoped, M as fail$2, Ma as getUnsafe, Mn as UnknownError$1, Mo as setStackTraceLimit, Mr as makeUnsafe$2, Mt as runFork, N as failCause, Na as make$42, Ni as appendAll, Nn as annotate$1, No as BaseProto, Nr as die$1, Nt as runForkWith, O as die, Oa as get$3, Oo as withFiber$1, Os as identity, Ot as repeat, Pa as makeUnsafe$3, Pi as empty$6, Po as Class, Pr as fail$3, Ps as pipeArguments, Pt as runSync, Q as interruptible, Qi as empty$8, Qn as squash, Qo as structure, Qt as uninterruptible, Ra as filter$1, Rr as isFailure$1, S as catchTags, Sr as CurrentLogAnnotations, Ss as constTrue, St as orElseSucceed, T as context, Ta as Service, Ti as sync$1, Tn as Random$1, Tr as _await, Tt as provideContext, U as forever, Ua as fromNullishOr, Ui as isReadonlyArrayNonEmpty, Uo as symbolRedactable, Ur as ConsoleRef, Ut as suspend, Vi as isArrayNonEmpty, Vn as hasInterruptsOnly, Vr as void_$1, Vt as succeed$2, W as forkChild, Wa as fromUndefinedOr, Wi as join$1, Wr as LogToStderr$1, Wt as sync, X as ignore, Xi as reduce, Xt as try_, Y as gen, Ya as isNone, Yi as of, Yo as hash, Yt as tryPromise, Z as interrupt, Za as isSome, Zn as pretty, Zt as undefined_, _ as catchFilter, _a as minutes, _n as min, _o as strictEqual, _r as close, _s as isTagged, _t as onExit, a as andThen, aa as isSuccess, an as whileLoop, ao as toArray, ar as merge$3, as as isIterable, at as makeSpanScoped, b as catchReason, ba as seconds, bn as catchDone, br as makeUnsafe$1, bs as or, bt as option$1, c as as, ca as succeed$1, cn as withParentSpan, cr as orDie$1, cs as isNotNullish, ct as mapEager, d as cached, da as fromInputUnsafe$1, dn as zipWith, dr as succeed$4, ds as isNullish, dt as match$4, ea as fail$1, en as updateContext, eo as match$2, er as effect, es as hasProperty, et as logDebug, f as cachedWithTTL, fa as infinity, fr as succeedContext, g as catchEager, ga as millis, gn as jittered, gr as addFinalizerExit, gs as isString, gt as onError, h as catchDefect, hn as isSchedule, hr as addFinalizer$1, ht as never, i as all$1, ia as isFailure, io as some, ir as fresh, it as logWarning, j as exit, ja as getOrUndefinedUnsafe, ji as Array$1, jn as TimeoutError, jo as getStackTraceLimit, jr as isDoneUnsafe, js as pipe, jt as retry, k as effectify, ka as getOption, ki as DisablePropagation, kr as into, ks as memoize, kt as request, l as asSome, la as try_$1, ln as withSpan$1, lr as provide$3, ls as isNotUndefined, lt as mapError, m as catchCause, ma as isFinite, mn as exponential, mr as Scope, mt as matchEffect, nn as useSpan, no as orElse$1, nt as logFatal, o as annotateCurrentSpan, oa as map$6, on as withFiber, or as mergeAll, ot as map$5, p as callback, pn as TaggedClass, pr as unwrap$1, ps as isObject, pt as matchCauseEffect, q as fromOption, qa as getOrThrow, qi as map$7, qt as timeout, r as addFinalizer, ra as getOrUndefined$2, rn as void_, ro as orElseSome, rr as empty$9, rt as logInfo, s as annotateLogs, sr as mock, ss as isNotNull, st as mapBothEager, t as acquireRelease, ta as failVoid, tn as updateService, to as none, tr as effectContext, tt as logError, u as asVoid, ua as format$1, un as yieldNow, ur as provideMerge, us as isNull, ut as mapErrorEager, v as catchIf, vn as passthrough, vo as Prototype, vs as isUndefined, w as clockWith, wa as Reference, ws as constVoid, wt as provide$1, x as catchTag, xa as toMillis, xo as PipeInspectableProto, xr as provide$2, xs as constFalse, xt as orDie, yn as spaced, yt as onInterrupt, z as fn, za as flatMap$2, zi as fromIterable$1, zr as isSuccess$1, zt as serviceOption } from "./Effect-BCeySOy1.mjs";
3
- import { $ as tap$1, A as mapArrayEffect, At as getCurrent, B as provideService$1, Bt as round, Ct as unbounded, D as isStream, Dt as update, E as fromReadableStream, Et as set$2, F as mkString, Ft as join$2, G as runForEach, H as runCollect, I as onEnd, It as runIn, J as splitLines, K as runForEachArray, L as orDie$2, Lt as camelToSnake, M as mapError$1, Mt as interruptAll, N as merge$4, Nt as interruptAllAs, O as map$9, Ot as makeUnsafe$5, P as mergeAll$1, Q as takeUntil, R as pipeThroughChannel, Rt as toLowerCase, S as fromIterable$2, St as take, T as fromQueue, Tt as make$43, V as run$4, Vt as normalizeNonEmpty, W as runFold, X as suspend$1, Y as succeed$5, Z as take$1, _ as flattenIterable, _t as offer, a as catchTags$1, at as pipeTo, b as fromChannel$1, bt as offerUnsafe, c as die$2, ct as make$45, d as ensuring$1, dt as end, et as transduce, f as fail$5, ft as endUnsafe, g as flatMap$3, gt as make$44, h as filterMap, ht as failCauseUnsafe, i as catchReason$1, it as mapDone, j as mapEffect$1, jt as interrupt$2, k as mapArray, kt as await_, l as drop, lt as makeUnsafe$4, m as filter$2, mt as failCause$2, n as callback$1, nt as fromTransform$1, o as catch_$1, ot as toTransform, p as failCause$3, pt as fail$6, rt as map$10, s as decodeText, st as unwrap$2, t as broadcast, tt as unwrap$3, u as empty$10, ut as bounded, vt as offerAll, w as fromPull, x as fromEffect, xt as poll, yt as offerAllUnsafe, z as provideContext$1, zt as parse$1 } from "./Stream-CgH3SuLu.mjs";
4
- import { $ as declare, $t as Union$1, An as toString, At as tag, B as TaggedUnion, Bn as isRedacted, Bt as omit, C as Never, Ct as isSchemaError, D as NullOr, Dn as empty$11, Dt as mutable, E as Null, En as Pointer, Et as makeFilterGroup, F as String$5, Fn as formatIso, Ft as toType, G as Uint8Array$2, Gn as EncodingError, Gt as encodeEffect, H as Tuple, Hn as value, Ht as _is, I as Struct, It as withConstructorDefault, J as Union, Jn as TaggedError, Jt as FilterGroup, K as Uint8ArrayFromBase64, Kn as Error$2, Kt as Arrays, L as StructWithRest, Ln as fromDateUnsafe, Lt as withDecodingDefault, M as Record, Mn as fromSetCookie, Mt as toCodecStringTree, N as Redacted$1, Nn as decode$4, Nt as toEncoded$1, O as Number$2, On as fromInput$1, Ot as optional$2, P as SchemaError, Pn as encode, Pt as toJsonSchemaDocument, Q as check, Qn as map$11, Qt as Suspend, R as TaggedClass$2, Rt as withDecodingDefaultKey, Sn as passthrough$1, St as isSchema, T as NonEmptyString$1, Tn as InvalidValue$1, Tt as makeFilter, U as URL$1, Un as stringOrRedacted, Ut as decodeEffect$1, V as TrueLiterals, Vn as make$46, Vt as getReferenceKey, W as URLFromString, Wn as Clock, Wt as decodeUnknownEffect, X as Void, Xn as assignProperty$1, Xt as Objects, Y as Unknown, Yn as taggedEnum, Yt as Literal$1, Zn as makeEquivalence, Zt as PropertySignature, _ as Int$1, _n as transform$3, _t as isMaxLength, a as BooleanLiterals, an as null_, at as decodeUnknownSync, b as Literals$2, bt as isPattern, cn as resolveAt, ct as encodeUnknownEffect, d as Defect, dn as string, dt as is, en as applyToSelfOrLastLinkEncoding, et as decodeEffect, f as Duration, fn as toEncoded, ft as isFinite$1, g as Finite, gn as passthrough$2, gt as isLessThanOrEqualTo, h as FalseLiterals, hn as Transformation, ht as isInt, in as mapOrSame, it as decodeUnknownOption, j as OptionFromOptional, jn as empty$12, jt as toCodecJson, k as Option, kn as setAll$1, kt as optionalKey, ln as resolveDescription, lt as fromJsonString, m as Exit, mn as unknown, mt as isGreaterThanOrEqualTo, n as ArraySchema, nn as isNever, nt as decodeTo$1, o as Class$1, on as optionalKey$1, ot as encodeEffect$1, p as Error$3, pn as toType$1, pt as isGreaterThan, q as UndefinedOr, qn as TaggedClass$1, qt as Filter, r as Boolean$4, rn as isOptional, rt as decodeUnknownEffect$1, s as DateTimeUtc, sn as replaceChecks, st as encodeTo, t as Any, tn as decodeTo, tt as decodeSync, u as DateTimeUtcFromString, un as resolveIdentifier, v as Json, vn as transformEffect$1, vt as isMaxProperties, w as NonEmptyArray, wn as transformEffect, wt as make$47, x as MutableJson, xt as isPropertyNames, y as Literal, yn as transformOptional, yt as isMinLength, z as TaggedError$1 } from "./Schema-C9JQ5hI0.mjs";
2
+ import { $ as interruptible, $i as empty$8, $n as squash, $o as structure, $t as uninterruptible, A as effectify, Aa as getOption, Ai as DisablePropagation, Ar as into, As as memoize, At as request, B as fn, Ba as flatMap$2, Bi as fromIterable$1, Br as isSuccess, Bt as serviceOption, C as catchTags, Cr as CurrentLogAnnotations, Cs as constTrue, Ct as orElseSucceed, D as contextWith, Da as add, Dn as nextBetween, Ds as dual, Dt as provideService, E as context, Ea as Service, Ei as sync$1, En as Random$1, Er as _await, Et as provideContext, Fa as makeUnsafe$3, Fi as empty$6, Fo as Class, Fr as fail$3, Fs as pipeArguments, Ft as runSync, G as forkChild, Ga as fromUndefinedOr, Gi as join$1, Gr as LogToStderr$1, Gt as sync, Hi as isArrayNonEmpty, Hn as hasInterruptsOnly, Hr as void_$1, Ht as succeed$2, I as filterOrFail, Ia as merge$2, Ii as findFirst, In as done, Io as NodeInspectSymbol, Ir as failCause$1, J as fromOption, Ja as getOrThrow, Ji as map$7, Jt as timeout, K as forkIn, Ka as getOrElse, Ki as last$1, Ko as equals, Kt as tap, L as flatMap$1, La as all, Li as findFirstIndex, Ln as fail$4, Lo as toJson, Lr as interrupt$1, Lt as scope, M as exit, Ma as getOrUndefinedUnsafe, Mi as Array$1, Mn as TimeoutError, Mo as getStackTraceLimit, Mr as isDoneUnsafe, Ms as pipe, Mt as retry, N as fail$2, Na as getUnsafe, Nn as UnknownError$1, No as setStackTraceLimit, Nr as makeUnsafe$2, Nt as runFork, Oa as empty$7, On as Done, Or as doneUnsafe, Os as flow, Ot as raceFirst, P as failCause, Pa as make$42, Pi as appendAll, Pn as annotate$1, Po as BaseProto, Pr as die$1, Pt as runForkWith, Q as interrupt, Qa as isSome, Qn as pretty, Qt as undefined_, R as flatMapEager, Ra as exists, Ri as findLast, Rn as filterInterruptors, Ro as format, Rt as scoped, S as catchTag, Sa as toMillis, So as PipeInspectableProto, Sr as provide$2, Ss as constFalse, St as orDie, T as clockWith, Ta as Reference, Ts as constVoid, Tt as provide$1, U as forEach$2, Ui as isCanonicalArrayIndex, Un as interruptors, Uo as redact$1, Ut as succeedNone, V as fnUntraced, Va as flatMapNullishOr, Vi as headNonEmpty, Vn as hasInterrupts, Vr as succeed$3, Vt as sleep, W as forever, Wa as fromNullishOr, Wi as isReadonlyArrayNonEmpty, Wo as symbolRedactable, Wr as ConsoleRef, Wt as suspend, X as gen, Xa as isNone, Xi as of, Xo as hash, Xt as tryPromise, Y as fromResult, Ya as getOrUndefined, Yi as match$3, Yt as timeoutOrElse, Z as ignore, Zi as reduce, Zt as try_, _ as catchEager, _a as millis, _n as jittered, _r as addFinalizerExit, _s as isString, _t as onError, a as andThen, aa as isFailure, ao as some, ar as fresh, at as logWarning, bn as spaced, bt as onInterrupt, c as as, cr as mock, cs as isNotNull, ct as mapBothEager, d as cached, da as format$1, di as forkUnsafe, dn as yieldNow, dr as provideMerge, ds as isNull, ea as headUnsafe, en as uninterruptibleMask, eo as map$8, er as buildWithScope, es as symbol$2, et as isEffect, f as cachedWithTTL, fa as fromInputUnsafe$1, fn as zipWith, fr as succeed$4, fs as isNullish, ft as match$4, g as catchDefect, gn as isSchedule, gr as addFinalizer$1, gt as never, h as catchCauseIf, ha as isFinite, hn as exponential, hr as Scope, ht as matchEffect, i as all$1, ia as getOrUndefined$2, in as void_, io as orElseSome, ir as empty$9, it as logInfo, j as ensuring, ja as getOrUndefined$1, ji as ParentSpan, jn as StackTrace, jo as assignProperty, jr as isDone, jt as result, k as die, ka as get$3, ko as withFiber$1, ks as identity, kt as repeat, l as asSome, la as succeed$1, ln as withParentSpan, lr as orDie$1, ls as isNotNullish, lt as mapEager, m as catchCause, mn as TaggedClass, mr as unwrap$1, ms as isObject, mt as matchCauseEffect, na as failVoid, nn as updateService, no as none, nr as effectContext, nt as logError, o as annotateCurrentSpan, oa as isSuccess$1, on as whileLoop, oo as toArray, or as merge$3, os as isIterable, ot as makeSpanScoped, p as callback, pa as infinity, pr as succeedContext, q as forkScoped, qa as getOrNull, qn as isTimeoutError, qo as symbol$1, qt as tapCause, r as addFinalizer, rn as useSpan, ro as orElse$1, rt as logFatal, s as annotateLogs, sa as map$6, sn as withFiber, sr as mergeAll, st as map$5, t as acquireRelease, ta as fail$1, tn as updateContext, to as match$2, tr as effect, ts as hasProperty, tt as logDebug, u as asVoid, ua as try_$1, un as withSpan$1, ur as provide$3, us as isNotUndefined, ut as mapError, v as catchFilter, va as minutes, vn as min, vo as strictEqual, vr as close, vs as isTagged, vt as onExit, w as catch_, wa as zero, wr as MinimumLogLevel, ws as constUndefined, wt as promise, x as catchReason, xa as seconds, xn as catchDone, xr as makeUnsafe$1, xs as or, xt as option$1, y as catchIf, yn as passthrough, yo as Prototype, ys as isUndefined, za as filter$1, zr as isFailure$1 } from "./Effect-BEUn4I5E.mjs";
3
+ import { $ as tap$1, A as mapArrayEffect, At as await_, B as provideService$1, Bt as parse$1, Ct as take, D as isStream, Dt as set$2, E as fromReadableStream, Et as make$43, F as mkString, G as runForEach, H as runCollect, Ht as normalizeNonEmpty, I as onEnd, It as join$2, J as splitLines, K as runForEachArray, L as orDie$2, Lt as runIn, M as mapError$1, Mt as interrupt$2, N as merge$4, Nt as interruptAll, O as map$9, Ot as update, P as mergeAll$1, Pt as interruptAllAs, Q as takeUntil, R as pipeThroughChannel, Rt as camelToSnake, S as fromIterable$2, St as shutdownUnsafe, T as fromQueue, V as run$4, Vt as round, W as runFold, X as suspend$1, Y as succeed$5, Z as take$1, _ as flattenIterable, _t as offer, a as catchTags$1, at as pipeTo, b as fromChannel$1, bt as offerUnsafe, c as die$2, ct as make$45, d as ensuring$1, dt as end, et as transduce, f as fail$5, ft as endUnsafe, g as flatMap$3, gt as make$44, h as filterMap, ht as failCauseUnsafe, i as catchReason$1, it as mapDone, j as mapEffect$1, jt as getCurrent, k as mapArray, kt as makeUnsafe$4, l as drop, lt as makeUnsafe$5, m as filter$2, mt as failCause$2, n as callback$1, nt as fromTransform$1, o as catch_$1, ot as toTransform, p as failCause$3, pt as fail$6, rt as map$10, s as decodeText, st as unwrap$2, t as broadcast, tt as unwrap$3, u as empty$10, ut as bounded, vt as offerAll, w as fromPull, wt as unbounded, x as fromEffect, xt as poll, yt as offerAllUnsafe, z as provideContext$1, zt as toLowerCase } from "./Stream-Cu6P7ZHo.mjs";
4
+ import { $ as declare, $n as map$11, $t as Union$1, An as toString, At as tag, B as TaggedUnion, Bn as isRedacted, Bt as omit, C as Never, Ct as isSchemaError, D as NullOr, Dn as empty$11, Dt as mutable, E as Null, En as Pointer, Et as makeFilterGroup, F as String$5, Fn as formatIso, Ft as toType, G as Uint8Array$2, Gt as encodeEffect, H as Tuple, Hn as value, Ht as _is, I as Struct, It as withConstructorDefault, J as Union, Jn as TaggedClass$1, Jt as FilterGroup, K as Uint8ArrayFromBase64, Kn as EncodingError, Kt as Arrays, L as StructWithRest, Ln as fromDateUnsafe, Lt as withDecodingDefault, M as Record, Mn as fromSetCookie, Mt as toCodecStringTree, N as Redacted$1, Nn as decode$4, Nt as toEncoded$1, O as Number$2, On as fromInput$1, Ot as optional$2, P as SchemaError, Pn as encode, Pt as toJsonSchemaDocument, Q as check, Qn as makeEquivalence, Qt as Suspend, R as TaggedClass$2, Rt as withDecodingDefaultKey, Sn as passthrough$1, St as isSchema, T as NonEmptyString$1, Tn as InvalidValue$1, Tt as makeFilter, U as URL$1, Un as stringOrRedacted, Ut as decodeEffect$1, V as TrueLiterals, Vn as make$46, Vt as getReferenceKey, W as URLFromString, Wn as Clock, Wt as decodeUnknownEffect, X as Void, Xn as taggedEnum, Xt as Objects, Y as Unknown, Yn as TaggedError, Yt as Literal$1, Zn as assignProperty$1, Zt as PropertySignature, _ as Int$1, _n as transform$3, _t as isMaxLength, a as BooleanLiterals, an as null_, at as decodeUnknownSync, b as Literals$2, bt as isPattern, cn as resolveAt, ct as encodeUnknownEffect, d as Defect, dn as string, dt as is, en as applyToSelfOrLastLinkEncoding, et as decodeEffect, f as Duration, fn as toEncoded, ft as isFinite$1, g as Finite, gn as passthrough$2, gt as isLessThanOrEqualTo, h as FalseLiterals, hn as Transformation, ht as isInt, in as mapOrSame, it as decodeUnknownOption, j as OptionFromOptional, jn as empty$12, jt as toCodecJson, k as Option, kn as setAll$1, kt as optionalKey, ln as resolveDescription, lt as fromJsonString, m as Exit, mn as unknown, mt as isGreaterThanOrEqualTo, n as ArraySchema, nn as isNever, nt as decodeTo$1, o as Class$1, on as optionalKey$1, ot as encodeEffect$1, p as Error$3, pn as toType$1, pt as isGreaterThan, q as UndefinedOr, qn as Error$2, qt as Filter, r as Boolean$4, rn as isOptional, rt as decodeUnknownEffect$1, s as DateTimeUtc, sn as replaceChecks, st as encodeTo, t as Any, tn as decodeTo, tt as decodeSync, u as DateTimeUtcFromString, un as resolveIdentifier, v as Json, vn as transformEffect$1, vt as isMaxProperties, w as NonEmptyArray, wn as transformEffect, wt as make$47, x as MutableJson, xt as isPropertyNames, y as Literal, yn as transformOptional, yt as isMinLength, z as TaggedError$1 } from "./Schema-CjUGw2Xh.mjs";
5
5
  import * as Http from "node:http";
6
6
  import * as Https from "node:https";
7
7
  import { PassThrough, Readable, Writable } from "node:stream";
@@ -42,7 +42,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
42
42
  enumerable: true
43
43
  }) : target, mod));
44
44
  //#endregion
45
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Filter.js
45
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Filter.js
46
46
  const toPredicate = (self) => (input) => !isFailure(self(input));
47
47
  const has = (key) => (input) => input.has(key) ? succeed$1(input) : fail$1(input);
48
48
  const compose = dual(2, (left, right) => (input) => {
@@ -51,14 +51,14 @@ const compose = dual(2, (left, right) => (input) => {
51
51
  return right(leftOut.success);
52
52
  });
53
53
  //#endregion
54
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/BigInt.js
54
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/BigInt.js
55
55
  const BigInt$1 = globalThis.BigInt;
56
56
  const toNumber = (b) => {
57
57
  if (b > BigInt$1(Number.MAX_SAFE_INTEGER) || b < BigInt$1(Number.MIN_SAFE_INTEGER)) return none();
58
58
  return some(Number(b));
59
59
  };
60
60
  //#endregion
61
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ByteSize.js
61
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ByteSize.js
62
62
  const bigint0 = BigInt(0);
63
63
  const bigint1 = BigInt(1);
64
64
  const decimalBase = BigInt(1e3);
@@ -272,7 +272,7 @@ const fromInputUnsafe = (input) => {
272
272
  };
273
273
  const bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
274
274
  //#endregion
275
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/PlatformError.js
275
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/PlatformError.js
276
276
  const TypeId$34 = "~effect/PlatformError";
277
277
  var BadArgument = class extends TaggedError("BadArgument") {
278
278
  get message() {
@@ -300,7 +300,7 @@ var PlatformError = class extends TaggedError("PlatformError") {
300
300
  const systemError = (options) => new PlatformError(new SystemError(options));
301
301
  const badArgument = (options) => new PlatformError(new BadArgument(options));
302
302
  //#endregion
303
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Sink.js
303
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Sink.js
304
304
  const TypeId$33 = "~effect/Sink";
305
305
  const endVoid = succeed$2([void 0]);
306
306
  const sinkVariance = {
@@ -338,7 +338,7 @@ const forEach$1 = (f) => forEachArray(forEach$2((_) => f(_), { discard: true }))
338
338
  const forEachArray = (f) => fromTransform((upstream) => upstream.pipe(flatMap$1(f), forever({ disableYield: true }), catchDone(() => endVoid)));
339
339
  const unwrap = (effect) => fromChannel(unwrap$2(map$5(effect, toChannel)));
340
340
  //#endregion
341
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/MutableHashMap.js
341
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/MutableHashMap.js
342
342
  const TypeId$32 = "~effect/MutableHashMap";
343
343
  const MutableHashMapProto = {
344
344
  [TypeId$32]: TypeId$32,
@@ -376,19 +376,15 @@ const fromIterable = (entries) => {
376
376
  const get$2 = dual(2, (self, key) => {
377
377
  if (self.backing.has(key)) return some(self.backing.get(key));
378
378
  else if (isSimpleKey(key)) return none();
379
- const refKey = referentialKeysCache.get(key);
380
- if (refKey !== void 0 && self.backing.has(refKey)) return some(self.backing.get(refKey));
381
- const hash$1 = hash(key);
382
- const bucket = self.buckets.get(hash$1);
379
+ const hash$2 = hash(key);
380
+ const bucket = self.buckets.get(hash$2);
383
381
  if (bucket === void 0) return none();
384
382
  return getFromBucket(self, bucket, key);
385
383
  });
386
- const referentialKeysCache = new WeakMap();
387
384
  const isSimpleKey = (u) => typeof u !== "object" && typeof u !== "function";
388
385
  const getFromBucket = (self, bucket, key) => {
389
386
  for (let i = 0, len = bucket.length; i < len; i++) if (equals(key, bucket[i])) {
390
387
  const refKey = bucket[i];
391
- referentialKeysCache.set(key, refKey);
392
388
  return some(self.backing.get(refKey));
393
389
  }
394
390
  return none();
@@ -398,19 +394,14 @@ const set$1 = dual(3, (self, key, value) => {
398
394
  self.backing.set(key, value);
399
395
  return self;
400
396
  }
401
- let refKey = referentialKeysCache.get(key);
402
- if (refKey !== void 0 && self.backing.has(refKey)) {
403
- self.backing.set(refKey, value);
404
- return self;
405
- }
406
- const hash$2 = hash(key);
407
- const bucket = self.buckets.get(hash$2);
397
+ const hash$4 = hash(key);
398
+ const bucket = self.buckets.get(hash$4);
408
399
  if (bucket === void 0) {
409
- self.buckets.set(hash$2, [key]);
400
+ self.buckets.set(hash$4, [key]);
410
401
  self.backing.set(key, value);
411
402
  return self;
412
403
  }
413
- refKey = getRefKey(bucket, key);
404
+ let refKey = getRefKey(bucket, key);
414
405
  if (refKey === void 0) {
415
406
  bucket.push(key);
416
407
  refKey = key;
@@ -419,29 +410,25 @@ const set$1 = dual(3, (self, key, value) => {
419
410
  return self;
420
411
  });
421
412
  const getRefKey = (bucket, key) => {
422
- for (let i = 0, len = bucket.length; i < len; i++) if (equals(key, bucket[i])) {
423
- referentialKeysCache.set(key, bucket[i]);
424
- return bucket[i];
425
- }
413
+ for (let i = 0, len = bucket.length; i < len; i++) if (equals(key, bucket[i])) return bucket[i];
426
414
  };
427
415
  const remove$2 = dual(2, (self, key_) => {
428
416
  if (isSimpleKey(key_)) {
429
417
  self.backing.delete(key_);
430
418
  return self;
431
419
  }
432
- const key = referentialKeysCache.get(key_) ?? key_;
433
- const hash$4 = hash(key);
434
- const bucket = self.buckets.get(hash$4);
420
+ const hash$1 = hash(key_);
421
+ const bucket = self.buckets.get(hash$1);
435
422
  if (bucket === void 0) return self;
436
423
  for (let i = 0, len = bucket.length; i < len; i++) {
437
424
  const bkey = bucket[i];
438
- if (bkey === key || equals(key, bkey)) {
425
+ if (bkey === key_ || equals(key_, bkey)) {
439
426
  self.backing.delete(bkey);
440
427
  bucket.splice(i, 1);
441
428
  break;
442
429
  }
443
430
  }
444
- if (bucket.length === 0) self.buckets.delete(hash$4);
431
+ if (bucket.length === 0) self.buckets.delete(hash$1);
445
432
  return self;
446
433
  });
447
434
  const size = (self) => self.backing.size;
@@ -450,7 +437,7 @@ const forEach = dual(2, (self, f) => {
450
437
  self.backing.forEach(f);
451
438
  });
452
439
  //#endregion
453
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/rcRef.js
440
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/rcRef.js
454
441
  const TypeId$31 = "~effect/RcRef";
455
442
  const stateEmpty = { _tag: "Empty" };
456
443
  const stateClosed = { _tag: "Closed" };
@@ -464,7 +451,6 @@ var RcRefImpl = class {
464
451
  return pipeArguments(this, arguments);
465
452
  }
466
453
  state = stateEmpty;
467
- semaphore = makeUnsafe$4(1);
468
454
  acquire;
469
455
  context;
470
456
  scope;
@@ -481,9 +467,11 @@ const make$39 = (options) => withFiber((fiber) => {
481
467
  const scope = get$3(context, Scope);
482
468
  const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== void 0 ? fromInputUnsafe$1(options.idleTimeToLive) : void 0);
483
469
  return as(addFinalizerExit(scope, () => {
484
- const close$1 = ref.state._tag === "Acquired" ? close(ref.state.scope, void_$1) : void_;
470
+ const state = ref.state;
485
471
  ref.state = stateClosed;
486
- return close$1;
472
+ if (state._tag === "Acquired") return close(state.scope, void_$1);
473
+ if (state._tag === "Acquiring") return interrupt$2(state.fiber);
474
+ return void_;
487
475
  }), ref);
488
476
  });
489
477
  const getState = (self, restore) => {
@@ -494,25 +482,50 @@ const getState = (self, restore) => {
494
482
  state.refCount++;
495
483
  return state.fiber ? as(interrupt$2(state.fiber), state) : succeed$2(state);
496
484
  }
497
- case "Empty": return self.semaphore.withPermit(suspend(() => {
498
- if (self.state._tag !== "Empty") return getState(self, restore);
485
+ case "Acquiring": {
486
+ const state = self.state;
487
+ state.awaiters++;
488
+ return awaitAcquiring(self, state, restore);
489
+ }
490
+ case "Empty": {
491
+ const acquiring = {
492
+ _tag: "Acquiring",
493
+ fiber: void 0,
494
+ awaiters: 1,
495
+ acquired: void 0
496
+ };
497
+ self.state = acquiring;
499
498
  const scope = makeUnsafe$1();
500
- return restore(provideContext(self.acquire, add(self.context, Scope, scope))).pipe(flatMap$1((value) => {
501
- if (self.state._tag === "Closed") return interrupt;
499
+ const acquire = provideContext(self.acquire, add(self.context, Scope, scope)).pipe(flatMap$1((value) => {
500
+ if (self.state !== acquiring) return interrupt;
502
501
  const state = {
503
502
  _tag: "Acquired",
504
503
  value,
505
504
  scope,
506
505
  fiber: void 0,
507
- refCount: 1,
506
+ refCount: acquiring.awaiters,
508
507
  invalidated: false
509
508
  };
510
509
  self.state = state;
510
+ acquiring.acquired = state;
511
511
  return succeed$2(state);
512
- }), onExit((exit) => isFailure$1(exit) ? close(scope, exit) : void_));
513
- }));
512
+ }), onExit((exit) => {
513
+ if (isSuccess(exit)) return void_;
514
+ if (self.state === acquiring) self.state = stateEmpty;
515
+ return close(scope, exit);
516
+ }));
517
+ acquiring.fiber = runForkWith(getCurrent().context)(acquire);
518
+ return awaitAcquiring(self, acquiring, restore);
519
+ }
514
520
  }
515
521
  };
522
+ const awaitAcquiring = (self, acquiring, restore) => onExit(restore(join$2(acquiring.fiber)), (exit) => {
523
+ const acquired = acquiring.acquired;
524
+ if (acquired !== void 0) return isFailure$1(exit) ? release(self, acquired) : void_;
525
+ if (--acquiring.awaiters > 0 || self.state !== acquiring) return void_;
526
+ self.state = stateEmpty;
527
+ return interrupt$2(acquiring.fiber);
528
+ });
516
529
  const get$1 = (self_) => {
517
530
  const self = self_;
518
531
  return uninterruptibleMask((restore) => flatMap$1(scope, (scope) => flatMap$1(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
@@ -549,12 +562,12 @@ const invalidate$1 = (self_) => {
549
562
  }));
550
563
  };
551
564
  //#endregion
552
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/RcRef.js
565
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/RcRef.js
553
566
  const make$38 = make$39;
554
567
  const get = get$1;
555
568
  const invalidate = invalidate$1;
556
569
  //#endregion
557
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/FileSystem.js
570
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/FileSystem.js
558
571
  const TypeId$30 = "~effect/FileSystem";
559
572
  const FileSystem = Service("effect/FileSystem");
560
573
  const make$37 = (impl) => FileSystem.of({
@@ -606,11 +619,11 @@ const make$37 = (impl) => FileSystem.of({
606
619
  const FileTypeId = "~effect/FileSystem/File";
607
620
  var WatchBackend = class extends Service()("effect/FileSystem/WatchBackend") {};
608
621
  //#endregion
609
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Path.js
622
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Path.js
610
623
  const TypeId$29 = "~effect/Path";
611
624
  const Path$3 = Service("effect/Path");
612
625
  //#endregion
613
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/Headers.js
626
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/Headers.js
614
627
  const TypeId$28 = Symbol.for("~effect/http/Headers");
615
628
  const Proto$15 = Object.defineProperties(Object.create(null), {
616
629
  [TypeId$28]: { value: TypeId$28 },
@@ -692,7 +705,7 @@ const CurrentRedactedNames = Reference("effect/Headers/CurrentRedactedNames", {
692
705
  "x-api-key"
693
706
  ] });
694
707
  //#endregion
695
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/encoding/Base64Url.js
708
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/encoding/Base64Url.js
696
709
  const decode$3 = (str) => {
697
710
  const stripped = str.replace(/[\n\r]/g, "");
698
711
  const length = stripped.length;
@@ -715,7 +728,7 @@ const decode$3 = (str) => {
715
728
  const decodeString = (str) => map$6(decode$3(str), (_) => decoder.decode(_));
716
729
  const decoder = new TextDecoder();
717
730
  //#endregion
718
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Terminal.js
731
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Terminal.js
719
732
  const TypeId$27 = "~effect/Terminal";
720
733
  const QuitErrorTypeId = "~effect/Terminal/QuitError";
721
734
  var QuitError = class extends Error$3("QuitError")({ _tag: tag("QuitError") }) {
@@ -728,7 +741,7 @@ const make$35 = (impl) => Terminal.of({
728
741
  [TypeId$27]: TypeId$27
729
742
  });
730
743
  //#endregion
731
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/ansi.js
744
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/ansi.js
732
745
  const ESC = "\x1B[";
733
746
  const BEL = "\x07";
734
747
  const SEP = ";";
@@ -776,7 +789,7 @@ const eraseLines = (rows) => {
776
789
  return command;
777
790
  };
778
791
  //#endregion
779
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/Prompt.js
792
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/Prompt.js
780
793
  const TypeId$26 = "~effect/cli/Prompt";
781
794
  const isPrompt$1 = (u) => hasProperty(u, TypeId$26);
782
795
  const defaultTheme = {
@@ -2072,7 +2085,7 @@ const entriesToDisplay = (cursor, total, maxVisible) => {
2072
2085
  };
2073
2086
  };
2074
2087
  //#endregion
2075
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpBody.js
2088
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpBody.js
2076
2089
  const TypeId$25 = "~effect/http/HttpBody";
2077
2090
  var Proto$14 = class {
2078
2091
  [TypeId$25];
@@ -2134,7 +2147,7 @@ const text = (body, contentType) => {
2134
2147
  const jsonUnsafe = (body, contentType) => text(JSON.stringify(body), contentType ?? "application/json");
2135
2148
  const urlParams = (urlParams, contentType) => text(toString(fromInput$1(urlParams)), contentType ?? "application/x-www-form-urlencoded");
2136
2149
  //#endregion
2137
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpClientError.js
2150
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpClientError.js
2138
2151
  const TypeId$24 = "~effect/http/HttpClientError";
2139
2152
  const isHttpClientError = (u) => hasProperty(u, TypeId$24);
2140
2153
  var HttpClientError = class extends TaggedError("HttpClientError") {
@@ -2210,7 +2223,7 @@ var EmptyBodyError = class extends TaggedError("EmptyBodyError") {
2210
2223
  }
2211
2224
  };
2212
2225
  //#endregion
2213
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpMethod.js
2226
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpMethod.js
2214
2227
  const allShort = [
2215
2228
  ["GET", "get"],
2216
2229
  ["POST", "post"],
@@ -2223,14 +2236,14 @@ const allShort = [
2223
2236
  ["QUERY", "query"]
2224
2237
  ];
2225
2238
  //#endregion
2226
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/internal/httpBody.js
2239
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/internal/httpBody.js
2227
2240
  const updateHeaders$1 = (headers, body) => {
2228
2241
  if (body._tag === "Empty" || body._tag === "FormData") return remove$1(remove$1(headers, "content-type"), "content-length");
2229
2242
  headers = body.contentType === void 0 ? remove$1(headers, "content-type") : set(headers, "content-type", body.contentType);
2230
2243
  return body.contentLength === void 0 ? remove$1(headers, "content-length") : set(headers, "content-length", body.contentLength.toString());
2231
2244
  };
2232
2245
  //#endregion
2233
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/Url.js
2246
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/Url.js
2234
2247
  var UrlError = class extends TaggedError("UrlError") {};
2235
2248
  const make$34 = (url, params, hash) => try_$1({
2236
2249
  try: () => {
@@ -2248,7 +2261,7 @@ const baseUrl = () => {
2248
2261
  if ("location" in globalThis && globalThis.location !== void 0 && globalThis.location.origin !== void 0 && globalThis.location.pathname !== void 0) return location.origin + location.pathname;
2249
2262
  };
2250
2263
  //#endregion
2251
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpClientRequest.js
2264
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpClientRequest.js
2252
2265
  const TypeId$23 = "~effect/http/HttpClientRequest";
2253
2266
  const Proto$13 = {
2254
2267
  [TypeId$23]: TypeId$23,
@@ -2332,11 +2345,11 @@ const bodyJsonUnsafe = dual(2, (self, body) => setBody(self, jsonUnsafe(body)));
2332
2345
  const bodyUrlParams = dual(2, (self, input) => setBody(self, urlParams(fromInput$1(input))));
2333
2346
  function toUrl(self) {
2334
2347
  const r = make$34(self.url, self.urlParams, getOrUndefined(self.hash));
2335
- if (isSuccess(r)) return some(r.success);
2348
+ if (isSuccess$1(r)) return some(r.success);
2336
2349
  return none();
2337
2350
  }
2338
2351
  //#endregion
2339
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpIncomingMessage.js
2352
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpIncomingMessage.js
2340
2353
  const TypeId$22 = "~effect/http/HttpIncomingMessage";
2341
2354
  const schemaBodyJson = (schema, options) => {
2342
2355
  const decode = decodeEffect(toCodecJson(schema));
@@ -2362,7 +2375,7 @@ const inspect = (self, that) => {
2362
2375
  return obj;
2363
2376
  };
2364
2377
  //#endregion
2365
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpClientResponse.js
2378
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpClientResponse.js
2366
2379
  const TypeId$21 = "~effect/http/HttpClientResponse";
2367
2380
  const fromWeb = (request, source) => new WebHttpClientResponse(request, source);
2368
2381
  const filterStatusOk$1 = (self) => self.status >= 200 && self.status < 300 ? succeed$2(self) : fail$2(new HttpClientError({ reason: new StatusCodeError({
@@ -2477,7 +2490,7 @@ var WebHttpClientResponse = class extends Class {
2477
2490
  }
2478
2491
  };
2479
2492
  //#endregion
2480
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpTraceContext.js
2493
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpTraceContext.js
2481
2494
  const toHeaders = (span) => fromRecordUnsafe({
2482
2495
  b3: `${span.traceId}-${span.spanId}-${span.sampled ? "1" : "0"}${match$2(span.parent, {
2483
2496
  onNone: () => "",
@@ -2486,7 +2499,7 @@ const toHeaders = (span) => fromRecordUnsafe({
2486
2499
  traceparent: `00-${span.traceId}-${span.spanId}-${span.sampled ? "01" : "00"}`
2487
2500
  });
2488
2501
  //#endregion
2489
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/http/HttpClient.js
2502
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/http/HttpClient.js
2490
2503
  const TypeId$20 = "~effect/http/HttpClient";
2491
2504
  const isHttpClient = (u) => hasProperty(u, TypeId$20);
2492
2505
  const HttpClient = Service("effect/HttpClient");
@@ -2725,7 +2738,7 @@ const isTransientError = (error) => isTimeoutError(error) || isTransientHttpErro
2725
2738
  const isTransientHttpError = (error) => isHttpClientError(error) && (error.reason._tag === "TransportError" || error.reason._tag === "StatusCodeError" && isTransientResponse(error.reason.response));
2726
2739
  const isTransientResponse = (response) => response.status === 408 || response.status === 429 || response.status === 500 || response.status === 502 || response.status === 503 || response.status === 504;
2727
2740
  //#endregion
2728
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeSink.js
2741
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeSink.js
2729
2742
  const fromWritable = (options) => fromChannel(mapDone(fromWritableChannel(options), (_) => [_]));
2730
2743
  const fromWritableChannel = (options) => fromTransform$1((pull) => {
2731
2744
  const writable = options.evaluate();
@@ -2773,7 +2786,7 @@ const pullIntoWritable = (options) => options.pull.pipe(flatMap$1((chunk) => {
2773
2786
  });
2774
2787
  })));
2775
2788
  //#endregion
2776
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeStream.js
2789
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeStream.js
2777
2790
  const fromReadable = (options) => fromChannel$1(fromReadableChannel(options));
2778
2791
  const fromReadableChannel = (options) => fromTransform$1((_, scope) => readableToPullUnsafe({
2779
2792
  scope,
@@ -2815,7 +2828,7 @@ const readableToPullUnsafe = (options) => {
2815
2828
  const readable = options.readable;
2816
2829
  const closeOnDone = options.closeOnDone ?? true;
2817
2830
  const exit = options.exit ?? make$43(void 0);
2818
- const latch = options.latch ?? makeUnsafe$5(false);
2831
+ const latch = options.latch ?? makeUnsafe$4(false);
2819
2832
  function onReadable() {
2820
2833
  latch.openUnsafe();
2821
2834
  }
@@ -2856,7 +2869,7 @@ const readableToPullUnsafe = (options) => {
2856
2869
  const defaultOnError = (error) => new UnknownError$1(error);
2857
2870
  const toMaxBytes = (maxBytes) => maxBytes === void 0 || maxBytes === Infinity ? void 0 : Number(fromInputUnsafe(maxBytes));
2858
2871
  //#endregion
2859
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeHttpIncomingMessage.js
2872
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeHttpIncomingMessage.js
2860
2873
  var NodeHttpIncomingMessage = class extends Class {
2861
2874
  [TypeId$22];
2862
2875
  source;
@@ -2917,7 +2930,7 @@ var NodeHttpIncomingMessage = class extends Class {
2917
2930
  }
2918
2931
  };
2919
2932
  //#endregion
2920
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeHttpClient.js
2933
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeHttpClient.js
2921
2934
  function noopErrorHandler(_) {}
2922
2935
  var UndiciResponse = class extends Class {
2923
2936
  [TypeId$22];
@@ -3164,7 +3177,7 @@ var NodeHttpResponse = class extends NodeHttpIncomingMessage {
3164
3177
  };
3165
3178
  const layerNodeHttpNoAgent = layerMergedContext(makeNodeHttp);
3166
3179
  //#endregion
3167
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Console.js
3180
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Console.js
3168
3181
  const Console = ConsoleRef;
3169
3182
  const consoleWith = (f) => withFiber$1((fiber) => f(fiber.getRef(Console)));
3170
3183
  const error = (...args) => consoleWith((console) => sync$1(() => {
@@ -3174,9 +3187,9 @@ const log = (...args) => consoleWith((console) => sync$1(() => {
3174
3187
  console.log(...args);
3175
3188
  }));
3176
3189
  //#endregion
3177
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Runtime.js
3190
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Runtime.js
3178
3191
  const defaultTeardown = (exit, onExit) => {
3179
- if (isSuccess$1(exit)) return onExit(0);
3192
+ if (isSuccess(exit)) return onExit(0);
3180
3193
  if (hasInterruptsOnly(exit.cause)) return onExit(130);
3181
3194
  return onExit(getErrorExitCode(squash(exit.cause)));
3182
3195
  };
@@ -3213,7 +3226,7 @@ const getErrorReported = (u) => {
3213
3226
  return true;
3214
3227
  };
3215
3228
  //#endregion
3216
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Stdio.js
3229
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Stdio.js
3217
3230
  const TypeId$19 = "~effect/Stdio";
3218
3231
  const Stdio = Service(TypeId$19);
3219
3232
  const make$31 = (options) => ({
@@ -3223,7 +3236,7 @@ const make$31 = (options) => ({
3223
3236
  ...options
3224
3237
  });
3225
3238
  //#endregion
3226
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/CliOutput.js
3239
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/CliOutput.js
3227
3240
  const Formatter = Reference("effect/cli/CliOutput", { defaultValue: () => defaultFormatter() });
3228
3241
  const escapeControlCharacters = (text) => text.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, (character) => `\\x${character.charCodeAt(0).toString(16).padStart(2, "0")}`);
3229
3242
  const defaultFormatter = (options) => {
@@ -3398,7 +3411,7 @@ const formatHelpDocImpl = (doc, colors) => {
3398
3411
  return sections.join("\n");
3399
3412
  };
3400
3413
  //#endregion
3401
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/completions/bash.js
3414
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/completions/bash.js
3402
3415
  const escapeForBash = (s) => s.replace(/'/g, "'\\''");
3403
3416
  const sanitizeFunctionName = (s) => s.replace(/[^a-zA-Z0-9_]/g, "_");
3404
3417
  const flagNamesForWordlist = (flag) => {
@@ -3657,7 +3670,7 @@ const generate$3 = (executableName, descriptor) => {
3657
3670
  return lines.join("\n");
3658
3671
  };
3659
3672
  //#endregion
3660
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/completions/fish.js
3673
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/completions/fish.js
3661
3674
  const escapeFishString = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
3662
3675
  const escapeFishChoice = (s) => escapeFishString(s.replace(/[^A-Za-z0-9_.,/@%+-]/gu, "\\$&"));
3663
3676
  const subcommandCondition = (parentPath, childSubcommandNames) => {
@@ -3790,7 +3803,7 @@ const generate$2 = (executableName, descriptor) => {
3790
3803
  return lines.join("\n");
3791
3804
  };
3792
3805
  //#endregion
3793
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/completions/zsh.js
3806
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/completions/zsh.js
3794
3807
  const escapeZsh = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "'\\''").replace(/:/g, "\\:");
3795
3808
  const escapeZshChoice = (s) => s.replace(/[^A-Za-z0-9_.,/@%+-]/gu, "\\$&").replace(/'/g, "'\\''");
3796
3809
  const sanitize = (s) => s.replace(/[^a-zA-Z0-9_]/g, "_");
@@ -3926,7 +3939,7 @@ const generate$1 = (executableName, descriptor) => {
3926
3939
  return lines.join("\n");
3927
3940
  };
3928
3941
  //#endregion
3929
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/Completions.js
3942
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/Completions.js
3930
3943
  const generate = (executableName, shell, descriptor) => {
3931
3944
  switch (shell) {
3932
3945
  case "bash": return generate$3(executableName, descriptor);
@@ -3935,7 +3948,7 @@ const generate = (executableName, shell, descriptor) => {
3935
3948
  }
3936
3949
  };
3937
3950
  //#endregion
3938
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ConfigProvider.js
3951
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ConfigProvider.js
3939
3952
  function makeValue(value) {
3940
3953
  return {
3941
3954
  _tag: "Value",
@@ -3971,7 +3984,7 @@ function makeProvider(load, mapInput) {
3971
3984
  return self;
3972
3985
  }
3973
3986
  function makeSource(get, transform) {
3974
- return makeProvider((path) => get(transform(path)), (f) => makeSource(get, flow(transform, f)));
3987
+ return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
3975
3988
  }
3976
3989
  function make$30(get) {
3977
3990
  return makeSource(get, identityPath);
@@ -4022,7 +4035,7 @@ function trieNodeAt(root, path) {
4022
4035
  return node;
4023
4036
  }
4024
4037
  //#endregion
4025
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Config.js
4038
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Config.js
4026
4039
  const TypeId$18 = "~effect/Config";
4027
4040
  var ConfigError = class {
4028
4041
  _tag = "ConfigError";
@@ -4053,42 +4066,24 @@ const Proto$10 = {
4053
4066
  function make$29(evaluator) {
4054
4067
  const self = Object.create(Proto$10);
4055
4068
  self.evaluator = evaluator;
4056
- self.parse = (provider) => evaluator(provider, []).pipe(mapErrorEager((failure) => failure.error), flatMapEager((resolution) => resolution._tag === "Resolved" ? succeed$2(resolution.value) : fail$2(resolution.error)));
4069
+ self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
4057
4070
  return self;
4058
4071
  }
4059
4072
  const evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
4060
- const resolved = (value, hasInput) => ({
4061
- _tag: "Resolved",
4062
- value,
4063
- hasInput
4064
- });
4065
- const absent = (error) => ({
4066
- _tag: "Absent",
4067
- error
4068
- });
4069
- const evaluationFailure = (error, hasInput) => ({
4070
- error,
4071
- hasInput
4072
- });
4073
- const isSourceError = (u) => isTagged(u, "SourceError");
4074
- const catchSourceError = (self, hasInput) => self.pipe(catchDefect((defect) => isSourceError(defect) ? fail$2(evaluationFailure(new ConfigError(defect), hasInput)) : die(defect)));
4075
- const preserveInputEvidence = (self, hasInput) => {
4076
- if (!hasInput) return self;
4077
- return self.pipe(mapErrorEager((failure) => evaluationFailure(failure.error, true)), flatMapEager((resolution) => resolution._tag === "Resolved" ? succeed$2(resolved(resolution.value, true)) : fail$2(evaluationFailure(resolution.error, true))));
4078
- };
4079
4073
  const map$3 = dual(2, (self, f) => {
4080
- return make$29((provider, pathPrefix) => map$5(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
4074
+ return make$29((provider, pathPrefix) => map$5(evaluateAt(self, provider, pathPrefix), map$6(f)));
4081
4075
  });
4082
4076
  const orElse = dual(2, (self, that) => {
4083
4077
  return make$29((provider, pathPrefix) => matchEffect(evaluateAt(self, provider, pathPrefix), {
4084
- onFailure: (failure) => preserveInputEvidence(evaluateAt(that(failure.error), provider, pathPrefix), failure.hasInput),
4085
- onSuccess: (resolution) => resolution._tag === "Absent" ? evaluateAt(that(resolution.error), provider, pathPrefix) : succeed$2(resolution)
4078
+ onFailure: (error) => evaluateAt(that(error), provider, pathPrefix),
4079
+ onSuccess: (resolution) => isFailure(resolution) ? evaluateAt(that(resolution.failure), provider, pathPrefix) : succeed$2(resolution)
4086
4080
  }));
4087
4081
  });
4088
4082
  const withDefault$2 = dual(2, (self, defaultValue) => {
4089
- return make$29((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Absent" ? resolved(defaultValue, false) : resolution));
4083
+ return make$29((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed$1(defaultValue) : resolution));
4090
4084
  });
4091
4085
  const option = (self) => self.pipe(map$3(some), withDefault$2(none()));
4086
+ const isSourceError = (u) => isTagged(u, "SourceError");
4092
4087
  const cursorToString = () => "<configuration>";
4093
4088
  const loadCursor = (provider, path) => provider.load(path).pipe(orDie, mapEager((node) => ({
4094
4089
  provider,
@@ -4097,7 +4092,6 @@ const loadCursor = (provider, path) => provider.load(path).pipe(orDie, mapEager(
4097
4092
  toString: cursorToString
4098
4093
  })));
4099
4094
  const loadChildCursor = (cursor, segment) => loadCursor(cursor.provider, [...cursor.path, segment]);
4100
- const getScalar = (node) => node?.value;
4101
4095
  const decodeFromCursor = (ast, decode) => decodeTo(unknown, ast, new Transformation(transformEffect((input) => decode(input)), passthrough$1()));
4102
4096
  const isScalarInput = (ast) => {
4103
4097
  switch (ast._tag) {
@@ -4114,7 +4108,7 @@ const hasProviderInput = (ast, node) => {
4114
4108
  case "Arrays": return node?._tag === "Array";
4115
4109
  case "Union": return ast.types.some((ast) => hasProviderInput(ast, node));
4116
4110
  case "Suspend": return hasProviderInput(ast.thunk(), node);
4117
- default: return getScalar(node) !== void 0;
4111
+ default: return node?.value !== void 0;
4118
4112
  }
4119
4113
  };
4120
4114
  const toConfigCursorAST = memoize((root) => {
@@ -4152,7 +4146,8 @@ const toConfigCursorAST = memoize((root) => {
4152
4146
  }
4153
4147
  case "Union":
4154
4148
  for (const member of ast.types) recur(member);
4155
- return isScalarInput(ast) ? decodeFromCursor(ast, (cursor) => succeed$2(getScalar(cursor.node))) : ast.recur(recur);
4149
+ if (!isScalarInput(ast)) return ast.recur(recur);
4150
+ break;
4156
4151
  case "Suspend": {
4157
4152
  const target = ast.thunk();
4158
4153
  if (!seen.has(target)) recur(target);
@@ -4160,8 +4155,8 @@ const toConfigCursorAST = memoize((root) => {
4160
4155
  }
4161
4156
  case "Declaration":
4162
4157
  case "Any": throw new globalThis.Error("Config.schema does not support opaque StringTree encodings", { cause: ast });
4163
- default: return decodeFromCursor(ast, (cursor) => succeed$2(getScalar(cursor.node)));
4164
4158
  }
4159
+ return decodeFromCursor(ast, (cursor) => succeed$2(cursor.node?.value));
4165
4160
  });
4166
4161
  return recur(root);
4167
4162
  });
@@ -4172,13 +4167,10 @@ function schema$1(codec, path) {
4172
4167
  const localPath = typeof path === "string" ? [path] : path ?? [];
4173
4168
  return make$29((provider, pathPrefix) => {
4174
4169
  const fullPath = [...pathPrefix, ...localPath];
4175
- return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager((cursor) => {
4176
- const hasInput = hasProviderInput(encodedAst, cursor.node);
4177
- return catchSourceError(decodeCursor(cursor).pipe(mapEager((value) => resolved(value, hasInput)), catchEager((issue) => {
4178
- const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
4179
- return hasInput ? fail$2(evaluationFailure(error, true)) : succeed$2(absent(error));
4180
- })), hasInput);
4181
- }));
4170
+ return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed$1), catchEager((issue) => {
4171
+ const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
4172
+ return hasProviderInput(encodedAst, cursor.node) ? fail$2(error) : succeed$2(fail$1(error));
4173
+ }))), catchDefect((defect) => isSourceError(defect) ? fail$2(new ConfigError(defect)) : die(defect)));
4182
4174
  });
4183
4175
  }
4184
4176
  function NonEmptyString(name) {
@@ -4191,7 +4183,7 @@ function Redacted(name) {
4191
4183
  return schema$1(Redacted$1(String$5), name);
4192
4184
  }
4193
4185
  //#endregion
4194
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/CliError.js
4186
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/CliError.js
4195
4187
  const TypeId$17 = "~effect/cli/CliError";
4196
4188
  const isCliError = (u) => hasProperty(u, TypeId$17);
4197
4189
  var UnrecognizedOption = class extends TaggedError$1(`${TypeId$17}/UnrecognizedOption`)("UnrecognizedOption", {
@@ -4293,7 +4285,7 @@ var ShowHelp = class extends TaggedError$1(`${TypeId$17}/ShowHelp`)("ShowHelp",
4293
4285
  }
4294
4286
  };
4295
4287
  //#endregion
4296
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/encoding/Yaml.js
4288
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/encoding/Yaml.js
4297
4289
  const hasOwn = Object.prototype.hasOwnProperty;
4298
4290
  const setProperty = (record, key, value) => {
4299
4291
  Object.defineProperty(record, key, {
@@ -4742,7 +4734,7 @@ const parse = (input) => {
4742
4734
  return new YamlParser(lines).parse();
4743
4735
  };
4744
4736
  //#endregion
4745
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/Primitive.js
4737
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/Primitive.js
4746
4738
  const Proto$9 = { ["~effect/cli/Primitive"]: { _A: identity } };
4747
4739
  const isTrueLiteral = is(TrueLiterals);
4748
4740
  const isFalseLiteral = is(FalseLiterals);
@@ -4804,7 +4796,7 @@ const getTypeName = (primitive) => {
4804
4796
  const getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
4805
4797
  const getPathType = (primitive) => primitive._tag === "Path" ? primitive.pathType : void 0;
4806
4798
  //#endregion
4807
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/Param.js
4799
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/Param.js
4808
4800
  const TypeId$16 = "~effect/cli/Param";
4809
4801
  const argumentKind = "argument";
4810
4802
  const flagKind = "flag";
@@ -5090,7 +5082,7 @@ const getParamMetadata = (param) => {
5090
5082
  });
5091
5083
  };
5092
5084
  //#endregion
5093
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/Flag.js
5085
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/Flag.js
5094
5086
  const String$1 = (name) => String$2(flagKind, name);
5095
5087
  const Boolean = (name) => Boolean$1(flagKind, name);
5096
5088
  const ChoiceWithValue = (name, choices) => ChoiceWithValue$1(flagKind, name, choices);
@@ -5106,7 +5098,7 @@ const withFallbackPrompt = dual(2, (self, prompt) => withFallbackPrompt$1(self,
5106
5098
  const map$1 = dual(2, (self, f) => map$2(self, f));
5107
5099
  const withSchema = dual(2, (self, schema) => withSchema$1(self, schema));
5108
5100
  //#endregion
5109
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/config.js
5101
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/config.js
5110
5102
  const ConfigInternalTypeId = "~effect/cli/Command/Config/Internal";
5111
5103
  const parseConfig = (config) => {
5112
5104
  const orderedParams = [];
@@ -5158,7 +5150,7 @@ const reconstructTree = (tree, results) => {
5158
5150
  }
5159
5151
  };
5160
5152
  //#endregion
5161
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/command.js
5153
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/command.js
5162
5154
  const TypeId$15 = "~effect/cli/Command";
5163
5155
  const toImpl = (self) => self;
5164
5156
  const Proto$7 = { ...Prototype({
@@ -5317,7 +5309,7 @@ const checkForDuplicateFlags = (parent, subcommands, options) => {
5317
5309
  }
5318
5310
  };
5319
5311
  //#endregion
5320
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/completions/descriptor.js
5312
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/completions/descriptor.js
5321
5313
  const toFlagType = (single) => {
5322
5314
  switch (single.primitiveType._tag) {
5323
5315
  case "Boolean": return { _tag: "Boolean" };
@@ -5418,7 +5410,7 @@ const fromCommand = (cmd, inheritedFlags = []) => {
5418
5410
  };
5419
5411
  };
5420
5412
  //#endregion
5421
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/help.js
5413
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/help.js
5422
5414
  const dedupeGlobalFlags = (flags) => {
5423
5415
  const seen = new Set();
5424
5416
  const deduped = [];
@@ -5504,7 +5496,7 @@ const getHelpForCommandPath = (command, commandPath, builtIns) => gen(function*
5504
5496
  };
5505
5497
  });
5506
5498
  //#endregion
5507
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/GlobalFlag.js
5499
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/GlobalFlag.js
5508
5500
  const Action = (options) => ({
5509
5501
  _tag: "Action",
5510
5502
  flag: options.flag,
@@ -5571,11 +5563,11 @@ const BuiltIns = [
5571
5563
  LogLevel
5572
5564
  ];
5573
5565
  //#endregion
5574
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/CliConfig.js
5566
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/CliConfig.js
5575
5567
  var CliConfig = class extends Reference("effect/cli/CliConfig", { defaultValue: () => defaults }) {};
5576
5568
  const defaults = { builtIns: BuiltIns };
5577
5569
  //#endregion
5578
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/lexer.js
5570
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/lexer.js
5579
5571
  function lex(argv) {
5580
5572
  const endIndex = argv.indexOf("--");
5581
5573
  if (endIndex === -1) return {
@@ -5587,9 +5579,10 @@ function lex(argv) {
5587
5579
  trailingOperands: argv.slice(endIndex + 1)
5588
5580
  };
5589
5581
  }
5582
+ const negativeNumberRegex = /^-(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;
5590
5583
  const lexTokens = (args) => {
5591
5584
  const tokens = [];
5592
- for (const arg of args) if (!arg.startsWith("-")) tokens.push({
5585
+ for (const arg of args) if (!arg.startsWith("-") || negativeNumberRegex.test(arg)) tokens.push({
5593
5586
  _tag: "Value",
5594
5587
  value: arg
5595
5588
  });
@@ -5633,7 +5626,7 @@ const lexTokens = (args) => {
5633
5626
  return tokens;
5634
5627
  };
5635
5628
  //#endregion
5636
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/auto-suggest.js
5629
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/auto-suggest.js
5637
5630
  const levenshtein = (a, b) => {
5638
5631
  const m = a.length;
5639
5632
  const n = b.length;
@@ -5653,7 +5646,7 @@ const suggest = (input, candidates) => {
5653
5646
  return distances.filter(([d]) => d === minDistance).map(([, c]) => c);
5654
5647
  };
5655
5648
  //#endregion
5656
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/parser.js
5649
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/parser.js
5657
5650
  const getCommandPath = (parsedInput) => match$2(parsedInput.subcommand, {
5658
5651
  onNone: () => [],
5659
5652
  onSome: (subcommand) => [subcommand.name, ...getCommandPath(subcommand.parsedInput)]
@@ -6081,7 +6074,7 @@ const scanCommandLevel = (tokens, context) => {
6081
6074
  return toLeafResult(state);
6082
6075
  };
6083
6076
  //#endregion
6084
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/internal/wizard.js
6077
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/internal/wizard.js
6085
6078
  const run$2 = fnUntraced(function* (command, options) {
6086
6079
  const commandPath = options?.commandPath ?? [command.name];
6087
6080
  const selected = getCommandAtPath(command, commandPath);
@@ -6251,7 +6244,7 @@ const wrapCommand = (commandLine) => {
6251
6244
  };
6252
6245
  const formatShellArg = (arg) => /^[A-Za-z0-9_./:@%+=,-]+$/.test(arg) ? arg : `'${arg.replaceAll("'", `'"'"'`)}'`;
6253
6246
  //#endregion
6254
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/cli/Command.js
6247
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/cli/Command.js
6255
6248
  const isCommand = (u) => hasProperty(u, TypeId$15);
6256
6249
  const make$28 = (name, config, handler) => {
6257
6250
  const parsedConfig = parseConfig(config ?? {});
@@ -6489,7 +6482,7 @@ const runWith = (command, config) => {
6489
6482
  }, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$1(error) : fail$1(error), (error) => andThen(showHelp(command, error, config.renderErrors !== false), fail$2(error))), catchFilter((error) => config.renderErrors !== false && isCliError(error) && error._tag === "UserError" ? succeed$1(error) : fail$1(error), (error) => andThen(showUserError(error), fail$2(error))), catchFilter((e) => isQuitError(e) ? succeed$1(e) : fail$1(e), (_) => interrupt));
6490
6483
  };
6491
6484
  //#endregion
6492
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Brand.js
6485
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Brand.js
6493
6486
  function nominal() {
6494
6487
  return Object.assign((input) => input, {
6495
6488
  option: (input) => some(input),
@@ -6498,7 +6491,7 @@ function nominal() {
6498
6491
  });
6499
6492
  }
6500
6493
  //#endregion
6501
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/process/ChildProcessSpawner.js
6494
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/process/ChildProcessSpawner.js
6502
6495
  const ExitCode = nominal();
6503
6496
  const ProcessId = nominal();
6504
6497
  const HandleTypeId = "~effect/process/ChildProcessSpawner/ChildProcessHandle";
@@ -6527,7 +6520,7 @@ const make$27 = (spawn) => {
6527
6520
  };
6528
6521
  var ChildProcessSpawner = class extends Service()("effect/process/ChildProcessSpawner") {};
6529
6522
  //#endregion
6530
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/process/ChildProcess.js
6523
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/process/ChildProcess.js
6531
6524
  const TypeId$14 = "~effect/process/ChildProcess";
6532
6525
  const Proto$6 = {
6533
6526
  ...Prototype({
@@ -6641,7 +6634,7 @@ const concatTokens = (prevTokens, nextTokens, isSeparated) => isSeparated || pre
6641
6634
  ...nextTokens.slice(1)
6642
6635
  ];
6643
6636
  //#endregion
6644
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
6637
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
6645
6638
  const buildSpawnOptions = (options, base, platform) => {
6646
6639
  const detached = options.detached ?? platform !== "win32";
6647
6640
  return {
@@ -6652,7 +6645,7 @@ const buildSpawnOptions = (options, base, platform) => {
6652
6645
  };
6653
6646
  };
6654
6647
  //#endregion
6655
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/internal/utils.js
6648
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/internal/utils.js
6656
6649
  const handleErrnoException = (module, method) => (err, [path]) => {
6657
6650
  let reason = "Unknown";
6658
6651
  switch (err.code) {
@@ -6686,7 +6679,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
6686
6679
  });
6687
6680
  };
6688
6681
  //#endregion
6689
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
6682
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
6690
6683
  const toError = (error) => error instanceof globalThis.Error ? error : new globalThis.Error(String(error));
6691
6684
  const toPlatformError = (method, error, command) => {
6692
6685
  const { commands } = flattenCommand(command);
@@ -7111,7 +7104,7 @@ const flattenCommand = (command) => {
7111
7104
  };
7112
7105
  };
7113
7106
  //#endregion
7114
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/ulid.js
7107
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/ulid.js
7115
7108
  const maxTimestamp = 2 ** 48 - 1;
7116
7109
  const base32Chars = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
7117
7110
  const ulidString = (timestampMillis, bytes) => {
@@ -7133,7 +7126,7 @@ const ulidString = (timestampMillis, bytes) => {
7133
7126
  return out;
7134
7127
  };
7135
7128
  //#endregion
7136
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/uuid.js
7129
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/uuid.js
7137
7130
  const hex = (byte) => byte.toString(16).padStart(2, "0");
7138
7131
  const stringify = (bytes) => {
7139
7132
  return [
@@ -7166,7 +7159,7 @@ function v7Bytes(timestampMillis, bytes = randomBytes()) {
7166
7159
  }
7167
7160
  const v7String = (timestampMillis, bytes) => stringify(bytes === void 0 ? v7Bytes(timestampMillis) : v7Bytes(timestampMillis, bytes));
7168
7161
  //#endregion
7169
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Crypto.js
7162
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Crypto.js
7170
7163
  const TypeId$13 = "~effect/Crypto";
7171
7164
  const Crypto = Service("effect/Crypto");
7172
7165
  const make$24 = (impl) => {
@@ -7221,7 +7214,7 @@ const validateSize = (method, size) => Number.isSafeInteger(size) && size >= 0 ?
7221
7214
  description: "size must be a non-negative safe integer"
7222
7215
  }));
7223
7216
  //#endregion
7224
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
7217
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
7225
7218
  const toHashAlgorithm = (algorithm) => {
7226
7219
  switch (algorithm) {
7227
7220
  case "SHA-1": return "sha1";
@@ -7246,10 +7239,10 @@ const make$23 = make$24({
7246
7239
  });
7247
7240
  const layer$18 = succeed$4(Crypto, make$23);
7248
7241
  //#endregion
7249
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeCrypto.js
7242
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeCrypto.js
7250
7243
  const layer$17 = layer$18;
7251
7244
  //#endregion
7252
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
7245
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
7253
7246
  const handleBadArgument = (method) => (err) => badArgument({
7254
7247
  module: "FileSystem",
7255
7248
  method,
@@ -7613,10 +7606,10 @@ const makeFileSystem = map$5(serviceOption(WatchBackend), (backend) => make$37({
7613
7606
  }));
7614
7607
  const layer$16 = effect(FileSystem)(makeFileSystem);
7615
7608
  //#endregion
7616
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeFileSystem.js
7609
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeFileSystem.js
7617
7610
  const layer$15 = layer$16;
7618
7611
  //#endregion
7619
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodePath.js
7612
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodePath.js
7620
7613
  const fileUrlOps = (windows) => ({
7621
7614
  fromFileUrl: (url) => try_({
7622
7615
  try: () => NodeUrl.fileURLToPath(url, { windows }),
@@ -7651,10 +7644,10 @@ const layer$14 = succeed$4(Path$3)({
7651
7644
  ...fileUrlOps(void 0)
7652
7645
  });
7653
7646
  //#endregion
7654
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodePath.js
7647
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodePath.js
7655
7648
  const layer$13 = layer$14;
7656
7649
  //#endregion
7657
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
7650
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
7658
7651
  const layer$12 = succeed$4(Stdio, make$31({
7659
7652
  args: sync(() => process.argv.slice(2)),
7660
7653
  stdinIsTerminal: sync(() => process.stdin.isTTY === true),
@@ -7691,10 +7684,10 @@ const layer$12 = succeed$4(Stdio, make$31({
7691
7684
  })
7692
7685
  }));
7693
7686
  //#endregion
7694
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeStdio.js
7687
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeStdio.js
7695
7688
  const layer$11 = layer$12;
7696
7689
  //#endregion
7697
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js
7690
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js
7698
7691
  const make$22 = fnUntraced(function* (shouldQuit = defaultShouldQuit) {
7699
7692
  const stdin = process.stdin;
7700
7693
  const stdout = process.stdout;
@@ -7798,13 +7791,13 @@ function defaultShouldQuit(input) {
7798
7791
  return input.key.ctrl && (input.key.name === "c" || input.key.name === "d");
7799
7792
  }
7800
7793
  //#endregion
7801
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeTerminal.js
7794
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeTerminal.js
7802
7795
  const layer$9 = layer$10;
7803
7796
  //#endregion
7804
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeServices.js
7797
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeServices.js
7805
7798
  const layer$8 = provideMerge(layer$19, mergeAll(layer$15, layer$17, layer$13, layer$11, layer$9));
7806
7799
  //#endregion
7807
- //#region node_modules/.pnpm/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node-_b4bf51a71e79135a2a2b14ed65451a87/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js
7800
+ //#region node_modules/.pnpm/@effect+platform-node-shared@4.0.0_effect@4.0.1/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js
7808
7801
  const runMain$1 = makeRunMain(({ fiber, teardown }) => {
7809
7802
  let receivedSignal = false;
7810
7803
  fiber.addObserver((exit) => {
@@ -7822,10 +7815,10 @@ const runMain$1 = makeRunMain(({ fiber, teardown }) => {
7822
7815
  process.on("SIGTERM", onSigint);
7823
7816
  });
7824
7817
  //#endregion
7825
- //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect+@effect+platform-node@b3032f0_81a81e4f3f1c43fe5d1cd41b38f48c6e/node_modules/@effect/platform-node/dist/NodeRuntime.js
7818
+ //#region node_modules/.pnpm/@effect+platform-node@4.0.0_effect@4.0.1_redis@6.2.1/node_modules/@effect/platform-node/dist/NodeRuntime.js
7826
7819
  const runMain = runMain$1;
7827
7820
  //#endregion
7828
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/socket/Socket.js
7821
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/socket/Socket.js
7829
7822
  const TypeId$12 = "~effect/socket/Socket";
7830
7823
  const Socket = Service("effect/socket/Socket");
7831
7824
  const make$21 = (options) => Socket.of({
@@ -7911,7 +7904,7 @@ const makeWebSocket = (url, options) => WebSocketConstructor.use((makeWs) => fro
7911
7904
  const isPausable = (ws) => "pause" in ws && typeof ws.pause === "function";
7912
7905
  const fromWebSocket = (acquire, options) => withFiber((fiber) => {
7913
7906
  let currentWS;
7914
- const latch = makeUnsafe$5(false);
7907
+ const latch = makeUnsafe$4(false);
7915
7908
  const acquireContext = fiber.context;
7916
7909
  const reader = gen(function* () {
7917
7910
  const scope$7 = yield* scope;
@@ -8085,7 +8078,7 @@ const layerWebSocketConstructor = succeed$4(WebSocketConstructor)((url, options)
8085
8078
  return new (webSocketWithOptions())(url, { headers: options.headers });
8086
8079
  });
8087
8080
  //#endregion
8088
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/Prompt.js
8081
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/Prompt.js
8089
8082
  const ProviderOptions = Record(String$5, NullOr(Json));
8090
8083
  const PartTypeId$1 = "~effect/ai/Prompt/Part";
8091
8084
  const BasePart$1 = Struct({
@@ -8345,11 +8338,11 @@ const setSystem = dual(2, (self, content) => {
8345
8338
  return makePrompt(messages);
8346
8339
  });
8347
8340
  //#endregion
8348
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/UndefinedOr.js
8341
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/UndefinedOr.js
8349
8342
  const map = dual(2, (self, f) => self === void 0 ? void 0 : f(self));
8350
8343
  const match$1 = dual(2, (self, { onDefined, onUndefined }) => self === void 0 ? onUndefined() : onDefined(self));
8351
8344
  //#endregion
8352
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/persistence/KeyValueStore.js
8345
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/persistence/KeyValueStore.js
8353
8346
  const TypeId$10 = "~effect/persistence/KeyValueStore";
8354
8347
  const ErrorTypeId = "~effect/persistence/KeyValueStore/KeyValueStoreError";
8355
8348
  var KeyValueStoreError = class extends TaggedError("KeyValueStoreError") {
@@ -8466,7 +8459,7 @@ const toSchemaStore = (self, schema) => {
8466
8459
  };
8467
8460
  };
8468
8461
  //#endregion
8469
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/AiError.js
8462
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/AiError.js
8470
8463
  const HttpRequestDetails$1 = Struct({
8471
8464
  method: Literals$2([
8472
8465
  "GET",
@@ -8904,7 +8897,7 @@ const reasonFromHttpStatus = (params) => {
8904
8897
  }
8905
8898
  };
8906
8899
  //#endregion
8907
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/FiberSet.js
8900
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/FiberSet.js
8908
8901
  const TypeId$8 = "~effect/FiberSet";
8909
8902
  const isFiberSet = (u) => hasProperty(u, TypeId$8);
8910
8903
  const Proto$4 = {
@@ -8972,7 +8965,7 @@ const run = function() {
8972
8965
  };
8973
8966
  const runImpl = (self, effect, options) => withFiber((parent) => {
8974
8967
  if (self.state._tag === "Closed") return sync(constInterruptedFiber);
8975
- const fiber = runForkWith(parent.context)(effect);
8968
+ const fiber = forkUnsafe(parent, effect, options?.startImmediately ?? true, true);
8976
8969
  addUnsafe(self, fiber, options);
8977
8970
  return succeed$2(fiber);
8978
8971
  });
@@ -8983,12 +8976,12 @@ const awaitEmpty = (self) => whileLoop({
8983
8976
  step: constVoid
8984
8977
  });
8985
8978
  //#endregion
8986
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Random.js
8979
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Random.js
8987
8980
  const Random = Random$1;
8988
8981
  const randomWith = (f) => withFiber((fiber) => succeed$2(f(fiber.getRef(Random))));
8989
8982
  const next = randomWith((r) => r.nextDoubleUnsafe());
8990
8983
  //#endregion
8991
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/IdGenerator.js
8984
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/IdGenerator.js
8992
8985
  var IdGenerator = class extends Service()("@effect/ai/IdGenerator") {};
8993
8986
  const DEFAULT_ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
8994
8987
  const DEFAULT_SEPARATOR = "_";
@@ -9008,7 +9001,7 @@ const makeGenerator = ({ alphabet = DEFAULT_ALPHABET, prefix, separator = DEFAUL
9008
9001
  };
9009
9002
  const defaultIdGenerator = { generateId: makeGenerator({ prefix: "id" }) };
9010
9003
  //#endregion
9011
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/Tool.js
9004
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/Tool.js
9012
9005
  const TypeId$7 = "~effect/ai/Tool";
9013
9006
  const ProviderDefinedTypeId = "~effect/ai/Tool/ProviderDefined";
9014
9007
  const DynamicTypeId = "~effect/ai/Tool/Dynamic";
@@ -9161,7 +9154,7 @@ function isEmptyParamsRecord(indexSignature) {
9161
9154
  return indexSignature.parameter === string && isNever(indexSignature.type);
9162
9155
  }
9163
9156
  //#endregion
9164
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/internal/structured-output.js
9157
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/internal/structured-output.js
9165
9158
  const REST_PROPERTY_NAME = "__rest__";
9166
9159
  const TAIL_PROPERTY_PREFIX = "__tail_";
9167
9160
  const RECORD_DESCRIPTION = "Object encoded as array of [key, value] pairs. Apply object constraints to the decoded object";
@@ -9410,7 +9403,7 @@ function isJsonSchema(input) {
9410
9403
  return typeof input === "object" && input !== null && !Array.isArray(input);
9411
9404
  }
9412
9405
  //#endregion
9413
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/internal/codec-transformer.js
9406
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/internal/codec-transformer.js
9414
9407
  const makeDefaultCodecTransformer = (toJsonSchemaDocument) => {
9415
9408
  return (codec) => {
9416
9409
  const document = resolveTopLevelReference(toJsonSchemaDocument(codec));
@@ -9424,16 +9417,27 @@ const makeDefaultCodecTransformer = (toJsonSchemaDocument) => {
9424
9417
  };
9425
9418
  const defaultCodecTransformer$1 = makeDefaultCodecTransformer(toJsonSchemaDocument);
9426
9419
  //#endregion
9427
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/Response.js
9420
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/Response.js
9428
9421
  const PartTypeId = "~effect/ai/Response/Part";
9422
+ const toolPartSchemaCache = new WeakMap();
9423
+ const toolPartSchemas = (tool) => {
9424
+ let parts = toolPartSchemaCache.get(tool);
9425
+ if (parts === void 0) {
9426
+ parts = {
9427
+ toolCall: ToolCallPart(tool.name, tool.parametersSchema),
9428
+ toolResult: ToolResultPart(tool.name, tool.successSchema, failureResultSchema(tool))
9429
+ };
9430
+ toolPartSchemaCache.set(tool, parts);
9431
+ }
9432
+ return parts;
9433
+ };
9429
9434
  const Part = (toolkit) => {
9430
9435
  const toolCalls = [];
9431
9436
  const toolResults = [];
9432
9437
  for (const tool of Object.values(toolkit.tools)) {
9433
- const toolCall = ToolCallPart(tool.name, tool.parametersSchema);
9434
- const toolResult = ToolResultPart(tool.name, tool.successSchema, failureResultSchema(tool));
9435
- toolCalls.push(toolCall);
9436
- toolResults.push(toolResult);
9438
+ const parts = toolPartSchemas(tool);
9439
+ toolCalls.push(parts.toolCall);
9440
+ toolResults.push(parts.toolResult);
9437
9441
  }
9438
9442
  return Union([
9439
9443
  TextPart,
@@ -9452,10 +9456,9 @@ const StreamPart = (toolkit) => {
9452
9456
  const toolCalls = [];
9453
9457
  const toolResults = [];
9454
9458
  for (const tool of Object.values(toolkit.tools)) {
9455
- const toolCall = ToolCallPart(tool.name, tool.parametersSchema);
9456
- const toolResult = ToolResultPart(tool.name, tool.successSchema, failureResultSchema(tool));
9457
- toolCalls.push(toolCall);
9458
- toolResults.push(toolResult);
9459
+ const parts = toolPartSchemas(tool);
9460
+ toolCalls.push(parts.toolCall);
9461
+ toolResults.push(parts.toolResult);
9459
9462
  }
9460
9463
  return Union([
9461
9464
  TextStartPart,
@@ -9671,7 +9674,7 @@ const ErrorPart = Struct({
9671
9674
  error: Unknown
9672
9675
  }).annotate({ identifier: "ErrorPart" });
9673
9676
  //#endregion
9674
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/ResponseIdTracker.js
9677
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/ResponseIdTracker.js
9675
9678
  var ResponseIdTracker = class extends Service()("effect/ai/ResponseIdTracker") {};
9676
9679
  const make$15 = sync(() => {
9677
9680
  const sentParts = new Map();
@@ -9717,7 +9720,7 @@ const make$15 = sync(() => {
9717
9720
  };
9718
9721
  });
9719
9722
  //#endregion
9720
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/Telemetry.js
9723
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/Telemetry.js
9721
9724
  const addSpanAttributes = (keyPrefix, transformKey) => (span, attributes) => {
9722
9725
  for (const [key, value] of Object.entries(attributes)) if (isNotNullish(value)) span.attribute(`${keyPrefix}.${transformKey(key)}`, value);
9723
9726
  };
@@ -9737,7 +9740,7 @@ const addGenAIAnnotations$2 = dual(2, (span, options) => {
9737
9740
  });
9738
9741
  var CurrentSpanTransformer = class extends Service()("effect/ai/Telemetry/CurrentSpanTransformer") {};
9739
9742
  //#endregion
9740
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/Toolkit.js
9743
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/Toolkit.js
9741
9744
  const TypeId$6 = "~effect/ai/Toolkit";
9742
9745
  const FailureOrigin = Reference("effect/ai/Toolkit/FailureOrigin", { defaultValue: () => "result" });
9743
9746
  const failureCause = (error, origin) => annotate$1(fail$4(error), make$42(FailureOrigin, origin));
@@ -9905,7 +9908,7 @@ const merge = (...toolkits) => {
9905
9908
  return makeProto$2(tools);
9906
9909
  };
9907
9910
  //#endregion
9908
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/LanguageModel.js
9911
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/LanguageModel.js
9909
9912
  const LanguageModel = Service("effect/ai/LanguageModel");
9910
9913
  const TypeId$5 = "~effect/ai/LanguageModel";
9911
9914
  const defaultCodecTransformer = defaultCodecTransformer$1;
@@ -10351,6 +10354,7 @@ const make$13 = fnUntraced(function* (params) {
10351
10354
  });
10352
10355
  return LanguageModel.of({
10353
10356
  [TypeId$5]: TypeId$5,
10357
+ supportsSystemMessagesInHistory: params.supportsSystemMessagesInHistory,
10354
10358
  generateText,
10355
10359
  generateObject,
10356
10360
  streamText
@@ -10559,8 +10563,17 @@ const resolveToolCalls = (content, toolkit, messages, concurrency) => {
10559
10563
  }).pipe(unwrap$3));
10560
10564
  return mergeAll$1(streams, { concurrency });
10561
10565
  };
10562
- const makeToolkitWithEncodedParameters = (toolkit) => make$14(...Object.values(toolkit.tools).map((tool) => tool.setParameters(toEncoded$1(tool.parametersSchema))));
10563
- const makeToolkitWithOpaqueParameters = (toolkit) => make$14(...Object.values(toolkit.tools).map((tool) => tool.setParameters(Unknown)));
10566
+ const parameterModeTools = new WeakMap();
10567
+ const withParameterMode = (tool, mode) => {
10568
+ let tools = parameterModeTools.get(tool);
10569
+ if (tools === void 0) {
10570
+ tools = {};
10571
+ parameterModeTools.set(tool, tools);
10572
+ }
10573
+ return tools[mode] ??= tool.setParameters(mode === "encoded" ? toEncoded$1(tool.parametersSchema) : Unknown);
10574
+ };
10575
+ const makeToolkitWithEncodedParameters = (toolkit) => make$14(...Object.values(toolkit.tools).map((tool) => withParameterMode(tool, "encoded")));
10576
+ const makeToolkitWithOpaqueParameters = (toolkit) => make$14(...Object.values(toolkit.tools).map((tool) => withParameterMode(tool, "opaque")));
10564
10577
  const validateProviderExecutedToolCalls = (toolkit, parts) => forEach$2(parts, (part) => {
10565
10578
  if (part.type !== "tool-call" || part.providerExecuted !== true) return void_;
10566
10579
  const tool = toolkit.tools[part.name];
@@ -11683,7 +11696,7 @@ const make$12 = fnUntraced(function* (options) {
11683
11696
  const exit$1 = yield* exit(join$2(session.running));
11684
11697
  session.running = void 0;
11685
11698
  yield* persist(session);
11686
- if (isSuccess$1(exit$1)) return { stopReason: "end_turn" };
11699
+ if (isSuccess(exit$1)) return { stopReason: "end_turn" };
11687
11700
  if (hasInterruptsOnly(exit$1.cause)) return { stopReason: "cancelled" };
11688
11701
  return yield* toRpcError(exit$1.cause);
11689
11702
  });
@@ -12095,15 +12108,15 @@ var ExaError = class extends TaggedError$1()("ExaError", { cause: Defect() }) {}
12095
12108
  const layer$7 = effect(ExaSearch, gen(function* () {
12096
12109
  const scope$4 = yield* scope;
12097
12110
  const getClient = yield* cachedWithTTL(gen(function* () {
12098
- const McpClient = yield* tryPromise(() => import("./McpClient-DP4jlaD1.mjs"));
12111
+ const McpClient = yield* tryPromise(() => import("./McpClient-C0FVuDj2.mjs"));
12099
12112
  const context = yield* buildWithScope(McpClient.layer, scope$4);
12100
12113
  return get$3(context, McpClient.McpClient);
12101
- }), (exit) => isSuccess$1(exit) ? infinity : zero);
12114
+ }), (exit) => isSuccess(exit) ? infinity : zero);
12102
12115
  const connect = yield* cachedWithTTL(gen(function* () {
12103
12116
  const client = yield* getClient;
12104
12117
  yield* client.connect({ url: "https://mcp.exa.ai/mcp" });
12105
12118
  return client;
12106
- }), (exit) => isSuccess$1(exit) ? infinity : zero);
12119
+ }), (exit) => isSuccess(exit) ? infinity : zero);
12107
12120
  const decode = decodeUnknownEffect$1(NonEmptyArray(ExaSearchResult));
12108
12121
  return ExaSearch.of({ search: fn("ExaSearch.search")(function* (options) {
12109
12122
  const client = yield* connect;
@@ -12403,7 +12416,7 @@ const AgentToolHandlersNoDeps = AgentToolsWithSearch.toLayer(gen(function* () {
12403
12416
  return yield* promise(() => import("./index.min-CI3qqohw.mjs").then((Glob) => Glob.glob(pattern, { cwd })));
12404
12417
  }),
12405
12418
  bash: fn("AgentTools.bash")(function* (options) {
12406
- const timeoutMs = Math.min(options.timeoutMs ?? 12e4, 24e4);
12419
+ const timeoutMs = Math.min(options.timeoutMs ?? 6e5, 6e5);
12407
12420
  yield* logInfo(`Calling "bash"`).pipe(annotateLogs({
12408
12421
  ...options,
12409
12422
  timeoutMs
@@ -12925,7 +12938,7 @@ const renderLocation = (location) => {
12925
12938
  return encoded.slice(1, -1) === location ? location : encoded;
12926
12939
  };
12927
12940
  //#endregion
12928
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/workers/Transferable.js
12941
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/workers/Transferable.js
12929
12942
  var Collector = class extends Service()("effect/workers/Transferable/Collector") {};
12930
12943
  const makeCollectorUnsafe = () => {
12931
12944
  let tranferables = [];
@@ -12948,10 +12961,10 @@ const makeCollectorUnsafe = () => {
12948
12961
  });
12949
12962
  };
12950
12963
  //#endregion
12951
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/PrimaryKey.js
12964
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/PrimaryKey.js
12952
12965
  const symbol = "~effect/PrimaryKey";
12953
12966
  //#endregion
12954
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/rpc/RpcSchema.js
12967
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/rpc/RpcSchema.js
12955
12968
  const StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
12956
12969
  function isStreamSchema(schema) {
12957
12970
  return hasProperty(schema, StreamSchemaTypeId);
@@ -12978,7 +12991,7 @@ var ClientAbort = class extends Service()("effect/rpc/RpcSchema/ClientAbort") {
12978
12991
  }));
12979
12992
  };
12980
12993
  //#endregion
12981
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/rpc/Rpc.js
12994
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/rpc/Rpc.js
12982
12995
  const TypeId$4 = "~effect/rpc/Rpc";
12983
12996
  const Proto$1 = {
12984
12997
  [TypeId$4]: TypeId$4,
@@ -13106,7 +13119,7 @@ const exitSchema = (self) => {
13106
13119
  const WrapperTypeId = "~effect/rpc/Rpc/Wrapper";
13107
13120
  const isWrapper = (u) => WrapperTypeId in u;
13108
13121
  //#endregion
13109
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/rpc/RpcMessage.js
13122
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/rpc/RpcMessage.js
13110
13123
  const RequestId = (id) => id;
13111
13124
  const RequestIdSchema = Union([String$5, Number$2]);
13112
13125
  const RequestEncodedSchema = Struct({
@@ -13149,7 +13162,7 @@ const EncodedSchema = Union([
13149
13162
  Struct({ _tag: tag("Pong") })
13150
13163
  ]);
13151
13164
  //#endregion
13152
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/rpc/Utils.js
13165
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/rpc/Utils.js
13153
13166
  const withRunClient = (f) => suspend(() => {
13154
13167
  const clientIds = new Set();
13155
13168
  const clientBuffers = new Map();
@@ -13188,7 +13201,7 @@ const withRunClient = (f) => suspend(() => {
13188
13201
  }));
13189
13202
  });
13190
13203
  //#endregion
13191
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/rpc/RpcClient.js
13204
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/rpc/RpcClient.js
13192
13205
  let requestIdCounter = 0;
13193
13206
  const makeNoSerialization = fnUntraced(function* (group, options) {
13194
13207
  const spanPrefix = options?.spanPrefix ?? "RpcClient";
@@ -13274,12 +13287,13 @@ const makeNoSerialization = fnUntraced(function* (group, options) {
13274
13287
  const fiber = getCurrent();
13275
13288
  const id = generateRequestId();
13276
13289
  const scope = getUnsafe(fiber.context, Scope);
13290
+ const queue = yield* bounded(streamBufferSize);
13277
13291
  yield* addFinalizerExit(scope, (exit) => {
13292
+ shutdownUnsafe(queue);
13278
13293
  if (!entries.has(id)) return void_;
13279
13294
  entries.delete(id);
13280
13295
  return sendInterrupt(id, isFailure$1(exit) ? Array.from(interruptors(exit.cause)) : [], context);
13281
13296
  });
13282
- const queue = yield* bounded(streamBufferSize);
13283
13297
  entries.set(id, {
13284
13298
  _tag: "Queue",
13285
13299
  rpc,
@@ -13397,6 +13411,14 @@ const make$10 = fnUntraced(function* (group, options) {
13397
13411
  const rpcSchemas = makeRpcSchemas(codecFor);
13398
13412
  const decodeDefect = decodeSync(codecFor(Defect()));
13399
13413
  const entries = new Map();
13414
+ const interruptRequest = (requestId) => {
13415
+ if (!entries.has(requestId)) return void_;
13416
+ entries.delete(requestId);
13417
+ return send(clientId, {
13418
+ _tag: "Interrupt",
13419
+ requestId
13420
+ });
13421
+ };
13400
13422
  const { client, write } = yield* makeNoSerialization(group, {
13401
13423
  ...options,
13402
13424
  supportsAck,
@@ -13425,13 +13447,7 @@ const make$10 = fnUntraced(function* (group, options) {
13425
13447
  _tag: "Ack",
13426
13448
  requestId: message.requestId
13427
13449
  });
13428
- case "Interrupt":
13429
- if (!entries.get(message.requestId)) return void_;
13430
- entries.delete(message.requestId);
13431
- return send(clientId, {
13432
- _tag: "Interrupt",
13433
- requestId: message.requestId
13434
- });
13450
+ case "Interrupt": return interruptRequest(message.requestId);
13435
13451
  case "Eof": return void_;
13436
13452
  }
13437
13453
  }
@@ -13442,17 +13458,18 @@ const make$10 = fnUntraced(function* (group, options) {
13442
13458
  const requestId = RequestId(message.requestId);
13443
13459
  const entry = entries.get(requestId);
13444
13460
  if (!entry || isNone(entry.schemas.decodeChunk)) return void_;
13445
- return entry.schemas.decodeChunk.value(message.values).pipe(provideContext(entry.context), orDie, flatMap$1((chunk) => write({
13461
+ const decodeChunk = entry.schemas.decodeChunk.value;
13462
+ return uninterruptibleMask((restore) => restore(decodeChunk(message.values).pipe(provideContext(entry.context), orDie, flatMap$1((chunk) => write({
13446
13463
  _tag: "Chunk",
13447
13464
  clientId: 0,
13448
- requestId: RequestId(message.requestId),
13465
+ requestId,
13449
13466
  values: chunk
13450
- })), onError((cause) => write({
13467
+ })))).pipe(onError((cause) => write({
13451
13468
  _tag: "Exit",
13452
13469
  clientId: 0,
13453
- requestId: RequestId(message.requestId),
13470
+ requestId,
13454
13471
  exit: failCause$1(cause)
13455
- })));
13472
+ }).pipe(andThen(hasInterrupts(cause) ? void_ : ignore(interruptRequest(requestId))))), catchCauseIf((cause) => !hasInterrupts(cause), () => void_)));
13456
13473
  }
13457
13474
  case "Exit": {
13458
13475
  const requestId = RequestId(message.requestId);
@@ -13481,7 +13498,7 @@ const make$10 = fnUntraced(function* (group, options) {
13481
13498
  });
13482
13499
  case "ClientProtocolError": {
13483
13500
  const exit = fail$3(message.error);
13484
- return forEach$2(entries.keys(), (requestId) => write({
13501
+ return forEach$2(Array.from(entries.keys()), (requestId) => write({
13485
13502
  _tag: "Exit",
13486
13503
  clientId: 0,
13487
13504
  requestId,
@@ -13513,7 +13530,7 @@ var Protocol = class extends Service()("effect/rpc/RpcClient/Protocol") {
13513
13530
  static make = withRunClient;
13514
13531
  };
13515
13532
  //#endregion
13516
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/rpc/RpcGroup.js
13533
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/rpc/RpcGroup.js
13517
13534
  const RpcGroupProto = {
13518
13535
  add(...rpcs) {
13519
13536
  const requests = new Map(this.requests);
@@ -14521,13 +14538,13 @@ var QueueWriteStream = class extends Writable {
14521
14538
  }
14522
14539
  };
14523
14540
  //#endregion
14524
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ChannelSchema.js
14541
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ChannelSchema.js
14525
14542
  const decode$1 = (schema, options) => () => {
14526
14543
  const decode = decodeEffect(NonEmptyArray(schema), options);
14527
14544
  return fromTransform$1((upstream, _scope) => succeed$2(flatMap$1(upstream, (chunk) => decode(chunk))));
14528
14545
  };
14529
14546
  //#endregion
14530
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/encoding/Sse.js
14547
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/encoding/Sse.js
14531
14548
  const SseErrorTypeId = "~effect/encoding/Sse/SseError";
14532
14549
  var EventTooLarge = class extends TaggedError("EventTooLarge") {
14533
14550
  get message() {
@@ -14698,7 +14715,7 @@ var Retry = class Retry extends TaggedClass$1("Retry") {
14698
14715
  }
14699
14716
  };
14700
14717
  //#endregion
14701
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/Generated.js
14718
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/Generated.js
14702
14719
  const AdminApiKey = Struct({
14703
14720
  "object": Literal("organization.admin_api_key").annotate({ "description": "The object type, which is always `organization.admin_api_key`" }),
14704
14721
  "id": String$5.annotate({ "description": "The identifier, which can be referenced in API endpoints" }),
@@ -18733,9 +18750,10 @@ const InputItem$1 = Union([
18733
18750
  "in_progress",
18734
18751
  "searching",
18735
18752
  "completed",
18736
- "failed"
18753
+ "failed",
18754
+ "incomplete"
18737
18755
  ]).annotate({ "description": "The status of the web search tool call.\n" }),
18738
- "action": Union([
18756
+ "action": optionalKey(Union([
18739
18757
  Struct({
18740
18758
  "type": Literal("search").annotate({ "description": "The action type.\n" }),
18741
18759
  "query": optionalKey(String$5.annotate({ "description": "[DEPRECATED] The search query.\n" })),
@@ -18784,7 +18802,7 @@ const InputItem$1 = Union([
18784
18802
  "title": "Find action",
18785
18803
  "description": "An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find_in_page).\n"
18786
18804
  })
18787
- ], { mode: "oneOf" })
18805
+ ], { mode: "oneOf" }))
18788
18806
  }).annotate({
18789
18807
  "title": "Web search tool call",
18790
18808
  "description": "Content item used to generate a response.\n"
@@ -19902,7 +19920,7 @@ const ListSkillVersionsParams = Struct({
19902
19920
  });
19903
19921
  var OpenAiClientErrorImpl = class extends Error$2 {};
19904
19922
  //#endregion
19905
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/internal/errors.js
19923
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/internal/errors.js
19906
19924
  const OpenAiErrorBody$1 = Struct({ error: Struct({
19907
19925
  message: String$5,
19908
19926
  type: optional$2(NullOr(String$5)),
@@ -20112,12 +20130,12 @@ const mapStatusCodeToReason$1 = ({ status, headers, message, metadata, http }) =
20112
20130
  }
20113
20131
  };
20114
20132
  //#endregion
20115
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/OpenAiConfig.js
20133
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/OpenAiConfig.js
20116
20134
  var OpenAiConfig$1 = class OpenAiConfig$1 extends Service()("@effect/ai-openai/OpenAiConfig") {
20117
20135
  static getOrUndefined = map$5(context(), getOrUndefined$1(OpenAiConfig$1));
20118
20136
  };
20119
20137
  //#endregion
20120
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/OpenAiSchema.js
20138
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/OpenAiSchema.js
20121
20139
  const UnknownRecord = Record(String$5, Unknown);
20122
20140
  const JsonObject = Record(String$5, Unknown);
20123
20141
  const MessageRole = Literals$2([
@@ -20453,7 +20471,8 @@ const CreateResponse = Struct({
20453
20471
  prompt_cache_key: optional$2(String$5),
20454
20472
  prompt_cache_options: optional$2(Struct({
20455
20473
  mode: optional$2(Literals$2(["implicit", "explicit"])),
20456
- ttl: optional$2(Literal("30m"))
20474
+ ttl: optional$2(Literal("30m")),
20475
+ comparison_response_id: optional$2(NullOr(String$5))
20457
20476
  })),
20458
20477
  service_tier: optional$2(String$5),
20459
20478
  previous_response_id: optional$2(String$5),
@@ -20605,6 +20624,27 @@ const ResponseError = Struct({
20605
20624
  code: String$5,
20606
20625
  message: String$5
20607
20626
  });
20627
+ const PromptCacheDiagnostics = Union([
20628
+ Struct({
20629
+ type: Literal("cache_miss"),
20630
+ reason: Literals$2([
20631
+ "model_changed",
20632
+ "prompt_cache_key_changed",
20633
+ "tools_changed",
20634
+ "text_format_changed",
20635
+ "reasoning_effort_changed",
20636
+ "verbosity_changed",
20637
+ "context_compacted",
20638
+ "input_changed",
20639
+ "service_tier_changed"
20640
+ ]),
20641
+ cache_missed_tokens: Int$1,
20642
+ comparison_reusable_tokens: optionalKey(Int$1)
20643
+ }),
20644
+ Struct({ type: Literal("cache_hit") }),
20645
+ Struct({ type: Literal("comparison_response_not_found") }),
20646
+ Struct({ type: Literal("unavailable") })
20647
+ ]);
20608
20648
  const Response$1 = Struct({
20609
20649
  id: String$5,
20610
20650
  object: optionalKey(Literal("response")),
@@ -20614,7 +20654,8 @@ const Response$1 = Struct({
20614
20654
  usage: optionalKey(NullOr(ResponseUsage)),
20615
20655
  error: optionalKey(NullOr(ResponseError)),
20616
20656
  incomplete_details: optionalKey(NullOr(Struct({ reason: optionalKey(Literals$2(["max_output_tokens", "content_filter"])) }))),
20617
- service_tier: optionalKey(String$5)
20657
+ service_tier: optionalKey(String$5),
20658
+ prompt_cache_diagnostics: optionalKey(PromptCacheDiagnostics)
20618
20659
  });
20619
20660
  const ResponseCreatedEvent = Struct({
20620
20661
  type: Literal("response.created"),
@@ -20845,7 +20886,7 @@ const CreateEmbeddingResponse = Struct({
20845
20886
  }))
20846
20887
  });
20847
20888
  //#endregion
20848
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/OpenAiClient.js
20889
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/OpenAiClient.js
20849
20890
  var OpenAiClient$1 = class extends Service()("@effect/ai-openai/OpenAiClient") {};
20850
20891
  const RedactedOpenAiHeaders$1 = {
20851
20892
  OpenAiOrganization: "OpenAI-Organization",
@@ -21001,7 +21042,7 @@ const makeSocket = gen(function* () {
21001
21042
  })
21002
21043
  });
21003
21044
  yield* scoped(get(queueRef));
21004
- const semaphore = makeUnsafe$4(1);
21045
+ const semaphore = makeUnsafe$5(1);
21005
21046
  const request = yield* makeRequest;
21006
21047
  return OpenAiSocket.context({ createResponseStream(options) {
21007
21048
  const stream = unwrap$3(gen(function* () {
@@ -21037,7 +21078,7 @@ const AllEvents = Union([ErrorEvent, ResponseStreamEvent]);
21037
21078
  const decodeEvent = decodeUnknownSync(fromJsonString(AllEvents));
21038
21079
  const layerWebSocketMode = effectContext(makeSocket);
21039
21080
  //#endregion
21040
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/RequestResolver.js
21081
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/RequestResolver.js
21041
21082
  const TypeId$3 = "~effect/RequestResolver";
21042
21083
  const RequestResolverProto = {
21043
21084
  [TypeId$3]: {
@@ -21119,7 +21160,7 @@ const withSpan = dual((args) => isRequestResolver(args[0]), (self, name, options
21119
21160
  })
21120
21161
  }));
21121
21162
  //#endregion
21122
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/EmbeddingModel.js
21163
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/EmbeddingModel.js
21123
21164
  const EmbeddingModel = Service("effect/ai/EmbeddingModel");
21124
21165
  const TypeId$2 = "~effect/ai/EmbeddingModel";
21125
21166
  var Dimensions = class extends Service()("effect/ai/EmbeddingModel/Dimensions") {};
@@ -21162,7 +21203,7 @@ const mapProviderResults = (inputLength, results) => {
21162
21203
  return succeed$2(embeddings);
21163
21204
  };
21164
21205
  //#endregion
21165
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/Model.js
21206
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/Model.js
21166
21207
  const TypeId$1 = "~effect/ai/Model";
21167
21208
  var ProviderName = class extends Service()("effect/ai/Model/ProviderName") {};
21168
21209
  var ModelName = class extends Service()("effect/ai/Model/ModelName") {};
@@ -21187,7 +21228,7 @@ const Proto = {
21187
21228
  };
21188
21229
  const make$5 = (provider, modelName, layer) => Object.assign(Object.create(Proto), { provider }, merge$3(layer, succeedContext(ProviderName.context(provider).pipe(add(ModelName, modelName)))));
21189
21230
  //#endregion
21190
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/OpenAiEmbeddingModel.js
21231
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/OpenAiEmbeddingModel.js
21191
21232
  var Config$2 = class extends Service()("@effect/ai-openai/OpenAiEmbeddingModel/Config") {};
21192
21233
  const model$2 = (model, options) => make$5("openai", model, merge$3(layer$4({
21193
21234
  model,
@@ -21236,7 +21277,7 @@ const invalidOutput = (description) => make$18({
21236
21277
  reason: new InvalidOutputError({ description })
21237
21278
  });
21238
21279
  //#endregion
21239
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/ai/OpenAiStructuredOutput.js
21280
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/ai/OpenAiStructuredOutput.js
21240
21281
  function toCodecOpenAI(schema) {
21241
21282
  const codec = toCodec(schema);
21242
21283
  const document = resolveTopLevelReference(toJsonSchemaDocument(codec, {
@@ -21444,7 +21485,7 @@ const formats = new Set([
21444
21485
  "uuid"
21445
21486
  ]);
21446
21487
  //#endregion
21447
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/internal/utilities.js
21488
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/internal/utilities.js
21448
21489
  const finishReasonMap$1 = {
21449
21490
  content_filter: "content-filter",
21450
21491
  function_call: "tool-calls",
@@ -21460,7 +21501,7 @@ const resolveFinishReason$1 = (finishReason, hasToolCalls) => {
21460
21501
  return reason;
21461
21502
  };
21462
21503
  //#endregion
21463
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/OpenAiTelemetry.js
21504
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/OpenAiTelemetry.js
21464
21505
  const addOpenAiRequestAttributes$1 = addSpanAttributes("gen_ai.openai.request", camelToSnake);
21465
21506
  const addOpenAiResponseAttributes$1 = addSpanAttributes("gen_ai.openai.response", camelToSnake);
21466
21507
  const addGenAIAnnotations$1 = dual(2, (span, options) => {
@@ -21471,7 +21512,7 @@ const addGenAIAnnotations$1 = dual(2, (span, options) => {
21471
21512
  }
21472
21513
  });
21473
21514
  //#endregion
21474
- //#region node_modules/.pnpm/@effect+ai-openai@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai@b3032f0_effect@_37a89be1fb367830d95352a48fdb718a/node_modules/@effect/ai-openai/dist/OpenAiLanguageModel.js
21515
+ //#region node_modules/.pnpm/@effect+ai-openai@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai/dist/OpenAiLanguageModel.js
21475
21516
  ModelIdsResponses.members[1];
21476
21517
  ModelIdsShared.members[1];
21477
21518
  var Config$1 = class extends Service()("@effect/ai-openai/OpenAiLanguageModel/Config") {};
@@ -21749,11 +21790,11 @@ const prepareMessages$1 = fnUntraced(function* ({ config, options, capabilities,
21749
21790
  switch (part.name) {
21750
21791
  case "OpenAiWebSearch":
21751
21792
  case "OpenAiWebSearchPreview":
21752
- if (!hasProperty(result.result, "action") || !hasProperty(result.result, "status")) return yield* unreplayableProviderItem(part.name, part.id);
21793
+ if (!hasProperty(result.result, "status")) return yield* unreplayableProviderItem(part.name, part.id);
21753
21794
  messages.push({
21754
21795
  type: "web_search_call",
21755
21796
  id: itemId,
21756
- action: result.result.action,
21797
+ ...hasProperty(result.result, "action") ? { action: result.result.action } : void 0,
21757
21798
  status: result.result.status
21758
21799
  });
21759
21800
  break;
@@ -22245,7 +22286,7 @@ const makeResponse$1 = fnUntraced(function* ({ options, rawResponse, response, t
22245
22286
  type: "tool-call",
22246
22287
  id: part.id,
22247
22288
  name: toolName,
22248
- params: webSearchTool?.name === "OpenAiWebSearchPreview" ? {} : { action: part.action },
22289
+ params: webSearchTool?.name === "OpenAiWebSearchPreview" || isUndefined(part.action) ? {} : { action: part.action },
22249
22290
  providerExecuted: true
22250
22291
  });
22251
22292
  parts.push({
@@ -22254,7 +22295,7 @@ const makeResponse$1 = fnUntraced(function* ({ options, rawResponse, response, t
22254
22295
  name: toolName,
22255
22296
  isFailure: part.status !== "completed",
22256
22297
  result: {
22257
- action: part.action,
22298
+ ...isUndefined(part.action) ? void 0 : { action: part.action },
22258
22299
  status: part.status
22259
22300
  },
22260
22301
  providerExecuted: true
@@ -22268,7 +22309,7 @@ const makeResponse$1 = fnUntraced(function* ({ options, rawResponse, response, t
22268
22309
  reason: finishReason,
22269
22310
  usage: getUsage$1(rawResponse.usage),
22270
22311
  response: buildHttpResponseDetails$1(response),
22271
- ...toServiceTier(rawResponse.service_tier)
22312
+ ...toFinishMetadata(rawResponse)
22272
22313
  });
22273
22314
  return parts;
22274
22315
  });
@@ -22347,7 +22388,7 @@ const makeStreamResponse$1 = fnUntraced(function* ({ stream, response, config, o
22347
22388
  reason: resolveFinishReason$1(event.response.incomplete_details?.reason, hasToolCalls),
22348
22389
  usage: getUsage$1(event.response.usage),
22349
22390
  response: buildHttpResponseDetails$1(response),
22350
- ...toServiceTier(event.response.service_tier)
22391
+ ...toFinishMetadata(event.response)
22351
22392
  });
22352
22393
  break;
22353
22394
  case "response.failed":
@@ -22360,7 +22401,7 @@ const makeStreamResponse$1 = fnUntraced(function* ({ stream, response, config, o
22360
22401
  reason: "error",
22361
22402
  usage: getUsage$1(event.response.usage),
22362
22403
  response: buildHttpResponseDetails$1(response),
22363
- ...toServiceTier(event.response.service_tier)
22404
+ ...toFinishMetadata(event.response)
22364
22405
  });
22365
22406
  break;
22366
22407
  case "response.output_item.added":
@@ -22793,7 +22834,7 @@ const makeStreamResponse$1 = fnUntraced(function* ({ stream, response, config, o
22793
22834
  type: "tool-call",
22794
22835
  id: event.item.id,
22795
22836
  name: toolName,
22796
- params: { action: event.item.action },
22837
+ params: isUndefined(event.item.action) ? {} : { action: event.item.action },
22797
22838
  providerExecuted: true
22798
22839
  });
22799
22840
  parts.push({
@@ -22802,7 +22843,7 @@ const makeStreamResponse$1 = fnUntraced(function* ({ stream, response, config, o
22802
22843
  name: toolName,
22803
22844
  isFailure: event.item.status !== "completed",
22804
22845
  result: {
22805
- action: event.item.action,
22846
+ ...isUndefined(event.item.action) ? void 0 : { action: event.item.action },
22806
22847
  status: event.item.status
22807
22848
  },
22808
22849
  providerExecuted: true
@@ -23351,15 +23392,21 @@ const getUsage$1 = (usage) => {
23351
23392
  }
23352
23393
  };
23353
23394
  };
23354
- const toServiceTier = (value) => {
23355
- switch (value) {
23395
+ const toFinishMetadata = (response) => {
23396
+ let serviceTier;
23397
+ switch (response.service_tier) {
23356
23398
  case "default":
23357
23399
  case "auto":
23358
23400
  case "flex":
23359
23401
  case "scale":
23360
- case "priority": return { metadata: { openai: { serviceTier: value } } };
23361
- default: return;
23402
+ case "priority": serviceTier = response.service_tier;
23362
23403
  }
23404
+ const promptCacheDiagnostics = response.prompt_cache_diagnostics;
23405
+ if (serviceTier === void 0 && promptCacheDiagnostics === void 0) return;
23406
+ return { metadata: { openai: {
23407
+ ...serviceTier === void 0 ? void 0 : { serviceTier },
23408
+ ...promptCacheDiagnostics === void 0 ? void 0 : { promptCacheDiagnostics }
23409
+ } } };
23363
23410
  };
23364
23411
  const getUsageTokenDetail = (details, key) => hasProperty(details, key) && typeof details[key] === "number" ? details[key] : void 0;
23365
23412
  const transformToolCallParams$1 = fnUntraced(function* (tools, toolName, toolParams) {
@@ -23519,7 +23566,7 @@ var CodexAuth = class CodexAuth extends Service()("clanka/CodexAuth") {
23519
23566
  times: 5,
23520
23567
  schedule: min([exponential(150), spaced(5e3)])
23521
23568
  }));
23522
- const semaphore = makeUnsafe$4(1);
23569
+ const semaphore = makeUnsafe$5(1);
23523
23570
  let currentToken = yield* tokenStore.get(STORE_TOKEN_KEY$1).pipe(catchTag("SchemaError", (error) => logDebug(`Failed to decode persisted Codex token, clearing it: ${error.message}`).pipe(andThen(tokenStore.remove(STORE_TOKEN_KEY$1)), as(none()))), orDie);
23524
23571
  const saveToken = (token) => orDie(tokenStore.set(STORE_TOKEN_KEY$1, token)).pipe(tap(() => sync(() => {
23525
23572
  currentToken = some(token);
@@ -23833,7 +23880,7 @@ ${content}
23833
23880
  const turnTimeoutReset = () => {
23834
23881
  turnExpires = clock.currentTimeMillisUnsafe() + turnTimeoutMs;
23835
23882
  };
23836
- const toolLatch = makeUnsafe$5(true);
23883
+ const toolLatch = makeUnsafe$4(true);
23837
23884
  const toolLatchAcquire = toolLatch.close;
23838
23885
  const toolLatchRelease = sync(() => {
23839
23886
  turnTimeoutReset();
@@ -23862,7 +23909,7 @@ ${content}
23862
23909
  return compaction;
23863
23910
  }).pipe(onExit((exit) => sync(() => {
23864
23911
  if (!compactionStarted) return;
23865
- const result = isSuccess$1(exit) ? exit.value : none();
23912
+ const result = isSuccess(exit) ? exit.value : none();
23866
23913
  let tokensBefore;
23867
23914
  let tokensAfter;
23868
23915
  if (isSome(result)) {
@@ -24088,7 +24135,7 @@ ${content}
24088
24135
  }));
24089
24136
  return fromQueue(output);
24090
24137
  }, unwrap$3);
24091
- const sendLock = makeUnsafe$4(1);
24138
+ const sendLock = makeUnsafe$5(1);
24092
24139
  return Agent.of({
24093
24140
  [TypeId]: TypeId,
24094
24141
  history,
@@ -24229,7 +24276,7 @@ const layerModel = (model, options) => layer$3({
24229
24276
  supportsImages: options?.supportsImages
24230
24277
  })));
24231
24278
  //#endregion
24232
- //#region node_modules/.pnpm/@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai-compat@b_3cb1e20f378ce4af76925003ed6fd302/node_modules/@effect/ai-openai-compat/dist/internal/errors.js
24279
+ //#region node_modules/.pnpm/@effect+ai-openai-compat@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai-compat/dist/internal/errors.js
24233
24280
  const OpenAiErrorBody = Struct({ error: Struct({
24234
24281
  message: String$5,
24235
24282
  type: optional$2(NullOr(String$5)),
@@ -24423,12 +24470,12 @@ const mapStatusCodeToReason = ({ status, headers, message, metadata, http }) =>
24423
24470
  }
24424
24471
  };
24425
24472
  //#endregion
24426
- //#region node_modules/.pnpm/@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai-compat@b_3cb1e20f378ce4af76925003ed6fd302/node_modules/@effect/ai-openai-compat/dist/OpenAiConfig.js
24473
+ //#region node_modules/.pnpm/@effect+ai-openai-compat@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai-compat/dist/OpenAiConfig.js
24427
24474
  var OpenAiConfig = class OpenAiConfig extends Service()("@effect/ai-openai-compat/OpenAiConfig") {
24428
24475
  static getOrUndefined = map$5(context(), getOrUndefined$1(OpenAiConfig));
24429
24476
  };
24430
24477
  //#endregion
24431
- //#region node_modules/.pnpm/@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai-compat@b_3cb1e20f378ce4af76925003ed6fd302/node_modules/@effect/ai-openai-compat/dist/OpenAiClient.js
24478
+ //#region node_modules/.pnpm/@effect+ai-openai-compat@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai-compat/dist/OpenAiClient.js
24432
24479
  var OpenAiClient = class extends Service()("@effect/ai-openai-compat/OpenAiClient") {};
24433
24480
  const RedactedOpenAiHeaders = {
24434
24481
  OpenAiOrganization: "openai-organization",
@@ -24566,7 +24613,7 @@ const decodeChatCompletionSseData = (data) => {
24566
24613
  };
24567
24614
  };
24568
24615
  //#endregion
24569
- //#region node_modules/.pnpm/@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai-compat@b_3cb1e20f378ce4af76925003ed6fd302/node_modules/@effect/ai-openai-compat/dist/internal/utilities.js
24616
+ //#region node_modules/.pnpm/@effect+ai-openai-compat@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai-compat/dist/internal/utilities.js
24570
24617
  const finishReasonMap = {
24571
24618
  content_filter: "content-filter",
24572
24619
  function_call: "tool-calls",
@@ -24581,7 +24628,7 @@ const resolveFinishReason = (finishReason, hasToolCalls) => {
24581
24628
  return reason;
24582
24629
  };
24583
24630
  //#endregion
24584
- //#region node_modules/.pnpm/@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai-compat@b_3cb1e20f378ce4af76925003ed6fd302/node_modules/@effect/ai-openai-compat/dist/OpenAiTelemetry.js
24631
+ //#region node_modules/.pnpm/@effect+ai-openai-compat@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai-compat/dist/OpenAiTelemetry.js
24585
24632
  const addOpenAiRequestAttributes = addSpanAttributes("gen_ai.openai.request", camelToSnake);
24586
24633
  const addOpenAiResponseAttributes = addSpanAttributes("gen_ai.openai.response", camelToSnake);
24587
24634
  const addGenAIAnnotations = dual(2, (span, options) => {
@@ -24592,7 +24639,7 @@ const addGenAIAnnotations = dual(2, (span, options) => {
24592
24639
  }
24593
24640
  });
24594
24641
  //#endregion
24595
- //#region node_modules/.pnpm/@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect+@effect+ai-openai-compat@b_3cb1e20f378ce4af76925003ed6fd302/node_modules/@effect/ai-openai-compat/dist/OpenAiLanguageModel.js
24642
+ //#region node_modules/.pnpm/@effect+ai-openai-compat@4.0.1_effect@4.0.1/node_modules/@effect/ai-openai-compat/dist/OpenAiLanguageModel.js
24596
24643
  var Config = class extends Service()("@effect/ai-openai-compat/OpenAiLanguageModel/Config") {};
24597
24644
  const make = fnUntraced(function* ({ model, config: providerConfig }) {
24598
24645
  const client = yield* OpenAiClient;
@@ -25630,7 +25677,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service()("clanka/Github
25630
25677
  times: 5,
25631
25678
  schedule: min([exponential(150), spaced(5e3)])
25632
25679
  }));
25633
- const semaphore = makeUnsafe$4(1);
25680
+ const semaphore = makeUnsafe$5(1);
25634
25681
  let currentToken = yield* tokenStore.get(STORE_TOKEN_KEY).pipe(catchTag("SchemaError", (error) => logDebug(`Failed to decode persisted GitHub Copilot token, clearing it: ${error.message}`).pipe(andThen(tokenStore.remove(STORE_TOKEN_KEY)), as(none()))), orDie);
25635
25682
  const saveToken = (token) => orDie(tokenStore.set(STORE_TOKEN_KEY, token)).pipe(tap(() => sync(() => {
25636
25683
  currentToken = some(token);
@@ -25772,7 +25819,7 @@ var XaiAuth = class XaiAuth extends Service()("clanka/XaiAuth") {
25772
25819
  times: 5,
25773
25820
  schedule: min([exponential(150), spaced(5e3)])
25774
25821
  }));
25775
- const semaphore = makeUnsafe$4(1);
25822
+ const semaphore = makeUnsafe$5(1);
25776
25823
  let currentToken = yield* tokenStore.get("token").pipe(catchTag("SchemaError", () => tokenStore.remove("token").pipe(as(none()))), orDie);
25777
25824
  const saveToken = (token) => tokenStore.set("token", token).pipe(orDie, tap(() => sync(() => {
25778
25825
  currentToken = some(token);
@@ -25879,11 +25926,11 @@ const modelWebSocket = (model, options) => make$5("xai", model, mergeAll(layer$3
25879
25926
  supportsImages: options?.supportsImages
25880
25927
  }), succeed$4(SummarizerTransform, (effect) => withConfigOverride$1(effect, { max_output_tokens: summarizerMaxOutputTokens })), fresh(layerWebSocketMode)));
25881
25928
  //#endregion
25882
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Logger.js
25929
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Logger.js
25883
25930
  const LogToStderr = LogToStderr$1;
25884
25931
  //#endregion
25885
25932
  //#region package.json
25886
- var version$1 = "0.8.3";
25933
+ var version$1 = "0.8.5";
25887
25934
  //#endregion
25888
25935
  //#region src/cli.ts
25889
25936
  const version = version$1;
@@ -25945,7 +25992,7 @@ const Search = (directory) => unwrap$1(gen(function* () {
25945
25992
  return empty$9;
25946
25993
  }
25947
25994
  const path = yield* Path$3;
25948
- return (yield* promise(() => import("./SemanticSearch-BJGnYhFt.mjs"))).layer({
25995
+ return (yield* promise(() => import("./SemanticSearch-CFB73IPb.mjs"))).layer({
25949
25996
  directory: process.cwd(),
25950
25997
  database: path.join(directory, "search.sqlite")
25951
25998
  }).pipe(provide$3(model$2("text-embedding-3-small", { dimensions: 1536 })), provide$3(layer$5({ apiKey: apiKey.value })));
@@ -25969,7 +26016,7 @@ make$28("clanka", {
25969
26016
  compaction
25970
26017
  }).pipe(withHandler(fnUntraced(function* ({ provider, model: modelRaw, semantic, prompt: nonInteractivePrompt }) {
25971
26018
  const stdio = yield* Stdio;
25972
- const OutputFormatter = yield* promise(() => import("./OutputFormatter-Ch8yFytV.mjs"));
26019
+ const OutputFormatter = yield* promise(() => import("./OutputFormatter-DffD5oxX.mjs"));
25973
26020
  const [model, reasoning] = (yield* match$2(modelRaw, {
25974
26021
  onSome: succeed$2,
25975
26022
  onNone: () => String$4({