alink-cli 0.10.0 → 0.10.2

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.
package/dist/bin.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { $ as make$65, A as withLoggerDisabled, At as matchStatus, B as limitsServices, Bt as post$1, C as update$2, Ct as setHeader, D as compression, Dt as uint8Array$1, Et as text$2, F as schemaHeaders, Ft as appendUrlParams, G as CloseEvent, Gt as setUrl, Ht as setBody, I as schemaSearchParams, It as bodyFormData, Jt as HttpClientErrorSchema, K as SocketError, Kt as DecodeError, L as toURL, Lt as bodyJson, M as ParsedSearchParams, O as cors$1, Ot as urlParams$1, P as schemaCookies, Pt as schemaBodyJson, Q as join$1, Rt as get$4, S as set$2, Sn as __commonJSMin, T as appendPreResponseHandler, Tt as stream, Ut as setHeader$1, Vt as prependUrl, Wt as setHeaders, X as makeWebSocket, Xt as isHttpClientError, Y as make$66, Yt as StatusCodeError, Z as awaitEmpty, Zt as empty$2, _ as get$3, _n as fromInput, _t as mergeCookies, a as layer$43, an as CurrentRedactedNames, b as makeUnsafe$3, bn as hasBody, cn as fromRecordUnsafe, d as HttpClient, dn as jsonUnsafe$1, en as set$3, et as run$4, f as TracerPropagationEnabled, g as transformResponse$1, gn as urlParams, gt as jsonUnsafe, h as retryTransient, hn as uint8Array, ht as isHttpServerResponse, j as HttpServerRequest, k as logger, kt as filterStatusOk, l as serve$1, ln as merge, lt as symbol$1, m as mapRequest, mn as text$1, mt as file, o as HttpServer, on as empty$3, ot as RouteNotFound, p as filterStatusOk$1, pt as empty$1, q as SocketErrorReason, qt as HttpClientError, r as Mime_default, rt as HttpServerError, sn as fromInput$1, t as layerWebSocketConstructor, tt as runtime, u as withLogAddress, un as isHttpBody, ut as toResponse, v as getAndSet, vn as schemaRecord, w as updateAndGet, wn as __require, wt as setHeaders$1, x as modify$2, xn as map$3, xt as schemaJson, y as make$63, yn as toRecord, yt as redirect, zt as make$64 } from "./NodeSocket-CLfrrutd.mjs";
4
- import { $ as decodeUnknownExit, $a as flatMap$1, $d as hasProperty, $l as format$1, $o as scopedWith, $s as TaggedError, $t as Union$1, $u as add$2, A as StructWithRest, Aa as asVoid, Ac as _await, Ai as make$75, An as encodeBase64, Ao as matchEffect, Ar as mapEffect$1, As as withSpan, At as suspend$1, B as Union, Ba as catchTags, Bc as succeed$4, Bi as offerUnsafe, Bn as now$1, Bo as provide$1, Br as provideService$1, Bs as forever$1, Bt as value, C as Number$1, Ca as andThen, Cc as forkUnsafe, Cd as map$6, Cl as CurrentLoggers$1, Cn as parseJson, Co as map$4, Cs as useSpan, Ct as isTrimmed, Cu as flatMapNullishOr, D as String$1, Da as annotateSpans, Dc as MinimumLogLevel, Dd as Number$2, Di as pipeTo, Dn as decodeBase64String, Do as match$2, Dr as make$74, Ds as withFiber$1, Dt as mutable, E as Record, Ea as annotateLogsScoped, Ec as provide$2, Ed as some, Ei as mapEffect$2, Er as isStream, Es as withErrorReporting, Et as makeFilter, Eu as isReadonlyArrayNonEmpty, Fi as failCause$3, Fl as reportCauseUnsafe, Fn as isGreaterThan$1, Fo as onInterrupt, Fr as onExit$1, Fs as snapshotUnsafe, Ft as toJsonSchemaDocument, G as annotateKey, Ga as currentParentSpan, Gc as isFailure, Gi as takeAll, Gl as ParentSpan, Gn as InvalidValue$1, Go as result, Gr as runFoldEffect, Gs as isDoneCause, Gt as toJsonSchemaMultiDocument, Gu as getOrUndefined$2, H as UnknownFromJsonString$1, Hc as fail$4, Hd as toJson, Hi as shutdown$1, Hn as toEpochMillis, Ho as provideService, Hr as runCollect, Hs as passthrough, Ht as toMultiDocumentOpenApi3_1, Hu as fail$1, I as URLFromString, Ia as catchFilter, Ic as isDeferred, Id as isEffect$1, In as isGreaterThanOrEqualTo$1, Io as option, Is as timer, It as toType, Iu as map$7, J as decodeEffect, Ja as ensuring, Ji as shutdown$2, Jl as make$77, Jn as Path, Jo as runForkWith, Js as Clock, K as brand, Ka as die, Kc as isSuccess, Kd as equals, Ki as unbounded$2, Kl as Tracer, Ko as retry, Kr as runForEach, Ks as parse$2, Kt as escapeToken, Ku as isFailure$1, L as Uint8Array$1, La as catchIf, Ld as withFiber, Li as make$78, Ln as isLessThan$1, Lo as orDie, Lr as pipeThroughChannel, Ls as update$3, Lt as withConstructorDefault, M as TaggedStruct, Ma as callback, Md as setStackTraceLimit, Mi as bounded, Mn as encodeHex, Mo as onError, Mr as merge$2, Ms as yieldNow, Mt as toCodecJson, Mu as reverse, N as TemplateLiteral, Na as catchCause, Nc as fail$3, Nd as Prototype, Ni as end, Nn as add$3, No as onExit, Ns as zipWith, Nt as toCodecJsonAST, Nu as sort, O as StringFromUriComponent, Oa as as, Oc as TracerEnabled, Od as make$72, On as decodeBase64Url, Oo as matchCauseEffect, Or as map$8, Ot as optional$3, Ou as map$5, Pa as catchDefect, Pc as failCause$2, Pd as PipeInspectableProto, Pn as formatIso, Ps as counter, Pt as toCodecStringTree, Q as decodeUnknownEffect, Qa as filterOrFail, Qc as StackTrace, Qd as compose$1, Ql as days, Qo as scoped, Qr as toAsyncIterable, Qs as TaggedClass, Qt as isSchemaError, Qu as Service$2, R as Undefined, Ra as catchReason, Rc as make$73, Rd as assignProperty, Ri as offer$1, Rl as sync$1, Rn as make$71, Ro as orElseSucceed, Rs as withAttributes, Rt as withDecodingDefault, S as NullOr, Sa as all, Sc as closeUnsafe, Sd as isSome, Si as filterArray, Sl as ConsoleRef, Sn as onSome, So as makeSpanScoped, Sr as fromQueue, Ss as updateContext, St as isSchema, Su as findLast, T as OptionFromNullOr, Ta as annotateLogs, Tc as makeUnsafe$8, Td as none, Tl as consolePretty$1, Tn as stringifyJson, To as mapError, Tr as groupedWithin, Ts as whileLoop, Tt as make$70, Tu as isArrayNonEmpty, U as Void, Ua as context, Uc as failCause$4, Ud as format, Ui as sliding$1, Ul as MinimumTraceLevel, Un as toUtc, Uo as raceFirst, Ur as runDrain, Us as spaced, Ut as apply, Uu as failVoid, V as Unknown, Va as catch_, Vc as die$1, Vd as NodeInspectSymbol, Vn as toDate, Vo as provideContext, Vr as run$5, Vt as VALID_OPEN_API_COMPONENTS_SCHEMAS_KEY_REGEXP, W as annotate$2, Wa as contextWith, Wc as interrupt$3, Wi as take$1, Wl as NativeSpan, Wn as Forbidden$1, Wo as repeat, Wr as runFold, Ws as catchDone, Wt as toRepresentations, Wu as getOrThrow, X as decodeSync, Xa as fail, Xi as subscribe, Xn as FileSystem, Xs as currentTimeNanos, Y as decodeExit, Ya as exit, Yc as void_$2, Yi as sliding, Yo as runPromiseWith, Ys as currentTimeMillis, Yu as succeed$2, Z as decodeTo, Za as failCause$1, Zc as NoSuchElementError, Zi as unbounded$1, Zo as scope, Zr as takeWhile, Zt as SchemaError, Zu as Reference, _c as unwrap, _d as fromUndefinedOr, _f as identity, _i as forEach$1, _l as map$9, _n as Transformation, _o as logDebug, _s as try_, _t as isMaxLength, _u as ensure, a as Class, aa as join$2, ac as effectContext, ad as getUnsafe$1, af as isTagged, al as findErrorOption, an as isLiteral, ao as forever, ar as debounce, as as succeedSome, at as encodeUnknownExit, b as NonEmptyString, ba as acquireUseRelease, bc as addFinalizerExit, bd as getOrUndefined, bi as mapInput, bl as squash, bn as transformOrFail, bo as logInfo, br as fromIterable$1, bs as uninterruptible, bt as isNonEmpty, bu as findFirst, c as Defect, ca as drop$1, cd as merge$1, cf as cast, ci as has, cl as hasInterrupts, cn as isOptional, co as forkScoped, cr as drain, cs as tap, ct as instanceOf, cu as minutes, d as ErrorClass, da as isEmpty$2, dc as provide, dd as exists, df as constTrue, dl as interruptors, dn as isVoid, do as ignore$1, ds as tapError, dt as isFinite, du as toMillis, ea as makeUnsafe$7, ec as taggedEnum, ed as empty$5, ef as isNotNull, el as combine$1, es as service, et as decodeUnknownOption, eu as fromInput$2, f as Exit, fa as size$2, fc as provideMerge, fd as filter, ff as constUndefined, fl as isCause, fn as resolveAt, fo as ignoreCause, fr as fail$5, fs as tapErrorTag, ft as isGreaterThan, g as Literals, gc as tap$1, gd as fromNullishOr, gi as drain$1, go as log$1, gr as fromAsyncIterable, gs as tryPromise, gt as isLessThanOrEqualTo, gu as empty$4, h as Literal, ha as PlatformError, hc as sync$2, hd as flatten, hf as dual, hn as toEncoded, ho as isEffect, hr as flatMap$2, ht as isLessThan, i as Cause, ic as effect, id as getOrUndefined$1, if as isString, ii as withSpan$1, in as isDeclaration, io as forEach, ir as concat, is as succeedNone, it as encodeUnknownEffect, j as TaggedErrorClass, ja as cached, jc as die$2, jd as getStackTraceLimit, ji as makeUnsafe$5, jl as fnUntraced$1, jn as encodeBase64Url, jo as never, jr as mapError$1, js as withTracerEnabled, jt as tag, ju as reduce, k as Struct, ka as asSome, kc as TracerTimingEnabled, ki as splitLines, kn as decodeBase64UrlString, kr as mapArrayEffect, ks as withParentSpan, kt as optionalKey, ku as match, l as Duration, la as empty$6, lc as launch, ld as omit, lf as compose, li as invalidate, ll as hasInterruptsOnly, ln as isSuspend, lo as fromResult, lr as empty$7, ls as tapCause, lt as is, lu as nanos, m as Int, mc as succeedContext, md as flatMap$3, mf as constant, mn as resolveIdentifier, mo as interruptible, mr as filter$2, ms as timeoutOption, mt as isInt, mu as allocate, n as ArraySchema, na as getCurrent, nc as build, nd as getOption, nf as isNullish, ni as transformPull, nn as getAST, no as fn, nr as catchCause$1, ns as sleep, nt as encodeEffect, nu as hours, o as DateTimeUtc, oa as runIn, oc as effectDiscard, od as make$68, on as isNull, oo as forkChild, or as decodeText, os as suspend, ot as fieldsAssign, ou as max, p as Finite, pa as toArray, pc as succeed$3, pd as firstSomeOf, pf as constVoid, pl as isFailReason, pn as resolveDescription, po as interrupt$1, pr as failCause$5, ps as timeout, pt as isGreaterThanOrEqualTo, pu as zero, q as declare, qc as match$3, qi as publish, ql as externalSpan, qn as makeFormatterDefault, qo as runFork, qr as runForEachArray, qs as round, qt as assign, qu as isSuccess$1, r as Boolean$1, ra as interrupt$4, rc as buildWithMemoMap, rd as getOrElse$1, rf as isObject$1, ri as unwrap$1, rl as fail$2, rn as getLastEncoding, ro as fnUntraced, rr as changes, rs as succeed$1, rt as encodeSync, s as DateTimeUtcFromString, sa as append$1, sc as empty$8, sd as makeUnsafe$4, si as get$6, sl as hasDies, sn as isObjects, so as forkIn, ss as sync, st as fromJsonString, su as millis, t as Any, ta as await_, tc as CurrentMemoMap, td as get$5, tf as isNotUndefined, to as flatten$1, tr as callback$1, ts as serviceOption, tt as encode$1, tu as fromInputUnsafe, u as DurationFromMillis, ua as head, uc as mergeAll, ud as contains, uf as constFalse, ui as make$69, ul as interrupt$2, un as isUnion, uo as gen, ur as encodeText, us as tapDefect, ut as isBetween, uu as seconds, v as Never, va as Transaction, vc as Scope, vd as getOrElse, vf as pipe, vl as pretty, vo as logError, vr as fromEffect, vs as tx, vt as isMaxProperties, vu as filter$1, w as Option, wa as annotateCurrentSpan, wc as make$76, wd as match$1, wi as fromTransform, wr as fromSubscription, ws as void_$1, wu as fromIterable, x as Null, xa as addFinalizer, xc as close, xd as isNone, xi as decodeText$1, xn as trim, xo as logWarning$1, xr as fromPubSub, xt as isPattern, xu as findFirstIndex, y as NonEmptyArray, ya as acquireRelease, yc as addFinalizer$1, yd as getOrNull, yf as pipeArguments, yl as prettyErrors, yn as transform$1, yo as logFatal, yr as fromEffectSchedule, ys as txRetry, yt as isMinLength, yu as filterMap, z as UndefinedOr, za as catchTag, zi as offerAll, zl as tracerLogger$1, zn as makeUnsafe$6, zo as promise, zr as provideContext$1, zs as addDelay, zt as make$67 } from "./Schema-B4KtKnpr.mjs";
5
- import { a as isQuitError, g as ChildProcessSpawner, h as make$79, i as Terminal$1, l as Crypto, n as layer$44, o as Stdio, r as QuitError, s as make$80, u as fromReadable } from "./NodeServices-BtcL7AtO.mjs";
3
+ import { $ as make$66, A as withLoggerDisabled, At as matchStatus, B as limitsServices, Bt as post$1, C as update$2, Ct as setHeader, D as compression, Dt as uint8Array$1, Et as text$2, F as schemaHeaders, Ft as appendUrlParams, G as CloseEvent, Gt as setUrl, Ht as setBody, I as schemaSearchParams, It as bodyFormData, Jt as HttpClientErrorSchema, K as SocketError, Kt as DecodeError, L as toURL, Lt as bodyJson, M as ParsedSearchParams, O as cors$1, Ot as urlParams$1, P as schemaCookies, Pt as schemaBodyJson, Q as join$1, Rt as get$4, S as set$2, Sn as __commonJSMin, T as appendPreResponseHandler, Tt as stream, Ut as setHeader$1, Vt as prependUrl, Wt as setHeaders, X as makeWebSocket, Xt as isHttpClientError, Y as make$67, Yt as StatusCodeError, Z as awaitEmpty, Zt as empty$2, _ as get$3, _n as fromInput, _t as mergeCookies, a as layer$44, an as CurrentRedactedNames, b as makeUnsafe$3, bn as hasBody, cn as fromRecordUnsafe, d as HttpClient, dn as jsonUnsafe$1, en as set$3, et as run$4, f as TracerPropagationEnabled, g as transformResponse$1, gn as urlParams, gt as jsonUnsafe, h as retryTransient, hn as uint8Array, ht as isHttpServerResponse, j as HttpServerRequest, k as logger, kt as filterStatusOk, l as serve$1, ln as merge, lt as symbol$1, m as mapRequest, mn as text$1, mt as file, o as HttpServer, on as empty$3, ot as RouteNotFound, p as filterStatusOk$1, pt as empty$1, q as SocketErrorReason, qt as HttpClientError, r as Mime_default, rt as HttpServerError, sn as fromInput$1, t as layerWebSocketConstructor, tt as runtime, u as withLogAddress, un as isHttpBody, ut as toResponse, v as getAndSet, vn as schemaRecord, w as updateAndGet, wn as __require, wt as setHeaders$1, x as modify$2, xn as map$3, xt as schemaJson, y as make$64, yn as toRecord, yt as redirect, zt as make$65 } from "./NodeSocket-CLfrrutd.mjs";
4
+ import { $ as decodeUnknownExit, $a as flatMap$1, $d as hasProperty, $l as format$1, $o as scopedWith, $s as TaggedError, $t as Union$1, $u as add$2, A as StructWithRest, Aa as asVoid, Ac as _await, Ai as make$76, An as encodeBase64, Ao as matchEffect, Ar as mapEffect$1, As as withSpan, At as suspend$1, B as Union, Ba as catchTags, Bc as succeed$4, Bi as offerUnsafe, Bn as now$1, Bo as provide$1, Br as provideService$1, Bs as forever$1, Bt as value, C as Number$1, Ca as andThen, Cc as forkUnsafe, Cd as map$6, Cl as CurrentLoggers$1, Cn as parseJson, Co as map$4, Cs as useSpan, Ct as isTrimmed, Cu as flatMapNullishOr, D as String$1, Da as annotateSpans, Dc as MinimumLogLevel, Dd as Number$2, Di as pipeTo, Dn as decodeBase64String, Do as match$2, Dr as make$75, Ds as withFiber$1, Dt as mutable, E as Record, Ea as annotateLogsScoped, Ec as provide$2, Ed as some, Ei as mapEffect$2, Er as isStream, Es as withErrorReporting, Et as makeFilter, Eu as isReadonlyArrayNonEmpty, Fi as failCause$3, Fl as reportCauseUnsafe, Fn as isGreaterThan$1, Fo as onInterrupt, Fr as onExit$1, Fs as snapshotUnsafe, Ft as toJsonSchemaDocument, G as annotateKey, Ga as currentParentSpan, Gc as isFailure, Gi as takeAll, Gl as ParentSpan, Gn as InvalidValue$1, Go as result, Gr as runFoldEffect, Gs as isDoneCause, Gt as toJsonSchemaMultiDocument, Gu as getOrUndefined$2, H as UnknownFromJsonString$1, Hc as fail$4, Hd as toJson, Hi as shutdown$1, Hn as toEpochMillis, Ho as provideService, Hr as runCollect, Hs as passthrough, Ht as toMultiDocumentOpenApi3_1, Hu as fail$1, I as URLFromString, Ia as catchFilter, Ic as isDeferred, Id as isEffect$1, In as isGreaterThanOrEqualTo$1, Io as option, Is as timer, It as toType, Iu as map$7, J as decodeEffect, Ja as ensuring, Ji as shutdown$2, Jl as make$78, Jn as Path, Jo as runForkWith, Js as Clock, K as brand, Ka as die, Kc as isSuccess, Kd as equals, Ki as unbounded$2, Kl as Tracer, Ko as retry, Kr as runForEach, Ks as parse$2, Kt as escapeToken, Ku as isFailure$1, L as Uint8Array$1, La as catchIf, Ld as withFiber, Li as make$79, Ln as isLessThan$1, Lo as orDie, Lr as pipeThroughChannel, Ls as update$3, Lt as withConstructorDefault, M as TaggedStruct, Ma as callback, Md as setStackTraceLimit, Mi as bounded, Mn as encodeHex, Mo as onError, Mr as merge$2, Ms as yieldNow, Mt as toCodecJson, Mu as reverse, N as TemplateLiteral, Na as catchCause, Nc as fail$3, Nd as Prototype, Ni as end, Nn as add$3, No as onExit, Ns as zipWith, Nt as toCodecJsonAST, Nu as sort, O as StringFromUriComponent, Oa as as, Oc as TracerEnabled, Od as make$73, On as decodeBase64Url, Oo as matchCauseEffect, Or as map$8, Ot as optional$3, Ou as map$5, Pa as catchDefect, Pc as failCause$2, Pd as PipeInspectableProto, Pn as formatIso, Ps as counter, Pt as toCodecStringTree, Q as decodeUnknownEffect, Qa as filterOrFail, Qc as StackTrace, Qd as compose$1, Ql as days, Qo as scoped, Qr as toAsyncIterable, Qs as TaggedClass, Qt as isSchemaError, Qu as Service$2, R as Undefined, Ra as catchReason, Rc as make$74, Rd as assignProperty, Ri as offer$1, Rl as sync$1, Rn as make$72, Ro as orElseSucceed, Rs as withAttributes, Rt as withDecodingDefault, S as NullOr, Sa as all, Sc as closeUnsafe, Sd as isSome, Si as filterArray, Sl as ConsoleRef, Sn as onSome, So as makeSpanScoped, Sr as fromQueue, Ss as updateContext, St as isSchema, Su as findLast, T as OptionFromNullOr, Ta as annotateLogs, Tc as makeUnsafe$8, Td as none, Tl as consolePretty$1, Tn as stringifyJson, To as mapError, Tr as groupedWithin, Ts as whileLoop, Tt as make$71, Tu as isArrayNonEmpty, U as Void, Ua as context, Uc as failCause$4, Ud as format, Ui as sliding$1, Ul as MinimumTraceLevel, Un as toUtc, Uo as raceFirst, Ur as runDrain, Us as spaced, Ut as apply, Uu as failVoid, V as Unknown, Va as catch_, Vc as die$1, Vd as NodeInspectSymbol, Vn as toDate, Vo as provideContext, Vr as run$5, Vt as VALID_OPEN_API_COMPONENTS_SCHEMAS_KEY_REGEXP, W as annotate$2, Wa as contextWith, Wc as interrupt$3, Wi as take$1, Wl as NativeSpan, Wn as Forbidden$1, Wo as repeat, Wr as runFold, Ws as catchDone, Wt as toRepresentations, Wu as getOrThrow, X as decodeSync, Xa as fail, Xi as subscribe, Xn as FileSystem, Xs as currentTimeNanos, Y as decodeExit, Ya as exit, Yc as void_$2, Yi as sliding, Yo as runPromiseWith, Ys as currentTimeMillis, Yu as succeed$2, Z as decodeTo, Za as failCause$1, Zc as NoSuchElementError, Zi as unbounded$1, Zo as scope, Zr as takeWhile, Zt as SchemaError, Zu as Reference, _c as unwrap, _d as fromUndefinedOr, _f as identity, _i as forEach$1, _l as map$9, _n as Transformation, _o as logDebug, _s as try_, _t as isMaxLength, _u as ensure, a as Class, aa as join$2, ac as effectContext, ad as getUnsafe$1, af as isTagged, al as findErrorOption, an as isLiteral, ao as forever, ar as debounce, as as succeedSome, at as encodeUnknownExit, b as NonEmptyString, ba as acquireUseRelease, bc as addFinalizerExit, bd as getOrUndefined, bi as mapInput, bl as squash, bn as transformOrFail, bo as logInfo, br as fromIterable$1, bs as uninterruptible, bt as isNonEmpty, bu as findFirst, c as Defect, ca as drop$1, cd as merge$1, cf as cast, ci as has, cl as hasInterrupts, cn as isOptional, co as forkScoped, cr as drain, cs as tap, ct as instanceOf, cu as minutes, d as ErrorClass, da as isEmpty$2, dc as provide, dd as exists, df as constTrue, dl as interruptors, dn as isVoid, do as ignore$1, ds as tapError, dt as isFinite, du as toMillis, ea as makeUnsafe$7, ec as taggedEnum, ed as empty$5, ef as isNotNull, el as combine$1, es as service, et as decodeUnknownOption, eu as fromInput$2, f as Exit, fa as size$2, fc as provideMerge, fd as filter, ff as constUndefined, fl as isCause, fn as resolveAt, fo as ignoreCause, fr as fail$5, fs as tapErrorTag, ft as isGreaterThan, g as Literals, gc as tap$1, gd as fromNullishOr, gi as drain$1, go as log$1, gr as fromAsyncIterable, gs as tryPromise, gt as isLessThanOrEqualTo, gu as empty$4, h as Literal, ha as PlatformError, hc as sync$2, hd as flatten, hf as dual, hn as toEncoded, ho as isEffect, hr as flatMap$2, ht as isLessThan, i as Cause, ic as effect, id as getOrUndefined$1, if as isString, ii as withSpan$1, in as isDeclaration, io as forEach, ir as concat, is as succeedNone, it as encodeUnknownEffect, j as TaggedErrorClass, ja as cached, jc as die$2, jd as getStackTraceLimit, ji as makeUnsafe$5, jl as fnUntraced$1, jn as encodeBase64Url, jo as never, jr as mapError$1, js as withTracerEnabled, jt as tag, ju as reduce, k as Struct, ka as asSome, kc as TracerTimingEnabled, ki as splitLines, kn as decodeBase64UrlString, kr as mapArrayEffect, ks as withParentSpan, kt as optionalKey, ku as match, l as Duration, la as empty$6, lc as launch, ld as omit, lf as compose, li as invalidate, ll as hasInterruptsOnly, ln as isSuspend, lo as fromResult, lr as empty$7, ls as tapCause, lt as is, lu as nanos, m as Int, mc as succeedContext, md as flatMap$3, mf as constant, mn as resolveIdentifier, mo as interruptible, mr as filter$2, ms as timeoutOption, mt as isInt, mu as allocate, n as ArraySchema, na as getCurrent, nc as build, nd as getOption, nf as isNullish, ni as transformPull, nn as getAST, no as fn, nr as catchCause$1, ns as sleep, nt as encodeEffect, nu as hours, o as DateTimeUtc, oa as runIn, oc as effectDiscard, od as make$69, on as isNull, oo as forkChild, or as decodeText, os as suspend, ot as fieldsAssign, ou as max, p as Finite, pa as toArray, pc as succeed$3, pd as firstSomeOf, pf as constVoid, pl as isFailReason, pn as resolveDescription, po as interrupt$1, pr as failCause$5, ps as timeout, pt as isGreaterThanOrEqualTo, pu as zero, q as declare, qc as match$3, qi as publish, ql as externalSpan, qn as makeFormatterDefault, qo as runFork, qr as runForEachArray, qs as round, qt as assign, qu as isSuccess$1, r as Boolean$1, ra as interrupt$4, rc as buildWithMemoMap, rd as getOrElse$1, rf as isObject$1, ri as unwrap$1, rl as fail$2, rn as getLastEncoding, ro as fnUntraced, rr as changes, rs as succeed$1, rt as encodeSync, s as DateTimeUtcFromString, sa as append$1, sc as empty$8, sd as makeUnsafe$4, si as get$6, sl as hasDies, sn as isObjects, so as forkIn, ss as sync, st as fromJsonString, su as millis, t as Any, ta as await_, tc as CurrentMemoMap, td as get$5, tf as isNotUndefined, to as flatten$1, tr as callback$1, ts as serviceOption, tt as encode$1, tu as fromInputUnsafe, u as DurationFromMillis, ua as head, uc as mergeAll, ud as contains, uf as constFalse, ui as make$70, ul as interrupt$2, un as isUnion, uo as gen, ur as encodeText, us as tapDefect, ut as isBetween, uu as seconds, v as Never, va as Transaction, vc as Scope, vd as getOrElse, vf as pipe, vl as pretty, vo as logError, vr as fromEffect, vs as tx, vt as isMaxProperties, vu as filter$1, w as Option, wa as annotateCurrentSpan, wc as make$77, wd as match$1, wi as fromTransform, wr as fromSubscription, ws as void_$1, wu as fromIterable, x as Null, xa as addFinalizer, xc as close, xd as isNone, xi as decodeText$1, xn as trim, xo as logWarning$1, xr as fromPubSub, xt as isPattern, xu as findFirstIndex, y as NonEmptyArray, ya as acquireRelease, yc as addFinalizer$1, yd as getOrNull, yf as pipeArguments, yl as prettyErrors, yn as transform$1, yo as logFatal, yr as fromEffectSchedule, ys as txRetry, yt as isMinLength, yu as filterMap, z as UndefinedOr, za as catchTag, zi as offerAll, zl as tracerLogger$1, zn as makeUnsafe$6, zo as promise, zr as provideContext$1, zs as addDelay, zt as make$68 } from "./Schema-B4KtKnpr.mjs";
5
+ import { a as isQuitError, g as ChildProcessSpawner, h as make$80, i as Terminal$1, l as Crypto, n as layer$45, o as Stdio, r as QuitError, s as make$81, u as fromReadable } from "./NodeServices-BtcL7AtO.mjs";
6
6
  import { _ as withDefault$2, a as all$1, c as logLevel, d as option$1, f as port, g as url$1, i as TrueValues, l as map$10, m as string$4, n as FalseValues, o as boolean$3, p as schema$1, r as Record$1, s as int, t as Boolean$2, u as number } from "./Config-CxDW-52j.mjs";
7
- import { c as getOption$1, d as make$81, f as makeWith$1, l as invalidate$1, n as SqlClient, p as set$4, s as get$7, u as keys } from "./SqlClient-BQM_tAo_.mjs";
7
+ import { c as getOption$1, d as make$82, f as makeWith$1, l as invalidate$1, n as SqlClient, p as set$4, s as get$7, u as keys } from "./SqlClient-BQM_tAo_.mjs";
8
8
  import * as NodeModule from "node:module";
9
9
  import * as NodeChildProcess from "node:child_process";
10
10
  import * as NodeCrypto from "node:crypto";
@@ -5881,7 +5881,7 @@ const map$2 = /*#__PURE__*/ dual(2, (self, f) => flatMap(self, (a) => succeed(f(
5881
5881
  * @category constructors
5882
5882
  * @since 4.0.0
5883
5883
  */
5884
- const password = (options) => basePrompt(options, "password").pipe(map$2(make$67));
5884
+ const password = (options) => basePrompt(options, "password").pipe(map$2(make$68));
5885
5885
  /**
5886
5886
  * Runs a prompt by reading terminal input and rendering prompt frames until the
5887
5887
  * prompt submits a value.
@@ -10589,7 +10589,7 @@ const isCommand = (u) => hasProperty(u, TypeId$14);
10589
10589
  * @category constructors
10590
10590
  * @since 4.0.0
10591
10591
  */
10592
- const make$62 = (name, config, handler) => {
10592
+ const make$63 = (name, config, handler) => {
10593
10593
  return makeCommand({
10594
10594
  name,
10595
10595
  config: parseConfig(config ?? {}),
@@ -11085,7 +11085,7 @@ const runWith = (command, config) => {
11085
11085
  }
11086
11086
  const services = match$1(logLevel, {
11087
11087
  onNone: () => empty$5(),
11088
- onSome: (level) => make$68(MinimumLogLevel, level)
11088
+ onSome: (level) => make$69(MinimumLogLevel, level)
11089
11089
  });
11090
11090
  yield* provideContext(program, services);
11091
11091
  }, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$2(error) : fail$1(error), (error) => andThen(showHelp(command, error), fail(error))), catchFilter((e) => isQuitError(e) ? succeed$2(e) : fail$1(e), (_) => interrupt$1));
@@ -11103,7 +11103,7 @@ const closeServer = (server) => {
11103
11103
  * NetService - Service tag for startup networking helpers.
11104
11104
  */
11105
11105
  var NetService = class extends Service$2()("@t3tools/shared/Net/NetService") {};
11106
- const make$61 = () => {
11106
+ const make$62 = () => {
11107
11107
  /**
11108
11108
  * Returns true when a TCP server can bind to {host, port}.
11109
11109
  * `EADDRNOTAVAIL` is treated as available so IPv6-absent hosts don't fail
@@ -11212,7 +11212,7 @@ const make$61 = () => {
11212
11212
  })
11213
11213
  };
11214
11214
  };
11215
- const layer$42 = sync$2(NetService, make$61);
11215
+ const layer$43 = sync$2(NetService, make$62);
11216
11216
  //#endregion
11217
11217
  //#region package.json
11218
11218
  var version = "0.0.31";
@@ -12087,7 +12087,7 @@ function parse$1(input) {
12087
12087
  const FULL_PATH_REGEXP = /^https?:\/\/.*?\//;
12088
12088
  const OPTIONAL_PARAM_REGEXP = /(\/:[^/()]*?)\?(\/?)/;
12089
12089
  /** @internal */
12090
- const make$60 = (options = {}) => new RouterImpl(options);
12090
+ const make$61 = (options = {}) => new RouterImpl(options);
12091
12091
  var RouterImpl = class {
12092
12092
  constructor(options = {}) {
12093
12093
  this.options = {
@@ -12606,7 +12606,7 @@ const httpMethods = [
12606
12606
  * @since 1.0.0
12607
12607
  * @category constructors
12608
12608
  */
12609
- const make$59 = make$60;
12609
+ const make$60 = make$61;
12610
12610
  //#endregion
12611
12611
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/unstable/http/HttpRouter.js
12612
12612
  /**
@@ -12641,8 +12641,8 @@ const HttpRouter = /*#__PURE__*/ Service$2("effect/http/HttpRouter");
12641
12641
  * @category constructors
12642
12642
  * @since 4.0.0
12643
12643
  */
12644
- const make$58 = /*#__PURE__*/ gen(function* () {
12645
- const router = make$59(yield* RouterConfig);
12644
+ const make$59 = /*#__PURE__*/ gen(function* () {
12645
+ const router = make$60(yield* RouterConfig);
12646
12646
  const middleware = /* @__PURE__ */ new Set();
12647
12647
  const addAll = (routes) => contextWith((context) => {
12648
12648
  const middleware = getMiddleware(context);
@@ -12808,7 +12808,7 @@ const add$1 = (method, path, handler, options) => use((router) => router.add(met
12808
12808
  * @category layers
12809
12809
  * @since 4.0.0
12810
12810
  */
12811
- const layer$41 = /*#__PURE__*/ effect(HttpRouter)(make$58);
12811
+ const layer$42 = /*#__PURE__*/ effect(HttpRouter)(make$59);
12812
12812
  const RouteTypeId = "~effect/http/HttpRouter/Route";
12813
12813
  const makeRoute = (options) => ({
12814
12814
  ...options,
@@ -12992,7 +12992,7 @@ const cors = (options) => middleware(cors$1(options), { global: true });
12992
12992
  const serve = (appLayer, options) => {
12993
12993
  let middleware = options?.middleware;
12994
12994
  if (options?.disableLogger !== true) middleware = middleware ? compose(middleware, logger) : logger;
12995
- const RouterLayer = options?.routerConfig ? provide(layer$41, succeed$3(RouterConfig)(options.routerConfig)) : layer$41;
12995
+ const RouterLayer = options?.routerConfig ? provide(layer$42, succeed$3(RouterConfig)(options.routerConfig)) : layer$42;
12996
12996
  return gen(function* () {
12997
12997
  const handler = (yield* HttpRouter).asHttpEffect();
12998
12998
  return middleware ? serve$1(handler, middleware) : serve$1(handler);
@@ -13099,7 +13099,7 @@ function makeProto$4(options) {
13099
13099
  * @category constructors
13100
13100
  * @since 4.0.0
13101
13101
  */
13102
- const make$57 = (method) => (identifier, path, options) => {
13102
+ const make$58 = (method) => (identifier, path, options) => {
13103
13103
  const disableCodecs = options?.disableCodecs ?? false;
13104
13104
  const transformStringTree = disableCodecs ? identity : toCodecStringTree;
13105
13105
  return makeProto$4({
@@ -13240,15 +13240,15 @@ function transformPayload(schema, method) {
13240
13240
  * @category constructors
13241
13241
  * @since 4.0.0
13242
13242
  */
13243
- const get$2 = /*#__PURE__*/ make$57("GET");
13243
+ const get$2 = /*#__PURE__*/ make$58("GET");
13244
13244
  /**
13245
13245
  * Creates a `POST` endpoint declaration.
13246
13246
  *
13247
13247
  * @category constructors
13248
13248
  * @since 4.0.0
13249
13249
  */
13250
- const post = /*#__PURE__*/ make$57("POST");
13251
- const del = /*#__PURE__*/ make$57("DELETE");
13250
+ const post = /*#__PURE__*/ make$58("POST");
13251
+ const del = /*#__PURE__*/ make$58("DELETE");
13252
13252
  //#endregion
13253
13253
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/unstable/httpapi/HttpApi.js
13254
13254
  const TypeId$11 = "~effect/httpapi/HttpApi";
@@ -13323,7 +13323,7 @@ const makeProto$3 = (options) => {
13323
13323
  * @category constructors
13324
13324
  * @since 4.0.0
13325
13325
  */
13326
- const make$56 = (identifier) => makeProto$3({
13326
+ const make$57 = (identifier) => makeProto$3({
13327
13327
  identifier,
13328
13328
  groups: {},
13329
13329
  annotations: empty$5()
@@ -13462,7 +13462,7 @@ const makeProto$2 = (options) => {
13462
13462
  * @category constructors
13463
13463
  * @since 4.0.0
13464
13464
  */
13465
- const make$55 = (identifier, options) => makeProto$2({
13465
+ const make$56 = (identifier, options) => makeProto$2({
13466
13466
  identifier,
13467
13467
  topLevel: options?.topLevel ?? false,
13468
13468
  endpoints: {},
@@ -16182,11 +16182,11 @@ const RelayHealthResponse = Struct({
16182
16182
  ok: Boolean$1,
16183
16183
  service: Literal("relay")
16184
16184
  });
16185
- const RelayHealthGroup = make$55("health").add(get$2("health", "/health", {
16185
+ const RelayHealthGroup = make$56("health").add(get$2("health", "/health", {
16186
16186
  success: RelayHealthResponse,
16187
16187
  error: RelayInternalError
16188
16188
  }).annotate(Summary, "Check relay health")).annotate(Description, "Service health and readiness.");
16189
- const RelayMetadataGroup = make$55("metadata").add(get$2("authorizationServer", "/.well-known/oauth-authorization-server", { success: RelayAuthorizationServerMetadata }).annotate(Summary, "Read OAuth authorization-server metadata"), get$2("protectedResource", "/.well-known/oauth-protected-resource", { success: RelayProtectedResourceMetadata }).annotate(Summary, "Read OAuth protected-resource metadata")).annotate(Description, "OAuth and DPoP discovery metadata.");
16189
+ const RelayMetadataGroup = make$56("metadata").add(get$2("authorizationServer", "/.well-known/oauth-authorization-server", { success: RelayAuthorizationServerMetadata }).annotate(Summary, "Read OAuth authorization-server metadata"), get$2("protectedResource", "/.well-known/oauth-protected-resource", { success: RelayProtectedResourceMetadata }).annotate(Summary, "Read OAuth protected-resource metadata")).annotate(Description, "OAuth and DPoP discovery metadata.");
16190
16190
  const RelayRegisterDeviceEndpoint = post("registerDevice", "/v1/mobile/devices", {
16191
16191
  headers: RelayDpopRequestHeaders,
16192
16192
  payload: RelayDeviceRegistrationRequest,
@@ -16210,8 +16210,8 @@ const RelayUnregisterDeviceEndpoint = del("unregisterDevice", "/v1/mobile/device
16210
16210
  success: RelayOkResponse,
16211
16211
  error: RelayAuthAndInternalErrors
16212
16212
  }).annotate(Summary, "Unregister a mobile device");
16213
- const RelayMobileGroup = make$55("mobile").add(RelayRegisterDeviceEndpoint, RelayRegisterLiveActivityEndpoint, RelayAgentActivitySnapshotEndpoint, RelayUnregisterDeviceEndpoint).annotate(Description, "Mobile push-notification and Live Activity registration.").middleware(RelayDpopClientAuth);
16214
- const RelayClientGroup = make$55("client").add(get$2("listEnvironments", "/v1/environments", {
16213
+ const RelayMobileGroup = make$56("mobile").add(RelayRegisterDeviceEndpoint, RelayRegisterLiveActivityEndpoint, RelayAgentActivitySnapshotEndpoint, RelayUnregisterDeviceEndpoint).annotate(Description, "Mobile push-notification and Live Activity registration.").middleware(RelayDpopClientAuth);
16214
+ const RelayClientGroup = make$56("client").add(get$2("listEnvironments", "/v1/environments", {
16215
16215
  headers: RelayBearerRequestHeaders,
16216
16216
  success: RelayListEnvironmentsResponse,
16217
16217
  error: RelayAuthAndInternalErrors
@@ -16246,7 +16246,7 @@ const RelayExchangeDpopAccessTokenEndpoint = post("exchangeDpopAccessToken", "/v
16246
16246
  success: RelayDpopAccessTokenResponse,
16247
16247
  error: RelayAuthAndInternalErrors
16248
16248
  }).annotate(Summary, "Exchange a Clerk token for a DPoP access token").annotate(Description, "Bootstrap endpoint. Send the DPoP proof JWT in the dpop header and the Clerk token in subject_token. The returned access token is bound to the proof key.");
16249
- const RelayTokenGroup = make$55("token").add(RelayExchangeDpopAccessTokenEndpoint).annotate(Description, "OAuth token exchange for DPoP-bound client access.");
16249
+ const RelayTokenGroup = make$56("token").add(RelayExchangeDpopAccessTokenEndpoint).annotate(Description, "OAuth token exchange for DPoP-bound client access.");
16250
16250
  const RelayConnectEnvironmentEndpoint = post("connectEnvironment", "/v1/environments/:environmentId/connect", {
16251
16251
  headers: RelayDpopRequestHeaders,
16252
16252
  params: Struct({ environmentId: EnvironmentId }),
@@ -16260,8 +16260,8 @@ const RelayGetEnvironmentStatusEndpoint = post("getEnvironmentStatus", "/v1/envi
16260
16260
  success: RelayEnvironmentStatusResponse,
16261
16261
  error: RelayEnvironmentConnectErrors
16262
16262
  }).annotate(Summary, "Check environment status");
16263
- const RelayDpopClientGroup = make$55("dpopClient").add(RelayConnectEnvironmentEndpoint, RelayGetEnvironmentStatusEndpoint).annotate(Description, "DPoP-authenticated client access to linked environments.").middleware(RelayDpopClientAuth);
16264
- const RelayServerGroup = make$55("server").add(post("publishAgentActivity", "/v1/environments/:environmentId/threads/:threadId/agent-activity", {
16263
+ const RelayDpopClientGroup = make$56("dpopClient").add(RelayConnectEnvironmentEndpoint, RelayGetEnvironmentStatusEndpoint).annotate(Description, "DPoP-authenticated client access to linked environments.").middleware(RelayDpopClientAuth);
16264
+ const RelayServerGroup = make$56("server").add(post("publishAgentActivity", "/v1/environments/:environmentId/threads/:threadId/agent-activity", {
16265
16265
  params: Struct({
16266
16266
  environmentId: EnvironmentId,
16267
16267
  threadId: ThreadId
@@ -16270,7 +16270,7 @@ const RelayServerGroup = make$55("server").add(post("publishAgentActivity", "/v1
16270
16270
  success: RelayPublishResponse,
16271
16271
  error: RelayAgentActivityPublishErrors
16272
16272
  }).annotate(Summary, "Publish agent activity")).annotate(Description, "Environment-authenticated activity publication.").middleware(RelayEnvironmentAuth);
16273
- make$56("RelayApi").add(RelayHealthGroup, RelayMetadataGroup, RelayMobileGroup, RelayClientGroup, RelayTokenGroup, RelayDpopClientGroup, RelayServerGroup).annotate(Title$1, "AgentLink Relay API").annotate(Version, "1.0.0").annotate(Description, "Control-plane API for linking T3 environments, connecting authorized clients, and publishing agent activity.");
16273
+ make$57("RelayApi").add(RelayHealthGroup, RelayMetadataGroup, RelayMobileGroup, RelayClientGroup, RelayTokenGroup, RelayDpopClientGroup, RelayServerGroup).annotate(Title$1, "AgentLink Relay API").annotate(Version, "1.0.0").annotate(Description, "Control-plane API for linking T3 environments, connecting authorized clients, and publishing agent activity.");
16274
16274
  //#endregion
16275
16275
  //#region ../t3-contracts/src/environmentHttp.ts
16276
16276
  const OptionalBearerHeaders = Struct({
@@ -16448,8 +16448,8 @@ const EnvironmentCloudPreferencesRequest = Struct({ publishAgentActivity: Boolea
16448
16448
  const AuthPairingLinkRevokeResult = Struct({ revoked: Boolean$1 });
16449
16449
  const AuthClientSessionRevokeResult = Struct({ revoked: Boolean$1 });
16450
16450
  const AuthOtherClientSessionsRevokeResult = Struct({ revokedCount: Number$1 });
16451
- var EnvironmentMetadataHttpApi = class extends make$55("metadata").add(get$2("descriptor", "/.well-known/t3/environment", { success: ExecutionEnvironmentDescriptor })) {};
16452
- var EnvironmentAuthHttpApi = class extends make$55("auth").add(get$2("session", "/api/auth/session", {
16451
+ var EnvironmentMetadataHttpApi = class extends make$56("metadata").add(get$2("descriptor", "/.well-known/t3/environment", { success: ExecutionEnvironmentDescriptor })) {};
16452
+ var EnvironmentAuthHttpApi = class extends make$56("auth").add(get$2("session", "/api/auth/session", {
16453
16453
  headers: OptionalBearerHeaders,
16454
16454
  success: AuthSessionState,
16455
16455
  error: [EnvironmentInternalError]
@@ -16495,7 +16495,7 @@ var EnvironmentAuthHttpApi = class extends make$55("auth").add(get$2("session",
16495
16495
  error: EnvironmentScopedOperationErrors
16496
16496
  }).middleware(EnvironmentAuthenticatedAuth)) {};
16497
16497
  const EnvironmentOrchestrationThreadSnapshotParams = Struct({ threadId: ThreadId });
16498
- var EnvironmentOrchestrationHttpApi = class extends make$55("orchestration").add(get$2("snapshot", "/api/orchestration/snapshot", {
16498
+ var EnvironmentOrchestrationHttpApi = class extends make$56("orchestration").add(get$2("snapshot", "/api/orchestration/snapshot", {
16499
16499
  headers: OptionalBearerHeaders,
16500
16500
  success: OrchestrationReadModel,
16501
16501
  error: EnvironmentOrchestrationSnapshotErrors
@@ -16514,7 +16514,7 @@ var EnvironmentOrchestrationHttpApi = class extends make$55("orchestration").add
16514
16514
  success: DispatchResult,
16515
16515
  error: EnvironmentOrchestrationDispatchErrors
16516
16516
  }).middleware(EnvironmentAuthenticatedAuth)) {};
16517
- var EnvironmentConnectHttpApi = class extends make$55("connect").add(post("linkProof", "/api/connect/link-proof", {
16517
+ var EnvironmentConnectHttpApi = class extends make$56("connect").add(post("linkProof", "/api/connect/link-proof", {
16518
16518
  headers: OptionalBearerHeaders,
16519
16519
  payload: RelayLinkProofRequest,
16520
16520
  success: RelayEnvironmentLinkProof,
@@ -16550,7 +16550,7 @@ var EnvironmentConnectHttpApi = class extends make$55("connect").add(post("linkP
16550
16550
  success: RelayEnvironmentMintResponse,
16551
16551
  error: EnvironmentHttpCloudErrors
16552
16552
  })) {};
16553
- var EnvironmentHttpApi = class extends make$56("environment").add(EnvironmentMetadataHttpApi).add(EnvironmentAuthHttpApi).add(EnvironmentOrchestrationHttpApi).add(EnvironmentConnectHttpApi) {};
16553
+ var EnvironmentHttpApi = class extends make$57("environment").add(EnvironmentMetadataHttpApi).add(EnvironmentAuthHttpApi).add(EnvironmentOrchestrationHttpApi).add(EnvironmentConnectHttpApi) {};
16554
16554
  //#endregion
16555
16555
  //#region ../t3-contracts/src/relayClient.ts
16556
16556
  const RelayClientStatusSchema = Union([
@@ -16773,10 +16773,10 @@ const TypeId$7 = "~effect/LayerMap";
16773
16773
  * @category constructors
16774
16774
  * @since 3.14.0
16775
16775
  */
16776
- const make$54 = /*#__PURE__*/ fnUntraced(function* (lookup, options) {
16776
+ const make$55 = /*#__PURE__*/ fnUntraced(function* (lookup, options) {
16777
16777
  const context$3 = yield* context();
16778
16778
  const memoMap = CurrentMemoMap.forkOrCreate(context$3);
16779
- const rcMap = yield* make$69({
16779
+ const rcMap = yield* make$70({
16780
16780
  lookup: (key) => contextWith((_) => buildWithMemoMap(lookup(key), memoMap, get$5(_, Scope))),
16781
16781
  idleTimeToLive: options?.idleTimeToLive
16782
16782
  });
@@ -16841,7 +16841,7 @@ const make$54 = /*#__PURE__*/ fnUntraced(function* (lookup, options) {
16841
16841
  * @category constructors
16842
16842
  * @since 3.14.0
16843
16843
  */
16844
- const fromRecord$1 = (layers, options) => make$54((key) => layers[key], {
16844
+ const fromRecord$1 = (layers, options) => make$55((key) => layers[key], {
16845
16845
  ...options,
16846
16846
  preloadKeys: options?.preload ? Object.keys(layers) : void 0
16847
16847
  });
@@ -16903,7 +16903,7 @@ const Service = () => (id, options) => {
16903
16903
  Object.defineProperty(TagClass, "stack", { get() {
16904
16904
  return creationError.stack;
16905
16905
  } });
16906
- TagClass_.layerNoDeps = effect(TagClass_)("lookup" in options ? make$54(options.lookup, options) : fromRecord$1(options.layers, options));
16906
+ TagClass_.layerNoDeps = effect(TagClass_)("lookup" in options ? make$55(options.lookup, options) : fromRecord$1(options.layers, options));
16907
16907
  TagClass_.layer = options.dependencies && options.dependencies.length > 0 ? provide(TagClass_.layerNoDeps, options.dependencies) : TagClass_.layerNoDeps;
16908
16908
  TagClass_.get = (key) => unwrap(map$4(TagClass_, (layerMap) => layerMap.get(key)));
16909
16909
  TagClass_.contextEffect = (key) => flatMap$1(TagClass_, (layerMap) => layerMap.contextEffect(key));
@@ -17028,7 +17028,7 @@ const tracerLogger = tracerLogger$1;
17028
17028
  * @category layers
17029
17029
  * @since 4.0.0
17030
17030
  */
17031
- const layer$40 = (loggers, options) => effect(CurrentLoggers, withFiber(fnUntraced$1(function* (fiber) {
17031
+ const layer$41 = (loggers, options) => effect(CurrentLoggers, withFiber(fnUntraced$1(function* (fiber) {
17032
17032
  const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber.getRef(CurrentLoggers$1) : []);
17033
17033
  for (const logger of loggers) currentLoggers.add(isEffect$1(logger) ? yield* logger : logger);
17034
17034
  return currentLoggers;
@@ -17094,7 +17094,7 @@ const makeUnsafe$2 = (value) => {
17094
17094
  * @category constructors
17095
17095
  * @since 2.0.0
17096
17096
  */
17097
- const make$53 = (value) => sync(() => makeUnsafe$2(value));
17097
+ const make$54 = (value) => sync(() => makeUnsafe$2(value));
17098
17098
  /**
17099
17099
  * Reads the current value synchronously, bypassing the `Effect` API and the
17100
17100
  * ref's semaphore.
@@ -17179,7 +17179,7 @@ const TypeId$5 = "~effect/transactions/TxRef";
17179
17179
  * @category constructors
17180
17180
  * @since 2.0.0
17181
17181
  */
17182
- const make$52 = (initial) => sync(() => makeUnsafe$1(initial));
17182
+ const make$53 = (initial) => sync(() => makeUnsafe$1(initial));
17183
17183
  /**
17184
17184
  * Creates a new `TxRef` synchronously with the specified initial value.
17185
17185
  *
@@ -17407,7 +17407,7 @@ const TxChunkProto = {
17407
17407
  * @category constructors
17408
17408
  * @since 4.0.0
17409
17409
  */
17410
- const empty = () => map$4(make$52(empty$6()), (ref) => makeUnsafe(ref));
17410
+ const empty = () => map$4(make$53(empty$6()), (ref) => makeUnsafe(ref));
17411
17411
  /**
17412
17412
  * Creates a new `TxChunk` with the specified TxRef.
17413
17413
  *
@@ -17732,7 +17732,7 @@ const TxQueueProto = {
17732
17732
  */
17733
17733
  const unbounded = () => gen(function* () {
17734
17734
  const items = yield* empty();
17735
- const stateRef = yield* make$52({ _tag: "Open" });
17735
+ const stateRef = yield* make$53({ _tag: "Open" });
17736
17736
  const txQueue = Object.create(TxQueueProto);
17737
17737
  txQueue.strategy = "unbounded";
17738
17738
  txQueue.capacity = Number.POSITIVE_INFINITY;
@@ -22855,7 +22855,7 @@ const schema = /*#__PURE__*/ declare(isStream);
22855
22855
  * @since 4.0.0
22856
22856
  */
22857
22857
  function Stream(success, error) {
22858
- return make$70(schema.ast, {
22858
+ return make$71(schema.ast, {
22859
22859
  [StreamSchemaTypeId]: StreamSchemaTypeId,
22860
22860
  success,
22861
22861
  error
@@ -23009,7 +23009,7 @@ const makeProto$1 = (options) => {
23009
23009
  * @category constructors
23010
23010
  * @since 4.0.0
23011
23011
  */
23012
- const make$51 = (tag, options) => {
23012
+ const make$52 = (tag, options) => {
23013
23013
  const successSchema = options?.success ?? Void;
23014
23014
  const errorSchema = options?.error ?? Never;
23015
23015
  const defectSchema = options?.defect ?? Defect();
@@ -23165,7 +23165,7 @@ const RpcGroupProto = {
23165
23165
  });
23166
23166
  },
23167
23167
  annotateRpcs(service, value) {
23168
- return this.annotateRpcsMerge(make$68(service, value));
23168
+ return this.annotateRpcsMerge(make$69(service, value));
23169
23169
  },
23170
23170
  annotateMerge(context) {
23171
23171
  return makeProto({
@@ -23192,7 +23192,7 @@ const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
23192
23192
  * @category constructors
23193
23193
  * @since 4.0.0
23194
23194
  */
23195
- const make$50 = (...rpcs) => makeProto({
23195
+ const make$51 = (...rpcs) => makeProto({
23196
23196
  requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
23197
23197
  annotations: empty$5()
23198
23198
  });
@@ -23276,22 +23276,22 @@ const WS_METHODS = {
23276
23276
  subscribeBackgroundPolicy: "subscribeBackgroundPolicy",
23277
23277
  subscribeResourceTelemetry: "subscribeResourceTelemetry"
23278
23278
  };
23279
- const WsServerUpsertKeybindingRpc = make$51(WS_METHODS.serverUpsertKeybinding, {
23279
+ const WsServerUpsertKeybindingRpc = make$52(WS_METHODS.serverUpsertKeybinding, {
23280
23280
  payload: ServerUpsertKeybindingInput,
23281
23281
  success: ServerUpsertKeybindingResult,
23282
23282
  error: Union([KeybindingsConfigError, EnvironmentAuthorizationError])
23283
23283
  });
23284
- const WsServerRemoveKeybindingRpc = make$51(WS_METHODS.serverRemoveKeybinding, {
23284
+ const WsServerRemoveKeybindingRpc = make$52(WS_METHODS.serverRemoveKeybinding, {
23285
23285
  payload: ServerRemoveKeybindingInput,
23286
23286
  success: ServerRemoveKeybindingResult,
23287
23287
  error: Union([KeybindingsConfigError, EnvironmentAuthorizationError])
23288
23288
  });
23289
- const WsServerProbeRpc = make$51(WS_METHODS.serverProbe, {
23289
+ const WsServerProbeRpc = make$52(WS_METHODS.serverProbe, {
23290
23290
  payload: Struct({}),
23291
23291
  success: Struct({}),
23292
23292
  error: EnvironmentAuthorizationError
23293
23293
  });
23294
- const WsServerGetConfigRpc = make$51(WS_METHODS.serverGetConfig, {
23294
+ const WsServerGetConfigRpc = make$52(WS_METHODS.serverGetConfig, {
23295
23295
  payload: Struct({}),
23296
23296
  success: ServerConfig$1,
23297
23297
  error: Union([
@@ -23300,7 +23300,7 @@ const WsServerGetConfigRpc = make$51(WS_METHODS.serverGetConfig, {
23300
23300
  EnvironmentAuthorizationError
23301
23301
  ])
23302
23302
  });
23303
- const WsServerRefreshProvidersRpc = make$51(WS_METHODS.serverRefreshProviders, {
23303
+ const WsServerRefreshProvidersRpc = make$52(WS_METHODS.serverRefreshProviders, {
23304
23304
  payload: Struct({
23305
23305
  /**
23306
23306
  * When supplied, only refresh this specific provider instance. When
@@ -23312,202 +23312,202 @@ instanceId: optional$3(ProviderInstanceId) }),
23312
23312
  success: ServerProviderUpdatedPayload,
23313
23313
  error: EnvironmentAuthorizationError
23314
23314
  });
23315
- const WsServerUpdateProviderRpc = make$51(WS_METHODS.serverUpdateProvider, {
23315
+ const WsServerUpdateProviderRpc = make$52(WS_METHODS.serverUpdateProvider, {
23316
23316
  payload: ServerProviderUpdateInput,
23317
23317
  success: ServerProviderUpdatedPayload,
23318
23318
  error: Union([ServerProviderUpdateError, EnvironmentAuthorizationError])
23319
23319
  });
23320
- const WsServerUpdateServerRpc = make$51(WS_METHODS.serverUpdateServer, {
23320
+ const WsServerUpdateServerRpc = make$52(WS_METHODS.serverUpdateServer, {
23321
23321
  payload: ServerSelfUpdateInput,
23322
23322
  success: ServerSelfUpdateResult,
23323
23323
  error: Union([ServerSelfUpdateError, EnvironmentAuthorizationError])
23324
23324
  });
23325
- const WsServerUpdateServerWithProgressRpc = make$51(WS_METHODS.serverUpdateServerWithProgress, {
23325
+ const WsServerUpdateServerWithProgressRpc = make$52(WS_METHODS.serverUpdateServerWithProgress, {
23326
23326
  payload: ServerSelfUpdateInput,
23327
23327
  success: ServerSelfUpdateProgressEvent,
23328
23328
  error: Union([ServerSelfUpdateError, EnvironmentAuthorizationError]),
23329
23329
  stream: true
23330
23330
  });
23331
- const WsServerGetSettingsRpc = make$51(WS_METHODS.serverGetSettings, {
23331
+ const WsServerGetSettingsRpc = make$52(WS_METHODS.serverGetSettings, {
23332
23332
  payload: Struct({}),
23333
23333
  success: ServerSettings,
23334
23334
  error: Union([ServerSettingsError, EnvironmentAuthorizationError])
23335
23335
  });
23336
- const WsServerUpdateSettingsRpc = make$51(WS_METHODS.serverUpdateSettings, {
23336
+ const WsServerUpdateSettingsRpc = make$52(WS_METHODS.serverUpdateSettings, {
23337
23337
  payload: Struct({ patch: ServerSettingsPatch }),
23338
23338
  success: ServerSettings,
23339
23339
  error: Union([ServerSettingsError, EnvironmentAuthorizationError])
23340
23340
  });
23341
- const WsServerDiscoverSourceControlRpc = make$51(WS_METHODS.serverDiscoverSourceControl, {
23341
+ const WsServerDiscoverSourceControlRpc = make$52(WS_METHODS.serverDiscoverSourceControl, {
23342
23342
  payload: Struct({}),
23343
23343
  success: SourceControlDiscoveryResult,
23344
23344
  error: EnvironmentAuthorizationError
23345
23345
  });
23346
- const WsServerGetTraceDiagnosticsRpc = make$51(WS_METHODS.serverGetTraceDiagnostics, {
23346
+ const WsServerGetTraceDiagnosticsRpc = make$52(WS_METHODS.serverGetTraceDiagnostics, {
23347
23347
  payload: Struct({}),
23348
23348
  success: ServerTraceDiagnosticsResult,
23349
23349
  error: EnvironmentAuthorizationError
23350
23350
  });
23351
- const WsServerGetProcessDiagnosticsRpc = make$51(WS_METHODS.serverGetProcessDiagnostics, {
23351
+ const WsServerGetProcessDiagnosticsRpc = make$52(WS_METHODS.serverGetProcessDiagnostics, {
23352
23352
  payload: Struct({}),
23353
23353
  success: ServerProcessDiagnosticsResult,
23354
23354
  error: EnvironmentAuthorizationError
23355
23355
  });
23356
- const WsServerGetProcessResourceHistoryRpc = make$51(WS_METHODS.serverGetProcessResourceHistory, {
23356
+ const WsServerGetProcessResourceHistoryRpc = make$52(WS_METHODS.serverGetProcessResourceHistory, {
23357
23357
  payload: ServerProcessResourceHistoryInput,
23358
23358
  success: ServerProcessResourceHistoryResult,
23359
23359
  error: EnvironmentAuthorizationError
23360
23360
  });
23361
- const WsServerGetResourceTelemetryHistoryRpc = make$51(WS_METHODS.serverGetResourceTelemetryHistory, {
23361
+ const WsServerGetResourceTelemetryHistoryRpc = make$52(WS_METHODS.serverGetResourceTelemetryHistory, {
23362
23362
  payload: ResourceTelemetryHistoryInput,
23363
23363
  success: ResourceTelemetryHistory,
23364
23364
  error: EnvironmentAuthorizationError
23365
23365
  });
23366
- const WsServerRetryResourceTelemetryRpc = make$51(WS_METHODS.serverRetryResourceTelemetry, {
23366
+ const WsServerRetryResourceTelemetryRpc = make$52(WS_METHODS.serverRetryResourceTelemetry, {
23367
23367
  payload: Struct({}),
23368
23368
  success: ResourceTelemetryRetryResult,
23369
23369
  error: EnvironmentAuthorizationError
23370
23370
  });
23371
- const WsServerSignalProcessRpc = make$51(WS_METHODS.serverSignalProcess, {
23371
+ const WsServerSignalProcessRpc = make$52(WS_METHODS.serverSignalProcess, {
23372
23372
  payload: ServerSignalProcessInput,
23373
23373
  success: ServerSignalProcessResult,
23374
23374
  error: EnvironmentAuthorizationError
23375
23375
  });
23376
- const WsCloudGetRelayClientStatusRpc = make$51(WS_METHODS.cloudGetRelayClientStatus, {
23376
+ const WsCloudGetRelayClientStatusRpc = make$52(WS_METHODS.cloudGetRelayClientStatus, {
23377
23377
  payload: Struct({}),
23378
23378
  success: RelayClientStatusSchema,
23379
23379
  error: EnvironmentAuthorizationError
23380
23380
  });
23381
- const WsCloudInstallRelayClientRpc = make$51(WS_METHODS.cloudInstallRelayClient, {
23381
+ const WsCloudInstallRelayClientRpc = make$52(WS_METHODS.cloudInstallRelayClient, {
23382
23382
  payload: Struct({}),
23383
23383
  success: RelayClientInstallProgressEventSchema,
23384
23384
  error: Union([RelayClientInstallFailedError, EnvironmentAuthorizationError]),
23385
23385
  stream: true
23386
23386
  });
23387
- const WsServerReportClientActivityRpc = make$51(WS_METHODS.serverReportClientActivity, {
23387
+ const WsServerReportClientActivityRpc = make$52(WS_METHODS.serverReportClientActivity, {
23388
23388
  payload: ClientActivityReportInput,
23389
23389
  error: EnvironmentAuthorizationError
23390
23390
  });
23391
- const WsServerReportHostPowerStateRpc = make$51(WS_METHODS.serverReportHostPowerState, {
23391
+ const WsServerReportHostPowerStateRpc = make$52(WS_METHODS.serverReportHostPowerState, {
23392
23392
  payload: HostPowerSnapshot,
23393
23393
  error: EnvironmentAuthorizationError
23394
23394
  });
23395
- const WsServerGetBackgroundPolicyRpc = make$51(WS_METHODS.serverGetBackgroundPolicy, {
23395
+ const WsServerGetBackgroundPolicyRpc = make$52(WS_METHODS.serverGetBackgroundPolicy, {
23396
23396
  payload: Struct({}),
23397
23397
  success: BackgroundPolicySnapshot,
23398
23398
  error: EnvironmentAuthorizationError
23399
23399
  });
23400
- const WsSourceControlLookupRepositoryRpc = make$51(WS_METHODS.sourceControlLookupRepository, {
23400
+ const WsSourceControlLookupRepositoryRpc = make$52(WS_METHODS.sourceControlLookupRepository, {
23401
23401
  payload: SourceControlRepositoryLookupInput,
23402
23402
  success: SourceControlRepositoryInfo,
23403
23403
  error: Union([SourceControlRepositoryError, EnvironmentAuthorizationError])
23404
23404
  });
23405
- const WsSourceControlCloneRepositoryRpc = make$51(WS_METHODS.sourceControlCloneRepository, {
23405
+ const WsSourceControlCloneRepositoryRpc = make$52(WS_METHODS.sourceControlCloneRepository, {
23406
23406
  payload: SourceControlCloneRepositoryInput,
23407
23407
  success: SourceControlCloneRepositoryResult,
23408
23408
  error: Union([SourceControlRepositoryError, EnvironmentAuthorizationError])
23409
23409
  });
23410
- const WsSourceControlPublishRepositoryRpc = make$51(WS_METHODS.sourceControlPublishRepository, {
23410
+ const WsSourceControlPublishRepositoryRpc = make$52(WS_METHODS.sourceControlPublishRepository, {
23411
23411
  payload: SourceControlPublishRepositoryInput,
23412
23412
  success: SourceControlPublishRepositoryResult,
23413
23413
  error: Union([SourceControlRepositoryError, EnvironmentAuthorizationError])
23414
23414
  });
23415
- const WsProjectsSearchEntriesRpc = make$51(WS_METHODS.projectsSearchEntries, {
23415
+ const WsProjectsSearchEntriesRpc = make$52(WS_METHODS.projectsSearchEntries, {
23416
23416
  payload: ProjectSearchEntriesInput,
23417
23417
  success: ProjectSearchEntriesResult,
23418
23418
  error: Union([ProjectSearchEntriesError, EnvironmentAuthorizationError])
23419
23419
  });
23420
- const WsProjectsSearchContentsRpc = make$51(WS_METHODS.projectsSearchContents, {
23420
+ const WsProjectsSearchContentsRpc = make$52(WS_METHODS.projectsSearchContents, {
23421
23421
  payload: ProjectSearchContentsInput,
23422
23422
  success: ProjectSearchContentsResult,
23423
23423
  error: Union([ProjectSearchContentsError, EnvironmentAuthorizationError])
23424
23424
  });
23425
- const WsProjectsListEntriesRpc = make$51(WS_METHODS.projectsListEntries, {
23425
+ const WsProjectsListEntriesRpc = make$52(WS_METHODS.projectsListEntries, {
23426
23426
  payload: ProjectListEntriesInput,
23427
23427
  success: ProjectListEntriesResult,
23428
23428
  error: Union([ProjectListEntriesError, EnvironmentAuthorizationError])
23429
23429
  });
23430
- const WsProjectsReadFileRpc = make$51(WS_METHODS.projectsReadFile, {
23430
+ const WsProjectsReadFileRpc = make$52(WS_METHODS.projectsReadFile, {
23431
23431
  payload: ProjectReadFileInput,
23432
23432
  success: ProjectReadFileResult,
23433
23433
  error: Union([ProjectReadFileError, EnvironmentAuthorizationError])
23434
23434
  });
23435
- const WsProjectsWriteFileRpc = make$51(WS_METHODS.projectsWriteFile, {
23435
+ const WsProjectsWriteFileRpc = make$52(WS_METHODS.projectsWriteFile, {
23436
23436
  payload: ProjectWriteFileInput,
23437
23437
  success: ProjectWriteFileResult,
23438
23438
  error: Union([ProjectWriteFileError, EnvironmentAuthorizationError])
23439
23439
  });
23440
- const WsShellOpenInEditorRpc = make$51(WS_METHODS.shellOpenInEditor, {
23440
+ const WsShellOpenInEditorRpc = make$52(WS_METHODS.shellOpenInEditor, {
23441
23441
  payload: LaunchEditorInput,
23442
23442
  error: Union([ExternalLauncherError, EnvironmentAuthorizationError])
23443
23443
  });
23444
- const WsFilesystemBrowseRpc = make$51(WS_METHODS.filesystemBrowse, {
23444
+ const WsFilesystemBrowseRpc = make$52(WS_METHODS.filesystemBrowse, {
23445
23445
  payload: FilesystemBrowseInput,
23446
23446
  success: FilesystemBrowseResult,
23447
23447
  error: Union([FilesystemBrowseError, EnvironmentAuthorizationError])
23448
23448
  });
23449
- const WsAssetsCreateUrlRpc = make$51(WS_METHODS.assetsCreateUrl, {
23449
+ const WsAssetsCreateUrlRpc = make$52(WS_METHODS.assetsCreateUrl, {
23450
23450
  payload: AssetCreateUrlInput,
23451
23451
  success: AssetCreateUrlResult,
23452
23452
  error: Union([AssetAccessError, EnvironmentAuthorizationError])
23453
23453
  });
23454
- const WsSubscribeVcsStatusRpc = make$51(WS_METHODS.subscribeVcsStatus, {
23454
+ const WsSubscribeVcsStatusRpc = make$52(WS_METHODS.subscribeVcsStatus, {
23455
23455
  payload: VcsStatusInput,
23456
23456
  success: VcsStatusStreamEvent,
23457
23457
  error: Union([GitManagerServiceError, EnvironmentAuthorizationError]),
23458
23458
  stream: true
23459
23459
  });
23460
- const WsVcsPullRpc = make$51(WS_METHODS.vcsPull, {
23460
+ const WsVcsPullRpc = make$52(WS_METHODS.vcsPull, {
23461
23461
  payload: VcsPullInput,
23462
23462
  success: VcsPullResult,
23463
23463
  error: Union([GitCommandError, EnvironmentAuthorizationError])
23464
23464
  });
23465
- const WsVcsRefreshStatusRpc = make$51(WS_METHODS.vcsRefreshStatus, {
23465
+ const WsVcsRefreshStatusRpc = make$52(WS_METHODS.vcsRefreshStatus, {
23466
23466
  payload: VcsStatusInput,
23467
23467
  success: VcsStatusResult,
23468
23468
  error: Union([GitManagerServiceError, EnvironmentAuthorizationError])
23469
23469
  });
23470
- const WsGitRunStackedActionRpc = make$51(WS_METHODS.gitRunStackedAction, {
23470
+ const WsGitRunStackedActionRpc = make$52(WS_METHODS.gitRunStackedAction, {
23471
23471
  payload: GitRunStackedActionInput,
23472
23472
  success: GitActionProgressEvent,
23473
23473
  error: Union([GitManagerServiceError, EnvironmentAuthorizationError]),
23474
23474
  stream: true
23475
23475
  });
23476
- const WsGitResolvePullRequestRpc = make$51(WS_METHODS.gitResolvePullRequest, {
23476
+ const WsGitResolvePullRequestRpc = make$52(WS_METHODS.gitResolvePullRequest, {
23477
23477
  payload: GitPullRequestRefInput,
23478
23478
  success: GitResolvePullRequestResult,
23479
23479
  error: Union([GitManagerServiceError, EnvironmentAuthorizationError])
23480
23480
  });
23481
- const WsGitPreparePullRequestThreadRpc = make$51(WS_METHODS.gitPreparePullRequestThread, {
23481
+ const WsGitPreparePullRequestThreadRpc = make$52(WS_METHODS.gitPreparePullRequestThread, {
23482
23482
  payload: GitPreparePullRequestThreadInput,
23483
23483
  success: GitPreparePullRequestThreadResult,
23484
23484
  error: Union([GitManagerServiceError, EnvironmentAuthorizationError])
23485
23485
  });
23486
- const WsVcsListRefsRpc = make$51(WS_METHODS.vcsListRefs, {
23486
+ const WsVcsListRefsRpc = make$52(WS_METHODS.vcsListRefs, {
23487
23487
  payload: VcsListRefsInput,
23488
23488
  success: VcsListRefsResult,
23489
23489
  error: Union([GitCommandError, EnvironmentAuthorizationError])
23490
23490
  });
23491
- const WsVcsCreateWorktreeRpc = make$51(WS_METHODS.vcsCreateWorktree, {
23491
+ const WsVcsCreateWorktreeRpc = make$52(WS_METHODS.vcsCreateWorktree, {
23492
23492
  payload: VcsCreateWorktreeInput,
23493
23493
  success: VcsCreateWorktreeResult,
23494
23494
  error: Union([GitCommandError, EnvironmentAuthorizationError])
23495
23495
  });
23496
- const WsVcsRemoveWorktreeRpc = make$51(WS_METHODS.vcsRemoveWorktree, {
23496
+ const WsVcsRemoveWorktreeRpc = make$52(WS_METHODS.vcsRemoveWorktree, {
23497
23497
  payload: VcsRemoveWorktreeInput,
23498
23498
  error: Union([GitCommandError, EnvironmentAuthorizationError])
23499
23499
  });
23500
- const WsVcsCreateRefRpc = make$51(WS_METHODS.vcsCreateRef, {
23500
+ const WsVcsCreateRefRpc = make$52(WS_METHODS.vcsCreateRef, {
23501
23501
  payload: VcsCreateRefInput,
23502
23502
  success: VcsCreateRefResult,
23503
23503
  error: Union([GitCommandError, EnvironmentAuthorizationError])
23504
23504
  });
23505
- const WsVcsSwitchRefRpc = make$51(WS_METHODS.vcsSwitchRef, {
23505
+ const WsVcsSwitchRefRpc = make$52(WS_METHODS.vcsSwitchRef, {
23506
23506
  payload: VcsSwitchRefInput,
23507
23507
  success: VcsSwitchRefResult,
23508
23508
  error: Union([GitCommandError, EnvironmentAuthorizationError])
23509
23509
  });
23510
- const WsVcsInitRpc = make$51(WS_METHODS.vcsInit, {
23510
+ const WsVcsInitRpc = make$52(WS_METHODS.vcsInit, {
23511
23511
  payload: VcsInitInput,
23512
23512
  error: Union([VcsError, EnvironmentAuthorizationError])
23513
23513
  });
@@ -23516,159 +23516,159 @@ const WsVcsInitRpc = make$51(WS_METHODS.vcsInit, {
23516
23516
  * Not the persisted T3 Review model. Future review sessions should use
23517
23517
  * review.open* + review.getSnapshot.
23518
23518
  */
23519
- const WsReviewGetDiffPreviewRpc = make$51(WS_METHODS.reviewGetDiffPreview, {
23519
+ const WsReviewGetDiffPreviewRpc = make$52(WS_METHODS.reviewGetDiffPreview, {
23520
23520
  payload: ReviewDiffPreviewInput,
23521
23521
  success: ReviewDiffPreviewResult,
23522
23522
  error: Union([ReviewDiffPreviewError, EnvironmentAuthorizationError])
23523
23523
  });
23524
- const WsReviewGetDiffFileContentsRpc = make$51(WS_METHODS.reviewGetDiffFileContents, {
23524
+ const WsReviewGetDiffFileContentsRpc = make$52(WS_METHODS.reviewGetDiffFileContents, {
23525
23525
  payload: ReviewDiffFileContentsInput,
23526
23526
  success: ReviewDiffFileContentsResult,
23527
23527
  error: Union([ReviewDiffPreviewError, EnvironmentAuthorizationError])
23528
23528
  });
23529
- const WsTerminalOpenRpc = make$51(WS_METHODS.terminalOpen, {
23529
+ const WsTerminalOpenRpc = make$52(WS_METHODS.terminalOpen, {
23530
23530
  payload: TerminalOpenInput,
23531
23531
  success: TerminalSessionSnapshot,
23532
23532
  error: Union([TerminalError, EnvironmentAuthorizationError])
23533
23533
  });
23534
- const WsTerminalAttachRpc = make$51(WS_METHODS.terminalAttach, {
23534
+ const WsTerminalAttachRpc = make$52(WS_METHODS.terminalAttach, {
23535
23535
  payload: TerminalAttachInput,
23536
23536
  success: TerminalAttachStreamEvent,
23537
23537
  error: Union([TerminalError, EnvironmentAuthorizationError]),
23538
23538
  stream: true
23539
23539
  });
23540
- const WsTerminalWriteRpc = make$51(WS_METHODS.terminalWrite, {
23540
+ const WsTerminalWriteRpc = make$52(WS_METHODS.terminalWrite, {
23541
23541
  payload: TerminalWriteInput,
23542
23542
  error: Union([TerminalError, EnvironmentAuthorizationError])
23543
23543
  });
23544
- const WsTerminalResizeRpc = make$51(WS_METHODS.terminalResize, {
23544
+ const WsTerminalResizeRpc = make$52(WS_METHODS.terminalResize, {
23545
23545
  payload: TerminalResizeInput,
23546
23546
  error: Union([TerminalError, EnvironmentAuthorizationError])
23547
23547
  });
23548
- const WsTerminalClearRpc = make$51(WS_METHODS.terminalClear, {
23548
+ const WsTerminalClearRpc = make$52(WS_METHODS.terminalClear, {
23549
23549
  payload: TerminalClearInput,
23550
23550
  error: Union([TerminalError, EnvironmentAuthorizationError])
23551
23551
  });
23552
- const WsTerminalRestartRpc = make$51(WS_METHODS.terminalRestart, {
23552
+ const WsTerminalRestartRpc = make$52(WS_METHODS.terminalRestart, {
23553
23553
  payload: TerminalRestartInput,
23554
23554
  success: TerminalSessionSnapshot,
23555
23555
  error: Union([TerminalError, EnvironmentAuthorizationError])
23556
23556
  });
23557
- const WsTerminalCloseRpc = make$51(WS_METHODS.terminalClose, {
23557
+ const WsTerminalCloseRpc = make$52(WS_METHODS.terminalClose, {
23558
23558
  payload: TerminalCloseInput,
23559
23559
  error: Union([TerminalError, EnvironmentAuthorizationError])
23560
23560
  });
23561
- const WsPreviewOpenRpc = make$51(WS_METHODS.previewOpen, {
23561
+ const WsPreviewOpenRpc = make$52(WS_METHODS.previewOpen, {
23562
23562
  payload: PreviewOpenInput,
23563
23563
  success: PreviewSessionSnapshot,
23564
23564
  error: Union([PreviewError, EnvironmentAuthorizationError])
23565
23565
  });
23566
- const WsPreviewNavigateRpc = make$51(WS_METHODS.previewNavigate, {
23566
+ const WsPreviewNavigateRpc = make$52(WS_METHODS.previewNavigate, {
23567
23567
  payload: PreviewNavigateInput,
23568
23568
  success: PreviewSessionSnapshot,
23569
23569
  error: Union([PreviewError, EnvironmentAuthorizationError])
23570
23570
  });
23571
- const WsPreviewResizeRpc = make$51(WS_METHODS.previewResize, {
23571
+ const WsPreviewResizeRpc = make$52(WS_METHODS.previewResize, {
23572
23572
  payload: PreviewResizeInput,
23573
23573
  success: PreviewSessionSnapshot,
23574
23574
  error: Union([PreviewError, EnvironmentAuthorizationError])
23575
23575
  });
23576
- const WsPreviewRefreshRpc = make$51(WS_METHODS.previewRefresh, {
23576
+ const WsPreviewRefreshRpc = make$52(WS_METHODS.previewRefresh, {
23577
23577
  payload: PreviewRefreshInput,
23578
23578
  error: Union([PreviewError, EnvironmentAuthorizationError])
23579
23579
  });
23580
- const WsPreviewCloseRpc = make$51(WS_METHODS.previewClose, {
23580
+ const WsPreviewCloseRpc = make$52(WS_METHODS.previewClose, {
23581
23581
  payload: PreviewCloseInput,
23582
23582
  error: Union([PreviewError, EnvironmentAuthorizationError])
23583
23583
  });
23584
- const WsPreviewListRpc = make$51(WS_METHODS.previewList, {
23584
+ const WsPreviewListRpc = make$52(WS_METHODS.previewList, {
23585
23585
  payload: PreviewListInput,
23586
23586
  success: PreviewListResult,
23587
23587
  error: EnvironmentAuthorizationError
23588
23588
  });
23589
- const WsPreviewReportStatusRpc = make$51(WS_METHODS.previewReportStatus, {
23589
+ const WsPreviewReportStatusRpc = make$52(WS_METHODS.previewReportStatus, {
23590
23590
  payload: PreviewReportStatusInput,
23591
23591
  error: Union([PreviewError, EnvironmentAuthorizationError])
23592
23592
  });
23593
- const WsPreviewAutomationConnectRpc = make$51(WS_METHODS.previewAutomationConnect, {
23593
+ const WsPreviewAutomationConnectRpc = make$52(WS_METHODS.previewAutomationConnect, {
23594
23594
  payload: PreviewAutomationHost,
23595
23595
  success: PreviewAutomationStreamEvent,
23596
23596
  error: Union([PreviewAutomationError, EnvironmentAuthorizationError]),
23597
23597
  stream: true
23598
23598
  });
23599
- const WsPreviewAutomationRespondRpc = make$51(WS_METHODS.previewAutomationRespond, {
23599
+ const WsPreviewAutomationRespondRpc = make$52(WS_METHODS.previewAutomationRespond, {
23600
23600
  payload: PreviewAutomationResponse,
23601
23601
  error: Union([PreviewAutomationError, EnvironmentAuthorizationError])
23602
23602
  });
23603
- const WsPreviewAutomationFocusHostRpc = make$51(WS_METHODS.previewAutomationFocusHost, {
23603
+ const WsPreviewAutomationFocusHostRpc = make$52(WS_METHODS.previewAutomationFocusHost, {
23604
23604
  payload: PreviewAutomationHostFocus,
23605
23605
  error: EnvironmentAuthorizationError
23606
23606
  });
23607
- const WsSubscribePreviewEventsRpc = make$51(WS_METHODS.subscribePreviewEvents, {
23607
+ const WsSubscribePreviewEventsRpc = make$52(WS_METHODS.subscribePreviewEvents, {
23608
23608
  payload: Struct({}),
23609
23609
  success: PreviewEvent,
23610
23610
  error: EnvironmentAuthorizationError,
23611
23611
  stream: true
23612
23612
  });
23613
- const WsSubscribeDiscoveredLocalServersRpc = make$51(WS_METHODS.subscribeDiscoveredLocalServers, {
23613
+ const WsSubscribeDiscoveredLocalServersRpc = make$52(WS_METHODS.subscribeDiscoveredLocalServers, {
23614
23614
  payload: Struct({}),
23615
23615
  success: DiscoveredLocalServerList,
23616
23616
  error: EnvironmentAuthorizationError,
23617
23617
  stream: true
23618
23618
  });
23619
- const WsOrchestrationDispatchCommandRpc = make$51(ORCHESTRATION_WS_METHODS.dispatchCommand, {
23619
+ const WsOrchestrationDispatchCommandRpc = make$52(ORCHESTRATION_WS_METHODS.dispatchCommand, {
23620
23620
  payload: ClientOrchestrationCommand,
23621
23621
  success: OrchestrationRpcSchemas.dispatchCommand.output,
23622
23622
  error: Union([OrchestrationDispatchCommandError, EnvironmentAuthorizationError])
23623
23623
  });
23624
- const WsOrchestrationGetWorkflowScriptRpc = make$51(ORCHESTRATION_WS_METHODS.getWorkflowScript, {
23624
+ const WsOrchestrationGetWorkflowScriptRpc = make$52(ORCHESTRATION_WS_METHODS.getWorkflowScript, {
23625
23625
  payload: OrchestrationRpcSchemas.getWorkflowScript.input,
23626
23626
  success: OrchestrationRpcSchemas.getWorkflowScript.output,
23627
23627
  error: Union([OrchestrationGetWorkflowScriptError, EnvironmentAuthorizationError])
23628
23628
  });
23629
- const WsOrchestrationGetTurnDiffRpc = make$51(ORCHESTRATION_WS_METHODS.getTurnDiff, {
23629
+ const WsOrchestrationGetTurnDiffRpc = make$52(ORCHESTRATION_WS_METHODS.getTurnDiff, {
23630
23630
  payload: OrchestrationGetTurnDiffInput,
23631
23631
  success: OrchestrationRpcSchemas.getTurnDiff.output,
23632
23632
  error: Union([OrchestrationGetTurnDiffError, EnvironmentAuthorizationError])
23633
23633
  });
23634
- const WsOrchestrationGetFullThreadDiffRpc = make$51(ORCHESTRATION_WS_METHODS.getFullThreadDiff, {
23634
+ const WsOrchestrationGetFullThreadDiffRpc = make$52(ORCHESTRATION_WS_METHODS.getFullThreadDiff, {
23635
23635
  payload: OrchestrationGetFullThreadDiffInput,
23636
23636
  success: OrchestrationRpcSchemas.getFullThreadDiff.output,
23637
23637
  error: Union([OrchestrationGetFullThreadDiffError, EnvironmentAuthorizationError])
23638
23638
  });
23639
- const WsOrchestrationSearchThreadsRpc = make$51(ORCHESTRATION_WS_METHODS.searchThreads, {
23639
+ const WsOrchestrationSearchThreadsRpc = make$52(ORCHESTRATION_WS_METHODS.searchThreads, {
23640
23640
  payload: OrchestrationSearchThreadsInput,
23641
23641
  success: OrchestrationRpcSchemas.searchThreads.output,
23642
23642
  error: Union([OrchestrationSearchThreadsError, EnvironmentAuthorizationError])
23643
23643
  });
23644
- const WsOrchestrationGetArchivedShellSnapshotRpc = make$51(ORCHESTRATION_WS_METHODS.getArchivedShellSnapshot, {
23644
+ const WsOrchestrationGetArchivedShellSnapshotRpc = make$52(ORCHESTRATION_WS_METHODS.getArchivedShellSnapshot, {
23645
23645
  payload: OrchestrationRpcSchemas.getArchivedShellSnapshot.input,
23646
23646
  success: OrchestrationRpcSchemas.getArchivedShellSnapshot.output,
23647
23647
  error: Union([OrchestrationGetSnapshotError, EnvironmentAuthorizationError])
23648
23648
  });
23649
- const WsOrchestrationSubscribeShellRpc = make$51(ORCHESTRATION_WS_METHODS.subscribeShell, {
23649
+ const WsOrchestrationSubscribeShellRpc = make$52(ORCHESTRATION_WS_METHODS.subscribeShell, {
23650
23650
  payload: OrchestrationRpcSchemas.subscribeShell.input,
23651
23651
  success: OrchestrationRpcSchemas.subscribeShell.output,
23652
23652
  error: Union([OrchestrationGetSnapshotError, EnvironmentAuthorizationError]),
23653
23653
  stream: true
23654
23654
  });
23655
- const WsOrchestrationSubscribeThreadRpc = make$51(ORCHESTRATION_WS_METHODS.subscribeThread, {
23655
+ const WsOrchestrationSubscribeThreadRpc = make$52(ORCHESTRATION_WS_METHODS.subscribeThread, {
23656
23656
  payload: OrchestrationRpcSchemas.subscribeThread.input,
23657
23657
  success: OrchestrationRpcSchemas.subscribeThread.output,
23658
23658
  error: Union([OrchestrationGetSnapshotError, EnvironmentAuthorizationError]),
23659
23659
  stream: true
23660
23660
  });
23661
- const WsRpcGroup = make$50(WsServerProbeRpc, WsServerGetConfigRpc, WsServerRefreshProvidersRpc, WsServerUpdateProviderRpc, WsServerUpdateServerRpc, WsServerUpdateServerWithProgressRpc, WsServerUpsertKeybindingRpc, WsServerRemoveKeybindingRpc, WsServerGetSettingsRpc, WsServerUpdateSettingsRpc, WsServerDiscoverSourceControlRpc, WsServerGetTraceDiagnosticsRpc, WsServerGetProcessDiagnosticsRpc, WsServerGetProcessResourceHistoryRpc, WsServerGetResourceTelemetryHistoryRpc, WsServerRetryResourceTelemetryRpc, WsServerSignalProcessRpc, WsServerReportClientActivityRpc, WsServerReportHostPowerStateRpc, WsServerGetBackgroundPolicyRpc, WsCloudGetRelayClientStatusRpc, WsCloudInstallRelayClientRpc, WsSourceControlLookupRepositoryRpc, WsSourceControlCloneRepositoryRpc, WsSourceControlPublishRepositoryRpc, WsProjectsListEntriesRpc, WsProjectsReadFileRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsShellOpenInEditorRpc, WsFilesystemBrowseRpc, WsAssetsCreateUrlRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsVcsListRefsRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsReviewGetDiffPreviewRpc, WsReviewGetDiffFileContentsRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, make$51(WS_METHODS.subscribeTerminalEvents, {
23661
+ const WsRpcGroup = make$51(WsServerProbeRpc, WsServerGetConfigRpc, WsServerRefreshProvidersRpc, WsServerUpdateProviderRpc, WsServerUpdateServerRpc, WsServerUpdateServerWithProgressRpc, WsServerUpsertKeybindingRpc, WsServerRemoveKeybindingRpc, WsServerGetSettingsRpc, WsServerUpdateSettingsRpc, WsServerDiscoverSourceControlRpc, WsServerGetTraceDiagnosticsRpc, WsServerGetProcessDiagnosticsRpc, WsServerGetProcessResourceHistoryRpc, WsServerGetResourceTelemetryHistoryRpc, WsServerRetryResourceTelemetryRpc, WsServerSignalProcessRpc, WsServerReportClientActivityRpc, WsServerReportHostPowerStateRpc, WsServerGetBackgroundPolicyRpc, WsCloudGetRelayClientStatusRpc, WsCloudInstallRelayClientRpc, WsSourceControlLookupRepositoryRpc, WsSourceControlCloneRepositoryRpc, WsSourceControlPublishRepositoryRpc, WsProjectsListEntriesRpc, WsProjectsReadFileRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsShellOpenInEditorRpc, WsFilesystemBrowseRpc, WsAssetsCreateUrlRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsVcsListRefsRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsReviewGetDiffPreviewRpc, WsReviewGetDiffFileContentsRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, make$52(WS_METHODS.subscribeTerminalEvents, {
23662
23662
  payload: Struct({}),
23663
23663
  success: TerminalEvent,
23664
23664
  error: EnvironmentAuthorizationError,
23665
23665
  stream: true
23666
- }), make$51(WS_METHODS.subscribeTerminalMetadata, {
23666
+ }), make$52(WS_METHODS.subscribeTerminalMetadata, {
23667
23667
  payload: Struct({}),
23668
23668
  success: TerminalMetadataStreamEvent,
23669
23669
  error: EnvironmentAuthorizationError,
23670
23670
  stream: true
23671
- }), WsPreviewOpenRpc, WsPreviewNavigateRpc, WsPreviewResizeRpc, WsPreviewRefreshRpc, WsPreviewCloseRpc, WsPreviewListRpc, WsPreviewReportStatusRpc, WsPreviewAutomationConnectRpc, WsPreviewAutomationRespondRpc, WsPreviewAutomationFocusHostRpc, WsSubscribePreviewEventsRpc, WsSubscribeDiscoveredLocalServersRpc, make$51(WS_METHODS.subscribeServerConfig, {
23671
+ }), WsPreviewOpenRpc, WsPreviewNavigateRpc, WsPreviewResizeRpc, WsPreviewRefreshRpc, WsPreviewCloseRpc, WsPreviewListRpc, WsPreviewReportStatusRpc, WsPreviewAutomationConnectRpc, WsPreviewAutomationRespondRpc, WsPreviewAutomationFocusHostRpc, WsSubscribePreviewEventsRpc, WsSubscribeDiscoveredLocalServersRpc, make$52(WS_METHODS.subscribeServerConfig, {
23672
23672
  payload: Struct({}),
23673
23673
  success: ServerConfigStreamEvent,
23674
23674
  error: Union([
@@ -23677,22 +23677,22 @@ const WsRpcGroup = make$50(WsServerProbeRpc, WsServerGetConfigRpc, WsServerRefre
23677
23677
  EnvironmentAuthorizationError
23678
23678
  ]),
23679
23679
  stream: true
23680
- }), make$51(WS_METHODS.subscribeServerLifecycle, {
23680
+ }), make$52(WS_METHODS.subscribeServerLifecycle, {
23681
23681
  payload: Struct({}),
23682
23682
  success: ServerLifecycleStreamEvent,
23683
23683
  error: EnvironmentAuthorizationError,
23684
23684
  stream: true
23685
- }), make$51(WS_METHODS.subscribeAuthAccess, {
23685
+ }), make$52(WS_METHODS.subscribeAuthAccess, {
23686
23686
  payload: Struct({}),
23687
23687
  success: AuthAccessStreamEvent,
23688
23688
  error: Union([AuthAccessStreamError, EnvironmentAuthorizationError]),
23689
23689
  stream: true
23690
- }), make$51(WS_METHODS.subscribeBackgroundPolicy, {
23690
+ }), make$52(WS_METHODS.subscribeBackgroundPolicy, {
23691
23691
  payload: Struct({}),
23692
23692
  success: BackgroundPolicySnapshot,
23693
23693
  error: EnvironmentAuthorizationError,
23694
23694
  stream: true
23695
- }), make$51(WS_METHODS.subscribeResourceTelemetry, {
23695
+ }), make$52(WS_METHODS.subscribeResourceTelemetry, {
23696
23696
  payload: Struct({}),
23697
23697
  success: ResourceTelemetrySnapshot,
23698
23698
  error: EnvironmentAuthorizationError,
@@ -23760,8 +23760,8 @@ var ServerConfig = class extends Service$2()("t3/config/ServerConfig") {
23760
23760
  /** @deprecated Import and use `layerTest` from this module. */
23761
23761
  static layerTest = (cwd, baseDirOrPrefix) => layerTest$2(cwd, baseDirOrPrefix);
23762
23762
  };
23763
- const make$49 = (config) => ServerConfig.of(config);
23764
- const layer$39 = (config) => succeed$3(ServerConfig, make$49(config));
23763
+ const make$50 = (config) => ServerConfig.of(config);
23764
+ const layer$40 = (config) => succeed$3(ServerConfig, make$50(config));
23765
23765
  const deriveServerPaths = fn(function* (baseDir, devUrl, options = {}) {
23766
23766
  const { join } = yield* Path;
23767
23767
  const stateDir = join(baseDir, devUrl !== void 0 && !options.baseDirIsExplicit ? "dev" : "userdata");
@@ -23957,7 +23957,7 @@ function deriveAuthClientMetadata(input) {
23957
23957
  //#endregion
23958
23958
  //#region src/auth/EnvironmentAuthPolicy.ts
23959
23959
  var EnvironmentAuthPolicy = class extends Service$2()("t3/auth/EnvironmentAuthPolicy") {};
23960
- const layer$38 = effect(EnvironmentAuthPolicy, gen(function* () {
23960
+ const layer$39 = effect(EnvironmentAuthPolicy, gen(function* () {
23961
23961
  const config = yield* ServerConfig;
23962
23962
  const isRemoteReachable = isRemoteReachableHost(config.host);
23963
23963
  const policy = config.mode === "desktop" ? isRemoteReachable ? "remote-reachable" : "desktop-managed-local" : isRemoteReachable ? "remote-reachable" : "loopback-browser";
@@ -24169,7 +24169,7 @@ function toPersistenceSqlOrDecodeError$6(sqlOperation, decodeOperation, correlat
24169
24169
  cause
24170
24170
  });
24171
24171
  }
24172
- const layer$37 = effect(AuthPairingLinkRepository, gen(function* () {
24172
+ const layer$38 = effect(AuthPairingLinkRepository, gen(function* () {
24173
24173
  const sql = yield* SqlClient;
24174
24174
  const createPairingLinkRow = void_({
24175
24175
  Request: CreateAuthPairingLinkInput,
@@ -24397,11 +24397,11 @@ const DEV_STARTUP_TTL_HOURS = hours(24);
24397
24397
  const PAIRING_TOKEN_ALPHABET = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
24398
24398
  const PAIRING_TOKEN_LENGTH = 12;
24399
24399
  const PAIRING_TOKEN_REJECTION_LIMIT = Math.floor(256 / 32) * 32;
24400
- const layer$36 = effect(PairingGrantStore, gen(function* () {
24400
+ const layer$37 = effect(PairingGrantStore, gen(function* () {
24401
24401
  const crypto = yield* Crypto;
24402
24402
  const config = yield* ServerConfig;
24403
24403
  const pairingLinks = yield* AuthPairingLinkRepository;
24404
- const seededGrantsRef = yield* make$63(/* @__PURE__ */ new Map());
24404
+ const seededGrantsRef = yield* make$64(/* @__PURE__ */ new Map());
24405
24405
  const changesPubSub = yield* unbounded$1();
24406
24406
  const generatePairingToken = gen(function* () {
24407
24407
  let credential = "";
@@ -24594,7 +24594,7 @@ const layer$36 = effect(PairingGrantStore, gen(function* () {
24594
24594
  revoke,
24595
24595
  consume
24596
24596
  });
24597
- })).pipe(provideMerge(layer$37));
24597
+ })).pipe(provideMerge(layer$38));
24598
24598
  //#endregion
24599
24599
  //#region src/auth/ServerSecretStore.ts
24600
24600
  const secretStoreErrorContext = {
@@ -24660,7 +24660,7 @@ const isSecretStoreError = is(Union([
24660
24660
  const isPlatformError = (value) => isTagged(value, "PlatformError");
24661
24661
  const isSecretAlreadyExistsError = (error) => "cause" in error && isPlatformError(error.cause) && error.cause.reason._tag === "AlreadyExists";
24662
24662
  var ServerSecretStore = class extends Service$2()("t3/auth/ServerSecretStore") {};
24663
- const layer$35 = effect(ServerSecretStore, gen(function* () {
24663
+ const layer$36 = effect(ServerSecretStore, gen(function* () {
24664
24664
  const crypto = yield* Crypto;
24665
24665
  const fileSystem = yield* FileSystem;
24666
24666
  const path = yield* Path;
@@ -24841,7 +24841,7 @@ function toPersistenceSqlOrDecodeError$5(sqlOperation, decodeOperation, correlat
24841
24841
  cause
24842
24842
  });
24843
24843
  }
24844
- const layer$34 = effect(AuthSessionRepository, gen(function* () {
24844
+ const layer$35 = effect(AuthSessionRepository, gen(function* () {
24845
24845
  const sql = yield* SqlClient;
24846
24846
  const createSessionRow = void_({
24847
24847
  Request: CreateAuthSessionInput,
@@ -25207,13 +25207,13 @@ function toAuthClientSession(input) {
25207
25207
  current: false
25208
25208
  };
25209
25209
  }
25210
- const layer$33 = effect(SessionStore, gen(function* () {
25210
+ const layer$34 = effect(SessionStore, gen(function* () {
25211
25211
  const crypto = yield* Crypto;
25212
25212
  const serverConfig = yield* ServerConfig;
25213
25213
  const secretStore = yield* ServerSecretStore;
25214
25214
  const authSessions = yield* AuthSessionRepository;
25215
25215
  const signingSecret = yield* secretStore.getOrCreateRandom(SIGNING_SECRET_NAME$1, 32);
25216
- const connectedSessionsRef = yield* make$63(/* @__PURE__ */ new Map());
25216
+ const connectedSessionsRef = yield* make$64(/* @__PURE__ */ new Map());
25217
25217
  const changesPubSub = yield* unbounded$1();
25218
25218
  const cookieName = resolveSessionCookieName({
25219
25219
  mode: serverConfig.mode,
@@ -25340,7 +25340,7 @@ const layer$33 = effect(SessionStore, gen(function* () {
25340
25340
  if (!timingSafeEqualBase64Url(signature, signPayload(encodedPayload, signingSecret))) return yield* new InvalidSessionTokenSignatureError({});
25341
25341
  const claims = yield* decodeSessionClaims(base64UrlDecodeUtf8(encodedPayload)).pipe(mapError((cause) => new InvalidSessionTokenPayloadError({ cause })));
25342
25342
  const observedAt = yield* now$1;
25343
- const expiresAt = make$71(claims.exp);
25343
+ const expiresAt = make$72(claims.exp);
25344
25344
  if (isNone(expiresAt)) return yield* new InvalidSessionExpirationClaimError({
25345
25345
  sessionId: claims.sid,
25346
25346
  expirationClaim: claims.exp
@@ -25400,7 +25400,7 @@ const layer$33 = effect(SessionStore, gen(function* () {
25400
25400
  if (!timingSafeEqualBase64Url(signature, signPayload(encodedPayload, signingSecret))) return yield* new InvalidWebSocketTokenSignatureError({});
25401
25401
  const claims = yield* decodeWebSocketClaims(base64UrlDecodeUtf8(encodedPayload)).pipe(mapError((cause) => new InvalidWebSocketTokenPayloadError({ cause })));
25402
25402
  const observedAt = yield* now$1;
25403
- const expiresAt = make$71(claims.exp);
25403
+ const expiresAt = make$72(claims.exp);
25404
25404
  if (isNone(expiresAt)) return yield* new InvalidSessionExpirationClaimError({
25405
25405
  sessionId: claims.sid,
25406
25406
  expirationClaim: claims.exp
@@ -25505,7 +25505,7 @@ const layer$33 = effect(SessionStore, gen(function* () {
25505
25505
  markConnected,
25506
25506
  markDisconnected
25507
25507
  });
25508
- })).pipe(provideMerge(layer$34));
25508
+ })).pipe(provideMerge(layer$35));
25509
25509
  //#endregion
25510
25510
  //#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/cryptoNode.js
25511
25511
  /**
@@ -28291,7 +28291,7 @@ var MigrationError = class extends TaggedError("MigrationError") {};
28291
28291
  * @category constructors
28292
28292
  * @since 4.0.0
28293
28293
  */
28294
- const make$42 = ({ dumpSchema = () => void_$1 }) => ({ loader, schemaDirectory, table = "effect_sql_migrations" }) => gen(function* () {
28294
+ const make$43 = ({ dumpSchema = () => void_$1 }) => ({ loader, schemaDirectory, table = "effect_sql_migrations" }) => gen(function* () {
28295
28295
  const sql = yield* SqlClient;
28296
28296
  const ensureMigrationsTable = sql.onDialectOrElse({
28297
28297
  mssql: () => sql`IF OBJECT_ID(N'${sql.literal(table)}', N'U') IS NULL
@@ -28380,7 +28380,7 @@ const make$42 = ({ dumpSchema = () => void_$1 }) => ({ loader, schemaDirectory,
28380
28380
  if (schemaDirectory && completed.length > 0) yield* dumpSchema(`${schemaDirectory}/_schema.sql`, table).pipe(catchCause((cause) => logInfo("Could not dump schema", cause)));
28381
28381
  return completed;
28382
28382
  });
28383
- const migrationOrder = /*#__PURE__*/ make$72(([a], [b]) => Number$2(a, b));
28383
+ const migrationOrder = /*#__PURE__*/ make$73(([a], [b]) => Number$2(a, b));
28384
28384
  const isConstraintConflict = (error) => error.reason._tag === "ConstraintError" || error.reason._tag === "UniqueViolation";
28385
28385
  /**
28386
28386
  * Creates a migration loader from a record of migration effects keyed by
@@ -29947,7 +29947,7 @@ const makeMigrationLoader = (throughId) => fromRecord(Object.fromEntries(migrati
29947
29947
  * Migrator run function - no schema dumping needed
29948
29948
  * Uses the base Migrator.make without platform dependencies
29949
29949
  */
29950
- const run = make$42({});
29950
+ const run = make$43({});
29951
29951
  /**
29952
29952
  * Run all pending migrations.
29953
29953
  *
@@ -30194,7 +30194,7 @@ function parseDpopToken(request) {
30194
30194
  const token = header.slice(5).trim();
30195
30195
  return token.length > 0 ? token : null;
30196
30196
  }
30197
- const layer$32 = effect(EnvironmentAuth, gen(function* () {
30197
+ const layer$33 = effect(EnvironmentAuth, gen(function* () {
30198
30198
  const policy = yield* EnvironmentAuthPolicy;
30199
30199
  const bootstrapCredentials = yield* PairingGrantStore;
30200
30200
  const sessions = yield* SessionStore;
@@ -30402,9 +30402,9 @@ const layer$32 = effect(EnvironmentAuth, gen(function* () {
30402
30402
  issueWebSocketTicket,
30403
30403
  issueStartupPairingUrl
30404
30404
  });
30405
- })).pipe(provideMerge(layer$36), provideMerge(layer$33), provideMerge(layer$38));
30406
- const storageLayer = mergeAll(layer$35, layerConfig);
30407
- const runtimeLayer = layer$32.pipe(provideMerge(storageLayer));
30405
+ })).pipe(provideMerge(layer$37), provideMerge(layer$34), provideMerge(layer$39));
30406
+ const storageLayer = mergeAll(layer$36, layerConfig);
30407
+ const runtimeLayer = layer$33.pipe(provideMerge(storageLayer));
30408
30408
  //#endregion
30409
30409
  //#region src/cliAuthFormat.ts
30410
30410
  const newline = "\n";
@@ -31801,7 +31801,7 @@ const runWithEnvironmentAuth = (flags, run, options) => gen(function* () {
31801
31801
  const minimumLogLevel = options?.quietLogs ? "Error" : config.logLevel;
31802
31802
  return yield* gen(function* () {
31803
31803
  return yield* run(yield* EnvironmentAuth);
31804
- }).pipe(provide$1(mergeAll(runtimeLayer).pipe(provide(layer$39(config)), provide(succeed$3(MinimumLogLevel, minimumLogLevel)))));
31804
+ }).pipe(provide$1(mergeAll(runtimeLayer).pipe(provide(layer$40(config)), provide(succeed$3(MinimumLogLevel, minimumLogLevel)))));
31805
31805
  });
31806
31806
  const ttlFlag$1 = string("ttl").pipe(withSchema(DurationFromString), withDescription$1("TTL, for example `5m`, `1h`, `30d`, or `15 minutes`."), optional);
31807
31807
  const jsonFlag = boolean("json").pipe(withDescription$1("Emit JSON instead of human-readable output."), withDefault(false));
@@ -31809,7 +31809,7 @@ const labelFlag$1 = string("label").pipe(withDescription$1("Optional human-reada
31809
31809
  const subjectFlag = string("subject").pipe(withDescription$1("Optional session subject."), optional);
31810
31810
  const baseUrlFlag = string("base-url").pipe(withDescription$1("Optional public base URL used to print a ready `/pair#token=...` link."), optional);
31811
31811
  const tokenOnlyFlag = boolean("token-only").pipe(withDescription$1("Print only the issued bearer token."), withDefault(false));
31812
- const pairingCreateCommand = make$62("create", {
31812
+ const pairingCreateCommand = make$63("create", {
31813
31813
  ...authLocationFlags,
31814
31814
  ttl: ttlFlag$1,
31815
31815
  label: labelFlag$1,
@@ -31827,26 +31827,26 @@ const pairingCreateCommand = make$62("create", {
31827
31827
  });
31828
31828
  yield* log(output);
31829
31829
  }), { quietLogs: flags.json })));
31830
- const pairingListCommand = make$62("list", {
31830
+ const pairingListCommand = make$63("list", {
31831
31831
  ...authLocationFlags,
31832
31832
  json: jsonFlag
31833
31833
  }).pipe(withDescription("List active client pairing tokens without revealing their secrets."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
31834
31834
  const pairingLinks = yield* environmentAuth.listPairingLinks({ excludeSubjects: [INTERNAL_ADMINISTRATIVE_BOOTSTRAP_SUBJECT] });
31835
31835
  yield* log(formatPairingCredentialList(pairingLinks, { json: flags.json }));
31836
31836
  }), { quietLogs: flags.json })));
31837
- const pairingRevokeCommand = make$62("revoke", {
31837
+ const pairingRevokeCommand = make$63("revoke", {
31838
31838
  ...authLocationFlags,
31839
31839
  id: string$1("id").pipe(withDescription$2("Pairing credential id to revoke."))
31840
31840
  }).pipe(withDescription("Revoke an active client pairing token."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
31841
31841
  const revoked = yield* environmentAuth.revokePairingLink(flags.id);
31842
31842
  yield* log(revoked ? `Revoked pairing credential ${flags.id}.\n` : `No active pairing credential found for ${flags.id}.\n`);
31843
31843
  }))));
31844
- const pairingCommand = make$62("pairing").pipe(withDescription("Manage one-time client pairing tokens."), withSubcommands([
31844
+ const pairingCommand = make$63("pairing").pipe(withDescription("Manage one-time client pairing tokens."), withSubcommands([
31845
31845
  pairingCreateCommand,
31846
31846
  pairingListCommand,
31847
31847
  pairingRevokeCommand
31848
31848
  ]));
31849
- const sessionIssueCommand = make$62("issue", {
31849
+ const sessionIssueCommand = make$63("issue", {
31850
31850
  ...authLocationFlags,
31851
31851
  ttl: ttlFlag$1,
31852
31852
  label: labelFlag$1,
@@ -31865,26 +31865,26 @@ const sessionIssueCommand = make$62("issue", {
31865
31865
  tokenOnly: flags.tokenOnly
31866
31866
  }));
31867
31867
  }), { quietLogs: flags.json || flags.tokenOnly })));
31868
- const sessionListCommand = make$62("list", {
31868
+ const sessionListCommand = make$63("list", {
31869
31869
  ...authLocationFlags,
31870
31870
  json: jsonFlag
31871
31871
  }).pipe(withDescription("List active sessions without revealing bearer tokens."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
31872
31872
  const sessions = yield* environmentAuth.listSessions();
31873
31873
  yield* log(formatSessionList(sessions, { json: flags.json }));
31874
31874
  }), { quietLogs: flags.json })));
31875
- const sessionRevokeCommand = make$62("revoke", {
31875
+ const sessionRevokeCommand = make$63("revoke", {
31876
31876
  ...authLocationFlags,
31877
31877
  sessionId: string$1("session-id").pipe(withDescription$2("Session id to revoke."), withSchema$1(AuthSessionId))
31878
31878
  }).pipe(withDescription("Revoke an active session."), withHandler((flags) => runWithEnvironmentAuth(flags, (environmentAuth) => gen(function* () {
31879
31879
  const revoked = yield* environmentAuth.revokeSession(flags.sessionId);
31880
31880
  yield* log(revoked ? `Revoked session ${flags.sessionId}.\n` : `No active session found for ${flags.sessionId}.\n`);
31881
31881
  }))));
31882
- const sessionCommand = make$62("session").pipe(withDescription("Manage bearer sessions."), withSubcommands([
31882
+ const sessionCommand = make$63("session").pipe(withDescription("Manage bearer sessions."), withSubcommands([
31883
31883
  sessionIssueCommand,
31884
31884
  sessionListCommand,
31885
31885
  sessionRevokeCommand
31886
31886
  ]));
31887
- const authCommand = make$62("auth").pipe(withDescription("Manage the local auth control plane for headless deployments."), withSubcommands([pairingCommand, sessionCommand]));
31887
+ const authCommand = make$63("auth").pipe(withDescription("Manage the local auth control plane for headless deployments."), withSubcommands([pairingCommand, sessionCommand]));
31888
31888
  //#endregion
31889
31889
  //#region ../t3-shared/src/devHome.ts
31890
31890
  /**
@@ -32072,7 +32072,7 @@ const readTailscaleStatus = gen(function* () {
32072
32072
  argumentCount: args.length
32073
32073
  };
32074
32074
  return yield* gen(function* () {
32075
- const child = yield* spawner.spawn(make$79(executable, args)).pipe(mapError((cause) => new TailscaleCommandSpawnError({
32075
+ const child = yield* spawner.spawn(make$80(executable, args)).pipe(mapError((cause) => new TailscaleCommandSpawnError({
32076
32076
  ...commandContext,
32077
32077
  cause
32078
32078
  })));
@@ -32116,7 +32116,7 @@ const runTailscaleCommand = (args, timeoutInput) => gen(function* () {
32116
32116
  };
32117
32117
  const timeout$1 = fromInputUnsafe(timeoutInput);
32118
32118
  return yield* gen(function* () {
32119
- const child = yield* spawner.spawn(make$79(executable, args)).pipe(mapError((cause) => new TailscaleCommandSpawnError({
32119
+ const child = yield* spawner.spawn(make$80(executable, args)).pipe(mapError((cause) => new TailscaleCommandSpawnError({
32120
32120
  ...commandContext,
32121
32121
  cause
32122
32122
  })));
@@ -33333,7 +33333,7 @@ const makePairServerConfig = fn(function* (input) {
33333
33333
  const { baseDir, variant, state } = input.target;
33334
33334
  const devUrl = state.devUrl !== void 0 ? new URL(state.devUrl) : void 0;
33335
33335
  const derivedPaths = yield* deriveServerPaths(baseDir, variant === "dev" ? DEV_VARIANT_PLACEHOLDER_URL : void 0, {});
33336
- return make$49({
33336
+ return make$50({
33337
33337
  logLevel: input.logLevel,
33338
33338
  traceMinLevel: "Info",
33339
33339
  traceTimingEnabled: false,
@@ -33419,9 +33419,9 @@ const mintPairingLink = fn("pair.mintPairingLink")(function* (input) {
33419
33419
  label: getOrElse(input.label, () => "t3 pair"),
33420
33420
  ...isSome(input.ttl) ? { ttl: input.ttl.value } : {}
33421
33421
  });
33422
- }).pipe(provide$1(runtimeLayer.pipe(provide(layer$39(input.config)), provide(succeed$3(MinimumLogLevel, input.config.logLevel)))));
33422
+ }).pipe(provide$1(runtimeLayer.pipe(provide(layer$40(input.config)), provide(succeed$3(MinimumLogLevel, input.config.logLevel)))));
33423
33423
  });
33424
- const pairCommand = make$62("pair", {
33424
+ const pairCommand = make$63("pair", {
33425
33425
  baseDir: baseDirFlag,
33426
33426
  ttl: string("ttl").pipe(withSchema(DurationFromString), withDescription$1("Token TTL, for example `5m`, `1h`, or `15 minutes`. Defaults to 5 minutes."), optional),
33427
33427
  label: string("label").pipe(withDescription$1("Optional label shown in the server's connections list."), optional),
@@ -33462,7 +33462,7 @@ const pairCommand = make$62("pair", {
33462
33462
  expiresAt: issued.expiresAt,
33463
33463
  notes
33464
33464
  }));
33465
- }).pipe(provide$1(layer$43))));
33465
+ }).pipe(provide$1(layer$44))));
33466
33466
  //#endregion
33467
33467
  //#region ../../node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=a18f963109656ddbeb2a99ca45f942ecf54830986259eb01ce6a970421c9c6a9/node_modules/effect/dist/unstable/encoding/Sse.js
33468
33468
  const SseErrorTypeId = "~effect/encoding/Sse/SseError";
@@ -33808,7 +33808,7 @@ const makeClient = (api, options) => gen(function* () {
33808
33808
  const encodeQuery = map$3(endpoint.query, encodeUnknownEffect);
33809
33809
  const middlewareKeys = Array.from(onEndpointOptions.middleware, (tag) => `${tag.key}/Client`);
33810
33810
  const endpointFn = fnUntraced(function* (request) {
33811
- let httpRequest = make$64(endpoint.method)(endpoint.path);
33811
+ let httpRequest = make$65(endpoint.method)(endpoint.path);
33812
33812
  if (request !== void 0) {
33813
33813
  if (encodeParams !== void 0) {
33814
33814
  const params = yield* encodeParams(request.params);
@@ -33851,7 +33851,7 @@ const makeClient = (api, options) => gen(function* () {
33851
33851
  * @category constructors
33852
33852
  * @since 4.0.0
33853
33853
  */
33854
- const make$40 = (api, options) => flatMap$1(HttpClient, (httpClient) => makeWith(api, {
33854
+ const make$41 = (api, options) => flatMap$1(HttpClient, (httpClient) => makeWith(api, {
33855
33855
  ...options,
33856
33856
  httpClient: options?.transformClient ? options.transformClient(httpClient) : httpClient
33857
33857
  }));
@@ -36112,7 +36112,7 @@ const OrchestrationEngineLive = effect(OrchestrationEngineService, gen(function*
36112
36112
  yield* logDebug("orchestration engine started").pipe(annotateLogs({ sequence: commandReadModel.snapshotSequence }));
36113
36113
  const readEvents = (fromSequenceExclusive, limit) => eventStore.readFromSequence(fromSequenceExclusive, limit);
36114
36114
  const dispatch = (command) => gen(function* () {
36115
- const result = yield* make$73();
36115
+ const result = yield* make$74();
36116
36116
  yield* offer$1(commandQueue, {
36117
36117
  command,
36118
36118
  result,
@@ -38542,7 +38542,7 @@ const TERMINAL_STATUSES = /* @__PURE__ */ new Set([
38542
38542
  "interrupted"
38543
38543
  ]);
38544
38544
  var ThreadBackgroundLivenessService = class extends Service$2()("t3/orchestration/ThreadBackgroundLiveness/ThreadBackgroundLivenessService") {};
38545
- function make$39() {
38545
+ function make$40() {
38546
38546
  const stateByThreadId = /* @__PURE__ */ new Map();
38547
38547
  const stateFor = (threadId) => {
38548
38548
  const existing = stateByThreadId.get(threadId);
@@ -38592,7 +38592,7 @@ function make$39() {
38592
38592
  }
38593
38593
  };
38594
38594
  }
38595
- const layer$31 = effect(ThreadBackgroundLivenessService, sync(make$39));
38595
+ const layer$32 = effect(ThreadBackgroundLivenessService, sync(make$40));
38596
38596
  //#endregion
38597
38597
  //#region ../t3-shared/src/sourceControl.ts
38598
38598
  function parseRemoteHost(remoteUrl) {
@@ -38892,7 +38892,7 @@ const runProcessCore = fn("processRunner.runProcessCore")(function* (spawner, in
38892
38892
  env: input.env,
38893
38893
  extendEnv
38894
38894
  });
38895
- const child = yield* spawner.spawn(make$79(spawnCommand.command, spawnCommand.args, {
38895
+ const child = yield* spawner.spawn(make$80(spawnCommand.command, spawnCommand.args, {
38896
38896
  ...input.spawnCwd ?? input.cwd ? { cwd: input.spawnCwd ?? input.cwd } : {},
38897
38897
  ...input.env !== void 0 ? {
38898
38898
  env: input.env,
@@ -38910,7 +38910,7 @@ const runProcessCore = fn("processRunner.runProcessCore")(function* (spawner, in
38910
38910
  cause
38911
38911
  })));
38912
38912
  const stdin = input.stdin;
38913
- const writeStdin = stdin === void 0 ? void_$1 : run$5(encodeText(make$74(stdin)), child.stdin).pipe(mapError((cause) => new ProcessStdinError({
38913
+ const writeStdin = stdin === void 0 ? void_$1 : run$5(encodeText(make$75(stdin)), child.stdin).pipe(mapError((cause) => new ProcessStdinError({
38914
38914
  command: input.command,
38915
38915
  argumentCount: input.args.length,
38916
38916
  cwd: input.cwd,
@@ -38960,7 +38960,7 @@ const runProcessCore = fn("processRunner.runProcessCore")(function* (spawner, in
38960
38960
  stderrTruncated: stderr.truncated
38961
38961
  };
38962
38962
  });
38963
- const layer$30 = effect(ProcessRunner, fn("ProcessRunner.make")(function* () {
38963
+ const layer$31 = effect(ProcessRunner, fn("ProcessRunner.make")(function* () {
38964
38964
  const spawner = yield* ChildProcessSpawner;
38965
38965
  const run = (input) => finalizeRunProcess(runProcessCore(spawner, input), input);
38966
38966
  return ProcessRunner.of({ run });
@@ -39055,7 +39055,7 @@ const resolveRepositoryIdentityFromCacheKey = fn("RepositoryIdentityResolver.res
39055
39055
  rootPath: cacheKey
39056
39056
  }) : null;
39057
39057
  });
39058
- const layer$29 = effect(RepositoryIdentityResolver, fn("RepositoryIdentityResolver.make")(function* (options = {}) {
39058
+ const layer$30 = effect(RepositoryIdentityResolver, fn("RepositoryIdentityResolver.make")(function* (options = {}) {
39059
39059
  const processRunner = yield* ProcessRunner;
39060
39060
  const repositoryIdentityCache = yield* makeWith$1((cacheKey) => resolveRepositoryIdentityFromCacheKey(cacheKey).pipe(provideService(ProcessRunner, processRunner)), {
39061
39061
  capacity: options.cacheCapacity ?? DEFAULT_REPOSITORY_IDENTITY_CACHE_CAPACITY,
@@ -39069,7 +39069,7 @@ const layer$29 = effect(RepositoryIdentityResolver, fn("RepositoryIdentityResolv
39069
39069
  return yield* get$7(repositoryIdentityCache, cacheKey);
39070
39070
  });
39071
39071
  return RepositoryIdentityResolver.of({ resolve });
39072
- })()).pipe(provide(layer$30));
39072
+ })()).pipe(provide(layer$31));
39073
39073
  //#endregion
39074
39074
  //#region src/orchestration/Layers/ProjectionSnapshotQuery.ts
39075
39075
  const decodeReadModel = decodeUnknownEffect(OrchestrationReadModel);
@@ -40505,7 +40505,7 @@ const OrchestrationInfrastructureLayerLive = mergeAll(effect(ProjectionSnapshotQ
40505
40505
  getThreadDetailById,
40506
40506
  getThreadDetailSnapshot
40507
40507
  };
40508
- })), mergeAll(OrchestrationEventStoreLive, OrchestrationCommandReceiptRepositoryLive), OrchestrationProjectionPipelineLive.pipe(provide(OrchestrationEventStoreLive))).pipe(provideMerge(layer$31));
40508
+ })), mergeAll(OrchestrationEventStoreLive, OrchestrationCommandReceiptRepositoryLive), OrchestrationProjectionPipelineLive.pipe(provide(OrchestrationEventStoreLive))).pipe(provideMerge(layer$32));
40509
40509
  const OrchestrationLayerLive = mergeAll(OrchestrationInfrastructureLayerLive, OrchestrationEngineLive.pipe(provide(OrchestrationInfrastructureLayerLive)));
40510
40510
  //#endregion
40511
40511
  //#region ../t3-shared/src/keybindings.ts
@@ -40970,16 +40970,16 @@ function mergeWithDefaultKeybindings(custom) {
40970
40970
  * Keybindings - Service tag for keybinding configuration operations.
40971
40971
  */
40972
40972
  var Keybindings = class extends Service$2()("t3/keybindings") {};
40973
- const layer$28 = effect(Keybindings, gen(function* () {
40973
+ const layer$29 = effect(Keybindings, gen(function* () {
40974
40974
  const { keybindingsConfigPath } = yield* ServerConfig;
40975
40975
  const fs = yield* FileSystem;
40976
40976
  const path = yield* Path;
40977
- const upsertSemaphore = yield* make$75(1);
40977
+ const upsertSemaphore = yield* make$76(1);
40978
40978
  const resolvedConfigCacheKey = "resolved";
40979
40979
  const changesPubSub = yield* unbounded$1();
40980
- const startedRef = yield* make$63(false);
40981
- const startedDeferred = yield* make$73();
40982
- const watcherScope = yield* make$76("sequential");
40980
+ const startedRef = yield* make$64(false);
40981
+ const startedDeferred = yield* make$74();
40982
+ const watcherScope = yield* make$77("sequential");
40983
40983
  yield* addFinalizer(() => close(watcherScope, void_$2));
40984
40984
  const emitChange = (configState) => publish(changesPubSub, configState).pipe(asVoid);
40985
40985
  const readConfigExists = fs.exists(keybindingsConfigPath).pipe(mapError((cause) => new KeybindingsConfigError({
@@ -41079,7 +41079,7 @@ const layer$28 = effect(Keybindings, gen(function* () {
41079
41079
  keybindings: mergeWithDefaultKeybindings(compileResolvedKeybindingsConfig(keybindings)),
41080
41080
  issues
41081
41081
  })));
41082
- const resolvedConfigCache = yield* make$81({
41082
+ const resolvedConfigCache = yield* make$82({
41083
41083
  capacity: 1,
41084
41084
  lookup: () => loadConfigStateFromDisk
41085
41085
  });
@@ -41422,7 +41422,7 @@ const resolveEditorLaunch = fn("resolveEditorLaunch")(function* (input) {
41422
41422
  });
41423
41423
  const launchAndUnref = fn("externalLauncher.launchAndUnref")(function* (launch, onError) {
41424
41424
  const spawner = yield* ChildProcessSpawner;
41425
- const command = make$79(launch.command, launch.args, launch.options);
41425
+ const command = make$80(launch.command, launch.args, launch.options);
41426
41426
  yield* spawner.spawn(command).pipe(flatMap$1((handle) => handle.unref), asVoid, scoped, mapError(onError));
41427
41427
  });
41428
41428
  const launchBrowser = fn("externalLauncher.launchBrowser")(function* (target) {
@@ -41459,7 +41459,7 @@ const launchEditorProcess = fn("externalLauncher.launchEditorProcess")(function*
41459
41459
  cause
41460
41460
  }));
41461
41461
  });
41462
- const layer$27 = effect(ExternalLauncher, gen(function* () {
41462
+ const layer$28 = effect(ExternalLauncher, gen(function* () {
41463
41463
  const spawner = yield* ChildProcessSpawner;
41464
41464
  const fileSystem = yield* FileSystem;
41465
41465
  const path = yield* Path;
@@ -41487,9 +41487,9 @@ var OrchestrationReactor = class extends Service$2()("t3/orchestration/Services/
41487
41487
  //#endregion
41488
41488
  //#region src/serverLifecycleEvents.ts
41489
41489
  var ServerLifecycleEvents = class extends Service$2()("t3/serverLifecycleEvents") {};
41490
- const layer$26 = effect(ServerLifecycleEvents, gen(function* () {
41490
+ const layer$27 = effect(ServerLifecycleEvents, gen(function* () {
41491
41491
  const pubsub = yield* unbounded$1();
41492
- const state = yield* make$63({
41492
+ const state = yield* make$64({
41493
41493
  sequence: 0,
41494
41494
  events: []
41495
41495
  });
@@ -41566,7 +41566,7 @@ var ServerSettingsService = class extends Service$2()("t3/serverSettings/ServerS
41566
41566
  const makeTest = (overrides = {}) => gen(function* () {
41567
41567
  const { automaticGitFetchInterval, providerHealthRefreshInterval, ...overridesForMerge } = overrides;
41568
41568
  const merged = deepMerge(DEFAULT_SERVER_SETTINGS, overridesForMerge);
41569
- const currentSettingsRef = yield* make$63(yield* normalizeServerSettings({
41569
+ const currentSettingsRef = yield* make$64(yield* normalizeServerSettings({
41570
41570
  ...merged,
41571
41571
  ...automaticGitFetchInterval !== void 0 ? { automaticGitFetchInterval } : {},
41572
41572
  ...providerHealthRefreshInterval !== void 0 ? { providerHealthRefreshInterval } : {}
@@ -41620,17 +41620,17 @@ function stripDefaultServerSettings(current, defaults) {
41620
41620
  }
41621
41621
  return Object.is(current, defaults) ? void 0 : current;
41622
41622
  }
41623
- const layer$25 = effect(ServerSettingsService, gen(function* () {
41623
+ const layer$26 = effect(ServerSettingsService, gen(function* () {
41624
41624
  const { settingsPath } = yield* ServerConfig;
41625
41625
  const fs = yield* FileSystem;
41626
41626
  const pathService = yield* Path;
41627
41627
  const secretStore = yield* ServerSecretStore;
41628
- const writeSemaphore = yield* make$75(1);
41628
+ const writeSemaphore = yield* make$76(1);
41629
41629
  const cacheKey = "settings";
41630
41630
  const changesPubSub = yield* unbounded$1();
41631
- const startedRef = yield* make$63(false);
41632
- const startedDeferred = yield* make$73();
41633
- const watcherScope = yield* make$76("sequential");
41631
+ const startedRef = yield* make$64(false);
41632
+ const startedDeferred = yield* make$74();
41633
+ const watcherScope = yield* make$77("sequential");
41634
41634
  yield* addFinalizer(() => close(watcherScope, void_$2));
41635
41635
  const emitChange = (settings) => publish(changesPubSub, settings).pipe(asVoid);
41636
41636
  const readConfigExists = fs.exists(settingsPath).pipe(mapError((cause) => new ServerSettingsError({
@@ -41657,7 +41657,7 @@ const layer$25 = effect(ServerSettingsService, gen(function* () {
41657
41657
  }
41658
41658
  return decoded.value;
41659
41659
  });
41660
- const settingsCache = yield* make$81({
41660
+ const settingsCache = yield* make$82({
41661
41661
  capacity: 1,
41662
41662
  lookup: () => loadSettingsFromDisk
41663
41663
  });
@@ -42017,12 +42017,12 @@ var AnalyticsService = class AnalyticsService extends Service$2()("t3/telemetry/
42017
42017
  flush: void_$1
42018
42018
  }));
42019
42019
  };
42020
- const layer$24 = effect(AnalyticsService, gen(function* () {
42020
+ const layer$25 = effect(AnalyticsService, gen(function* () {
42021
42021
  const telemetryConfig = yield* TelemetryEnvConfig;
42022
42022
  const httpClient = yield* HttpClient;
42023
42023
  const serverConfig = yield* ServerConfig;
42024
42024
  const identifier = yield* getTelemetryIdentifier;
42025
- const bufferRef = yield* make$63([]);
42025
+ const bufferRef = yield* make$64([]);
42026
42026
  const clientType = serverConfig.mode === "desktop" ? "desktop-app" : "cli-web-client";
42027
42027
  const hostPlatform = yield* HostProcessPlatform;
42028
42028
  const hostArchitecture = yield* HostProcessArchitecture;
@@ -42222,7 +42222,7 @@ function platformArch(architecture) {
42222
42222
  * state. It intentionally has no fallback Layer.succeed value: callers must
42223
42223
  * provide the external platform services and a ServerConfig.
42224
42224
  */
42225
- const layer$23 = effect(ServerEnvironment, gen(function* () {
42225
+ const layer$24 = effect(ServerEnvironment, gen(function* () {
42226
42226
  const fileSystem = yield* FileSystem;
42227
42227
  const path = yield* Path;
42228
42228
  const serverConfig = yield* ServerConfig;
@@ -42276,7 +42276,7 @@ const layer$23 = effect(ServerEnvironment, gen(function* () {
42276
42276
  getEnvironmentId: succeed$1(environmentId),
42277
42277
  getDescriptor: succeed$1(descriptor)
42278
42278
  });
42279
- })).pipe(provide(layer$30));
42279
+ })).pipe(provide(layer$31));
42280
42280
  //#endregion
42281
42281
  //#region src/provider/Services/ProviderSessionReaper.ts
42282
42282
  var ProviderSessionReaper = class extends Service$2()("t3/provider/Services/ProviderSessionReaper") {};
@@ -42290,7 +42290,7 @@ const forkParked = (effect) => gen(function* () {
42290
42290
  yield* forkScoped(effect);
42291
42291
  return;
42292
42292
  }
42293
- const parked = yield* make$73();
42293
+ const parked = yield* make$74();
42294
42294
  yield* forkScoped(succeed$4(parked, void 0).pipe(andThen(activation), andThen(effect)));
42295
42295
  yield* _await(parked);
42296
42296
  });
@@ -42309,9 +42309,9 @@ var ServerRuntimeStartupError = class extends TaggedErrorClass()("ServerRuntimeS
42309
42309
  var ServerRuntimeStartup = class extends Service$2()("t3/serverRuntimeStartup") {};
42310
42310
  const settleQueuedCommand = (deferred, exit) => isSuccess(exit) ? succeed$4(deferred, exit.value) : failCause$2(deferred, exit.cause);
42311
42311
  const makeCommandGate = gen(function* () {
42312
- const commandReady = yield* make$73();
42312
+ const commandReady = yield* make$74();
42313
42313
  const commandQueue = yield* unbounded$2();
42314
- const commandReadinessState = yield* make$63("pending");
42314
+ const commandReadinessState = yield* make$64("pending");
42315
42315
  yield* forkScoped(forever(take$1(commandQueue).pipe(flatMap$1((command) => command.run))));
42316
42316
  return {
42317
42317
  awaitCommandReady: _await(commandReady),
@@ -42327,7 +42327,7 @@ const makeCommandGate = gen(function* () {
42327
42327
  const readinessState = yield* get$3(commandReadinessState);
42328
42328
  if (readinessState === "ready") return yield* effect;
42329
42329
  if (readinessState !== "pending") return yield* readinessState;
42330
- const result = yield* make$73();
42330
+ const result = yield* make$74();
42331
42331
  yield* offer$1(commandQueue, { run: _await(commandReady).pipe(flatMap$1(() => effect), exit, flatMap$1((exit) => settleQueuedCommand(result, exit))) });
42332
42332
  return yield* _await(result);
42333
42333
  })
@@ -42430,7 +42430,7 @@ const maybeOpenBrowser = (target) => gen(function* () {
42430
42430
  yield* (yield* ExternalLauncher).launchBrowser(target).pipe(catch_(() => logInfo("browser auto-open unavailable", { hint: `Open ${target} in your browser.` })));
42431
42431
  });
42432
42432
  const runStartupPhase = (phase, effect) => effect.pipe(annotateSpans({ "startup.phase": phase }), withSpan(`server.startup.${phase}`));
42433
- const make$30 = (options) => gen(function* () {
42433
+ const make$31 = (options) => gen(function* () {
42434
42434
  const serverConfig = yield* ServerConfig;
42435
42435
  const keybindings = yield* Keybindings;
42436
42436
  const orchestrationReactor = yield* OrchestrationReactor;
@@ -42440,8 +42440,8 @@ const make$30 = (options) => gen(function* () {
42440
42440
  const serverEnvironment = yield* ServerEnvironment;
42441
42441
  const crypto = yield* Crypto;
42442
42442
  const commandGate = yield* makeCommandGate;
42443
- const httpListening = yield* make$73();
42444
- const reactorScope = yield* make$76("sequential");
42443
+ const httpListening = yield* make$74();
42444
+ const reactorScope = yield* make$77("sequential");
42445
42445
  yield* addFinalizer(() => close(reactorScope, void_$2));
42446
42446
  yield* forkScoped(exit(gen(function* () {
42447
42447
  yield* logDebug("startup phase: starting keybindings runtime");
@@ -42544,7 +42544,7 @@ const make$30 = (options) => gen(function* () {
42544
42544
  enqueueCommand: commandGate.enqueueCommand
42545
42545
  };
42546
42546
  });
42547
- const layerWithOptions = (options) => effect(ServerRuntimeStartup, make$30(options));
42547
+ const layerWithOptions = (options) => effect(ServerRuntimeStartup, make$31(options));
42548
42548
  layerWithOptions();
42549
42549
  //#endregion
42550
42550
  //#region src/workspace/WorkspacePaths.ts
@@ -42616,7 +42616,7 @@ function expandHomePath$2(input, path) {
42616
42616
  if (input.startsWith("~/") || input.startsWith("~\\")) return path.join(NodeOS.homedir(), input.slice(2));
42617
42617
  return input;
42618
42618
  }
42619
- const layer$21 = effect(WorkspacePaths, gen(function* () {
42619
+ const layer$22 = effect(WorkspacePaths, gen(function* () {
42620
42620
  const fileSystem = yield* FileSystem;
42621
42621
  const path = yield* Path;
42622
42622
  const statWorkspaceRoot = fn("WorkspacePaths.statWorkspaceRoot")(function* (workspaceRoot, normalizedWorkspaceRoot, phase) {
@@ -42778,14 +42778,14 @@ const projectCommandUuid = Crypto.pipe(flatMap$1((crypto) => crypto.randomUUIDv4
42778
42778
  operation: "generateProjectCommandId",
42779
42779
  cause
42780
42780
  })));
42781
- const ProjectCliRuntimeLive = mergeAll(layer$21, OrchestrationLayerLive.pipe(provideMerge(layer$29), provideMerge(layerConfig)));
42781
+ const ProjectCliRuntimeLive = mergeAll(layer$22, OrchestrationLayerLive.pipe(provideMerge(layer$30), provideMerge(layerConfig)));
42782
42782
  const PROJECT_CLI_LIVE_SERVER_TIMEOUT = seconds(1);
42783
42783
  const withProjectCliSessionToken = (environmentAuth, run) => acquireUseRelease(environmentAuth.issueSession({
42784
42784
  scopes: AuthAdministrativeScopes,
42785
42785
  label: "t3 project cli"
42786
42786
  }), (issued) => run(issued.token), (issued) => environmentAuth.revokeSession(issued.sessionId).pipe(ignore$1({ log: true })));
42787
42787
  const withProjectCliLiveServerTimeout = (effect) => effect.pipe(timeout(PROJECT_CLI_LIVE_SERVER_TIMEOUT));
42788
- const makeLiveServerClient = (origin) => make$40(EnvironmentHttpApi, { baseUrl: origin });
42788
+ const makeLiveServerClient = (origin) => make$41(EnvironmentHttpApi, { baseUrl: origin });
42789
42789
  const normalizeWorkspaceRootForProjectCommand = fn("normalizeWorkspaceRootForProjectCommand")(function* (workspaceRoot) {
42790
42790
  return yield* (yield* WorkspacePaths).normalizeWorkspaceRoot(workspaceRoot);
42791
42791
  });
@@ -42868,7 +42868,7 @@ const runProjectMutation = fn("runProjectMutation")(function* (flags, run) {
42868
42868
  });
42869
42869
  yield* log(output);
42870
42870
  }));
42871
- const offlineRuntimeLayer = ProjectCliRuntimeLive.pipe(provide(layer$39(config)), provide(succeed$3(MinimumLogLevel, minimumLogLevel)));
42871
+ const offlineRuntimeLayer = ProjectCliRuntimeLive.pipe(provide(layer$40(config)), provide(succeed$3(MinimumLogLevel, minimumLogLevel)));
42872
42872
  return yield* gen(function* () {
42873
42873
  const snapshot = yield* getOfflineSnapshot();
42874
42874
  const orchestrationEngine = yield* OrchestrationEngineService;
@@ -42879,9 +42879,9 @@ const runProjectMutation = fn("runProjectMutation")(function* (flags, run) {
42879
42879
  });
42880
42880
  yield* log(output);
42881
42881
  }).pipe(provide$1(offlineRuntimeLayer));
42882
- }).pipe(provide$1(mergeAll(runtimeLayer, layer$21).pipe(provideMerge(layer$43), provide(layer$39(config)), provide(succeed$3(MinimumLogLevel, minimumLogLevel)))));
42882
+ }).pipe(provide$1(mergeAll(runtimeLayer, layer$22).pipe(provideMerge(layer$44), provide(layer$40(config)), provide(succeed$3(MinimumLogLevel, minimumLogLevel)))));
42883
42883
  });
42884
- const projectAddCommand = make$62("add", {
42884
+ const projectAddCommand = make$63("add", {
42885
42885
  ...projectLocationFlags,
42886
42886
  workspaceRoot: string$1("path").pipe(withDescription$2("Workspace root to add as a project.")),
42887
42887
  title: string("title").pipe(withDescription$1("Optional project title."), optional)
@@ -42906,7 +42906,7 @@ const projectAddCommand = make$62("add", {
42906
42906
  });
42907
42907
  return `Added project ${projectId} (${title}) at ${workspaceRoot}.`;
42908
42908
  }))));
42909
- const projectRemoveCommand = make$62("remove", {
42909
+ const projectRemoveCommand = make$63("remove", {
42910
42910
  ...projectLocationFlags,
42911
42911
  project: string$1("project").pipe(withDescription$2("Project id or workspace root to remove.")),
42912
42912
  force: boolean("force").pipe(withDescription$1("Delete the project and all of its threads."), withDefault(false))
@@ -42923,7 +42923,7 @@ const projectRemoveCommand = make$62("remove", {
42923
42923
  });
42924
42924
  return `Removed project ${project.id} (${project.title}).`;
42925
42925
  }))));
42926
- const projectRenameCommand = make$62("rename", {
42926
+ const projectRenameCommand = make$63("rename", {
42927
42927
  ...projectLocationFlags,
42928
42928
  project: string$1("project").pipe(withDescription$2("Project id or workspace root to rename.")),
42929
42929
  title: string$1("title").pipe(withDescription$2("New project title."))
@@ -42942,7 +42942,7 @@ const projectRenameCommand = make$62("rename", {
42942
42942
  });
42943
42943
  return `Renamed project ${project.id} to ${nextTitle}.`;
42944
42944
  }))));
42945
- const projectCommand = make$62("project").pipe(withDescription("Manage projects."), withSubcommands([
42945
+ const projectCommand = make$63("project").pipe(withDescription("Manage projects."), withSubcommands([
42946
42946
  projectAddCommand,
42947
42947
  projectRemoveCommand,
42948
42948
  projectRenameCommand
@@ -43005,7 +43005,7 @@ function acquireDaemonLock(stateDir) {
43005
43005
  * @category layers
43006
43006
  * @since 4.0.0
43007
43007
  */
43008
- const layer$20 = (api, options) => use(fnUntraced(function* (router) {
43008
+ const layer$21 = (api, options) => use(fnUntraced(function* (router) {
43009
43009
  const services = yield* context();
43010
43010
  const routes = [];
43011
43011
  const availableGroups = Array.from(services.mapUnsafe.keys()).filter((key) => key.startsWith("effect/httpapi/HttpApiGroup/"));
@@ -43058,19 +43058,19 @@ const HandlersTypeId = "~effect/httpapi/HttpApiBuilder/Handlers";
43058
43058
  */
43059
43059
  const securityDecode = (self) => {
43060
43060
  switch (self._tag) {
43061
- case "Http": return map$4(HttpServerRequest, (request) => make$67(getAuthorizationCredential(request.headers.authorization, self.scheme) ?? ""));
43061
+ case "Http": return map$4(HttpServerRequest, (request) => make$68(getAuthorizationCredential(request.headers.authorization, self.scheme) ?? ""));
43062
43062
  case "ApiKey": {
43063
43063
  const key = self.in === "header" ? self.key.toLowerCase() : self.key;
43064
43064
  const schema = Struct({ [key]: String$1 });
43065
43065
  return match$2(self.in === "query" ? schemaSearchParams(schema) : self.in === "cookie" ? schemaCookies(schema) : schemaHeaders(schema), {
43066
- onFailure: () => make$67(""),
43067
- onSuccess: (match) => make$67(match[key])
43066
+ onFailure: () => make$68(""),
43067
+ onSuccess: (match) => make$68(match[key])
43068
43068
  });
43069
43069
  }
43070
43070
  case "Basic": {
43071
43071
  const empty = {
43072
43072
  username: "",
43073
- password: make$67("")
43073
+ password: make$68("")
43074
43074
  };
43075
43075
  return map$4(HttpServerRequest, (request) => {
43076
43076
  const encoded = getAuthorizationCredential(request.headers.authorization, basicScheme);
@@ -43081,7 +43081,7 @@ const securityDecode = (self) => {
43081
43081
  if (separator === -1) return empty;
43082
43082
  return {
43083
43083
  username: decoded.slice(0, separator),
43084
- password: make$67(decoded.slice(separator + 1))
43084
+ password: make$68(decoded.slice(separator + 1))
43085
43085
  };
43086
43086
  });
43087
43087
  }
@@ -43619,18 +43619,18 @@ function requireDesktopTelemetryWriteProgress(fd, remainingBytes, written) {
43619
43619
  remainingBytes
43620
43620
  }));
43621
43621
  }
43622
- const layer$19 = effect(DesktopTelemetryReceiver, fn("resourceTelemetry.desktopTelemetryReceiver.make")(function* () {
43622
+ const layer$20 = effect(DesktopTelemetryReceiver, fn("resourceTelemetry.desktopTelemetryReceiver.make")(function* () {
43623
43623
  const config = yield* ServerConfig;
43624
43624
  const serverSettings = yield* ServerSettingsService;
43625
- const latest = yield* make$63(none());
43625
+ const latest = yield* make$64(none());
43626
43626
  const receiverStartedAt = yield* now$1;
43627
- const lastContactAtMs = yield* make$63(initialDesktopTelemetryContactAt(config.desktopTelemetryFd, toEpochMillis(receiverStartedAt)));
43628
- const snapshotStaleAfterMs = yield* make$63(resolveDesktopTelemetrySnapshotStaleAfterMs(DEFAULT_HOST_POWER_ACTIVE_INTERVAL_MS, DEFAULT_HOST_POWER_IDLE_INTERVAL_MS));
43627
+ const lastContactAtMs = yield* make$64(initialDesktopTelemetryContactAt(config.desktopTelemetryFd, toEpochMillis(receiverStartedAt)));
43628
+ const snapshotStaleAfterMs = yield* make$64(resolveDesktopTelemetrySnapshotStaleAfterMs(DEFAULT_HOST_POWER_ACTIVE_INTERVAL_MS, DEFAULT_HOST_POWER_IDLE_INTERVAL_MS));
43629
43629
  const changes = yield* sliding(8);
43630
43630
  const healthChanges = yield* sliding(4);
43631
- const controlMutex = yield* make$75(1);
43632
- const snapshotMutex = yield* make$75(1);
43633
- const health = yield* make$63({
43631
+ const controlMutex = yield* make$76(1);
43632
+ const snapshotMutex = yield* make$76(1);
43633
+ const health = yield* make$64({
43634
43634
  status: config.desktopTelemetryFd === void 0 ? "unavailable" : "starting",
43635
43635
  lastSampleAt: none(),
43636
43636
  lastError: config.desktopTelemetryFd === void 0 ? some(new DesktopTelemetryDescriptorUnavailable({ mode: config.mode }).message) : none()
@@ -43796,8 +43796,8 @@ const makeUnknownSnapshot = (source, updatedAt) => ({
43796
43796
  function samePowerState(left, right) {
43797
43797
  return left.source === right.source && left.idle === right.idle && left.locked === right.locked && left.suspended === right.suspended && left.onBattery === right.onBattery && left.lowPowerMode === right.lowPowerMode && left.thermalState === right.thermalState && left.stale === right.stale;
43798
43798
  }
43799
- const make$27 = fn("background.hostPower.make")(function* (initialSnapshot) {
43800
- const latestRef = yield* make$63(initialSnapshot ?? makeUnknownSnapshot("unknown", yield* now$1));
43799
+ const make$28 = fn("background.hostPower.make")(function* (initialSnapshot) {
43800
+ const latestRef = yield* make$64(initialSnapshot ?? makeUnknownSnapshot("unknown", yield* now$1));
43801
43801
  const changes = yield* sliding(1);
43802
43802
  const report = (snapshot) => modify$2(latestRef, (current) => {
43803
43803
  if (isLessThan$1(snapshot.updatedAt, current.updatedAt)) return [none(), current];
@@ -43812,12 +43812,12 @@ const make$27 = fn("background.hostPower.make")(function* (initialSnapshot) {
43812
43812
  streamChanges: fromPubSub(changes)
43813
43813
  });
43814
43814
  });
43815
- const layer$18 = effect(HostPowerMonitor, gen(function* () {
43815
+ const layer$19 = effect(HostPowerMonitor, gen(function* () {
43816
43816
  const desktopSubscription = yield* (yield* DesktopTelemetryReceiver).subscribe;
43817
43817
  const initial = desktopSubscription.latest;
43818
43818
  const monitor = yield* match$1(initial, {
43819
- onNone: () => make$27(),
43820
- onSome: (snapshot) => make$27(snapshot.power)
43819
+ onNone: () => make$28(),
43820
+ onSome: (snapshot) => make$28(snapshot.power)
43821
43821
  });
43822
43822
  yield* desktopSubscription.changes.pipe(map$8((snapshot) => snapshot.power), runForEach(monitor.report), forkScoped);
43823
43823
  return monitor;
@@ -43907,12 +43907,12 @@ function computeSnapshot(input) {
43907
43907
  updatedAt: input.updatedAt
43908
43908
  };
43909
43909
  }
43910
- const layer$17 = effect(BackgroundPolicy, fn("background.policy.make")(function* () {
43910
+ const layer$18 = effect(BackgroundPolicy, fn("background.policy.make")(function* () {
43911
43911
  const hostPowerMonitor = yield* HostPowerMonitor;
43912
43912
  const serverSettings = yield* ServerSettingsService;
43913
- const leasesRef = yield* make$63(/* @__PURE__ */ new Map());
43913
+ const leasesRef = yield* make$64(/* @__PURE__ */ new Map());
43914
43914
  const changes = yield* sliding(1);
43915
- const publishMutex = yield* make$75(1);
43915
+ const publishMutex = yield* make$76(1);
43916
43916
  const backgroundActivitySettings = serverSettings.getSettings.pipe(map$4(resolveServerBackgroundActivitySettings), orElseSucceed(() => getBackgroundActivityPresetSettings("balanced")));
43917
43917
  const snapshot = gen(function* () {
43918
43918
  const [hostPower, leases, now, settings] = yield* all([
@@ -44000,8 +44000,8 @@ function nonNegativeInteger(value, fallback) {
44000
44000
  if (!Number.isFinite(value)) return 0;
44001
44001
  return Math.max(0, Math.round(value));
44002
44002
  }
44003
- const layer$16 = effect(ResourceAttribution, fn("resourceTelemetry.resourceAttribution.make")(function* () {
44004
- const entries = yield* make$63(/* @__PURE__ */ new Map());
44003
+ const layer$17 = effect(ResourceAttribution, fn("resourceTelemetry.resourceAttribution.make")(function* () {
44004
+ const entries = yield* make$64(/* @__PURE__ */ new Map());
44005
44005
  const record = (input) => update$2(entries, (current) => {
44006
44006
  const next = new Map(current);
44007
44007
  const entryKey = key(input);
@@ -44137,7 +44137,7 @@ const layerFlusher = /*#__PURE__*/ sync$2(Flusher, () => {
44137
44137
  * @category constructors
44138
44138
  * @since 4.0.0
44139
44139
  */
44140
- const make$24 = /*#__PURE__*/ fnUntraced(function* (options) {
44140
+ const make$25 = /*#__PURE__*/ fnUntraced(function* (options) {
44141
44141
  const services = yield* context();
44142
44142
  const clock = get$5(services, Clock);
44143
44143
  const scope = get$5(services, Scope);
@@ -44169,7 +44169,7 @@ const make$24 = /*#__PURE__*/ fnUntraced(function* (options) {
44169
44169
  package: "@effect/opentelemetry",
44170
44170
  module: options.label
44171
44171
  }));
44172
- const exportFibers = yield* make$65();
44172
+ const exportFibers = yield* make$66();
44173
44173
  const runExportFork = yield* runtime(exportFibers)();
44174
44174
  yield* (yield* Flusher).register(runExport);
44175
44175
  yield* addFinalizer$1(scope, suspend(() => {
@@ -44207,7 +44207,7 @@ const make$24 = /*#__PURE__*/ fnUntraced(function* (options) {
44207
44207
  * @category constructors
44208
44208
  * @since 4.0.0
44209
44209
  */
44210
- const make$23 = (options) => {
44210
+ const make$24 = (options) => {
44211
44211
  const resourceAttributes = options.attributes ? entriesToAttributes(Object.entries(options.attributes)) : [];
44212
44212
  resourceAttributes.push({
44213
44213
  key: "service.name",
@@ -44254,7 +44254,7 @@ const fromConfig = /*#__PURE__*/ fnUntraced(function* (options) {
44254
44254
  };
44255
44255
  delete attributes["service.name"];
44256
44256
  delete attributes["service.version"];
44257
- return make$23({
44257
+ return make$24({
44258
44258
  serviceName,
44259
44259
  serviceVersion,
44260
44260
  attributes
@@ -44373,7 +44373,7 @@ const layerJson$1 = /*#__PURE__*/ succeed$3(OtlpSerialization, {
44373
44373
  * @category constructors
44374
44374
  * @since 4.0.0
44375
44375
  */
44376
- const make$22 = /*#__PURE__*/ fnUntraced(function* (options) {
44376
+ const make$23 = /*#__PURE__*/ fnUntraced(function* (options) {
44377
44377
  const clock = yield* Clock;
44378
44378
  const serialization = yield* OtlpSerialization;
44379
44379
  const startTimeNanos = yield* clock.currentTimeNanos;
@@ -44654,7 +44654,7 @@ const make$22 = /*#__PURE__*/ fnUntraced(function* (options) {
44654
44654
  }]
44655
44655
  }] });
44656
44656
  };
44657
- yield* make$24({
44657
+ yield* make$25({
44658
44658
  label: "OtlpMetrics",
44659
44659
  url: options.url,
44660
44660
  headers: options.headers,
@@ -44670,7 +44670,7 @@ const make$22 = /*#__PURE__*/ fnUntraced(function* (options) {
44670
44670
  * @category layers
44671
44671
  * @since 4.0.0
44672
44672
  */
44673
- const layer$15 = (options) => effectDiscard(make$22(options)).pipe(provideMerge(layerFlusher));
44673
+ const layer$16 = (options) => effectDiscard(make$23(options)).pipe(provideMerge(layerFlusher));
44674
44674
  /** Creates a unique key for a metric including its attributes */
44675
44675
  const makeMetricKey = (id, attributes) => {
44676
44676
  if (attributes === void 0 || Object.keys(attributes).length === 0) return id;
@@ -44765,11 +44765,11 @@ const EAggregationTemporality = {
44765
44765
  * @category constructors
44766
44766
  * @since 4.0.0
44767
44767
  */
44768
- const make$21 = /*#__PURE__*/ fnUntraced(function* (options) {
44768
+ const make$22 = /*#__PURE__*/ fnUntraced(function* (options) {
44769
44769
  const otelResource = yield* fromConfig(options.resource);
44770
44770
  const serialization = yield* OtlpSerialization;
44771
44771
  const scope = { name: serviceNameUnsafe(otelResource) };
44772
- const exporter = yield* make$24({
44772
+ const exporter = yield* make$25({
44773
44773
  label: "OtlpTracer",
44774
44774
  url: options.url,
44775
44775
  headers: options.headers,
@@ -44791,7 +44791,7 @@ const make$21 = /*#__PURE__*/ fnUntraced(function* (options) {
44791
44791
  if (!span.sampled) return;
44792
44792
  exporter.push(makeOtlpSpan(span));
44793
44793
  }
44794
- return make$77({
44794
+ return make$78({
44795
44795
  span(options) {
44796
44796
  return makeSpan({
44797
44797
  ...options,
@@ -45309,8 +45309,8 @@ const makeLocalFileTracer = fn("makeLocalFileTracer")(function* (options) {
45309
45309
  batchWindowMs: options.batchWindowMs,
45310
45310
  ...options.onFlush ? { onFlush: options.onFlush } : {}
45311
45311
  }));
45312
- const delegate = options.delegate ?? make$77({ span: (spanOptions) => new NativeSpan(spanOptions) });
45313
- return make$77({
45312
+ const delegate = options.delegate ?? make$78({ span: (spanOptions) => new NativeSpan(spanOptions) });
45313
+ return make$78({
45314
45314
  span(spanOptions) {
45315
45315
  return new LocalFileSpan(spanOptions, delegate.span(spanOptions), sink.push);
45316
45316
  },
@@ -45476,7 +45476,7 @@ const logT3ProjectFileLoadError = (error) => logWarning$1(error).pipe(annotateLo
45476
45476
  filePath: error.filePath,
45477
45477
  errorTag: error._tag
45478
45478
  }));
45479
- const layer$14 = effect(T3ProjectFileLoader, gen(function* () {
45479
+ const layer$15 = effect(T3ProjectFileLoader, gen(function* () {
45480
45480
  const fileSystem = yield* FileSystem;
45481
45481
  const path = yield* Path;
45482
45482
  const load = fn("T3ProjectFileLoader.load")(function* (workspaceRoot) {
@@ -45567,7 +45567,7 @@ function extractIconHref(source) {
45567
45567
  return null;
45568
45568
  }
45569
45569
  const optionOnNotFound$1 = (effect) => effect.pipe(map$4(some), catchTags({ PlatformError: (error) => error.reason._tag === "NotFound" ? succeed$1(none()) : fail(error) }));
45570
- const layer$13 = effect(ProjectFaviconResolver, gen(function* () {
45570
+ const layer$14 = effect(ProjectFaviconResolver, gen(function* () {
45571
45571
  const fileSystem = yield* FileSystem;
45572
45572
  const path = yield* Path;
45573
45573
  const workspacePaths = yield* WorkspacePaths;
@@ -45909,10 +45909,10 @@ const resolveAsset = fn("AssetAccess.resolveAsset")(function* (token, relativePa
45909
45909
  //#endregion
45910
45910
  //#region src/observability/BrowserTraceCollector.ts
45911
45911
  var BrowserTraceCollector = class extends Service$2()("t3/observability/BrowserTraceCollector") {};
45912
- const make$18 = (sink) => BrowserTraceCollector.of({ record: (records) => sync(() => {
45912
+ const make$19 = (sink) => BrowserTraceCollector.of({ record: (records) => sync(() => {
45913
45913
  for (const record of records) sink.push(record);
45914
45914
  }) });
45915
- const layer$12 = (sink) => succeed$3(BrowserTraceCollector, make$18(sink));
45915
+ const layer$13 = (sink) => succeed$3(BrowserTraceCollector, make$19(sink));
45916
45916
  //#endregion
45917
45917
  //#region src/auth/http.ts
45918
45918
  const CREDENTIAL_RESPONSE_HEADERS = {
@@ -49462,7 +49462,7 @@ let clientIdCounter = 0;
49462
49462
  * @category constructors
49463
49463
  * @since 4.0.0
49464
49464
  */
49465
- const make$17 = /*#__PURE__*/ fnUntraced(function* (group, options) {
49465
+ const make$18 = /*#__PURE__*/ fnUntraced(function* (group, options) {
49466
49466
  const clientId = clientIdCounter++;
49467
49467
  const { run, send, supportsAck, supportsTransferables } = yield* Protocol$1;
49468
49468
  const entries = /* @__PURE__ */ new Map();
@@ -49634,7 +49634,7 @@ const makeNoSerialization = /*#__PURE__*/ fnUntraced(function* (group, options)
49634
49634
  const services = yield* context();
49635
49635
  const scope = get$5(services, Scope);
49636
49636
  const trackFiber = runIn(forkUnsafe(scope, "parallel"));
49637
- const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$75(concurrency);
49637
+ const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$76(concurrency);
49638
49638
  const clients = /* @__PURE__ */ new Map();
49639
49639
  let isShutdown = false;
49640
49640
  const shutdownLatch = makeUnsafe$7(false);
@@ -49870,10 +49870,10 @@ const applyMiddleware = (context, handler, options) => {
49870
49870
  * @category running
49871
49871
  * @since 4.0.0
49872
49872
  */
49873
- const make$16 = /*#__PURE__*/ fnUntraced(function* (group, options) {
49873
+ const make$17 = /*#__PURE__*/ fnUntraced(function* (group, options) {
49874
49874
  const { disconnects, end, run, send, supportsAck, supportsSpanPropagation, supportsTransferables } = yield* Protocol;
49875
49875
  const services = yield* context();
49876
- const scope = yield* make$76();
49876
+ const scope = yield* make$77();
49877
49877
  const server = yield* makeNoSerialization(group, {
49878
49878
  ...options,
49879
49879
  disableClientAcks: !supportsAck,
@@ -50061,12 +50061,12 @@ const makeProtocolWithHttpEffectWebsocket = /*#__PURE__*/ gen(function* () {
50061
50061
  */
50062
50062
  const toHttpEffectWebsocket = /*#__PURE__*/ fnUntraced(function* (group, options) {
50063
50063
  const { httpEffect, protocol } = yield* makeProtocolWithHttpEffectWebsocket;
50064
- yield* make$16(group, options).pipe(provideService(Protocol, protocol), forkScoped);
50064
+ yield* make$17(group, options).pipe(provideService(Protocol, protocol), forkScoped);
50065
50065
  return httpEffect;
50066
50066
  });
50067
50067
  const makeSocketProtocol = /*#__PURE__*/ gen(function* () {
50068
50068
  const serialization = yield* RpcSerialization;
50069
- const disconnects = yield* make$78();
50069
+ const disconnects = yield* make$79();
50070
50070
  let clientId = 0;
50071
50071
  const clients = /* @__PURE__ */ new Map();
50072
50072
  const clientIds = /* @__PURE__ */ new Set();
@@ -50141,8 +50141,8 @@ var ProviderRegistry = class extends Service$2()("t3/provider/Services/ProviderR
50141
50141
  //#endregion
50142
50142
  //#region src/provider/providerMaintenanceCommandCoordinator.ts
50143
50143
  const makeProviderMaintenanceCommandCoordinator = fn("makeProviderMaintenanceCommandCoordinator")(function* (input) {
50144
- const runningTargetsRef = yield* make$63(/* @__PURE__ */ new Set());
50145
- const locksRef = yield* make$63(/* @__PURE__ */ new Map());
50144
+ const runningTargetsRef = yield* make$64(/* @__PURE__ */ new Set());
50145
+ const locksRef = yield* make$64(/* @__PURE__ */ new Map());
50146
50146
  const acquireTarget = fn("acquireTarget")(function* (targetKey) {
50147
50147
  return yield* modify$2(runningTargetsRef, (runningTargets) => {
50148
50148
  if (runningTargets.has(targetKey)) return [false, runningTargets];
@@ -50159,7 +50159,7 @@ const makeProviderMaintenanceCommandCoordinator = fn("makeProviderMaintenanceCom
50159
50159
  const getLock = fn("getProviderMaintenanceCommandLock")(function* (lockKey) {
50160
50160
  const existing = (yield* get$3(locksRef)).get(lockKey);
50161
50161
  if (existing) return existing;
50162
- const lock = yield* make$75(1);
50162
+ const lock = yield* make$76(1);
50163
50163
  return yield* modify$2(locksRef, (locks) => {
50164
50164
  const current = locks.get(lockKey);
50165
50165
  if (current) return [current, locks];
@@ -50528,7 +50528,7 @@ const nowIso$3 = map$4(now$1, formatIso);
50528
50528
  const runProviderMaintenanceCommandWithSpawner = fn("ProviderMaintenanceRunner.runCommand")(function* (input) {
50529
50529
  return yield* fn("ProviderMaintenanceRunner.collectCommandResult")(function* () {
50530
50530
  const resolved = yield* resolveSpawnCommand(input.command, input.args);
50531
- const child = yield* input.spawner.spawn(make$79(resolved.command, resolved.args, { shell: resolved.shell })).pipe(mapError((cause) => new ProviderMaintenanceCommandError({
50531
+ const child = yield* input.spawner.spawn(make$80(resolved.command, resolved.args, { shell: resolved.shell })).pipe(mapError((cause) => new ProviderMaintenanceCommandError({
50532
50532
  message: `Failed to run update command ${input.command}: ${cause.message}`,
50533
50533
  cause
50534
50534
  })));
@@ -50596,7 +50596,7 @@ function makeUpdateState(input) {
50596
50596
  output: input.output ?? null
50597
50597
  };
50598
50598
  }
50599
- const layer$11 = effect(ProviderMaintenanceRunner, fn("ProviderMaintenanceRunner.make")(function* () {
50599
+ const layer$12 = effect(ProviderMaintenanceRunner, fn("ProviderMaintenanceRunner.make")(function* () {
50600
50600
  const providerRegistry = yield* ProviderRegistry;
50601
50601
  const spawner = yield* ChildProcessSpawner;
50602
50602
  const httpClient = yield* HttpClient;
@@ -50656,7 +50656,7 @@ const layer$11 = effect(ProviderMaintenanceRunner, fn("ProviderMaintenanceRunner
50656
50656
  })).pipe(asVoid);
50657
50657
  const runProviderUpdate = fn("ProviderMaintenanceRunner.runProviderUpdate")(function* () {
50658
50658
  const finish = (state) => setUpdateState(state).pipe(map$4((providers) => ({ providers })));
50659
- const startedAtRef = yield* make$63(null);
50659
+ const startedAtRef = yield* make$64(null);
50660
50660
  const runCommandAndVerify = fn("ProviderMaintenanceRunner.runCommandAndVerify")(function* () {
50661
50661
  const startedAt = yield* nowIso$3;
50662
50662
  yield* set$2(startedAtRef, startedAt);
@@ -51251,7 +51251,7 @@ const waitForIndexReady = fn("WorkspaceSearchIndex.waitForIndexReady")(function*
51251
51251
  timeout: WORKSPACE_INDEX_SCAN_TIMEOUT
51252
51252
  });
51253
51253
  });
51254
- const make$14 = fn("WorkspaceSearchIndex.make")(function* (cwd, variant = "paths") {
51254
+ const make$15 = fn("WorkspaceSearchIndex.make")(function* (cwd, variant = "paths") {
51255
51255
  const finder = yield* acquireRelease(createFinder(cwd, variant), (finder) => try_({
51256
51256
  try: () => finder.destroy(),
51257
51257
  catch: (cause) => new WorkspaceSearchIndexDestroyFailed({
@@ -51380,12 +51380,12 @@ function parseWorkspaceSearchIndexKey(key) {
51380
51380
  * idle cleanup; using a default cwd here would mix resources from different
51381
51381
  * workspaces.
51382
51382
  */
51383
- const layer$10 = (key) => {
51383
+ const layer$11 = (key) => {
51384
51384
  const { cwd, variant } = parseWorkspaceSearchIndexKey(key);
51385
- return effect(WorkspaceSearchIndex, make$14(cwd, variant));
51385
+ return effect(WorkspaceSearchIndex, make$15(cwd, variant));
51386
51386
  };
51387
51387
  var WorkspaceSearchIndexMap = class extends Service()("t3/workspace/WorkspaceSearchIndexMap", {
51388
- lookup: layer$10,
51388
+ lookup: layer$11,
51389
51389
  idleTimeToLive: WORKSPACE_INDEX_IDLE_TTL
51390
51390
  }) {};
51391
51391
  //#endregion
@@ -51447,7 +51447,7 @@ const resolveBrowseTarget = fn("WorkspaceEntries.resolveBrowseTarget")(function*
51447
51447
  if (!input.cwd) return yield* new WorkspaceEntriesCurrentProjectRequiredError({ partialPath: input.partialPath });
51448
51448
  return path.resolve(expandHomePath$1(input.cwd, path), input.partialPath);
51449
51449
  });
51450
- const layer$9 = effect(WorkspaceEntries, gen(function* () {
51450
+ const layer$10 = effect(WorkspaceEntries, gen(function* () {
51451
51451
  const path = yield* Path;
51452
51452
  const workspacePaths = yield* WorkspacePaths;
51453
51453
  const workspaceSearchIndexes = yield* WorkspaceSearchIndexMap;
@@ -51600,7 +51600,7 @@ Union([
51600
51600
  ]);
51601
51601
  /** Service tag for workspace file operations. */
51602
51602
  var WorkspaceFileSystem = class extends Service$2()("t3/workspace/WorkspaceFileSystem") {};
51603
- const layer$8 = effect(WorkspaceFileSystem, gen(function* () {
51603
+ const layer$9 = effect(WorkspaceFileSystem, gen(function* () {
51604
51604
  const fileSystem = yield* FileSystem;
51605
51605
  const path = yield* Path;
51606
51606
  const workspacePaths = yield* WorkspacePaths;
@@ -51784,7 +51784,7 @@ function parseGitRefs(output, refKind, query = "", currentRef = null) {
51784
51784
  });
51785
51785
  }
51786
51786
  var GitWorkspace = class extends Service$2()("agentlink/workspace/GitWorkspace") {};
51787
- const layer$7 = effect(GitWorkspace, gen(function* () {
51787
+ const layer$8 = effect(GitWorkspace, gen(function* () {
51788
51788
  const runner = yield* ProcessRunner;
51789
51789
  const run = fn("GitWorkspace.run")(function* (cwd, operation, args, allowFailure = false) {
51790
51790
  const result = yield* runner.run({
@@ -51921,7 +51921,7 @@ const layer$7 = effect(GitWorkspace, gen(function* () {
51921
51921
  listRefs,
51922
51922
  switchRef
51923
51923
  });
51924
- })).pipe(provide(layer$30));
51924
+ })).pipe(provide(layer$31));
51925
51925
  //#endregion
51926
51926
  //#region src/terminal/PtyAdapter.ts
51927
51927
  /**
@@ -52007,7 +52007,7 @@ function validateCwd(cwd) {
52007
52007
  }
52008
52008
  }).pipe(flatMap$1((stat) => stat.isDirectory() ? void_$1 : new TerminalCwdNotDirectoryError({ cwd })));
52009
52009
  }
52010
- const layer$6 = effect(TerminalManager, gen(function* () {
52010
+ const layer$7 = effect(TerminalManager, gen(function* () {
52011
52011
  const pty = yield* PtyAdapter;
52012
52012
  const runFork = runForkWith(yield* context());
52013
52013
  const sessions = /* @__PURE__ */ new Map();
@@ -52599,7 +52599,7 @@ const makeWsRpcLayer = (currentSession) => WsRpcGroup.toLayer(gen(function* () {
52599
52599
  const currentSessionId = currentSession.sessionId;
52600
52600
  const { crypto, projectionSnapshotQuery, orchestrationEngine, providerRuntimeIngestion, keybindings, externalLauncher, providerRegistry, config, lifecycleEvents, serverSettings, startup, workspaceEntries, workspaceFileSystem, gitWorkspace, terminalManager, serverEnvironment, backgroundPolicy, serverAuth, bootstrapCredentials, sessions } = yield* wsRpcServices;
52601
52601
  const providerMaintenanceRunner = yield* ProviderMaintenanceRunner;
52602
- const rpcClientIds = yield* make$63(/* @__PURE__ */ new Set());
52602
+ const rpcClientIds = yield* make$64(/* @__PURE__ */ new Set());
52603
52603
  yield* addFinalizer(() => get$3(rpcClientIds).pipe(flatMap$1((clientIds) => forEach(clientIds, (clientId) => backgroundPolicy.removeRpcClient(currentSessionId, clientId), { discard: true })), ignore$1));
52604
52604
  const authorizationError = (requiredScope) => new EnvironmentAuthorizationError({
52605
52605
  message: `The authenticated token is missing required scope: ${requiredScope}.`,
@@ -52815,7 +52815,7 @@ const makeWsRpcLayer = (currentSession) => WsRpcGroup.toLayer(gen(function* () {
52815
52815
  if (input.afterSequence !== void 0) {
52816
52816
  const afterSequence = input.afterSequence;
52817
52817
  const replayGap = (yield* orchestrationEngine.latestSequence) - afterSequence;
52818
- if (replayGap < 0 || replayGap > SHELL_RESUME_MAX_GAP) return concat(make$74({
52818
+ if (replayGap < 0 || replayGap > SHELL_RESUME_MAX_GAP) return concat(make$75({
52819
52819
  kind: "snapshot",
52820
52820
  snapshot: yield* loadSnapshot
52821
52821
  }), synchronizedThenLive);
@@ -52824,7 +52824,7 @@ const makeWsRpcLayer = (currentSession) => WsRpcGroup.toLayer(gen(function* () {
52824
52824
  cause
52825
52825
  }))), synchronizedThenLive);
52826
52826
  }
52827
- return concat(make$74({
52827
+ return concat(make$75({
52828
52828
  kind: "snapshot",
52829
52829
  snapshot: yield* loadSnapshot
52830
52830
  }), synchronizedThenLive);
@@ -52866,7 +52866,7 @@ const makeWsRpcLayer = (currentSession) => WsRpcGroup.toLayer(gen(function* () {
52866
52866
  cause: input.threadId
52867
52867
  });
52868
52868
  const afterSnapshot = input.requestCompletionMarker === true ? concat(fromEffect(offer$1(liveBuffer, { kind: "synchronized" })).pipe(drain), bufferedLiveStream) : bufferedLiveStream;
52869
- return concat(make$74({
52869
+ return concat(make$75({
52870
52870
  kind: "snapshot",
52871
52871
  snapshot: projectThreadDetailSnapshot(snapshot.value)
52872
52872
  }), afterSnapshot);
@@ -52970,7 +52970,7 @@ const makeWsRpcLayer = (currentSession) => WsRpcGroup.toLayer(gen(function* () {
52970
52970
  })));
52971
52971
  yield* providerRegistry.refresh().pipe(ignoreCause({ log: true }), forkScoped);
52972
52972
  const liveUpdates = merge$2(keybindingsUpdates, merge$2(providerStatuses, settingsUpdates));
52973
- return concat(make$74({
52973
+ return concat(make$75({
52974
52974
  version: 1,
52975
52975
  type: "snapshot",
52976
52976
  config: yield* loadServerConfig
@@ -52984,9 +52984,9 @@ const makeWsRpcLayer = (currentSession) => WsRpcGroup.toLayer(gen(function* () {
52984
52984
  }), { "rpc.aggregate": "server" }),
52985
52985
  [WS_METHODS.subscribeAuthAccess]: (_input) => observeRpcStreamEffect$1(WS_METHODS.subscribeAuthAccess, gen(function* () {
52986
52986
  const initialSnapshot = yield* loadAuthAccessSnapshot();
52987
- const revisionRef = yield* make$63(1);
52987
+ const revisionRef = yield* make$64(1);
52988
52988
  const liveEvents = merge$2(bootstrapCredentials.streamChanges, sessions.streamChanges).pipe(mapEffect$1((change) => updateAndGet(revisionRef, (revision) => revision + 1).pipe(map$4((revision) => toAuthAccessStreamEvent(change, revision, currentSessionId)))));
52989
- return concat(make$74({
52989
+ return concat(make$75({
52990
52990
  version: 1,
52991
52991
  revision: 1,
52992
52992
  type: "snapshot",
@@ -53046,7 +53046,7 @@ const makeWsRpcLayer = (currentSession) => WsRpcGroup.toLayer(gen(function* () {
53046
53046
  [ORCHESTRATION_WS_METHODS.getFullThreadDiff]: unsupportedRpc,
53047
53047
  [ORCHESTRATION_WS_METHODS.getTurnDiff]: unsupportedRpc,
53048
53048
  [ORCHESTRATION_WS_METHODS.getWorkflowScript]: unsupportedRpc,
53049
- [WS_METHODS.subscribeBackgroundPolicy]: (_input) => observeRpcStream$1(WS_METHODS.subscribeBackgroundPolicy, unwrap$1(map$4(backgroundPolicy.subscribe, ({ latest, changes }) => concat(make$74(latest), changes))), { "rpc.aggregate": "server" })
53049
+ [WS_METHODS.subscribeBackgroundPolicy]: (_input) => observeRpcStream$1(WS_METHODS.subscribeBackgroundPolicy, unwrap$1(map$4(backgroundPolicy.subscribe, ({ latest, changes }) => concat(make$75(latest), changes))), { "rpc.aggregate": "server" })
53050
53050
  });
53051
53051
  }));
53052
53052
  const websocketRpcRouteLayer = unwrap(gen(function* () {
@@ -53055,7 +53055,7 @@ const websocketRpcRouteLayer = unwrap(gen(function* () {
53055
53055
  const serverAuth = yield* EnvironmentAuth;
53056
53056
  const sessions = yield* SessionStore;
53057
53057
  const session = yield* serverAuth.authenticateWebSocketUpgrade(request).pipe(catchIf(isServerAuthCredentialError, (error) => failEnvironmentAuthInvalid(serverAuthCredentialReason(error))), catchIf(isServerAuthInternalError, (error) => failEnvironmentInternal("internal_error", error)));
53058
- const rpcWebSocketHttpEffect = yield* toHttpEffectWebsocket(WsRpcGroup, { disableTracing: true }).pipe(provide$1(makeWsRpcLayer(session).pipe(provideMerge(layerJson), provide(layer$11))));
53058
+ const rpcWebSocketHttpEffect = yield* toHttpEffectWebsocket(WsRpcGroup, { disableTracing: true }).pipe(provide$1(makeWsRpcLayer(session).pipe(provideMerge(layerJson), provide(layer$12))));
53059
53059
  return yield* acquireUseRelease(sessions.markConnected(session.sessionId), () => rpcWebSocketHttpEffect, () => sessions.markDisconnected(session.sessionId));
53060
53060
  }).pipe(catchTags({
53061
53061
  EnvironmentAuthInvalidError: toResponse,
@@ -53215,7 +53215,7 @@ const ResponseDefectEncoded = (cause) => ({
53215
53215
  });
53216
53216
  const makeTunnelSocketProtocol = gen(function* () {
53217
53217
  const serialization = yield* RpcSerialization;
53218
- const disconnects = yield* make$78();
53218
+ const disconnects = yield* make$79();
53219
53219
  let clientId = 0;
53220
53220
  const clients = /* @__PURE__ */ new Map();
53221
53221
  const clientIds = /* @__PURE__ */ new Set();
@@ -53297,7 +53297,7 @@ function encodeHttpTunnelResponseFrame(frame) {
53297
53297
  }
53298
53298
  const makeTunnelSocket = (input) => {
53299
53299
  const runRaw = (handler, options) => scopedWith((scope) => gen(function* () {
53300
- const fiberSet = yield* make$65().pipe(provide$2(scope));
53300
+ const fiberSet = yield* make$66().pipe(provide$2(scope));
53301
53301
  const runFork = yield* runtime(fiberSet)();
53302
53302
  const deliver = (frame) => {
53303
53303
  const handled = handler(frame);
@@ -53308,7 +53308,7 @@ const makeTunnelSocket = (input) => {
53308
53308
  if (options?.onOpen) yield* options.onOpen;
53309
53309
  yield* _await(input.tunnel.closed).pipe(raceFirst(join$1(fiberSet)));
53310
53310
  }));
53311
- return make$66({
53311
+ return make$67({
53312
53312
  runRaw,
53313
53313
  writer: sync(() => (chunk) => sync(() => {
53314
53314
  if (typeof chunk === "string") for (const part of chunkAgentLinkFrame(chunk)) input.sendEncrypted(JSON.stringify(utf8ToEnvelope(input.enckey, part)));
@@ -53387,8 +53387,8 @@ const runHubTunnel = (config) => gen(function* () {
53387
53387
  subject: "hub-tunnel",
53388
53388
  method: "bearer-access-token",
53389
53389
  scopes: [...TUNNEL_SCOPES]
53390
- }).pipe(provideMerge(layerJson), provide(layer$11))).pipe(provideContext(currentContext));
53391
- yield* make$16(WsRpcGroup, { disableTracing: true }).pipe(provideService(Protocol, protocol), provideContext(rpcContext));
53390
+ }).pipe(provideMerge(layerJson), provide(layer$12))).pipe(provideContext(currentContext));
53391
+ yield* make$17(WsRpcGroup, { disableTracing: true }).pipe(provideService(Protocol, protocol), provideContext(rpcContext));
53392
53392
  }).pipe(tapCause((cause) => logError("hub tunnel: RPC server failed", { cause: String(cause) }))));
53393
53393
  yield* forkScoped(onSocket(socketAdapter));
53394
53394
  if (!writeHub(JSON.stringify({
@@ -53471,7 +53471,7 @@ const runHubTunnel = (config) => gen(function* () {
53471
53471
  if (lower === "authorization" || lower === "cookie") continue;
53472
53472
  headers[lower] = value;
53473
53473
  }
53474
- let request = make$64(requestFrame.method)(targetUrl).pipe(setHeaders(headers));
53474
+ let request = make$65(requestFrame.method)(targetUrl).pipe(setHeaders(headers));
53475
53475
  if (requestFrame.body !== null) request = setBody(uint8Array(Buffer.from(requestFrame.body, "base64")))(request);
53476
53476
  const response = yield* httpClient.execute(request);
53477
53477
  const responseBody = yield* response.arrayBuffer;
@@ -53524,7 +53524,7 @@ const runHubTunnel = (config) => gen(function* () {
53524
53524
  const tunnelId = control.tunnelId;
53525
53525
  if (tunnels.has(tunnelId)) return;
53526
53526
  return gen(function* () {
53527
- const closed = yield* make$73();
53527
+ const closed = yield* make$74();
53528
53528
  const purpose = control.purpose === "http" ? "http" : "rpc";
53529
53529
  const live = {
53530
53530
  closed,
@@ -53578,7 +53578,159 @@ const runHubTunnel = (config) => gen(function* () {
53578
53578
  while: (error) => !(SocketError.is(error) && error.reason._tag === "SocketCloseError" && (error.reason.code === 4401 || error.reason.code === 4403))
53579
53579
  });
53580
53580
  }).pipe(tapDefect((cause) => logError("hub tunnel: worker defect", { cause: String(cause) })), catchCause((cause) => logError("hub tunnel: worker failed", { cause: String(cause) })));
53581
- const layer$5 = (config) => effectDiscard(forkScoped(runHubTunnel(config)));
53581
+ const layer$6 = (config) => effectDiscard(forkScoped(runHubTunnel(config)));
53582
+ //#endregion
53583
+ //#region ../t3-shared/src/agentAwareness.ts
53584
+ function buildAgentAwarenessDeepLink(input) {
53585
+ return `/threads/${encodeURIComponent(input.environmentId)}/${encodeURIComponent(input.threadId)}`;
53586
+ }
53587
+ function projectThreadAwareness(input) {
53588
+ const { environmentId, project, thread } = input;
53589
+ const phase = resolveThreadAwarenessPhase(thread);
53590
+ if (!phase) return null;
53591
+ const detail = detailForPhase(phase, thread);
53592
+ return {
53593
+ environmentId,
53594
+ threadId: thread.id,
53595
+ projectTitle: project.title,
53596
+ threadTitle: thread.title,
53597
+ phase,
53598
+ headline: headlineForPhase(phase),
53599
+ ...detail === void 0 ? {} : { detail },
53600
+ modelTitle: thread.modelSelection.model,
53601
+ updatedAt: thread.updatedAt,
53602
+ deepLink: buildAgentAwarenessDeepLink({
53603
+ environmentId,
53604
+ threadId: thread.id
53605
+ })
53606
+ };
53607
+ }
53608
+ function resolveThreadAwarenessPhase(thread) {
53609
+ if (thread.hasPendingApprovals) return "waiting_for_approval";
53610
+ if (thread.hasPendingUserInput) return "waiting_for_input";
53611
+ if (thread.session?.status === "error" || thread.latestTurn?.state === "error") return "failed";
53612
+ if (thread.session?.status === "starting") return "starting";
53613
+ if (thread.session?.status === "running" || thread.latestTurn?.state === "running") return "running";
53614
+ if (thread.latestTurn?.state === "completed") return "completed";
53615
+ if (thread.latestTurn?.state === "interrupted" && thread.latestTurn.completedAt !== null) return "completed";
53616
+ if (thread.session?.status === "ready" || thread.session?.status === "idle") return "completed";
53617
+ return null;
53618
+ }
53619
+ function headlineForPhase(phase) {
53620
+ switch (phase) {
53621
+ case "starting": return "Starting agent";
53622
+ case "running": return "Agent is working";
53623
+ case "waiting_for_approval": return "Approval needed";
53624
+ case "waiting_for_input": return "Waiting for input";
53625
+ case "completed": return "Agent finished";
53626
+ case "failed": return "Agent failed";
53627
+ case "stale": return "Update delayed";
53628
+ }
53629
+ }
53630
+ function detailForPhase(phase, thread) {
53631
+ if (phase === "failed") return thread.session?.lastError ?? void 0;
53632
+ if (phase === "completed") return "Review the completed task.";
53633
+ if (phase === "running" && thread.session?.providerName) return `${thread.session.providerName} is active.`;
53634
+ }
53635
+ //#endregion
53636
+ //#region ../t3-shared/src/DrainableWorker.ts
53637
+ /**
53638
+ * Create a drainable worker that processes items from an unbounded queue.
53639
+ *
53640
+ * The worker is forked into the current scope and will be interrupted when
53641
+ * the scope closes. A finalizer shuts down the queue.
53642
+ *
53643
+ * @param process - The effect to run for each queued item.
53644
+ * @returns A `DrainableWorker` with `queue` and `drain`.
53645
+ */
53646
+ const makeDrainableWorker = (process) => gen(function* () {
53647
+ const queue = yield* acquireRelease(unbounded(), shutdown);
53648
+ const outstanding = yield* make$53(0);
53649
+ yield* take(queue).pipe(tap((a) => ensuring(process(a), update$1(outstanding, (n) => n - 1))), forever, forkScoped);
53650
+ const drain = get$1(outstanding).pipe(tap((n) => n > 0 ? txRetry : void_$1), tx);
53651
+ const enqueue = (element) => offer(queue, element).pipe(tap(() => update$1(outstanding, (n) => n + 1)), tx);
53652
+ return {
53653
+ enqueue,
53654
+ drain
53655
+ };
53656
+ });
53657
+ //#endregion
53658
+ //#region src/tunnel/AgentAwarenessHub.ts
53659
+ var AgentAwarenessHub = class extends Service$2()("agentlink/AgentAwarenessHub") {};
53660
+ function eventThreadId(event) {
53661
+ const payload = event.payload;
53662
+ if (typeof payload.threadId === "string") return payload.threadId;
53663
+ return event.aggregateKind === "thread" && typeof event.aggregateId === "string" ? event.aggregateId : null;
53664
+ }
53665
+ function shouldPublishAgentAwarenessEvent(event) {
53666
+ if (event.type === "thread.message-sent" || event.type === "thread.turn-start-requested") return false;
53667
+ if (event.type !== "thread.activity-appended") return true;
53668
+ return [
53669
+ "approval.requested",
53670
+ "approval.resolved",
53671
+ "user-input.requested",
53672
+ "user-input.resolved",
53673
+ "runtime.error"
53674
+ ].includes(event.payload.activity.kind);
53675
+ }
53676
+ const make$10 = (config) => gen(function* () {
53677
+ const environment = yield* ServerEnvironment;
53678
+ const snapshots = yield* ProjectionSnapshotQuery;
53679
+ const engine = yield* OrchestrationEngineService;
53680
+ const published = yield* make$64(/* @__PURE__ */ new Map());
53681
+ const publishThread = fn("AgentAwarenessHub.publishThread")(function* (threadId) {
53682
+ const thread = yield* snapshots.getThreadShellById(threadId);
53683
+ if (isNone(thread)) return;
53684
+ const project = yield* snapshots.getProjectShellById(thread.value.projectId);
53685
+ if (isNone(project)) return;
53686
+ const state = projectThreadAwareness({
53687
+ environmentId: yield* environment.getEnvironmentId,
53688
+ project: project.value,
53689
+ thread: thread.value
53690
+ });
53691
+ if (!state || ![
53692
+ "waiting_for_approval",
53693
+ "waiting_for_input",
53694
+ "completed",
53695
+ "failed"
53696
+ ].includes(state.phase)) {
53697
+ yield* update$2(published, (current) => {
53698
+ const next = new Map(current);
53699
+ next.delete(threadId);
53700
+ return next;
53701
+ });
53702
+ return;
53703
+ }
53704
+ const { updatedAt: _updatedAt, detail: _detail, ...safeState } = state;
53705
+ const identity = JSON.stringify(safeState);
53706
+ if ((yield* get$3(published)).get(threadId) === identity) return;
53707
+ const response = yield* tryPromise({
53708
+ try: () => fetch(`${hubHttpUrl(config.hubUrl)}/api/push/activity`, {
53709
+ method: "POST",
53710
+ headers: {
53711
+ authorization: `Bearer ${config.machineToken}`,
53712
+ "content-type": "application/json",
53713
+ "x-requested-with": "agentlink"
53714
+ },
53715
+ body: JSON.stringify({ state: safeState })
53716
+ }),
53717
+ catch: (cause) => cause
53718
+ });
53719
+ if (!response.ok) return yield* fail(/* @__PURE__ */ new Error(`Hub push publish failed: ${response.status}`));
53720
+ yield* update$2(published, (current) => new Map(current).set(threadId, identity));
53721
+ });
53722
+ const worker = yield* makeDrainableWorker((threadId) => publishThread(threadId).pipe(catchCause((cause) => logWarning$1("Agent awareness Hub publish failed", {
53723
+ threadId,
53724
+ cause
53725
+ }))));
53726
+ return AgentAwarenessHub.of({ start: () => runForEach(engine.streamDomainEvents, (event) => {
53727
+ const threadId = eventThreadId(event);
53728
+ return threadId && shouldPublishAgentAwarenessEvent(event) ? worker.enqueue(threadId) : void_$1;
53729
+ }).pipe(catchCause(() => void_$1)) });
53730
+ });
53731
+ const layer$5 = (config) => effectDiscard(gen(function* () {
53732
+ yield* forkScoped((yield* make$10(config)).start());
53733
+ }));
53582
53734
  //#endregion
53583
53735
  //#region src/persistence/ProviderSessionRuntime.ts
53584
53736
  /**
@@ -54327,7 +54479,7 @@ const makeEventNdjsonLogStore = fnUntraced(function* (filePath, options = {}) {
54327
54479
  filePath: failure.filePath,
54328
54480
  errorTag: errorTag(failure.cause)
54329
54481
  });
54330
- const stateRef = yield* make$53({
54482
+ const stateRef = yield* make$54({
54331
54483
  pending: [],
54332
54484
  pendingBytes: 0,
54333
54485
  sinks: /* @__PURE__ */ new Map(),
@@ -54335,7 +54487,7 @@ const makeEventNdjsonLogStore = fnUntraced(function* (filePath, options = {}) {
54335
54487
  closed: false,
54336
54488
  lastRetentionAt: initializedAt
54337
54489
  });
54338
- const timerScope = yield* make$76();
54490
+ const timerScope = yield* make$77();
54339
54491
  const flush = fnUntraced(function* (timerFired, close) {
54340
54492
  const startedAt = yield* currentTimeMillis;
54341
54493
  const result = yield* modifyEffect(stateRef, (state) => sync(() => drainPending({
@@ -54586,7 +54738,7 @@ const ProviderServiceLive = effect(ProviderService, fn("makeProviderService")(fu
54586
54738
  provider: canonicalEvent.provider,
54587
54739
  eventType: canonicalEvent.type
54588
54740
  }).pipe(andThen(publishRuntimeEvent(canonicalEvent)))));
54589
- const subscribedAdapters = yield* make$63(/* @__PURE__ */ new Map());
54741
+ const subscribedAdapters = yield* make$64(/* @__PURE__ */ new Map());
54590
54742
  const getAdapterEntries = get$3(subscribedAdapters).pipe(map$4((map) => Array.from(map.entries())));
54591
54743
  const reconcileInstanceSubscriptions = gen(function* () {
54592
54744
  const previous = yield* get$3(subscribedAdapters);
@@ -56428,7 +56580,7 @@ const probeClaudeCapabilities = (claudeSettings, environment, cwd) => {
56428
56580
  const runClaudeCommand = fn("runClaudeCommand")(function* (claudeSettings, args, environment) {
56429
56581
  const claudeEnvironment = yield* makeClaudeEnvironment(claudeSettings, environment);
56430
56582
  const spawnCommand = yield* resolveSpawnCommand(claudeSettings.binaryPath, args, { env: claudeEnvironment });
56431
- const command = make$79(spawnCommand.command, spawnCommand.args, {
56583
+ const command = make$80(spawnCommand.command, spawnCommand.args, {
56432
56584
  env: claudeEnvironment,
56433
56585
  shell: spawnCommand.shell
56434
56586
  });
@@ -56645,11 +56797,11 @@ const makeClaudeTextGeneration = fn("makeClaudeTextGeneration")(function* (claud
56645
56797
  ...settingsJson ? ["--settings", settingsJson] : [],
56646
56798
  "--dangerously-skip-permissions"
56647
56799
  ], { env: claudeEnvironment });
56648
- const command = make$79(spawnCommand.command, spawnCommand.args, {
56800
+ const command = make$80(spawnCommand.command, spawnCommand.args, {
56649
56801
  env: claudeEnvironment,
56650
56802
  cwd,
56651
56803
  shell: spawnCommand.shell,
56652
- stdin: { stream: encodeText(make$74(prompt)) }
56804
+ stdin: { stream: encodeText(make$75(prompt)) }
56653
56805
  });
56654
56806
  const child = yield* commandSpawner.spawn(command).pipe(mapError((cause) => normalizeCliError("claude", operation, cause, "Failed to spawn Claude CLI process")));
56655
56807
  const [stdout, stderr, exitCode] = yield* all([
@@ -58991,7 +59143,7 @@ const makeClaudeAdapter = fn("makeClaudeAdapter")(function* (claudeSettings, opt
58991
59143
  const taskAgents = /* @__PURE__ */ new Map();
58992
59144
  const workflowMemberFingerprints = /* @__PURE__ */ new Map();
58993
59145
  const liveTaskIds = /* @__PURE__ */ new Set();
58994
- const contextRef = yield* make$63(void 0);
59146
+ const contextRef = yield* make$64(void 0);
58995
59147
  /**
58996
59148
  * Handle AskUserQuestion tool calls by emitting a `user-input.requested`
58997
59149
  * runtime event and waiting for the user to respond via `respondToUserInput`.
@@ -59008,7 +59160,7 @@ const makeClaudeAdapter = fn("makeClaudeAdapter")(function* (claudeSettings, opt
59008
59160
  })) : [],
59009
59161
  multiSelect: typeof q.multiSelect === "boolean" ? q.multiSelect : false
59010
59162
  }));
59011
- const answersDeferred = yield* make$73();
59163
+ const answersDeferred = yield* make$74();
59012
59164
  let aborted = false;
59013
59165
  const pendingInput = {
59014
59166
  questions,
@@ -59104,7 +59256,7 @@ const makeClaudeAdapter = fn("makeClaudeAdapter")(function* (claudeSettings, opt
59104
59256
  const requestId = ApprovalRequestId.make(yield* randomUUIDv4);
59105
59257
  const requestType = classifyRequestType(toolName);
59106
59258
  const detail = summarizeToolRequest(toolName, toolInput);
59107
- const decisionDeferred = yield* make$73();
59259
+ const decisionDeferred = yield* make$74();
59108
59260
  const pendingApproval = {
59109
59261
  requestType,
59110
59262
  detail,
@@ -59509,15 +59661,15 @@ const makeClaudeAdapter = fn("makeClaudeAdapter")(function* (claudeSettings, opt
59509
59661
  const makeManagedServerProvider = fn("makeManagedServerProvider")(function* (input) {
59510
59662
  const backgroundPolicy = yield* BackgroundPolicy;
59511
59663
  const serverSettings = yield* ServerSettingsService;
59512
- const refreshSemaphore = yield* make$75(1);
59664
+ const refreshSemaphore = yield* make$76(1);
59513
59665
  const changesPubSub = yield* acquireRelease(unbounded$1(), shutdown$2);
59514
59666
  const initialSettings = yield* input.getSettings;
59515
- const snapshotStateRef = yield* make$63({
59667
+ const snapshotStateRef = yield* make$64({
59516
59668
  snapshot: yield* input.initialSnapshot(initialSettings),
59517
59669
  enrichmentGeneration: 0
59518
59670
  });
59519
- const settingsRef = yield* make$63(initialSettings);
59520
- const enrichmentFiberRef = yield* make$63(null);
59671
+ const settingsRef = yield* make$64(initialSettings);
59672
+ const enrichmentFiberRef = yield* make$64(null);
59521
59673
  const scope$1 = yield* scope;
59522
59674
  const publishEnrichedSnapshot = fn("publishEnrichedSnapshot")(function* (generation, nextSnapshot) {
59523
59675
  const snapshotToPublish = yield* modify$2(snapshotStateRef, (state) => {
@@ -59708,7 +59860,7 @@ const ClaudeDriver = {
59708
59860
  ...eventLoggers.native ? { nativeEventLogger: eventLoggers.native } : {}
59709
59861
  });
59710
59862
  const textGeneration = yield* makeClaudeTextGeneration(effectiveConfig, processEnv);
59711
- const capabilitiesProbeCache = yield* make$81({
59863
+ const capabilitiesProbeCache = yield* make$82({
59712
59864
  capacity: 1,
59713
59865
  timeToLive: CAPABILITIES_PROBE_TTL,
59714
59866
  lookup: () => probeClaudeCapabilities(effectiveConfig, processEnv, cwd).pipe(provideService(Path, path))
@@ -59844,14 +59996,14 @@ const makeCodexTextGeneration = fn("makeCodexTextGeneration")(function* (codexCo
59844
59996
  ...imagePaths.flatMap((imagePath) => ["--image", imagePath]),
59845
59997
  "-"
59846
59998
  ], { env: resolvedEnvironment });
59847
- const command = make$79(spawnCommand.command, spawnCommand.args, {
59999
+ const command = make$80(spawnCommand.command, spawnCommand.args, {
59848
60000
  env: {
59849
60001
  ...resolvedEnvironment,
59850
60002
  ...codexConfig.homePath ? { CODEX_HOME: expandHomePath(codexConfig.homePath) } : {}
59851
60003
  },
59852
60004
  cwd,
59853
60005
  shell: spawnCommand.shell,
59854
- stdin: { stream: encodeText(make$74(prompt)) }
60006
+ stdin: { stream: encodeText(make$75(prompt)) }
59855
60007
  });
59856
60008
  const child = yield* commandSpawner.spawn(command).pipe(mapError((cause) => normalizeCliError("codex", operation, cause, "Failed to spawn Codex CLI process")));
59857
60009
  const [stdout, stderr, exitCode] = yield* all([
@@ -77804,10 +77956,10 @@ const makeCodexAppServerPatchedProtocol = fn("makeCodexAppServerPatchedProtocol"
77804
77956
  const outgoing = yield* unbounded$2();
77805
77957
  const incomingNotifications = yield* unbounded$2();
77806
77958
  const incomingRequests = yield* unbounded$2();
77807
- const pending = yield* make$63(/* @__PURE__ */ new Map());
77808
- const nextRequestId = yield* make$63(1);
77809
- const remainder = yield* make$63("");
77810
- const terminationHandled = yield* make$63(false);
77959
+ const pending = yield* make$64(/* @__PURE__ */ new Map());
77960
+ const nextRequestId = yield* make$64(1);
77961
+ const remainder = yield* make$64("");
77962
+ const terminationHandled = yield* make$64(false);
77811
77963
  const logProtocol = (event) => {
77812
77964
  if (event.direction === "incoming" && !options.logIncoming) return void_$1;
77813
77965
  if (event.direction === "outgoing" && !options.logOutgoing) return void_$1;
@@ -77906,7 +78058,7 @@ const makeCodexAppServerPatchedProtocol = fn("makeCodexAppServerPatchedProtocol"
77906
78058
  yield* fromQueue(outgoing).pipe(run$5(options.stdio.stdout()), forkScoped);
77907
78059
  const request = (method, payload) => gen(function* () {
77908
78060
  const requestId = yield* modify$2(nextRequestId, (current) => [current, current + 1]);
77909
- const deferred = yield* make$73();
78061
+ const deferred = yield* make$74();
77910
78062
  yield* update$2(pending, (current) => new Map(current).set(String(requestId), {
77911
78063
  deferred,
77912
78064
  method
@@ -77934,7 +78086,7 @@ const makeCodexAppServerPatchedProtocol = fn("makeCodexAppServerPatchedProtocol"
77934
78086
  //#endregion
77935
78087
  //#region ../effect-codex-app-server/src/_internal/stdio.ts
77936
78088
  const encoder$2 = new TextEncoder();
77937
- const makeChildStdio$1 = (handle) => make$80({
78089
+ const makeChildStdio$1 = (handle) => make$81({
77938
78090
  args: succeed$1([]),
77939
78091
  stdin: handle.stdout,
77940
78092
  stdout: () => mapInput(handle.stdin, (chunk) => typeof chunk === "string" ? encoder$2.encode(chunk) : chunk),
@@ -77945,7 +78097,7 @@ fn("makeInMemoryStdio")(function* () {
77945
78097
  const output = yield* unbounded$2();
77946
78098
  const decoder = new TextDecoder();
77947
78099
  return {
77948
- stdio: make$80({
78100
+ stdio: make$81({
77949
78101
  args: succeed$1([]),
77950
78102
  stdin: fromQueue(input),
77951
78103
  stdout: () => forEach$1((chunk) => offer$1(output, typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true }))),
@@ -78232,7 +78384,7 @@ const probeCodexAppServerProvider = fn("probeCodexAppServerProvider")(function*
78232
78384
  env: environment,
78233
78385
  extendEnv: true
78234
78386
  });
78235
- const child = yield* spawner.spawn(make$79(spawnCommand.command, spawnCommand.args, {
78387
+ const child = yield* spawner.spawn(make$80(spawnCommand.command, spawnCommand.args, {
78236
78388
  cwd: input.cwd,
78237
78389
  env: environment,
78238
78390
  extendEnv: true,
@@ -78938,14 +79090,14 @@ const makeCodexSessionRuntime = (options) => gen(function* () {
78938
79090
  const runtimeScope = yield* Scope;
78939
79091
  const crypto = yield* Crypto;
78940
79092
  const events = yield* unbounded$2();
78941
- const pendingApprovalsRef = yield* make$63(/* @__PURE__ */ new Map());
78942
- const approvalCorrelationsRef = yield* make$63(/* @__PURE__ */ new Map());
78943
- const pendingUserInputsRef = yield* make$63(/* @__PURE__ */ new Map());
78944
- const collabReceiverTurnsRef = yield* make$63(/* @__PURE__ */ new Map());
78945
- const collabChildAgentsRef = yield* make$63(/* @__PURE__ */ new Map());
79093
+ const pendingApprovalsRef = yield* make$64(/* @__PURE__ */ new Map());
79094
+ const approvalCorrelationsRef = yield* make$64(/* @__PURE__ */ new Map());
79095
+ const pendingUserInputsRef = yield* make$64(/* @__PURE__ */ new Map());
79096
+ const collabReceiverTurnsRef = yield* make$64(/* @__PURE__ */ new Map());
79097
+ const collabChildAgentsRef = yield* make$64(/* @__PURE__ */ new Map());
78946
79098
  /** Child provider-thread id → its currently running provider turn id. */
78947
- const collabChildLiveTurnsRef = yield* make$63(/* @__PURE__ */ new Map());
78948
- const closedRef = yield* make$63(false);
79099
+ const collabChildLiveTurnsRef = yield* make$64(/* @__PURE__ */ new Map());
79100
+ const closedRef = yield* make$64(false);
78949
79101
  const resolvedHomePath = options.homePath ? expandHomePath(options.homePath) : void 0;
78950
79102
  const env = {
78951
79103
  ...options.environment,
@@ -78957,7 +79109,7 @@ const makeCodexSessionRuntime = (options) => gen(function* () {
78957
79109
  env,
78958
79110
  extendEnv
78959
79111
  });
78960
- const child = yield* spawner.spawn(make$79(spawnCommand.command, spawnCommand.args, {
79112
+ const child = yield* spawner.spawn(make$80(spawnCommand.command, spawnCommand.args, {
78961
79113
  cwd: options.cwd,
78962
79114
  env,
78963
79115
  extendEnv,
@@ -78980,7 +79132,7 @@ const makeCodexSessionRuntime = (options) => gen(function* () {
78980
79132
  cause
78981
79133
  })));
78982
79134
  const sessionCreatedAt = yield* nowIso;
78983
- const sessionRef = yield* make$63({
79135
+ const sessionRef = yield* make$64({
78984
79136
  provider: PROVIDER$1,
78985
79137
  ...options.providerInstanceId ? { providerInstanceId: options.providerInstanceId } : {},
78986
79138
  status: "connecting",
@@ -79308,7 +79460,7 @@ const makeCodexSessionRuntime = (options) => gen(function* () {
79308
79460
  const requestId = ApprovalRequestId.make(yield* randomUUIDv4("command-approval-request"));
79309
79461
  const turnId = TurnId.make(payload.turnId);
79310
79462
  const itemId = ProviderItemId.make(payload.itemId);
79311
- const decision = yield* make$73();
79463
+ const decision = yield* make$74();
79312
79464
  yield* update$2(pendingApprovalsRef, (current) => {
79313
79465
  const next = new Map(current);
79314
79466
  next.set(requestId, {
@@ -79351,7 +79503,7 @@ const makeCodexSessionRuntime = (options) => gen(function* () {
79351
79503
  const requestId = ApprovalRequestId.make(yield* randomUUIDv4("file-change-approval-request"));
79352
79504
  const turnId = TurnId.make(payload.turnId);
79353
79505
  const itemId = ProviderItemId.make(payload.itemId);
79354
- const decision = yield* make$73();
79506
+ const decision = yield* make$74();
79355
79507
  yield* update$2(pendingApprovalsRef, (current) => {
79356
79508
  const next = new Map(current);
79357
79509
  next.set(requestId, {
@@ -79394,7 +79546,7 @@ const makeCodexSessionRuntime = (options) => gen(function* () {
79394
79546
  const requestId = ApprovalRequestId.make(yield* randomUUIDv4("user-input-request"));
79395
79547
  const turnId = TurnId.make(payload.turnId);
79396
79548
  const itemId = ProviderItemId.make(payload.itemId);
79397
- const answers = yield* make$73();
79549
+ const answers = yield* make$74();
79398
79550
  yield* update$2(pendingUserInputsRef, (current) => {
79399
79551
  const next = new Map(current);
79400
79552
  next.set(requestId, {
@@ -79427,7 +79579,7 @@ const makeCodexSessionRuntime = (options) => gen(function* () {
79427
79579
  discard: true
79428
79580
  });
79429
79581
  yield* fromQueue(serverNotifications).pipe(runForEach(handleRawNotification), forkIn(runtimeScope));
79430
- const stderrRemainderRef = yield* make$63("");
79582
+ const stderrRemainderRef = yield* make$64("");
79431
79583
  yield* child.stderr.pipe(decodeText(), runForEach((chunk) => modify$2(stderrRemainderRef, (current) => {
79432
79584
  const lines = (current + chunk).split("\n");
79433
79585
  const remainder = lines.pop() ?? "";
@@ -80702,7 +80854,7 @@ const makeCodexAdapter = fn("makeCodexAdapter")(function* (codexConfig, options)
80702
80854
  const existing = sessions.get(input.threadId);
80703
80855
  if (existing && !existing.stopped) yield* suspend(() => stopSessionInternal(existing));
80704
80856
  const runtimeInput = toRuntimeInput(input);
80705
- const sessionScope = yield* make$76("sequential");
80857
+ const sessionScope = yield* make$77("sequential");
80706
80858
  let sessionScopeTransferred = false;
80707
80859
  yield* addFinalizer(() => sessionScopeTransferred ? void_$1 : close(sessionScope, void_$2));
80708
80860
  const runtime = yield* createRuntime(runtimeInput).pipe(provideService(Scope, sessionScope), provideService(ChildProcessSpawner, childProcessSpawner), provideService(Crypto, crypto), mapError((cause) => new ProviderAdapterProcessError({
@@ -84476,9 +84628,9 @@ const makeAcpPatchedProtocol = fn("makeAcpPatchedProtocol")(function* (options)
84476
84628
  const notificationQueue = yield* unbounded$2();
84477
84629
  const disconnects = yield* unbounded$2();
84478
84630
  const outgoing = yield* unbounded$2();
84479
- const nextRequestId = yield* make$63(1);
84480
- const terminationHandled = yield* make$63(false);
84481
- const extPending = yield* make$63(/* @__PURE__ */ new Map());
84631
+ const nextRequestId = yield* make$64(1);
84632
+ const terminationHandled = yield* make$64(false);
84633
+ const extPending = yield* make$64(/* @__PURE__ */ new Map());
84482
84634
  const logProtocol = (event) => {
84483
84635
  if (event.direction === "incoming" && !options.logIncoming) return void_$1;
84484
84636
  if (event.direction === "outgoing" && !options.logOutgoing) return void_$1;
@@ -84696,7 +84848,7 @@ const makeAcpPatchedProtocol = fn("makeAcpPatchedProtocol")(function* (options)
84696
84848
  },
84697
84849
  request: fn("sendRequest")(function* (method, payload) {
84698
84850
  const requestId = yield* modify$2(nextRequestId, (current) => [current, current + 1]);
84699
- const deferred = yield* make$73();
84851
+ const deferred = yield* make$74();
84700
84852
  yield* update$2(extPending, (pending) => new Map(pending).set(String(requestId), {
84701
84853
  deferred,
84702
84854
  method
@@ -84718,113 +84870,113 @@ function isProtocolError(value) {
84718
84870
  }
84719
84871
  //#endregion
84720
84872
  //#region ../effect-acp/src/rpc.ts
84721
- const InitializeRpc = make$51(AGENT_METHODS.initialize, {
84873
+ const InitializeRpc = make$52(AGENT_METHODS.initialize, {
84722
84874
  payload: InitializeRequest,
84723
84875
  success: InitializeResponse,
84724
84876
  error: Error$1
84725
84877
  });
84726
- const AuthenticateRpc = make$51(AGENT_METHODS.authenticate, {
84878
+ const AuthenticateRpc = make$52(AGENT_METHODS.authenticate, {
84727
84879
  payload: AuthenticateRequest,
84728
84880
  success: AuthenticateResponse,
84729
84881
  error: Error$1
84730
84882
  });
84731
- const LogoutRpc = make$51(AGENT_METHODS.logout, {
84883
+ const LogoutRpc = make$52(AGENT_METHODS.logout, {
84732
84884
  payload: LogoutRequest,
84733
84885
  success: LogoutResponse,
84734
84886
  error: Error$1
84735
84887
  });
84736
- const NewSessionRpc = make$51(AGENT_METHODS.session_new, {
84888
+ const NewSessionRpc = make$52(AGENT_METHODS.session_new, {
84737
84889
  payload: NewSessionRequest,
84738
84890
  success: NewSessionResponse,
84739
84891
  error: Error$1
84740
84892
  });
84741
- const LoadSessionRpc = make$51(AGENT_METHODS.session_load, {
84893
+ const LoadSessionRpc = make$52(AGENT_METHODS.session_load, {
84742
84894
  payload: LoadSessionRequest,
84743
84895
  success: LoadSessionResponse,
84744
84896
  error: Error$1
84745
84897
  });
84746
- const ListSessionsRpc = make$51(AGENT_METHODS.session_list, {
84898
+ const ListSessionsRpc = make$52(AGENT_METHODS.session_list, {
84747
84899
  payload: ListSessionsRequest,
84748
84900
  success: ListSessionsResponse,
84749
84901
  error: Error$1
84750
84902
  });
84751
- const ForkSessionRpc = make$51(AGENT_METHODS.session_fork, {
84903
+ const ForkSessionRpc = make$52(AGENT_METHODS.session_fork, {
84752
84904
  payload: ForkSessionRequest,
84753
84905
  success: ForkSessionResponse,
84754
84906
  error: Error$1
84755
84907
  });
84756
- const ResumeSessionRpc = make$51(AGENT_METHODS.session_resume, {
84908
+ const ResumeSessionRpc = make$52(AGENT_METHODS.session_resume, {
84757
84909
  payload: ResumeSessionRequest,
84758
84910
  success: ResumeSessionResponse,
84759
84911
  error: Error$1
84760
84912
  });
84761
- const CloseSessionRpc = make$51(AGENT_METHODS.session_close, {
84913
+ const CloseSessionRpc = make$52(AGENT_METHODS.session_close, {
84762
84914
  payload: CloseSessionRequest,
84763
84915
  success: CloseSessionResponse,
84764
84916
  error: Error$1
84765
84917
  });
84766
- const PromptRpc = make$51(AGENT_METHODS.session_prompt, {
84918
+ const PromptRpc = make$52(AGENT_METHODS.session_prompt, {
84767
84919
  payload: PromptRequest,
84768
84920
  success: PromptResponse,
84769
84921
  error: Error$1
84770
84922
  });
84771
- const SetSessionModelRpc = make$51(AGENT_METHODS.session_set_model, {
84923
+ const SetSessionModelRpc = make$52(AGENT_METHODS.session_set_model, {
84772
84924
  payload: SetSessionModelRequest,
84773
84925
  success: SetSessionModelResponse,
84774
84926
  error: Error$1
84775
84927
  });
84776
- const SetSessionConfigOptionRpc = make$51(AGENT_METHODS.session_set_config_option, {
84928
+ const SetSessionConfigOptionRpc = make$52(AGENT_METHODS.session_set_config_option, {
84777
84929
  payload: SetSessionConfigOptionRequest,
84778
84930
  success: SetSessionConfigOptionResponse,
84779
84931
  error: Error$1
84780
84932
  });
84781
- const ReadTextFileRpc = make$51(CLIENT_METHODS.fs_read_text_file, {
84933
+ const ReadTextFileRpc = make$52(CLIENT_METHODS.fs_read_text_file, {
84782
84934
  payload: ReadTextFileRequest,
84783
84935
  success: ReadTextFileResponse,
84784
84936
  error: Error$1
84785
84937
  });
84786
- const WriteTextFileRpc = make$51(CLIENT_METHODS.fs_write_text_file, {
84938
+ const WriteTextFileRpc = make$52(CLIENT_METHODS.fs_write_text_file, {
84787
84939
  payload: WriteTextFileRequest,
84788
84940
  success: WriteTextFileResponse,
84789
84941
  error: Error$1
84790
84942
  });
84791
- const RequestPermissionRpc = make$51(CLIENT_METHODS.session_request_permission, {
84943
+ const RequestPermissionRpc = make$52(CLIENT_METHODS.session_request_permission, {
84792
84944
  payload: RequestPermissionRequest,
84793
84945
  success: RequestPermissionResponse,
84794
84946
  error: Error$1
84795
84947
  });
84796
- const ElicitationRpc = make$51(CLIENT_METHODS.session_elicitation, {
84948
+ const ElicitationRpc = make$52(CLIENT_METHODS.session_elicitation, {
84797
84949
  payload: ElicitationRequest,
84798
84950
  success: ElicitationResponse,
84799
84951
  error: Error$1
84800
84952
  });
84801
- const CreateTerminalRpc = make$51(CLIENT_METHODS.terminal_create, {
84953
+ const CreateTerminalRpc = make$52(CLIENT_METHODS.terminal_create, {
84802
84954
  payload: CreateTerminalRequest,
84803
84955
  success: CreateTerminalResponse,
84804
84956
  error: Error$1
84805
84957
  });
84806
- const TerminalOutputRpc = make$51(CLIENT_METHODS.terminal_output, {
84958
+ const TerminalOutputRpc = make$52(CLIENT_METHODS.terminal_output, {
84807
84959
  payload: TerminalOutputRequest,
84808
84960
  success: TerminalOutputResponse,
84809
84961
  error: Error$1
84810
84962
  });
84811
- const ReleaseTerminalRpc = make$51(CLIENT_METHODS.terminal_release, {
84963
+ const ReleaseTerminalRpc = make$52(CLIENT_METHODS.terminal_release, {
84812
84964
  payload: ReleaseTerminalRequest,
84813
84965
  success: ReleaseTerminalResponse,
84814
84966
  error: Error$1
84815
84967
  });
84816
- const WaitForTerminalExitRpc = make$51(CLIENT_METHODS.terminal_wait_for_exit, {
84968
+ const WaitForTerminalExitRpc = make$52(CLIENT_METHODS.terminal_wait_for_exit, {
84817
84969
  payload: WaitForTerminalExitRequest,
84818
84970
  success: WaitForTerminalExitResponse,
84819
84971
  error: Error$1
84820
84972
  });
84821
- const KillTerminalRpc = make$51(CLIENT_METHODS.terminal_kill, {
84973
+ const KillTerminalRpc = make$52(CLIENT_METHODS.terminal_kill, {
84822
84974
  payload: KillTerminalRequest,
84823
84975
  success: KillTerminalResponse,
84824
84976
  error: Error$1
84825
84977
  });
84826
- const AgentRpcs = make$50(InitializeRpc, AuthenticateRpc, LogoutRpc, NewSessionRpc, LoadSessionRpc, ListSessionsRpc, ForkSessionRpc, ResumeSessionRpc, CloseSessionRpc, PromptRpc, SetSessionModelRpc, SetSessionConfigOptionRpc);
84827
- const ClientRpcs = make$50(ReadTextFileRpc, WriteTextFileRpc, RequestPermissionRpc, ElicitationRpc, CreateTerminalRpc, TerminalOutputRpc, ReleaseTerminalRpc, WaitForTerminalExitRpc, KillTerminalRpc);
84978
+ const AgentRpcs = make$51(InitializeRpc, AuthenticateRpc, LogoutRpc, NewSessionRpc, LoadSessionRpc, ListSessionsRpc, ForkSessionRpc, ResumeSessionRpc, CloseSessionRpc, PromptRpc, SetSessionModelRpc, SetSessionConfigOptionRpc);
84979
+ const ClientRpcs = make$51(ReadTextFileRpc, WriteTextFileRpc, RequestPermissionRpc, ElicitationRpc, CreateTerminalRpc, TerminalOutputRpc, ReleaseTerminalRpc, WaitForTerminalExitRpc, KillTerminalRpc);
84828
84980
  //#endregion
84829
84981
  //#region ../effect-acp/src/_internal/shared.ts
84830
84982
  const isError = is(Error$1);
@@ -84849,7 +85001,7 @@ ArraySchema(Unknown);
84849
85001
  //#endregion
84850
85002
  //#region ../effect-acp/src/_internal/stdio.ts
84851
85003
  const encoder = new TextEncoder();
84852
- const makeChildStdio = (handle) => make$80({
85004
+ const makeChildStdio = (handle) => make$81({
84853
85005
  args: succeed$1([]),
84854
85006
  stdin: handle.stdout,
84855
85007
  stdout: () => mapInput(handle.stdin, (chunk) => typeof chunk === "string" ? encoder.encode(chunk) : chunk),
@@ -84860,7 +85012,7 @@ fn("makeInMemoryStdio")(function* () {
84860
85012
  const output = yield* unbounded$2();
84861
85013
  const decoder = new TextDecoder();
84862
85014
  return {
84863
- stdio: make$80({
85015
+ stdio: make$81({
84864
85016
  args: succeed$1([]),
84865
85017
  stdin: fromQueue(input),
84866
85018
  stdout: () => forEach$1((chunk) => offer$1(output, typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true }))),
@@ -84952,9 +85104,9 @@ const make$5 = fn("effect-acp/AcpClient.make")(function* (stdio, options = {}, t
84952
85104
  [CLIENT_METHODS.terminal_kill]: (payload) => runHandler(coreHandlers.terminalKill, payload, CLIENT_METHODS.terminal_kill).pipe(map$4((result) => result ?? {})),
84953
85105
  [CLIENT_METHODS.terminal_release]: (payload) => runHandler(coreHandlers.terminalRelease, payload, CLIENT_METHODS.terminal_release).pipe(map$4((result) => result ?? {}))
84954
85106
  }));
84955
- yield* make$16(ClientRpcs).pipe(provideService(Protocol, transport.serverProtocol), provide$1(clientHandlerLayer), forkScoped);
85107
+ yield* make$17(ClientRpcs).pipe(provideService(Protocol, transport.serverProtocol), provide$1(clientHandlerLayer), forkScoped);
84956
85108
  let nextRpcRequestId = 2 ** 32;
84957
- const rpc = yield* make$17(AgentRpcs, { generateRequestId: () => RequestId$2(nextRpcRequestId++) }).pipe(provideService(Protocol$1, transport.clientProtocol));
85109
+ const rpc = yield* make$18(AgentRpcs, { generateRequestId: () => RequestId$2(nextRpcRequestId++) }).pipe(provideService(Protocol$1, transport.clientProtocol));
84958
85110
  return AcpClient.of({
84959
85111
  raw: {
84960
85112
  notifications: transport.incoming,
@@ -85109,7 +85261,7 @@ const registerLocalToolHandlers = (input) => gen(function* () {
85109
85261
  env,
85110
85262
  extendEnv: true
85111
85263
  } : {});
85112
- const handle = yield* spawner.spawn(make$79(spawnCommand.command, spawnCommand.args, {
85264
+ const handle = yield* spawner.spawn(make$80(spawnCommand.command, spawnCommand.args, {
85113
85265
  cwd: request.cwd ?? input.cwd,
85114
85266
  ...hasEnv ? {
85115
85267
  env,
@@ -85117,7 +85269,7 @@ const registerLocalToolHandlers = (input) => gen(function* () {
85117
85269
  } : {},
85118
85270
  shell: spawnCommand.shell
85119
85271
  })).pipe(provideService(Scope, scope), mapError(() => internalError(`Failed to spawn ACP terminal command: ${request.command}`)));
85120
- const exited = yield* make$73();
85272
+ const exited = yield* make$74();
85121
85273
  const state = {
85122
85274
  handle,
85123
85275
  exited,
@@ -85649,18 +85801,18 @@ const make$4 = (options) => gen(function* () {
85649
85801
  const spawner = yield* ChildProcessSpawner;
85650
85802
  const runtimeScope = yield* Scope;
85651
85803
  const eventQueue = yield* unbounded$2();
85652
- const modeStateRef = yield* make$63(void 0);
85653
- const toolCallsRef = yield* make$63(/* @__PURE__ */ new Map());
85804
+ const modeStateRef = yield* make$64(void 0);
85805
+ const toolCallsRef = yield* make$64(/* @__PURE__ */ new Map());
85654
85806
  const assistantItemRuntimeId = yield* crypto.randomUUIDv4.pipe(mapError((cause) => new AcpTransportError({
85655
85807
  detail: "Failed to generate an ACP assistant item runtime identifier.",
85656
85808
  cause
85657
85809
  })));
85658
- const assistantSegmentRef = yield* make$63({ nextSegmentIndex: 0 });
85659
- const configOptionsRef = yield* make$63(sessionConfigOptionsFromSetup(void 0));
85660
- const startStateRef = yield* make$63({ _tag: "NotStarted" });
85661
- const promptSerializationSemaphore = yield* make$75(1);
85662
- const activePromptFiberRef = yield* make$63(none());
85663
- const sessionLoadGateRef = yield* make$63(none());
85810
+ const assistantSegmentRef = yield* make$64({ nextSegmentIndex: 0 });
85811
+ const configOptionsRef = yield* make$64(sessionConfigOptionsFromSetup(void 0));
85812
+ const startStateRef = yield* make$64({ _tag: "NotStarted" });
85813
+ const promptSerializationSemaphore = yield* make$76(1);
85814
+ const activePromptFiberRef = yield* make$64(none());
85815
+ const sessionLoadGateRef = yield* make$64(none());
85664
85816
  const logRequest = (event) => options.requestLogger ? options.requestLogger(event) : void_$1;
85665
85817
  const runLoggedRequest = (method, payload, effect) => logRequest({
85666
85818
  method,
@@ -85681,7 +85833,7 @@ const make$4 = (options) => gen(function* () {
85681
85833
  env: options.spawn.env,
85682
85834
  extendEnv: true
85683
85835
  } : {});
85684
- const child = yield* spawner.spawn(make$79(spawnCommand.command, spawnCommand.args, {
85836
+ const child = yield* spawner.spawn(make$80(spawnCommand.command, spawnCommand.args, {
85685
85837
  ...options.spawn.cwd ? { cwd: options.spawn.cwd } : {},
85686
85838
  ...options.spawn.env ? {
85687
85839
  env: options.spawn.env,
@@ -85874,7 +86026,7 @@ const make$4 = (options) => gen(function* () {
85874
86026
  };
85875
86027
  });
85876
86028
  const start = gen(function* () {
85877
- const deferred = yield* make$73();
86029
+ const deferred = yield* make$74();
85878
86030
  return yield* yield* modify$2(startStateRef, (state) => {
85879
86031
  switch (state._tag) {
85880
86032
  case "Started": return [succeed$1(state.result), state];
@@ -85908,7 +86060,7 @@ const make$4 = (options) => gen(function* () {
85908
86060
  start: () => start,
85909
86061
  getEvents: () => fromQueue(eventQueue),
85910
86062
  drainEvents: gen(function* () {
85911
- const acknowledge = yield* make$73();
86063
+ const acknowledge = yield* make$74();
85912
86064
  yield* offer$1(eventQueue, {
85913
86065
  _tag: "EventStreamBarrier",
85914
86066
  acknowledge
@@ -86147,7 +86299,7 @@ const makeAcpAgentTextGeneration = (descriptor, settings, environment = process.
86147
86299
  const path = yield* Path;
86148
86300
  const runAcpAgentJson = ({ operation, cwd, prompt, outputSchemaJson, modelSelection }) => gen(function* () {
86149
86301
  const resolvedModel = resolveAcpAgentModelId(descriptor, modelSelection.model);
86150
- const outputRef = yield* make$63("");
86302
+ const outputRef = yield* make$64("");
86151
86303
  const runtime = yield* makeAcpAgentRuntime(descriptor, {
86152
86304
  settings,
86153
86305
  environment,
@@ -86602,7 +86754,7 @@ function makeAcpAgentAdapter(descriptor, settings, options) {
86602
86754
  const managedNativeEventLogger = options?.nativeEventLogger === void 0 ? nativeEventLogger : void 0;
86603
86755
  const makeAcpNativeLoggers = yield* makeAcpNativeLoggerFactory();
86604
86756
  const sessions = /* @__PURE__ */ new Map();
86605
- const threadLocksRef = yield* make$53(/* @__PURE__ */ new Map());
86757
+ const threadLocksRef = yield* make$54(/* @__PURE__ */ new Map());
86606
86758
  const runtimeEventPubSub = yield* unbounded$1();
86607
86759
  const nowIso = map$4(now$1, formatIso);
86608
86760
  const randomUUIDv4 = crypto.randomUUIDv4.pipe(mapError((cause) => new ProviderAdapterRequestError({
@@ -86623,7 +86775,7 @@ function makeAcpAgentAdapter(descriptor, settings, options) {
86623
86775
  const offerRuntimeEvent = (event) => publish(runtimeEventPubSub, event).pipe(asVoid);
86624
86776
  const getThreadSemaphore = (threadId) => modifyEffect(threadLocksRef, (current) => {
86625
86777
  return match$1(fromNullishOr(current.get(threadId)), {
86626
- onNone: () => make$75(1).pipe(map$4((semaphore) => {
86778
+ onNone: () => make$76(1).pipe(map$4((semaphore) => {
86627
86779
  const next = new Map(current);
86628
86780
  next.set(threadId, semaphore);
86629
86781
  return [semaphore, next];
@@ -86806,7 +86958,7 @@ function makeAcpAgentAdapter(descriptor, settings, options) {
86806
86958
  const existing = sessions.get(input.threadId);
86807
86959
  if (existing && !existing.stopped) yield* stopSessionInternal(existing);
86808
86960
  const pendingApprovals = /* @__PURE__ */ new Map();
86809
- const sessionScope = yield* make$76("sequential");
86961
+ const sessionScope = yield* make$77("sequential");
86810
86962
  let sessionScopeTransferred = false;
86811
86963
  yield* addFinalizer(() => sessionScopeTransferred ? void_$1 : close(sessionScope, void_$2));
86812
86964
  const resumeSessionId = resolveResumeSessionId(descriptor, input.resumeCursor);
@@ -86845,7 +86997,7 @@ function makeAcpAgentAdapter(descriptor, settings, options) {
86845
86997
  const permissionRequest = parsePermissionRequest(params);
86846
86998
  const requestId = ApprovalRequestId.make(yield* randomUUIDv4);
86847
86999
  const runtimeRequestId = RuntimeRequestId.make(requestId);
86848
- const decision = yield* make$73();
87000
+ const decision = yield* make$74();
86849
87001
  const turnId = resolveSessionCallbackTurnId(sessions, input.threadId);
86850
87002
  pendingApprovals.set(requestId, { decision });
86851
87003
  yield* offerRuntimeEvent(makeAcpRequestOpenedEvent({
@@ -87102,10 +87254,10 @@ function makeAcpAgentAdapter(descriptor, settings, options) {
87102
87254
  });
87103
87255
  })));
87104
87256
  }));
87105
- const promptSettled = yield* make$63(false);
87106
- const promptRpcSucceeded = yield* make$63(false);
87107
- const promptResultRef = yield* make$63(void 0);
87108
- const promptFailureMessageRef = yield* make$63(void 0);
87257
+ const promptSettled = yield* make$64(false);
87258
+ const promptRpcSucceeded = yield* make$64(false);
87259
+ const promptResultRef = yield* make$64(void 0);
87260
+ const promptFailureMessageRef = yield* make$64(void 0);
87109
87261
  return yield* gen(function* () {
87110
87262
  const result = yield* prepared.acp.prompt({ prompt: prepared.promptParts }).pipe(tap((promptResult) => all([set$2(promptRpcSucceeded, true), set$2(promptResultRef, promptResult)])), tapError((error) => set$2(promptFailureMessageRef, mapAcpToAdapterError(PROVIDER, input.threadId, "session/prompt", error).message).pipe(andThen(prepared.acp.drainEvents))), mapError((error) => mapAcpToAdapterError(PROVIDER, input.threadId, "session/prompt", error)));
87111
87263
  return yield* withThreadLock(input.threadId, gen(function* () {
@@ -87406,7 +87558,7 @@ const discoverModelsViaAcp = (descriptor, settings, environment = process.env) =
87406
87558
  const runVersionCommand = (descriptor, settings, environment = process.env) => gen(function* () {
87407
87559
  const command = settings.binaryPath.trim() || descriptor.defaultBinary;
87408
87560
  const spawnCommand = yield* resolveSpawnCommand(command, ["--version"], { env: environment });
87409
- return yield* spawnAndCollect(command, make$79(spawnCommand.command, spawnCommand.args, {
87561
+ return yield* spawnAndCollect(command, make$80(spawnCommand.command, spawnCommand.args, {
87410
87562
  env: environment,
87411
87563
  shell: spawnCommand.shell
87412
87564
  }));
@@ -87894,7 +88046,7 @@ const buildEntry = (input) => gen(function* () {
87894
88046
  };
87895
88047
  }
87896
88048
  const typedConfig = decodeResult.success;
87897
- const childScope = yield* make$76();
88049
+ const childScope = yield* make$77();
87898
88050
  yield* addFinalizer$1(parentScope, close(childScope, void_$2).pipe(ignore$1));
87899
88051
  const createResult = yield* driver.create({
87900
88052
  instanceId,
@@ -88015,8 +88167,8 @@ const makeProviderInstanceRegistry = (input) => gen(function* () {
88015
88167
  const driversById = new Map(input.drivers.map((driver) => [driver.driverKind, driver]));
88016
88168
  const parentScope = yield* Scope;
88017
88169
  const driverContext = yield* context();
88018
- const entries = yield* make$63(/* @__PURE__ */ new Map());
88019
- const unavailable = yield* make$63(/* @__PURE__ */ new Map());
88170
+ const entries = yield* make$64(/* @__PURE__ */ new Map());
88171
+ const unavailable = yield* make$64(/* @__PURE__ */ new Map());
88020
88172
  const changes = yield* unbounded$1();
88021
88173
  yield* addFinalizer(() => shutdown$2(changes));
88022
88174
  const reconcileWithR = makeReconcile({
@@ -88051,7 +88203,7 @@ const makeProviderInstanceRegistry = (input) => gen(function* () {
88051
88203
  * changes. Tests that exercise the mutator directly can pair this Layer
88052
88204
  * with a test-local `ServerSettingsService`.
88053
88205
  */
88054
- const ProviderInstanceRegistryMutableLayer = (input) => effectContext(makeProviderInstanceRegistry(input).pipe(map$4(({ registry, mutator }) => make$68(ProviderInstanceRegistry, registry).pipe(add$2(ProviderInstanceRegistryMutator, mutator)))));
88206
+ const ProviderInstanceRegistryMutableLayer = (input) => effectContext(makeProviderInstanceRegistry(input).pipe(map$4(({ registry, mutator }) => make$69(ProviderInstanceRegistry, registry).pipe(add$2(ProviderInstanceRegistryMutator, mutator)))));
88055
88207
  //#endregion
88056
88208
  //#region src/provider/Layers/ProviderInstanceRegistryHydration.ts
88057
88209
  /**
@@ -88260,28 +88412,6 @@ const makeRuntimeReceiptBusTest = gen(function* () {
88260
88412
  const RuntimeReceiptBusLive = effect(RuntimeReceiptBus, makeRuntimeReceiptBus);
88261
88413
  effect(RuntimeReceiptBus, makeRuntimeReceiptBusTest);
88262
88414
  //#endregion
88263
- //#region ../t3-shared/src/DrainableWorker.ts
88264
- /**
88265
- * Create a drainable worker that processes items from an unbounded queue.
88266
- *
88267
- * The worker is forked into the current scope and will be interrupted when
88268
- * the scope closes. A finalizer shuts down the queue.
88269
- *
88270
- * @param process - The effect to run for each queued item.
88271
- * @returns A `DrainableWorker` with `queue` and `drain`.
88272
- */
88273
- const makeDrainableWorker = (process) => gen(function* () {
88274
- const queue = yield* acquireRelease(unbounded(), shutdown);
88275
- const outstanding = yield* make$52(0);
88276
- yield* take(queue).pipe(tap((a) => ensuring(process(a), update$1(outstanding, (n) => n - 1))), forever, forkScoped);
88277
- const drain = get$1(outstanding).pipe(tap((n) => n > 0 ? txRetry : void_$1), tx);
88278
- const enqueue = (element) => offer(queue, element).pipe(tap(() => update$1(outstanding, (n) => n + 1)), tx);
88279
- return {
88280
- enqueue,
88281
- drain
88282
- };
88283
- });
88284
- //#endregion
88285
88415
  //#region src/orchestration/Layers/ProviderRuntimeIngestion.ts
88286
88416
  const providerTurnKey = (threadId, turnId) => `${threadId}:${turnId}`;
88287
88417
  const providerTaskKey = (threadId, taskId) => `${threadId}:${taskId}`;
@@ -88740,33 +88870,33 @@ const ProviderRuntimeIngestionLive = effect(ProviderRuntimeIngestionService, gen
88740
88870
  const projectionTurnRepository = yield* ProjectionTurnRepository;
88741
88871
  const serverSettingsService = yield* ServerSettingsService;
88742
88872
  const providerCommandId = (event, tag) => String(event.eventId).startsWith("codex-snapshot:") ? succeed$1(CommandId.make(`provider:${event.eventId}:${tag}`)) : crypto.randomUUIDv4.pipe(map$4((uuid) => CommandId.make(`provider:${event.eventId}:${tag}:${uuid}`)));
88743
- const threadLocksRef = yield* make$53(/* @__PURE__ */ new Map());
88873
+ const threadLocksRef = yield* make$54(/* @__PURE__ */ new Map());
88744
88874
  const getThreadSemaphore = (threadId) => modifyEffect(threadLocksRef, (current) => {
88745
88875
  const existing = current.get(threadId);
88746
88876
  if (existing) return succeed$1([existing, current]);
88747
- return make$75(1).pipe(map$4((semaphore) => {
88877
+ return make$76(1).pipe(map$4((semaphore) => {
88748
88878
  const next = new Map(current);
88749
88879
  next.set(threadId, semaphore);
88750
88880
  return [semaphore, next];
88751
88881
  }));
88752
88882
  });
88753
88883
  const withThreadLock = (threadId, effect) => flatMap$1(getThreadSemaphore(threadId), (semaphore) => semaphore.withPermit(effect));
88754
- const turnMessageIdsByTurnKey = yield* make$81({
88884
+ const turnMessageIdsByTurnKey = yield* make$82({
88755
88885
  capacity: TURN_MESSAGE_IDS_BY_TURN_CACHE_CAPACITY,
88756
88886
  timeToLive: TURN_MESSAGE_IDS_BY_TURN_TTL,
88757
88887
  lookup: () => succeed$1(/* @__PURE__ */ new Set())
88758
88888
  });
88759
- const bufferedAssistantTextByMessageId = yield* make$81({
88889
+ const bufferedAssistantTextByMessageId = yield* make$82({
88760
88890
  capacity: BUFFERED_MESSAGE_TEXT_BY_MESSAGE_ID_CACHE_CAPACITY,
88761
88891
  timeToLive: BUFFERED_MESSAGE_TEXT_BY_MESSAGE_ID_TTL,
88762
88892
  lookup: () => succeed$1("")
88763
88893
  });
88764
- const assistantSegmentStateByTurnKey = yield* make$81({
88894
+ const assistantSegmentStateByTurnKey = yield* make$82({
88765
88895
  capacity: TURN_MESSAGE_IDS_BY_TURN_CACHE_CAPACITY,
88766
88896
  timeToLive: TURN_MESSAGE_IDS_BY_TURN_TTL,
88767
88897
  lookup: () => die(/* @__PURE__ */ new Error("assistant segment state should be read through getOption before initialization"))
88768
88898
  });
88769
- const bufferedProposedPlanById = yield* make$81({
88899
+ const bufferedProposedPlanById = yield* make$82({
88770
88900
  capacity: BUFFERED_PROPOSED_PLAN_BY_ID_CACHE_CAPACITY,
88771
88901
  timeToLive: BUFFERED_PROPOSED_PLAN_BY_ID_TTL,
88772
88902
  lookup: () => succeed$1({
@@ -88774,7 +88904,7 @@ const ProviderRuntimeIngestionLive = effect(ProviderRuntimeIngestionService, gen
88774
88904
  createdAt: ""
88775
88905
  })
88776
88906
  });
88777
- const taskDescriptionByTaskKey = yield* make$81({
88907
+ const taskDescriptionByTaskKey = yield* make$82({
88778
88908
  capacity: TASK_DESCRIPTION_BY_TASK_CACHE_CAPACITY,
88779
88909
  timeToLive: TASK_DESCRIPTION_BY_TASK_TTL,
88780
88910
  lookup: () => succeed$1("")
@@ -89326,10 +89456,6 @@ const ProviderRuntimeIngestionLive = effect(ProviderRuntimeIngestionService, gen
89326
89456
  });
89327
89457
  }
89328
89458
  if (options?.requireWritable !== true) return;
89329
- if (snapshot.status !== "idle" && snapshot.status !== "notLoaded" || snapshot.turns.some((turn) => turn.status === "inProgress")) return yield* new ProviderRuntimeReconciliationError({
89330
- threadId,
89331
- detail: snapshot.status === "active" ? "Codex is still processing this thread; wait for it to finish before sending." : `Codex thread is not writable while its native status is '${snapshot.status ?? "unknown"}'.`
89332
- });
89333
89459
  yield* providerService.ensureSession(threadId);
89334
89460
  });
89335
89461
  const reconcileThread = (threadId, options) => withThreadLock(threadId, reconcileThreadUnlocked(threadId, options)).pipe(mapError((cause) => cause instanceof ProviderRuntimeReconciliationError ? cause : new ProviderRuntimeReconciliationError({
@@ -89514,7 +89640,7 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
89514
89640
  const serverSettingsService = yield* ServerSettingsService;
89515
89641
  const serverCommandId = (tag) => crypto.randomUUIDv4.pipe(map$4((uuid) => CommandId.make(`server:${tag}:${uuid}`)));
89516
89642
  const serverEventId = () => crypto.randomUUIDv4.pipe(map$4(EventId.make));
89517
- const handledTurnStartKeys = yield* make$81({
89643
+ const handledTurnStartKeys = yield* make$82({
89518
89644
  capacity: HANDLED_TURN_START_KEY_MAX,
89519
89645
  timeToLive: HANDLED_TURN_START_KEY_TTL,
89520
89646
  lookup: () => succeed$1(true)
@@ -90323,7 +90449,7 @@ const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
90323
90449
  if (provider === void 0 || source === void 0) continue;
90324
90450
  fallbackByInstance.set(source.instanceId, provider);
90325
90451
  }
90326
- const providersRef = yield* make$63(yield* forEach(bootSources, (source) => gen(function* () {
90452
+ const providersRef = yield* make$64(yield* forEach(bootSources, (source) => gen(function* () {
90327
90453
  const filePath = yield* resolveProviderStatusCachePath({
90328
90454
  cacheDir: config.providerStatusCacheDir,
90329
90455
  instanceId: source.instanceId
@@ -90346,9 +90472,9 @@ const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
90346
90472
  return succeed$1(hydrateCachedProvider(correlation));
90347
90473
  }));
90348
90474
  }), { concurrency: "unbounded" }).pipe(map$4((providers) => orderProviderSnapshots(providers.filter((provider) => provider !== void 0)))));
90349
- const maintenanceActionStatesRef = yield* make$63(/* @__PURE__ */ new Map());
90350
- const liveSubsRef = yield* make$63(/* @__PURE__ */ new Map());
90351
- const syncSemaphore = yield* make$75(1);
90475
+ const maintenanceActionStatesRef = yield* make$64(/* @__PURE__ */ new Map());
90476
+ const liveSubsRef = yield* make$64(/* @__PURE__ */ new Map());
90477
+ const syncSemaphore = yield* make$76(1);
90352
90478
  const getLiveSources = get$3(liveSubsRef).pipe(map$4((map) => Array.from(map.values(), buildSnapshotSource)));
90353
90479
  const persistProvider = (provider) => gen(function* () {
90354
90480
  const key = snapshotInstanceKey(provider);
@@ -90644,7 +90770,7 @@ const httpHeaderRedactionLayer = effect(CurrentRedactedNames, map$4(CurrentRedac
90644
90770
  //#region src/serverLogger.ts
90645
90771
  const ServerLoggerLive = gen(function* () {
90646
90772
  const minimumLogLevelLayer = succeed$3(MinimumLogLevel, (yield* ServerConfig).logLevel);
90647
- return mergeAll(layer$40([consolePretty(), tracerLogger], { mergeWithExisting: false }), minimumLogLevelLayer);
90773
+ return mergeAll(layer$41([consolePretty(), tracerLogger], { mergeWithExisting: false }), minimumLogLevelLayer);
90648
90774
  }).pipe(unwrap);
90649
90775
  //#endregion
90650
90776
  //#region src/observability/Layers/Observability.ts
@@ -90667,7 +90793,7 @@ const ObservabilityLive = unwrap(gen(function* () {
90667
90793
  durationMs: stats.durationMs
90668
90794
  })
90669
90795
  });
90670
- const delegate = config.otlpTracesUrl === void 0 ? void 0 : yield* make$21({
90796
+ const delegate = config.otlpTracesUrl === void 0 ? void 0 : yield* make$22({
90671
90797
  url: config.otlpTracesUrl,
90672
90798
  exportInterval: `${config.otlpExportIntervalMs} millis`,
90673
90799
  resource: {
@@ -90685,9 +90811,9 @@ const ObservabilityLive = unwrap(gen(function* () {
90685
90811
  batchWindowMs: config.traceBatchWindowMs,
90686
90812
  sink,
90687
90813
  ...delegate ? { delegate } : {}
90688
- })), layer$12(sink));
90814
+ })), layer$13(sink));
90689
90815
  })).pipe(provide(layerFlusher), provideMerge(otlpSerializationLayer));
90690
- const metricsLayer = config.otlpMetricsUrl === void 0 ? empty$8 : layer$15({
90816
+ const metricsLayer = config.otlpMetricsUrl === void 0 ? empty$8 : layer$16({
90691
90817
  url: config.otlpMetricsUrl,
90692
90818
  exportInterval: `${config.otlpExportIntervalMs} millis`,
90693
90819
  resource: {
@@ -90740,11 +90866,11 @@ const orchestrationHttpApiLayer = group(EnvironmentHttpApi, "orchestration", fnU
90740
90866
  //#endregion
90741
90867
  //#region src/server.ts
90742
90868
  const HTTP_PREEMPTIVE_SHUTDOWN_GRACE_MS = 0;
90743
- const ApplicationObservabilityLive = ObservabilityLive.pipe(provideMerge(layer$16));
90744
- const ServerSettingsLayerLive = layer$25.pipe(provide(layer$35));
90745
- const DesktopTelemetryReceiverLayerLive = layer$19.pipe(provideMerge(ServerSettingsLayerLive));
90746
- const HostPowerMonitorLayerLive = layer$18.pipe(provide(DesktopTelemetryReceiverLayerLive));
90747
- const BackgroundLayerLive = layer$17.pipe(provide(HostPowerMonitorLayerLive), provideMerge(ServerSettingsLayerLive));
90869
+ const ApplicationObservabilityLive = ObservabilityLive.pipe(provideMerge(layer$17));
90870
+ const ServerSettingsLayerLive = layer$26.pipe(provide(layer$36));
90871
+ const DesktopTelemetryReceiverLayerLive = layer$20.pipe(provideMerge(ServerSettingsLayerLive));
90872
+ const HostPowerMonitorLayerLive = layer$19.pipe(provide(DesktopTelemetryReceiverLayerLive));
90873
+ const BackgroundLayerLive = layer$18.pipe(provide(HostPowerMonitorLayerLive), provideMerge(ServerSettingsLayerLive));
90748
90874
  const HttpServerLive = unwrap(gen(function* () {
90749
90875
  const config = yield* ServerConfig;
90750
90876
  if (typeof Bun !== "undefined") return (yield* promise(() => import("@effect/platform-bun/BunHttpServer"))).layer({
@@ -90779,23 +90905,23 @@ const ReactorLayerLive = empty$8.pipe(provideMerge(OrchestrationReactorLive), pr
90779
90905
  const ProviderSessionDirectoryLayerLive = ProviderSessionDirectoryLive.pipe(provide(layer$4));
90780
90906
  const ProviderLayerLive = ProviderServiceLive.pipe(provide(ProviderAdapterRegistryLive), provideMerge(ProviderSessionDirectoryLayerLive));
90781
90907
  const PersistenceLayerLive = empty$8.pipe(provideMerge(layerConfig));
90782
- const WorkspaceEntriesLayerLive = layer$9.pipe(provide(layer$21));
90783
- const WorkspaceLayerLive = mergeAll(layer$21, WorkspaceEntriesLayerLive, layer$8.pipe(provide(layer$21), provide(WorkspaceEntriesLayerLive)));
90784
- const TerminalLayerLive = layer$6.pipe(provide(layer));
90785
- const ProjectFaviconResolverLayerLive = layer$13.pipe(provide(layer$21), provide(layer$14));
90786
- const AuthLayerLive = layer$32.pipe(provideMerge(PersistenceLayerLive), provide(layer$35));
90908
+ const WorkspaceEntriesLayerLive = layer$10.pipe(provide(layer$22));
90909
+ const WorkspaceLayerLive = mergeAll(layer$22, WorkspaceEntriesLayerLive, layer$9.pipe(provide(layer$22), provide(WorkspaceEntriesLayerLive)));
90910
+ const TerminalLayerLive = layer$7.pipe(provide(layer));
90911
+ const ProjectFaviconResolverLayerLive = layer$14.pipe(provide(layer$22), provide(layer$15));
90912
+ const AuthLayerLive = layer$33.pipe(provideMerge(PersistenceLayerLive), provide(layer$36));
90787
90913
  const ProviderRuntimeLayerLive = ProviderSessionReaperLive.pipe(provideMerge(ProviderLayerLive), provideMerge(OrchestrationLayerLive));
90788
- const RuntimeDependenciesLive = ReactorLayerLive.pipe(provideMerge(ServerSettingsLayerLive), provideMerge(ProviderRuntimeLayerLive), provideMerge(PersistenceLayerLive), provideMerge(layer$28), provideMerge(layer$2), provideMerge(ProviderRegistryLive), provideMerge(ProviderInstanceRegistryHydrationLive), provideMerge(layer$3), provideMerge(WorkspaceLayerLive), provideMerge(layer$7), provideMerge(TerminalLayerLive), provideMerge(ProjectFaviconResolverLayerLive), provideMerge(layer$29), provideMerge(layer$23), provideMerge(AuthLayerLive), provideMerge(layer$35)).pipe(provideMerge(BackgroundLayerLive), provideMerge(layer$24), provideMerge(layer$27), provideMerge(layer$26), provide(layer$42));
90914
+ const RuntimeDependenciesLive = ReactorLayerLive.pipe(provideMerge(ServerSettingsLayerLive), provideMerge(ProviderRuntimeLayerLive), provideMerge(PersistenceLayerLive), provideMerge(layer$29), provideMerge(layer$2), provideMerge(ProviderRegistryLive), provideMerge(ProviderInstanceRegistryHydrationLive), provideMerge(layer$3), provideMerge(WorkspaceLayerLive), provideMerge(layer$8), provideMerge(TerminalLayerLive), provideMerge(ProjectFaviconResolverLayerLive), provideMerge(layer$30), provideMerge(layer$24), provideMerge(AuthLayerLive), provideMerge(layer$36)).pipe(provideMerge(BackgroundLayerLive), provideMerge(layer$25), provideMerge(layer$28), provideMerge(layer$27), provide(layer$43));
90789
90915
  const commandReadinessLayer = middleware((httpEffect) => flatMap$1(ServerRuntimeStartup, (startup) => startup.awaitCommandReady.pipe(orDie, andThen(httpEffect))), { global: true });
90790
- const makeRoutesLayer = mergeAll(layer$20(EnvironmentHttpApi).pipe(provide(authHttpApiLayer), provide(connectHttpApiLayer), provide(orchestrationHttpApiLayer), provide(serverEnvironmentHttpApiLayer), provide(environmentAuthenticatedAuthLayer)), otlpTracesProxyRouteLayer, assetRouteLayer, staticAndDevRouteLayer, websocketRpcRouteLayer).pipe(provide(commandReadinessLayer), provide(browserApiCorsLayer), provide(httpCompressionLayer));
90916
+ const makeRoutesLayer = mergeAll(layer$21(EnvironmentHttpApi).pipe(provide(authHttpApiLayer), provide(connectHttpApiLayer), provide(orchestrationHttpApiLayer), provide(serverEnvironmentHttpApiLayer), provide(environmentAuthenticatedAuthLayer)), otlpTracesProxyRouteLayer, assetRouteLayer, staticAndDevRouteLayer, websocketRpcRouteLayer).pipe(provide(commandReadinessLayer), provide(browserApiCorsLayer), provide(httpCompressionLayer));
90791
90917
  const runServer = launch(unwrap(gen(function* () {
90792
90918
  const config = yield* ServerConfig;
90793
- const activation = yield* make$73();
90919
+ const activation = yield* make$74();
90794
90920
  const awaitActivation = _await(activation);
90795
90921
  const activationLayer = succeed$3(ServerActivation, awaitActivation);
90796
- const runtimeStateParked = yield* make$73();
90797
- const tailscaleParked = yield* make$73();
90798
- const routesReady = yield* make$73();
90922
+ const runtimeStateParked = yield* make$74();
90923
+ const tailscaleParked = yield* make$74();
90924
+ const routesReady = yield* make$74();
90799
90925
  yield* fixPath();
90800
90926
  const httpListeningLayer = effectDiscard(gen(function* () {
90801
90927
  yield* HttpServer;
@@ -90849,7 +90975,7 @@ const runServer = launch(unwrap(gen(function* () {
90849
90975
  ...config.tailscaleServeEnabled ? [_await(tailscaleParked)] : []
90850
90976
  ], { concurrency: "unbounded" }).pipe(asVoid)
90851
90977
  }).pipe(provideMerge(RuntimeDependenciesLive));
90852
- return mergeAll(serve(makeRoutesLayer, { disableLogger: !config.logWebSocketEvents }).pipe(tap$1(() => succeed$4(routesReady, void 0).pipe(orDie))), httpListeningLayer, runtimeStateLayer, tailscaleServeLayer, config.hubTunnel ? layer$5(config.hubTunnel).pipe(provideMerge(runtimeServicesLive)) : empty$8).pipe(provideMerge(runtimeServicesLive), provide(activationLayer), provideMerge(HttpServerLive), provide(ApplicationObservabilityLive), provideMerge(layer$43), provideMerge(PlatformServicesLive));
90978
+ return mergeAll(serve(makeRoutesLayer, { disableLogger: !config.logWebSocketEvents }).pipe(tap$1(() => succeed$4(routesReady, void 0).pipe(orDie))), httpListeningLayer, runtimeStateLayer, tailscaleServeLayer, config.hubTunnel ? mergeAll(layer$6(config.hubTunnel), layer$5(config.hubTunnel)).pipe(provideMerge(runtimeServicesLive)) : empty$8).pipe(provideMerge(runtimeServicesLive), provide(activationLayer), provideMerge(HttpServerLive), provide(ApplicationObservabilityLive), provideMerge(layer$44), provideMerge(PlatformServicesLive));
90853
90979
  })));
90854
90980
  //#endregion
90855
90981
  //#region src/cli/server.ts
@@ -90861,15 +90987,15 @@ const runServerCommand = (flags, options) => gen(function* () {
90861
90987
  });
90862
90988
  return yield* runServer.pipe(provideService(ServerConfig, config), ensuring(sync(releaseDaemonLock)));
90863
90989
  });
90864
- const startCommand = make$62("start", { ...sharedServerCommandFlags }).pipe(withDescription("Run the T3 Code server."), withHandler((flags) => runServerCommand(flags)));
90865
- const serveCommand = make$62("serve", { ...sharedServerCommandFlags }).pipe(withDescription("Run the T3 Code server without opening a browser."), withHandler((flags) => runServerCommand(flags, {
90990
+ const startCommand = make$63("start", { ...sharedServerCommandFlags }).pipe(withDescription("Run the T3 Code server."), withHandler((flags) => runServerCommand(flags)));
90991
+ const serveCommand = make$63("serve", { ...sharedServerCommandFlags }).pipe(withDescription("Run the T3 Code server without opening a browser."), withHandler((flags) => runServerCommand(flags, {
90866
90992
  startupPresentation: "headless",
90867
90993
  forceAutoBootstrapProjectFromCwd: false
90868
90994
  })));
90869
90995
  //#endregion
90870
90996
  //#region src/bin.ts
90871
- const CliRuntimeLayer = mergeAll(layer$44, layer$42);
90872
- const makeCli = () => make$62("t3", { ...sharedServerCommandFlags }).pipe(withDescription("Run the T3 Code server."), withHandler((flags) => runServerCommand(flags)), withSubcommands([
90997
+ const CliRuntimeLayer = mergeAll(layer$45, layer$43);
90998
+ const makeCli = () => make$63("t3", { ...sharedServerCommandFlags }).pipe(withDescription("Run the T3 Code server."), withHandler((flags) => runServerCommand(flags)), withSubcommands([
90873
90999
  startCommand,
90874
91000
  serveCommand,
90875
91001
  pairCommand,