@adhdev/daemon-core 1.0.28-rc.7 → 1.0.28-rc.9
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.d.ts +1 -1
- package/dist/index.js +251 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +250 -45
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-ledger.d.ts +5 -1
- package/dist/mesh/mesh-queue-assignment.d.ts +19 -1
- package/dist/mesh/mesh-runtime-store.d.ts +4 -0
- package/dist/providers/cli-provider-instance-types.d.ts +1 -0
- package/dist/providers/spec/fsm-driver.d.ts +13 -0
- package/dist/providers/spec/types.d.ts +25 -0
- package/package.json +3 -3
- package/src/commands/med-family/mesh-crud.ts +27 -0
- package/src/index.ts +1 -1
- package/src/mesh/mesh-ledger.ts +72 -11
- package/src/mesh/mesh-queue-assignment.ts +176 -17
- package/src/mesh/mesh-reconcile-loop.ts +34 -0
- package/src/mesh/mesh-runtime-store.ts +33 -8
- package/src/mesh/mesh-work-queue.ts +4 -0
- package/src/providers/cli-provider-instance-types.ts +25 -0
- package/src/providers/cli-provider-instance.ts +51 -0
- package/src/providers/spec/evaluator.ts +9 -1
- package/src/providers/spec/fsm-driver.ts +43 -3
- package/src/providers/spec/types.ts +25 -0
package/dist/index.mjs
CHANGED
|
@@ -786,10 +786,10 @@ function readInjected(value) {
|
|
|
786
786
|
}
|
|
787
787
|
function getDaemonBuildInfo() {
|
|
788
788
|
if (cached) return cached;
|
|
789
|
-
const commit = readInjected(true ? "
|
|
790
|
-
const commitShort = readInjected(true ? "
|
|
791
|
-
const version = readInjected(true ? "1.0.28-rc.
|
|
792
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
789
|
+
const commit = readInjected(true ? "46fd4bbf8982e8d4d2d2d8c46d35631780c8b0f5" : void 0) ?? "unknown";
|
|
790
|
+
const commitShort = readInjected(true ? "46fd4bbf" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
791
|
+
const version = readInjected(true ? "1.0.28-rc.9" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
792
|
+
const builtAt = readInjected(true ? "2026-07-25T16:06:51.065Z" : void 0);
|
|
793
793
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
794
794
|
return cached;
|
|
795
795
|
}
|
|
@@ -7724,6 +7724,10 @@ var init_mesh_runtime_store = __esm({
|
|
|
7724
7724
|
node_id TEXT,
|
|
7725
7725
|
session_id TEXT,
|
|
7726
7726
|
provider_type TEXT,
|
|
7727
|
+
-- LEDGER-TASK-TRACEABILITY (B): the task a lifecycle entry pertains to,
|
|
7728
|
+
-- promoted from payload.taskId so kind+task_id joins are index-backed
|
|
7729
|
+
-- (legacy DBs get this column via migrateMeshIsolationColumns' ALTER).
|
|
7730
|
+
task_id TEXT,
|
|
7727
7731
|
payload TEXT NOT NULL DEFAULT '{}'
|
|
7728
7732
|
);
|
|
7729
7733
|
|
|
@@ -7895,6 +7899,15 @@ var init_mesh_runtime_store = __esm({
|
|
|
7895
7899
|
`);
|
|
7896
7900
|
this.db.exec(`DROP TABLE IF EXISTS mesh_direct_delivered_events`);
|
|
7897
7901
|
this.db.exec(`DROP TABLE IF EXISTS mesh_completion_conflicts`);
|
|
7902
|
+
const ledgerCols = this.tableColumns("mesh_event_ledger");
|
|
7903
|
+
if (!ledgerCols.has("task_id")) {
|
|
7904
|
+
this.db.exec(`ALTER TABLE mesh_event_ledger ADD COLUMN task_id TEXT`);
|
|
7905
|
+
}
|
|
7906
|
+
this.db.exec(`
|
|
7907
|
+
CREATE INDEX IF NOT EXISTS idx_mesh_event_ledger_task
|
|
7908
|
+
ON mesh_event_ledger(mesh_id, task_id, timestamp)
|
|
7909
|
+
WHERE task_id IS NOT NULL
|
|
7910
|
+
`);
|
|
7898
7911
|
} catch (err) {
|
|
7899
7912
|
if (!loggedMigrationFailure) {
|
|
7900
7913
|
loggedMigrationFailure = true;
|
|
@@ -8846,8 +8859,8 @@ var init_mesh_runtime_store = __esm({
|
|
|
8846
8859
|
}
|
|
8847
8860
|
this.db.prepare(
|
|
8848
8861
|
`INSERT OR IGNORE INTO mesh_event_ledger
|
|
8849
|
-
(id, mesh_id, timestamp, kind, node_id, session_id, provider_type, payload)
|
|
8850
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`
|
|
8862
|
+
(id, mesh_id, timestamp, kind, node_id, session_id, provider_type, task_id, payload)
|
|
8863
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
|
8851
8864
|
).run(
|
|
8852
8865
|
entry.id,
|
|
8853
8866
|
entry.meshId,
|
|
@@ -8856,6 +8869,7 @@ var init_mesh_runtime_store = __esm({
|
|
|
8856
8869
|
entry.nodeId ?? null,
|
|
8857
8870
|
entry.sessionId ?? null,
|
|
8858
8871
|
entry.providerType ?? null,
|
|
8872
|
+
entry.taskId ?? null,
|
|
8859
8873
|
JSON.stringify(entry.payload ?? {})
|
|
8860
8874
|
);
|
|
8861
8875
|
this.maybeCheckpointWal();
|
|
@@ -8886,6 +8900,7 @@ var init_mesh_runtime_store = __esm({
|
|
|
8886
8900
|
nodeId: r.node_id,
|
|
8887
8901
|
sessionId: r.session_id,
|
|
8888
8902
|
providerType: r.provider_type,
|
|
8903
|
+
taskId: r.task_id ?? null,
|
|
8889
8904
|
payload: (() => {
|
|
8890
8905
|
try {
|
|
8891
8906
|
return JSON.parse(r.payload);
|
|
@@ -8932,6 +8947,7 @@ var init_mesh_runtime_store = __esm({
|
|
|
8932
8947
|
nodeId: r.node_id,
|
|
8933
8948
|
sessionId: r.session_id,
|
|
8934
8949
|
providerType: r.provider_type,
|
|
8950
|
+
taskId: r.task_id ?? null,
|
|
8935
8951
|
payload: (() => {
|
|
8936
8952
|
try {
|
|
8937
8953
|
return JSON.parse(r.payload);
|
|
@@ -8973,8 +8989,8 @@ var init_mesh_runtime_store = __esm({
|
|
|
8973
8989
|
let imported = 0;
|
|
8974
8990
|
const stmt = this.db.prepare(
|
|
8975
8991
|
`INSERT OR IGNORE INTO mesh_event_ledger
|
|
8976
|
-
(id, mesh_id, timestamp, kind, node_id, session_id, provider_type, payload)
|
|
8977
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`
|
|
8992
|
+
(id, mesh_id, timestamp, kind, node_id, session_id, provider_type, task_id, payload)
|
|
8993
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
|
8978
8994
|
);
|
|
8979
8995
|
this.db.transaction(() => {
|
|
8980
8996
|
for (const e of entries) {
|
|
@@ -8987,6 +9003,7 @@ var init_mesh_runtime_store = __esm({
|
|
|
8987
9003
|
e.nodeId ?? null,
|
|
8988
9004
|
e.sessionId ?? null,
|
|
8989
9005
|
e.providerType ?? null,
|
|
9006
|
+
e.taskId ?? null,
|
|
8990
9007
|
JSON.stringify(e.payload ?? {})
|
|
8991
9008
|
);
|
|
8992
9009
|
if (result.changes > 0) imported++;
|
|
@@ -9366,6 +9383,7 @@ __export(mesh_ledger_exports, {
|
|
|
9366
9383
|
isIntentionalCleanupStopEntry: () => isIntentionalCleanupStopEntry,
|
|
9367
9384
|
isNoteExpired: () => isNoteExpired,
|
|
9368
9385
|
isOperatingNoteTombstoned: () => isOperatingNoteTombstoned,
|
|
9386
|
+
ledgerEntryTaskId: () => ledgerEntryTaskId,
|
|
9369
9387
|
meshLedgerEvents: () => meshLedgerEvents,
|
|
9370
9388
|
normalizeMeshWorkerResult: () => normalizeMeshWorkerResult,
|
|
9371
9389
|
pruneOperatingNotes: () => pruneOperatingNotes,
|
|
@@ -9379,6 +9397,11 @@ import { appendFileSync as appendFileSync2, existsSync as existsSync10, mkdirSyn
|
|
|
9379
9397
|
import { join as join11 } from "path";
|
|
9380
9398
|
import { randomUUID as randomUUID8 } from "crypto";
|
|
9381
9399
|
import { EventEmitter } from "events";
|
|
9400
|
+
function ledgerEntryTaskId(entry) {
|
|
9401
|
+
if (typeof entry.taskId === "string" && entry.taskId.trim()) return entry.taskId.trim();
|
|
9402
|
+
const fromPayload = entry.payload && typeof entry.payload === "object" ? entry.payload.taskId : void 0;
|
|
9403
|
+
return typeof fromPayload === "string" && fromPayload.trim() ? fromPayload.trim() : void 0;
|
|
9404
|
+
}
|
|
9382
9405
|
function isIntentionalCleanupStopEntry(entry) {
|
|
9383
9406
|
if (entry.kind !== "session_stopped" && entry.kind !== "task_failed" && entry.kind !== "task_stalled") return false;
|
|
9384
9407
|
const payload = entry.payload && typeof entry.payload === "object" && !Array.isArray(entry.payload) ? entry.payload : {};
|
|
@@ -9687,6 +9710,10 @@ function appendLedgerEntry(meshId, partial) {
|
|
|
9687
9710
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
9688
9711
|
...partial
|
|
9689
9712
|
};
|
|
9713
|
+
if (!entry.taskId && TASK_LIFECYCLE_LEDGER_KINDS.has(entry.kind)) {
|
|
9714
|
+
const derived = ledgerEntryTaskId(entry);
|
|
9715
|
+
if (derived) entry.taskId = derived;
|
|
9716
|
+
}
|
|
9690
9717
|
const filePath = getLedgerPath(meshId);
|
|
9691
9718
|
if (existsSync10(filePath)) {
|
|
9692
9719
|
try {
|
|
@@ -9708,6 +9735,7 @@ function appendLedgerEntry(meshId, partial) {
|
|
|
9708
9735
|
nodeId: entry.nodeId ?? null,
|
|
9709
9736
|
sessionId: entry.sessionId ?? null,
|
|
9710
9737
|
providerType: entry.providerType ?? null,
|
|
9738
|
+
taskId: entry.taskId ?? null,
|
|
9711
9739
|
payload: entry.payload
|
|
9712
9740
|
});
|
|
9713
9741
|
} catch {
|
|
@@ -9888,7 +9916,13 @@ function readLedgerFile(meshId) {
|
|
|
9888
9916
|
if (!line.trim()) continue;
|
|
9889
9917
|
try {
|
|
9890
9918
|
const entry = JSON.parse(line);
|
|
9891
|
-
if (entry.id && entry.kind)
|
|
9919
|
+
if (entry.id && entry.kind) {
|
|
9920
|
+
if (!entry.taskId) {
|
|
9921
|
+
const derived = ledgerEntryTaskId(entry);
|
|
9922
|
+
if (derived) entry.taskId = derived;
|
|
9923
|
+
}
|
|
9924
|
+
entries.push(entry);
|
|
9925
|
+
}
|
|
9892
9926
|
} catch {
|
|
9893
9927
|
}
|
|
9894
9928
|
}
|
|
@@ -9912,6 +9946,7 @@ function ensureLedgerImported(store, meshId) {
|
|
|
9912
9946
|
nodeId: e.nodeId ?? null,
|
|
9913
9947
|
sessionId: e.sessionId ?? null,
|
|
9914
9948
|
providerType: e.providerType ?? null,
|
|
9949
|
+
taskId: ledgerEntryTaskId(e) ?? null,
|
|
9915
9950
|
payload: e.payload ?? {}
|
|
9916
9951
|
})));
|
|
9917
9952
|
} catch {
|
|
@@ -9920,16 +9955,21 @@ function ensureLedgerImported(store, meshId) {
|
|
|
9920
9955
|
function readLedgerFromStore(meshId) {
|
|
9921
9956
|
const store = MeshRuntimeStore.getInstance();
|
|
9922
9957
|
ensureLedgerImported(store, meshId);
|
|
9923
|
-
return store.readLedgerEntriesOrdered(meshId).map((r) =>
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9958
|
+
return store.readLedgerEntriesOrdered(meshId).map((r) => {
|
|
9959
|
+
const payload = r.payload && typeof r.payload === "object" ? r.payload : {};
|
|
9960
|
+
const taskId = ledgerEntryTaskId({ taskId: r.taskId ?? void 0, payload });
|
|
9961
|
+
return {
|
|
9962
|
+
id: r.id,
|
|
9963
|
+
meshId: r.meshId,
|
|
9964
|
+
timestamp: r.timestamp,
|
|
9965
|
+
kind: r.kind,
|
|
9966
|
+
...r.nodeId ? { nodeId: r.nodeId } : {},
|
|
9967
|
+
...r.sessionId ? { sessionId: r.sessionId } : {},
|
|
9968
|
+
...r.providerType ? { providerType: r.providerType } : {},
|
|
9969
|
+
...taskId ? { taskId } : {},
|
|
9970
|
+
payload
|
|
9971
|
+
};
|
|
9972
|
+
});
|
|
9933
9973
|
}
|
|
9934
9974
|
function getCachedRawEntries(meshId) {
|
|
9935
9975
|
const now = Date.now();
|
|
@@ -10156,7 +10196,7 @@ function rotateLedgerFile(meshId, currentPath) {
|
|
|
10156
10196
|
`);
|
|
10157
10197
|
}
|
|
10158
10198
|
}
|
|
10159
|
-
var LEDGER_DIR_NAME, MAX_FILE_SIZE_BYTES, COMPACT_THRESHOLD_BYTES, ARCHIVE_TERMINAL_OLDER_THAN_MS, RECENT_FAILURE_WINDOW_MS, ARCHIVABLE_KINDS, DEFAULT_LEDGER_SLICE_LIMIT, MAX_LEDGER_SLICE_LIMIT, OPERATING_NOTE_KIND, OPERATING_NOTE_TOMBSTONE_KIND, OPERATING_NOTE_DEDUPE_WINDOW, OPERATING_NOTE_KEEP_LATEST, OPERATING_NOTE_CATEGORY_TTL_DAYS, MS_PER_DAY, meshLedgerEvents, ledgerReadCache, LEDGER_CACHE_TTL_MS, ledgerImportStoreRef, ledgerImportDone;
|
|
10199
|
+
var TASK_LIFECYCLE_LEDGER_KINDS, LEDGER_DIR_NAME, MAX_FILE_SIZE_BYTES, COMPACT_THRESHOLD_BYTES, ARCHIVE_TERMINAL_OLDER_THAN_MS, RECENT_FAILURE_WINDOW_MS, ARCHIVABLE_KINDS, DEFAULT_LEDGER_SLICE_LIMIT, MAX_LEDGER_SLICE_LIMIT, OPERATING_NOTE_KIND, OPERATING_NOTE_TOMBSTONE_KIND, OPERATING_NOTE_DEDUPE_WINDOW, OPERATING_NOTE_KEEP_LATEST, OPERATING_NOTE_CATEGORY_TTL_DAYS, MS_PER_DAY, meshLedgerEvents, ledgerReadCache, LEDGER_CACHE_TTL_MS, ledgerImportStoreRef, ledgerImportDone;
|
|
10160
10200
|
var init_mesh_ledger = __esm({
|
|
10161
10201
|
"src/mesh/mesh-ledger.ts"() {
|
|
10162
10202
|
"use strict";
|
|
@@ -10164,6 +10204,17 @@ var init_mesh_ledger = __esm({
|
|
|
10164
10204
|
init_dist();
|
|
10165
10205
|
init_mesh_runtime_store();
|
|
10166
10206
|
init_contracts();
|
|
10207
|
+
TASK_LIFECYCLE_LEDGER_KINDS = /* @__PURE__ */ new Set([
|
|
10208
|
+
"task_dispatched",
|
|
10209
|
+
"task_claimed",
|
|
10210
|
+
"task_completed",
|
|
10211
|
+
"task_failed",
|
|
10212
|
+
"task_stalled",
|
|
10213
|
+
"task_reclaimed",
|
|
10214
|
+
"task_approval_needed",
|
|
10215
|
+
"task_question_pending",
|
|
10216
|
+
"p2p_dispatch_failed"
|
|
10217
|
+
]);
|
|
10167
10218
|
LEDGER_DIR_NAME = "mesh-ledger";
|
|
10168
10219
|
MAX_FILE_SIZE_BYTES = 10 * 1024 * 1024;
|
|
10169
10220
|
COMPACT_THRESHOLD_BYTES = 2 * 1024 * 1024;
|
|
@@ -19159,6 +19210,43 @@ async function waitForLocalSessionReady(components, sessionId) {
|
|
|
19159
19210
|
}
|
|
19160
19211
|
LOG.warn("MeshQueue", `Auto-launched session ${sessionId} not interactive after ${LOCAL_LAUNCH_READY_TIMEOUT_MS}ms; dispatching anyway (adapter queue-until-ready will buffer)`);
|
|
19161
19212
|
}
|
|
19213
|
+
function recordTaskDispatchedLedger(ctx, deliveryId) {
|
|
19214
|
+
const task = ctx.task;
|
|
19215
|
+
const routing = ctx.routingDecision;
|
|
19216
|
+
const routingDecision = {
|
|
19217
|
+
source: routing?.source ?? "queue",
|
|
19218
|
+
selectedNodeId: ctx.nodeId,
|
|
19219
|
+
...localCoordinatorDaemonId() ? { daemonId: localCoordinatorDaemonId() } : {},
|
|
19220
|
+
transport: ctx.transport,
|
|
19221
|
+
// D: resolved execution profile — prefer the caller's resolved values, fall back
|
|
19222
|
+
// to what the claimed task row carries (queue/idle drains carry it on the task).
|
|
19223
|
+
resolvedProviderType: routing?.resolvedProviderType ?? ctx.providerType,
|
|
19224
|
+
...routing?.resolvedModel ?? task.model ? { resolvedModel: routing?.resolvedModel ?? task.model } : {},
|
|
19225
|
+
...routing?.resolvedThinkingLevel ?? task.thinkingLevel ? { resolvedThinkingLevel: routing?.resolvedThinkingLevel ?? task.thinkingLevel } : {},
|
|
19226
|
+
...routing?.resolvedDifficulty ?? task.difficulty ? { resolvedDifficulty: routing?.resolvedDifficulty ?? task.difficulty } : {},
|
|
19227
|
+
...typeof routing?.fitnessScore === "number" ? { fitnessScore: routing.fitnessScore } : {},
|
|
19228
|
+
...routing?.skippedCandidates?.length ? { skippedCandidates: routing.skippedCandidates } : {},
|
|
19229
|
+
...routing?.requiredTagsResult ? { requiredTagsResult: routing.requiredTagsResult } : {},
|
|
19230
|
+
...routing?.reason ? { reason: routing.reason } : {}
|
|
19231
|
+
};
|
|
19232
|
+
appendLedgerEntry(ctx.meshId, {
|
|
19233
|
+
kind: "task_dispatched",
|
|
19234
|
+
nodeId: ctx.nodeId,
|
|
19235
|
+
sessionId: ctx.sessionId,
|
|
19236
|
+
providerType: ctx.providerType,
|
|
19237
|
+
taskId: task.id,
|
|
19238
|
+
payload: {
|
|
19239
|
+
taskId: task.id,
|
|
19240
|
+
...task.missionId ? { missionId: task.missionId } : {},
|
|
19241
|
+
deliveryId,
|
|
19242
|
+
transport: ctx.transport,
|
|
19243
|
+
...ctx.sourceCoordinatorSessionId ? { coordinatorSessionId: ctx.sourceCoordinatorSessionId } : {},
|
|
19244
|
+
...ctx.sourceCoordinatorDaemonId ? { coordinatorDaemonId: ctx.sourceCoordinatorDaemonId } : {},
|
|
19245
|
+
...Array.isArray(task.requiredTags) && task.requiredTags.length ? { requiredTags: task.requiredTags } : {},
|
|
19246
|
+
routingDecision
|
|
19247
|
+
}
|
|
19248
|
+
});
|
|
19249
|
+
}
|
|
19162
19250
|
function deliverTaskToSession(dispatchThunk, ctx, warmup) {
|
|
19163
19251
|
const delivery = createSessionDelivery({
|
|
19164
19252
|
meshId: ctx.meshId,
|
|
@@ -19172,6 +19260,10 @@ function deliverTaskToSession(dispatchThunk, ctx, warmup) {
|
|
|
19172
19260
|
...ctx.sourceCoordinatorSessionId ? { sourceCoordinatorSessionId: ctx.sourceCoordinatorSessionId } : {},
|
|
19173
19261
|
...ctx.sourceCoordinatorDaemonId ? { sourceCoordinatorDaemonId: ctx.sourceCoordinatorDaemonId } : {}
|
|
19174
19262
|
});
|
|
19263
|
+
try {
|
|
19264
|
+
recordTaskDispatchedLedger(ctx, delivery.id);
|
|
19265
|
+
} catch {
|
|
19266
|
+
}
|
|
19175
19267
|
let dispatchPromise;
|
|
19176
19268
|
try {
|
|
19177
19269
|
dispatchPromise = Promise.resolve(dispatchThunk());
|
|
@@ -19235,7 +19327,7 @@ function resolveClaimingSessionTranscriptProfile(components, sessionId) {
|
|
|
19235
19327
|
return void 0;
|
|
19236
19328
|
}
|
|
19237
19329
|
}
|
|
19238
|
-
function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType) {
|
|
19330
|
+
function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType, routingDecision) {
|
|
19239
19331
|
const mesh = getMeshWithCache(components, meshId);
|
|
19240
19332
|
const node = mesh?.nodes.find((n) => meshNodeIdMatches(n, nodeId));
|
|
19241
19333
|
if (isWorkspaceAutoFastForwardInFlight(readNonEmptyString(node?.workspace))) {
|
|
@@ -19312,6 +19404,24 @@ function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType)
|
|
|
19312
19404
|
return false;
|
|
19313
19405
|
}
|
|
19314
19406
|
LOG.info("MeshQueue", `Node ${nodeId} (${sessionId}) pulled task ${task.id}`);
|
|
19407
|
+
try {
|
|
19408
|
+
appendLedgerEntry(meshId, {
|
|
19409
|
+
kind: "task_claimed",
|
|
19410
|
+
nodeId,
|
|
19411
|
+
sessionId,
|
|
19412
|
+
providerType,
|
|
19413
|
+
taskId: task.id,
|
|
19414
|
+
payload: {
|
|
19415
|
+
taskId: task.id,
|
|
19416
|
+
...task.missionId ? { missionId: task.missionId } : {},
|
|
19417
|
+
nodeId,
|
|
19418
|
+
sessionId,
|
|
19419
|
+
providerType,
|
|
19420
|
+
claimedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
19421
|
+
}
|
|
19422
|
+
});
|
|
19423
|
+
} catch {
|
|
19424
|
+
}
|
|
19315
19425
|
retractActionableSkipIfPreviouslyNotified(meshId, task.id);
|
|
19316
19426
|
beginTaskDispatchInFlight(meshId, task.id);
|
|
19317
19427
|
const silentIdlePushOnDispatch = resolveCoordinatorIdlePushPolicy(mesh?.policy) === "auto_silent_on_dispatch";
|
|
@@ -19349,7 +19459,8 @@ function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType)
|
|
|
19349
19459
|
task,
|
|
19350
19460
|
transport: "remote",
|
|
19351
19461
|
...sourceCoordinatorSessionId ? { sourceCoordinatorSessionId } : {},
|
|
19352
|
-
...localDaemonIdForDispatch ? { sourceCoordinatorDaemonId: localDaemonIdForDispatch } : {}
|
|
19462
|
+
...localDaemonIdForDispatch ? { sourceCoordinatorDaemonId: localDaemonIdForDispatch } : {},
|
|
19463
|
+
...routingDecision ? { routingDecision } : {}
|
|
19353
19464
|
},
|
|
19354
19465
|
// Warmup-aware deadline: this dispatch can be the FIRST command to a
|
|
19355
19466
|
// peer whose mesh DataChannel is still opening — charge the cold-open
|
|
@@ -19416,7 +19527,8 @@ function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType)
|
|
|
19416
19527
|
task,
|
|
19417
19528
|
transport: "local",
|
|
19418
19529
|
...readNonEmptyString(task.sourceCoordinatorSessionId) ? { sourceCoordinatorSessionId: readNonEmptyString(task.sourceCoordinatorSessionId) } : {},
|
|
19419
|
-
...localCoordinatorDaemonId() ? { sourceCoordinatorDaemonId: localCoordinatorDaemonId() } : {}
|
|
19530
|
+
...localCoordinatorDaemonId() ? { sourceCoordinatorDaemonId: localCoordinatorDaemonId() } : {},
|
|
19531
|
+
...routingDecision ? { routingDecision } : {}
|
|
19420
19532
|
}
|
|
19421
19533
|
);
|
|
19422
19534
|
return true;
|
|
@@ -19854,11 +19966,16 @@ function recordAutoLaunchEvent(meshId, args) {
|
|
|
19854
19966
|
nodeId: args.nodeId,
|
|
19855
19967
|
sessionId: args.sessionId,
|
|
19856
19968
|
providerType: args.providerType,
|
|
19969
|
+
// (B) promote taskId so this entry joins the task lifecycle timeline.
|
|
19970
|
+
...args.taskId ? { taskId: args.taskId } : {},
|
|
19857
19971
|
payload: {
|
|
19858
19972
|
phase: args.phase,
|
|
19859
19973
|
taskId: args.taskId,
|
|
19860
19974
|
reason: args.reason,
|
|
19861
|
-
error: args.error
|
|
19975
|
+
error: args.error,
|
|
19976
|
+
// (D) resolved execution profile for the spawned worker.
|
|
19977
|
+
...args.model ? { resolvedModel: args.model } : {},
|
|
19978
|
+
...args.thinkingLevel ? { resolvedThinkingLevel: args.thinkingLevel } : {}
|
|
19862
19979
|
}
|
|
19863
19980
|
});
|
|
19864
19981
|
} catch (e) {
|
|
@@ -19880,7 +19997,9 @@ function markAutoLaunch(meshId, taskId, args) {
|
|
|
19880
19997
|
providerType: args.providerType,
|
|
19881
19998
|
sessionId: args.sessionId,
|
|
19882
19999
|
reason: args.reason,
|
|
19883
|
-
error: args.error
|
|
20000
|
+
error: args.error,
|
|
20001
|
+
...args.model ? { model: args.model } : {},
|
|
20002
|
+
...args.thinkingLevel ? { thinkingLevel: args.thinkingLevel } : {}
|
|
19884
20003
|
});
|
|
19885
20004
|
if (args.status === "skipped") {
|
|
19886
20005
|
if (isActionableSkipReason(args.reason)) {
|
|
@@ -20080,6 +20199,14 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
20080
20199
|
// pass it through for the 'fitness' strategy's task→slot ranking.
|
|
20081
20200
|
{ bumpCursor: true, task: { difficulty: task.difficulty, requiredTags: task.requiredTags } }
|
|
20082
20201
|
).map((c) => c.node);
|
|
20202
|
+
const skippedCandidates = [];
|
|
20203
|
+
const SKIPPED_CANDIDATES_MAX = 12;
|
|
20204
|
+
const markSkip = (nodeIdForSkip, reason, extra) => {
|
|
20205
|
+
markAutoLaunch(meshId, task.id, { status: "skipped", reason, nodeId: nodeIdForSkip, ...extra || {} });
|
|
20206
|
+
if (nodeIdForSkip && skippedCandidates.length < SKIPPED_CANDIDATES_MAX) {
|
|
20207
|
+
skippedCandidates.push({ nodeId: nodeIdForSkip, reason });
|
|
20208
|
+
}
|
|
20209
|
+
};
|
|
20083
20210
|
for (const node of orderedCandidateNodes) {
|
|
20084
20211
|
const nodeId = readMeshNodeId(node);
|
|
20085
20212
|
if (!nodeId) continue;
|
|
@@ -20088,50 +20215,50 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
20088
20215
|
const cooldownUntil = autoLaunchCooldownUntil.get(launchKey) || 0;
|
|
20089
20216
|
if (cooldownUntil > 0 && now >= cooldownUntil) autoLaunchCooldownUntil.delete(launchKey);
|
|
20090
20217
|
if (autoLaunchInProgress.has(launchKey)) {
|
|
20091
|
-
|
|
20218
|
+
markSkip(nodeId, "auto_launch_in_progress");
|
|
20092
20219
|
continue;
|
|
20093
20220
|
}
|
|
20094
20221
|
if (now < cooldownUntil) {
|
|
20095
|
-
|
|
20222
|
+
markSkip(nodeId, "auto_launch_cooldown");
|
|
20096
20223
|
continue;
|
|
20097
20224
|
}
|
|
20098
20225
|
if (isDirtyNode(node)) {
|
|
20099
|
-
|
|
20226
|
+
markSkip(nodeId, "dirty_workspace");
|
|
20100
20227
|
continue;
|
|
20101
20228
|
}
|
|
20102
20229
|
if (!isLaunchableNode(node)) {
|
|
20103
|
-
|
|
20230
|
+
markSkip(nodeId, "node_not_launch_ready");
|
|
20104
20231
|
continue;
|
|
20105
20232
|
}
|
|
20106
20233
|
if (!isMeshNodeFreshEnoughToLaunch(node, freshnessGate)) {
|
|
20107
|
-
|
|
20234
|
+
markSkip(nodeId, "node_stale_behind_upstream");
|
|
20108
20235
|
continue;
|
|
20109
20236
|
}
|
|
20110
20237
|
const launchTarget = resolveAutoLaunchTarget(components, node);
|
|
20111
20238
|
if (launchTarget.mode === "skip") {
|
|
20112
|
-
|
|
20239
|
+
markSkip(nodeId, launchTarget.reason || "auto_launch_unavailable");
|
|
20113
20240
|
autoLaunchCooldownUntil.set(launchKey, Date.now() + AUTO_LAUNCH_COOLDOWN_MS);
|
|
20114
20241
|
sweepExpiredCooldowns();
|
|
20115
20242
|
continue;
|
|
20116
20243
|
}
|
|
20117
20244
|
if (nodeHasLiveSessionPendingClaim(components, meshId, nodeId, task, node)) {
|
|
20118
|
-
|
|
20245
|
+
markSkip(nodeId, "node_has_live_session_pending_claim");
|
|
20119
20246
|
continue;
|
|
20120
20247
|
}
|
|
20121
20248
|
if (!isTaskReadonly(task) && nodeHasActiveAssignment(meshId, nodeId)) {
|
|
20122
|
-
|
|
20249
|
+
markSkip(nodeId, "node_has_active_assignment");
|
|
20123
20250
|
continue;
|
|
20124
20251
|
}
|
|
20125
20252
|
const maxConcurrentSessions = Number(node?.policy?.maxConcurrentSessions);
|
|
20126
20253
|
if (Number.isFinite(maxConcurrentSessions) && maxConcurrentSessions >= 0 && liveSessionCountForNode(components, meshId, nodeId) >= maxConcurrentSessions) {
|
|
20127
|
-
|
|
20254
|
+
markSkip(nodeId, "max_concurrent_sessions_reached");
|
|
20128
20255
|
continue;
|
|
20129
20256
|
}
|
|
20130
20257
|
autoLaunchInProgress.add(launchKey);
|
|
20131
20258
|
try {
|
|
20132
20259
|
const resolved = await resolveUsableProvider(components, nodeId, node, task.requiredTags, { difficulty: task.difficulty, requiredTags: task.requiredTags });
|
|
20133
20260
|
if (!resolved.providerType) {
|
|
20134
|
-
|
|
20261
|
+
markSkip(nodeId, resolved.reason || "provider_unusable");
|
|
20135
20262
|
continue;
|
|
20136
20263
|
}
|
|
20137
20264
|
const rawEffectiveModel = typeof task.model === "string" && task.model.trim() ? task.model.trim() : resolved.model;
|
|
@@ -20142,7 +20269,7 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
20142
20269
|
}
|
|
20143
20270
|
const providerCap = resolveProviderMaxParallel(resolveNodeCapabilitySlots(node), resolved.providerType);
|
|
20144
20271
|
if (providerCap !== void 0 && activeProviderAssignedCount(meshId, nodeId, resolved.providerType) >= providerCap) {
|
|
20145
|
-
|
|
20272
|
+
markSkip(nodeId, "max_provider_parallel_reached", { providerType: resolved.providerType });
|
|
20146
20273
|
continue;
|
|
20147
20274
|
}
|
|
20148
20275
|
const launchSettings = {
|
|
@@ -20170,7 +20297,7 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
20170
20297
|
meshCoordinatorDaemonId: launchTarget.coordinatorDaemonId,
|
|
20171
20298
|
meshCoordinatorNodeId: nodeId
|
|
20172
20299
|
};
|
|
20173
|
-
markAutoLaunch(meshId, task.id, { status: "started", nodeId, providerType: resolved.providerType });
|
|
20300
|
+
markAutoLaunch(meshId, task.id, { status: "started", nodeId, providerType: resolved.providerType, ...effectiveModel ? { model: effectiveModel } : {}, ...effectiveThinkingLevel ? { thinkingLevel: effectiveThinkingLevel } : {} });
|
|
20174
20301
|
let launchResult2;
|
|
20175
20302
|
try {
|
|
20176
20303
|
launchResult2 = await components.dispatchMeshCommand(launchTarget.daemonId, "launch_cli", withStatusProbeMarker({
|
|
@@ -20199,12 +20326,12 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
20199
20326
|
return false;
|
|
20200
20327
|
}
|
|
20201
20328
|
const remoteSessionId = readNonEmptyString(payload.sessionId) || readNonEmptyString(payload.id) || readNonEmptyString(payload.runtimeSessionId);
|
|
20202
|
-
markAutoLaunch(meshId, task.id, { status: "completed", nodeId, providerType: resolved.providerType, sessionId: remoteSessionId || void 0 });
|
|
20329
|
+
markAutoLaunch(meshId, task.id, { status: "completed", nodeId, providerType: resolved.providerType, sessionId: remoteSessionId || void 0, ...effectiveModel ? { model: effectiveModel } : {}, ...effectiveThinkingLevel ? { thinkingLevel: effectiveThinkingLevel } : {} });
|
|
20203
20330
|
autoLaunchCooldownUntil.set(launchKey, Date.now() + AUTO_LAUNCH_COOLDOWN_MS);
|
|
20204
20331
|
sweepExpiredCooldowns();
|
|
20205
20332
|
return true;
|
|
20206
20333
|
}
|
|
20207
|
-
markAutoLaunch(meshId, task.id, { status: "started", nodeId, providerType: resolved.providerType });
|
|
20334
|
+
markAutoLaunch(meshId, task.id, { status: "started", nodeId, providerType: resolved.providerType, ...effectiveModel ? { model: effectiveModel } : {}, ...effectiveThinkingLevel ? { thinkingLevel: effectiveThinkingLevel } : {} });
|
|
20208
20335
|
const launchResult = await components.cliManager.handleCliCommand("launch_cli", {
|
|
20209
20336
|
cliType: resolved.providerType,
|
|
20210
20337
|
dir: node.workspace,
|
|
@@ -20229,9 +20356,25 @@ async function maybeAutoLaunchOneQueueSession(components, meshId, mesh) {
|
|
|
20229
20356
|
sweepExpiredCooldowns();
|
|
20230
20357
|
return false;
|
|
20231
20358
|
}
|
|
20232
|
-
markAutoLaunch(meshId, task.id, { status: "completed", nodeId, providerType: resolved.providerType, sessionId });
|
|
20359
|
+
markAutoLaunch(meshId, task.id, { status: "completed", nodeId, providerType: resolved.providerType, sessionId, ...effectiveModel ? { model: effectiveModel } : {}, ...effectiveThinkingLevel ? { thinkingLevel: effectiveThinkingLevel } : {} });
|
|
20233
20360
|
await waitForLocalSessionReady(components, sessionId);
|
|
20234
|
-
|
|
20361
|
+
const requiredTags = Array.isArray(task.requiredTags) ? task.requiredTags.filter((t) => !!t) : [];
|
|
20362
|
+
const routingDecision = {
|
|
20363
|
+
source: "autoLaunch",
|
|
20364
|
+
fitnessScore: nodeFitnessForTask(node, { difficulty: task.difficulty, requiredTags: task.requiredTags }),
|
|
20365
|
+
...skippedCandidates.length ? { skippedCandidates } : {},
|
|
20366
|
+
requiredTagsResult: {
|
|
20367
|
+
required: requiredTags,
|
|
20368
|
+
satisfied: !requiredTags.length || nodeSatisfiesRequiredTags(requiredTags, buildMeshNodeCapabilityTags(node, resolved.providerType)),
|
|
20369
|
+
missing: requiredTags.filter((t) => !buildMeshNodeCapabilityTags(node, resolved.providerType).includes(t))
|
|
20370
|
+
},
|
|
20371
|
+
resolvedProviderType: resolved.providerType,
|
|
20372
|
+
...effectiveModel ? { resolvedModel: effectiveModel } : {},
|
|
20373
|
+
...effectiveThinkingLevel ? { resolvedThinkingLevel: effectiveThinkingLevel } : {},
|
|
20374
|
+
...task.difficulty ? { resolvedDifficulty: String(task.difficulty) } : {},
|
|
20375
|
+
...resolved.reason ? { reason: resolved.reason } : {}
|
|
20376
|
+
};
|
|
20377
|
+
tryAssignQueueTask(components, meshId, nodeId, sessionId, resolved.providerType, routingDecision);
|
|
20235
20378
|
return true;
|
|
20236
20379
|
} catch (e) {
|
|
20237
20380
|
markAutoLaunch(meshId, task.id, { status: "failed", error: e?.message || String(e), nodeId });
|
|
@@ -25545,6 +25688,17 @@ async function runMeshReconcileTick(components) {
|
|
|
25545
25688
|
LOG.warn("MeshReconcile", `Unresolved-delegate forward retry failed: ${e?.message || e}`);
|
|
25546
25689
|
}
|
|
25547
25690
|
}
|
|
25691
|
+
if (components.router) {
|
|
25692
|
+
for (const mesh of listMeshes()) {
|
|
25693
|
+
try {
|
|
25694
|
+
if (components.router.getCachedInlineMesh(mesh.id)) {
|
|
25695
|
+
components.router.getCachedInlineMesh(mesh.id, mesh);
|
|
25696
|
+
}
|
|
25697
|
+
} catch (e) {
|
|
25698
|
+
LOG.warn("MeshReconcile", `Inline-cache membership merge failed for mesh ${mesh.id}: ${e?.message || e}`);
|
|
25699
|
+
}
|
|
25700
|
+
}
|
|
25701
|
+
}
|
|
25548
25702
|
if (dispatchMeshCommand) {
|
|
25549
25703
|
for (const mesh of listMeshes()) {
|
|
25550
25704
|
const selfIds = resolveCoordinatorSelfIds(mesh, drainDaemonIds);
|
|
@@ -27197,7 +27351,7 @@ function resolveSections(sectionsObj, lines) {
|
|
|
27197
27351
|
if (candIdx !== -1 && (idx === -1 || candIdx < idx)) idx = candIdx;
|
|
27198
27352
|
}
|
|
27199
27353
|
if (idx !== -1) {
|
|
27200
|
-
from = idx;
|
|
27354
|
+
from = typeof sec.above === "number" && sec.above > 0 ? Math.max(0, idx - Math.floor(sec.above)) : idx;
|
|
27201
27355
|
to = total;
|
|
27202
27356
|
if (sec.until_regex !== void 0) {
|
|
27203
27357
|
try {
|
|
@@ -27209,6 +27363,9 @@ function resolveSections(sectionsObj, lines) {
|
|
|
27209
27363
|
} else if (sec.lines !== void 0) {
|
|
27210
27364
|
to = Math.min(total, from + sec.lines);
|
|
27211
27365
|
}
|
|
27366
|
+
} else if (sec.anchor_miss === "empty") {
|
|
27367
|
+
from = 0;
|
|
27368
|
+
to = 0;
|
|
27212
27369
|
}
|
|
27213
27370
|
} catch {
|
|
27214
27371
|
}
|
|
@@ -46419,9 +46576,13 @@ var FsmDriver = class {
|
|
|
46419
46576
|
curLines = currentLines;
|
|
46420
46577
|
prevLines = this.prevScreenLines;
|
|
46421
46578
|
} else {
|
|
46422
|
-
const
|
|
46423
|
-
|
|
46424
|
-
|
|
46579
|
+
const window = stableCursorWindow(currentLines.length, cursor.row, d.cursor_above);
|
|
46580
|
+
if (!window) {
|
|
46581
|
+
this.regionLastChangedAt.set(d.key, now);
|
|
46582
|
+
continue;
|
|
46583
|
+
}
|
|
46584
|
+
curLines = currentLines.slice(window.start, window.end);
|
|
46585
|
+
prevLines = this.prevScreenLines.slice(window.start, window.end);
|
|
46425
46586
|
}
|
|
46426
46587
|
const cur = filterIgnoredLines(curLines, d.ignoreRe).join("\n");
|
|
46427
46588
|
const prev = filterIgnoredLines(prevLines, d.ignoreRe).join("\n");
|
|
@@ -47014,6 +47175,12 @@ function filterIgnoredLines(lines, ignoreRe) {
|
|
|
47014
47175
|
if (!ignoreRe) return lines;
|
|
47015
47176
|
return lines.filter((l) => !ignoreRe.test(l));
|
|
47016
47177
|
}
|
|
47178
|
+
function stableCursorWindow(lineCount, cursorRow, cursorAbove) {
|
|
47179
|
+
const end = Math.min(Math.max(0, cursorRow), Math.max(0, lineCount));
|
|
47180
|
+
const start = Math.max(0, end - cursorAbove);
|
|
47181
|
+
if (end <= start) return null;
|
|
47182
|
+
return { start, end };
|
|
47183
|
+
}
|
|
47017
47184
|
|
|
47018
47185
|
// src/providers/spec/cli-adapter.ts
|
|
47019
47186
|
init_evaluator();
|
|
@@ -49583,6 +49750,7 @@ var STATUS_HYDRATION_TAIL_LIMIT = 200;
|
|
|
49583
49750
|
var COMPLETED_FINALIZATION_RETRY_MS = 1e3;
|
|
49584
49751
|
var COMPLETED_FINALIZATION_MAX_WAIT_MS = 3e4;
|
|
49585
49752
|
var CANON_C_MISSING_ASSISTANT_MIN_ELAPSED_MS = 2e4;
|
|
49753
|
+
var MISSING_ASSISTANT_TRANSCRIPT_GROWTH_QUIET_MS = 6e4;
|
|
49586
49754
|
var NATIVE_HISTORY_MESH_IDLE_SETTLE_MS = 4e3;
|
|
49587
49755
|
var PTY_PARSED_FINAL_ASSISTANT_QUIET_DWELL_MS = 1200;
|
|
49588
49756
|
var ANTIGRAVITY_HOLD_QUIET_DWELL_MS = 3e3;
|
|
@@ -51897,6 +52065,34 @@ var CliProviderInstance = class _CliProviderInstance {
|
|
|
51897
52065
|
const waitedMs = Date.now() - pending.firstObservedAt;
|
|
51898
52066
|
const isTranscriptEvidenceGate = block2.allowTimeout === true;
|
|
51899
52067
|
LOG.debug("CLI", `[${this.type}] finalization block: reason=${blockReason} terminal=${block2.terminal} allowTimeout=${isTranscriptEvidenceGate} waitedMs=${waitedMs} maxWait=${COMPLETED_FINALIZATION_MAX_WAIT_MS}`);
|
|
52068
|
+
if (blockReason === "missing_final_assistant" && block2.noExternalTranscriptSource === true) {
|
|
52069
|
+
let nativeSample = null;
|
|
52070
|
+
try {
|
|
52071
|
+
nativeSample = this.sampleNativeTranscriptProgress();
|
|
52072
|
+
} catch {
|
|
52073
|
+
nativeSample = null;
|
|
52074
|
+
}
|
|
52075
|
+
const sourceMtimeMs = nativeSample?.sourceMtimeMs ?? 0;
|
|
52076
|
+
if (nativeSample && sourceMtimeMs > 0 && Date.now() - sourceMtimeMs < MISSING_ASSISTANT_TRANSCRIPT_GROWTH_QUIET_MS) {
|
|
52077
|
+
if (pending.loggedBlockReason !== "native_transcript_advancing") {
|
|
52078
|
+
LOG.info("CLI", `[${this.type}] holding pending completed (native_transcript_advancing: msgCount=${nativeSample.msgCount} mtimeAge=${Date.now() - sourceMtimeMs}ms < ${MISSING_ASSISTANT_TRANSCRIPT_GROWTH_QUIET_MS}ms) \u2014 transcript still growing, screen-idle verdict not trusted`);
|
|
52079
|
+
if (this.isMeshWorkerSession()) {
|
|
52080
|
+
traceMeshEventDrop("completion_gate_hold", this.meshTraceCtx(), `native_transcript_advancing msgCount=${nativeSample.msgCount} mtimeAge=${Date.now() - sourceMtimeMs}ms`);
|
|
52081
|
+
}
|
|
52082
|
+
if (this.completionTraceOn()) this.recordCompletionGateTrace("hold", {
|
|
52083
|
+
blockReason: "native_transcript_advancing",
|
|
52084
|
+
latestVisibleStatus,
|
|
52085
|
+
msgCount: nativeSample.msgCount,
|
|
52086
|
+
sourceMtimeAgeMs: Date.now() - sourceMtimeMs,
|
|
52087
|
+
growthQuietMs: MISSING_ASSISTANT_TRANSCRIPT_GROWTH_QUIET_MS,
|
|
52088
|
+
waitedMs
|
|
52089
|
+
});
|
|
52090
|
+
pending.loggedBlockReason = "native_transcript_advancing";
|
|
52091
|
+
}
|
|
52092
|
+
this.scheduleCompletedDebounceFlush(COMPLETED_FINALIZATION_RETRY_MS);
|
|
52093
|
+
return;
|
|
52094
|
+
}
|
|
52095
|
+
}
|
|
51900
52096
|
if (!isTranscriptEvidenceGate && (block2.terminal || waitedMs < COMPLETED_FINALIZATION_MAX_WAIT_MS)) {
|
|
51901
52097
|
if (pending.loggedBlockReason !== blockReason) {
|
|
51902
52098
|
LOG.info("CLI", `[${this.type}] waiting to emit completed until transcript finalizes (${blockReason})`);
|
|
@@ -61106,6 +61302,10 @@ var meshCrudHandlers = {
|
|
|
61106
61302
|
...capabilities && capabilities.length ? { capabilities } : {}
|
|
61107
61303
|
});
|
|
61108
61304
|
if (!node) return { success: false, error: "Mesh not found" };
|
|
61305
|
+
const cachedMesh = ctx.getCachedInlineMesh(meshId);
|
|
61306
|
+
if (cachedMesh) {
|
|
61307
|
+
ctx.updateInlineMeshNode(meshId, cachedMesh, node);
|
|
61308
|
+
}
|
|
61109
61309
|
ctx.invalidateAggregateMeshStatus(meshId);
|
|
61110
61310
|
return { success: true, node };
|
|
61111
61311
|
} catch (e) {
|
|
@@ -61326,6 +61526,10 @@ var meshCrudHandlers = {
|
|
|
61326
61526
|
removed = removeNode2(meshId, nodeId);
|
|
61327
61527
|
if (!removed && !node) removed = true;
|
|
61328
61528
|
if (removed) ctx.invalidateAggregateMeshStatus(meshId);
|
|
61529
|
+
if (removed) {
|
|
61530
|
+
const cachedMesh = ctx.getCachedInlineMesh(meshId);
|
|
61531
|
+
if (cachedMesh) ctx.removeInlineMeshNode(meshId, cachedMesh, nodeId);
|
|
61532
|
+
}
|
|
61329
61533
|
}
|
|
61330
61534
|
if (removed) {
|
|
61331
61535
|
try {
|
|
@@ -77488,6 +77692,7 @@ export {
|
|
|
77488
77692
|
killIdeProcess,
|
|
77489
77693
|
launchIDE,
|
|
77490
77694
|
launchWithCdp,
|
|
77695
|
+
ledgerEntryTaskId,
|
|
77491
77696
|
listCoordinatorsForWorkspace,
|
|
77492
77697
|
listHostedCliRuntimes,
|
|
77493
77698
|
listMagiKindPanels,
|