@tangle-network/agent-runtime 0.309.0 → 0.311.2
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-CPlj7oAq.d.ts → activation-BxR-Im_k.d.ts} +3 -3
- package/dist/{activation-BNGcdwKv.js → activation-Dvl9gE_g.js} +3 -3
- package/dist/{activation-BNGcdwKv.js.map → activation-Dvl9gE_g.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{bundle-E6mbRX2P.js → bundle-BK3XBY6q.js} +2 -2
- package/dist/{bundle-E6mbRX2P.js.map → bundle-BK3XBY6q.js.map} +1 -1
- package/dist/candidate-execution/index.js +5 -5
- package/dist/{coordination-driver-nxGtWmJm.js → coordination-driver-CIfgl4Yj.js} +3 -3
- package/dist/{coordination-driver-nxGtWmJm.js.map → coordination-driver-CIfgl4Yj.js.map} +1 -1
- package/dist/{delegate-BH1mMsM-.js → delegate-05Ddb4_L.js} +2 -2
- package/dist/{delegate-BH1mMsM-.js.map → delegate-05Ddb4_L.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +4 -4
- package/dist/{graph-DEbRy7GI.js → graph-BNVGyp1P.js} +6 -4
- package/dist/graph-BNVGyp1P.js.map +1 -0
- package/dist/{improvement-cycle-D-GFP8a-.js → improvement-cycle-Ig1_rWAw.js} +6 -6
- package/dist/{improvement-cycle-D-GFP8a-.js.map → improvement-cycle-Ig1_rWAw.js.map} +1 -1
- package/dist/{index-B-VvfcHa.d.ts → index-B0c5PmmO.d.ts} +27 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +9 -9
- package/dist/intelligence.d.ts +3 -3
- package/dist/intelligence.js +7 -7
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +10 -9
- package/dist/{loop-runner-bin-DxH6LwIB.js → loop-runner-bin-Beh7PECB.js} +3 -3
- package/dist/{loop-runner-bin-DxH6LwIB.js.map → loop-runner-bin-Beh7PECB.js.map} +1 -1
- package/dist/{loop-runner-bin-Bvd0J2OR.d.ts → loop-runner-bin-drXESgaI.d.ts} +3 -3
- 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 +5 -5
- package/dist/mcp/index.js +5 -5
- package/dist/{openai-tools-CP1hPxJd.d.ts → openai-tools-CJHfmFzg.d.ts} +2 -2
- package/dist/{prepare-CulUz6Wm.js → prepare-8A1CAWG8.js} +3 -3
- package/dist/{prepare-CulUz6Wm.js.map → prepare-8A1CAWG8.js.map} +1 -1
- package/dist/{profile-DY9lT3gH.js → profile-BhQShsM1.js} +2 -2
- package/dist/{profile-DY9lT3gH.js.map → profile-BhQShsM1.js.map} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{protected-model-port-BT2iYAsU.js → protected-model-port-ug52OmvB.js} +4 -4
- package/dist/{protected-model-port-BT2iYAsU.js.map → protected-model-port-ug52OmvB.js.map} +1 -1
- package/dist/{provision-supervisor-CLGUAePU.js → provision-supervisor-CfKlAMTb.js} +4 -4
- package/dist/{provision-supervisor-CLGUAePU.js.map → provision-supervisor-CfKlAMTb.js.map} +1 -1
- package/dist/{runtime-B0td3fc3.js → runtime-DsnHqwNx.js} +9 -9
- package/dist/{runtime-B0td3fc3.js.map → runtime-DsnHqwNx.js.map} +1 -1
- package/dist/{search-executor-DV-AfHq0.js → search-executor-BNLvgp0X.js} +3 -3
- package/dist/{search-executor-DV-AfHq0.js.map → search-executor-BNLvgp0X.js.map} +1 -1
- package/dist/{server-B5JWg4Oq.js → server-Bx4d5imQ.js} +4 -4
- package/dist/{server-B5JWg4Oq.js.map → server-Bx4d5imQ.js.map} +1 -1
- package/dist/{stream-agent-turn-D-zmKgU2.d.ts → stream-agent-turn-fd2XzrTv.d.ts} +2 -2
- package/dist/{substrate-DQnwvsFT.d.ts → substrate-GW6LFx4A.d.ts} +2 -2
- package/dist/{supervise-B5iHXeuw.js → supervise-D6MgxpMI.js} +35 -6
- package/dist/supervise-D6MgxpMI.js.map +1 -0
- package/dist/{supervisor-Cd39ZN4b.js → supervisor-WYRLsCp1.js} +72 -5
- package/dist/supervisor-WYRLsCp1.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +14 -14
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-CFGESVFO.d.ts → types-RlLmOHFR.d.ts} +57 -3
- package/dist/{workspace-streams-DaQceg2p.js → workspace-streams-BEvSX97P.js} +13 -2
- package/dist/workspace-streams-BEvSX97P.js.map +1 -0
- package/package.json +2 -2
- package/skills/profile-authoring/SKILL.md +8 -12
- package/dist/graph-DEbRy7GI.js.map +0 -1
- package/dist/supervise-B5iHXeuw.js.map +0 -1
- package/dist/supervisor-Cd39ZN4b.js.map +0 -1
- package/dist/workspace-streams-DaQceg2p.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $n as parseWorkerToolTraceArtifact, A as scopeOwnerExecutorNodeContext, Ai as worktreeCliProfileMaterialization, An as resolveAgentEnvironmentProvider, At as captureReusableExecutorConfig, B as consumeScopeRetainedOwnerResult, Bi as recordRuntimeOwnedDriveHarnessProviderEvidence, C as deriveNodeExecutionIdentity, Ct as createContinuationKeeper, D as recordScopeOwnerMaterialization, E as recordScopeOwnerDriverAttempt, Ei as renderUnsupported, F as seatExecutionProfile, Fi as inheritRuntimeOwnedExecutorAttestation, Fn as retainedExecutorSeamKey, Ft as snapshotExecutorConfig, G as scopeRetainedOwnerContext, Gi as runtimeOwnedPendingExecutorMaterialization, H as prepareScopeRetainedOwnerSeatSwitch, Hi as runtimeOwnedExecutorExecutionBinding, I as abandonScopeRetainedOwnerInvocation, J as scopeRetainedOwnerResourceReader, Jn as readCommittedJsonLines, Jt as createActivityLog, K as scopeRetainedOwnerJournalRoot, Ki as runtimeOwnedScopeOwnerRuntime, Kn as isNoEntError, Kr as generateSpanId, L as beginScopeRetainedOwnerDrive, M as SeatChain, Mi as attestRuntimeOwnedScopeOwner, Mr as contentAddress, N as SeatChainExhaustedError, Nt as createExecutor, O as recordScopeOwnerPause, Oi as unsupportedProfileDimensions, Or as persistHarnessTranscript, P as authoredSeatStages, Pn as registerRetainedExecutorPreparation, Qi as detachedSnapshot, R as bindScopeRetainedOwnerEnvironmentId, Si as promptModelProfileMaterialization, Sr as RunCancellationReason, St as checkVerdictOf, T as meterRuntimeOwnedProviderAttempt, Tr as runAbortable, U as prepareScopeRetainedOwnerTask, Ui as runtimeOwnedExecutorMaterialization, V as noteScopeRetainedOwnerCoordination, Vi as runtimeOwnedDriveHarnessProviderEvidence, Vt as WORKER_TRACE_PROPAGATION, W as reconcileScopeRetainedOwnerEnvironment, Wi as runtimeOwnedExecutorProviderEvidence, Wr as createOtelExporter, X as scopeRetainedOwnerResult, Xr as toOtelAttributes, Xt as createInbox, Y as scopeRetainedOwnerRestorePoint, Z as scopeRetainedOwnerTurnEnded, _ as isDriverSpec, _i as controlProfileMaterialization, an as isLiveNodeStatus, b as assertRecursiveReservationPolicy, bi as profileMaterializationAxes$1, c as runTree, cn as bridgeModelRouteRefusal, dr as bridgeStopSignalKey, f as runDriverWithRetry, fr as errMessage, g as driverExecutorFactory, gi as assertProfileMaterialization, gt as CONTINUATIONS_DIR, h as driverChild, i as bestDelivered, ir as assertValidBudget, it as providerVisibleProfile, k as restoreScopeOwnerAcceptedExecution, kr as readHarnessTranscript, kt as bindReusableExecutorExecutionId, lr as spendFromUsageTotals, mt as gateOnDeliverable, n as createRootHandle, nt as coordinationMcpAlias, or as meterUsageEvent, p as summarizeDriverAttempts, q as scopeRetainedOwnerPriorSpend, qn as prepareJsonlAppend, r as createSupervisor, rt as coordinationProfileToolPrefix, s as runFinalizer, sn as bridgeAdmissionRefusal, sr as newUsageTotals, tr as executorFailure, u as HarnessTurnFailedError, ur as bridgeRuntimeAttachmentsKey, vi as defineProfileMaterializationContract, vt as CheckUnavailableError, w as meterRuntimeOwnedAccounting, wn as routerBrain, wr as linkAbort, x as beginScopeOwnerAttempt, xi as promptControlProfileMaterialization, xt as bestComposite, yi as fullProfileMaterialization, yt as admitContinuationPolicy, z as bindScopeRetainedOwnerProvider, zi as providerAttemptEvidence, zt as createRouterTranscript } from "./supervisor-
|
|
1
|
+
import { $n as parseWorkerToolTraceArtifact, A as scopeOwnerExecutorNodeContext, Ai as worktreeCliProfileMaterialization, An as resolveAgentEnvironmentProvider, At as captureReusableExecutorConfig, B as consumeScopeRetainedOwnerResult, Bi as recordRuntimeOwnedDriveHarnessProviderEvidence, C as deriveNodeExecutionIdentity, Ct as createContinuationKeeper, D as recordScopeOwnerMaterialization, E as recordScopeOwnerDriverAttempt, Ei as renderUnsupported, F as seatExecutionProfile, Fi as inheritRuntimeOwnedExecutorAttestation, Fn as retainedExecutorSeamKey, Ft as snapshotExecutorConfig, G as scopeRetainedOwnerContext, Gi as runtimeOwnedPendingExecutorMaterialization, H as prepareScopeRetainedOwnerSeatSwitch, Hi as runtimeOwnedExecutorExecutionBinding, I as abandonScopeRetainedOwnerInvocation, J as scopeRetainedOwnerResourceReader, Jn as readCommittedJsonLines, Jt as createActivityLog, K as scopeRetainedOwnerJournalRoot, Ki as runtimeOwnedScopeOwnerRuntime, Kn as isNoEntError, Kr as generateSpanId, L as beginScopeRetainedOwnerDrive, M as SeatChain, Mi as attestRuntimeOwnedScopeOwner, Mr as contentAddress, N as SeatChainExhaustedError, Nt as createExecutor, O as recordScopeOwnerPause, Oi as unsupportedProfileDimensions, Or as persistHarnessTranscript, P as authoredSeatStages, Pn as registerRetainedExecutorPreparation, Qi as detachedSnapshot, R as bindScopeRetainedOwnerEnvironmentId, Si as promptModelProfileMaterialization, Sr as RunCancellationReason, St as checkVerdictOf, T as meterRuntimeOwnedProviderAttempt, Tr as runAbortable, U as prepareScopeRetainedOwnerTask, Ui as runtimeOwnedExecutorMaterialization, V as noteScopeRetainedOwnerCoordination, Vi as runtimeOwnedDriveHarnessProviderEvidence, Vt as WORKER_TRACE_PROPAGATION, W as reconcileScopeRetainedOwnerEnvironment, Wi as runtimeOwnedExecutorProviderEvidence, Wr as createOtelExporter, X as scopeRetainedOwnerResult, Xr as toOtelAttributes, Xt as createInbox, Y as scopeRetainedOwnerRestorePoint, Z as scopeRetainedOwnerTurnEnded, _ as isDriverSpec, _i as controlProfileMaterialization, an as isLiveNodeStatus, b as assertRecursiveReservationPolicy, bi as profileMaterializationAxes$1, c as runTree, cn as bridgeModelRouteRefusal, dr as bridgeStopSignalKey, f as runDriverWithRetry, fr as errMessage, g as driverExecutorFactory, gi as assertProfileMaterialization, gt as CONTINUATIONS_DIR, h as driverChild, i as bestDelivered, ir as assertValidBudget, it as providerVisibleProfile, k as restoreScopeOwnerAcceptedExecution, kr as readHarnessTranscript, kt as bindReusableExecutorExecutionId, lr as spendFromUsageTotals, mt as gateOnDeliverable, n as createRootHandle, nt as coordinationMcpAlias, or as meterUsageEvent, p as summarizeDriverAttempts, q as scopeRetainedOwnerPriorSpend, qn as prepareJsonlAppend, r as createSupervisor, rt as coordinationProfileToolPrefix, s as runFinalizer, sn as bridgeAdmissionRefusal, sr as newUsageTotals, tr as executorFailure, u as HarnessTurnFailedError, ur as bridgeRuntimeAttachmentsKey, vi as defineProfileMaterializationContract, vt as CheckUnavailableError, w as meterRuntimeOwnedAccounting, wn as routerBrain, wr as linkAbort, x as beginScopeOwnerAttempt, xi as promptControlProfileMaterialization, xt as bestComposite, yi as fullProfileMaterialization, yt as admitContinuationPolicy, z as bindScopeRetainedOwnerProvider, zi as providerAttemptEvidence, zt as createRouterTranscript } from "./supervisor-WYRLsCp1.js";
|
|
2
2
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
3
|
-
import { G as errorMessage,
|
|
3
|
+
import { G as errorMessage, Tt as teardownSurfaces, Y as isAsyncIterable$1, _t as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, at as unmeteredSpend, dt as resourceTelemetry, ft as withBudgetResources, lt as addResourceSpend, ot as withTimeout, st as zeroSpend, tt as sleep, wt as teardownExecutor, z as addSpend } from "./workspace-streams-BEvSX97P.js";
|
|
4
4
|
import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutionSettings, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-DydyWTQg.js";
|
|
5
5
|
import { n as assertNoSymlinkDescendant } from "./durable-file-DWQA4ooo.js";
|
|
6
6
|
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
7
|
-
import { C as createInMemoryRunContext, D as applyRunCancellation, M as coordinationVerbNames, O as watchRunCancellation, P as createCoordinationToolsForManager, S as createFileRunContext, c as resolveWakePolicy, f as createProgressTracker, h as progressStop, m as plateau, n as createSteerAcknowledger, o as composeWakeInput, r as driverAgent, s as deadlineWarningAt, t as createCancelAcknowledger, w as withRunContext } from "./coordination-driver-
|
|
7
|
+
import { C as createInMemoryRunContext, D as applyRunCancellation, M as coordinationVerbNames, O as watchRunCancellation, P as createCoordinationToolsForManager, S as createFileRunContext, c as resolveWakePolicy, f as createProgressTracker, h as progressStop, m as plateau, n as createSteerAcknowledger, o as composeWakeInput, r as driverAgent, s as deadlineWarningAt, t as createCancelAcknowledger, w as withRunContext } from "./coordination-driver-CIfgl4Yj.js";
|
|
8
8
|
import { r as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-Dqer2M4_.js";
|
|
9
9
|
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-DSCWdbX2.js";
|
|
10
10
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
@@ -3727,6 +3727,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
|
|
|
3727
3727
|
"peerMail",
|
|
3728
3728
|
"perWorker",
|
|
3729
3729
|
"reservationPolicy",
|
|
3730
|
+
"deadlineCheckIn",
|
|
3730
3731
|
"profileGuidance",
|
|
3731
3732
|
"profileSecurity",
|
|
3732
3733
|
"registry",
|
|
@@ -3739,6 +3740,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
|
|
|
3739
3740
|
"router",
|
|
3740
3741
|
"runDir",
|
|
3741
3742
|
"resume",
|
|
3743
|
+
"modelChange",
|
|
3742
3744
|
"runContext",
|
|
3743
3745
|
"runId",
|
|
3744
3746
|
"signal",
|
|
@@ -4147,6 +4149,26 @@ function superviseRootProfile(profile, profileGuidance) {
|
|
|
4147
4149
|
const compose = profileGuidanceComposer(profileGuidance);
|
|
4148
4150
|
return freezeDetachedProfile(compose ? compose(parsedProfile.data) : parsedProfile.data);
|
|
4149
4151
|
}
|
|
4152
|
+
/** The model a root runs on, as a `model-changed` record names it. */
|
|
4153
|
+
function rootModelOf(profile) {
|
|
4154
|
+
return {
|
|
4155
|
+
...profile.model?.default === void 0 ? {} : { model: profile.model.default },
|
|
4156
|
+
...profile.model?.reasoningEffort === void 0 ? {} : { reasoningEffort: profile.model.reasoningEffort }
|
|
4157
|
+
};
|
|
4158
|
+
}
|
|
4159
|
+
/** The recorded root profile with only its model, and its reasoning effort when given, replaced. */
|
|
4160
|
+
function withRootModel(profile, change) {
|
|
4161
|
+
if (typeof change.model !== "string" || change.model.trim().length === 0) throw new ValidationError("supervise: modelChange.model must name a model");
|
|
4162
|
+
if (typeof change.reason !== "string" || change.reason.trim().length === 0) throw new ValidationError("supervise: modelChange.reason must say why the model changed");
|
|
4163
|
+
return superviseRootProfile({
|
|
4164
|
+
...profile,
|
|
4165
|
+
model: {
|
|
4166
|
+
...profile.model,
|
|
4167
|
+
default: change.model,
|
|
4168
|
+
...change.reasoningEffort === void 0 ? {} : { reasoningEffort: change.reasoningEffort }
|
|
4169
|
+
}
|
|
4170
|
+
}, void 0);
|
|
4171
|
+
}
|
|
4150
4172
|
function superviseWithContext(profile, task, opts, brain) {
|
|
4151
4173
|
if (opts.runContext?.acquire === void 0) return superviseInternal(profile, task, opts, brain);
|
|
4152
4174
|
const options = captureSuperviseOptions(opts);
|
|
@@ -4166,7 +4188,8 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
4166
4188
|
}
|
|
4167
4189
|
assertValidBudget(options.budget, "supervise budget");
|
|
4168
4190
|
const composeSpawnProfile = profileGuidanceComposer(options.profileGuidance);
|
|
4169
|
-
const
|
|
4191
|
+
const registeredProfile = superviseRootProfile(profile, options.profileGuidance);
|
|
4192
|
+
const canonicalProfile = options.modelChange === void 0 ? registeredProfile : withRootModel(registeredProfile, options.modelChange);
|
|
4170
4193
|
assertExecutableAgentProfile(canonicalProfile, "supervise root");
|
|
4171
4194
|
if (authoredSeatStages(canonicalProfile) !== void 0 && options.selectSeat === void 0) throw new ValidationError("supervise: AgentProfile.seats requires selectSeat before execution");
|
|
4172
4195
|
const canonicalTask = freezeDetached(task);
|
|
@@ -4185,7 +4208,7 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
4185
4208
|
})));
|
|
4186
4209
|
};
|
|
4187
4210
|
};
|
|
4188
|
-
const rootExecution = canonicalExecution(
|
|
4211
|
+
const rootExecution = canonicalExecution(registeredProfile, canonicalTask, options.execution, "supervise root");
|
|
4189
4212
|
const backendModel = options.backend?.model;
|
|
4190
4213
|
const driverBackendModel = options.driverBackend?.model;
|
|
4191
4214
|
assertProfileModelsAllowed(canonicalProfile, options.allowedModels);
|
|
@@ -4598,6 +4621,11 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
4598
4621
|
executors: ctx.executors,
|
|
4599
4622
|
...options.recoverExecutor ?? recoveryFactories.get(workerFactory) ? { recoverExecutor: options.recoverExecutor ?? recoveryFactories.get(workerFactory) } : {},
|
|
4600
4623
|
rootIdentity: rootExecution.identity,
|
|
4624
|
+
...options.modelChange === void 0 ? {} : { rootModelChange: {
|
|
4625
|
+
from: rootModelOf(registeredProfile),
|
|
4626
|
+
to: rootModelOf(canonicalProfile),
|
|
4627
|
+
reason: options.modelChange.reason
|
|
4628
|
+
} },
|
|
4601
4629
|
...rootOwnerRuntime === void 0 ? {} : { rootMaterialization: {
|
|
4602
4630
|
runtime: rootOwnerRuntime,
|
|
4603
4631
|
declaration: "deferred",
|
|
@@ -4610,6 +4638,7 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
4610
4638
|
ownerWorkspaceRetention: managerBackend?.backend === "provider" && managerBackend.workspaceRetention !== void 0,
|
|
4611
4639
|
...options.workerSlots !== void 0 ? { workerSlots: options.workerSlots } : {},
|
|
4612
4640
|
...options.reservationPolicy ? { reservationPolicy: options.reservationPolicy } : {},
|
|
4641
|
+
...options.deadlineCheckIn === void 0 ? {} : { deadlineCheckIn: options.deadlineCheckIn },
|
|
4613
4642
|
...ctx.resume === true || options.runDir === void 0 && options.resume === true ? { resume: true } : {},
|
|
4614
4643
|
...options.now ? { now: options.now } : {},
|
|
4615
4644
|
signal: options.signal ? AbortSignal.any([options.signal, durableCancellation.signal]) : durableCancellation.signal,
|
|
@@ -4688,4 +4717,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
4688
4717
|
//#endregion
|
|
4689
4718
|
export { readRootStreamReceipt as _, superviseWithTestBrain as a, createSupervisorSpanRecorder as b, resolveWorkerSpawnRetry as c, assertCoordinationBinding as d, resolveSupervisorProfile as f, readRootStream as g, ROOT_STREAM_FILE as h, superviseRootProfile as i, retryPreSpawnRefusals as l, supervisorAgentWithTestBrain as m, profileGuidanceComposer as n, workerFromBackend as o, supervisorAgent as p, supervise as r, isPreSpawnExecutorFailure as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, withWorkerSpawnRetry as u, UNPROVEN_CONTINUITY as v, serveCoordinationMcp as x, composeReentryTask as y };
|
|
4690
4719
|
|
|
4691
|
-
//# sourceMappingURL=supervise-
|
|
4720
|
+
//# sourceMappingURL=supervise-D6MgxpMI.js.map
|