@adhdev/daemon-standalone 1.0.39-rc.2 → 1.0.39-rc.4
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/index.js +200 -139
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/public/assets/index-Dw-CNAfy.js +121 -0
- package/public/index.html +1 -1
- package/vendor/mcp-server/index.js +97 -9
- package/vendor/mcp-server/index.js.map +1 -1
- package/public/assets/index-CO0_zScg.js +0 -121
package/dist/index.js
CHANGED
|
@@ -36528,10 +36528,10 @@ var require_dist3 = __commonJS({
|
|
|
36528
36528
|
}
|
|
36529
36529
|
function getDaemonBuildInfo() {
|
|
36530
36530
|
if (cached2) return cached2;
|
|
36531
|
-
const commit = readInjected(true ? "
|
|
36532
|
-
const commitShort = readInjected(true ? "
|
|
36533
|
-
const version2 = readInjected(true ? "1.0.39-rc.
|
|
36534
|
-
const builtAt = readInjected(true ? "2026-08-
|
|
36531
|
+
const commit = readInjected(true ? "501b92e11df69e7a1e1a20767fd4c924e8bd4f95" : void 0) ?? "unknown";
|
|
36532
|
+
const commitShort = readInjected(true ? "501b92e1" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
36533
|
+
const version2 = readInjected(true ? "1.0.39-rc.4" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
36534
|
+
const builtAt = readInjected(true ? "2026-08-07T12:41:05.960Z" : void 0);
|
|
36535
36535
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
36536
36536
|
return cached2;
|
|
36537
36537
|
}
|
|
@@ -40714,7 +40714,7 @@ child.on('exit', () => process.exit(0));
|
|
|
40714
40714
|
resolveWorktreePath: () => resolveWorktreePath
|
|
40715
40715
|
});
|
|
40716
40716
|
function getDefaultWorktreeBaseDir() {
|
|
40717
|
-
return path11.join(
|
|
40717
|
+
return path11.join(resolveConfigDir(), WORKTREE_DIR_NAME);
|
|
40718
40718
|
}
|
|
40719
40719
|
function resolveWorktreeBaseDir(worktreeBaseDir) {
|
|
40720
40720
|
const override = typeof worktreeBaseDir === "string" ? worktreeBaseDir.trim() : "";
|
|
@@ -41004,7 +41004,6 @@ ${error48.message || ""}`;
|
|
|
41004
41004
|
}
|
|
41005
41005
|
}
|
|
41006
41006
|
var path11;
|
|
41007
|
-
var os52;
|
|
41008
41007
|
var import_promises3;
|
|
41009
41008
|
var import_node_fs2;
|
|
41010
41009
|
var import_node_child_process3;
|
|
@@ -41018,11 +41017,11 @@ ${error48.message || ""}`;
|
|
|
41018
41017
|
"src/git/git-worktree.ts"() {
|
|
41019
41018
|
"use strict";
|
|
41020
41019
|
path11 = __toESM2(require("path"));
|
|
41021
|
-
os52 = __toESM2(require("os"));
|
|
41022
41020
|
import_promises3 = require("fs/promises");
|
|
41023
41021
|
import_node_fs2 = require("fs");
|
|
41024
41022
|
import_node_child_process3 = require("child_process");
|
|
41025
41023
|
import_node_util2 = require("util");
|
|
41024
|
+
init_config_dir();
|
|
41026
41025
|
execFileAsync2 = (0, import_node_util2.promisify)(import_node_child_process3.execFile);
|
|
41027
41026
|
WORKTREE_DIR_NAME = "worktrees";
|
|
41028
41027
|
GIT_TIMEOUT_MS = 3e4;
|
|
@@ -41033,7 +41032,7 @@ ${error48.message || ""}`;
|
|
|
41033
41032
|
function expandPath(p) {
|
|
41034
41033
|
const t = (p || "").trim();
|
|
41035
41034
|
if (!t) return "";
|
|
41036
|
-
if (t.startsWith("~")) return path13.join(
|
|
41035
|
+
if (t.startsWith("~")) return path13.join(os62.homedir(), t.slice(1).replace(/^\//, ""));
|
|
41037
41036
|
return path13.resolve(t);
|
|
41038
41037
|
}
|
|
41039
41038
|
function validateWorkspacePath(absPath) {
|
|
@@ -41106,7 +41105,7 @@ ${error48.message || ""}`;
|
|
|
41106
41105
|
};
|
|
41107
41106
|
}
|
|
41108
41107
|
if (a.useHome === true) {
|
|
41109
|
-
return { ok: true, path:
|
|
41108
|
+
return { ok: true, path: os62.homedir(), source: "home" };
|
|
41110
41109
|
}
|
|
41111
41110
|
return {
|
|
41112
41111
|
ok: false,
|
|
@@ -41190,7 +41189,7 @@ ${error48.message || ""}`;
|
|
|
41190
41189
|
return { config: { ...config2, defaultWorkspaceId: id } };
|
|
41191
41190
|
}
|
|
41192
41191
|
var fs7;
|
|
41193
|
-
var
|
|
41192
|
+
var os62;
|
|
41194
41193
|
var path13;
|
|
41195
41194
|
var import_crypto22;
|
|
41196
41195
|
var MAX_WORKSPACES;
|
|
@@ -41198,7 +41197,7 @@ ${error48.message || ""}`;
|
|
|
41198
41197
|
"src/config/workspaces.ts"() {
|
|
41199
41198
|
"use strict";
|
|
41200
41199
|
fs7 = __toESM2(require("fs"));
|
|
41201
|
-
|
|
41200
|
+
os62 = __toESM2(require("os"));
|
|
41202
41201
|
path13 = __toESM2(require("path"));
|
|
41203
41202
|
import_crypto22 = require("crypto");
|
|
41204
41203
|
MAX_WORKSPACES = 50;
|
|
@@ -46795,11 +46794,11 @@ Next step: ${nextStep}`;
|
|
|
46795
46794
|
const pinnedProvider = typeof providerType === "string" && providerType.trim() ? providerType.trim() : void 0;
|
|
46796
46795
|
const providerTags = pinnedProvider ? [pinnedProvider] : readNodeProviderTypes(node?.policy);
|
|
46797
46796
|
const worktreeBranch = typeof node?.worktreeBranch === "string" && node.worktreeBranch.trim() ? node.worktreeBranch.trim() : null;
|
|
46798
|
-
const
|
|
46797
|
+
const os29 = readNodeOverride(node, "platform") ?? readNodeReporter(node, "platform") ?? process.platform;
|
|
46799
46798
|
const arch2 = readNodeOverride(node, "arch") ?? readNodeReporter(node, "arch") ?? process.arch;
|
|
46800
46799
|
return normalizeMeshCapabilityTags([
|
|
46801
46800
|
...Array.isArray(node?.capabilities) ? node.capabilities : [],
|
|
46802
|
-
`os=${
|
|
46801
|
+
`os=${os29}`,
|
|
46803
46802
|
`arch=${arch2}`,
|
|
46804
46803
|
...providerTags.map((p) => `provider=${p}`),
|
|
46805
46804
|
// Worktree nodes automatically expose a "worktree=<branch>" tag so that
|
|
@@ -53181,14 +53180,14 @@ When the user asks to **set up / configure / onboard** this repo for Repo Mesh (
|
|
|
53181
53180
|
}
|
|
53182
53181
|
function resolveHermesCoordinatorHome(meshId, workspace) {
|
|
53183
53182
|
const key2 = `${meshId || "mesh"}
|
|
53184
|
-
${(0, import_node_path3.resolve)(workspace ||
|
|
53183
|
+
${(0, import_node_path3.resolve)(workspace || os7.tmpdir())}`;
|
|
53185
53184
|
const hash2 = shortHash(key2);
|
|
53186
|
-
return (0, import_node_path3.join)(
|
|
53185
|
+
return (0, import_node_path3.join)(os7.tmpdir(), `adhdev-hermes-mesh-coordinator-${hash2}`);
|
|
53187
53186
|
}
|
|
53188
53187
|
function resolveMcpConfigPath(configPath, workspace) {
|
|
53189
53188
|
const trimmed = configPath.trim();
|
|
53190
|
-
if (trimmed === "~") return
|
|
53191
|
-
if (trimmed.startsWith("~/")) return (0, import_node_path3.join)(
|
|
53189
|
+
if (trimmed === "~") return os7.homedir();
|
|
53190
|
+
if (trimmed.startsWith("~/")) return (0, import_node_path3.join)(os7.homedir(), trimmed.slice(2));
|
|
53192
53191
|
if ((0, import_node_path3.isAbsolute)(trimmed)) return trimmed;
|
|
53193
53192
|
return (0, import_node_path3.join)(workspace, trimmed);
|
|
53194
53193
|
}
|
|
@@ -53394,7 +53393,7 @@ ${rendered}`, "utf-8");
|
|
|
53394
53393
|
});
|
|
53395
53394
|
}
|
|
53396
53395
|
var import_node_fs3;
|
|
53397
|
-
var
|
|
53396
|
+
var os7;
|
|
53398
53397
|
var import_session_host_core32;
|
|
53399
53398
|
var import_node_path3;
|
|
53400
53399
|
var DEFAULT_SERVER_NAME;
|
|
@@ -53405,7 +53404,7 @@ ${rendered}`, "utf-8");
|
|
|
53405
53404
|
"src/commands/mesh-coordinator.ts"() {
|
|
53406
53405
|
"use strict";
|
|
53407
53406
|
import_node_fs3 = require("fs");
|
|
53408
|
-
|
|
53407
|
+
os7 = __toESM2(require("os"));
|
|
53409
53408
|
import_session_host_core32 = require_dist();
|
|
53410
53409
|
import_node_path3 = require("path");
|
|
53411
53410
|
init_logger();
|
|
@@ -61201,7 +61200,7 @@ The mesh has no work in flight. For each mission, decide its outcome: continue i
|
|
|
61201
61200
|
continue;
|
|
61202
61201
|
}
|
|
61203
61202
|
if (!isLaunchableNode(node)) {
|
|
61204
|
-
markSkip(nodeId, "
|
|
61203
|
+
markSkip(nodeId, "node_health_not_launchable");
|
|
61205
61204
|
continue;
|
|
61206
61205
|
}
|
|
61207
61206
|
if (!isMeshNodeFreshEnoughToLaunch(node, freshnessGate)) {
|
|
@@ -62240,7 +62239,7 @@ The mesh has no work in flight. For each mission, decide its outcome: continue i
|
|
|
62240
62239
|
}
|
|
62241
62240
|
});
|
|
62242
62241
|
async function updateDarwinMemoryCache() {
|
|
62243
|
-
if (
|
|
62242
|
+
if (os8.platform() !== "darwin") return;
|
|
62244
62243
|
try {
|
|
62245
62244
|
const { stdout } = await execAsync2("vm_stat", {
|
|
62246
62245
|
encoding: "utf-8",
|
|
@@ -62264,26 +62263,26 @@ The mesh has no work in flight. For each mission, decide its outcome: continue i
|
|
|
62264
62263
|
const fileBacked = counts["file_backed"] ?? 0;
|
|
62265
62264
|
const availPages = free + inactive + speculative + purgeable + fileBacked;
|
|
62266
62265
|
const bytes = availPages * pageSize;
|
|
62267
|
-
cachedDarwinAvail = Number.isFinite(bytes) && bytes >= 0 ? Math.min(bytes,
|
|
62266
|
+
cachedDarwinAvail = Number.isFinite(bytes) && bytes >= 0 ? Math.min(bytes, os8.totalmem()) : null;
|
|
62268
62267
|
} catch {
|
|
62269
62268
|
}
|
|
62270
62269
|
}
|
|
62271
62270
|
function getHostMemorySnapshot() {
|
|
62272
|
-
if (
|
|
62271
|
+
if (os8.platform() === "darwin" && !darwinMemoryInterval) {
|
|
62273
62272
|
updateDarwinMemoryCache();
|
|
62274
62273
|
darwinMemoryInterval = setInterval(updateDarwinMemoryCache, 3e3);
|
|
62275
62274
|
darwinMemoryInterval.unref();
|
|
62276
62275
|
}
|
|
62277
|
-
const totalMem =
|
|
62278
|
-
const freeMem =
|
|
62279
|
-
const availableMem =
|
|
62276
|
+
const totalMem = os8.totalmem();
|
|
62277
|
+
const freeMem = os8.freemem();
|
|
62278
|
+
const availableMem = os8.platform() === "darwin" ? cachedDarwinAvail ?? freeMem : freeMem;
|
|
62280
62279
|
return {
|
|
62281
62280
|
totalMem,
|
|
62282
62281
|
freeMem,
|
|
62283
62282
|
availableMem
|
|
62284
62283
|
};
|
|
62285
62284
|
}
|
|
62286
|
-
var
|
|
62285
|
+
var os8;
|
|
62287
62286
|
var import_child_process4;
|
|
62288
62287
|
var import_util3;
|
|
62289
62288
|
var execAsync2;
|
|
@@ -62292,7 +62291,7 @@ The mesh has no work in flight. For each mission, decide its outcome: continue i
|
|
|
62292
62291
|
var init_host_memory = __esm2({
|
|
62293
62292
|
"src/system/host-memory.ts"() {
|
|
62294
62293
|
"use strict";
|
|
62295
|
-
|
|
62294
|
+
os8 = __toESM2(require("os"));
|
|
62296
62295
|
import_child_process4 = require("child_process");
|
|
62297
62296
|
import_util3 = require("util");
|
|
62298
62297
|
execAsync2 = (0, import_util3.promisify)(import_child_process4.exec);
|
|
@@ -63431,8 +63430,8 @@ ${cleanBody}`;
|
|
|
63431
63430
|
}
|
|
63432
63431
|
function buildMachineInfo2(profile = "full") {
|
|
63433
63432
|
const base = {
|
|
63434
|
-
hostname:
|
|
63435
|
-
platform:
|
|
63433
|
+
hostname: os9.hostname(),
|
|
63434
|
+
platform: os9.platform()
|
|
63436
63435
|
};
|
|
63437
63436
|
if (profile === "live") {
|
|
63438
63437
|
return base;
|
|
@@ -63441,23 +63440,23 @@ ${cleanBody}`;
|
|
|
63441
63440
|
const memSnap2 = getHostMemorySnapshot();
|
|
63442
63441
|
return {
|
|
63443
63442
|
...base,
|
|
63444
|
-
arch:
|
|
63445
|
-
cpus:
|
|
63443
|
+
arch: os9.arch(),
|
|
63444
|
+
cpus: os9.cpus().length,
|
|
63446
63445
|
totalMem: memSnap2.totalMem,
|
|
63447
|
-
release:
|
|
63446
|
+
release: os9.release()
|
|
63448
63447
|
};
|
|
63449
63448
|
}
|
|
63450
63449
|
const memSnap = getHostMemorySnapshot();
|
|
63451
63450
|
return {
|
|
63452
63451
|
...base,
|
|
63453
|
-
arch:
|
|
63454
|
-
cpus:
|
|
63452
|
+
arch: os9.arch(),
|
|
63453
|
+
cpus: os9.cpus().length,
|
|
63455
63454
|
totalMem: memSnap.totalMem,
|
|
63456
63455
|
freeMem: memSnap.freeMem,
|
|
63457
63456
|
availableMem: memSnap.availableMem,
|
|
63458
|
-
loadavg:
|
|
63459
|
-
uptime:
|
|
63460
|
-
release:
|
|
63457
|
+
loadavg: os9.loadavg(),
|
|
63458
|
+
uptime: os9.uptime(),
|
|
63459
|
+
release: os9.release()
|
|
63461
63460
|
};
|
|
63462
63461
|
}
|
|
63463
63462
|
function parseMessageTime(value) {
|
|
@@ -63694,13 +63693,13 @@ ${cleanBody}`;
|
|
|
63694
63693
|
}
|
|
63695
63694
|
};
|
|
63696
63695
|
}
|
|
63697
|
-
var
|
|
63696
|
+
var os9;
|
|
63698
63697
|
var READ_DEBUG_ENABLED;
|
|
63699
63698
|
var recentReadDebugSignatureBySession;
|
|
63700
63699
|
var init_snapshot2 = __esm2({
|
|
63701
63700
|
"src/status/snapshot.ts"() {
|
|
63702
63701
|
"use strict";
|
|
63703
|
-
|
|
63702
|
+
os9 = __toESM2(require("os"));
|
|
63704
63703
|
init_config();
|
|
63705
63704
|
init_state_store();
|
|
63706
63705
|
init_recent_activity();
|
|
@@ -70331,14 +70330,14 @@ ${cleanBody}`;
|
|
|
70331
70330
|
}
|
|
70332
70331
|
return cachedPty;
|
|
70333
70332
|
}
|
|
70334
|
-
var
|
|
70333
|
+
var os12;
|
|
70335
70334
|
var cachedPty;
|
|
70336
70335
|
var NodePtyRuntimeTransport;
|
|
70337
70336
|
var NodePtyTransportFactory;
|
|
70338
70337
|
var init_pty_transport = __esm2({
|
|
70339
70338
|
"src/cli-adapters/pty-transport.ts"() {
|
|
70340
70339
|
"use strict";
|
|
70341
|
-
|
|
70340
|
+
os12 = __toESM2(require("os"));
|
|
70342
70341
|
init_spawn_env();
|
|
70343
70342
|
init_resolve_executable();
|
|
70344
70343
|
NodePtyRuntimeTransport = class {
|
|
@@ -70378,9 +70377,9 @@ ${cleanBody}`;
|
|
|
70378
70377
|
try {
|
|
70379
70378
|
const fs54 = require("fs");
|
|
70380
70379
|
const stat2 = fs54.statSync(cwd);
|
|
70381
|
-
if (!stat2.isDirectory()) cwd =
|
|
70380
|
+
if (!stat2.isDirectory()) cwd = os12.homedir();
|
|
70382
70381
|
} catch {
|
|
70383
|
-
cwd =
|
|
70382
|
+
cwd = os12.homedir();
|
|
70384
70383
|
}
|
|
70385
70384
|
}
|
|
70386
70385
|
const handle = pty.spawn(resolveWin32Executable(command), args, {
|
|
@@ -72843,7 +72842,7 @@ ${cont}` : cont;
|
|
|
72843
72842
|
function resolveCliSpawnPlanFromParts(options) {
|
|
72844
72843
|
const { command, baseArgs, shell, baseEnv, workingDir, extraArgs, extraEnv, geometry, diagnosticCliType, diagnosticProviderVersion } = options;
|
|
72845
72844
|
const binaryPath = findBinary(command);
|
|
72846
|
-
const isWin =
|
|
72845
|
+
const isWin = os13.platform() === "win32";
|
|
72847
72846
|
const allArgs = [...baseArgs ?? [], ...extraArgs ?? []].map(
|
|
72848
72847
|
(arg) => typeof arg === "string" ? arg.replace(/\{\{workingDir\}\}/g, workingDir) : arg
|
|
72849
72848
|
);
|
|
@@ -72931,13 +72930,13 @@ ${cont}` : cont;
|
|
|
72931
72930
|
}
|
|
72932
72931
|
return "";
|
|
72933
72932
|
}
|
|
72934
|
-
var
|
|
72933
|
+
var os13;
|
|
72935
72934
|
var path27;
|
|
72936
72935
|
var import_session_host_core7;
|
|
72937
72936
|
var init_provider_cli_runtime = __esm2({
|
|
72938
72937
|
"src/cli-adapters/provider-cli-runtime.ts"() {
|
|
72939
72938
|
"use strict";
|
|
72940
|
-
|
|
72939
|
+
os13 = __toESM2(require("os"));
|
|
72941
72940
|
path27 = __toESM2(require("path"));
|
|
72942
72941
|
init_logger();
|
|
72943
72942
|
import_session_host_core7 = require_dist();
|
|
@@ -73081,7 +73080,7 @@ ${cont}` : cont;
|
|
|
73081
73080
|
}
|
|
73082
73081
|
function expandTemplateRootForEnumeration(template, input) {
|
|
73083
73082
|
if (!template) return "";
|
|
73084
|
-
const posixHome = () => toPosixPath(
|
|
73083
|
+
const posixHome = () => toPosixPath(os14.homedir());
|
|
73085
73084
|
let out = template;
|
|
73086
73085
|
if (out === "~") out = posixHome();
|
|
73087
73086
|
else if (out.startsWith("~/")) out = `${posixHome()}/${out.slice(2)}`;
|
|
@@ -73639,13 +73638,13 @@ ${cont}` : cont;
|
|
|
73639
73638
|
if (!template) return null;
|
|
73640
73639
|
let out = template;
|
|
73641
73640
|
if (out.startsWith("~/") || out === "~") {
|
|
73642
|
-
out = path28.join(
|
|
73641
|
+
out = path28.join(os14.homedir(), out.slice(2));
|
|
73643
73642
|
}
|
|
73644
73643
|
out = out.replace(/\$\{([A-Z_][A-Z0-9_]*)(?::-(.*?))?\}/g, (_m, name, fallback) => {
|
|
73645
73644
|
const v = input.envOverrides?.[name] ?? process.env[name];
|
|
73646
73645
|
return v != null && v !== "" ? v : fallback ?? "";
|
|
73647
73646
|
});
|
|
73648
|
-
if (out.startsWith("~/")) out = path28.join(
|
|
73647
|
+
if (out.startsWith("~/")) out = path28.join(os14.homedir(), out.slice(2));
|
|
73649
73648
|
const now = /* @__PURE__ */ new Date();
|
|
73650
73649
|
const workspaceRaw = input.workspace ?? "";
|
|
73651
73650
|
let workspaceResolved = workspaceRaw;
|
|
@@ -73688,7 +73687,7 @@ ${cont}` : cont;
|
|
|
73688
73687
|
function scanProjectsRootForSessionFile(template, input, requestedSessionId) {
|
|
73689
73688
|
if (!requestedSessionId) return null;
|
|
73690
73689
|
let head = template;
|
|
73691
|
-
if (head.startsWith("~/") || head === "~") head = path28.join(
|
|
73690
|
+
if (head.startsWith("~/") || head === "~") head = path28.join(os14.homedir(), head.slice(2));
|
|
73692
73691
|
const base = staticTemplateBase(head);
|
|
73693
73692
|
if (!base) return null;
|
|
73694
73693
|
let baseStat = null;
|
|
@@ -73837,13 +73836,13 @@ ${cont}` : cont;
|
|
|
73837
73836
|
if (!template) return null;
|
|
73838
73837
|
let out = template;
|
|
73839
73838
|
if (out.startsWith("~/") || out === "~") {
|
|
73840
|
-
out = path28.join(
|
|
73839
|
+
out = path28.join(os14.homedir(), out.slice(2));
|
|
73841
73840
|
}
|
|
73842
73841
|
out = out.replace(/\$\{([A-Z_][A-Z0-9_]*)(?::-(.*?))?\}/g, (_m, name, fallback) => {
|
|
73843
73842
|
const v = input.envOverrides?.[name] ?? process.env[name];
|
|
73844
73843
|
return v != null && v !== "" ? v : fallback ?? "";
|
|
73845
73844
|
});
|
|
73846
|
-
if (out.startsWith("~/")) out = path28.join(
|
|
73845
|
+
if (out.startsWith("~/")) out = path28.join(os14.homedir(), out.slice(2));
|
|
73847
73846
|
const workspaceRaw = input.workspace ?? "";
|
|
73848
73847
|
let workspaceResolved = workspaceRaw;
|
|
73849
73848
|
if (workspaceRaw) {
|
|
@@ -74302,7 +74301,7 @@ ${cont}` : cont;
|
|
|
74302
74301
|
return t.negate ? !result : result;
|
|
74303
74302
|
}
|
|
74304
74303
|
var fs222;
|
|
74305
|
-
var
|
|
74304
|
+
var os14;
|
|
74306
74305
|
var path28;
|
|
74307
74306
|
var UUID_RE;
|
|
74308
74307
|
var DEFAULT_TOOL_CALL_TYPES;
|
|
@@ -74311,7 +74310,7 @@ ${cont}` : cont;
|
|
|
74311
74310
|
"src/providers/spec/native-history-executor.ts"() {
|
|
74312
74311
|
"use strict";
|
|
74313
74312
|
fs222 = __toESM2(require("fs"));
|
|
74314
|
-
|
|
74313
|
+
os14 = __toESM2(require("os"));
|
|
74315
74314
|
path28 = __toESM2(require("path"));
|
|
74316
74315
|
init_logger();
|
|
74317
74316
|
init_load_better_sqlite3();
|
|
@@ -74607,7 +74606,7 @@ ${cont}` : cont;
|
|
|
74607
74606
|
missingBackgroundSourceWarned.add(cliType);
|
|
74608
74607
|
LOG2.warn("CLI", `[${cliType}] background-task tracking declared but nativeHistory.source missing after provider resolve; background detection inactive`);
|
|
74609
74608
|
}
|
|
74610
|
-
var
|
|
74609
|
+
var os15;
|
|
74611
74610
|
var import_crypto11;
|
|
74612
74611
|
var import_session_host_core8;
|
|
74613
74612
|
var missingBackgroundSourceWarned;
|
|
@@ -74616,7 +74615,7 @@ ${cont}` : cont;
|
|
|
74616
74615
|
var init_provider_cli_adapter = __esm2({
|
|
74617
74616
|
"src/cli-adapters/provider-cli-adapter.ts"() {
|
|
74618
74617
|
"use strict";
|
|
74619
|
-
|
|
74618
|
+
os15 = __toESM2(require("os"));
|
|
74620
74619
|
import_crypto11 = require("crypto");
|
|
74621
74620
|
init_logger();
|
|
74622
74621
|
init_debug_config();
|
|
@@ -74643,7 +74642,7 @@ ${cont}` : cont;
|
|
|
74643
74642
|
this.transportFactory = transportFactory;
|
|
74644
74643
|
this.cliType = provider.type;
|
|
74645
74644
|
this.cliName = provider.name;
|
|
74646
|
-
this.workingDir = workingDir.startsWith("~") ? workingDir.replace(/^~/,
|
|
74645
|
+
this.workingDir = workingDir.startsWith("~") ? workingDir.replace(/^~/, os15.homedir()) : workingDir;
|
|
74647
74646
|
const resolvedConfig = resolveCliAdapterConfig(provider);
|
|
74648
74647
|
this.timeouts = resolvedConfig.timeouts;
|
|
74649
74648
|
this.approvalKeys = resolvedConfig.approvalKeys;
|
|
@@ -78879,7 +78878,7 @@ ${lastSnapshot}`;
|
|
|
78879
78878
|
};
|
|
78880
78879
|
init_git_worktree();
|
|
78881
78880
|
init_config();
|
|
78882
|
-
var
|
|
78881
|
+
var os52 = __toESM2(require("os"));
|
|
78883
78882
|
var path12 = __toESM2(require("path"));
|
|
78884
78883
|
var import_session_host_core22 = require_dist();
|
|
78885
78884
|
init_config_dir();
|
|
@@ -78923,7 +78922,7 @@ ${lastSnapshot}`;
|
|
|
78923
78922
|
var cached22 = null;
|
|
78924
78923
|
function resolveInstanceContext(options = {}) {
|
|
78925
78924
|
const env2 = options.env ?? process.env;
|
|
78926
|
-
const homeDir = options.homeDir ??
|
|
78925
|
+
const homeDir = options.homeDir ?? os52.homedir();
|
|
78927
78926
|
const envDir = typeof env2.ADHDEV_CONFIG_DIR === "string" ? env2.ADHDEV_CONFIG_DIR.trim() : "";
|
|
78928
78927
|
const explicitDir = typeof options.configDir === "string" ? options.configDir.trim() : "";
|
|
78929
78928
|
if (explicitDir && envDir && (0, import_session_host_core22.canonicalizeInstancePath)(explicitDir) !== (0, import_session_host_core22.canonicalizeInstancePath)(envDir)) {
|
|
@@ -78944,7 +78943,7 @@ ${lastSnapshot}`;
|
|
|
78944
78943
|
}
|
|
78945
78944
|
function getProcessInstanceContext(options = {}) {
|
|
78946
78945
|
const envDir = typeof process.env.ADHDEV_CONFIG_DIR === "string" ? process.env.ADHDEV_CONFIG_DIR.trim() : "";
|
|
78947
|
-
const key2 = `${envDir}|${
|
|
78946
|
+
const key2 = `${envDir}|${os52.homedir()}|${options.standalone ? "standalone" : "daemon"}`;
|
|
78948
78947
|
if (!cached22 || cached22.key !== key2) {
|
|
78949
78948
|
cached22 = { key: key2, context: resolveInstanceContext({ standalone: options.standalone }) };
|
|
78950
78949
|
}
|
|
@@ -80236,17 +80235,17 @@ ${lastSnapshot}`;
|
|
|
80236
80235
|
return null;
|
|
80237
80236
|
}
|
|
80238
80237
|
async function detectIDEs(providerLoader) {
|
|
80239
|
-
const
|
|
80238
|
+
const os29 = (0, import_os3.platform)();
|
|
80240
80239
|
const results = [];
|
|
80241
80240
|
for (const def of getMergedDefinitions()) {
|
|
80242
80241
|
const cliPath = findCliCommand(providerLoader?.getIdeCliCommand(def.id, def.cli) || def.cli);
|
|
80243
|
-
const appPath = checkPathExists(providerLoader?.getIdePathCandidates(def.id, def.paths[
|
|
80242
|
+
const appPath = checkPathExists(providerLoader?.getIdePathCandidates(def.id, def.paths[os29] || []) || []);
|
|
80244
80243
|
let resolvedCli = cliPath;
|
|
80245
|
-
if (!resolvedCli && appPath &&
|
|
80244
|
+
if (!resolvedCli && appPath && os29 === "darwin") {
|
|
80246
80245
|
const bundledCli = `${appPath}/Contents/Resources/app/bin/${def.cli}`;
|
|
80247
80246
|
if ((0, import_fs18.existsSync)(bundledCli)) resolvedCli = bundledCli;
|
|
80248
80247
|
}
|
|
80249
|
-
if (!resolvedCli && appPath &&
|
|
80248
|
+
if (!resolvedCli && appPath && os29 === "win32") {
|
|
80250
80249
|
const { dirname: dirname22 } = await import("path");
|
|
80251
80250
|
const appDir = dirname22(appPath);
|
|
80252
80251
|
const candidates = [
|
|
@@ -80263,7 +80262,7 @@ ${lastSnapshot}`;
|
|
|
80263
80262
|
}
|
|
80264
80263
|
}
|
|
80265
80264
|
}
|
|
80266
|
-
const installed =
|
|
80265
|
+
const installed = os29 === "darwin" ? !!(resolvedCli || appPath) : !!resolvedCli;
|
|
80267
80266
|
const version2 = null;
|
|
80268
80267
|
results.push({
|
|
80269
80268
|
id: def.id,
|
|
@@ -86971,7 +86970,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
86971
86970
|
}
|
|
86972
86971
|
var fs15 = __toESM2(require("fs"));
|
|
86973
86972
|
var path232 = __toESM2(require("path"));
|
|
86974
|
-
var
|
|
86973
|
+
var os10 = __toESM2(require("os"));
|
|
86975
86974
|
var KEY_TO_VK = {
|
|
86976
86975
|
Backspace: 8,
|
|
86977
86976
|
Tab: 9,
|
|
@@ -87225,7 +87224,7 @@ ${effect.notification.body || ""}`.trim();
|
|
|
87225
87224
|
function resolveSafePath(requestedPath) {
|
|
87226
87225
|
const rawPath = typeof requestedPath === "string" ? requestedPath.trim() : "";
|
|
87227
87226
|
const inputPath = rawPath || ".";
|
|
87228
|
-
const home =
|
|
87227
|
+
const home = os10.homedir();
|
|
87229
87228
|
if (inputPath.startsWith("~")) {
|
|
87230
87229
|
return path232.resolve(path232.join(home, inputPath.slice(1)));
|
|
87231
87230
|
}
|
|
@@ -89839,12 +89838,13 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
89839
89838
|
var import_child_process8 = require("child_process");
|
|
89840
89839
|
var import_child_process9 = require("child_process");
|
|
89841
89840
|
var fs20 = __toESM2(require("fs"));
|
|
89842
|
-
var
|
|
89841
|
+
var os11 = __toESM2(require("os"));
|
|
89843
89842
|
var path26 = __toESM2(require("path"));
|
|
89844
89843
|
var import_child_process7 = require("child_process");
|
|
89845
89844
|
var fs19 = __toESM2(require("fs"));
|
|
89846
89845
|
var http2 = __toESM2(require("http"));
|
|
89847
89846
|
var path25 = __toESM2(require("path"));
|
|
89847
|
+
init_track_identity();
|
|
89848
89848
|
var import_child_process6 = require("child_process");
|
|
89849
89849
|
init_logger();
|
|
89850
89850
|
function errorText(error48) {
|
|
@@ -90041,7 +90041,9 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
90041
90041
|
}
|
|
90042
90042
|
var POINTER_NAME = ".adhdev-current";
|
|
90043
90043
|
var STABLE_FILES = [POINTER_NAME, "adhdev.cmd", "adhdev.ps1", "adhdev"];
|
|
90044
|
-
|
|
90044
|
+
function resolveDefaultHealthPort(env2 = process.env) {
|
|
90045
|
+
return getTrackIdentity(resolveBuildTrack(env2)).defaultPort;
|
|
90046
|
+
}
|
|
90045
90047
|
var DEFAULT_HEALTH_TIMEOUT_MS = 12e4;
|
|
90046
90048
|
function fetchLocalJson(port, pathname) {
|
|
90047
90049
|
return new Promise((resolve29) => {
|
|
@@ -90411,7 +90413,7 @@ exec "${portableNode}" "${cliEntry}" "$@"
|
|
|
90411
90413
|
}
|
|
90412
90414
|
}
|
|
90413
90415
|
function createDefaultWindowsAtomicHooks(options) {
|
|
90414
|
-
const healthPort = options.healthPort ??
|
|
90416
|
+
const healthPort = options.healthPort ?? resolveDefaultHealthPort(options.env);
|
|
90415
90417
|
const healthTimeoutMs = options.healthTimeoutMs ?? DEFAULT_HEALTH_TIMEOUT_MS;
|
|
90416
90418
|
return {
|
|
90417
90419
|
install: (stagedPrefix, portableNode) => {
|
|
@@ -90650,7 +90652,7 @@ exec "${portableNode}" "${cliEntry}" "$@"
|
|
|
90650
90652
|
const packageRoot = findCurrentPackageRoot(options.currentCliPath || process.argv[1], options.packageName);
|
|
90651
90653
|
const npmInvocation = resolveSiblingNpmInvocation(options.nodeExecutable || process.execPath, options.platform);
|
|
90652
90654
|
const platform10 = options.platform || process.platform;
|
|
90653
|
-
const homeDir = options.homeDir ||
|
|
90655
|
+
const homeDir = options.homeDir || os11.homedir();
|
|
90654
90656
|
const instanceDir = options.instanceDir || resolveInstanceDir();
|
|
90655
90657
|
let installPrefix = packageRoot ? resolveInstallPrefixFromPackageRoot(packageRoot, options.packageName) : null;
|
|
90656
90658
|
if (platform10 === "win32" && isPortableNode22Prefix(installPrefix, homeDir, instanceDir)) {
|
|
@@ -90829,24 +90831,75 @@ exec "${portableNode}" "${cliEntry}" "$@"
|
|
|
90829
90831
|
function buildManualRecoveryCommand(installCommand) {
|
|
90830
90832
|
return [installCommand.command, ...installCommand.args].map((part) => /\s/.test(part) ? `"${part}"` : part).join(" ");
|
|
90831
90833
|
}
|
|
90832
|
-
|
|
90834
|
+
var UPGRADE_FAILURE_TARGET_MARKER = "adhdev-upgrade-target:";
|
|
90835
|
+
function emitUpgradeFailureNotice(lines, configDir = getConfigDir2(), options = {}) {
|
|
90833
90836
|
const body = lines.join("\n");
|
|
90834
90837
|
appendUpgradeLog(`Upgrade blocked \u2014 user action required:
|
|
90835
90838
|
${body}`, configDir);
|
|
90839
|
+
const target = typeof options.targetVersion === "string" ? options.targetVersion.trim() : "";
|
|
90840
|
+
const marker = target ? `${UPGRADE_FAILURE_TARGET_MARKER} ${target}
|
|
90841
|
+
` : "";
|
|
90836
90842
|
try {
|
|
90837
|
-
fs20.writeFileSync(
|
|
90843
|
+
fs20.writeFileSync(
|
|
90844
|
+
getUpgradeFailureNoticePath(configDir),
|
|
90845
|
+
`[${(/* @__PURE__ */ new Date()).toISOString()}]
|
|
90838
90846
|
${body}
|
|
90839
|
-
`,
|
|
90847
|
+
${marker}`,
|
|
90848
|
+
"utf8"
|
|
90849
|
+
);
|
|
90840
90850
|
} catch {
|
|
90841
90851
|
}
|
|
90842
90852
|
}
|
|
90853
|
+
function clearUpgradeFailureNotice(configDir = getConfigDir2()) {
|
|
90854
|
+
const noticePath = getUpgradeFailureNoticePath(configDir);
|
|
90855
|
+
try {
|
|
90856
|
+
fs20.unlinkSync(noticePath);
|
|
90857
|
+
} catch (error48) {
|
|
90858
|
+
if (error48?.code === "ENOENT") return;
|
|
90859
|
+
appendUpgradeLog(
|
|
90860
|
+
`Failed to clear stale upgrade-failure notice (${error48?.code || "error"}): ${noticePath} \u2014 ${error48?.message || String(error48)}. Investigate a file lock or permissions: until it is removed, every daemon boot will keep warning about this ALREADY-RESOLVED failure.`,
|
|
90861
|
+
configDir
|
|
90862
|
+
);
|
|
90863
|
+
}
|
|
90864
|
+
}
|
|
90865
|
+
function formatUpgradeNoticeAge(ageMs2) {
|
|
90866
|
+
if (ageMs2 < 0) return "in the future (clock skew?)";
|
|
90867
|
+
const minutes = Math.floor(ageMs2 / 6e4);
|
|
90868
|
+
if (minutes < 1) return "just now";
|
|
90869
|
+
if (minutes < 60) return `${minutes}m ago`;
|
|
90870
|
+
const hours = Math.floor(minutes / 60);
|
|
90871
|
+
if (hours < 24) return `${hours}h ago`;
|
|
90872
|
+
return `${Math.floor(hours / 24)}d ago`;
|
|
90873
|
+
}
|
|
90874
|
+
function parseUpgradeNoticeTimestamp(notice) {
|
|
90875
|
+
const match = /^\[([^\]\n]+)\]/.exec(notice);
|
|
90876
|
+
if (!match) return null;
|
|
90877
|
+
const parsed = Date.parse(match[1]);
|
|
90878
|
+
return Number.isFinite(parsed) ? new Date(parsed).toISOString() : null;
|
|
90879
|
+
}
|
|
90880
|
+
function parseUpgradeNoticeTargetVersion(notice) {
|
|
90881
|
+
const pattern = new RegExp(`^${UPGRADE_FAILURE_TARGET_MARKER}\\s*(.+)$`, "m");
|
|
90882
|
+
const match = pattern.exec(notice);
|
|
90883
|
+
const value = match?.[1]?.trim();
|
|
90884
|
+
return value ? value : null;
|
|
90885
|
+
}
|
|
90843
90886
|
function readUpgradeFailureNotice(configDir = getConfigDir2()) {
|
|
90844
90887
|
try {
|
|
90845
90888
|
const noticePath = getUpgradeFailureNoticePath(configDir);
|
|
90846
90889
|
if (!fs20.existsSync(noticePath)) return null;
|
|
90847
90890
|
const notice = fs20.readFileSync(noticePath, "utf8").trim();
|
|
90848
90891
|
if (!notice) return null;
|
|
90849
|
-
|
|
90892
|
+
const recordedAt = parseUpgradeNoticeTimestamp(notice);
|
|
90893
|
+
const ageMs2 = recordedAt ? Date.now() - Date.parse(recordedAt) : null;
|
|
90894
|
+
return {
|
|
90895
|
+
noticePath,
|
|
90896
|
+
logPath: getUpgradeLogPath(configDir),
|
|
90897
|
+
notice,
|
|
90898
|
+
recordedAt,
|
|
90899
|
+
ageMs: ageMs2,
|
|
90900
|
+
ageLabel: ageMs2 === null ? null : formatUpgradeNoticeAge(ageMs2),
|
|
90901
|
+
targetVersion: parseUpgradeNoticeTargetVersion(notice)
|
|
90902
|
+
};
|
|
90850
90903
|
} catch {
|
|
90851
90904
|
return null;
|
|
90852
90905
|
}
|
|
@@ -90952,20 +91005,17 @@ ${body}
|
|
|
90952
91005
|
if (payload.skipInstall) {
|
|
90953
91006
|
appendUpgradeLog("Restart-only mode \u2014 package install skipped, re-spawning daemon");
|
|
90954
91007
|
spawnDetachedDaemonRestart(restartArgv, payload.cwd);
|
|
90955
|
-
|
|
90956
|
-
fs20.unlinkSync(getUpgradeFailureNoticePath());
|
|
90957
|
-
} catch {
|
|
90958
|
-
}
|
|
91008
|
+
clearUpgradeFailureNotice();
|
|
90959
91009
|
return;
|
|
90960
91010
|
}
|
|
90961
91011
|
const instanceDir = resolveInstanceDir();
|
|
90962
91012
|
const windowsInstallerLayout = resolveWindowsInstallerLayout({
|
|
90963
|
-
homeDir:
|
|
91013
|
+
homeDir: os11.homedir(),
|
|
90964
91014
|
installPrefix: installCommand.surface.installPrefix,
|
|
90965
91015
|
instanceDir
|
|
90966
91016
|
});
|
|
90967
91017
|
if (windowsInstallerLayout) {
|
|
90968
|
-
const portableNode = findPortableNode22(
|
|
91018
|
+
const portableNode = findPortableNode22(os11.homedir(), process.execPath, instanceDir);
|
|
90969
91019
|
if (!portableNode) {
|
|
90970
91020
|
throw new Error("installer-managed Windows update requires the portable Node.js 22 runtime");
|
|
90971
91021
|
}
|
|
@@ -91009,13 +91059,10 @@ ${body}
|
|
|
91009
91059
|
`adhdev ${payload.packageName}@${payload.targetVersion} upgrade failed and was rolled back: ${error48?.message || String(error48)}`,
|
|
91010
91060
|
`Previous version preserved (active prefix: ${windowsInstallerLayout.activePrefix}).`,
|
|
91011
91061
|
"See daemon-upgrade.log for the full install/health trace. The next daemon start will retry."
|
|
91012
|
-
]);
|
|
91062
|
+
], getConfigDir2(), { targetVersion: payload.targetVersion });
|
|
91013
91063
|
throw error48;
|
|
91014
91064
|
}
|
|
91015
|
-
|
|
91016
|
-
fs20.unlinkSync(getUpgradeFailureNoticePath());
|
|
91017
|
-
} catch {
|
|
91018
|
-
}
|
|
91065
|
+
clearUpgradeFailureNotice();
|
|
91019
91066
|
appendUpgradeLog("Installer-managed Windows atomic upgrade completed");
|
|
91020
91067
|
return;
|
|
91021
91068
|
}
|
|
@@ -91063,7 +91110,7 @@ ${body}
|
|
|
91063
91110
|
notice.push("To recover, reinstall manually:");
|
|
91064
91111
|
}
|
|
91065
91112
|
notice.push(` ${buildManualRecoveryCommand(installCommand)}`);
|
|
91066
|
-
emitUpgradeFailureNotice(notice);
|
|
91113
|
+
emitUpgradeFailureNotice(notice, getConfigDir2(), { targetVersion: payload.targetVersion });
|
|
91067
91114
|
}
|
|
91068
91115
|
throw error48;
|
|
91069
91116
|
}
|
|
@@ -91082,7 +91129,7 @@ ${body}
|
|
|
91082
91129
|
"so the running daemon was left on its previous version and was NOT restarted.",
|
|
91083
91130
|
"To recover, reinstall (this forces the shipped prebuild instead of a source rebuild):",
|
|
91084
91131
|
` ${buildManualRecoveryCommand(installCommand)}`
|
|
91085
|
-
]);
|
|
91132
|
+
], getConfigDir2(), { targetVersion: payload.targetVersion });
|
|
91086
91133
|
throw error48;
|
|
91087
91134
|
}
|
|
91088
91135
|
}
|
|
@@ -91092,10 +91139,7 @@ ${body}
|
|
|
91092
91139
|
appendUpgradeLog("Post-install staging cleanup complete");
|
|
91093
91140
|
}
|
|
91094
91141
|
spawnDetachedDaemonRestart(restartArgv, payload.cwd);
|
|
91095
|
-
|
|
91096
|
-
fs20.unlinkSync(getUpgradeFailureNoticePath());
|
|
91097
|
-
} catch {
|
|
91098
|
-
}
|
|
91142
|
+
clearUpgradeFailureNotice();
|
|
91099
91143
|
}
|
|
91100
91144
|
function spawnDetachedDaemonRestart(restartArgv, cwd) {
|
|
91101
91145
|
if (restartArgv.length > 0) {
|
|
@@ -92095,7 +92139,7 @@ ${body}
|
|
|
92095
92139
|
})
|
|
92096
92140
|
);
|
|
92097
92141
|
init_dist();
|
|
92098
|
-
var
|
|
92142
|
+
var os20 = __toESM2(require("os"));
|
|
92099
92143
|
var path35 = __toESM2(require("path"));
|
|
92100
92144
|
var crypto6 = __toESM2(require("crypto"));
|
|
92101
92145
|
var import_fs19 = require("fs");
|
|
@@ -92189,7 +92233,7 @@ ${body}
|
|
|
92189
92233
|
}
|
|
92190
92234
|
}
|
|
92191
92235
|
init_summary_metadata();
|
|
92192
|
-
var
|
|
92236
|
+
var os19 = __toESM2(require("os"));
|
|
92193
92237
|
var crypto5 = __toESM2(require("crypto"));
|
|
92194
92238
|
var fs29 = __toESM2(require("fs"));
|
|
92195
92239
|
init_contracts2();
|
|
@@ -92327,7 +92371,7 @@ ${body}
|
|
|
92327
92371
|
var path31 = __toESM2(require("path"));
|
|
92328
92372
|
init_provider_cli_adapter();
|
|
92329
92373
|
var fs25 = __toESM2(require("fs"));
|
|
92330
|
-
var
|
|
92374
|
+
var os17 = __toESM2(require("os"));
|
|
92331
92375
|
var path30 = __toESM2(require("path"));
|
|
92332
92376
|
init_terminal_screen();
|
|
92333
92377
|
var import_session_host_core9 = require_dist();
|
|
@@ -92506,12 +92550,12 @@ ${body}
|
|
|
92506
92550
|
init_fsm_types();
|
|
92507
92551
|
init_fsm_loader();
|
|
92508
92552
|
var fs24 = __toESM2(require("fs"));
|
|
92509
|
-
var
|
|
92553
|
+
var os16 = __toESM2(require("os"));
|
|
92510
92554
|
var path29 = __toESM2(require("path"));
|
|
92511
92555
|
init_logger();
|
|
92512
92556
|
function expandHome2(p) {
|
|
92513
|
-
if (p === "~") return
|
|
92514
|
-
if (p.startsWith("~/")) return path29.join(
|
|
92557
|
+
if (p === "~") return os16.homedir();
|
|
92558
|
+
if (p.startsWith("~/")) return path29.join(os16.homedir(), p.slice(2));
|
|
92515
92559
|
return p;
|
|
92516
92560
|
}
|
|
92517
92561
|
function realWorkspacePath(workingDir) {
|
|
@@ -93321,7 +93365,7 @@ ${body}
|
|
|
93321
93365
|
}
|
|
93322
93366
|
fireDelegate(d) {
|
|
93323
93367
|
const ev = this.currentEval;
|
|
93324
|
-
const task = d.task_template.replace(/\{node\}/g,
|
|
93368
|
+
const task = d.task_template.replace(/\{node\}/g, os17.hostname()).replace(/\{state\.label\}/g, ev?.state.label ?? "").replace(/\{state\.title\}/g, ev?.state.title ?? "").replace(/\{duration_ms\}/g, String(d.after_duration_ms ?? 0));
|
|
93325
93369
|
this.emit({ kind: "delegate", id: d.id, task });
|
|
93326
93370
|
}
|
|
93327
93371
|
// ────────────────────────────────────────────────────────────────────
|
|
@@ -93619,7 +93663,7 @@ ${body}
|
|
|
93619
93663
|
const ctl = (this.spec.control_bar ?? []).find((c) => c.action.type === "attach_image");
|
|
93620
93664
|
if (!ctl || ctl.action.type !== "attach_image") return;
|
|
93621
93665
|
const ext = guessExt(mime);
|
|
93622
|
-
const tmp = path30.join(
|
|
93666
|
+
const tmp = path30.join(os17.tmpdir(), `adhdev-attach-${Date.now()}${ext}`);
|
|
93623
93667
|
try {
|
|
93624
93668
|
fs25.writeFileSync(tmp, Buffer.from(blob, "base64"));
|
|
93625
93669
|
} catch {
|
|
@@ -94920,7 +94964,7 @@ ${body}
|
|
|
94920
94964
|
init_transcript_claim_registry();
|
|
94921
94965
|
init_chat_message_normalization();
|
|
94922
94966
|
init_working_dir();
|
|
94923
|
-
var
|
|
94967
|
+
var os18 = __toESM2(require("os"));
|
|
94924
94968
|
var path322 = __toESM2(require("path"));
|
|
94925
94969
|
var crypto4 = __toESM2(require("crypto"));
|
|
94926
94970
|
var fs28 = __toESM2(require("fs"));
|
|
@@ -94991,7 +95035,7 @@ ${body}
|
|
|
94991
95035
|
const promptParts = [];
|
|
94992
95036
|
const imageRefs = [];
|
|
94993
95037
|
const resourceRefs = [];
|
|
94994
|
-
const materializeDir = options.materializeDir || path322.join(
|
|
95038
|
+
const materializeDir = options.materializeDir || path322.join(os18.tmpdir(), "adhdev-input-media");
|
|
94995
95039
|
input.parts.forEach((part, index) => {
|
|
94996
95040
|
if (part.type === "text" && part.text.trim()) {
|
|
94997
95041
|
promptParts.push(part.text.trim());
|
|
@@ -95730,7 +95774,7 @@ ${body}
|
|
|
95730
95774
|
* Replaces the previously duplicated probeOpenCode/Codex/Goose functions.
|
|
95731
95775
|
*/
|
|
95732
95776
|
probeSessionIdFromConfig(probe) {
|
|
95733
|
-
const resolvedDbPath = probe.dbPath.replace(/^~/,
|
|
95777
|
+
const resolvedDbPath = probe.dbPath.replace(/^~/, os19.homedir());
|
|
95734
95778
|
const now = Date.now();
|
|
95735
95779
|
if (this.cachedSqliteDbMissingUntil > now) return null;
|
|
95736
95780
|
if (!fs29.existsSync(resolvedDbPath)) {
|
|
@@ -100525,7 +100569,7 @@ ${rawInput}` : rawInput;
|
|
|
100525
100569
|
}
|
|
100526
100570
|
function expandExecutable(command) {
|
|
100527
100571
|
const trimmed = command.trim();
|
|
100528
|
-
return trimmed.startsWith("~") ? path35.join(
|
|
100572
|
+
return trimmed.startsWith("~") ? path35.join(os20.homedir(), trimmed.slice(1)) : trimmed;
|
|
100529
100573
|
}
|
|
100530
100574
|
function commandExists(command) {
|
|
100531
100575
|
const trimmed = command.trim();
|
|
@@ -100675,9 +100719,9 @@ ${rawInput}` : rawInput;
|
|
|
100675
100719
|
return false;
|
|
100676
100720
|
}
|
|
100677
100721
|
function ensureEmptyDelegatedMcpConfig(workspace) {
|
|
100678
|
-
const baseDir = path35.join(
|
|
100722
|
+
const baseDir = path35.join(os20.tmpdir(), "adhdev-delegated-agent-empty-mcp");
|
|
100679
100723
|
(0, import_fs19.mkdirSync)(baseDir, { recursive: true });
|
|
100680
|
-
const workspaceHash = shortHash(path35.resolve(workspace ||
|
|
100724
|
+
const workspaceHash = shortHash(path35.resolve(workspace || os20.tmpdir()));
|
|
100681
100725
|
const filePath = path35.join(baseDir, `${workspaceHash}.json`);
|
|
100682
100726
|
(0, import_fs19.writeFileSync)(filePath, JSON.stringify({ mcpServers: {} }, null, 2), "utf-8");
|
|
100683
100727
|
return filePath;
|
|
@@ -101072,7 +101116,7 @@ ${rawInput}` : rawInput;
|
|
|
101072
101116
|
async startSession(cliType, workingDir, cliArgs, initialModel, options) {
|
|
101073
101117
|
const trimmed = (workingDir || "").trim();
|
|
101074
101118
|
if (!trimmed) throw new Error("working directory required");
|
|
101075
|
-
const resolvedDir = trimmed.startsWith("~") ? trimmed.replace(/^~/,
|
|
101119
|
+
const resolvedDir = trimmed.startsWith("~") ? trimmed.replace(/^~/, os20.homedir()) : path35.resolve(trimmed);
|
|
101076
101120
|
const normalizedType = this.providerLoader.resolveAlias(cliType);
|
|
101077
101121
|
const rawProvider = this.providerLoader.getByAlias(cliType);
|
|
101078
101122
|
const provider = rawProvider ? this.providerLoader.resolve(normalizedType) || rawProvider : void 0;
|
|
@@ -102099,11 +102143,11 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
102099
102143
|
};
|
|
102100
102144
|
var import_child_process12 = require("child_process");
|
|
102101
102145
|
var net3 = __toESM2(require("net"));
|
|
102102
|
-
var
|
|
102146
|
+
var os25 = __toESM2(require("os"));
|
|
102103
102147
|
var path46 = __toESM2(require("path"));
|
|
102104
102148
|
var fs39 = __toESM2(require("fs"));
|
|
102105
102149
|
var path45 = __toESM2(require("path"));
|
|
102106
|
-
var
|
|
102150
|
+
var os24 = __toESM2(require("os"));
|
|
102107
102151
|
var chokidar = __toESM2(require_chokidar());
|
|
102108
102152
|
init_hash();
|
|
102109
102153
|
init_logger();
|
|
@@ -102578,7 +102622,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
102578
102622
|
init_config();
|
|
102579
102623
|
init_native_history_executor();
|
|
102580
102624
|
var fs35 = __toESM2(require("fs"));
|
|
102581
|
-
var
|
|
102625
|
+
var os23 = __toESM2(require("os"));
|
|
102582
102626
|
var path40 = __toESM2(require("path"));
|
|
102583
102627
|
var fs31 = __toESM2(require("fs"));
|
|
102584
102628
|
var path36 = __toESM2(require("path"));
|
|
@@ -103084,7 +103128,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
103084
103128
|
}
|
|
103085
103129
|
var fs33 = __toESM2(require("fs"));
|
|
103086
103130
|
var path38 = __toESM2(require("path"));
|
|
103087
|
-
var
|
|
103131
|
+
var os21 = __toESM2(require("os"));
|
|
103088
103132
|
init_load_better_sqlite3();
|
|
103089
103133
|
init_logger();
|
|
103090
103134
|
function extractTimestampValue3(value) {
|
|
@@ -103108,7 +103152,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
103108
103152
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
103109
103153
|
}
|
|
103110
103154
|
function antigravityRoot() {
|
|
103111
|
-
return path38.join(
|
|
103155
|
+
return path38.join(os21.homedir(), ".gemini", "antigravity-cli");
|
|
103112
103156
|
}
|
|
103113
103157
|
function historyJsonlPath() {
|
|
103114
103158
|
return path38.join(antigravityRoot(), "history.jsonl");
|
|
@@ -103695,11 +103739,11 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
103695
103739
|
}
|
|
103696
103740
|
var fs34 = __toESM2(require("fs"));
|
|
103697
103741
|
var path39 = __toESM2(require("path"));
|
|
103698
|
-
var
|
|
103742
|
+
var os222 = __toESM2(require("os"));
|
|
103699
103743
|
init_load_better_sqlite3();
|
|
103700
103744
|
init_usage_normalize();
|
|
103701
|
-
var HERMES_STATE_DB = path39.join(
|
|
103702
|
-
var HERMES_LEGACY_SESSIONS_DIR = path39.join(
|
|
103745
|
+
var HERMES_STATE_DB = path39.join(os222.homedir(), ".hermes", "state.db");
|
|
103746
|
+
var HERMES_LEGACY_SESSIONS_DIR = path39.join(os222.homedir(), ".hermes", "sessions");
|
|
103703
103747
|
function statMtimeMs4(p) {
|
|
103704
103748
|
try {
|
|
103705
103749
|
return Math.floor(fs34.statSync(p).mtimeMs);
|
|
@@ -103984,7 +104028,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
103984
104028
|
}
|
|
103985
104029
|
}
|
|
103986
104030
|
function resolveClaudePath(workspace, sessionId) {
|
|
103987
|
-
const dir = path40.join(
|
|
104031
|
+
const dir = path40.join(os23.homedir(), ".claude", "projects", cwdAsDashes(workspace));
|
|
103988
104032
|
if (!fs35.existsSync(dir)) return null;
|
|
103989
104033
|
if (sessionId) {
|
|
103990
104034
|
const candidate = path40.join(dir, `${sessionId}.jsonl`);
|
|
@@ -104106,7 +104150,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
104106
104150
|
}
|
|
104107
104151
|
var AGY_SPAWN_CLAIM_GRACE_MS = 2e3;
|
|
104108
104152
|
function resolveAntigravityPath(workspace, sessionId, sessionStartedAtMs, instanceId) {
|
|
104109
|
-
const agyRoot = path40.join(
|
|
104153
|
+
const agyRoot = path40.join(os23.homedir(), ".gemini", "antigravity-cli");
|
|
104110
104154
|
const owner = antigravityOwnerToken(workspace, sessionStartedAtMs, instanceId);
|
|
104111
104155
|
if (sessionId && isUuidLikeSessionId2(sessionId)) {
|
|
104112
104156
|
const dbPath = path40.join(agyRoot, "conversations", `${sessionId}.db`);
|
|
@@ -104190,9 +104234,9 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
104190
104234
|
function resolveHermesPath(workspace, sessionId) {
|
|
104191
104235
|
void workspace;
|
|
104192
104236
|
void sessionId;
|
|
104193
|
-
const dbPath = path40.join(
|
|
104237
|
+
const dbPath = path40.join(os23.homedir(), ".hermes", "state.db");
|
|
104194
104238
|
if (fs35.existsSync(dbPath)) return dbPath;
|
|
104195
|
-
const dir = path40.join(
|
|
104239
|
+
const dir = path40.join(os23.homedir(), ".hermes", "sessions");
|
|
104196
104240
|
if (!fs35.existsSync(dir)) return null;
|
|
104197
104241
|
return newestRecentFile2(dir, /^session_.*\.json$/);
|
|
104198
104242
|
}
|
|
@@ -104218,7 +104262,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
104218
104262
|
return cwd.replace(/\//g, "-");
|
|
104219
104263
|
}
|
|
104220
104264
|
function codexSessionsRoot() {
|
|
104221
|
-
return path40.join(
|
|
104265
|
+
return path40.join(os23.homedir(), ".codex", "sessions");
|
|
104222
104266
|
}
|
|
104223
104267
|
function isUuidLikeSessionId2(sessionId) {
|
|
104224
104268
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(sessionId);
|
|
@@ -106624,8 +106668,8 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
106624
106668
|
return { updated: false };
|
|
106625
106669
|
}
|
|
106626
106670
|
this.log("Downloading latest providers from GitHub...");
|
|
106627
|
-
const tmpTar = path45.join(
|
|
106628
|
-
const tmpExtract = path45.join(
|
|
106671
|
+
const tmpTar = path45.join(os24.tmpdir(), `adhdev-providers-${Date.now()}.tar.gz`);
|
|
106672
|
+
const tmpExtract = path45.join(os24.tmpdir(), `adhdev-providers-extract-${Date.now()}`);
|
|
106629
106673
|
await this.downloadFile(tarballTarget.url, tmpTar);
|
|
106630
106674
|
fs39.mkdirSync(tmpExtract, { recursive: true });
|
|
106631
106675
|
await extractTarballGz(tmpTar, tmpExtract);
|
|
@@ -107380,7 +107424,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
107380
107424
|
});
|
|
107381
107425
|
}
|
|
107382
107426
|
async function killIdeProcess(ideId) {
|
|
107383
|
-
const plat =
|
|
107427
|
+
const plat = os25.platform();
|
|
107384
107428
|
const appName = getMacAppIdentifiers()[ideId];
|
|
107385
107429
|
const winProcesses = getWinProcessNames()[ideId];
|
|
107386
107430
|
try {
|
|
@@ -107441,7 +107485,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
107441
107485
|
}
|
|
107442
107486
|
}
|
|
107443
107487
|
async function isIdeRunning(ideId) {
|
|
107444
|
-
const plat =
|
|
107488
|
+
const plat = os25.platform();
|
|
107445
107489
|
try {
|
|
107446
107490
|
if (plat === "darwin") {
|
|
107447
107491
|
const appName = getMacAppIdentifiers()[ideId];
|
|
@@ -107496,7 +107540,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
107496
107540
|
}
|
|
107497
107541
|
}
|
|
107498
107542
|
async function detectCurrentWorkspace(ideId) {
|
|
107499
|
-
const plat =
|
|
107543
|
+
const plat = os25.platform();
|
|
107500
107544
|
if (plat === "darwin") {
|
|
107501
107545
|
try {
|
|
107502
107546
|
const appName = getMacAppIdentifiers()[ideId];
|
|
@@ -107516,7 +107560,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
107516
107560
|
const appName = appNameMap[ideId];
|
|
107517
107561
|
if (appName) {
|
|
107518
107562
|
const storagePath = path46.join(
|
|
107519
|
-
process.env.APPDATA || path46.join(
|
|
107563
|
+
process.env.APPDATA || path46.join(os25.homedir(), "AppData", "Roaming"),
|
|
107520
107564
|
appName,
|
|
107521
107565
|
"storage.json"
|
|
107522
107566
|
);
|
|
@@ -107538,7 +107582,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
107538
107582
|
return void 0;
|
|
107539
107583
|
}
|
|
107540
107584
|
async function launchWithCdp(options = {}) {
|
|
107541
|
-
const platform10 =
|
|
107585
|
+
const platform10 = os25.platform();
|
|
107542
107586
|
let targetIde;
|
|
107543
107587
|
const ides = await detectIDEs(getProviderLoader());
|
|
107544
107588
|
if (options.ideId) {
|
|
@@ -108612,6 +108656,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
108612
108656
|
if (sessionCleanup.success === false) return { success: false, removed: false, sessionCleanup };
|
|
108613
108657
|
}
|
|
108614
108658
|
let worktreeCleanup;
|
|
108659
|
+
let remoteForwardedResult;
|
|
108615
108660
|
if (node?.isLocalWorktree) {
|
|
108616
108661
|
const nodeDaemonId = typeof node.daemonId === "string" ? node.daemonId.trim() : void 0;
|
|
108617
108662
|
const isRemoteWorktree = nodeDaemonId && !daemonIdsEquivalent(nodeDaemonId, ctx.deps.statusInstanceId) && ctx.deps.dispatchMeshCommand && !args?._meshDirectDispatch;
|
|
@@ -108620,7 +108665,11 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
108620
108665
|
...typeof args === "object" && args !== null ? args : {},
|
|
108621
108666
|
_meshDirectDispatch: true
|
|
108622
108667
|
});
|
|
108623
|
-
|
|
108668
|
+
const forwardedResult = forwarded ?? { success: false, error: "no response from remote node" };
|
|
108669
|
+
const forwardedRemoved = forwardedResult.success === true && forwardedResult.removed !== false;
|
|
108670
|
+
if (!forwardedRemoved) return forwardedResult;
|
|
108671
|
+
remoteForwardedResult = forwardedResult;
|
|
108672
|
+
worktreeCleanup = forwardedResult.worktreeCleanup !== null && typeof forwardedResult.worktreeCleanup === "object" ? forwardedResult.worktreeCleanup : void 0;
|
|
108624
108673
|
}
|
|
108625
108674
|
const cleanupResult = await ctx.cleanupLocalWorktreeNode({ mesh, node, nodeId, force: args?.force === true });
|
|
108626
108675
|
if (cleanupResult.success === false) {
|
|
@@ -108672,6 +108721,10 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
108672
108721
|
nodeId,
|
|
108673
108722
|
payload: {
|
|
108674
108723
|
worktree: !!node?.isLocalWorktree,
|
|
108724
|
+
// Distinguish a removal executed by a remote owning daemon
|
|
108725
|
+
// (this entry records only the coordinator-side membership
|
|
108726
|
+
// reconciliation) from a fully local one.
|
|
108727
|
+
...remoteForwardedResult ? { removedByRemoteDaemon: true } : {},
|
|
108675
108728
|
sessionCleanupMode,
|
|
108676
108729
|
workspace: typeof node?.workspace === "string" ? node.workspace : void 0,
|
|
108677
108730
|
daemonId: typeof node?.daemonId === "string" ? node.daemonId : void 0,
|
|
@@ -108692,6 +108745,10 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
108692
108745
|
const orphanedSessionsRemaining = skippedLiveSessionIds.length > 0;
|
|
108693
108746
|
const orphanNextAction = orphanedSessionsRemaining ? `Live session(s) [${skippedLiveSessionIds.join(", ")}] were skipped and still survive this node removal. Run mesh_cleanup_sessions with mode:'stop_and_delete' and sessionIds:[${skippedLiveSessionIds.map((id) => `'${id}'`).join(", ")}] to release them.` : void 0;
|
|
108694
108747
|
return {
|
|
108748
|
+
// Remote-forwarded removal: start from the owning daemon's own response
|
|
108749
|
+
// so its detail fields survive, then overlay this coordinator's
|
|
108750
|
+
// membership bookkeeping (removed/ledger/cache) computed above.
|
|
108751
|
+
...remoteForwardedResult ?? {},
|
|
108695
108752
|
success: true,
|
|
108696
108753
|
removed,
|
|
108697
108754
|
...residueWarning ? { residueWarning } : {},
|
|
@@ -118346,7 +118403,7 @@ ${e?.stderr || ""}`;
|
|
|
118346
118403
|
init_chat_message_normalization();
|
|
118347
118404
|
var fs47 = __toESM2(require("fs"));
|
|
118348
118405
|
var path48 = __toESM2(require("path"));
|
|
118349
|
-
var
|
|
118406
|
+
var os26 = __toESM2(require("os"));
|
|
118350
118407
|
var import_os6 = require("os");
|
|
118351
118408
|
init_config();
|
|
118352
118409
|
var import_child_process13 = require("child_process");
|
|
@@ -118471,7 +118528,7 @@ ${e?.stderr || ""}`;
|
|
|
118471
118528
|
function checkPathExists2(paths) {
|
|
118472
118529
|
for (const p of paths) {
|
|
118473
118530
|
if (p.includes("*")) {
|
|
118474
|
-
const home =
|
|
118531
|
+
const home = os26.homedir();
|
|
118475
118532
|
const resolved = p.replace(/\*/g, home.split(path48.sep).pop() || "");
|
|
118476
118533
|
if (fs47.existsSync(resolved)) return resolved;
|
|
118477
118534
|
} else {
|
|
@@ -120868,7 +120925,7 @@ async (params) => {
|
|
|
120868
120925
|
}
|
|
120869
120926
|
var fs50 = __toESM2(require("fs"));
|
|
120870
120927
|
var path51 = __toESM2(require("path"));
|
|
120871
|
-
var
|
|
120928
|
+
var os27 = __toESM2(require("os"));
|
|
120872
120929
|
var import_session_host_core11 = require_dist();
|
|
120873
120930
|
function getAutoImplPid(ctx) {
|
|
120874
120931
|
const pid = ctx.autoImplProcess?.pid;
|
|
@@ -121070,7 +121127,7 @@ async (params) => {
|
|
|
121070
121127
|
});
|
|
121071
121128
|
const referenceScripts = loadAutoImplReferenceScripts(ctx, resolvedReference);
|
|
121072
121129
|
const prompt = buildAutoImplPrompt(ctx, type2, provider, providerDir, functions, domContext, referenceScripts, comment, resolvedReference, verification);
|
|
121073
|
-
const tmpDir = path51.join(
|
|
121130
|
+
const tmpDir = path51.join(os27.tmpdir(), "adhdev-autoimpl");
|
|
121074
121131
|
if (!fs50.existsSync(tmpDir)) fs50.mkdirSync(tmpDir, { recursive: true });
|
|
121075
121132
|
const promptFile = path51.join(tmpDir, `prompt-${type2}-${Date.now()}.md`);
|
|
121076
121133
|
fs50.writeFileSync(promptFile, prompt, "utf-8");
|
|
@@ -121225,7 +121282,7 @@ async (params) => {
|
|
|
121225
121282
|
const interactiveFlags = ["--yolo", "--interactive", "-i"];
|
|
121226
121283
|
const baseArgs = [...spawn7.args || []].filter((a) => !interactiveFlags.includes(a));
|
|
121227
121284
|
let shellCmd;
|
|
121228
|
-
const isWin =
|
|
121285
|
+
const isWin = os27.platform() === "win32";
|
|
121229
121286
|
const escapeArg = (a) => isWin ? `"${a.replace(/"/g, '""')}"` : `'${a.replace(/'/g, "'\\''")}'`;
|
|
121230
121287
|
const promptMode = autoImpl?.promptMode ?? "stdin";
|
|
121231
121288
|
const extraArgs = autoImpl?.extraArgs ?? [];
|
|
@@ -121264,7 +121321,7 @@ async (params) => {
|
|
|
121264
121321
|
try {
|
|
121265
121322
|
const pty = require("node-pty");
|
|
121266
121323
|
ctx.log(`Auto-implement spawn (PTY): ${shellCmd}`);
|
|
121267
|
-
const isWin2 =
|
|
121324
|
+
const isWin2 = os27.platform() === "win32";
|
|
121268
121325
|
child = pty.spawn(isWin2 ? "cmd.exe" : process.env.SHELL || "/bin/zsh", [isWin2 ? "/c" : "-c", shellCmd], {
|
|
121269
121326
|
name: "xterm-256color",
|
|
121270
121327
|
cols: import_session_host_core11.DEFAULT_SESSION_HOST_COLS,
|
|
@@ -123919,7 +123976,7 @@ data: ${JSON.stringify(msg.data)}
|
|
|
123919
123976
|
}
|
|
123920
123977
|
var import_child_process14 = require("child_process");
|
|
123921
123978
|
var fs52 = __toESM2(require("fs"));
|
|
123922
|
-
var
|
|
123979
|
+
var os28 = __toESM2(require("os"));
|
|
123923
123980
|
var path53 = __toESM2(require("path"));
|
|
123924
123981
|
var import_session_host_core15 = require_dist();
|
|
123925
123982
|
init_logger();
|
|
@@ -123991,7 +124048,7 @@ data: ${JSON.stringify(msg.data)}
|
|
|
123991
124048
|
}
|
|
123992
124049
|
let portableNode = null;
|
|
123993
124050
|
try {
|
|
123994
|
-
portableNode = findPortableNode22(
|
|
124051
|
+
portableNode = findPortableNode22(os28.homedir(), process.execPath, resolveInstanceDir());
|
|
123995
124052
|
} catch (error48) {
|
|
123996
124053
|
LOG2.warn(
|
|
123997
124054
|
"SessionHost",
|
|
@@ -124491,8 +124548,12 @@ data: ${JSON.stringify(msg.data)}
|
|
|
124491
124548
|
loadMeshCoordinatorRegistry();
|
|
124492
124549
|
const upgradeFailureNotice = readUpgradeFailureNotice();
|
|
124493
124550
|
if (upgradeFailureNotice) {
|
|
124494
|
-
|
|
124495
|
-
${upgradeFailureNotice.
|
|
124551
|
+
const age = upgradeFailureNotice.ageLabel ? `${upgradeFailureNotice.ageLabel}, recorded ${upgradeFailureNotice.recordedAt}` : "recorded at an unknown time";
|
|
124552
|
+
const target = upgradeFailureNotice.targetVersion ? `, attempted target v${upgradeFailureNotice.targetVersion}` : "";
|
|
124553
|
+
const running = (config2.statusVersion || "").trim().replace(/^v/, "");
|
|
124554
|
+
const supersededHint = upgradeFailureNotice.targetVersion && running && upgradeFailureNotice.targetVersion.replace(/^v/, "") !== running ? ` This notice targets a DIFFERENT version than the one now running (v${running}) \u2014 it is most likely a stale record of an earlier attempt, not a report about this boot.` : "";
|
|
124555
|
+
LOG2.warn("Upgrade", `Previous daemon upgrade FAILED and was rolled back \u2014 this daemon is running the previous version. Notice (${age}${target}) at ${upgradeFailureNotice.noticePath}:
|
|
124556
|
+
${upgradeFailureNotice.notice}${supersededHint}`);
|
|
124496
124557
|
}
|
|
124497
124558
|
const appConfig = loadConfig2();
|
|
124498
124559
|
const providerSourceMode = appConfig.providerSourceMode || "normal";
|