@cmmd-center/forge 0.13.123 → 0.13.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +347 -37
- package/dist/bin.mjs +352 -42
- package/dist/client/assets/{DiffPanel-2DWWEN5v.js → DiffPanel-BM-qanPT.js} +2 -2
- package/dist/client/assets/{DiffPanel.logic-CVgetEpI.js → DiffPanel.logic-DS1mmUZB.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-DKnxI3A2.js → DiffWorkerPoolProvider-C2tnM5gq.js} +2 -2
- package/dist/client/assets/{PullRequestCodePanel-Cy6TVn_H.js → PullRequestCodePanel-zxkVGUeq.js} +2 -2
- package/dist/client/assets/{Virtualizer-nadxEIQ2.js → Virtualizer-Ds5-GzY3.js} +2 -2
- package/dist/client/assets/{WorkerPoolContext-PB5UPru-.js → WorkerPoolContext-BWuPUnhX.js} +3 -3
- package/dist/client/assets/{index-C7UfrmO7.js → index-Rx6Z6FPS.js} +6 -6
- 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,7 +1,7 @@
|
|
|
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$38, $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$41, 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$36, 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$34, 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$37, 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$40, 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$39, 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$
|
|
4
|
+
import { $ as encodeEffect, $a as make$38, $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$41, 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$36, 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$34, 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$37, 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$40, 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$39, 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$3, 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$35, 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
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$43, 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$42, Mt as failCause$4, N as map$7, O as fromQueue, Ot as makeUnsafe$6, P as mapAccum, Pt as make$44, 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$46, 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$45, 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
6
|
import { _ as ChildProcessSpawner, a as Stdio, g as make$47, o as make$48, r as isQuitError } from "./NodeTerminal-CeaWke6-.mjs";
|
|
7
7
|
import { n as layer$7 } from "./NodeServices-Bt1GwPBR.mjs";
|
|
@@ -19,7 +19,7 @@ import * as HE from "node:child_process";
|
|
|
19
19
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
20
20
|
import { Readable } from "node:stream";
|
|
21
21
|
import * as Crypto from "node:crypto";
|
|
22
|
-
import { createCipheriv, createDecipheriv, createHash, createHmac, createPublicKey, randomBytes, randomUUID, timingSafeEqual, verify } from "node:crypto";
|
|
22
|
+
import { createCipheriv, createDecipheriv, createHash, createHmac, createPublicKey, generateKeyPairSync, randomBytes, randomUUID, sign, timingSafeEqual, verify } from "node:crypto";
|
|
23
23
|
import * as FS$1 from "node:fs";
|
|
24
24
|
import fs, { accessSync, chmodSync, constants, createReadStream, existsSync, mkdirSync, mkdtempSync, promises, readFile, readFileSync, readdir, readdirSync, realpathSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
25
25
|
import * as NodeOS from "node:os";
|
|
@@ -30476,7 +30476,7 @@ function frameClassByte(frameClass) {
|
|
|
30476
30476
|
if (frameClass === "application") return Uint8Array.of(1);
|
|
30477
30477
|
return Uint8Array.of(2);
|
|
30478
30478
|
}
|
|
30479
|
-
function encodeBase64Url$
|
|
30479
|
+
function encodeBase64Url$2(value) {
|
|
30480
30480
|
let output = "";
|
|
30481
30481
|
for (let index = 0; index < value.byteLength; index += 3) {
|
|
30482
30482
|
const first = value[index] ?? 0;
|
|
@@ -30506,7 +30506,7 @@ function decodeBase64Url$1(value) {
|
|
|
30506
30506
|
outputIndex += 1;
|
|
30507
30507
|
}
|
|
30508
30508
|
}
|
|
30509
|
-
if (encodeBase64Url$
|
|
30509
|
+
if (encodeBase64Url$2(output) !== value) throw new RelayPayloadChannelFailure("channel_authentication_failed", "Encrypted relay frame has a non-canonical base64url encoding.");
|
|
30510
30510
|
return output;
|
|
30511
30511
|
}
|
|
30512
30512
|
function isLowOrderX25519PublicKey(value) {
|
|
@@ -30545,7 +30545,7 @@ async function createRelayPayloadBinding(input, digestProvider = defaultDigestPr
|
|
|
30545
30545
|
};
|
|
30546
30546
|
}
|
|
30547
30547
|
function relayPayloadTicketDigestBase64Url(binding) {
|
|
30548
|
-
return encodeBase64Url$
|
|
30548
|
+
return encodeBase64Url$2(binding.ticketDigest);
|
|
30549
30549
|
}
|
|
30550
30550
|
function relayPayloadInfo(binding) {
|
|
30551
30551
|
return concat([
|
|
@@ -30582,7 +30582,7 @@ async function generateRelayEndpointKeyPair(randomSource = defaultRandomSource)
|
|
|
30582
30582
|
}
|
|
30583
30583
|
async function serializeRelayEndpointPublicKey(publicKey) {
|
|
30584
30584
|
try {
|
|
30585
|
-
return encodeBase64Url$
|
|
30585
|
+
return encodeBase64Url$2(bytes(await suite.kem.serializePublicKey(publicKey)));
|
|
30586
30586
|
} catch (error) {
|
|
30587
30587
|
throw new RelayPayloadChannelFailure("endpoint_key_invalid", error instanceof Error ? error.message : "Endpoint public-key serialization failed.");
|
|
30588
30588
|
}
|
|
@@ -30637,7 +30637,7 @@ var HpkeRelayPayloadSender = class {
|
|
|
30637
30637
|
constructor(binding, context) {
|
|
30638
30638
|
this.binding = binding;
|
|
30639
30639
|
this.context = context;
|
|
30640
|
-
this.encapsulatedKey = encodeBase64Url$
|
|
30640
|
+
this.encapsulatedKey = encodeBase64Url$2(bytes(context.enc));
|
|
30641
30641
|
}
|
|
30642
30642
|
seal(input) {
|
|
30643
30643
|
return this.queue.run(async () => {
|
|
@@ -30667,7 +30667,7 @@ var HpkeRelayPayloadSender = class {
|
|
|
30667
30667
|
direction: this.binding.direction,
|
|
30668
30668
|
frameClass: input.frameClass,
|
|
30669
30669
|
sequence,
|
|
30670
|
-
ciphertext: encodeBase64Url$
|
|
30670
|
+
ciphertext: encodeBase64Url$2(ciphertext)
|
|
30671
30671
|
};
|
|
30672
30672
|
});
|
|
30673
30673
|
}
|
|
@@ -66046,7 +66046,7 @@ function normalizeNumberish(value) {
|
|
|
66046
66046
|
}
|
|
66047
66047
|
//#endregion
|
|
66048
66048
|
//#region package.json
|
|
66049
|
-
var version$1 = "0.13.
|
|
66049
|
+
var version$1 = "0.13.125";
|
|
66050
66050
|
//#endregion
|
|
66051
66051
|
//#region src/sentry.ts
|
|
66052
66052
|
const SERVER_APP_NAME = "forge-server";
|
|
@@ -71098,6 +71098,19 @@ function mintCmmdShortLivedToken(grantToken) {
|
|
|
71098
71098
|
});
|
|
71099
71099
|
}
|
|
71100
71100
|
/**
|
|
71101
|
+
* The redemption request body. `popPublicKeyPem` is the server's PoP identity
|
|
71102
|
+
* (forge#3534): presented when bound sessions are enabled so CMMD stamps the
|
|
71103
|
+
* returned JWT with this server's key (`cnf.jkt`), omitted otherwise.
|
|
71104
|
+
*/
|
|
71105
|
+
function buildSessionGrantRedemptionBody(grantToken, popPublicKeyPem) {
|
|
71106
|
+
return {
|
|
71107
|
+
grant_type: "forge_session_grant",
|
|
71108
|
+
grant_token: grantToken,
|
|
71109
|
+
client_id: "cmmd-forge-web",
|
|
71110
|
+
...popPublicKeyPem ? { pop_public_key: popPublicKeyPem } : {}
|
|
71111
|
+
};
|
|
71112
|
+
}
|
|
71113
|
+
/**
|
|
71101
71114
|
* Redeem a durable CMMD session grant for a fresh credential set.
|
|
71102
71115
|
*
|
|
71103
71116
|
* The grant is CMMD's designed recovery path for exactly the case a rotating
|
|
@@ -71109,15 +71122,11 @@ function mintCmmdShortLivedToken(grantToken) {
|
|
|
71109
71122
|
* Returns the new MCP PAT alongside the JWT/refresh pair, because CMMD mints a
|
|
71110
71123
|
* fresh PAT on redemption and the old one is not carried over.
|
|
71111
71124
|
*/
|
|
71112
|
-
function redeemCmmdSessionGrant(grantToken) {
|
|
71125
|
+
function redeemCmmdSessionGrant(grantToken, popPublicKeyPem) {
|
|
71113
71126
|
return fetch(new URL("/api/mcp-server/oauth/token", resolveCommandAppUrl()).toString(), {
|
|
71114
71127
|
method: "POST",
|
|
71115
71128
|
headers: { "Content-Type": "application/json" },
|
|
71116
|
-
body: JSON.stringify(
|
|
71117
|
-
grant_type: "forge_session_grant",
|
|
71118
|
-
grant_token: grantToken,
|
|
71119
|
-
client_id: "cmmd-forge-web"
|
|
71120
|
-
})
|
|
71129
|
+
body: JSON.stringify(buildSessionGrantRedemptionBody(grantToken, popPublicKeyPem))
|
|
71121
71130
|
}).then(async (response) => {
|
|
71122
71131
|
if (!response.ok) return null;
|
|
71123
71132
|
const payload = await response.json();
|
|
@@ -71188,6 +71197,140 @@ async function readOAuthErrorCode(response) {
|
|
|
71188
71197
|
}
|
|
71189
71198
|
}
|
|
71190
71199
|
//#endregion
|
|
71200
|
+
//#region ../../packages/shared/src/cmmdSessionPop.ts
|
|
71201
|
+
/**
|
|
71202
|
+
* CMMD session proof-of-possession client protocol (forge#3517).
|
|
71203
|
+
*
|
|
71204
|
+
* A CMMD session issued to a Forge client can be bound to the client's Ed25519
|
|
71205
|
+
* device key: the public key travels with the login (`pop_public_key`), CMMD
|
|
71206
|
+
* stamps its thumbprint into the token (`cnf.jkt`), and every authenticated
|
|
71207
|
+
* request must then carry a detached Ed25519 signature over a canonical
|
|
71208
|
+
* request binding (method + path + timestamp + nonce). A stolen bearer token
|
|
71209
|
+
* alone is unusable.
|
|
71210
|
+
*
|
|
71211
|
+
* This module is the client half of the scheme CMMD verifies in
|
|
71212
|
+
* `server/services/auth/session-pop-binding.ts`. The protocol deliberately
|
|
71213
|
+
* reuses CMMD's existing crypto shapes rather than inventing a new scheme: the
|
|
71214
|
+
* thumbprint is the same sha256-over-SPKI-DER base64url digest as the forge
|
|
71215
|
+
* device registry and the desktop relay identity, and the signature covers
|
|
71216
|
+
* `<purpose>.<base64url payload>`, the forge relay challenge shape, with
|
|
71217
|
+
* Ed25519. It is not a DPoP port: proofs are plain headers, not JWTs.
|
|
71218
|
+
*/
|
|
71219
|
+
const HEADER_KEY = "x-cmmd-pop-key";
|
|
71220
|
+
const HEADER_INPUT = "x-cmmd-pop-input";
|
|
71221
|
+
const HEADER_SIGNATURE = "x-cmmd-pop-signature";
|
|
71222
|
+
const CMMD_SESSION_POP_PURPOSE = "cmmd-session-pop-v1";
|
|
71223
|
+
function encodeBase64Url$1(bytes) {
|
|
71224
|
+
let binary = "";
|
|
71225
|
+
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
71226
|
+
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/u, "");
|
|
71227
|
+
}
|
|
71228
|
+
function buildCmmdSessionPopSigningInput(payload) {
|
|
71229
|
+
return `${CMMD_SESSION_POP_PURPOSE}.${encodeBase64Url$1(new TextEncoder().encode(JSON.stringify(payload)))}`;
|
|
71230
|
+
}
|
|
71231
|
+
function randomNonce() {
|
|
71232
|
+
const bytes = new Uint8Array(16);
|
|
71233
|
+
crypto.getRandomValues(bytes);
|
|
71234
|
+
return encodeBase64Url$1(bytes);
|
|
71235
|
+
}
|
|
71236
|
+
/**
|
|
71237
|
+
* Build the three proof headers for one request. Each call produces a fresh
|
|
71238
|
+
* nonce; callers must not reuse the returned headers across attempts
|
|
71239
|
+
* (retries included), because CMMD rejects replayed nonces.
|
|
71240
|
+
*/
|
|
71241
|
+
async function buildCmmdSessionPopProofHeaders(input) {
|
|
71242
|
+
const payload = {
|
|
71243
|
+
version: 1,
|
|
71244
|
+
htm: input.method.toUpperCase(),
|
|
71245
|
+
htu: input.path,
|
|
71246
|
+
ts: input.nowSeconds ?? Math.floor(Date.now() / 1e3),
|
|
71247
|
+
nonce: input.nonce ?? randomNonce()
|
|
71248
|
+
};
|
|
71249
|
+
const signingInput = buildCmmdSessionPopSigningInput(payload);
|
|
71250
|
+
const signature = await input.signer.sign(signingInput);
|
|
71251
|
+
const spkiDer = decodePemSpkiDer(input.signer.publicKeyPem);
|
|
71252
|
+
return {
|
|
71253
|
+
[HEADER_KEY]: encodeBase64Url$1(spkiDer),
|
|
71254
|
+
[HEADER_INPUT]: encodeBase64Url$1(new TextEncoder().encode(JSON.stringify(payload))),
|
|
71255
|
+
[HEADER_SIGNATURE]: encodeBase64Url$1(signature)
|
|
71256
|
+
};
|
|
71257
|
+
}
|
|
71258
|
+
function decodePemSpkiDer(pem) {
|
|
71259
|
+
const base64 = pem.replace("-----BEGIN PUBLIC KEY-----", "").replace("-----END PUBLIC KEY-----", "").replace(/\s+/gu, "").replace(/-/g, "+").replace(/_/g, "/");
|
|
71260
|
+
const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
|
|
71261
|
+
const binary = atob(padded);
|
|
71262
|
+
const bytes = new Uint8Array(binary.length);
|
|
71263
|
+
for (let index = 0; index < binary.length; index += 1) bytes[index] = binary.charCodeAt(index);
|
|
71264
|
+
return bytes;
|
|
71265
|
+
}
|
|
71266
|
+
//#endregion
|
|
71267
|
+
//#region src/cmmd/cmmdSessionPopServer.ts
|
|
71268
|
+
/**
|
|
71269
|
+
* The Forge server's own CMMD session proof-of-possession identity (forge#3534,
|
|
71270
|
+
* D3): the server holds an Ed25519 key, presents its SPKI PEM as
|
|
71271
|
+
* `pop_public_key` when it redeems a CMMD session grant, and signs every
|
|
71272
|
+
* CMMD-origin REST call it makes with detached proofs, so a stolen bearer JWT
|
|
71273
|
+
* alone is unusable. CMMD verifies the scheme in
|
|
71274
|
+
* `server/services/auth/session-pop-binding.ts`.
|
|
71275
|
+
*
|
|
71276
|
+
* Rollout order (docs/forge-cmmd-auth-lanes.md): CMMD deploys first; Forge
|
|
71277
|
+
* flips `FORGE_CMMD_SESSION_POP_ENABLED` afterwards; CMMD's
|
|
71278
|
+
* `JWT_REQUIRE_BOUND_SESSIONS=true` is the contract phase. While the flag is
|
|
71279
|
+
* off this module produces no keys and no headers, and CMMD treats tokens as
|
|
71280
|
+
* plain bearers.
|
|
71281
|
+
*
|
|
71282
|
+
* The identity lives in memory for the process lifetime. After a restart the
|
|
71283
|
+
* server mints a new identity; CMMD then refuses proofs from the old one, and
|
|
71284
|
+
* the JWT resolver's recovery ladder re-mints the affected credentials. The
|
|
71285
|
+
* persistence duty (a stable identity across restarts) lands with the flag
|
|
71286
|
+
* rollout, not with this plumbing.
|
|
71287
|
+
*/
|
|
71288
|
+
const ENABLED_FLAG = "FORGE_CMMD_SESSION_POP_ENABLED";
|
|
71289
|
+
/** Enables session proofs only when the rollout flag is exactly "true". */
|
|
71290
|
+
function isCmmdSessionPopEnabled() {
|
|
71291
|
+
return process.env[ENABLED_FLAG] === "true";
|
|
71292
|
+
}
|
|
71293
|
+
let cachedSigner = null;
|
|
71294
|
+
/** Creates an in-memory Ed25519 identity with a public SPKI PEM and a detached signer. */
|
|
71295
|
+
function createServerSigner() {
|
|
71296
|
+
const { publicKey, privateKey } = generateKeyPairSync("ed25519");
|
|
71297
|
+
const exported = publicKey.export({
|
|
71298
|
+
type: "spki",
|
|
71299
|
+
format: "pem"
|
|
71300
|
+
});
|
|
71301
|
+
return {
|
|
71302
|
+
publicKeyPem: typeof exported === "string" ? exported : exported.toString("utf8"),
|
|
71303
|
+
sign: async (signingInput) => new Uint8Array(sign(null, Buffer.from(signingInput, "utf8"), privateKey))
|
|
71304
|
+
};
|
|
71305
|
+
}
|
|
71306
|
+
/**
|
|
71307
|
+
* The server's PoP identity, created on first use under the flag and stable
|
|
71308
|
+
* for the process lifetime. Null while the flag is off.
|
|
71309
|
+
*/
|
|
71310
|
+
function resolveCmmdSessionPopSigner() {
|
|
71311
|
+
if (!isCmmdSessionPopEnabled()) return null;
|
|
71312
|
+
cachedSigner ??= createServerSigner();
|
|
71313
|
+
return cachedSigner;
|
|
71314
|
+
}
|
|
71315
|
+
/** The `pop_public_key` value to present at issuance, or null while disabled. */
|
|
71316
|
+
function cmmdSessionPopPublicKey() {
|
|
71317
|
+
return resolveCmmdSessionPopSigner()?.publicKeyPem ?? null;
|
|
71318
|
+
}
|
|
71319
|
+
/**
|
|
71320
|
+
* The three proof headers for one CMMD-origin request, or no headers while
|
|
71321
|
+
* disabled. Each call carries a fresh nonce; never reuse the result across
|
|
71322
|
+
* attempts, because CMMD rejects replayed nonces.
|
|
71323
|
+
*/
|
|
71324
|
+
async function cmmdSessionPopRequestHeaders(input) {
|
|
71325
|
+
const signer = resolveCmmdSessionPopSigner();
|
|
71326
|
+
if (!signer) return {};
|
|
71327
|
+
return buildCmmdSessionPopProofHeaders({
|
|
71328
|
+
signer,
|
|
71329
|
+
method: input.method,
|
|
71330
|
+
path: input.path
|
|
71331
|
+
});
|
|
71332
|
+
}
|
|
71333
|
+
//#endregion
|
|
71191
71334
|
//#region src/command/cmmdTokenMintLane.ts
|
|
71192
71335
|
/**
|
|
71193
71336
|
* The CMMD token-mint lane (forge#3518, expand phase).
|
|
@@ -71440,7 +71583,7 @@ function tryGrantRedemption(sessionId, context) {
|
|
|
71440
71583
|
return gen(function* () {
|
|
71441
71584
|
yield* logCmmdJwtRung(context, "grant-redemption", "attempted", "redeeming this session's durable CMMD session grant");
|
|
71442
71585
|
yield* recordCmmdCredentialRefreshMetric("grant-redemption", "attempted");
|
|
71443
|
-
const redeemed = yield* promise(() => redeemCmmdSessionGrant(grantToken)).pipe(orElseSucceed(() => null));
|
|
71586
|
+
const redeemed = yield* promise(() => redeemCmmdSessionGrant(grantToken, cmmdSessionPopPublicKey())).pipe(orElseSucceed(() => null));
|
|
71444
71587
|
const accessToken = usableCmmdUserJwt(redeemed?.accessToken);
|
|
71445
71588
|
if (!accessToken) {
|
|
71446
71589
|
yield* logCmmdJwtRung(context, "grant-redemption", "failed", "session grant redemption did not return a usable user access JWT");
|
|
@@ -71729,11 +71872,25 @@ async function requireCmmdProxySuccess(response, signal) {
|
|
|
71729
71872
|
* Uses the stored JWT (set after OAuth auth-code flow with post-update CMMD)
|
|
71730
71873
|
* to make authenticated REST calls on behalf of the user. A missing delegated
|
|
71731
71874
|
* JWT is an authentication-required state, not a CMMD availability failure.
|
|
71875
|
+
*
|
|
71876
|
+
* Every request this module sends can carry the server's session
|
|
71877
|
+
* proof-of-possession headers (forge#3534): while
|
|
71878
|
+
* `FORGE_CMMD_SESSION_POP_ENABLED` is true, `authHeaders` attaches detached
|
|
71879
|
+
* Ed25519 proofs over each request's method and path, which CMMD requires for
|
|
71880
|
+
* tokens bound with `cnf.jkt` and ignores otherwise. Each call gets a fresh
|
|
71881
|
+
* nonce, so retries re-sign rather than replay.
|
|
71732
71882
|
*/
|
|
71733
|
-
|
|
71883
|
+
/** Builds owner JWT and optional organization headers with fresh, flag-gated session proofs. */
|
|
71884
|
+
async function authHeaders(jwt, orgId, method, path) {
|
|
71734
71885
|
const headers = { Authorization: `Bearer ${jwt}` };
|
|
71735
71886
|
if (orgId) headers["X-Organization-ID"] = orgId;
|
|
71736
|
-
return
|
|
71887
|
+
return {
|
|
71888
|
+
...headers,
|
|
71889
|
+
...await cmmdSessionPopRequestHeaders({
|
|
71890
|
+
method,
|
|
71891
|
+
path
|
|
71892
|
+
})
|
|
71893
|
+
};
|
|
71737
71894
|
}
|
|
71738
71895
|
async function fetchResponse(url, init, options) {
|
|
71739
71896
|
try {
|
|
@@ -71745,18 +71902,20 @@ async function fetchResponse(url, init, options) {
|
|
|
71745
71902
|
rethrowCmmdProxyTimeout(error, options?.signal);
|
|
71746
71903
|
}
|
|
71747
71904
|
}
|
|
71905
|
+
/** Fetches a CMMD JSON resource with optional query parameters and caller cancellation. */
|
|
71748
71906
|
async function proxyGet(jwt, path, searchParams, orgId, options) {
|
|
71749
71907
|
const cmmdBase = resolveCommandAppUrl();
|
|
71750
71908
|
const url = new URL(path, cmmdBase);
|
|
71751
71909
|
if (searchParams) for (const [k, v] of Object.entries(searchParams)) url.searchParams.set(k, v);
|
|
71752
|
-
return handleCmmdProxyResponse(await fetchResponse(url.toString(), { headers: authHeaders(jwt, orgId) }, options), options?.signal);
|
|
71910
|
+
return handleCmmdProxyResponse(await fetchResponse(url.toString(), { headers: await authHeaders(jwt, orgId, "GET", path) }, options), options?.signal);
|
|
71753
71911
|
}
|
|
71912
|
+
/** Posts JSON to CMMD on the owner JWT lane and decodes the response or upstream error. */
|
|
71754
71913
|
async function proxyPost(jwt, path, body, orgId, options) {
|
|
71755
71914
|
const cmmdBase = resolveCommandAppUrl();
|
|
71756
71915
|
return handleCmmdProxyResponse(await fetchResponse(new URL(path, cmmdBase).toString(), {
|
|
71757
71916
|
method: "POST",
|
|
71758
71917
|
headers: {
|
|
71759
|
-
...authHeaders(jwt, orgId),
|
|
71918
|
+
...await authHeaders(jwt, orgId, "POST", path),
|
|
71760
71919
|
"Content-Type": "application/json"
|
|
71761
71920
|
},
|
|
71762
71921
|
body: JSON.stringify(body)
|
|
@@ -71770,44 +71929,49 @@ async function responseWithMetadata(response, signal) {
|
|
|
71770
71929
|
retryAfter: response.headers.get("retry-after")
|
|
71771
71930
|
};
|
|
71772
71931
|
}
|
|
71932
|
+
/** Fetches a CMMD resource while preserving status, Location, and Retry-After metadata. */
|
|
71773
71933
|
async function proxyGetWithMetadata(jwt, path, orgId, options) {
|
|
71774
|
-
return responseWithMetadata(await fetchResponse(new URL(path, resolveCommandAppUrl()).toString(), { headers: authHeaders(jwt, orgId) }, options), options?.signal);
|
|
71934
|
+
return responseWithMetadata(await fetchResponse(new URL(path, resolveCommandAppUrl()).toString(), { headers: await authHeaders(jwt, orgId, "GET", path) }, options), options?.signal);
|
|
71775
71935
|
}
|
|
71936
|
+
/** Posts JSON to CMMD while preserving status, Location, and Retry-After metadata. */
|
|
71776
71937
|
async function proxyPostWithMetadata(jwt, path, body, orgId, options) {
|
|
71777
71938
|
const cmmdBase = resolveCommandAppUrl();
|
|
71778
71939
|
return responseWithMetadata(await fetchResponse(new URL(path, cmmdBase).toString(), {
|
|
71779
71940
|
method: "POST",
|
|
71780
71941
|
headers: {
|
|
71781
|
-
...authHeaders(jwt, orgId),
|
|
71942
|
+
...await authHeaders(jwt, orgId, "POST", path),
|
|
71782
71943
|
"Content-Type": "application/json"
|
|
71783
71944
|
},
|
|
71784
71945
|
body: JSON.stringify(body)
|
|
71785
71946
|
}, options), options?.signal);
|
|
71786
71947
|
}
|
|
71948
|
+
/** Applies a JSON patch request to CMMD using the owner JWT and optional organization. */
|
|
71787
71949
|
async function proxyPatch(jwt, path, body, orgId) {
|
|
71788
71950
|
const cmmdBase = resolveCommandAppUrl();
|
|
71789
71951
|
const url = new URL(path, cmmdBase);
|
|
71790
71952
|
return handleCmmdProxyResponse(await fetch(url.toString(), {
|
|
71791
71953
|
method: "PATCH",
|
|
71792
71954
|
headers: {
|
|
71793
|
-
...authHeaders(jwt, orgId),
|
|
71955
|
+
...await authHeaders(jwt, orgId, "PATCH", path),
|
|
71794
71956
|
"Content-Type": "application/json"
|
|
71795
71957
|
},
|
|
71796
71958
|
body: JSON.stringify(body)
|
|
71797
71959
|
}));
|
|
71798
71960
|
}
|
|
71961
|
+
/** Sends a JSON replacement request to CMMD and decodes its response or upstream error. */
|
|
71799
71962
|
async function proxyPut(jwt, path, body, orgId) {
|
|
71800
71963
|
const cmmdBase = resolveCommandAppUrl();
|
|
71801
71964
|
const url = new URL(path, cmmdBase);
|
|
71802
71965
|
return handleCmmdProxyResponse(await fetch(url.toString(), {
|
|
71803
71966
|
method: "PUT",
|
|
71804
71967
|
headers: {
|
|
71805
|
-
...authHeaders(jwt, orgId),
|
|
71968
|
+
...await authHeaders(jwt, orgId, "PUT", path),
|
|
71806
71969
|
"Content-Type": "application/json"
|
|
71807
71970
|
},
|
|
71808
71971
|
body: JSON.stringify(body)
|
|
71809
71972
|
}));
|
|
71810
71973
|
}
|
|
71974
|
+
/** Deletes a CMMD resource with optional query parameters and JSON body; 204 returns undefined. */
|
|
71811
71975
|
async function proxyDelete(jwt, path, searchParams, orgId, body) {
|
|
71812
71976
|
const cmmdBase = resolveCommandAppUrl();
|
|
71813
71977
|
const url = new URL(path, cmmdBase);
|
|
@@ -71815,7 +71979,7 @@ async function proxyDelete(jwt, path, searchParams, orgId, body) {
|
|
|
71815
71979
|
const response = await fetch(url.toString(), {
|
|
71816
71980
|
method: "DELETE",
|
|
71817
71981
|
headers: {
|
|
71818
|
-
...authHeaders(jwt, orgId),
|
|
71982
|
+
...await authHeaders(jwt, orgId, "DELETE", path),
|
|
71819
71983
|
...body === void 0 ? {} : { "Content-Type": "application/json" }
|
|
71820
71984
|
},
|
|
71821
71985
|
...body === void 0 ? {} : { body: JSON.stringify(body) }
|
|
@@ -71823,13 +71987,14 @@ async function proxyDelete(jwt, path, searchParams, orgId, body) {
|
|
|
71823
71987
|
if (!response.ok && response.status !== 204) await requireCmmdProxySuccess(response);
|
|
71824
71988
|
return response.status === 204 ? void 0 : handleCmmdProxyResponse(response);
|
|
71825
71989
|
}
|
|
71990
|
+
/** Forwards multipart bytes to CMMD, preserving the caller's content type and boundary. */
|
|
71826
71991
|
async function proxyMultipart(jwt, path, body, contentType, orgId) {
|
|
71827
71992
|
const cmmdBase = resolveCommandAppUrl();
|
|
71828
71993
|
const url = new URL(path, cmmdBase);
|
|
71829
71994
|
return handleCmmdProxyResponse(await fetch(url.toString(), {
|
|
71830
71995
|
method: "POST",
|
|
71831
71996
|
headers: {
|
|
71832
|
-
...authHeaders(jwt, orgId),
|
|
71997
|
+
...await authHeaders(jwt, orgId, "POST", path),
|
|
71833
71998
|
"Content-Type": contentType
|
|
71834
71999
|
},
|
|
71835
72000
|
body
|
|
@@ -234623,7 +234788,7 @@ function inferCheckpointRefsPrefixFromStored(checkpointRefs) {
|
|
|
234623
234788
|
return checkpointRefs.some((checkpointRef) => String(checkpointRef).startsWith(`refs/t3/checkpoints/`)) ? LEGACY_CHECKPOINT_REFS_PREFIX : CHECKPOINT_REFS_PREFIX;
|
|
234624
234789
|
}
|
|
234625
234790
|
function checkpointRefForThreadTurnWithPrefix(threadId, turnCount, prefix) {
|
|
234626
|
-
return CheckpointRef.make(`${prefix}/${encodeBase64Url$
|
|
234791
|
+
return CheckpointRef.make(`${prefix}/${encodeBase64Url$3(threadId)}/turn/${turnCount}`);
|
|
234627
234792
|
}
|
|
234628
234793
|
function resolveThreadWorkspaceCwd(input) {
|
|
234629
234794
|
const worktreeCwd = input.thread.worktreePath ?? void 0;
|
|
@@ -239110,10 +239275,10 @@ function legacySafeThreadId(threadId) {
|
|
|
239110
239275
|
return threadId.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
239111
239276
|
}
|
|
239112
239277
|
function toSafeThreadId(threadId) {
|
|
239113
|
-
return `terminal_${encodeBase64Url$
|
|
239278
|
+
return `terminal_${encodeBase64Url$3(threadId)}`;
|
|
239114
239279
|
}
|
|
239115
239280
|
function toSafeTerminalId(terminalId) {
|
|
239116
|
-
return encodeBase64Url$
|
|
239281
|
+
return encodeBase64Url$3(terminalId);
|
|
239117
239282
|
}
|
|
239118
239283
|
function toSessionKey(threadId, terminalId) {
|
|
239119
239284
|
return `${threadId}\u0000${terminalId}`;
|
|
@@ -299854,7 +300019,7 @@ function resolveBuildCommitFromEnv(env) {
|
|
|
299854
300019
|
* environment descriptor down instead of reporting an honest "unknown".
|
|
299855
300020
|
*/
|
|
299856
300021
|
function readBakedBuildCommit() {
|
|
299857
|
-
return "
|
|
300022
|
+
return "2b217d6b85f7c98cf77e2a23bce2ef8102d3a0a5";
|
|
299858
300023
|
}
|
|
299859
300024
|
async function resolveServerBuildCommit(input) {
|
|
299860
300025
|
if (isFullCommitSha(input.baked)) return input.baked;
|
|
@@ -312710,6 +312875,44 @@ const cmmdUpdateProjectAgentMemberAvatarRouteLayer = registerProxyRoute({
|
|
|
312710
312875
|
responseShape: "unwrapData"
|
|
312711
312876
|
});
|
|
312712
312877
|
//#endregion
|
|
312878
|
+
//#region src/command/cmmdPushProxyRoutes.ts
|
|
312879
|
+
/**
|
|
312880
|
+
* The signed-in phone's push registration, forwarded to CMMD's push
|
|
312881
|
+
* device-token API on the owner's stored CMMD JWT (forge#3534).
|
|
312882
|
+
*
|
|
312883
|
+
* CMMD owns push delivery: the `device_push_tokens` table, the Expo transport,
|
|
312884
|
+
* and the `mobile_push_v1` delivery flag are all CMMD-side, and its
|
|
312885
|
+
* registration API lives at `/api/push`, not under `/api/forge/context`. The
|
|
312886
|
+
* mobile push delivery spec (docs/specs/2026-09-09-mobile-push-delivery.md,
|
|
312887
|
+
* stage 2) recommends reusing that API over adding a forge-context doorway
|
|
312888
|
+
* first: the Forge server already holds the phone's CMMD credential, and the
|
|
312889
|
+
* registry prologue here provides the same session auth, CMMD-connection
|
|
312890
|
+
* gate, and `CMMD_AUTH_REQUIRED` mapping every `/api/cmmd` route gets. The
|
|
312891
|
+
* deny-listed legacy owner control paths are untouched. If review wants a
|
|
312892
|
+
* forge-context doorway first, these two routes are the only call sites to
|
|
312893
|
+
* repoint.
|
|
312894
|
+
*
|
|
312895
|
+
* `orgIdSource` is `none` (the organization comes from the JWT, like the
|
|
312896
|
+
* settings and device-registry routes): a phone registers against its default
|
|
312897
|
+
* organization and has no workspace context to pass.
|
|
312898
|
+
*/
|
|
312899
|
+
const cmmdRegisterMobilePushDeviceRouteLayer = registerProxyRoute({
|
|
312900
|
+
forgePath: "/api/cmmd/mobile/push/registration",
|
|
312901
|
+
method: "POST",
|
|
312902
|
+
cmmdPath: "/api/push/device-tokens",
|
|
312903
|
+
orgIdSource: "none",
|
|
312904
|
+
responseShape: "unwrapData",
|
|
312905
|
+
successStatus: 201
|
|
312906
|
+
});
|
|
312907
|
+
const cmmdDeleteMobilePushDeviceRouteLayer = registerProxyRoute({
|
|
312908
|
+
forgePath: "/api/cmmd/mobile/push/registration",
|
|
312909
|
+
method: "DELETE",
|
|
312910
|
+
cmmdPath: "/api/push/device-tokens",
|
|
312911
|
+
orgIdSource: "none",
|
|
312912
|
+
responseShape: "unwrapData",
|
|
312913
|
+
requestBody: "json"
|
|
312914
|
+
});
|
|
312915
|
+
//#endregion
|
|
312713
312916
|
//#region src/command/runtimeProviderAuthorityUpgradeModel.ts
|
|
312714
312917
|
const AUTHORITY_UPGRADE_OPERATION_KEYS = new Set([
|
|
312715
312918
|
"operationId",
|
|
@@ -314427,9 +314630,17 @@ const RuntimeReplicationLive = effect(RuntimeReplication, gen(function* () {
|
|
|
314427
314630
|
concurrency: 1,
|
|
314428
314631
|
discard: true
|
|
314429
314632
|
});
|
|
314633
|
+
const retryStuckThreadStreams = (streamKeys) => runtimeId ? forEach(streamKeys, (streamKey) => outbox.resetStuckThreadGeneration({
|
|
314634
|
+
runtimeId,
|
|
314635
|
+
streamKey
|
|
314636
|
+
}).pipe(flatMap((reset) => reset ? enqueueThread(threadIdFromStreamKey(streamKey)) : void_$1)), {
|
|
314637
|
+
concurrency: 1,
|
|
314638
|
+
discard: true
|
|
314639
|
+
}) : void_$1;
|
|
314430
314640
|
return RuntimeReplication.of({
|
|
314431
314641
|
start,
|
|
314432
|
-
retryReprojectionPending
|
|
314642
|
+
retryReprojectionPending,
|
|
314643
|
+
retryStuckThreadStreams
|
|
314433
314644
|
});
|
|
314434
314645
|
}));
|
|
314435
314646
|
//#endregion
|
|
@@ -314764,6 +314975,31 @@ const THREAD_STREAM_PAYLOAD_HASH_MISMATCH_CODE = "THREAD_STREAM_PAYLOAD_HASH_MIS
|
|
|
314764
314975
|
*/
|
|
314765
314976
|
const THREAD_STREAM_REMOTE_CONFLICT_REPROJECTION_PENDING_CODE = "THREAD_STREAM_REMOTE_CONFLICT_REPROJECTION_PENDING";
|
|
314766
314977
|
/**
|
|
314978
|
+
* Terminal park code for a thread-events reset `refusedResetIsStuck` judges
|
|
314979
|
+
* genuinely stuck: the exact canonical reset shape was already sent once
|
|
314980
|
+
* under this generation and CMMD refused it again with zero acknowledged
|
|
314981
|
+
* progress (forge#3635). Before this code existed, that case fell through to
|
|
314982
|
+
* `failGeneric`, which recorded the raw `THREAD_STREAM_PAYLOAD_CONFLICT` /
|
|
314983
|
+
* `THREAD_STREAM_HEAD_MISMATCH` code -- a code neither
|
|
314984
|
+
* `readReprojectionPendingThreadStreamKeys` nor
|
|
314985
|
+
* `MANUALLY_RECOVERABLE_BLOCKED_CODES` selects, so the manual retry endpoint
|
|
314986
|
+
* could never reach the row.
|
|
314987
|
+
*
|
|
314988
|
+
* Deliberately excluded from `CLAIMABLE_BLOCKED_CODES`,
|
|
314989
|
+
* `STARTUP_RECOVERABLE_BLOCKED_CODES`, and `MANUALLY_RECOVERABLE_BLOCKED_CODES`:
|
|
314990
|
+
* a plain status flip back to `pending` would resend the exact batch CMMD
|
|
314991
|
+
* already refused twice. `enqueueThread` also leaves a row parked under this
|
|
314992
|
+
* code alone on new domain events and the heartbeat (see the stuck check
|
|
314993
|
+
* inside `enqueueThread` below) instead of re-projecting it back to `pending`
|
|
314994
|
+
* the way it does for every other generation, so a stuck row only clears once
|
|
314995
|
+
* the operator retry endpoint calls `RuntimeReplicationOutboxShape`'s
|
|
314996
|
+
* `resetStuckThreadGeneration` (which mints a fresh, never-before-sent repair
|
|
314997
|
+
* generation before re-projecting) or
|
|
314998
|
+
* a genuinely new generation id supersedes it (e.g. the thread archives and
|
|
314999
|
+
* gets a `:final:` id).
|
|
315000
|
+
*/
|
|
315001
|
+
const THREAD_STREAM_REMOTE_CONFLICT_STUCK_CODE = "THREAD_STREAM_REMOTE_CONFLICT_STUCK";
|
|
315002
|
+
/**
|
|
314767
315003
|
* Whether a refused batch is the exact canonical reset shape (`fromSequence
|
|
314768
315004
|
* === 1`, empty previous head, deterministic content) under a generation the
|
|
314769
315005
|
* local cursor already holds with zero acknowledged progress -- i.e. this
|
|
@@ -315041,6 +315277,23 @@ const readReprojectionPendingThreadStreamKeys = gen(function* () {
|
|
|
315041
315277
|
AND last_error_code = ${THREAD_STREAM_REMOTE_CONFLICT_REPROJECTION_PENDING_CODE}
|
|
315042
315278
|
`).map((row) => row.streamKey);
|
|
315043
315279
|
}).pipe(orDie);
|
|
315280
|
+
/**
|
|
315281
|
+
* Thread streams parked under THREAD_STREAM_REMOTE_CONFLICT_STUCK_CODE, for the
|
|
315282
|
+
* manual `/api/runtime-replication/retry` endpoint (forge#3635). Deliberately absent
|
|
315283
|
+
* from MANUALLY_RECOVERABLE_BLOCKED_CODES for the same reason
|
|
315284
|
+
* `readReprojectionPendingThreadStreamKeys` is: a plain status flip back to `pending`
|
|
315285
|
+
* would resend the exact reset CMMD already refused twice. `http.ts`'s retry handler
|
|
315286
|
+
* passes these to `RuntimeReplication`'s `retryStuckThreadStreams`, which calls
|
|
315287
|
+
* `resetStuckThreadGeneration` for each of these before re-projecting, so the retry
|
|
315288
|
+
* always sends a fresh, never-before-refused generation.
|
|
315289
|
+
*/
|
|
315290
|
+
const readStuckThreadStreamKeys = gen(function* () {
|
|
315291
|
+
return (yield* (yield* SqlClient)`
|
|
315292
|
+
SELECT stream_key AS "streamKey" FROM runtime_replication_outbox
|
|
315293
|
+
WHERE operation = 'thread-events' AND status = 'blocked'
|
|
315294
|
+
AND last_error_code = ${THREAD_STREAM_REMOTE_CONFLICT_STUCK_CODE}
|
|
315295
|
+
`).map((row) => row.streamKey);
|
|
315296
|
+
}).pipe(orDie);
|
|
315044
315297
|
const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(function* () {
|
|
315045
315298
|
const sql = yield* SqlClient;
|
|
315046
315299
|
const upsertPayload = (input) => {
|
|
@@ -315261,6 +315514,12 @@ const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(functi
|
|
|
315261
315514
|
now
|
|
315262
315515
|
}).pipe(orDie);
|
|
315263
315516
|
};
|
|
315517
|
+
const isThreadStreamParkedStuck = (input) => sql`
|
|
315518
|
+
SELECT runtime_id AS "runtimeId" FROM runtime_replication_outbox
|
|
315519
|
+
WHERE runtime_id = ${input.runtimeId} AND stream_key = ${input.streamKey}
|
|
315520
|
+
AND operation = 'thread-events' AND status = 'blocked'
|
|
315521
|
+
AND last_error_code = ${THREAD_STREAM_REMOTE_CONFLICT_STUCK_CODE}
|
|
315522
|
+
`.pipe(map$3((rows) => rows.length === 1));
|
|
315264
315523
|
const enqueueThread = (input) => {
|
|
315265
315524
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
315266
315525
|
const baseGenerationId = runtimeThreadGenerationId(input.runtimeId, input.streamKey);
|
|
@@ -315269,6 +315528,7 @@ const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(functi
|
|
|
315269
315528
|
const previousActiveGeneration = activeRuntimeThreadGenerationId(baseGenerationId, previousCursor?.generationId);
|
|
315270
315529
|
const generationId = input.historyFinalized ? runtimeThreadFinalGenerationId(input.runtimeId, input.streamKey, input.events) : previousActiveGeneration;
|
|
315271
315530
|
const replacesGeneration = previousCursor !== void 0 && previousCursor.generationId !== generationId;
|
|
315531
|
+
if (!replacesGeneration && (yield* isThreadStreamParkedStuck(input))) return;
|
|
315272
315532
|
yield* initializeThreadCursor({
|
|
315273
315533
|
runtimeId: input.runtimeId,
|
|
315274
315534
|
streamKey: input.streamKey,
|
|
@@ -315569,12 +315829,16 @@ const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(functi
|
|
|
315569
315829
|
})).pipe(orDie);
|
|
315570
315830
|
/**
|
|
315571
315831
|
* Recovers from a CMMD-reported thread stream conflict (see
|
|
315572
|
-
* THREAD_STREAM_REMOTE_CONFLICT_CODES). Returns `null` when this
|
|
315573
|
-
*
|
|
315574
|
-
* says the exact reset shape
|
|
315575
|
-
*
|
|
315576
|
-
*
|
|
315577
|
-
*
|
|
315832
|
+
* THREAD_STREAM_REMOTE_CONFLICT_CODES). Returns `null` only when this
|
|
315833
|
+
* item's payload does not decode, in which case the caller falls back to
|
|
315834
|
+
* `failGeneric`. When `refusedResetIsStuck` says the exact reset shape
|
|
315835
|
+
* already failed once with zero progress, parks the row under
|
|
315836
|
+
* `THREAD_STREAM_REMOTE_CONFLICT_STUCK_CODE` directly (see that code's
|
|
315837
|
+
* doc comment) and returns `true`/`false` the same way the normal repair
|
|
315838
|
+
* path below does -- never `null` -- so the caller never falls through to
|
|
315839
|
+
* `failGeneric`'s raw conflict code (forge#3635). `false` means the row
|
|
315840
|
+
* was superseded before this could apply, mirroring `fail`'s own
|
|
315841
|
+
* supersession signal. Otherwise replaces the local cursor with a brand-new repair generation
|
|
315578
315842
|
* from sequence 1, empty previous head -- the shape CMMD's reset rule
|
|
315579
315843
|
* accepts unconditionally -- and parks the row blocked under
|
|
315580
315844
|
* `THREAD_STREAM_REMOTE_CONFLICT_REPROJECTION_PENDING_CODE`, deferring the
|
|
@@ -315593,13 +315857,30 @@ const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(functi
|
|
|
315593
315857
|
runtimeId: item.runtimeId,
|
|
315594
315858
|
streamKey: item.streamKey
|
|
315595
315859
|
});
|
|
315860
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
315596
315861
|
if (refusedResetIsStuck({
|
|
315597
315862
|
baseGenerationId,
|
|
315598
315863
|
refusedGenerationId: parsedBatch.generationId,
|
|
315599
315864
|
refusedFromSequence: parsedBatch.fromSequence,
|
|
315600
315865
|
cursor
|
|
315601
|
-
}))
|
|
315602
|
-
|
|
315866
|
+
})) {
|
|
315867
|
+
if ((yield* sql`
|
|
315868
|
+
UPDATE runtime_replication_outbox SET
|
|
315869
|
+
status = 'blocked', next_attempt_at = '9999-12-31T23:59:59.999Z',
|
|
315870
|
+
last_error_code = ${"THREAD_STREAM_REMOTE_CONFLICT_STUCK"},
|
|
315871
|
+
last_error = ${`Runtime replication conflict (${failure.code}) refused a thread-events reset that had already been refused once with zero acknowledged progress under this generation. Parked as stuck rather than resent; use the manual retry endpoint to reset it to a fresh generation.`}, updated_at = ${now}
|
|
315872
|
+
WHERE runtime_id = ${item.runtimeId} AND stream_key = ${item.streamKey}
|
|
315873
|
+
AND payload_hash = ${item.payloadHash}
|
|
315874
|
+
RETURNING runtime_id AS "runtimeId"
|
|
315875
|
+
`).length !== 1) return false;
|
|
315876
|
+
yield* logWarning$1("Runtime replication parked a thread-stream repair as stuck after its reset was refused with zero progress.", {
|
|
315877
|
+
runtimeId: item.runtimeId,
|
|
315878
|
+
streamKey: item.streamKey,
|
|
315879
|
+
errorCode: failure.code,
|
|
315880
|
+
refusedGenerationId: parsedBatch.generationId
|
|
315881
|
+
});
|
|
315882
|
+
return true;
|
|
315883
|
+
}
|
|
315603
315884
|
const repairGenerationId = `${baseGenerationId}:repair:${Crypto.randomUUID()}`;
|
|
315604
315885
|
const message = `Runtime replication conflict (${failure.code}) refused a thread-events batch; deferring to a full-history re-projection under a new repair generation.`;
|
|
315605
315886
|
if (!(yield* sql.withTransaction(gen(function* () {
|
|
@@ -315667,6 +315948,30 @@ const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(functi
|
|
|
315667
315948
|
AND status = 'blocked'
|
|
315668
315949
|
AND last_error_code = 'RUNTIME_REVOKED'
|
|
315669
315950
|
`.pipe(asVoid, orDie);
|
|
315951
|
+
const resetStuckThreadGeneration = (input) => {
|
|
315952
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
315953
|
+
const repairGenerationId = `${runtimeThreadGenerationId(input.runtimeId, input.streamKey)}:repair:${Crypto.randomUUID()}`;
|
|
315954
|
+
const message = "Runtime replication operator retry reset a stuck thread-stream repair to a new generation.";
|
|
315955
|
+
return sql.withTransaction(gen(function* () {
|
|
315956
|
+
if ((yield* sql`
|
|
315957
|
+
UPDATE runtime_replication_outbox SET
|
|
315958
|
+
status = 'blocked', next_attempt_at = '9999-12-31T23:59:59.999Z',
|
|
315959
|
+
last_error_code = ${"THREAD_STREAM_REMOTE_CONFLICT_REPROJECTION_PENDING"},
|
|
315960
|
+
last_error = ${message}, updated_at = ${now}
|
|
315961
|
+
WHERE runtime_id = ${input.runtimeId} AND stream_key = ${input.streamKey}
|
|
315962
|
+
AND operation = 'thread-events'
|
|
315963
|
+
AND last_error_code = ${"THREAD_STREAM_REMOTE_CONFLICT_STUCK"}
|
|
315964
|
+
RETURNING runtime_id AS "runtimeId"
|
|
315965
|
+
`).length !== 1) return false;
|
|
315966
|
+
yield* replaceThreadCursor({
|
|
315967
|
+
runtimeId: input.runtimeId,
|
|
315968
|
+
streamKey: input.streamKey,
|
|
315969
|
+
generationId: repairGenerationId,
|
|
315970
|
+
now
|
|
315971
|
+
});
|
|
315972
|
+
return true;
|
|
315973
|
+
})).pipe(orDie);
|
|
315974
|
+
};
|
|
315670
315975
|
const getStatus = () => readRuntimeReplicationOutboxStatus.pipe(provideService(SqlClient, sql));
|
|
315671
315976
|
const getDiagnostics = () => gen(function* () {
|
|
315672
315977
|
const [diagnostics] = decodeDiagnostics(yield* sql`
|
|
@@ -315697,6 +316002,7 @@ const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(functi
|
|
|
315697
316002
|
acknowledge,
|
|
315698
316003
|
fail,
|
|
315699
316004
|
retryBlocked,
|
|
316005
|
+
resetStuckThreadGeneration,
|
|
315700
316006
|
recover,
|
|
315701
316007
|
recoverLegacyRevokedInventory,
|
|
315702
316008
|
getStatus,
|
|
@@ -315828,10 +316134,14 @@ const retryHandler = gen(function* () {
|
|
|
315828
316134
|
const replication = yield* serviceOption(RuntimeReplication);
|
|
315829
316135
|
const requeued = yield* retryBlockedRuntimeReplicationOutbox;
|
|
315830
316136
|
const reprojectionPendingStreamKeys = yield* readReprojectionPendingThreadStreamKeys;
|
|
315831
|
-
|
|
316137
|
+
const stuckStreamKeys = yield* readStuckThreadStreamKeys;
|
|
316138
|
+
if (isSome(replication)) {
|
|
316139
|
+
yield* replication.value.retryReprojectionPending(reprojectionPendingStreamKeys);
|
|
316140
|
+
yield* replication.value.retryStuckThreadStreams(stuckStreamKeys);
|
|
316141
|
+
}
|
|
315832
316142
|
const status = yield* readRuntimeReplicationOutboxStatus;
|
|
315833
316143
|
return jsonUnsafe({
|
|
315834
|
-
requeued: requeued + (isSome(replication) ? reprojectionPendingStreamKeys.length : 0),
|
|
316144
|
+
requeued: requeued + (isSome(replication) ? reprojectionPendingStreamKeys.length + stuckStreamKeys.length : 0),
|
|
315835
316145
|
...responseFromStatus(status)
|
|
315836
316146
|
});
|
|
315837
316147
|
}).pipe(catchTag("AuthError", respondToAuthError));
|
|
@@ -324172,7 +324482,7 @@ const MiscRuntimeLayerLive = mergeAll(AnalyticsServiceLayerLive, OpenLive, Serve
|
|
|
324172
324482
|
const RuntimeDependenciesWithoutPullRequestsLive = ReactorLayerLive.pipe(provideMerge(CheckpointingLayerLive), provideMerge(GitLayerLive), provideMerge(OrchestrationLayerLive), provideMerge(ProviderLayerLive), provideMerge(TerminalLayerLive), provideMerge(AgentBrowserManagerLive), provideMerge(mergeAll(ThreadDevRuntimeLive, DevTunnelLive.pipe(provide$1(ThreadDevRuntimeLive)))), provideMerge(PersistenceLayerLive), provideMerge(KeybindingsLive), provideMerge(ProviderRegistryLive), provideMerge(mergeAll(ServerSettingsLive, UsageServiceLive.pipe(provide$1(ServerSettingsLive), provide$1(UsageSessionLookupLive), provide$1(UsageRecordedSourceLive.pipe(provide$1(OrchestrationLayerLive), provide$1(RuntimeReplicationOutboxLive), provide$1(ProviderSessionRuntimeRepositoryLive), provide$1(TextGenerationSessionRepositoryLive)))))), provideMerge(WorkspaceLayerLive), provideMerge(WorkspaceReadinessStateLive), provideMerge(ProjectFaviconResolverLive), provideMerge(RepositoryIdentityResolverLive), provideMerge(ServerEnvironmentLive), provideMerge(AuthLayerLive), provideMerge(ServerSecretStoreLayerLive), provideMerge(mergeAll(CloudRedisCoordinationLive, CloudStateSyncLive.pipe(provide$1(PersistenceLayerLive)))), provideMerge(MiscRuntimeLayerLive));
|
|
324173
324483
|
const RuntimeDependenciesLive = pullRequestServiceFactoryLayer.pipe(provideMerge(RuntimeDependenciesWithoutPullRequestsLive), provideMerge(cmmdProjectIdentityResolverLive.pipe(provide$1(RuntimeDependenciesWithoutPullRequestsLive))), provideMerge(pullRequestProviderRuntimeLive));
|
|
324174
324484
|
const RuntimeServicesLive = ServerRuntimeStartupLive.pipe(provideMerge(RuntimeDependenciesLive));
|
|
324175
|
-
const makeRoutesLayer = mergeAll(attachmentUploadRouteLayer, authBearerBootstrapRouteLayer, authBootstrapRouteLayer, authCommandBearerBootstrapRouteLayer, authCommandBootstrapRouteLayer, authCmmdEmbedExchangeRouteLayer, authOAuthTokenExchangeRouteLayer, authWebSocketTicketRouteLayer, authCmmdOAuthDeviceRouteLayer, authCmmdOAuthTokenRouteLayer, authCmmdPasswordTokenRouteLayer, authClientsRevokeOthersRouteLayer, authClientsRevokeRouteLayer, authClientsRouteLayer, authLogoutRouteLayer, authPairingLinksRevokeRouteLayer, authPairingLinksRouteLayer, authPairingCredentialRouteLayer, authSessionRenewRouteLayer, authSessionRouteLayer, authWebSocketTokenRouteLayer, authWebLoginRouteLayer, authWebCallbackRouteLayer, cloudOwnerSessionRedeemRouteLayer, cloudOwnerSessionRevokeRouteLayer, desktopLocalWebBridgePublishRouteLayer, desktopLocalWebBridgeBootstrapRouteLayer, desktopRelayControlPlaneRouteLayer, apiDocsHtmlRouteLayer, apiDocsOpenApiRouteLayer, pulseSignalStateListRouteLayer, pulseSignalStateUpsertRouteLayer, cmmdProfileRouteLayer, ...cmmdProxyRouteLayers, cmmdWorkIntakeRouteLayer, cmmdWsTokenRouteLayer, cmmdGetProjectCommentsRouteLayer, cmmdAddProjectCommentRouteLayer, cmmdUpdateProjectRouteLayer, cmmdUploadTaskAttachmentRouteLayer, cmmdUpdateTaskCommentRouteLayer, cmmdListWorkspaceMembersRouteLayer, cmmdAddProjectMemberRouteLayer, cmmdUpdateProjectAgentMemberAvatarRouteLayer, runtimeReplicationStatusRouteLayer, cmmdRefreshProviderUsageRouteLayer, cmmdForgeCloudProjectsListRouteLayer, cmmdForgeCloudProjectsEventsRouteLayer, cmmdForgeEnvironmentsEventsRouteLayer, cmmdForgeRuntimesEnsureRouteLayer, cmmdForgeRuntimesConnectRouteLayer, ownerRuntimeCodexReadinessRouteLayer, cmmdForgeRuntimesStatusRouteLayer, cmmdForgeRuntimesStartRouteLayer, cmmdForgeRuntimesStopRouteLayer, cmmdForgeRuntimesRecycleRouteLayer, cmmdForgeRuntimesUpdateCommitRouteLayer, cmmdForgeRuntimesDestroyRouteLayer, mobileProviderCatalogRouteLayer, attachmentsRouteLayer, orchestrationDispatchRouteLayer, orchestrationCmmdWorkRunEventRouteLayer, orchestrationAutomationStartThreadRouteLayer, orchestrationAutomationRebindRouteLayer, orchestrationAutomationTerminalReconcileRouteLayer, mobileGitRunStackedActionRouteLayer, pullRequestDiffRouteLayer, orchestrationSnapshotRouteLayer, orchestrationThreadSnapshotRouteLayer, localAutomationListRouteLayer, localAutomationCreateRouteLayer, localAutomationUpdateRouteLayer, localAutomationDeleteRouteLayer, localAutomationRunRouteLayer, otlpTracesProxyRouteLayer, devTunnelProxyRouteLayer, devTunnelLocalPortProxyRouteLayer, projectFaviconRouteLayer, serverEnvironmentRouteLayer, browserWebRtcReadinessRouteLayer, staticAndDevRouteLayer, githubStatusRouteLayer, githubAuthorizeUrlRouteLayer, githubDisconnectRouteLayer, githubReposRouteLayer, githubCloneRouteLayer, githubCloneJobStartRouteLayer, githubCloneJobStatusRouteLayer, githubRefreshCredentialsRouteLayer, githubToolConfirmationApproveRouteLayer, projectLinkGetRouteLayer, projectLinkListRouteLayer, projectLinkSetRouteLayer, projectLinkDeleteRouteLayer, cmmdWorkspacesRouteLayer, cmmdCampaignsRouteLayer, cmmdProjectLinksRouteLayer, cmmdEnsureGitHubProjectContextRouteLayer, cmmdProjectRepositoryEnsureRouteLayer, cmmdProjectsGetRouteLayer, cmmdProjectsCreateRouteLayer, workspaceReadinessRouteLayer, runtimeLivenessRouteLayer, runtimeFilesystemHealthRouteLayer, claudeNativeGenerationProofRouteLayer, claudeUsageRouteLayer, codexRuntimeProviderReadinessRouteLayer, runtimeDiagnosticsRouteLayer, cloudFoldersRouteLayer, cloudProjectCreateRouteLayer, gitUrlCloneRouteLayer, websocketRpcRouteLayer).pipe(provide$1(browserApiCorsLayer));
|
|
324485
|
+
const makeRoutesLayer = mergeAll(attachmentUploadRouteLayer, authBearerBootstrapRouteLayer, authBootstrapRouteLayer, authCommandBearerBootstrapRouteLayer, authCommandBootstrapRouteLayer, authCmmdEmbedExchangeRouteLayer, authOAuthTokenExchangeRouteLayer, authWebSocketTicketRouteLayer, authCmmdOAuthDeviceRouteLayer, authCmmdOAuthTokenRouteLayer, authCmmdPasswordTokenRouteLayer, authClientsRevokeOthersRouteLayer, authClientsRevokeRouteLayer, authClientsRouteLayer, authLogoutRouteLayer, authPairingLinksRevokeRouteLayer, authPairingLinksRouteLayer, authPairingCredentialRouteLayer, authSessionRenewRouteLayer, authSessionRouteLayer, authWebSocketTokenRouteLayer, authWebLoginRouteLayer, authWebCallbackRouteLayer, cloudOwnerSessionRedeemRouteLayer, cloudOwnerSessionRevokeRouteLayer, desktopLocalWebBridgePublishRouteLayer, desktopLocalWebBridgeBootstrapRouteLayer, desktopRelayControlPlaneRouteLayer, apiDocsHtmlRouteLayer, apiDocsOpenApiRouteLayer, pulseSignalStateListRouteLayer, pulseSignalStateUpsertRouteLayer, cmmdProfileRouteLayer, ...cmmdProxyRouteLayers, cmmdWorkIntakeRouteLayer, cmmdWsTokenRouteLayer, cmmdGetProjectCommentsRouteLayer, cmmdAddProjectCommentRouteLayer, cmmdUpdateProjectRouteLayer, cmmdUploadTaskAttachmentRouteLayer, cmmdUpdateTaskCommentRouteLayer, cmmdListWorkspaceMembersRouteLayer, cmmdAddProjectMemberRouteLayer, cmmdUpdateProjectAgentMemberAvatarRouteLayer, runtimeReplicationStatusRouteLayer, cmmdRefreshProviderUsageRouteLayer, cmmdForgeCloudProjectsListRouteLayer, cmmdForgeCloudProjectsEventsRouteLayer, cmmdForgeEnvironmentsEventsRouteLayer, cmmdForgeRuntimesEnsureRouteLayer, cmmdForgeRuntimesConnectRouteLayer, ownerRuntimeCodexReadinessRouteLayer, cmmdRegisterMobilePushDeviceRouteLayer, cmmdDeleteMobilePushDeviceRouteLayer, cmmdForgeRuntimesStatusRouteLayer, cmmdForgeRuntimesStartRouteLayer, cmmdForgeRuntimesStopRouteLayer, cmmdForgeRuntimesRecycleRouteLayer, cmmdForgeRuntimesUpdateCommitRouteLayer, cmmdForgeRuntimesDestroyRouteLayer, mobileProviderCatalogRouteLayer, attachmentsRouteLayer, orchestrationDispatchRouteLayer, orchestrationCmmdWorkRunEventRouteLayer, orchestrationAutomationStartThreadRouteLayer, orchestrationAutomationRebindRouteLayer, orchestrationAutomationTerminalReconcileRouteLayer, mobileGitRunStackedActionRouteLayer, pullRequestDiffRouteLayer, orchestrationSnapshotRouteLayer, orchestrationThreadSnapshotRouteLayer, localAutomationListRouteLayer, localAutomationCreateRouteLayer, localAutomationUpdateRouteLayer, localAutomationDeleteRouteLayer, localAutomationRunRouteLayer, otlpTracesProxyRouteLayer, devTunnelProxyRouteLayer, devTunnelLocalPortProxyRouteLayer, projectFaviconRouteLayer, serverEnvironmentRouteLayer, browserWebRtcReadinessRouteLayer, staticAndDevRouteLayer, githubStatusRouteLayer, githubAuthorizeUrlRouteLayer, githubDisconnectRouteLayer, githubReposRouteLayer, githubCloneRouteLayer, githubCloneJobStartRouteLayer, githubCloneJobStatusRouteLayer, githubRefreshCredentialsRouteLayer, githubToolConfirmationApproveRouteLayer, projectLinkGetRouteLayer, projectLinkListRouteLayer, projectLinkSetRouteLayer, projectLinkDeleteRouteLayer, cmmdWorkspacesRouteLayer, cmmdCampaignsRouteLayer, cmmdProjectLinksRouteLayer, cmmdEnsureGitHubProjectContextRouteLayer, cmmdProjectRepositoryEnsureRouteLayer, cmmdProjectsGetRouteLayer, cmmdProjectsCreateRouteLayer, workspaceReadinessRouteLayer, runtimeLivenessRouteLayer, runtimeFilesystemHealthRouteLayer, claudeNativeGenerationProofRouteLayer, claudeUsageRouteLayer, codexRuntimeProviderReadinessRouteLayer, runtimeDiagnosticsRouteLayer, cloudFoldersRouteLayer, cloudProjectCreateRouteLayer, gitUrlCloneRouteLayer, websocketRpcRouteLayer).pipe(provide$1(browserApiCorsLayer));
|
|
324176
324486
|
const runServer = launch$1(unwrap(gen(function* () {
|
|
324177
324487
|
const config = yield* ServerConfig;
|
|
324178
324488
|
fixPath({ preferProcessPath: config.forgeCmmdRuntimeMode === true });
|