@tangle-network/agent-runtime 0.247.0 → 0.249.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-DizpINK3.d.ts → activation-CZz7kkgd.d.ts} +2 -2
- package/dist/{activation-DYqnl8zq.js → activation-ygjQvYwG.js} +32 -2
- package/dist/activation-ygjQvYwG.js.map +1 -0
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +1 -1
- package/dist/{coordination-driver-BV4AAUns.js → coordination-driver-B61Hh6B1.js} +142 -10
- package/dist/coordination-driver-B61Hh6B1.js.map +1 -0
- package/dist/{delegate-DQAzB5Xv.js → delegate-A6EYmMxy.js} +2 -2
- package/dist/{delegate-DQAzB5Xv.js.map → delegate-A6EYmMxy.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +1 -1
- package/dist/{graph-DcBmMLIp.js → graph-CXwmMtTx.js} +2 -2
- package/dist/{graph-DcBmMLIp.js.map → graph-CXwmMtTx.js.map} +1 -1
- package/dist/{index-DLzlXwr6.d.ts → index-BV5EmjCL.d.ts} +8 -5
- package/dist/index.d.ts +8 -6
- package/dist/index.js +27 -44
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +18 -11
- package/dist/intelligence.js +88 -33
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +6 -6
- package/dist/{loop-runner-bin-iqq1azfy.js → loop-runner-bin-C1O16oIq.js} +2 -2
- package/dist/{loop-runner-bin-iqq1azfy.js.map → loop-runner-bin-C1O16oIq.js.map} +1 -1
- package/dist/{loop-runner-bin-HbMECmxT.d.ts → loop-runner-bin-q0akFXYX.d.ts} +3 -3
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/index.js +3 -3
- package/dist/{openai-tools-DvLk_Ddg.d.ts → openai-tools-zrajPyXe.d.ts} +2 -2
- package/dist/profiles.d.ts +2 -2
- package/dist/{provision-supervisor-BgQx2Avp.js → provision-supervisor-D7gC-Veu.js} +2 -2
- package/dist/{provision-supervisor-BgQx2Avp.js.map → provision-supervisor-D7gC-Veu.js.map} +1 -1
- package/dist/run-layout-hKAJGF4g.js.map +1 -1
- package/dist/{runtime-HpTXhB3g.js → runtime-BVZIbtyL.js} +6 -6
- package/dist/{runtime-HpTXhB3g.js.map → runtime-BVZIbtyL.js.map} +1 -1
- package/dist/{server-OOE7mXrN.js → server-DHS1Gxt2.js} +2 -2
- package/dist/{server-OOE7mXrN.js.map → server-DHS1Gxt2.js.map} +1 -1
- package/dist/{stream-agent-turn-CcumM0Bu.d.ts → stream-agent-turn-D9IbZMys.d.ts} +2 -2
- package/dist/{substrate-CQ0hfewn.d.ts → substrate-Ctmos75o.d.ts} +2 -2
- package/dist/{supervise-DZEOpzRw.js → supervise-CnFk7_wb.js} +18 -4
- package/dist/supervise-CnFk7_wb.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +11 -11
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-BUhz284C.d.ts → types-BmxS-W-f.d.ts} +22 -11
- package/package.json +4 -4
- package/dist/activation-DYqnl8zq.js.map +0 -1
- package/dist/coordination-driver-BV4AAUns.js.map +0 -1
- package/dist/supervise-DZEOpzRw.js.map +0 -1
|
@@ -4,7 +4,7 @@ import { a as concreteProfileModel, c as profileModelExecutionSettings, d as age
|
|
|
4
4
|
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
5
5
|
import { n as assertNoSymlinkDescendant } from "./durable-file-DWQA4ooo.js";
|
|
6
6
|
import { n as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-x9NEhvHZ.js";
|
|
7
|
-
import { D as coordinationVerbNames, S as watchRunCancellation, c as createProgressTracker, d as progressStop, k as createCoordinationToolsForManager, n as createSteerAcknowledger, r as driverAgent, t as createCancelAcknowledger, v as createFileRunContext, w as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, x as applyRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-
|
|
7
|
+
import { D as coordinationVerbNames, S as watchRunCancellation, c as createProgressTracker, d as progressStop, k as createCoordinationToolsForManager, n as createSteerAcknowledger, r as driverAgent, t as createCancelAcknowledger, v as createFileRunContext, w as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, x as applyRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-B61Hh6B1.js";
|
|
8
8
|
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-hKAJGF4g.js";
|
|
9
9
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
10
10
|
import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -1389,7 +1389,8 @@ function observeWorkerControls(options) {
|
|
|
1389
1389
|
};
|
|
1390
1390
|
const steers = createSteerAcknowledger({
|
|
1391
1391
|
...deps,
|
|
1392
|
-
deliverRoot: options.deliverRoot
|
|
1392
|
+
deliverRoot: options.deliverRoot,
|
|
1393
|
+
deliverRootReady: options.deliverRootReady
|
|
1393
1394
|
});
|
|
1394
1395
|
const cancellations = createCancelAcknowledger(deps);
|
|
1395
1396
|
let active = true;
|
|
@@ -1717,6 +1718,9 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
1717
1718
|
const driveHarness = deps.driveHarness;
|
|
1718
1719
|
if (!driveHarness) throw new ValidationError(`supervisorAgent: profile.harness="${harness}" needs deps.driveHarness (how to run the harness with the coordination MCP mounted)`);
|
|
1719
1720
|
const deliver = driveHarness.deliver?.bind(driveHarness);
|
|
1721
|
+
const rawDeliverReady = driveHarness.deliverReady;
|
|
1722
|
+
if (rawDeliverReady !== void 0 && typeof rawDeliverReady !== "function") throw new ValidationError("supervisorAgent: driveHarness.deliverReady must be a function when provided");
|
|
1723
|
+
const deliverReady = rawDeliverReady?.bind(driveHarness);
|
|
1720
1724
|
const externalAgent = {
|
|
1721
1725
|
name,
|
|
1722
1726
|
...deliver ? { deliver(message) {
|
|
@@ -1732,6 +1736,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
1732
1736
|
const nodeObserver = bindSupervisorNodeObserver(context, observeNodeEvent, deps.onEvent);
|
|
1733
1737
|
const stopController = new AbortController();
|
|
1734
1738
|
const coordinationLifetime = linkAbort(scope.signal);
|
|
1739
|
+
let harnessInvocationActive = false;
|
|
1735
1740
|
const tracker = deps.stopRule ? createProgressTracker({ now: Date.now }) : void 0;
|
|
1736
1741
|
let progressStopReason;
|
|
1737
1742
|
let ledger;
|
|
@@ -1801,7 +1806,10 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
1801
1806
|
scope,
|
|
1802
1807
|
signal: coordinationLifetime.signal,
|
|
1803
1808
|
controlScope: deps.controlScope ?? "run",
|
|
1804
|
-
...deps.controlScope === "subtree" ? {} : {
|
|
1809
|
+
...deps.controlScope === "subtree" ? {} : {
|
|
1810
|
+
deliverRoot: (message) => deliver?.(message) ?? false,
|
|
1811
|
+
deliverRootReady: () => deliver === void 0 || harnessInvocationActive && (deliverReady === void 0 || deliverReady())
|
|
1812
|
+
},
|
|
1805
1813
|
onError: (error) => {
|
|
1806
1814
|
coordinationLifetime.abort(error);
|
|
1807
1815
|
stopController.abort(error);
|
|
@@ -1841,6 +1849,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
1841
1849
|
if (deps.controlDir !== void 0 && deps.abortRun !== void 0) applyRunCancellation(deps.controlDir, deps.abortRun, () => (/* @__PURE__ */ new Date()).toISOString());
|
|
1842
1850
|
scope.signal.throwIfAborted();
|
|
1843
1851
|
beginScopeOwnerAttempt(scope, attempt);
|
|
1852
|
+
harnessInvocationActive = true;
|
|
1844
1853
|
try {
|
|
1845
1854
|
await driveHarness({
|
|
1846
1855
|
profile: providerProfile,
|
|
@@ -1855,6 +1864,8 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
1855
1864
|
});
|
|
1856
1865
|
} catch (error) {
|
|
1857
1866
|
if (!mcp.submittedResult() && !mcp.isStopped()) throw error;
|
|
1867
|
+
} finally {
|
|
1868
|
+
harnessInvocationActive = false;
|
|
1858
1869
|
}
|
|
1859
1870
|
if (contractDeclared && !mcp.submittedResult()) {
|
|
1860
1871
|
await mcp.drainResolved();
|
|
@@ -2965,6 +2976,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
|
|
|
2965
2976
|
if (!deliver) return false;
|
|
2966
2977
|
return deliver.call(activeExecutor, message) !== false;
|
|
2967
2978
|
};
|
|
2979
|
+
drive.deliverReady = () => activeExecutor !== void 0;
|
|
2968
2980
|
drive.traceSource = () => activeExecutor?.traceSource?.();
|
|
2969
2981
|
drive.progress = () => activeExecutor?.progress?.();
|
|
2970
2982
|
return attestRuntimeOwnedScopeOwner(drive, ownerRuntime);
|
|
@@ -3442,6 +3454,8 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
3442
3454
|
const harness = rawHarness;
|
|
3443
3455
|
const deliver = harness.deliver;
|
|
3444
3456
|
if (deliver !== void 0 && typeof deliver !== "function") throw new ValidationError("supervise: driveHarness.deliver must be a function when provided");
|
|
3457
|
+
const deliverReady = harness.deliverReady;
|
|
3458
|
+
if (deliverReady !== void 0 && typeof deliverReady !== "function") throw new ValidationError("supervise: driveHarness.deliverReady must be a function when provided");
|
|
3445
3459
|
const claim = harnessClaims.get(harness);
|
|
3446
3460
|
const conflictingOwner = claim ? [...claim.owners].find((claimedOwner) => claimedOwner !== ownerId) : void 0;
|
|
3447
3461
|
const steerable = typeof deliver === "function";
|
|
@@ -3813,4 +3827,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
3813
3827
|
//#endregion
|
|
3814
3828
|
export { createSupervisorSpanRecorder as _, isPreSpawnExecutorFailure as a, mapExecutorResult as b, withWorkerSpawnRetry as c, resolveSupervisorProfile as d, supervisorAgent as f, readRootStreamReceipt as g, readRootStream as h, workerFromBackend as i, assertCoordinationBinding as l, ROOT_STREAM_FILE as m, supervise as n, resolveWorkerSpawnRetry as o, supervisorAgentWithTestBrain as p, superviseWithTestBrain as r, retryPreSpawnRefusals as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, coordinationProfileToolPrefix as u, serveCoordinationMcp as v, gateOnDeliverable as y };
|
|
3815
3829
|
|
|
3816
|
-
//# sourceMappingURL=supervise-
|
|
3830
|
+
//# sourceMappingURL=supervise-CnFk7_wb.js.map
|