@tangle-network/agent-runtime 0.247.0 → 0.252.0
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-DYqnl8zq.js → activation-BSLatbiJ.js} +34 -4
- package/dist/activation-BSLatbiJ.js.map +1 -0
- package/dist/{activation-DizpINK3.d.ts → activation-BykUtuec.d.ts} +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/bundle-DXrBPEFw.js +17 -0
- package/dist/bundle-DXrBPEFw.js.map +1 -0
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{coordination-driver-BV4AAUns.js → coordination-driver-QxitIuva.js} +162 -17
- package/dist/coordination-driver-QxitIuva.js.map +1 -0
- package/dist/{delegate-DQAzB5Xv.js → delegate-BB90iDo7.js} +2 -2
- package/dist/{delegate-DQAzB5Xv.js.map → delegate-BB90iDo7.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +2 -2
- package/dist/{graph-DcBmMLIp.js → graph-yC6wqOIt.js} +3 -3
- package/dist/{graph-DcBmMLIp.js.map → graph-yC6wqOIt.js.map} +1 -1
- package/dist/{improvement-cycle-B049YmQ8.js → improvement-cycle-on_u94aK.js} +5 -5
- package/dist/{improvement-cycle-B049YmQ8.js.map → improvement-cycle-on_u94aK.js.map} +1 -1
- package/dist/{index-DLzlXwr6.d.ts → index-DGWG7wSS.d.ts} +20 -9
- package/dist/index.d.ts +8 -6
- package/dist/index.js +32 -50
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +18 -11
- package/dist/intelligence.js +93 -38
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-HbMECmxT.d.ts → loop-runner-bin-CsVNUclF.d.ts} +3 -3
- package/dist/{loop-runner-bin-iqq1azfy.js → loop-runner-bin-PL0dItet.js} +3 -3
- package/dist/{loop-runner-bin-iqq1azfy.js.map → loop-runner-bin-PL0dItet.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 +5 -5
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-DvLk_Ddg.d.ts → openai-tools-zrajPyXe.d.ts} +2 -2
- package/dist/{prepare-CibQrhfi.js → prepare-RuaAclli.js} +8 -598
- package/dist/prepare-RuaAclli.js.map +1 -0
- package/dist/profiles.d.ts +2 -2
- package/dist/{protected-model-port-Dhdi5mDl.js → protected-model-port-BFhSgMAy.js} +3 -3
- package/dist/{protected-model-port-Dhdi5mDl.js.map → protected-model-port-BFhSgMAy.js.map} +1 -1
- package/dist/{protected-redaction-Fn1ETfJ-.js → protected-redaction--F3v1oo8.js} +3 -54
- package/dist/protected-redaction--F3v1oo8.js.map +1 -0
- package/dist/{provision-supervisor-BgQx2Avp.js → provision-supervisor-DsAhgOpn.js} +4 -4
- package/dist/{provision-supervisor-BgQx2Avp.js.map → provision-supervisor-DsAhgOpn.js.map} +1 -1
- package/dist/{run-layout-hKAJGF4g.js → run-layout-vwd4SwX_.js} +15 -9
- package/dist/run-layout-vwd4SwX_.js.map +1 -0
- package/dist/{runtime-HpTXhB3g.js → runtime-CMNTa7Rw.js} +11 -10
- package/dist/{runtime-HpTXhB3g.js.map → runtime-CMNTa7Rw.js.map} +1 -1
- package/dist/{server-OOE7mXrN.js → server-2fL_QElQ.js} +3 -3
- package/dist/{server-OOE7mXrN.js.map → server-2fL_QElQ.js.map} +1 -1
- package/dist/{stream-agent-turn-CcumM0Bu.d.ts → stream-agent-turn-oeWkjxMi.d.ts} +32 -5
- package/dist/{structural-rollout-z1A0okaB.js → structural-rollout-DRD-WnV-.js} +2 -2
- package/dist/{structural-rollout-z1A0okaB.js.map → structural-rollout-DRD-WnV-.js.map} +1 -1
- package/dist/{substrate-CQ0hfewn.d.ts → substrate-Ctmos75o.d.ts} +2 -2
- package/dist/{supervise-DZEOpzRw.js → supervise-BXzkqfTE.js} +25 -8
- package/dist/supervise-BXzkqfTE.js.map +1 -0
- package/dist/{supervisor-BIBWUFUr.js → supervisor-OJwKAnFd.js} +391 -187
- package/dist/supervisor-OJwKAnFd.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +14 -14
- package/dist/{top-app-d-bmwO7O.js → top-app-VAOrBskv.js} +2 -2
- package/dist/{top-app-d-bmwO7O.js.map → top-app-VAOrBskv.js.map} +1 -1
- package/dist/tui/bin.js +1 -1
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +2 -2
- package/dist/{types-BUhz284C.d.ts → types-BmxS-W-f.d.ts} +22 -11
- package/dist/workspace-archive-DQGFwvM6.js +1209 -0
- package/dist/workspace-archive-DQGFwvM6.js.map +1 -0
- package/package.json +4 -4
- package/dist/activation-DYqnl8zq.js.map +0 -1
- package/dist/coordination-driver-BV4AAUns.js.map +0 -1
- package/dist/prepare-CibQrhfi.js.map +0 -1
- package/dist/protected-redaction-Fn1ETfJ-.js.map +0 -1
- package/dist/run-layout-hKAJGF4g.js.map +0 -1
- package/dist/supervise-DZEOpzRw.js.map +0 -1
- package/dist/supervisor-BIBWUFUr.js.map +0 -1
- package/dist/workspace-archive-DSRT4Tro.js +0 -572
- package/dist/workspace-archive-DSRT4Tro.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ur as Driver, Vr as AgentRunSpec, hi as Validator, ui as OutputAdapter } from "./types-
|
|
1
|
+
import { Ur as Driver, Vr as AgentRunSpec, hi as Validator, ui as OutputAdapter } from "./types-BmxS-W-f.js";
|
|
2
2
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
3
3
|
//#region src/profiles/coder.d.ts
|
|
4
4
|
/**
|
|
@@ -281,4 +281,4 @@ interface UiFinding {
|
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
283
|
export { CoderTask as _, UiFindingSeverity as a, KnowledgeUpdate as c, ResearchSource as d, ResearchTask as f, researcherProfile as g, multiHarnessResearcherFanout as h, UiFindingScreenshot as i, MultiHarnessResearcherFanoutOptions as l, createResearcherValidator as m, UI_LENSES as n, UiLens as o, ResearcherProfileOptions as p, UiFinding as r, KnowledgeItem as s, UI_FINDING_SEVERITIES as t, ResearchOutput as u, coderTaskToPrompt as v };
|
|
284
|
-
//# sourceMappingURL=substrate-
|
|
284
|
+
//# sourceMappingURL=substrate-Ctmos75o.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $i as withBudgetResources, $n as contentAddress,
|
|
1
|
+
import { $i as withBudgetResources, $n as contentAddress, Br as promptControlProfileMaterialization, C as restoreScopeOwnerAcceptedExecution, Cn as routerBrain, F as prepareScopeRetainedOwnerTask, Fr as assertProfileMaterialization, Ft as newUsageTotals, Gn as linkAbort, Gr as renderUnsupported, I as scopeRetainedOwnerContext, Ii as addSpend, In as registerRetainedExecutorPreparation, Ir as controlProfileMaterialization, Ji as unmeteredSpend, Kn as runAbortable, L as scopeRetainedOwnerPriorSpend, Ln as retainedExecutorSeamKey, Lr as defineProfileMaterializationContract, Lt as spendFromUsageTotals, M as bindScopeRetainedOwnerEnvironmentId, Mt as assertValidBudget, N as bindScopeRetainedOwnerProvider, P as consumeScopeRetainedOwnerResult, Pt as meterUsageEvent, Qi as resourceTelemetry, Qr as readCommittedJsonLines, R as scopeRetainedOwnerResourceReader, Rr as fullProfileMaterialization, Rt as WORKER_TRACE_PROPAGATION, S as recordScopeOwnerMaterialization, Un as RunCancellationReason, Vr as promptModelProfileMaterialization, Wi as sleep, Xi as zeroSpend, Xr as isNoEntError, Yi as withTimeout, Yr as worktreeCliProfileMaterialization, Zi as addResourceSpend, Zr as prepareJsonlAppend, _ as beginScopeOwnerAttempt, aa as teardownExecutor, an as bridgeAdmissionRefusal, b as meterRuntimeOwnedAccounting, ci as providerAttemptEvidence, d as defaultUnmetContractSteer, di as runtimeOwnedExecutorExecutionBinding, dn as bridgeRuntimeAttachmentsKey, f as runDriverWithRetry, fi as runtimeOwnedExecutorMaterialization, fn as bridgeStopSignalKey, fr as generateSpanId, ft as snapshotExecutorConfig, gr as toOtelAttributes, h as isDriverSpec, hi as runtimeOwnedScopeOwnerRuntime, ii as inheritRuntimeOwnedExecutorAttestation, in as executorFailure, jn as resolveAgentEnvironmentProvider, l as HarnessTurnFailedError, li as recordRuntimeOwnedDriveHarnessProviderEvidence, lr as createOtelExporter, m as driverExecutorFactory, mi as runtimeOwnedPendingExecutorMaterialization, n as createSupervisor, o as runFinalizer, on as bridgeModelRouteRefusal, ot as bindReusableExecutorExecutionId, p as driverChild, pi as runtimeOwnedExecutorProviderEvidence, qr as unsupportedProfileDimensions, qt as createInbox, r as bestDelivered, ra as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, s as runTree, st as captureReusableExecutorConfig, t as createRootHandle, ti as attestRuntimeOwnedScopeOwner, tt as errMessage, ui as runtimeOwnedDriveHarnessProviderEvidence, ut as createExecutor, w as scopeOwnerExecutorNodeContext, x as meterRuntimeOwnedProviderAttempt, xi as detachedSnapshot, y as deriveNodeExecutionIdentity, z as scopeRetainedOwnerResult, zr as profileMaterializationAxes$1 } from "./supervisor-OJwKAnFd.js";
|
|
2
2
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
3
3
|
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, f as harnessRunsAgent, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile } from "./model-policy-BbSCSak0.js";
|
|
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-
|
|
8
|
-
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-
|
|
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-QxitIuva.js";
|
|
8
|
+
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-vwd4SwX_.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";
|
|
11
11
|
import { closeSync, constants, fsyncSync, openSync, writeSync } from "node:fs";
|
|
@@ -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);
|
|
@@ -3059,9 +3071,11 @@ function assertSuperviseOptionKeys(opts, context) {
|
|
|
3059
3071
|
function captureDeliverable(deliverable, context) {
|
|
3060
3072
|
if (typeof deliverable !== "object" || deliverable === null || Array.isArray(deliverable)) throw new ValidationError(`${context}: deliverable must be an object`);
|
|
3061
3073
|
if (typeof deliverable.check !== "function") throw new ValidationError(`${context}: deliverable.check must be a function`);
|
|
3074
|
+
if (deliverable.explainFailure !== void 0 && typeof deliverable.explainFailure !== "function") throw new ValidationError(`${context}: deliverable.explainFailure must be a function`);
|
|
3062
3075
|
return Object.freeze({
|
|
3063
3076
|
...detachedSnapshot({ describe: deliverable.describe }, `${context} configuration`),
|
|
3064
|
-
check: deliverable.check
|
|
3077
|
+
check: deliverable.check,
|
|
3078
|
+
...deliverable.explainFailure === void 0 ? {} : { explainFailure: deliverable.explainFailure }
|
|
3065
3079
|
});
|
|
3066
3080
|
}
|
|
3067
3081
|
Object.freeze([...[
|
|
@@ -3230,7 +3244,8 @@ function recordRunCancellationOutcome(runDir, result, now) {
|
|
|
3230
3244
|
...record?.path === void 0 ? {} : { path: record.path },
|
|
3231
3245
|
...record?.appliedAfterMs === void 0 ? {} : { appliedAfterMs: record.appliedAfterMs },
|
|
3232
3246
|
...record?.deadlineExceeded === void 0 ? {} : { deadlineExceeded: record.deadlineExceeded },
|
|
3233
|
-
...request.reason === void 0 ? {} : { reason: request.reason }
|
|
3247
|
+
...request.reason === void 0 ? {} : { reason: request.reason },
|
|
3248
|
+
...request.operator === void 0 ? {} : { operator: request.operator }
|
|
3234
3249
|
};
|
|
3235
3250
|
if (record === void 0) {
|
|
3236
3251
|
writeRunCancellation(dir, {
|
|
@@ -3442,6 +3457,8 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
3442
3457
|
const harness = rawHarness;
|
|
3443
3458
|
const deliver = harness.deliver;
|
|
3444
3459
|
if (deliver !== void 0 && typeof deliver !== "function") throw new ValidationError("supervise: driveHarness.deliver must be a function when provided");
|
|
3460
|
+
const deliverReady = harness.deliverReady;
|
|
3461
|
+
if (deliverReady !== void 0 && typeof deliverReady !== "function") throw new ValidationError("supervise: driveHarness.deliverReady must be a function when provided");
|
|
3445
3462
|
const claim = harnessClaims.get(harness);
|
|
3446
3463
|
const conflictingOwner = claim ? [...claim.owners].find((claimedOwner) => claimedOwner !== ownerId) : void 0;
|
|
3447
3464
|
const steerable = typeof deliver === "function";
|
|
@@ -3813,4 +3830,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
3813
3830
|
//#endregion
|
|
3814
3831
|
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
3832
|
|
|
3816
|
-
//# sourceMappingURL=supervise-
|
|
3833
|
+
//# sourceMappingURL=supervise-BXzkqfTE.js.map
|