@tangle-network/agent-runtime 8.0.1 → 9.0.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/CHANGELOG.md +32 -0
- package/dist/{activation-8AdN-3r4.js → activation-BrBDs0Yj.js} +3 -3
- package/dist/{activation-8AdN-3r4.js.map → activation-BrBDs0Yj.js.map} +1 -1
- package/dist/{activation-xxvLF1-1.d.ts → activation-Cvw_7nrn.d.ts} +2 -2
- package/dist/agent.d.ts +3 -3
- package/dist/agent.js +2 -2
- package/dist/agent.js.map +1 -1
- package/dist/candidate-execution/index.js +2 -2
- package/dist/{continuation-CIyKnS1Q.js → continuation-DDPfLw2w.js} +2 -2
- package/dist/{continuation-CIyKnS1Q.js.map → continuation-DDPfLw2w.js.map} +1 -1
- package/dist/{coordination-manager-DAGPerJy.js → coordination-manager-DKmQGzBB.js} +9 -10
- package/dist/coordination-manager-DKmQGzBB.js.map +1 -0
- package/dist/{delegate-CoaNr0hO.js → delegate-eayHBLHB.js} +2 -2
- package/dist/{delegate-CoaNr0hO.js.map → delegate-eayHBLHB.js.map} +1 -1
- package/dist/durable.d.ts +33 -2
- package/dist/durable.js +75 -14
- package/dist/durable.js.map +1 -1
- package/dist/{graph-pFTeNZ-G.js → graph-Cdhyxi8E.js} +10 -10
- package/dist/graph-Cdhyxi8E.js.map +1 -0
- package/dist/{graph-registry-czAwYwNj.js → graph-registry-D3cY0BJU.js} +3 -3
- package/dist/{graph-registry-czAwYwNj.js.map → graph-registry-D3cY0BJU.js.map} +1 -1
- package/dist/{graph-registry-uTIyyy7A.js → graph-registry-DTeb6qhB.js} +1 -1
- package/dist/{improve-I43jex8v.js → improve-CnTEGkF6.js} +6 -6
- package/dist/{improve-I43jex8v.js.map → improve-CnTEGkF6.js.map} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +12 -12
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +6 -6
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +15 -15
- package/dist/{loop-runner-BGwhcn1p.d.ts → loop-runner-Bd9Ieh5w.d.ts} +2 -2
- package/dist/{loop-runner-BN4KozR0.js → loop-runner-CGt9nTw7.js} +3 -3
- package/dist/{loop-runner-BN4KozR0.js.map → loop-runner-CGt9nTw7.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 +6 -6
- package/dist/{prepare-BnF8nGIg.js → prepare-D7WwIddG.js} +2 -2
- package/dist/{prepare-BnF8nGIg.js.map → prepare-D7WwIddG.js.map} +1 -1
- package/dist/{profile-CD25rTJF.js → profile-BT0X-dm5.js} +2 -2
- package/dist/{profile-CD25rTJF.js.map → profile-BT0X-dm5.js.map} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-DvzayGpe.js → provision-supervisor-B-ULubUf.js} +6 -6
- package/dist/{provision-supervisor-DvzayGpe.js.map → provision-supervisor-B-ULubUf.js.map} +1 -1
- package/dist/{run-cancellation-C5__aBKW.js → run-cancellation-DZn4OSl8.js} +2 -2
- package/dist/{run-cancellation-C5__aBKW.js.map → run-cancellation-DZn4OSl8.js.map} +1 -1
- package/dist/{run-state-CJAaxqfp.js → run-state-nbF5NNGy.js} +6 -6
- package/dist/{run-state-CJAaxqfp.js.map → run-state-nbF5NNGy.js.map} +1 -1
- package/dist/{runtime-CuwHe8_K.js → runtime-CPL2lhgf.js} +98 -30
- package/dist/runtime-CPL2lhgf.js.map +1 -0
- package/dist/{search-executor-DAjm-NlG.js → search-executor-2xqDTDNO.js} +3 -3
- package/dist/{search-executor-DAjm-NlG.js.map → search-executor-2xqDTDNO.js.map} +1 -1
- package/dist/{server-BUpNUn5D.js → server-DHZq2AG7.js} +3 -3
- package/dist/{server-BUpNUn5D.js.map → server-DHZq2AG7.js.map} +1 -1
- package/dist/{settle-record-CeBdBuxP.js → settle-record-B95oiypS.js} +3 -3
- package/dist/{settle-record-CeBdBuxP.js.map → settle-record-B95oiypS.js.map} +1 -1
- package/dist/{structural-rollout-CqxBKxKY.js → structural-rollout-BHNqBUV0.js} +8 -5
- package/dist/structural-rollout-BHNqBUV0.js.map +1 -0
- package/dist/{supervise-Cdqj_oe4.js → supervise-DkhIZyD_.js} +16 -16
- package/dist/supervise-DkhIZyD_.js.map +1 -0
- package/dist/{supervision-discovery-CW-ildZ-.js → supervision-discovery-DUpm_6nQ.js} +2 -2
- package/dist/{supervision-discovery-CW-ildZ-.js.map → supervision-discovery-DUpm_6nQ.js.map} +1 -1
- package/dist/{supervisor-D-eT-6Tu.js → supervisor-BhcXPxAk.js} +180 -95
- package/dist/supervisor-BhcXPxAk.js.map +1 -0
- package/dist/{supervisor-accounting-Ow6CChpB.js → supervisor-accounting-BB22j3hu.js} +46 -31
- package/dist/supervisor-accounting-BB22j3hu.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +12 -12
- package/dist/{top-web-BuYMkJN4.js → top-web-DsFGyUlS.js} +5 -5
- package/dist/{top-web-BuYMkJN4.js.map → top-web-DsFGyUlS.js.map} +1 -1
- package/dist/tui/bin.js +3 -3
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +2 -2
- package/dist/{types-C_qbnw9N.d.ts → types-CwGD-823.d.ts} +43 -32
- package/dist/viewer/styles.css +29 -237
- package/dist/viewer/workspace-viewer.js +2 -2
- package/package.json +11 -11
- package/dist/coordination-manager-DAGPerJy.js.map +0 -1
- package/dist/graph-pFTeNZ-G.js.map +0 -1
- package/dist/runtime-CuwHe8_K.js.map +0 -1
- package/dist/structural-rollout-CqxBKxKY.js.map +0 -1
- package/dist/supervise-Cdqj_oe4.js.map +0 -1
- package/dist/supervisor-D-eT-6Tu.js.map +0 -1
- package/dist/supervisor-accounting-Ow6CChpB.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { E as writeWorkerCancellation, F as parseWorkerToolTraceArtifact, I as workerTraceAnalysisStore, K as spawnJournalRecordEvents, O as writeWorkerSteerAcknowledgement, Rt as runtimeGraphMetadataKey, S as workerCancelRequestsFile, St as resolveSpawnResourcePaths, T as workerSteerRequestsDir, W as FileSpawnJournal, _ as readWorkerSteerAcknowledgement,
|
|
1
|
+
import { E as writeWorkerCancellation, F as parseWorkerToolTraceArtifact, I as workerTraceAnalysisStore, K as spawnJournalRecordEvents, O as writeWorkerSteerAcknowledgement, Rt as runtimeGraphMetadataKey, S as workerCancelRequestsFile, St as resolveSpawnResourcePaths, T as workerSteerRequestsDir, W as FileSpawnJournal, _ as readWorkerSteerAcknowledgement, an as FileResultBlobStore, d as claimWorkerSteerDelivery, fr as isLiveNodeStatus, g as readWorkerCancellation, h as readWorkerCancelRequests, it as meterRuntimeOwnedAccounting, pr as isTerminalNodeStatus, v as readWorkerSteerRequests } from "./supervisor-accounting-BB22j3hu.js";
|
|
2
2
|
import { m as ValidationError } from "./errors-DG8yufqX.js";
|
|
3
3
|
import { M as contentAddress, et as assertValidBudget, o as settlementFailureCause } from "./failure-cause-CVB-YE88.js";
|
|
4
4
|
import { a as errMessage, f as resolveRedactor, t as detachedFrozen } from "./snapshot-BKI_w3JD.js";
|
|
5
|
-
import {
|
|
6
|
-
import { i as checkVerdictOf, o as failedItems } from "./continuation-
|
|
7
|
-
import { c as writeRunCancellation, i as readRunCancellation, r as readRunCancelRequest, t as applyRunCancellation, v as FileCoordinationLog } from "./run-cancellation-
|
|
5
|
+
import { X as INBOX_RECEIPT_KEY, _t as CheckUnavailableError, b as InMemorySpawnJournal, rt as createPeerMailbox, v as withDriverExecutor, x as createExecutorRegistry, y as InMemoryResultBlobStore } from "./supervisor-BhcXPxAk.js";
|
|
6
|
+
import { i as checkVerdictOf, o as failedItems } from "./continuation-DDPfLw2w.js";
|
|
7
|
+
import { c as writeRunCancellation, i as readRunCancellation, r as readRunCancelRequest, t as applyRunCancellation, v as FileCoordinationLog } from "./run-cancellation-DZn4OSl8.js";
|
|
8
8
|
import { a as admitRuntimeSpawn, i as workerSettlement, n as resolveJsonPointer, o as safeJsonText, r as textBytes, t as createMapRouting } from "./coordination-map-routing-XZXTlCmn.js";
|
|
9
9
|
import { ResourceRequestSchema, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest } from "@tangle-network/agent-interface";
|
|
10
10
|
import { argHash, errorStreakDetector, observeAll, repeatedActionDetector } from "@tangle-network/agent-eval";
|
|
@@ -1557,7 +1557,7 @@ async function runWithin(work, ms, message) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
// src/mcp/tools/coordination-audit-tools.ts
|
|
1560
|
-
function createAuditTools({ opts,
|
|
1560
|
+
function createAuditTools({ opts, blockedReports, readJournal }) {
|
|
1561
1561
|
return [{
|
|
1562
1562
|
name: "report_blocked",
|
|
1563
1563
|
description: [
|
|
@@ -1599,7 +1599,7 @@ function createAuditTools({ opts, tools, blockedReports, readJournal }) {
|
|
|
1599
1599
|
error: "unprobeable",
|
|
1600
1600
|
reason: `${bare} changes the run, so the coordinator does not call it for you`
|
|
1601
1601
|
};
|
|
1602
|
-
const target = opts.resolveProbeTool?.(bare)
|
|
1602
|
+
const target = opts.resolveProbeTool?.(bare);
|
|
1603
1603
|
if (target === void 0) return {
|
|
1604
1604
|
blocked: false,
|
|
1605
1605
|
error: "unknown-tool",
|
|
@@ -4406,7 +4406,7 @@ function spawnWorkerTool(ctx) {
|
|
|
4406
4406
|
const { profileTable } = ctx;
|
|
4407
4407
|
return {
|
|
4408
4408
|
name: "spawn_worker",
|
|
4409
|
-
description: "Start a worker the driver will drive. `profile` is the worker or another driver; `task` is what it should do. Reserves budget from the conserved pool and fails closed. Pass an optional `budget` (per-field) to give a sub-task more or less than the default — it merges over the per-worker default; the conserved pool is still the hard fence. Each worker reserves only the channels capped by the pool. workerSlots sets concurrency. A funded worker waits with `status: \"queued\"` when every slot is busy and starts when one frees. A new worker whose budget cannot fit is refused immediately. Wait for settlements or request a smaller allocation before trying again. End your turn to be woken with results. Pass a `key` naming the assignment to make it run-once ACROSS restarts: a key that already completed returns the finished result (`resumed: \"completed\"` — no work re-runs, nothing is spent). A keyed worker that settled with a `budgetStop` keeps its session for a while: spawn the same key with a larger `budget` and a new worker continues that same session where it stopped (`resumed: \"continued\"`, `priorWorkerId`), or cancel_worker the stopped worker to release it. A key whose prior attempt failed (`down`) spawns fresh and says so (`resumed: \"retried\"`), and a key the process died with IN FLIGHT retries under the same key when the executor provably died with the process (an inline worker — the same `resumed: \"retried\"`, naming the interruption). A key with no terminal receipt whose execution may still exist elsewhere (sandbox, CLI bridge, router) is refused (`error: \"in-doubt\"`) until its exact prior execution is recovered
|
|
4409
|
+
description: "Start a worker the driver will drive. `profile` is the worker or another driver; `task` is what it should do. Reserves budget from the conserved pool and fails closed. Pass an optional `budget` (per-field) to give a sub-task more or less than the default — it merges over the per-worker default; the conserved pool is still the hard fence. Each worker reserves only the channels capped by the pool. workerSlots sets concurrency. A funded worker waits with `status: \"queued\"` when every slot is busy and starts when one frees. A new worker whose budget cannot fit is refused immediately. Wait for settlements or request a smaller allocation before trying again. End your turn to be woken with results. Pass a `key` naming the assignment to make it run-once ACROSS restarts: a key that already completed returns the finished result (`resumed: \"completed\"` — no work re-runs, nothing is spent). A keyed worker that settled with a `budgetStop` keeps its session for a while: spawn the same key with a larger `budget` and a new worker continues that same session where it stopped (`resumed: \"continued\"`, `priorWorkerId`), or cancel_worker the stopped worker to release it. A key whose prior attempt failed (`down`) spawns fresh and says so (`resumed: \"retried\"`), and a key the process died with IN FLIGHT retries under the same key when the executor provably died with the process (an inline worker — the same `resumed: \"retried\"`, naming the interruption). A key with no terminal receipt whose execution may still exist elsewhere (sandbox, CLI bridge, router) is refused (`error: \"in-doubt\"`) until its exact prior execution is recovered; the first spawn of a recovered key returns that worker (`resumed: \"recovered\"`), any other spawn of a key still running is refused (`error: \"duplicate-key\"`). Returns `freeSlots`: how many MORE workers start at once (`null` = no slot bound), and `queued`: how many of your workers wait for a slot. Parallel workers finish the run sooner than one at a time. An authored profile must be fully executable before it spawns: `harness`, `model.provider`, a concrete `model.default`, and no legacy `systemPrompt` — one refusal names every field still missing." + (profileTable === void 0 ? "" : " This run has a profiles table: pass `profile` as one of the table's names to run that exact profile, or write a new profile under a name the table does not hold."),
|
|
4410
4410
|
inputSchema: {
|
|
4411
4411
|
type: "object",
|
|
4412
4412
|
properties: {
|
|
@@ -4539,7 +4539,7 @@ async function spawnWorkerHandler(ctx, raw) {
|
|
|
4539
4539
|
function observeAgentTool(ctx) {
|
|
4540
4540
|
return {
|
|
4541
4541
|
name: "observe_agent",
|
|
4542
|
-
description: "Inspect a worker WHILE IT RUNS, not only after it finishes: status, spend so far, and `progress` — how long since it last did anything (`idleMs`), whether that counts as stalled, how many turns it has taken, the last tools/files it touched (`recentActivity`), what its executor CHANGED about the profile you gave it (`derived` — an MCP config it materialized, an extension it had to add), whether a steer can
|
|
4542
|
+
description: "Inspect a worker WHILE IT RUNS, not only after it finishes: status, spend so far, and `progress` — how long since it last did anything (`idleMs`), whether that counts as stalled, how many turns it has taken, the last tools/files it touched (`recentActivity`), what its executor CHANGED about the profile you gave it (`derived` — an MCP config it materialized, an extension it had to add), whether a steer can reach it (the `steerable` field, not a tool), and how many steers it has not yet read (`pendingMessages`). For a worker that leads its own team, `progress.team` counts the agents below it (working, queued, done, down) and its idle clock reads the newest activity anywhere in that team, so a lead whose workers are busy is not stalled. A queued worker waits for a worker slot and is never stalled. A completed worker reports its terminal status and output before your next wake. `settlementPending` means its event has not yet been delivered. The output is what the worker submitted, often a plain string, else its provider result. Omit `outputPath` to read it whole; [\"content\"] selects a provider result without its events. Large outputs return a bounded JSON `outputPage`; repeat with `outputOffset: outputPage.nextOffset` until it is null, concatenate page text, then parse the JSON. Offsets and limits count UTF-16 characters. The full artifact stays retained; an outRef is a content address, not a workspace path. Use this BEFORE steer_agent: a steer is only worth sending when the progress says the worker is on the wrong path or has stopped making any.",
|
|
4543
4543
|
inputSchema: {
|
|
4544
4544
|
type: "object",
|
|
4545
4545
|
properties: {
|
|
@@ -4950,7 +4950,6 @@ function assembleTools(parts) {
|
|
|
4950
4950
|
}),
|
|
4951
4951
|
...createAuditTools({
|
|
4952
4952
|
opts,
|
|
4953
|
-
tools: () => tools,
|
|
4954
4953
|
blockedReports: state.blockedReports,
|
|
4955
4954
|
readJournal: journal.readJournal
|
|
4956
4955
|
})
|
|
@@ -5233,4 +5232,4 @@ function createResumeReplay({ opts, bus, ledger, analysis, projectSettled }) {
|
|
|
5233
5232
|
}
|
|
5234
5233
|
export { downMessageRefusalReasons as a, createSteerAcknowledger as c, coordinationVerbNames as d, createFileRunContext as f, watchTrace as i, budgetOverspendText as l, withRunContext as m, createCoordinationToolsForManager as n, createEventBus as o, createInMemoryRunContext as p, defaultToolDetectors as r, createCancelAcknowledger as s, createCoordinationTools as t, normalizeAnalyzeOnSettle as u };
|
|
5235
5234
|
|
|
5236
|
-
//# sourceMappingURL=coordination-manager-
|
|
5235
|
+
//# sourceMappingURL=coordination-manager-DKmQGzBB.js.map
|