@adhdev/daemon-core 0.9.82-rc.315 → 0.9.82-rc.316
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/cli-adapter-types.d.ts +23 -0
- package/dist/cli-adapters/provider-cli-adapter.d.ts +9 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +206 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +205 -27
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-work-queue.d.ts +22 -0
- package/dist/repo-mesh-types.d.ts +68 -0
- package/package.json +2 -2
- package/src/cli-adapter-types.ts +25 -0
- package/src/cli-adapters/provider-cli-adapter.ts +36 -1
- package/src/cli-adapters/provider-cli-shared.ts +19 -2
- package/src/commands/router.ts +10 -1
- package/src/config/mesh-config.ts +72 -1
- package/src/index.ts +7 -1
- package/src/mesh/mesh-work-queue.ts +89 -11
- package/src/repo-mesh-types.ts +112 -0
package/dist/index.mjs
CHANGED
|
@@ -35,6 +35,35 @@ function resolveNodeSchedulingPriority(nodePolicy) {
|
|
|
35
35
|
const raw = Number(nodePolicy?.schedulingPriority);
|
|
36
36
|
return Number.isFinite(raw) ? raw : 0;
|
|
37
37
|
}
|
|
38
|
+
function resolveTaskAffinityRole(taskMode, policy) {
|
|
39
|
+
if (!taskMode) return null;
|
|
40
|
+
if (policy?.enabled === false) return null;
|
|
41
|
+
const override = policy?.byTaskMode && Object.prototype.hasOwnProperty.call(policy.byTaskMode, taskMode) ? policy.byTaskMode[taskMode] : void 0;
|
|
42
|
+
if (typeof override === "string") {
|
|
43
|
+
const trimmed = override.trim().toLowerCase();
|
|
44
|
+
return trimmed ? trimmed : null;
|
|
45
|
+
}
|
|
46
|
+
const fallback = DEFAULT_TASKMODE_ROLE_MAP[taskMode];
|
|
47
|
+
return fallback ?? null;
|
|
48
|
+
}
|
|
49
|
+
function resolveMeshRoleOptions(policy) {
|
|
50
|
+
const out = [...STANDARD_MESH_ROLES];
|
|
51
|
+
const seen = new Set(out);
|
|
52
|
+
const add = (raw) => {
|
|
53
|
+
if (typeof raw !== "string") return;
|
|
54
|
+
const role = raw.trim().toLowerCase();
|
|
55
|
+
if (!role || seen.has(role)) return;
|
|
56
|
+
seen.add(role);
|
|
57
|
+
out.push(role);
|
|
58
|
+
};
|
|
59
|
+
if (policy?.byTaskMode) {
|
|
60
|
+
for (const value of Object.values(policy.byTaskMode)) add(value);
|
|
61
|
+
}
|
|
62
|
+
if (Array.isArray(policy?.customRoles)) {
|
|
63
|
+
for (const value of policy.customRoles) add(value);
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
38
67
|
function resolveAutoConvergeCodeChange(policy) {
|
|
39
68
|
return policy?.autoConvergeCodeChange === true;
|
|
40
69
|
}
|
|
@@ -65,7 +94,7 @@ function resolveProviderMaxParallel(nodePolicy, providerType) {
|
|
|
65
94
|
if (!Number.isFinite(raw) || raw < 0) return void 0;
|
|
66
95
|
return Math.floor(raw);
|
|
67
96
|
}
|
|
68
|
-
var MESH_SCHEDULING_STRATEGIES, DEFAULT_MESH_SCHEDULING_STRATEGY, MESH_CONVERGE_REFINE_TAG, MESH_CONVERGE_FAST_FORWARD_TAG, DEFAULT_MESH_POLICY;
|
|
97
|
+
var MESH_SCHEDULING_STRATEGIES, DEFAULT_MESH_SCHEDULING_STRATEGY, MESH_CONVERGE_REFINE_TAG, MESH_CONVERGE_FAST_FORWARD_TAG, STANDARD_MESH_ROLES, DEFAULT_TASKMODE_ROLE_MAP, DEFAULT_MESH_POLICY;
|
|
69
98
|
var init_repo_mesh_types = __esm({
|
|
70
99
|
"src/repo-mesh-types.ts"() {
|
|
71
100
|
"use strict";
|
|
@@ -78,6 +107,14 @@ var init_repo_mesh_types = __esm({
|
|
|
78
107
|
DEFAULT_MESH_SCHEDULING_STRATEGY = "first_eligible";
|
|
79
108
|
MESH_CONVERGE_REFINE_TAG = "converge=refine";
|
|
80
109
|
MESH_CONVERGE_FAST_FORWARD_TAG = "converge=fast_forward";
|
|
110
|
+
STANDARD_MESH_ROLES = ["investigator", "coder", "validator", "converger"];
|
|
111
|
+
DEFAULT_TASKMODE_ROLE_MAP = {
|
|
112
|
+
live_debug_readonly: "investigator",
|
|
113
|
+
code_change: "coder",
|
|
114
|
+
launch_app: "coder",
|
|
115
|
+
validation: "validator",
|
|
116
|
+
convergence: "converger"
|
|
117
|
+
};
|
|
81
118
|
DEFAULT_MESH_POLICY = {
|
|
82
119
|
requirePreTaskCheckpoint: false,
|
|
83
120
|
requirePostTaskCheckpoint: true,
|
|
@@ -311,10 +348,10 @@ function readInjected(value) {
|
|
|
311
348
|
}
|
|
312
349
|
function getDaemonBuildInfo() {
|
|
313
350
|
if (cached) return cached;
|
|
314
|
-
const commit = readInjected(true ? "
|
|
315
|
-
const commitShort = readInjected(true ? "
|
|
316
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
317
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
351
|
+
const commit = readInjected(true ? "930909642b3f28668483159d3a8f39d0a796c61a" : void 0) ?? "unknown";
|
|
352
|
+
const commitShort = readInjected(true ? "93090964" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
353
|
+
const version = readInjected(true ? "0.9.82-rc.316" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
354
|
+
const builtAt = readInjected(true ? "2026-06-18T07:23:07.242Z" : void 0);
|
|
318
355
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
319
356
|
return cached;
|
|
320
357
|
}
|
|
@@ -1575,8 +1612,61 @@ function mergeMeshPolicy(base, patch) {
|
|
|
1575
1612
|
} else {
|
|
1576
1613
|
delete policy.autoConvergeCodeChange;
|
|
1577
1614
|
}
|
|
1615
|
+
const normalizedAffinity = normalizeTaskAffinityPolicy(policy.taskAffinity);
|
|
1616
|
+
if (normalizedAffinity) {
|
|
1617
|
+
policy.taskAffinity = normalizedAffinity;
|
|
1618
|
+
} else {
|
|
1619
|
+
delete policy.taskAffinity;
|
|
1620
|
+
}
|
|
1578
1621
|
return policy;
|
|
1579
1622
|
}
|
|
1623
|
+
function normalizeTaskAffinityPolicy(value) {
|
|
1624
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
1625
|
+
const record = value;
|
|
1626
|
+
const out = {};
|
|
1627
|
+
let hasContent = false;
|
|
1628
|
+
if (typeof record.enabled === "boolean") {
|
|
1629
|
+
out.enabled = record.enabled;
|
|
1630
|
+
if (record.enabled === false) hasContent = true;
|
|
1631
|
+
else delete out.enabled;
|
|
1632
|
+
}
|
|
1633
|
+
if (record.byTaskMode && typeof record.byTaskMode === "object" && !Array.isArray(record.byTaskMode)) {
|
|
1634
|
+
const byTaskMode = {};
|
|
1635
|
+
for (const [mode, raw] of Object.entries(record.byTaskMode)) {
|
|
1636
|
+
const modeKey = mode.trim();
|
|
1637
|
+
if (!modeKey) continue;
|
|
1638
|
+
if (typeof raw !== "string") continue;
|
|
1639
|
+
const role = raw.trim().toLowerCase();
|
|
1640
|
+
byTaskMode[modeKey] = role;
|
|
1641
|
+
if (role && !STANDARD_MESH_ROLES.includes(role)) {
|
|
1642
|
+
try {
|
|
1643
|
+
console.warn(`[mesh] task_affinity.byTaskMode.${modeKey}: custom role "${role}" is not a standard mesh role (${STANDARD_MESH_ROLES.join("/")}); routing still applies`);
|
|
1644
|
+
} catch {
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
if (Object.keys(byTaskMode).length > 0) {
|
|
1649
|
+
out.byTaskMode = byTaskMode;
|
|
1650
|
+
hasContent = true;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
if (Array.isArray(record.customRoles)) {
|
|
1654
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1655
|
+
const customRoles = [];
|
|
1656
|
+
for (const raw of record.customRoles) {
|
|
1657
|
+
if (typeof raw !== "string") continue;
|
|
1658
|
+
const role = raw.trim().toLowerCase();
|
|
1659
|
+
if (!role || seen.has(role)) continue;
|
|
1660
|
+
seen.add(role);
|
|
1661
|
+
customRoles.push(role);
|
|
1662
|
+
}
|
|
1663
|
+
if (customRoles.length > 0) {
|
|
1664
|
+
out.customRoles = customRoles;
|
|
1665
|
+
hasContent = true;
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
return hasContent ? out : void 0;
|
|
1669
|
+
}
|
|
1580
1670
|
function normalizeAutoFastForwardPolicy(value) {
|
|
1581
1671
|
const record = value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
1582
1672
|
const maxBehind = Number(record.maxBehind);
|
|
@@ -2867,6 +2957,7 @@ __export(mesh_work_queue_exports, {
|
|
|
2867
2957
|
recordTaskAutoLaunch: () => recordTaskAutoLaunch,
|
|
2868
2958
|
requeueTask: () => requeueTask,
|
|
2869
2959
|
resolveConvergeRequiredTags: () => resolveConvergeRequiredTags,
|
|
2960
|
+
resolveTaskAffinityRequiredTags: () => resolveTaskAffinityRequiredTags,
|
|
2870
2961
|
updateDirectDispatchStatus: () => updateDirectDispatchStatus,
|
|
2871
2962
|
updateSessionTaskStatus: () => updateSessionTaskStatus,
|
|
2872
2963
|
updateTaskStatus: () => updateTaskStatus,
|
|
@@ -3006,6 +3097,31 @@ function resolveConvergeRequiredTags(meshId, taskMode, explicitRequiredTags, opt
|
|
|
3006
3097
|
if (!optedIn) return explicitRequiredTags;
|
|
3007
3098
|
return normalizeMeshCapabilityTags([...explicitRequiredTags, MESH_CONVERGE_REFINE_TAG]);
|
|
3008
3099
|
}
|
|
3100
|
+
function meshHasNodeAdvertisingRole(nodes, role) {
|
|
3101
|
+
if (!Array.isArray(nodes) || nodes.length === 0) return false;
|
|
3102
|
+
const wanted = `role=${role}`;
|
|
3103
|
+
return nodes.some((node) => buildMeshNodeCapabilityTags(node).includes(wanted));
|
|
3104
|
+
}
|
|
3105
|
+
function resolveTaskAffinityRequiredTags(meshId, taskMode, explicitRequiredTags, opts) {
|
|
3106
|
+
if (typeof opts?.targetNodeId === "string" && opts.targetNodeId.trim()) return explicitRequiredTags;
|
|
3107
|
+
if (opts?.callerSpecifiedRequiredTags === true) return explicitRequiredTags;
|
|
3108
|
+
let mesh;
|
|
3109
|
+
try {
|
|
3110
|
+
mesh = getMesh(meshId);
|
|
3111
|
+
} catch {
|
|
3112
|
+
return explicitRequiredTags;
|
|
3113
|
+
}
|
|
3114
|
+
const role = resolveTaskAffinityRole(taskMode, mesh?.policy?.taskAffinity);
|
|
3115
|
+
if (!role) return explicitRequiredTags;
|
|
3116
|
+
if (!meshHasNodeAdvertisingRole(mesh?.nodes, role)) {
|
|
3117
|
+
try {
|
|
3118
|
+
console.warn(`[mesh] task_affinity: no node advertises role=${role} for taskMode=${taskMode} in mesh ${meshId}; skipping injection (least_loaded fallback)`);
|
|
3119
|
+
} catch {
|
|
3120
|
+
}
|
|
3121
|
+
return explicitRequiredTags;
|
|
3122
|
+
}
|
|
3123
|
+
return normalizeMeshCapabilityTags([...explicitRequiredTags, `role=${role}`]);
|
|
3124
|
+
}
|
|
3009
3125
|
function withQueueLock(_meshId, fn) {
|
|
3010
3126
|
return MeshRuntimeStore.getInstance().transaction(fn);
|
|
3011
3127
|
}
|
|
@@ -3056,6 +3172,20 @@ function enqueueTask(meshId, message, opts) {
|
|
|
3056
3172
|
throw new Error(`duplicate_task_id: task '${id}' already exists in mesh '${meshId}'`);
|
|
3057
3173
|
}
|
|
3058
3174
|
assertNoDependencyCycle(meshId, id, dependsOn);
|
|
3175
|
+
const callerTags = normalizeMeshCapabilityTags(opts?.requiredTags);
|
|
3176
|
+
const callerSpecifiedRequiredTags = callerTags.length > 0;
|
|
3177
|
+
let resolvedRequiredTags = resolveConvergeRequiredTags(
|
|
3178
|
+
meshId,
|
|
3179
|
+
modeValidation.taskMode,
|
|
3180
|
+
callerTags,
|
|
3181
|
+
{ targetNodeId: opts?.targetNodeId }
|
|
3182
|
+
);
|
|
3183
|
+
resolvedRequiredTags = resolveTaskAffinityRequiredTags(
|
|
3184
|
+
meshId,
|
|
3185
|
+
modeValidation.taskMode,
|
|
3186
|
+
resolvedRequiredTags,
|
|
3187
|
+
{ targetNodeId: opts?.targetNodeId, callerSpecifiedRequiredTags }
|
|
3188
|
+
);
|
|
3059
3189
|
const entry = {
|
|
3060
3190
|
id,
|
|
3061
3191
|
meshId,
|
|
@@ -3064,15 +3194,7 @@ function enqueueTask(meshId, message, opts) {
|
|
|
3064
3194
|
taskMode: modeValidation.taskMode,
|
|
3065
3195
|
targetNodeId: opts?.targetNodeId,
|
|
3066
3196
|
targetSessionId: opts?.targetSessionId,
|
|
3067
|
-
|
|
3068
|
-
// tasks so they hard-filter onto refine-capable worktree nodes. No-op unless
|
|
3069
|
-
// the mesh opts in; explicit target_node_id / required_tags are preserved.
|
|
3070
|
-
requiredTags: resolveConvergeRequiredTags(
|
|
3071
|
-
meshId,
|
|
3072
|
-
modeValidation.taskMode,
|
|
3073
|
-
normalizeMeshCapabilityTags(opts?.requiredTags),
|
|
3074
|
-
{ targetNodeId: opts?.targetNodeId }
|
|
3075
|
-
),
|
|
3197
|
+
requiredTags: resolvedRequiredTags,
|
|
3076
3198
|
...dependsOn.length > 0 ? { dependsOn } : {},
|
|
3077
3199
|
...typeof opts?.missionId === "string" && opts.missionId.trim() ? { missionId: opts.missionId.trim() } : {},
|
|
3078
3200
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -10959,8 +11081,24 @@ function findBinary(name) {
|
|
|
10959
11081
|
}
|
|
10960
11082
|
const isWin = os12.platform() === "win32";
|
|
10961
11083
|
const paths = (process.env.PATH || "").split(path17.delimiter);
|
|
11084
|
+
const extraDirs = [];
|
|
11085
|
+
if (isWin) {
|
|
11086
|
+
if (process.env.APPDATA) extraDirs.push(path17.join(process.env.APPDATA, "npm"));
|
|
11087
|
+
try {
|
|
11088
|
+
extraDirs.push(path17.dirname(process.execPath));
|
|
11089
|
+
} catch {
|
|
11090
|
+
}
|
|
11091
|
+
} else {
|
|
11092
|
+
extraDirs.push(path17.join(os12.homedir(), ".npm-global", "bin"));
|
|
11093
|
+
extraDirs.push("/usr/local/bin", "/opt/homebrew/bin");
|
|
11094
|
+
try {
|
|
11095
|
+
extraDirs.push(path17.dirname(process.execPath));
|
|
11096
|
+
} catch {
|
|
11097
|
+
}
|
|
11098
|
+
}
|
|
11099
|
+
const searchDirs = [...paths, ...extraDirs];
|
|
10962
11100
|
const exes = isWin ? [".exe", ".cmd", ".bat", ""] : [""];
|
|
10963
|
-
for (const p of
|
|
11101
|
+
for (const p of searchDirs) {
|
|
10964
11102
|
if (!p) continue;
|
|
10965
11103
|
for (const ext of exes) {
|
|
10966
11104
|
const fullPath = path17.join(p, trimmed + ext);
|
|
@@ -14357,6 +14495,37 @@ ${lastSnapshot}`;
|
|
|
14357
14495
|
if (!this.ptyProcess || typeof this.ptyProcess.getMetadata !== "function") return null;
|
|
14358
14496
|
return this.ptyProcess.getMetadata();
|
|
14359
14497
|
}
|
|
14498
|
+
/**
|
|
14499
|
+
* Launch metadata for the dashboard Session info panel. Re-derives the spawn plan
|
|
14500
|
+
* (pure — same inputs the live PTY was spawned with) so the dashboard sees the
|
|
14501
|
+
* resolved binary, full arg vector, and cwd without us having to persist it.
|
|
14502
|
+
* extraEnv values are intentionally dropped (keys only) so secrets passed at
|
|
14503
|
+
* launch time never reach the dashboard.
|
|
14504
|
+
*/
|
|
14505
|
+
getLaunchInfo() {
|
|
14506
|
+
let command;
|
|
14507
|
+
let args = [...this.extraArgs];
|
|
14508
|
+
try {
|
|
14509
|
+
const plan = resolveCliSpawnPlan({
|
|
14510
|
+
provider: this.provider,
|
|
14511
|
+
runtimeSettings: this.runtimeSettings,
|
|
14512
|
+
workingDir: this.workingDir,
|
|
14513
|
+
extraArgs: this.extraArgs,
|
|
14514
|
+
extraEnv: this.extraEnv
|
|
14515
|
+
});
|
|
14516
|
+
command = plan.binaryPath;
|
|
14517
|
+
args = plan.allArgs;
|
|
14518
|
+
} catch {
|
|
14519
|
+
}
|
|
14520
|
+
return {
|
|
14521
|
+
command,
|
|
14522
|
+
args,
|
|
14523
|
+
extraArgs: [...this.extraArgs],
|
|
14524
|
+
cwd: this.workingDir,
|
|
14525
|
+
extraEnvKeys: Object.keys(this.extraEnv || {}),
|
|
14526
|
+
providerSessionId: this.providerSessionId || void 0
|
|
14527
|
+
};
|
|
14528
|
+
}
|
|
14360
14529
|
updateRuntimeMeta(meta, replace = false) {
|
|
14361
14530
|
const nextProviderSessionId = typeof meta?.providerSessionId === "string" ? meta.providerSessionId.trim() : "";
|
|
14362
14531
|
if (nextProviderSessionId) {
|
|
@@ -18588,8 +18757,8 @@ async function detectIDEs(providerLoader) {
|
|
|
18588
18757
|
if (existsSync16(bundledCli)) resolvedCli = bundledCli;
|
|
18589
18758
|
}
|
|
18590
18759
|
if (!resolvedCli && appPath && os30 === "win32") {
|
|
18591
|
-
const { dirname:
|
|
18592
|
-
const appDir =
|
|
18760
|
+
const { dirname: dirname15 } = await import("path");
|
|
18761
|
+
const appDir = dirname15(appPath);
|
|
18593
18762
|
const candidates = [
|
|
18594
18763
|
`${appDir}\\\\bin\\\\${def.cli}.cmd`,
|
|
18595
18764
|
`${appDir}\\\\bin\\\\${def.cli}`,
|
|
@@ -41197,7 +41366,7 @@ init_mesh_refine_status();
|
|
|
41197
41366
|
|
|
41198
41367
|
// src/mesh/mesh-init.ts
|
|
41199
41368
|
import { existsSync as existsSync35, mkdirSync as mkdirSync15, writeFileSync as writeFileSync17 } from "fs";
|
|
41200
|
-
import { dirname as
|
|
41369
|
+
import { dirname as dirname8, join as join37 } from "path";
|
|
41201
41370
|
var MESH_INIT_REFINE_CONFIG_PATH = MESH_REFINE_CONFIG_LOCATIONS[0];
|
|
41202
41371
|
var MESH_INIT_WORKTREE_BOOTSTRAP_CONFIG_PATH = MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS[0];
|
|
41203
41372
|
var CANDIDATE_STALE_INPUTS = [
|
|
@@ -41212,7 +41381,7 @@ var CANDIDATE_STALE_INPUTS = [
|
|
|
41212
41381
|
];
|
|
41213
41382
|
function writeConfigFile(workspace, relativePath, config) {
|
|
41214
41383
|
const target = join37(workspace, relativePath);
|
|
41215
|
-
mkdirSync15(
|
|
41384
|
+
mkdirSync15(dirname8(target), { recursive: true });
|
|
41216
41385
|
writeFileSync17(target, `${JSON.stringify(config, null, 2)}
|
|
41217
41386
|
`, "utf-8");
|
|
41218
41387
|
return target;
|
|
@@ -46757,6 +46926,7 @@ ${hintLines.join("\n")}` : "",
|
|
|
46757
46926
|
if (!target && !coord) return { success: false, error: "Session not found", sessionId };
|
|
46758
46927
|
const adapter = target ? this.deps.cliManager.findAdapter(target.providerType, { instanceKey: sessionId })?.adapter : void 0;
|
|
46759
46928
|
const runtimeMeta = adapter && typeof adapter.getRuntimeMetadata === "function" ? adapter.getRuntimeMetadata() : void 0;
|
|
46929
|
+
const launchInfo = adapter && typeof adapter.getLaunchInfo === "function" ? adapter.getLaunchInfo() : void 0;
|
|
46760
46930
|
const providerType = target?.providerType || coord?.cliType || "";
|
|
46761
46931
|
const providerMetaForSession = providerType ? this.deps.providerLoader.resolve?.(providerType) || this.deps.providerLoader.getMeta(providerType) : void 0;
|
|
46762
46932
|
return {
|
|
@@ -46768,8 +46938,11 @@ ${hintLines.join("\n")}` : "",
|
|
|
46768
46938
|
transport: target?.transport,
|
|
46769
46939
|
workspace: target?.workspace || coord?.workspace,
|
|
46770
46940
|
spawnedAtMs: target?.spawnedAtMs || coord?.startedAt,
|
|
46771
|
-
providerSessionId
|
|
46772
|
-
|
|
46941
|
+
// providerSessionId now comes from the live adapter's launch info
|
|
46942
|
+
// (the registry target never carried it — it was always undefined).
|
|
46943
|
+
providerSessionId: launchInfo?.providerSessionId || target?.providerSessionId,
|
|
46944
|
+
runtimeMetadata: runtimeMeta,
|
|
46945
|
+
launch: launchInfo
|
|
46773
46946
|
},
|
|
46774
46947
|
coordinator: coord ? {
|
|
46775
46948
|
meshId: coord.meshId,
|
|
@@ -48610,7 +48783,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
48610
48783
|
};
|
|
48611
48784
|
}
|
|
48612
48785
|
const { existsSync: existsSync44, readFileSync: readFileSync35, writeFileSync: writeFileSync23, copyFileSync: copyFileSync4, mkdirSync: mkdirSync21 } = await import("fs");
|
|
48613
|
-
const { dirname:
|
|
48786
|
+
const { dirname: dirname15 } = await import("path");
|
|
48614
48787
|
const mcpConfigPath = coordinatorSetup.configPath;
|
|
48615
48788
|
const hermesManualFallback = cliType === "hermes-cli" && configFormat === "hermes_config_yaml" ? createHermesManualMeshCoordinatorSetup(meshId, workspace) : null;
|
|
48616
48789
|
let hermesBaseConfig = null;
|
|
@@ -48645,7 +48818,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
48645
48818
|
};
|
|
48646
48819
|
}
|
|
48647
48820
|
try {
|
|
48648
|
-
mkdirSync21(
|
|
48821
|
+
mkdirSync21(dirname15(mcpConfigPath), { recursive: true });
|
|
48649
48822
|
} catch (error) {
|
|
48650
48823
|
const message = `Could not prepare MCP config path for automatic setup: ${error?.message || error}`;
|
|
48651
48824
|
LOG.error("MeshCoordinator", message);
|
|
@@ -48655,7 +48828,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
48655
48828
|
const hadExistingMcpConfig = existsSync44(mcpConfigPath);
|
|
48656
48829
|
let existingMcpConfig = hermesBaseConfig?.config || {};
|
|
48657
48830
|
if (hermesBaseConfig) {
|
|
48658
|
-
copyHermesCoordinatorCredentialFiles(hermesBaseConfig.sourceHome,
|
|
48831
|
+
copyHermesCoordinatorCredentialFiles(hermesBaseConfig.sourceHome, dirname15(mcpConfigPath));
|
|
48659
48832
|
}
|
|
48660
48833
|
if (hadExistingMcpConfig) {
|
|
48661
48834
|
try {
|
|
@@ -48693,7 +48866,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
48693
48866
|
const cliArgs = [];
|
|
48694
48867
|
const launchEnv = {};
|
|
48695
48868
|
if (configFormat === "hermes_config_yaml") {
|
|
48696
|
-
launchEnv.HERMES_HOME =
|
|
48869
|
+
launchEnv.HERMES_HOME = dirname15(mcpConfigPath);
|
|
48697
48870
|
launchEnv.HERMES_IGNORE_USER_CONFIG = "";
|
|
48698
48871
|
}
|
|
48699
48872
|
let autoImportContextFilePath;
|
|
@@ -57718,11 +57891,11 @@ init_parse_session();
|
|
|
57718
57891
|
// src/providers/sdk/v1/fixture-tooling/replay.ts
|
|
57719
57892
|
init_provider_cli_shared();
|
|
57720
57893
|
import { readFileSync as readFileSync33 } from "fs";
|
|
57721
|
-
import { dirname as
|
|
57894
|
+
import { dirname as dirname13, resolve as resolve22 } from "path";
|
|
57722
57895
|
|
|
57723
57896
|
// src/providers/sdk/v1/validators/taint.ts
|
|
57724
57897
|
import { readFileSync as readFileSync34, existsSync as existsSync43 } from "fs";
|
|
57725
|
-
import { resolve as resolve23, dirname as
|
|
57898
|
+
import { resolve as resolve23, dirname as dirname14, join as join44 } from "path";
|
|
57726
57899
|
|
|
57727
57900
|
// src/providers/sdk/v1/validators/index.ts
|
|
57728
57901
|
init_manifest();
|
|
@@ -57827,6 +58000,7 @@ export {
|
|
|
57827
58000
|
DEFAULT_STATUS_INITIAL_REPORT_DELAY_MS,
|
|
57828
58001
|
DEFAULT_STATUS_P2P_REPORT_INTERVAL_MS,
|
|
57829
58002
|
DEFAULT_STATUS_SERVER_REPORT_INTERVAL_MS,
|
|
58003
|
+
DEFAULT_TASKMODE_ROLE_MAP,
|
|
57830
58004
|
DEV_SERVER_PORT,
|
|
57831
58005
|
DaemonAgentStreamManager,
|
|
57832
58006
|
DaemonCdpInitializer,
|
|
@@ -57866,6 +58040,7 @@ export {
|
|
|
57866
58040
|
RawTerminalAttachment,
|
|
57867
58041
|
STALE_TERMINAL_REFINE_WINDOW_MS,
|
|
57868
58042
|
STANDALONE_CDP_SCAN_INTERVAL_MS,
|
|
58043
|
+
STANDARD_MESH_ROLES,
|
|
57869
58044
|
SessionHostPtyTransportFactory,
|
|
57870
58045
|
TerminalAdapter,
|
|
57871
58046
|
TurnSnapshotTracker,
|
|
@@ -58099,9 +58274,12 @@ export {
|
|
|
58099
58274
|
resolveGitRepository,
|
|
58100
58275
|
resolveMeshHostStatus,
|
|
58101
58276
|
resolveMeshRefineValidationPlan,
|
|
58277
|
+
resolveMeshRoleOptions,
|
|
58102
58278
|
resolveNodeSchedulingPriority,
|
|
58103
58279
|
resolveSessionHostAppName,
|
|
58104
58280
|
resolveSessionHostAppNameResolution,
|
|
58281
|
+
resolveTaskAffinityRequiredTags,
|
|
58282
|
+
resolveTaskAffinityRole,
|
|
58105
58283
|
resolveWorktreePath,
|
|
58106
58284
|
runAsyncBatch,
|
|
58107
58285
|
runGit,
|