@cmmd-center/forge 0.10.13 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BunHttpServer-CjwNydcy.cjs → BunHttpServer-BhE7Szci.cjs} +6 -6
- package/dist/{BunHttpServer-GM72b26K.mjs → BunHttpServer-VI75aqJw.mjs} +6 -6
- package/dist/{BunPTY-B4Ra6mph.cjs → BunPTY-86ttlTi6.cjs} +3 -3
- package/dist/{BunPTY-C_ONQ8rt.mjs → BunPTY-oVISucl_.mjs} +3 -3
- package/dist/{BunServices-CUeOgVUt.cjs → BunServices-BwE9KexF.cjs} +3 -3
- package/dist/{BunServices-B-6JkR0Q.mjs → BunServices-D0JTDujL.mjs} +3 -3
- package/dist/{Cache-D56wNKiH.cjs → Cache-CWlxNDbC.cjs} +6 -6
- package/dist/{Cache-da-A9JAa.mjs → Cache-p0X77SKw.mjs} +3 -3
- package/dist/{Config-D0zF6ChD.mjs → Config-AqUR_lhX.mjs} +2 -2
- package/dist/{Config-e5bi-5Ut.cjs → Config-CkEzdD9L.cjs} +2 -2
- package/dist/{HttpServer-B-QOc7bR.cjs → HttpServer-DGoLR-kU.cjs} +4 -4
- package/dist/{HttpServer-HhjqDZlB.mjs → HttpServer-DNGCTTdk.mjs} +3 -3
- package/dist/{NodeHttpServer-Cy1XvkSE.cjs → NodeHttpServer-BPjxt_DT.cjs} +7 -7
- package/dist/{NodeHttpServer-DmEyd0J4.mjs → NodeHttpServer-Dw7ivXfX.mjs} +7 -7
- package/dist/{NodePTY-DU_KoZdd.mjs → NodePTY-CVH2yNYl.mjs} +4 -4
- package/dist/{NodePTY-wATyTf3M.cjs → NodePTY-Cps0jsDA.cjs} +4 -4
- package/dist/{NodeServices-DeNLW36O.mjs → NodeServices-CBNXOYLG.mjs} +3 -3
- package/dist/{NodeServices-pfwgkiUu.cjs → NodeServices-Cw6SxEbl.cjs} +3 -3
- package/dist/{NodeServices-BqfcuvmN.cjs → NodeServices-Ddr-tYRu.cjs} +1 -1
- package/dist/{NodeSqliteClient-PZ6NN2gq.cjs → NodeSqliteClient-CmxPzcBf.cjs} +7 -7
- package/dist/{NodeSqliteClient-BqUcml1B.mjs → NodeSqliteClient-DGInbxQ3.mjs} +6 -6
- package/dist/{NodeTerminal-DfKMT-mE.cjs → NodeTerminal-5iWbO0B2.cjs} +6 -6
- package/dist/{NodeTerminal-DBDxXuu0.mjs → NodeTerminal-BEGtoMSS.mjs} +3 -3
- package/dist/{PTY-DB-DmqyE.cjs → PTY-BxYDiW3h.cjs} +2 -2
- package/dist/{PTY-DdjcAGrF.mjs → PTY-rIPf52QR.mjs} +2 -2
- package/dist/{Path-CHDjKLrB.cjs → Path-Be7zSwar.cjs} +281 -54
- package/dist/{Path-B0vKGzx2.mjs → Path-C6Zb2WHp.mjs} +271 -58
- package/dist/{Schema-BK7-mN_J.mjs → Schema-CJyk7ah1.mjs} +65 -3
- package/dist/{Schema-Cf_uEUQU.cjs → Schema-dLi7Qssy.cjs} +76 -2
- package/dist/{SqlError-Du_dEWbw.cjs → SqlError-Bt0Bcd5C.cjs} +4 -4
- package/dist/{SqlError-LFObCDir.mjs → SqlError-cyJT2IRY.mjs} +3 -3
- package/dist/{SqliteClient-D4Srj6O8.cjs → SqliteClient-B08FzZM4.cjs} +6 -6
- package/dist/{SqliteClient-DdItRZUr.mjs → SqliteClient-CIsITMoQ.mjs} +5 -5
- package/dist/bin.cjs +74 -47
- package/dist/bin.mjs +211 -184
- package/dist/client/assets/{DiffPanel-DGiCJd76.js → DiffPanel-Bnkifxef.js} +3 -3
- package/dist/client/assets/{DiffPanel.logic-Dd5YF6k3.js → DiffPanel.logic-Bk4d9mRT.js} +2 -2
- package/dist/client/assets/{DiffPanelShell-C-nlQxal.js → DiffPanelShell-D_nSDbjF.js} +104 -104
- package/dist/client/assets/{DiffWorkerPoolProvider-CfmtkBLg.js → DiffWorkerPoolProvider-BO-u17g1.js} +9 -9
- package/dist/client/assets/{PullRequestCodePanel-xkECqRzW.js → PullRequestCodePanel-Bbuxcu5g.js} +3 -3
- package/dist/client/assets/{Virtualizer-CVyQexgp.js → Virtualizer-BxZHsCOD.js} +2 -2
- package/dist/client/assets/{index-CUmbThfW.css → index-BMcOaHS_.css} +1 -1
- package/dist/client/assets/{index-BD9iZwyM.js → index-BeMh8T3m.js} +58 -58
- package/dist/client/index.html +5 -5
- package/dist/forge-build.json +1 -1
- package/dist/{open-D8mGyWmt.mjs → open-FIgTDosf.mjs} +3 -3
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const require_chunk = require("./chunk-BhaIgcZK.cjs");
|
|
5
|
-
const require_Schema$1 = require("./Schema-
|
|
6
|
-
const require_Path = require("./Path-
|
|
7
|
-
const require_NodeTerminal = require("./NodeTerminal-
|
|
8
|
-
const require_NodeServices = require("./NodeServices-
|
|
9
|
-
const require_HttpServer = require("./HttpServer-
|
|
10
|
-
const require_Config = require("./Config-
|
|
11
|
-
const require_Cache = require("./Cache-
|
|
12
|
-
const require_SqlError = require("./SqlError-
|
|
5
|
+
const require_Schema$1 = require("./Schema-dLi7Qssy.cjs");
|
|
6
|
+
const require_Path = require("./Path-Be7zSwar.cjs");
|
|
7
|
+
const require_NodeTerminal = require("./NodeTerminal-5iWbO0B2.cjs");
|
|
8
|
+
const require_NodeServices = require("./NodeServices-Cw6SxEbl.cjs");
|
|
9
|
+
const require_HttpServer = require("./HttpServer-DGoLR-kU.cjs");
|
|
10
|
+
const require_Config = require("./Config-CkEzdD9L.cjs");
|
|
11
|
+
const require_Cache = require("./Cache-CWlxNDbC.cjs");
|
|
12
|
+
const require_SqlError = require("./SqlError-Bt0Bcd5C.cjs");
|
|
13
13
|
const require_Mime = require("./Mime-Bilnh8zE.cjs");
|
|
14
14
|
const require_esm = require("./esm-BZhXwX5p.cjs");
|
|
15
15
|
const require_runtimeControlAuthority = require("./runtimeControlAuthority-BdIovv-r.cjs");
|
|
16
|
-
const require_PTY = require("./PTY-
|
|
16
|
+
const require_PTY = require("./PTY-BxYDiW3h.cjs");
|
|
17
17
|
let node_child_process = require("node:child_process");
|
|
18
18
|
node_child_process = require_chunk.__toESM(node_child_process);
|
|
19
19
|
let node_stream = require("node:stream");
|
|
@@ -65775,7 +65775,7 @@ function normalizeNumberish(value) {
|
|
|
65775
65775
|
}
|
|
65776
65776
|
//#endregion
|
|
65777
65777
|
//#region package.json
|
|
65778
|
-
var version$1 = "0.10.
|
|
65778
|
+
var version$1 = "0.10.14";
|
|
65779
65779
|
//#endregion
|
|
65780
65780
|
//#region src/sentry.ts
|
|
65781
65781
|
const SERVER_APP_NAME = "forge-server";
|
|
@@ -75409,7 +75409,7 @@ const makeNoSerialization = /* @__PURE__ */ require_Schema$1.fnUntraced(function
|
|
|
75409
75409
|
const services = yield* require_Schema$1.context();
|
|
75410
75410
|
const scope = require_Schema$1.get(services, require_Schema$1.Scope);
|
|
75411
75411
|
const trackFiber = require_Path.runIn(require_Schema$1.forkUnsafe(scope, "parallel"));
|
|
75412
|
-
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* require_Path.make$
|
|
75412
|
+
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* require_Path.make$5(concurrency);
|
|
75413
75413
|
const clients = /* @__PURE__ */ new Map();
|
|
75414
75414
|
let isShutdown = false;
|
|
75415
75415
|
const shutdownLatch = require_Path.makeUnsafe$1(false);
|
|
@@ -75818,7 +75818,7 @@ const toHttpEffectWebsocket = /* @__PURE__ */ require_Schema$1.fnUntraced(functi
|
|
|
75818
75818
|
});
|
|
75819
75819
|
const makeSocketProtocol = /* @__PURE__ */ require_Schema$1.gen(function* () {
|
|
75820
75820
|
const serialization = yield* RpcSerialization;
|
|
75821
|
-
const disconnects = yield* require_Path.make$
|
|
75821
|
+
const disconnects = yield* require_Path.make$6();
|
|
75822
75822
|
let clientId = 0;
|
|
75823
75823
|
const clients = /* @__PURE__ */ new Map();
|
|
75824
75824
|
const clientIds = /* @__PURE__ */ new Set();
|
|
@@ -83008,7 +83008,7 @@ const makeServerSettings = require_Schema$1.gen(function* () {
|
|
|
83008
83008
|
const { settingsPath } = yield* ServerConfig;
|
|
83009
83009
|
const fs = yield* require_Path.FileSystem;
|
|
83010
83010
|
const pathService = yield* require_Path.Path;
|
|
83011
|
-
const writeSemaphore = yield* require_Path.make$
|
|
83011
|
+
const writeSemaphore = yield* require_Path.make$5(1);
|
|
83012
83012
|
const cacheKey = "settings";
|
|
83013
83013
|
const changesPubSub = yield* require_Path.unbounded$1();
|
|
83014
83014
|
const startedRef = yield* require_HttpServer.make$3(false);
|
|
@@ -91856,7 +91856,7 @@ const makeKeybindings = require_Schema$1.gen(function* () {
|
|
|
91856
91856
|
const { keybindingsConfigPath } = yield* ServerConfig;
|
|
91857
91857
|
const fs = yield* require_Path.FileSystem;
|
|
91858
91858
|
const path = yield* require_Path.Path;
|
|
91859
|
-
const upsertSemaphore = yield* require_Path.make$
|
|
91859
|
+
const upsertSemaphore = yield* require_Path.make$5(1);
|
|
91860
91860
|
const resolvedConfigCacheKey = "resolved";
|
|
91861
91861
|
const changesPubSub = yield* require_Path.unbounded$1();
|
|
91862
91862
|
const startedRef = yield* require_HttpServer.make$3(false);
|
|
@@ -97761,7 +97761,7 @@ const make$15 = (hooks) => require_Schema$1.gen(function* () {
|
|
|
97761
97761
|
const selfRuntimeId = resolveRuntimeReplicationRuntimeId(config);
|
|
97762
97762
|
const scanScope = yield* require_Schema$1.make$3("sequential");
|
|
97763
97763
|
yield* require_Schema$1.addFinalizer(() => require_Schema$1.close(scanScope, require_Schema$1.void_$1));
|
|
97764
|
-
const scanSemaphore = yield* require_Path.make$
|
|
97764
|
+
const scanSemaphore = yield* require_Path.make$5(1);
|
|
97765
97765
|
const inFlight = /* @__PURE__ */ new Map();
|
|
97766
97766
|
const ratesCachePath = path.join(config.stateDir, RATES_CACHE_FILE);
|
|
97767
97767
|
const scanCachePath = path.join(config.stateDir, SCAN_CACHE_FILE);
|
|
@@ -98698,7 +98698,7 @@ const makeWorkspaceBulkTransfer = (options = {}) => require_Schema$1.gen(functio
|
|
|
98698
98698
|
const workspacePaths = yield* WorkspacePaths;
|
|
98699
98699
|
const workspaceEntries = yield* WorkspaceEntries;
|
|
98700
98700
|
const fault = options.fault ?? (() => require_Schema$1.void_);
|
|
98701
|
-
const transferLocks = yield* require_Schema$1.forEach(Array.from({ length: TRANSFER_LOCK_STRIPE_COUNT }), () => require_Path.make$
|
|
98701
|
+
const transferLocks = yield* require_Schema$1.forEach(Array.from({ length: TRANSFER_LOCK_STRIPE_COUNT }), () => require_Path.make$5(1));
|
|
98702
98702
|
const withTransferLock = (transferId, effect) => transferLocks[transferLockStripe(transferId)].withPermit(effect);
|
|
98703
98703
|
const findTransfer = (transferId) => sql`
|
|
98704
98704
|
SELECT transfer_id AS "transferId", workspace_root AS "workspaceRoot",
|
|
@@ -116557,8 +116557,8 @@ require_Schema$1.effectDiscard(runMigrations());
|
|
|
116557
116557
|
//#endregion
|
|
116558
116558
|
//#region src/persistence/Layers/Sqlite.ts
|
|
116559
116559
|
const defaultSqliteClientLoaders = {
|
|
116560
|
-
bun: () => Promise.resolve().then(() => require("./SqliteClient-
|
|
116561
|
-
node: () => Promise.resolve().then(() => require("./NodeSqliteClient-
|
|
116560
|
+
bun: () => Promise.resolve().then(() => require("./SqliteClient-B08FzZM4.cjs")),
|
|
116561
|
+
node: () => Promise.resolve().then(() => require("./NodeSqliteClient-CmxPzcBf.cjs"))
|
|
116562
116562
|
};
|
|
116563
116563
|
const makeRuntimeSqliteLayer = require_Schema$1.fn("makeRuntimeSqliteLayer")(function* (config) {
|
|
116564
116564
|
const loader = defaultSqliteClientLoaders[process.versions.bun !== void 0 ? "bun" : "node"];
|
|
@@ -150195,6 +150195,23 @@ function issueCmmdLocalUserProviderEgressCredential(input) {
|
|
|
150195
150195
|
});
|
|
150196
150196
|
}
|
|
150197
150197
|
//#endregion
|
|
150198
|
+
//#region src/provider/codexAccountTransition.ts
|
|
150199
|
+
function explicitProviderAccountTransition(fromAccountId, toAccountId) {
|
|
150200
|
+
if (!fromAccountId || !toAccountId || fromAccountId === toAccountId) return void 0;
|
|
150201
|
+
return {
|
|
150202
|
+
fromAccountId,
|
|
150203
|
+
toAccountId
|
|
150204
|
+
};
|
|
150205
|
+
}
|
|
150206
|
+
function permitsCodexAccountTransition(input) {
|
|
150207
|
+
const { transition, requestedAccountId, prior, current } = input;
|
|
150208
|
+
if (!transition || transition.fromAccountId === transition.toAccountId || transition.toAccountId !== requestedAccountId || prior.identity.kind !== "provider_account" || current.identity.kind !== "provider_account" || prior.identity.provider !== "codex" || current.identity.provider !== "codex") return false;
|
|
150209
|
+
return providerDeliveryBindingsEqual({
|
|
150210
|
+
...prior,
|
|
150211
|
+
identity: current.identity
|
|
150212
|
+
}, current);
|
|
150213
|
+
}
|
|
150214
|
+
//#endregion
|
|
150198
150215
|
//#region src/providerAuth/codexLocalAccountIdentity.ts
|
|
150199
150216
|
const ACCOUNT_IDENTITY_PATH = "/api/forge/context/providers/codex/account-identity";
|
|
150200
150217
|
const PROVIDER_ACCOUNT_IDENTITY$1 = /^pai_v1_[A-Za-z0-9_-]{43}$/;
|
|
@@ -150692,7 +150709,12 @@ var CodexAppServerManager = class extends node_events.EventEmitter {
|
|
|
150692
150709
|
const rawPriorDeliveryBinding = input.resumeCursor.providerDeliveryBinding;
|
|
150693
150710
|
const priorDeliveryBinding = readProviderDeliveryBinding(rawPriorDeliveryBinding);
|
|
150694
150711
|
if (rawPriorDeliveryBinding !== void 0 && rawPriorDeliveryBinding !== null && !priorDeliveryBinding) throw new Error("Existing Codex history cannot resume because its persisted delivered provider account binding is unreadable.");
|
|
150695
|
-
if (priorDeliveryBinding && !providerDeliveryBindingsEqual(priorDeliveryBinding, currentDeliveryBinding)
|
|
150712
|
+
if (priorDeliveryBinding && !providerDeliveryBindingsEqual(priorDeliveryBinding, currentDeliveryBinding) && !permitsCodexAccountTransition({
|
|
150713
|
+
transition: input.accountTransition,
|
|
150714
|
+
requestedAccountId: input.providerAccountId,
|
|
150715
|
+
prior: priorDeliveryBinding,
|
|
150716
|
+
current: currentDeliveryBinding
|
|
150717
|
+
})) throw new Error("Existing Codex history cannot resume because the delivered provider account changed.");
|
|
150696
150718
|
}
|
|
150697
150719
|
const initialResumeCursor = initialCodexResumeCursor({
|
|
150698
150720
|
resumeCursor: input.resumeCursor,
|
|
@@ -210841,6 +210863,7 @@ const makeCodexAdapter = require_Schema$1.fn("makeCodexAdapter")(function* (opti
|
|
|
210841
210863
|
...browserToolEnvironmentId !== void 0 ? { environmentId: browserToolEnvironmentId } : {}
|
|
210842
210864
|
};
|
|
210843
210865
|
const managerInput = {
|
|
210866
|
+
...input.accountTransition ? { accountTransition: input.accountTransition } : {},
|
|
210844
210867
|
threadId: input.threadId,
|
|
210845
210868
|
provider: "codex",
|
|
210846
210869
|
...input.cwd !== void 0 ? { cwd: input.cwd } : {},
|
|
@@ -211171,7 +211194,7 @@ function withoutInheritedAnthropicCredentials(env, options) {
|
|
|
211171
211194
|
//#endregion
|
|
211172
211195
|
//#region src/provider/makeManagedServerProvider.ts
|
|
211173
211196
|
const makeManagedServerProvider = require_Schema$1.fn("makeManagedServerProvider")(function* (input) {
|
|
211174
|
-
const refreshSemaphore = yield* require_Path.make$
|
|
211197
|
+
const refreshSemaphore = yield* require_Path.make$5(1);
|
|
211175
211198
|
const changesPubSub = yield* require_Schema$1.acquireRelease(require_Path.unbounded$1(), require_Path.shutdown$1);
|
|
211176
211199
|
const initialSettings = yield* input.getSettings;
|
|
211177
211200
|
const initialSnapshot = input.initialSnapshot(initialSettings);
|
|
@@ -220911,7 +220934,7 @@ function makeCursorAdapter(cursorSettings, options) {
|
|
|
220911
220934
|
const getThreadSemaphore = (threadId) => modifyEffect(threadLocksRef, (current) => {
|
|
220912
220935
|
const existing = require_Schema$1.fromNullishOr(current.get(threadId));
|
|
220913
220936
|
return require_Schema$1.match$2(existing, {
|
|
220914
|
-
onNone: () => require_Path.make$
|
|
220937
|
+
onNone: () => require_Path.make$5(1).pipe(require_Schema$1.map((semaphore) => {
|
|
220915
220938
|
const next = new Map(current);
|
|
220916
220939
|
next.set(threadId, semaphore);
|
|
220917
220940
|
return [semaphore, next];
|
|
@@ -229321,6 +229344,8 @@ const makeProviderService = require_Schema$1.fn("makeProviderService")(function*
|
|
|
229321
229344
|
const canonicalEventLogger = options?.canonicalEventLogger ?? (options?.canonicalEventLogPath !== void 0 ? yield* makeEventNdjsonLogger(options.canonicalEventLogPath, { stream: "canonical" }) : void 0);
|
|
229322
229345
|
const registry = yield* ProviderAdapterRegistry;
|
|
229323
229346
|
const directory = yield* ProviderSessionDirectory;
|
|
229347
|
+
const sessionLocks = yield* require_Path.make$3({ lookup: (_threadId) => require_Path.make$5(1) });
|
|
229348
|
+
const withSessionLock = (threadId, effect) => require_Path.get$1(sessionLocks, threadId).pipe(require_Schema$1.flatMap((lock) => lock.withPermit(effect)), require_Schema$1.scoped);
|
|
229324
229349
|
const runtimeEventPubSub = yield* require_Path.unbounded$1();
|
|
229325
229350
|
const assertProviderExecutable = options?.assertProviderExecutable ?? (() => require_Schema$1.succeed(null));
|
|
229326
229351
|
const assertCurrentProviderDelivery = require_Schema$1.fn("assertCurrentProviderDelivery")(function* (input) {
|
|
@@ -229495,18 +229520,19 @@ const makeProviderService = require_Schema$1.fn("makeProviderService")(function*
|
|
|
229495
229520
|
"provider.runtime_mode": input.runtimeMode
|
|
229496
229521
|
});
|
|
229497
229522
|
const persistedBinding = require_Schema$1.getOrUndefined$1(yield* directory.getBinding(threadId));
|
|
229498
|
-
yield*
|
|
229523
|
+
const adapter = yield* registry.getByProvider(effectiveProvider);
|
|
229524
|
+
const priorAccountId = readPersistedProviderAccountId(persistedBinding?.runtimePayload);
|
|
229525
|
+
const requestedAccountId = readProviderAccountIdFromModelSelection(input.modelSelection);
|
|
229526
|
+
if (effectiveProvider !== "codex" || persistedBinding?.provider !== effectiveProvider || (yield* adapter.hasSession(threadId))) yield* assertProviderAccountBoundary({
|
|
229499
229527
|
operation: "ProviderService.startSession",
|
|
229500
229528
|
threadId,
|
|
229501
|
-
persistedAccountId:
|
|
229502
|
-
requestedAccountId
|
|
229529
|
+
persistedAccountId: priorAccountId,
|
|
229530
|
+
requestedAccountId
|
|
229503
229531
|
});
|
|
229504
|
-
const effectiveResumeCursor = input.resumeCursor ?? (persistedBinding?.provider === effectiveProvider ? persistedBinding.resumeCursor : void 0);
|
|
229505
|
-
const adapter = yield* registry.getByProvider(effectiveProvider);
|
|
229506
229532
|
const boundResumeCursor = yield* bindProviderDeliveryToResumeCursor({
|
|
229507
229533
|
operation: "ProviderService.startSession",
|
|
229508
229534
|
provider: effectiveProvider,
|
|
229509
|
-
resumeCursor:
|
|
229535
|
+
resumeCursor: input.resumeCursor ?? (persistedBinding?.provider === effectiveProvider ? persistedBinding.resumeCursor : void 0),
|
|
229510
229536
|
currentBinding: yield* assertProviderExecutable({
|
|
229511
229537
|
threadId,
|
|
229512
229538
|
provider: effectiveProvider,
|
|
@@ -229515,6 +229541,7 @@ const makeProviderService = require_Schema$1.fn("makeProviderService")(function*
|
|
|
229515
229541
|
});
|
|
229516
229542
|
const session = yield* adapter.startSession({
|
|
229517
229543
|
...input,
|
|
229544
|
+
accountTransition: explicitProviderAccountTransition(priorAccountId, requestedAccountId),
|
|
229518
229545
|
...boundResumeCursor !== void 0 ? { resumeCursor: boundResumeCursor } : {}
|
|
229519
229546
|
});
|
|
229520
229547
|
if (session.provider !== adapter.provider) return yield* toValidationError("ProviderService.startSession", `Adapter/provider mismatch: requested '${adapter.provider}', received '${session.provider}'.`);
|
|
@@ -229816,15 +229843,15 @@ const makeProviderService = require_Schema$1.fn("makeProviderService")(function*
|
|
|
229816
229843
|
});
|
|
229817
229844
|
yield* require_Schema$1.addFinalizer(() => require_Schema$1.catch_(runStopAll(), (cause) => require_Schema$1.logWarning("failed to stop provider service", { cause })));
|
|
229818
229845
|
return {
|
|
229819
|
-
startSession,
|
|
229820
|
-
sendTurn,
|
|
229821
|
-
interruptTurn,
|
|
229822
|
-
respondToRequest,
|
|
229823
|
-
respondToUserInput,
|
|
229824
|
-
stopSession,
|
|
229846
|
+
startSession: (threadId, input) => withSessionLock(threadId, startSession(threadId, input)),
|
|
229847
|
+
sendTurn: (input) => withSessionLock(input?.threadId, sendTurn(input)),
|
|
229848
|
+
interruptTurn: (input) => withSessionLock(input?.threadId, interruptTurn(input)),
|
|
229849
|
+
respondToRequest: (input) => withSessionLock(input?.threadId, respondToRequest(input)),
|
|
229850
|
+
respondToUserInput: (input) => withSessionLock(input?.threadId, respondToUserInput(input)),
|
|
229851
|
+
stopSession: (input) => withSessionLock(input?.threadId, stopSession(input)),
|
|
229825
229852
|
listSessions,
|
|
229826
229853
|
getCapabilities,
|
|
229827
|
-
rollbackConversation,
|
|
229854
|
+
rollbackConversation: (input) => withSessionLock(input?.threadId, rollbackConversation(input)),
|
|
229828
229855
|
get streamEvents() {
|
|
229829
229856
|
return require_Path.fromPubSub(runtimeEventPubSub);
|
|
229830
229857
|
}
|
|
@@ -231071,7 +231098,7 @@ const createTrace2Monitor = require_Schema$1.fn("createTrace2Monitor")(function*
|
|
|
231071
231098
|
});
|
|
231072
231099
|
}
|
|
231073
231100
|
});
|
|
231074
|
-
const readTraceDelta = (yield* require_Path.make$
|
|
231101
|
+
const readTraceDelta = (yield* require_Path.make$5(1)).withPermit(fs.readFileString(traceFilePath).pipe(require_Schema$1.flatMap((contents) => require_Schema$1.uninterruptible(require_HttpServer.modify(traceTailState, ({ processedChars, remainder }) => {
|
|
231075
231102
|
if (contents.length <= processedChars) return [[], {
|
|
231076
231103
|
processedChars,
|
|
231077
231104
|
remainder
|
|
@@ -234690,7 +234717,7 @@ const makeTerminalManagerWithOptions = require_Schema$1.fn("makeTerminalManagerW
|
|
|
234690
234717
|
const getThreadSemaphore = (threadId) => modifyEffect(threadLocksRef, (current) => {
|
|
234691
234718
|
const existing = require_Schema$1.fromNullishOr(current.get(threadId));
|
|
234692
234719
|
return require_Schema$1.match$2(existing, {
|
|
234693
|
-
onNone: () => require_Path.make$
|
|
234720
|
+
onNone: () => require_Path.make$5(1).pipe(require_Schema$1.map((semaphore) => {
|
|
234694
234721
|
const next = new Map(current);
|
|
234695
234722
|
next.set(threadId, semaphore);
|
|
234696
234723
|
return [semaphore, next];
|
|
@@ -285848,7 +285875,7 @@ const make$10 = require_Schema$1.gen(function* () {
|
|
|
285848
285875
|
const runtimeContext = yield* require_Schema$1.context();
|
|
285849
285876
|
const runPromise = require_Schema$1.runPromiseWith(runtimeContext);
|
|
285850
285877
|
const eventState = makeApprovedWorkerPlanEventState();
|
|
285851
|
-
const reconcileSemaphore = yield* require_Path.make$
|
|
285878
|
+
const reconcileSemaphore = yield* require_Path.make$5(1);
|
|
285852
285879
|
const dispatch = (command) => runPromise(orchestration.dispatch(command).pipe(require_Schema$1.asVoid));
|
|
285853
285880
|
const readMasterContext = async (prompt) => {
|
|
285854
285881
|
const thread = require_Schema$1.getOrNull(await runPromise(readDurableWorkerDetail(projectionSnapshotQuery, ThreadId.make(prompt.masterThreadId))));
|
|
@@ -287244,7 +287271,7 @@ const makeRuntimeDrainReporter = require_Schema$1.gen(function* () {
|
|
|
287244
287271
|
const providerService = yield* ProviderService;
|
|
287245
287272
|
const serverConfig = yield* ServerConfig;
|
|
287246
287273
|
const spriteTaskHoldReactor = yield* SpriteTaskHoldReactor;
|
|
287247
|
-
const reportSemaphore = yield* require_Path.make$
|
|
287274
|
+
const reportSemaphore = yield* require_Path.make$5(1);
|
|
287248
287275
|
let heartbeatSilent = false;
|
|
287249
287276
|
const postHeartbeat = (config, snapshot) => require_Schema$1.promise(async () => {
|
|
287250
287277
|
const forgeGitCommit = await resolveForgeGitCommit();
|
|
@@ -294041,7 +294068,7 @@ function resolveBuildCommitFromEnv(env) {
|
|
|
294041
294068
|
* environment descriptor down instead of reporting an honest "unknown".
|
|
294042
294069
|
*/
|
|
294043
294070
|
function readBakedBuildCommit() {
|
|
294044
|
-
return "
|
|
294071
|
+
return "fe3ee5efe095539824d092372a8dde00f1e2f98c";
|
|
294045
294072
|
}
|
|
294046
294073
|
async function resolveServerBuildCommit(input) {
|
|
294047
294074
|
if (isFullCommitSha(input.baked)) return input.baked;
|
|
@@ -311106,7 +311133,7 @@ const makePipelineRunCoordinator = require_Schema$1.gen(function* () {
|
|
|
311106
311133
|
preparation: preparedHandoff.providerAuthorityPreparation
|
|
311107
311134
|
});
|
|
311108
311135
|
const acceptingHeartbeatRef = yield* require_HttpServer.make$3(true);
|
|
311109
|
-
const heartbeatPublicationSemaphore = yield* require_Path.make$
|
|
311136
|
+
const heartbeatPublicationSemaphore = yield* require_Path.make$5(1);
|
|
311110
311137
|
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.");
|
|
311111
311138
|
const snapshot = preparedHandoff.snapshot;
|
|
311112
311139
|
const readModel = yield* orchestration.getReadModel();
|
|
@@ -314992,7 +315019,7 @@ function makeProjectLeadSchedulerLive(options = {}) {
|
|
|
314992
315019
|
return require_Schema$1.effect(ProjectLeadScheduler, require_Schema$1.gen(function* () {
|
|
314993
315020
|
const client = yield* ProjectLeadControllerClient;
|
|
314994
315021
|
const dispatcher = yield* ProjectLeadReservationDispatcher;
|
|
314995
|
-
const semaphore = yield* require_Path.make$
|
|
315022
|
+
const semaphore = yield* require_Path.make$5(1);
|
|
314996
315023
|
const leaseSeconds = options.leaseSeconds ?? DEFAULT_LEASE_SECONDS;
|
|
314997
315024
|
const batchSize = options.batchSize ?? DEFAULT_BATCH_SIZE;
|
|
314998
315025
|
const projectLimit = options.projectLimit ?? DEFAULT_PROJECT_LIMIT;
|
|
@@ -317011,13 +317038,13 @@ const gitUrlCloneRouteLayer = add$1("POST", "/api/cloud/git/clone-url", require_
|
|
|
317011
317038
|
//#endregion
|
|
317012
317039
|
//#region src/server.ts
|
|
317013
317040
|
const PtyAdapterLive = require_Schema$1.unwrap(require_Schema$1.gen(function* () {
|
|
317014
|
-
if (typeof Bun !== "undefined") return (yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./BunPTY-
|
|
317015
|
-
else return (yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./NodePTY-
|
|
317041
|
+
if (typeof Bun !== "undefined") return (yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./BunPTY-86ttlTi6.cjs")))).layer;
|
|
317042
|
+
else return (yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./NodePTY-Cps0jsDA.cjs")))).layer;
|
|
317016
317043
|
}));
|
|
317017
317044
|
const HttpServerLive = require_Schema$1.unwrap(require_Schema$1.gen(function* () {
|
|
317018
317045
|
const config = yield* ServerConfig;
|
|
317019
|
-
if (typeof Bun !== "undefined") return (yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./BunHttpServer-
|
|
317020
|
-
const [NodeHttpServer, NodeHttp] = yield* require_Schema$1.all([require_Schema$1.promise(() => Promise.resolve().then(() => require("./NodeHttpServer-
|
|
317046
|
+
if (typeof Bun !== "undefined") return (yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./BunHttpServer-BhE7Szci.cjs")))).layer(bunHttpServerOptions(config));
|
|
317047
|
+
const [NodeHttpServer, NodeHttp] = yield* require_Schema$1.all([require_Schema$1.promise(() => Promise.resolve().then(() => require("./NodeHttpServer-BPjxt_DT.cjs"))), require_Schema$1.promise(() => import("node:http"))]);
|
|
317021
317048
|
return NodeHttpServer.layer(NodeHttp.createServer, {
|
|
317022
317049
|
host: config.host,
|
|
317023
317050
|
port: config.port
|
|
@@ -317025,10 +317052,10 @@ const HttpServerLive = require_Schema$1.unwrap(require_Schema$1.gen(function* ()
|
|
|
317025
317052
|
}));
|
|
317026
317053
|
const PlatformServicesLive = require_Schema$1.unwrap(require_Schema$1.gen(function* () {
|
|
317027
317054
|
if (typeof Bun !== "undefined") {
|
|
317028
|
-
const { layer } = yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./BunServices-
|
|
317055
|
+
const { layer } = yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./BunServices-BwE9KexF.cjs")));
|
|
317029
317056
|
return layer;
|
|
317030
317057
|
} else {
|
|
317031
|
-
const { layer } = yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./NodeServices-
|
|
317058
|
+
const { layer } = yield* require_Schema$1.promise(() => Promise.resolve().then(() => require("./NodeServices-Ddr-tYRu.cjs")));
|
|
317032
317059
|
return layer;
|
|
317033
317060
|
}
|
|
317034
317061
|
}));
|