@tangle-network/agent-runtime 10.0.15 → 10.0.17

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 (101) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{activation-BmdINnh5.d.ts → activation-BSyIPZNw.d.ts} +2 -2
  3. package/dist/{activation-b0nzPqca.js → activation-CxTZHC70.js} +2 -2
  4. package/dist/{activation-b0nzPqca.js.map → activation-CxTZHC70.js.map} +1 -1
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +4 -4
  7. package/dist/{continuation-Bccak14N.js → continuation-CDdjAkpk.js} +2 -2
  8. package/dist/{continuation-Bccak14N.js.map → continuation-CDdjAkpk.js.map} +1 -1
  9. package/dist/{coordination-map-routing-XZXTlCmn.js → coordination-map-routing-DovTCk1Y.js} +2 -2
  10. package/dist/{coordination-map-routing-XZXTlCmn.js.map → coordination-map-routing-DovTCk1Y.js.map} +1 -1
  11. package/dist/{delegate-CLaWDfML.js → delegate-DGeAiukN.js} +2 -2
  12. package/dist/{delegate-CLaWDfML.js.map → delegate-DGeAiukN.js.map} +1 -1
  13. package/dist/{driver-control-acknowledgers-NPX-VWeS.js → driver-control-acknowledgers-Q4c0RMoG.js} +10 -10
  14. package/dist/{driver-control-acknowledgers-NPX-VWeS.js.map → driver-control-acknowledgers-Q4c0RMoG.js.map} +1 -1
  15. package/dist/durable-writer-thread.js +4 -4
  16. package/dist/durable.d.ts +2 -1
  17. package/dist/durable.js +18 -16
  18. package/dist/durable.js.map +1 -1
  19. package/dist/{failure-cause-B2TBXIu-.js → failure-cause-DeSINrKC.js} +20 -10
  20. package/dist/{failure-cause-B2TBXIu-.js.map → failure-cause-DeSINrKC.js.map} +1 -1
  21. package/dist/{graph-B2OzHayc.js → graph-qm8N8-Jg.js} +31 -12
  22. package/dist/graph-qm8N8-Jg.js.map +1 -0
  23. package/dist/{graph-registry-BmghD_VO.js → graph-registry-SgsCxCTZ.js} +5 -5
  24. package/dist/{graph-registry-BmghD_VO.js.map → graph-registry-SgsCxCTZ.js.map} +1 -1
  25. package/dist/{graph-registry-DQ2-dA0X.js → graph-registry-aMRd94PD.js} +1 -1
  26. package/dist/{improve-dYbnuXC8.js → improve-BIgddUb2.js} +8 -8
  27. package/dist/{improve-dYbnuXC8.js.map → improve-BIgddUb2.js.map} +1 -1
  28. package/dist/index.d.ts +3 -3
  29. package/dist/index.js +12 -12
  30. package/dist/intelligence.d.ts +2 -2
  31. package/dist/intelligence.js +5 -5
  32. package/dist/{jsonl-file-vE9H9UXa.js → jsonl-file-B8xfYz9M.js} +14 -3
  33. package/dist/{jsonl-file-vE9H9UXa.js.map → jsonl-file-B8xfYz9M.js.map} +1 -1
  34. package/dist/kernel.d.ts +1 -1
  35. package/dist/kernel.js +19 -19
  36. package/dist/{loop-runner-UfFomLu5.js → loop-runner-CARBEmJ-.js} +2 -2
  37. package/dist/{loop-runner-UfFomLu5.js.map → loop-runner-CARBEmJ-.js.map} +1 -1
  38. package/dist/{loop-runner-AQcWx9uu.d.ts → loop-runner-CG8rMjSU.d.ts} +2 -2
  39. package/dist/loop-runner-bin.d.ts +1 -1
  40. package/dist/loop-runner-bin.js +1 -1
  41. package/dist/mcp/bin.js +3 -3
  42. package/dist/mcp/index.d.ts +1 -1
  43. package/dist/mcp/index.js +7 -7
  44. package/dist/mcp/memory-bin.js +1 -1
  45. package/dist/{model-policy-DTbTFyOG.js → model-policy-DFuhCC0-.js} +27 -2
  46. package/dist/model-policy-DFuhCC0-.js.map +1 -0
  47. package/dist/profiles.d.ts +1 -1
  48. package/dist/profiles.js +1 -1
  49. package/dist/{provision-supervisor-DSDkye8b.js → provision-supervisor-bnP_5YKO.js} +8 -8
  50. package/dist/{provision-supervisor-DSDkye8b.js.map → provision-supervisor-bnP_5YKO.js.map} +1 -1
  51. package/dist/{result-blob-store-nBpCKwFg.js → result-blob-store-hfSuzvWt.js} +4 -4
  52. package/dist/{result-blob-store-nBpCKwFg.js.map → result-blob-store-hfSuzvWt.js.map} +1 -1
  53. package/dist/{run-cancellation-BYnz8GlN.js → run-cancellation-3JALg48v.js} +2 -2
  54. package/dist/{run-cancellation-BYnz8GlN.js.map → run-cancellation-3JALg48v.js.map} +1 -1
  55. package/dist/{run-lock-Ckakh1Uq.js → run-lock-BOg7BaXF.js} +2 -2
  56. package/dist/{run-lock-Ckakh1Uq.js.map → run-lock-BOg7BaXF.js.map} +1 -1
  57. package/dist/{run-reopen-CQjs4kpp.js → run-reopen-CrlP610D.js} +6 -6
  58. package/dist/{run-reopen-CQjs4kpp.js.map → run-reopen-CrlP610D.js.map} +1 -1
  59. package/dist/{run-state-DI59zWDh.js → run-state-CdmftIyV.js} +7 -7
  60. package/dist/{run-state-DI59zWDh.js.map → run-state-CdmftIyV.js.map} +1 -1
  61. package/dist/{runtime-DZupdBai.js → runtime-BJfxfru1.js} +45 -22
  62. package/dist/{runtime-DZupdBai.js.map → runtime-BJfxfru1.js.map} +1 -1
  63. package/dist/{search-executor-DXKX36KX.js → search-executor-B0XqNpI1.js} +5 -5
  64. package/dist/{search-executor-DXKX36KX.js.map → search-executor-B0XqNpI1.js.map} +1 -1
  65. package/dist/{server-db_tgJ2j.js → server-BL1KHd0N.js} +4 -4
  66. package/dist/{server-db_tgJ2j.js.map → server-BL1KHd0N.js.map} +1 -1
  67. package/dist/{settle-record-DV7zCjhI.js → settle-record-CWixHcZl.js} +5 -4
  68. package/dist/{settle-record-DV7zCjhI.js.map → settle-record-CWixHcZl.js.map} +1 -1
  69. package/dist/{snapshot-BKI_w3JD.js → snapshot-BKLziJ5K.js} +12 -4
  70. package/dist/snapshot-BKLziJ5K.js.map +1 -0
  71. package/dist/{structural-rollout-BgGJOWEx.js → structural-rollout-PkvuJbEk.js} +5 -5
  72. package/dist/{structural-rollout-BgGJOWEx.js.map → structural-rollout-PkvuJbEk.js.map} +1 -1
  73. package/dist/{supervise-jfYp4dyB.js → supervise-CPMm88sh.js} +72 -37
  74. package/dist/supervise-CPMm88sh.js.map +1 -0
  75. package/dist/{supervise-identity-uI2Ke-Mm.js → supervise-identity-BAOmWwLn.js} +4 -4
  76. package/dist/{supervise-identity-uI2Ke-Mm.js.map → supervise-identity-BAOmWwLn.js.map} +1 -1
  77. package/dist/{supervision-discovery-CHRT0UXq.js → supervision-discovery-B6fyGpHe.js} +4 -4
  78. package/dist/{supervision-discovery-CHRT0UXq.js.map → supervision-discovery-B6fyGpHe.js.map} +1 -1
  79. package/dist/{supervisor-BVtN_Szy.js → supervisor-BOYyb8eL.js} +15 -12
  80. package/dist/supervisor-BOYyb8eL.js.map +1 -0
  81. package/dist/{supervisor-accounting--LFd8H4U.js → supervisor-accounting-BmY9xWOW.js} +5 -5
  82. package/dist/{supervisor-accounting--LFd8H4U.js.map → supervisor-accounting-BmY9xWOW.js.map} +1 -1
  83. package/dist/{supervisor-root-contract-xlqe8DE1.js → supervisor-root-contract-DIMbL04L.js} +3 -3
  84. package/dist/{supervisor-root-contract-xlqe8DE1.js.map → supervisor-root-contract-DIMbL04L.js.map} +1 -1
  85. package/dist/testing.d.ts +1 -1
  86. package/dist/testing.js +11 -11
  87. package/dist/{tool-server-B_cNseNf.js → tool-server--58hhIKE.js} +2 -2
  88. package/dist/{tool-server-B_cNseNf.js.map → tool-server--58hhIKE.js.map} +1 -1
  89. package/dist/{top-web-CRmycSiU.js → top-web-CPzT4hJX.js} +23 -18
  90. package/dist/top-web-CPzT4hJX.js.map +1 -0
  91. package/dist/tui/bin.js +3 -3
  92. package/dist/tui/index.d.ts +3 -2
  93. package/dist/tui/index.js +2 -2
  94. package/dist/{types-Br9sWTWk.d.ts → types-C477vlPv.d.ts} +49 -42
  95. package/package.json +4 -2
  96. package/dist/graph-B2OzHayc.js.map +0 -1
  97. package/dist/model-policy-DTbTFyOG.js.map +0 -1
  98. package/dist/snapshot-BKI_w3JD.js.map +0 -1
  99. package/dist/supervise-jfYp4dyB.js.map +0 -1
  100. package/dist/supervisor-BVtN_Szy.js.map +0 -1
  101. package/dist/top-web-CRmycSiU.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-NPX-VWeS.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-BVtN_Szy.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-uI2Ke-Mm.js";
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";
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-Q4c0RMoG.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-BOYyb8eL.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-BAOmWwLn.js";
5
+ import { a as errMessage, c as errorStack, f as defaultRedactor, i as causeChain, l as errorText, n as detachedSnapshot, o as errorHttpStatus, u as providerTraceId } from "./snapshot-BKLziJ5K.js";
6
6
  import { t as composeRuntimeHooks } from "./runtime-hooks-CsW2pfFk.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--LFd8H4U.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-B2TBXIu-.js";
11
- import { a as readRunCancelRequest, d as writeRunCancellationAsync, l as watchRunCancellation, n as applyRunCancellationAsync, o as readRunCancellation, t as applyRunCancellation } from "./run-cancellation-BYnz8GlN.js";
12
- import { o as safeJsonText } from "./coordination-map-routing-XZXTlCmn.js";
13
- import { n as createStdioToolServer } from "./tool-server-B_cNseNf.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-BmY9xWOW.js";
8
+ import { _ as runAbortable, g as linkAbort, p as RunCancellationReason } from "./jsonl-file-B8xfYz9M.js";
9
+ import { a as createContinuationKeeper, i as checkVerdictOf, n as admitContinuationPolicy, r as bestComposite, t as CONTINUATIONS_DIR } from "./continuation-CDdjAkpk.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, _ as retainedExecutorContext, 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-DeSINrKC.js";
11
+ import { a as readRunCancelRequest, d as writeRunCancellationAsync, l as watchRunCancellation, n as applyRunCancellationAsync, o as readRunCancellation, t as applyRunCancellation } from "./run-cancellation-3JALg48v.js";
12
+ import { o as safeJsonText } from "./coordination-map-routing-DovTCk1Y.js";
13
+ import { n as createStdioToolServer } from "./tool-server--58hhIKE.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-DTbTFyOG.js";
17
- import { a as graphRegistry, c as loadGraph } from "./graph-registry-BmghD_VO.js";
16
+ import { a as concreteProfileModel, b as harnessRunsAgent, c as profileModelExecutionSettings, l as profileProviderModel, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile, v as agentHarness } from "./model-policy-DFuhCC0-.js";
17
+ import { a as graphRegistry, c as loadGraph } from "./graph-registry-SgsCxCTZ.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";
@@ -3660,12 +3660,14 @@ function assertPerWorkerAdmittable(perWorker, pool, ownerShare) {
3660
3660
  function defaultPerWorker(budget, ownerShare, workerSlots) {
3661
3661
  const slots = typeof workerSlots === "number" ? workerSlots : workerSlots?.max;
3662
3662
  const share = (1 - ownerShare) / (slots !== void 0 && slots > 0 ? slots : 4);
3663
+ const iterations = budget.maxIterations;
3664
+ const minimum = iterations !== void 0 && iterations > Math.max(1, Math.ceil(iterations * ownerShare)) ? 1 : 0;
3663
3665
  return {
3664
3666
  ...budget.resources === void 0 ? {} : { resources: Object.fromEntries(Object.entries(budget.resources).map(([name, value]) => [name, {
3665
3667
  unit: value.unit,
3666
3668
  limit: Math.floor(value.limit * share)
3667
3669
  }])) },
3668
- ...budget.maxIterations === void 0 ? {} : { maxIterations: Math.max(0, Math.floor(budget.maxIterations * share)) },
3670
+ ...iterations === void 0 ? {} : { maxIterations: Math.max(minimum, Math.floor(iterations * share)) },
3669
3671
  ...budget.maxTokens === void 0 ? {} : { maxTokens: Math.max(0, Math.floor(budget.maxTokens * share)) },
3670
3672
  ...budget.maxUsd !== void 0 ? { maxUsd: budget.maxUsd * share } : {}
3671
3673
  };
@@ -5294,12 +5296,15 @@ var DriverRetryLoop = class {
5294
5296
  }
5295
5297
  failureRecord(failure) {
5296
5298
  const producerFailure = turnFailureOf(failure.error);
5297
- const stack = errorStack(failure.error);
5299
+ const links = causeChain(failure.error);
5300
+ const traceId = providerTraceId(links);
5301
+ const stack = errorStack(links);
5298
5302
  return {
5299
5303
  attempt: failure.attempt,
5300
5304
  durationMs: failure.durationMs,
5301
5305
  error: errMessage(failure.error),
5302
5306
  ...stack === void 0 ? {} : { errorStack: stack },
5307
+ ...traceId === void 0 ? {} : { providerTraceId: traceId },
5303
5308
  ...producerFailure === void 0 ? {} : { failure: producerFailure },
5304
5309
  classification: failure.classification,
5305
5310
  ...failure.classification === "transient" ? { failureKind: transientFailureKind(failure.error) } : {},
@@ -7150,32 +7155,36 @@ function coordinationRuntimeAttachment(url, key) {
7150
7155
  * `supervise()` gives a traced run's workers their trace context without ordering the span recorder
7151
7156
  * ahead of the worker seam.
7152
7157
  *
7153
- * Continuity: the `bridge` backend honors `continuity: 'resume'` by session re-attachment. A
7154
- * bridge session id IS the harness conversation key (cli-bridge maps it to the CLI's own resume —
7155
- * opencode `-s <id>`, claude `--resume`), so this seam records the session id each supervised
7156
- * spawn was bound to, keyed by the worker id the Scope assigned, and a resume spawn binds the
7157
- * prior worker's recorded session id instead of deriving a fresh one. The record is process-local
7158
- * by construction, which matches the kernel's resume boundary (a prior process's workers are not
7159
- * resume targets). Every other backend keeps failing loud: their executors have no re-attachable
7160
- * session, and accepting the spawn would ledger `continuity: 'resume'` over a brand-new session —
7161
- * a stamp asserting something that never happened.
7158
+ * Continuity: the `bridge` and `provider` backends honor `continuity: 'resume'` by session
7159
+ * re-attachment. A bridge session id IS the harness conversation key (cli-bridge maps it to the
7160
+ * CLI's own resume — opencode `-s <id>`, claude `--resume`, codex `exec resume`), and a retained
7161
+ * provider session is that same key one layer up, so this seam records the session each supervised
7162
+ * spawn was bound to, keyed by the worker id the Scope assigned, and a resume spawn binds the prior
7163
+ * worker's recorded session instead of deriving a fresh one. A provider worker's session is the
7164
+ * one its retained environment admission names; the resumed worker gets a new environment, since
7165
+ * the earlier one is torn down when its node settles, and dispatches its first turn into that
7166
+ * session. The record is process-local by construction, which matches the kernel's resume boundary
7167
+ * (a prior process's workers are not resume targets). Every other backend keeps failing loud: their
7168
+ * executors have no re-attachable session, and accepting the spawn would ledger
7169
+ * `continuity: 'resume'` over a brand-new session — a stamp asserting something that never
7170
+ * happened.
7162
7171
  */
7163
7172
  function workerFromBackend(backend, deliverable, seams) {
7164
7173
  const capturedBackend = captureReusableExecutorConfig(backend, "workerFromBackend");
7165
7174
  const unscopedNamespace = randomUUID();
7166
7175
  let unscopedOrdinal = 0;
7167
- const bridgeSessionByWorker = /* @__PURE__ */ new Map();
7176
+ const sessionByWorker = /* @__PURE__ */ new Map();
7168
7177
  return (rawProfile, spawnContext) => {
7169
7178
  const parsed = agentProfileSchema.safeParse(rawProfile);
7170
7179
  if (!parsed.success) throw new ValidationError(`workerFromBackend: invalid AgentProfile: ${parsed.error.message}`);
7171
7180
  const profile = parsed.data;
7172
7181
  assertBackendProfileMaterialization(profile, capturedBackend, "workerFromBackend");
7173
7182
  assertBridgeProfileMaterializes(profile, capturedBackend, "workerFromBackend");
7174
- const resumeSessionId = bridgeResumeSessionId(capturedBackend, spawnContext, bridgeSessionByWorker);
7183
+ const resumeSessionId = resumeSessionIdFor(capturedBackend, spawnContext, sessionByWorker);
7175
7184
  const name = profile.name ?? "worker";
7176
7185
  const assignmentId = spawnContext?.assignmentId ?? `unscoped:${unscopedNamespace}:${unscopedOrdinal++}`;
7177
7186
  const executionScope = spawnContext?.parentNodeId;
7178
- const boundBackend = bindReusableExecutorExecutionId(capturedBackend, resumeSessionId ?? externalExecutionId("supervised-worker", {
7187
+ const boundBackend = bindReusableExecutorExecutionId(capturedBackend, (capturedBackend.backend === "bridge" ? resumeSessionId : void 0) ?? externalExecutionId("supervised-worker", {
7179
7188
  assignmentId,
7180
7189
  ...executionScope === void 0 ? {} : { scope: executionScope }
7181
7190
  }));
@@ -7216,7 +7225,7 @@ function workerFromBackend(backend, deliverable, seams) {
7216
7225
  } : leafBackend);
7217
7226
  const baseFactory = deliverable && !analyst ? gateFactoryOnDeliverable(rawFactory, deliverable) : rawFactory;
7218
7227
  const executorFactory = (spec, ctx) => {
7219
- if (boundSessionId !== void 0 && ctx.node?.nodeId !== void 0) bridgeSessionByWorker.set(ctx.node.nodeId, boundSessionId);
7228
+ if (boundSessionId !== void 0 && ctx.node?.nodeId !== void 0) sessionByWorker.set(ctx.node.nodeId, boundSessionId);
7220
7229
  const extraSeams = seams?.();
7221
7230
  const seamsForChild = extraSeams === void 0 && (peerMailAttachment === void 0 || boundBackend.backend === "provider") ? ctx.seams : {
7222
7231
  ...extraSeams,
@@ -7226,10 +7235,10 @@ function workerFromBackend(backend, deliverable, seams) {
7226
7235
  ...peerMailAttachment
7227
7236
  } }
7228
7237
  };
7229
- return baseFactory(spec, seamsForChild === ctx.seams ? ctx : {
7238
+ return baseFactory(spec, providerResumeContext(seamsForChild === ctx.seams ? ctx : {
7230
7239
  ...ctx,
7231
7240
  seams: seamsForChild
7232
- });
7241
+ }, boundBackend, resumeSessionId, sessionByWorker));
7233
7242
  };
7234
7243
  return {
7235
7244
  name,
@@ -7244,17 +7253,43 @@ function workerFromBackend(backend, deliverable, seams) {
7244
7253
  };
7245
7254
  }
7246
7255
  /**
7247
- * The bridge session id a `'resume'` spawn re-attaches, or `undefined` for a fresh spawn.
7248
- * Every refusal throws BEFORE a worker exists, which is what keeps the kernel's continuity
7249
- * ledger true: a `'resume'` stamp can only appear over a session that was actually re-attached.
7256
+ * A provider worker's session is known only once its retained environment is admitted: record it
7257
+ * then under the worker's Scope id, and give a resumed worker the session it continues. A worker
7258
+ * without a retained context (no journal, or a provider without retained control) records nothing,
7259
+ * so a later resume of it is refused before any worker exists.
7260
+ */
7261
+ function providerResumeContext(ctx, backend, resumeSessionId, sessionByWorker) {
7262
+ const retention = backend.backend === "provider" ? retainedExecutorContext(ctx) : void 0;
7263
+ const workerId = ctx.node?.nodeId;
7264
+ if (retention === void 0 || workerId === void 0) return ctx;
7265
+ return {
7266
+ ...ctx,
7267
+ seams: {
7268
+ ...ctx.seams,
7269
+ [retainedExecutorSeamKey]: {
7270
+ ...retention,
7271
+ ...resumeSessionId === void 0 ? {} : { resumeSessionId },
7272
+ onAdmission: async (admission) => {
7273
+ await retention.onAdmission(admission);
7274
+ if (admission.phase === "environment") sessionByWorker.set(workerId, admission.sessionId);
7275
+ }
7276
+ }
7277
+ }
7278
+ };
7279
+ }
7280
+ /**
7281
+ * The session id a `'resume'` spawn re-attaches, or `undefined` for a fresh spawn: the bridge
7282
+ * session the prior worker was bound to, or the retained provider session its environment
7283
+ * admission named. Every refusal throws BEFORE a worker exists, which is what keeps the kernel's
7284
+ * continuity ledger true: a `'resume'` stamp can only appear over a session that was re-attached.
7250
7285
  */
7251
- function bridgeResumeSessionId(backend, spawnContext, sessions) {
7286
+ function resumeSessionIdFor(backend, spawnContext, sessions) {
7252
7287
  if (spawnContext?.continuity !== "resume") return void 0;
7253
- if (backend.backend !== "bridge") throw new ValidationError(`workerFromBackend: the '${backend.backend}' backend seam does not re-attach sessions and cannot honor continuity: 'resume' — only the 'bridge' backend resumes here (cli-bridge keys the harness conversation by session id). Provide a makeWorkerAgent that resumes (it receives spawnContext.resume.ofWorker), or use continuity: 'fresh'`);
7288
+ if (backend.backend !== "bridge" && backend.backend !== "provider") throw new ValidationError(`workerFromBackend: the '${backend.backend}' backend seam does not re-attach sessions and cannot honor continuity: 'resume' — only the 'bridge' and 'provider' backends resume here (cli-bridge keys the harness conversation by session id). Provide a makeWorkerAgent that resumes (it receives spawnContext.resume.ofWorker), or use continuity: 'fresh'`);
7254
7289
  const ofWorker = spawnContext.resume?.ofWorker;
7255
7290
  if (ofWorker === void 0) throw new ValidationError("workerFromBackend: a 'resume' spawn carries no resume lineage — the kernel stamps spawnContext.resume for ledgered spawns; a direct caller must pass { ofWorker, sequence }");
7256
7291
  const prior = sessions.get(ofWorker);
7257
- if (prior === void 0) throw new ValidationError(`workerFromBackend: no recorded bridge session for worker '${ofWorker}' — this seam re-attaches only sessions it bound in this process (the kernel resume boundary). Spawn the node fresh first, or use continuity: 'fresh'`);
7292
+ if (prior === void 0) throw new ValidationError(`workerFromBackend: no recorded ${backend.backend} session for worker '${ofWorker}' — this seam re-attaches only sessions it bound in this process (the kernel resume boundary), and a provider worker records one only once its retained environment is admitted. Spawn the node fresh first, or use continuity: 'fresh'`);
7258
7293
  return prior;
7259
7294
  }
7260
7295
  /**
@@ -9510,4 +9545,4 @@ function superviseWithContext(profile, task, opts, brain) {
9510
9545
  }
9511
9546
  export { validateGraphTopology as A, allWorkersStalled as B, createFlowRun as C, validateFlowGraph as D, routeFlowOf as E, dumbContinuationPassPrompt as F, areaUnderCurve as G, noProgressFor as H, formatPromptHandle as I, renderAnytimeTable as J, bestSoFar as K, kernelPromptRegistry as L, createPromptRegistry as M, delegatesWorkerBriefPrompt as N, defaultEdgeTraversalCap as O, dumbContinuationFailPrompt as P, naiveContinuationPrompt as R, GraphRouteError as S, journaledGateDecider as T, plateau as U, anyOf as V, anytimeReport as W, createSupervisorSpanRecorder as Y, graphFlowSpawnProfile as _, bridgeProfileRefusal as a, serveCoordinationMcp as b, ASSISTANT_REASONING_SPAN as c, runToolSpans as d, UNPROVEN_CONTINUITY as f, createGraphOverlay as g, runBrainLoop as h, workerFromBackend as i, analyzesFindingsReportPrompt as j, graphRootProfile as k, ASSISTANT_TEXT_SPAN as l, driverAgent as m, superviseFleetCapabilities as n, supervisorAgent as o, composeReentryTask as p, plateauLength as q, superviseWithTestBrain as r, supervisorAgentWithTestBrain as s, supervise as t, rootStreamToolSpans as u, profileGuidanceComposer as v, flowRootProfile as w, coordinationControlToolNames as x, superviseRootProfile as y, promptHandle as z };
9512
9547
 
9513
- //# sourceMappingURL=supervise-jfYp4dyB.js.map
9548
+ //# sourceMappingURL=supervise-CPMm88sh.js.map