@cmmd-center/forge 0.13.77 → 0.13.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BunHttpServer-DjilmGOM.mjs → BunHttpServer-BpaVqxli.mjs} +6 -6
- package/dist/{BunHttpServer-CXndtc1j.cjs → BunHttpServer-DTG5XWSi.cjs} +7 -7
- package/dist/{BunPTY-BiTlUj63.cjs → BunPTY-DkR9y_Jg.cjs} +3 -3
- package/dist/{BunPTY-Csgwhbi5.mjs → BunPTY-DsRB6_t-.mjs} +3 -3
- package/dist/{BunServices-BZKzHdrG.mjs → BunServices-ZpOiNNsP.mjs} +3 -3
- package/dist/{BunServices-DsWG7VM1.cjs → BunServices-blx5Lx2N.cjs} +3 -3
- package/dist/{Cache-BmGc_2BZ.cjs → Cache-D-JaJz5Q.cjs} +3 -3
- package/dist/{Cache-D57GWb9-.mjs → Cache-DOwpGEYJ.mjs} +3 -3
- package/dist/{Config-Cdfpphpo.mjs → Config-BnFFyBjD.mjs} +2 -2
- package/dist/{Config-CwKCCk14.cjs → Config-pbf0GGHJ.cjs} +2 -2
- package/dist/{HttpServer-Bclwvu0I.mjs → HttpServer-5UTabe01.mjs} +3 -3
- package/dist/{HttpServer-BBzRBmVt.cjs → HttpServer-DZ6iaxyk.cjs} +12 -12
- package/dist/{NodeHttpServer-Ds3Gp1Gp.mjs → NodeHttpServer-DePOzmYy.mjs} +7 -7
- package/dist/{NodeHttpServer-B4dCKqYY.cjs → NodeHttpServer-RV5QsVeb.cjs} +7 -7
- package/dist/{NodePTY-DgXWLtWp.mjs → NodePTY-Dduv48Vi.mjs} +4 -4
- package/dist/{NodePTY-BJ7874MO.cjs → NodePTY-DkaJNgpi.cjs} +4 -4
- package/dist/{NodeServices-CtC4a-h5.cjs → NodeServices-BkfWZHfh.cjs} +3 -3
- package/dist/{NodeServices-D3IxOzHl.mjs → NodeServices-Bt1GwPBR.mjs} +3 -3
- package/dist/{NodeServices-BvdIc9Vh.cjs → NodeServices-CocSeCvl.cjs} +1 -1
- package/dist/{NodeSqliteClient-D29w60zZ.mjs → NodeSqliteClient-BpmyZDcj.mjs} +6 -6
- package/dist/{NodeSqliteClient-CPsJxxdD.cjs → NodeSqliteClient-VL8Dgl03.cjs} +7 -7
- package/dist/{NodeTerminal-9iHZIdt1.mjs → NodeTerminal-CeaWke6-.mjs} +3 -3
- package/dist/{NodeTerminal-CO-i-6Je.cjs → NodeTerminal-DQESKR0W.cjs} +3 -3
- package/dist/{PTY-BzdbZ0Ym.mjs → PTY-BRT13Y8S.mjs} +2 -2
- package/dist/{PTY-B4ZctbwQ.cjs → PTY-C8ypptmz.cjs} +2 -2
- package/dist/{Path-CZJ1gPPo.mjs → Path-BIaGSU2M.mjs} +34 -3
- package/dist/{Path-BQOH_fWQ.cjs → Path-Dp3btyUm.cjs} +40 -3
- package/dist/{Schema-DOBWF8gQ.mjs → Schema-Ay3DUM83.mjs} +82 -11
- package/dist/{Schema-CDCJ3xZo.cjs → Schema-DxddW8-V.cjs} +105 -10
- package/dist/{SqlError-BMBkezUO.mjs → SqlError-BBR7DPrQ.mjs} +3 -3
- package/dist/{SqlError-g4pLzNWR.cjs → SqlError-BqOsoG0V.cjs} +3 -3
- package/dist/{SqliteClient-k0pbfeIC.cjs → SqliteClient-BgoGs_ji.cjs} +6 -6
- package/dist/{SqliteClient-Bgo_s5sA.mjs → SqliteClient-DQYXFVMu.mjs} +5 -5
- package/dist/bin.cjs +458 -49
- package/dist/bin.mjs +455 -46
- package/dist/client/assets/{DiffPanel-CtO6uWUR.js → DiffPanel-DxiNj12C.js} +2 -2
- package/dist/client/assets/{DiffPanel.logic-D0ANxwBg.js → DiffPanel.logic-D7xB9Erg.js} +2 -2
- package/dist/client/assets/{DiffPanelShell-C_jUanNz.js → DiffPanelShell-1dMsYoGN.js} +115 -112
- package/dist/client/assets/{DiffWorkerPoolProvider-BAShH3us.js → DiffWorkerPoolProvider-BS3XcZ9G.js} +2 -2
- package/dist/client/assets/{PullRequestCodePanel-BK_z4V5D.js → PullRequestCodePanel-BXvOtt5U.js} +2 -2
- package/dist/client/assets/{Virtualizer-D6ltPf0M.js → Virtualizer-DcohbA3j.js} +2 -2
- package/dist/client/assets/{index-Wp8UVHJj.js → index-BGgOXu17.js} +13 -13
- package/dist/client/index.html +4 -4
- package/dist/forge-build.json +1 -1
- 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, $a as make$39, $
|
|
5
|
-
import { $ as
|
|
6
|
-
import { _ as ChildProcessSpawner, a as Stdio, g as make$48, o as make$49, r as isQuitError } from "./NodeTerminal-
|
|
7
|
-
import { n as layer$7 } from "./NodeServices-
|
|
8
|
-
import { $ as file, A as SocketErrorReason, At as merge$5, Bt as set$3, 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-
|
|
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-
|
|
10
|
-
import { a as make$51, i as keys, n as getOption, o as makeWith$1, r as invalidate, s as set$4, t as get$8 } from "./Cache-
|
|
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-
|
|
4
|
+
import { $ as encodeEffect, $a as make$39, $i as spaced, $n as filterMapOrFail, $r as runPromise, $s as max, $t as stringifyJson, Aa as Scope$1, Ai as void_$1, An as cached$3, Ar as match$1, As as uninterruptibleMask, At as withConstructorDefault, Ba as CurrentLogSpans, Bi as counter, Bn as catch_, Bo as addFinalizer, Br as orDie, Bs as make$42, Bt as head, C as Record, Ca as mergeAll, Cc as map$4, Ci as tx$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, Dn as as$3, Do as interruptors, Ds as suspend, Dt as toCodecStringTree, E as TaggedErrorClass, Ea as succeed$2, Ec as sort, Ei as uninterruptible, En as annotateSpans, Eo as interrupt$2, Er as map$3, Et as toCodecJson, F as UndefinedOr, Fa as forkUnsafe, Fc as fail$1, Fi as withParentSpan, Fn as catchFilter, Fr as onError$1, Fs as MinimumTraceLevel, G as decodeExit, Ga as done, Gc as empty$1, Gi as withAttributes, Gl as hasProperty, Gn as die$1, Gr as provideService, Gs as format$1, Gt as Transformation, H as declare, Hc as Reference$1, Hi as snapshotUnsafe, Hn as contextWith, Ho as as$2, Hr as promise, Ht as size$2, I as Union, Ia as make$37, 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, Jl as isNotUndefined, Jn as exit, Jr as repeat, Js as hours, Jt as transformOrFail, K as decodeSync, Kc as get$3, Ki as addDelay, Kl as isNotNull, Ko as consolePretty$1, Kr as race, Ks as fromInput, L as Unknown, La as makeUnsafe$4, 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, Ml as NodeInspectSymbol, Mn as callback, Mo as pretty, Ms as void_$2, Na as close, Ni as withFiber$1, Nl as toJson, Nn as catchCause, No as prettyErrors, Nr as matchEffect, O as TemplateLiteral, Oa as sync$2, Ol as isEffect$1, On as asSome, Or as mapError, Os as sync, Ot as toJsonSchemaDocument, P as Undefined, Pa as closeUnsafe, Pl as format, Pn as catchDefect, Po as squash, Pr as never$1, Q as encode$4, Qc as merge$2, Qi as recurs, Qn as filter$1, Qr as runForkWith, R as UnknownFromJsonString$1, Ra as provide$2, Rc as isFailure$1, Ri as yieldNow, Rl as equals, 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, Tc as reverse, Ti as undefined_, Tn as annotateLogs, To as hasInterruptsOnly, Tr as makeSpanScoped, Tt as tag, Ua as TracerTimingEnabled, Uc as Service$1, Ui as timer, Un as currentSpan, Ur as provide, Ut as toArray, V as brand, Va as MinimumLogLevel, Vc as succeed$1, Vi as gauge, Vn as context, Vo as andThen$1, Vr as orElseSucceed, Vt as isEmpty$2, W as decodeEffect, Wa as _await, Wc as add$2, Wi as update$3, Wl as compose$1, Wr as provideContext, Ws as days, X as decodeUnknownOption, Xc as make$35, Xl as isObject$1, Xn as failCause$1, Xr as retry, Xt as onSome, Y as decodeUnknownExit, Yc as getUnsafe$1, Yi as forever$2, Yl as isNullish, Yn as fail, Yr as result, Z as decodeUnknownSync, Za as isDeferred, Zc as makeUnsafe$3, Zi as passthrough$1, Zl as isTagged, Zr as runFork, Zs as isGreaterThan$1, 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 sum$1, al as getOrElse, an as value, ao as interrupt$3, ar as fnUntraced, at as isBetween, au as constVoid, b as NullOr, bi as timeoutOrElse, bl as PipeInspectableProto, bn as acquireUseRelease, br as logDebug, bs as reportCauseUnsafe, bt as makeFilter, c as Defect, ca as Clock, cc as toSeconds, ci as sleep$4, cl as isNone, cn as add$3, co as match$2, cr as forkChild, cs as flatMap$1, ct as isGreaterThanOrEqualTo, d as Exit, dc as empty$3, di as succeedSome, dl as match, dn as isGreaterThanOrEqualTo$1, dr as forkScoped, ds as forkDetach, dt as isMaxLength, du as pipeArguments, ea as catchDone, ec as millis, el as firstSomeOf, er as filterOrFail, et as encodeSync, eu as cast, fa as TaggedError, fc as ensure, fi as suspend$1, fl as none$4, fn as make$38, fr as gen, ft as isMaxProperties, g as Never, ga as effect, gi as tapError, gn as toEpochMillis, gr as interruptible, gt as isSchema, h as Literals, ha as buildWithMemoMap, hc as fromIterable, hi as tapCause, hl as make$41, hn as toDate, hr as interrupt$1, ht as isPattern, i as Class, ic as subtract, ii as scoped, il as fromUndefinedOr, in as make$40, io as failCause$2, ir as fn$1, it as is$1, iu as constUndefined, 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 withFiber, kn as asVoid, ks as tracerLogger$1, kt as toType, l as Duration, la as currentTimeMillis, lc as zero, li as succeed, ll as isSome, ln as distance, lr as forkDetach$1, ls as fnUntraced$1, lt as isInt, lu as identity, m as Literal, ma as build, mc as flatMapNullishOr, mi as tap, ml as Number$2, mn as now, mo as StackTrace, mr as ignoreCause, ms as loggerMake, mt as isNonEmpty, n as ArraySchema, nc as minutes, nl as flatten$1, no as die$2, nt as encodeUnknownExit, o as DateTimeUtcFromString, oa as clamp, oc as times, oi as service, ol as getOrNull, oo as isFailure, or as forEach, ot as isFinite$1, ou as constant, p as Int$1, pa as CurrentMemoMap, pc as filter, pi as sync$1, pl as some, pn as makeUnsafe$5, po as NoSuchElementError, pr as ignore, pt as isMinLength, q as decodeTo, qa as fail$3, qi as both, ql as isNotNullish, qn as ensuring, qr as raceFirst, qs as fromInputUnsafe, r as Boolean$1, ra as isDoneCause, rc as seconds, ri as scope$1, rl as fromNullishOr, rn as makeFormatterDefault, ro as fail$2, rr as flatten$2, rt as fromJsonString, ru as constTrue, sa as parse$6, sc as toMillis, si as serviceOption, sl as getOrUndefined, sn as encodeBase64Url$2, so as isSuccess, sr as forever$1, st as isGreaterThan, su as dual, t as Any, tc as min, ti as runPromiseWith, tl as flatMap$2, tn as InvalidValue$1, to as succeed$3, tr as flatMap, ts as fiberInterrupt, tt as encodeUnknownEffect, tu as compose, u as ErrorClass, ua as Class$1, uc as allocate, ui as succeedNone, ul as map$5, un as formatIso, uo as void_$3, ur as forkIn, us as forever, ut as isLessThanOrEqualTo, uu as pipe$1, v as NonEmptyString, va as effectDiscard, vc as isArrayNonEmpty, 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, wn as annotateCurrentSpan, wo as hasInterrupts, wr as logWarning$1, wt as suspend$2, x as Number$1, xa as launch$1, xi as tryPromise, xl as YieldableProto, xn as addFinalizer$2, xr as logError, xs as scope, xt as mutable, y as Null, ya as empty$4, yc as isReadonlyArrayNonEmpty, 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 isSuccess$1, zi as zipWith, zn as catchTags, zr as option, zs as externalSpan, zt as empty$2 } from "./Schema-Ay3DUM83.mjs";
|
|
5
|
+
import { $t as interrupt$4, A as fromSubscription, At as end, B as onExit$1, Bt as sliding, C as fromChannel, Ct as fromSubscriptionArray, D as fromPull, Dt as make$44, E as fromPubSub, F as mapEffect$1, Ft as offer$1, G as runCollect, Gt as shutdown$2, Ht as takeAll, I as mapError$1, It as offerAll, J as runForEach, K as runDrain, Kt as subscribe$1, L as merge$4, Lt as offerUnsafe, M as make$43, Mt as failCause$4, N as map$7, O as fromQueue, Ot as makeUnsafe$6, P as mapAccum, Pt as make$45, Q as succeed$4, Qt as getCurrent, S as fromAsyncIterable, T as fromIterable$1, U as provideContext$1, Ut as unbounded$2, Vt as take$1, W as run$2, Wt as publish, X as runHead, Xt as makeUnsafe$7, Y as runForEachArray, Zt as await_, _t as drain, b as flatMap$3, c as callback$1, ct as get$4, d as debounce$1, dt as make$47, et as takeWhile, f as decodeText$1, g as ensuring$1, h as encodeText, j as isStream, kt as bounded, l as catchCause$1, lt as make$46, m as empty$5, nt as toAsyncIterable, q as runFold, qt as unbounded$1, r as FileSystem, rt as toPull, st as unwrap$1, t as Path$2, tn as runIn, tt as tick, u as concat$2, ut as get$5, v as failCause$5, vt as forEach$1, w as fromEffect, wt as fromTransform, x as fromArray, xt as mapInput, y as filter$2, zt as shutdown$1 } from "./Path-BIaGSU2M.mjs";
|
|
6
|
+
import { _ as ChildProcessSpawner, a as Stdio, g as make$48, o as make$49, r as isQuitError } from "./NodeTerminal-CeaWke6-.mjs";
|
|
7
|
+
import { n as layer$7 } from "./NodeServices-Bt1GwPBR.mjs";
|
|
8
|
+
import { $ as file, A as SocketErrorReason, At as merge$5, Bt as set$3, 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-5UTabe01.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-BnFFyBjD.mjs";
|
|
10
|
+
import { a as make$51, i as keys, n as getOption, o as makeWith$1, r as invalidate, s as set$4, t as get$8 } from "./Cache-DOwpGEYJ.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-BBR7DPrQ.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 runtimeGrantToken, f as setRuntimeGrantToken, i as sendRuntimeControlHeartbeat, l as verifyCmmdRuntimeTicketRefreshProof, n as bootstrapRuntimeControlAuthorityFromNarrowGrant, o as verifyCmmdClaudeReadinessTicket, p as createReadOnceFileTokenAccessor, r as readRuntimeControlAuthority, s as verifyCmmdClaudeUsageTicket, t as bootstrapRuntimeControlAuthority, u as verifyCmmdScopedRuntimePayload } from "./runtimeControlAuthority-DpRIoWqP.mjs";
|
|
15
|
-
import { n as PtySpawnError, t as PtyAdapter } from "./PTY-
|
|
15
|
+
import { n as PtySpawnError, t as PtyAdapter } from "./PTY-BRT13Y8S.mjs";
|
|
16
16
|
import { t as settleValueWithin } from "./settle-BJcmpbvq.mjs";
|
|
17
17
|
import { createRequire } from "node:module";
|
|
18
18
|
import * as HE from "node:child_process";
|
|
@@ -65979,7 +65979,7 @@ function normalizeNumberish(value) {
|
|
|
65979
65979
|
}
|
|
65980
65980
|
//#endregion
|
|
65981
65981
|
//#region package.json
|
|
65982
|
-
var version$1 = "0.13.
|
|
65982
|
+
var version$1 = "0.13.79";
|
|
65983
65983
|
//#endregion
|
|
65984
65984
|
//#region src/sentry.ts
|
|
65985
65985
|
const SERVER_APP_NAME = "forge-server";
|
|
@@ -118820,8 +118820,8 @@ effectDiscard(runMigrations());
|
|
|
118820
118820
|
//#endregion
|
|
118821
118821
|
//#region src/persistence/Layers/Sqlite.ts
|
|
118822
118822
|
const defaultSqliteClientLoaders = {
|
|
118823
|
-
bun: () => import("./SqliteClient-
|
|
118824
|
-
node: () => import("./NodeSqliteClient-
|
|
118823
|
+
bun: () => import("./SqliteClient-DQYXFVMu.mjs"),
|
|
118824
|
+
node: () => import("./NodeSqliteClient-BpmyZDcj.mjs")
|
|
118825
118825
|
};
|
|
118826
118826
|
const makeRuntimeSqliteLayer = fn$1("makeRuntimeSqliteLayer")(function* (config) {
|
|
118827
118827
|
const loader = defaultSqliteClientLoaders[process.versions.bun !== void 0 ? "bun" : "node"];
|
|
@@ -213493,6 +213493,7 @@ function categorizePublicProviderError(message) {
|
|
|
213493
213493
|
if (/\bforge_provider_model_not_allowed\b/.test(m) || /\bnot\s+scoped\s+to\s+the\s+requested\s+model\b/.test(m)) return "The workspace AI credential does not cover the model this turn asked for. Retry, or pick that model for the thread.";
|
|
213494
213494
|
if (/\bmodel\b[\s\S]*\b(not\s+(found|available|supported)|does\s+not\s+exist|unsupported|invalid|unknown)\b/.test(m) || /\b(unsupported|unknown|invalid)\b[\s\S]*\bmodel\b/.test(m) || /\b(model_not_found|invalid_model|model_not_supported)\b/.test(m)) return "The selected model isn't available right now. Pick a different model and retry.";
|
|
213495
213495
|
if (isProviderRateOrQuotaError(m)) return "The AI service is rate-limited or out of quota. Wait a moment and retry.";
|
|
213496
|
+
if (/_credential_reconnect_required\b/.test(m)) return "The workspace AI credential needs to be reconnected. Reconnect it in Settings > Providers, then retry.";
|
|
213496
213497
|
if (/\b(unauthorized|forbidden|authentication\s+(failed|error|required)|invalid\s+api\s+key|expired\s+(token|credential))\b/.test(m) || /\b40[13]\b/.test(m)) return "Workspace AI authentication failed. Reconnect the workspace and retry.";
|
|
213497
213498
|
if (/\b(timed?\s*out|timeout|overloaded|service\s+unavailable)\b/.test(m) || /\b50[234]\b/.test(m)) return "The AI service is temporarily overloaded. Retry in a moment.";
|
|
213498
213499
|
return null;
|
|
@@ -292016,6 +292017,52 @@ function applyThreadGoalPreamble(goal, input) {
|
|
|
292016
292017
|
return trimmedInput.length > 0 ? `${preamble}\n\n${trimmedInput}` : preamble;
|
|
292017
292018
|
}
|
|
292018
292019
|
//#endregion
|
|
292020
|
+
//#region src/orchestration/providerRetryableFailure.ts
|
|
292021
|
+
/**
|
|
292022
|
+
* Classifies a provider turn-start failure as a retryable rate-limit or
|
|
292023
|
+
* transient-availability failure (429/503), a terminal failure that names why
|
|
292024
|
+
* it will never clear on its own, or unrecognized (null).
|
|
292025
|
+
*
|
|
292026
|
+
* CMMD-Center/forge#3558: a 429 from CMMD's provider egress used to leave no
|
|
292027
|
+
* trace at all, because nothing in the turn-start path recognized it as a
|
|
292028
|
+
* distinct, retryable failure. `ProviderCommandReactor` uses this to decide
|
|
292029
|
+
* whether to retry a turn start with backoff, and to name the provider,
|
|
292030
|
+
* status and Retry-After in the `provider.turn.start.failed` activity CMMD's
|
|
292031
|
+
* watchdog reads once retries are exhausted.
|
|
292032
|
+
*
|
|
292033
|
+
* Reuses `isProviderRateOrQuotaError` (the same predicate the public-copy
|
|
292034
|
+
* sanitizer uses to recognize a rate-limit message) rather than restating its
|
|
292035
|
+
* word list here.
|
|
292036
|
+
*/
|
|
292037
|
+
const SERVICE_UNAVAILABLE_PATTERN = /\b(503|service\s+unavailable)\b/i;
|
|
292038
|
+
const RATE_LIMITED_PAST_TENSE_PATTERN = /\brate[\s-]?limit(?:ed|ing)?\b/i;
|
|
292039
|
+
const QUOTA_OR_USAGE_LIMIT_PATTERN = /\b(usage[ _-]limit|usage_limit_reached|quota|insufficient_quota)\b/i;
|
|
292040
|
+
const EXPLICIT_429_PATTERN = /\b429\b/;
|
|
292041
|
+
const RETRY_AFTER_SECONDS_PATTERN = /retry-after[^0-9]{0,10}(\d+)|(?:try again|retry)\s+in\s+(\d+)\s*(?:s\b|sec(?:onds?)?\b)?/i;
|
|
292042
|
+
function parseRetryAfterSeconds(detail) {
|
|
292043
|
+
const match = detail.match(RETRY_AFTER_SECONDS_PATTERN);
|
|
292044
|
+
if (!match) return null;
|
|
292045
|
+
const raw = match[1] ?? match[2];
|
|
292046
|
+
const seconds = raw ? Number(raw) : NaN;
|
|
292047
|
+
return Number.isFinite(seconds) ? seconds : null;
|
|
292048
|
+
}
|
|
292049
|
+
function classifyRetryableProviderFailure(detail) {
|
|
292050
|
+
if (!detail || detail.trim().length === 0) return null;
|
|
292051
|
+
if (QUOTA_OR_USAGE_LIMIT_PATTERN.test(detail) && !EXPLICIT_429_PATTERN.test(detail)) return {
|
|
292052
|
+
kind: "terminal",
|
|
292053
|
+
reason: "quota",
|
|
292054
|
+
message: detail
|
|
292055
|
+
};
|
|
292056
|
+
const isRateLimited = isProviderRateOrQuotaError(detail) || RATE_LIMITED_PAST_TENSE_PATTERN.test(detail);
|
|
292057
|
+
const isUnavailable = SERVICE_UNAVAILABLE_PATTERN.test(detail);
|
|
292058
|
+
if (!isRateLimited && !isUnavailable) return null;
|
|
292059
|
+
return {
|
|
292060
|
+
kind: "retryable",
|
|
292061
|
+
status: isRateLimited ? 429 : 503,
|
|
292062
|
+
retryAfterSeconds: parseRetryAfterSeconds(detail)
|
|
292063
|
+
};
|
|
292064
|
+
}
|
|
292065
|
+
//#endregion
|
|
292019
292066
|
//#region src/orchestration/Layers/ProviderCommandReactor.ts
|
|
292020
292067
|
function toNonEmptyProviderInput(value) {
|
|
292021
292068
|
const normalized = value?.trim();
|
|
@@ -292036,6 +292083,40 @@ const HANDLED_TURN_START_KEY_MAX = 1e4;
|
|
|
292036
292083
|
const HANDLED_TURN_START_KEY_TTL = minutes(30);
|
|
292037
292084
|
const DEFAULT_RUNTIME_MODE = "full-access";
|
|
292038
292085
|
const DEFAULT_THREAD_TITLE = "New thread";
|
|
292086
|
+
/**
|
|
292087
|
+
* Bounds retrying a turn-start ack (`turn/start`) that failed with a
|
|
292088
|
+
* retryable status (429/503). Kept well under `withProviderTurnStartTimeout`'s
|
|
292089
|
+
* 45 s budget: a Retry-After longer than fits here would otherwise blow that
|
|
292090
|
+
* timeout and end the turn as an unreplicated `provider.turn.start.timeout`
|
|
292091
|
+
* instead of the replicated `provider.turn.start.failed` CMMD's watchdog reads
|
|
292092
|
+
* (CMMD-Center/forge#3558).
|
|
292093
|
+
*/
|
|
292094
|
+
const PROVIDER_RETRY_MAX_ATTEMPTS = 3;
|
|
292095
|
+
const PROVIDER_RETRY_BASE_DELAY = millis(100);
|
|
292096
|
+
/** The longest this loop will ever wait for a single attempt's Retry-After. */
|
|
292097
|
+
const PROVIDER_RETRY_MAX_DELAY_PER_ATTEMPT = seconds(20);
|
|
292098
|
+
/**
|
|
292099
|
+
* The longest this loop will ever sleep in total, across every attempt,
|
|
292100
|
+
* counted from the first failure. Two sleeps at the per-attempt cap above
|
|
292101
|
+
* would already reach 40s on their own, leaving nothing for the
|
|
292102
|
+
* `ensureSessionForThread` preamble work and the `sendTurn` round trips that
|
|
292103
|
+
* share `withProviderTurnStartTimeout`'s 45s budget with this loop. 30s keeps
|
|
292104
|
+
* 15s of headroom for that other work. A Retry-After that would need more
|
|
292105
|
+
* than what remains fails the turn immediately and names the real ask,
|
|
292106
|
+
* rather than sleeping a truncated amount and 429ing again anyway once it
|
|
292107
|
+
* wakes up (CMMD-Center/forge#3558 review item 4).
|
|
292108
|
+
*/
|
|
292109
|
+
const PROVIDER_RETRY_TOTAL_SLEEP_BUDGET = seconds(30);
|
|
292110
|
+
/**
|
|
292111
|
+
* How long the reactor watches for `turn.started` (or a terminal failure)
|
|
292112
|
+
* after a turn-start ack succeeds, before treating silence as a failure.
|
|
292113
|
+
* Codex retries a 429 internally and reports every attempt as a bare `error`
|
|
292114
|
+
* notification with `willRetry`, none of which reach CMMD on their own
|
|
292115
|
+
* (mapped to `runtime.warning`, which does not replicate) — this is the
|
|
292116
|
+
* budget for those internal retries to either land or report a final failure
|
|
292117
|
+
* (CMMD-Center/forge#3558).
|
|
292118
|
+
*/
|
|
292119
|
+
const PROVIDER_TURN_START_WATCH_BUDGET = minutes(3);
|
|
292039
292120
|
const isProviderValidationError = is$1(ProviderValidationError);
|
|
292040
292121
|
const isProviderKind = is$1(ProviderKind);
|
|
292041
292122
|
function isPathInsideRoot(candidatePath, rootPath) {
|
|
@@ -292180,6 +292261,176 @@ function takeValidatedContinuationSession(input) {
|
|
|
292180
292261
|
function discardOwnedContinuationSession(staged, threadId) {
|
|
292181
292262
|
if (staged?.threadId === threadId) takeExactThreadContinuationSession(staged);
|
|
292182
292263
|
}
|
|
292264
|
+
/** The message text and, when the error carries one, the provider name it named. */
|
|
292265
|
+
function sendTurnFailureDetail(error) {
|
|
292266
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
292267
|
+
const provider = error !== null && typeof error === "object" && "provider" in error && typeof error.provider === "string" ? error.provider : void 0;
|
|
292268
|
+
return provider !== void 0 ? {
|
|
292269
|
+
message,
|
|
292270
|
+
provider
|
|
292271
|
+
} : { message };
|
|
292272
|
+
}
|
|
292273
|
+
/**
|
|
292274
|
+
* The delay before the next `sendTurn` attempt: the provider's own
|
|
292275
|
+
* Retry-After when it gave one, otherwise exponential backoff from
|
|
292276
|
+
* `PROVIDER_RETRY_BASE_DELAY`. Deliberately not capped here --
|
|
292277
|
+
* `sendTurnWithRetry` decides whether the desired delay fits the per-attempt
|
|
292278
|
+
* and total budgets, and fails outright rather than silently sleeping less
|
|
292279
|
+
* than the provider asked for (CMMD-Center/forge#3558 review item 4).
|
|
292280
|
+
*/
|
|
292281
|
+
function desiredRetryDelay(input) {
|
|
292282
|
+
if (input.retryAfterSeconds !== null) return seconds(input.retryAfterSeconds);
|
|
292283
|
+
return times(PROVIDER_RETRY_BASE_DELAY, 2 ** (input.attempt - 1));
|
|
292284
|
+
}
|
|
292285
|
+
/**
|
|
292286
|
+
* The `provider.turn.start.failed` detail once retries are exhausted. Names
|
|
292287
|
+
* the provider, the status every attempt answered, how many attempts ran, and
|
|
292288
|
+
* the Retry-After the provider asked for, so CMMD's watchdog (and whoever
|
|
292289
|
+
* reads the failed Work Session) knows this was a rate limit rather than an
|
|
292290
|
+
* unspecified refusal.
|
|
292291
|
+
*/
|
|
292292
|
+
function retryExhaustedFailureDetail(input) {
|
|
292293
|
+
const providerLabel = input.provider ? `The ${input.provider} provider` : "The provider";
|
|
292294
|
+
const retryAfter = input.classified.retryAfterSeconds !== null ? ` It asked to retry after ${input.classified.retryAfterSeconds}s.` : "";
|
|
292295
|
+
return `${providerLabel} responded ${input.classified.status} on every attempt (${input.attempts} of ${input.attempts}).${retryAfter} ${input.underlyingMessage}`;
|
|
292296
|
+
}
|
|
292297
|
+
/**
|
|
292298
|
+
* The `provider.turn.start.failed` detail when honoring the provider's own
|
|
292299
|
+
* Retry-After would need more time than `PROVIDER_RETRY_MAX_DELAY_PER_ATTEMPT`
|
|
292300
|
+
* or the loop's remaining `PROVIDER_RETRY_TOTAL_SLEEP_BUDGET` allow. Fails the
|
|
292301
|
+
* turn immediately and names the real ask, rather than sleeping a truncated
|
|
292302
|
+
* amount and 429ing again once it wakes up (CMMD-Center/forge#3558 review
|
|
292303
|
+
* item 4).
|
|
292304
|
+
*/
|
|
292305
|
+
function retryBudgetExceededFailureDetail(input) {
|
|
292306
|
+
return `${input.provider ? `The ${input.provider} provider` : "The provider"} asked to retry after ${input.classified.retryAfterSeconds !== null ? `${input.classified.retryAfterSeconds}s` : "an unspecified time"}, longer than Forge allows for a turn-start retry (stopped after ${input.attempts} of ${PROVIDER_RETRY_MAX_ATTEMPTS} attempts). ${input.underlyingMessage}`;
|
|
292307
|
+
}
|
|
292308
|
+
/**
|
|
292309
|
+
* The `provider.turn.start.failed` detail when the turn-start ack succeeded
|
|
292310
|
+
* but no `turn.started`, no terminal failure, and (past the watch budget) no
|
|
292311
|
+
* event at all ever arrived for it — Codex retrying a 429 with no observable
|
|
292312
|
+
* progress until it either recovers or gives up.
|
|
292313
|
+
*/
|
|
292314
|
+
function turnStartWatchTimedOutDetail(lastRetrySignal) {
|
|
292315
|
+
if (lastRetrySignal === null) return "The provider accepted the turn but never reported it starting, and reported no error either.";
|
|
292316
|
+
if (lastRetrySignal.kind === "terminal") return `The provider reported a failure that will not clear by retrying, and never started the turn. ${lastRetrySignal.message}`;
|
|
292317
|
+
const retryAfter = lastRetrySignal.retryAfterSeconds !== null ? ` It last asked to retry after ${lastRetrySignal.retryAfterSeconds}s.` : "";
|
|
292318
|
+
return `The provider kept answering ${lastRetrySignal.status} without ever starting the turn or reporting a final error.${retryAfter}`;
|
|
292319
|
+
}
|
|
292320
|
+
/**
|
|
292321
|
+
* The events that end the watch started after a turn-start ack: the turn
|
|
292322
|
+
* actually starting, that same turn completing (a Codex retry loop can settle
|
|
292323
|
+
* `turn/completed` with no `turn/started` in between), or a runtime error for
|
|
292324
|
+
* THIS turn (Codex's final `error` notification once `willRetry` turns false
|
|
292325
|
+
* — see `mapCodexRuntimeErrorEvent`).
|
|
292326
|
+
*
|
|
292327
|
+
* `runtime.error` matches when it carries no turn id at all (a genuine
|
|
292328
|
+
* session-level error) or carries this exact turn's id. This buffer starts
|
|
292329
|
+
* before the ack (`openTurnStartEventBuffer`), so a `runtime.error` for a
|
|
292330
|
+
* DIFFERENT, still-in-flight turn on the same thread is now visible to this
|
|
292331
|
+
* watch too; without the turn id check, that event would wrongly end this
|
|
292332
|
+
* turn's watch (forge-runtime-supervision's async-hold-and-refresh interleaving
|
|
292333
|
+
* review).
|
|
292334
|
+
*/
|
|
292335
|
+
function isTurnStartWatchTerminalEvent(event, turnId) {
|
|
292336
|
+
if (event.type === "turn.started") return event.turnId === turnId;
|
|
292337
|
+
if (event.type === "turn.completed") return event.turnId === turnId;
|
|
292338
|
+
return event.type === "runtime.error" && (event.turnId === void 0 || event.turnId === turnId);
|
|
292339
|
+
}
|
|
292340
|
+
/**
|
|
292341
|
+
* Retries `sendTurn` on a retryable ack failure (429/503), with backoff
|
|
292342
|
+
* bounded by `PROVIDER_RETRY_MAX_ATTEMPTS`, `PROVIDER_RETRY_MAX_DELAY_PER_ATTEMPT`
|
|
292343
|
+
* and `PROVIDER_RETRY_TOTAL_SLEEP_BUDGET`. A non-retryable failure (401, the
|
|
292344
|
+
* #3552 broker-authority miss, quota exhaustion, an unrelated adapter error)
|
|
292345
|
+
* fails on the first attempt.
|
|
292346
|
+
*
|
|
292347
|
+
* Never resubmits after an ack succeeds: codex has already created the turn
|
|
292348
|
+
* by then, and a second `turn/start` would duplicate it and resend the
|
|
292349
|
+
* user's message. Once retries are exhausted — or the provider's own
|
|
292350
|
+
* Retry-After would need more time than this loop allows — the failure this
|
|
292351
|
+
* raises names the provider, the status, and the real Retry-After, rather
|
|
292352
|
+
* than whatever the underlying adapter error happened to say.
|
|
292353
|
+
*
|
|
292354
|
+
* Exported and kept at module scope (out of `ProviderCommandReactor`'s
|
|
292355
|
+
* `make`) so it can be tested directly against a fake clock, without a real
|
|
292356
|
+
* 20-30s wait (CMMD-Center/forge#3558 review item 4).
|
|
292357
|
+
*/
|
|
292358
|
+
const sendTurnWithRetry = fn$1("sendTurnWithRetry")(function* (input) {
|
|
292359
|
+
let attempt = 1;
|
|
292360
|
+
let totalSlept = zero;
|
|
292361
|
+
while (true) {
|
|
292362
|
+
const outcome = yield* result(input.sendTurn(input.turnInput));
|
|
292363
|
+
if (outcome._tag === "Success") return outcome.success;
|
|
292364
|
+
const { message, provider } = sendTurnFailureDetail(outcome.failure);
|
|
292365
|
+
const classified = classifyRetryableProviderFailure(message);
|
|
292366
|
+
if (classified === null || classified.kind === "terminal") return yield* outcome.failure;
|
|
292367
|
+
const desired = desiredRetryDelay({
|
|
292368
|
+
attempt,
|
|
292369
|
+
retryAfterSeconds: classified.retryAfterSeconds
|
|
292370
|
+
});
|
|
292371
|
+
const remainingBudget = subtract(PROVIDER_RETRY_TOTAL_SLEEP_BUDGET, totalSlept);
|
|
292372
|
+
const exceedsBudget = isGreaterThan$1(desired, PROVIDER_RETRY_MAX_DELAY_PER_ATTEMPT) || isGreaterThan$1(desired, remainingBudget);
|
|
292373
|
+
if (attempt >= PROVIDER_RETRY_MAX_ATTEMPTS || exceedsBudget) return yield* new ProviderAdapterRequestError({
|
|
292374
|
+
provider: provider ?? "provider",
|
|
292375
|
+
method: "turn/start",
|
|
292376
|
+
detail: exceedsBudget ? retryBudgetExceededFailureDetail({
|
|
292377
|
+
provider,
|
|
292378
|
+
classified,
|
|
292379
|
+
attempts: attempt,
|
|
292380
|
+
underlyingMessage: message
|
|
292381
|
+
}) : retryExhaustedFailureDetail({
|
|
292382
|
+
provider,
|
|
292383
|
+
classified,
|
|
292384
|
+
attempts: attempt,
|
|
292385
|
+
underlyingMessage: message
|
|
292386
|
+
}),
|
|
292387
|
+
cause: outcome.failure
|
|
292388
|
+
});
|
|
292389
|
+
yield* sleep$4(desired);
|
|
292390
|
+
totalSlept = sum$1(totalSlept, desired);
|
|
292391
|
+
attempt += 1;
|
|
292392
|
+
}
|
|
292393
|
+
});
|
|
292394
|
+
/**
|
|
292395
|
+
* Runs the flow after a turn-start ack attempt. On a failed or skipped ack,
|
|
292396
|
+
* closes the event buffer and reports through `onFailure`/`onSkipped`; on a
|
|
292397
|
+
* successful ack, hands off to `onSent`, which forks the turn-start watch
|
|
292398
|
+
* that then owns the buffer for the rest of its life.
|
|
292399
|
+
*
|
|
292400
|
+
* Wrapped in its own `Effect.onInterrupt` covering `send` through `onSent`:
|
|
292401
|
+
* an interrupt landing anywhere in that span — mid-ack, mid the retry's own
|
|
292402
|
+
* backoff, or in the gap between a successful ack and the watch actually
|
|
292403
|
+
* being forked — still closes the buffer. Once `onSent` returns (the watch
|
|
292404
|
+
* has been forked), this effect has completed normally and the wrapper no
|
|
292405
|
+
* longer applies from there on; the watch's own `Effect.ensuring` owns the
|
|
292406
|
+
* buffer from that point (CodeRabbit on CMMD-Center/forge#3558: the buffer
|
|
292407
|
+
* never closed on a pre-fork interrupt).
|
|
292408
|
+
*
|
|
292409
|
+
* Deliberately does not release the turn-start hold: that stays the
|
|
292410
|
+
* caller's job. `recoverProviderTurnStartTimeout`'s `releaseHold` and
|
|
292411
|
+
* `processDomainEventSafely`'s own `Effect.onInterrupt` already cover every
|
|
292412
|
+
* path that can end this attempt (review items 3 and 7), and releasing here
|
|
292413
|
+
* too would let the hold go before a failure activity this same interrupt
|
|
292414
|
+
* is still writing has landed.
|
|
292415
|
+
*
|
|
292416
|
+
* Extracted to module scope — like `sendTurnWithRetry` above — so this
|
|
292417
|
+
* interrupt-safety claim can be exercised directly with `Deferred` and
|
|
292418
|
+
* `Fiber.interrupt`, without the full reactor test harness.
|
|
292419
|
+
*/
|
|
292420
|
+
const runTurnStartAckOutcome = (input) => gen(function* () {
|
|
292421
|
+
const sendExit = yield* input.send.pipe(exit);
|
|
292422
|
+
if (isFailure(sendExit)) {
|
|
292423
|
+
yield* input.close;
|
|
292424
|
+
yield* input.onFailure(sendExit.cause);
|
|
292425
|
+
return;
|
|
292426
|
+
}
|
|
292427
|
+
if (sendExit.value._tag === "skipped") {
|
|
292428
|
+
yield* input.close;
|
|
292429
|
+
yield* input.onSkipped;
|
|
292430
|
+
return;
|
|
292431
|
+
}
|
|
292432
|
+
yield* input.onSent(sendExit.value.turnId);
|
|
292433
|
+
}).pipe(onInterrupt(() => input.close));
|
|
292183
292434
|
function buildGeneratedWorktreeBranchName(raw) {
|
|
292184
292435
|
const normalized = raw.trim().toLowerCase().replace(/^refs\/heads\//, "").replace(/['"`]/g, "");
|
|
292185
292436
|
const branchFragment = (normalized.startsWith(`forge/`) ? normalized.slice(`${WORKTREE_BRANCH_PREFIX}/`.length) : normalized).replace(/[^a-z0-9/_-]+/g, "-").replace(/\/+/g, "/").replace(/-+/g, "-").replace(/^[./_-]+|[./_-]+$/g, "").slice(0, 64).replace(/[./_-]+$/g, "");
|
|
@@ -292194,12 +292445,48 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292194
292445
|
const serverSettingsService = yield* ServerSettingsService;
|
|
292195
292446
|
const serverConfig = yield* ServerConfig;
|
|
292196
292447
|
const runtimeDrainState = yield* RuntimeDrainState;
|
|
292448
|
+
const spriteTaskHoldReactor = yield* serviceOption(SpriteTaskHoldReactor);
|
|
292449
|
+
const holdTurnStart = (key) => isSome(spriteTaskHoldReactor) ? spriteTaskHoldReactor.value.holdTurnStart(key) : void_$1;
|
|
292450
|
+
const releaseTurnStart = (key) => isSome(spriteTaskHoldReactor) ? spriteTaskHoldReactor.value.releaseTurnStart(key) : void_$1;
|
|
292197
292451
|
const handledTurnStartKeys = yield* make$51({
|
|
292198
292452
|
capacity: HANDLED_TURN_START_KEY_MAX,
|
|
292199
292453
|
timeToLive: HANDLED_TURN_START_KEY_TTL,
|
|
292200
292454
|
lookup: () => succeed(true)
|
|
292201
292455
|
});
|
|
292202
292456
|
const hasHandledTurnStartRecently = (key) => getOption(handledTurnStartKeys, key).pipe(flatMap((cached) => set$4(handledTurnStartKeys, key, true).pipe(as$3(isSome(cached)))));
|
|
292457
|
+
/**
|
|
292458
|
+
* Per-attempt buffers of `providerService.streamEvents`, keyed by the same
|
|
292459
|
+
* turn-start attempt key `holdTurnStart` uses — not by thread id: two
|
|
292460
|
+
* overlapping turn-start attempts on one thread each need their own buffer,
|
|
292461
|
+
* fed from before each one's own ack (see the doc comment on `holdTurnStart`
|
|
292462
|
+
* calls below, and forge-runtime-supervision's interleaving review).
|
|
292463
|
+
* `startTurnStartEventRouter` is the one place that ever reads
|
|
292464
|
+
* `providerService.streamEvents` for this purpose, subscribed once for the
|
|
292465
|
+
* reactor's whole lifetime, exactly like `SpriteTaskHoldReactor.start`, so no
|
|
292466
|
+
* attempt ever races to open its own subscription in time for its ack
|
|
292467
|
+
* (CMMD-Center/forge#3558 review item 1).
|
|
292468
|
+
*/
|
|
292469
|
+
const turnStartEventBuffers = /* @__PURE__ */ new Map();
|
|
292470
|
+
const openTurnStartEventBuffer = (key, threadId) => gen(function* () {
|
|
292471
|
+
const queue = yield* unbounded$2();
|
|
292472
|
+
turnStartEventBuffers.set(key, {
|
|
292473
|
+
threadId,
|
|
292474
|
+
queue
|
|
292475
|
+
});
|
|
292476
|
+
return queue;
|
|
292477
|
+
});
|
|
292478
|
+
const closeTurnStartEventBuffer = (key, queue) => sync$1(() => {
|
|
292479
|
+
if (turnStartEventBuffers.get(key)?.queue === queue) turnStartEventBuffers.delete(key);
|
|
292480
|
+
}).pipe(andThen(shutdown$1(queue)));
|
|
292481
|
+
/**
|
|
292482
|
+
* Started once from `start()`. Fans out every provider event to every
|
|
292483
|
+
* currently-open buffer for its thread — plural, not a single lookup,
|
|
292484
|
+
* because two turn-start attempts can be in flight on the same thread at
|
|
292485
|
+
* once (CMMD-Center/forge#3558 review item 1).
|
|
292486
|
+
*/
|
|
292487
|
+
const startTurnStartEventRouter = fn$1("startTurnStartEventRouter")(function* () {
|
|
292488
|
+
yield* forkScoped(runForEach(providerService.streamEvents, (event) => forEach(Array.from(turnStartEventBuffers.values()).filter((entry) => entry.threadId === event.threadId), (entry) => offer$1(entry.queue, event), { discard: true })));
|
|
292489
|
+
});
|
|
292203
292490
|
const threadModelSelections = /* @__PURE__ */ new Map();
|
|
292204
292491
|
/**
|
|
292205
292492
|
* The providerAccountId each LIVE provider session was actually started with.
|
|
@@ -292356,9 +292643,87 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292356
292643
|
yield* bindSessionToThread(startedSession);
|
|
292357
292644
|
return startedSession.threadId;
|
|
292358
292645
|
});
|
|
292646
|
+
/**
|
|
292647
|
+
* Waits for a turn-start ack to either start (or complete) or fail, after
|
|
292648
|
+
* the provider has already accepted it. Codex's own 429 retries surface as
|
|
292649
|
+
* an `error` notification with `willRetry`, mapped to `runtime.warning`
|
|
292650
|
+
* while retries continue and to `runtime.error` only once they stop
|
|
292651
|
+
* (`mapCodexRuntimeErrorEvent`); `runtime.warning` never replicates to CMMD,
|
|
292652
|
+
* so without this a turn that fails this way never told CMMD anything
|
|
292653
|
+
* happened at all (CMMD-Center/forge#3558).
|
|
292654
|
+
*
|
|
292655
|
+
* Reads from `events`, a per-attempt buffer opened by
|
|
292656
|
+
* `openTurnStartEventBuffer` BEFORE the ack was sent, rather than
|
|
292657
|
+
* subscribing to `providerService.streamEvents` directly here: a fresh
|
|
292658
|
+
* subscription opened only now would miss a `turn.started` published in the
|
|
292659
|
+
* gap between the ack and this call (review item 1).
|
|
292660
|
+
*/
|
|
292661
|
+
const watchTurnStartOutcome = fn$1("watchTurnStartOutcome")(function* (input) {
|
|
292662
|
+
const lastRetrySignal = yield* make$50(null);
|
|
292663
|
+
const terminalEvent = yield* fromQueue(input.events).pipe(mapEffect$1((event) => gen(function* () {
|
|
292664
|
+
if (event.type === "runtime.warning") {
|
|
292665
|
+
const classified = classifyRetryableProviderFailure(event.payload.message);
|
|
292666
|
+
if (classified) yield* set$3(lastRetrySignal, classified);
|
|
292667
|
+
}
|
|
292668
|
+
return event;
|
|
292669
|
+
})), filter$2((event) => isTurnStartWatchTerminalEvent(event, input.turnId)), runHead).pipe(timeout$1(PROVIDER_TURN_START_WATCH_BUDGET), catchTag("TimeoutError", () => succeed(none$4())));
|
|
292670
|
+
if (isNone(terminalEvent)) return {
|
|
292671
|
+
_tag: "TimedOut",
|
|
292672
|
+
lastRetrySignal: yield* get$6(lastRetrySignal)
|
|
292673
|
+
};
|
|
292674
|
+
const event = terminalEvent.value;
|
|
292675
|
+
if (event.type === "turn.started") return { _tag: "Started" };
|
|
292676
|
+
if (event.type === "turn.completed") return {
|
|
292677
|
+
_tag: "Failed",
|
|
292678
|
+
detail: event.payload.errorMessage ?? "The provider ended the turn with no error detail."
|
|
292679
|
+
};
|
|
292680
|
+
return {
|
|
292681
|
+
_tag: "Failed",
|
|
292682
|
+
detail: event.payload.message
|
|
292683
|
+
};
|
|
292684
|
+
});
|
|
292685
|
+
/**
|
|
292686
|
+
* Finalizes a turn-start watch: releases the turn-start hold and closes its
|
|
292687
|
+
* event buffer, only AFTER the outcome is durably handled — either the turn
|
|
292688
|
+
* started, or the `provider.turn.start.failed` activity has actually been
|
|
292689
|
+
* persisted. No blanket `Effect.ensuring` for the release: if
|
|
292690
|
+
* `appendProviderFailureActivity` itself fails, the hold stays held rather
|
|
292691
|
+
* than being released with no durable record of why the turn failed
|
|
292692
|
+
* (review item 2). `Effect.onInterrupt` covers the one case that ordering
|
|
292693
|
+
* cannot: a shutdown while this watch is still waiting. A write mid-shutdown
|
|
292694
|
+
* is not reliable, so that path only releases the hold; the turn is left
|
|
292695
|
+
* for CMMD's own sweep rather than ended with an event here (review item 7).
|
|
292696
|
+
* The event buffer itself always closes, via `Effect.ensuring`: it is a
|
|
292697
|
+
* local resource with nothing durable riding on its cleanup order.
|
|
292698
|
+
*/
|
|
292699
|
+
const watchTurnStartAndFinalize = (input) => gen(function* () {
|
|
292700
|
+
const outcome = yield* watchTurnStartOutcome({
|
|
292701
|
+
threadId: input.threadId,
|
|
292702
|
+
turnId: input.turnId,
|
|
292703
|
+
events: input.events
|
|
292704
|
+
});
|
|
292705
|
+
if (outcome._tag === "Started") {
|
|
292706
|
+
yield* releaseTurnStart(input.holdKey);
|
|
292707
|
+
return;
|
|
292708
|
+
}
|
|
292709
|
+
const detail = outcome._tag === "Failed" ? outcome.detail : turnStartWatchTimedOutDetail(outcome.lastRetrySignal);
|
|
292710
|
+
yield* appendProviderFailureActivity({
|
|
292711
|
+
threadId: input.threadId,
|
|
292712
|
+
kind: "provider.turn.start.failed",
|
|
292713
|
+
summary: "Provider turn start failed",
|
|
292714
|
+
detail: publicProviderFailureDetail(detail),
|
|
292715
|
+
turnId: input.turnId,
|
|
292716
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
292717
|
+
});
|
|
292718
|
+
yield* releaseTurnStart(input.holdKey);
|
|
292719
|
+
}).pipe(catchCause((cause) => hasInterruptsOnly(cause) ? void_$1 : logWarning$1("provider command reactor turn-start watch failed", {
|
|
292720
|
+
threadId: input.threadId,
|
|
292721
|
+
turnId: input.turnId,
|
|
292722
|
+
cause: pretty(cause)
|
|
292723
|
+
})), onInterrupt(() => releaseTurnStart(input.holdKey)), ensuring(closeTurnStartEventBuffer(input.holdKey, input.events)));
|
|
292359
292724
|
const sendTurnForThread = fn$1("sendTurnForThread")(function* (input) {
|
|
292360
292725
|
const thread = yield* resolveThread(input.threadId);
|
|
292361
|
-
if (!thread) return;
|
|
292726
|
+
if (!thread) return { _tag: "skipped" };
|
|
292362
292727
|
if (yield* runtimeDrainState.isDraining) {
|
|
292363
292728
|
yield* appendProviderFailureActivity({
|
|
292364
292729
|
threadId: input.threadId,
|
|
@@ -292368,7 +292733,7 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292368
292733
|
turnId: null,
|
|
292369
292734
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
292370
292735
|
});
|
|
292371
|
-
return;
|
|
292736
|
+
return { _tag: "skipped" };
|
|
292372
292737
|
}
|
|
292373
292738
|
yield* ensureSessionForThread(input.threadId, input.createdAt, input.modelSelection !== void 0 ? { modelSelection: input.modelSelection } : {});
|
|
292374
292739
|
if (input.modelSelection !== void 0) threadModelSelections.set(input.threadId, input.modelSelection);
|
|
@@ -292392,13 +292757,19 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292392
292757
|
...requestedModelSelection,
|
|
292393
292758
|
model: activeSession.model
|
|
292394
292759
|
} : requestedModelSelection : input.modelSelection;
|
|
292395
|
-
|
|
292396
|
-
|
|
292397
|
-
|
|
292398
|
-
|
|
292399
|
-
|
|
292400
|
-
|
|
292401
|
-
|
|
292760
|
+
return {
|
|
292761
|
+
_tag: "sent",
|
|
292762
|
+
turnId: (yield* sendTurnWithRetry({
|
|
292763
|
+
sendTurn: providerService.sendTurn,
|
|
292764
|
+
turnInput: {
|
|
292765
|
+
threadId: input.threadId,
|
|
292766
|
+
...normalizedInput ? { input: normalizedInput } : {},
|
|
292767
|
+
...normalizedAttachments.length > 0 ? { attachments: normalizedAttachments } : {},
|
|
292768
|
+
...modelForTurn !== void 0 ? { modelSelection: modelForTurn } : {},
|
|
292769
|
+
...input.interactionMode !== void 0 ? { interactionMode: input.interactionMode } : {}
|
|
292770
|
+
}
|
|
292771
|
+
})).turnId
|
|
292772
|
+
};
|
|
292402
292773
|
});
|
|
292403
292774
|
const maybeGenerateAndRenameWorktreeBranchForFirstTurn = fn$1("maybeGenerateAndRenameWorktreeBranchForFirstTurn")(function* (input) {
|
|
292404
292775
|
if (!input.branch || !input.worktreePath) return;
|
|
@@ -292577,7 +292948,8 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292577
292948
|
});
|
|
292578
292949
|
});
|
|
292579
292950
|
const processTurnStartRequested = fn$1("processTurnStartRequested")(function* (event) {
|
|
292580
|
-
|
|
292951
|
+
const key = turnStartKeyForEvent(event);
|
|
292952
|
+
if (yield* hasHandledTurnStartRecently(key)) return;
|
|
292581
292953
|
const thread = yield* resolveThread(event.payload.threadId);
|
|
292582
292954
|
if (!thread) return;
|
|
292583
292955
|
const message = thread.messages.find((entry) => entry.id === event.payload.messageId);
|
|
@@ -292628,21 +293000,35 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292628
293000
|
...generationInput
|
|
292629
293001
|
}).pipe(forkScoped);
|
|
292630
293002
|
}
|
|
292631
|
-
|
|
292632
|
-
|
|
292633
|
-
|
|
292634
|
-
|
|
292635
|
-
|
|
292636
|
-
|
|
292637
|
-
|
|
292638
|
-
|
|
292639
|
-
|
|
292640
|
-
|
|
292641
|
-
|
|
292642
|
-
|
|
292643
|
-
|
|
292644
|
-
|
|
292645
|
-
|
|
293003
|
+
const turnStartHoldKey = key;
|
|
293004
|
+
yield* uninterruptible(holdTurnStart(turnStartHoldKey));
|
|
293005
|
+
const turnStartEvents = yield* openTurnStartEventBuffer(turnStartHoldKey, event.payload.threadId);
|
|
293006
|
+
yield* runTurnStartAckOutcome({
|
|
293007
|
+
send: sendTurnForThread({
|
|
293008
|
+
threadId: event.payload.threadId,
|
|
293009
|
+
messageText: message.text,
|
|
293010
|
+
...message.attachments !== void 0 ? { attachments: message.attachments } : {},
|
|
293011
|
+
...event.payload.modelSelection !== void 0 ? { modelSelection: event.payload.modelSelection } : {},
|
|
293012
|
+
interactionMode: event.payload.interactionMode,
|
|
293013
|
+
createdAt: event.payload.createdAt
|
|
293014
|
+
}),
|
|
293015
|
+
close: closeTurnStartEventBuffer(turnStartHoldKey, turnStartEvents),
|
|
293016
|
+
onFailure: (cause) => appendProviderFailureActivity({
|
|
293017
|
+
threadId: event.payload.threadId,
|
|
293018
|
+
kind: "provider.turn.start.failed",
|
|
293019
|
+
summary: "Provider turn start failed",
|
|
293020
|
+
detail: publicProviderFailureDetailFromCause(cause),
|
|
293021
|
+
turnId: null,
|
|
293022
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
293023
|
+
}).pipe(andThen(releaseTurnStart(turnStartHoldKey))),
|
|
293024
|
+
onSkipped: releaseTurnStart(turnStartHoldKey),
|
|
293025
|
+
onSent: (turnId) => watchTurnStartAndFinalize({
|
|
293026
|
+
threadId: event.payload.threadId,
|
|
293027
|
+
turnId,
|
|
293028
|
+
holdKey: turnStartHoldKey,
|
|
293029
|
+
events: turnStartEvents
|
|
293030
|
+
}).pipe(forkScoped)
|
|
293031
|
+
});
|
|
292646
293032
|
});
|
|
292647
293033
|
const processTurnInterruptRequested = fn$1("processTurnInterruptRequested")(function* (event) {
|
|
292648
293034
|
const thread = yield* resolveThread(event.payload.threadId);
|
|
@@ -292864,6 +293250,7 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292864
293250
|
});
|
|
292865
293251
|
const recoverTimedOutProviderTurnStart = (event) => recoverProviderTurnStartTimeout({
|
|
292866
293252
|
cleanup: stopTimedOutProviderSession(event),
|
|
293253
|
+
releaseHold: releaseTurnStart(turnStartKeyForEvent(event)),
|
|
292867
293254
|
markRecoverable: appendRecoverableTurnStartTimeout(event),
|
|
292868
293255
|
markCleanupFailed: (cause) => appendProviderFailureActivity({
|
|
292869
293256
|
threadId: event.payload.threadId,
|
|
@@ -292876,7 +293263,7 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292876
293263
|
});
|
|
292877
293264
|
const processDomainEventSafely = (event) => {
|
|
292878
293265
|
const operation = processDomainEvent(event);
|
|
292879
|
-
return (event.type === "thread.turn-start-requested" ? withProviderTurnStartTimeout(operation, recoverTimedOutProviderTurnStart(event)) : operation).pipe(catchCause((cause) => {
|
|
293266
|
+
return (event.type === "thread.turn-start-requested" ? withProviderTurnStartTimeout(operation, recoverTimedOutProviderTurnStart(event)).pipe(onInterrupt(() => releaseTurnStart(turnStartKeyForEvent(event)))) : operation).pipe(catchCause((cause) => {
|
|
292880
293267
|
if (hasInterruptsOnly(cause)) return failCause$1(cause);
|
|
292881
293268
|
return logWarning$1("provider command reactor failed to process event", {
|
|
292882
293269
|
eventType: event.type,
|
|
@@ -292919,6 +293306,7 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
292919
293306
|
if (event.type === "thread.meta-updated" && event.payload.regenerateTitle === true) return yield* titleRegenerationWorker.enqueue(event);
|
|
292920
293307
|
});
|
|
292921
293308
|
yield* clearInterruptedThreadTitleRegenerations().pipe(catchCause((cause) => logWarning$1("provider command reactor failed to sweep interrupted title regenerations", { cause: pretty(cause) })));
|
|
293309
|
+
yield* startTurnStartEventRouter();
|
|
292922
293310
|
yield* forkScoped(runForEach(orchestrationEngine.streamDomainEvents, processEvent));
|
|
292923
293311
|
}),
|
|
292924
293312
|
drain: all([worker.drain, titleRegenerationWorker.drain], {
|
|
@@ -292934,7 +293322,7 @@ function recoverProviderTurnStartTimeout(input) {
|
|
|
292934
293322
|
return input.cleanup.pipe(matchEffect({
|
|
292935
293323
|
onFailure: input.markCleanupFailed,
|
|
292936
293324
|
onSuccess: () => input.markRecoverable
|
|
292937
|
-
}));
|
|
293325
|
+
}), ensuring(input.releaseHold));
|
|
292938
293326
|
}
|
|
292939
293327
|
(() => {
|
|
292940
293328
|
try {
|
|
@@ -294179,6 +294567,16 @@ const CheckpointReactorLive = effect(CheckpointReactor, gen(function* () {
|
|
|
294179
294567
|
const LAUNCH_HOLD_MAX_REFRESHES = 10;
|
|
294180
294568
|
/** The hold id of a pending turn start. The thread names it until turn.started arrives. */
|
|
294181
294569
|
const launchHoldId = (threadId) => `launch-${threadId}`;
|
|
294570
|
+
/**
|
|
294571
|
+
* Refresh budget for a turn-start hold (`holdTurnStart`): about ten minutes, matching the launch
|
|
294572
|
+
* hold's own budget. `ProviderCommandReactor` bounds its own retry-and-watch window well inside
|
|
294573
|
+
* this; the budget here is the backstop if that watch is itself interrupted (a server restart, a
|
|
294574
|
+
* bug) without releasing the hold.
|
|
294575
|
+
*/
|
|
294576
|
+
const TURN_START_HOLD_MAX_REFRESHES = 10;
|
|
294577
|
+
/** The hold id for `holdTurnStart` / `releaseTurnStart`. Distinct from `launchHoldId` on purpose:
|
|
294578
|
+
* see the shape's doc comment on `holdTurnStart`. */
|
|
294579
|
+
const turnStartHoldId = (key) => `turn-start-${key}`;
|
|
294182
294580
|
const SpriteTaskHoldReactorLive = effect(SpriteTaskHoldReactor, gen(function* () {
|
|
294183
294581
|
const providerService = yield* ProviderService;
|
|
294184
294582
|
const manager = makeSpriteTaskHoldManager(process.env, (message, cause) => {
|
|
@@ -294241,10 +294639,21 @@ const SpriteTaskHoldReactorLive = effect(SpriteTaskHoldReactor, gen(function* ()
|
|
|
294241
294639
|
launchCallers.delete(threadId);
|
|
294242
294640
|
await manager.release(launchHoldId(threadId));
|
|
294243
294641
|
});
|
|
294642
|
+
/** Takes a turn-start hold. Registered with no thread id: see the shape's doc comment. */
|
|
294643
|
+
const holdTurnStart = (key) => promise(async () => {
|
|
294644
|
+
if (manager === null) return;
|
|
294645
|
+
await manager.acquire(turnStartHoldId(key), null, { maxRefreshes: TURN_START_HOLD_MAX_REFRESHES });
|
|
294646
|
+
});
|
|
294647
|
+
const releaseTurnStart = (key) => promise(async () => {
|
|
294648
|
+
if (manager === null) return;
|
|
294649
|
+
await manager.release(turnStartHoldId(key));
|
|
294650
|
+
});
|
|
294244
294651
|
return {
|
|
294245
294652
|
start,
|
|
294246
294653
|
holdLaunch,
|
|
294247
294654
|
releaseLaunch,
|
|
294655
|
+
holdTurnStart,
|
|
294656
|
+
releaseTurnStart,
|
|
294248
294657
|
releaseAll: onManager((taskHolds) => taskHolds.releaseAll())
|
|
294249
294658
|
};
|
|
294250
294659
|
}));
|
|
@@ -298359,7 +298768,7 @@ function resolveBuildCommitFromEnv(env) {
|
|
|
298359
298768
|
* environment descriptor down instead of reporting an honest "unknown".
|
|
298360
298769
|
*/
|
|
298361
298770
|
function readBakedBuildCommit() {
|
|
298362
|
-
return "
|
|
298771
|
+
return "61b334c338ab47d92fe5f27155bf40ab9c7e3fed";
|
|
298363
298772
|
}
|
|
298364
298773
|
async function resolveServerBuildCommit(input) {
|
|
298365
298774
|
if (isFullCommitSha(input.baked)) return input.baked;
|
|
@@ -321976,13 +322385,13 @@ const gitUrlCloneRouteLayer = add$1("POST", "/api/cloud/git/clone-url", gen(func
|
|
|
321976
322385
|
//#endregion
|
|
321977
322386
|
//#region src/server.ts
|
|
321978
322387
|
const PtyAdapterLive = unwrap(gen(function* () {
|
|
321979
|
-
if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunPTY-
|
|
321980
|
-
else return (yield* promise(() => import("./NodePTY-
|
|
322388
|
+
if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunPTY-DsRB6_t-.mjs"))).layer;
|
|
322389
|
+
else return (yield* promise(() => import("./NodePTY-Dduv48Vi.mjs"))).layer;
|
|
321981
322390
|
}));
|
|
321982
322391
|
const HttpServerLive = unwrap(gen(function* () {
|
|
321983
322392
|
const config = yield* ServerConfig;
|
|
321984
|
-
if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunHttpServer-
|
|
321985
|
-
const [NodeHttpServer, NodeHttp] = yield* all([promise(() => import("./NodeHttpServer-
|
|
322393
|
+
if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunHttpServer-BpaVqxli.mjs"))).layer(bunHttpServerOptions(config));
|
|
322394
|
+
const [NodeHttpServer, NodeHttp] = yield* all([promise(() => import("./NodeHttpServer-DePOzmYy.mjs")), promise(() => import("node:http"))]);
|
|
321986
322395
|
return NodeHttpServer.layer(NodeHttp.createServer, {
|
|
321987
322396
|
host: config.host,
|
|
321988
322397
|
port: config.port
|
|
@@ -321990,10 +322399,10 @@ const HttpServerLive = unwrap(gen(function* () {
|
|
|
321990
322399
|
}));
|
|
321991
322400
|
const PlatformServicesLive = unwrap(gen(function* () {
|
|
321992
322401
|
if (typeof Bun !== "undefined") {
|
|
321993
|
-
const { layer } = yield* promise(() => import("./BunServices-
|
|
322402
|
+
const { layer } = yield* promise(() => import("./BunServices-ZpOiNNsP.mjs"));
|
|
321994
322403
|
return layer;
|
|
321995
322404
|
} else {
|
|
321996
|
-
const { layer } = yield* promise(() => import("./NodeServices-
|
|
322405
|
+
const { layer } = yield* promise(() => import("./NodeServices-Bt1GwPBR.mjs").then((n) => n.t));
|
|
321997
322406
|
return layer;
|
|
321998
322407
|
}
|
|
321999
322408
|
}));
|