@tangle-network/agent-runtime 10.0.5 → 10.0.7

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{activation-DvvM7gG5.js → activation-B3qLMoog.js} +2 -2
  3. package/dist/{activation-DvvM7gG5.js.map → activation-B3qLMoog.js.map} +1 -1
  4. package/dist/{activation-DyFt-GHq.d.ts → activation-CT-rr2-5.d.ts} +2 -2
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +3 -3
  7. package/dist/{delegate-YBqrrbq7.js → delegate-BFP1uCNY.js} +2 -2
  8. package/dist/{delegate-YBqrrbq7.js.map → delegate-BFP1uCNY.js.map} +1 -1
  9. package/dist/{driver-control-acknowledgers-CNNRjIo9.js → driver-control-acknowledgers-jdlf49OQ.js} +11 -10
  10. package/dist/driver-control-acknowledgers-jdlf49OQ.js.map +1 -0
  11. package/dist/durable-writer-thread.js +2 -2
  12. package/dist/durable.d.ts +1 -1
  13. package/dist/durable.js +11 -11
  14. package/dist/{failure-cause-DoCCGLDH.js → failure-cause-DvYGlOEV.js} +13 -5
  15. package/dist/{failure-cause-DoCCGLDH.js.map → failure-cause-DvYGlOEV.js.map} +1 -1
  16. package/dist/{graph-CUUtx7qT.js → graph-CiApRth2.js} +7 -7
  17. package/dist/graph-CiApRth2.js.map +1 -0
  18. package/dist/{improve-Cy8PZUdw.js → improve-LJaiGxdI.js} +5 -5
  19. package/dist/{improve-Cy8PZUdw.js.map → improve-LJaiGxdI.js.map} +1 -1
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +10 -10
  22. package/dist/intelligence.d.ts +2 -2
  23. package/dist/intelligence.js +4 -4
  24. package/dist/kernel.d.ts +2 -2
  25. package/dist/kernel.js +16 -16
  26. package/dist/{loop-runner-Icc1iBR-.d.ts → loop-runner-D6egvap-.d.ts} +2 -2
  27. package/dist/{loop-runner-BwkX4ViS.js → loop-runner-Dgow637w.js} +2 -2
  28. package/dist/{loop-runner-BwkX4ViS.js.map → loop-runner-Dgow637w.js.map} +1 -1
  29. package/dist/loop-runner-bin.d.ts +1 -1
  30. package/dist/loop-runner-bin.js +1 -1
  31. package/dist/mcp/bin.js +3 -3
  32. package/dist/mcp/index.d.ts +1 -1
  33. package/dist/mcp/index.js +6 -6
  34. package/dist/mcp/memory-bin.js +1 -1
  35. package/dist/profiles.d.ts +1 -1
  36. package/dist/{provision-supervisor-Dtn8RjHe.js → provision-supervisor-DLOeyFHV.js} +5 -5
  37. package/dist/{provision-supervisor-Dtn8RjHe.js.map → provision-supervisor-DLOeyFHV.js.map} +1 -1
  38. package/dist/{result-blob-store-UGXQYACQ.js → result-blob-store-BMMzqpHa.js} +2 -2
  39. package/dist/{result-blob-store-UGXQYACQ.js.map → result-blob-store-BMMzqpHa.js.map} +1 -1
  40. package/dist/{run-cancellation-BpUQZqBS.js → run-cancellation-Bv7ooTJa.js} +129 -54
  41. package/dist/run-cancellation-Bv7ooTJa.js.map +1 -0
  42. package/dist/{run-reopen-BvF3Gjj9.js → run-reopen-KAnkEJV4.js} +6 -6
  43. package/dist/{run-reopen-BvF3Gjj9.js.map → run-reopen-KAnkEJV4.js.map} +1 -1
  44. package/dist/{run-state-CZcFJjHn.js → run-state-Bcci4zIN.js} +5 -5
  45. package/dist/{run-state-CZcFJjHn.js.map → run-state-Bcci4zIN.js.map} +1 -1
  46. package/dist/{runtime-BvDaNyFf.js → runtime-DCo0OP4n.js} +16 -16
  47. package/dist/{runtime-BvDaNyFf.js.map → runtime-DCo0OP4n.js.map} +1 -1
  48. package/dist/{search-executor-DWQW-9WN.js → search-executor-Dn5YmHsg.js} +4 -4
  49. package/dist/{search-executor-DWQW-9WN.js.map → search-executor-Dn5YmHsg.js.map} +1 -1
  50. package/dist/{server-D5GpuQnT.js → server-DxpG9y6W.js} +4 -4
  51. package/dist/{server-D5GpuQnT.js.map → server-DxpG9y6W.js.map} +1 -1
  52. package/dist/{settle-record-BFhJigPW.js → settle-record-DMdeNy8A.js} +2 -2
  53. package/dist/{settle-record-BFhJigPW.js.map → settle-record-DMdeNy8A.js.map} +1 -1
  54. package/dist/{structural-rollout-D1pZn6Cu.js → structural-rollout-DOmjcEMD.js} +4 -4
  55. package/dist/{structural-rollout-D1pZn6Cu.js.map → structural-rollout-DOmjcEMD.js.map} +1 -1
  56. package/dist/{supervise-fmugf6Y2.js → supervise-D7jtypE-.js} +25 -21
  57. package/dist/supervise-D7jtypE-.js.map +1 -0
  58. package/dist/{supervise-identity-7_7DUghQ.js → supervise-identity-QavM_M4r.js} +2 -2
  59. package/dist/{supervise-identity-7_7DUghQ.js.map → supervise-identity-QavM_M4r.js.map} +1 -1
  60. package/dist/{supervision-discovery-DwRtZNdy.js → supervision-discovery-CFZnbNTB.js} +3 -3
  61. package/dist/{supervision-discovery-DwRtZNdy.js.map → supervision-discovery-CFZnbNTB.js.map} +1 -1
  62. package/dist/{supervisor-BlACe-uO.js → supervisor-BFs4u2Vo.js} +25 -16
  63. package/dist/supervisor-BFs4u2Vo.js.map +1 -0
  64. package/dist/{supervisor-accounting-DuFyM-_h.js → supervisor-accounting-CgipDzYg.js} +11 -3
  65. package/dist/{supervisor-accounting-DuFyM-_h.js.map → supervisor-accounting-CgipDzYg.js.map} +1 -1
  66. package/dist/{supervisor-root-contract-DCMw4u0V.js → supervisor-root-contract-Ca5xp0Vg.js} +3 -3
  67. package/dist/{supervisor-root-contract-DCMw4u0V.js.map → supervisor-root-contract-Ca5xp0Vg.js.map} +1 -1
  68. package/dist/testing.d.ts +1 -1
  69. package/dist/testing.js +11 -11
  70. package/dist/tool-loop.d.ts +1 -1
  71. package/dist/tool-loop.js +51 -52
  72. package/dist/tool-loop.js.map +1 -1
  73. package/dist/{tool-server-DQCdu3am.js → tool-server-Cb7LBW4e.js} +2 -2
  74. package/dist/{tool-server-DQCdu3am.js.map → tool-server-Cb7LBW4e.js.map} +1 -1
  75. package/dist/{top-web-C5vhiOFA.js → top-web-oDO4xhNE.js} +7 -7
  76. package/dist/{top-web-C5vhiOFA.js.map → top-web-oDO4xhNE.js.map} +1 -1
  77. package/dist/tui/bin.js +3 -3
  78. package/dist/tui/index.d.ts +1 -1
  79. package/dist/tui/index.js +2 -2
  80. package/dist/{types-CFmKHKiN.d.ts → types-CKsn_wgO.d.ts} +19 -3
  81. package/package.json +3 -3
  82. package/dist/driver-control-acknowledgers-CNNRjIo9.js.map +0 -1
  83. package/dist/graph-CUUtx7qT.js.map +0 -1
  84. package/dist/run-cancellation-BpUQZqBS.js.map +0 -1
  85. package/dist/supervise-fmugf6Y2.js.map +0 -1
  86. package/dist/supervisor-BlACe-uO.js.map +0 -1
@@ -1,16 +1,16 @@
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-CNNRjIo9.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-BlACe-uO.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-7_7DUghQ.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-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 { $t as scopeRetainedOwnerRestorePoint, At as abandonScopeRetainedOwnerInvocation, B as parseWorkerToolTraceArtifact, Bn as WORKER_TRACE_PROPAGATION, Br as providerAttemptEvidence, Bt as recordScopeOwnerMaterialization, Cr as SEAT_RECHECK_MS, Dr as seatExecutionProfile, Er as authoredSeatStages, Et as scopeRetainedOwnerResourceReader, Ft as beginScopeOwnerAttempt, Gt as coordinationProfileToolPrefix, Ht as scopeOwnerExecutionObservation, Jr as runtimeOwnedExecutorMaterialization, Jt as beginScopeRetainedOwnerDrive, Kr as runtimeOwnedDriveHarnessProviderEvidence, Kt as providerVisibleProfile, Lt as holdScopeOwnerTranscript, Mr as attestRuntimeOwnedScopeOwner, Mt as prepareScopeRetainedOwnerTask, Nr as authoredAgentIdentity, Nt as scopeRetainedOwnerPriorSpend, Pt as scopeRetainedOwnerResult, Qn as generateSpanId, Qr as runtimeOwnedScopeOwnerRuntime, Qt as reconcileScopeRetainedOwnerEnvironment, Rt as noteScopeOwnerPlannedExecution, Sr as isTerminalNodeStatus, Tr as SeatPauseError, Tt as releaseScopeRetainedOwnerForSeatPause, Ut as scopeOwnerExecutorNodeContext, Vr as recordRuntimeOwnedDriveHarnessProviderEvidence, Vt as restoreScopeOwnerAcceptedExecution, Wt as coordinationMcpAlias, Xn as createOtelExporter, Xr as runtimeOwnedPendingExecutorMaterialization, Xt as scopeRetainedOwnerTurnEnded, Yr as runtimeOwnedExecutorProviderEvidence, Zt as assertRetainedOwnerCoordinationRekey, _n as executorObservationSeamKey, ai as runtimeFlowAgent, dr as readHarnessTranscript, dt as meterRuntimeOwnedProviderAttempt, en as noteScopeRetainedOwnerCoordination, fr as settleHarnessTranscript, ft as pauseScopeSeatAdmission, ht as recordScopeOwnerPause, i as ROOT_STREAM_FILE, in as owners, jt as consumeScopeRetainedOwnerResult, l as readRootStream, mt as recordScopeOwnerDriverAttempt, nn as bindScopeRetainedOwnerEnvironmentId, o as createRootStreamSink, oi as runtimeFlowBrain, on as scopeRetainedOwnerContext, pt as recordScopeOwnerBarrenPause, qr as runtimeOwnedExecutorExecutionBinding, qt as runtimeGraphMetadataKey, ri as isRuntimeFlowBrain, rn as bindScopeRetainedOwnerProvider, sn as scopeRetainedOwnerJournalRoot, tt as assertRecursiveReservationPolicy, ur as persistHarnessTranscript, ut as meterRuntimeOwnedAccounting, vr as createActivityLog, wr as SeatChain, wt as prepareScopeRetainedOwnerSeatSwitch, xr as isLiveNodeStatus, zt as recordScopeOwnerHarnessTranscript } from "./supervisor-accounting-DuFyM-_h.js";
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
8
  import { _ as runAbortable, g as linkAbort, p as RunCancellationReason } from "./jsonl-file-vE9H9UXa.js";
9
9
  import { a as createContinuationKeeper, i as checkVerdictOf, n as admitContinuationPolicy, r as bestComposite, t as CONTINUATIONS_DIR } from "./continuation-Bccak14N.js";
10
- import { $ as newUsageTotals, B as turnFailurePolicy, C as jitteredMs, D as unavailableResumeAt, E as unavailablePauseMs, L as harnessProcessDied, M as contentAddress, Ot as recordValue, P as executorFailure, Q as meterUsageEvent, S as cappedDoublingMs, T as reportedResetAt, g as registerRetainedExecutorPreparation, l as RetainedExecutionPendingError, nt as assertValidBudget, tt as spendFromUsageTotals, v as retainedExecutorSeamKey, y as RATE_LIMIT_SIGNALS, z as turnFailureOf } from "./failure-cause-DoCCGLDH.js";
11
- import { c as writeRunCancellation, i as readRunCancellation, r as readRunCancelRequest, s as watchRunCancellation, t as applyRunCancellation } from "./run-cancellation-BpUQZqBS.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-DQCdu3am.js";
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
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";
@@ -5314,7 +5314,8 @@ var DriverRetryLoop = class {
5314
5314
  /** Read a failed drive, then pause or retry it, or throw the stop that ends the loop. */
5315
5315
  async afterFailure(error, attempt, before, startedAt) {
5316
5316
  const durationMs = this.limits.now() - startedAt;
5317
- const classification = classifyDriverFailure(error, this.run.signal, this.run.stopSignal);
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);
5318
5319
  const after = this.run.progress();
5319
5320
  const progressed = madeProgress(before, after);
5320
5321
  if (progressed) {
@@ -5335,7 +5336,7 @@ var DriverRetryLoop = class {
5335
5336
  pending
5336
5337
  };
5337
5338
  this.sameIdle = progressed ? void 0 : extend(this.sameIdle, error);
5338
- if (classification !== "terminal" && !(classification === "unavailable" && pending === void 0 && this.run.budget().deadlineMs > 0 && RATE_LIMIT_SIGNALS.has((upstreamUnavailableSignal(error) ?? "").toLowerCase())) && !this.run.signal.aborted && budgetStop(this.run.budget(), this.limits.now()) === void 0 && (this.sameIdle?.count ?? 0) >= 3) {
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) {
5339
5340
  const stop = pending === void 0 || classification === "unavailable" ? "repeated-failure" : "pending-unresolved";
5340
5341
  await this.emit({
5341
5342
  ...this.failureRecord(failure),
@@ -6211,7 +6212,7 @@ async function driveManagerTurn(loop, attempt, reentry) {
6211
6212
  const owner = owners.get(scope);
6212
6213
  if (owner) owner.replaceDeadExecution = reentry?.reason === "driver-failure" && harnessProcessDied(reentry.failure);
6213
6214
  loop.candidate = void 0;
6214
- if (deps.controlDir !== void 0 && deps.abortRun !== void 0) applyRunCancellation(deps.controlDir, deps.abortRun, () => (/* @__PURE__ */ new Date()).toISOString());
6215
+ if (deps.controlDir !== void 0 && deps.abortRun !== void 0) await applyRunCancellationAsync(deps.controlDir, deps.abortRun, () => (/* @__PURE__ */ new Date()).toISOString());
6215
6216
  scope.signal.throwIfAborted();
6216
6217
  beginScopeOwnerAttempt(scope, attempt);
6217
6218
  controls.beginDriverAttempt(attempt);
@@ -7403,7 +7404,7 @@ function leafWorker(env, seat, admitted, spawnContext, recovering) {
7403
7404
  const { options, deliverable, runNamespace } = env.setup;
7404
7405
  const { childDeliverable } = admitted;
7405
7406
  const name = admitted.authorized.name ?? "";
7406
- 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);
7407
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");
7408
7409
  return withModelSubstitution((childDeliverable === deliverable ? env.makeLeaf : workerFromBackend(options.backend, childDeliverable))(admitted.authorized, Object.freeze({
7409
7410
  ...admitted.authorizedContext,
@@ -7666,7 +7667,7 @@ async function verifyProfilePromotions(table) {
7666
7667
  * never a success. A request the run ended before applying is expired here too, so a reader can
7667
7668
  * tell run-over from in-progress and a stale request cannot outlive its run.
7668
7669
  */
7669
- function recordRunCancellationOutcome(runDir, result, now) {
7670
+ async function recordRunCancellationOutcome(runDir, result, now) {
7670
7671
  if (runDir === void 0) return;
7671
7672
  const dir = resolve(runDir);
7672
7673
  const request = readRunCancelRequest(dir);
@@ -7686,7 +7687,7 @@ function recordRunCancellationOutcome(runDir, result, now) {
7686
7687
  ...request.operator === void 0 ? {} : { operator: request.operator }
7687
7688
  };
7688
7689
  if (record === void 0) {
7689
- writeRunCancellation(dir, {
7690
+ await writeRunCancellationAsync(dir, {
7690
7691
  ...base,
7691
7692
  effect: "not_live",
7692
7693
  detail: "run ended before the request was applied"
@@ -7694,14 +7695,14 @@ function recordRunCancellationOutcome(runDir, result, now) {
7694
7695
  return;
7695
7696
  }
7696
7697
  if (aborted && result.teardownUnconfirmed?.length) {
7697
- writeRunCancellation(dir, {
7698
+ await writeRunCancellationAsync(dir, {
7698
7699
  ...base,
7699
7700
  effect: "unknown",
7700
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(", ")}`
7701
7702
  });
7702
7703
  return;
7703
7704
  }
7704
- writeRunCancellation(dir, aborted ? {
7705
+ await writeRunCancellationAsync(dir, aborted ? {
7705
7706
  ...base,
7706
7707
  effect: "cancelled",
7707
7708
  detail: "the run reached its terminal cancelled state"
@@ -8278,7 +8279,10 @@ async function executeDriverAttempt(input) {
8278
8279
  node: scopeOwnerExecutorNodeContext(scope),
8279
8280
  seams: {
8280
8281
  [executorObservationSeamKey]: observation,
8281
- ...retainedOwnerSeam(retainedOwner, async (result) => attempt.commitOwnerResult(result), () => {
8282
+ ...retainedOwnerSeam(retainedOwner && {
8283
+ ...retainedOwner,
8284
+ deadlineMs: scope.rootDeadlineAtMs
8285
+ }, async (result) => attempt.commitOwnerResult(result), () => {
8282
8286
  transcriptRecorded = true;
8283
8287
  }),
8284
8288
  [bridgeStopSignalKey]: stopSignal,
@@ -9245,7 +9249,7 @@ function pendingCancellationRun(profile, task, opts) {
9245
9249
  signal: options.signal === void 0 ? controller.signal : AbortSignal.any([controller.signal, options.signal]),
9246
9250
  interactiveBindingDir: runDir
9247
9251
  });
9248
- recordRunCancellationOutcome(runDir, result, now);
9252
+ await recordRunCancellationOutcome(runDir, result, now);
9249
9253
  return {
9250
9254
  ...result,
9251
9255
  rootProviderModel: rootProviderModelEvidence([]),
@@ -9267,7 +9271,7 @@ async function startSupervisedRun(run) {
9267
9271
  if (runControl !== void 0) supervisor.attach(runControl);
9268
9272
  const cancellation = runDir !== void 0 && runControl !== void 0 ? watchRunCancellation(runDir, cancelDurableRun) : void 0;
9269
9273
  try {
9270
- cancellation?.check();
9274
+ await cancellation?.check();
9271
9275
  } catch (error) {
9272
9276
  cancellation?.close();
9273
9277
  throw error;
@@ -9445,10 +9449,10 @@ async function settleSupervisedRun(run, pending, cancellation) {
9445
9449
  rootStream = await setup.rootStreamSink?.close();
9446
9450
  } finally {
9447
9451
  cancellation?.close();
9448
- cancellation?.check();
9452
+ await cancellation?.check();
9449
9453
  }
9450
9454
  }
9451
- recordRunCancellationOutcome(options.runDir, result, setup.now);
9455
+ await recordRunCancellationOutcome(options.runDir, result, setup.now);
9452
9456
  if (rootDriveHarness !== void 0) await settleHarnessTranscript(rootDriveHarness);
9453
9457
  const rootHarnessTranscript = rootDriveHarness === void 0 ? void 0 : await persistHarnessTranscript(readHarnessTranscript(rootDriveHarness), setup.blobs);
9454
9458
  const rootProviderModel = ctx.resume === true ? rootProviderModelEvidence([]) : rootProviderModels.length > 0 ? rootProviderModelEvidence(rootProviderModels) : rootDriveHarness === void 0 ? rootProviderModelEvidence([]) : rootProviderModelEvidenceFromExecution(runtimeOwnedDriveHarnessProviderEvidence(rootDriveHarness));
@@ -9494,4 +9498,4 @@ function superviseWithContext(profile, task, opts, brain) {
9494
9498
  }
9495
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 };
9496
9500
 
9497
- //# sourceMappingURL=supervise-fmugf6Y2.js.map
9501
+ //# sourceMappingURL=supervise-D7jtypE-.js.map