@cmmd-center/forge 0.13.95 → 0.13.96
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-DTG5XWSi.cjs → BunHttpServer-CtFGbsWr.cjs} +2 -2
- package/dist/{BunHttpServer-BpaVqxli.mjs → BunHttpServer-o7ISooSQ.mjs} +2 -2
- package/dist/{HttpServer-5UTabe01.mjs → HttpServer-BbbI8N6_.mjs} +79 -39
- package/dist/{HttpServer-DZ6iaxyk.cjs → HttpServer-CRBqMWdP.cjs} +47 -1
- package/dist/{NodeHttpServer-DePOzmYy.mjs → NodeHttpServer-BngJqAIT.mjs} +2 -2
- package/dist/{NodeHttpServer-RV5QsVeb.cjs → NodeHttpServer-DyI6OyMg.cjs} +2 -2
- package/dist/bin.cjs +476 -277
- package/dist/bin.mjs +610 -411
- package/dist/client/assets/{DiffPanel-CAkf79MN.js → DiffPanel-CQF1ISJz.js} +2 -2
- package/dist/client/assets/{DiffPanel.logic-B9IU5Q5Q.js → DiffPanel.logic-ZO6qepWo.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-BaJzbqHW.js → DiffWorkerPoolProvider-B7F6vAh9.js} +2 -2
- package/dist/client/assets/{PullRequestCodePanel-ItXVNv0A.js → PullRequestCodePanel-B93y-X1L.js} +2 -2
- package/dist/client/assets/{Virtualizer-D6N688Z0.js → Virtualizer-BtFYmUB0.js} +2 -2
- package/dist/client/assets/{WorkerPoolContext-Q7KzTxot.js → WorkerPoolContext-VAp-zZQ5.js} +3 -3
- package/dist/client/assets/{index-CuTM56F9.js → index-BhdZllxU.js} +6 -6
- package/dist/client/index.html +4 -4
- package/dist/forge-build.json +1 -1
- package/dist/{open-2-reBrpv.mjs → open-yHTUkd2Y.mjs} +3 -3
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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$
|
|
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$
|
|
6
|
-
import { _ as ChildProcessSpawner, a as Stdio, g as make$
|
|
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$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$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
|
+
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
|
+
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";
|
|
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$
|
|
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, Gt as run$3, Ht as updateAndGet, I as HttpServerError, It as getUnsafe$2, J as transformResponse, K as filterStatusOk$1, Lt as make$49, Ot as fromInput$1, Pt as get$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, Wt as make$50, 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-BbbI8N6_.mjs";
|
|
9
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
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
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";
|
|
@@ -23,7 +23,7 @@ import { createCipheriv, createDecipheriv, createHash, createHmac, createPublicK
|
|
|
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";
|
|
26
|
-
import
|
|
26
|
+
import os, { homedir, networkInterfaces, tmpdir } from "node:os";
|
|
27
27
|
import * as Path$1 from "node:path";
|
|
28
28
|
import path, { basename, delimiter, dirname, extname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
|
|
29
29
|
import { pathToFileURL } from "node:url";
|
|
@@ -14746,7 +14746,7 @@ const isCommand = (u) => hasProperty(u, TypeId$10);
|
|
|
14746
14746
|
* @since 4.0.0
|
|
14747
14747
|
* @category constructors
|
|
14748
14748
|
*/
|
|
14749
|
-
const make$
|
|
14749
|
+
const make$33 = (name, config, handler) => {
|
|
14750
14750
|
return makeCommand({
|
|
14751
14751
|
name,
|
|
14752
14752
|
config: parseConfig(config ?? {}),
|
|
@@ -15081,7 +15081,7 @@ const runWith = (command, config) => {
|
|
|
15081
15081
|
program = provideService(program, LogLevel, logLevel);
|
|
15082
15082
|
const services = match(logLevel, {
|
|
15083
15083
|
onNone: () => empty$1(),
|
|
15084
|
-
onSome: (level) => make$
|
|
15084
|
+
onSome: (level) => make$34(MinimumLogLevel, level)
|
|
15085
15085
|
});
|
|
15086
15086
|
yield* provideContext(program, services);
|
|
15087
15087
|
}, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$1(error) : fail$1(error), (error) => andThen(showHelp(command, error), fail(error))), catchFilter((e) => isQuitError(e) ? succeed$1(e) : fail$1(e), (_) => interrupt$1));
|
|
@@ -15262,7 +15262,7 @@ const CurrentLoggers = CurrentLoggers$1;
|
|
|
15262
15262
|
* @since 2.0.0
|
|
15263
15263
|
* @category constructors
|
|
15264
15264
|
*/
|
|
15265
|
-
const make$
|
|
15265
|
+
const make$32 = loggerMake;
|
|
15266
15266
|
/**
|
|
15267
15267
|
* Returns a new `Logger` which will aggregate logs output by the specified
|
|
15268
15268
|
* `Logger` over the provided `window`. After the `window` has elapsed, the
|
|
@@ -15558,7 +15558,7 @@ const makeUnsafe$2 = (value) => {
|
|
|
15558
15558
|
* @since 2.0.0
|
|
15559
15559
|
* @category constructors
|
|
15560
15560
|
*/
|
|
15561
|
-
const make$
|
|
15561
|
+
const make$31 = (value) => sync$1(() => makeUnsafe$2(value));
|
|
15562
15562
|
/**
|
|
15563
15563
|
* @since 2.0.0
|
|
15564
15564
|
* @category getters
|
|
@@ -15627,7 +15627,7 @@ const TypeId$8 = "~effect/transactions/TxRef";
|
|
|
15627
15627
|
* })
|
|
15628
15628
|
* ```
|
|
15629
15629
|
*/
|
|
15630
|
-
const make$
|
|
15630
|
+
const make$30 = (initial) => sync$1(() => makeUnsafe$1(initial));
|
|
15631
15631
|
/**
|
|
15632
15632
|
* Creates a new `TxRef` with the specified initial value.
|
|
15633
15633
|
*
|
|
@@ -15810,7 +15810,7 @@ const TxChunkProto = {
|
|
|
15810
15810
|
* })
|
|
15811
15811
|
* ```
|
|
15812
15812
|
*/
|
|
15813
|
-
const empty = () => map$3(make$
|
|
15813
|
+
const empty = () => map$3(make$30(empty$2()), (ref) => makeUnsafe(ref));
|
|
15814
15814
|
/**
|
|
15815
15815
|
* Creates a new `TxChunk` with the specified TxRef.
|
|
15816
15816
|
*
|
|
@@ -16102,7 +16102,7 @@ const TxQueueProto = {
|
|
|
16102
16102
|
*/
|
|
16103
16103
|
const unbounded = () => gen(function* () {
|
|
16104
16104
|
const items = yield* empty();
|
|
16105
|
-
const stateRef = yield* make$
|
|
16105
|
+
const stateRef = yield* make$30({ _tag: "Open" });
|
|
16106
16106
|
const txQueue = Object.create(TxQueueProto);
|
|
16107
16107
|
txQueue.strategy = "unbounded";
|
|
16108
16108
|
txQueue.capacity = Number.POSITIVE_INFINITY;
|
|
@@ -25063,7 +25063,7 @@ const schema$1 = /* @__PURE__ */ declare(isStream);
|
|
|
25063
25063
|
* @category Stream
|
|
25064
25064
|
*/
|
|
25065
25065
|
function Stream$1(success, error) {
|
|
25066
|
-
return make$
|
|
25066
|
+
return make$35(schema$1.ast, {
|
|
25067
25067
|
[StreamSchemaTypeId]: StreamSchemaTypeId,
|
|
25068
25068
|
success,
|
|
25069
25069
|
error
|
|
@@ -25193,7 +25193,7 @@ const makeProto$1 = (options) => {
|
|
|
25193
25193
|
* @since 4.0.0
|
|
25194
25194
|
* @category constructors
|
|
25195
25195
|
*/
|
|
25196
|
-
const make$
|
|
25196
|
+
const make$29 = (tag, options) => {
|
|
25197
25197
|
const successSchema = options?.success ?? Void;
|
|
25198
25198
|
const errorSchema = options?.error ?? Never;
|
|
25199
25199
|
const defectSchema = options?.defect ?? Defect;
|
|
@@ -25340,7 +25340,7 @@ const RpcGroupProto = {
|
|
|
25340
25340
|
});
|
|
25341
25341
|
},
|
|
25342
25342
|
annotateRpcs(service, value) {
|
|
25343
|
-
return this.annotateRpcsMerge(make$
|
|
25343
|
+
return this.annotateRpcsMerge(make$34(service, value));
|
|
25344
25344
|
},
|
|
25345
25345
|
annotateMerge(context) {
|
|
25346
25346
|
return makeProto({
|
|
@@ -25365,7 +25365,7 @@ const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
|
25365
25365
|
* @since 4.0.0
|
|
25366
25366
|
* @category groups
|
|
25367
25367
|
*/
|
|
25368
|
-
const make$
|
|
25368
|
+
const make$28 = (...rpcs) => makeProto({
|
|
25369
25369
|
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
25370
25370
|
annotations: empty$1()
|
|
25371
25371
|
});
|
|
@@ -26091,319 +26091,319 @@ const WS_METHODS = {
|
|
|
26091
26091
|
attachmentsDelete: "attachments.delete",
|
|
26092
26092
|
providerUploadFeedback: "provider.uploadFeedback"
|
|
26093
26093
|
};
|
|
26094
|
-
const WsServerUpsertKeybindingRpc = make$
|
|
26094
|
+
const WsServerUpsertKeybindingRpc = make$29(WS_METHODS.serverUpsertKeybinding, {
|
|
26095
26095
|
payload: ServerUpsertKeybindingInput,
|
|
26096
26096
|
success: ServerUpsertKeybindingResult,
|
|
26097
26097
|
error: KeybindingsConfigError
|
|
26098
26098
|
});
|
|
26099
|
-
const WsServerRemoveKeybindingRpc = make$
|
|
26099
|
+
const WsServerRemoveKeybindingRpc = make$29(WS_METHODS.serverRemoveKeybinding, {
|
|
26100
26100
|
payload: ServerRemoveKeybindingInput,
|
|
26101
26101
|
success: ServerRemoveKeybindingResult,
|
|
26102
26102
|
error: KeybindingsConfigError
|
|
26103
26103
|
});
|
|
26104
|
-
const WsServerGetConfigRpc = make$
|
|
26104
|
+
const WsServerGetConfigRpc = make$29(WS_METHODS.serverGetConfig, {
|
|
26105
26105
|
payload: Struct({}),
|
|
26106
26106
|
success: ServerConfig$1,
|
|
26107
26107
|
error: Union([KeybindingsConfigError, ServerSettingsError])
|
|
26108
26108
|
});
|
|
26109
|
-
const WsServerRefreshProvidersRpc = make$
|
|
26109
|
+
const WsServerRefreshProvidersRpc = make$29(WS_METHODS.serverRefreshProviders, {
|
|
26110
26110
|
payload: Struct({}),
|
|
26111
26111
|
success: ServerProviderUpdatedPayload
|
|
26112
26112
|
});
|
|
26113
|
-
const WsServerStartProviderAuthRpc = make$
|
|
26113
|
+
const WsServerStartProviderAuthRpc = make$29(WS_METHODS.serverStartProviderAuth, {
|
|
26114
26114
|
payload: ProviderAuthStartInput,
|
|
26115
26115
|
success: ProviderAuthSession
|
|
26116
26116
|
});
|
|
26117
|
-
const WsServerRepairProviderAuthRuntimeRpc = make$
|
|
26117
|
+
const WsServerRepairProviderAuthRuntimeRpc = make$29(WS_METHODS.serverRepairProviderAuthRuntime, {
|
|
26118
26118
|
payload: ProviderAuthRuntimeRepairInput,
|
|
26119
26119
|
success: ProviderAuthRuntimeRepairResult
|
|
26120
26120
|
});
|
|
26121
|
-
const WsServerDisconnectProviderAuthRpc = make$
|
|
26121
|
+
const WsServerDisconnectProviderAuthRpc = make$29(WS_METHODS.serverDisconnectProviderAuth, {
|
|
26122
26122
|
payload: ProviderAuthDisconnectInput,
|
|
26123
26123
|
success: ServerProviderUpdatedPayload
|
|
26124
26124
|
});
|
|
26125
|
-
const WsServerGetProviderAuthSessionRpc = make$
|
|
26125
|
+
const WsServerGetProviderAuthSessionRpc = make$29(WS_METHODS.serverGetProviderAuthSession, {
|
|
26126
26126
|
payload: ProviderAuthSessionInput,
|
|
26127
26127
|
success: ProviderAuthSession
|
|
26128
26128
|
});
|
|
26129
|
-
const WsServerCancelProviderAuthRpc = make$
|
|
26129
|
+
const WsServerCancelProviderAuthRpc = make$29(WS_METHODS.serverCancelProviderAuth, {
|
|
26130
26130
|
payload: ProviderAuthSessionInput,
|
|
26131
26131
|
success: ProviderAuthSession
|
|
26132
26132
|
});
|
|
26133
|
-
const WsServerSubmitProviderAuthCodeRpc = make$
|
|
26133
|
+
const WsServerSubmitProviderAuthCodeRpc = make$29(WS_METHODS.serverSubmitProviderAuthCode, {
|
|
26134
26134
|
payload: ProviderAuthSubmitCodeInput,
|
|
26135
26135
|
success: ProviderAuthSession
|
|
26136
26136
|
});
|
|
26137
|
-
const WsServerSyncPersonalCodexToCloudRpc = make$
|
|
26137
|
+
const WsServerSyncPersonalCodexToCloudRpc = make$29(WS_METHODS.serverSyncPersonalCodexToCloud, {
|
|
26138
26138
|
payload: ProviderCredentialCloudSyncInput,
|
|
26139
26139
|
success: ProviderCredentialCloudSyncResult
|
|
26140
26140
|
});
|
|
26141
|
-
const WsServerSyncPersonalClaudeToCloudRpc = make$
|
|
26141
|
+
const WsServerSyncPersonalClaudeToCloudRpc = make$29(WS_METHODS.serverSyncPersonalClaudeToCloud, {
|
|
26142
26142
|
payload: ProviderCredentialCloudSyncInput,
|
|
26143
26143
|
success: ProviderCredentialCloudSyncResult
|
|
26144
26144
|
});
|
|
26145
|
-
const WsServerGetSettingsRpc = make$
|
|
26145
|
+
const WsServerGetSettingsRpc = make$29(WS_METHODS.serverGetSettings, {
|
|
26146
26146
|
payload: Struct({}),
|
|
26147
26147
|
success: ServerSettings,
|
|
26148
26148
|
error: ServerSettingsError
|
|
26149
26149
|
});
|
|
26150
|
-
const WsServerUpdateSettingsRpc = make$
|
|
26150
|
+
const WsServerUpdateSettingsRpc = make$29(WS_METHODS.serverUpdateSettings, {
|
|
26151
26151
|
payload: Struct({ patch: ServerSettingsPatch }),
|
|
26152
26152
|
success: ServerSettings,
|
|
26153
26153
|
error: ServerSettingsError
|
|
26154
26154
|
});
|
|
26155
|
-
const WsServerUpdateEnvironmentDisplayNameRpc = make$
|
|
26155
|
+
const WsServerUpdateEnvironmentDisplayNameRpc = make$29(WS_METHODS.serverUpdateEnvironmentDisplayName, {
|
|
26156
26156
|
payload: ServerEnvironmentDisplayNameUpdateInput,
|
|
26157
26157
|
success: ServerEnvironmentDisplayNameUpdateResult
|
|
26158
26158
|
});
|
|
26159
|
-
const WsServerTraceDiagnosticsRpc = make$
|
|
26159
|
+
const WsServerTraceDiagnosticsRpc = make$29(WS_METHODS.serverGetTraceDiagnostics, {
|
|
26160
26160
|
payload: Struct({ slowSpanThresholdMs: optionalKey(NonNegativeInt) }),
|
|
26161
26161
|
success: ServerTraceDiagnosticsResult
|
|
26162
26162
|
});
|
|
26163
|
-
const WsServerHeartbeatRpc = make$
|
|
26163
|
+
const WsServerHeartbeatRpc = make$29(WS_METHODS.serverHeartbeat, {
|
|
26164
26164
|
payload: Struct({}),
|
|
26165
26165
|
success: Struct({})
|
|
26166
26166
|
});
|
|
26167
26167
|
const PullRequestRpcError = Union([PullRequestUnavailableError, PullRequestOperationError]);
|
|
26168
|
-
const WsPullRequestsListRpc = make$
|
|
26168
|
+
const WsPullRequestsListRpc = make$29(WS_METHODS.pullRequestsList, {
|
|
26169
26169
|
payload: PullRequestListInput,
|
|
26170
26170
|
success: PullRequestListResult,
|
|
26171
26171
|
error: PullRequestRpcError
|
|
26172
26172
|
});
|
|
26173
|
-
const WsPullRequestsListStatsRpc = make$
|
|
26173
|
+
const WsPullRequestsListStatsRpc = make$29(WS_METHODS.pullRequestsListStats, {
|
|
26174
26174
|
payload: PullRequestListStatsInput,
|
|
26175
26175
|
success: PullRequestListStatsResult,
|
|
26176
26176
|
error: PullRequestRpcError
|
|
26177
26177
|
});
|
|
26178
|
-
const WsPullRequestsDetailRpc = make$
|
|
26178
|
+
const WsPullRequestsDetailRpc = make$29(WS_METHODS.pullRequestsDetail, {
|
|
26179
26179
|
payload: PullRequestRef,
|
|
26180
26180
|
success: PullRequestDetail,
|
|
26181
26181
|
error: PullRequestRpcError
|
|
26182
26182
|
});
|
|
26183
|
-
const WsPullRequestsActivityRpc = make$
|
|
26183
|
+
const WsPullRequestsActivityRpc = make$29(WS_METHODS.pullRequestsActivity, {
|
|
26184
26184
|
payload: PullRequestRef,
|
|
26185
26185
|
success: PullRequestActivity,
|
|
26186
26186
|
error: PullRequestRpcError
|
|
26187
26187
|
});
|
|
26188
|
-
const WsPullRequestsThreadCommentsRpc = make$
|
|
26188
|
+
const WsPullRequestsThreadCommentsRpc = make$29(WS_METHODS.pullRequestsThreadComments, {
|
|
26189
26189
|
payload: PullRequestThreadCommentsInput,
|
|
26190
26190
|
success: PullRequestThreadCommentsResult,
|
|
26191
26191
|
error: PullRequestRpcError
|
|
26192
26192
|
});
|
|
26193
|
-
const WsPullRequestsDiffFileContentsRpc = make$
|
|
26193
|
+
const WsPullRequestsDiffFileContentsRpc = make$29(WS_METHODS.pullRequestsDiffFileContents, {
|
|
26194
26194
|
payload: PullRequestDiffFileContentsInput,
|
|
26195
26195
|
success: PullRequestDiffFileContentsResult,
|
|
26196
26196
|
error: PullRequestRpcError
|
|
26197
26197
|
});
|
|
26198
|
-
const WsPullRequestsRunActionRpc = make$
|
|
26198
|
+
const WsPullRequestsRunActionRpc = make$29(WS_METHODS.pullRequestsRunAction, {
|
|
26199
26199
|
payload: PullRequestActionInput,
|
|
26200
26200
|
success: Void,
|
|
26201
26201
|
error: PullRequestRpcError
|
|
26202
26202
|
});
|
|
26203
|
-
const WsPullRequestsUpdateRpc = make$
|
|
26203
|
+
const WsPullRequestsUpdateRpc = make$29(WS_METHODS.pullRequestsUpdate, {
|
|
26204
26204
|
payload: PullRequestUpdateInput,
|
|
26205
26205
|
success: Void,
|
|
26206
26206
|
error: PullRequestRpcError
|
|
26207
26207
|
});
|
|
26208
|
-
const WsPullRequestsCommentRpc = make$
|
|
26208
|
+
const WsPullRequestsCommentRpc = make$29(WS_METHODS.pullRequestsComment, {
|
|
26209
26209
|
payload: PullRequestCommentInput,
|
|
26210
26210
|
success: Void,
|
|
26211
26211
|
error: PullRequestRpcError
|
|
26212
26212
|
});
|
|
26213
|
-
const WsPullRequestsUpdateCommentRpc = make$
|
|
26213
|
+
const WsPullRequestsUpdateCommentRpc = make$29(WS_METHODS.pullRequestsUpdateComment, {
|
|
26214
26214
|
payload: PullRequestCommentUpdateInput,
|
|
26215
26215
|
success: Void,
|
|
26216
26216
|
error: PullRequestRpcError
|
|
26217
26217
|
});
|
|
26218
|
-
const WsPullRequestsSubmitReviewRpc = make$
|
|
26218
|
+
const WsPullRequestsSubmitReviewRpc = make$29(WS_METHODS.pullRequestsSubmitReview, {
|
|
26219
26219
|
payload: PullRequestSubmitReviewInput,
|
|
26220
26220
|
success: Void,
|
|
26221
26221
|
error: PullRequestRpcError
|
|
26222
26222
|
});
|
|
26223
|
-
const WsPullRequestsReplyToThreadRpc = make$
|
|
26223
|
+
const WsPullRequestsReplyToThreadRpc = make$29(WS_METHODS.pullRequestsReplyToThread, {
|
|
26224
26224
|
payload: PullRequestThreadReplyInput,
|
|
26225
26225
|
success: Void,
|
|
26226
26226
|
error: PullRequestRpcError
|
|
26227
26227
|
});
|
|
26228
|
-
const WsPullRequestsSetThreadResolutionRpc = make$
|
|
26228
|
+
const WsPullRequestsSetThreadResolutionRpc = make$29(WS_METHODS.pullRequestsSetThreadResolution, {
|
|
26229
26229
|
payload: PullRequestThreadResolutionInput,
|
|
26230
26230
|
success: Void,
|
|
26231
26231
|
error: PullRequestRpcError
|
|
26232
26232
|
});
|
|
26233
|
-
const WsPullRequestsSetReactionRpc = make$
|
|
26233
|
+
const WsPullRequestsSetReactionRpc = make$29(WS_METHODS.pullRequestsSetReaction, {
|
|
26234
26234
|
payload: PullRequestReactionInput,
|
|
26235
26235
|
success: Void,
|
|
26236
26236
|
error: PullRequestRpcError
|
|
26237
26237
|
});
|
|
26238
|
-
const WsPullRequestsInvalidateRpc = make$
|
|
26238
|
+
const WsPullRequestsInvalidateRpc = make$29(WS_METHODS.pullRequestsInvalidate, {
|
|
26239
26239
|
payload: PullRequestInvalidateInput,
|
|
26240
26240
|
success: Void,
|
|
26241
26241
|
error: PullRequestRpcError
|
|
26242
26242
|
});
|
|
26243
|
-
const WsPullRequestsReviewerCandidatesRpc = make$
|
|
26243
|
+
const WsPullRequestsReviewerCandidatesRpc = make$29(WS_METHODS.pullRequestsReviewerCandidates, {
|
|
26244
26244
|
payload: PullRequestRef,
|
|
26245
26245
|
success: PullRequestReviewerCandidateList,
|
|
26246
26246
|
error: PullRequestRpcError
|
|
26247
26247
|
});
|
|
26248
|
-
const WsPullRequestsRequestReviewersRpc = make$
|
|
26248
|
+
const WsPullRequestsRequestReviewersRpc = make$29(WS_METHODS.pullRequestsRequestReviewers, {
|
|
26249
26249
|
payload: PullRequestReviewerRequestInput,
|
|
26250
26250
|
success: Void,
|
|
26251
26251
|
error: PullRequestRpcError
|
|
26252
26252
|
});
|
|
26253
|
-
const WsProjectsSearchContentsRpc = make$
|
|
26253
|
+
const WsProjectsSearchContentsRpc = make$29(WS_METHODS.projectsSearchContents, {
|
|
26254
26254
|
payload: ProjectSearchContentsInput,
|
|
26255
26255
|
success: ProjectSearchContentsResult,
|
|
26256
26256
|
error: ProjectSearchContentsError
|
|
26257
26257
|
});
|
|
26258
|
-
const WsProjectsSearchEntriesRpc = make$
|
|
26258
|
+
const WsProjectsSearchEntriesRpc = make$29(WS_METHODS.projectsSearchEntries, {
|
|
26259
26259
|
payload: ProjectSearchEntriesInput,
|
|
26260
26260
|
success: ProjectSearchEntriesResult,
|
|
26261
26261
|
error: ProjectSearchEntriesError
|
|
26262
26262
|
});
|
|
26263
|
-
const WsProjectsWriteFileRpc = make$
|
|
26263
|
+
const WsProjectsWriteFileRpc = make$29(WS_METHODS.projectsWriteFile, {
|
|
26264
26264
|
payload: ProjectWriteFileInput,
|
|
26265
26265
|
success: ProjectWriteFileResult,
|
|
26266
26266
|
error: ProjectWriteFileError
|
|
26267
26267
|
});
|
|
26268
|
-
const WsProjectCheckoutDeletionPreviewRpc = make$
|
|
26268
|
+
const WsProjectCheckoutDeletionPreviewRpc = make$29(WS_METHODS.projectCheckoutDeletionPreview, {
|
|
26269
26269
|
payload: ProjectCheckoutDeletionPreviewInput,
|
|
26270
26270
|
success: ProjectCheckoutDeletionPreview
|
|
26271
26271
|
});
|
|
26272
|
-
const WsProjectCheckoutDeletionExecuteRpc = make$
|
|
26272
|
+
const WsProjectCheckoutDeletionExecuteRpc = make$29(WS_METHODS.projectCheckoutDeletionExecute, {
|
|
26273
26273
|
payload: ProjectCheckoutDeletionExecuteInput,
|
|
26274
26274
|
success: ProjectCheckoutDeletionResult
|
|
26275
26275
|
});
|
|
26276
|
-
const WsWorkspaceReadFileRpc = make$
|
|
26276
|
+
const WsWorkspaceReadFileRpc = make$29(WS_METHODS.workspaceReadFile, {
|
|
26277
26277
|
payload: BulkTransferReadFileInput,
|
|
26278
26278
|
success: BulkTransferStreamEvent,
|
|
26279
26279
|
error: BulkTransferError,
|
|
26280
26280
|
stream: true
|
|
26281
26281
|
});
|
|
26282
|
-
const WsWorkspaceBeginWriteFileRpc = make$
|
|
26282
|
+
const WsWorkspaceBeginWriteFileRpc = make$29(WS_METHODS.workspaceBeginWriteFile, {
|
|
26283
26283
|
payload: BulkTransferWriteBeginInput,
|
|
26284
26284
|
success: BulkTransferWriteBeginResult,
|
|
26285
26285
|
error: BulkTransferError
|
|
26286
26286
|
});
|
|
26287
|
-
const WsWorkspaceWriteFileChunkRpc = make$
|
|
26287
|
+
const WsWorkspaceWriteFileChunkRpc = make$29(WS_METHODS.workspaceWriteFileChunk, {
|
|
26288
26288
|
payload: BulkTransferWriteChunkInput,
|
|
26289
26289
|
success: BulkTransferWriteChunkResult,
|
|
26290
26290
|
error: BulkTransferError
|
|
26291
26291
|
});
|
|
26292
|
-
const WsWorkspaceCommitWriteFileRpc = make$
|
|
26292
|
+
const WsWorkspaceCommitWriteFileRpc = make$29(WS_METHODS.workspaceCommitWriteFile, {
|
|
26293
26293
|
payload: BulkTransferIdInput,
|
|
26294
26294
|
success: BulkTransferWriteCommitResult,
|
|
26295
26295
|
error: BulkTransferError
|
|
26296
26296
|
});
|
|
26297
|
-
const WsWorkspaceCancelWriteFileRpc = make$
|
|
26297
|
+
const WsWorkspaceCancelWriteFileRpc = make$29(WS_METHODS.workspaceCancelWriteFile, {
|
|
26298
26298
|
payload: BulkTransferIdInput,
|
|
26299
26299
|
success: BulkTransferCancelResult,
|
|
26300
26300
|
error: BulkTransferError
|
|
26301
26301
|
});
|
|
26302
|
-
const WsShellOpenInEditorRpc = make$
|
|
26302
|
+
const WsShellOpenInEditorRpc = make$29(WS_METHODS.shellOpenInEditor, {
|
|
26303
26303
|
payload: OpenInEditorInput,
|
|
26304
26304
|
error: OpenError$1
|
|
26305
26305
|
});
|
|
26306
|
-
const WsSubscribeGitStatusRpc = make$
|
|
26306
|
+
const WsSubscribeGitStatusRpc = make$29(WS_METHODS.subscribeGitStatus, {
|
|
26307
26307
|
payload: GitStatusInput,
|
|
26308
26308
|
success: GitStatusStreamEvent,
|
|
26309
26309
|
error: GitManagerServiceError,
|
|
26310
26310
|
stream: true
|
|
26311
26311
|
});
|
|
26312
|
-
const WsGitPullRpc = make$
|
|
26312
|
+
const WsGitPullRpc = make$29(WS_METHODS.gitPull, {
|
|
26313
26313
|
payload: GitPullInput,
|
|
26314
26314
|
success: GitPullResult,
|
|
26315
26315
|
error: GitCommandError
|
|
26316
26316
|
});
|
|
26317
|
-
const WsGitRefreshStatusRpc = make$
|
|
26317
|
+
const WsGitRefreshStatusRpc = make$29(WS_METHODS.gitRefreshStatus, {
|
|
26318
26318
|
payload: GitStatusInput,
|
|
26319
26319
|
success: GitStatusResult,
|
|
26320
26320
|
error: GitManagerServiceError
|
|
26321
26321
|
});
|
|
26322
|
-
const WsGitRunStackedActionRpc = make$
|
|
26322
|
+
const WsGitRunStackedActionRpc = make$29(WS_METHODS.gitRunStackedAction, {
|
|
26323
26323
|
payload: GitRunStackedActionInput,
|
|
26324
26324
|
success: GitActionProgressEvent,
|
|
26325
26325
|
error: GitManagerServiceError,
|
|
26326
26326
|
stream: true
|
|
26327
26327
|
});
|
|
26328
|
-
const WsGitResolvePullRequestRpc = make$
|
|
26328
|
+
const WsGitResolvePullRequestRpc = make$29(WS_METHODS.gitResolvePullRequest, {
|
|
26329
26329
|
payload: GitPullRequestRefInput,
|
|
26330
26330
|
success: GitResolvePullRequestResult,
|
|
26331
26331
|
error: GitManagerServiceError
|
|
26332
26332
|
});
|
|
26333
|
-
const WsGitPreparePullRequestThreadRpc = make$
|
|
26333
|
+
const WsGitPreparePullRequestThreadRpc = make$29(WS_METHODS.gitPreparePullRequestThread, {
|
|
26334
26334
|
payload: GitPreparePullRequestThreadInput,
|
|
26335
26335
|
success: GitPreparePullRequestThreadResult,
|
|
26336
26336
|
error: GitManagerServiceError
|
|
26337
26337
|
});
|
|
26338
|
-
const WsGitListBranchesRpc = make$
|
|
26338
|
+
const WsGitListBranchesRpc = make$29(WS_METHODS.gitListBranches, {
|
|
26339
26339
|
payload: GitListBranchesInput,
|
|
26340
26340
|
success: GitListBranchesResult,
|
|
26341
26341
|
error: GitCommandError
|
|
26342
26342
|
});
|
|
26343
|
-
const WsVcsListRefsRpc = make$
|
|
26343
|
+
const WsVcsListRefsRpc = make$29(WS_METHODS.vcsListRefs, {
|
|
26344
26344
|
payload: VcsListRefsInput,
|
|
26345
26345
|
success: VcsListRefsResult,
|
|
26346
26346
|
error: GitCommandError
|
|
26347
26347
|
});
|
|
26348
|
-
const WsVcsRefreshStatusRpc = make$
|
|
26348
|
+
const WsVcsRefreshStatusRpc = make$29(WS_METHODS.vcsRefreshStatus, {
|
|
26349
26349
|
payload: GitStatusInput,
|
|
26350
26350
|
success: VcsStatusResult,
|
|
26351
26351
|
error: GitManagerServiceError
|
|
26352
26352
|
});
|
|
26353
|
-
const WsSubscribeVcsStatusRpc = make$
|
|
26353
|
+
const WsSubscribeVcsStatusRpc = make$29(WS_METHODS.subscribeVcsStatus, {
|
|
26354
26354
|
payload: GitStatusInput,
|
|
26355
26355
|
success: VcsStatusStreamEvent,
|
|
26356
26356
|
error: GitManagerServiceError,
|
|
26357
26357
|
stream: true
|
|
26358
26358
|
});
|
|
26359
|
-
const WsVcsPullRpc = make$
|
|
26359
|
+
const WsVcsPullRpc = make$29(WS_METHODS.vcsPull, {
|
|
26360
26360
|
payload: VcsPullInput,
|
|
26361
26361
|
success: VcsPullResult,
|
|
26362
26362
|
error: GitCommandError
|
|
26363
26363
|
});
|
|
26364
|
-
const WsVcsCreateWorktreeRpc = make$
|
|
26364
|
+
const WsVcsCreateWorktreeRpc = make$29(WS_METHODS.vcsCreateWorktree, {
|
|
26365
26365
|
payload: VcsCreateWorktreeInput,
|
|
26366
26366
|
success: VcsCreateWorktreeResult,
|
|
26367
26367
|
error: Union([GitCommandError, VcsUnsupportedRequestError])
|
|
26368
26368
|
});
|
|
26369
|
-
const WsVcsRemoveWorktreeRpc = make$
|
|
26369
|
+
const WsVcsRemoveWorktreeRpc = make$29(WS_METHODS.vcsRemoveWorktree, {
|
|
26370
26370
|
payload: GitRemoveWorktreeInput,
|
|
26371
26371
|
error: GitCommandError
|
|
26372
26372
|
});
|
|
26373
|
-
const WsVcsCreateRefRpc = make$
|
|
26373
|
+
const WsVcsCreateRefRpc = make$29(WS_METHODS.vcsCreateRef, {
|
|
26374
26374
|
payload: VcsCreateRefInput,
|
|
26375
26375
|
success: VcsCreateRefResult,
|
|
26376
26376
|
error: GitCommandError
|
|
26377
26377
|
});
|
|
26378
|
-
const WsVcsSwitchRefRpc = make$
|
|
26378
|
+
const WsVcsSwitchRefRpc = make$29(WS_METHODS.vcsSwitchRef, {
|
|
26379
26379
|
payload: VcsSwitchRefInput,
|
|
26380
26380
|
success: VcsSwitchRefResult,
|
|
26381
26381
|
error: GitCommandError
|
|
26382
26382
|
});
|
|
26383
|
-
const WsVcsInitRpc = make$
|
|
26383
|
+
const WsVcsInitRpc = make$29(WS_METHODS.vcsInit, {
|
|
26384
26384
|
payload: VcsInitInput,
|
|
26385
26385
|
error: Union([GitCommandError, VcsUnsupportedRequestError])
|
|
26386
26386
|
});
|
|
26387
|
-
const WsGitCreateWorktreeRpc = make$
|
|
26387
|
+
const WsGitCreateWorktreeRpc = make$29(WS_METHODS.gitCreateWorktree, {
|
|
26388
26388
|
payload: GitCreateWorktreeInput,
|
|
26389
26389
|
success: GitCreateWorktreeResult,
|
|
26390
26390
|
error: GitCommandError
|
|
26391
26391
|
});
|
|
26392
|
-
const WsGitRemoveWorktreeRpc = make$
|
|
26392
|
+
const WsGitRemoveWorktreeRpc = make$29(WS_METHODS.gitRemoveWorktree, {
|
|
26393
26393
|
payload: GitRemoveWorktreeInput,
|
|
26394
26394
|
error: GitCommandError
|
|
26395
26395
|
});
|
|
26396
|
-
const WsGitCreateBranchRpc = make$
|
|
26396
|
+
const WsGitCreateBranchRpc = make$29(WS_METHODS.gitCreateBranch, {
|
|
26397
26397
|
payload: GitCreateBranchInput,
|
|
26398
26398
|
success: GitCreateBranchResult,
|
|
26399
26399
|
error: GitCommandError
|
|
26400
26400
|
});
|
|
26401
|
-
const WsGitCheckoutRpc = make$
|
|
26401
|
+
const WsGitCheckoutRpc = make$29(WS_METHODS.gitCheckout, {
|
|
26402
26402
|
payload: GitCheckoutInput,
|
|
26403
26403
|
success: GitCheckoutResult,
|
|
26404
26404
|
error: GitCommandError
|
|
26405
26405
|
});
|
|
26406
|
-
const WsGitInitRpc = make$
|
|
26406
|
+
const WsGitInitRpc = make$29(WS_METHODS.gitInit, {
|
|
26407
26407
|
payload: GitInitInput,
|
|
26408
26408
|
error: GitCommandError
|
|
26409
26409
|
});
|
|
@@ -26411,7 +26411,7 @@ const WsGitInitRpc = make$30(WS_METHODS.gitInit, {
|
|
|
26411
26411
|
* The git half of a review: the branch range and the uncommitted work. The
|
|
26412
26412
|
* per-turn diffs beside it arrive through `orchestration.getTurnDiff`.
|
|
26413
26413
|
*/
|
|
26414
|
-
const WsReviewGetDiffPreviewRpc = make$
|
|
26414
|
+
const WsReviewGetDiffPreviewRpc = make$29(WS_METHODS.reviewGetDiffPreview, {
|
|
26415
26415
|
payload: ReviewDiffPreviewInput,
|
|
26416
26416
|
success: ReviewDiffPreviewResult,
|
|
26417
26417
|
error: Union([ReviewDiffPreviewError])
|
|
@@ -26421,12 +26421,12 @@ const WsReviewGetDiffPreviewRpc = make$30(WS_METHODS.reviewGetDiffPreview, {
|
|
|
26421
26421
|
* chunked bulk-transfer stream. A viewer wants the text once; a transfer wants
|
|
26422
26422
|
* offsets and checksums.
|
|
26423
26423
|
*/
|
|
26424
|
-
const WsProjectsReadFileRpc = make$
|
|
26424
|
+
const WsProjectsReadFileRpc = make$29(WS_METHODS.projectsReadFile, {
|
|
26425
26425
|
payload: ProjectReadFileInput,
|
|
26426
26426
|
success: ProjectReadFileResult,
|
|
26427
26427
|
error: Union([ProjectReadFileError])
|
|
26428
26428
|
});
|
|
26429
|
-
const WsFilesystemBrowseRpc = make$
|
|
26429
|
+
const WsFilesystemBrowseRpc = make$29(WS_METHODS.filesystemBrowse, {
|
|
26430
26430
|
payload: FilesystemBrowseInput,
|
|
26431
26431
|
success: FilesystemBrowseResult,
|
|
26432
26432
|
error: Union([FilesystemBrowseError])
|
|
@@ -26436,87 +26436,87 @@ const WsFilesystemBrowseRpc = make$30(WS_METHODS.filesystemBrowse, {
|
|
|
26436
26436
|
* Routed through the server because the phone keeps only the Forge-minted
|
|
26437
26437
|
* session token, never a CMMD one.
|
|
26438
26438
|
*/
|
|
26439
|
-
const WsCloudListRuntimesRpc = make$
|
|
26439
|
+
const WsCloudListRuntimesRpc = make$29(WS_METHODS.cloudListRuntimes, {
|
|
26440
26440
|
payload: CloudRuntimeListInput,
|
|
26441
26441
|
success: CloudRuntimeListResult,
|
|
26442
26442
|
error: Union([CloudRuntimeListError])
|
|
26443
26443
|
});
|
|
26444
|
-
const WsTerminalOpenRpc = make$
|
|
26444
|
+
const WsTerminalOpenRpc = make$29(WS_METHODS.terminalOpen, {
|
|
26445
26445
|
payload: TerminalOpenInput,
|
|
26446
26446
|
success: TerminalSessionSnapshot,
|
|
26447
26447
|
error: TerminalError
|
|
26448
26448
|
});
|
|
26449
|
-
const WsTerminalAttachRpc = make$
|
|
26449
|
+
const WsTerminalAttachRpc = make$29(WS_METHODS.terminalAttach, {
|
|
26450
26450
|
payload: TerminalAttachInput,
|
|
26451
26451
|
success: TerminalAttachStreamEvent,
|
|
26452
26452
|
error: TerminalError,
|
|
26453
26453
|
stream: true
|
|
26454
26454
|
});
|
|
26455
|
-
const WsTerminalWriteRpc = make$
|
|
26455
|
+
const WsTerminalWriteRpc = make$29(WS_METHODS.terminalWrite, {
|
|
26456
26456
|
payload: TerminalWriteRequest,
|
|
26457
26457
|
success: TerminalControlAck,
|
|
26458
26458
|
error: TerminalError
|
|
26459
26459
|
});
|
|
26460
|
-
const WsTerminalResizeRpc = make$
|
|
26460
|
+
const WsTerminalResizeRpc = make$29(WS_METHODS.terminalResize, {
|
|
26461
26461
|
payload: TerminalResizeRequest,
|
|
26462
26462
|
success: TerminalControlAck,
|
|
26463
26463
|
error: TerminalError
|
|
26464
26464
|
});
|
|
26465
|
-
const WsTerminalSignalRpc = make$
|
|
26465
|
+
const WsTerminalSignalRpc = make$29(WS_METHODS.terminalSignal, {
|
|
26466
26466
|
payload: TerminalSignalRequest,
|
|
26467
26467
|
success: TerminalControlAck,
|
|
26468
26468
|
error: TerminalError
|
|
26469
26469
|
});
|
|
26470
|
-
const WsTerminalClearRpc = make$
|
|
26470
|
+
const WsTerminalClearRpc = make$29(WS_METHODS.terminalClear, {
|
|
26471
26471
|
payload: TerminalClearRequest,
|
|
26472
26472
|
success: TerminalControlAck,
|
|
26473
26473
|
error: TerminalError
|
|
26474
26474
|
});
|
|
26475
|
-
const WsTerminalRestartRpc = make$
|
|
26475
|
+
const WsTerminalRestartRpc = make$29(WS_METHODS.terminalRestart, {
|
|
26476
26476
|
payload: TerminalRestartRequest,
|
|
26477
26477
|
success: TerminalRestartResult,
|
|
26478
26478
|
error: TerminalError
|
|
26479
26479
|
});
|
|
26480
|
-
const WsTerminalCloseRpc = make$
|
|
26480
|
+
const WsTerminalCloseRpc = make$29(WS_METHODS.terminalClose, {
|
|
26481
26481
|
payload: TerminalCloseRequest,
|
|
26482
26482
|
success: TerminalControlAck,
|
|
26483
26483
|
error: TerminalError
|
|
26484
26484
|
});
|
|
26485
|
-
const WsBrowserOpenSessionRpc = make$
|
|
26485
|
+
const WsBrowserOpenSessionRpc = make$29(WS_METHODS.browserOpenSession, {
|
|
26486
26486
|
payload: BrowserOpenSessionInput,
|
|
26487
26487
|
success: BrowserSessionSnapshot,
|
|
26488
26488
|
error: BrowserError
|
|
26489
26489
|
});
|
|
26490
|
-
const WsBrowserListSessionsRpc = make$
|
|
26490
|
+
const WsBrowserListSessionsRpc = make$29(WS_METHODS.browserListSessions, {
|
|
26491
26491
|
payload: BrowserListSessionsInput,
|
|
26492
26492
|
success: ArraySchema(BrowserSessionSnapshot),
|
|
26493
26493
|
error: BrowserError
|
|
26494
26494
|
});
|
|
26495
|
-
const WsBrowserCloseSessionRpc = make$
|
|
26495
|
+
const WsBrowserCloseSessionRpc = make$29(WS_METHODS.browserCloseSession, {
|
|
26496
26496
|
payload: BrowserCloseSessionInput,
|
|
26497
26497
|
error: BrowserError
|
|
26498
26498
|
});
|
|
26499
|
-
const WsBrowserGetSessionRpc = make$
|
|
26499
|
+
const WsBrowserGetSessionRpc = make$29(WS_METHODS.browserGetSession, {
|
|
26500
26500
|
payload: BrowserGetSessionInput,
|
|
26501
26501
|
success: NullOr(BrowserSessionSnapshot),
|
|
26502
26502
|
error: BrowserError
|
|
26503
26503
|
});
|
|
26504
|
-
const WsBrowserCommandRpc = make$
|
|
26504
|
+
const WsBrowserCommandRpc = make$29(WS_METHODS.browserCommand, {
|
|
26505
26505
|
payload: BrowserCommandInput,
|
|
26506
26506
|
success: BrowserCommandResult,
|
|
26507
26507
|
error: BrowserError
|
|
26508
26508
|
});
|
|
26509
|
-
const WsBrowserClearBrowsingDataRpc = make$
|
|
26509
|
+
const WsBrowserClearBrowsingDataRpc = make$29(WS_METHODS.browserClearBrowsingData, {
|
|
26510
26510
|
payload: BrowserClearBrowsingDataInput,
|
|
26511
26511
|
success: BrowserClearBrowsingDataResult,
|
|
26512
26512
|
error: BrowserError
|
|
26513
26513
|
});
|
|
26514
|
-
const WsBrowserAttachDisplayRpc = make$
|
|
26514
|
+
const WsBrowserAttachDisplayRpc = make$29(WS_METHODS.browserAttachDisplay, {
|
|
26515
26515
|
payload: BrowserDisplayAttachInput,
|
|
26516
26516
|
success: BrowserDisplayAttachResult,
|
|
26517
26517
|
error: BrowserError
|
|
26518
26518
|
});
|
|
26519
|
-
const WsBrowserAddDisplayIceCandidateRpc = make$
|
|
26519
|
+
const WsBrowserAddDisplayIceCandidateRpc = make$29(WS_METHODS.browserAddDisplayIceCandidate, {
|
|
26520
26520
|
payload: BrowserDisplayIceCandidateInput,
|
|
26521
26521
|
success: Struct({}),
|
|
26522
26522
|
error: BrowserError
|
|
@@ -26528,87 +26528,87 @@ const WsBrowserAddDisplayIceCandidateRpc = make$30(WS_METHODS.browserAddDisplayI
|
|
|
26528
26528
|
* page: it can click a DOM element but cannot touch the dock, a file manager,
|
|
26529
26529
|
* or anything else outside Chromium. This one lands on the display itself.
|
|
26530
26530
|
*/
|
|
26531
|
-
const WsComputerInputRpc = make$
|
|
26531
|
+
const WsComputerInputRpc = make$29(WS_METHODS.computerInput, {
|
|
26532
26532
|
payload: ComputerInputInput,
|
|
26533
26533
|
success: ComputerInputResult,
|
|
26534
26534
|
error: ComputerError
|
|
26535
26535
|
});
|
|
26536
|
-
const WsDevTunnelRegisterRpc = make$
|
|
26536
|
+
const WsDevTunnelRegisterRpc = make$29(WS_METHODS.devTunnelRegister, {
|
|
26537
26537
|
payload: DevTunnelRegisterInput,
|
|
26538
26538
|
success: DevTunnelRecord,
|
|
26539
26539
|
error: DevTunnelError
|
|
26540
26540
|
});
|
|
26541
|
-
const WsDevTunnelUnregisterRpc = make$
|
|
26541
|
+
const WsDevTunnelUnregisterRpc = make$29(WS_METHODS.devTunnelUnregister, {
|
|
26542
26542
|
payload: DevTunnelUnregisterInput,
|
|
26543
26543
|
error: DevTunnelError
|
|
26544
26544
|
});
|
|
26545
|
-
const WsDevTunnelListRpc = make$
|
|
26545
|
+
const WsDevTunnelListRpc = make$29(WS_METHODS.devTunnelList, {
|
|
26546
26546
|
payload: DevTunnelListInput,
|
|
26547
26547
|
success: ArraySchema(DevTunnelRecord),
|
|
26548
26548
|
error: DevTunnelError
|
|
26549
26549
|
});
|
|
26550
|
-
const WsThreadDevRuntimeGetRpc = make$
|
|
26550
|
+
const WsThreadDevRuntimeGetRpc = make$29(WS_METHODS.threadDevRuntimeGet, {
|
|
26551
26551
|
payload: ThreadDevRuntimeGetInput,
|
|
26552
26552
|
success: NullOr(ThreadDevRuntimeRecord),
|
|
26553
26553
|
error: ThreadDevRuntimeError
|
|
26554
26554
|
});
|
|
26555
|
-
const WsThreadDevRuntimeAllocatePortRpc = make$
|
|
26555
|
+
const WsThreadDevRuntimeAllocatePortRpc = make$29(WS_METHODS.threadDevRuntimeAllocatePort, {
|
|
26556
26556
|
payload: ThreadDevRuntimeAllocatePortInput,
|
|
26557
26557
|
success: ThreadDevRuntimeRecord,
|
|
26558
26558
|
error: ThreadDevRuntimeError
|
|
26559
26559
|
});
|
|
26560
|
-
const WsThreadDevRuntimeReleaseRpc = make$
|
|
26560
|
+
const WsThreadDevRuntimeReleaseRpc = make$29(WS_METHODS.threadDevRuntimeRelease, {
|
|
26561
26561
|
payload: ThreadDevRuntimeReleaseInput,
|
|
26562
26562
|
error: ThreadDevRuntimeError
|
|
26563
26563
|
});
|
|
26564
|
-
const WsWorkspaceEnvironmentPreflightRpc = make$
|
|
26564
|
+
const WsWorkspaceEnvironmentPreflightRpc = make$29(WS_METHODS.workspaceEnvironmentPreflight, {
|
|
26565
26565
|
payload: WorkspaceEnvironmentPreflightInput,
|
|
26566
26566
|
success: WorkspaceEnvironmentPreflightReport,
|
|
26567
26567
|
error: WorkspaceEnvironmentError
|
|
26568
26568
|
});
|
|
26569
|
-
const WsWorkspaceEnsureScratchRpc = make$
|
|
26569
|
+
const WsWorkspaceEnsureScratchRpc = make$29(WS_METHODS.workspaceEnsureScratch, {
|
|
26570
26570
|
payload: WorkspaceEnsureScratchInput,
|
|
26571
26571
|
success: WorkspaceEnsureScratchResult,
|
|
26572
26572
|
error: WorkspaceEnvironmentError
|
|
26573
26573
|
});
|
|
26574
|
-
const WsOrchestrationDispatchCommandRpc = make$
|
|
26574
|
+
const WsOrchestrationDispatchCommandRpc = make$29(ORCHESTRATION_WS_METHODS.dispatchCommand, {
|
|
26575
26575
|
payload: ClientOrchestrationCommand,
|
|
26576
26576
|
success: OrchestrationRpcSchemas.dispatchCommand.output,
|
|
26577
26577
|
error: OrchestrationDispatchCommandError
|
|
26578
26578
|
});
|
|
26579
|
-
const WsOrchestrationGetTurnDiffRpc = make$
|
|
26579
|
+
const WsOrchestrationGetTurnDiffRpc = make$29(ORCHESTRATION_WS_METHODS.getTurnDiff, {
|
|
26580
26580
|
payload: OrchestrationGetTurnDiffInput,
|
|
26581
26581
|
success: OrchestrationRpcSchemas.getTurnDiff.output,
|
|
26582
26582
|
error: OrchestrationGetTurnDiffError
|
|
26583
26583
|
});
|
|
26584
|
-
const WsOrchestrationGetFullThreadDiffRpc = make$
|
|
26584
|
+
const WsOrchestrationGetFullThreadDiffRpc = make$29(ORCHESTRATION_WS_METHODS.getFullThreadDiff, {
|
|
26585
26585
|
payload: OrchestrationGetFullThreadDiffInput,
|
|
26586
26586
|
success: OrchestrationRpcSchemas.getFullThreadDiff.output,
|
|
26587
26587
|
error: OrchestrationGetFullThreadDiffError
|
|
26588
26588
|
});
|
|
26589
|
-
const WsOrchestrationStreamTurnDiffRpc = make$
|
|
26589
|
+
const WsOrchestrationStreamTurnDiffRpc = make$29(ORCHESTRATION_WS_METHODS.streamTurnDiff, {
|
|
26590
26590
|
payload: OrchestrationGetTurnDiffInput,
|
|
26591
26591
|
success: BulkTransferStreamEvent,
|
|
26592
26592
|
error: Union([OrchestrationGetTurnDiffError, BulkTransferError]),
|
|
26593
26593
|
stream: true
|
|
26594
26594
|
});
|
|
26595
|
-
const WsOrchestrationStreamFullThreadDiffRpc = make$
|
|
26595
|
+
const WsOrchestrationStreamFullThreadDiffRpc = make$29(ORCHESTRATION_WS_METHODS.streamFullThreadDiff, {
|
|
26596
26596
|
payload: OrchestrationGetFullThreadDiffInput,
|
|
26597
26597
|
success: BulkTransferStreamEvent,
|
|
26598
26598
|
error: Union([OrchestrationGetFullThreadDiffError, BulkTransferError]),
|
|
26599
26599
|
stream: true
|
|
26600
26600
|
});
|
|
26601
|
-
const WsOrchestrationReplayEventsRpc = make$
|
|
26601
|
+
const WsOrchestrationReplayEventsRpc = make$29(ORCHESTRATION_WS_METHODS.replayEvents, {
|
|
26602
26602
|
payload: OrchestrationReplayEventsInput,
|
|
26603
26603
|
success: OrchestrationRpcSchemas.replayEvents.output,
|
|
26604
26604
|
error: OrchestrationReplayEventsError
|
|
26605
26605
|
});
|
|
26606
|
-
const WsOrchestrationGetArchivedShellSnapshotRpc = make$
|
|
26606
|
+
const WsOrchestrationGetArchivedShellSnapshotRpc = make$29(ORCHESTRATION_WS_METHODS.getArchivedShellSnapshot, {
|
|
26607
26607
|
payload: OrchestrationRpcSchemas.getArchivedShellSnapshot.input,
|
|
26608
26608
|
success: OrchestrationRpcSchemas.getArchivedShellSnapshot.output,
|
|
26609
26609
|
error: OrchestrationGetSnapshotError
|
|
26610
26610
|
});
|
|
26611
|
-
const WsOrchestrationSearchThreadsRpc = make$
|
|
26611
|
+
const WsOrchestrationSearchThreadsRpc = make$29(ORCHESTRATION_WS_METHODS.searchThreads, {
|
|
26612
26612
|
payload: OrchestrationSearchThreadsInput,
|
|
26613
26613
|
success: OrchestrationRpcSchemas.searchThreads.output,
|
|
26614
26614
|
error: OrchestrationSearchThreadsError
|
|
@@ -26619,7 +26619,7 @@ const WsOrchestrationSearchThreadsRpc = make$30(ORCHESTRATION_WS_METHODS.searchT
|
|
|
26619
26619
|
* route and `subscribeThread`'s fallback snapshot serve, over the RPC socket
|
|
26620
26620
|
* instead.
|
|
26621
26621
|
*/
|
|
26622
|
-
const WsOrchestrationGetThreadDetailPageRpc = make$
|
|
26622
|
+
const WsOrchestrationGetThreadDetailPageRpc = make$29(ORCHESTRATION_WS_METHODS.getThreadDetailPage, {
|
|
26623
26623
|
payload: OrchestrationRpcSchemas.getThreadDetailPage.input,
|
|
26624
26624
|
success: OrchestrationRpcSchemas.getThreadDetailPage.output,
|
|
26625
26625
|
error: OrchestrationGetSnapshotError
|
|
@@ -26632,29 +26632,29 @@ const WsOrchestrationGetThreadDetailPageRpc = make$30(ORCHESTRATION_WS_METHODS.g
|
|
|
26632
26632
|
* also be authorized, and a repository the caller cannot reach is a failure
|
|
26633
26633
|
* here rather than a clone that dies half way.
|
|
26634
26634
|
*/
|
|
26635
|
-
const WsSourceControlLookupRepositoryRpc = make$
|
|
26635
|
+
const WsSourceControlLookupRepositoryRpc = make$29(WS_METHODS.sourceControlLookupRepository, {
|
|
26636
26636
|
payload: SourceControlRepositoryLookupInput,
|
|
26637
26637
|
success: SourceControlRepositoryInfo,
|
|
26638
26638
|
error: SourceControlRepositoryError
|
|
26639
26639
|
});
|
|
26640
|
-
const WsSourceControlCloneRepositoryRpc = make$
|
|
26640
|
+
const WsSourceControlCloneRepositoryRpc = make$29(WS_METHODS.sourceControlCloneRepository, {
|
|
26641
26641
|
payload: SourceControlCloneRepositoryInput,
|
|
26642
26642
|
success: SourceControlCloneRepositoryResult,
|
|
26643
26643
|
error: SourceControlRepositoryError
|
|
26644
26644
|
});
|
|
26645
|
-
const WsOrchestrationSubscribeShellRpc = make$
|
|
26645
|
+
const WsOrchestrationSubscribeShellRpc = make$29(ORCHESTRATION_WS_METHODS.subscribeShell, {
|
|
26646
26646
|
payload: OrchestrationRpcSchemas.subscribeShell.input,
|
|
26647
26647
|
success: OrchestrationRpcSchemas.subscribeShell.output,
|
|
26648
26648
|
error: OrchestrationGetSnapshotError,
|
|
26649
26649
|
stream: true
|
|
26650
26650
|
});
|
|
26651
|
-
const WsOrchestrationSubscribeThreadRpc = make$
|
|
26651
|
+
const WsOrchestrationSubscribeThreadRpc = make$29(ORCHESTRATION_WS_METHODS.subscribeThread, {
|
|
26652
26652
|
payload: OrchestrationRpcSchemas.subscribeThread.input,
|
|
26653
26653
|
success: OrchestrationRpcSchemas.subscribeThread.output,
|
|
26654
26654
|
error: OrchestrationGetSnapshotError,
|
|
26655
26655
|
stream: true
|
|
26656
26656
|
});
|
|
26657
|
-
const WsSubscribeTerminalEventsRpc = make$
|
|
26657
|
+
const WsSubscribeTerminalEventsRpc = make$29(WS_METHODS.subscribeTerminalEvents, {
|
|
26658
26658
|
payload: Struct({}),
|
|
26659
26659
|
success: TerminalEvent,
|
|
26660
26660
|
stream: true
|
|
@@ -26675,65 +26675,65 @@ const WsSubscribeTerminalEventsRpc = make$30(WS_METHODS.subscribeTerminalEvents,
|
|
|
26675
26675
|
* The client's activity report, accepted and dropped. See
|
|
26676
26676
|
* packages/contracts/src/clientActivityCompat.ts for why there is no answer.
|
|
26677
26677
|
*/
|
|
26678
|
-
const WsServerReportClientActivityRpc = make$
|
|
26679
|
-
const WsServerDiscoverSourceControlRpc = make$
|
|
26678
|
+
const WsServerReportClientActivityRpc = make$29(WS_METHODS.serverReportClientActivity, { payload: ClientActivityReportInput });
|
|
26679
|
+
const WsServerDiscoverSourceControlRpc = make$29(WS_METHODS.serverDiscoverSourceControl, {
|
|
26680
26680
|
payload: Struct({}),
|
|
26681
26681
|
success: SourceControlDiscoveryResult
|
|
26682
26682
|
});
|
|
26683
|
-
const WsProjectsListEntriesRpc = make$
|
|
26683
|
+
const WsProjectsListEntriesRpc = make$29(WS_METHODS.projectsListEntries, {
|
|
26684
26684
|
payload: ProjectListEntriesInput,
|
|
26685
26685
|
success: ProjectListEntriesResult,
|
|
26686
26686
|
error: ProjectListEntriesError
|
|
26687
26687
|
});
|
|
26688
|
-
const WsSubscribeTerminalMetadataRpc = make$
|
|
26688
|
+
const WsSubscribeTerminalMetadataRpc = make$29(WS_METHODS.subscribeTerminalMetadata, {
|
|
26689
26689
|
payload: Struct({}),
|
|
26690
26690
|
success: TerminalMetadataStreamEvent,
|
|
26691
26691
|
stream: true
|
|
26692
26692
|
});
|
|
26693
|
-
const WsSubscribeBrowserEventsRpc = make$
|
|
26693
|
+
const WsSubscribeBrowserEventsRpc = make$29(WS_METHODS.subscribeBrowserEvents, {
|
|
26694
26694
|
payload: BrowserSubscribeInput,
|
|
26695
26695
|
success: BrowserStreamEvent,
|
|
26696
26696
|
error: BrowserError,
|
|
26697
26697
|
stream: true
|
|
26698
26698
|
});
|
|
26699
|
-
const WsSubscribeServerConfigRpc = make$
|
|
26699
|
+
const WsSubscribeServerConfigRpc = make$29(WS_METHODS.subscribeServerConfig, {
|
|
26700
26700
|
payload: Struct({}),
|
|
26701
26701
|
success: ServerConfigStreamEvent,
|
|
26702
26702
|
error: Union([KeybindingsConfigError, ServerSettingsError]),
|
|
26703
26703
|
stream: true
|
|
26704
26704
|
});
|
|
26705
|
-
const WsSubscribeServerLifecycleRpc = make$
|
|
26705
|
+
const WsSubscribeServerLifecycleRpc = make$29(WS_METHODS.subscribeServerLifecycle, {
|
|
26706
26706
|
payload: Struct({}),
|
|
26707
26707
|
success: ServerLifecycleStreamEvent,
|
|
26708
26708
|
stream: true
|
|
26709
26709
|
});
|
|
26710
|
-
const WsSubscribeAuthAccessRpc = make$
|
|
26710
|
+
const WsSubscribeAuthAccessRpc = make$29(WS_METHODS.subscribeAuthAccess, {
|
|
26711
26711
|
payload: Struct({}),
|
|
26712
26712
|
success: AuthAccessStreamEvent,
|
|
26713
26713
|
stream: true
|
|
26714
26714
|
});
|
|
26715
|
-
const WsSubscribeWorkspaceReadinessRpc = make$
|
|
26715
|
+
const WsSubscribeWorkspaceReadinessRpc = make$29(WS_METHODS.subscribeWorkspaceReadiness, {
|
|
26716
26716
|
payload: WorkspaceReadinessSubscribeInput,
|
|
26717
26717
|
success: PhaseEvent,
|
|
26718
26718
|
error: WorkspaceReadinessError,
|
|
26719
26719
|
stream: true
|
|
26720
26720
|
});
|
|
26721
|
-
const WsRpcGroup = make$
|
|
26721
|
+
const WsRpcGroup = make$28(WsServerGetConfigRpc, WsServerRefreshProvidersRpc, WsServerStartProviderAuthRpc, WsServerRepairProviderAuthRuntimeRpc, WsServerDisconnectProviderAuthRpc, WsServerGetProviderAuthSessionRpc, WsServerCancelProviderAuthRpc, WsServerSubmitProviderAuthCodeRpc, WsServerSyncPersonalCodexToCloudRpc, WsServerSyncPersonalClaudeToCloudRpc, WsServerUpsertKeybindingRpc, WsServerRemoveKeybindingRpc, WsServerGetSettingsRpc, WsServerUpdateSettingsRpc, WsServerUpdateEnvironmentDisplayNameRpc, WsServerTraceDiagnosticsRpc, WsServerHeartbeatRpc, make$29(WS_METHODS.usageGetSummary, {
|
|
26722
26722
|
payload: UsageSummaryInput,
|
|
26723
26723
|
success: UsageSummary,
|
|
26724
26724
|
error: UsageReadError
|
|
26725
|
-
}), WsPullRequestsListRpc, WsPullRequestsListStatsRpc, WsPullRequestsDetailRpc, WsPullRequestsActivityRpc, WsPullRequestsThreadCommentsRpc, WsPullRequestsDiffFileContentsRpc, WsPullRequestsRunActionRpc, WsPullRequestsUpdateRpc, WsPullRequestsCommentRpc, WsPullRequestsUpdateCommentRpc, WsPullRequestsSubmitReviewRpc, WsPullRequestsReplyToThreadRpc, WsPullRequestsSetThreadResolutionRpc, WsPullRequestsSetReactionRpc, WsPullRequestsInvalidateRpc, WsPullRequestsReviewerCandidatesRpc, WsPullRequestsRequestReviewersRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsProjectCheckoutDeletionPreviewRpc, WsProjectCheckoutDeletionExecuteRpc, WsWorkspaceReadFileRpc, WsWorkspaceBeginWriteFileRpc, WsWorkspaceWriteFileChunkRpc, WsWorkspaceCommitWriteFileRpc, WsWorkspaceCancelWriteFileRpc, WsShellOpenInEditorRpc, WsSubscribeGitStatusRpc, WsGitPullRpc, WsGitRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsGitListBranchesRpc, WsVcsListRefsRpc, WsVcsRefreshStatusRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsGitCreateWorktreeRpc, WsGitRemoveWorktreeRpc, WsGitCreateBranchRpc, WsGitCheckoutRpc, WsGitInitRpc, WsFilesystemBrowseRpc, WsProjectsReadFileRpc, WsReviewGetDiffPreviewRpc, WsCloudListRuntimesRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalSignalRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsBrowserOpenSessionRpc, WsBrowserListSessionsRpc, WsBrowserCloseSessionRpc, WsBrowserGetSessionRpc, WsBrowserCommandRpc, WsBrowserClearBrowsingDataRpc, WsBrowserAttachDisplayRpc, WsBrowserAddDisplayIceCandidateRpc, WsComputerInputRpc, WsDevTunnelRegisterRpc, WsDevTunnelUnregisterRpc, WsDevTunnelListRpc, WsThreadDevRuntimeGetRpc, WsThreadDevRuntimeAllocatePortRpc, WsThreadDevRuntimeReleaseRpc, WsWorkspaceEnvironmentPreflightRpc, WsWorkspaceEnsureScratchRpc, WsSubscribeTerminalEventsRpc, WsSubscribeTerminalMetadataRpc, WsProjectsListEntriesRpc, WsServerDiscoverSourceControlRpc, WsServerReportClientActivityRpc, WsSubscribeBrowserEventsRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsSubscribeWorkspaceReadinessRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationStreamTurnDiffRpc, WsOrchestrationStreamFullThreadDiffRpc, WsOrchestrationReplayEventsRpc, WsOrchestrationGetArchivedShellSnapshotRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc, make$
|
|
26725
|
+
}), WsPullRequestsListRpc, WsPullRequestsListStatsRpc, WsPullRequestsDetailRpc, WsPullRequestsActivityRpc, WsPullRequestsThreadCommentsRpc, WsPullRequestsDiffFileContentsRpc, WsPullRequestsRunActionRpc, WsPullRequestsUpdateRpc, WsPullRequestsCommentRpc, WsPullRequestsUpdateCommentRpc, WsPullRequestsSubmitReviewRpc, WsPullRequestsReplyToThreadRpc, WsPullRequestsSetThreadResolutionRpc, WsPullRequestsSetReactionRpc, WsPullRequestsInvalidateRpc, WsPullRequestsReviewerCandidatesRpc, WsPullRequestsRequestReviewersRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsProjectCheckoutDeletionPreviewRpc, WsProjectCheckoutDeletionExecuteRpc, WsWorkspaceReadFileRpc, WsWorkspaceBeginWriteFileRpc, WsWorkspaceWriteFileChunkRpc, WsWorkspaceCommitWriteFileRpc, WsWorkspaceCancelWriteFileRpc, WsShellOpenInEditorRpc, WsSubscribeGitStatusRpc, WsGitPullRpc, WsGitRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsGitListBranchesRpc, WsVcsListRefsRpc, WsVcsRefreshStatusRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsGitCreateWorktreeRpc, WsGitRemoveWorktreeRpc, WsGitCreateBranchRpc, WsGitCheckoutRpc, WsGitInitRpc, WsFilesystemBrowseRpc, WsProjectsReadFileRpc, WsReviewGetDiffPreviewRpc, WsCloudListRuntimesRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalSignalRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsBrowserOpenSessionRpc, WsBrowserListSessionsRpc, WsBrowserCloseSessionRpc, WsBrowserGetSessionRpc, WsBrowserCommandRpc, WsBrowserClearBrowsingDataRpc, WsBrowserAttachDisplayRpc, WsBrowserAddDisplayIceCandidateRpc, WsComputerInputRpc, WsDevTunnelRegisterRpc, WsDevTunnelUnregisterRpc, WsDevTunnelListRpc, WsThreadDevRuntimeGetRpc, WsThreadDevRuntimeAllocatePortRpc, WsThreadDevRuntimeReleaseRpc, WsWorkspaceEnvironmentPreflightRpc, WsWorkspaceEnsureScratchRpc, WsSubscribeTerminalEventsRpc, WsSubscribeTerminalMetadataRpc, WsProjectsListEntriesRpc, WsServerDiscoverSourceControlRpc, WsServerReportClientActivityRpc, WsSubscribeBrowserEventsRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsSubscribeWorkspaceReadinessRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationStreamTurnDiffRpc, WsOrchestrationStreamFullThreadDiffRpc, WsOrchestrationReplayEventsRpc, WsOrchestrationGetArchivedShellSnapshotRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc, make$29(WS_METHODS.assetsCreateUrl, {
|
|
26726
26726
|
payload: AssetsRpcSchemas.createUrl.input,
|
|
26727
26727
|
success: AssetsRpcSchemas.createUrl.output,
|
|
26728
26728
|
error: AssetAccessError
|
|
26729
|
-
}), make$
|
|
26729
|
+
}), make$29(WS_METHODS.attachmentsCreateUploadUrl, {
|
|
26730
26730
|
payload: AttachmentCreateUploadUrlInput,
|
|
26731
26731
|
success: AttachmentCreateUploadUrlResult,
|
|
26732
26732
|
error: AttachmentUploadSigningKeyError
|
|
26733
|
-
}), make$
|
|
26733
|
+
}), make$29(WS_METHODS.attachmentsDelete, {
|
|
26734
26734
|
payload: AttachmentDeleteInput,
|
|
26735
26735
|
success: Void
|
|
26736
|
-
}), make$
|
|
26736
|
+
}), make$29(WS_METHODS.providerUploadFeedback, {
|
|
26737
26737
|
payload: ProviderUploadFeedbackInput,
|
|
26738
26738
|
success: ProviderUploadFeedbackResult,
|
|
26739
26739
|
error: ProviderUploadFeedbackError
|
|
@@ -34361,7 +34361,7 @@ function parse$5(input) {
|
|
|
34361
34361
|
const FULL_PATH_REGEXP = /^https?:\/\/.*?\//;
|
|
34362
34362
|
const OPTIONAL_PARAM_REGEXP = /(\/:[^/()]*?)\?(\/?)/;
|
|
34363
34363
|
/** @internal */
|
|
34364
|
-
const make$
|
|
34364
|
+
const make$27 = (options = {}) => new RouterImpl(options);
|
|
34365
34365
|
var RouterImpl = class {
|
|
34366
34366
|
constructor(options = {}) {
|
|
34367
34367
|
this.options = {
|
|
@@ -34880,7 +34880,7 @@ const httpMethods = [
|
|
|
34880
34880
|
* @since 1.0.0
|
|
34881
34881
|
* @category constructors
|
|
34882
34882
|
*/
|
|
34883
|
-
const make$
|
|
34883
|
+
const make$26 = make$27;
|
|
34884
34884
|
//#endregion
|
|
34885
34885
|
//#region ../../node_modules/.bun/effect@4.0.0-beta.51/node_modules/effect/dist/unstable/http/HttpRouter.js
|
|
34886
34886
|
/**
|
|
@@ -34896,8 +34896,8 @@ const HttpRouter = /* @__PURE__ */ Service$1("effect/http/HttpRouter");
|
|
|
34896
34896
|
* @since 4.0.0
|
|
34897
34897
|
* @category HttpRouter
|
|
34898
34898
|
*/
|
|
34899
|
-
const make$
|
|
34900
|
-
const router = make$
|
|
34899
|
+
const make$25 = /* @__PURE__ */ gen(function* () {
|
|
34900
|
+
const router = make$26(yield* RouterConfig);
|
|
34901
34901
|
const middleware = /* @__PURE__ */ new Set();
|
|
34902
34902
|
const addAll = (routes) => contextWith((context) => {
|
|
34903
34903
|
const middleware = getMiddleware(context);
|
|
@@ -35027,7 +35027,7 @@ const add$1 = (method, path, handler, options) => use((router) => router.add(met
|
|
|
35027
35027
|
* @since 4.0.0
|
|
35028
35028
|
* @category HttpRouter
|
|
35029
35029
|
*/
|
|
35030
|
-
const layer$5 = /* @__PURE__ */ effect(HttpRouter)(make$
|
|
35030
|
+
const layer$5 = /* @__PURE__ */ effect(HttpRouter)(make$25);
|
|
35031
35031
|
const RouteTypeId = "~effect/http/HttpRouter/Route";
|
|
35032
35032
|
const makeRoute = (options) => ({
|
|
35033
35033
|
...options,
|
|
@@ -50653,7 +50653,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
50653
50653
|
const min = forceColor || 0;
|
|
50654
50654
|
if (env.TERM === "dumb") return min;
|
|
50655
50655
|
if (process$1.platform === "win32") {
|
|
50656
|
-
const osRelease =
|
|
50656
|
+
const osRelease = os.release().split(".");
|
|
50657
50657
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
50658
50658
|
return 1;
|
|
50659
50659
|
}
|
|
@@ -53096,7 +53096,7 @@ var require_ProcessDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53096
53096
|
exports.processDetector = void 0;
|
|
53097
53097
|
const api_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
53098
53098
|
const semconv_1 = require_semconv$1();
|
|
53099
|
-
const os$
|
|
53099
|
+
const os$4 = __require("os");
|
|
53100
53100
|
/**
|
|
53101
53101
|
* ProcessDetector will be used to detect the resources related current process running
|
|
53102
53102
|
* and being instrumented from the NodeJS Process module.
|
|
@@ -53118,7 +53118,7 @@ var require_ProcessDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53118
53118
|
};
|
|
53119
53119
|
if (process.argv.length > 1) attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
|
|
53120
53120
|
try {
|
|
53121
|
-
const userInfo = os$
|
|
53121
|
+
const userInfo = os$4.userInfo();
|
|
53122
53122
|
attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
|
|
53123
53123
|
} catch (e) {
|
|
53124
53124
|
api_1.diag.debug(`error obtaining process owner: ${e}`);
|
|
@@ -66041,7 +66041,7 @@ function normalizeNumberish(value) {
|
|
|
66041
66041
|
}
|
|
66042
66042
|
//#endregion
|
|
66043
66043
|
//#region package.json
|
|
66044
|
-
var version$1 = "0.13.
|
|
66044
|
+
var version$1 = "0.13.96";
|
|
66045
66045
|
//#endregion
|
|
66046
66046
|
//#region src/sentry.ts
|
|
66047
66047
|
const SERVER_APP_NAME = "forge-server";
|
|
@@ -70888,7 +70888,7 @@ const storeAttachmentUpload = fn$1("AttachmentUpload.store")(function* (claims,
|
|
|
70888
70888
|
const fileSystem = yield* FileSystem;
|
|
70889
70889
|
const path = yield* Path$2;
|
|
70890
70890
|
let receivedBytes = 0;
|
|
70891
|
-
const bodyStream = body instanceof Uint8Array ? make$
|
|
70891
|
+
const bodyStream = body instanceof Uint8Array ? make$42(body) : body;
|
|
70892
70892
|
return yield* gen(function* () {
|
|
70893
70893
|
yield* fileSystem.makeDirectory(path.dirname(finalPath), { recursive: true });
|
|
70894
70894
|
yield* run$2(bodyStream.pipe(takeWhile((chunk) => {
|
|
@@ -76111,7 +76111,7 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
76111
76111
|
var fs$6 = __require("fs");
|
|
76112
76112
|
var path$5 = __require("path");
|
|
76113
76113
|
var url$1 = __require("url");
|
|
76114
|
-
var os$
|
|
76114
|
+
var os$3 = __require("os");
|
|
76115
76115
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
76116
76116
|
var vars = process.config && process.config.variables || {};
|
|
76117
76117
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
@@ -76119,8 +76119,8 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
76119
76119
|
var abi = versions.modules;
|
|
76120
76120
|
if (versions.deno || process.isBun) abi = "unsupported";
|
|
76121
76121
|
var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
|
|
76122
|
-
var arch = process.env.npm_config_arch || os$
|
|
76123
|
-
var platform = process.env.npm_config_platform || os$
|
|
76122
|
+
var arch = process.env.npm_config_arch || os$3.arch();
|
|
76123
|
+
var platform = process.env.npm_config_platform || os$3.platform();
|
|
76124
76124
|
var libc = process.env.LIBC || (isMusl(platform) ? "musl" : "glibc");
|
|
76125
76125
|
var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || "";
|
|
76126
76126
|
var uv = (versions.uv || "").split(".")[0];
|
|
@@ -76837,7 +76837,7 @@ let clientIdCounter = 0;
|
|
|
76837
76837
|
* @since 4.0.0
|
|
76838
76838
|
* @category client
|
|
76839
76839
|
*/
|
|
76840
|
-
const make$
|
|
76840
|
+
const make$24 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
76841
76841
|
const clientId = clientIdCounter++;
|
|
76842
76842
|
const { run, send, supportsAck, supportsTransferables } = yield* Protocol$1;
|
|
76843
76843
|
const entries = /* @__PURE__ */ new Map();
|
|
@@ -76981,7 +76981,7 @@ const makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options
|
|
|
76981
76981
|
const services = yield* context();
|
|
76982
76982
|
const scope = get$3(services, Scope$1);
|
|
76983
76983
|
const trackFiber = runIn(forkUnsafe(scope, "parallel"));
|
|
76984
|
-
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$
|
|
76984
|
+
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$43(concurrency);
|
|
76985
76985
|
const clients = /* @__PURE__ */ new Map();
|
|
76986
76986
|
let isShutdown = false;
|
|
76987
76987
|
const shutdownLatch = makeUnsafe$7(false);
|
|
@@ -77212,10 +77212,10 @@ const applyMiddleware = (context, handler, options) => {
|
|
|
77212
77212
|
* @since 4.0.0
|
|
77213
77213
|
* @category server
|
|
77214
77214
|
*/
|
|
77215
|
-
const make$
|
|
77215
|
+
const make$23 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
77216
77216
|
const { disconnects, end, run, send, supportsAck, supportsSpanPropagation, supportsTransferables } = yield* Protocol;
|
|
77217
77217
|
const services = yield* context();
|
|
77218
|
-
const scope = yield* make$
|
|
77218
|
+
const scope = yield* make$36();
|
|
77219
77219
|
const server = yield* makeNoSerialization(group, {
|
|
77220
77220
|
...options,
|
|
77221
77221
|
disableClientAcks: !supportsAck,
|
|
@@ -77384,12 +77384,12 @@ const makeProtocolWithHttpEffectWebsocket = /* @__PURE__ */ gen(function* () {
|
|
|
77384
77384
|
*/
|
|
77385
77385
|
const toHttpEffectWebsocket = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
77386
77386
|
const { httpEffect, protocol } = yield* makeProtocolWithHttpEffectWebsocket;
|
|
77387
|
-
yield* make$
|
|
77387
|
+
yield* make$23(group, options).pipe(provideService(Protocol, protocol), forkScoped);
|
|
77388
77388
|
return httpEffect;
|
|
77389
77389
|
});
|
|
77390
77390
|
const makeSocketProtocol = /* @__PURE__ */ gen(function* () {
|
|
77391
77391
|
const serialization = yield* RpcSerialization;
|
|
77392
|
-
const disconnects = yield* make$
|
|
77392
|
+
const disconnects = yield* make$44();
|
|
77393
77393
|
let clientId = 0;
|
|
77394
77394
|
const clients = /* @__PURE__ */ new Map();
|
|
77395
77395
|
const clientIds = /* @__PURE__ */ new Set();
|
|
@@ -79007,7 +79007,7 @@ function updateSuccessfulEntry(input) {
|
|
|
79007
79007
|
return next;
|
|
79008
79008
|
}
|
|
79009
79009
|
const makeSourceControlRateLimit = gen(function* () {
|
|
79010
|
-
const entries = yield* make$
|
|
79010
|
+
const entries = yield* make$49(/* @__PURE__ */ new Map());
|
|
79011
79011
|
const check = fn$1("SourceControlRateLimit.check")(function* (input, options) {
|
|
79012
79012
|
const now = yield* currentTimeMillis;
|
|
79013
79013
|
const entry = (yield* get$6(entries)).get(normalizedKey(input));
|
|
@@ -80042,7 +80042,7 @@ function trimmed$2(value) {
|
|
|
80042
80042
|
* the other hosts already use.
|
|
80043
80043
|
*/
|
|
80044
80044
|
function toIsoUtc(value) {
|
|
80045
|
-
return match(make$
|
|
80045
|
+
return match(make$37(value), {
|
|
80046
80046
|
onNone: () => value,
|
|
80047
80047
|
onSome: formatIso
|
|
80048
80048
|
});
|
|
@@ -84203,7 +84203,7 @@ function resolveGithubWriteIdentity(getSettings) {
|
|
|
84203
84203
|
}
|
|
84204
84204
|
var ServerSettingsService = class ServerSettingsService extends Service$1()("forge/serverSettings/ServerSettingsService") {
|
|
84205
84205
|
static layerTest = (overrides = {}) => effect(ServerSettingsService, gen(function* () {
|
|
84206
|
-
const currentSettingsRef = yield* make$
|
|
84206
|
+
const currentSettingsRef = yield* make$49(deepMerge$1(DEFAULT_SERVER_SETTINGS, overrides));
|
|
84207
84207
|
return {
|
|
84208
84208
|
start: void_$1,
|
|
84209
84209
|
ready: void_$1,
|
|
@@ -84261,12 +84261,12 @@ const ServerSettingsLive = effect(ServerSettingsService, gen(function* () {
|
|
|
84261
84261
|
const { settingsPath } = yield* ServerConfig;
|
|
84262
84262
|
const fs = yield* FileSystem;
|
|
84263
84263
|
const pathService = yield* Path$2;
|
|
84264
|
-
const writeSemaphore = yield* make$
|
|
84264
|
+
const writeSemaphore = yield* make$43(1);
|
|
84265
84265
|
const cacheKey = "settings";
|
|
84266
84266
|
const changesPubSub = yield* unbounded$1();
|
|
84267
|
-
const startedRef = yield* make$
|
|
84268
|
-
const startedDeferred = yield* make$
|
|
84269
|
-
const watcherScope = yield* make$
|
|
84267
|
+
const startedRef = yield* make$49(false);
|
|
84268
|
+
const startedDeferred = yield* make$38();
|
|
84269
|
+
const watcherScope = yield* make$36("sequential");
|
|
84270
84270
|
yield* addFinalizer$2(() => close(watcherScope, void_$3));
|
|
84271
84271
|
const emitChange = (settings) => publish(changesPubSub, settings).pipe(asVoid);
|
|
84272
84272
|
const readConfigExists = fs.exists(settingsPath).pipe(mapError((cause) => new ServerSettingsError({
|
|
@@ -86344,7 +86344,7 @@ function toReviewThreadListing(threads, dismissalsByReviewId) {
|
|
|
86344
86344
|
viewer: threads.metadata.viewer
|
|
86345
86345
|
};
|
|
86346
86346
|
}
|
|
86347
|
-
const make$
|
|
86347
|
+
const make$21 = gen(function* () {
|
|
86348
86348
|
const github = yield* GitHubCli$1;
|
|
86349
86349
|
/**
|
|
86350
86350
|
* The pull request's own node id, which is what a mutation against the pull request itself is
|
|
@@ -87049,9 +87049,9 @@ const make$22 = gen(function* () {
|
|
|
87049
87049
|
})))
|
|
87050
87050
|
});
|
|
87051
87051
|
});
|
|
87052
|
-
effect(GitHubPullRequestCli, make$
|
|
87052
|
+
effect(GitHubPullRequestCli, make$21);
|
|
87053
87053
|
/** Builds a PR CLI for one authenticated session without touching global git or auth state. */
|
|
87054
|
-
const makeFromCommandRunner = (runner) => make$
|
|
87054
|
+
const makeFromCommandRunner = (runner) => make$21.pipe(provideService(GitHubCli$1, runner));
|
|
87055
87055
|
//#endregion
|
|
87056
87056
|
//#region src/pullRequest/GitHubPullRequestProvider.ts
|
|
87057
87057
|
const CAPABILITIES$3 = {
|
|
@@ -87171,7 +87171,7 @@ function loginAvatarUrl(login, host) {
|
|
|
87171
87171
|
}
|
|
87172
87172
|
/** True where markdown would render nothing: whitespace, or only HTML comments. */
|
|
87173
87173
|
const rendersEmpty = (body) => body.replace(/<!--[\s\S]*?-->/g, "").trim().length === 0;
|
|
87174
|
-
const make$
|
|
87174
|
+
const make$20 = gen(function* () {
|
|
87175
87175
|
const cli = yield* GitHubPullRequestCli;
|
|
87176
87176
|
const fail = (operation) => (error) => new PullRequestProviderError({
|
|
87177
87177
|
provider: "github",
|
|
@@ -87380,7 +87380,7 @@ const make$21 = gen(function* () {
|
|
|
87380
87380
|
};
|
|
87381
87381
|
});
|
|
87382
87382
|
/** Constructs the provider from a session-bound command service supplied by the caller. */
|
|
87383
|
-
const makeFromCli = (cli) => make$
|
|
87383
|
+
const makeFromCli = (cli) => make$20.pipe(provideService(GitHubPullRequestCli, cli));
|
|
87384
87384
|
//#endregion
|
|
87385
87385
|
//#region src/git/AgentAttribution.ts
|
|
87386
87386
|
/**
|
|
@@ -92993,7 +92993,7 @@ function toResolvableLinks(links) {
|
|
|
92993
92993
|
* A Forge project id is installation-local; it must never be sent to CMMD as a project id.
|
|
92994
92994
|
*/
|
|
92995
92995
|
var CmmdProjectIdentityResolver = class extends Service$1()("forge/pullRequest/CmmdProjectIdentityResolver") {};
|
|
92996
|
-
const make$
|
|
92996
|
+
const make$19 = gen(function* () {
|
|
92997
92997
|
const environment = yield* ServerEnvironment;
|
|
92998
92998
|
const repositoryIdentity = yield* RepositoryIdentityResolver;
|
|
92999
92999
|
const resolve = (forgeProjectId, cmmdJwt) => gen(function* () {
|
|
@@ -93034,7 +93034,7 @@ function resolveCanonicalKey(repositoryIdentity, forgeProjectId) {
|
|
|
93034
93034
|
return (yield* repositoryIdentity.resolve(workspaceRoot))?.canonicalKey ?? null;
|
|
93035
93035
|
}).pipe(orElseSucceed(() => null));
|
|
93036
93036
|
}
|
|
93037
|
-
const cmmdProjectIdentityResolverLive = effect(CmmdProjectIdentityResolver, make$
|
|
93037
|
+
const cmmdProjectIdentityResolverLive = effect(CmmdProjectIdentityResolver, make$19);
|
|
93038
93038
|
//#endregion
|
|
93039
93039
|
//#region src/pullRequest/PullRequestServiceFactory.ts
|
|
93040
93040
|
var PullRequestServiceFactory = class extends Service$1()("forge/pullRequest/PullRequestServiceFactory") {};
|
|
@@ -93512,12 +93512,12 @@ const KeybindingsLive = effect(Keybindings, gen(function* () {
|
|
|
93512
93512
|
const { keybindingsConfigPath } = yield* ServerConfig;
|
|
93513
93513
|
const fs = yield* FileSystem;
|
|
93514
93514
|
const path = yield* Path$2;
|
|
93515
|
-
const upsertSemaphore = yield* make$
|
|
93515
|
+
const upsertSemaphore = yield* make$43(1);
|
|
93516
93516
|
const resolvedConfigCacheKey = "resolved";
|
|
93517
93517
|
const changesPubSub = yield* unbounded$1();
|
|
93518
|
-
const startedRef = yield* make$
|
|
93519
|
-
const startedDeferred = yield* make$
|
|
93520
|
-
const watcherScope = yield* make$
|
|
93518
|
+
const startedRef = yield* make$49(false);
|
|
93519
|
+
const startedDeferred = yield* make$38();
|
|
93520
|
+
const watcherScope = yield* make$36("sequential");
|
|
93521
93521
|
yield* addFinalizer$2(() => close(watcherScope, void_$3));
|
|
93522
93522
|
const emitChange = (configState) => publish(changesPubSub, configState).pipe(asVoid);
|
|
93523
93523
|
const readConfigExists = fs.exists(keybindingsConfigPath).pipe(mapError((cause) => new KeybindingsConfigError({
|
|
@@ -93964,7 +93964,7 @@ const launchDetached = (launch) => gen(function* () {
|
|
|
93964
93964
|
});
|
|
93965
93965
|
const OpenLive = effect(Open, gen(function* () {
|
|
93966
93966
|
const open = yield* tryPromise({
|
|
93967
|
-
try: () => import("./open-
|
|
93967
|
+
try: () => import("./open-yHTUkd2Y.mjs"),
|
|
93968
93968
|
catch: (cause) => new OpenError$1({
|
|
93969
93969
|
message: "failed to load browser opener",
|
|
93970
93970
|
cause
|
|
@@ -94841,7 +94841,7 @@ var ProviderRegistry = class extends Service$1()("forge/provider/Services/Provid
|
|
|
94841
94841
|
var ServerLifecycleEvents = class extends Service$1()("forge/serverLifecycleEvents") {};
|
|
94842
94842
|
const ServerLifecycleEventsLive = effect(ServerLifecycleEvents, gen(function* () {
|
|
94843
94843
|
const pubsub = yield* unbounded$1();
|
|
94844
|
-
const state = yield* make$
|
|
94844
|
+
const state = yield* make$49({
|
|
94845
94845
|
sequence: 0,
|
|
94846
94846
|
events: []
|
|
94847
94847
|
});
|
|
@@ -96626,7 +96626,7 @@ function normalizeCount(count) {
|
|
|
96626
96626
|
return Number.isFinite(count) ? Math.max(0, Math.floor(count)) : 0;
|
|
96627
96627
|
}
|
|
96628
96628
|
const makeRuntimeDrainState = gen(function* () {
|
|
96629
|
-
const stateRef = yield* make$
|
|
96629
|
+
const stateRef = yield* make$49(initialState);
|
|
96630
96630
|
const update = (f) => updateAndGet(stateRef, f).pipe(map$3(snapshotFromState));
|
|
96631
96631
|
return {
|
|
96632
96632
|
beginTurn: (input) => update((state) => {
|
|
@@ -99247,7 +99247,7 @@ function askTheLedger(request) {
|
|
|
99247
99247
|
return logWarning$1("usage session lookup failed; local lanes keep their records").pipe(annotateLogs({ cause: outcome.error }), as$3(UNAVAILABLE.callFailed));
|
|
99248
99248
|
}));
|
|
99249
99249
|
}
|
|
99250
|
-
const make$
|
|
99250
|
+
const make$15 = (fetchImpl, resolveOwnerCredential) => gen(function* () {
|
|
99251
99251
|
const config = yield* ServerConfig;
|
|
99252
99252
|
const sql = yield* SqlClient;
|
|
99253
99253
|
/** The cloud lane: this runtime's own scoped grant. */
|
|
@@ -99286,7 +99286,7 @@ const make$16 = (fetchImpl, resolveOwnerCredential) => gen(function* () {
|
|
|
99286
99286
|
* without a signed-in machine behind it. Both default to the real thing.
|
|
99287
99287
|
*/
|
|
99288
99288
|
function makeUsageSessionLookupLayer(fetchImpl = fetch, resolveOwnerCredential = resolveOwnerCredentialLive) {
|
|
99289
|
-
return effect(UsageSessionLookup, make$
|
|
99289
|
+
return effect(UsageSessionLookup, make$15(fetchImpl, resolveOwnerCredential));
|
|
99290
99290
|
}
|
|
99291
99291
|
const UsageSessionLookupLive = makeUsageSessionLookupLayer();
|
|
99292
99292
|
//#endregion
|
|
@@ -99901,8 +99901,8 @@ function parseJson(raw) {
|
|
|
99901
99901
|
}
|
|
99902
99902
|
}
|
|
99903
99903
|
function resolveHourlyWindow(input) {
|
|
99904
|
-
const sinceTime = input.sinceTime === void 0 ? none$4() : make$
|
|
99905
|
-
const untilTime = input.untilTime === void 0 ? none$4() : make$
|
|
99904
|
+
const sinceTime = input.sinceTime === void 0 ? none$4() : make$37(input.sinceTime);
|
|
99905
|
+
const untilTime = input.untilTime === void 0 ? none$4() : make$37(input.untilTime);
|
|
99906
99906
|
if (isNone(sinceTime) || isNone(untilTime)) return "Hourly usage requires valid sinceTime and untilTime instants";
|
|
99907
99907
|
const sinceTimeMs = toEpochMillis(sinceTime.value);
|
|
99908
99908
|
const untilTimeMs = toEpochMillis(untilTime.value);
|
|
@@ -99938,7 +99938,7 @@ function resolveWindow(input) {
|
|
|
99938
99938
|
};
|
|
99939
99939
|
hourly = resolved;
|
|
99940
99940
|
}
|
|
99941
|
-
const windowStart = make$
|
|
99941
|
+
const windowStart = make$37(`${input.sinceDay}T00:00:00Z`);
|
|
99942
99942
|
if (isNone(windowStart)) return {
|
|
99943
99943
|
kind: "invalid",
|
|
99944
99944
|
detail: `sinceDay '${input.sinceDay}' is not a valid date`
|
|
@@ -100096,7 +100096,7 @@ function failedRecordedSources(hostId, detail) {
|
|
|
100096
100096
|
message: detail
|
|
100097
100097
|
}));
|
|
100098
100098
|
}
|
|
100099
|
-
const make$
|
|
100099
|
+
const make$14 = (hooks) => gen(function* () {
|
|
100100
100100
|
const fileSystem = yield* FileSystem;
|
|
100101
100101
|
const path = yield* Path$2;
|
|
100102
100102
|
const config = yield* ServerConfig;
|
|
@@ -100109,9 +100109,9 @@ const make$15 = (hooks) => gen(function* () {
|
|
|
100109
100109
|
const lookupCache = /* @__PURE__ */ new Map();
|
|
100110
100110
|
let lookupCacheDirty = false;
|
|
100111
100111
|
const selfRuntimeId = resolveRuntimeReplicationRuntimeId(config);
|
|
100112
|
-
const scanScope = yield* make$
|
|
100112
|
+
const scanScope = yield* make$36("sequential");
|
|
100113
100113
|
yield* addFinalizer$2(() => close(scanScope, void_$3));
|
|
100114
|
-
const scanSemaphore = yield* make$
|
|
100114
|
+
const scanSemaphore = yield* make$43(1);
|
|
100115
100115
|
const inFlight = /* @__PURE__ */ new Map();
|
|
100116
100116
|
const ratesCachePath = path.join(config.stateDir, RATES_CACHE_FILE);
|
|
100117
100117
|
const scanCachePath = path.join(config.stateDir, SCAN_CACHE_FILE);
|
|
@@ -100515,7 +100515,7 @@ const make$15 = (hooks) => gen(function* () {
|
|
|
100515
100515
|
const key = summaryKey(input);
|
|
100516
100516
|
const joined = inFlight.get(key);
|
|
100517
100517
|
if (joined !== void 0) return yield* _await(joined);
|
|
100518
|
-
const deferred = yield* make$
|
|
100518
|
+
const deferred = yield* make$38();
|
|
100519
100519
|
inFlight.set(key, deferred);
|
|
100520
100520
|
yield* scanSemaphore.withPermits(1)(computeSummary(input, window)).pipe(exit, flatMap((exit) => done(deferred, exit)), ensuring(sync$1(() => {
|
|
100521
100521
|
inFlight.delete(key);
|
|
@@ -100525,7 +100525,7 @@ const make$15 = (hooks) => gen(function* () {
|
|
|
100525
100525
|
});
|
|
100526
100526
|
/** The service with a seam into the scan; tests pass their own hooks. */
|
|
100527
100527
|
function makeUsageServiceLayer(hooks = NOOP_SCAN_HOOKS) {
|
|
100528
|
-
return effect(UsageService, make$
|
|
100528
|
+
return effect(UsageService, make$14(hooks));
|
|
100529
100529
|
}
|
|
100530
100530
|
const UsageServiceLive = makeUsageServiceLayer();
|
|
100531
100531
|
const DAY_MS = 1440 * 60 * 1e3;
|
|
@@ -100571,7 +100571,7 @@ const runUsageScanWarmup = (options) => gen(function* () {
|
|
|
100571
100571
|
const now = options.now ?? currentTimeMillis;
|
|
100572
100572
|
const startDelayMs = options.startDelayMs ?? 2e4;
|
|
100573
100573
|
const intervalMs = options.intervalMs ?? 36e5;
|
|
100574
|
-
const scanning = yield* make$
|
|
100574
|
+
const scanning = yield* make$49(false);
|
|
100575
100575
|
yield* sleep(startDelayMs);
|
|
100576
100576
|
return yield* forever$1(gen(function* () {
|
|
100577
100577
|
if (yield* get$6(scanning)) yield* logInfo("usage scan warm-up skipped; the previous scan is still running");
|
|
@@ -100588,9 +100588,9 @@ var ServerRuntimeStartupError = class extends TaggedError("ServerRuntimeStartupE
|
|
|
100588
100588
|
var ServerRuntimeStartup = class extends Service$1()("forge/serverRuntimeStartup") {};
|
|
100589
100589
|
const settleQueuedCommand = (deferred, exit) => isSuccess(exit) ? succeed$3(deferred, exit.value) : failCause$3(deferred, exit.cause);
|
|
100590
100590
|
const makeCommandGate = gen(function* () {
|
|
100591
|
-
const commandReady = yield* make$
|
|
100591
|
+
const commandReady = yield* make$38();
|
|
100592
100592
|
const commandQueue = yield* unbounded$2();
|
|
100593
|
-
const commandReadinessState = yield* make$
|
|
100593
|
+
const commandReadinessState = yield* make$49("pending");
|
|
100594
100594
|
yield* forkScoped(forever$1(take$1(commandQueue).pipe(flatMap((command) => command.run))));
|
|
100595
100595
|
return {
|
|
100596
100596
|
awaitCommandReady: _await(commandReady),
|
|
@@ -100606,7 +100606,7 @@ const makeCommandGate = gen(function* () {
|
|
|
100606
100606
|
const readinessState = yield* get$6(commandReadinessState);
|
|
100607
100607
|
if (readinessState === "ready") return yield* effect;
|
|
100608
100608
|
if (readinessState !== "pending") return yield* readinessState;
|
|
100609
|
-
const result = yield* make$
|
|
100609
|
+
const result = yield* make$38();
|
|
100610
100610
|
yield* offer$1(commandQueue, { run: _await(commandReady).pipe(flatMap(() => effect), exit, flatMap((exit) => settleQueuedCommand(result, exit))) });
|
|
100611
100611
|
return yield* _await(result);
|
|
100612
100612
|
})
|
|
@@ -100818,8 +100818,8 @@ const ServerRuntimeStartupLive = effect(ServerRuntimeStartup, gen(function* () {
|
|
|
100818
100818
|
const usage = yield* UsageService;
|
|
100819
100819
|
const drainState = yield* RuntimeDrainState;
|
|
100820
100820
|
const commandGate = yield* makeCommandGate;
|
|
100821
|
-
const httpListening = yield* make$
|
|
100822
|
-
const reactorScope = yield* make$
|
|
100821
|
+
const httpListening = yield* make$38();
|
|
100822
|
+
const reactorScope = yield* make$36("sequential");
|
|
100823
100823
|
yield* addFinalizer$2(() => close(reactorScope, void_$3));
|
|
100824
100824
|
const startup = gen(function* () {
|
|
100825
100825
|
yield* logDebug("startup phase: starting keybindings runtime");
|
|
@@ -101590,8 +101590,8 @@ function previewUrlForPort(port) {
|
|
|
101590
101590
|
return `http://127.0.0.1:${port}/`;
|
|
101591
101591
|
}
|
|
101592
101592
|
const ThreadDevRuntimeLive = effect(ThreadDevRuntime, gen(function* () {
|
|
101593
|
-
const byThreadId = yield* make$
|
|
101594
|
-
const usedPorts = yield* make$
|
|
101593
|
+
const byThreadId = yield* make$49(/* @__PURE__ */ new Map());
|
|
101594
|
+
const usedPorts = yield* make$49(/* @__PURE__ */ new Set());
|
|
101595
101595
|
const allocateNextPort = gen(function* () {
|
|
101596
101596
|
const used = yield* get$6(usedPorts);
|
|
101597
101597
|
for (let port = DEFAULT_PORT_MIN; port <= DEFAULT_PORT_MAX; port += 1) if (!used.has(port)) return port;
|
|
@@ -107078,7 +107078,7 @@ function makeSnapshotThenLiveStream(input) {
|
|
|
107078
107078
|
const liveEvents = yield* input.subscribeLiveEvents;
|
|
107079
107079
|
const snapshot = yield* input.loadSnapshot;
|
|
107080
107080
|
const eventsAfterSnapshot = liveEvents.pipe(filter$2((event) => event.sequence > snapshot.snapshotSequence));
|
|
107081
|
-
return concat$2(make$
|
|
107081
|
+
return concat$2(make$42({
|
|
107082
107082
|
kind: "snapshot",
|
|
107083
107083
|
snapshot
|
|
107084
107084
|
}), eventsAfterSnapshot);
|
|
@@ -107740,7 +107740,7 @@ const makeWsRpcLayer = (currentSessionId, currentUserId) => WsRpcGroup.toLayer(g
|
|
|
107740
107740
|
discard: true
|
|
107741
107741
|
}).pipe(ignoreCause({ log: true }), forkScoped);
|
|
107742
107742
|
const liveUpdates = merge$4(keybindingsUpdates, merge$4(providerStatuses, merge$4(settingsUpdates, environmentUpdates)));
|
|
107743
|
-
return concat$2(make$
|
|
107743
|
+
return concat$2(make$42({
|
|
107744
107744
|
version: 1,
|
|
107745
107745
|
type: "snapshot",
|
|
107746
107746
|
config: yield* loadServerConfig
|
|
@@ -107754,9 +107754,9 @@ const makeWsRpcLayer = (currentSessionId, currentUserId) => WsRpcGroup.toLayer(g
|
|
|
107754
107754
|
}), { "rpc.aggregate": "server" }),
|
|
107755
107755
|
[WS_METHODS.subscribeAuthAccess]: (_input) => observeRpcStreamEffect(WS_METHODS.subscribeAuthAccess, gen(function* () {
|
|
107756
107756
|
const initialSnapshot = yield* loadAuthAccessSnapshot();
|
|
107757
|
-
const revisionRef = yield* make$
|
|
107757
|
+
const revisionRef = yield* make$49(1);
|
|
107758
107758
|
const liveEvents = merge$4(bootstrapCredentials.streamChanges, sessions.streamChanges).pipe(mapEffect$1((change) => updateAndGet(revisionRef, (revision) => revision + 1).pipe(map$3((revision) => toAuthAccessStreamEvent(change, revision, currentSessionId)))));
|
|
107759
|
-
return concat$2(make$
|
|
107759
|
+
return concat$2(make$42({
|
|
107760
107760
|
version: 1,
|
|
107761
107761
|
revision: 1,
|
|
107762
107762
|
type: "snapshot",
|
|
@@ -114999,7 +114999,7 @@ const PgClient = /* @__PURE__ */ Service$1("@effect/sql-pg/PgClient");
|
|
|
114999
114999
|
* @category constructors
|
|
115000
115000
|
* @since 1.0.0
|
|
115001
115001
|
*/
|
|
115002
|
-
const make$
|
|
115002
|
+
const make$13 = (options) => fromPool({
|
|
115003
115003
|
...options,
|
|
115004
115004
|
acquire: gen(function* () {
|
|
115005
115005
|
const pool = new Pool({
|
|
@@ -115108,7 +115108,7 @@ const fromPool = /* @__PURE__ */ fnUntraced(function* (options) {
|
|
|
115108
115108
|
});
|
|
115109
115109
|
const reserve = map$3(reserveRaw, makeConection);
|
|
115110
115110
|
const onListenClientError = (_) => {};
|
|
115111
|
-
const listenAcquirer = yield* make$
|
|
115111
|
+
const listenAcquirer = yield* make$45({ acquire: acquireRelease(tryPromise({
|
|
115112
115112
|
try: async () => {
|
|
115113
115113
|
const client = new Client(pool.options);
|
|
115114
115114
|
await client.connect();
|
|
@@ -115121,12 +115121,12 @@ const fromPool = /* @__PURE__ */ fnUntraced(function* (options) {
|
|
|
115121
115121
|
return client.end();
|
|
115122
115122
|
}).pipe(timeoutOption(1e3))) });
|
|
115123
115123
|
let config = {
|
|
115124
|
-
url: pool.options.connectionString ? make$
|
|
115124
|
+
url: pool.options.connectionString ? make$39(pool.options.connectionString) : void 0,
|
|
115125
115125
|
host: pool.options.host,
|
|
115126
115126
|
port: pool.options.port,
|
|
115127
115127
|
database: pool.options.database,
|
|
115128
115128
|
username: pool.options.user,
|
|
115129
|
-
password: typeof pool.options.password === "string" ? make$
|
|
115129
|
+
password: typeof pool.options.password === "string" ? make$39(pool.options.password) : void 0,
|
|
115130
115130
|
ssl: pool.options.ssl,
|
|
115131
115131
|
applicationName: pool.options.application_name,
|
|
115132
115132
|
types: pool.options.types
|
|
@@ -115138,7 +115138,7 @@ const fromPool = /* @__PURE__ */ fnUntraced(function* (options) {
|
|
|
115138
115138
|
host: config.host ?? parsed.host ?? void 0,
|
|
115139
115139
|
port: config.port ?? (parsed.port ? getOrUndefined(parse$6(parsed.port)) : void 0),
|
|
115140
115140
|
username: config.username ?? parsed.user ?? void 0,
|
|
115141
|
-
password: config.password ?? (parsed.password ? make$
|
|
115141
|
+
password: config.password ?? (parsed.password ? make$39(parsed.password) : void 0),
|
|
115142
115142
|
database: config.database ?? parsed.database ?? void 0
|
|
115143
115143
|
};
|
|
115144
115144
|
} catch {}
|
|
@@ -115272,12 +115272,12 @@ const makeCancel = (pool, client) => {
|
|
|
115272
115272
|
* @category layers
|
|
115273
115273
|
* @since 1.0.0
|
|
115274
115274
|
*/
|
|
115275
|
-
const layerFrom = (acquire) => effectContext(map$3(acquire, (client) => make$
|
|
115275
|
+
const layerFrom = (acquire) => effectContext(map$3(acquire, (client) => make$34(PgClient, client).pipe(add$2(SqlClient, client)))).pipe(provide$1(layer$9));
|
|
115276
115276
|
/**
|
|
115277
115277
|
* @category layers
|
|
115278
115278
|
* @since 1.0.0
|
|
115279
115279
|
*/
|
|
115280
|
-
const layer$3 = (config) => layerFrom(make$
|
|
115280
|
+
const layer$3 = (config) => layerFrom(make$13(config));
|
|
115281
115281
|
/**
|
|
115282
115282
|
* @category constructor
|
|
115283
115283
|
* @since 1.0.0
|
|
@@ -115804,7 +115804,7 @@ const CloudStateSyncLive = effectDiscard(gen(function* () {
|
|
|
115804
115804
|
//#region src/persistence/Layers/Postgres.ts
|
|
115805
115805
|
function makePostgresPersistenceLive(config, databaseUrl) {
|
|
115806
115806
|
const client = layer$3({
|
|
115807
|
-
url: make$
|
|
115807
|
+
url: make$39(databaseUrl),
|
|
115808
115808
|
applicationName: "forge-cloud-shell",
|
|
115809
115809
|
connectTimeout: "10 seconds",
|
|
115810
115810
|
idleTimeout: "30 seconds",
|
|
@@ -115830,7 +115830,7 @@ var MigrationError = class extends TaggedError("MigrationError") {};
|
|
|
115830
115830
|
* @category constructor
|
|
115831
115831
|
* @since 4.0.0
|
|
115832
115832
|
*/
|
|
115833
|
-
const make$
|
|
115833
|
+
const make$12 = ({ dumpSchema = () => void_$1 }) => ({ loader, schemaDirectory, table = "effect_sql_migrations" }) => gen(function* () {
|
|
115834
115834
|
const sql = yield* SqlClient;
|
|
115835
115835
|
const ensureMigrationsTable = sql.onDialectOrElse({
|
|
115836
115836
|
mssql: () => sql`IF OBJECT_ID(N'${sql.literal(table)}', N'U') IS NULL
|
|
@@ -115919,7 +115919,7 @@ const make$13 = ({ dumpSchema = () => void_$1 }) => ({ loader, schemaDirectory,
|
|
|
115919
115919
|
if (schemaDirectory && completed.length > 0) yield* dumpSchema(`${schemaDirectory}/_schema.sql`, table).pipe(catchCause((cause) => logInfo("Could not dump schema", cause)));
|
|
115920
115920
|
return completed;
|
|
115921
115921
|
});
|
|
115922
|
-
const migrationOrder = /* @__PURE__ */ make$
|
|
115922
|
+
const migrationOrder = /* @__PURE__ */ make$40(([a], [b]) => Number$2(a, b));
|
|
115923
115923
|
/**
|
|
115924
115924
|
* @since 4.0.0
|
|
115925
115925
|
* @category loaders
|
|
@@ -118909,7 +118909,7 @@ const makeMigrationLoader = (throughId) => fromRecord(Object.fromEntries(migrati
|
|
|
118909
118909
|
* Migrator run function - no schema dumping needed
|
|
118910
118910
|
* Uses the base Migrator.make without platform dependencies
|
|
118911
118911
|
*/
|
|
118912
|
-
const run = make$
|
|
118912
|
+
const run = make$12({});
|
|
118913
118913
|
/**
|
|
118914
118914
|
* Run all pending migrations.
|
|
118915
118915
|
*
|
|
@@ -150143,7 +150143,7 @@ const AnalyticsServiceLayerLive = effect(AnalyticsService, gen(function* () {
|
|
|
150143
150143
|
const httpClient = yield* HttpClient;
|
|
150144
150144
|
const serverConfig = yield* ServerConfig;
|
|
150145
150145
|
const identifier = yield* getTelemetryIdentifier;
|
|
150146
|
-
const bufferRef = yield* make$
|
|
150146
|
+
const bufferRef = yield* make$49([]);
|
|
150147
150147
|
const clientType = serverConfig.mode === "desktop" ? "desktop-app" : "cli-web-client";
|
|
150148
150148
|
const enqueueBufferedEvent = (event, properties) => flatMap(now, (now) => modify$3(bufferRef, (current) => {
|
|
150149
150149
|
const appended = [...current, {
|
|
@@ -150304,7 +150304,7 @@ function formatLoggerMessage(message) {
|
|
|
150304
150304
|
return typeof message === "string" ? message : String(message);
|
|
150305
150305
|
}
|
|
150306
150306
|
function makeLineLogger(streamLabel) {
|
|
150307
|
-
return make$
|
|
150307
|
+
return make$32(({ date, message }) => `[${date.toISOString()}] ${streamLabel}: ${formatLoggerMessage(message)}\n`);
|
|
150308
150308
|
}
|
|
150309
150309
|
function resolveStreamLabel(stream) {
|
|
150310
150310
|
switch (stream) {
|
|
@@ -150365,7 +150365,7 @@ const makeThreadWriter = fn$1("makeThreadWriter")(function* (input) {
|
|
|
150365
150365
|
return;
|
|
150366
150366
|
}
|
|
150367
150367
|
const sink = sinkResult.sink;
|
|
150368
|
-
const scope = yield* make$
|
|
150368
|
+
const scope = yield* make$36();
|
|
150369
150369
|
const loggerLayer = layer$6([yield* batched(makeLineLogger(input.streamLabel), {
|
|
150370
150370
|
window: input.batchWindowMs,
|
|
150371
150371
|
flush: fn$1("makeThreadWriter.flush")(function* (messages) {
|
|
@@ -150420,7 +150420,7 @@ const makeEventNdjsonLogger = fn$1("makeEventNdjsonLogger")(function* (filePath,
|
|
|
150420
150420
|
});
|
|
150421
150421
|
return;
|
|
150422
150422
|
}
|
|
150423
|
-
const stateRef = yield* make$
|
|
150423
|
+
const stateRef = yield* make$31({
|
|
150424
150424
|
threadWriters: /* @__PURE__ */ new Map(),
|
|
150425
150425
|
failedSegments: /* @__PURE__ */ new Set()
|
|
150426
150426
|
});
|
|
@@ -191922,7 +191922,7 @@ var Vce = {
|
|
|
191922
191922
|
function Ve() {
|
|
191923
191923
|
return Vce;
|
|
191924
191924
|
}
|
|
191925
|
-
var Us =
|
|
191925
|
+
var Us = os.homedir(), lk = os.tmpdir(), { env: Vc } = process$1, Yce = (e) => {
|
|
191926
191926
|
let t = path.join(Us, "Library");
|
|
191927
191927
|
return {
|
|
191928
191928
|
data: path.join(t, "Application Support", e),
|
|
@@ -202122,12 +202122,12 @@ function qZ(e, t) {
|
|
|
202122
202122
|
}
|
|
202123
202123
|
return n;
|
|
202124
202124
|
}
|
|
202125
|
-
var os$
|
|
202125
|
+
var os$2 = "https://code.claude.com/docs/en", kKe = [
|
|
202126
202126
|
{
|
|
202127
202127
|
matches: (e) => e.path === "permissions.defaultMode" && e.code === "invalid_value",
|
|
202128
202128
|
tip: {
|
|
202129
202129
|
suggestion: "Valid modes: \"acceptEdits\" (ask before file changes), \"plan\" (analysis only), \"bypassPermissions\" (auto-accept all), or \"default\" (standard behavior)",
|
|
202130
|
-
docLink: `${os$
|
|
202130
|
+
docLink: `${os$2}/iam#permission-modes`
|
|
202131
202131
|
}
|
|
202132
202132
|
},
|
|
202133
202133
|
{
|
|
@@ -202142,7 +202142,7 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202142
202142
|
matches: (e) => e.path.startsWith("env.") && e.code === "invalid_type",
|
|
202143
202143
|
tip: {
|
|
202144
202144
|
suggestion: "Environment variables must be strings. Wrap numbers and booleans in quotes. Example: \"DEBUG\": \"true\", \"PORT\": \"3000\"",
|
|
202145
|
-
docLink: `${os$
|
|
202145
|
+
docLink: `${os$2}/settings#environment-variables`
|
|
202146
202146
|
}
|
|
202147
202147
|
},
|
|
202148
202148
|
{
|
|
@@ -202153,14 +202153,14 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202153
202153
|
matches: (e) => e.path.startsWith("hooks.") && e.code === "invalid_key",
|
|
202154
202154
|
tip: {
|
|
202155
202155
|
suggestion: "Not a recognized hook event. Common events: PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, Stop. Check spelling and capitalization.",
|
|
202156
|
-
docLink: `${os$
|
|
202156
|
+
docLink: `${os$2}/hooks`
|
|
202157
202157
|
}
|
|
202158
202158
|
},
|
|
202159
202159
|
{
|
|
202160
202160
|
matches: (e) => /\.hooks\.\d+\.command$/.test(e.path) && e.code === "invalid_type" && e.received === "undefined",
|
|
202161
202161
|
tip: {
|
|
202162
202162
|
suggestion: "Command hooks require `command`. For exec form (no shell), set `command` to the executable and `args` to its arguments: {\"type\": \"command\", \"command\": \"echo\", \"args\": [\"hi\"]}. For shell form, set `command` to the full shell string: {\"type\": \"command\", \"command\": \"echo hi\"}.",
|
|
202163
|
-
docLink: `${os$
|
|
202163
|
+
docLink: `${os$2}/hooks#exec-form-and-shell-form`
|
|
202164
202164
|
}
|
|
202165
202165
|
},
|
|
202166
202166
|
{
|
|
@@ -202175,7 +202175,7 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202175
202175
|
matches: (e) => e.code === "unrecognized_keys",
|
|
202176
202176
|
tip: {
|
|
202177
202177
|
suggestion: "Check for typos or refer to the documentation for valid fields",
|
|
202178
|
-
docLink: `${os$
|
|
202178
|
+
docLink: `${os$2}/settings`
|
|
202179
202179
|
}
|
|
202180
202180
|
},
|
|
202181
202181
|
{
|
|
@@ -202190,13 +202190,13 @@ var os$1 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202190
202190
|
matches: (e) => e.path === "permissions.additionalDirectories" && e.code === "invalid_type",
|
|
202191
202191
|
tip: {
|
|
202192
202192
|
suggestion: "Must be an array of directory paths. Example: [\"~/projects\", \"/tmp/workspace\"]. You can also use --add-dir flag or /add-dir command",
|
|
202193
|
-
docLink: `${os$
|
|
202193
|
+
docLink: `${os$2}/iam#working-directories`
|
|
202194
202194
|
}
|
|
202195
202195
|
}
|
|
202196
202196
|
], AKe = {
|
|
202197
|
-
permissions: `${os$
|
|
202198
|
-
env: `${os$
|
|
202199
|
-
hooks: `${os$
|
|
202197
|
+
permissions: `${os$2}/iam#configuring-permissions`,
|
|
202198
|
+
env: `${os$2}/settings#environment-variables`,
|
|
202199
|
+
hooks: `${os$2}/hooks`
|
|
202200
202200
|
};
|
|
202201
202201
|
function GZ(e) {
|
|
202202
202202
|
let t = kKe.find((r) => r.matches(e));
|
|
@@ -212275,7 +212275,7 @@ const MODEL_LIST_PROBE_TIMEOUT_MS = 5e3;
|
|
|
212275
212275
|
const probeCliModels = (input) => gen(function* () {
|
|
212276
212276
|
const useShell = process.platform === "win32";
|
|
212277
212277
|
if (useShell && !isShellSafeCommandPath(input.binaryPath)) return;
|
|
212278
|
-
const command = make$
|
|
212278
|
+
const command = make$47(input.binaryPath, [...input.args], {
|
|
212279
212279
|
shell: useShell,
|
|
212280
212280
|
env: scrubForgeProviderChildEnvSecrets(process.env)
|
|
212281
212281
|
});
|
|
@@ -214374,11 +214374,11 @@ async function runClaudeCommand$1(execFileImpl, binaryPath, args, env) {
|
|
|
214374
214374
|
//#endregion
|
|
214375
214375
|
//#region src/provider/makeManagedServerProvider.ts
|
|
214376
214376
|
const makeManagedServerProvider = fn$1("makeManagedServerProvider")(function* (input) {
|
|
214377
|
-
const refreshSemaphore = yield* make$
|
|
214377
|
+
const refreshSemaphore = yield* make$43(1);
|
|
214378
214378
|
const changesPubSub = yield* acquireRelease(unbounded$1(), shutdown$2);
|
|
214379
214379
|
const initialSettings = yield* input.getSettings;
|
|
214380
|
-
const snapshotRef = yield* make$
|
|
214381
|
-
const settingsRef = yield* make$
|
|
214380
|
+
const snapshotRef = yield* make$49(input.initialSnapshot(initialSettings));
|
|
214381
|
+
const settingsRef = yield* make$49(initialSettings);
|
|
214382
214382
|
const applySnapshotBase = fn$1("applySnapshot")(function* (nextSettings, options) {
|
|
214383
214383
|
const forceRefresh = options?.forceRefresh === true;
|
|
214384
214384
|
const previousSettings = yield* get$6(settingsRef);
|
|
@@ -214397,10 +214397,10 @@ const makeManagedServerProvider = fn$1("makeManagedServerProvider")(function* (i
|
|
|
214397
214397
|
return yield* applySnapshot(yield* input.getSettings, { forceRefresh: true });
|
|
214398
214398
|
});
|
|
214399
214399
|
yield* runForEach(input.streamSettings, (nextSettings) => asVoid(applySnapshot(nextSettings))).pipe(forkScoped);
|
|
214400
|
-
const refreshFailureCount = yield* make$
|
|
214400
|
+
const refreshFailureCount = yield* make$49(0);
|
|
214401
214401
|
const QUICK_RETRY_MS = 5e3;
|
|
214402
214402
|
const MAX_QUICK_RETRIES = 3;
|
|
214403
|
-
const quickRetriesSoFar = yield* make$
|
|
214403
|
+
const quickRetriesSoFar = yield* make$49(0);
|
|
214404
214404
|
yield* forever$1(gen(function* () {
|
|
214405
214405
|
const failureCount = yield* get$6(refreshFailureCount);
|
|
214406
214406
|
const quickRetriesDone = yield* get$6(quickRetriesSoFar);
|
|
@@ -214695,7 +214695,7 @@ function makeClaudeCredentialAnswersResolver(options) {
|
|
|
214695
214695
|
*/
|
|
214696
214696
|
function runSupervisedRepeat(input) {
|
|
214697
214697
|
return gen(function* () {
|
|
214698
|
-
const shutdownSignal = yield* make$
|
|
214698
|
+
const shutdownSignal = yield* make$38();
|
|
214699
214699
|
yield* addFinalizer$2(() => succeed$3(shutdownSignal, void 0));
|
|
214700
214700
|
let firstAttempt = true;
|
|
214701
214701
|
while (true) {
|
|
@@ -215160,7 +215160,7 @@ const runClaudeCommand = fn$1("runClaudeCommand")(function* (args) {
|
|
|
215160
215160
|
}));
|
|
215161
215161
|
const claudeSettings = yield* service(ServerSettingsService).pipe(flatMap((service) => service.getSettings), map$3((settings) => settings.providers.claudeAgent));
|
|
215162
215162
|
const effectiveConfigPath = claudeSettings.configPath || config.forgeClaudeConfigPath || process.env.CLAUDE_CONFIG_DIR || void 0;
|
|
215163
|
-
const command = make$
|
|
215163
|
+
const command = make$47(claudeSettings.binaryPath, [...args], {
|
|
215164
215164
|
shell: process.platform === "win32",
|
|
215165
215165
|
env: scrubForgeProviderChildEnvSecrets({
|
|
215166
215166
|
...process.env,
|
|
@@ -218339,7 +218339,7 @@ const makeClaudeAdapter = fn$1("makeClaudeAdapter")(function* (options) {
|
|
|
218339
218339
|
const handleAskUserQuestion = fn$1("handleAskUserQuestion")(function* (context, toolInput, callbackOptions, pendingUserInputs, runFork) {
|
|
218340
218340
|
const requestId = ApprovalRequestId.make(yield* nextUUIDv4);
|
|
218341
218341
|
const questions = userInputQuestionsFromToolInput(toolInput);
|
|
218342
|
-
const answersDeferred = yield* make$
|
|
218342
|
+
const answersDeferred = yield* make$38();
|
|
218343
218343
|
let aborted = false;
|
|
218344
218344
|
const requestedStamp = yield* makeEventStamp();
|
|
218345
218345
|
yield* offerRuntimeEvent({
|
|
@@ -218427,7 +218427,7 @@ const makeClaudeAdapter = fn$1("makeClaudeAdapter")(function* (options) {
|
|
|
218427
218427
|
const requestId = ApprovalRequestId.make(yield* nextUUIDv4);
|
|
218428
218428
|
const requestType = classifyRequestType(toolName);
|
|
218429
218429
|
const detail = summarizeToolRequest(toolName, toolInput);
|
|
218430
|
-
const decisionDeferred = yield* make$
|
|
218430
|
+
const decisionDeferred = yield* make$38();
|
|
218431
218431
|
const pendingApproval = {
|
|
218432
218432
|
requestType,
|
|
218433
218433
|
detail,
|
|
@@ -218697,7 +218697,7 @@ const makeClaudeAdapter = fn$1("makeClaudeAdapter")(function* (options) {
|
|
|
218697
218697
|
const pendingApprovals = /* @__PURE__ */ new Map();
|
|
218698
218698
|
const pendingUserInputs = /* @__PURE__ */ new Map();
|
|
218699
218699
|
const inFlightTools = /* @__PURE__ */ new Map();
|
|
218700
|
-
const contextRef = yield* make$
|
|
218700
|
+
const contextRef = yield* make$49(void 0);
|
|
218701
218701
|
const canUseTool = makeCanUseTool(contextRef, input.runtimeMode, pendingApprovals, pendingUserInputs, runFork, runPromise);
|
|
218702
218702
|
const serverSettings = yield* serverSettingsService.getSettings.pipe(mapError((error) => new ProviderAdapterProcessError({
|
|
218703
218703
|
provider: PROVIDER$11,
|
|
@@ -223001,9 +223001,9 @@ const makeAcpPatchedProtocol = fn$1("makeAcpPatchedProtocol")(function* (options
|
|
|
223001
223001
|
const notificationQueue = yield* sliding(1024);
|
|
223002
223002
|
const disconnects = yield* unbounded$2();
|
|
223003
223003
|
const outgoing = yield* unbounded$2();
|
|
223004
|
-
const nextRequestId = yield* make$
|
|
223005
|
-
const terminationHandled = yield* make$
|
|
223006
|
-
const extPending = yield* make$
|
|
223004
|
+
const nextRequestId = yield* make$49(1n);
|
|
223005
|
+
const terminationHandled = yield* make$49(false);
|
|
223006
|
+
const extPending = yield* make$49(/* @__PURE__ */ new Map());
|
|
223007
223007
|
const logProtocol = (event) => {
|
|
223008
223008
|
if (event.direction === "incoming" && !options.logIncoming) return void_$1;
|
|
223009
223009
|
if (event.direction === "outgoing" && !options.logOutgoing) return void_$1;
|
|
@@ -223209,7 +223209,7 @@ const makeAcpPatchedProtocol = fn$1("makeAcpPatchedProtocol")(function* (options
|
|
|
223209
223209
|
},
|
|
223210
223210
|
request: fn$1("sendRequest")(function* (method, payload) {
|
|
223211
223211
|
const requestId = yield* modify$3(nextRequestId, (current) => [current, current + 1n]);
|
|
223212
|
-
const deferred = yield* make$
|
|
223212
|
+
const deferred = yield* make$38();
|
|
223213
223213
|
yield* update$4(extPending, (pending) => new Map(pending).set(String(requestId), deferred));
|
|
223214
223214
|
yield* offerOutgoing({
|
|
223215
223215
|
_tag: "Request",
|
|
@@ -223237,113 +223237,113 @@ function toRpcClientError(error) {
|
|
|
223237
223237
|
}
|
|
223238
223238
|
//#endregion
|
|
223239
223239
|
//#region ../../packages/effect-acp/src/rpc.ts
|
|
223240
|
-
const InitializeRpc = make$
|
|
223240
|
+
const InitializeRpc = make$29(AGENT_METHODS.initialize, {
|
|
223241
223241
|
payload: InitializeRequest,
|
|
223242
223242
|
success: InitializeResponse,
|
|
223243
223243
|
error: Error$1
|
|
223244
223244
|
});
|
|
223245
|
-
const AuthenticateRpc = make$
|
|
223245
|
+
const AuthenticateRpc = make$29(AGENT_METHODS.authenticate, {
|
|
223246
223246
|
payload: AuthenticateRequest,
|
|
223247
223247
|
success: AuthenticateResponse,
|
|
223248
223248
|
error: Error$1
|
|
223249
223249
|
});
|
|
223250
|
-
const LogoutRpc = make$
|
|
223250
|
+
const LogoutRpc = make$29(AGENT_METHODS.logout, {
|
|
223251
223251
|
payload: LogoutRequest,
|
|
223252
223252
|
success: LogoutResponse,
|
|
223253
223253
|
error: Error$1
|
|
223254
223254
|
});
|
|
223255
|
-
const NewSessionRpc = make$
|
|
223255
|
+
const NewSessionRpc = make$29(AGENT_METHODS.session_new, {
|
|
223256
223256
|
payload: NewSessionRequest,
|
|
223257
223257
|
success: NewSessionResponse,
|
|
223258
223258
|
error: Error$1
|
|
223259
223259
|
});
|
|
223260
|
-
const LoadSessionRpc = make$
|
|
223260
|
+
const LoadSessionRpc = make$29(AGENT_METHODS.session_load, {
|
|
223261
223261
|
payload: LoadSessionRequest,
|
|
223262
223262
|
success: LoadSessionResponse,
|
|
223263
223263
|
error: Error$1
|
|
223264
223264
|
});
|
|
223265
|
-
const ListSessionsRpc = make$
|
|
223265
|
+
const ListSessionsRpc = make$29(AGENT_METHODS.session_list, {
|
|
223266
223266
|
payload: ListSessionsRequest,
|
|
223267
223267
|
success: ListSessionsResponse,
|
|
223268
223268
|
error: Error$1
|
|
223269
223269
|
});
|
|
223270
|
-
const ForkSessionRpc = make$
|
|
223270
|
+
const ForkSessionRpc = make$29(AGENT_METHODS.session_fork, {
|
|
223271
223271
|
payload: ForkSessionRequest,
|
|
223272
223272
|
success: ForkSessionResponse,
|
|
223273
223273
|
error: Error$1
|
|
223274
223274
|
});
|
|
223275
|
-
const ResumeSessionRpc = make$
|
|
223275
|
+
const ResumeSessionRpc = make$29(AGENT_METHODS.session_resume, {
|
|
223276
223276
|
payload: ResumeSessionRequest,
|
|
223277
223277
|
success: ResumeSessionResponse,
|
|
223278
223278
|
error: Error$1
|
|
223279
223279
|
});
|
|
223280
|
-
const CloseSessionRpc = make$
|
|
223280
|
+
const CloseSessionRpc = make$29(AGENT_METHODS.session_close, {
|
|
223281
223281
|
payload: CloseSessionRequest,
|
|
223282
223282
|
success: CloseSessionResponse,
|
|
223283
223283
|
error: Error$1
|
|
223284
223284
|
});
|
|
223285
|
-
const PromptRpc = make$
|
|
223285
|
+
const PromptRpc = make$29(AGENT_METHODS.session_prompt, {
|
|
223286
223286
|
payload: PromptRequest,
|
|
223287
223287
|
success: PromptResponse,
|
|
223288
223288
|
error: Error$1
|
|
223289
223289
|
});
|
|
223290
|
-
const SetSessionModelRpc = make$
|
|
223290
|
+
const SetSessionModelRpc = make$29(AGENT_METHODS.session_set_model, {
|
|
223291
223291
|
payload: SetSessionModelRequest,
|
|
223292
223292
|
success: SetSessionModelResponse,
|
|
223293
223293
|
error: Error$1
|
|
223294
223294
|
});
|
|
223295
|
-
const SetSessionConfigOptionRpc = make$
|
|
223295
|
+
const SetSessionConfigOptionRpc = make$29(AGENT_METHODS.session_set_config_option, {
|
|
223296
223296
|
payload: SetSessionConfigOptionRequest,
|
|
223297
223297
|
success: SetSessionConfigOptionResponse,
|
|
223298
223298
|
error: Error$1
|
|
223299
223299
|
});
|
|
223300
|
-
const ReadTextFileRpc = make$
|
|
223300
|
+
const ReadTextFileRpc = make$29(CLIENT_METHODS.fs_read_text_file, {
|
|
223301
223301
|
payload: ReadTextFileRequest,
|
|
223302
223302
|
success: ReadTextFileResponse,
|
|
223303
223303
|
error: Error$1
|
|
223304
223304
|
});
|
|
223305
|
-
const WriteTextFileRpc = make$
|
|
223305
|
+
const WriteTextFileRpc = make$29(CLIENT_METHODS.fs_write_text_file, {
|
|
223306
223306
|
payload: WriteTextFileRequest,
|
|
223307
223307
|
success: WriteTextFileResponse,
|
|
223308
223308
|
error: Error$1
|
|
223309
223309
|
});
|
|
223310
|
-
const RequestPermissionRpc = make$
|
|
223310
|
+
const RequestPermissionRpc = make$29(CLIENT_METHODS.session_request_permission, {
|
|
223311
223311
|
payload: RequestPermissionRequest,
|
|
223312
223312
|
success: RequestPermissionResponse,
|
|
223313
223313
|
error: Error$1
|
|
223314
223314
|
});
|
|
223315
|
-
const ElicitationRpc = make$
|
|
223315
|
+
const ElicitationRpc = make$29(CLIENT_METHODS.session_elicitation, {
|
|
223316
223316
|
payload: ElicitationRequest,
|
|
223317
223317
|
success: ElicitationResponse,
|
|
223318
223318
|
error: Error$1
|
|
223319
223319
|
});
|
|
223320
|
-
const CreateTerminalRpc = make$
|
|
223320
|
+
const CreateTerminalRpc = make$29(CLIENT_METHODS.terminal_create, {
|
|
223321
223321
|
payload: CreateTerminalRequest,
|
|
223322
223322
|
success: CreateTerminalResponse,
|
|
223323
223323
|
error: Error$1
|
|
223324
223324
|
});
|
|
223325
|
-
const TerminalOutputRpc = make$
|
|
223325
|
+
const TerminalOutputRpc = make$29(CLIENT_METHODS.terminal_output, {
|
|
223326
223326
|
payload: TerminalOutputRequest,
|
|
223327
223327
|
success: TerminalOutputResponse,
|
|
223328
223328
|
error: Error$1
|
|
223329
223329
|
});
|
|
223330
|
-
const ReleaseTerminalRpc = make$
|
|
223330
|
+
const ReleaseTerminalRpc = make$29(CLIENT_METHODS.terminal_release, {
|
|
223331
223331
|
payload: ReleaseTerminalRequest,
|
|
223332
223332
|
success: ReleaseTerminalResponse,
|
|
223333
223333
|
error: Error$1
|
|
223334
223334
|
});
|
|
223335
|
-
const WaitForTerminalExitRpc = make$
|
|
223335
|
+
const WaitForTerminalExitRpc = make$29(CLIENT_METHODS.terminal_wait_for_exit, {
|
|
223336
223336
|
payload: WaitForTerminalExitRequest,
|
|
223337
223337
|
success: WaitForTerminalExitResponse,
|
|
223338
223338
|
error: Error$1
|
|
223339
223339
|
});
|
|
223340
|
-
const KillTerminalRpc = make$
|
|
223340
|
+
const KillTerminalRpc = make$29(CLIENT_METHODS.terminal_kill, {
|
|
223341
223341
|
payload: KillTerminalRequest,
|
|
223342
223342
|
success: KillTerminalResponse,
|
|
223343
223343
|
error: Error$1
|
|
223344
223344
|
});
|
|
223345
|
-
const AgentRpcs = make$
|
|
223346
|
-
const ClientRpcs = make$
|
|
223345
|
+
const AgentRpcs = make$28(InitializeRpc, AuthenticateRpc, LogoutRpc, NewSessionRpc, LoadSessionRpc, ListSessionsRpc, ForkSessionRpc, ResumeSessionRpc, CloseSessionRpc, PromptRpc, SetSessionModelRpc, SetSessionConfigOptionRpc);
|
|
223346
|
+
const ClientRpcs = make$28(ReadTextFileRpc, WriteTextFileRpc, RequestPermissionRpc, ElicitationRpc, CreateTerminalRpc, TerminalOutputRpc, ReleaseTerminalRpc, WaitForTerminalExitRpc, KillTerminalRpc);
|
|
223347
223347
|
//#endregion
|
|
223348
223348
|
//#region ../../packages/effect-acp/src/_internal/shared.ts
|
|
223349
223349
|
const isError = is$1(Error$1);
|
|
@@ -223372,7 +223372,7 @@ ArraySchema(Unknown);
|
|
|
223372
223372
|
//#endregion
|
|
223373
223373
|
//#region ../../packages/effect-acp/src/_internal/stdio.ts
|
|
223374
223374
|
const encoder$1 = new TextEncoder();
|
|
223375
|
-
const makeChildStdio = (handle) => make$
|
|
223375
|
+
const makeChildStdio = (handle) => make$48({
|
|
223376
223376
|
args: succeed([]),
|
|
223377
223377
|
stdin: handle.stdout,
|
|
223378
223378
|
stdout: () => mapInput(handle.stdin, (chunk) => typeof chunk === "string" ? encoder$1.encode(chunk) : chunk),
|
|
@@ -223383,7 +223383,7 @@ fn$1("makeInMemoryStdio")(function* () {
|
|
|
223383
223383
|
const output = yield* unbounded$2();
|
|
223384
223384
|
const decoder = new TextDecoder();
|
|
223385
223385
|
return {
|
|
223386
|
-
stdio: make$
|
|
223386
|
+
stdio: make$48({
|
|
223387
223387
|
args: succeed([]),
|
|
223388
223388
|
stdin: fromQueue(input),
|
|
223389
223389
|
stdout: () => forEach$1((chunk) => offer$1(output, typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true }))),
|
|
@@ -223406,7 +223406,7 @@ function runNotificationHandlers(registration, notification) {
|
|
|
223406
223406
|
return forEach(registration.handlers, (handler) => handler(notification).pipe(catch_(() => void_$1)), { discard: true });
|
|
223407
223407
|
}
|
|
223408
223408
|
var AcpClient = class extends Service$1()("effect-acp/AcpClient") {};
|
|
223409
|
-
const make$
|
|
223409
|
+
const make$11 = fn$1("effect-acp/AcpClient.make")(function* (stdio, options = {}, terminationError) {
|
|
223410
223410
|
const coreHandlers = {};
|
|
223411
223411
|
const notificationHandlers = {
|
|
223412
223412
|
sessionUpdate: {
|
|
@@ -223473,9 +223473,9 @@ const make$12 = fn$1("effect-acp/AcpClient.make")(function* (stdio, options = {}
|
|
|
223473
223473
|
[CLIENT_METHODS.terminal_kill]: (payload) => runHandler(coreHandlers.terminalKill, payload, CLIENT_METHODS.terminal_kill).pipe(map$3((result) => result ?? {})),
|
|
223474
223474
|
[CLIENT_METHODS.terminal_release]: (payload) => runHandler(coreHandlers.terminalRelease, payload, CLIENT_METHODS.terminal_release).pipe(map$3((result) => result ?? {}))
|
|
223475
223475
|
}));
|
|
223476
|
-
yield* make$
|
|
223476
|
+
yield* make$23(ClientRpcs).pipe(provideService(Protocol, transport.serverProtocol), provide(clientHandlerLayer), forkScoped);
|
|
223477
223477
|
let nextRpcRequestId = 1n << 32n;
|
|
223478
|
-
const rpc = yield* make$
|
|
223478
|
+
const rpc = yield* make$24(AgentRpcs, { generateRequestId: () => nextRpcRequestId++ }).pipe(provideService(Protocol$1, transport.clientProtocol));
|
|
223479
223479
|
return AcpClient.of({
|
|
223480
223480
|
raw: {
|
|
223481
223481
|
notifications: transport.incoming,
|
|
@@ -223560,7 +223560,7 @@ const make$12 = fn$1("effect-acp/AcpClient.make")(function* (stdio, options = {}
|
|
|
223560
223560
|
});
|
|
223561
223561
|
});
|
|
223562
223562
|
const layerChildProcess = (handle, options = {}) => {
|
|
223563
|
-
return effect(AcpClient, make$
|
|
223563
|
+
return effect(AcpClient, make$11(makeChildStdio(handle), options, makeTerminationError(handle)));
|
|
223564
223564
|
};
|
|
223565
223565
|
//#endregion
|
|
223566
223566
|
//#region src/provider/acp/AcpSessionRuntime.ts
|
|
@@ -223602,11 +223602,11 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
|
|
|
223602
223602
|
const spawner = yield* ChildProcessSpawner;
|
|
223603
223603
|
const runtimeScope = yield* Scope$1;
|
|
223604
223604
|
const eventQueue = yield* unbounded$2();
|
|
223605
|
-
const modeStateRef = yield* make$
|
|
223606
|
-
const toolCallsRef = yield* make$
|
|
223607
|
-
const assistantSegmentRef = yield* make$
|
|
223608
|
-
const configOptionsRef = yield* make$
|
|
223609
|
-
const startStateRef = yield* make$
|
|
223605
|
+
const modeStateRef = yield* make$49(void 0);
|
|
223606
|
+
const toolCallsRef = yield* make$49(/* @__PURE__ */ new Map());
|
|
223607
|
+
const assistantSegmentRef = yield* make$49({ nextSegmentIndex: 0 });
|
|
223608
|
+
const configOptionsRef = yield* make$49(sessionConfigOptionsFromSetup(void 0));
|
|
223609
|
+
const startStateRef = yield* make$49({ _tag: "NotStarted" });
|
|
223610
223610
|
const logRequest = (event) => options.requestLogger ? options.requestLogger(event) : void_$1;
|
|
223611
223611
|
const runLoggedRequest = (method, payload, effect) => logRequest({
|
|
223612
223612
|
method,
|
|
@@ -223628,7 +223628,7 @@ const makeAcpSessionRuntime = (options) => gen(function* () {
|
|
|
223628
223628
|
command: options.spawn.command,
|
|
223629
223629
|
cause: /* @__PURE__ */ new Error(`Refusing to spawn ACP child process: command path contains shell metacharacters that cmd.exe would interpret as additional commands. Adjust the provider \`binaryPath\` setting to an unquoted absolute path.`)
|
|
223630
223630
|
});
|
|
223631
|
-
const acpContext = yield* build(layerChildProcess(yield* spawner.spawn(make$
|
|
223631
|
+
const acpContext = yield* build(layerChildProcess(yield* spawner.spawn(make$47(options.spawn.command, [...options.spawn.args], {
|
|
223632
223632
|
...options.spawn.cwd ? { cwd: options.spawn.cwd } : {},
|
|
223633
223633
|
env: scrubForgeProviderChildEnvSecrets({
|
|
223634
223634
|
...process.env,
|
|
@@ -223960,7 +223960,7 @@ const makeStartCoordinator = (startStateRef, startOnce) => gen(function* () {
|
|
|
223960
223960
|
const currentState = yield* get$6(startStateRef);
|
|
223961
223961
|
if (currentState._tag === "Started") return currentState.result;
|
|
223962
223962
|
if (currentState._tag === "Starting") return yield* _await(currentState.deferred);
|
|
223963
|
-
const deferred = yield* make$
|
|
223963
|
+
const deferred = yield* make$38();
|
|
223964
223964
|
return yield* yield* modify$3(startStateRef, (state) => {
|
|
223965
223965
|
switch (state._tag) {
|
|
223966
223966
|
case "Started": return [succeed(state.result), state];
|
|
@@ -224082,7 +224082,7 @@ const readCursorApiKey = (_settings) => process.env.CURSOR_API_KEY || null;
|
|
|
224082
224082
|
const runCursorCommand = fn$1("runCursorCommand")(function* (binaryPath, args) {
|
|
224083
224083
|
const useShell = process.platform === "win32";
|
|
224084
224084
|
if (useShell && !isShellSafeCommandPath(binaryPath)) return yield* fail(/* @__PURE__ */ new Error(`Refusing to spawn cursor-agent: \`binaryPath\` contains shell metacharacters that cmd.exe would interpret as additional commands.`));
|
|
224085
|
-
return yield* spawnAndCollect(binaryPath, make$
|
|
224085
|
+
return yield* spawnAndCollect(binaryPath, make$47(binaryPath, [...args], {
|
|
224086
224086
|
shell: useShell,
|
|
224087
224087
|
env: scrubForgeProviderChildEnvSecrets(process.env)
|
|
224088
224088
|
}));
|
|
@@ -224668,7 +224668,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
224668
224668
|
const nativeEventLogger = options?.nativeEventLogger ?? (options?.nativeEventLogPath !== void 0 ? yield* makeEventNdjsonLogger(options.nativeEventLogPath, { stream: "native" }) : void 0);
|
|
224669
224669
|
const managedNativeEventLogger = options?.nativeEventLogger === void 0 ? nativeEventLogger : void 0;
|
|
224670
224670
|
const sessions = /* @__PURE__ */ new Map();
|
|
224671
|
-
const threadLocksRef = yield* make$
|
|
224671
|
+
const threadLocksRef = yield* make$31(/* @__PURE__ */ new Map());
|
|
224672
224672
|
const runtimeEventPubSub = yield* unbounded$1();
|
|
224673
224673
|
const nowIso = map$3(now, formatIso);
|
|
224674
224674
|
const nextEventId = map$3(nextUUIDv4, (id) => EventId.make(id));
|
|
@@ -224679,7 +224679,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
224679
224679
|
const offerRuntimeEvent = (event) => publish(runtimeEventPubSub, event).pipe(asVoid);
|
|
224680
224680
|
const getThreadSemaphore = (threadId) => modifyEffect(threadLocksRef, (current) => {
|
|
224681
224681
|
return match(fromNullishOr(current.get(threadId)), {
|
|
224682
|
-
onNone: () => make$
|
|
224682
|
+
onNone: () => make$43(1).pipe(map$3((semaphore) => {
|
|
224683
224683
|
const next = new Map(current);
|
|
224684
224684
|
next.set(threadId, semaphore);
|
|
224685
224685
|
return [semaphore, next];
|
|
@@ -224760,7 +224760,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
224760
224760
|
if (existing && !existing.stopped) yield* stopSessionInternal(existing);
|
|
224761
224761
|
const pendingApprovals = /* @__PURE__ */ new Map();
|
|
224762
224762
|
const pendingUserInputs = /* @__PURE__ */ new Map();
|
|
224763
|
-
const sessionScope = yield* make$
|
|
224763
|
+
const sessionScope = yield* make$36("sequential");
|
|
224764
224764
|
let sessionScopeTransferred = false;
|
|
224765
224765
|
yield* addFinalizer$2(() => sessionScopeTransferred ? void_$1 : close(sessionScope, void_$3));
|
|
224766
224766
|
let ctx;
|
|
@@ -224794,7 +224794,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
224794
224794
|
yield* logNative(input.threadId, "cursor/ask_question", params, "acp.cursor.extension");
|
|
224795
224795
|
const requestId = ApprovalRequestId.make(crypto.randomUUID());
|
|
224796
224796
|
const runtimeRequestId = RuntimeRequestId.make(requestId);
|
|
224797
|
-
const answers = yield* make$
|
|
224797
|
+
const answers = yield* make$38();
|
|
224798
224798
|
pendingUserInputs.set(requestId, { answers });
|
|
224799
224799
|
yield* offerRuntimeEvent({
|
|
224800
224800
|
type: "user-input.requested",
|
|
@@ -224856,7 +224856,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
224856
224856
|
const permissionRequest = parsePermissionRequest(params);
|
|
224857
224857
|
const requestId = ApprovalRequestId.make(crypto.randomUUID());
|
|
224858
224858
|
const runtimeRequestId = RuntimeRequestId.make(requestId);
|
|
224859
|
-
const decision = yield* make$
|
|
224859
|
+
const decision = yield* make$38();
|
|
224860
224860
|
pendingApprovals.set(requestId, {
|
|
224861
224861
|
decision,
|
|
224862
224862
|
kind: permissionRequest.kind
|
|
@@ -231904,7 +231904,7 @@ const makeOpenCodeRuntime = gen(function* () {
|
|
|
231904
231904
|
const netService = yield* NetService;
|
|
231905
231905
|
const runOpenCodeCommand = (input) => gen(function* () {
|
|
231906
231906
|
yield* rejectUnsafeWindowsBinaryPath("runOpenCodeCommand", input.binaryPath);
|
|
231907
|
-
const child = yield* spawner.spawn(make$
|
|
231907
|
+
const child = yield* spawner.spawn(make$47(input.binaryPath, [...input.args], {
|
|
231908
231908
|
shell: process.platform === "win32",
|
|
231909
231909
|
env: input.environment ?? process.env
|
|
231910
231910
|
}));
|
|
@@ -231939,7 +231939,7 @@ const makeOpenCodeRuntime = gen(function* () {
|
|
|
231939
231939
|
`--hostname=${hostname}`,
|
|
231940
231940
|
`--port=${port}`
|
|
231941
231941
|
];
|
|
231942
|
-
const child = yield* spawner.spawn(make$
|
|
231942
|
+
const child = yield* spawner.spawn(make$47(input.binaryPath, args, {
|
|
231943
231943
|
detached: process.platform !== "win32",
|
|
231944
231944
|
shell: process.platform === "win32",
|
|
231945
231945
|
env: {
|
|
@@ -231960,9 +231960,9 @@ const makeOpenCodeRuntime = gen(function* () {
|
|
|
231960
231960
|
} catch {}
|
|
231961
231961
|
});
|
|
231962
231962
|
yield* addFinalizer$1(runtimeScope, killOpenCodeProcessGroup("SIGTERM").pipe(andThen(sleep$4("1 second")), andThen(killOpenCodeProcessGroup("SIGKILL")), ignore));
|
|
231963
|
-
const stdoutRef = yield* make$
|
|
231964
|
-
const stderrRef = yield* make$
|
|
231965
|
-
const readyDeferred = yield* make$
|
|
231963
|
+
const stdoutRef = yield* make$49("");
|
|
231964
|
+
const stderrRef = yield* make$49("");
|
|
231965
|
+
const readyDeferred = yield* make$38();
|
|
231966
231966
|
const setReadyFromStdoutChunk = (chunk) => updateAndGet(stdoutRef, (stdout) => `${stdout}${chunk}`).pipe(flatMap((nextStdout) => {
|
|
231967
231967
|
const parsed = parseServerUrlFromOutput(nextStdout);
|
|
231968
231968
|
return parsed ? succeed$3(readyDeferred, parsed).pipe(ignore) : void_$1;
|
|
@@ -232220,7 +232220,7 @@ function classifyGlobalEventEnvelope(envelope) {
|
|
|
232220
232220
|
payload
|
|
232221
232221
|
};
|
|
232222
232222
|
}
|
|
232223
|
-
const isoFromEpochMs = (value) => make$
|
|
232223
|
+
const isoFromEpochMs = (value) => make$37(value).pipe(match({
|
|
232224
232224
|
onNone: () => void 0,
|
|
232225
232225
|
onSome: formatIso
|
|
232226
232226
|
}));
|
|
@@ -232653,7 +232653,7 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
232653
232653
|
sessions.delete(input.threadId);
|
|
232654
232654
|
}
|
|
232655
232655
|
const started = yield* gen(function* () {
|
|
232656
|
-
const sessionScope = yield* make$
|
|
232656
|
+
const sessionScope = yield* make$36();
|
|
232657
232657
|
const startedExit = yield* exit(gen(function* () {
|
|
232658
232658
|
const server = yield* openCodeRuntime.connectToOpenCodeServer({
|
|
232659
232659
|
binaryPath,
|
|
@@ -232720,7 +232720,7 @@ function makeOpenCodeAdapter(openCodeSettings, options) {
|
|
|
232720
232720
|
activeTurnId: void 0,
|
|
232721
232721
|
activeAgent: void 0,
|
|
232722
232722
|
activeVariant: void 0,
|
|
232723
|
-
stopped: yield* make$
|
|
232723
|
+
stopped: yield* make$49(false),
|
|
232724
232724
|
sessionScope: started.sessionScope
|
|
232725
232725
|
};
|
|
232726
232726
|
sessions.set(input.threadId, context);
|
|
@@ -233220,7 +233220,7 @@ const makeProviderService = fn$1("makeProviderService")(function* (options) {
|
|
|
233220
233220
|
const canonicalEventLogger = options?.canonicalEventLogger ?? (options?.canonicalEventLogPath !== void 0 ? yield* makeEventNdjsonLogger(options.canonicalEventLogPath, { stream: "canonical" }) : void 0);
|
|
233221
233221
|
const registry = yield* ProviderAdapterRegistry;
|
|
233222
233222
|
const directory = yield* ProviderSessionDirectory;
|
|
233223
|
-
const sessionLocks = yield* make$
|
|
233223
|
+
const sessionLocks = yield* make$46({ lookup: (_threadId) => make$43(1) });
|
|
233224
233224
|
const withSessionLock = (threadId, effect) => get$5(sessionLocks, threadId).pipe(flatMap((lock) => lock.withPermit(effect)), scoped);
|
|
233225
233225
|
const runtimeEventPubSub = yield* unbounded$1();
|
|
233226
233226
|
const assertProviderExecutable = options?.assertProviderExecutable ?? (() => succeed(null));
|
|
@@ -235185,7 +235185,7 @@ const createTrace2Monitor = fn$1("createTrace2Monitor")(function* (input, progre
|
|
|
235185
235185
|
suffix: ".json"
|
|
235186
235186
|
});
|
|
235187
235187
|
const hookStartByChildKey = /* @__PURE__ */ new Map();
|
|
235188
|
-
const traceTailState = yield* make$
|
|
235188
|
+
const traceTailState = yield* make$49({
|
|
235189
235189
|
processedChars: 0,
|
|
235190
235190
|
remainder: ""
|
|
235191
235191
|
});
|
|
@@ -235231,7 +235231,7 @@ const createTrace2Monitor = fn$1("createTrace2Monitor")(function* (input, progre
|
|
|
235231
235231
|
});
|
|
235232
235232
|
}
|
|
235233
235233
|
});
|
|
235234
|
-
const readTraceDelta = (yield* make$
|
|
235234
|
+
const readTraceDelta = (yield* make$43(1)).withPermit(fs.readFileString(traceFilePath).pipe(flatMap((contents) => uninterruptible(modify$3(traceTailState, ({ processedChars, remainder }) => {
|
|
235235
235235
|
if (contents.length <= processedChars) return [[], {
|
|
235236
235236
|
processedChars,
|
|
235237
235237
|
remainder
|
|
@@ -235360,7 +235360,7 @@ const GitCoreLive = effect(GitCore, fn$1("makeGitCore")(function* (options) {
|
|
|
235360
235360
|
const truncateOutputAtMaxBytes = input.truncateOutputAtMaxBytes ?? false;
|
|
235361
235361
|
return yield* fn$1("runGitCommand")(function* () {
|
|
235362
235362
|
const trace2Monitor = yield* createTrace2Monitor(commandInput, input.progress).pipe(provideService(Path$2, path$10), provideService(FileSystem, fileSystem), mapError(toGitCommandError(commandInput, "failed to create trace2 monitor.")));
|
|
235363
|
-
const child = yield* commandSpawner.spawn(make$
|
|
235363
|
+
const child = yield* commandSpawner.spawn(make$47("git", commandInput.args, {
|
|
235364
235364
|
cwd: commandInput.cwd,
|
|
235365
235365
|
env: withRepositoryOwnershipTrust({
|
|
235366
235366
|
...process.env,
|
|
@@ -235372,7 +235372,7 @@ const GitCoreLive = effect(GitCore, fn$1("makeGitCore")(function* (options) {
|
|
|
235372
235372
|
collectOutput(commandInput, child.stdout, maxOutputBytes, truncateOutputAtMaxBytes, input.progress?.onStdoutLine),
|
|
235373
235373
|
collectOutput(commandInput, child.stderr, maxOutputBytes, truncateOutputAtMaxBytes, input.progress?.onStderrLine),
|
|
235374
235374
|
child.exitCode.pipe(map$3((value) => Number(value)), mapError(toGitCommandError(commandInput, "failed to report exit code."))),
|
|
235375
|
-
input.stdin === void 0 ? void_$1 : run$2(encodeText(make$
|
|
235375
|
+
input.stdin === void 0 ? void_$1 : run$2(encodeText(make$42(input.stdin)), child.stdin).pipe(mapError(toGitCommandError(commandInput, "failed to write stdin.")))
|
|
235376
235376
|
], { concurrency: "unbounded" }).pipe(map$3(([stdout, stderr, exitCode]) => [
|
|
235377
235377
|
stdout,
|
|
235378
235378
|
stderr,
|
|
@@ -236743,9 +236743,9 @@ function fingerprintStatusPart(status) {
|
|
|
236743
236743
|
const GitStatusBroadcasterLive = effect(GitStatusBroadcaster, gen(function* () {
|
|
236744
236744
|
const gitManager = yield* GitManager;
|
|
236745
236745
|
const changesPubSub = yield* acquireRelease(unbounded$1(), (pubsub) => shutdown$2(pubsub));
|
|
236746
|
-
const broadcasterScope = yield* acquireRelease(make$
|
|
236747
|
-
const cacheRef = yield* make$
|
|
236748
|
-
const pollersRef = yield* make$
|
|
236746
|
+
const broadcasterScope = yield* acquireRelease(make$36(), (scope) => close(scope, void_$3));
|
|
236747
|
+
const cacheRef = yield* make$49(/* @__PURE__ */ new Map());
|
|
236748
|
+
const pollersRef = yield* make$31(/* @__PURE__ */ new Map());
|
|
236749
236749
|
const getCachedStatus = fn$1("getCachedStatus")(function* (cwd) {
|
|
236750
236750
|
return yield* get$6(cacheRef).pipe(map$3((cache) => cache.get(cwd) ?? null));
|
|
236751
236751
|
});
|
|
@@ -236899,7 +236899,7 @@ const GitStatusBroadcasterLive = effect(GitStatusBroadcaster, gen(function* () {
|
|
|
236899
236899
|
const initialRemote = (yield* getCachedStatus(normalizedCwd))?.remote?.value ?? null;
|
|
236900
236900
|
yield* retainRemotePoller(normalizedCwd);
|
|
236901
236901
|
const release = releaseRemotePoller(normalizedCwd).pipe(ignore, asVoid);
|
|
236902
|
-
return concat$2(make$
|
|
236902
|
+
return concat$2(make$42({
|
|
236903
236903
|
_tag: "snapshot",
|
|
236904
236904
|
local: initialLocal,
|
|
236905
236905
|
remote: initialRemote
|
|
@@ -237370,7 +237370,7 @@ const runCodexCommand = fn$1("runCodexCommand")(function* (args) {
|
|
|
237370
237370
|
}));
|
|
237371
237371
|
const codexSettings = yield* (yield* ServerSettingsService).getSettings.pipe(map$3((settings) => settings.providers.codex));
|
|
237372
237372
|
const effectiveHomePath = codexSettings.homePath || config.forgeCodexHomePath || process.env.CODEX_HOME || void 0;
|
|
237373
|
-
const command = make$
|
|
237373
|
+
const command = make$47(codexSettings.binaryPath, [...args], {
|
|
237374
237374
|
shell: process.platform === "win32",
|
|
237375
237375
|
env: scrubForgeProviderChildEnvSecrets({
|
|
237376
237376
|
...process.env,
|
|
@@ -237810,7 +237810,7 @@ const CodexTextGenerationLive = effect(TextGeneration, gen(function* () {
|
|
|
237810
237810
|
});
|
|
237811
237811
|
const runCodexCommand = fn$1("runCodexJson.runCodexCommand")(function* () {
|
|
237812
237812
|
const { normalizedOptions, reasoningEffort, accessMode, providerProxyToken } = yield* resolveCodexCommandTarget();
|
|
237813
|
-
return yield* launchCodexCommand(make$
|
|
237813
|
+
return yield* launchCodexCommand(make$47(codexSettings?.binaryPath || "codex", buildCodexExecArgs({
|
|
237814
237814
|
model: modelSelection.model,
|
|
237815
237815
|
reasoningEffort,
|
|
237816
237816
|
fastMode: normalizedOptions?.fastMode,
|
|
@@ -237829,7 +237829,7 @@ const CodexTextGenerationLive = effect(TextGeneration, gen(function* () {
|
|
|
237829
237829
|
})),
|
|
237830
237830
|
cwd: workingDirectory,
|
|
237831
237831
|
shell: process.platform === "win32",
|
|
237832
|
-
stdin: { stream: encodeText(make$
|
|
237832
|
+
stdin: { stream: encodeText(make$42(prompt)) }
|
|
237833
237833
|
}));
|
|
237834
237834
|
});
|
|
237835
237835
|
const cleanup = all([...[
|
|
@@ -238019,7 +238019,7 @@ const ClaudeTextGenerationLive = effect(TextGeneration, gen(function* () {
|
|
|
238019
238019
|
};
|
|
238020
238020
|
const claudeSettings = yield* map$3(serverSettingsService.getSettings, (settings) => settings.providers.claudeAgent).pipe(catch_(() => undefined_));
|
|
238021
238021
|
const rawStdout = yield* fn$1("runClaudeJson.runClaudeCommand")(function* () {
|
|
238022
|
-
const command = make$
|
|
238022
|
+
const command = make$47(claudeSettings?.binaryPath || "claude", [
|
|
238023
238023
|
"-p",
|
|
238024
238024
|
"--output-format",
|
|
238025
238025
|
"json",
|
|
@@ -238033,7 +238033,7 @@ const ClaudeTextGenerationLive = effect(TextGeneration, gen(function* () {
|
|
|
238033
238033
|
], {
|
|
238034
238034
|
cwd,
|
|
238035
238035
|
shell: process.platform === "win32",
|
|
238036
|
-
stdin: { stream: encodeText(make$
|
|
238036
|
+
stdin: { stream: encodeText(make$42(prompt)) }
|
|
238037
238037
|
});
|
|
238038
238038
|
const child = yield* commandSpawner.spawn(command).pipe(mapError((cause) => normalizeCliError("claude", operation, cause, "Failed to spawn Claude CLI process")));
|
|
238039
238039
|
const [stdout, stderr, exitCode] = yield* all([
|
|
@@ -238314,7 +238314,7 @@ const TextGenerationUsageLive = effect(TextGenerationUsage, gen(function* () {
|
|
|
238314
238314
|
//#region ../../packages/shared/src/KeyedCoalescingWorker.ts
|
|
238315
238315
|
const makeKeyedCoalescingWorker = (options) => gen(function* () {
|
|
238316
238316
|
const queue = yield* acquireRelease(unbounded(), shutdown);
|
|
238317
|
-
const stateRef = yield* make$
|
|
238317
|
+
const stateRef = yield* make$30({
|
|
238318
238318
|
latestByKey: /* @__PURE__ */ new Map(),
|
|
238319
238319
|
queuedKeys: /* @__PURE__ */ new Set(),
|
|
238320
238320
|
activeKeys: /* @__PURE__ */ new Set()
|
|
@@ -238874,14 +238874,14 @@ const makeTerminalManagerWithOptions = fn$1("makeTerminalManagerWithOptions")(fu
|
|
|
238874
238874
|
const processKillGraceMs = options.processKillGraceMs ?? DEFAULT_PROCESS_KILL_GRACE_MS;
|
|
238875
238875
|
const maxRetainedInactiveSessions = options.maxRetainedInactiveSessions ?? DEFAULT_MAX_RETAINED_INACTIVE_SESSIONS;
|
|
238876
238876
|
yield* fileSystem.makeDirectory(logsDir, { recursive: true }).pipe(orDie);
|
|
238877
|
-
const managerStateRef = yield* make$
|
|
238877
|
+
const managerStateRef = yield* make$31({
|
|
238878
238878
|
sessions: /* @__PURE__ */ new Map(),
|
|
238879
238879
|
killFibers: /* @__PURE__ */ new Map()
|
|
238880
238880
|
});
|
|
238881
|
-
const threadLocksRef = yield* make$
|
|
238881
|
+
const threadLocksRef = yield* make$31(/* @__PURE__ */ new Map());
|
|
238882
238882
|
const terminalEventListeners = /* @__PURE__ */ new Set();
|
|
238883
238883
|
const transitionReceipts = /* @__PURE__ */ new Map();
|
|
238884
|
-
const workerScope = yield* make$
|
|
238884
|
+
const workerScope = yield* make$36("sequential");
|
|
238885
238885
|
yield* addFinalizer$2(() => close(workerScope, void_$3));
|
|
238886
238886
|
const publishEvent = (event) => gen(function* () {
|
|
238887
238887
|
for (const listener of terminalEventListeners) yield* listener(event).pipe(ignoreCause({ log: true }));
|
|
@@ -238896,7 +238896,7 @@ const makeTerminalManagerWithOptions = fn$1("makeTerminalManagerWithOptions")(fu
|
|
|
238896
238896
|
const modifyManagerState = (f) => modify$2(managerStateRef, f);
|
|
238897
238897
|
const getThreadSemaphore = (threadId) => modifyEffect(threadLocksRef, (current) => {
|
|
238898
238898
|
return match(fromNullishOr(current.get(threadId)), {
|
|
238899
|
-
onNone: () => make$
|
|
238899
|
+
onNone: () => make$43(1).pipe(map$3((semaphore) => {
|
|
238900
238900
|
const next = new Map(current);
|
|
238901
238901
|
next.set(threadId, semaphore);
|
|
238902
238902
|
return [semaphore, next];
|
|
@@ -241784,6 +241784,18 @@ var SpriteTaskHoldManager = class {
|
|
|
241784
241784
|
return [...this.#holds.keys()];
|
|
241785
241785
|
}
|
|
241786
241786
|
/**
|
|
241787
|
+
* Every hold key currently associated with one thread: what `releaseThread`
|
|
241788
|
+
* releases. Read-only and synchronous, so a caller can snapshot what is
|
|
241789
|
+
* live right now and decide later, from that snapshot, what it is still
|
|
241790
|
+
* safe to release -- rather than asking this manager what is live AFTER
|
|
241791
|
+
* some delay of its own, by which point a fresh acquire may have replaced
|
|
241792
|
+
* the very hold the caller meant to release (SpriteTaskHoldReactor's
|
|
241793
|
+
* session.exited handling does exactly this, forge#3602).
|
|
241794
|
+
*/
|
|
241795
|
+
activeTurnIdsForThread(threadId) {
|
|
241796
|
+
return [...this.#holds.entries()].filter(([, hold]) => hold.threadId === threadId).map(([turnId]) => turnId);
|
|
241797
|
+
}
|
|
241798
|
+
/**
|
|
241787
241799
|
* `maxRefreshes` bounds a hold that has no terminal event of its own, such as a launch
|
|
241788
241800
|
* whose turn may never start. When the budget is spent the hold releases itself.
|
|
241789
241801
|
*
|
|
@@ -242059,7 +242071,7 @@ var SpriteTaskHoldManager = class {
|
|
|
242059
242071
|
* from silently dropping the holds of the other turns running beside it.
|
|
242060
242072
|
*/
|
|
242061
242073
|
async releaseThread(threadId) {
|
|
242062
|
-
const turnIds =
|
|
242074
|
+
const turnIds = this.activeTurnIdsForThread(threadId);
|
|
242063
242075
|
await Promise.all(turnIds.map((turnId) => this.release(turnId)));
|
|
242064
242076
|
}
|
|
242065
242077
|
/**
|
|
@@ -270776,7 +270788,7 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
|
|
|
270776
270788
|
var dgram = __require("dgram");
|
|
270777
270789
|
var thunky = require_thunky();
|
|
270778
270790
|
var events = __require("events");
|
|
270779
|
-
var os = __require("os");
|
|
270791
|
+
var os$1 = __require("os");
|
|
270780
270792
|
var noop = function() {};
|
|
270781
270793
|
module.exports = function(opts) {
|
|
270782
270794
|
if (!opts) opts = {};
|
|
@@ -270907,14 +270919,14 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
|
|
|
270907
270919
|
return that;
|
|
270908
270920
|
};
|
|
270909
270921
|
function defaultInterface() {
|
|
270910
|
-
var networks = os.networkInterfaces();
|
|
270922
|
+
var networks = os$1.networkInterfaces();
|
|
270911
270923
|
var names = Object.keys(networks);
|
|
270912
270924
|
for (var i = 0; i < names.length; i++) {
|
|
270913
270925
|
var net = networks[names[i]];
|
|
270914
270926
|
for (var j = 0; j < net.length; j++) {
|
|
270915
270927
|
var iface = net[j];
|
|
270916
270928
|
if (isIPv4(iface.family) && !iface.internal) {
|
|
270917
|
-
if (os.platform() === "darwin" && names[i] === "en0") return iface.address;
|
|
270929
|
+
if (os$1.platform() === "darwin" && names[i] === "en0") return iface.address;
|
|
270918
270930
|
return "0.0.0.0";
|
|
270919
270931
|
}
|
|
270920
270932
|
}
|
|
@@ -270922,7 +270934,7 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
|
|
|
270922
270934
|
return "127.0.0.1";
|
|
270923
270935
|
}
|
|
270924
270936
|
function allInterfaces() {
|
|
270925
|
-
var networks = os.networkInterfaces();
|
|
270937
|
+
var networks = os$1.networkInterfaces();
|
|
270926
270938
|
var names = Object.keys(networks);
|
|
270927
270939
|
var res = [];
|
|
270928
270940
|
for (var i = 0; i < names.length; i++) {
|
|
@@ -287916,7 +287928,7 @@ const GitManagerLive = effect(GitManager, fn$1("makeGitManager")(function* () {
|
|
|
287916
287928
|
preparePullRequestThread,
|
|
287917
287929
|
runStackedAction: fn$1("runStackedAction")(function* (input, options) {
|
|
287918
287930
|
const progress = createProgressEmitter(input, options);
|
|
287919
|
-
const currentPhase = yield* make$
|
|
287931
|
+
const currentPhase = yield* make$49(none$4());
|
|
287920
287932
|
return yield* fn$1("runStackedAction.runAction")(function* () {
|
|
287921
287933
|
const initialStatus = yield* gitCore.statusDetails(input.cwd);
|
|
287922
287934
|
const wantsCommit = isCommitAction(input.action);
|
|
@@ -289857,7 +289869,7 @@ const ApprovedWorkerPlanReactorLive = effect(ApprovedWorkerPlanReactor, gen(func
|
|
|
289857
289869
|
const git = yield* GitCore;
|
|
289858
289870
|
const runPromise = runPromiseWith(yield* context());
|
|
289859
289871
|
const eventState = makeApprovedWorkerPlanEventState();
|
|
289860
|
-
const reconcileSemaphore = yield* make$
|
|
289872
|
+
const reconcileSemaphore = yield* make$43(1);
|
|
289861
289873
|
const dispatch = (command) => runPromise(orchestration.dispatch(command).pipe(asVoid));
|
|
289862
289874
|
const readMasterContext = async (prompt) => {
|
|
289863
289875
|
const thread = getOrNull(await runPromise(readDurableWorkerDetail(projectionSnapshotQuery, ThreadId.make(prompt.masterThreadId))));
|
|
@@ -291133,7 +291145,7 @@ const makeRuntimeDrainReporter = gen(function* () {
|
|
|
291133
291145
|
const providerService = yield* ProviderService;
|
|
291134
291146
|
const serverConfig = yield* ServerConfig;
|
|
291135
291147
|
const spriteTaskHoldReactor = yield* SpriteTaskHoldReactor;
|
|
291136
|
-
const reportSemaphore = yield* make$
|
|
291148
|
+
const reportSemaphore = yield* make$43(1);
|
|
291137
291149
|
let heartbeatSilent = false;
|
|
291138
291150
|
const applyControlPlaneState = (runtime) => drainState.applyControlPlaneState({
|
|
291139
291151
|
draining: runtime.draining,
|
|
@@ -291716,7 +291728,7 @@ function shouldApplyProviderTurnCompleted(activeTurnId, eventTurnId) {
|
|
|
291716
291728
|
const ProviderRuntimeIngestionLive = effect(ProviderRuntimeIngestionService, fn$1("make")(function* () {
|
|
291717
291729
|
const orchestrationEngine = yield* OrchestrationEngineService;
|
|
291718
291730
|
const claudeUsageTelemetry = yield* ClaudeUsageTelemetry;
|
|
291719
|
-
const claudeUsageScope = yield* make$
|
|
291731
|
+
const claudeUsageScope = yield* make$36("parallel");
|
|
291720
291732
|
yield* addFinalizer$2(() => close(claudeUsageScope, void_$3));
|
|
291721
291733
|
const providerService = yield* ProviderService;
|
|
291722
291734
|
const projectionTurnRepository = yield* ProjectionTurnRepository;
|
|
@@ -292355,7 +292367,7 @@ const ClaudeUsageTelemetryLive = effect(ClaudeUsageTelemetry, gen(function* () {
|
|
|
292355
292367
|
*/
|
|
292356
292368
|
const makeDrainableWorker = (process) => gen(function* () {
|
|
292357
292369
|
const queue = yield* acquireRelease(unbounded(), shutdown);
|
|
292358
|
-
const outstanding = yield* make$
|
|
292370
|
+
const outstanding = yield* make$30(0);
|
|
292359
292371
|
yield* take(queue).pipe(tap((a) => ensuring(process(a), update$1(outstanding, (n) => n - 1))), forever$1, forkScoped);
|
|
292360
292372
|
const drain = get$1(outstanding).pipe(tap((n) => n > 0 ? txRetry : void_$1), tx$1);
|
|
292361
292373
|
const enqueue = (element) => offer(queue, element).pipe(tap(() => update$1(outstanding, (n) => n + 1)), tx$1);
|
|
@@ -293148,7 +293160,7 @@ const ProviderCommandReactorLive = effect(ProviderCommandReactor, gen(function*
|
|
|
293148
293160
|
* gap between the ack and this call (review item 1).
|
|
293149
293161
|
*/
|
|
293150
293162
|
const watchTurnStartOutcome = fn$1("watchTurnStartOutcome")(function* (input) {
|
|
293151
|
-
const lastRetrySignal = yield* make$
|
|
293163
|
+
const lastRetrySignal = yield* make$49(null);
|
|
293152
293164
|
const terminalEvent = yield* fromQueue(input.events).pipe(mapEffect$1((event) => gen(function* () {
|
|
293153
293165
|
if (event.type === "runtime.warning") {
|
|
293154
293166
|
const classified = classifyRetryableProviderFailure(event.payload.message);
|
|
@@ -295032,6 +295044,9 @@ const CheckpointReactorLive = effect(CheckpointReactor, gen(function* () {
|
|
|
295032
295044
|
};
|
|
295033
295045
|
}));
|
|
295034
295046
|
//#endregion
|
|
295047
|
+
//#region src/runtimeReplication/Services/RuntimeReplicationThreadFlush.ts
|
|
295048
|
+
var RuntimeReplicationThreadFlush = class extends Service$1()("forge/runtimeReplication/Services/RuntimeReplicationThreadFlush") {};
|
|
295049
|
+
//#endregion
|
|
295035
295050
|
//#region src/orchestration/Layers/SpriteTaskHoldReactor.ts
|
|
295036
295051
|
/**
|
|
295037
295052
|
* Holds the sprite awake for the duration of every agent turn.
|
|
@@ -295047,6 +295062,48 @@ const CheckpointReactorLive = effect(CheckpointReactor, gen(function* () {
|
|
|
295047
295062
|
* `turn.started` / `turn.completed` through `ProviderService.streamEvents`.
|
|
295048
295063
|
*/
|
|
295049
295064
|
/**
|
|
295065
|
+
* Bound for how long a terminal turn event (`turn.completed` / `turn.aborted`)
|
|
295066
|
+
* waits on that thread's pending replication before releasing the sprite's
|
|
295067
|
+
* turn hold anyway (forge#3600). The sprite freezes about a second after the
|
|
295068
|
+
* hold goes, so this is also roughly how much longer a finished turn's sprite
|
|
295069
|
+
* stays billed.
|
|
295070
|
+
*
|
|
295071
|
+
* Justified from the numbers already in this codebase, not a guess: the
|
|
295072
|
+
* outbox drain loop claims and posts on a 2 s tick
|
|
295073
|
+
* (`Schedule.spaced("2 seconds")` in RuntimeReplication.ts), each CMMD publish
|
|
295074
|
+
* attempt has its own 10 s deadline (`RUNTIME_REPLICATION_TIMEOUT_MS` in
|
|
295075
|
+
* RuntimeReplicationClient.ts), and `claim()` orders a thread's inventory row
|
|
295076
|
+
* ahead of its thread-events row, so one tick can mean two requests before the
|
|
295077
|
+
* thread's own batch goes out. 15 s covers one drain tick plus one full
|
|
295078
|
+
* publish attempt with headroom for that second request, while still keeping
|
|
295079
|
+
* a completed turn's sprite from staying billed anywhere near CMMD's own
|
|
295080
|
+
* stalled-turn sweep window (production: about 15 minutes, per forge#3600).
|
|
295081
|
+
*/
|
|
295082
|
+
const REPLICATION_FLUSH_TIMEOUT_MS = 15e3;
|
|
295083
|
+
/**
|
|
295084
|
+
* How often the flush re-checks the thread's outbox row while waiting. Short
|
|
295085
|
+
* enough that the wait tracks CMMD's actual ack latency (typically well under
|
|
295086
|
+
* a second) rather than the bound, long enough that a 15 s wait costs at most
|
|
295087
|
+
* about 60 reads against the outbox table.
|
|
295088
|
+
*/
|
|
295089
|
+
const REPLICATION_FLUSH_POLL_INTERVAL_MS = 250;
|
|
295090
|
+
/**
|
|
295091
|
+
* A single extra wait before trusting a flush's very first "nothing pending"
|
|
295092
|
+
* read (forge#3600 review follow-up). SpriteTaskHoldReactor and
|
|
295093
|
+
* RuntimeReplication's own domain-event-driven enqueue are independent
|
|
295094
|
+
* subscribers of the same ProviderService.streamEvents broadcast: this
|
|
295095
|
+
* reactor can see turn.completed and read the outbox before the OTHER
|
|
295096
|
+
* subscriber has finished projecting the turn's final events into a row. In
|
|
295097
|
+
* both production runs behind forge#3600, the final assistant_message and
|
|
295098
|
+
* turn_usage writes landed about a second apart from each other (00:43:15Z
|
|
295099
|
+
* and 00:43:16Z), so an immediate "nothing pending" read cannot be trusted:
|
|
295100
|
+
* that is exactly the race that stranded both turns. One settle wait,
|
|
295101
|
+
* re-checked once, closes it without turning every genuinely idle turn's
|
|
295102
|
+
* release into a long poll -- a thread that already has nothing to replicate
|
|
295103
|
+
* pays this once, never the full flushTimeoutMs bound.
|
|
295104
|
+
*/
|
|
295105
|
+
const REPLICATION_FLUSH_SETTLE_MS = 1e3;
|
|
295106
|
+
/**
|
|
295050
295107
|
* A launch hold refreshes every 60 s, so this budget is about ten minutes. A launch whose turn
|
|
295051
295108
|
* never starts, because the provider refused it or the process died first, has no event to
|
|
295052
295109
|
* release it. The budget is what stops that hold from keeping the sprite billing.
|
|
@@ -295064,8 +295121,69 @@ const TURN_START_HOLD_MAX_REFRESHES = 10;
|
|
|
295064
295121
|
/** The hold id for `holdTurnStart` / `releaseTurnStart`. Distinct from `launchHoldId` on purpose:
|
|
295065
295122
|
* see the shape's doc comment on `holdTurnStart`. */
|
|
295066
295123
|
const turnStartHoldId = (key) => `turn-start-${key}`;
|
|
295067
|
-
const
|
|
295124
|
+
const makeSpriteTaskHoldReactor = (overrides = {}) => gen(function* () {
|
|
295068
295125
|
const providerService = yield* ProviderService;
|
|
295126
|
+
const replicationOutbox = yield* RuntimeReplicationThreadFlush;
|
|
295127
|
+
const replicationRuntimeId = resolveRuntimeReplicationRuntimeId(yield* ServerConfig);
|
|
295128
|
+
const flushTimeoutMs = overrides.replicationFlushTimeoutMs ?? REPLICATION_FLUSH_TIMEOUT_MS;
|
|
295129
|
+
const flushPollIntervalMs = overrides.replicationFlushPollIntervalMs ?? REPLICATION_FLUSH_POLL_INTERVAL_MS;
|
|
295130
|
+
const flushSettleMs = overrides.replicationFlushSettleMs ?? REPLICATION_FLUSH_SETTLE_MS;
|
|
295131
|
+
/**
|
|
295132
|
+
* Waits for CMMD to acknowledge this thread's outstanding replication -- or
|
|
295133
|
+
* for nothing to have been pending in the first place -- before the caller
|
|
295134
|
+
* releases the turn hold that keeps the sprite awake for the outbox drain
|
|
295135
|
+
* loop to run (forge#3600). Bounded so a wedged publish cannot hold a
|
|
295136
|
+
* finished turn's sprite open indefinitely: the bound firing releases
|
|
295137
|
+
* anyway and logs a warning with however much was still outstanding.
|
|
295138
|
+
*
|
|
295139
|
+
* Never fails: a defect from the outbox read (a SQL error, say) is caught
|
|
295140
|
+
* and treated the same as a timeout -- release the hold rather than let a
|
|
295141
|
+
* replication-read bug strand the sprite awake, or worse, crash the worker
|
|
295142
|
+
* that also has to release every OTHER turn's hold.
|
|
295143
|
+
*/
|
|
295144
|
+
const flushThreadReplication = (threadId) => {
|
|
295145
|
+
if (replicationRuntimeId === void 0) return void_$1;
|
|
295146
|
+
const runtimeId = replicationRuntimeId;
|
|
295147
|
+
const streamKey = `thread:${threadId}`;
|
|
295148
|
+
const startedAt = Date.now();
|
|
295149
|
+
const poll = (phase) => replicationOutbox.readPendingCount({
|
|
295150
|
+
runtimeId,
|
|
295151
|
+
streamKey
|
|
295152
|
+
}).pipe(flatMap((pending) => {
|
|
295153
|
+
if (pending === 0) {
|
|
295154
|
+
if (phase === "initial") return sleep$4(flushSettleMs).pipe(andThen(suspend$1(() => poll("settle-recheck"))));
|
|
295155
|
+
return succeed({
|
|
295156
|
+
outcome: phase === "settle-recheck" ? "nothing_pending" : "delivered",
|
|
295157
|
+
pending,
|
|
295158
|
+
settled: phase === "settle-recheck"
|
|
295159
|
+
});
|
|
295160
|
+
}
|
|
295161
|
+
if (Date.now() - startedAt >= flushTimeoutMs) return succeed({
|
|
295162
|
+
outcome: "timed_out",
|
|
295163
|
+
pending,
|
|
295164
|
+
settled: false
|
|
295165
|
+
});
|
|
295166
|
+
return sleep$4(flushPollIntervalMs).pipe(andThen(suspend$1(() => poll("steady"))));
|
|
295167
|
+
}));
|
|
295168
|
+
return poll("initial").pipe(flatMap(({ outcome, pending, settled }) => {
|
|
295169
|
+
const elapsedMs = Date.now() - startedAt;
|
|
295170
|
+
const logOutcome = logInfo("sprite task hold replication flush", {
|
|
295171
|
+
threadId,
|
|
295172
|
+
outcome,
|
|
295173
|
+
pending,
|
|
295174
|
+
elapsedMs,
|
|
295175
|
+
...settled ? { settledMs: flushSettleMs } : {}
|
|
295176
|
+
});
|
|
295177
|
+
return outcome === "timed_out" ? logOutcome.pipe(andThen(logWarning$1("sprite task hold replication flush timed out; releasing the turn hold anyway", {
|
|
295178
|
+
threadId,
|
|
295179
|
+
pending,
|
|
295180
|
+
elapsedMs
|
|
295181
|
+
}))) : logOutcome;
|
|
295182
|
+
}), catchCause((cause) => logError("sprite task hold replication flush failed; releasing the turn hold anyway", {
|
|
295183
|
+
threadId,
|
|
295184
|
+
cause: pretty(cause)
|
|
295185
|
+
})));
|
|
295186
|
+
};
|
|
295069
295187
|
const manager = makeSpriteTaskHoldManager(process.env, (message, cause) => {
|
|
295070
295188
|
runFork(logWarning$1(message, { cause: cause instanceof Error ? cause.message : cause }));
|
|
295071
295189
|
}, (event) => {
|
|
@@ -295094,61 +295212,111 @@ const SpriteTaskHoldReactorLive = effect(SpriteTaskHoldReactor, gen(function* ()
|
|
|
295094
295212
|
const launchCallers = /* @__PURE__ */ new Map();
|
|
295095
295213
|
const launchGeneration = /* @__PURE__ */ new Map();
|
|
295096
295214
|
const turnLaunchGeneration = /* @__PURE__ */ new Map();
|
|
295215
|
+
const turnHoldGeneration = /* @__PURE__ */ new Map();
|
|
295216
|
+
let nextTurnHoldGeneration = 0;
|
|
295097
295217
|
/**
|
|
295098
|
-
*
|
|
295099
|
-
*
|
|
295100
|
-
*
|
|
295101
|
-
*
|
|
295102
|
-
*
|
|
295103
|
-
*
|
|
295104
|
-
*
|
|
295105
|
-
* release it here when no such newer launch has started since this turn's
|
|
295106
|
-
* own turn.started was processed (CodeRabbit review, forge#3592). A no-op
|
|
295107
|
-
* when this turn's own generation is stale, or when the hold was already
|
|
295108
|
-
* released.
|
|
295218
|
+
* Release a launch hold left over from a turn hand-off that never
|
|
295219
|
+
* confirmed, once the turn it was covering has reached a terminal state
|
|
295220
|
+
* one way or another. `capturedGeneration` must be read from
|
|
295221
|
+
* `turnLaunchGeneration` by the caller before this runs -- see that map's
|
|
295222
|
+
* own doc comment for why the read cannot happen in here. A no-op when
|
|
295223
|
+
* nothing was captured, when a newer launch has since superseded it, or
|
|
295224
|
+
* when the hold was already released.
|
|
295109
295225
|
*/
|
|
295110
|
-
const
|
|
295111
|
-
const capturedGeneration = turnLaunchGeneration.get(turnId);
|
|
295112
|
-
turnLaunchGeneration.delete(turnId);
|
|
295226
|
+
const releaseLingeringLaunchHoldIfCurrent = async (threadId, capturedGeneration) => {
|
|
295113
295227
|
if (manager === null || capturedGeneration === void 0) return;
|
|
295114
295228
|
if (launchGeneration.get(threadId) !== capturedGeneration) return;
|
|
295115
295229
|
await manager.release(launchHoldId(threadId));
|
|
295116
295230
|
};
|
|
295231
|
+
/**
|
|
295232
|
+
* Release a completed or aborted turn's hold, once its thread's pending
|
|
295233
|
+
* replication has flushed (forge#3600). Skips the release entirely once
|
|
295234
|
+
* `turnHoldGeneration` has moved past `expectedGeneration`: see that map's
|
|
295235
|
+
* own doc comment for the reused-turnId race this guards against.
|
|
295236
|
+
*/
|
|
295237
|
+
const processTerminalItem = (item) => flushThreadReplication(item.threadId).pipe(andThen(promise(async () => {
|
|
295238
|
+
if (manager === null) return;
|
|
295239
|
+
if (turnHoldGeneration.get(item.turnId) !== item.expectedGeneration) return;
|
|
295240
|
+
await manager.release(item.turnId);
|
|
295241
|
+
await releaseLingeringLaunchHoldIfCurrent(item.threadId, item.capturedLaunchGeneration);
|
|
295242
|
+
if (turnHoldGeneration.get(item.turnId) === item.expectedGeneration) turnHoldGeneration.delete(item.turnId);
|
|
295243
|
+
})));
|
|
295244
|
+
/**
|
|
295245
|
+
* Release every hold a dead session was covering, once its thread's
|
|
295246
|
+
* pending replication has flushed (#3603 item 1: this used to call
|
|
295247
|
+
* `manager.releaseThread` on the spot, with nothing stopping a provider
|
|
295248
|
+
* process that died right after its own turn from stranding that turn's
|
|
295249
|
+
* final events the same way forge#3600 did for a clean completion).
|
|
295250
|
+
* `turns` and `capturedLaunchGeneration` are snapshotted by the caller at
|
|
295251
|
+
* session.exited time, BEFORE the flush runs: a launch or a turn that
|
|
295252
|
+
* starts on this thread WHILE the flush is running must survive. Reading
|
|
295253
|
+
* "what is live for this thread" only AFTER the flush -- the naive
|
|
295254
|
+
* flush-then-releaseThread shape -- would reopen the exact hand-off gap
|
|
295255
|
+
* forge#3589 already closed once, just moved behind a longer wait.
|
|
295256
|
+
*/
|
|
295257
|
+
const processSessionExited = (item) => flushThreadReplication(item.threadId).pipe(andThen(promise(async () => {
|
|
295258
|
+
if (manager === null) return;
|
|
295259
|
+
await Promise.all(item.turns.filter((turn) => turnHoldGeneration.get(turn.turnId) === turn.expectedGeneration).map(async (turn) => {
|
|
295260
|
+
await manager.release(turn.turnId);
|
|
295261
|
+
if (turnHoldGeneration.get(turn.turnId) === turn.expectedGeneration) turnHoldGeneration.delete(turn.turnId);
|
|
295262
|
+
}));
|
|
295263
|
+
await releaseLingeringLaunchHoldIfCurrent(item.threadId, item.capturedLaunchGeneration);
|
|
295264
|
+
})));
|
|
295117
295265
|
const start = fn$1("start")(function* () {
|
|
295118
295266
|
if (manager === null) return;
|
|
295267
|
+
const terminalFibers = yield* make$50();
|
|
295268
|
+
const onTurnStarted = (turnIdKey, threadId) => {
|
|
295269
|
+
const generation = launchGeneration.get(threadId) ?? 0;
|
|
295270
|
+
turnHoldGeneration.set(turnIdKey, ++nextTurnHoldGeneration);
|
|
295271
|
+
return promise(async () => {
|
|
295272
|
+
const outcome = await manager.acquire(turnIdKey, threadId);
|
|
295273
|
+
launchCallers.delete(threadId);
|
|
295274
|
+
turnLaunchGeneration.set(turnIdKey, generation);
|
|
295275
|
+
if (outcome === "succeeded") await manager.release(launchHoldId(threadId));
|
|
295276
|
+
});
|
|
295277
|
+
};
|
|
295278
|
+
/** Shared by turn.completed and turn.aborted: see the dispatch below for why they are distinct wire events but handled identically. */
|
|
295279
|
+
const onTerminalTurnEvent = (turnIdKey, threadIdKey) => {
|
|
295280
|
+
const capturedLaunchGeneration = turnLaunchGeneration.get(turnIdKey);
|
|
295281
|
+
turnLaunchGeneration.delete(turnIdKey);
|
|
295282
|
+
return run$3(terminalFibers, processTerminalItem({
|
|
295283
|
+
turnId: turnIdKey,
|
|
295284
|
+
threadId: threadIdKey,
|
|
295285
|
+
expectedGeneration: turnHoldGeneration.get(turnIdKey) ?? 0,
|
|
295286
|
+
capturedLaunchGeneration
|
|
295287
|
+
})).pipe(asVoid);
|
|
295288
|
+
};
|
|
295289
|
+
const onSessionExited = (threadId) => {
|
|
295290
|
+
launchCallers.delete(threadId);
|
|
295291
|
+
const launchKey = launchHoldId(threadId);
|
|
295292
|
+
const turns = manager.activeTurnIdsForThread(threadId).filter((turnId) => turnId !== launchKey).map((turnId) => ({
|
|
295293
|
+
turnId,
|
|
295294
|
+
expectedGeneration: turnHoldGeneration.get(turnId) ?? 0
|
|
295295
|
+
}));
|
|
295296
|
+
for (const turn of turns) turnLaunchGeneration.delete(turn.turnId);
|
|
295297
|
+
return run$3(terminalFibers, processSessionExited({
|
|
295298
|
+
threadId,
|
|
295299
|
+
turns,
|
|
295300
|
+
capturedLaunchGeneration: launchGeneration.get(threadId)
|
|
295301
|
+
})).pipe(asVoid);
|
|
295302
|
+
};
|
|
295119
295303
|
yield* forkScoped(runForEach(providerService.streamEvents, (event) => {
|
|
295120
295304
|
if (event.type === "turn.started") {
|
|
295121
295305
|
const turnId = event.turnId;
|
|
295122
295306
|
if (turnId === void 0) return void_$1;
|
|
295123
|
-
|
|
295124
|
-
const generation = launchGeneration.get(threadId) ?? 0;
|
|
295125
|
-
return promise(async () => {
|
|
295126
|
-
const outcome = await manager.acquire(String(turnId), threadId);
|
|
295127
|
-
launchCallers.delete(threadId);
|
|
295128
|
-
turnLaunchGeneration.set(String(turnId), generation);
|
|
295129
|
-
if (outcome === "succeeded") await manager.release(launchHoldId(threadId));
|
|
295130
|
-
});
|
|
295307
|
+
return onTurnStarted(String(turnId), String(event.threadId));
|
|
295131
295308
|
}
|
|
295132
295309
|
if (event.type === "turn.completed") {
|
|
295133
295310
|
const turnId = event.turnId;
|
|
295134
295311
|
if (turnId === void 0) return void_$1;
|
|
295135
|
-
return
|
|
295136
|
-
await manager.release(String(turnId));
|
|
295137
|
-
await releaseLingeringLaunchHold(String(turnId), String(event.threadId));
|
|
295138
|
-
});
|
|
295312
|
+
return onTerminalTurnEvent(String(turnId), String(event.threadId));
|
|
295139
295313
|
}
|
|
295140
295314
|
if (event.type === "turn.aborted") {
|
|
295141
295315
|
const turnId = event.turnId;
|
|
295142
295316
|
if (turnId === void 0) return void_$1;
|
|
295143
|
-
return
|
|
295144
|
-
await manager.release(String(turnId));
|
|
295145
|
-
await releaseLingeringLaunchHold(String(turnId), String(event.threadId));
|
|
295146
|
-
});
|
|
295147
|
-
}
|
|
295148
|
-
if (event.type === "session.exited") {
|
|
295149
|
-
launchCallers.delete(String(event.threadId));
|
|
295150
|
-
return promise(() => manager.releaseThread(String(event.threadId)));
|
|
295317
|
+
return onTerminalTurnEvent(String(turnId), String(event.threadId));
|
|
295151
295318
|
}
|
|
295319
|
+
if (event.type === "session.exited") return onSessionExited(String(event.threadId));
|
|
295152
295320
|
return void_$1;
|
|
295153
295321
|
}));
|
|
295154
295322
|
});
|
|
@@ -295185,7 +295353,8 @@ const SpriteTaskHoldReactorLive = effect(SpriteTaskHoldReactor, gen(function* ()
|
|
|
295185
295353
|
releaseTurnStart,
|
|
295186
295354
|
releaseAll: onManager((taskHolds) => taskHolds.releaseAll())
|
|
295187
295355
|
};
|
|
295188
|
-
})
|
|
295356
|
+
});
|
|
295357
|
+
const SpriteTaskHoldReactorLive = effect(SpriteTaskHoldReactor, makeSpriteTaskHoldReactor());
|
|
295189
295358
|
//#endregion
|
|
295190
295359
|
//#region src/orchestration/Layers/PlanTaskCreationReactor.ts
|
|
295191
295360
|
var PlanMaterializationRequestError = class extends TaggedError("PlanMaterializationRequestError") {};
|
|
@@ -296012,7 +296181,7 @@ const readOpenCodeApiKey = (_settings) => process.env.OPENCODE_API_KEY || proces
|
|
|
296012
296181
|
const runOpenCodeCommand = fn$1("runOpenCodeCommand")(function* (binaryPath, args) {
|
|
296013
296182
|
const useShell = process.platform === "win32";
|
|
296014
296183
|
if (useShell && !isShellSafeCommandPath(binaryPath)) return yield* fail(/* @__PURE__ */ new Error(`Refusing to spawn opencode: \`binaryPath\` contains shell metacharacters that cmd.exe would interpret as additional commands.`));
|
|
296015
|
-
return yield* spawnAndCollect(binaryPath, make$
|
|
296184
|
+
return yield* spawnAndCollect(binaryPath, make$47(binaryPath, [...args], {
|
|
296016
296185
|
shell: useShell,
|
|
296017
296186
|
env: scrubForgeProviderChildEnvSecrets(process.env)
|
|
296018
296187
|
}));
|
|
@@ -296280,7 +296449,7 @@ const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
|
|
|
296280
296449
|
provider
|
|
296281
296450
|
})]));
|
|
296282
296451
|
const fallbackByProvider = new Map(fallbackProviders.map((provider) => [provider.provider, provider]));
|
|
296283
|
-
const providersRef = yield* make$
|
|
296452
|
+
const providersRef = yield* make$49(yield* forEach(PROVIDER_CACHE_IDS, (provider) => {
|
|
296284
296453
|
const filePath = cachePathByProvider.get(provider);
|
|
296285
296454
|
const fallbackProvider = fallbackByProvider.get(provider);
|
|
296286
296455
|
return readProviderStatusCache(filePath).pipe(provideService(FileSystem, fileSystem), map$3((cachedProvider) => {
|
|
@@ -297396,7 +297565,7 @@ const makeWorkspaceBulkTransfer = (options = {}) => gen(function* () {
|
|
|
297396
297565
|
const workspacePaths = yield* WorkspacePaths;
|
|
297397
297566
|
const workspaceEntries = yield* WorkspaceEntries;
|
|
297398
297567
|
const fault = options.fault ?? (() => void_$1);
|
|
297399
|
-
const transferLocks = yield* forEach(Array.from({ length: TRANSFER_LOCK_STRIPE_COUNT }), () => make$
|
|
297568
|
+
const transferLocks = yield* forEach(Array.from({ length: TRANSFER_LOCK_STRIPE_COUNT }), () => make$43(1));
|
|
297400
297569
|
const withTransferLock = (transferId, effect) => transferLocks[transferLockStripe(transferId)].withPermit(effect);
|
|
297401
297570
|
const findTransfer = (transferId) => sql`
|
|
297402
297571
|
SELECT transfer_id AS "transferId", workspace_root AS "workspaceRoot",
|
|
@@ -298443,7 +298612,7 @@ const make$3 = /* @__PURE__ */ fnUntraced(function* (options) {
|
|
|
298443
298612
|
excludeLogSpans: options.excludeLogSpans ?? false,
|
|
298444
298613
|
clock: yield* Clock
|
|
298445
298614
|
};
|
|
298446
|
-
return make$
|
|
298615
|
+
return make$32((options) => {
|
|
298447
298616
|
exporter.push(makeLogRecord(options, opts));
|
|
298448
298617
|
});
|
|
298449
298618
|
});
|
|
@@ -298881,7 +299050,7 @@ const make$1 = /* @__PURE__ */ fnUntraced(function* (options) {
|
|
|
298881
299050
|
if (!span.sampled) return;
|
|
298882
299051
|
exporter.push(makeOtlpSpan(span));
|
|
298883
299052
|
}
|
|
298884
|
-
return make$
|
|
299053
|
+
return make$41({
|
|
298885
299054
|
span(options) {
|
|
298886
299055
|
return makeSpan({
|
|
298887
299056
|
...options,
|
|
@@ -299207,8 +299376,8 @@ const makeLocalFileTracer = fn$1("makeLocalFileTracer")(function* (options) {
|
|
|
299207
299376
|
maxFiles: options.maxFiles,
|
|
299208
299377
|
batchWindowMs: options.batchWindowMs
|
|
299209
299378
|
}));
|
|
299210
|
-
const delegate = options.delegate ?? make$
|
|
299211
|
-
return make$
|
|
299379
|
+
const delegate = options.delegate ?? make$41({ span: (spanOptions) => new NativeSpan(spanOptions) });
|
|
299380
|
+
return make$41({
|
|
299212
299381
|
span(spanOptions) {
|
|
299213
299382
|
return new LocalFileSpan(spanOptions, delegate.span(spanOptions), sink.push);
|
|
299214
299383
|
},
|
|
@@ -299332,7 +299501,7 @@ function resolveBuildCommitFromEnv(env) {
|
|
|
299332
299501
|
* environment descriptor down instead of reporting an honest "unknown".
|
|
299333
299502
|
*/
|
|
299334
299503
|
function readBakedBuildCommit() {
|
|
299335
|
-
return "
|
|
299504
|
+
return "96780e9bb987ecd23f530709589bda1b4b5791e5";
|
|
299336
299505
|
}
|
|
299337
299506
|
async function resolveServerBuildCommit(input) {
|
|
299338
299507
|
if (isFullCommitSha(input.baked)) return input.baked;
|
|
@@ -299508,7 +299677,7 @@ const ServerEnvironmentLive = effect(ServerEnvironment, fn$1("makeServerEnvironm
|
|
|
299508
299677
|
return yield* decodeUnknownEffect(EnvironmentMetadata)(parsed).pipe(orElseSucceed(() => ({ displayName: null })));
|
|
299509
299678
|
});
|
|
299510
299679
|
const writeMetadata = (metadata) => fileSystem.writeFileString(serverConfig.environmentMetadataPath, `${JSON.stringify(metadata, null, 2)}\n`);
|
|
299511
|
-
const displayNameOverrideRef = yield* make$
|
|
299680
|
+
const displayNameOverrideRef = yield* make$49(normalizeDisplayName((yield* readMetadata).displayName ?? null));
|
|
299512
299681
|
const posthog = yield* PosthogPublicConfig.asEffect();
|
|
299513
299682
|
const buildCommit = yield* promise(() => resolveServerBuildCommit({
|
|
299514
299683
|
baked: readBakedBuildCommit(),
|
|
@@ -301115,7 +301284,7 @@ const internalBootstrapCredentialError = (message, cause) => new BootstrapCreden
|
|
|
301115
301284
|
const BootstrapCredentialServiceLive = effect(BootstrapCredentialService, gen(function* () {
|
|
301116
301285
|
const config = yield* ServerConfig;
|
|
301117
301286
|
const pairingLinks = yield* AuthPairingLinkRepository;
|
|
301118
|
-
const seededGrantsRef = yield* make$
|
|
301287
|
+
const seededGrantsRef = yield* make$49(/* @__PURE__ */ new Map());
|
|
301119
301288
|
const changesPubSub = yield* unbounded$1();
|
|
301120
301289
|
const seedGrant = (credential, grant) => update$4(seededGrantsRef, (current) => {
|
|
301121
301290
|
const next = new Map(current);
|
|
@@ -301586,7 +301755,7 @@ const SessionCredentialServiceLive = effect(SessionCredentialService, gen(functi
|
|
|
301586
301755
|
if (serverConfig.forgeCloudShellMode === true && configuredSigningKey === null) return yield* die$1(/* @__PURE__ */ new Error("FORGE_SESSION_SIGNING_KEY must decode to at least 32 bytes in cloud-shell mode. Forge Cloud refuses to issue restart-unsafe or replica-local sessions."));
|
|
301587
301756
|
const signingSecret = configuredSigningKey ?? (yield* secretStore.getOrCreateRandom(SIGNING_SECRET_NAME, 32));
|
|
301588
301757
|
const statelessCookieSessions = configuredSigningKey !== null;
|
|
301589
|
-
const connectedSessionsRef = yield* make$
|
|
301758
|
+
const connectedSessionsRef = yield* make$49(/* @__PURE__ */ new Map());
|
|
301590
301759
|
const changesPubSub = yield* unbounded$1();
|
|
301591
301760
|
const cookieName = resolveSessionCookieName({
|
|
301592
301761
|
mode: serverConfig.mode,
|
|
@@ -302095,7 +302264,7 @@ function verifyForgeCloudOwnerCallbackAssertion(assertion, config) {
|
|
|
302095
302264
|
}));
|
|
302096
302265
|
const verifier = assertionVerifierConfig(config);
|
|
302097
302266
|
const verified = verifier ? verifyAssertion(assertion, verifier) : null;
|
|
302098
|
-
const expiresAt = verified ? make$
|
|
302267
|
+
const expiresAt = verified ? make$37(verified.expiresAtMilliseconds) : none$4();
|
|
302099
302268
|
if (!verified || isNone(expiresAt)) return fail(new AuthError({
|
|
302100
302269
|
message: "Invalid Forge Cloud owner assertion.",
|
|
302101
302270
|
status: 401
|
|
@@ -304497,7 +304666,7 @@ const OrchestrationEngineLive = effect(OrchestrationEngineService, gen(function*
|
|
|
304497
304666
|
const getReadModel = () => sync$1(() => readModel);
|
|
304498
304667
|
const readEvents = (fromSequenceExclusive) => eventStore.readFromSequence(fromSequenceExclusive);
|
|
304499
304668
|
const dispatch = (command) => gen(function* () {
|
|
304500
|
-
const result = yield* make$
|
|
304669
|
+
const result = yield* make$38();
|
|
304501
304670
|
yield* offer$1(commandQueue, {
|
|
304502
304671
|
command,
|
|
304503
304672
|
result,
|
|
@@ -313708,7 +313877,7 @@ const RuntimeReplicationLive = effect(RuntimeReplication, gen(function* () {
|
|
|
313708
313877
|
const terminal = yield* serviceOption(TerminalManager);
|
|
313709
313878
|
const activeHourMeter = yield* ActiveHourMeter;
|
|
313710
313879
|
const runtimeId = resolveRuntimeReplicationRuntimeId(config);
|
|
313711
|
-
const outboxWarningActive = yield* make$
|
|
313880
|
+
const outboxWarningActive = yield* make$49(false);
|
|
313712
313881
|
const enqueueInventoryPayload = (payload) => runtimeId ? outbox.enqueue({
|
|
313713
313882
|
runtimeId,
|
|
313714
313883
|
streamKey: "inventory",
|
|
@@ -314899,6 +315068,36 @@ const RuntimeReplicationOutboxLive = effect(RuntimeReplicationOutbox, gen(functi
|
|
|
314899
315068
|
getDiagnostics
|
|
314900
315069
|
});
|
|
314901
315070
|
}));
|
|
315071
|
+
//#endregion
|
|
315072
|
+
//#region src/runtimeReplication/Layers/RuntimeReplicationThreadFlush.ts
|
|
315073
|
+
/**
|
|
315074
|
+
* A thread's outbox row holds its whole unacknowledged batch as one
|
|
315075
|
+
* `{ events: [...] }` payload -- RuntimeReplicationOutbox upserts by
|
|
315076
|
+
* `(runtime_id, stream_key)`, so there is at most one row per thread -- so the
|
|
315077
|
+
* count is that array's length. A row whose payload does not decode that way
|
|
315078
|
+
* (a blocked THREAD_STREAM_LOCAL_HISTORY_CONFLICT placeholder, for instance)
|
|
315079
|
+
* still represents one undelivered publication, so it counts as 1 rather than
|
|
315080
|
+
* 0: a caller bounding a wait on this number must never read a blocked row as
|
|
315081
|
+
* "nothing pending".
|
|
315082
|
+
*/
|
|
315083
|
+
function pendingEventCount(payloadJson) {
|
|
315084
|
+
try {
|
|
315085
|
+
const parsed = JSON.parse(payloadJson);
|
|
315086
|
+
if (Array.isArray(parsed.events)) return parsed.events.length;
|
|
315087
|
+
} catch {}
|
|
315088
|
+
return 1;
|
|
315089
|
+
}
|
|
315090
|
+
const RuntimeReplicationThreadFlushLive = effect(RuntimeReplicationThreadFlush, gen(function* () {
|
|
315091
|
+
const sql = yield* SqlClient;
|
|
315092
|
+
const readPendingCount = (input) => sql`
|
|
315093
|
+
SELECT payload_json AS "payloadJson" FROM runtime_replication_outbox
|
|
315094
|
+
WHERE runtime_id = ${input.runtimeId} AND stream_key = ${input.streamKey}
|
|
315095
|
+
`.pipe(map$3((rows) => {
|
|
315096
|
+
const row = rows[0];
|
|
315097
|
+
return row === void 0 ? 0 : pendingEventCount(row.payloadJson);
|
|
315098
|
+
}), orDie);
|
|
315099
|
+
return RuntimeReplicationThreadFlush.of({ readPendingCount });
|
|
315100
|
+
}));
|
|
314902
315101
|
/**
|
|
314903
315102
|
* Gates guest-side Active Hour measurement (FOR-32642). Shadow-only: even
|
|
314904
315103
|
* with this on, whether a reported interval is also recorded against the
|
|
@@ -314931,7 +315130,7 @@ const isActiveHourMeteringEnabled = gen(function* () {
|
|
|
314931
315130
|
}).pipe(catch_(() => succeed(false)));
|
|
314932
315131
|
const ActiveHourMeterLive = effect(ActiveHourMeter, gen(function* () {
|
|
314933
315132
|
const outbox = yield* RuntimeReplicationOutbox;
|
|
314934
|
-
const statesByRuntime = yield* make$
|
|
315133
|
+
const statesByRuntime = yield* make$49(/* @__PURE__ */ new Map());
|
|
314935
315134
|
const markAwake = (runtimeId) => gen(function* () {
|
|
314936
315135
|
if (!(yield* isActiveHourMeteringEnabled)) return;
|
|
314937
315136
|
yield* update$4(statesByRuntime, (states) => {
|
|
@@ -316960,7 +317159,7 @@ const PipelineRunCoordinatorLive = effect(PipelineRunCoordinator, gen(function*
|
|
|
316960
317159
|
const providerAuthorityInstallations = /* @__PURE__ */ new Map();
|
|
316961
317160
|
const providerAuthorityPublications = /* @__PURE__ */ new Map();
|
|
316962
317161
|
const preparedHandoffs = /* @__PURE__ */ new WeakMap();
|
|
316963
|
-
const authorityCleanupScope = yield* make$
|
|
317162
|
+
const authorityCleanupScope = yield* make$36("parallel");
|
|
316964
317163
|
yield* addFinalizer$2(() => close(authorityCleanupScope, void_$3));
|
|
316965
317164
|
const retryAuthoritySecretCleanup = (work, cause) => {
|
|
316966
317165
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -317336,12 +317535,12 @@ const PipelineRunCoordinatorLive = effect(PipelineRunCoordinator, gen(function*
|
|
|
317336
317535
|
if (!preparedHandoffMatchesRun(preparedHandoff, input.runId)) return yield* coordinatorError("registerHandoff", "PIPELINE_HANDOFF_PREPARATION_INVALID", "The pipeline handoff preparation is missing, belongs to another run, or was already consumed.");
|
|
317337
317536
|
preparedHandoffs.delete(input.preparedHandoff);
|
|
317338
317537
|
const ownedProviderAuthorityInstallations = /* @__PURE__ */ new Set();
|
|
317339
|
-
const preparedAuthorityRef = yield* make$
|
|
317538
|
+
const preparedAuthorityRef = yield* make$49({
|
|
317340
317539
|
authority: preparedHandoff.authority,
|
|
317341
317540
|
preparation: preparedHandoff.providerAuthorityPreparation
|
|
317342
317541
|
});
|
|
317343
|
-
const acceptingHeartbeatRef = yield* make$
|
|
317344
|
-
const heartbeatPublicationSemaphore = yield* make$
|
|
317542
|
+
const acceptingHeartbeatRef = yield* make$49(true);
|
|
317543
|
+
const heartbeatPublicationSemaphore = yield* make$43(1);
|
|
317345
317544
|
if ((yield* store.getByRunId(input.runId)) !== null) return yield* coordinatorError("registerHandoff", "PIPELINE_HANDOFF_ALREADY_BOUND", "The CMMD run already has a Forge task thread and must use the authority rebind contract.");
|
|
317346
317545
|
const snapshot = preparedHandoff.snapshot;
|
|
317347
317546
|
const readModel = yield* orchestration.getReadModel();
|
|
@@ -321223,7 +321422,7 @@ function makeProjectLeadSchedulerLive(options = {}) {
|
|
|
321223
321422
|
return effect(ProjectLeadScheduler, gen(function* () {
|
|
321224
321423
|
const client = yield* ProjectLeadControllerClient;
|
|
321225
321424
|
const dispatcher = yield* ProjectLeadReservationDispatcher;
|
|
321226
|
-
const semaphore = yield* make$
|
|
321425
|
+
const semaphore = yield* make$43(1);
|
|
321227
321426
|
const leaseSeconds = options.leaseSeconds ?? DEFAULT_LEASE_SECONDS;
|
|
321228
321427
|
const batchSize = options.batchSize ?? DEFAULT_BATCH_SIZE;
|
|
321229
321428
|
const projectLimit = options.projectLimit ?? DEFAULT_PROJECT_LIMIT;
|
|
@@ -322188,14 +322387,14 @@ const AgentProtocolReactorLive = effect(AgentProtocolReactor, gen(function* () {
|
|
|
322188
322387
|
const PRUNE_GRACE_MS = 6e4;
|
|
322189
322388
|
const makeUserSlot = gen(function* () {
|
|
322190
322389
|
return {
|
|
322191
|
-
snapshotRef: yield* make$
|
|
322390
|
+
snapshotRef: yield* make$49(null),
|
|
322192
322391
|
pubsub: yield* unbounded$1(),
|
|
322193
|
-
subscriberCountRef: yield* make$
|
|
322392
|
+
subscriberCountRef: yield* make$49(0)
|
|
322194
322393
|
};
|
|
322195
322394
|
});
|
|
322196
322395
|
const WorkspaceReadinessStateLive = effect(WorkspaceReadinessState, gen(function* () {
|
|
322197
|
-
const slotsRef = yield* make$
|
|
322198
|
-
const pruneScope = yield* make$
|
|
322396
|
+
const slotsRef = yield* make$31(/* @__PURE__ */ new Map());
|
|
322397
|
+
const pruneScope = yield* make$36("sequential");
|
|
322199
322398
|
yield* addFinalizer$2(() => close(pruneScope, void_$3));
|
|
322200
322399
|
/**
|
|
322201
322400
|
* Atomically get-or-create the slot for `userId`. The Synchronized wrapper
|
|
@@ -323256,8 +323455,8 @@ const PtyAdapterLive = unwrap(gen(function* () {
|
|
|
323256
323455
|
}));
|
|
323257
323456
|
const HttpServerLive = unwrap(gen(function* () {
|
|
323258
323457
|
const config = yield* ServerConfig;
|
|
323259
|
-
if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunHttpServer-
|
|
323260
|
-
const [NodeHttpServer, NodeHttp] = yield* all([promise(() => import("./NodeHttpServer-
|
|
323458
|
+
if (typeof Bun !== "undefined") return (yield* promise(() => import("./BunHttpServer-o7ISooSQ.mjs"))).layer(bunHttpServerOptions(config));
|
|
323459
|
+
const [NodeHttpServer, NodeHttp] = yield* all([promise(() => import("./NodeHttpServer-BngJqAIT.mjs")), promise(() => import("node:http"))]);
|
|
323261
323460
|
return NodeHttpServer.layer(NodeHttp.createServer, {
|
|
323262
323461
|
host: config.host,
|
|
323263
323462
|
port: config.port
|
|
@@ -323272,7 +323471,7 @@ const PlatformServicesLive = unwrap(gen(function* () {
|
|
|
323272
323471
|
return layer;
|
|
323273
323472
|
}
|
|
323274
323473
|
}));
|
|
323275
|
-
const RuntimeReplicationLayerLive = RuntimeReplicationLive.pipe(provideMerge(RuntimeReplicationClientLive), provideMerge(RuntimeReplicationOutboxLive), provideMerge(ActiveHourMeterLive.pipe(provide$1(RuntimeReplicationOutboxLive))));
|
|
323474
|
+
const RuntimeReplicationLayerLive = RuntimeReplicationLive.pipe(provideMerge(RuntimeReplicationClientLive), provideMerge(RuntimeReplicationOutboxLive), provideMerge(RuntimeReplicationThreadFlushLive), provideMerge(ActiveHourMeterLive.pipe(provide$1(RuntimeReplicationOutboxLive))));
|
|
323276
323475
|
const RuntimeDrainLayerLive = RuntimeDrainReporterLive.pipe(provideMerge(RuntimeDrainStateLive));
|
|
323277
323476
|
const RuntimeAwareProviderReactorsLive = mergeAll(ProviderRuntimeIngestionLive, ProviderCommandReactorLive).pipe(provide$1(RuntimeDrainLayerLive), provideMerge(RuntimeDrainStateLive), provide$1(ClaudeUsageTelemetryLive));
|
|
323278
323477
|
const PipelineWorkerCoordinatorLayerLive = PipelineWorkerCoordinatorLive.pipe(provideMerge(PipelineRunClientLive));
|
|
@@ -324045,7 +324244,7 @@ const tokenOnlyFlag = boolean$2("token-only").pipe(withDescription$2("Print only
|
|
|
324045
324244
|
* it stays least-privilege unless the operator asks otherwise.
|
|
324046
324245
|
*/
|
|
324047
324246
|
const pairingRoleFlag = choice("role", ["owner", "client"]).pipe(withDescription$2("Role for the issued pairing token."), withDefault("client"));
|
|
324048
|
-
const pairingCreateCommand = make$
|
|
324247
|
+
const pairingCreateCommand = make$33("create", {
|
|
324049
324248
|
...authLocationFlags,
|
|
324050
324249
|
ttl: ttlFlag,
|
|
324051
324250
|
role: pairingRoleFlag,
|
|
@@ -324063,24 +324262,24 @@ const pairingCreateCommand = make$34("create", {
|
|
|
324063
324262
|
...isSome(flags.baseUrl) ? { baseUrl: flags.baseUrl.value } : {}
|
|
324064
324263
|
}));
|
|
324065
324264
|
}), { quietLogs: flags.json })));
|
|
324066
|
-
const pairingListCommand = make$
|
|
324265
|
+
const pairingListCommand = make$33("list", {
|
|
324067
324266
|
...authLocationFlags,
|
|
324068
324267
|
json: jsonFlag
|
|
324069
324268
|
}).pipe(withDescription$1("List active client pairing tokens without revealing their secrets."), withHandler((flags) => runWithAuthControlPlane(flags, (authControlPlane) => gen(function* () {
|
|
324070
324269
|
yield* log$3(formatPairingCredentialList(yield* authControlPlane.listPairingLinks({ role: "client" }), { json: flags.json }));
|
|
324071
324270
|
}), { quietLogs: flags.json })));
|
|
324072
|
-
const pairingRevokeCommand = make$
|
|
324271
|
+
const pairingRevokeCommand = make$33("revoke", {
|
|
324073
324272
|
...authLocationFlags,
|
|
324074
324273
|
id: string$4("id").pipe(withDescription$3("Pairing credential id to revoke."))
|
|
324075
324274
|
}).pipe(withDescription$1("Revoke an active client pairing token."), withHandler((flags) => runWithAuthControlPlane(flags, (authControlPlane) => gen(function* () {
|
|
324076
324275
|
yield* log$3((yield* authControlPlane.revokePairingLink(flags.id)) ? `Revoked pairing credential ${flags.id}.\n` : `No active pairing credential found for ${flags.id}.\n`);
|
|
324077
324276
|
}))));
|
|
324078
|
-
const pairingCommand = make$
|
|
324277
|
+
const pairingCommand = make$33("pairing").pipe(withDescription$1("Manage one-time client pairing tokens."), withSubcommands([
|
|
324079
324278
|
pairingCreateCommand,
|
|
324080
324279
|
pairingListCommand,
|
|
324081
324280
|
pairingRevokeCommand
|
|
324082
324281
|
]));
|
|
324083
|
-
const sessionIssueCommand = make$
|
|
324282
|
+
const sessionIssueCommand = make$33("issue", {
|
|
324084
324283
|
...authLocationFlags,
|
|
324085
324284
|
ttl: ttlFlag,
|
|
324086
324285
|
role: sessionRoleFlag,
|
|
@@ -324099,25 +324298,25 @@ const sessionIssueCommand = make$34("issue", {
|
|
|
324099
324298
|
tokenOnly: flags.tokenOnly
|
|
324100
324299
|
}));
|
|
324101
324300
|
}), { quietLogs: flags.json || flags.tokenOnly })));
|
|
324102
|
-
const sessionListCommand = make$
|
|
324301
|
+
const sessionListCommand = make$33("list", {
|
|
324103
324302
|
...authLocationFlags,
|
|
324104
324303
|
json: jsonFlag
|
|
324105
324304
|
}).pipe(withDescription$1("List active sessions without revealing bearer tokens."), withHandler((flags) => runWithAuthControlPlane(flags, (authControlPlane) => gen(function* () {
|
|
324106
324305
|
yield* log$3(formatSessionList(yield* authControlPlane.listSessions(), { json: flags.json }));
|
|
324107
324306
|
}), { quietLogs: flags.json })));
|
|
324108
|
-
const sessionRevokeCommand = make$
|
|
324307
|
+
const sessionRevokeCommand = make$33("revoke", {
|
|
324109
324308
|
...authLocationFlags,
|
|
324110
324309
|
sessionId: string$4("session-id").pipe(withDescription$3("Session id to revoke."), withSchema$1(AuthSessionId))
|
|
324111
324310
|
}).pipe(withDescription$1("Revoke an active session."), withHandler((flags) => runWithAuthControlPlane(flags, (authControlPlane) => gen(function* () {
|
|
324112
324311
|
yield* log$3((yield* authControlPlane.revokeSession(flags.sessionId)) ? `Revoked session ${flags.sessionId}.\n` : `No active session found for ${flags.sessionId}.\n`);
|
|
324113
324312
|
}))));
|
|
324114
|
-
const sessionCommand = make$
|
|
324313
|
+
const sessionCommand = make$33("session").pipe(withDescription$1("Manage bearer sessions."), withSubcommands([
|
|
324115
324314
|
sessionIssueCommand,
|
|
324116
324315
|
sessionListCommand,
|
|
324117
324316
|
sessionRevokeCommand
|
|
324118
324317
|
]));
|
|
324119
|
-
const authCommand = make$
|
|
324120
|
-
const projectAddCommand = make$
|
|
324318
|
+
const authCommand = make$33("auth").pipe(withDescription$1("Manage the local auth control plane for headless deployments."), withSubcommands([pairingCommand, sessionCommand]));
|
|
324319
|
+
const projectAddCommand = make$33("add", {
|
|
324121
324320
|
...projectLocationFlags,
|
|
324122
324321
|
workspaceRoot: string$4("path").pipe(withDescription$3("Workspace root to add as a project.")),
|
|
324123
324322
|
title: string$3("title").pipe(withDescription$2("Optional project title."), optional$1)
|
|
@@ -324137,7 +324336,7 @@ const projectAddCommand = make$34("add", {
|
|
|
324137
324336
|
});
|
|
324138
324337
|
return `Added project ${projectId} (${title}) at ${workspaceRoot}.`;
|
|
324139
324338
|
}))));
|
|
324140
|
-
const projectRemoveCommand = make$
|
|
324339
|
+
const projectRemoveCommand = make$33("remove", {
|
|
324141
324340
|
...projectLocationFlags,
|
|
324142
324341
|
project: string$4("project").pipe(withDescription$3("Project id or workspace root to remove."))
|
|
324143
324342
|
}).pipe(withDescription$1("Remove a project."), withHandler((flags) => runProjectMutation(flags, fn$1("projectRemoveMutation")(function* ({ snapshot, dispatch }) {
|
|
@@ -324152,7 +324351,7 @@ const projectRemoveCommand = make$34("remove", {
|
|
|
324152
324351
|
});
|
|
324153
324352
|
return `Removed project ${project.id} (${project.title}).`;
|
|
324154
324353
|
}))));
|
|
324155
|
-
const projectRenameCommand = make$
|
|
324354
|
+
const projectRenameCommand = make$33("rename", {
|
|
324156
324355
|
...projectLocationFlags,
|
|
324157
324356
|
project: string$4("project").pipe(withDescription$3("Project id or workspace root to rename.")),
|
|
324158
324357
|
title: string$4("title").pipe(withDescription$3("New project title."))
|
|
@@ -324175,12 +324374,12 @@ const parseCmmdProjectId = (value) => {
|
|
|
324175
324374
|
const projectId = Number(value);
|
|
324176
324375
|
return Number.isSafeInteger(projectId) && projectId > 0 ? succeed(projectId) : fail(/* @__PURE__ */ new Error(`Invalid CMMD project id '${value}'. Expected a positive integer.`));
|
|
324177
324376
|
};
|
|
324178
|
-
const projectLeadExplainCommand = make$
|
|
324377
|
+
const projectLeadExplainCommand = make$33("explain", {
|
|
324179
324378
|
...projectLocationFlags,
|
|
324180
324379
|
projectId: string$4("project-id").pipe(withDescription$3("Numeric CMMD project id.")),
|
|
324181
324380
|
json: jsonFlag
|
|
324182
324381
|
}).pipe(withDescription$1("Explain canonical Project Lead controller state."), withHandler((flags) => parseCmmdProjectId(flags.projectId).pipe(flatMap((projectId) => runProjectLeadQuery(flags, projectId, (explanation) => flags.json ? JSON.stringify(explanation, null, 2) : formatProjectLeadExplanation(projectId, explanation))))));
|
|
324183
|
-
const projectLeadDoctorCommand = make$
|
|
324382
|
+
const projectLeadDoctorCommand = make$33("doctor", {
|
|
324184
324383
|
...projectLocationFlags,
|
|
324185
324384
|
projectId: string$4("project-id").pipe(withDescription$3("Numeric CMMD project id.")),
|
|
324186
324385
|
json: jsonFlag
|
|
@@ -324188,7 +324387,7 @@ const projectLeadDoctorCommand = make$34("doctor", {
|
|
|
324188
324387
|
const report = diagnoseProjectLead(projectId, explanation);
|
|
324189
324388
|
return flags.json ? JSON.stringify(report, null, 2) : formatProjectLeadDoctor(report);
|
|
324190
324389
|
})))));
|
|
324191
|
-
const projectLeadCommand = make$
|
|
324390
|
+
const projectLeadCommand = make$33("lead").pipe(withDescription$1("Inspect the CMMD-owned Project Lead controller."), withSubcommands([projectLeadExplainCommand, projectLeadDoctorCommand]));
|
|
324192
324391
|
const connectStatePathFor = fn$1("connectStatePathFor")(function* (flags) {
|
|
324193
324392
|
const config = yield* resolveCliAuthConfig(flags, yield* LogLevel);
|
|
324194
324393
|
return (yield* Path$2).join(config.stateDir, "connect.json");
|
|
@@ -324201,18 +324400,18 @@ const runConnectCommand = (flags, update) => gen(function* () {
|
|
|
324201
324400
|
const state = next ?? current;
|
|
324202
324401
|
yield* log$3(flags.json ? JSON.stringify(state, null, 2) : formatConnectStatus(state));
|
|
324203
324402
|
});
|
|
324204
|
-
const connectStatusCommand = make$
|
|
324403
|
+
const connectStatusCommand = make$33("status", {
|
|
324205
324404
|
...projectLocationFlags,
|
|
324206
324405
|
json: jsonFlag
|
|
324207
324406
|
}).pipe(withDescription$1("Show whether this machine is offered to CMMD over the relay."), withHandler((flags) => runConnectCommand(flags, () => null)));
|
|
324208
|
-
const connectLinkCommand = make$
|
|
324407
|
+
const connectLinkCommand = make$33("link", {
|
|
324209
324408
|
...projectLocationFlags,
|
|
324210
324409
|
json: jsonFlag
|
|
324211
324410
|
}).pipe(withDescription$1("Offer this machine to CMMD over the relay on the next start."), withHandler((flags) => runConnectCommand(flags, (current) => ({
|
|
324212
324411
|
...current,
|
|
324213
324412
|
linked: true
|
|
324214
324413
|
}))));
|
|
324215
|
-
const connectUnlinkCommand = make$
|
|
324414
|
+
const connectUnlinkCommand = make$33("unlink", {
|
|
324216
324415
|
...projectLocationFlags,
|
|
324217
324416
|
json: jsonFlag
|
|
324218
324417
|
}).pipe(withDescription$1("Stop offering this machine, keeping its runtime identity so relinking is the same device."), withHandler((flags) => runConnectCommand(flags, (current) => ({
|
|
@@ -324223,7 +324422,7 @@ const noBrowserLoginFlag = boolean$2("no-browser").pipe(withDescription$2("Print
|
|
|
324223
324422
|
const CONNECT_CLI_CLIENT_ID = "cmmd-forge-web";
|
|
324224
324423
|
const connectSecretsFor = (stateDir) => createFileSecretStorage({ keyPath: Path$1.join(stateDir, "connect-secret.key") });
|
|
324225
324424
|
const loginEmailFlag = string$3("email").pipe(withDescription$2("Sign in with this CMMD email and a password prompt instead of the browser flow."), optional$1);
|
|
324226
|
-
const connectLoginCommand = make$
|
|
324425
|
+
const connectLoginCommand = make$33("login", {
|
|
324227
324426
|
...projectLocationFlags,
|
|
324228
324427
|
noBrowser: noBrowserLoginFlag,
|
|
324229
324428
|
email: loginEmailFlag
|
|
@@ -324265,7 +324464,7 @@ const connectLoginCommand = make$34("login", {
|
|
|
324265
324464
|
})).json();
|
|
324266
324465
|
},
|
|
324267
324466
|
openBrowser: async (url) => {
|
|
324268
|
-
const open = (await import("./open-
|
|
324467
|
+
const open = (await import("./open-yHTUkd2Y.mjs")).default;
|
|
324269
324468
|
await open(url);
|
|
324270
324469
|
return true;
|
|
324271
324470
|
},
|
|
@@ -324290,7 +324489,7 @@ const connectLoginCommand = make$34("login", {
|
|
|
324290
324489
|
});
|
|
324291
324490
|
yield* log$3("Signed in to CMMD. Run `cmmd-forge connect link` to offer this machine.");
|
|
324292
324491
|
})));
|
|
324293
|
-
const connectLogoutCommand = make$
|
|
324492
|
+
const connectLogoutCommand = make$33("logout", { ...projectLocationFlags }).pipe(withDescription$1("Sign this machine out of CMMD and stop offering it."), withHandler((flags) => gen(function* () {
|
|
324294
324493
|
const config = yield* resolveCliAuthConfig(flags, yield* LogLevel);
|
|
324295
324494
|
const statePath = Path$1.join(config.stateDir, "connect.json");
|
|
324296
324495
|
writeConnectState(statePath, {
|
|
@@ -324300,14 +324499,14 @@ const connectLogoutCommand = make$34("logout", { ...projectLocationFlags }).pipe
|
|
|
324300
324499
|
clearConnectCredential(Path$1.join(config.stateDir, "connect-credential.json"));
|
|
324301
324500
|
yield* log$3("Signed out of CMMD and stopped offering this machine.");
|
|
324302
324501
|
})));
|
|
324303
|
-
const connectCommand = make$
|
|
324502
|
+
const connectCommand = make$33("connect").pipe(withDescription$1("Offer this machine to CMMD so other surfaces can reach it."), withSubcommands([
|
|
324304
324503
|
connectStatusCommand,
|
|
324305
324504
|
connectLoginCommand,
|
|
324306
324505
|
connectLogoutCommand,
|
|
324307
324506
|
connectLinkCommand,
|
|
324308
324507
|
connectUnlinkCommand
|
|
324309
324508
|
]));
|
|
324310
|
-
const projectCommand = make$
|
|
324509
|
+
const projectCommand = make$33("project").pipe(withDescription$1("Manage projects."), withSubcommands([
|
|
324311
324510
|
projectAddCommand,
|
|
324312
324511
|
projectRemoveCommand,
|
|
324313
324512
|
projectRenameCommand,
|
|
@@ -324322,12 +324521,12 @@ const runServerCommand = (flags, options) => gen(function* () {
|
|
|
324322
324521
|
});
|
|
324323
324522
|
return yield* runServer.pipe(provideService(ServerConfig, config));
|
|
324324
324523
|
});
|
|
324325
|
-
const startCommand = make$
|
|
324326
|
-
const serveCommand = make$
|
|
324524
|
+
const startCommand = make$33("start", { ...sharedServerCommandFlags }).pipe(withDescription$1("Run the Forge server."), withHandler((flags) => runServerCommand(flags)));
|
|
324525
|
+
const serveCommand = make$33("serve", { ...sharedServerCommandFlags }).pipe(withDescription$1("Run the Forge server without opening a browser and print headless pairing details."), withHandler((flags) => runServerCommand(flags, {
|
|
324327
324526
|
startupPresentation: "headless",
|
|
324328
324527
|
forceAutoBootstrapProjectFromCwd: false
|
|
324329
324528
|
})));
|
|
324330
|
-
const cli = make$
|
|
324529
|
+
const cli = make$33("cmmd-forge", { ...sharedServerCommandFlags }).pipe(withDescription$1("Run the Forge server."), withHandler((flags) => runServerCommand(flags)), withSubcommands([
|
|
324331
324530
|
startCommand,
|
|
324332
324531
|
serveCommand,
|
|
324333
324532
|
authCommand,
|