@cmmd-center/forge 0.13.94 → 0.13.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +126 -29
- package/dist/bin.mjs +151 -54
- package/dist/client/assets/{CanvasPanel-By1TNSCJ.js → CanvasPanel-BsTCRB1I.js} +2 -2
- package/dist/client/assets/{CompositeItem-B4KFI6uM.js → CompositeItem-DNkNENOR.js} +2 -2
- package/dist/client/assets/{DiffPanel-W2IJB2F9.js → DiffPanel-CAkf79MN.js} +2 -2
- package/dist/client/assets/{DiffPanel.logic-D-ynbsKZ.js → DiffPanel.logic-B9IU5Q5Q.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-h4bACnie.js → DiffWorkerPoolProvider-BaJzbqHW.js} +2 -2
- package/dist/client/assets/{PullRequestCodePanel-Bphx591a.js → PullRequestCodePanel-ItXVNv0A.js} +2 -2
- package/dist/client/assets/{Virtualizer-BGM8Aavb.js → Virtualizer-D6N688Z0.js} +2 -2
- package/dist/client/assets/{WorkerPoolContext-dJEWASlP.js → WorkerPoolContext-Q7KzTxot.js} +31 -31
- package/dist/client/assets/{canvasStateStore-DoXLRnB-.js → canvasStateStore-Dl3vO1ug.js} +2 -2
- package/dist/client/assets/{cmmdAuthRedirect-DJMI3b92.js → cmmdAuthRedirect-DCgS12fq.js} +2 -2
- package/dist/client/assets/{index-_uhZ-JUt.js → index-CuTM56F9.js} +60 -60
- package/dist/client/assets/{popover-DlZTqPIV.js → popover-C9fxnFA4.js} +2 -2
- package/dist/client/assets/{src-1F7f5y9L.js → src-DFTFXdyK.js} +2 -2
- package/dist/client/assets/{toggle-BwedUJ-z.js → toggle-Ks6yUkoN.js} +2 -2
- package/dist/client/index.html +10 -10
- package/dist/forge-build.json +1 -1
- package/dist/{open-yHTUkd2Y.mjs → open-2-reBrpv.mjs} +3 -3
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -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 $U, { 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";
|
|
@@ -22813,6 +22813,25 @@ const ProviderUnavailableDetail = Literals([
|
|
|
22813
22813
|
"reconnect-required"
|
|
22814
22814
|
]);
|
|
22815
22815
|
/**
|
|
22816
|
+
* Whether the check behind this snapshot's `installed`/`status`/`auth`/`models`
|
|
22817
|
+
* fields actually completed (`confirmed`), or a probe failed, timed out, or
|
|
22818
|
+
* errored before it could answer (`could-not-check`). Absent means the
|
|
22819
|
+
* snapshot predates this field and carries no opinion either way.
|
|
22820
|
+
*
|
|
22821
|
+
* Deliberately not a new `ProviderUnavailableReason` member, and not folded
|
|
22822
|
+
* into `ProviderUnavailableDetail`. That union is the wire vocabulary a
|
|
22823
|
+
* separate CMMD receiver already validates with a `.strict()` schema (see
|
|
22824
|
+
* `docs/adr/withheld-providers-carry-their-reason.md`), and a value that
|
|
22825
|
+
* receiver has never heard of fails the whole snapshot, which its outbox then
|
|
22826
|
+
* retries forever. A brand new field costs a receiver that has never heard of
|
|
22827
|
+
* it nothing: Effect Schema drops an unrecognized struct property instead of
|
|
22828
|
+
* failing the decode, and `serializeProviderCatalog`
|
|
22829
|
+
* (`apps/server/src/runtimeReplication/providerCatalog.ts`) never copies this
|
|
22830
|
+
* field to that wire in the first place, so the CMMD-facing shape does not
|
|
22831
|
+
* change at all.
|
|
22832
|
+
*/
|
|
22833
|
+
const ProviderAvailabilityCheck = Literals(["confirmed", "could-not-check"]);
|
|
22834
|
+
/**
|
|
22816
22835
|
* Whether the provider CLI honours the credential-directory variable, as this
|
|
22817
22836
|
* Environment's probe found. `inconclusive` is a probe that ran and could not
|
|
22818
22837
|
* tell. It is not `unsupported`, and it is never reported as `supported`. The
|
|
@@ -22869,6 +22888,8 @@ const ServerProvider = Struct({
|
|
|
22869
22888
|
availability: optional$4(ProviderAvailability),
|
|
22870
22889
|
unavailableReason: optional$4(ProviderUnavailableReason),
|
|
22871
22890
|
unavailableDetail: optional$4(ProviderUnavailableDetail),
|
|
22891
|
+
availabilityCheck: optional$4(ProviderAvailabilityCheck),
|
|
22892
|
+
lastConfirmedAt: optional$4(IsoDateTime),
|
|
22872
22893
|
credentialDirectory: optional$4(ProviderCredentialDirectoryAnswer),
|
|
22873
22894
|
credentialStore: optional$4(ProviderCredentialStore),
|
|
22874
22895
|
slashCommands: ArraySchema(ServerProviderSlashCommand).pipe(withDecodingDefault(succeed([]))),
|
|
@@ -50632,7 +50653,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
50632
50653
|
const min = forceColor || 0;
|
|
50633
50654
|
if (env.TERM === "dumb") return min;
|
|
50634
50655
|
if (process$1.platform === "win32") {
|
|
50635
|
-
const osRelease =
|
|
50656
|
+
const osRelease = $U.release().split(".");
|
|
50636
50657
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
50637
50658
|
return 1;
|
|
50638
50659
|
}
|
|
@@ -53075,7 +53096,7 @@ var require_ProcessDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53075
53096
|
exports.processDetector = void 0;
|
|
53076
53097
|
const api_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
53077
53098
|
const semconv_1 = require_semconv$1();
|
|
53078
|
-
const os$
|
|
53099
|
+
const os$3 = __require("os");
|
|
53079
53100
|
/**
|
|
53080
53101
|
* ProcessDetector will be used to detect the resources related current process running
|
|
53081
53102
|
* and being instrumented from the NodeJS Process module.
|
|
@@ -53097,7 +53118,7 @@ var require_ProcessDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53097
53118
|
};
|
|
53098
53119
|
if (process.argv.length > 1) attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
|
|
53099
53120
|
try {
|
|
53100
|
-
const userInfo = os$
|
|
53121
|
+
const userInfo = os$3.userInfo();
|
|
53101
53122
|
attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo.username;
|
|
53102
53123
|
} catch (e) {
|
|
53103
53124
|
api_1.diag.debug(`error obtaining process owner: ${e}`);
|
|
@@ -66020,7 +66041,7 @@ function normalizeNumberish(value) {
|
|
|
66020
66041
|
}
|
|
66021
66042
|
//#endregion
|
|
66022
66043
|
//#region package.json
|
|
66023
|
-
var version$1 = "0.13.
|
|
66044
|
+
var version$1 = "0.13.95";
|
|
66024
66045
|
//#endregion
|
|
66025
66046
|
//#region src/sentry.ts
|
|
66026
66047
|
const SERVER_APP_NAME = "forge-server";
|
|
@@ -76090,7 +76111,7 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
76090
76111
|
var fs$6 = __require("fs");
|
|
76091
76112
|
var path$5 = __require("path");
|
|
76092
76113
|
var url$1 = __require("url");
|
|
76093
|
-
var os$
|
|
76114
|
+
var os$2 = __require("os");
|
|
76094
76115
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
76095
76116
|
var vars = process.config && process.config.variables || {};
|
|
76096
76117
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
@@ -76098,8 +76119,8 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
76098
76119
|
var abi = versions.modules;
|
|
76099
76120
|
if (versions.deno || process.isBun) abi = "unsupported";
|
|
76100
76121
|
var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
|
|
76101
|
-
var arch = process.env.npm_config_arch || os$
|
|
76102
|
-
var platform = process.env.npm_config_platform || os$
|
|
76122
|
+
var arch = process.env.npm_config_arch || os$2.arch();
|
|
76123
|
+
var platform = process.env.npm_config_platform || os$2.platform();
|
|
76103
76124
|
var libc = process.env.LIBC || (isMusl(platform) ? "musl" : "glibc");
|
|
76104
76125
|
var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || "";
|
|
76105
76126
|
var uv = (versions.uv || "").split(".")[0];
|
|
@@ -93943,7 +93964,7 @@ const launchDetached = (launch) => gen(function* () {
|
|
|
93943
93964
|
});
|
|
93944
93965
|
const OpenLive = effect(Open, gen(function* () {
|
|
93945
93966
|
const open = yield* tryPromise({
|
|
93946
|
-
try: () => import("./open-
|
|
93967
|
+
try: () => import("./open-2-reBrpv.mjs"),
|
|
93947
93968
|
catch: (cause) => new OpenError$1({
|
|
93948
93969
|
message: "failed to load browser opener",
|
|
93949
93970
|
cause
|
|
@@ -191901,7 +191922,7 @@ var Vce = {
|
|
|
191901
191922
|
function Ve() {
|
|
191902
191923
|
return Vce;
|
|
191903
191924
|
}
|
|
191904
|
-
var Us =
|
|
191925
|
+
var Us = $U.homedir(), lk = $U.tmpdir(), { env: Vc } = process$1, Yce = (e) => {
|
|
191905
191926
|
let t = path.join(Us, "Library");
|
|
191906
191927
|
return {
|
|
191907
191928
|
data: path.join(t, "Application Support", e),
|
|
@@ -202101,12 +202122,12 @@ function qZ(e, t) {
|
|
|
202101
202122
|
}
|
|
202102
202123
|
return n;
|
|
202103
202124
|
}
|
|
202104
|
-
var os$
|
|
202125
|
+
var os$1 = "https://code.claude.com/docs/en", kKe = [
|
|
202105
202126
|
{
|
|
202106
202127
|
matches: (e) => e.path === "permissions.defaultMode" && e.code === "invalid_value",
|
|
202107
202128
|
tip: {
|
|
202108
202129
|
suggestion: "Valid modes: \"acceptEdits\" (ask before file changes), \"plan\" (analysis only), \"bypassPermissions\" (auto-accept all), or \"default\" (standard behavior)",
|
|
202109
|
-
docLink: `${os$
|
|
202130
|
+
docLink: `${os$1}/iam#permission-modes`
|
|
202110
202131
|
}
|
|
202111
202132
|
},
|
|
202112
202133
|
{
|
|
@@ -202121,7 +202142,7 @@ var os$2 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202121
202142
|
matches: (e) => e.path.startsWith("env.") && e.code === "invalid_type",
|
|
202122
202143
|
tip: {
|
|
202123
202144
|
suggestion: "Environment variables must be strings. Wrap numbers and booleans in quotes. Example: \"DEBUG\": \"true\", \"PORT\": \"3000\"",
|
|
202124
|
-
docLink: `${os$
|
|
202145
|
+
docLink: `${os$1}/settings#environment-variables`
|
|
202125
202146
|
}
|
|
202126
202147
|
},
|
|
202127
202148
|
{
|
|
@@ -202132,14 +202153,14 @@ var os$2 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202132
202153
|
matches: (e) => e.path.startsWith("hooks.") && e.code === "invalid_key",
|
|
202133
202154
|
tip: {
|
|
202134
202155
|
suggestion: "Not a recognized hook event. Common events: PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, Stop. Check spelling and capitalization.",
|
|
202135
|
-
docLink: `${os$
|
|
202156
|
+
docLink: `${os$1}/hooks`
|
|
202136
202157
|
}
|
|
202137
202158
|
},
|
|
202138
202159
|
{
|
|
202139
202160
|
matches: (e) => /\.hooks\.\d+\.command$/.test(e.path) && e.code === "invalid_type" && e.received === "undefined",
|
|
202140
202161
|
tip: {
|
|
202141
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\"}.",
|
|
202142
|
-
docLink: `${os$
|
|
202163
|
+
docLink: `${os$1}/hooks#exec-form-and-shell-form`
|
|
202143
202164
|
}
|
|
202144
202165
|
},
|
|
202145
202166
|
{
|
|
@@ -202154,7 +202175,7 @@ var os$2 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202154
202175
|
matches: (e) => e.code === "unrecognized_keys",
|
|
202155
202176
|
tip: {
|
|
202156
202177
|
suggestion: "Check for typos or refer to the documentation for valid fields",
|
|
202157
|
-
docLink: `${os$
|
|
202178
|
+
docLink: `${os$1}/settings`
|
|
202158
202179
|
}
|
|
202159
202180
|
},
|
|
202160
202181
|
{
|
|
@@ -202169,13 +202190,13 @@ var os$2 = "https://code.claude.com/docs/en", kKe = [
|
|
|
202169
202190
|
matches: (e) => e.path === "permissions.additionalDirectories" && e.code === "invalid_type",
|
|
202170
202191
|
tip: {
|
|
202171
202192
|
suggestion: "Must be an array of directory paths. Example: [\"~/projects\", \"/tmp/workspace\"]. You can also use --add-dir flag or /add-dir command",
|
|
202172
|
-
docLink: `${os$
|
|
202193
|
+
docLink: `${os$1}/iam#working-directories`
|
|
202173
202194
|
}
|
|
202174
202195
|
}
|
|
202175
202196
|
], AKe = {
|
|
202176
|
-
permissions: `${os$
|
|
202177
|
-
env: `${os$
|
|
202178
|
-
hooks: `${os$
|
|
202197
|
+
permissions: `${os$1}/iam#configuring-permissions`,
|
|
202198
|
+
env: `${os$1}/settings#environment-variables`,
|
|
202199
|
+
hooks: `${os$1}/hooks`
|
|
202179
202200
|
};
|
|
202180
202201
|
function GZ(e) {
|
|
202181
202202
|
let t = kKe.find((r) => r.matches(e));
|
|
@@ -212178,6 +212199,17 @@ function isCommandMissingCause(error) {
|
|
|
212178
212199
|
const lower = error.message.toLowerCase();
|
|
212179
212200
|
return lower.includes("enoent") || lower.includes("notfound");
|
|
212180
212201
|
}
|
|
212202
|
+
/**
|
|
212203
|
+
* The one thing a spawn failure answers for sure when it is command-missing
|
|
212204
|
+
* shaped: the binary is not there. Any other spawn failure (a permissions
|
|
212205
|
+
* error, a crashed shell, a Sprite freeze mid-spawn) never actually asked the
|
|
212206
|
+
* CLI anything, so it is not evidence the binary is missing (forge#3588).
|
|
212207
|
+
* Shared by every provider Layer's version-probe failure branch so the
|
|
212208
|
+
* classification reads the same way everywhere it is made.
|
|
212209
|
+
*/
|
|
212210
|
+
function availabilityCheckForSpawnFailure(commandMissing) {
|
|
212211
|
+
return commandMissing ? "confirmed" : "could-not-check";
|
|
212212
|
+
}
|
|
212181
212213
|
const spawnAndCollect = (binaryPath, command) => gen(function* () {
|
|
212182
212214
|
const child = yield* (yield* ChildProcessSpawner).spawn(command);
|
|
212183
212215
|
const [stdout, stderr, exitCode] = yield* all([
|
|
@@ -212284,6 +212316,7 @@ function buildServerProvider(input) {
|
|
|
212284
212316
|
auth: input.probe.auth,
|
|
212285
212317
|
checkedAt: input.checkedAt,
|
|
212286
212318
|
...input.probe.message ? { message: input.probe.message } : {},
|
|
212319
|
+
...input.probe.availabilityCheck ? { availabilityCheck: input.probe.availabilityCheck } : {},
|
|
212287
212320
|
models: input.models,
|
|
212288
212321
|
slashCommands: [...input.slashCommands ?? []],
|
|
212289
212322
|
skills: [...withForgeBuiltInSkills(input.skills)]
|
|
@@ -214365,17 +214398,27 @@ const makeManagedServerProvider = fn$1("makeManagedServerProvider")(function* (i
|
|
|
214365
214398
|
});
|
|
214366
214399
|
yield* runForEach(input.streamSettings, (nextSettings) => asVoid(applySnapshot(nextSettings))).pipe(forkScoped);
|
|
214367
214400
|
const refreshFailureCount = yield* make$50(0);
|
|
214401
|
+
const QUICK_RETRY_MS = 5e3;
|
|
214402
|
+
const MAX_QUICK_RETRIES = 3;
|
|
214403
|
+
const quickRetriesSoFar = yield* make$50(0);
|
|
214368
214404
|
yield* forever$1(gen(function* () {
|
|
214369
214405
|
const failureCount = yield* get$6(refreshFailureCount);
|
|
214406
|
+
const quickRetriesDone = yield* get$6(quickRetriesSoFar);
|
|
214370
214407
|
const baseMs = 6e4;
|
|
214371
|
-
|
|
214372
|
-
|
|
214408
|
+
const backoffMs = Math.min(baseMs * Math.pow(2, failureCount), 3e5);
|
|
214409
|
+
yield* sleep$4(millis(quickRetriesDone > 0 ? QUICK_RETRY_MS : backoffMs));
|
|
214410
|
+
const result = yield* refreshSnapshot().pipe(tapError((e) => sync$1(() => captureServerError(e))), exit);
|
|
214411
|
+
if (isFailure(result)) {
|
|
214373
214412
|
yield* update$4(refreshFailureCount, (n) => Math.min(n + 1, 4));
|
|
214413
|
+
yield* set$3(quickRetriesSoFar, 0);
|
|
214374
214414
|
yield* logInfo("Provider refresh failed, backing off", {
|
|
214375
214415
|
failureCount: failureCount + 1,
|
|
214376
214416
|
nextDelayMs: Math.min(baseMs * Math.pow(2, failureCount + 1), 3e5)
|
|
214377
214417
|
});
|
|
214378
|
-
} else
|
|
214418
|
+
} else {
|
|
214419
|
+
yield* set$3(refreshFailureCount, 0);
|
|
214420
|
+
yield* set$3(quickRetriesSoFar, result.value.availabilityCheck === "could-not-check" && quickRetriesDone < MAX_QUICK_RETRIES ? quickRetriesDone + 1 : 0);
|
|
214421
|
+
}
|
|
214379
214422
|
})).pipe(forkScoped);
|
|
214380
214423
|
return {
|
|
214381
214424
|
getSnapshot: input.getSettings.pipe(flatMap(applySnapshot), tapError(logError), orDie),
|
|
@@ -215028,7 +215071,8 @@ function buildClaudeProviderFromAuthProbe(input) {
|
|
|
215028
215071
|
version: input.parsedVersion,
|
|
215029
215072
|
status: "warning",
|
|
215030
215073
|
auth: { status: "unknown" },
|
|
215031
|
-
message: error instanceof Error ? `Could not verify Claude authentication status: ${error.message}.` : "Could not verify Claude authentication status."
|
|
215074
|
+
message: error instanceof Error ? `Could not verify Claude authentication status: ${error.message}.` : "Could not verify Claude authentication status.",
|
|
215075
|
+
availabilityCheck: "could-not-check"
|
|
215032
215076
|
}
|
|
215033
215077
|
});
|
|
215034
215078
|
}
|
|
@@ -215049,7 +215093,8 @@ function buildClaudeProviderFromAuthProbe(input) {
|
|
|
215049
215093
|
status: "warning",
|
|
215050
215094
|
auth: { status: "unknown" },
|
|
215051
215095
|
message: "Could not verify Claude authentication status. Timed out while running command."
|
|
215052
|
-
}
|
|
215096
|
+
},
|
|
215097
|
+
availabilityCheck: "could-not-check"
|
|
215053
215098
|
}
|
|
215054
215099
|
});
|
|
215055
215100
|
const parsed = parseClaudeAuthStatusFromOutput(input.authProbe.success.value, { proxiedCredential: input.provenance.credentialScope === "proxied" });
|
|
@@ -215068,7 +215113,8 @@ function buildClaudeProviderFromAuthProbe(input) {
|
|
|
215068
215113
|
...input.authMetadata ? input.authMetadata : {},
|
|
215069
215114
|
provenance: input.provenance
|
|
215070
215115
|
},
|
|
215071
|
-
...parsed.message ? { message: parsed.message } : {}
|
|
215116
|
+
...parsed.message ? { message: parsed.message } : {},
|
|
215117
|
+
availabilityCheck: "confirmed"
|
|
215072
215118
|
}
|
|
215073
215119
|
});
|
|
215074
215120
|
}
|
|
@@ -215134,7 +215180,8 @@ function claudeVersionProbeTimeoutProvider(input) {
|
|
|
215134
215180
|
version: null,
|
|
215135
215181
|
status: "error",
|
|
215136
215182
|
auth: { status: "unknown" },
|
|
215137
|
-
message: "Claude Agent CLI is installed but failed to run. Timed out while running command."
|
|
215183
|
+
message: "Claude Agent CLI is installed but failed to run. Timed out while running command.",
|
|
215184
|
+
availabilityCheck: "could-not-check"
|
|
215138
215185
|
}
|
|
215139
215186
|
});
|
|
215140
215187
|
}
|
|
@@ -215166,7 +215213,8 @@ const nativeClaudeProviderStatus = fn$1("nativeClaudeProviderStatus")(function*
|
|
|
215166
215213
|
status: usable ? "authenticated" : "unauthenticated",
|
|
215167
215214
|
provenance: input.provenance
|
|
215168
215215
|
},
|
|
215169
|
-
...usable ? {} : { message: claudeNativeCredentialUnusableMessage() }
|
|
215216
|
+
...usable ? {} : { message: claudeNativeCredentialUnusableMessage() },
|
|
215217
|
+
availabilityCheck: "confirmed"
|
|
215170
215218
|
}
|
|
215171
215219
|
});
|
|
215172
215220
|
});
|
|
@@ -215212,23 +215260,26 @@ const checkClaudeProviderStatus = fn$1("checkClaudeProviderStatus")(function* (r
|
|
|
215212
215260
|
version: null,
|
|
215213
215261
|
status: "warning",
|
|
215214
215262
|
auth: { status: "unknown" },
|
|
215215
|
-
message: "Claude is disabled in Forge settings."
|
|
215263
|
+
message: "Claude is disabled in Forge settings.",
|
|
215264
|
+
availabilityCheck: "confirmed"
|
|
215216
215265
|
}
|
|
215217
215266
|
});
|
|
215218
215267
|
const versionProbe = yield* runClaudeCommand(["--version"]).pipe(timeoutOption(CLAUDE_VERSION_PROBE_TIMEOUT_MS), result);
|
|
215219
215268
|
if (isFailure$1(versionProbe)) {
|
|
215220
215269
|
const error = versionProbe.failure;
|
|
215270
|
+
const commandMissing = isCommandMissingCause(error);
|
|
215221
215271
|
return buildServerProvider({
|
|
215222
215272
|
provider: PROVIDER$12,
|
|
215223
215273
|
enabled: claudeSettings.enabled,
|
|
215224
215274
|
checkedAt,
|
|
215225
215275
|
models: fallbackModels,
|
|
215226
215276
|
probe: {
|
|
215227
|
-
installed: !
|
|
215277
|
+
installed: !commandMissing,
|
|
215228
215278
|
version: null,
|
|
215229
215279
|
status: "error",
|
|
215230
215280
|
auth: { status: "unknown" },
|
|
215231
|
-
message:
|
|
215281
|
+
message: commandMissing ? "Claude Agent CLI (`claude`) is not installed or not on PATH." : `Failed to execute Claude Agent CLI health check: ${error instanceof Error ? error.message : String(error)}.`,
|
|
215282
|
+
availabilityCheck: availabilityCheckForSpawnFailure(commandMissing)
|
|
215232
215283
|
}
|
|
215233
215284
|
});
|
|
215234
215285
|
}
|
|
@@ -215251,7 +215302,8 @@ const checkClaudeProviderStatus = fn$1("checkClaudeProviderStatus")(function* (r
|
|
|
215251
215302
|
version: parsedVersion,
|
|
215252
215303
|
status: "error",
|
|
215253
215304
|
auth: { status: "unknown" },
|
|
215254
|
-
message: detail ? `Claude Agent CLI is installed but failed to run. ${detail}` : "Claude Agent CLI is installed but failed to run."
|
|
215305
|
+
message: detail ? `Claude Agent CLI is installed but failed to run. ${detail}` : "Claude Agent CLI is installed but failed to run.",
|
|
215306
|
+
availabilityCheck: "confirmed"
|
|
215255
215307
|
}
|
|
215256
215308
|
});
|
|
215257
215309
|
}
|
|
@@ -237357,23 +237409,26 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237357
237409
|
status: "unknown",
|
|
237358
237410
|
provenance
|
|
237359
237411
|
},
|
|
237360
|
-
message: "Codex is disabled in Forge settings."
|
|
237412
|
+
message: "Codex is disabled in Forge settings.",
|
|
237413
|
+
availabilityCheck: "confirmed"
|
|
237361
237414
|
}
|
|
237362
237415
|
});
|
|
237363
237416
|
const versionProbe = yield* runCodexCommand(["--version"]).pipe(timeoutOption(CODEX_VERSION_PROBE_TIMEOUT_MS), result);
|
|
237364
237417
|
if (isFailure$1(versionProbe)) {
|
|
237365
237418
|
const error = versionProbe.failure;
|
|
237419
|
+
const commandMissing = isCommandMissingCause(error);
|
|
237366
237420
|
return buildServerProvider({
|
|
237367
237421
|
provider: PROVIDER$4,
|
|
237368
237422
|
enabled: codexSettings.enabled,
|
|
237369
237423
|
checkedAt,
|
|
237370
237424
|
models: fallbackModels,
|
|
237371
237425
|
probe: {
|
|
237372
|
-
installed: !
|
|
237426
|
+
installed: !commandMissing,
|
|
237373
237427
|
version: null,
|
|
237374
237428
|
status: "error",
|
|
237375
237429
|
auth: { status: "unknown" },
|
|
237376
|
-
message:
|
|
237430
|
+
message: commandMissing ? "Codex CLI (`codex`) is not installed or not on PATH." : `Failed to execute Codex CLI health check: ${error.message}.`,
|
|
237431
|
+
availabilityCheck: availabilityCheckForSpawnFailure(commandMissing)
|
|
237377
237432
|
}
|
|
237378
237433
|
});
|
|
237379
237434
|
}
|
|
@@ -237387,7 +237442,8 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237387
237442
|
version: null,
|
|
237388
237443
|
status: "error",
|
|
237389
237444
|
auth: { status: "unknown" },
|
|
237390
|
-
message: "Codex CLI is installed but failed to run. Timed out while running command."
|
|
237445
|
+
message: "Codex CLI is installed but failed to run. Timed out while running command.",
|
|
237446
|
+
availabilityCheck: "could-not-check"
|
|
237391
237447
|
}
|
|
237392
237448
|
});
|
|
237393
237449
|
const version = versionProbe.success.value;
|
|
@@ -237404,7 +237460,8 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237404
237460
|
version: parsedVersion,
|
|
237405
237461
|
status: "error",
|
|
237406
237462
|
auth: { status: "unknown" },
|
|
237407
|
-
message: detail ? `Codex CLI is installed but failed to run. ${detail}` : "Codex CLI is installed but failed to run."
|
|
237463
|
+
message: detail ? `Codex CLI is installed but failed to run. ${detail}` : "Codex CLI is installed but failed to run.",
|
|
237464
|
+
availabilityCheck: "confirmed"
|
|
237408
237465
|
}
|
|
237409
237466
|
});
|
|
237410
237467
|
}
|
|
@@ -237418,7 +237475,8 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237418
237475
|
version: parsedVersion,
|
|
237419
237476
|
status: "error",
|
|
237420
237477
|
auth: { status: "unknown" },
|
|
237421
|
-
message: formatCodexCliUpgradeMessage(parsedVersion)
|
|
237478
|
+
message: formatCodexCliUpgradeMessage(parsedVersion),
|
|
237479
|
+
availabilityCheck: "confirmed"
|
|
237422
237480
|
}
|
|
237423
237481
|
});
|
|
237424
237482
|
const skills = (resolveSkills ? yield* resolveSkills({
|
|
@@ -237443,7 +237501,8 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237443
237501
|
version: parsedVersion,
|
|
237444
237502
|
status: "ready",
|
|
237445
237503
|
auth: { status: "unknown" },
|
|
237446
|
-
message: "Using a custom Codex model provider; OpenAI login check skipped."
|
|
237504
|
+
message: "Using a custom Codex model provider; OpenAI login check skipped.",
|
|
237505
|
+
availabilityCheck: "confirmed"
|
|
237447
237506
|
}
|
|
237448
237507
|
});
|
|
237449
237508
|
const authProbe = yield* runCodexCommand(["login", "status"]).pipe(timeoutOption(CODEX_AUTH_PROBE_TIMEOUT_MS), result);
|
|
@@ -237465,7 +237524,8 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237465
237524
|
version: parsedVersion,
|
|
237466
237525
|
status: "warning",
|
|
237467
237526
|
auth: { status: "unknown" },
|
|
237468
|
-
message: `Could not verify Codex authentication status: ${error.message}
|
|
237527
|
+
message: `Could not verify Codex authentication status: ${error.message}.`,
|
|
237528
|
+
availabilityCheck: "could-not-check"
|
|
237469
237529
|
}
|
|
237470
237530
|
});
|
|
237471
237531
|
}
|
|
@@ -237480,7 +237540,8 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237480
237540
|
version: parsedVersion,
|
|
237481
237541
|
status: "warning",
|
|
237482
237542
|
auth: { status: "unknown" },
|
|
237483
|
-
message: "Codex authentication status check did not respond in time. The agent can still run; refresh the provider from Settings to retry."
|
|
237543
|
+
message: "Codex authentication status check did not respond in time. The agent can still run; refresh the provider from Settings to retry.",
|
|
237544
|
+
availabilityCheck: "could-not-check"
|
|
237484
237545
|
}
|
|
237485
237546
|
});
|
|
237486
237547
|
const parsed = parseAuthStatusFromOutput(authProbe.success.value);
|
|
@@ -237507,7 +237568,8 @@ const checkCodexProviderStatus = fn$1("checkCodexProviderStatus")(function* (res
|
|
|
237507
237568
|
...accountEmail ? { accountLabel: accountEmail } : {}
|
|
237508
237569
|
}
|
|
237509
237570
|
},
|
|
237510
|
-
...parsed.message ? { message: parsed.message } : {}
|
|
237571
|
+
...parsed.message ? { message: parsed.message } : {},
|
|
237572
|
+
availabilityCheck: "confirmed"
|
|
237511
237573
|
}
|
|
237512
237574
|
});
|
|
237513
237575
|
});
|
|
@@ -270714,7 +270776,7 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
|
|
|
270714
270776
|
var dgram = __require("dgram");
|
|
270715
270777
|
var thunky = require_thunky();
|
|
270716
270778
|
var events = __require("events");
|
|
270717
|
-
var os
|
|
270779
|
+
var os = __require("os");
|
|
270718
270780
|
var noop = function() {};
|
|
270719
270781
|
module.exports = function(opts) {
|
|
270720
270782
|
if (!opts) opts = {};
|
|
@@ -270845,14 +270907,14 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
|
|
|
270845
270907
|
return that;
|
|
270846
270908
|
};
|
|
270847
270909
|
function defaultInterface() {
|
|
270848
|
-
var networks = os
|
|
270910
|
+
var networks = os.networkInterfaces();
|
|
270849
270911
|
var names = Object.keys(networks);
|
|
270850
270912
|
for (var i = 0; i < names.length; i++) {
|
|
270851
270913
|
var net = networks[names[i]];
|
|
270852
270914
|
for (var j = 0; j < net.length; j++) {
|
|
270853
270915
|
var iface = net[j];
|
|
270854
270916
|
if (isIPv4(iface.family) && !iface.internal) {
|
|
270855
|
-
if (os
|
|
270917
|
+
if (os.platform() === "darwin" && names[i] === "en0") return iface.address;
|
|
270856
270918
|
return "0.0.0.0";
|
|
270857
270919
|
}
|
|
270858
270920
|
}
|
|
@@ -270860,7 +270922,7 @@ var import_multicast_dns = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMi
|
|
|
270860
270922
|
return "127.0.0.1";
|
|
270861
270923
|
}
|
|
270862
270924
|
function allInterfaces() {
|
|
270863
|
-
var networks = os
|
|
270925
|
+
var networks = os.networkInterfaces();
|
|
270864
270926
|
var names = Object.keys(networks);
|
|
270865
270927
|
var res = [];
|
|
270866
270928
|
for (var i = 0; i < names.length; i++) {
|
|
@@ -296175,6 +296237,31 @@ const loadProviders = (codexProvider, claudeProvider, ollamaProvider, cmmdProvid
|
|
|
296175
296237
|
opencodeProvider.getSnapshot
|
|
296176
296238
|
], { concurrency: "unbounded" });
|
|
296177
296239
|
const haveProvidersChanged = (previousProviders, nextProviders) => !equals(previousProviders, nextProviders);
|
|
296240
|
+
/**
|
|
296241
|
+
* Keep publishing a previous good reading, marked stale, across a probe that
|
|
296242
|
+
* could not check rather than replacing it with a false "not on this
|
|
296243
|
+
* environment" (forge#3588).
|
|
296244
|
+
*
|
|
296245
|
+
* A Sprite freezes the cgroup about a second after the last inbound request,
|
|
296246
|
+
* so a probe already in flight at the freeze resumes into a timeout that
|
|
296247
|
+
* proves nothing: `checkCodexProviderStatus`/`checkClaudeProviderStatus` mark
|
|
296248
|
+
* exactly that shape `availabilityCheck: "could-not-check"`. When the last
|
|
296249
|
+
* thing this registry confirmed for the same provider was available, this
|
|
296250
|
+
* keeps publishing THAT reading rather than the fresh could-not-check one,
|
|
296251
|
+
* stamped stale with the time it was last confirmed. A provider with no prior
|
|
296252
|
+
* confirmed reading, or one whose previous reading was itself withheld, has
|
|
296253
|
+
* nothing to carry forward, so the fresh (still unavailable) reading stands.
|
|
296254
|
+
*/
|
|
296255
|
+
function carryForwardStaleReading(incoming, previous) {
|
|
296256
|
+
if (incoming.availabilityCheck !== "could-not-check") return incoming;
|
|
296257
|
+
if (previous === void 0 || previous.availability !== "available") return incoming;
|
|
296258
|
+
return {
|
|
296259
|
+
...previous,
|
|
296260
|
+
checkedAt: incoming.checkedAt,
|
|
296261
|
+
availabilityCheck: "could-not-check",
|
|
296262
|
+
lastConfirmedAt: previous.lastConfirmedAt ?? previous.checkedAt
|
|
296263
|
+
};
|
|
296264
|
+
}
|
|
296178
296265
|
const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
|
|
296179
296266
|
const config = yield* ServerConfig;
|
|
296180
296267
|
const codexProvider = yield* CodexProvider;
|
|
@@ -296212,15 +296299,25 @@ const ProviderRegistryLive = effect(ProviderRegistry, gen(function* () {
|
|
|
296212
296299
|
error
|
|
296213
296300
|
})), ignore);
|
|
296214
296301
|
const upsertProviders = fn$1("upsertProviders")(function* (incomingProviders, options) {
|
|
296215
|
-
const
|
|
296216
|
-
const [previousProviders, providers] = yield* modify$3(providersRef, (previousProviders) => {
|
|
296217
|
-
const
|
|
296218
|
-
|
|
296302
|
+
const withAvailability = incomingProviders.map((provider) => withProviderAvailability(provider));
|
|
296303
|
+
const [previousProviders, providers, resolvedProviders] = yield* modify$3(providersRef, (previousProviders) => {
|
|
296304
|
+
const previousByKind = new Map(previousProviders.map((provider) => [provider.provider, provider]));
|
|
296305
|
+
const mergedProviders = new Map(previousByKind);
|
|
296306
|
+
const resolvedProviders = [];
|
|
296307
|
+
for (const provider of withAvailability) {
|
|
296308
|
+
const resolved = carryForwardStaleReading(provider, previousByKind.get(provider.provider));
|
|
296309
|
+
resolvedProviders.push(resolved);
|
|
296310
|
+
mergedProviders.set(provider.provider, resolved);
|
|
296311
|
+
}
|
|
296219
296312
|
const providers = orderProviderSnapshots([...mergedProviders.values()]);
|
|
296220
|
-
return [[
|
|
296313
|
+
return [[
|
|
296314
|
+
previousProviders,
|
|
296315
|
+
providers,
|
|
296316
|
+
resolvedProviders
|
|
296317
|
+
], providers];
|
|
296221
296318
|
});
|
|
296222
296319
|
if (haveProvidersChanged(previousProviders, providers)) {
|
|
296223
|
-
yield* forEach(
|
|
296320
|
+
yield* forEach(resolvedProviders, persistProvider, {
|
|
296224
296321
|
concurrency: "unbounded",
|
|
296225
296322
|
discard: true
|
|
296226
296323
|
});
|
|
@@ -299235,7 +299332,7 @@ function resolveBuildCommitFromEnv(env) {
|
|
|
299235
299332
|
* environment descriptor down instead of reporting an honest "unknown".
|
|
299236
299333
|
*/
|
|
299237
299334
|
function readBakedBuildCommit() {
|
|
299238
|
-
return "
|
|
299335
|
+
return "88bc45ce168df8c9acf36ad6734d8a66bcb353ec";
|
|
299239
299336
|
}
|
|
299240
299337
|
async function resolveServerBuildCommit(input) {
|
|
299241
299338
|
if (isFullCommitSha(input.baked)) return input.baked;
|
|
@@ -324168,7 +324265,7 @@ const connectLoginCommand = make$34("login", {
|
|
|
324168
324265
|
})).json();
|
|
324169
324266
|
},
|
|
324170
324267
|
openBrowser: async (url) => {
|
|
324171
|
-
const open = (await import("./open-
|
|
324268
|
+
const open = (await import("./open-2-reBrpv.mjs")).default;
|
|
324172
324269
|
await open(url);
|
|
324173
324270
|
return true;
|
|
324174
324271
|
},
|