@tangle-network/agent-runtime 10.0.4 → 10.0.6
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 +36 -0
- package/dist/{activation-38MolXIP.js → activation-B3qLMoog.js} +2 -2
- package/dist/{activation-38MolXIP.js.map → activation-B3qLMoog.js.map} +1 -1
- package/dist/{activation-Ckx0yHjT.d.ts → activation-CT-rr2-5.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +4 -4
- package/dist/{continuation-CL4B1Y4M.js → continuation-Bccak14N.js} +3 -3
- package/dist/{continuation-CL4B1Y4M.js.map → continuation-Bccak14N.js.map} +1 -1
- package/dist/{delegate-dhNeiaH_.js → delegate-BFP1uCNY.js} +2 -2
- package/dist/{delegate-dhNeiaH_.js.map → delegate-BFP1uCNY.js.map} +1 -1
- package/dist/{driver-control-acknowledgers-C6GaGBf_.js → driver-control-acknowledgers-jdlf49OQ.js} +13 -11
- package/dist/driver-control-acknowledgers-jdlf49OQ.js.map +1 -0
- package/dist/durable-file-iPCEs_-s.js +1 -0
- package/dist/{durable-file-lXnojyij.js → durable-file-pao7FijS.js} +7 -11
- package/dist/durable-file-pao7FijS.js.map +1 -0
- package/dist/durable-writer-thread.js +5 -5
- package/dist/durable.d.ts +4 -1
- package/dist/durable.js +22 -16
- package/dist/durable.js.map +1 -1
- package/dist/{failure-cause-DoCCGLDH.js → failure-cause-DvYGlOEV.js} +13 -5
- package/dist/{failure-cause-DoCCGLDH.js.map → failure-cause-DvYGlOEV.js.map} +1 -1
- package/dist/{graph-CwLg3LGC.js → graph-CiApRth2.js} +10 -14
- package/dist/graph-CiApRth2.js.map +1 -0
- package/dist/{graph-registry-Bs6mGKou.js → graph-registry-CGKyYabE.js} +1 -1
- package/dist/{graph-registry-DtGd03zk.js → graph-registry-CRskE_Yp.js} +4 -4
- package/dist/{graph-registry-DtGd03zk.js.map → graph-registry-CRskE_Yp.js.map} +1 -1
- package/dist/{improve-C_LKfgH9.js → improve-LJaiGxdI.js} +8 -8
- package/dist/{improve-C_LKfgH9.js.map → improve-LJaiGxdI.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11 -11
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +4 -4
- package/dist/{jsonl-file-DyzefaZ6.js → jsonl-file-vE9H9UXa.js} +3 -3
- package/dist/{jsonl-file-DyzefaZ6.js.map → jsonl-file-vE9H9UXa.js.map} +1 -1
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +20 -20
- package/dist/{loop-runner-LWqWf8FD.d.ts → loop-runner-D6egvap-.d.ts} +2 -2
- package/dist/{loop-runner-BS3ru-yj.js → loop-runner-Dgow637w.js} +2 -2
- package/dist/{loop-runner-BS3ru-yj.js.map → loop-runner-Dgow637w.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 +7 -7
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/{model-policy-DZnL8Yj9.js → model-policy-DTbTFyOG.js} +12 -6
- package/dist/model-policy-DTbTFyOG.js.map +1 -0
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +1 -1
- package/dist/{provision-supervisor-D8N0l2DM.js → provision-supervisor-DLOeyFHV.js} +8 -8
- package/dist/{provision-supervisor-D8N0l2DM.js.map → provision-supervisor-DLOeyFHV.js.map} +1 -1
- package/dist/{result-blob-store-DfTcyQ05.js → result-blob-store-BMMzqpHa.js} +4 -4
- package/dist/{result-blob-store-DfTcyQ05.js.map → result-blob-store-BMMzqpHa.js.map} +1 -1
- package/dist/{run-cancellation-D3qc9wAD.js → run-cancellation-Bv7ooTJa.js} +129 -54
- package/dist/run-cancellation-Bv7ooTJa.js.map +1 -0
- package/dist/{run-lock-D1xnb9ve.js → run-lock-Ckakh1Uq.js} +3 -3
- package/dist/{run-lock-D1xnb9ve.js.map → run-lock-Ckakh1Uq.js.map} +1 -1
- package/dist/{run-reopen-DVM5AEKV.js → run-reopen-KAnkEJV4.js} +7 -7
- package/dist/{run-reopen-DVM5AEKV.js.map → run-reopen-KAnkEJV4.js.map} +1 -1
- package/dist/{run-state-tgQ-S9Ln.js → run-state-Bcci4zIN.js} +7 -7
- package/dist/{run-state-tgQ-S9Ln.js.map → run-state-Bcci4zIN.js.map} +1 -1
- package/dist/{runtime-BTECV05R.js → runtime-DCo0OP4n.js} +46 -55
- package/dist/runtime-DCo0OP4n.js.map +1 -0
- package/dist/{search-executor-Uco2_KTB.js → search-executor-Dn5YmHsg.js} +5 -5
- package/dist/{search-executor-Uco2_KTB.js.map → search-executor-Dn5YmHsg.js.map} +1 -1
- package/dist/{server-BMp24-xn.js → server-DxpG9y6W.js} +4 -4
- package/dist/{server-BMp24-xn.js.map → server-DxpG9y6W.js.map} +1 -1
- package/dist/{settle-record-au3w7bQG.js → settle-record-DMdeNy8A.js} +4 -4
- package/dist/{settle-record-au3w7bQG.js.map → settle-record-DMdeNy8A.js.map} +1 -1
- package/dist/{structural-rollout-D8wufVJI.js → structural-rollout-DOmjcEMD.js} +5 -5
- package/dist/{structural-rollout-D8wufVJI.js.map → structural-rollout-DOmjcEMD.js.map} +1 -1
- package/dist/{supervise-DtVdvZpr.js → supervise-D7jtypE-.js} +34 -29
- package/dist/supervise-D7jtypE-.js.map +1 -0
- package/dist/{supervise-identity-S5XwgaF3.js → supervise-identity-QavM_M4r.js} +4 -4
- package/dist/{supervise-identity-S5XwgaF3.js.map → supervise-identity-QavM_M4r.js.map} +1 -1
- package/dist/{supervision-discovery-Cqu4NxPV.js → supervision-discovery-CFZnbNTB.js} +6 -9
- package/dist/supervision-discovery-CFZnbNTB.js.map +1 -0
- package/dist/{supervisor-CHgCAMjm.js → supervisor-BFs4u2Vo.js} +147 -73
- package/dist/supervisor-BFs4u2Vo.js.map +1 -0
- package/dist/{supervisor-accounting-CZ7i4cd5.js → supervisor-accounting-CgipDzYg.js} +59 -20
- package/dist/supervisor-accounting-CgipDzYg.js.map +1 -0
- package/dist/{supervisor-root-contract-D70KTGXF.js → supervisor-root-contract-Ca5xp0Vg.js} +3 -3
- package/dist/{supervisor-root-contract-D70KTGXF.js.map → supervisor-root-contract-Ca5xp0Vg.js.map} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/{tool-server-DQCdu3am.js → tool-server-Cb7LBW4e.js} +2 -2
- package/dist/{tool-server-DQCdu3am.js.map → tool-server-Cb7LBW4e.js.map} +1 -1
- package/dist/{top-web-COrMqTRC.js → top-web-oDO4xhNE.js} +8 -8
- package/dist/{top-web-COrMqTRC.js.map → top-web-oDO4xhNE.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-9xsn2GGY.d.ts → types-CKsn_wgO.d.ts} +26 -4
- package/package.json +1 -1
- package/dist/driver-control-acknowledgers-C6GaGBf_.js.map +0 -1
- package/dist/durable-file-DJ3JsA4B.js +0 -1
- package/dist/durable-file-lXnojyij.js.map +0 -1
- package/dist/graph-CwLg3LGC.js.map +0 -1
- package/dist/model-policy-DZnL8Yj9.js.map +0 -1
- package/dist/run-cancellation-D3qc9wAD.js.map +0 -1
- package/dist/runtime-BTECV05R.js.map +0 -1
- package/dist/supervise-DtVdvZpr.js.map +0 -1
- package/dist/supervision-discovery-Cqu4NxPV.js.map +0 -1
- package/dist/supervisor-CHgCAMjm.js.map +0 -1
- package/dist/supervisor-accounting-CZ7i4cd5.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DG8yufqX.js";
|
|
2
|
-
import { c as budgetOverspendText, f as createFileRunContext, i as createCoordinationToolsForManager, l as coordinationVerbNames, m as withRunContext, n as createSteerAcknowledger, p as createInMemoryRunContext, r as createCoordinationTools, t as createCancelAcknowledger, u as normalizeAnalyzeOnSettle } from "./driver-control-acknowledgers-
|
|
3
|
-
import {
|
|
4
|
-
import { a as freezeDetached, c as supervisionRunNamespace, i as externalExecutionId, l as workerAssignmentNamespace, n as childCoordinationOwner, o as freezeDetachedProfile, r as coordinationEventId, s as rootCoordinationOwner, t as canonicalExecution } from "./supervise-identity-
|
|
2
|
+
import { c as budgetOverspendText, f as createFileRunContext, i as createCoordinationToolsForManager, l as coordinationVerbNames, m as withRunContext, n as createSteerAcknowledger, p as createInMemoryRunContext, r as createCoordinationTools, t as createCancelAcknowledger, u as normalizeAnalyzeOnSettle } from "./driver-control-acknowledgers-jdlf49OQ.js";
|
|
3
|
+
import { $t as worktreeCliProfileMaterialization, B as toolResultText, C as captureReusableExecutorConfig, Ct as bridgeAdmissionRefusal, Gt as fullProfileMaterialization, H as routerBrain, I as codeModeArguments, Jt as promptModelProfileMaterialization, K as providerOutputOptions, Kt as profileMaterializationAxes$1, L as codeModeModelOutput, Mt as bridgeRuntimeAttachmentsKey, Nt as bridgeRuntimeEnvKey, Pt as bridgeStopSignalKey, Q as createInbox, Qt as unsupportedProfileDimensions, R as createCodeModeTools, S as bindReusableExecutorExecutionId, T as snapshotExecutorConfig, Ut as controlProfileMaterialization, V as createRouterTranscript, Vt as assertProfileMaterialization, W as resolveAgentEnvironmentProvider, Wt as defineProfileMaterializationContract, Yt as renderUnsupported, Z as INBOX_RECEIPT_KEY, Zt as sandboxProfileMaterialization, _ as isDriverSpec, _t as preflightPublicCoordination, a as awaitRootWake, at as isPeerMailEnvelope, d as bestDelivered, dt as abandonablePending, f as runFinalizer, ft as classifyDriverFailure, g as driverExecutorFactory, gt as upstreamUnavailableSignal, h as driverChild, ht as undispatchedCredentialExit, i as assertRunParking, l as sleepScopeWait, lt as DriverAttemptsExhaustedError, m as createRootHandle, mt as transientFailureKind, n as createSupervisor, nt as PEER_MAIL_WIRE_KEY, o as bindScopeParkingDrain, p as runTree, pt as summarizeDriverAttempts, qt as promptControlProfileMaterialization, r as RunParkedError, s as isRunParked, u as withRunParking, ut as HarnessTurnFailedError, vt as CheckUnavailableError, w as createExecutor, wt as bridgeModelRouteRefusal, yt as gateFactoryOnDeliverable } from "./supervisor-BFs4u2Vo.js";
|
|
4
|
+
import { a as freezeDetached, c as supervisionRunNamespace, i as externalExecutionId, l as workerAssignmentNamespace, n as childCoordinationOwner, o as freezeDetachedProfile, r as coordinationEventId, s as rootCoordinationOwner, t as canonicalExecution } from "./supervise-identity-QavM_M4r.js";
|
|
5
5
|
import { a as errMessage, c as errorStack, i as causeChain, l as errorText, n as detachedSnapshot, o as errorHttpStatus, u as defaultRedactor } from "./snapshot-BKI_w3JD.js";
|
|
6
6
|
import { t as composeRuntimeHooks } from "./runtime-hooks-CsW2pfFk.js";
|
|
7
|
-
import { $
|
|
8
|
-
import { _ as runAbortable, g as linkAbort, p as RunCancellationReason } from "./jsonl-file-
|
|
9
|
-
import { a as createContinuationKeeper, i as checkVerdictOf, n as admitContinuationPolicy, r as bestComposite, t as CONTINUATIONS_DIR } from "./continuation-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { $n as generateSpanId, $r as runtimeOwnedScopeOwnerRuntime, $t as reconcileScopeRetainedOwnerEnvironment, Bt as recordScopeOwnerHarnessTranscript, Cr as isTerminalNodeStatus, Dr as authoredSeatStages, Dt as scopeRetainedOwnerResourceReader, Er as SeatPauseError, Et as releaseScopeRetainedOwnerForSeatPause, Ft as scopeRetainedOwnerResult, Gt as coordinationMcpAlias, Hr as recordRuntimeOwnedDriveHarnessProviderEvidence, Ht as restoreScopeOwnerAcceptedExecution, It as beginScopeOwnerAttempt, Jr as runtimeOwnedExecutorExecutionBinding, Jt as runtimeGraphMetadataKey, Kt as coordinationProfileToolPrefix, Mt as consumeScopeRetainedOwnerResult, Nr as attestRuntimeOwnedScopeOwner, Nt as prepareScopeRetainedOwnerTask, Or as seatExecutionProfile, Pr as authoredAgentIdentity, Pt as scopeRetainedOwnerPriorSpend, Qt as assertRetainedOwnerCoordinationRekey, Rt as holdScopeOwnerTranscript, Sr as isLiveNodeStatus, Tr as SeatChain, Tt as prepareScopeRetainedOwnerSeatSwitch, Ut as scopeOwnerExecutionObservation, V as parseWorkerToolTraceArtifact, Vn as WORKER_TRACE_PROPAGATION, Vr as providerAttemptEvidence, Vt as recordScopeOwnerMaterialization, Wt as scopeOwnerExecutorNodeContext, Xr as runtimeOwnedExecutorProviderEvidence, Yr as runtimeOwnedExecutorMaterialization, Yt as beginScopeRetainedOwnerDrive, Zn as createOtelExporter, Zr as runtimeOwnedPendingExecutorMaterialization, Zt as scopeRetainedOwnerTurnEnded, an as owners, cn as scopeRetainedOwnerJournalRoot, dr as persistHarnessTranscript, dt as meterRuntimeOwnedAccounting, en as scopeRetainedOwnerRestorePoint, fr as readHarnessTranscript, ft as meterRuntimeOwnedProviderAttempt, gt as recordScopeOwnerPause, ht as recordScopeOwnerDriverAttempt, i as ROOT_STREAM_FILE, ii as isRuntimeFlowBrain, in as bindScopeRetainedOwnerProvider, jt as abandonScopeRetainedOwnerInvocation, l as readRootStream, mt as recordScopeOwnerBarrenPause, nt as assertRecursiveReservationPolicy, o as createRootStreamSink, oi as runtimeFlowAgent, pr as settleHarnessTranscript, pt as pauseScopeSeatAdmission, qr as runtimeOwnedDriveHarnessProviderEvidence, qt as providerVisibleProfile, rn as bindScopeRetainedOwnerEnvironmentId, si as runtimeFlowBrain, sn as scopeRetainedOwnerContext, tn as noteScopeRetainedOwnerCoordination, vn as executorObservationSeamKey, wr as SEAT_RECHECK_MS, yr as createActivityLog, zt as noteScopeOwnerPlannedExecution } from "./supervisor-accounting-CgipDzYg.js";
|
|
8
|
+
import { _ as runAbortable, g as linkAbort, p as RunCancellationReason } from "./jsonl-file-vE9H9UXa.js";
|
|
9
|
+
import { a as createContinuationKeeper, i as checkVerdictOf, n as admitContinuationPolicy, r as bestComposite, t as CONTINUATIONS_DIR } from "./continuation-Bccak14N.js";
|
|
10
|
+
import { At as recordValue, C as cappedDoublingMs, D as reportedResetAt, H as turnFailurePolicy, I as executorFailure, O as unavailablePauseMs, P as contentAddress, V as turnFailureOf, b as RATE_LIMIT_SIGNALS, et as meterUsageEvent, g as registerRetainedExecutorPreparation, it as assertValidBudget, k as unavailableResumeAt, l as RetainedExecutionPendingError, rt as spendFromUsageTotals, tt as newUsageTotals, v as retainedExecutorSeamKey, w as jitteredMs, y as PLACEMENT_SIGNALS, z as harnessProcessDied } from "./failure-cause-DvYGlOEV.js";
|
|
11
|
+
import { a as readRunCancelRequest, d as writeRunCancellationAsync, l as watchRunCancellation, n as applyRunCancellationAsync, o as readRunCancellation, t as applyRunCancellation } from "./run-cancellation-Bv7ooTJa.js";
|
|
12
12
|
import { o as safeJsonText } from "./coordination-map-routing-XZXTlCmn.js";
|
|
13
|
-
import { n as createStdioToolServer } from "./tool-server-
|
|
13
|
+
import { n as createStdioToolServer } from "./tool-server-Cb7LBW4e.js";
|
|
14
14
|
import { A as withBudgetResources, D as addResourceSpend, S as unmeteredSpend, T as zeroSpend, c as errorMessage, f as isAsyncIterable, i as chargedTokens, k as resourceTelemetry, m as promptCacheTokenClasses, n as addSpend, v as sleep, w as withTimeout } from "./util-qsH5cC9S.js";
|
|
15
15
|
import { d as teardownExecutor, i as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, l as isDeadlineAbortReason, o as armDeadlineTimer } from "./deadline-CySmJ_0S.js";
|
|
16
|
-
import { 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 agentHarness, y as harnessRunsAgent } from "./model-policy-
|
|
17
|
-
import { a as graphRegistry, c as loadGraph } from "./graph-registry-
|
|
16
|
+
import { 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 agentHarness, y as harnessRunsAgent } from "./model-policy-DTbTFyOG.js";
|
|
17
|
+
import { a as graphRegistry, c as loadGraph } from "./graph-registry-CRskE_Yp.js";
|
|
18
18
|
import { ATTR, LINK_KIND_ATTR, agentIdentityAttributes } from "@tangle-network/agent-trace-contract";
|
|
19
19
|
import { ProxySecretScopeSchema, ProxySecretsSchema, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, mergeProxySecretBindings, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
20
20
|
import { toolSpansToTraceAnalysisStore } from "@tangle-network/agent-eval";
|
|
@@ -1427,6 +1427,8 @@ function validateGraphTopology(nodes, edges, registry, analysts) {
|
|
|
1427
1427
|
const kind = edge.kind;
|
|
1428
1428
|
if (kind === "routes") throw new ValidationError(`runGraph: ${edgeId(edge)} is a routes edge, which only a flow graph runs — set graph.entry to name the nodes Runtime starts`);
|
|
1429
1429
|
if (kind !== "delegates" && kind !== "analyzes" && kind !== "maps") throw new ValidationError(`runGraph: edge kind ${JSON.stringify(kind)} is not 'delegates', 'analyzes', 'maps' or 'routes'`);
|
|
1430
|
+
const cap = edge.kind === "maps" ? void 0 : edge.maxTraversals;
|
|
1431
|
+
if (cap !== void 0 && !isPositiveInteger(cap)) throw new ValidationError(`runGraph: ${edgeId(edge)} needs maxTraversals as a positive integer`);
|
|
1430
1432
|
}
|
|
1431
1433
|
const delegates = edges.filter((edge) => edge.kind === "delegates");
|
|
1432
1434
|
const analyzes = edges.filter((edge) => edge.kind === "analyzes");
|
|
@@ -4349,14 +4351,14 @@ var DriverBrainTurns = class {
|
|
|
4349
4351
|
const controlClock = this.startControlClock();
|
|
4350
4352
|
let wake;
|
|
4351
4353
|
try {
|
|
4352
|
-
wake = await coord.awaitWake({
|
|
4354
|
+
wake = await awaitRootWake(scope, coord.awaitWake({
|
|
4353
4355
|
signal: scope.signal,
|
|
4354
4356
|
heartbeatMs: wakePolicy.heartbeatMs,
|
|
4355
4357
|
quietWhileProgressing: true,
|
|
4356
4358
|
debounceMs: wakePolicy.debounceMs,
|
|
4357
4359
|
...warnAt === void 0 ? {} : { deadlineAt: warnAt },
|
|
4358
4360
|
alsoWakeOn: inbox.pending() > 0 ? Promise.resolve() : inbox.nextDelivery()
|
|
4359
|
-
});
|
|
4361
|
+
}));
|
|
4360
4362
|
} finally {
|
|
4361
4363
|
if (controlClock !== void 0) clearInterval(controlClock);
|
|
4362
4364
|
}
|
|
@@ -4537,6 +4539,7 @@ function driverAgent(opts) {
|
|
|
4537
4539
|
}
|
|
4538
4540
|
}).catch((error) => {
|
|
4539
4541
|
turns.releaseLeases();
|
|
4542
|
+
if (isRunParked(error, scope)) throw error;
|
|
4540
4543
|
return analysisFailed(error);
|
|
4541
4544
|
});
|
|
4542
4545
|
inbox.failPending("the manager finished before a model turn read the message");
|
|
@@ -5087,8 +5090,6 @@ function barrenPauseMs(streak, maxBarren) {
|
|
|
5087
5090
|
}
|
|
5088
5091
|
/** Consecutive identical reconciliation failures of one pending invocation that resolve it. */
|
|
5089
5092
|
const SAME_PENDING_LIMIT = 2;
|
|
5090
|
-
/** No unchanged no-progress failure earns a fourth drive, including root pauses and capacity. */
|
|
5091
|
-
const SAME_CAUSE_LIMIT = 3;
|
|
5092
5093
|
/** Deterministic failures without progress stop on their second identical cause. */
|
|
5093
5094
|
const SAME_DETERMINISTIC_LIMIT = 2;
|
|
5094
5095
|
/** `deadline` when a deadline cut the run, else `aborted`. Read before classification, which calls
|
|
@@ -5313,7 +5314,8 @@ var DriverRetryLoop = class {
|
|
|
5313
5314
|
/** Read a failed drive, then pause or retry it, or throw the stop that ends the loop. */
|
|
5314
5315
|
async afterFailure(error, attempt, before, startedAt) {
|
|
5315
5316
|
const durationMs = this.limits.now() - startedAt;
|
|
5316
|
-
const
|
|
5317
|
+
const refusal = (upstreamUnavailableSignal(error) ?? "").toLowerCase();
|
|
5318
|
+
const classification = PLACEMENT_SIGNALS.has(refusal) && isDeadlineAbortReason(this.run.signal.reason) ? "unavailable" : classifyDriverFailure(error, this.run.signal, this.run.stopSignal);
|
|
5317
5319
|
const after = this.run.progress();
|
|
5318
5320
|
const progressed = madeProgress(before, after);
|
|
5319
5321
|
if (progressed) {
|
|
@@ -5334,7 +5336,7 @@ var DriverRetryLoop = class {
|
|
|
5334
5336
|
pending
|
|
5335
5337
|
};
|
|
5336
5338
|
this.sameIdle = progressed ? void 0 : extend(this.sameIdle, error);
|
|
5337
|
-
if (classification !== "terminal" && !(classification === "unavailable" && pending === void 0 && this.run.budget().deadlineMs > 0 && RATE_LIMIT_SIGNALS.has(
|
|
5339
|
+
if (classification !== "terminal" && !(classification === "unavailable" && pending === void 0 && this.run.budget().deadlineMs > 0 && (RATE_LIMIT_SIGNALS.has(refusal) || PLACEMENT_SIGNALS.has(refusal))) && !this.run.signal.aborted && budgetStop(this.run.budget(), this.limits.now()) === void 0 && (this.sameIdle?.count ?? 0) >= 3) {
|
|
5338
5340
|
const stop = pending === void 0 || classification === "unavailable" ? "repeated-failure" : "pending-unresolved";
|
|
5339
5341
|
await this.emit({
|
|
5340
5342
|
...this.failureRecord(failure),
|
|
@@ -6210,7 +6212,7 @@ async function driveManagerTurn(loop, attempt, reentry) {
|
|
|
6210
6212
|
const owner = owners.get(scope);
|
|
6211
6213
|
if (owner) owner.replaceDeadExecution = reentry?.reason === "driver-failure" && harnessProcessDied(reentry.failure);
|
|
6212
6214
|
loop.candidate = void 0;
|
|
6213
|
-
if (deps.controlDir !== void 0 && deps.abortRun !== void 0)
|
|
6215
|
+
if (deps.controlDir !== void 0 && deps.abortRun !== void 0) await applyRunCancellationAsync(deps.controlDir, deps.abortRun, () => (/* @__PURE__ */ new Date()).toISOString());
|
|
6214
6216
|
scope.signal.throwIfAborted();
|
|
6215
6217
|
beginScopeOwnerAttempt(scope, attempt);
|
|
6216
6218
|
controls.beginDriverAttempt(attempt);
|
|
@@ -7402,7 +7404,7 @@ function leafWorker(env, seat, admitted, spawnContext, recovering) {
|
|
|
7402
7404
|
const { options, deliverable, runNamespace } = env.setup;
|
|
7403
7405
|
const { childDeliverable } = admitted;
|
|
7404
7406
|
const name = admitted.authorized.name ?? "";
|
|
7405
|
-
if (options.checkNodes?.names.includes(name) && seat.depth === 1 && (recovering || spawnContext.route?.node === name)) return options.checkNodes.leaf(admitted.authorized, admitted.authorizedContext);
|
|
7407
|
+
if (options.checkNodes?.names.includes(name) && seat.depth === 1 && (recovering || spawnContext.route?.node === name || spawnContext.map?.role === "join")) return options.checkNodes.leaf(admitted.authorized, admitted.authorizedContext);
|
|
7406
7408
|
if (childDeliverable !== deliverable && !options.backend) throw new ValidationError("supervise: resolveDeliverable selected a per-spawn deliverable but there is no backend to derive that leaf from; makeLeafAgent owns its own completion check");
|
|
7407
7409
|
return withModelSubstitution((childDeliverable === deliverable ? env.makeLeaf : workerFromBackend(options.backend, childDeliverable))(admitted.authorized, Object.freeze({
|
|
7408
7410
|
...admitted.authorizedContext,
|
|
@@ -7665,7 +7667,7 @@ async function verifyProfilePromotions(table) {
|
|
|
7665
7667
|
* never a success. A request the run ended before applying is expired here too, so a reader can
|
|
7666
7668
|
* tell run-over from in-progress and a stale request cannot outlive its run.
|
|
7667
7669
|
*/
|
|
7668
|
-
function recordRunCancellationOutcome(runDir, result, now) {
|
|
7670
|
+
async function recordRunCancellationOutcome(runDir, result, now) {
|
|
7669
7671
|
if (runDir === void 0) return;
|
|
7670
7672
|
const dir = resolve(runDir);
|
|
7671
7673
|
const request = readRunCancelRequest(dir);
|
|
@@ -7685,7 +7687,7 @@ function recordRunCancellationOutcome(runDir, result, now) {
|
|
|
7685
7687
|
...request.operator === void 0 ? {} : { operator: request.operator }
|
|
7686
7688
|
};
|
|
7687
7689
|
if (record === void 0) {
|
|
7688
|
-
|
|
7690
|
+
await writeRunCancellationAsync(dir, {
|
|
7689
7691
|
...base,
|
|
7690
7692
|
effect: "not_live",
|
|
7691
7693
|
detail: "run ended before the request was applied"
|
|
@@ -7693,14 +7695,14 @@ function recordRunCancellationOutcome(runDir, result, now) {
|
|
|
7693
7695
|
return;
|
|
7694
7696
|
}
|
|
7695
7697
|
if (aborted && result.teardownUnconfirmed?.length) {
|
|
7696
|
-
|
|
7698
|
+
await writeRunCancellationAsync(dir, {
|
|
7697
7699
|
...base,
|
|
7698
7700
|
effect: "unknown",
|
|
7699
7701
|
detail: `run aborted but teardown remains unconfirmed for: ${result.teardownUnconfirmed.map((node) => node.environments?.length ? `${node.id} (${node.environments.map((environment) => `${environment.provider}:${environment.environmentId}`).join(", ")})` : node.id).join(", ")}`
|
|
7700
7702
|
});
|
|
7701
7703
|
return;
|
|
7702
7704
|
}
|
|
7703
|
-
|
|
7705
|
+
await writeRunCancellationAsync(dir, aborted ? {
|
|
7704
7706
|
...base,
|
|
7705
7707
|
effect: "cancelled",
|
|
7706
7708
|
detail: "the run reached its terminal cancelled state"
|
|
@@ -8277,7 +8279,10 @@ async function executeDriverAttempt(input) {
|
|
|
8277
8279
|
node: scopeOwnerExecutorNodeContext(scope),
|
|
8278
8280
|
seams: {
|
|
8279
8281
|
[executorObservationSeamKey]: observation,
|
|
8280
|
-
...retainedOwnerSeam(retainedOwner
|
|
8282
|
+
...retainedOwnerSeam(retainedOwner && {
|
|
8283
|
+
...retainedOwner,
|
|
8284
|
+
deadlineMs: scope.rootDeadlineAtMs
|
|
8285
|
+
}, async (result) => attempt.commitOwnerResult(result), () => {
|
|
8281
8286
|
transcriptRecorded = true;
|
|
8282
8287
|
}),
|
|
8283
8288
|
[bridgeStopSignalKey]: stopSignal,
|
|
@@ -9244,7 +9249,7 @@ function pendingCancellationRun(profile, task, opts) {
|
|
|
9244
9249
|
signal: options.signal === void 0 ? controller.signal : AbortSignal.any([controller.signal, options.signal]),
|
|
9245
9250
|
interactiveBindingDir: runDir
|
|
9246
9251
|
});
|
|
9247
|
-
recordRunCancellationOutcome(runDir, result, now);
|
|
9252
|
+
await recordRunCancellationOutcome(runDir, result, now);
|
|
9248
9253
|
return {
|
|
9249
9254
|
...result,
|
|
9250
9255
|
rootProviderModel: rootProviderModelEvidence([]),
|
|
@@ -9266,7 +9271,7 @@ async function startSupervisedRun(run) {
|
|
|
9266
9271
|
if (runControl !== void 0) supervisor.attach(runControl);
|
|
9267
9272
|
const cancellation = runDir !== void 0 && runControl !== void 0 ? watchRunCancellation(runDir, cancelDurableRun) : void 0;
|
|
9268
9273
|
try {
|
|
9269
|
-
cancellation?.check();
|
|
9274
|
+
await cancellation?.check();
|
|
9270
9275
|
} catch (error) {
|
|
9271
9276
|
cancellation?.close();
|
|
9272
9277
|
throw error;
|
|
@@ -9444,10 +9449,10 @@ async function settleSupervisedRun(run, pending, cancellation) {
|
|
|
9444
9449
|
rootStream = await setup.rootStreamSink?.close();
|
|
9445
9450
|
} finally {
|
|
9446
9451
|
cancellation?.close();
|
|
9447
|
-
cancellation?.check();
|
|
9452
|
+
await cancellation?.check();
|
|
9448
9453
|
}
|
|
9449
9454
|
}
|
|
9450
|
-
recordRunCancellationOutcome(options.runDir, result, setup.now);
|
|
9455
|
+
await recordRunCancellationOutcome(options.runDir, result, setup.now);
|
|
9451
9456
|
if (rootDriveHarness !== void 0) await settleHarnessTranscript(rootDriveHarness);
|
|
9452
9457
|
const rootHarnessTranscript = rootDriveHarness === void 0 ? void 0 : await persistHarnessTranscript(readHarnessTranscript(rootDriveHarness), setup.blobs);
|
|
9453
9458
|
const rootProviderModel = ctx.resume === true ? rootProviderModelEvidence([]) : rootProviderModels.length > 0 ? rootProviderModelEvidence(rootProviderModels) : rootDriveHarness === void 0 ? rootProviderModelEvidence([]) : rootProviderModelEvidenceFromExecution(runtimeOwnedDriveHarnessProviderEvidence(rootDriveHarness));
|
|
@@ -9493,4 +9498,4 @@ function superviseWithContext(profile, task, opts, brain) {
|
|
|
9493
9498
|
}
|
|
9494
9499
|
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, profileGuidanceComposer as _, supervisorAgent as a, coordinationControlToolNames as b, ASSISTANT_TEXT_SPAN as c, UNPROVEN_CONTINUITY as d, composeReentryTask as f, graphFlowSpawnProfile as g, createGraphOverlay as h, workerFromBackend as i, createPromptRegistry as j, validateGraphTopology as k, rootStreamToolSpans as l, runBrainLoop as m, superviseFleetCapabilities as n, supervisorAgentWithTestBrain as o, driverAgent as p, renderAnytimeTable as q, superviseWithTestBrain as r, ASSISTANT_REASONING_SPAN as s, supervise as t, runToolSpans as u, superviseRootProfile as v, journaledGateDecider as w, GraphRouteError as x, serveCoordinationMcp as y, allWorkersStalled as z };
|
|
9495
9500
|
|
|
9496
|
-
//# sourceMappingURL=supervise-
|
|
9501
|
+
//# sourceMappingURL=supervise-D7jtypE-.js.map
|