@tangle-network/agent-runtime 10.0.0 → 10.0.1
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 +14 -0
- package/dist/{activation-CEGkyzEG.js → activation-C_BenzIu.js} +2 -2
- package/dist/{activation-CEGkyzEG.js.map → activation-C_BenzIu.js.map} +1 -1
- package/dist/{activation-CDlOqX5a.d.ts → activation-s6dGGify.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -3
- package/dist/{delegate-V2Nz8GgO.js → delegate-BOren4c7.js} +2 -2
- package/dist/{delegate-V2Nz8GgO.js.map → delegate-BOren4c7.js.map} +1 -1
- package/dist/{driver-control-acknowledgers-CJDYLJmW.js → driver-control-acknowledgers-ByKwAgCI.js} +25 -5
- package/dist/driver-control-acknowledgers-ByKwAgCI.js.map +1 -0
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +9 -9
- package/dist/{failure-cause-BI7cfDWx.js → failure-cause-DoCCGLDH.js} +30 -18
- package/dist/{failure-cause-BI7cfDWx.js.map → failure-cause-DoCCGLDH.js.map} +1 -1
- package/dist/{graph-wJOMQ1kC.js → graph-BXONYT1o.js} +6 -6
- package/dist/{graph-wJOMQ1kC.js.map → graph-BXONYT1o.js.map} +1 -1
- package/dist/{improve-DOjywiPq.js → improve-CS2GIF5O.js} +5 -5
- package/dist/{improve-DOjywiPq.js.map → improve-CS2GIF5O.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +13 -13
- package/dist/{loop-runner-DwxZbYW5.d.ts → loop-runner-C0B3PexH.d.ts} +2 -2
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/{loop-runner-CPTOzSol.js → loop-runner-ftyZP4st.js} +2 -2
- package/dist/{loop-runner-CPTOzSol.js.map → loop-runner-ftyZP4st.js.map} +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +6 -6
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-B1_Kow9m.js → provision-supervisor-CauovUHn.js} +5 -5
- package/dist/{provision-supervisor-B1_Kow9m.js.map → provision-supervisor-CauovUHn.js.map} +1 -1
- package/dist/{run-cancellation-D5m6JHPH.js → run-cancellation-NMNVuYiO.js} +2 -2
- package/dist/{run-cancellation-D5m6JHPH.js.map → run-cancellation-NMNVuYiO.js.map} +1 -1
- package/dist/{run-state-DKOXe08H.js → run-state-COyIVOVb.js} +5 -5
- package/dist/{run-state-DKOXe08H.js.map → run-state-COyIVOVb.js.map} +1 -1
- package/dist/{runtime-C5cWSMqU.js → runtime-DYaRDLKn.js} +13 -13
- package/dist/{runtime-C5cWSMqU.js.map → runtime-DYaRDLKn.js.map} +1 -1
- package/dist/{search-executor-CA6fTYWz.js → search-executor-Drd_N9YO.js} +4 -4
- package/dist/{search-executor-CA6fTYWz.js.map → search-executor-Drd_N9YO.js.map} +1 -1
- package/dist/{server-C8Z3vYdI.js → server-Dk9B1WFf.js} +4 -4
- package/dist/{server-C8Z3vYdI.js.map → server-Dk9B1WFf.js.map} +1 -1
- package/dist/{settle-record-BDxPAO4m.js → settle-record-YdkkHzqw.js} +2 -2
- package/dist/{settle-record-BDxPAO4m.js.map → settle-record-YdkkHzqw.js.map} +1 -1
- package/dist/{structural-rollout-B0HPcP9G.js → structural-rollout-DbZAkHTq.js} +4 -4
- package/dist/{structural-rollout-B0HPcP9G.js.map → structural-rollout-DbZAkHTq.js.map} +1 -1
- package/dist/{supervise-Dvj-8S6D.js → supervise-B5hb0my3.js} +46 -14
- package/dist/supervise-B5hb0my3.js.map +1 -0
- package/dist/{supervision-discovery-CbrwcgJy.js → supervision-discovery-ChkTxilL.js} +3 -3
- package/dist/{supervision-discovery-CbrwcgJy.js.map → supervision-discovery-ChkTxilL.js.map} +1 -1
- package/dist/{supervisor-DwdeUC2l.js → supervisor-DpwcTrTh.js} +229 -38
- package/dist/supervisor-DpwcTrTh.js.map +1 -0
- package/dist/{supervisor-accounting-C48Yo9QC.js → supervisor-accounting-QiXnF-EW.js} +42 -11
- package/dist/supervisor-accounting-QiXnF-EW.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/{tool-server-DsCeBr-C.js → tool-server-DQCdu3am.js} +2 -2
- package/dist/{tool-server-DsCeBr-C.js.map → tool-server-DQCdu3am.js.map} +1 -1
- package/dist/{top-web-CTOq4psb.js → top-web-E85Fk8pH.js} +6 -6
- package/dist/{top-web-CTOq4psb.js.map → top-web-E85Fk8pH.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-lnF0wIJW.d.ts → types-dv295cpm.d.ts} +5728 -5697
- package/package.json +5 -5
- package/dist/driver-control-acknowledgers-CJDYLJmW.js.map +0 -1
- package/dist/supervise-Dvj-8S6D.js.map +0 -1
- package/dist/supervisor-DwdeUC2l.js.map +0 -1
- package/dist/supervisor-accounting-C48Yo9QC.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
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 { _ 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-
|
|
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-ByKwAgCI.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 assertRunParking, 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 RunParkedError, 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, s as isRunParked, u as withRunParking, ut as HarnessTurnFailedError, vt as CheckUnavailableError, w as createExecutor, wt as bridgeModelRouteRefusal, yt as gateFactoryOnDeliverable } from "./supervisor-DpwcTrTh.js";
|
|
4
|
+
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-NMNVuYiO.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 owners, Ar as authoredAgentIdentity, At as beginScopeOwnerAttempt, Bt as coordinationProfileToolPrefix, Cr as authoredSeatStages, Dt as prepareScopeRetainedOwnerTask, Et as consumeScopeRetainedOwnerResult, F as parseWorkerToolTraceArtifact, Ft as recordScopeOwnerMaterialization, Gr as runtimeOwnedExecutorMaterialization, Gt as scopeRetainedOwnerTurnEnded, Ht as runtimeGraphMetadataKey, It as restoreScopeOwnerAcceptedExecution, Jt as scopeRetainedOwnerRestorePoint, Kr as runtimeOwnedExecutorProviderEvidence, Kt as assertRetainedOwnerCoordinationRekey, Ln as WORKER_TRACE_PROPAGATION, Lr as providerAttemptEvidence, Lt as scopeOwnerExecutionObservation, Mt as holdScopeOwnerTranscript, Nt as noteScopeOwnerPlannedExecution, Ot as scopeRetainedOwnerPriorSpend, Pt as recordScopeOwnerHarnessTranscript, Qt as bindScopeRetainedOwnerProvider, Rr as recordRuntimeOwnedDriveHarnessProviderEvidence, Rt as scopeOwnerExecutorNodeContext, Sr as SeatPauseError, Tt as abandonScopeRetainedOwnerInvocation, Ur as runtimeOwnedDriveHarnessProviderEvidence, Ut as beginScopeRetainedOwnerDrive, Vt as providerVisibleProfile, Wr as runtimeOwnedExecutorExecutionBinding, X as assertRecursiveReservationPolicy, Yn as generateSpanId, Yr as runtimeOwnedScopeOwnerRuntime, Yt as noteScopeRetainedOwnerCoordination, Zt as bindScopeRetainedOwnerEnvironmentId, a as createRootStreamSink, at as meterRuntimeOwnedAccounting, br as SEAT_RECHECK_MS, bt as releaseScopeRetainedOwnerForSeatPause, cr as readHarnessTranscript, ct as recordScopeOwnerBarrenPause, ei as isRuntimeFlowBrain, hr as createActivityLog, i as ROOT_STREAM_FILE, kr as attestRuntimeOwnedScopeOwner, kt as scopeRetainedOwnerResult, lr as settleHarnessTranscript, lt as recordScopeOwnerDriverAttempt, mn as executorObservationSeamKey, ni as runtimeFlowAgent, nn as scopeRetainedOwnerJournalRoot, ot as meterRuntimeOwnedProviderAttempt, qn as createOtelExporter, qr as runtimeOwnedPendingExecutorMaterialization, qt as reconcileScopeRetainedOwnerEnvironment, ri as runtimeFlowBrain, s as readRootStream, sr as persistHarnessTranscript, st as pauseScopeSeatAdmission, tn as scopeRetainedOwnerContext, ut as recordScopeOwnerPause, vr as isLiveNodeStatus, wr as seatExecutionProfile, xr as SeatChain, xt as scopeRetainedOwnerResourceReader, yr as isTerminalNodeStatus, yt as prepareScopeRetainedOwnerSeatSwitch, zt as coordinationMcpAlias } from "./supervisor-accounting-
|
|
7
|
+
import { $t as owners, Ar as authoredAgentIdentity, At as beginScopeOwnerAttempt, Bt as coordinationProfileToolPrefix, Cr as authoredSeatStages, Dt as prepareScopeRetainedOwnerTask, Et as consumeScopeRetainedOwnerResult, F as parseWorkerToolTraceArtifact, Ft as recordScopeOwnerMaterialization, Gr as runtimeOwnedExecutorMaterialization, Gt as scopeRetainedOwnerTurnEnded, Ht as runtimeGraphMetadataKey, It as restoreScopeOwnerAcceptedExecution, Jt as scopeRetainedOwnerRestorePoint, Kr as runtimeOwnedExecutorProviderEvidence, Kt as assertRetainedOwnerCoordinationRekey, Ln as WORKER_TRACE_PROPAGATION, Lr as providerAttemptEvidence, Lt as scopeOwnerExecutionObservation, Mt as holdScopeOwnerTranscript, Nt as noteScopeOwnerPlannedExecution, Ot as scopeRetainedOwnerPriorSpend, Pt as recordScopeOwnerHarnessTranscript, Qt as bindScopeRetainedOwnerProvider, Rr as recordRuntimeOwnedDriveHarnessProviderEvidence, Rt as scopeOwnerExecutorNodeContext, Sr as SeatPauseError, Tt as abandonScopeRetainedOwnerInvocation, Ur as runtimeOwnedDriveHarnessProviderEvidence, Ut as beginScopeRetainedOwnerDrive, Vt as providerVisibleProfile, Wr as runtimeOwnedExecutorExecutionBinding, X as assertRecursiveReservationPolicy, Yn as generateSpanId, Yr as runtimeOwnedScopeOwnerRuntime, Yt as noteScopeRetainedOwnerCoordination, Zt as bindScopeRetainedOwnerEnvironmentId, a as createRootStreamSink, at as meterRuntimeOwnedAccounting, br as SEAT_RECHECK_MS, bt as releaseScopeRetainedOwnerForSeatPause, cr as readHarnessTranscript, ct as recordScopeOwnerBarrenPause, ei as isRuntimeFlowBrain, hr as createActivityLog, i as ROOT_STREAM_FILE, kr as attestRuntimeOwnedScopeOwner, kt as scopeRetainedOwnerResult, lr as settleHarnessTranscript, lt as recordScopeOwnerDriverAttempt, mn as executorObservationSeamKey, ni as runtimeFlowAgent, nn as scopeRetainedOwnerJournalRoot, ot as meterRuntimeOwnedProviderAttempt, qn as createOtelExporter, qr as runtimeOwnedPendingExecutorMaterialization, qt as reconcileScopeRetainedOwnerEnvironment, ri as runtimeFlowBrain, s as readRootStream, sr as persistHarnessTranscript, st as pauseScopeSeatAdmission, tn as scopeRetainedOwnerContext, ut as recordScopeOwnerPause, vr as isLiveNodeStatus, wr as seatExecutionProfile, xr as SeatChain, xt as scopeRetainedOwnerResourceReader, yr as isTerminalNodeStatus, yt as prepareScopeRetainedOwnerSeatSwitch, zt as coordinationMcpAlias } from "./supervisor-accounting-QiXnF-EW.js";
|
|
8
8
|
import { m as runAbortable, p as linkAbort, u as RunCancellationReason } from "./jsonl-file-BhuxeejY.js";
|
|
9
9
|
import { a as createContinuationKeeper, i as checkVerdictOf, n as admitContinuationPolicy, r as bestComposite, t as CONTINUATIONS_DIR } from "./continuation-CZaeHEzQ.js";
|
|
10
|
-
import {
|
|
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
11
|
import { o as safeJsonText } from "./coordination-map-routing-XZXTlCmn.js";
|
|
12
|
-
import { n as createStdioToolServer } from "./tool-server-
|
|
12
|
+
import { n as createStdioToolServer } from "./tool-server-DQCdu3am.js";
|
|
13
13
|
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";
|
|
14
14
|
import { d as teardownExecutor, i as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, l as isDeadlineAbortReason, o as armDeadlineTimer } from "./deadline-CySmJ_0S.js";
|
|
15
15
|
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-CqDuBTq-.js";
|
|
@@ -2245,12 +2245,14 @@ function createCoordinationCredentials(input) {
|
|
|
2245
2245
|
staged = void 0;
|
|
2246
2246
|
};
|
|
2247
2247
|
let installing = false;
|
|
2248
|
-
const rotate = () => {
|
|
2248
|
+
const rotate = (managerOnly = false) => {
|
|
2249
2249
|
if (installing) throw new ConfigError("coordination credential replacement is pending");
|
|
2250
2250
|
if (staged) revoked.set(staged.token.toString(), staged.expiresAt);
|
|
2251
2251
|
commit(issue());
|
|
2252
|
-
|
|
2253
|
-
|
|
2252
|
+
if (!managerOnly) {
|
|
2253
|
+
readerToken = randomToken();
|
|
2254
|
+
controllerToken = randomToken();
|
|
2255
|
+
}
|
|
2254
2256
|
};
|
|
2255
2257
|
const replace = async (install) => {
|
|
2256
2258
|
if (installing) throw new ConfigError("coordination credential replacement is pending");
|
|
@@ -3061,6 +3063,9 @@ async function serveCoordinationMcpForManager(opts, lifetime) {
|
|
|
3061
3063
|
};
|
|
3062
3064
|
let stopCredentialBinding;
|
|
3063
3065
|
let refreshBoundCredential;
|
|
3066
|
+
let rotateManagerCredential = async () => {
|
|
3067
|
+
credentials.rotate(true);
|
|
3068
|
+
};
|
|
3064
3069
|
const bindCredential = async (install) => {
|
|
3065
3070
|
if (stopCredentialBinding) throw new ConfigError("coordination already has a credential holder");
|
|
3066
3071
|
let active = true, cancelTimer;
|
|
@@ -3095,6 +3100,16 @@ async function serveCoordinationMcpForManager(opts, lifetime) {
|
|
|
3095
3100
|
cancelTimer?.();
|
|
3096
3101
|
renew();
|
|
3097
3102
|
};
|
|
3103
|
+
rotateManagerCredential = async () => {
|
|
3104
|
+
cancelTimer?.();
|
|
3105
|
+
await pending;
|
|
3106
|
+
cancelTimer?.();
|
|
3107
|
+
if (stopped()) throw new ConfigError("coordination credential holder stopped");
|
|
3108
|
+
credentials.rotate(true);
|
|
3109
|
+
pending = credentials.replace(install);
|
|
3110
|
+
await pending;
|
|
3111
|
+
schedule();
|
|
3112
|
+
};
|
|
3098
3113
|
try {
|
|
3099
3114
|
pending = credentials.replace(install);
|
|
3100
3115
|
await pending;
|
|
@@ -3139,6 +3154,7 @@ async function serveCoordinationMcpForManager(opts, lifetime) {
|
|
|
3139
3154
|
credentials.rotate();
|
|
3140
3155
|
refreshBoundCredential?.();
|
|
3141
3156
|
},
|
|
3157
|
+
rotateManagerCredential: () => rotateManagerCredential(),
|
|
3142
3158
|
bindCredential,
|
|
3143
3159
|
settled: () => coord.settled(),
|
|
3144
3160
|
submittedResult: () => coord.submittedResult(),
|
|
@@ -4957,6 +4973,7 @@ function serveManagerCoordination(config, state, context, priorCoordination, nod
|
|
|
4957
4973
|
actorId: context.ownerId
|
|
4958
4974
|
} } : {},
|
|
4959
4975
|
...deps.deliverable ? { deliverable: deps.deliverable } : {},
|
|
4976
|
+
...config.driveHarness.withFileOutput ? { withFileOutput: config.driveHarness.withFileOutput } : {},
|
|
4960
4977
|
...deps.continuation ? { readContinuation: (n) => state.keeper?.read(n) ?? {
|
|
4961
4978
|
found: false,
|
|
4962
4979
|
reason: "no continuation has been sent"
|
|
@@ -6264,6 +6281,10 @@ async function invokeManagerHarness(loop, attempt, carried, input) {
|
|
|
6264
6281
|
state.harnessInvocationActive = true;
|
|
6265
6282
|
let completed = false;
|
|
6266
6283
|
try {
|
|
6284
|
+
if (driveHarness.withFileOutput) {
|
|
6285
|
+
if (!mcp.rotateManagerCredential) throw new Error("file output requires invocation-bound coordination credentials");
|
|
6286
|
+
await mcp.rotateManagerCredential();
|
|
6287
|
+
}
|
|
6267
6288
|
await driveHarness({
|
|
6268
6289
|
profile: loop.providerProfile,
|
|
6269
6290
|
authoredProfile: config.profile,
|
|
@@ -8517,6 +8538,11 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
|
|
|
8517
8538
|
});
|
|
8518
8539
|
};
|
|
8519
8540
|
drive.resultArtifact = () => state.managerArtifact;
|
|
8541
|
+
if (backend.backend === "provider" && backend.outputFile !== void 0) drive.withFileOutput = (submission, accept) => {
|
|
8542
|
+
const executor = state.activeExecutor;
|
|
8543
|
+
if (!executor?.withFileOutput) return Promise.reject(new ValidationError("file submission has no active provider invocation"));
|
|
8544
|
+
return executor.withFileOutput(submission, accept);
|
|
8545
|
+
};
|
|
8520
8546
|
drive.deliver = (message) => {
|
|
8521
8547
|
const deliver = state.activeExecutor?.deliver;
|
|
8522
8548
|
if (!deliver) return false;
|
|
@@ -8626,9 +8652,14 @@ function managerHarnessResolver(source) {
|
|
|
8626
8652
|
const { options, managerBackend } = source;
|
|
8627
8653
|
const claimDriveHarness = driveHarnessClaims();
|
|
8628
8654
|
return (context) => {
|
|
8629
|
-
if (options.resolveDriveHarness) return claimDriveHarness(options.resolveDriveHarness(context), context.ownerId);
|
|
8630
|
-
if (options.driveHarness) return claimDriveHarness(options.driveHarness, context.ownerId);
|
|
8631
|
-
|
|
8655
|
+
if (options.resolveDriveHarness) return claimDriveHarness(options.resolveDriveHarness(context), context.ownerId, context.profile.outputFile !== void 0);
|
|
8656
|
+
if (options.driveHarness) return claimDriveHarness(options.driveHarness, context.ownerId, context.profile.outputFile !== void 0);
|
|
8657
|
+
const selectedBackend = managerBackend?.backend === "provider" ? {
|
|
8658
|
+
...managerBackend,
|
|
8659
|
+
...providerOutputOptions(context.profile, managerBackend)
|
|
8660
|
+
} : managerBackend;
|
|
8661
|
+
if (context.profile.outputFile !== void 0 && selectedBackend?.backend !== "provider") throw new ValidationError("profile outputFile requires a retained provider backend");
|
|
8662
|
+
return selectedBackend && source.automaticDriver ? driveHarnessFromBackend(selectedBackend, externalExecutionId("supervised-manager", {
|
|
8632
8663
|
runNamespace: source.runNamespace,
|
|
8633
8664
|
ownerId: context.ownerId
|
|
8634
8665
|
}), options.now ?? Date.now, options.maxTurns, context.depth === 0 ? source.rootStreamSink : void 0, options.selectSeat === void 0 ? void 0 : {
|
|
@@ -8667,9 +8698,10 @@ function emitSeatEvent(source, nodeId, id, payload) {
|
|
|
8667
8698
|
/** A harness claimed by one manager owner. A steerable harness binds to exactly one owner. */
|
|
8668
8699
|
function driveHarnessClaims() {
|
|
8669
8700
|
const harnessClaims = /* @__PURE__ */ new WeakMap();
|
|
8670
|
-
return (rawHarness, ownerId) => {
|
|
8701
|
+
return (rawHarness, ownerId, fileOutput) => {
|
|
8671
8702
|
if (typeof rawHarness !== "function") throw new ValidationError("supervise: resolveDriveHarness must return a DriveHarness function");
|
|
8672
8703
|
const harness = rawHarness;
|
|
8704
|
+
if (fileOutput && typeof harness.withFileOutput !== "function") throw new ValidationError("profile outputFile requires a harness with retained file submission support");
|
|
8673
8705
|
const deliver = harness.deliver;
|
|
8674
8706
|
if (deliver !== void 0 && typeof deliver !== "function") throw new ValidationError("supervise: driveHarness.deliver must be a function when provided");
|
|
8675
8707
|
const deliverReady = harness.deliverReady;
|
|
@@ -9460,4 +9492,4 @@ function superviseWithContext(profile, task, opts, brain) {
|
|
|
9460
9492
|
}
|
|
9461
9493
|
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 };
|
|
9462
9494
|
|
|
9463
|
-
//# sourceMappingURL=supervise-
|
|
9495
|
+
//# sourceMappingURL=supervise-B5hb0my3.js.map
|