@tangle-network/agent-runtime 0.349.0 → 0.352.1
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/{activation-wBipBkCf.d.ts → activation-BidzGkUQ.d.ts} +2 -24
- package/dist/{activation-tNGW73Y9.js → activation-C6zNC2kx.js} +12 -14
- package/dist/{activation-tNGW73Y9.js.map → activation-C6zNC2kx.js.map} +1 -1
- package/dist/agent.d.ts +8 -12
- package/dist/agent.js +9 -12
- package/dist/agent.js.map +1 -1
- package/dist/{analyst-loop-DZw5QWT9.js → analyst-loop-BZvXCDKy.js} +2 -3
- package/dist/{analyst-loop-DZw5QWT9.js.map → analyst-loop-BZvXCDKy.js.map} +1 -1
- package/dist/analyst-loop.d.ts +3 -5
- package/dist/analyst-loop.js +1 -2
- package/dist/{bundle-1xaJEgjq.js → bundle-DeDkJbsr.js} +3 -4
- package/dist/{bundle-1xaJEgjq.js.map → bundle-DeDkJbsr.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +13 -33
- package/dist/candidate-execution/index.js +16 -18
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/chat-turn.d.ts +2 -0
- package/dist/chat-turn.js +1 -0
- package/dist/{coordination-manager-B2Z_MmL9.js → coordination-manager-B7QadgrI.js} +101 -132
- package/dist/{coordination-manager-B2Z_MmL9.js.map → coordination-manager-B7QadgrI.js.map} +1 -1
- package/dist/{delegate-Dr-63jFl.js → delegate-CoscoyEo.js} +19 -21
- package/dist/delegate-CoscoyEo.js.map +1 -0
- package/dist/durable.d.ts +16 -149
- package/dist/durable.js +57 -980
- package/dist/durable.js.map +1 -1
- package/dist/{errors-DodWX-cb.js → errors-AzSuGI23.js} +5 -3
- package/dist/errors-AzSuGI23.js.map +1 -0
- package/dist/execution-handle-Bd2_nUB6.js +167 -0
- package/dist/execution-handle-Bd2_nUB6.js.map +1 -0
- package/dist/execution-handle-CujvqgCn.d.ts +130 -0
- package/dist/{graph-DPejYB3C.js → graph-mojMML8e.js} +192 -14
- package/dist/graph-mojMML8e.js.map +1 -0
- package/dist/{improve-DwSahPi1.js → improve-Dm5ZE8mr.js} +36 -53
- package/dist/{improve-DwSahPi1.js.map → improve-Dm5ZE8mr.js.map} +1 -1
- package/dist/{improvement-adapter-sIthWkcN.d.ts → improvement-adapter-D5GRU1eY.d.ts} +2 -6
- package/dist/index.d.ts +41 -89
- package/dist/index.js +45 -61
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +39 -59
- package/dist/intelligence.js +24 -33
- package/dist/intelligence.js.map +1 -1
- package/dist/journal-store-BJPMUydp.js +3925 -0
- package/dist/journal-store-BJPMUydp.js.map +1 -0
- package/dist/kernel.d.ts +5 -5
- package/dist/kernel.js +12 -11
- package/dist/{loop-runner-CP6MfO1b.js → loop-runner-5cL_vZi0.js} +5 -6
- package/dist/{loop-runner-CP6MfO1b.js.map → loop-runner-5cL_vZi0.js.map} +1 -1
- package/dist/{loop-runner-C6pGq-2l.d.ts → loop-runner-DyLD-aNb.d.ts} +3 -5
- package/dist/loop-runner-bin.d.ts +5 -8
- package/dist/loop-runner-bin.js +2 -3
- package/dist/mcp/bin.js +6 -8
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +8 -18
- package/dist/mcp/index.js +17 -25
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.js +4 -6
- package/dist/mcp/memory-bin.js.map +1 -1
- package/dist/{model-policy-CyCUwHed.js → model-policy-C-RGAUW4.js} +11 -13
- package/dist/{model-policy-CyCUwHed.js.map → model-policy-C-RGAUW4.js.map} +1 -1
- package/dist/placement.d.ts +12 -14
- package/dist/placement.js +1 -2
- package/dist/platform.d.ts +7 -13
- package/dist/platform.js +3 -6
- package/dist/platform.js.map +1 -1
- package/dist/{prepare-B9wWffjO.js → prepare-XWwsOh8O.js} +50 -69
- package/dist/{prepare-B9wWffjO.js.map → prepare-XWwsOh8O.js.map} +1 -1
- package/dist/{profile-JLJd2wFG.js → profile-C01SQZKa.js} +58 -92
- package/dist/profile-C01SQZKa.js.map +1 -0
- package/dist/{profile-materialization-bPm0gGLO.d.ts → profile-materialization-BRY22Oh8.d.ts} +1 -3
- package/dist/profiles.d.ts +25 -12
- package/dist/profiles.js +52 -11
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-DVVh-hEk.d.ts → protected-model-port-IKqhTypD.d.ts} +2 -14
- package/dist/{protected-redaction-DFCeo4vg.js → protected-redaction-DilFZch5.js} +2 -3
- package/dist/{protected-redaction-DFCeo4vg.js.map → protected-redaction-DilFZch5.js.map} +1 -1
- package/dist/{provision-supervisor-C4v2vqDo.js → provision-supervisor-D9pO-iPl.js} +11 -15
- package/dist/{provision-supervisor-C4v2vqDo.js.map → provision-supervisor-D9pO-iPl.js.map} +1 -1
- package/dist/{run-cancellation-CzFhQGMa.js → run-cancellation-CoJRKvih.js} +6 -7
- package/dist/{run-cancellation-CzFhQGMa.js.map → run-cancellation-CoJRKvih.js.map} +1 -1
- package/dist/{runtime-CsvGCQpl.js → runtime-BJPXHWbc.js} +652 -215
- package/dist/runtime-BJPXHWbc.js.map +1 -0
- package/dist/{runtime-hooks-tXpAarhW.js → runtime-hooks-CsW2pfFk.js} +2 -3
- package/dist/{runtime-hooks-tXpAarhW.js.map → runtime-hooks-CsW2pfFk.js.map} +1 -1
- package/dist/{runtime-hooks-nsqxSUFL.d.ts → runtime-hooks-ZQqPw-0g.d.ts} +1 -3
- package/dist/{sandbox-profile-compat-DtuJWFrM.js → sandbox-profile-compat-CXjozdWL.js} +52 -653
- package/dist/sandbox-profile-compat-CXjozdWL.js.map +1 -0
- package/dist/{search-executor-CCb82Umc.js → search-executor-CQEHMXoT.js} +12 -15
- package/dist/{search-executor-CCb82Umc.js.map → search-executor-CQEHMXoT.js.map} +1 -1
- package/dist/{server-CKPwZU-I.js → server-U9NGgudQ.js} +19 -30
- package/dist/{server-CKPwZU-I.js.map → server-U9NGgudQ.js.map} +1 -1
- package/dist/{structural-rollout-DylC_fwU.js → structural-rollout-wMSxE7bn.js} +71 -70
- package/dist/structural-rollout-wMSxE7bn.js.map +1 -0
- package/dist/{substrate-CGDFTSRh.js → substrate-Db2pp6y3.js} +2 -3
- package/dist/{substrate-CGDFTSRh.js.map → substrate-Db2pp6y3.js.map} +1 -1
- package/dist/{supervise-BGfm2GlY.js → supervise-CNNhX0ab.js} +460 -195
- package/dist/supervise-CNNhX0ab.js.map +1 -0
- package/dist/supervision-discovery-CewADdEs.js +772 -0
- package/dist/supervision-discovery-CewADdEs.js.map +1 -0
- package/dist/{supervisor-wS9Ehz_x.js → supervisor-rK5Y8en6.js} +521 -4320
- package/dist/supervisor-rK5Y8en6.js.map +1 -0
- package/dist/{task-queue-0fKkoweu.d.ts → task-queue-kefGy79U.d.ts} +1 -3
- package/dist/task-queue.d.ts +1 -1
- package/dist/task-queue.js +1 -2
- package/dist/testing.d.ts +7 -15
- package/dist/testing.js +241 -244
- package/dist/testing.js.map +1 -1
- package/dist/tool-loop.d.ts +16 -19
- package/dist/tool-loop.js +2 -3
- package/dist/{tool-server-XV4aJwoQ.js → tool-server-CZWd_Opp.js} +3 -4
- package/dist/{tool-server-XV4aJwoQ.js.map → tool-server-CZWd_Opp.js.map} +1 -1
- package/dist/{top-snapshot-CflmaDgk.js → top-snapshot-DcV7VG4m.js} +179 -163
- package/dist/top-snapshot-DcV7VG4m.js.map +1 -0
- package/dist/tui/bin.js +50 -81
- package/dist/tui/bin.js.map +1 -1
- package/dist/tui/index.d.ts +27 -58
- package/dist/tui/index.js +2 -2
- package/dist/{types-C8BGOCBn.d.ts → types-0uzVKtFW.d.ts} +388 -484
- package/dist/{types-Cwrea-bU.d.ts → types-qsqfyQoY.d.ts} +1 -3
- package/dist/util-ebWMWzY0.js +624 -0
- package/dist/util-ebWMWzY0.js.map +1 -0
- package/dist/workspace-store/index.d.ts +12 -22
- package/dist/workspace-store/index.js +13 -10
- package/dist/workspace-store/index.js.map +1 -1
- package/dist/{workspace-streams-BiS4ABah.d.ts → workspace-streams-Dq2Fzk3c.d.ts} +1 -11
- package/package.json +31 -26
- package/skills/agent-graphs/SKILL.md +17 -4
- package/skills/be-ambitious/SKILL.md +46 -0
- package/skills/graph-designer/SKILL.md +9 -2
- package/dist/delegate-Dr-63jFl.js.map +0 -1
- package/dist/errors-DodWX-cb.js.map +0 -1
- package/dist/graph-DPejYB3C.js.map +0 -1
- package/dist/profile-JLJd2wFG.js.map +0 -1
- package/dist/record-events-D93DkpAx.js +0 -263
- package/dist/record-events-D93DkpAx.js.map +0 -1
- package/dist/runtime-CsvGCQpl.js.map +0 -1
- package/dist/sandbox-profile-compat-DtuJWFrM.js.map +0 -1
- package/dist/structural-rollout-DylC_fwU.js.map +0 -1
- package/dist/supervise-BGfm2GlY.js.map +0 -1
- package/dist/supervisor-wS9Ehz_x.js.map +0 -1
- package/dist/top-snapshot-CflmaDgk.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { C as writeWorkerCancellation, T as writeWorkerSteerAcknowledgement, c as writeRunCancellation, g as readWorkerSteerRequests, h as readWorkerSteerAcknowledgement, i as readRunCancellation, m as readWorkerCancellation, p as readWorkerCancelRequests, r as readRunCancelRequest, t as applyRunCancellation, u as claimWorkerSteerDelivery } from "./run-cancellation-
|
|
1
|
+
import { Tt as assertValidBudget, b as captureRunWriteContext, c as readCommittedJsonLines, et as detachedFrozen, ft as errMessage, i as appendCommittedJsonLine, j as settlementFailureCause, r as spawnJournalRecordEvents, rt as contentAddress, t as FileSpawnJournal, vt as resolveRedactor } from "./journal-store-BJPMUydp.js";
|
|
2
|
+
import { En as INBOX_RECEIPT_KEY, Hn as isTerminalNodeStatus, L as runtimeGraphMetadataKey, Nn as createPeerMailbox, Q as resolveSpawnResourcePaths, S as workerTraceAnalysisStore, Vn as isLiveNodeStatus, W as meterRuntimeOwnedAccounting, _ as withDriverExecutor, _t as FileResultBlobStore, fr as failedItems, gt as InMemorySpawnJournal, ht as InMemoryResultBlobStore, nr as CheckUnavailableError, ur as checkVerdictOf, vt as createExecutorRegistry, x as parseWorkerToolTraceArtifact } from "./supervisor-rK5Y8en6.js";
|
|
3
|
+
import { C as writeWorkerCancellation, T as writeWorkerSteerAcknowledgement, c as writeRunCancellation, g as readWorkerSteerRequests, h as readWorkerSteerAcknowledgement, i as readRunCancellation, m as readWorkerCancellation, p as readWorkerCancelRequests, r as readRunCancelRequest, t as applyRunCancellation, u as claimWorkerSteerDelivery } from "./run-cancellation-CoJRKvih.js";
|
|
4
4
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest } from "@tangle-network/agent-interface";
|
|
5
5
|
import { argHash, errorStreakDetector, observeAll, repeatedActionDetector } from "@tangle-network/agent-eval";
|
|
6
6
|
import { registry } from "zod";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { join } from "node:path";
|
|
10
|
-
|
|
10
|
+
// src/runtime/supervise/coordination-log.ts
|
|
11
11
|
/**
|
|
12
12
|
* Durable side-log for coordination evidence the spawn journal does not own: questions, analyst
|
|
13
13
|
* findings, answer decisions, authorized continuation receipts, delivery-attempt markers, and
|
|
@@ -117,8 +117,7 @@ async function foldCoordinationRecords(source, runId, ownerId) {
|
|
|
117
117
|
records
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
//#region src/runtime/supervise/run-context.ts
|
|
120
|
+
// src/runtime/supervise/run-context.ts
|
|
122
121
|
/**
|
|
123
122
|
*
|
|
124
123
|
* `createInMemoryRunContext` — the one-call bundle of the in-memory stores a
|
|
@@ -193,8 +192,7 @@ function createFileRunContext(dir, opts = {}) {
|
|
|
193
192
|
coordinationLog: new FileCoordinationLog(`${dir}/coordination-log.jsonl`)
|
|
194
193
|
};
|
|
195
194
|
}
|
|
196
|
-
|
|
197
|
-
//#region src/mcp/tools/coordination-json.ts
|
|
195
|
+
// src/mcp/tools/coordination-json.ts
|
|
198
196
|
/** Stringify a findings payload for a routed delivery; never throws (a cyclic payload degrades to
|
|
199
197
|
* its String form rather than killing the settle path). */
|
|
200
198
|
function safeJsonText(value) {
|
|
@@ -205,8 +203,7 @@ function safeJsonText(value) {
|
|
|
205
203
|
return String(value);
|
|
206
204
|
}
|
|
207
205
|
}
|
|
208
|
-
|
|
209
|
-
//#region src/mcp/tools/coordination-events.ts
|
|
206
|
+
// src/mcp/tools/coordination-events.ts
|
|
210
207
|
/** Default and maximum bounds for one {@link CoordinationTools} journal read. The defaults are
|
|
211
208
|
* sized for a driver turn (a page a model can read and still have room to act on); the maxima
|
|
212
209
|
* bound what a single tool result may cost even when the caller asks for everything. */
|
|
@@ -281,8 +278,7 @@ const wakeEventKinds = [
|
|
|
281
278
|
"lead-message",
|
|
282
279
|
"map"
|
|
283
280
|
];
|
|
284
|
-
|
|
285
|
-
//#region src/mcp/tools/coordination-analysts.ts
|
|
281
|
+
// src/mcp/tools/coordination-analysts.ts
|
|
286
282
|
/**
|
|
287
283
|
* The trace-tool sets a DEFINED analyst may ask for — the exact group names agent-eval's
|
|
288
284
|
* `buildTraceToolsForGroup` accepts, restated here so the `define_analyst` JSON Schema can
|
|
@@ -402,15 +398,17 @@ function parseAuthoredAnalystDefinition(raw) {
|
|
|
402
398
|
message: `must be one of ${analystToolGroupNames.join(", ")}`
|
|
403
399
|
});
|
|
404
400
|
let model;
|
|
405
|
-
if (o.model !== void 0)
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
401
|
+
if (o.model !== void 0) {
|
|
402
|
+
if (typeof o.model !== "string" || o.model.trim().length === 0) issues.push({
|
|
403
|
+
path: "model",
|
|
404
|
+
message: "must be a non-empty string when present"
|
|
405
|
+
});
|
|
406
|
+
else if (o.model.length > bounds.maxModelChars) issues.push({
|
|
407
|
+
path: "model",
|
|
408
|
+
message: `must be at most ${bounds.maxModelChars} characters`
|
|
409
|
+
});
|
|
410
|
+
else model = o.model.trim();
|
|
411
|
+
}
|
|
414
412
|
const clampedLimit = (field, max, source) => {
|
|
415
413
|
const value = source[field];
|
|
416
414
|
if (value === void 0) return void 0;
|
|
@@ -424,33 +422,35 @@ function parseAuthoredAnalystDefinition(raw) {
|
|
|
424
422
|
return Math.min(value, max);
|
|
425
423
|
};
|
|
426
424
|
let limits;
|
|
427
|
-
if (o.limits !== void 0)
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
else {
|
|
432
|
-
const source = o.limits;
|
|
433
|
-
const knownLimits = /* @__PURE__ */ new Set([
|
|
434
|
-
"maxIterations",
|
|
435
|
-
"maxLlmCalls",
|
|
436
|
-
"maxToolCalls",
|
|
437
|
-
"maxOutputChars"
|
|
438
|
-
]);
|
|
439
|
-
for (const key of Object.keys(source)) if (!knownLimits.has(key)) issues.push({
|
|
440
|
-
path: `limits.${key}`,
|
|
441
|
-
message: `is not an investigation limit (accepted: ${[...knownLimits].join(", ")})`
|
|
425
|
+
if (o.limits !== void 0) {
|
|
426
|
+
if (!o.limits || typeof o.limits !== "object" || Array.isArray(o.limits)) issues.push({
|
|
427
|
+
path: "limits",
|
|
428
|
+
message: "must be an object"
|
|
442
429
|
});
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
430
|
+
else {
|
|
431
|
+
const source = o.limits;
|
|
432
|
+
const knownLimits = /* @__PURE__ */ new Set([
|
|
433
|
+
"maxIterations",
|
|
434
|
+
"maxLlmCalls",
|
|
435
|
+
"maxToolCalls",
|
|
436
|
+
"maxOutputChars"
|
|
437
|
+
]);
|
|
438
|
+
for (const key of Object.keys(source)) if (!knownLimits.has(key)) issues.push({
|
|
439
|
+
path: `limits.${key}`,
|
|
440
|
+
message: `is not an investigation limit (accepted: ${[...knownLimits].join(", ")})`
|
|
441
|
+
});
|
|
442
|
+
const maxIterations = clampedLimit("maxIterations", bounds.maxIterations, source);
|
|
443
|
+
const maxLlmCalls = clampedLimit("maxLlmCalls", bounds.maxLlmCalls, source);
|
|
444
|
+
const maxToolCalls = clampedLimit("maxToolCalls", bounds.maxToolCalls, source);
|
|
445
|
+
const maxOutputChars = clampedLimit("maxOutputChars", bounds.maxOutputChars, source);
|
|
446
|
+
const present = {
|
|
447
|
+
...maxIterations === void 0 ? {} : { maxIterations },
|
|
448
|
+
...maxLlmCalls === void 0 ? {} : { maxLlmCalls },
|
|
449
|
+
...maxToolCalls === void 0 ? {} : { maxToolCalls },
|
|
450
|
+
...maxOutputChars === void 0 ? {} : { maxOutputChars }
|
|
451
|
+
};
|
|
452
|
+
if (Object.keys(present).length > 0) limits = present;
|
|
453
|
+
}
|
|
454
454
|
}
|
|
455
455
|
let minimumEvidenceCitations;
|
|
456
456
|
if (o.minimumEvidenceCitations !== void 0) {
|
|
@@ -497,8 +497,7 @@ function normalizeAnalyzeOnSettle(entry) {
|
|
|
497
497
|
if (route.statuses !== void 0 && (!Array.isArray(route.statuses) || route.statuses.length === 0 || route.statuses.some((status) => status !== "done" && status !== "down"))) throw new TypeError("analyzeOnSettle.statuses must contain done or down");
|
|
498
498
|
return route;
|
|
499
499
|
}
|
|
500
|
-
|
|
501
|
-
//#region src/mcp/tools/coordination-budget.ts
|
|
500
|
+
// src/mcp/tools/coordination-budget.ts
|
|
502
501
|
/** Each channel spent beyond its budget, as spent of budget: `tokens 235,857 of 42,000` or
|
|
503
502
|
* `deadline 3,857 s of 2,400 s`. */
|
|
504
503
|
function budgetOverspendText(violation) {
|
|
@@ -602,8 +601,7 @@ const BUDGET_FIELD = {
|
|
|
602
601
|
iterations: "maxIterations",
|
|
603
602
|
usd: "maxUsd"
|
|
604
603
|
};
|
|
605
|
-
|
|
606
|
-
//#region src/runtime/supervise/driver-control-acknowledgers.ts
|
|
604
|
+
// src/runtime/supervise/driver-control-acknowledgers.ts
|
|
607
605
|
/** The journal file `createFileRunContext` writes inside the run directory. The acknowledger
|
|
608
606
|
* reads it as EVIDENCE for the terminated-descendants set — the nested trees of a cancelled
|
|
609
607
|
* lead journal their terminal records there before the lead settles into this scope. */
|
|
@@ -973,8 +971,7 @@ function terminatedDescendants(dir, nodeId, sinceIso) {
|
|
|
973
971
|
function isDirectChildNodeId(owner, ref) {
|
|
974
972
|
return ref.startsWith(`${owner.ownerId}:s`) && /^s\d+$/.test(ref.slice(owner.ownerId.length + 1));
|
|
975
973
|
}
|
|
976
|
-
|
|
977
|
-
//#region src/runtime/supervise/event-bus.ts
|
|
974
|
+
// src/runtime/supervise/event-bus.ts
|
|
978
975
|
/** Create the child→parent coordination bus: one typed pipe for settled outputs, questions, and analyst findings, with a priority-ordered pull queue and a pass-through subscribe lane.
|
|
979
976
|
* @experimental In-process queue; durability is a transport swap that does not exist yet. */
|
|
980
977
|
function createEventBus(now = Date.now) {
|
|
@@ -1061,8 +1058,7 @@ function createEventBus(now = Date.now) {
|
|
|
1061
1058
|
}
|
|
1062
1059
|
};
|
|
1063
1060
|
}
|
|
1064
|
-
|
|
1065
|
-
//#region src/mcp/tools/coordination-analysis.ts
|
|
1061
|
+
// src/mcp/tools/coordination-analysis.ts
|
|
1066
1062
|
function createCoordinationAnalysis(deps) {
|
|
1067
1063
|
const { opts } = deps;
|
|
1068
1064
|
const analysisRoutes = (opts.analyzeOnSettle ?? []).map(normalizeAnalyzeOnSettle);
|
|
@@ -1151,7 +1147,8 @@ async function readTraceSpans(opts, worker) {
|
|
|
1151
1147
|
spanCount: 0
|
|
1152
1148
|
};
|
|
1153
1149
|
try {
|
|
1154
|
-
const
|
|
1150
|
+
const raw = await opts.blobs.get(worker.trace.traceRef);
|
|
1151
|
+
const artifact = parseWorkerToolTraceArtifact(raw, worker.trace.traceRef);
|
|
1155
1152
|
return {
|
|
1156
1153
|
spansText: safeJsonText(artifact.spans),
|
|
1157
1154
|
spanCount: artifact.spans.length
|
|
@@ -1467,8 +1464,7 @@ async function recordManagerAnalysisFailure(state, error) {
|
|
|
1467
1464
|
});
|
|
1468
1465
|
}
|
|
1469
1466
|
}
|
|
1470
|
-
|
|
1471
|
-
//#region src/mcp/tools/coordination-input.ts
|
|
1467
|
+
// src/mcp/tools/coordination-input.ts
|
|
1472
1468
|
const urgencyPriority = (u) => u === "blocks-run" ? 20 : u === "blocks-step" ? 10 : 0;
|
|
1473
1469
|
const str = (v, field) => {
|
|
1474
1470
|
if (typeof v !== "string" || v.length === 0) throw new Error(`coordination tools: "${field}" must be a non-empty string`);
|
|
@@ -1491,14 +1487,12 @@ const parseContinuity = (v) => {
|
|
|
1491
1487
|
if (v === "fresh" || v === "resume") return v;
|
|
1492
1488
|
throw new Error("coordination tools: \"continuity\" must be \"fresh\" or \"resume\"");
|
|
1493
1489
|
};
|
|
1494
|
-
|
|
1495
|
-
//#region src/mcp/tools/coordination-worker-argument.ts
|
|
1490
|
+
// src/mcp/tools/coordination-worker-argument.ts
|
|
1496
1491
|
const idArg = {
|
|
1497
1492
|
type: "string",
|
|
1498
1493
|
description: "The workerId returned by spawn_worker."
|
|
1499
1494
|
};
|
|
1500
|
-
|
|
1501
|
-
//#region src/mcp/tools/coordination-analyst-tools.ts
|
|
1495
|
+
// src/mcp/tools/coordination-analyst-tools.ts
|
|
1502
1496
|
function mountAnalystsTools({ opts, tools, ledger, nodeForWorker, analystMenu, analystRunContext, defineAnalyst }) {
|
|
1503
1497
|
if (opts.analysts) {
|
|
1504
1498
|
tools.push({
|
|
@@ -1646,8 +1640,7 @@ function mountAnalystsTools({ opts, tools, ledger, nodeForWorker, analystMenu, a
|
|
|
1646
1640
|
});
|
|
1647
1641
|
}
|
|
1648
1642
|
}
|
|
1649
|
-
|
|
1650
|
-
//#region src/mcp/tools/coordination-tool-timeout.ts
|
|
1643
|
+
// src/mcp/tools/coordination-tool-timeout.ts
|
|
1651
1644
|
async function runWithin(work, ms, message) {
|
|
1652
1645
|
let timer;
|
|
1653
1646
|
const timeout = new Promise((_, reject) => {
|
|
@@ -1660,8 +1653,7 @@ async function runWithin(work, ms, message) {
|
|
|
1660
1653
|
if (timer) clearTimeout(timer);
|
|
1661
1654
|
}
|
|
1662
1655
|
}
|
|
1663
|
-
|
|
1664
|
-
//#region src/mcp/tools/coordination-audit-tools.ts
|
|
1656
|
+
// src/mcp/tools/coordination-audit-tools.ts
|
|
1665
1657
|
function createAuditTools({ opts, tools, blockedReports, readJournal }) {
|
|
1666
1658
|
return [{
|
|
1667
1659
|
name: "report_blocked",
|
|
@@ -1800,8 +1792,7 @@ const unprobeableVerbs = /* @__PURE__ */ new Set([
|
|
|
1800
1792
|
"report_blocked"
|
|
1801
1793
|
]);
|
|
1802
1794
|
const REPORT_BLOCKED_PROBE_MS = 6e4;
|
|
1803
|
-
|
|
1804
|
-
//#region src/mcp/tools/coordination-down-messages.ts
|
|
1795
|
+
// src/mcp/tools/coordination-down-messages.ts
|
|
1805
1796
|
function createDownMessages({ opts, bus, lifetime }) {
|
|
1806
1797
|
async function sendDown(type, down, questionIdOrAnalyst) {
|
|
1807
1798
|
await bus.publish(type === "answer" ? {
|
|
@@ -1938,8 +1929,7 @@ function createDownMessages({ opts, bus, lifetime }) {
|
|
|
1938
1929
|
steerWorker
|
|
1939
1930
|
};
|
|
1940
1931
|
}
|
|
1941
|
-
|
|
1942
|
-
//#region src/mcp/tools/coordination-graph-tools.ts
|
|
1932
|
+
// src/mcp/tools/coordination-graph-tools.ts
|
|
1943
1933
|
function mountGraphsTools({ opts, tools, admitSpawn }) {
|
|
1944
1934
|
if (opts.graphs) {
|
|
1945
1935
|
const graphs = opts.graphs;
|
|
@@ -2015,8 +2005,7 @@ function mountGraphsTools({ opts, tools, admitSpawn }) {
|
|
|
2015
2005
|
});
|
|
2016
2006
|
}
|
|
2017
2007
|
}
|
|
2018
|
-
|
|
2019
|
-
//#region src/mcp/tools/coordination-journal-reader.ts
|
|
2008
|
+
// src/mcp/tools/coordination-journal-reader.ts
|
|
2020
2009
|
function createJournalReader({ opts, bus }) {
|
|
2021
2010
|
let journalReadTo = 0;
|
|
2022
2011
|
const redactJournalEvent = resolveRedactor(opts.redactJournal);
|
|
@@ -2131,8 +2120,7 @@ function createJournalReader({ opts, bus }) {
|
|
|
2131
2120
|
readTo: () => journalReadTo
|
|
2132
2121
|
};
|
|
2133
2122
|
}
|
|
2134
|
-
|
|
2135
|
-
//#region src/mcp/tools/coordination-lead-intake.ts
|
|
2123
|
+
// src/mcp/tools/coordination-lead-intake.ts
|
|
2136
2124
|
/**
|
|
2137
2125
|
* What reaches a manager from outside its tools: lead messages from its parent, and the outcomes
|
|
2138
2126
|
* of tool calls that outlived their response fence. Both are open work until they are delivered.
|
|
@@ -2216,8 +2204,7 @@ function leadMessageOf(message) {
|
|
|
2216
2204
|
interrupt
|
|
2217
2205
|
};
|
|
2218
2206
|
}
|
|
2219
|
-
|
|
2220
|
-
//#region src/mcp/tools/coordination-event-projection.ts
|
|
2207
|
+
// src/mcp/tools/coordination-event-projection.ts
|
|
2221
2208
|
const eventWorker = (event) => event.type === "settled" ? event.worker.id : event.type === "finding" ? event.finding.fromWorker : event.type === "question" ? event.question.from : event.type === "map" ? event.map.sourceWorker : void 0;
|
|
2222
2209
|
const projectEvent = (ev) => {
|
|
2223
2210
|
if (ev.type === "settled") {
|
|
@@ -2300,8 +2287,7 @@ const projectEvent = (ev) => {
|
|
|
2300
2287
|
...ev.down
|
|
2301
2288
|
};
|
|
2302
2289
|
};
|
|
2303
|
-
|
|
2304
|
-
//#region src/mcp/tools/coordination-manager-reentry.ts
|
|
2290
|
+
// src/mcp/tools/coordination-manager-reentry.ts
|
|
2305
2291
|
function managerReentryState({ opts, ledger, deliveries, priorJournal, bus, journal, openWork, driverAttempt, lastRejection }) {
|
|
2306
2292
|
const { unqueued, queued } = openWork();
|
|
2307
2293
|
const deliveredSettled = new Set(deliveries.flatMap((delivery) => delivery.record.event.type === "settled" ? [delivery.record.event.worker.id] : []));
|
|
@@ -2343,8 +2329,7 @@ function managerReentryState({ opts, ledger, deliveries, priorJournal, bus, jour
|
|
|
2343
2329
|
...lastRejection === void 0 ? {} : { lastRejection }
|
|
2344
2330
|
});
|
|
2345
2331
|
}
|
|
2346
|
-
|
|
2347
|
-
//#region src/mcp/tools/coordination-manager-state.ts
|
|
2332
|
+
// src/mcp/tools/coordination-manager-state.ts
|
|
2348
2333
|
function createManagerState(opts) {
|
|
2349
2334
|
const priorSubmission = opts.deliverable === void 0 ? void 0 : opts.priorJournal?.find((record) => record.event.type === "submission");
|
|
2350
2335
|
return {
|
|
@@ -2408,8 +2393,7 @@ async function acknowledgeDeliveries({ opts, bus, state, leadReceipts }, targets
|
|
|
2408
2393
|
for (const delivery of fresh) delivery.acknowledged = true;
|
|
2409
2394
|
return seqs;
|
|
2410
2395
|
}
|
|
2411
|
-
|
|
2412
|
-
//#region src/mcp/tools/coordination-manager-waiting.ts
|
|
2396
|
+
// src/mcp/tools/coordination-manager-waiting.ts
|
|
2413
2397
|
function createManagerWaiting(env) {
|
|
2414
2398
|
return {
|
|
2415
2399
|
ensureDrain: ensureDrain.bind(null, env),
|
|
@@ -2580,8 +2564,7 @@ async function awaitSettlement(env, workerIds, signal) {
|
|
|
2580
2564
|
})])) && settledIds().length === 0) return [];
|
|
2581
2565
|
}
|
|
2582
2566
|
}
|
|
2583
|
-
|
|
2584
|
-
//#region src/mcp/tools/coordination-runtime-spawn.ts
|
|
2567
|
+
// src/mcp/tools/coordination-runtime-spawn.ts
|
|
2585
2568
|
/**
|
|
2586
2569
|
* Admit one keyed runtime spawn. A key whose prior worker is in doubt (started in a dead process
|
|
2587
2570
|
* with no terminal receipt) is re-admitted once under `<key>#2`, the replacement key the
|
|
@@ -2607,8 +2590,7 @@ async function admitRuntimeSpawn(admitSpawn, input) {
|
|
|
2607
2590
|
}
|
|
2608
2591
|
return { inDoubt: true };
|
|
2609
2592
|
}
|
|
2610
|
-
|
|
2611
|
-
//#region src/mcp/tools/coordination-map-routing.ts
|
|
2593
|
+
// src/mcp/tools/coordination-map-routing.ts
|
|
2612
2594
|
function createMapRouting(deps) {
|
|
2613
2595
|
const state = {
|
|
2614
2596
|
...deps,
|
|
@@ -2929,8 +2911,7 @@ function resolveJsonPointer(document, pointer) {
|
|
|
2929
2911
|
value
|
|
2930
2912
|
};
|
|
2931
2913
|
}
|
|
2932
|
-
|
|
2933
|
-
//#region src/mcp/tools/coordination-question-ledger.ts
|
|
2914
|
+
// src/mcp/tools/coordination-question-ledger.ts
|
|
2934
2915
|
function createQuestionLedger({ opts, bus }) {
|
|
2935
2916
|
let questionSeq = 0;
|
|
2936
2917
|
const questions = [...opts.priorQuestions ?? []];
|
|
@@ -3054,8 +3035,7 @@ function createQuestionLedger({ opts, bus }) {
|
|
|
3054
3035
|
blockingQuestionsForStop
|
|
3055
3036
|
};
|
|
3056
3037
|
}
|
|
3057
|
-
|
|
3058
|
-
//#region src/mcp/tools/coordination-messages.ts
|
|
3038
|
+
// src/mcp/tools/coordination-messages.ts
|
|
3059
3039
|
/**
|
|
3060
3040
|
* Why one parent→child delivery did not land, in the words the MANAGER needs.
|
|
3061
3041
|
*
|
|
@@ -3072,14 +3052,12 @@ const downMessageRefusalReasons = Object.freeze({
|
|
|
3072
3052
|
"scope-stopped": "this manager’s scope has stopped, so no further message may be sent from it",
|
|
3073
3053
|
"runtime-error": "the executor threw while accepting the message; the worker may or may not have received it"
|
|
3074
3054
|
});
|
|
3075
|
-
|
|
3076
|
-
//#region src/mcp/tools/coordination-questions.ts
|
|
3055
|
+
// src/mcp/tools/coordination-questions.ts
|
|
3077
3056
|
/** Where a question this driver cannot answer goes next. `answer_question` accepts these and
|
|
3078
3057
|
* nothing else, so the decision type states them and nothing else. */
|
|
3079
3058
|
const questionEscalationTargets = ["parent", "user"];
|
|
3080
3059
|
const isQuestionEscalationTarget = (value) => questionEscalationTargets.includes(value);
|
|
3081
|
-
|
|
3082
|
-
//#region src/mcp/tools/coordination-question-tools.ts
|
|
3060
|
+
// src/mcp/tools/coordination-question-tools.ts
|
|
3083
3061
|
function createQuestionTools({ questionLedger, messages }) {
|
|
3084
3062
|
return [
|
|
3085
3063
|
{
|
|
@@ -3234,8 +3212,7 @@ function createQuestionTools({ questionLedger, messages }) {
|
|
|
3234
3212
|
}
|
|
3235
3213
|
];
|
|
3236
3214
|
}
|
|
3237
|
-
|
|
3238
|
-
//#region src/mcp/tools/coordination-completion-refusal.ts
|
|
3215
|
+
// src/mcp/tools/coordination-completion-refusal.ts
|
|
3239
3216
|
/**
|
|
3240
3217
|
* The refusal a failed check reading returns to `submit_result`: the verdict as a located fact,
|
|
3241
3218
|
* the FAIL lines unless the check's tests must stay hidden, and how many times the manager has
|
|
@@ -3256,8 +3233,7 @@ function refusalText(verdict, deliverable, read) {
|
|
|
3256
3233
|
...lines.length > shown.length ? [`${lines.length - shown.length} more failure lines.`] : []
|
|
3257
3234
|
].join("\n");
|
|
3258
3235
|
}
|
|
3259
|
-
|
|
3260
|
-
//#region src/mcp/tools/coordination-result-tools.ts
|
|
3236
|
+
// src/mcp/tools/coordination-result-tools.ts
|
|
3261
3237
|
/**
|
|
3262
3238
|
* The tools that end a manager: `submit_result` when it has an independent check, otherwise
|
|
3263
3239
|
* `stop`, then `read_continuation` when the run keeps continuation notes.
|
|
@@ -3441,8 +3417,7 @@ function readContinuationTool(opts) {
|
|
|
3441
3417
|
}
|
|
3442
3418
|
};
|
|
3443
3419
|
}
|
|
3444
|
-
|
|
3445
|
-
//#region src/mcp/tools/coordination-route-routing.ts
|
|
3420
|
+
// src/mcp/tools/coordination-route-routing.ts
|
|
3446
3421
|
/**
|
|
3447
3422
|
* The flow scheduler of one manager: entry and route spawns are runtime spawns, like map items.
|
|
3448
3423
|
* It has two call sites. `start` spawns every entry when the manager's coordination opens, before
|
|
@@ -3888,8 +3863,7 @@ function gateDecision(answer, choices) {
|
|
|
3888
3863
|
};
|
|
3889
3864
|
return `${shown} — expected { kind: 'choose', choice, by } or { kind: 'stop', reason, by }`;
|
|
3890
3865
|
}
|
|
3891
|
-
|
|
3892
|
-
//#region src/mcp/tools/coordination-settlement-drain.ts
|
|
3866
|
+
// src/mcp/tools/coordination-settlement-drain.ts
|
|
3893
3867
|
function createSettlementDrain({ opts, ledger, unwatchWorker, bus, analysis, maps, routes, workerRouteNames, projectSettled }) {
|
|
3894
3868
|
const hooked = /* @__PURE__ */ new Set();
|
|
3895
3869
|
const commitSettled = (w) => {
|
|
@@ -4027,8 +4001,7 @@ function createSettlementDrain({ opts, ledger, unwatchWorker, bus, analysis, map
|
|
|
4027
4001
|
isBusy: () => pendingSettlement !== void 0 || flushing > 0
|
|
4028
4002
|
};
|
|
4029
4003
|
}
|
|
4030
|
-
|
|
4031
|
-
//#region src/mcp/tools/coordination-budget-override.ts
|
|
4004
|
+
// src/mcp/tools/coordination-budget-override.ts
|
|
4032
4005
|
const mergeBudget = (base, raw) => {
|
|
4033
4006
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) throw new Error("coordination tools: \"budget\" must be an object");
|
|
4034
4007
|
const o = raw;
|
|
@@ -4058,8 +4031,7 @@ const mergeBudget = (base, raw) => {
|
|
|
4058
4031
|
assertValidBudget(merged, "coordination tools: budget");
|
|
4059
4032
|
return merged;
|
|
4060
4033
|
};
|
|
4061
|
-
|
|
4062
|
-
//#region src/mcp/tools/coordination-model-attribution.ts
|
|
4034
|
+
// src/mcp/tools/coordination-model-attribution.ts
|
|
4063
4035
|
/**
|
|
4064
4036
|
* The substitution and the sentence a manager reads beside it. A manager that reports which model
|
|
4065
4037
|
* did the work must read `modelSubstitution.ran`, never the model it asked for.
|
|
@@ -4070,8 +4042,7 @@ function modelSubstitutionReport(substitution) {
|
|
|
4070
4042
|
modelWarning: `spawn authorization ran this worker on ${substitution.ran}, not the ${substitution.requested} you authored; attribute its work to ${substitution.ran}`
|
|
4071
4043
|
};
|
|
4072
4044
|
}
|
|
4073
|
-
|
|
4074
|
-
//#region src/mcp/tools/coordination-spawn-admission.ts
|
|
4045
|
+
// src/mcp/tools/coordination-spawn-admission.ts
|
|
4075
4046
|
function createSpawnAdmission(deps) {
|
|
4076
4047
|
const state = {
|
|
4077
4048
|
...deps,
|
|
@@ -4314,8 +4285,7 @@ function nextUnkeyedAssignmentOrdinal(scope) {
|
|
|
4314
4285
|
if (!Number.isSafeInteger(next)) throw new Error("coordination: durable assignment ordinal space is exhausted");
|
|
4315
4286
|
return next;
|
|
4316
4287
|
}
|
|
4317
|
-
|
|
4318
|
-
//#region src/runtime/supervise/detector-monitor.ts
|
|
4288
|
+
// src/runtime/supervise/detector-monitor.ts
|
|
4319
4289
|
/**
|
|
4320
4290
|
*
|
|
4321
4291
|
* The ONLINE analyst: watch a `TraceSource` and fold each tool span through agent-eval's published
|
|
@@ -4356,14 +4326,14 @@ function watchTrace(source, opts = {}) {
|
|
|
4356
4326
|
for (const s of signals) opts.onSignal?.(s, span);
|
|
4357
4327
|
});
|
|
4358
4328
|
}
|
|
4359
|
-
|
|
4360
|
-
//#region src/mcp/tools/coordination-worker-observation.ts
|
|
4329
|
+
// src/mcp/tools/coordination-worker-observation.ts
|
|
4361
4330
|
function createWorkerObservation({ opts, ledger, flushedAnalystRuns, bus, deadlineNoticeDelivered, leadPublishing }) {
|
|
4362
4331
|
const liveWorkerCount = () => opts.scope.view.nodes.filter((n) => isLiveNodeStatus(n.status)).length;
|
|
4363
4332
|
const queuedWorkerCount = () => opts.scope.view.nodes.filter((n) => n.status === "queued").length;
|
|
4364
4333
|
const projectNodeEvidence = (node, resumed = false) => ({
|
|
4365
4334
|
id: node.id,
|
|
4366
4335
|
status: node.status,
|
|
4336
|
+
...node.failure === void 0 ? {} : { failure: node.failure },
|
|
4367
4337
|
...node.assignmentId === void 0 ? {} : { assignmentId: node.assignmentId },
|
|
4368
4338
|
...node.identity === void 0 ? {} : { identity: node.identity },
|
|
4369
4339
|
...node.modelSubstitution === void 0 ? {} : modelSubstitutionReport(node.modelSubstitution),
|
|
@@ -4488,8 +4458,7 @@ function createWorkerObservation({ opts, ledger, flushedAnalystRuns, bus, deadli
|
|
|
4488
4458
|
unwatchWorker
|
|
4489
4459
|
};
|
|
4490
4460
|
}
|
|
4491
|
-
|
|
4492
|
-
//#region src/mcp/tools/coordination-worker-settlement.ts
|
|
4461
|
+
// src/mcp/tools/coordination-worker-settlement.ts
|
|
4493
4462
|
function createWorkerSettlement({ opts, nodeForWorker }) {
|
|
4494
4463
|
const descendantOutRefs = new Set(opts.sourceEvidenceRefs ?? []);
|
|
4495
4464
|
const projectSettled = (settled, resumed = false) => {
|
|
@@ -4543,8 +4512,7 @@ function createWorkerSettlement({ opts, nodeForWorker }) {
|
|
|
4543
4512
|
projectSettled
|
|
4544
4513
|
};
|
|
4545
4514
|
}
|
|
4546
|
-
|
|
4547
|
-
//#region src/mcp/tools/coordination-profile-schema.ts
|
|
4515
|
+
// src/mcp/tools/coordination-profile-schema.ts
|
|
4548
4516
|
/**
|
|
4549
4517
|
* Strip zod's object-KEY CODEC artifact from a derived JSON Schema, at every depth.
|
|
4550
4518
|
*
|
|
@@ -4604,7 +4572,7 @@ const spawnProfileFields = [
|
|
|
4604
4572
|
},
|
|
4605
4573
|
{
|
|
4606
4574
|
name: "prompt",
|
|
4607
|
-
description: "The child's standing instructions: `
|
|
4575
|
+
description: "The child's standing instructions: `appendSystemPrompt` (who it is and how it works; preserves native defaults) and `instructions` (durable rules). This is the role; the separate `task` argument carries what to do right now. Give each child instructions or appendSystemPrompt; systemPrompt explicitly replaces native defaults."
|
|
4608
4576
|
},
|
|
4609
4577
|
{
|
|
4610
4578
|
name: "tools",
|
|
@@ -4702,12 +4670,15 @@ let spawnProfileArgCache;
|
|
|
4702
4670
|
* keeps the conversion total: the canonical schema contains transforms with no JSON Schema form,
|
|
4703
4671
|
* and zod's default is to throw on them, which would leave the tool with no published shape. */
|
|
4704
4672
|
function spawnProfileArg() {
|
|
4705
|
-
if (!spawnProfileArgCache)
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4673
|
+
if (!spawnProfileArgCache) {
|
|
4674
|
+
const canonical = agentProfileSchema.toJSONSchema({
|
|
4675
|
+
metadata: registry(),
|
|
4676
|
+
io: "input",
|
|
4677
|
+
target: "draft-07",
|
|
4678
|
+
unrepresentable: "any"
|
|
4679
|
+
});
|
|
4680
|
+
spawnProfileArgCache = detachedFrozen(deriveSpawnProfileArg(canonical.properties));
|
|
4681
|
+
}
|
|
4711
4682
|
return spawnProfileArgCache;
|
|
4712
4683
|
}
|
|
4713
4684
|
/** `spawn_worker`'s `profile` argument when the run has a profiles table: one of the table's names,
|
|
@@ -4737,8 +4708,7 @@ function profileTableRefusal(table, profile) {
|
|
|
4737
4708
|
if (typeof name !== "string" || !table.has(name)) return void 0;
|
|
4738
4709
|
return `profile.name ${JSON.stringify(name)} is a profiles-table entry: pass profile: ${JSON.stringify(name)} to run that exact profile, or give the profile you wrote another name`;
|
|
4739
4710
|
}
|
|
4740
|
-
|
|
4741
|
-
//#region src/mcp/tools/worker-output.ts
|
|
4711
|
+
// src/mcp/tools/worker-output.ts
|
|
4742
4712
|
const WORKER_OUTPUT_PAGE_CHARS = 16384;
|
|
4743
4713
|
function workerOutputReadOptions(raw) {
|
|
4744
4714
|
const offset = raw.outputOffset ?? 0;
|
|
@@ -4841,8 +4811,7 @@ function createWorkerOutputReader(blobs) {
|
|
|
4841
4811
|
}
|
|
4842
4812
|
};
|
|
4843
4813
|
}
|
|
4844
|
-
|
|
4845
|
-
//#region src/mcp/tools/coordination-worker-tools.ts
|
|
4814
|
+
// src/mcp/tools/coordination-worker-tools.ts
|
|
4846
4815
|
function createWorkerTools(ctx) {
|
|
4847
4816
|
return [
|
|
4848
4817
|
spawnWorkerTool(ctx),
|
|
@@ -5048,6 +5017,7 @@ function observeTree({ opts, redactJournalEvent }) {
|
|
|
5048
5017
|
parent: node.parent,
|
|
5049
5018
|
label: node.label,
|
|
5050
5019
|
status: node.status,
|
|
5020
|
+
...node.failure === void 0 ? {} : { failure: node.failure },
|
|
5051
5021
|
runtime: node.runtime,
|
|
5052
5022
|
spawnedAt: node.spawnedAt,
|
|
5053
5023
|
settledAt: node.settledAt
|
|
@@ -5065,6 +5035,7 @@ function observeEvents({ opts, redactJournalEvent }, args, eventCursor) {
|
|
|
5065
5035
|
label: node.label,
|
|
5066
5036
|
status: node.status,
|
|
5067
5037
|
runtime: node.runtime,
|
|
5038
|
+
...node.failure === void 0 ? {} : { failure: node.failure },
|
|
5068
5039
|
events: opts.scope.observeEvents?.(id, eventCursor) ?? {
|
|
5069
5040
|
status: "unavailable",
|
|
5070
5041
|
reason: "not-captured"
|
|
@@ -5199,8 +5170,7 @@ function cancelWorkerTool({ opts, spawn, workers }) {
|
|
|
5199
5170
|
}
|
|
5200
5171
|
};
|
|
5201
5172
|
}
|
|
5202
|
-
|
|
5203
|
-
//#region src/mcp/tools/coordination-manager.ts
|
|
5173
|
+
// src/mcp/tools/coordination-manager.ts
|
|
5204
5174
|
/** Build the driver's MCP tools over a live scope. */
|
|
5205
5175
|
function createCoordinationTools(opts) {
|
|
5206
5176
|
return createCoordinationToolsForManager(opts);
|
|
@@ -5610,7 +5580,6 @@ function createResumeReplay({ opts, bus, ledger, analysis, projectSettled }) {
|
|
|
5610
5580
|
return readyInFlight;
|
|
5611
5581
|
};
|
|
5612
5582
|
}
|
|
5613
|
-
|
|
5614
|
-
export { createEventBus as a, budgetOverspendText as c, safeJsonText as d, createFileRunContext as f, foldCoordinationRecords as g, FileCoordinationLog as h, watchTrace as i, normalizeAnalyzeOnSettle as l, withRunContext as m, createCoordinationToolsForManager as n, createCancelAcknowledger as o, createInMemoryRunContext as p, defaultToolDetectors as r, createSteerAcknowledger as s, createCoordinationTools as t, coordinationVerbNames as u };
|
|
5583
|
+
export { FileCoordinationLog as _, downMessageRefusalReasons as a, createCancelAcknowledger as c, normalizeAnalyzeOnSettle as d, coordinationVerbNames as f, withRunContext as g, createInMemoryRunContext as h, watchTrace as i, createSteerAcknowledger as l, createFileRunContext as m, createCoordinationToolsForManager as n, resolveJsonPointer as o, safeJsonText as p, defaultToolDetectors as r, createEventBus as s, createCoordinationTools as t, budgetOverspendText as u, foldCoordinationRecords as v };
|
|
5615
5584
|
|
|
5616
|
-
//# sourceMappingURL=coordination-manager-
|
|
5585
|
+
//# sourceMappingURL=coordination-manager-B7QadgrI.js.map
|