@tangle-network/agent-runtime 3.0.25 → 3.0.28
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-CBcWaDyp.d.ts → activation-D0dnzmz_.d.ts} +2 -2
- package/dist/{activation-BGb32PiH.js → activation-S-j21Taq.js} +2 -2
- package/dist/{activation-BGb32PiH.js.map → activation-S-j21Taq.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -3
- package/dist/{coordination-manager-DjfXXHvG.js → coordination-manager-BLBx2kRA.js} +4 -4
- package/dist/{coordination-manager-DjfXXHvG.js.map → coordination-manager-BLBx2kRA.js.map} +1 -1
- package/dist/{delegate-CkvYXR2m.js → delegate-Dn0kRN_B.js} +2 -2
- package/dist/{delegate-CkvYXR2m.js.map → delegate-Dn0kRN_B.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +6 -6
- package/dist/{graph-BThFomZ3.js → graph-De6rZ7m3.js} +8 -6
- package/dist/{graph-BThFomZ3.js.map → graph-De6rZ7m3.js.map} +1 -1
- package/dist/{improve-DDLSgIAy.js → improve-B8uP78z5.js} +6 -6
- package/dist/{improve-DDLSgIAy.js.map → improve-B8uP78z5.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +11 -11
- package/dist/{loop-runner-BFDFst3d.js → loop-runner-DEyxw1yO.js} +2 -2
- package/dist/{loop-runner-BFDFst3d.js.map → loop-runner-DEyxw1yO.js.map} +1 -1
- package/dist/{loop-runner-CgGtE2SB.d.ts → loop-runner-_3NabgWH.d.ts} +2 -2
- 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 +5 -5
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-kVbZwZdr.js → provision-supervisor-D_ulxheH.js} +4 -4
- package/dist/{provision-supervisor-kVbZwZdr.js.map → provision-supervisor-D_ulxheH.js.map} +1 -1
- package/dist/{run-cancellation-CZdg-wlk.js → run-cancellation-CR__IFPB.js} +2 -2
- package/dist/{run-cancellation-CZdg-wlk.js.map → run-cancellation-CR__IFPB.js.map} +1 -1
- package/dist/{runtime-CyZN9kR-.js → runtime-BrmgtGp5.js} +11 -11
- package/dist/{runtime-CyZN9kR-.js.map → runtime-BrmgtGp5.js.map} +1 -1
- package/dist/{scope-zYzxBt1q.js → scope-CO9ZhnIA.js} +54 -47
- package/dist/scope-CO9ZhnIA.js.map +1 -0
- package/dist/{search-executor-Btb-gz4q.js → search-executor-CvjTlr_S.js} +3 -3
- package/dist/{search-executor-Btb-gz4q.js.map → search-executor-CvjTlr_S.js.map} +1 -1
- package/dist/{server-BD7YoVmE.js → server-CQfmSsGW.js} +3 -3
- package/dist/{server-BD7YoVmE.js.map → server-CQfmSsGW.js.map} +1 -1
- package/dist/{structural-rollout-CGkZUyaO.js → structural-rollout-nHduSfDO.js} +3 -3
- package/dist/{structural-rollout-CGkZUyaO.js.map → structural-rollout-nHduSfDO.js.map} +1 -1
- package/dist/{supervise-BKfejmq_.js → supervise-BgoGHI7a.js} +60 -45
- package/dist/supervise-BgoGHI7a.js.map +1 -0
- package/dist/{supervision-discovery-DzDhlOOp.js → supervision-discovery-C9wL1Iik.js} +2 -2
- package/dist/{supervision-discovery-DzDhlOOp.js.map → supervision-discovery-C9wL1Iik.js.map} +1 -1
- package/dist/{supervisor-DfBrIdFp.js → supervisor-BpJizPbJ.js} +2 -2
- package/dist/{supervisor-DfBrIdFp.js.map → supervisor-BpJizPbJ.js.map} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/{top-web-BaGIwYiL.js → top-web-CtLgM8cu.js} +4 -4
- package/dist/{top-web-BaGIwYiL.js.map → top-web-CtLgM8cu.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-3ZVht8Pk.d.ts → types-DQ4JHRDD.d.ts} +79 -74
- package/package.json +4 -4
- package/dist/scope-zYzxBt1q.js.map +0 -1
- package/dist/supervise-BKfejmq_.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $n as persistHarnessTranscript, $r as RetainedExecutionPendingError, At as beginScopeRetainedOwnerDrive, B as beginScopeOwnerAttempt, Ci as newUsageTotals, Cr as inheritRuntimeOwnedExecutorAttestation, Dr as providerAttemptEvidence, Dt as prepareScopeRetainedOwnerTask, Ei as assertValidBudget, Et as consumeScopeRetainedOwnerResult, Fr as runtimeOwnedExecutorMaterialization, Ft as scopeRetainedOwnerRestorePoint, G as scopeOwnerExecutorNodeContext, Gr as runtimeFlowBrain, H as noteScopeOwnerPlannedExecution, Ht as scopeRetainedOwnerJournalRoot, Ir as runtimeOwnedExecutorProviderEvidence, It as noteScopeRetainedOwnerCoordination, J as providerVisibleProfile, K as coordinationMcpAlias, Lr as runtimeOwnedPendingExecutorMaterialization, Mt as scopeRetainedOwnerTurnEnded, Nr as runtimeOwnedDriveHarnessProviderEvidence, Nt as assertRetainedOwnerCoordinationRekey, O as parseWorkerToolTraceArtifact, Or as recordRuntimeOwnedDriveHarnessProviderEvidence, Ot as scopeRetainedOwnerPriorSpend, Pr as runtimeOwnedExecutorExecutionBinding, Pt as reconcileScopeRetainedOwnerEnvironment, Q as assertRecursiveReservationPolicy, Rr as runtimeOwnedScopeOwnerRuntime, Rt as bindScopeRetainedOwnerEnvironmentId, Si as meterUsageEvent, St as scopeRetainedOwnerResourceReader, Ti as spendFromUsageTotals, Tt as abandonScopeRetainedOwnerInvocation, U as recordScopeOwnerMaterialization, Ur as isRuntimeFlowBrain, Vn as generateSpanId, Vt as scopeRetainedOwnerContext, W as restoreScopeOwnerAcceptedExecution, Wr as runtimeFlowAgent, Y as runtimeGraphMetadataKey, Yi as recordValue, _i as executorFailure, a as readRootStream, aa as runAbortable, ai as retainedExecutorSeamKey, br as authoredAgentIdentity, bt as prepareScopeRetainedOwnerSeatSwitch, ci as cappedDoublingMs, ct as recordScopeOwnerBarrenPause, di as unavailableResumeAt, dr as SeatChain, er as readHarnessTranscript, fr as SeatChainExhaustedError, hi as contentAddress, ia as linkAbort, kn as WORKER_TRACE_PROPAGATION, kt as scopeRetainedOwnerResult, li as jitteredMs, lr as isLiveNodeStatus, lt as recordScopeOwnerDriverAttempt, mr as seatExecutionProfile, n as ROOT_STREAM_FILE, na as RunCancellationReason, or as createActivityLog, ot as meterRuntimeOwnedAccounting, pr as authoredSeatStages, q as coordinationProfileToolPrefix, r as createRootStreamSink, ri as registerRetainedExecutorPreparation, st as meterRuntimeOwnedProviderAttempt, ui as unavailablePauseMs, ur as isTerminalNodeStatus, ut as recordScopeOwnerPause, xt as releaseScopeRetainedOwnerForSeatPause, yr as attestRuntimeOwnedScopeOwner, zn as createOtelExporter, zt as bindScopeRetainedOwnerProvider } from "./scope-
|
|
1
|
+
import { $n as persistHarnessTranscript, $r as RetainedExecutionPendingError, At as beginScopeRetainedOwnerDrive, B as beginScopeOwnerAttempt, Ci as newUsageTotals, Cr as inheritRuntimeOwnedExecutorAttestation, Dr as providerAttemptEvidence, Dt as prepareScopeRetainedOwnerTask, Ei as assertValidBudget, Et as consumeScopeRetainedOwnerResult, Fr as runtimeOwnedExecutorMaterialization, Ft as scopeRetainedOwnerRestorePoint, G as scopeOwnerExecutorNodeContext, Gr as runtimeFlowBrain, H as noteScopeOwnerPlannedExecution, Ht as scopeRetainedOwnerJournalRoot, Ir as runtimeOwnedExecutorProviderEvidence, It as noteScopeRetainedOwnerCoordination, J as providerVisibleProfile, K as coordinationMcpAlias, Lr as runtimeOwnedPendingExecutorMaterialization, Mt as scopeRetainedOwnerTurnEnded, Nr as runtimeOwnedDriveHarnessProviderEvidence, Nt as assertRetainedOwnerCoordinationRekey, O as parseWorkerToolTraceArtifact, Or as recordRuntimeOwnedDriveHarnessProviderEvidence, Ot as scopeRetainedOwnerPriorSpend, Pr as runtimeOwnedExecutorExecutionBinding, Pt as reconcileScopeRetainedOwnerEnvironment, Q as assertRecursiveReservationPolicy, Rr as runtimeOwnedScopeOwnerRuntime, Rt as bindScopeRetainedOwnerEnvironmentId, Si as meterUsageEvent, St as scopeRetainedOwnerResourceReader, Ti as spendFromUsageTotals, Tt as abandonScopeRetainedOwnerInvocation, U as recordScopeOwnerMaterialization, Ur as isRuntimeFlowBrain, Vn as generateSpanId, Vt as scopeRetainedOwnerContext, W as restoreScopeOwnerAcceptedExecution, Wr as runtimeFlowAgent, Y as runtimeGraphMetadataKey, Yi as recordValue, _i as executorFailure, a as readRootStream, aa as runAbortable, ai as retainedExecutorSeamKey, br as authoredAgentIdentity, bt as prepareScopeRetainedOwnerSeatSwitch, ci as cappedDoublingMs, ct as recordScopeOwnerBarrenPause, di as unavailableResumeAt, dr as SeatChain, er as readHarnessTranscript, fr as SeatChainExhaustedError, hi as contentAddress, ia as linkAbort, kn as WORKER_TRACE_PROPAGATION, kt as scopeRetainedOwnerResult, li as jitteredMs, lr as isLiveNodeStatus, lt as recordScopeOwnerDriverAttempt, mr as seatExecutionProfile, n as ROOT_STREAM_FILE, na as RunCancellationReason, or as createActivityLog, ot as meterRuntimeOwnedAccounting, pr as authoredSeatStages, q as coordinationProfileToolPrefix, r as createRootStreamSink, ri as registerRetainedExecutorPreparation, st as meterRuntimeOwnedProviderAttempt, ui as unavailablePauseMs, ur as isTerminalNodeStatus, ut as recordScopeOwnerPause, xt as releaseScopeRetainedOwnerForSeatPause, yr as attestRuntimeOwnedScopeOwner, zn as createOtelExporter, zt as bindScopeRetainedOwnerProvider } from "./scope-CO9ZhnIA.js";
|
|
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 { $t as promptModelProfileMaterialization, At as bridgeModelRouteRefusal, B as createRouterTranscript, C as createExecutor, Ct as admitContinuationPolicy, Et as createContinuationKeeper, F as codeModeArguments, I as codeModeModelOutput, Jt as controlProfileMaterialization, Kt as assertProfileMaterialization, L as createCodeModeTools, Qt as promptControlProfileMaterialization, Rt as bridgeRuntimeAttachmentsKey, S as captureReusableExecutorConfig, St as CONTINUATIONS_DIR, Tt as checkVerdictOf, U as resolveAgentEnvironmentProvider, V as routerBrain, X as createInbox, Xt as fullProfileMaterialization, Y as INBOX_RECEIPT_KEY, Yt as defineProfileMaterializationContract, Zt as profileMaterializationAxes$1, _t as CheckUnavailableError, a as assertRunParking, c as sleepScopeWait, ct as HarnessTurnFailedError, d as runFinalizer, dt as classifyDriverFailure, en as renderUnsupported, et as PEER_MAIL_WIRE_KEY, f as runTree, ft as isContentFilterRefusal, g as isDriverSpec, gt as preflightPublicCoordination, h as driverExecutorFactory, ht as upstreamUnavailableSignal, i as RunParkedError, in as worktreeCliProfileMaterialization, kt as bridgeAdmissionRefusal, l as withRunParking, lt as abandonablePending, m as driverChild, mt as undispatchedCredentialExit, n as createSupervisor, nn as sandboxProfileMaterialization, o as bindScopeParkingDrain, p as createRootHandle, pt as summarizeDriverAttempts, rn as unsupportedProfileDimensions, rt as isPeerMailEnvelope, st as DriverAttemptsExhaustedError, u as bestDelivered, ut as causedByPartialFailure, vt as gateFactoryOnDeliverable, w as snapshotExecutorConfig, wt as bestComposite, x as bindReusableExecutorExecutionId, z as toolResultText, zt as bridgeStopSignalKey } from "./supervisor-
|
|
5
|
+
import { $t as promptModelProfileMaterialization, At as bridgeModelRouteRefusal, B as createRouterTranscript, C as createExecutor, Ct as admitContinuationPolicy, Et as createContinuationKeeper, F as codeModeArguments, I as codeModeModelOutput, Jt as controlProfileMaterialization, Kt as assertProfileMaterialization, L as createCodeModeTools, Qt as promptControlProfileMaterialization, Rt as bridgeRuntimeAttachmentsKey, S as captureReusableExecutorConfig, St as CONTINUATIONS_DIR, Tt as checkVerdictOf, U as resolveAgentEnvironmentProvider, V as routerBrain, X as createInbox, Xt as fullProfileMaterialization, Y as INBOX_RECEIPT_KEY, Yt as defineProfileMaterializationContract, Zt as profileMaterializationAxes$1, _t as CheckUnavailableError, a as assertRunParking, c as sleepScopeWait, ct as HarnessTurnFailedError, d as runFinalizer, dt as classifyDriverFailure, en as renderUnsupported, et as PEER_MAIL_WIRE_KEY, f as runTree, ft as isContentFilterRefusal, g as isDriverSpec, gt as preflightPublicCoordination, h as driverExecutorFactory, ht as upstreamUnavailableSignal, i as RunParkedError, in as worktreeCliProfileMaterialization, kt as bridgeAdmissionRefusal, l as withRunParking, lt as abandonablePending, m as driverChild, mt as undispatchedCredentialExit, n as createSupervisor, nn as sandboxProfileMaterialization, o as bindScopeParkingDrain, p as createRootHandle, pt as summarizeDriverAttempts, rn as unsupportedProfileDimensions, rt as isPeerMailEnvelope, st as DriverAttemptsExhaustedError, u as bestDelivered, ut as causedByPartialFailure, vt as gateFactoryOnDeliverable, w as snapshotExecutorConfig, wt as bestComposite, x as bindReusableExecutorExecutionId, z as toolResultText, zt as bridgeStopSignalKey } from "./supervisor-BpJizPbJ.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 { n as createStdioToolServer } from "./tool-server-CZWd_Opp.js";
|
|
8
8
|
import { t as composeRuntimeHooks } from "./runtime-hooks-CsW2pfFk.js";
|
|
9
|
-
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-
|
|
10
|
-
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 { _ 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-CR__IFPB.js";
|
|
10
|
+
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-BLBx2kRA.js";
|
|
11
11
|
import { o as safeJsonText } from "./coordination-map-routing-BllzcZov.js";
|
|
12
12
|
import { a as graphRegistry, c as loadGraph } from "./graph-registry-D6y6zffC.js";
|
|
13
13
|
import { ATTR, agentIdentityAttributes } from "@tangle-network/agent-trace-contract";
|
|
@@ -52,6 +52,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
|
|
|
52
52
|
"extraTools",
|
|
53
53
|
"finalizer",
|
|
54
54
|
"graphRegistry",
|
|
55
|
+
"promptRegistry",
|
|
55
56
|
"hooks",
|
|
56
57
|
"inheritSpawnRights",
|
|
57
58
|
"journal",
|
|
@@ -128,7 +129,28 @@ function captureDeliverable(deliverable, context) {
|
|
|
128
129
|
...deliverable.checkState === void 0 ? {} : { checkState: deliverable.checkState }
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Every `SuperviseOptions` key whose value IS a callback, as data.
|
|
134
|
+
*
|
|
135
|
+
* `captureSuperviseOptions` detaches its decision data with `detachedSnapshot`, which
|
|
136
|
+
* structured-clones. A function cannot be structured-cloned, so a callback key that the capture
|
|
137
|
+
* does not lift out of the remainder makes `supervise()` throw
|
|
138
|
+
* `supervise options: input must be structured-cloneable` before any compute — a refusal that names
|
|
139
|
+
* the snapshot rather than the option, so a caller reads it as a bad value and not as a capability
|
|
140
|
+
* the entry point cannot carry.
|
|
141
|
+
*
|
|
142
|
+
* That is what happened to the retired `onUnmetContract`: added with the re-prompt path in 0.186.0,
|
|
143
|
+
* accepted by the option-key check, forwarded by `supervisorAgent`, read by the retry loop, and
|
|
144
|
+
* never destructured here. Every `supervisePursuit` run that passed the callback failed at
|
|
145
|
+
* construction on 0.186.0, 0.187.1 and 0.188.0, and the only working configuration was the number
|
|
146
|
+
* alone.
|
|
147
|
+
*
|
|
148
|
+
* The assignment below fails to COMPILE, naming the offender, when a callback-valued option is not
|
|
149
|
+
* in this list, so the next one cannot be added silently. The list is not merely documentation:
|
|
150
|
+
* {@link assertNoUncapturedExecutableOption} refuses at runtime any callback that still reaches the
|
|
151
|
+
* snapshot, including one nested in an option this type test cannot see.
|
|
152
|
+
*/
|
|
153
|
+
const superviseExecutableOptionKeys = [
|
|
132
154
|
"authorizeMessage",
|
|
133
155
|
"authorizeSpawn",
|
|
134
156
|
"decideGate",
|
|
@@ -150,7 +172,26 @@ Object.freeze([...[
|
|
|
150
172
|
"selectSeat",
|
|
151
173
|
"resolveSupervisorTools",
|
|
152
174
|
"stopRule"
|
|
153
|
-
]
|
|
175
|
+
];
|
|
176
|
+
Object.freeze([...superviseExecutableOptionKeys]);
|
|
177
|
+
/** The options captured as the exact references selected at intake, never deep-snapshot: every
|
|
178
|
+
* callback, plus live collaborators. Stores, journals and registries resolve lazily, hooks and
|
|
179
|
+
* otel exporters are process objects, and a shared `workerSlots` allocator is held by other runs
|
|
180
|
+
* too. Object-valued options that only contain callbacks are captured field by field below. */
|
|
181
|
+
const superviseReferenceOptionKeys = /* @__PURE__ */ new Set([
|
|
182
|
+
...superviseExecutableOptionKeys,
|
|
183
|
+
"blobs",
|
|
184
|
+
"hooks",
|
|
185
|
+
"journal",
|
|
186
|
+
"otel",
|
|
187
|
+
"promptRegistry",
|
|
188
|
+
"registry",
|
|
189
|
+
"resume",
|
|
190
|
+
"rootHandle",
|
|
191
|
+
"runContext",
|
|
192
|
+
"signal",
|
|
193
|
+
"workerSlots"
|
|
194
|
+
]);
|
|
154
195
|
/**
|
|
155
196
|
* Refuse a callback that reached the decision-data remainder, naming the option.
|
|
156
197
|
*
|
|
@@ -161,7 +202,7 @@ Object.freeze([...[
|
|
|
161
202
|
*/
|
|
162
203
|
function assertNoUncapturedExecutableOption(decisionData) {
|
|
163
204
|
const carried = Object.entries(decisionData).filter(([, value]) => typeof value === "function").map(([key]) => key);
|
|
164
|
-
if (carried.length > 0) throw new ValidationError(`supervise: option ${carried.sort().join(", ")} carries a callback that the option capture does not forward, so the run would fail on a structured-clone refusal that names the snapshot instead of the option;
|
|
205
|
+
if (carried.length > 0) throw new ValidationError(`supervise: option ${carried.sort().join(", ")} carries a callback that the option capture does not forward, so the run would fail on a structured-clone refusal that names the snapshot instead of the option; add the key to superviseExecutableOptionKeys`);
|
|
165
206
|
}
|
|
166
207
|
/** Capture the public one-call configuration before any asynchronous work starts. Decision data is
|
|
167
208
|
* detached and frozen; executable ports are copied as the exact references selected at intake.
|
|
@@ -169,7 +210,11 @@ function assertNoUncapturedExecutableOption(decisionData) {
|
|
|
169
210
|
* mutable options object can no longer change an in-flight run. */
|
|
170
211
|
function captureSuperviseOptions(opts) {
|
|
171
212
|
assertSuperviseOptionKeys(opts, "supervise");
|
|
172
|
-
const { backend,
|
|
213
|
+
const { backend, coordination, driverBackend, deliverable, router, compaction, watchWorkers, analysts, continuation, workerRetry, ...rest } = opts;
|
|
214
|
+
const references = {};
|
|
215
|
+
const decisionData = {};
|
|
216
|
+
for (const [key, value] of Object.entries(rest)) if (!superviseReferenceOptionKeys.has(key)) decisionData[key] = value;
|
|
217
|
+
else if (value !== void 0) references[key] = value;
|
|
173
218
|
assertNoUncapturedExecutableOption(decisionData);
|
|
174
219
|
const capturedData = detachedSnapshot(decisionData, "supervise options");
|
|
175
220
|
const capturedCoordination = coordination === void 0 ? void 0 : (() => {
|
|
@@ -229,47 +274,17 @@ function captureSuperviseOptions(opts) {
|
|
|
229
274
|
})();
|
|
230
275
|
return Object.freeze({
|
|
231
276
|
...capturedData,
|
|
277
|
+
...references,
|
|
232
278
|
...capturedCoordination === void 0 ? {} : { coordination: capturedCoordination },
|
|
233
279
|
...capturedBackend === void 0 ? {} : { backend: capturedBackend },
|
|
234
|
-
...selectSeat === void 0 ? {} : { selectSeat },
|
|
235
280
|
...capturedDriverBackend === void 0 ? {} : { driverBackend: capturedDriverBackend },
|
|
236
281
|
...capturedDeliverable === void 0 ? {} : { deliverable: capturedDeliverable },
|
|
237
|
-
...resolveDeliverable === void 0 ? {} : { resolveDeliverable },
|
|
238
282
|
...capturedRouter === void 0 ? {} : { router: capturedRouter },
|
|
239
283
|
...capturedCompaction === void 0 ? {} : { compaction: capturedCompaction },
|
|
240
284
|
...capturedWatchWorkers === void 0 ? {} : { watchWorkers: capturedWatchWorkers },
|
|
241
285
|
...capturedAnalysts === void 0 ? {} : { analysts: capturedAnalysts },
|
|
242
|
-
...makeWorkerAgent === void 0 ? {} : { makeWorkerAgent },
|
|
243
|
-
...makeLeafAgent === void 0 ? {} : { makeLeafAgent },
|
|
244
|
-
...recoverExecutor === void 0 ? {} : { recoverExecutor },
|
|
245
|
-
...resolveSpawnProfile === void 0 ? {} : { resolveSpawnProfile },
|
|
246
|
-
...blobs === void 0 ? {} : { blobs },
|
|
247
|
-
...journal === void 0 ? {} : { journal },
|
|
248
|
-
...resume === void 0 ? {} : { resume },
|
|
249
|
-
...runContext === void 0 ? {} : { runContext },
|
|
250
|
-
...workerSlots === void 0 ? {} : { workerSlots },
|
|
251
|
-
...authorizeSpawn === void 0 ? {} : { authorizeSpawn },
|
|
252
|
-
...authorizeMessage === void 0 ? {} : { authorizeMessage },
|
|
253
|
-
...driveHarness === void 0 ? {} : { driveHarness },
|
|
254
|
-
...resolveDriveHarness === void 0 ? {} : { resolveDriveHarness },
|
|
255
|
-
...resolveSupervisorTools === void 0 ? {} : { resolveSupervisorTools },
|
|
256
|
-
...escalateQuestion === void 0 ? {} : { escalateQuestion },
|
|
257
|
-
...decideGate === void 0 ? {} : { decideGate },
|
|
258
|
-
...onCoordinationEvent === void 0 ? {} : { onCoordinationEvent },
|
|
259
|
-
...executeExtraTool === void 0 ? {} : { executeExtraTool },
|
|
260
|
-
...stopRule === void 0 ? {} : { stopRule },
|
|
261
|
-
...onProgressStop === void 0 ? {} : { onProgressStop },
|
|
262
|
-
...onDriverAttempt === void 0 ? {} : { onDriverAttempt },
|
|
263
286
|
...capturedContinuation === void 0 ? {} : { continuation: capturedContinuation },
|
|
264
|
-
...capturedWorkerRetry === void 0 ? {} : { workerRetry: capturedWorkerRetry }
|
|
265
|
-
...onWorkerRetry === void 0 ? {} : { onWorkerRetry },
|
|
266
|
-
...finalizer === void 0 ? {} : { finalizer },
|
|
267
|
-
...now === void 0 ? {} : { now },
|
|
268
|
-
...signal === void 0 ? {} : { signal },
|
|
269
|
-
...rootHandle === void 0 ? {} : { rootHandle },
|
|
270
|
-
...registry === void 0 ? {} : { registry },
|
|
271
|
-
...hooks === void 0 ? {} : { hooks },
|
|
272
|
-
...otel === void 0 ? {} : { otel }
|
|
287
|
+
...capturedWorkerRetry === void 0 ? {} : { workerRetry: capturedWorkerRetry }
|
|
273
288
|
});
|
|
274
289
|
}
|
|
275
290
|
// src/runtime/supervise/otel-spans.ts
|
|
@@ -7597,11 +7612,12 @@ function createSuperviseWorkers(setup, cancelDurableRun) {
|
|
|
7597
7612
|
const { options, canonicalProfile, rootExecution, guidanceComposer, deliverable, analysts, journal, runId, rootOwnerId, now } = setup;
|
|
7598
7613
|
const recoveryFactories = /* @__PURE__ */ new WeakMap();
|
|
7599
7614
|
const graphOverlays = /* @__PURE__ */ new Set();
|
|
7615
|
+
const subtaskDirectives = options.promptRegistry ?? kernelPromptRegistry();
|
|
7600
7616
|
const graphSubtasks = options.makeWorkerAgent === void 0 ? { prepare: async (input) => {
|
|
7601
7617
|
try {
|
|
7602
7618
|
const topology = input.graphDigest === void 0 ? parseGraphSubtaskTopology(input.graph) : await storedGraphTopology(options.graphRegistry, input.graphDigest);
|
|
7603
7619
|
const prepared = prepareGraphSubtask(topology, {
|
|
7604
|
-
registry:
|
|
7620
|
+
registry: subtaskDirectives,
|
|
7605
7621
|
...analysts ? { analysts } : {},
|
|
7606
7622
|
...guidanceComposer ? { guidance: guidanceComposer } : {}
|
|
7607
7623
|
});
|
|
@@ -7622,10 +7638,9 @@ function createSuperviseWorkers(setup, cancelDurableRun) {
|
|
|
7622
7638
|
} } : void 0;
|
|
7623
7639
|
const productAuthority = productSpawnAuthority(options.authorizeSpawn);
|
|
7624
7640
|
const graphOverlayFor = (topology) => {
|
|
7625
|
-
const
|
|
7626
|
-
const validated = validateGraphSubtask(topology, registry, analysts);
|
|
7641
|
+
const validated = validateGraphSubtask(topology, subtaskDirectives, analysts);
|
|
7627
7642
|
const overlay = createGraphOverlay(validated, {
|
|
7628
|
-
registry,
|
|
7643
|
+
registry: subtaskDirectives,
|
|
7629
7644
|
journal,
|
|
7630
7645
|
runId,
|
|
7631
7646
|
now,
|
|
@@ -9432,4 +9447,4 @@ function superviseWithContext(profile, task, opts, brain) {
|
|
|
9432
9447
|
}
|
|
9433
9448
|
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 };
|
|
9434
9449
|
|
|
9435
|
-
//# sourceMappingURL=supervise-
|
|
9450
|
+
//# sourceMappingURL=supervise-BgoGHI7a.js.map
|