@tangle-network/agent-runtime 3.0.16 → 3.0.18
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-DJ40anIr.js → activation-BDfK0qUP.js} +2 -2
- package/dist/{activation-DJ40anIr.js.map → activation-BDfK0qUP.js.map} +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-manager-CFfarnFh.js → coordination-manager-BRJ-3FYo.js} +2 -2
- package/dist/{coordination-manager-CFfarnFh.js.map → coordination-manager-BRJ-3FYo.js.map} +1 -1
- package/dist/{delegate-Byo3YB6N.js → delegate-B5a4wCau.js} +2 -2
- package/dist/{delegate-Byo3YB6N.js.map → delegate-B5a4wCau.js.map} +1 -1
- package/dist/durable.js +3 -3
- package/dist/{graph-DuUW-LNW.js → graph-HaMcqUWX.js} +4 -4
- package/dist/{graph-DuUW-LNW.js.map → graph-HaMcqUWX.js.map} +1 -1
- package/dist/{improve-K6AzvHcf.js → improve-B4LkHUCx.js} +5 -5
- package/dist/{improve-K6AzvHcf.js.map → improve-B4LkHUCx.js.map} +1 -1
- package/dist/index.js +7 -7
- package/dist/intelligence.js +3 -3
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-DwepGENE.js → loop-runner-Df3gLvJm.js} +2 -2
- package/dist/{loop-runner-DwepGENE.js.map → loop-runner-Df3gLvJm.js.map} +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{provision-supervisor-DOgH75Qk.js → provision-supervisor-CI7KnQU5.js} +3 -3
- package/dist/{provision-supervisor-DOgH75Qk.js.map → provision-supervisor-CI7KnQU5.js.map} +1 -1
- package/dist/{runtime-5CO88Rt2.js → runtime-DuCYicSd.js} +9 -9
- package/dist/{runtime-5CO88Rt2.js.map → runtime-DuCYicSd.js.map} +1 -1
- package/dist/{search-executor-BX2Wwftx.js → search-executor-CQIV9K8q.js} +2 -2
- package/dist/{search-executor-BX2Wwftx.js.map → search-executor-CQIV9K8q.js.map} +1 -1
- package/dist/{server-wdjqe8et.js → server-BP7d8yGG.js} +2 -2
- package/dist/{server-wdjqe8et.js.map → server-BP7d8yGG.js.map} +1 -1
- package/dist/{structural-rollout-oXgpKkEo.js → structural-rollout-BGbw3v4h.js} +2 -2
- package/dist/{structural-rollout-oXgpKkEo.js.map → structural-rollout-BGbw3v4h.js.map} +1 -1
- package/dist/{supervise-BpvUVtSI.js → supervise-BHxxCvbk.js} +29 -19
- package/dist/supervise-BHxxCvbk.js.map +1 -0
- package/dist/{supervisor-XWLIHK-U.js → supervisor-BFoJnigz.js} +20 -22
- package/dist/supervisor-BFoJnigz.js.map +1 -0
- package/dist/testing.js +11 -11
- package/dist/tui/index.js +1 -1
- package/package.json +2 -2
- package/dist/supervise-BpvUVtSI.js.map +0 -1
- package/dist/supervisor-XWLIHK-U.js.map +0 -1
|
@@ -2,11 +2,11 @@ import { $n as persistHarnessTranscript, Ai as spendFromUsageTotals, At as begin
|
|
|
2
2
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-AzSuGI23.js";
|
|
3
3
|
import { $ as isAsyncIterable, Dt as teardownExecutor, G as chargedTokens, Ot as teardownSurfaces, St as armDeadlineTimer, Tt as isDeadlineAbortReason, U as addSpend, Y as errorMessage, at as sleep, bt as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, dt as zeroSpend, gt as withBudgetResources, ht as resourceTelemetry, lt as unmeteredSpend, pt as addResourceSpend, tt as promptCacheTokenClasses, ut as withTimeout } from "./workspace-streams-8ALHaZzx.js";
|
|
4
4
|
import { d as detachedSnapshot, h as errorHttpStatus, m as errMessage } from "./jsonl-file-BBP9Dz9w.js";
|
|
5
|
-
import { B as createRouterTranscript, C as createExecutor, Ct as checkVerdictOf, Dt as bridgeAdmissionRefusal, F as codeModeArguments, I as codeModeModelOutput, It as bridgeRuntimeAttachmentsKey, Jt as fullProfileMaterialization, Kt as controlProfileMaterialization, L as createCodeModeTools, Lt as bridgeStopSignalKey, Ot as bridgeModelRouteRefusal, Qt as renderUnsupported, S as captureReusableExecutorConfig, St as bestComposite, U as resolveAgentEnvironmentProvider, V as routerBrain, Wt as assertProfileMaterialization, X as createInbox, Xt as promptControlProfileMaterialization, Y as INBOX_RECEIPT_KEY, Yt as profileMaterializationAxes$1, Zt as promptModelProfileMaterialization, a as assertRunParking, bt as CONTINUATIONS_DIR, c as sleepScopeWait, ct as HarnessTurnFailedError, d as runFinalizer, dt as classifyDriverFailure, en as sandboxProfileMaterialization, et as PEER_MAIL_WIRE_KEY, f as runTree, ft as summarizeDriverAttempts, g as isDriverSpec, gt as gateFactoryOnDeliverable, h as driverExecutorFactory, ht as CheckUnavailableError, i as RunParkedError, l as withRunParking, lt as abandonablePending, m as driverChild, mt as upstreamUnavailableSignal, n as createSupervisor, nn as worktreeCliProfileMaterialization, o as bindScopeParkingDrain, p as createRootHandle, pt as undispatchedCredentialExit, qt as defineProfileMaterializationContract, rt as isPeerMailEnvelope, st as DriverAttemptsExhaustedError, tn as unsupportedProfileDimensions, u as bestDelivered, ut as causedByPartialFailure, w as snapshotExecutorConfig, wt as createContinuationKeeper, x as bindReusableExecutorExecutionId, xt as admitContinuationPolicy, z as toolResultText } from "./supervisor-
|
|
5
|
+
import { B as createRouterTranscript, C as createExecutor, Ct as checkVerdictOf, Dt as bridgeAdmissionRefusal, F as codeModeArguments, I as codeModeModelOutput, It as bridgeRuntimeAttachmentsKey, Jt as fullProfileMaterialization, Kt as controlProfileMaterialization, L as createCodeModeTools, Lt as bridgeStopSignalKey, Ot as bridgeModelRouteRefusal, Qt as renderUnsupported, S as captureReusableExecutorConfig, St as bestComposite, U as resolveAgentEnvironmentProvider, V as routerBrain, Wt as assertProfileMaterialization, X as createInbox, Xt as promptControlProfileMaterialization, Y as INBOX_RECEIPT_KEY, Yt as profileMaterializationAxes$1, Zt as promptModelProfileMaterialization, a as assertRunParking, bt as CONTINUATIONS_DIR, c as sleepScopeWait, ct as HarnessTurnFailedError, d as runFinalizer, dt as classifyDriverFailure, en as sandboxProfileMaterialization, et as PEER_MAIL_WIRE_KEY, f as runTree, ft as summarizeDriverAttempts, g as isDriverSpec, gt as gateFactoryOnDeliverable, h as driverExecutorFactory, ht as CheckUnavailableError, i as RunParkedError, l as withRunParking, lt as abandonablePending, m as driverChild, mt as upstreamUnavailableSignal, n as createSupervisor, nn as worktreeCliProfileMaterialization, o as bindScopeParkingDrain, p as createRootHandle, pt as undispatchedCredentialExit, qt as defineProfileMaterializationContract, rt as isPeerMailEnvelope, st as DriverAttemptsExhaustedError, tn as unsupportedProfileDimensions, u as bestDelivered, ut as causedByPartialFailure, w as snapshotExecutorConfig, wt as createContinuationKeeper, x as bindReusableExecutorExecutionId, xt as admitContinuationPolicy, z as toolResultText } from "./supervisor-BFoJnigz.js";
|
|
6
6
|
import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutionSettings, l as profileProviderModel, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-C-RGAUW4.js";
|
|
7
7
|
import { t as composeRuntimeHooks } from "./runtime-hooks-CsW2pfFk.js";
|
|
8
8
|
import { _ as workerAssignmentNamespace, c as writeRunCancellation, d as coordinationEventId, f as externalExecutionId, g as supervisionRunNamespace, h as rootCoordinationOwner, i as readRunCancellation, l as canonicalExecution, m as freezeDetachedProfile, p as freezeDetached, r as readRunCancelRequest, s as watchRunCancellation, t as applyRunCancellation, u as childCoordinationOwner } from "./run-cancellation-pmPWcMy0.js";
|
|
9
|
-
import { c as createSteerAcknowledger, d as coordinationVerbNames, f as createFileRunContext, l as budgetOverspendText, m as withRunContext, n as createCoordinationToolsForManager, p as createInMemoryRunContext, s as createCancelAcknowledger, t as createCoordinationTools, u as normalizeAnalyzeOnSettle } from "./coordination-manager-
|
|
9
|
+
import { c as createSteerAcknowledger, d as coordinationVerbNames, f as createFileRunContext, l as budgetOverspendText, m as withRunContext, n as createCoordinationToolsForManager, p as createInMemoryRunContext, s as createCancelAcknowledger, t as createCoordinationTools, u as normalizeAnalyzeOnSettle } from "./coordination-manager-BRJ-3FYo.js";
|
|
10
10
|
import { o as safeJsonText } from "./coordination-map-routing-BllzcZov.js";
|
|
11
11
|
import { n as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-CZWd_Opp.js";
|
|
12
12
|
import { a as graphRegistry, c as loadGraph } from "./graph-registry-D6y6zffC.js";
|
|
@@ -3536,7 +3536,7 @@ function createCoordinationCredentials(input) {
|
|
|
3536
3536
|
} : void 0;
|
|
3537
3537
|
const randomToken = () => Buffer.from(randomBytes(32).toString("base64url"));
|
|
3538
3538
|
let readerToken = randomToken(), controllerToken = randomToken(), audience = "";
|
|
3539
|
-
let current, staged;
|
|
3539
|
+
let current, staged, prior;
|
|
3540
3540
|
let allowLegacy = true;
|
|
3541
3541
|
const revoked = /* @__PURE__ */ new Map();
|
|
3542
3542
|
const grants = createHash("sha256").update(JSON.stringify([...input.toolNames].sort())).digest("hex");
|
|
@@ -3566,11 +3566,12 @@ function createCoordinationCredentials(input) {
|
|
|
3566
3566
|
headers: Object.freeze({ Authorization: `Bearer ${text}` })
|
|
3567
3567
|
};
|
|
3568
3568
|
}
|
|
3569
|
-
const commit = (next) => {
|
|
3570
|
-
if (current) {
|
|
3571
|
-
revoked.set(
|
|
3569
|
+
const commit = (next, renewal = false) => {
|
|
3570
|
+
if (current && !renewal) {
|
|
3571
|
+
for (const value of [current, prior]) if (value) revoked.set(value.token.toString(), value.expiresAt);
|
|
3572
3572
|
allowLegacy = false;
|
|
3573
3573
|
}
|
|
3574
|
+
prior = renewal ? current : void 0;
|
|
3574
3575
|
current = next;
|
|
3575
3576
|
staged = void 0;
|
|
3576
3577
|
};
|
|
@@ -3586,7 +3587,7 @@ function createCoordinationCredentials(input) {
|
|
|
3586
3587
|
staged = next;
|
|
3587
3588
|
try {
|
|
3588
3589
|
await install(next.headers);
|
|
3589
|
-
commit(next);
|
|
3590
|
+
commit(next, true);
|
|
3590
3591
|
} catch (error) {
|
|
3591
3592
|
staged = void 0;
|
|
3592
3593
|
revoked.set(next.token.toString(), next.expiresAt);
|
|
@@ -3596,8 +3597,12 @@ function createCoordinationCredentials(input) {
|
|
|
3596
3597
|
const matches = (supplied, expected) => supplied.length === expected.length && timingSafeEqual(supplied, expected);
|
|
3597
3598
|
const valid = (supplied) => {
|
|
3598
3599
|
if (revoked.has(supplied.toString())) return false;
|
|
3599
|
-
|
|
3600
|
-
|
|
3600
|
+
for (const value of [
|
|
3601
|
+
current,
|
|
3602
|
+
staged,
|
|
3603
|
+
prior
|
|
3604
|
+
]) if (value && Date.now() < value.expiresAt && matches(supplied, value.token)) return true;
|
|
3605
|
+
if (!signingKeys || !allowLegacy || supplied.length > 8192) return false;
|
|
3601
3606
|
try {
|
|
3602
3607
|
const parts = supplied.toString().split(".");
|
|
3603
3608
|
if (parts.length !== 2) return false;
|
|
@@ -3606,7 +3611,9 @@ function createCoordinationCredentials(input) {
|
|
|
3606
3611
|
const expected = createHmac("sha256", signingKeys.keys[claims.key]).update(payload).digest();
|
|
3607
3612
|
const signature = Buffer.from(parts[1], "base64url");
|
|
3608
3613
|
const expiry = claims.expires ?? (allowLegacy && auth?.ttlMs === void 0 ? current?.expiresAt : void 0);
|
|
3609
|
-
|
|
3614
|
+
const ours = signature.toString("base64url") === parts[1] && matches(signature, expected) && claims.run === run && claims.actor === actor && claims.audience === audience && claims.grants === grants && Number.isSafeInteger(expiry);
|
|
3615
|
+
if (ours && expiry <= Date.now()) input.onExpiredBearer?.();
|
|
3616
|
+
return ours && expiry > Date.now() && (input.lifetimeExpiresAt === void 0 || expiry <= input.lifetimeExpiresAt);
|
|
3610
3617
|
} catch {
|
|
3611
3618
|
return false;
|
|
3612
3619
|
}
|
|
@@ -4415,6 +4422,12 @@ async function serveCoordinationMcpForManager(opts, lifetime) {
|
|
|
4415
4422
|
} });
|
|
4416
4423
|
if ((opts.authentication || opts.onAudit) && (!identity.runId.trim() || !identity.actorId.trim())) throw new ConfigError("authenticated coordination requires a trusted run and actor identity");
|
|
4417
4424
|
const state = openCoordinationListenerState();
|
|
4425
|
+
const stopUnreachable = (reason) => {
|
|
4426
|
+
state.closed = true;
|
|
4427
|
+
try {
|
|
4428
|
+
opts.onStop?.(reason);
|
|
4429
|
+
} catch {}
|
|
4430
|
+
};
|
|
4418
4431
|
const credentials = createCoordinationCredentials({
|
|
4419
4432
|
authentication: opts.authentication,
|
|
4420
4433
|
identity,
|
|
@@ -4422,7 +4435,8 @@ async function serveCoordinationMcpForManager(opts, lifetime) {
|
|
|
4422
4435
|
scopeSignal: opts.scope.signal,
|
|
4423
4436
|
lifetimeSignal: lifetime,
|
|
4424
4437
|
lifetimeExpiresAt: opts.scope.rootDeadlineAtMs,
|
|
4425
|
-
isClosed: () => state.closed
|
|
4438
|
+
isClosed: () => state.closed,
|
|
4439
|
+
onExpiredBearer: () => stopUnreachable("coordination credential expired in its holder: no renewal reached it")
|
|
4426
4440
|
});
|
|
4427
4441
|
const ctx = {
|
|
4428
4442
|
opts,
|
|
@@ -4499,12 +4513,7 @@ async function serveCoordinationMcpForManager(opts, lifetime) {
|
|
|
4499
4513
|
const renew = () => {
|
|
4500
4514
|
if (!active || state.closed || opts.scope.signal.aborted || lifetime?.aborted) return;
|
|
4501
4515
|
pending = credentials.replace(install);
|
|
4502
|
-
pending.then(schedule, () =>
|
|
4503
|
-
state.closed = true;
|
|
4504
|
-
try {
|
|
4505
|
-
opts.onStop?.("coordination credential renewal failed");
|
|
4506
|
-
} catch {}
|
|
4507
|
-
});
|
|
4516
|
+
pending.then(schedule, () => stopUnreachable("coordination credential renewal failed"));
|
|
4508
4517
|
};
|
|
4509
4518
|
refreshBoundCredential = () => {
|
|
4510
4519
|
cancelTimer?.();
|
|
@@ -6119,7 +6128,8 @@ async function readCheckAtTurnEnd(loop, attempt) {
|
|
|
6119
6128
|
function reportManagerLoop(loop) {
|
|
6120
6129
|
loop.reported = true;
|
|
6121
6130
|
const { mcp, controls, state } = loop.session;
|
|
6122
|
-
const
|
|
6131
|
+
const stopped = state.stopController.signal.reason;
|
|
6132
|
+
const stopReason = controls.stopReason() ?? state.progressStopReason ?? (typeof stopped === "string" ? stopped : void 0);
|
|
6123
6133
|
const closedBy = mcp.submittedResult() ? "result-accepted" : mcp.isStopped() ? "stop" : state.progressStopReason !== void 0 ? "stop-rule" : void 0;
|
|
6124
6134
|
const blocked = controls.blocked();
|
|
6125
6135
|
loop.config.deps.onDriverLoopSettled?.({
|
|
@@ -9479,4 +9489,4 @@ function superviseWithContext(profile, task, opts, brain) {
|
|
|
9479
9489
|
}
|
|
9480
9490
|
export { analyzesFindingsReportPrompt as A, anyOf as B, flowRootProfile as C, defaultEdgeTraversalCap as D, validateFlowGraph as E, formatPromptHandle as F, bestSoFar as G, plateau as H, kernelPromptRegistry as I, createSupervisorSpanRecorder as J, plateauLength as K, naiveContinuationPrompt as L, delegatesWorkerBriefPrompt as M, dumbContinuationFailPrompt as N, graphRootProfile as O, dumbContinuationPassPrompt as P, promptHandle as R, createFlowRun as S, routeFlowOf as T, anytimeReport as U, noProgressFor as V, areaUnderCurve as W, coordinationControlToolNames as _, superviseRootProfile as a, createGraphOverlay as b, retryPreSpawnRefusals as c, supervisorAgent as d, supervisorAgentWithTestBrain as f, serveCoordinationMcp as g, composeReentryTask as h, profileGuidanceComposer as i, createPromptRegistry as j, validateGraphTopology as k, withWorkerSpawnRetry as l, UNPROVEN_CONTINUITY as m, superviseFleetCapabilities as n, isPreSpawnExecutorFailure as o, runToolSpans as p, renderAnytimeTable as q, superviseWithTestBrain as r, resolveWorkerSpawnRetry as s, supervise as t, workerFromBackend as u, driverAgent as v, journaledGateDecider as w, GraphRouteError as x, runBrainLoop as y, allWorkersStalled as z };
|
|
9481
9491
|
|
|
9482
|
-
//# sourceMappingURL=supervise-
|
|
9492
|
+
//# sourceMappingURL=supervise-BHxxCvbk.js.map
|