@cmmd-center/forge 0.10.13 → 0.10.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{BunHttpServer-CjwNydcy.cjs → BunHttpServer-BhE7Szci.cjs} +6 -6
  2. package/dist/{BunHttpServer-GM72b26K.mjs → BunHttpServer-VI75aqJw.mjs} +6 -6
  3. package/dist/{BunPTY-B4Ra6mph.cjs → BunPTY-86ttlTi6.cjs} +3 -3
  4. package/dist/{BunPTY-C_ONQ8rt.mjs → BunPTY-oVISucl_.mjs} +3 -3
  5. package/dist/{BunServices-CUeOgVUt.cjs → BunServices-BwE9KexF.cjs} +3 -3
  6. package/dist/{BunServices-B-6JkR0Q.mjs → BunServices-D0JTDujL.mjs} +3 -3
  7. package/dist/{Cache-D56wNKiH.cjs → Cache-CWlxNDbC.cjs} +6 -6
  8. package/dist/{Cache-da-A9JAa.mjs → Cache-p0X77SKw.mjs} +3 -3
  9. package/dist/{Config-D0zF6ChD.mjs → Config-AqUR_lhX.mjs} +2 -2
  10. package/dist/{Config-e5bi-5Ut.cjs → Config-CkEzdD9L.cjs} +2 -2
  11. package/dist/{HttpServer-B-QOc7bR.cjs → HttpServer-DGoLR-kU.cjs} +4 -4
  12. package/dist/{HttpServer-HhjqDZlB.mjs → HttpServer-DNGCTTdk.mjs} +3 -3
  13. package/dist/{NodeHttpServer-Cy1XvkSE.cjs → NodeHttpServer-BPjxt_DT.cjs} +7 -7
  14. package/dist/{NodeHttpServer-DmEyd0J4.mjs → NodeHttpServer-Dw7ivXfX.mjs} +7 -7
  15. package/dist/{NodePTY-DU_KoZdd.mjs → NodePTY-CVH2yNYl.mjs} +4 -4
  16. package/dist/{NodePTY-wATyTf3M.cjs → NodePTY-Cps0jsDA.cjs} +4 -4
  17. package/dist/{NodeServices-DeNLW36O.mjs → NodeServices-CBNXOYLG.mjs} +3 -3
  18. package/dist/{NodeServices-pfwgkiUu.cjs → NodeServices-Cw6SxEbl.cjs} +3 -3
  19. package/dist/{NodeServices-BqfcuvmN.cjs → NodeServices-Ddr-tYRu.cjs} +1 -1
  20. package/dist/{NodeSqliteClient-PZ6NN2gq.cjs → NodeSqliteClient-CmxPzcBf.cjs} +7 -7
  21. package/dist/{NodeSqliteClient-BqUcml1B.mjs → NodeSqliteClient-DGInbxQ3.mjs} +6 -6
  22. package/dist/{NodeTerminal-DfKMT-mE.cjs → NodeTerminal-5iWbO0B2.cjs} +6 -6
  23. package/dist/{NodeTerminal-DBDxXuu0.mjs → NodeTerminal-BEGtoMSS.mjs} +3 -3
  24. package/dist/{PTY-DB-DmqyE.cjs → PTY-BxYDiW3h.cjs} +2 -2
  25. package/dist/{PTY-DdjcAGrF.mjs → PTY-rIPf52QR.mjs} +2 -2
  26. package/dist/{Path-CHDjKLrB.cjs → Path-Be7zSwar.cjs} +281 -54
  27. package/dist/{Path-B0vKGzx2.mjs → Path-C6Zb2WHp.mjs} +271 -58
  28. package/dist/{Schema-BK7-mN_J.mjs → Schema-CJyk7ah1.mjs} +65 -3
  29. package/dist/{Schema-Cf_uEUQU.cjs → Schema-dLi7Qssy.cjs} +76 -2
  30. package/dist/{SqlError-Du_dEWbw.cjs → SqlError-Bt0Bcd5C.cjs} +4 -4
  31. package/dist/{SqlError-LFObCDir.mjs → SqlError-cyJT2IRY.mjs} +3 -3
  32. package/dist/{SqliteClient-D4Srj6O8.cjs → SqliteClient-B08FzZM4.cjs} +6 -6
  33. package/dist/{SqliteClient-DdItRZUr.mjs → SqliteClient-CIsITMoQ.mjs} +5 -5
  34. package/dist/bin.cjs +74 -47
  35. package/dist/bin.mjs +211 -184
  36. package/dist/client/assets/{DiffPanel-DGiCJd76.js → DiffPanel-Bnkifxef.js} +3 -3
  37. package/dist/client/assets/{DiffPanel.logic-Dd5YF6k3.js → DiffPanel.logic-Bk4d9mRT.js} +2 -2
  38. package/dist/client/assets/{DiffPanelShell-C-nlQxal.js → DiffPanelShell-D_nSDbjF.js} +104 -104
  39. package/dist/client/assets/{DiffWorkerPoolProvider-CfmtkBLg.js → DiffWorkerPoolProvider-BO-u17g1.js} +9 -9
  40. package/dist/client/assets/{PullRequestCodePanel-xkECqRzW.js → PullRequestCodePanel-Bbuxcu5g.js} +3 -3
  41. package/dist/client/assets/{Virtualizer-CVyQexgp.js → Virtualizer-BxZHsCOD.js} +2 -2
  42. package/dist/client/assets/{index-CUmbThfW.css → index-BMcOaHS_.css} +1 -1
  43. package/dist/client/assets/{index-BD9iZwyM.js → index-BeMh8T3m.js} +58 -58
  44. package/dist/client/index.html +5 -5
  45. package/dist/forge-build.json +1 -1
  46. package/dist/{open-D8mGyWmt.mjs → open-FIgTDosf.mjs} +3 -3
  47. package/package.json +1 -1
package/dist/bin.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk-C5ckVeoz.mjs";
4
- import { $ as encodeEffect, $c as getOrNull, $i as catchDone, $l as constant, $n as filterMapOrFail, $o as fiberInterrupt, $s as seconds, $t as stringifyJson, Aa as addFinalizer$1, An as cached$3, Ao as pretty, Ar as matchCauseEffect, As as void_$2, At as withConstructorDefault, Ba as MinimumLogLevel, Bi as gauge, Bl as isNotNullish, Bn as catch_, Bo as as$2, Br as orElseSucceed, Bt as head, C as Record, Ca as provide$1, Ci as txRetry, Cn as andThen, Co as hasInterruptsOnly, Cr as logWarning$1, Ct as optionalKey, D as TaggedStruct, Da as sync$2, Dl as format, Dn as as$3, Dr as mapError, Ds as tracerLogger$1, Dt as toCodecStringTree, E as TaggedErrorClass, Ea as succeedContext, Ei as uninterruptibleMask$1, El as toJson, En as annotateSpans, Es as sync, Et as toCodecJson, F as UndefinedOr, Fa as make$37, Fc as Reference$1, Fi as withSpan, Fn as catchFilter, Fo as CurrentLoggers$1, Fr as onExit, Fs as ParentSpan, G as decodeExit, Gc as merge$2, Gi as addDelay, Gn as die$1, Gr as race, Gs as fromInputUnsafe, Gt as Transformation, H as declare, Ha as TracerTimingEnabled, Hc as getUnsafe$1, Hi as timer, Hl as isNullish, Hn as contextWith, Hr as provide, Hs as days, Ht as size$2, I as Union, Ia as makeUnsafe$4, Ic as Service$1, Ii as withTracerEnabled, In as catchIf, Is as Tracer, It as assign, J as decodeUnknownEffect, Jc as flatMap$2, Ji as forever$2, Jl as compose, Jn as exit, Jr as result, Jt as transformOrFail, K as decodeSync, Ka as fail$3, Ki as both, Kr as raceFirst, L as Unknown, La as provide$2, Lc as add$2, Li as yieldNow, Ll as compose$1, Ln as catchReason, Lr as onInterrupt, Ls as externalSpan, Lt as append$1, M as URLFromString, Ma as close, Mc as isSuccess$1, Mi as withFiber$1, Mn as callback, Mo as squash, Mr as matchEffect, Na as closeUnsafe, Nn as catchCause, Nr as never$1, Ns as MinimumTraceLevel, O as TemplateLiteral, Oa as unwrap, Oc as fail$1, Oi as useSpan, On as asSome, Os as uninterruptibleMask, Ot as toJsonSchemaDocument, P as Undefined, Pa as forkUnsafe, Pc as succeed$1, Pi as withParentSpan, Pn as catchDefect, Po as ConsoleRef, Pr as onError$1, Ps as NativeSpan, Q as encode$4, Qa as make$39, Qc as getOrElse, Qi as spaced, Ql as constVoid, Qn as filter$1, Qr as runPromise, Qs as minutes, R as UnknownFromJsonString$1, Ra as CurrentLogAnnotations, Rc as empty$1, Ri as zipWith, Rl as hasProperty, Rn as catchTag, Ro as addFinalizer, Rr as option, Rs as make$42, Rt as drop$1, S as Option, Sa as mergeAll, Si as tx$1, Sl as withFiber, Sn as all, So as hasInterrupts, Sr as logInfo, St as optional$4, T as Struct, Ta as succeed$2, Ti as uninterruptible, Tl as NodeInspectSymbol, Tn as annotateLogs, To as interruptors, Tr as map$3, Ts as suspend, Tt as tag, Ua as _await, Uc as make$35, Ui as update$3, Ul as isObject$1, Un as currentSpan, Ur as provideContext, Us as format$1, Ut as toArray, V as brand, Vi as snapshotUnsafe, Vl as isNotUndefined, Vn as context, Vr as promise, Vt as isEmpty$2, W as decodeEffect, Wa as done, Wc as makeUnsafe$3, Wi as withAttributes, Wl as isTagged, Wo as consolePretty$1, Wr as provideService, Ws as fromInput, X as decodeUnknownOption, Xa as isDeferred, Xc as fromNullishOr, Xi as passthrough$1, Xl as constTrue, Xn as failCause$1, Xr as runFork, Xs as millis, Xt as onSome, Y as decodeUnknownExit, Yc as flatten$1, Yn as fail, Yr as retry, Ys as max, Z as decodeUnknownSync, Zc as fromUndefinedOr, Zi as recurs, Zl as constUndefined, Zr as runForkWith, Zs as min, Zt as parseJson$1, _ as NonEmptyArray, _a as effectDiscard, _i as timeout$1, _n as toUtc, _o as fail$4, _r as isEffect, _t as isSchemaError, a as DateTimeUtc, aa as clamp, ac as empty$3, ai as service, al as none$4, an as value, ao as isFailure, ar as fnUntraced, at as isBetween, b as NullOr, ba as launch$1, bi as tryPromise, bn as acquireUseRelease, br as logError, bs as scopeAddFinalizerExit, bt as makeFilter, c as Defect, ca as currentTimeMillis, cc as flatMapNullishOr, ci as succeed, cl as make$41, cn as add$3, cr as forkChild, cs as forever, ct as isGreaterThanOrEqualTo, d as Exit, da as TaggedError, dc as isArrayNonEmpty, di as suspend$1, dn as isGreaterThanOrEqualTo$1, do as NoSuchElementError, dr as forkScoped, dt as isMaxLength, ec as times, ei as runPromiseWith, el as getOrUndefined, eo as succeed$3, er as filterOrFail, et as encodeSync, eu as dual, fa as CurrentMemoMap, fc as isReadonlyArrayNonEmpty, fi as sync$1, fn as make$38, fo as StackTrace, fr as gen, fs as loggerMake, ft as isMaxProperties, g as Never, ga as effectContext, gc as map$4, gi as tapErrorTag, gn as toEpochMillis, go as done$1, gr as interruptible, gt as isSchema, h as Literals, ha as effect, hi as tapError, hn as toDate, hr as interrupt$1, ht as isPattern, i as Class, ia as Random$1, ic as allocate, il as match, in as make$40, io as interrupt$3, ir as fn$1, it as is$1, iu as pipeArguments, ja as addFinalizerExit, jc as isFailure$1, ji as whileLoop, jl as equals, jn as cachedWithTTL, jo as prettyErrors, jt as withDecodingDefault, k as Trim, ka as Scope$1, ki as void_$1, kn as asVoid, ko as map$6, kr as match$1, kt as toType, l as Duration, la as Class$1, lc as fromIterable, li as succeedNone, ln as distance, lo as void_$3, lr as forkDetach$1, ls as forkDetach, lt as isInt, m as Literal, ma as buildWithMemoMap, mi as tapCause, ml as YieldableProto, mn as now, mr as ignoreCause, mt as isNonEmpty, n as ArraySchema, na as isDoneCause, nc as toSeconds, ni as scope$1, nl as isSome, no as fail$2, nt as encodeUnknownExit, nu as identity, o as DateTimeUtcFromString, oa as parse$6, oc as ensure, oi as serviceOption, ol as some, oo as isSuccess, or as forEach, os as flatMap$1, ot as isFinite$1, p as Int$1, pa as build, pi as tap, pl as PipeInspectableProto, pn as makeUnsafe$5, pr as ignore, pt as isMinLength, q as decodeTo, qa as failCause$3, qc as firstSomeOf, qi as exponential, ql as cast, qn as ensuring, qr as repeat, r as Boolean$1, rc as zero, ri as scoped, rl as map$5, rn as makeFormatterDefault, ro as failCause$2, rr as flatten$2, rt as fromJsonString, ru as pipe$1, sa as Clock, sc as filter, si as sleep$4, sl as Number$2, sn as encodeBase64Url$2, so as match$2, sr as forever$1, ss as fnUntraced$1, st as isGreaterThan, t as Any, tc as toMillis, tl as isNone, tn as InvalidValue$1, to as die$2, tr as flatMap, tt as encodeUnknownEffect, u as ErrorClass, ui as succeedSome, un as formatIso, ur as forkIn, ut as isLessThanOrEqualTo, v as NonEmptyString, va as empty$4, vc as reverse, vi as timeoutOption, vn as Transaction$1, vr as log$4, vs as reportCauseUnsafe, w as String$1, wa as provideMerge, wi as undefined_, wn as annotateCurrentSpan, wo as interrupt$2, wr as makeSpanScoped, wt as suspend$2, x as Number$1, xa as merge$3, xi as try_, xl as isEffect$1, xn as addFinalizer$2, xo as hasDies, xr as logFatal, xs as sleep$3, xt as mutable, y as Null, yc as sort, yi as timeoutOrElse, yn as acquireRelease, yr as logDebug, ys as scope, yt as make$36, z as Void, za as CurrentLogSpans, zc as get$3, zi as counter, zl as isNotNull, zn as catchTags, zo as andThen$1, zr as orDie, zt as empty$2 } from "./Schema-BK7-mN_J.mjs";
5
- import { $ as toAsyncIterable, A as make$45, At as offerAll, Bt as subscribe$1, C as fromEffect, Ct as bounded, E as fromQueue, Et as failCause$4, F as merge$4, Ft as take$1, G as runFold, Gt as await_, H as run$2, It as takeAll, K as runForEach, Kt as getCurrent, Lt as unbounded$2, M as mapAccum, N as mapEffect$1, Nt as shutdown$1, O as fromSubscription, Ot as make$44, Pt as sliding, Q as tick, R as onExit$1, Rt as publish, S as fromChannel, St as makeUnsafe$6, T as fromPubSub, U as runCollect, V as provideContext$1, Vt as unbounded$1, W as runDrain, Wt as makeUnsafe$7, Y as succeed$4, Yt as runIn, Z as takeWhile, _t as fromSubscriptionArray, at as make$46, b as flatMap$3, c as callback$1, d as debounce$1, dt as drain, f as decodeText$1, ft as forEach$1, g as ensuring$1, h as encodeText, ht as mapInput, it as get$4, j as map$7, jt as offerUnsafe, k as isStream, kt as offer$1, l as catchCause$1, m as empty$5, q as runForEachArray, qt as interrupt$4, r as FileSystem, rt as unwrap$1, t as Path$2, u as concat$2, v as failCause$5, vt as fromTransform, w as fromIterable$1, wt as end, x as fromAsyncIterable, xt as make$43, y as filter$2, zt as shutdown$2 } from "./Path-B0vKGzx2.mjs";
6
- import { _ as ChildProcessSpawner, a as Stdio, g as make$47, o as make$48, r as isQuitError } from "./NodeTerminal-DBDxXuu0.mjs";
7
- import { n as layer$7 } from "./NodeServices-DeNLW36O.mjs";
8
- import { $ as file, A as SocketErrorReason, At as merge$5, Bt as set$2, Ct as HttpClientErrorSchema, Dt as empty$7, Ft as getAndSet, G as TracerPropagationEnabled, Ht as updateAndGet, I as HttpServerError, It as getUnsafe$2, J as transformResponse, K as filterStatusOk$1, Lt as make$49, Ot as fromInput$1, Pt as get$5, Q as empty$6, Rt as makeUnsafe$8, St as setBody, Tt as jsonUnsafe$1, U as layer$8, Vt as update$4, W as HttpClient, Z as symbol$1, _ as schemaBodyUrlParams, _t as acceptJson, a as withLogAddress, at as setCookie, bt as get$6, ct as stream, d as logger$1, dt as filterStatusOk, et as isHttpServerResponse, f as withLoggerDisabled, ft as matchStatus, g as schemaBodyJson, gt as schemaBodyJson$1, i as serve$1, it as schemaJson, kt as fromRecordUnsafe, lt as text$2, m as ParsedSearchParams, nt as raw, ot as setCookies, p as HttpServerRequest, q as retryTransient, rt as redirect, st as setHeader, t as HttpServer, tt as jsonUnsafe, u as cors, ut as uint8Array, v as schemaHeaders, vt as bearerToken, wt as isHttpClientError, xt as post, y as toURL, yt as bodyJson, z as RouteNotFound, zt as modify$3 } from "./HttpServer-HhjqDZlB.mjs";
9
- import { _ as withDefault$3, a as all$1, c as logLevel, d as option$1, f as port, g as url$2, i as TrueValues, l as map$8, m as string$7, n as FalseValues, o as boolean$5, p as schema$2, r as Record$1, s as int$2, t as Boolean$2, u as number$2 } from "./Config-D0zF6ChD.mjs";
10
- import { a as make$50, i as keys, n as getOption, o as makeWith$1, r as invalidate, s as set$3, t as get$7 } from "./Cache-da-A9JAa.mjs";
11
- import { S as layer$9, _ as defaultEscape, a as DeadlockError, b as makeCompiler$1, c as SqlError, d as UnknownError, g as custom, h as make$51, i as ConstraintError, l as SqlSyntaxError, m as SqlClient, n as AuthorizationError, o as LockTimeoutError, r as ConnectionError, s as SerializationError, t as AuthenticationError, u as StatementTimeoutError, v as defaultTransforms, y as fragment } from "./SqlError-LFObCDir.mjs";
4
+ import { $ as encodeEffect, $a as make$39, $c as fromUndefinedOr, $i as spaced, $l as constUndefined, $n as filterMapOrFail, $r as runPromise, $s as min, $t as stringifyJson, Aa as Scope$1, Ac as fail$1, Ai as void_$1, An as cached$3, Ar as match$1, As as uninterruptibleMask, At as withConstructorDefault, Ba as CurrentLogSpans, Bc as empty$1, Bi as counter, Bl as hasProperty, Bn as catch_, Bo as addFinalizer, Br as orDie, Bs as make$42, Bt as head, C as Record, Ca as mergeAll, Ci as tx$1, Cl as isEffect$1, Cn as andThen, Co as hasDies, Cr as logInfo, Cs as sleep$3, Ct as optionalKey, D as TaggedStruct, Da as succeedContext, Di as uninterruptibleMask$1, Dl as NodeInspectSymbol, Dn as as$3, Do as interruptors, Ds as suspend, Dt as toCodecStringTree, E as TaggedErrorClass, Ea as succeed$2, Ei as uninterruptible, En as annotateSpans, Eo as interrupt$2, Er as map$3, Et as toCodecJson, F as UndefinedOr, Fa as forkUnsafe, Fi as withParentSpan, Fn as catchFilter, Fr as onError$1, Fs as MinimumTraceLevel, G as decodeExit, Ga as done, Gc as make$35, Gi as withAttributes, Gl as isObject$1, Gn as die$1, Gr as provideService, Gs as format$1, Gt as Transformation, H as declare, Hi as snapshotUnsafe, Hl as isNotNullish, Hn as contextWith, Ho as as$2, Hr as promise, Ht as size$2, I as Union, Ia as make$37, Ic as succeed$1, Ii as withSpan, In as catchIf, Io as ConsoleRef, Ir as onExit, Is as NativeSpan, It as assign, J as decodeUnknownEffect, Ja as failCause$3, Ji as exponential, Jn as exit, Jr as repeat, Jt as transformOrFail, K as decodeSync, Kc as makeUnsafe$3, Ki as addDelay, Kl as isTagged, Ko as consolePretty$1, Kr as race, Ks as fromInput, L as Unknown, La as makeUnsafe$4, Lc as Reference$1, Li as withTracerEnabled, Ln as catchReason, Lo as CurrentLoggers$1, Ls as ParentSpan, Lt as append$1, M as URLFromString, Ma as addFinalizerExit, Mi as whileLoop, Mn as callback, Mo as pretty, Ms as void_$2, Na as close, Nc as isFailure$1, Ni as withFiber$1, Nl as equals, Nn as catchCause, No as prettyErrors, Nr as matchEffect, O as TemplateLiteral, Oa as sync$2, Ol as toJson, On as asSome, Or as mapError, Os as sync, Ot as toJsonSchemaDocument, P as Undefined, Pa as closeUnsafe, Pc as isSuccess$1, Pn as catchDefect, Po as squash, Pr as never$1, Q as encode$4, Qc as fromNullishOr, Qi as recurs, Ql as constTrue, Qn as filter$1, Qr as runForkWith, Qs as millis, R as UnknownFromJsonString$1, Ra as provide$2, Rc as Service$1, Ri as yieldNow, Rn as catchTag, Rr as onInterrupt, Rs as Tracer, Rt as drop$1, S as Option, Sa as merge$3, Si as try_, Sn as all, Sr as logFatal, Ss as scopeAddFinalizerExit, St as optional$4, T as Struct, Ta as provideMerge, Ti as undefined_, Tn as annotateLogs, To as hasInterruptsOnly, Tr as makeSpanScoped, Tt as tag, Ua as TracerTimingEnabled, Ui as timer, Ul as isNotUndefined, Un as currentSpan, Ur as provide, Ut as toArray, V as brand, Va as MinimumLogLevel, Vc as get$3, Vi as gauge, Vl as isNotNull, Vn as context, Vo as andThen$1, Vr as orElseSucceed, Vt as isEmpty$2, W as decodeEffect, Wa as _await, Wc as getUnsafe$1, Wi as update$3, Wl as isNullish, Wr as provideContext, Ws as days, X as decodeUnknownOption, Xc as flatMap$2, Xl as compose, Xn as failCause$1, Xr as retry, Xt as onSome, Y as decodeUnknownExit, Yc as firstSomeOf, Yi as forever$2, Yl as cast, Yn as fail, Yr as result, Z as decodeUnknownSync, Za as isDeferred, Zc as flatten$1, Zi as passthrough$1, Zr as runFork, Zs as max, Zt as parseJson$1, _ as NonEmptyArray, _a as effectContext, _i as tapErrorTag, _n as toUtc, _t as isSchemaError, a as DateTimeUtc, aa as Random$1, ac as zero, al as map$5, an as value, ao as interrupt$3, ar as fnUntraced, at as isBetween, au as pipe$1, b as NullOr, bc as reverse, bi as timeoutOrElse, bn as acquireUseRelease, br as logDebug, bs as reportCauseUnsafe, bt as makeFilter, c as Defect, ca as Clock, cc as ensure, ci as sleep$4, cl as some, cn as add$3, co as match$2, cr as forkChild, cs as flatMap$1, ct as isGreaterThanOrEqualTo, d as Exit, dc as fromIterable, di as succeedSome, dn as isGreaterThanOrEqualTo$1, dr as forkScoped, ds as forkDetach, dt as isMaxLength, ea as catchDone, ec as minutes, el as getOrElse, er as filterOrFail, et as encodeSync, eu as constVoid, fa as TaggedError, fi as suspend$1, fn as make$38, fr as gen, ft as isMaxProperties, g as Never, ga as effect, gi as tapError, gl as YieldableProto, gn as toEpochMillis, gr as interruptible, gt as isSchema, h as Literals, ha as buildWithMemoMap, hi as tapCause, hl as PipeInspectableProto, hn as toDate, hr as interrupt$1, ht as isPattern, i as Class, ic as toSeconds, ii as scoped, il as isSome, in as make$40, io as failCause$2, ir as fn$1, it as is$1, iu as identity, ja as addFinalizer$1, jn as cachedWithTTL, jo as map$6, jr as matchCauseEffect, jt as withDecodingDefault, k as Trim, ka as unwrap, ki as useSpan, kl as format, kn as asVoid, ks as tracerLogger$1, kt as toType, l as Duration, la as currentTimeMillis, lc as filter, li as succeed, ll as Number$2, ln as distance, lr as forkDetach$1, ls as fnUntraced$1, lt as isInt, m as Literal, ma as build, mc as isReadonlyArrayNonEmpty, mi as tap, mn as now, mo as StackTrace, mr as ignoreCause, ms as loggerMake, mt as isNonEmpty, n as ArraySchema, nc as times, nl as getOrUndefined, no as die$2, nt as encodeUnknownExit, nu as dual, o as DateTimeUtcFromString, oa as clamp, oc as allocate, oi as service, ol as match, oo as isFailure, or as forEach, ot as isFinite$1, ou as pipeArguments, p as Int$1, pa as CurrentMemoMap, pc as isArrayNonEmpty, pi as sync$1, pn as makeUnsafe$5, po as NoSuchElementError, pr as ignore, pt as isMinLength, q as decodeTo, qa as fail$3, qc as merge$2, qi as both, qn as ensuring, qr as raceFirst, qs as fromInputUnsafe, r as Boolean$1, ra as isDoneCause, rc as toMillis, ri as scope$1, rl as isNone, rn as makeFormatterDefault, ro as fail$2, rr as flatten$2, rt as fromJsonString, sa as parse$6, sc as empty$3, si as serviceOption, sl as none$4, sn as encodeBase64Url$2, so as isSuccess, sr as forever$1, st as isGreaterThan, t as Any, tc as seconds, ti as runPromiseWith, tl as getOrNull, tn as InvalidValue$1, to as succeed$3, tr as flatMap, ts as fiberInterrupt, tt as encodeUnknownEffect, tu as constant, u as ErrorClass, ua as Class$1, uc as flatMapNullishOr, ui as succeedNone, ul as make$41, un as formatIso, uo as void_$3, ur as forkIn, us as forever, ut as isLessThanOrEqualTo, v as NonEmptyString, va as effectDiscard, vc as map$4, vi as timeout$1, vn as Transaction$1, vo as done$1, vr as isEffect, w as String$1, wa as provide$1, wi as txRetry, wl as withFiber, wn as annotateCurrentSpan, wo as hasInterrupts, wr as logWarning$1, wt as suspend$2, x as Number$1, xa as launch$1, xc as sort, xi as tryPromise, xn as addFinalizer$2, xr as logError, xs as scope, xt as mutable, y as Null, ya as empty$4, yi as timeoutOption, yn as acquireRelease, yo as fail$4, yr as log$4, yt as make$36, z as Void, za as CurrentLogAnnotations, zc as add$2, zi as zipWith, zl as compose$1, zn as catchTags, zr as option, zs as externalSpan, zt as empty$2 } from "./Schema-CJyk7ah1.mjs";
5
+ import { $ as toAsyncIterable, A as make$45, At as make$44, Bt as publish, C as fromEffect, Ct as make$43, E as fromQueue, Et as end, F as merge$4, Ft as shutdown$1, G as runFold, H as run$2, Ht as subscribe$1, It as sliding, Jt as getCurrent, K as runForEach, Kt as makeUnsafe$7, Lt as take$1, M as mapAccum, Mt as offerAll, N as mapEffect$1, Nt as offerUnsafe, O as fromSubscription, Ot as failCause$4, Q as tick, R as onExit$1, Rt as takeAll, S as fromChannel, T as fromPubSub, Tt as bounded, U as runCollect, Ut as unbounded$1, V as provideContext$1, Vt as shutdown$2, W as runDrain, Y as succeed$4, Yt as interrupt$4, Z as takeWhile, Zt as runIn, _t as mapInput, at as make$46, b as flatMap$3, bt as fromTransform, c as callback$1, d as debounce$1, f as decodeText$1, g as ensuring$1, h as encodeText, it as get$4, j as map$7, jt as offer$1, k as isStream, l as catchCause$1, m as empty$5, mt as forEach$1, ot as get$5, pt as drain, q as runForEachArray, qt as await_, r as FileSystem, rt as unwrap$1, st as make$47, t as Path$2, u as concat$2, v as failCause$5, w as fromIterable$1, wt as makeUnsafe$6, x as fromAsyncIterable, y as filter$2, yt as fromSubscriptionArray, zt as unbounded$2 } from "./Path-C6Zb2WHp.mjs";
6
+ import { _ as ChildProcessSpawner, a as Stdio, g as make$48, o as make$49, r as isQuitError } from "./NodeTerminal-BEGtoMSS.mjs";
7
+ import { n as layer$7 } from "./NodeServices-CBNXOYLG.mjs";
8
+ import { $ as file, A as SocketErrorReason, At as merge$5, Bt as set$2, Ct as HttpClientErrorSchema, Dt as empty$7, Ft as getAndSet, G as TracerPropagationEnabled, Ht as updateAndGet, I as HttpServerError, It as getUnsafe$2, J as transformResponse, K as filterStatusOk$1, Lt as make$50, Ot as fromInput$1, Pt as get$6, Q as empty$6, Rt as makeUnsafe$8, St as setBody, Tt as jsonUnsafe$1, U as layer$8, Vt as update$4, W as HttpClient, Z as symbol$1, _ as schemaBodyUrlParams, _t as acceptJson, a as withLogAddress, at as setCookie, bt as get$7, ct as stream, d as logger$1, dt as filterStatusOk, et as isHttpServerResponse, f as withLoggerDisabled, ft as matchStatus, g as schemaBodyJson, gt as schemaBodyJson$1, i as serve$1, it as schemaJson, kt as fromRecordUnsafe, lt as text$2, m as ParsedSearchParams, nt as raw, ot as setCookies, p as HttpServerRequest, q as retryTransient, rt as redirect, st as setHeader, t as HttpServer, tt as jsonUnsafe, u as cors, ut as uint8Array, v as schemaHeaders, vt as bearerToken, wt as isHttpClientError, xt as post, y as toURL, yt as bodyJson, z as RouteNotFound, zt as modify$3 } from "./HttpServer-DNGCTTdk.mjs";
9
+ import { _ as withDefault$3, a as all$1, c as logLevel, d as option$1, f as port, g as url$2, i as TrueValues, l as map$8, m as string$7, n as FalseValues, o as boolean$5, p as schema$2, r as Record$1, s as int$2, t as Boolean$2, u as number$2 } from "./Config-AqUR_lhX.mjs";
10
+ import { a as make$51, i as keys, n as getOption, o as makeWith$1, r as invalidate, s as set$3, t as get$8 } from "./Cache-p0X77SKw.mjs";
11
+ import { S as layer$9, _ as defaultEscape, a as DeadlockError, b as makeCompiler$1, c as SqlError, d as UnknownError, g as custom, h as make$52, i as ConstraintError, l as SqlSyntaxError, m as SqlClient, n as AuthorizationError, o as LockTimeoutError, r as ConnectionError, s as SerializationError, t as AuthenticationError, u as StatementTimeoutError, v as defaultTransforms, y as fragment } from "./SqlError-cyJT2IRY.mjs";
12
12
  import { r as wrapper_default, t as Mime_default } from "./Mime-Dq9IoNiV.mjs";
13
13
  import { a as diag, c as SpanKind$1, d as TraceFlags, f as ROOT_CONTEXT, i as propagation, l as isSpanContextValid, m as DiagLogLevel, n as init_esm$1, o as context$1, p as createContextKey, r as trace, s as SpanStatusCode, t as esm_exports$1 } from "./esm-wLIF-u3N.mjs";
14
14
  import { a as verifyCmmdAuthRuntimeTicket, c as verifyCmmdRuntimeTicket, d as setRuntimeGrantToken, f as createReadOnceFileTokenAccessor, i as sendRuntimeControlHeartbeat, l as verifyCmmdRuntimeTicketRefreshProof, n as bootstrapRuntimeControlAuthorityFromNarrowGrant, o as verifyCmmdClaudeReadinessTicket, r as readRuntimeControlAuthority, s as verifyCmmdClaudeUsageTicket, t as bootstrapRuntimeControlAuthority, u as runtimeGrantToken } from "./runtimeControlAuthority-COHmz_WT.mjs";
15
- import { n as PtySpawnError, t as PtyAdapter } from "./PTY-DdjcAGrF.mjs";
15
+ import { n as PtySpawnError, t as PtyAdapter } from "./PTY-rIPf52QR.mjs";
16
16
  import { createRequire } from "node:module";
17
17
  import * as HE from "node:child_process";
18
18
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
@@ -22,7 +22,7 @@ import { createCipheriv, createDecipheriv, createHash, createHmac, createPublicK
22
22
  import * as FS$1 from "node:fs";
23
23
  import fs, { accessSync, chmodSync, constants, createReadStream, existsSync, mkdirSync, mkdtempSync, promises, readFile, readFileSync, readdir, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
24
24
  import * as NodeOS from "node:os";
25
- import $U, { homedir, networkInterfaces, tmpdir } from "node:os";
25
+ import os, { homedir, networkInterfaces, tmpdir } from "node:os";
26
26
  import * as Path$1 from "node:path";
27
27
  import path, { basename, delimiter, dirname, extname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
28
28
  import { pathToFileURL } from "node:url";
@@ -50107,7 +50107,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
50107
50107
  const min = forceColor || 0;
50108
50108
  if (env.TERM === "dumb") return min;
50109
50109
  if (process$1.platform === "win32") {
50110
- const osRelease = $U.release().split(".");
50110
+ const osRelease = os.release().split(".");
50111
50111
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
50112
50112
  return 1;
50113
50113
  }
@@ -52550,7 +52550,7 @@ var require_ProcessDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
52550
52550
  exports.processDetector = void 0;
52551
52551
  const api_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
52552
52552
  const semconv_1 = require_semconv$1();
52553
- const os$3 = __require("os");
52553
+ const os$4 = __require("os");
52554
52554
  /**
52555
52555
  * ProcessDetector will be used to detect the resources related current process running
52556
52556
  * and being instrumented from the NodeJS Process module.
@@ -52572,7 +52572,7 @@ var require_ProcessDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
52572
52572
  };
52573
52573
  if (process.argv.length > 1) attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
52574
52574
  try {
52575
- const userInfo = os$3.userInfo();
52575
+ const userInfo = os$4.userInfo();
52576
52576
  attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
52577
52577
  } catch (e) {
52578
52578
  api_1.diag.debug(`error obtaining process owner: ${e}`);
@@ -65495,7 +65495,7 @@ function normalizeNumberish(value) {
65495
65495
  }
65496
65496
  //#endregion
65497
65497
  //#region package.json
65498
- var version$1 = "0.10.13";
65498
+ var version$1 = "0.10.14";
65499
65499
  //#endregion
65500
65500
  //#region src/sentry.ts
65501
65501
  const SERVER_APP_NAME = "forge-server";
@@ -74232,7 +74232,7 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
74232
74232
  var fs$6 = __require("fs");
74233
74233
  var path$5 = __require("path");
74234
74234
  var url$1 = __require("url");
74235
- var os$2 = __require("os");
74235
+ var os$3 = __require("os");
74236
74236
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
74237
74237
  var vars = process.config && process.config.variables || {};
74238
74238
  var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
@@ -74240,8 +74240,8 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
74240
74240
  var abi = versions.modules;
74241
74241
  if (versions.deno || process.isBun) abi = "unsupported";
74242
74242
  var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
74243
- var arch = process.env.npm_config_arch || os$2.arch();
74244
- var platform = process.env.npm_config_platform || os$2.platform();
74243
+ var arch = process.env.npm_config_arch || os$3.arch();
74244
+ var platform = process.env.npm_config_platform || os$3.platform();
74245
74245
  var libc = process.env.LIBC || (isMusl(platform) ? "musl" : "glibc");
74246
74246
  var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || "";
74247
74247
  var uv = (versions.uv || "").split(".")[0];
@@ -77433,10 +77433,10 @@ function updateSuccessfulEntry(input) {
77433
77433
  return next;
77434
77434
  }
77435
77435
  const makeSourceControlRateLimit = gen(function* () {
77436
- const entries = yield* make$49(/* @__PURE__ */ new Map());
77436
+ const entries = yield* make$50(/* @__PURE__ */ new Map());
77437
77437
  const check = fn$1("SourceControlRateLimit.check")(function* (input, options) {
77438
77438
  const now = yield* currentTimeMillis;
77439
- const entry = (yield* get$5(entries)).get(normalizedKey(input));
77439
+ const entry = (yield* get$6(entries)).get(normalizedKey(input));
77440
77440
  if (entry !== void 0 && entry.retryAt > now && options?.allowPaused !== true) return yield* new SourceControlRateLimitPausedError$1({
77441
77441
  provider: input.provider,
77442
77442
  host: input.host.trim().toLowerCase(),
@@ -82423,7 +82423,7 @@ const makePullRequestService = gen(function* () {
82423
82423
  const staleList = staleWhileRevalidate(LIST_STALE_WINDOW, LIST_CACHE_CAPACITY);
82424
82424
  const list = (input) => {
82425
82425
  const key = listCacheKey(input, listingsEpoch);
82426
- return staleList(key, get$7(listCache, key));
82426
+ return staleList(key, get$8(listCache, key));
82427
82427
  };
82428
82428
  const detailCache = yield* makeWith$1((key) => {
82429
82429
  const [, projectId, repository, number] = JSON.parse(key);
@@ -82444,7 +82444,7 @@ const makePullRequestService = gen(function* () {
82444
82444
  input.repository,
82445
82445
  input.number
82446
82446
  ]);
82447
- return staleDetail(key, get$7(detailCache, key));
82447
+ return staleDetail(key, get$8(detailCache, key));
82448
82448
  };
82449
82449
  const activityCache = yield* makeWith$1((key) => {
82450
82450
  const [, projectId, repository, number] = JSON.parse(key);
@@ -82465,7 +82465,7 @@ const makePullRequestService = gen(function* () {
82465
82465
  input.repository,
82466
82466
  input.number
82467
82467
  ]);
82468
- return staleActivity(key, get$7(activityCache, key));
82468
+ return staleActivity(key, get$8(activityCache, key));
82469
82469
  };
82470
82470
  const diffCache = yield* makeWith$1((key) => {
82471
82471
  const [, projectId, repository, number, cursor, commit] = JSON.parse(key);
@@ -82493,7 +82493,7 @@ const makePullRequestService = gen(function* () {
82493
82493
  input.cursor ?? null,
82494
82494
  input.commit ?? null
82495
82495
  ]);
82496
- return staleDiff(key, get$7(diffCache, key));
82496
+ return staleDiff(key, get$8(diffCache, key));
82497
82497
  };
82498
82498
  const listStatsCache = yield* makeWith$1((key) => {
82499
82499
  const [, refs] = JSON.parse(key);
@@ -82514,7 +82514,7 @@ const makePullRequestService = gen(function* () {
82514
82514
  ref.repository,
82515
82515
  ref.number
82516
82516
  ]).toSorted((left, right) => `${left[0]} ${left[1]} ${left[2]}`.localeCompare(`${right[0]} ${right[1]} ${right[2]}`))]);
82517
- return staleListStats(key, get$7(listStatsCache, key));
82517
+ return staleListStats(key, get$8(listStatsCache, key));
82518
82518
  };
82519
82519
  const invalidate = (input) => sync$1(() => {
82520
82520
  if (input.reference === void 0) {
@@ -82632,12 +82632,12 @@ function resolveGithubWriteIdentity(getSettings) {
82632
82632
  }
82633
82633
  var ServerSettingsService = class ServerSettingsService extends Service$1()("forge/serverSettings/ServerSettingsService") {
82634
82634
  static layerTest = (overrides = {}) => effect(ServerSettingsService, gen(function* () {
82635
- const currentSettingsRef = yield* make$49(deepMerge$1(DEFAULT_SERVER_SETTINGS, overrides));
82635
+ const currentSettingsRef = yield* make$50(deepMerge$1(DEFAULT_SERVER_SETTINGS, overrides));
82636
82636
  return {
82637
82637
  start: void_$1,
82638
82638
  ready: void_$1,
82639
- getSettings: get$5(currentSettingsRef),
82640
- updateSettings: (patch) => get$5(currentSettingsRef).pipe(map$3((currentSettings) => deepMerge$1(currentSettings, patch)), tap((nextSettings) => set$2(currentSettingsRef, nextSettings))),
82639
+ getSettings: get$6(currentSettingsRef),
82640
+ updateSettings: (patch) => get$6(currentSettingsRef).pipe(map$3((currentSettings) => deepMerge$1(currentSettings, patch)), tap((nextSettings) => set$2(currentSettingsRef, nextSettings))),
82641
82641
  streamChanges: empty$5
82642
82642
  };
82643
82643
  }));
@@ -82693,7 +82693,7 @@ const ServerSettingsLive = effect(ServerSettingsService, gen(function* () {
82693
82693
  const writeSemaphore = yield* make$43(1);
82694
82694
  const cacheKey = "settings";
82695
82695
  const changesPubSub = yield* unbounded$1();
82696
- const startedRef = yield* make$49(false);
82696
+ const startedRef = yield* make$50(false);
82697
82697
  const startedDeferred = yield* make$39();
82698
82698
  const watcherScope = yield* make$37("sequential");
82699
82699
  yield* addFinalizer$2(() => close(watcherScope, void_$3));
@@ -82721,11 +82721,11 @@ const ServerSettingsLive = effect(ServerSettingsService, gen(function* () {
82721
82721
  }
82722
82722
  return decoded.value;
82723
82723
  });
82724
- const settingsCache = yield* make$50({
82724
+ const settingsCache = yield* make$51({
82725
82725
  capacity: 1,
82726
82726
  lookup: () => loadSettingsFromDisk
82727
82727
  });
82728
- const getSettingsFromCache = get$7(settingsCache, cacheKey);
82728
+ const getSettingsFromCache = get$8(settingsCache, cacheKey);
82729
82729
  const writeSettingsAtomically = (settings) => {
82730
82730
  const tempPath = `${settingsPath}.${process.pid}.${Date.now()}.tmp`;
82731
82731
  const sparseSettings = stripDefaultServerSettings(settings, DEFAULT_SERVER_SETTINGS) ?? {};
@@ -91522,7 +91522,7 @@ const KeybindingsLive = effect(Keybindings, gen(function* () {
91522
91522
  const upsertSemaphore = yield* make$43(1);
91523
91523
  const resolvedConfigCacheKey = "resolved";
91524
91524
  const changesPubSub = yield* unbounded$1();
91525
- const startedRef = yield* make$49(false);
91525
+ const startedRef = yield* make$50(false);
91526
91526
  const startedDeferred = yield* make$39();
91527
91527
  const watcherScope = yield* make$37("sequential");
91528
91528
  yield* addFinalizer$2(() => close(watcherScope, void_$3));
@@ -91622,11 +91622,11 @@ const KeybindingsLive = effect(Keybindings, gen(function* () {
91622
91622
  keybindings: mergeWithDefaultKeybindings(compileResolvedKeybindingsConfig(keybindings)),
91623
91623
  issues
91624
91624
  })));
91625
- const resolvedConfigCache = yield* make$50({
91625
+ const resolvedConfigCache = yield* make$51({
91626
91626
  capacity: 1,
91627
91627
  lookup: () => loadConfigStateFromDisk
91628
91628
  });
91629
- const loadConfigStateFromCacheOrDisk = get$7(resolvedConfigCache, resolvedConfigCacheKey);
91629
+ const loadConfigStateFromCacheOrDisk = get$8(resolvedConfigCache, resolvedConfigCacheKey);
91630
91630
  const revalidateAndEmit = upsertSemaphore.withPermits(1)(gen(function* () {
91631
91631
  yield* invalidate(resolvedConfigCache, resolvedConfigCacheKey);
91632
91632
  yield* emitChange(yield* loadConfigStateFromCacheOrDisk);
@@ -91706,7 +91706,7 @@ const KeybindingsLive = effect(Keybindings, gen(function* () {
91706
91706
  });
91707
91707
  return {
91708
91708
  start: gen(function* () {
91709
- if (yield* get$5(startedRef)) return yield* _await(startedDeferred);
91709
+ if (yield* get$6(startedRef)) return yield* _await(startedDeferred);
91710
91710
  yield* set$2(startedRef, true);
91711
91711
  const startupExit = yield* exit(gen(function* () {
91712
91712
  yield* startWatcher;
@@ -91971,7 +91971,7 @@ const launchDetached = (launch) => gen(function* () {
91971
91971
  });
91972
91972
  const OpenLive = effect(Open, gen(function* () {
91973
91973
  const open = yield* tryPromise({
91974
- try: () => import("./open-D8mGyWmt.mjs"),
91974
+ try: () => import("./open-FIgTDosf.mjs"),
91975
91975
  catch: (cause) => new OpenError$1({
91976
91976
  message: "failed to load browser opener",
91977
91977
  cause
@@ -92550,7 +92550,7 @@ var ProviderRegistry = class extends Service$1()("forge/provider/Services/Provid
92550
92550
  var ServerLifecycleEvents = class extends Service$1()("forge/serverLifecycleEvents") {};
92551
92551
  const ServerLifecycleEventsLive = effect(ServerLifecycleEvents, gen(function* () {
92552
92552
  const pubsub = yield* unbounded$1();
92553
- const state = yield* make$49({
92553
+ const state = yield* make$50({
92554
92554
  sequence: 0,
92555
92555
  events: []
92556
92556
  });
@@ -92566,7 +92566,7 @@ const ServerLifecycleEventsLive = effect(ServerLifecycleEvents, gen(function* ()
92566
92566
  events: nextEvent.type === "welcome" ? [nextEvent, ...current.events.filter((entry) => entry.type !== "welcome")] : [nextEvent, ...current.events.filter((entry) => entry.type !== "ready")]
92567
92567
  }];
92568
92568
  }).pipe(tap((event) => publish(pubsub, event))),
92569
- snapshot: get$5(state),
92569
+ snapshot: get$6(state),
92570
92570
  get stream() {
92571
92571
  return fromPubSub(pubsub);
92572
92572
  }
@@ -97847,10 +97847,10 @@ const runUsageScanWarmup = (options) => gen(function* () {
97847
97847
  const now = options.now ?? currentTimeMillis;
97848
97848
  const startDelayMs = options.startDelayMs ?? 2e4;
97849
97849
  const intervalMs = options.intervalMs ?? 36e5;
97850
- const scanning = yield* make$49(false);
97850
+ const scanning = yield* make$50(false);
97851
97851
  yield* sleep(startDelayMs);
97852
97852
  return yield* forever$1(gen(function* () {
97853
- if (yield* get$5(scanning)) yield* logInfo("usage scan warm-up skipped; the previous scan is still running");
97853
+ if (yield* get$6(scanning)) yield* logInfo("usage scan warm-up skipped; the previous scan is still running");
97854
97854
  else {
97855
97855
  yield* set$2(scanning, true);
97856
97856
  yield* forkChild(scanOnce(options, now).pipe(ensuring(set$2(scanning, false))));
@@ -97866,7 +97866,7 @@ const settleQueuedCommand = (deferred, exit) => isSuccess(exit) ? succeed$3(defe
97866
97866
  const makeCommandGate = gen(function* () {
97867
97867
  const commandReady = yield* make$39();
97868
97868
  const commandQueue = yield* unbounded$2();
97869
- const commandReadinessState = yield* make$49("pending");
97869
+ const commandReadinessState = yield* make$50("pending");
97870
97870
  yield* forkScoped(forever$1(take$1(commandQueue).pipe(flatMap((command) => command.run))));
97871
97871
  return {
97872
97872
  awaitCommandReady: _await(commandReady),
@@ -97879,7 +97879,7 @@ const makeCommandGate = gen(function* () {
97879
97879
  yield* fail$3(commandReady, error).pipe(orDie);
97880
97880
  }),
97881
97881
  enqueueCommand: (effect) => gen(function* () {
97882
- const readinessState = yield* get$5(commandReadinessState);
97882
+ const readinessState = yield* get$6(commandReadinessState);
97883
97883
  if (readinessState === "ready") return yield* effect;
97884
97884
  if (readinessState !== "pending") return yield* readinessState;
97885
97885
  const result = yield* make$39();
@@ -99238,19 +99238,19 @@ function previewUrlForPort(port) {
99238
99238
  return `http://127.0.0.1:${port}/`;
99239
99239
  }
99240
99240
  const ThreadDevRuntimeLive = effect(ThreadDevRuntime, gen(function* () {
99241
- const byThreadId = yield* make$49(/* @__PURE__ */ new Map());
99242
- const usedPorts = yield* make$49(/* @__PURE__ */ new Set());
99241
+ const byThreadId = yield* make$50(/* @__PURE__ */ new Map());
99242
+ const usedPorts = yield* make$50(/* @__PURE__ */ new Set());
99243
99243
  const allocateNextPort = gen(function* () {
99244
- const used = yield* get$5(usedPorts);
99244
+ const used = yield* get$6(usedPorts);
99245
99245
  for (let port = DEFAULT_PORT_MIN; port <= DEFAULT_PORT_MAX; port += 1) if (!used.has(port)) return port;
99246
99246
  return yield* new ThreadDevRuntimeError({ detail: `No dev ports available in range ${DEFAULT_PORT_MIN}-${DEFAULT_PORT_MAX}.` });
99247
99247
  });
99248
99248
  return {
99249
99249
  get: (input) => gen(function* () {
99250
- return (yield* get$5(byThreadId)).get(input.threadId) ?? null;
99250
+ return (yield* get$6(byThreadId)).get(input.threadId) ?? null;
99251
99251
  }),
99252
99252
  allocatePort: (input) => gen(function* () {
99253
- const existing = (yield* get$5(byThreadId)).get(input.threadId);
99253
+ const existing = (yield* get$6(byThreadId)).get(input.threadId);
99254
99254
  if (existing && existing.status !== "released") return existing;
99255
99255
  const port = yield* allocateNextPort;
99256
99256
  const record = {
@@ -99273,7 +99273,7 @@ const ThreadDevRuntimeLive = effect(ThreadDevRuntime, gen(function* () {
99273
99273
  return record;
99274
99274
  }),
99275
99275
  release: (input) => gen(function* () {
99276
- const existing = (yield* get$5(byThreadId)).get(input.threadId);
99276
+ const existing = (yield* get$6(byThreadId)).get(input.threadId);
99277
99277
  if (!existing) return;
99278
99278
  yield* update$4(byThreadId, (current) => {
99279
99279
  const next = new Map(current);
@@ -99291,7 +99291,7 @@ const ThreadDevRuntimeLive = effect(ThreadDevRuntime, gen(function* () {
99291
99291
  });
99292
99292
  }),
99293
99293
  setRunning: (threadId, patch) => gen(function* () {
99294
- const existing = (yield* get$5(byThreadId)).get(threadId);
99294
+ const existing = (yield* get$6(byThreadId)).get(threadId);
99295
99295
  if (!existing && patch.allocatedPort === void 0) return yield* new ThreadDevRuntimeError({ detail: `No dev runtime record for thread ${threadId}.` });
99296
99296
  const allocatedPort = patch.allocatedPort ?? existing?.allocatedPort;
99297
99297
  if (allocatedPort === void 0) return yield* new ThreadDevRuntimeError({ detail: `No dev runtime port is available for thread ${threadId}.` });
@@ -105075,7 +105075,7 @@ const makeWsRpcLayer = (currentSessionId, currentUserId) => WsRpcGroup.toLayer(g
105075
105075
  }), { "rpc.aggregate": "server" }),
105076
105076
  [WS_METHODS.subscribeAuthAccess]: (_input) => observeRpcStreamEffect(WS_METHODS.subscribeAuthAccess, gen(function* () {
105077
105077
  const initialSnapshot = yield* loadAuthAccessSnapshot();
105078
- const revisionRef = yield* make$49(1);
105078
+ const revisionRef = yield* make$50(1);
105079
105079
  const liveEvents = merge$4(bootstrapCredentials.streamChanges, sessions.streamChanges).pipe(mapEffect$1((change) => updateAndGet(revisionRef, (revision) => revision + 1).pipe(map$3((revision) => toAuthAccessStreamEvent(change, revision, currentSessionId)))));
105080
105080
  return concat$2(make$45({
105081
105081
  version: 1,
@@ -112410,7 +112410,7 @@ const makeWith = /* @__PURE__ */ fnUntraced(function* (options) {
112410
112410
  const compiler = makeCompiler(options.transformQueryNames, options.transformJson);
112411
112411
  const transformRows = options.transformResultNames ? defaultTransforms(options.transformResultNames, options.transformJson).array : void 0;
112412
112412
  const config = options.config;
112413
- return Object.assign(yield* make$51({
112413
+ return Object.assign(yield* make$52({
112414
112414
  acquirer: options.acquirer,
112415
112415
  transactionAcquirer: options.transactionAcquirer,
112416
112416
  compiler,
@@ -116161,8 +116161,8 @@ effectDiscard(runMigrations());
116161
116161
  //#endregion
116162
116162
  //#region src/persistence/Layers/Sqlite.ts
116163
116163
  const defaultSqliteClientLoaders = {
116164
- bun: () => import("./SqliteClient-DdItRZUr.mjs"),
116165
- node: () => import("./NodeSqliteClient-BqUcml1B.mjs")
116164
+ bun: () => import("./SqliteClient-CIsITMoQ.mjs"),
116165
+ node: () => import("./NodeSqliteClient-DGInbxQ3.mjs")
116166
116166
  };
116167
116167
  const makeRuntimeSqliteLayer = fn$1("makeRuntimeSqliteLayer")(function* (config) {
116168
116168
  const loader = defaultSqliteClientLoaders[process.versions.bun !== void 0 ? "bun" : "node"];
@@ -147374,7 +147374,7 @@ const AnalyticsServiceLayerLive = effect(AnalyticsService, gen(function* () {
147374
147374
  const httpClient = yield* HttpClient;
147375
147375
  const serverConfig = yield* ServerConfig;
147376
147376
  const identifier = yield* getTelemetryIdentifier;
147377
- const bufferRef = yield* make$49([]);
147377
+ const bufferRef = yield* make$50([]);
147378
147378
  const clientType = serverConfig.mode === "desktop" ? "desktop-app" : "cli-web-client";
147379
147379
  const enqueueBufferedEvent = (event, properties) => flatMap(now, (now) => modify$3(bufferRef, (current) => {
147380
147380
  const appended = [...current, {
@@ -149790,6 +149790,23 @@ function issueCmmdLocalUserProviderEgressCredential(input) {
149790
149790
  });
149791
149791
  }
149792
149792
  //#endregion
149793
+ //#region src/provider/codexAccountTransition.ts
149794
+ function explicitProviderAccountTransition(fromAccountId, toAccountId) {
149795
+ if (!fromAccountId || !toAccountId || fromAccountId === toAccountId) return void 0;
149796
+ return {
149797
+ fromAccountId,
149798
+ toAccountId
149799
+ };
149800
+ }
149801
+ function permitsCodexAccountTransition(input) {
149802
+ const { transition, requestedAccountId, prior, current } = input;
149803
+ if (!transition || transition.fromAccountId === transition.toAccountId || transition.toAccountId !== requestedAccountId || prior.identity.kind !== "provider_account" || current.identity.kind !== "provider_account" || prior.identity.provider !== "codex" || current.identity.provider !== "codex") return false;
149804
+ return providerDeliveryBindingsEqual({
149805
+ ...prior,
149806
+ identity: current.identity
149807
+ }, current);
149808
+ }
149809
+ //#endregion
149793
149810
  //#region src/providerAuth/codexLocalAccountIdentity.ts
149794
149811
  const ACCOUNT_IDENTITY_PATH = "/api/forge/context/providers/codex/account-identity";
149795
149812
  const PROVIDER_ACCOUNT_IDENTITY$1 = /^pai_v1_[A-Za-z0-9_-]{43}$/;
@@ -150287,7 +150304,12 @@ var CodexAppServerManager = class extends EventEmitter$1 {
150287
150304
  const rawPriorDeliveryBinding = input.resumeCursor.providerDeliveryBinding;
150288
150305
  const priorDeliveryBinding = readProviderDeliveryBinding(rawPriorDeliveryBinding);
150289
150306
  if (rawPriorDeliveryBinding !== void 0 && rawPriorDeliveryBinding !== null && !priorDeliveryBinding) throw new Error("Existing Codex history cannot resume because its persisted delivered provider account binding is unreadable.");
150290
- if (priorDeliveryBinding && !providerDeliveryBindingsEqual(priorDeliveryBinding, currentDeliveryBinding)) throw new Error("Existing Codex history cannot resume because the delivered provider account changed.");
150307
+ if (priorDeliveryBinding && !providerDeliveryBindingsEqual(priorDeliveryBinding, currentDeliveryBinding) && !permitsCodexAccountTransition({
150308
+ transition: input.accountTransition,
150309
+ requestedAccountId: input.providerAccountId,
150310
+ prior: priorDeliveryBinding,
150311
+ current: currentDeliveryBinding
150312
+ })) throw new Error("Existing Codex history cannot resume because the delivered provider account changed.");
150291
150313
  }
150292
150314
  const initialResumeCursor = initialCodexResumeCursor({
150293
150315
  resumeCursor: input.resumeCursor,
@@ -188984,7 +189006,7 @@ var Vce = {
188984
189006
  function Ve() {
188985
189007
  return Vce;
188986
189008
  }
188987
- var Us = $U.homedir(), lk = $U.tmpdir(), { env: Vc } = process$1, Yce = (e) => {
189009
+ var Us = os.homedir(), lk = os.tmpdir(), { env: Vc } = process$1, Yce = (e) => {
188988
189010
  let t = path.join(Us, "Library");
188989
189011
  return {
188990
189012
  data: path.join(t, "Application Support", e),
@@ -199184,12 +199206,12 @@ function qZ(e, t) {
199184
199206
  }
199185
199207
  return n;
199186
199208
  }
199187
- var os$1 = "https://code.claude.com/docs/en", kKe = [
199209
+ var os$2 = "https://code.claude.com/docs/en", kKe = [
199188
199210
  {
199189
199211
  matches: (e) => e.path === "permissions.defaultMode" && e.code === "invalid_value",
199190
199212
  tip: {
199191
199213
  suggestion: "Valid modes: \"acceptEdits\" (ask before file changes), \"plan\" (analysis only), \"bypassPermissions\" (auto-accept all), or \"default\" (standard behavior)",
199192
- docLink: `${os$1}/iam#permission-modes`
199214
+ docLink: `${os$2}/iam#permission-modes`
199193
199215
  }
199194
199216
  },
199195
199217
  {
@@ -199204,7 +199226,7 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
199204
199226
  matches: (e) => e.path.startsWith("env.") && e.code === "invalid_type",
199205
199227
  tip: {
199206
199228
  suggestion: "Environment variables must be strings. Wrap numbers and booleans in quotes. Example: \"DEBUG\": \"true\", \"PORT\": \"3000\"",
199207
- docLink: `${os$1}/settings#environment-variables`
199229
+ docLink: `${os$2}/settings#environment-variables`
199208
199230
  }
199209
199231
  },
199210
199232
  {
@@ -199215,14 +199237,14 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
199215
199237
  matches: (e) => e.path.startsWith("hooks.") && e.code === "invalid_key",
199216
199238
  tip: {
199217
199239
  suggestion: "Not a recognized hook event. Common events: PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, Stop. Check spelling and capitalization.",
199218
- docLink: `${os$1}/hooks`
199240
+ docLink: `${os$2}/hooks`
199219
199241
  }
199220
199242
  },
199221
199243
  {
199222
199244
  matches: (e) => /\.hooks\.\d+\.command$/.test(e.path) && e.code === "invalid_type" && e.received === "undefined",
199223
199245
  tip: {
199224
199246
  suggestion: "Command hooks require `command`. For exec form (no shell), set `command` to the executable and `args` to its arguments: {\"type\": \"command\", \"command\": \"echo\", \"args\": [\"hi\"]}. For shell form, set `command` to the full shell string: {\"type\": \"command\", \"command\": \"echo hi\"}.",
199225
- docLink: `${os$1}/hooks#exec-form-and-shell-form`
199247
+ docLink: `${os$2}/hooks#exec-form-and-shell-form`
199226
199248
  }
199227
199249
  },
199228
199250
  {
@@ -199237,7 +199259,7 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
199237
199259
  matches: (e) => e.code === "unrecognized_keys",
199238
199260
  tip: {
199239
199261
  suggestion: "Check for typos or refer to the documentation for valid fields",
199240
- docLink: `${os$1}/settings`
199262
+ docLink: `${os$2}/settings`
199241
199263
  }
199242
199264
  },
199243
199265
  {
@@ -199252,13 +199274,13 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
199252
199274
  matches: (e) => e.path === "permissions.additionalDirectories" && e.code === "invalid_type",
199253
199275
  tip: {
199254
199276
  suggestion: "Must be an array of directory paths. Example: [\"~/projects\", \"/tmp/workspace\"]. You can also use --add-dir flag or /add-dir command",
199255
- docLink: `${os$1}/iam#working-directories`
199277
+ docLink: `${os$2}/iam#working-directories`
199256
199278
  }
199257
199279
  }
199258
199280
  ], AKe = {
199259
- permissions: `${os$1}/iam#configuring-permissions`,
199260
- env: `${os$1}/settings#environment-variables`,
199261
- hooks: `${os$1}/hooks`
199281
+ permissions: `${os$2}/iam#configuring-permissions`,
199282
+ env: `${os$2}/settings#environment-variables`,
199283
+ hooks: `${os$2}/hooks`
199262
199284
  };
199263
199285
  function GZ(e) {
199264
199286
  let t = kKe.find((r) => r.matches(e));
@@ -209141,7 +209163,7 @@ const MODEL_LIST_PROBE_TIMEOUT_MS = 5e3;
209141
209163
  const probeCliModels = (input) => gen(function* () {
209142
209164
  const useShell = process.platform === "win32";
209143
209165
  if (useShell && !isShellSafeCommandPath(input.binaryPath)) return;
209144
- const command = make$47(input.binaryPath, [...input.args], {
209166
+ const command = make$48(input.binaryPath, [...input.args], {
209145
209167
  shell: useShell,
209146
209168
  env: scrubForgeProviderChildEnvSecrets(process.env)
209147
209169
  });
@@ -210434,6 +210456,7 @@ const makeCodexAdapter = fn$1("makeCodexAdapter")(function* (options) {
210434
210456
  ...browserToolEnvironmentId !== void 0 ? { environmentId: browserToolEnvironmentId } : {}
210435
210457
  };
210436
210458
  const managerInput = {
210459
+ ...input.accountTransition ? { accountTransition: input.accountTransition } : {},
210437
210460
  threadId: input.threadId,
210438
210461
  provider: "codex",
210439
210462
  ...input.cwd !== void 0 ? { cwd: input.cwd } : {},
@@ -210767,14 +210790,14 @@ const makeManagedServerProvider = fn$1("makeManagedServerProvider")(function* (i
210767
210790
  const refreshSemaphore = yield* make$43(1);
210768
210791
  const changesPubSub = yield* acquireRelease(unbounded$1(), shutdown$2);
210769
210792
  const initialSettings = yield* input.getSettings;
210770
- const snapshotRef = yield* make$49(input.initialSnapshot(initialSettings));
210771
- const settingsRef = yield* make$49(initialSettings);
210793
+ const snapshotRef = yield* make$50(input.initialSnapshot(initialSettings));
210794
+ const settingsRef = yield* make$50(initialSettings);
210772
210795
  const applySnapshotBase = fn$1("applySnapshot")(function* (nextSettings, options) {
210773
210796
  const forceRefresh = options?.forceRefresh === true;
210774
- const previousSettings = yield* get$5(settingsRef);
210797
+ const previousSettings = yield* get$6(settingsRef);
210775
210798
  if (!forceRefresh && !input.haveSettingsChanged(previousSettings, nextSettings)) {
210776
210799
  yield* set$2(settingsRef, nextSettings);
210777
- return yield* get$5(snapshotRef);
210800
+ return yield* get$6(snapshotRef);
210778
210801
  }
210779
210802
  const nextSnapshot = yield* input.checkProvider;
210780
210803
  yield* set$2(settingsRef, nextSettings);
@@ -210787,9 +210810,9 @@ const makeManagedServerProvider = fn$1("makeManagedServerProvider")(function* (i
210787
210810
  return yield* applySnapshot(yield* input.getSettings, { forceRefresh: true });
210788
210811
  });
210789
210812
  yield* runForEach(input.streamSettings, (nextSettings) => asVoid(applySnapshot(nextSettings))).pipe(forkScoped);
210790
- const refreshFailureCount = yield* make$49(0);
210813
+ const refreshFailureCount = yield* make$50(0);
210791
210814
  yield* forever$1(gen(function* () {
210792
- const failureCount = yield* get$5(refreshFailureCount);
210815
+ const failureCount = yield* get$6(refreshFailureCount);
210793
210816
  const baseMs = 6e4;
210794
210817
  yield* sleep$4(millis(Math.min(baseMs * Math.pow(2, failureCount), 3e5)));
210795
210818
  if (isFailure(yield* refreshSnapshot().pipe(tapError((e) => sync$1(() => captureServerError(e))), exit))) {
@@ -211332,7 +211355,7 @@ const runClaudeCommand = fn$1("runClaudeCommand")(function* (args) {
211332
211355
  }));
211333
211356
  const claudeSettings = yield* service(ServerSettingsService).pipe(flatMap((service) => service.getSettings), map$3((settings) => settings.providers.claudeAgent));
211334
211357
  const effectiveConfigPath = claudeSettings.configPath || config.forgeClaudeConfigPath || process.env.CLAUDE_CONFIG_DIR || void 0;
211335
- const command = make$47(claudeSettings.binaryPath, [...args], {
211358
+ const command = make$48(claudeSettings.binaryPath, [...args], {
211336
211359
  shell: process.platform === "win32",
211337
211360
  env: scrubForgeProviderChildEnvSecrets({
211338
211361
  ...process.env,
@@ -211516,7 +211539,7 @@ const makePendingClaudeProvider = (claudeSettings) => {
211516
211539
  const ClaudeProviderLive = effect(ClaudeProvider, gen(function* () {
211517
211540
  const serverSettings = yield* ServerSettingsService;
211518
211541
  const spawner = yield* ChildProcessSpawner;
211519
- const subscriptionProbeCache = yield* make$50({
211542
+ const subscriptionProbeCache = yield* make$51({
211520
211543
  capacity: 4,
211521
211544
  timeToLive: minutes(5),
211522
211545
  lookup: (key) => {
@@ -211527,7 +211550,7 @@ const ClaudeProviderLive = effect(ClaudeProvider, gen(function* () {
211527
211550
  });
211528
211551
  }
211529
211552
  });
211530
- const getDiscovery = (input) => get$7(subscriptionProbeCache, JSON.stringify([input.binaryPath, input.configPath]));
211553
+ const getDiscovery = (input) => get$8(subscriptionProbeCache, JSON.stringify([input.binaryPath, input.configPath]));
211531
211554
  const checkProvider = checkClaudeProviderStatus((input) => getDiscovery(input).pipe(map$3((probe) => probe?.subscriptionType)), (input) => getDiscovery(input).pipe(map$3((probe) => probe?.slashCommands)), (input) => getDiscovery(input).pipe(map$3((probe) => probe?.models))).pipe(provideService(ServerSettingsService, serverSettings), provideService(ChildProcessSpawner, spawner));
211532
211555
  return yield* makeManagedServerProvider({
211533
211556
  getSettings: serverSettings.getSettings.pipe(map$3((settings) => settings.providers.claudeAgent), orDie),
@@ -214424,7 +214447,7 @@ const makeClaudeAdapter = fn$1("makeClaudeAdapter")(function* (options) {
214424
214447
  });
214425
214448
  const makeCanUseTool = (contextRef, runtimeMode, pendingApprovals, pendingUserInputs, runFork, runPromise) => {
214426
214449
  const canUseToolEffect = fn$1("canUseTool")(function* (toolName, toolInput, callbackOptions) {
214427
- const context = yield* get$5(contextRef);
214450
+ const context = yield* get$6(contextRef);
214428
214451
  if (!context) return {
214429
214452
  behavior: "deny",
214430
214453
  message: "Claude session context is unavailable."
@@ -214566,7 +214589,7 @@ const makeClaudeAdapter = fn$1("makeClaudeAdapter")(function* (options) {
214566
214589
  const pendingApprovals = /* @__PURE__ */ new Map();
214567
214590
  const pendingUserInputs = /* @__PURE__ */ new Map();
214568
214591
  const inFlightTools = /* @__PURE__ */ new Map();
214569
- const contextRef = yield* make$49(void 0);
214592
+ const contextRef = yield* make$50(void 0);
214570
214593
  const canUseTool = makeCanUseTool(contextRef, input.runtimeMode, pendingApprovals, pendingUserInputs, runFork, runPromise);
214571
214594
  const serverSettings = yield* serverSettingsService.getSettings.pipe(mapError((error) => new ProviderAdapterProcessError({
214572
214595
  provider: PROVIDER$11,
@@ -218841,9 +218864,9 @@ const makeAcpPatchedProtocol = fn$1("makeAcpPatchedProtocol")(function* (options
218841
218864
  const notificationQueue = yield* sliding(1024);
218842
218865
  const disconnects = yield* unbounded$2();
218843
218866
  const outgoing = yield* unbounded$2();
218844
- const nextRequestId = yield* make$49(1n);
218845
- const terminationHandled = yield* make$49(false);
218846
- const extPending = yield* make$49(/* @__PURE__ */ new Map());
218867
+ const nextRequestId = yield* make$50(1n);
218868
+ const terminationHandled = yield* make$50(false);
218869
+ const extPending = yield* make$50(/* @__PURE__ */ new Map());
218847
218870
  const logProtocol = (event) => {
218848
218871
  if (event.direction === "incoming" && !options.logIncoming) return void_$1;
218849
218872
  if (event.direction === "outgoing" && !options.logOutgoing) return void_$1;
@@ -218959,7 +218982,7 @@ const makeAcpPatchedProtocol = fn$1("makeAcpPatchedProtocol")(function* (options
218959
218982
  if (!options.serverRequestMethods.has(message.tag)) return handleExtRequest(message).pipe(catch_(() => respondWithError(message.id, AcpRequestError.internalError())), asVoid);
218960
218983
  return offer$1(serverQueue, message).pipe(asVoid);
218961
218984
  };
218962
- const handleExitEncoded = (message) => get$5(extPending).pipe(flatMap((pending) => {
218985
+ const handleExitEncoded = (message) => get$6(extPending).pipe(flatMap((pending) => {
218963
218986
  if (!pending.has(message.requestId)) return offer$1(clientQueue, message).pipe(asVoid);
218964
218987
  if (message.exit._tag === "Success") return completeExtPendingSuccess(message.requestId, message.exit.value);
218965
218988
  const failure = message.exit.cause.find((entry) => entry._tag === "Fail");
@@ -218970,7 +218993,7 @@ const makeAcpPatchedProtocol = fn$1("makeAcpPatchedProtocol")(function* (options
218970
218993
  switch (message._tag) {
218971
218994
  case "Request": return handleRequestEncoded(message);
218972
218995
  case "Exit": return handleExitEncoded(message);
218973
- case "Chunk": return get$5(extPending).pipe(flatMap((pending) => pending.has(message.requestId) ? completeExtPendingFailure(message.requestId, AcpRequestError.internalError("Streaming extension responses are not supported")) : offer$1(clientQueue, message).pipe(asVoid)));
218996
+ case "Chunk": return get$6(extPending).pipe(flatMap((pending) => pending.has(message.requestId) ? completeExtPendingFailure(message.requestId, AcpRequestError.internalError("Streaming extension responses are not supported")) : offer$1(clientQueue, message).pipe(asVoid)));
218974
218997
  case "Defect":
218975
218998
  case "ClientProtocolError":
218976
218999
  case "Pong": return offer$1(clientQueue, message).pipe(asVoid);
@@ -219212,7 +219235,7 @@ ArraySchema(Unknown);
219212
219235
  //#endregion
219213
219236
  //#region ../../packages/effect-acp/src/_internal/stdio.ts
219214
219237
  const encoder$1 = new TextEncoder();
219215
- const makeChildStdio = (handle) => make$48({
219238
+ const makeChildStdio = (handle) => make$49({
219216
219239
  args: succeed([]),
219217
219240
  stdin: handle.stdout,
219218
219241
  stdout: () => mapInput(handle.stdin, (chunk) => typeof chunk === "string" ? encoder$1.encode(chunk) : chunk),
@@ -219223,7 +219246,7 @@ fn$1("makeInMemoryStdio")(function* () {
219223
219246
  const output = yield* unbounded$2();
219224
219247
  const decoder = new TextDecoder();
219225
219248
  return {
219226
- stdio: make$48({
219249
+ stdio: make$49({
219227
219250
  args: succeed([]),
219228
219251
  stdin: fromQueue(input),
219229
219252
  stdout: () => forEach$1((chunk) => offer$1(output, typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true }))),
@@ -219414,11 +219437,11 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
219414
219437
  const spawner = yield* ChildProcessSpawner;
219415
219438
  const runtimeScope = yield* Scope$1;
219416
219439
  const eventQueue = yield* unbounded$2();
219417
- const modeStateRef = yield* make$49(void 0);
219418
- const toolCallsRef = yield* make$49(/* @__PURE__ */ new Map());
219419
- const assistantSegmentRef = yield* make$49({ nextSegmentIndex: 0 });
219420
- const configOptionsRef = yield* make$49(sessionConfigOptionsFromSetup(void 0));
219421
- const startStateRef = yield* make$49({ _tag: "NotStarted" });
219440
+ const modeStateRef = yield* make$50(void 0);
219441
+ const toolCallsRef = yield* make$50(/* @__PURE__ */ new Map());
219442
+ const assistantSegmentRef = yield* make$50({ nextSegmentIndex: 0 });
219443
+ const configOptionsRef = yield* make$50(sessionConfigOptionsFromSetup(void 0));
219444
+ const startStateRef = yield* make$50({ _tag: "NotStarted" });
219422
219445
  const logRequest = (event) => options.requestLogger ? options.requestLogger(event) : void_$1;
219423
219446
  const runLoggedRequest = (method, payload, effect) => logRequest({
219424
219447
  method,
@@ -219440,7 +219463,7 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
219440
219463
  command: options.spawn.command,
219441
219464
  cause: /* @__PURE__ */ new Error(`Refusing to spawn ACP child process: command path contains shell metacharacters that cmd.exe would interpret as additional commands. Adjust the provider \`binaryPath\` setting to an unquoted absolute path.`)
219442
219465
  });
219443
- const acpContext = yield* build(layerChildProcess(yield* spawner.spawn(make$47(options.spawn.command, [...options.spawn.args], {
219466
+ const acpContext = yield* build(layerChildProcess(yield* spawner.spawn(make$48(options.spawn.command, [...options.spawn.args], {
219444
219467
  ...options.spawn.cwd ? { cwd: options.spawn.cwd } : {},
219445
219468
  env: scrubForgeProviderChildEnvSecrets({
219446
219469
  ...process.env,
@@ -219475,7 +219498,7 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
219475
219498
  ...options.clientCapabilities?._meta ? { _meta: options.clientCapabilities._meta } : {}
219476
219499
  };
219477
219500
  const getStartedState = gen(function* () {
219478
- const state = yield* get$5(startStateRef);
219501
+ const state = yield* get$6(startStateRef);
219479
219502
  if (state._tag === "Started") return state.result;
219480
219503
  return yield* new AcpTransportError({
219481
219504
  detail: "ACP session runtime has not been started",
@@ -219483,7 +219506,7 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
219483
219506
  });
219484
219507
  });
219485
219508
  const validateConfigOptionValue = (configId, value) => gen(function* () {
219486
- const configOption = findSessionConfigOption(yield* get$5(configOptionsRef), configId);
219509
+ const configOption = findSessionConfigOption(yield* get$6(configOptionsRef), configId);
219487
219510
  if (!configOption) return;
219488
219511
  if (configOption.type === "boolean") {
219489
219512
  if (typeof value === "boolean") return;
@@ -219523,7 +219546,7 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
219523
219546
  ...current,
219524
219547
  currentModeId: modeId
219525
219548
  } : current);
219526
- const setConfigOption = (configId, value) => validateConfigOptionValue(configId, value).pipe(flatMap(() => getStartedState), flatMap((started) => get$5(configOptionsRef).pipe(flatMap((configOptions) => {
219549
+ const setConfigOption = (configId, value) => validateConfigOptionValue(configId, value).pipe(flatMap(() => getStartedState), flatMap((started) => get$6(configOptionsRef).pipe(flatMap((configOptions) => {
219527
219550
  const existing = findSessionConfigOption(configOptions, configId);
219528
219551
  if (existing && configOptionCurrentValueMatches(existing, value)) return succeed({ configOptions });
219529
219552
  const requestPayload = typeof value === "boolean" ? {
@@ -219604,8 +219627,8 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
219604
219627
  handleExtNotification: acp.handleExtNotification,
219605
219628
  start: () => start,
219606
219629
  getEvents: () => fromQueue(eventQueue),
219607
- getModeState: get$5(modeStateRef),
219608
- getConfigOptions: get$5(configOptionsRef),
219630
+ getModeState: get$6(modeStateRef),
219631
+ getConfigOptions: get$6(configOptionsRef),
219609
219632
  prompt: (payload) => getStartedState.pipe(flatMap((started) => {
219610
219633
  const requestPayload = {
219611
219634
  sessionId: started.sessionId,
@@ -219620,7 +219643,7 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
219620
219643
  })));
219621
219644
  })),
219622
219645
  cancel: getStartedState.pipe(flatMap((started) => acp.agent.cancel({ sessionId: started.sessionId }))),
219623
- setMode: (modeId) => get$5(modeStateRef).pipe(flatMap((modeState) => {
219646
+ setMode: (modeId) => get$6(modeStateRef).pipe(flatMap((modeState) => {
219624
219647
  if (modeState?.currentModeId === modeId) return succeed({});
219625
219648
  return getStartedState.pipe(flatMap((started) => {
219626
219649
  if (sessionResponseHasModeState(started.sessionSetupResult)) {
@@ -219712,7 +219735,7 @@ const handleSessionUpdate = ({ queue, modeStateRef, toolCallsRef, assistantSegme
219712
219735
  }
219713
219736
  if (event._tag === "ContentDelta") {
219714
219737
  if (event.text.trim().length === 0) {
219715
- if (!(yield* get$5(assistantSegmentRef)).activeItemId) continue;
219738
+ if (!(yield* get$6(assistantSegmentRef)).activeItemId) continue;
219716
219739
  }
219717
219740
  const itemId = yield* ensureActiveAssistantSegment({
219718
219741
  queue,
@@ -219764,7 +219787,7 @@ const closeActiveAssistantSegment = ({ queue, assistantSegmentRef }) => modify$3
219764
219787
  }, { nextSegmentIndex: current.nextSegmentIndex }];
219765
219788
  }).pipe(flatMap((event) => event ? offer$1(queue, event) : void_$1));
219766
219789
  const makeStartCoordinator = (startStateRef, startOnce) => gen(function* () {
219767
- const currentState = yield* get$5(startStateRef);
219790
+ const currentState = yield* get$6(startStateRef);
219768
219791
  if (currentState._tag === "Started") return currentState.result;
219769
219792
  if (currentState._tag === "Starting") return yield* _await(currentState.deferred);
219770
219793
  const deferred = yield* make$39();
@@ -219889,7 +219912,7 @@ const readCursorApiKey = (_settings) => process.env.CURSOR_API_KEY || null;
219889
219912
  const runCursorCommand = fn$1("runCursorCommand")(function* (binaryPath, args) {
219890
219913
  const useShell = process.platform === "win32";
219891
219914
  if (useShell && !isShellSafeCommandPath(binaryPath)) return yield* fail(/* @__PURE__ */ new Error(`Refusing to spawn cursor-agent: \`binaryPath\` contains shell metacharacters that cmd.exe would interpret as additional commands.`));
219892
- return yield* spawnAndCollect(binaryPath, make$47(binaryPath, [...args], {
219915
+ return yield* spawnAndCollect(binaryPath, make$48(binaryPath, [...args], {
219893
219916
  shell: useShell,
219894
219917
  env: scrubForgeProviderChildEnvSecrets(process.env)
219895
219918
  }));
@@ -227708,7 +227731,7 @@ const makeOpenCodeRuntime = gen(function* () {
227708
227731
  const netService = yield* NetService;
227709
227732
  const runOpenCodeCommand = (input) => gen(function* () {
227710
227733
  yield* rejectUnsafeWindowsBinaryPath("runOpenCodeCommand", input.binaryPath);
227711
- const child = yield* spawner.spawn(make$47(input.binaryPath, [...input.args], {
227734
+ const child = yield* spawner.spawn(make$48(input.binaryPath, [...input.args], {
227712
227735
  shell: process.platform === "win32",
227713
227736
  env: input.environment ?? process.env
227714
227737
  }));
@@ -227743,7 +227766,7 @@ const makeOpenCodeRuntime = gen(function* () {
227743
227766
  `--hostname=${hostname}`,
227744
227767
  `--port=${port}`
227745
227768
  ];
227746
- const child = yield* spawner.spawn(make$47(input.binaryPath, args, {
227769
+ const child = yield* spawner.spawn(make$48(input.binaryPath, args, {
227747
227770
  detached: process.platform !== "win32",
227748
227771
  shell: process.platform === "win32",
227749
227772
  env: {
@@ -227764,8 +227787,8 @@ const makeOpenCodeRuntime = gen(function* () {
227764
227787
  } catch {}
227765
227788
  });
227766
227789
  yield* addFinalizer$1(runtimeScope, killOpenCodeProcessGroup("SIGTERM").pipe(andThen(sleep$4("1 second")), andThen(killOpenCodeProcessGroup("SIGKILL")), ignore));
227767
- const stdoutRef = yield* make$49("");
227768
- const stderrRef = yield* make$49("");
227790
+ const stdoutRef = yield* make$50("");
227791
+ const stderrRef = yield* make$50("");
227769
227792
  const readyDeferred = yield* make$39();
227770
227793
  const setReadyFromStdoutChunk = (chunk) => updateAndGet(stdoutRef, (stdout) => `${stdout}${chunk}`).pipe(flatMap((nextStdout) => {
227771
227794
  const parsed = parseServerUrlFromOutput(nextStdout);
@@ -227774,8 +227797,8 @@ const makeOpenCodeRuntime = gen(function* () {
227774
227797
  const stdoutFiber = yield* child.stdout.pipe(decodeText$1(), runForEach(setReadyFromStdoutChunk), ignore, forkIn(runtimeScope));
227775
227798
  const stderrFiber = yield* child.stderr.pipe(decodeText$1(), runForEach((chunk) => update$4(stderrRef, (stderr) => `${stderr}${chunk}`)), ignore, forkIn(runtimeScope));
227776
227799
  const exitFiber = yield* child.exitCode.pipe(flatMap((code) => gen(function* () {
227777
- const stdout = yield* get$5(stdoutRef);
227778
- const stderr = yield* get$5(stderrRef);
227800
+ const stdout = yield* get$6(stdoutRef);
227801
+ const stderr = yield* get$6(stderrRef);
227779
227802
  const exitCode = Number(code);
227780
227803
  yield* fail$3(readyDeferred, new OpenCodeRuntimeError({
227781
227804
  operation: "startOpenCodeServerProcess",
@@ -228436,12 +228459,12 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
228436
228459
  }
228437
228460
  }))).pipe(exit, flatMap((exit) => gen(function* () {
228438
228461
  /* v8 ignore next -- session-scope interruption timing is a defensive cleanup path. */
228439
- if (eventsAbortController.signal.aborted || (yield* get$5(context.stopped))) return;
228462
+ if (eventsAbortController.signal.aborted || (yield* get$6(context.stopped))) return;
228440
228463
  if (isFailure(exit)) yield* emitUnexpectedExit(context, openCodeRuntimeErrorDetail(squash(exit.cause)));
228441
228464
  })), forkIn(context.sessionScope));
228442
228465
  if (!context.server.external && context.server.exitCode !== null) yield* context.server.exitCode.pipe(flatMap((code) => gen(function* () {
228443
228466
  /* v8 ignore next -- server-exit watcher can lose the race to an already-stopped context. */
228444
- if (yield* get$5(context.stopped)) return;
228467
+ if (yield* get$6(context.stopped)) return;
228445
228468
  yield* emitUnexpectedExit(context, `OpenCode server exited unexpectedly (${code}).`);
228446
228469
  })), forkIn(context.sessionScope));
228447
228470
  });
@@ -228524,7 +228547,7 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
228524
228547
  activeTurnId: void 0,
228525
228548
  activeAgent: void 0,
228526
228549
  activeVariant: void 0,
228527
- stopped: yield* make$49(false),
228550
+ stopped: yield* make$50(false),
228528
228551
  sessionScope: started.sessionScope
228529
228552
  };
228530
228553
  sessions.set(input.threadId, context);
@@ -228883,6 +228906,8 @@ const makeProviderService = fn$1("makeProviderService")(function* (options) {
228883
228906
  const canonicalEventLogger = options?.canonicalEventLogger ?? (options?.canonicalEventLogPath !== void 0 ? yield* makeEventNdjsonLogger(options.canonicalEventLogPath, { stream: "canonical" }) : void 0);
228884
228907
  const registry = yield* ProviderAdapterRegistry;
228885
228908
  const directory = yield* ProviderSessionDirectory;
228909
+ const sessionLocks = yield* make$47({ lookup: (_threadId) => make$43(1) });
228910
+ const withSessionLock = (threadId, effect) => get$5(sessionLocks, threadId).pipe(flatMap((lock) => lock.withPermit(effect)), scoped);
228886
228911
  const runtimeEventPubSub = yield* unbounded$1();
228887
228912
  const assertProviderExecutable = options?.assertProviderExecutable ?? (() => succeed(null));
228888
228913
  const assertCurrentProviderDelivery = fn$1("assertCurrentProviderDelivery")(function* (input) {
@@ -229055,18 +229080,19 @@ const makeProviderService = fn$1("makeProviderService")(function* (options) {
229055
229080
  "provider.runtime_mode": input.runtimeMode
229056
229081
  });
229057
229082
  const persistedBinding = getOrUndefined(yield* directory.getBinding(threadId));
229058
- yield* assertProviderAccountBoundary({
229083
+ const adapter = yield* registry.getByProvider(effectiveProvider);
229084
+ const priorAccountId = readPersistedProviderAccountId(persistedBinding?.runtimePayload);
229085
+ const requestedAccountId = readProviderAccountIdFromModelSelection(input.modelSelection);
229086
+ if (effectiveProvider !== "codex" || persistedBinding?.provider !== effectiveProvider || (yield* adapter.hasSession(threadId))) yield* assertProviderAccountBoundary({
229059
229087
  operation: "ProviderService.startSession",
229060
229088
  threadId,
229061
- persistedAccountId: readPersistedProviderAccountId(persistedBinding?.runtimePayload),
229062
- requestedAccountId: readProviderAccountIdFromModelSelection(input.modelSelection)
229089
+ persistedAccountId: priorAccountId,
229090
+ requestedAccountId
229063
229091
  });
229064
- const effectiveResumeCursor = input.resumeCursor ?? (persistedBinding?.provider === effectiveProvider ? persistedBinding.resumeCursor : void 0);
229065
- const adapter = yield* registry.getByProvider(effectiveProvider);
229066
229092
  const boundResumeCursor = yield* bindProviderDeliveryToResumeCursor({
229067
229093
  operation: "ProviderService.startSession",
229068
229094
  provider: effectiveProvider,
229069
- resumeCursor: effectiveResumeCursor,
229095
+ resumeCursor: input.resumeCursor ?? (persistedBinding?.provider === effectiveProvider ? persistedBinding.resumeCursor : void 0),
229070
229096
  currentBinding: yield* assertProviderExecutable({
229071
229097
  threadId,
229072
229098
  provider: effectiveProvider,
@@ -229075,6 +229101,7 @@ const makeProviderService = fn$1("makeProviderService")(function* (options) {
229075
229101
  });
229076
229102
  const session = yield* adapter.startSession({
229077
229103
  ...input,
229104
+ accountTransition: explicitProviderAccountTransition(priorAccountId, requestedAccountId),
229078
229105
  ...boundResumeCursor !== void 0 ? { resumeCursor: boundResumeCursor } : {}
229079
229106
  });
229080
229107
  if (session.provider !== adapter.provider) return yield* toValidationError("ProviderService.startSession", `Adapter/provider mismatch: requested '${adapter.provider}', received '${session.provider}'.`);
@@ -229375,15 +229402,15 @@ const makeProviderService = fn$1("makeProviderService")(function* (options) {
229375
229402
  });
229376
229403
  yield* addFinalizer$2(() => catch_(runStopAll(), (cause) => logWarning$1("failed to stop provider service", { cause })));
229377
229404
  return {
229378
- startSession,
229379
- sendTurn,
229380
- interruptTurn,
229381
- respondToRequest,
229382
- respondToUserInput,
229383
- stopSession,
229405
+ startSession: (threadId, input) => withSessionLock(threadId, startSession(threadId, input)),
229406
+ sendTurn: (input) => withSessionLock(input?.threadId, sendTurn(input)),
229407
+ interruptTurn: (input) => withSessionLock(input?.threadId, interruptTurn(input)),
229408
+ respondToRequest: (input) => withSessionLock(input?.threadId, respondToRequest(input)),
229409
+ respondToUserInput: (input) => withSessionLock(input?.threadId, respondToUserInput(input)),
229410
+ stopSession: (input) => withSessionLock(input?.threadId, stopSession(input)),
229384
229411
  listSessions,
229385
229412
  getCapabilities,
229386
- rollbackConversation,
229413
+ rollbackConversation: (input) => withSessionLock(input?.threadId, rollbackConversation(input)),
229387
229414
  get streamEvents() {
229388
229415
  return fromPubSub(runtimeEventPubSub);
229389
229416
  }
@@ -230582,7 +230609,7 @@ const createTrace2Monitor = fn$1("createTrace2Monitor")(function* (input, progre
230582
230609
  suffix: ".json"
230583
230610
  });
230584
230611
  const hookStartByChildKey = /* @__PURE__ */ new Map();
230585
- const traceTailState = yield* make$49({
230612
+ const traceTailState = yield* make$50({
230586
230613
  processedChars: 0,
230587
230614
  remainder: ""
230588
230615
  });
@@ -230757,7 +230784,7 @@ const GitCoreLive = effect(GitCore, fn$1("makeGitCore")(function* (options) {
230757
230784
  const truncateOutputAtMaxBytes = input.truncateOutputAtMaxBytes ?? false;
230758
230785
  return yield* fn$1("runGitCommand")(function* () {
230759
230786
  const trace2Monitor = yield* createTrace2Monitor(commandInput, input.progress).pipe(provideService(Path$2, path$10), provideService(FileSystem, fileSystem), mapError(toGitCommandError(commandInput, "failed to create trace2 monitor.")));
230760
- const child = yield* commandSpawner.spawn(make$47("git", commandInput.args, {
230787
+ const child = yield* commandSpawner.spawn(make$48("git", commandInput.args, {
230761
230788
  cwd: commandInput.cwd,
230762
230789
  env: withRepositoryOwnershipTrust({
230763
230790
  ...process.env,
@@ -230918,7 +230945,7 @@ const GitCoreLive = effect(GitCore, fn$1("makeGitCore")(function* (options) {
230918
230945
  const refreshStatusUpstreamIfStale = fn$1("refreshStatusUpstreamIfStale")(function* (cwd) {
230919
230946
  const upstream = yield* resolveCurrentUpstream(cwd);
230920
230947
  if (!upstream) return;
230921
- yield* get$7(statusRemoteRefreshCache, new StatusRemoteRefreshCacheKey({
230948
+ yield* get$8(statusRemoteRefreshCache, new StatusRemoteRefreshCacheKey({
230922
230949
  gitCommonDir: yield* resolveGitCommonDir(cwd),
230923
230950
  remoteName: upstream.remoteName
230924
230951
  }));
@@ -232122,10 +232149,10 @@ const GitStatusBroadcasterLive = effect(GitStatusBroadcaster, gen(function* () {
232122
232149
  const gitManager = yield* GitManager;
232123
232150
  const changesPubSub = yield* acquireRelease(unbounded$1(), (pubsub) => shutdown$2(pubsub));
232124
232151
  const broadcasterScope = yield* acquireRelease(make$37(), (scope) => close(scope, void_$3));
232125
- const cacheRef = yield* make$49(/* @__PURE__ */ new Map());
232152
+ const cacheRef = yield* make$50(/* @__PURE__ */ new Map());
232126
232153
  const pollersRef = yield* make$32(/* @__PURE__ */ new Map());
232127
232154
  const getCachedStatus = fn$1("getCachedStatus")(function* (cwd) {
232128
- return yield* get$5(cacheRef).pipe(map$3((cache) => cache.get(cwd) ?? null));
232155
+ return yield* get$6(cacheRef).pipe(map$3((cache) => cache.get(cwd) ?? null));
232129
232156
  });
232130
232157
  const updateCachedLocalStatus = fn$1("updateCachedLocalStatus")(function* (cwd, local, options) {
232131
232158
  const nextLocal = {
@@ -232748,7 +232775,7 @@ const runCodexCommand = fn$1("runCodexCommand")(function* (args) {
232748
232775
  }));
232749
232776
  const codexSettings = yield* (yield* ServerSettingsService).getSettings.pipe(map$3((settings) => settings.providers.codex));
232750
232777
  const effectiveHomePath = codexSettings.homePath || config.forgeCodexHomePath || process.env.CODEX_HOME || void 0;
232751
- const command = make$47(codexSettings.binaryPath, [...args], {
232778
+ const command = make$48(codexSettings.binaryPath, [...args], {
232752
232779
  shell: process.platform === "win32",
232753
232780
  env: scrubForgeProviderChildEnvSecrets({
232754
232781
  ...process.env,
@@ -232976,7 +233003,7 @@ const CodexProviderLive = effect(CodexProvider, gen(function* () {
232976
233003
  const fileSystem = yield* FileSystem;
232977
233004
  const path = yield* Path$2;
232978
233005
  const spawner = yield* ChildProcessSpawner;
232979
- const accountProbeCache = yield* make$50({
233006
+ const accountProbeCache = yield* make$51({
232980
233007
  capacity: 4,
232981
233008
  timeToLive: minutes(5),
232982
233009
  lookup: (key) => {
@@ -232988,7 +233015,7 @@ const CodexProviderLive = effect(CodexProvider, gen(function* () {
232988
233015
  });
232989
233016
  }
232990
233017
  });
232991
- const getDiscovery = (input) => get$7(accountProbeCache, JSON.stringify([
233018
+ const getDiscovery = (input) => get$8(accountProbeCache, JSON.stringify([
232992
233019
  input.binaryPath,
232993
233020
  input.homePath,
232994
233021
  input.cwd
@@ -233130,7 +233157,7 @@ const CodexTextGenerationLive = effect(TextGeneration, gen(function* () {
233130
233157
  ...threadId ? { threadId } : {},
233131
233158
  authSessionId
233132
233159
  });
233133
- const command = make$47(codexSettings?.binaryPath || "codex", [
233160
+ const command = make$48(codexSettings?.binaryPath || "codex", [
233134
233161
  "exec",
233135
233162
  "--ephemeral",
233136
233163
  "--skip-git-repo-check",
@@ -233368,7 +233395,7 @@ const ClaudeTextGenerationLive = effect(TextGeneration, gen(function* () {
233368
233395
  };
233369
233396
  const claudeSettings = yield* map$3(serverSettingsService.getSettings, (settings) => settings.providers.claudeAgent).pipe(catch_(() => undefined_));
233370
233397
  const rawStdout = yield* fn$1("runClaudeJson.runClaudeCommand")(function* () {
233371
- const command = make$47(claudeSettings?.binaryPath || "claude", [
233398
+ const command = make$48(claudeSettings?.binaryPath || "claude", [
233372
233399
  "-p",
233373
233400
  "--output-format",
233374
233401
  "json",
@@ -265185,7 +265212,7 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
265185
265212
  var dgram = __require("dgram");
265186
265213
  var thunky = require_thunky();
265187
265214
  var events = __require("events");
265188
- var os = __require("os");
265215
+ var os$1 = __require("os");
265189
265216
  var noop = function() {};
265190
265217
  module.exports = function(opts) {
265191
265218
  if (!opts) opts = {};
@@ -265316,14 +265343,14 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
265316
265343
  return that;
265317
265344
  };
265318
265345
  function defaultInterface() {
265319
- var networks = os.networkInterfaces();
265346
+ var networks = os$1.networkInterfaces();
265320
265347
  var names = Object.keys(networks);
265321
265348
  for (var i = 0; i < names.length; i++) {
265322
265349
  var net = networks[names[i]];
265323
265350
  for (var j = 0; j < net.length; j++) {
265324
265351
  var iface = net[j];
265325
265352
  if (isIPv4(iface.family) && !iface.internal) {
265326
- if (os.platform() === "darwin" && names[i] === "en0") return iface.address;
265353
+ if (os$1.platform() === "darwin" && names[i] === "en0") return iface.address;
265327
265354
  return "0.0.0.0";
265328
265355
  }
265329
265356
  }
@@ -265331,7 +265358,7 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
265331
265358
  return "127.0.0.1";
265332
265359
  }
265333
265360
  function allInterfaces() {
265334
- var networks = os.networkInterfaces();
265361
+ var networks = os$1.networkInterfaces();
265335
265362
  var names = Object.keys(networks);
265336
265363
  var res = [];
265337
265364
  for (var i = 0; i < names.length; i++) {
@@ -282886,7 +282913,7 @@ const GitManagerLive = effect(GitManager, fn$1("makeGitManager")(function* () {
282886
282913
  });
282887
282914
  const resolveDefaultBranch = fn$1("resolveDefaultBranch")(function* (cwd, localDefaultBranch) {
282888
282915
  if (localDefaultBranch && localDefaultBranch.length > 0) return localDefaultBranch;
282889
- const fromGh = yield* get$7(defaultBranchFallbackCache, normalizeStatusCacheKey(cwd));
282916
+ const fromGh = yield* get$8(defaultBranchFallbackCache, normalizeStatusCacheKey(cwd));
282890
282917
  if (fromGh && fromGh.length > 0) return fromGh;
282891
282918
  return DEFAULT_BASE_BRANCH_FALLBACK;
282892
282919
  });
@@ -283266,10 +283293,10 @@ const GitManagerLive = effect(GitManager, fn$1("makeGitManager")(function* () {
283266
283293
  };
283267
283294
  });
283268
283295
  const localStatus = fn$1("localStatus")(function* (input) {
283269
- return yield* get$7(localStatusResultCache, normalizeStatusCacheKey(input.cwd));
283296
+ return yield* get$8(localStatusResultCache, normalizeStatusCacheKey(input.cwd));
283270
283297
  });
283271
283298
  const remoteStatus = fn$1("remoteStatus")(function* (input) {
283272
- return yield* get$7(remoteStatusResultCache, normalizeStatusCacheKey(input.cwd));
283299
+ return yield* get$8(remoteStatusResultCache, normalizeStatusCacheKey(input.cwd));
283273
283300
  });
283274
283301
  const status = fn$1("status")(function* (input) {
283275
283302
  const [local, remote] = yield* all([localStatus(input), remoteStatus(input)]);
@@ -283420,7 +283447,7 @@ const GitManagerLive = effect(GitManager, fn$1("makeGitManager")(function* () {
283420
283447
  preparePullRequestThread,
283421
283448
  runStackedAction: fn$1("runStackedAction")(function* (input, options) {
283422
283449
  const progress = createProgressEmitter(input, options);
283423
- const currentPhase = yield* make$49(none$4());
283450
+ const currentPhase = yield* make$50(none$4());
283424
283451
  return yield* fn$1("runStackedAction.runAction")(function* () {
283425
283452
  const initialStatus = yield* gitCore.statusDetails(input.cwd);
283426
283453
  const wantsCommit = isCommitAction(input.action);
@@ -283509,7 +283536,7 @@ const GitManagerLive = effect(GitManager, fn$1("makeGitManager")(function* () {
283509
283536
  result
283510
283537
  });
283511
283538
  return result;
283512
- })().pipe(ensuring(invalidateStatus(input.cwd)), tapError((error) => flatMap(get$5(currentPhase), (phase) => progress.emit({
283539
+ })().pipe(ensuring(invalidateStatus(input.cwd)), tapError((error) => flatMap(get$6(currentPhase), (phase) => progress.emit({
283513
283540
  kind: "action_failed",
283514
283541
  phase: getOrNull(phase),
283515
283542
  message: error.message
@@ -286598,7 +286625,7 @@ function normalizeCount(count) {
286598
286625
  return Number.isFinite(count) ? Math.max(0, Math.floor(count)) : 0;
286599
286626
  }
286600
286627
  const makeRuntimeDrainState = gen(function* () {
286601
- const stateRef = yield* make$49(initialState);
286628
+ const stateRef = yield* make$50(initialState);
286602
286629
  const update = (f) => updateAndGet(stateRef, f).pipe(map$3(snapshotFromState));
286603
286630
  return {
286604
286631
  beginTurn: (input) => update((state) => {
@@ -286649,8 +286676,8 @@ const makeRuntimeDrainState = gen(function* () {
286649
286676
  drainTargetImageVersion: input.drainTargetImageVersion ?? state.drainTargetImageVersion,
286650
286677
  drainForceRequired: input.drainForceRequired ?? state.drainForceRequired
286651
286678
  })),
286652
- snapshot: get$5(stateRef).pipe(map$3(snapshotFromState)),
286653
- isDraining: get$5(stateRef).pipe(map$3((state) => state.draining))
286679
+ snapshot: get$6(stateRef).pipe(map$3(snapshotFromState)),
286680
+ isDraining: get$6(stateRef).pipe(map$3((state) => state.draining))
286654
286681
  };
286655
286682
  });
286656
286683
  var RuntimeDrainState = class extends Service$1()("forge/runtimeDrain/RuntimeDrainState") {};
@@ -287203,17 +287230,17 @@ const ProviderRuntimeIngestionLive = effect(ProviderRuntimeIngestionService, fn$
287203
287230
  const browserManager = yield* BrowserManager;
287204
287231
  const runtimeDrainState = yield* RuntimeDrainState;
287205
287232
  const runtimeDrainReporter = yield* RuntimeDrainReporter;
287206
- const turnMessageIdsByTurnKey = yield* make$50({
287233
+ const turnMessageIdsByTurnKey = yield* make$51({
287207
287234
  capacity: TURN_MESSAGE_IDS_BY_TURN_CACHE_CAPACITY,
287208
287235
  timeToLive: TURN_MESSAGE_IDS_BY_TURN_TTL,
287209
287236
  lookup: () => succeed(/* @__PURE__ */ new Set())
287210
287237
  });
287211
- const bufferedAssistantTextByMessageId = yield* make$50({
287238
+ const bufferedAssistantTextByMessageId = yield* make$51({
287212
287239
  capacity: BUFFERED_MESSAGE_TEXT_BY_MESSAGE_ID_CACHE_CAPACITY,
287213
287240
  timeToLive: BUFFERED_MESSAGE_TEXT_BY_MESSAGE_ID_TTL,
287214
287241
  lookup: () => succeed("")
287215
287242
  });
287216
- const bufferedProposedPlanById = yield* make$50({
287243
+ const bufferedProposedPlanById = yield* make$51({
287217
287244
  capacity: BUFFERED_PROPOSED_PLAN_BY_ID_CACHE_CAPACITY,
287218
287245
  timeToLive: BUFFERED_PROPOSED_PLAN_BY_ID_TTL,
287219
287246
  lookup: () => succeed({
@@ -288052,7 +288079,7 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
288052
288079
  const serverSettingsService = yield* ServerSettingsService;
288053
288080
  const serverConfig = yield* ServerConfig;
288054
288081
  const runtimeDrainState = yield* RuntimeDrainState;
288055
- const handledTurnStartKeys = yield* make$50({
288082
+ const handledTurnStartKeys = yield* make$51({
288056
288083
  capacity: HANDLED_TURN_START_KEY_MAX,
288057
288084
  timeToLive: HANDLED_TURN_START_KEY_TTL,
288058
288085
  lookup: () => succeed(true)
@@ -290844,7 +290871,7 @@ const readOpenCodeApiKey = (_settings) => process.env.OPENCODE_API_KEY || proces
290844
290871
  const runOpenCodeCommand = fn$1("runOpenCodeCommand")(function* (binaryPath, args) {
290845
290872
  const useShell = process.platform === "win32";
290846
290873
  if (useShell && !isShellSafeCommandPath(binaryPath)) return yield* fail(/* @__PURE__ */ new Error(`Refusing to spawn opencode: \`binaryPath\` contains shell metacharacters that cmd.exe would interpret as additional commands.`));
290847
- return yield* spawnAndCollect(binaryPath, make$47(binaryPath, [...args], {
290874
+ return yield* spawnAndCollect(binaryPath, make$48(binaryPath, [...args], {
290848
290875
  shell: useShell,
290849
290876
  env: scrubForgeProviderChildEnvSecrets(process.env)
290850
290877
  }));
@@ -291087,7 +291114,7 @@ const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
291087
291114
  provider
291088
291115
  })]));
291089
291116
  const fallbackByProvider = new Map(fallbackProviders.map((provider) => [provider.provider, provider]));
291090
- const providersRef = yield* make$49(yield* forEach(PROVIDER_CACHE_IDS, (provider) => {
291117
+ const providersRef = yield* make$50(yield* forEach(PROVIDER_CACHE_IDS, (provider) => {
291091
291118
  const filePath = cachePathByProvider.get(provider);
291092
291119
  const fallbackProvider = fallbackByProvider.get(provider);
291093
291120
  return readProviderStatusCache(filePath).pipe(provideService(FileSystem, fileSystem), map$3((cachedProvider) => {
@@ -291145,7 +291172,7 @@ const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
291145
291172
  ], {
291146
291173
  concurrency: "unbounded",
291147
291174
  discard: true
291148
- }).pipe(andThen(get$5(providersRef)));
291175
+ }).pipe(andThen(get$6(providersRef)));
291149
291176
  }
291150
291177
  });
291151
291178
  yield* runForEach(codexProvider.streamChanges, (provider) => syncProvider(provider)).pipe(forkScoped);
@@ -291156,7 +291183,7 @@ const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
291156
291183
  yield* runForEach(cursorProvider.streamChanges, (provider) => syncProvider(provider)).pipe(forkScoped);
291157
291184
  yield* runForEach(opencodeProvider.streamChanges, (provider) => syncProvider(provider)).pipe(forkScoped);
291158
291185
  return {
291159
- getProviders: get$5(providersRef),
291186
+ getProviders: get$6(providersRef),
291160
291187
  refresh: (provider) => refresh(provider).pipe(tapError(logError), orElseSucceed(() => [])),
291161
291188
  get streamChanges() {
291162
291189
  return fromPubSub(changesPubSub);
@@ -291526,7 +291553,7 @@ const RepositoryIdentityResolverLive = effect(RepositoryIdentityResolver, fn$1("
291526
291553
  });
291527
291554
  return { resolve: fn$1("RepositoryIdentityResolver.resolve")(function* (cwd) {
291528
291555
  const location = yield* promise(() => resolveRepositoryLocation(cwd));
291529
- const baseIdentity = yield* get$7(repositoryIdentityCache, location.cacheKey);
291556
+ const baseIdentity = yield* get$8(repositoryIdentityCache, location.cacheKey);
291530
291557
  if (baseIdentity === null) return null;
291531
291558
  return location.subpath === null ? baseIdentity : {
291532
291559
  ...baseIdentity,
@@ -291835,7 +291862,7 @@ const WorkspaceEntriesLive = effect(WorkspaceEntries, gen(function* () {
291835
291862
  if (normalizedCwd !== cwd) yield* invalidate(workspaceIndexCache, normalizedCwd);
291836
291863
  });
291837
291864
  const search = fn$1("WorkspaceEntries.search")(function* (input) {
291838
- return yield* get$7(workspaceIndexCache, yield* normalizeWorkspaceRoot(input.cwd)).pipe(map$3((index) => {
291865
+ return yield* get$8(workspaceIndexCache, yield* normalizeWorkspaceRoot(input.cwd)).pipe(map$3((index) => {
291839
291866
  const normalizedQuery = normalizeSearchQuery(input.query, { trimLeadingPattern: /^[@./]+/ });
291840
291867
  const limit = Math.max(0, Math.floor(input.limit));
291841
291868
  const rankedEntries = [];
@@ -291859,7 +291886,7 @@ const WorkspaceEntriesLive = effect(WorkspaceEntries, gen(function* () {
291859
291886
  return {
291860
291887
  invalidate: invalidate$1,
291861
291888
  list: fn$1("WorkspaceEntries.list")(function* (input) {
291862
- const index = yield* get$7(workspaceIndexCache, yield* normalizeWorkspaceRoot(input.cwd));
291889
+ const index = yield* get$8(workspaceIndexCache, yield* normalizeWorkspaceRoot(input.cwd));
291863
291890
  return {
291864
291891
  entries: index.entries.map((entry) => ({
291865
291892
  path: entry.path,
@@ -293493,7 +293520,7 @@ function resolveBuildCommitFromEnv(env) {
293493
293520
  * environment descriptor down instead of reporting an honest "unknown".
293494
293521
  */
293495
293522
  function readBakedBuildCommit() {
293496
- return "75c8e9532c9e35e71d4da1d8d45474fa2855ff1d";
293523
+ return "fe3ee5efe095539824d092372a8dde00f1e2f98c";
293497
293524
  }
293498
293525
  async function resolveServerBuildCommit(input) {
293499
293526
  if (isFullCommitSha(input.baked)) return input.baked;
@@ -293667,7 +293694,7 @@ const ServerEnvironmentLive = effect(ServerEnvironment, fn$1("makeServerEnvironm
293667
293694
  return yield* decodeUnknownEffect(EnvironmentMetadata)(parsed).pipe(orElseSucceed(() => ({ displayName: null })));
293668
293695
  });
293669
293696
  const writeMetadata = (metadata) => fileSystem.writeFileString(serverConfig.environmentMetadataPath, `${JSON.stringify(metadata, null, 2)}\n`);
293670
- const displayNameOverrideRef = yield* make$49(normalizeDisplayName((yield* readMetadata).displayName ?? null));
293697
+ const displayNameOverrideRef = yield* make$50(normalizeDisplayName((yield* readMetadata).displayName ?? null));
293671
293698
  const posthog = yield* PosthogPublicConfig.asEffect();
293672
293699
  const buildCommit = yield* promise(() => resolveServerBuildCommit({
293673
293700
  baked: readBakedBuildCommit(),
@@ -293676,7 +293703,7 @@ const ServerEnvironmentLive = effect(ServerEnvironment, fn$1("makeServerEnvironm
293676
293703
  }));
293677
293704
  const deviceRuntimeId = resolveDescriptorDeviceRuntimeId(serverConfig);
293678
293705
  const buildDescriptor = gen(function* () {
293679
- const displayNameOverride = yield* get$5(displayNameOverrideRef);
293706
+ const displayNameOverride = yield* get$6(displayNameOverrideRef);
293680
293707
  const os = platformOs();
293681
293708
  return {
293682
293709
  environmentId,
@@ -294912,7 +294939,7 @@ const generatePairingToken = () => {
294912
294939
  const BootstrapCredentialServiceLive = effect(BootstrapCredentialService, gen(function* () {
294913
294940
  const config = yield* ServerConfig;
294914
294941
  const pairingLinks = yield* AuthPairingLinkRepository;
294915
- const seededGrantsRef = yield* make$49(/* @__PURE__ */ new Map());
294942
+ const seededGrantsRef = yield* make$50(/* @__PURE__ */ new Map());
294916
294943
  const changesPubSub = yield* unbounded$1();
294917
294944
  const invalidBootstrapCredentialError = (message) => new BootstrapCredentialError({
294918
294945
  message,
@@ -295357,7 +295384,7 @@ const SessionCredentialServiceLive = effect(SessionCredentialService, gen(functi
295357
295384
  if (serverConfig.forgeCloudShellMode === true && configuredSigningKey === null) return yield* die$1(/* @__PURE__ */ new Error("FORGE_SESSION_SIGNING_KEY must decode to at least 32 bytes in cloud-shell mode. Forge Cloud refuses to issue restart-unsafe or replica-local sessions."));
295358
295385
  const signingSecret = configuredSigningKey ?? (yield* secretStore.getOrCreateRandom(SIGNING_SECRET_NAME, 32));
295359
295386
  const statelessCookieSessions = configuredSigningKey !== null;
295360
- const connectedSessionsRef = yield* make$49(/* @__PURE__ */ new Map());
295387
+ const connectedSessionsRef = yield* make$50(/* @__PURE__ */ new Map());
295361
295388
  const changesPubSub = yield* unbounded$1();
295362
295389
  const cookieName = resolveSessionCookieName({
295363
295390
  mode: serverConfig.mode,
@@ -295379,7 +295406,7 @@ const SessionCredentialServiceLive = effect(SessionCredentialService, gen(functi
295379
295406
  const loadActiveSession = (sessionId) => gen(function* () {
295380
295407
  const row = yield* authSessions.getById({ sessionId });
295381
295408
  if (isNone(row) || row.value.revokedAt !== null) return none$4();
295382
- const connectedSessions = yield* get$5(connectedSessionsRef);
295409
+ const connectedSessions = yield* get$6(connectedSessionsRef);
295383
295410
  return some(toAuthClientSession({
295384
295411
  sessionId: row.value.sessionId,
295385
295412
  subject: row.value.subject,
@@ -295544,7 +295571,7 @@ const SessionCredentialServiceLive = effect(SessionCredentialService, gen(functi
295544
295571
  })));
295545
295572
  const listActive = () => gen(function* () {
295546
295573
  const now$1 = yield* now;
295547
- const connectedSessions = yield* get$5(connectedSessionsRef);
295574
+ const connectedSessions = yield* get$6(connectedSessionsRef);
295548
295575
  return (yield* authSessions.listActive({ now: now$1 })).map((row) => toAuthClientSession({
295549
295576
  sessionId: row.sessionId,
295550
295577
  subject: row.subject,
@@ -306805,7 +306832,7 @@ const RuntimeReplicationLive = effect(RuntimeReplication, gen(function* () {
306805
306832
  const terminal = yield* serviceOption(TerminalManager);
306806
306833
  const activeHourMeter = yield* ActiveHourMeter;
306807
306834
  const runtimeId = resolveRuntimeReplicationRuntimeId(config);
306808
- const outboxWarningActive = yield* make$49(false);
306835
+ const outboxWarningActive = yield* make$50(false);
306809
306836
  const enqueueInventoryPayload = (payload) => runtimeId ? outbox.enqueue({
306810
306837
  runtimeId,
306811
306838
  streamKey: "inventory",
@@ -308060,7 +308087,7 @@ const isActiveHourMeteringEnabled = gen(function* () {
308060
308087
  }).pipe(catch_(() => succeed(false)));
308061
308088
  const ActiveHourMeterLive = effect(ActiveHourMeter, gen(function* () {
308062
308089
  const outbox = yield* RuntimeReplicationOutbox;
308063
- const statesByRuntime = yield* make$49(/* @__PURE__ */ new Map());
308090
+ const statesByRuntime = yield* make$50(/* @__PURE__ */ new Map());
308064
308091
  const markAwake = (runtimeId) => gen(function* () {
308065
308092
  if (!(yield* isActiveHourMeteringEnabled)) return;
308066
308093
  yield* update$4(statesByRuntime, (states) => {
@@ -310447,11 +310474,11 @@ const PipelineRunCoordinatorLive = effect(PipelineRunCoordinator, gen(function*
310447
310474
  if (!preparedHandoffMatchesRun(preparedHandoff, input.runId)) return yield* coordinatorError("registerHandoff", "PIPELINE_HANDOFF_PREPARATION_INVALID", "The pipeline handoff preparation is missing, belongs to another run, or was already consumed.");
310448
310475
  preparedHandoffs.delete(input.preparedHandoff);
310449
310476
  const ownedProviderAuthorityInstallations = /* @__PURE__ */ new Set();
310450
- const preparedAuthorityRef = yield* make$49({
310477
+ const preparedAuthorityRef = yield* make$50({
310451
310478
  authority: preparedHandoff.authority,
310452
310479
  preparation: preparedHandoff.providerAuthorityPreparation
310453
310480
  });
310454
- const acceptingHeartbeatRef = yield* make$49(true);
310481
+ const acceptingHeartbeatRef = yield* make$50(true);
310455
310482
  const heartbeatPublicationSemaphore = yield* make$43(1);
310456
310483
  if ((yield* store.getByRunId(input.runId)) !== null) return yield* coordinatorError("registerHandoff", "PIPELINE_HANDOFF_ALREADY_BOUND", "The CMMD run already has a Forge task thread and must use the authority rebind contract.");
310457
310484
  const snapshot = preparedHandoff.snapshot;
@@ -310486,7 +310513,7 @@ const PipelineRunCoordinatorLive = effect(PipelineRunCoordinator, gen(function*
310486
310513
  contextHash: preparedHandoff.authority.contextHash,
310487
310514
  contextSnapshot: snapshot.run.contextSnapshot
310488
310515
  }).pipe(mapError((cause) => coordinatorError("registerHandoff", "PIPELINE_CONTEXT_ARTIFACT_FAILED", "The immutable CMMD run context could not be materialized for the provider.", cause)));
310489
- const latestPreparedAuthority = yield* heartbeatPublicationSemaphore.withPermits(1)(set$2(acceptingHeartbeatRef, false).pipe(andThen(get$5(preparedAuthorityRef))));
310516
+ const latestPreparedAuthority = yield* heartbeatPublicationSemaphore.withPermits(1)(set$2(acceptingHeartbeatRef, false).pipe(andThen(get$6(preparedAuthorityRef))));
310490
310517
  const persistedAuthority = yield* persistAuthoritySecret({
310491
310518
  runId: input.runId,
310492
310519
  organizationId: latestPreparedAuthority.authority.organizationId,
@@ -310560,7 +310587,7 @@ const PipelineRunCoordinatorLive = effect(PipelineRunCoordinator, gen(function*
310560
310587
  executionSessionInstallations.set(input.runId, rollbackSession);
310561
310588
  }), gen(function* () {
310562
310589
  yield* sleep$4(seconds(30));
310563
- const currentAuthority = (yield* get$5(preparedAuthorityRef)).authority;
310590
+ const currentAuthority = (yield* get$6(preparedAuthorityRef)).authority;
310564
310591
  const heartbeat = yield* client.heartbeat({
310565
310592
  runId: input.runId,
310566
310593
  authority: currentAuthority,
@@ -310572,7 +310599,7 @@ const PipelineRunCoordinatorLive = effect(PipelineRunCoordinator, gen(function*
310572
310599
  heartbeat
310573
310600
  });
310574
310601
  yield* heartbeatPublicationSemaphore.withPermits(1)(gen(function* () {
310575
- if (!(yield* get$5(acceptingHeartbeatRef))) return;
310602
+ if (!(yield* get$6(acceptingHeartbeatRef))) return;
310576
310603
  yield* set$2(preparedAuthorityRef, {
310577
310604
  authority: heartbeat.refreshedAuthority,
310578
310605
  preparation
@@ -315296,9 +315323,9 @@ const AgentProtocolReactorLive = effect(AgentProtocolReactor, gen(function* () {
315296
315323
  const PRUNE_GRACE_MS = 6e4;
315297
315324
  const makeUserSlot = gen(function* () {
315298
315325
  return {
315299
- snapshotRef: yield* make$49(null),
315326
+ snapshotRef: yield* make$50(null),
315300
315327
  pubsub: yield* unbounded$1(),
315301
- subscriberCountRef: yield* make$49(0)
315328
+ subscriberCountRef: yield* make$50(0)
315302
315329
  };
315303
315330
  });
315304
315331
  const WorkspaceReadinessStateLive = effect(WorkspaceReadinessState, gen(function* () {
@@ -315338,14 +315365,14 @@ const WorkspaceReadinessStateLive = effect(WorkspaceReadinessState, gen(function
315338
315365
  */
315339
315366
  const schedulePrune = (userId, slot) => gen(function* () {
315340
315367
  yield* sleep$4(millis(PRUNE_GRACE_MS));
315341
- if ((yield* get$5(slot.subscriberCountRef)) > 0) return;
315342
- if ((yield* get$5(slot.snapshotRef))?.phase !== "app-ready") return;
315368
+ if ((yield* get$6(slot.subscriberCountRef)) > 0) return;
315369
+ if ((yield* get$6(slot.snapshotRef))?.phase !== "app-ready") return;
315343
315370
  yield* shutdown$2(slot.pubsub);
315344
315371
  yield* removeSlot(userId);
315345
315372
  }).pipe(forkIn(pruneScope), asVoid);
315346
315373
  const update = (userId, event) => gen(function* () {
315347
315374
  const slot = yield* getOrCreateSlot(userId);
315348
- const previous = yield* get$5(slot.snapshotRef);
315375
+ const previous = yield* get$6(slot.snapshotRef);
315349
315376
  if (previous !== null && event.ts < previous.ts) return;
315350
315377
  yield* set$2(slot.snapshotRef, event);
315351
315378
  yield* publish(slot.pubsub, event);
@@ -315354,7 +315381,7 @@ const WorkspaceReadinessStateLive = effect(WorkspaceReadinessState, gen(function
315354
315381
  const snapshot = (userId) => gen(function* () {
315355
315382
  const slot = (yield* get$2(slotsRef)).get(userId);
315356
315383
  if (!slot) return null;
315357
- return yield* get$5(slot.snapshotRef);
315384
+ return yield* get$6(slot.snapshotRef);
315358
315385
  });
315359
315386
  /**
315360
315387
  * Stream of phase events for `userId`. Emits the current snapshot first
@@ -315363,7 +315390,7 @@ const WorkspaceReadinessStateLive = effect(WorkspaceReadinessState, gen(function
315363
315390
  */
315364
315391
  const subscribe = (userId) => unwrap$1(gen(function* () {
315365
315392
  const slot = yield* getOrCreateSlot(userId);
315366
- const initial = yield* get$5(slot.snapshotRef);
315393
+ const initial = yield* get$6(slot.snapshotRef);
315367
315394
  const live = fromPubSub(slot.pubsub);
315368
315395
  const stream = initial === null ? live : concat$2(succeed$4(initial), live);
315369
315396
  yield* update$4(slot.subscriberCountRef, (n) => n + 1);
@@ -316339,13 +316366,13 @@ const gitUrlCloneRouteLayer = add$1("POST", "/api/cloud/git/clone-url", gen(func
316339
316366
  //#endregion
316340
316367
  //#region src/server.ts
316341
316368
  const PtyAdapterLive = unwrap(gen(function* () {
316342
- if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunPTY-C_ONQ8rt.mjs"))).layer;
316343
- else return (yield* promise(() => import("./NodePTY-DU_KoZdd.mjs"))).layer;
316369
+ if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunPTY-oVISucl_.mjs"))).layer;
316370
+ else return (yield* promise(() => import("./NodePTY-CVH2yNYl.mjs"))).layer;
316344
316371
  }));
316345
316372
  const HttpServerLive = unwrap(gen(function* () {
316346
316373
  const config = yield* ServerConfig;
316347
- if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunHttpServer-GM72b26K.mjs"))).layer(bunHttpServerOptions(config));
316348
- const [NodeHttpServer, NodeHttp] = yield* all([promise(() => import("./NodeHttpServer-DmEyd0J4.mjs")), promise(() => import("node:http"))]);
316374
+ if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunHttpServer-VI75aqJw.mjs"))).layer(bunHttpServerOptions(config));
316375
+ const [NodeHttpServer, NodeHttp] = yield* all([promise(() => import("./NodeHttpServer-Dw7ivXfX.mjs")), promise(() => import("node:http"))]);
316349
316376
  return NodeHttpServer.layer(NodeHttp.createServer, {
316350
316377
  host: config.host,
316351
316378
  port: config.port
@@ -316353,10 +316380,10 @@ const HttpServerLive = unwrap(gen(function* () {
316353
316380
  }));
316354
316381
  const PlatformServicesLive = unwrap(gen(function* () {
316355
316382
  if (typeof Bun !== "undefined") {
316356
- const { layer } = yield* promise(() => import("./BunServices-B-6JkR0Q.mjs"));
316383
+ const { layer } = yield* promise(() => import("./BunServices-D0JTDujL.mjs"));
316357
316384
  return layer;
316358
316385
  } else {
316359
- const { layer } = yield* promise(() => import("./NodeServices-DeNLW36O.mjs").then((n) => n.t));
316386
+ const { layer } = yield* promise(() => import("./NodeServices-CBNXOYLG.mjs").then((n) => n.t));
316360
316387
  return layer;
316361
316388
  }
316362
316389
  }));
@@ -317041,12 +317068,12 @@ const findActiveProjectTarget = fn$1("findActiveProjectTarget")(function* (input
317041
317068
  workspaceRoot: resolved.workspaceRoot
317042
317069
  };
317043
317070
  });
317044
- const fetchLiveOrchestrationSnapshot = (origin, bearerToken$1) => runLiveServerRequest(get$6(`${origin}/api/orchestration/snapshot`).pipe(acceptJson, bearerToken(bearerToken$1)), matchStatus({
317071
+ const fetchLiveOrchestrationSnapshot = (origin, bearerToken$1) => runLiveServerRequest(get$7(`${origin}/api/orchestration/snapshot`).pipe(acceptJson, bearerToken(bearerToken$1)), matchStatus({
317045
317072
  "2xx": decodeOrchestrationReadModelResponse,
317046
317073
  orElse: (response) => readErrorMessageFromResponse(response).pipe(flatMap((message) => fail(new Error(message))))
317047
317074
  }));
317048
317075
  const ProjectLeadExplanationEnvelope = Struct({ data: ProjectLeadExplanationSchema });
317049
- const fetchLiveProjectLeadExplanation = (origin, bearerToken$3, projectId) => runLiveServerRequest(get$6(`${origin}/api/cmmd/projects/${projectId}/project-lead/explain`).pipe(acceptJson, bearerToken(bearerToken$3)), matchStatus({
317076
+ const fetchLiveProjectLeadExplanation = (origin, bearerToken$3, projectId) => runLiveServerRequest(get$7(`${origin}/api/cmmd/projects/${projectId}/project-lead/explain`).pipe(acceptJson, bearerToken(bearerToken$3)), matchStatus({
317050
317077
  "2xx": (response) => schemaBodyJson$1(ProjectLeadExplanationEnvelope)(response).pipe(map$3((body) => body.data)),
317051
317078
  orElse: (response) => readErrorMessageFromResponse(response).pipe(flatMap((message) => fail(new Error(message))))
317052
317079
  }));
@@ -317351,7 +317378,7 @@ const connectLoginCommand = make$34("login", {
317351
317378
  })).json();
317352
317379
  },
317353
317380
  openBrowser: async (url) => {
317354
- const open = (await import("./open-D8mGyWmt.mjs")).default;
317381
+ const open = (await import("./open-FIgTDosf.mjs")).default;
317355
317382
  await open(url);
317356
317383
  return true;
317357
317384
  },