@tangle-network/agent-runtime 0.344.0 → 0.348.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-C5rFWXGj.js → activation-BEGalhOL.js} +2 -2
- package/dist/{activation-C5rFWXGj.js.map → activation-BEGalhOL.js.map} +1 -1
- package/dist/{activation-CGtGr0qu.d.ts → activation-NQZP_mdI.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -3
- package/dist/{coordination-manager-T98ZbsEt.js → coordination-manager-Bm6leXc6.js} +22 -19
- package/dist/coordination-manager-Bm6leXc6.js.map +1 -0
- package/dist/{delegate-CjdtLf1v.js → delegate-Cp5-PsaX.js} +2 -2
- package/dist/{delegate-CjdtLf1v.js.map → delegate-Cp5-PsaX.js.map} +1 -1
- package/dist/durable.d.ts +7 -2
- package/dist/durable.js +127 -115
- package/dist/durable.js.map +1 -1
- package/dist/{graph-kgzTaNMA.js → graph-CE_pzU31.js} +5 -4
- package/dist/graph-CE_pzU31.js.map +1 -0
- package/dist/{improve-DevAd83a.js → improve-wT11zteg.js} +6 -6
- package/dist/{improve-DevAd83a.js.map → improve-wT11zteg.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +11 -11
- package/dist/{loop-runner-DsVqEv8O.d.ts → loop-runner-CY5HHhtR.d.ts} +2 -2
- package/dist/{loop-runner-BM509Zmp.js → loop-runner-CZzeeJTG.js} +2 -2
- package/dist/{loop-runner-BM509Zmp.js.map → loop-runner-CZzeeJTG.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +5 -5
- package/dist/mcp/index.js.map +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-CysVhSqV.js → provision-supervisor-CC0HdOHo.js} +5 -5
- package/dist/{provision-supervisor-CysVhSqV.js.map → provision-supervisor-CC0HdOHo.js.map} +1 -1
- package/dist/{durable-file-DLcrzrjL.js → record-events-D93DkpAx.js} +100 -3
- package/dist/record-events-D93DkpAx.js.map +1 -0
- package/dist/{run-cancellation-CEDiqfhC.js → run-cancellation-CzFhQGMa.js} +11 -9
- package/dist/run-cancellation-CzFhQGMa.js.map +1 -0
- package/dist/{runtime-B_93oWEv.js → runtime-B_40dXlF.js} +259 -51
- package/dist/runtime-B_40dXlF.js.map +1 -0
- package/dist/{search-executor-t05_9Wwk.js → search-executor-COd2F2wp.js} +2 -2
- package/dist/{search-executor-t05_9Wwk.js.map → search-executor-COd2F2wp.js.map} +1 -1
- package/dist/{server-DjrVWzH2.js → server-BGB4R4wQ.js} +3 -3
- package/dist/{server-DjrVWzH2.js.map → server-BGB4R4wQ.js.map} +1 -1
- package/dist/{structural-rollout-CpJknIaL.js → structural-rollout-Wl_rCuzM.js} +2 -2
- package/dist/{structural-rollout-CpJknIaL.js.map → structural-rollout-Wl_rCuzM.js.map} +1 -1
- package/dist/{supervise-BuVVC7Bl.js → supervise-BUOeThuB.js} +122 -63
- package/dist/supervise-BUOeThuB.js.map +1 -0
- package/dist/{supervisor-D3M9ab1v.js → supervisor-DDy0aEtR.js} +438 -170
- package/dist/supervisor-DDy0aEtR.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/{top-snapshot-BGYI6G6K.js → top-snapshot-CflmaDgk.js} +6 -4
- package/dist/top-snapshot-CflmaDgk.js.map +1 -0
- package/dist/tui/bin.js +2 -2
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +2 -2
- package/dist/{types-DztCeYd6.d.ts → types-hc4cmSc7.d.ts} +92 -11
- package/package.json +11 -11
- package/skills/agent-graphs/SKILL.md +38 -2
- package/dist/coordination-manager-T98ZbsEt.js.map +0 -1
- package/dist/durable-file-DLcrzrjL.js.map +0 -1
- package/dist/graph-kgzTaNMA.js.map +0 -1
- package/dist/run-cancellation-CEDiqfhC.js.map +0 -1
- package/dist/runtime-B_93oWEv.js.map +0 -1
- package/dist/supervise-BuVVC7Bl.js.map +0 -1
- package/dist/supervisor-D3M9ab1v.js.map +0 -1
- package/dist/top-snapshot-BGYI6G6K.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as captureRunWriteContext, t as spawnJournalRecordEvents } from "./record-events-D93DkpAx.js";
|
|
2
|
+
import { $ as resolveSpawnResourcePaths, Ct as readCommittedJsonLines, Dt as createExecutorRegistry, Ei as settlementFailureCause, Fn as INBOX_RECEIPT_KEY, G as meterRuntimeOwnedAccounting, Hn as createPeerMailbox, Li as detachedFrozen, R as runtimeGraphMetadataKey, S as workerTraceAnalysisStore, Vi as errMessage, Xi as resolveRedactor, Xn as isLiveNodeStatus, Zn as isTerminalNodeStatus, _ as withDriverExecutor, _t as InMemorySpawnJournal, dr as CheckUnavailableError, gt as InMemoryResultBlobStore, k as FileSpawnJournal, qi as assertValidBudget, vt as FileResultBlobStore, x as parseWorkerToolTraceArtifact, xr as failedItems, yr as checkVerdictOf, yt as appendCommittedJsonLine, zi as contentAddress } from "./supervisor-DDy0aEtR.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-CzFhQGMa.js";
|
|
3
4
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest } from "@tangle-network/agent-interface";
|
|
4
5
|
import { argHash, errorStreakDetector, observeAll, repeatedActionDetector } from "@tangle-network/agent-eval";
|
|
5
6
|
import { registry } from "zod";
|
|
@@ -32,13 +33,14 @@ function persisted(event) {
|
|
|
32
33
|
/** FS-backed `CoordinationLog`: append-only JSONL, fsynced per record. */
|
|
33
34
|
var FileCoordinationLog = class {
|
|
34
35
|
path;
|
|
36
|
+
writeContext = captureRunWriteContext();
|
|
35
37
|
appendTail = Promise.resolve();
|
|
36
38
|
constructor(path) {
|
|
37
39
|
this.path = path;
|
|
38
40
|
}
|
|
39
41
|
async append(runId, record, ownerId) {
|
|
40
42
|
if (!persisted(record.event)) return;
|
|
41
|
-
const append = this.appendTail.then(() => this.appendRecord(runId, record, ownerId));
|
|
43
|
+
const append = this.appendTail.then(() => this.writeContext(() => this.appendRecord(runId, record, ownerId)));
|
|
42
44
|
this.appendTail = append.catch(() => void 0);
|
|
43
45
|
return append;
|
|
44
46
|
}
|
|
@@ -173,7 +175,7 @@ function createInMemoryRunContext(opts = {}) {
|
|
|
173
175
|
* resumes when it is re-run with the SAME `runId` and the SAME `dir`: the committed children come
|
|
174
176
|
* back on `Scope.resume` (rehydrated by `replaySpawnTree`) instead of being re-executed.
|
|
175
177
|
*
|
|
176
|
-
* Layout: `${dir}/spawn-journal.jsonl` (
|
|
178
|
+
* Layout: `${dir}/spawn-journal.jsonl` (single-event or atomic-group JSONL records), `${dir}/blobs/` (one
|
|
177
179
|
* content-addressed JSON file per settled result), and `${dir}/coordination-log.jsonl`
|
|
178
180
|
* (questions, findings, answer decisions, and authorized continuation receipts retained as
|
|
179
181
|
* evidence). The directory is created on first write.
|
|
@@ -640,8 +642,9 @@ function createSteerAcknowledger(deps) {
|
|
|
640
642
|
});
|
|
641
643
|
return { async pass(phase) {
|
|
642
644
|
for (const request of readWorkerSteerRequests(deps.dir)) {
|
|
643
|
-
if (phase
|
|
645
|
+
if (phase !== "final" && deps.signal?.aborted) return;
|
|
644
646
|
const rootRequest = request.worker === deps.ownerId && deps.deliverRoot !== void 0;
|
|
647
|
+
if (phase === "boundary" && !rootRequest) continue;
|
|
645
648
|
if (!rootRequest && !isDirectChildNodeId(deps, request.worker)) continue;
|
|
646
649
|
const queued = awaiting.get(request.operationId);
|
|
647
650
|
if (phase === "final" && queued !== void 0) {
|
|
@@ -954,18 +957,15 @@ function terminatedDescendants(dir, nodeId, sinceIso) {
|
|
|
954
957
|
for (const line of raw.split("\n")) {
|
|
955
958
|
const trimmed = line.trim();
|
|
956
959
|
if (!trimmed) continue;
|
|
957
|
-
let parsed;
|
|
958
960
|
try {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
if (typeof event.at !== "string" || event.at < sinceIso) continue;
|
|
968
|
-
ids.add(event.id);
|
|
961
|
+
for (const event of spawnJournalRecordEvents(JSON.parse(trimmed))) {
|
|
962
|
+
if (event === void 0) continue;
|
|
963
|
+
if (!(event.kind === "settled" && event.status === "down" || event.kind === "cancelled")) continue;
|
|
964
|
+
if (typeof event.id !== "string" || !event.id.startsWith(prefix)) continue;
|
|
965
|
+
if (typeof event.at !== "string" || event.at < sinceIso) continue;
|
|
966
|
+
ids.add(event.id);
|
|
967
|
+
}
|
|
968
|
+
} catch {}
|
|
969
969
|
}
|
|
970
970
|
return [...ids].sort();
|
|
971
971
|
}
|
|
@@ -2435,9 +2435,12 @@ async function settledWithoutDrain({ state, settlements }) {
|
|
|
2435
2435
|
});
|
|
2436
2436
|
await state.inFlightDrain;
|
|
2437
2437
|
}
|
|
2438
|
-
function hasOpenWork(env) {
|
|
2438
|
+
function hasOpenWork(env, options) {
|
|
2439
2439
|
const { running, unqueued, queued } = env.workers.openWork();
|
|
2440
|
-
|
|
2440
|
+
const includeSettled = options?.includeSettled !== false;
|
|
2441
|
+
const queuedWork = includeSettled ? queued.length > 0 : queued.some((record) => record.event.type !== "settled");
|
|
2442
|
+
const pending = includeSettled ? env.bus.pending(wakeEventKinds) > 0 : env.bus.queued([...wakeEventKinds, "question"]).some((record) => record.event.type !== "settled");
|
|
2443
|
+
return running.length > 0 || unqueued.length > 0 || queuedWork || pending || env.openReceiptCount() > 0 || env.leadPublishing() > 0 || env.settlements.isBusy();
|
|
2441
2444
|
}
|
|
2442
2445
|
function liveWorkersProgressing({ workers }) {
|
|
2443
2446
|
const running = workers.openWork().running;
|
|
@@ -5610,4 +5613,4 @@ function createResumeReplay({ opts, bus, ledger, analysis, projectSettled }) {
|
|
|
5610
5613
|
//#endregion
|
|
5611
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 };
|
|
5612
5615
|
|
|
5613
|
-
//# sourceMappingURL=coordination-manager-
|
|
5616
|
+
//# sourceMappingURL=coordination-manager-Bm6leXc6.js.map
|