@tangle-network/agent-runtime 0.328.0 → 0.329.0
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-DfhOPF9_.js → activation-BfHpXIo0.js} +2 -2
- package/dist/{activation-DfhOPF9_.js.map → activation-BfHpXIo0.js.map} +1 -1
- package/dist/{activation-CZRtcDPo.d.ts → activation-CQo8-ir9.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-B7Z9jgFr.js → coordination-driver-DsxFmzhm.js} +55 -19
- package/dist/coordination-driver-DsxFmzhm.js.map +1 -0
- package/dist/{delegate-By9tikQT.js → delegate-C-E2pUey.js} +2 -2
- package/dist/{delegate-By9tikQT.js.map → delegate-C-E2pUey.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +3 -3
- package/dist/{graph-0iL-4gj2.js → graph-BamfOWzd.js} +4 -4
- package/dist/{graph-0iL-4gj2.js.map → graph-BamfOWzd.js.map} +1 -1
- package/dist/{improvement-cycle-sd7Y_buy.js → improvement-cycle-BWcUsIgg.js} +3 -3
- package/dist/{improvement-cycle-sd7Y_buy.js.map → improvement-cycle-BWcUsIgg.js.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-CNmBGFAu.js → loop-runner-bin-CVZ5S19W.js} +3 -3
- package/dist/{loop-runner-bin-CNmBGFAu.js.map → loop-runner-bin-CVZ5S19W.js.map} +1 -1
- package/dist/{loop-runner-bin-DDz4VTyE.d.ts → loop-runner-bin-U00bzVay.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 +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-B3Z4i5_B.d.ts → openai-tools-DnA8exP6.d.ts} +2 -2
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-CCoerJyv.js → provision-supervisor-mpEy_KWu.js} +3 -3
- package/dist/{provision-supervisor-CCoerJyv.js.map → provision-supervisor-mpEy_KWu.js.map} +1 -1
- package/dist/{runtime-CYjHXjec.js → runtime-VteVmwAw.js} +8 -8
- package/dist/{runtime-CYjHXjec.js.map → runtime-VteVmwAw.js.map} +1 -1
- package/dist/{search-executor-BgMpZuhl.js → search-executor-eTeXrpkP.js} +2 -2
- package/dist/{search-executor-BgMpZuhl.js.map → search-executor-eTeXrpkP.js.map} +1 -1
- package/dist/{server-Czsqviqu.js → server-BGQv06nN.js} +3 -3
- package/dist/{server-Czsqviqu.js.map → server-BGQv06nN.js.map} +1 -1
- package/dist/{supervise-9WPjMFrH.js → supervise-BIIbQhg7.js} +39 -8
- package/dist/supervise-BIIbQhg7.js.map +1 -0
- package/dist/{supervisor-hIpqcCJr.js → supervisor-U76PdEPD.js} +31 -6
- package/dist/supervisor-U76PdEPD.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-0czU5q4A.d.ts → types-B6IAL5Q7.d.ts} +35 -2
- package/package.json +1 -1
- package/dist/coordination-driver-B7Z9jgFr.js.map +0 -1
- package/dist/supervise-9WPjMFrH.js.map +0 -1
- package/dist/supervisor-hIpqcCJr.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as assertNoSymlinkDescendant } from "./durable-file-B_eJr6Mb.js";
|
|
2
|
-
import { $n as
|
|
2
|
+
import { $n as persistHarnessTranscript, A as restoreScopeOwnerAcceptedExecution, B as bindScopeRetainedOwnerProvider, C as deriveNodeExecutionIdentity, Ca as spendFromUsageTotals, Cr as toOtelAttributes, Ct as bestComposite, D as recordScopeOwnerDriverAttempt, E as noteScopeOwnerPlannedExecution, En as routerBrain, F as authoredSeatStages, Ft as createExecutor, G as reconcileScopeRetainedOwnerEnvironment, Gr as controlProfileMaterialization, H as noteScopeRetainedOwnerCoordination, I as seatExecutionProfile, In as bridgeRuntimeAttachmentsKey, J as scopeRetainedOwnerPriorSpend, Jr as profileMaterializationAxes$1, K as scopeRetainedOwnerContext, Kr as defineProfileMaterializationContract, L as abandonScopeRetainedOwnerInvocation, Ln as bridgeStopSignalKey, Lt as snapshotExecutorConfig, Mn as resolveAgentEnvironmentProvider, Mt as captureReusableExecutorConfig, N as SeatChain, Ni as registerRetainedExecutorPreparation, O as recordScopeOwnerMaterialization, P as SeatChainExhaustedError, Pi as retainedExecutorSeamKey, Q as scopeRetainedOwnerTurnEnded, Qt as createInbox, R as beginScopeRetainedOwnerDrive, Si as runtimeOwnedScopeOwnerRuntime, T as meterRuntimeOwnedProviderAttempt, Tt as createContinuationKeeper, U as prepareScopeRetainedOwnerSeatSwitch, Ur as assertProfileMaterialization, Ut as WORKER_TRACE_PROPAGATION, V as consumeScopeRetainedOwnerResult, Vt as createRouterTranscript, W as prepareScopeRetainedOwnerTask, X as scopeRetainedOwnerRestorePoint, Xn as runAbortable, Xr as promptModelProfileMaterialization, Xt as createActivityLog, Y as scopeRetainedOwnerResourceReader, Yn as linkAbort, Yr as promptControlProfileMaterialization, Z as scopeRetainedOwnerResult, _ as isDriverSpec, _i as runtimeOwnedDriveHarnessProviderEvidence, _r as createOtelExporter, ai as worktreeCliProfileMaterialization, at as providerVisibleProfile, b as assertRecursiveReservationPolicy, ba as meterUsageEvent, bi as runtimeOwnedExecutorProviderEvidence, bt as CheckUnavailableError, c as runTree, ci as authoredAgentIdentity, da as contentAddress, di as inheritRuntimeOwnedExecutorAttestation, ei as renderUnsupported, er as readHarnessTranscript, f as runDriverWithRetry, g as driverExecutorFactory, gi as recordRuntimeOwnedDriveHarnessProviderEvidence, gt as gateOnDeliverable, h as driverChild, ha as errMessage, hi as providerAttemptEvidence, i as bestDelivered, in as isPeerMailEnvelope, it as coordinationProfileToolPrefix, j as scopeOwnerExecutorNodeContext, jt as bindReusableExecutorExecutionId, k as recordScopeOwnerPause, la as parseWorkerToolTraceArtifact, ln as bridgeAdmissionRefusal, ma as executorFailure, n as createRootHandle, ni as sandboxProfileMaterialization, ot as runtimeGraphMetadataKey, p as summarizeDriverAttempts, pa as detachedSnapshot, q as scopeRetainedOwnerJournalRoot, qn as RunCancellationReason, qr as fullProfileMaterialization, r as createSupervisor, ri as unsupportedProfileDimensions, rt as coordinationMcpAlias, s as runFinalizer, si as attestRuntimeOwnedScopeOwner, sn as isLiveNodeStatus, tn as PEER_MAIL_WIRE_KEY, u as HarnessTurnFailedError, un as bridgeModelRouteRefusal, va as assertValidBudget, vi as runtimeOwnedExecutorExecutionBinding, vt as CONTINUATIONS_DIR, w as meterRuntimeOwnedAccounting, wt as checkVerdictOf, x as beginScopeOwnerAttempt, xa as newUsageTotals, xi as runtimeOwnedPendingExecutorMaterialization, xt as admitContinuationPolicy, yi as runtimeOwnedExecutorMaterialization, yr as generateSpanId, z as bindScopeRetainedOwnerEnvironmentId } from "./supervisor-U76PdEPD.js";
|
|
3
3
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
4
4
|
import { $ as isAsyncIterable$1, Ot as teardownExecutor, U as addSpend, Y as errorMessage, at as sleep, dt as zeroSpend, gt as withBudgetResources, ht as resourceTelemetry, kt as teardownSurfaces, lt as unmeteredSpend, pt as addResourceSpend, ut as withTimeout, xt as DEFAULT_SUCCESSFUL_SHUTDOWN_MS } from "./sandbox-profile-compat-CVgQWb7T.js";
|
|
5
5
|
import { a as readCommittedJsonLines, n as isNoEntError, r as prepareJsonlAppend } from "./jsonl-file-DBv31uPi.js";
|
|
6
|
-
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-CyCUwHed.js";
|
|
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-CyCUwHed.js";
|
|
7
7
|
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
8
|
-
import { C as createFileRunContext, F as createCoordinationToolsForManager, N as coordinationVerbNames, O as applyRunCancellation, T as withRunContext, c as refreshedWake, g as progressStop, h as plateau, k as watchRunCancellation, l as resolveWakePolicy, n as createSteerAcknowledger, o as composeWakeInput, p as createProgressTracker, r as driverAgent, s as deadlineWarningAt, t as createCancelAcknowledger, w as createInMemoryRunContext } from "./coordination-driver-
|
|
8
|
+
import { C as createFileRunContext, F as createCoordinationToolsForManager, N as coordinationVerbNames, O as applyRunCancellation, T as withRunContext, c as refreshedWake, g as progressStop, h as plateau, k as watchRunCancellation, l as resolveWakePolicy, n as createSteerAcknowledger, o as composeWakeInput, p as createProgressTracker, r as driverAgent, s as deadlineWarningAt, t as createCancelAcknowledger, w as createInMemoryRunContext } from "./coordination-driver-DsxFmzhm.js";
|
|
9
9
|
import { r as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-Dqer2M4_.js";
|
|
10
10
|
import { c as loadGraph, i as graphRegistry } from "./graph-registry-DAI6KNXB.js";
|
|
11
11
|
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-Cu8H7aeh.js";
|
|
@@ -3153,6 +3153,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
3153
3153
|
try {
|
|
3154
3154
|
const wake = await controls.awaitWake({
|
|
3155
3155
|
attempt: nextAttempt,
|
|
3156
|
+
quietWhileProgressing: true,
|
|
3156
3157
|
signal: AbortSignal.any([scope.signal, stopController.signal]),
|
|
3157
3158
|
heartbeatMs: wakePolicy.heartbeatMs,
|
|
3158
3159
|
...deps.peerMailUrl ? { alsoWakeOn: peerInbox.pending() > 0 ? Promise.resolve() : peerInbox.nextDelivery() } : {},
|
|
@@ -4419,6 +4420,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
|
|
|
4419
4420
|
if (pending !== void 0) {
|
|
4420
4421
|
if (pending.runtime !== executor.runtime || pending.binding.attemptId !== scopeOwnerExecutorNodeContext(scope).attemptId) throw new ValidationError("driveHarnessFromBackend: pending executor did not bind the kernel-minted attempt");
|
|
4421
4422
|
if (canonicalAgentProfileDigest(pending.declaration.effectiveProfile) !== canonicalAgentProfileDigest(providerDriverProfile)) throw new ValidationError("driveHarnessFromBackend: pending executor changed the provider-visible AgentProfile before execution");
|
|
4423
|
+
noteScopeOwnerPlannedExecution(scope, pending.declaration.execution);
|
|
4422
4424
|
} else {
|
|
4423
4425
|
await publishMaterialization(declaration, executionBinding);
|
|
4424
4426
|
ownerMaterializationPublished = true;
|
|
@@ -5522,6 +5524,7 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
5522
5524
|
});
|
|
5523
5525
|
if (typeof decision !== "object" || decision === null || Array.isArray(decision)) throw new ValidationError("supervise: authorizeSpawn must return an AuthorizedSpawn");
|
|
5524
5526
|
const authorized = freezeDetachedProfile(applyTraceTools(decision.profile));
|
|
5527
|
+
const modelSubstitution = spawnModelSubstitution(input, authorized);
|
|
5525
5528
|
const childExecution = canonicalExecution(authorized, spawnContext.task, decision.execution, `supervise spawn ${JSON.stringify(spawnContext.label)}`);
|
|
5526
5529
|
const authorizedContext = Object.freeze({
|
|
5527
5530
|
...spawnContext,
|
|
@@ -5548,10 +5551,10 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
5548
5551
|
const seatManagedLeaf = authoredSeatStages(authorized) !== void 0 && declaredRuntimeToolNames(authorized).length === 0 && isExternalSupervisor(authorized);
|
|
5549
5552
|
if (!(declaredRuntimeToolNames(authorized).length > 0 || seatManagedLeaf)) {
|
|
5550
5553
|
if (childDeliverable !== deliverable && !options.backend) throw new ValidationError("supervise: resolveDeliverable selected a per-spawn deliverable but there is no backend to derive that leaf from; makeLeafAgent owns its own completion check");
|
|
5551
|
-
return (childDeliverable === deliverable ? makeLeaf : withRetry(workerFromBackend(options.backend, childDeliverable)))(authorized, Object.freeze({
|
|
5554
|
+
return withModelSubstitution((childDeliverable === deliverable ? makeLeaf : withRetry(workerFromBackend(options.backend, childDeliverable)))(authorized, Object.freeze({
|
|
5552
5555
|
...authorizedContext,
|
|
5553
5556
|
assignmentId: workerAssignmentNamespace(runNamespace, parentOwnerId, spawnContext.assignmentId)
|
|
5554
|
-
}));
|
|
5557
|
+
})), modelSubstitution);
|
|
5555
5558
|
}
|
|
5556
5559
|
const ownerId = childCoordinationOwner(parentOwnerId, childExecution.identity, spawnContext, depth);
|
|
5557
5560
|
const subtask = graphSubtaskOf(authorized);
|
|
@@ -5594,7 +5597,7 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
5594
5597
|
let acceptedSubmission = false;
|
|
5595
5598
|
let unassessedOutput = false;
|
|
5596
5599
|
const peerAudit = depth === 1 ? peerAuditFor(spawnContext.parentNodeId) : void 0;
|
|
5597
|
-
return driverChild(authorized, supervisorAgent(authorized, {
|
|
5600
|
+
return withModelSubstitution(driverChild(authorized, supervisorAgent(authorized, {
|
|
5598
5601
|
...spawnContext.peerMailUrl ? { peerMailUrl: spawnContext.peerMailUrl } : {},
|
|
5599
5602
|
...peerAudit ? { peerAudit } : {},
|
|
5600
5603
|
blobs,
|
|
@@ -5663,7 +5666,7 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
5663
5666
|
},
|
|
5664
5667
|
...options.steerDir === void 0 ? {} : { steerDir: resolve(options.steerDir) },
|
|
5665
5668
|
...options.runDir === void 0 && options.steerDir === void 0 ? {} : { controlScope: "subtree" }
|
|
5666
|
-
}), journal, childExecution.ref, () => acceptedSubmission, recoveryFactories.get(childFactory), () => unassessedOutput, seatManagedLeaf ? managerDeliverable : void 0, ownGraph ? (out) => graphSubtaskOutput(ownGraph, out) : void 0);
|
|
5669
|
+
}), journal, childExecution.ref, () => acceptedSubmission, recoveryFactories.get(childFactory), () => unassessedOutput, seatManagedLeaf ? managerDeliverable : void 0, ownGraph ? (out) => graphSubtaskOutput(ownGraph, out) : void 0), modelSubstitution);
|
|
5667
5670
|
};
|
|
5668
5671
|
if (options.makeLeafAgent === void 0 && options.backend?.backend === "provider" && !options.backend.steering) {
|
|
5669
5672
|
const factory = registerRetainedExecutorPreparation(createExecutor(options.backend), ({ spawned, profile, task }) => {
|
|
@@ -5922,7 +5925,35 @@ function rootProviderModelEvidence(observations) {
|
|
|
5922
5925
|
function rootProviderModelEvidenceFromExecution(evidence) {
|
|
5923
5926
|
return evidence ?? rootProviderModelEvidence([]);
|
|
5924
5927
|
}
|
|
5928
|
+
/**
|
|
5929
|
+
* The route a spawn authorization replaced, when the parent authored part of it. Only a part the
|
|
5930
|
+
* parent named counts: authorization filling an omitted harness or provider is not a substitution.
|
|
5931
|
+
*/
|
|
5932
|
+
function spawnModelSubstitution(authored, authorized) {
|
|
5933
|
+
const harness = agentHarness(authored.harness);
|
|
5934
|
+
const provider = authored.model?.provider?.trim() || void 0;
|
|
5935
|
+
const model = profileProviderModel(authored);
|
|
5936
|
+
if (model === void 0) return void 0;
|
|
5937
|
+
if (!(harness !== void 0 && harness !== agentHarness(authorized.harness) || provider !== void 0 && provider !== authorized.model?.provider?.trim() || model !== profileProviderModel(authorized))) return void 0;
|
|
5938
|
+
return Object.freeze({
|
|
5939
|
+
requested: profileBridgeWireModel(authored) ?? model,
|
|
5940
|
+
ran: profileBridgeWireModel(authorized) ?? "unspecified"
|
|
5941
|
+
});
|
|
5942
|
+
}
|
|
5943
|
+
/** The worker agent with the substitution on its spec, which Scope journals on `spawned`. */
|
|
5944
|
+
function withModelSubstitution(agent, substitution) {
|
|
5945
|
+
if (substitution === void 0) return agent;
|
|
5946
|
+
const spec = agent.executorSpec;
|
|
5947
|
+
if (spec === void 0) return agent;
|
|
5948
|
+
return {
|
|
5949
|
+
...agent,
|
|
5950
|
+
executorSpec: {
|
|
5951
|
+
...spec,
|
|
5952
|
+
modelSubstitution: substitution
|
|
5953
|
+
}
|
|
5954
|
+
};
|
|
5955
|
+
}
|
|
5925
5956
|
//#endregion
|
|
5926
5957
|
export { dumbContinuationPassPrompt as A, defaultEdgeTraversalCap as C, createPromptRegistry as D, analyzesFindingsReportPrompt as E, serveCoordinationMcp as F, kernelPromptRegistry as M, naiveContinuationPrompt as N, delegatesWorkerBriefPrompt as O, promptHandle as P, createGraphOverlay as S, validateGraphTopology as T, readRootStream as _, superviseRootProfile as a, composeReentryTask as b, isPreSpawnExecutorFailure as c, withWorkerSpawnRetry as d, assertCoordinationBinding as f, ROOT_STREAM_FILE as g, supervisorAgentWithTestBrain as h, superviseFleetCapabilities as i, formatPromptHandle as j, dumbContinuationFailPrompt as k, resolveWorkerSpawnRetry as l, supervisorAgent as m, profileGuidanceComposer as n, superviseWithTestBrain as o, resolveSupervisorProfile as p, supervise as r, workerFromBackend as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, retryPreSpawnRefusals as u, readRootStreamReceipt as v, graphRootProfile as w, createSupervisorSpanRecorder as x, UNPROVEN_CONTINUITY as y };
|
|
5927
5958
|
|
|
5928
|
-
//# sourceMappingURL=supervise-
|
|
5959
|
+
//# sourceMappingURL=supervise-BIIbQhg7.js.map
|