@tangle-network/agent-runtime 0.238.0 → 0.239.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-Br1FRlyB.js → activation-CUhkPtm0.js} +2 -2
- package/dist/{activation-Br1FRlyB.js.map → activation-CUhkPtm0.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-DbiCH5be.js → coordination-driver-m-2dzvu6.js} +7 -238
- package/dist/coordination-driver-m-2dzvu6.js.map +1 -0
- package/dist/{delegate-C4rLxuv8.js → delegate-DRQtaWF1.js} +2 -2
- package/dist/{delegate-C4rLxuv8.js.map → delegate-DRQtaWF1.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +2 -2
- package/dist/{graph-BHU73FnA.js → graph-B17RjVhE.js} +3 -3
- package/dist/{graph-BHU73FnA.js.map → graph-B17RjVhE.js.map} +1 -1
- package/dist/{improvement-cycle-DkzbEzS5.js → improvement-cycle-BP4rDivU.js} +3 -3
- package/dist/{improvement-cycle-DkzbEzS5.js.map → improvement-cycle-BP4rDivU.js.map} +1 -1
- package/dist/{index-B8Fmz26p.d.ts → index-DTGWDyrF.d.ts} +126 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-vGFnPXLM.d.ts → loop-runner-bin-BGi5UT85.d.ts} +2 -2
- package/dist/{loop-runner-bin-BaQIyvh-.js → loop-runner-bin-mrOuv9SU.js} +3 -3
- package/dist/{loop-runner-bin-BaQIyvh-.js.map → loop-runner-bin-mrOuv9SU.js.map} +1 -1
- 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 +5 -5
- package/dist/{provision-supervisor-Briw5tX4.js → provision-supervisor-CNdrsjvc.js} +3 -3
- package/dist/{provision-supervisor-Briw5tX4.js.map → provision-supervisor-CNdrsjvc.js.map} +1 -1
- package/dist/{runtime-BzGKUqqY.js → runtime-BsPY_v8H.js} +8 -8
- package/dist/{runtime-BzGKUqqY.js.map → runtime-BsPY_v8H.js.map} +1 -1
- package/dist/{server-CDn-i_GJ.js → server-b8uEBoK0.js} +3 -3
- package/dist/{server-CDn-i_GJ.js.map → server-b8uEBoK0.js.map} +1 -1
- package/dist/{structural-rollout-B-EAO8C5.js → structural-rollout-sy2sH_7-.js} +2 -2
- package/dist/{structural-rollout-B-EAO8C5.js.map → structural-rollout-sy2sH_7-.js.map} +1 -1
- package/dist/{supervise-Dc2DjlZS.js → supervise-CBd3FyCS.js} +15 -4
- package/dist/supervise-CBd3FyCS.js.map +1 -0
- package/dist/{supervisor-BN3oMv_v.js → supervisor-De0lytFU.js} +406 -20
- package/dist/supervisor-De0lytFU.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/package.json +1 -1
- package/dist/coordination-driver-DbiCH5be.js.map +0 -1
- package/dist/supervise-Dc2DjlZS.js.map +0 -1
- package/dist/supervisor-BN3oMv_v.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $n as contentAddress, Bn as linkAbort, Br as promptModelProfileMaterialization, C as restoreScopeOwnerAcceptedExecution, Cn as routerBrain, F as prepareScopeRetainedOwnerTask, Fi as addSpend, Fr as controlProfileMaterialization, Ft as newUsageTotals, I as scopeRetainedOwnerContext, In as registerRetainedExecutorPreparation, Ir as defineProfileMaterializationContract, Ji as withTimeout, Jr as worktreeCliProfileMaterialization, Kr as unsupportedProfileDimensions, L as scopeRetainedOwnerPriorSpend, Ln as retainedExecutorSeamKey, Lr as fullProfileMaterialization, Lt as spendFromUsageTotals, M as bindScopeRetainedOwnerEnvironmentId, Mt as assertValidBudget, N as bindScopeRetainedOwnerProvider, P as consumeScopeRetainedOwnerResult, Pr as assertProfileMaterialization, Pt as meterUsageEvent, Qi as withBudgetResources, R as scopeRetainedOwnerResourceReader, Rn as RunCancellationReason, Rr as profileMaterializationAxes$1, Rt as WORKER_TRACE_PROPAGATION, S as recordScopeOwnerMaterialization, Ui as sleep, Vn as runAbortable, Wr as renderUnsupported, Xi as addResourceSpend, Xr as prepareJsonlAppend, Yi as zeroSpend, Yr as isNoEntError, Zi as resourceTelemetry, Zr as readCommittedJsonLines, _ as beginScopeOwnerAttempt, an as bridgeAdmissionRefusal, b as meterRuntimeOwnedAccounting, bi as detachedSnapshot, ci as recordRuntimeOwnedDriveHarnessProviderEvidence, d as defaultUnmetContractSteer, di as runtimeOwnedExecutorMaterialization, dn as bridgeRuntimeAttachmentsKey, ei as attestRuntimeOwnedScopeOwner, f as runDriverWithRetry, fi as runtimeOwnedExecutorProviderEvidence, fn as bridgeStopSignalKey, fr as generateSpanId, ft as snapshotExecutorConfig, gr as toOtelAttributes, h as isDriverSpec, ia as teardownExecutor, in as executorFailure, jn as resolveAgentEnvironmentProvider, l as HarnessTurnFailedError, li as runtimeOwnedDriveHarnessProviderEvidence, lr as createOtelExporter, m as driverExecutorFactory, mi as runtimeOwnedScopeOwnerRuntime, n as createSupervisor, na as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, o as runFinalizer, on as bridgeModelRouteRefusal, ot as bindReusableExecutorExecutionId, p as driverChild, pi as runtimeOwnedPendingExecutorMaterialization, qi as unmeteredSpend, qt as createInbox, r as bestDelivered, ri as inheritRuntimeOwnedExecutorAttestation, s as runTree, si as providerAttemptEvidence, st as captureReusableExecutorConfig, t as createRootHandle, tt as errMessage, ui as runtimeOwnedExecutorExecutionBinding, ut as createExecutor, w as scopeOwnerExecutorNodeContext, x as meterRuntimeOwnedProviderAttempt, y as deriveNodeExecutionIdentity, z as scopeRetainedOwnerResult, zr as promptControlProfileMaterialization } from "./supervisor-De0lytFU.js";
|
|
2
2
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
3
3
|
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, f as harnessRunsAgent, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile } from "./model-policy-BbSCSak0.js";
|
|
4
4
|
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
5
5
|
import { n as assertNoSymlinkDescendant } from "./durable-file-D24y9zg7.js";
|
|
6
6
|
import { n as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-x9NEhvHZ.js";
|
|
7
|
-
import { D as coordinationVerbNames, O as createCoordinationTools, S as watchRunCancellation, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, w as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, x as applyRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-
|
|
7
|
+
import { D as coordinationVerbNames, O as createCoordinationTools, S as watchRunCancellation, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, w as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, x as applyRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-m-2dzvu6.js";
|
|
8
8
|
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-hZREkcfu.js";
|
|
9
9
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
10
10
|
import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -665,6 +665,7 @@ async function serveCoordinationMcp(opts) {
|
|
|
665
665
|
};
|
|
666
666
|
const audiences = /* @__PURE__ */ new Set();
|
|
667
667
|
const paths = /* @__PURE__ */ new Set(["/mcp"]);
|
|
668
|
+
const ownerReader = opts.spawnResourceReader ?? (opts.spawnResourceRoot === void 0 ? scopeRetainedOwnerResourceReader(opts.scope) : void 0);
|
|
668
669
|
const coord = createCoordinationTools({
|
|
669
670
|
scope: opts.scope,
|
|
670
671
|
blobs: opts.blobs,
|
|
@@ -691,6 +692,7 @@ async function serveCoordinationMcp(opts) {
|
|
|
691
692
|
...opts.preflightSpawn ? { preflightSpawn: opts.preflightSpawn } : {},
|
|
692
693
|
...opts.resolveSpawnProfile ? { resolveSpawnProfile: opts.resolveSpawnProfile } : {},
|
|
693
694
|
...opts.spawnResourceRoot ? { spawnResourceRoot: opts.spawnResourceRoot } : {},
|
|
695
|
+
...ownerReader ? { spawnResourceReader: ownerReader } : {},
|
|
694
696
|
...opts.peerMail ? { peerMail: typeof opts.peerMail === "object" && opts.peerMail.limits ? { limits: opts.peerMail.limits } : {} } : {}
|
|
695
697
|
});
|
|
696
698
|
await coord.ready();
|
|
@@ -1596,6 +1598,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
1596
1598
|
...deps.preflightSpawn ? { preflightSpawn: deps.preflightSpawn } : {},
|
|
1597
1599
|
...deps.resolveSpawnProfile ? { resolveSpawnProfile: deps.resolveSpawnProfile } : {},
|
|
1598
1600
|
...deps.spawnResourceRoot ? { spawnResourceRoot: deps.spawnResourceRoot } : {},
|
|
1601
|
+
...deps.spawnResourceReader ? { spawnResourceReader: deps.spawnResourceReader } : {},
|
|
1599
1602
|
...deps.stopRule ? { stopRule: deps.stopRule } : {},
|
|
1600
1603
|
...deps.onProgressStop ? { onProgressStop: deps.onProgressStop } : {},
|
|
1601
1604
|
...deps.maxTurns !== void 0 ? { maxTurns: deps.maxTurns } : {},
|
|
@@ -1684,6 +1687,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
1684
1687
|
...deps.preflightSpawn ? { preflightSpawn: deps.preflightSpawn } : {},
|
|
1685
1688
|
...deps.resolveSpawnProfile ? { resolveSpawnProfile: deps.resolveSpawnProfile } : {},
|
|
1686
1689
|
...deps.spawnResourceRoot ? { spawnResourceRoot: deps.spawnResourceRoot } : {},
|
|
1690
|
+
...deps.spawnResourceReader ? { spawnResourceReader: deps.spawnResourceReader } : {},
|
|
1687
1691
|
...deps.peerMail ? { peerMail: deps.peerMail } : {},
|
|
1688
1692
|
...priorCoordination?.questions.length ? { priorQuestions: priorCoordination.questions } : {},
|
|
1689
1693
|
...priorCoordination?.escalations?.length ? { priorEscalations: priorCoordination.escalations } : {},
|
|
@@ -2485,7 +2489,14 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
|
|
|
2485
2489
|
let activeExecutor;
|
|
2486
2490
|
const drive = async ({ profile, authoredProfile, task, scope, coordinationMcpUrl, coordinationMcpHeaders, stopSignal, coordinationTools }) => {
|
|
2487
2491
|
const retainedOwner = boundBackend.backend === "provider" ? scopeRetainedOwnerContext(scope) : void 0;
|
|
2488
|
-
if (retainedOwner && boundBackend.backend === "provider")
|
|
2492
|
+
if (retainedOwner && boundBackend.backend === "provider") {
|
|
2493
|
+
bindScopeRetainedOwnerProvider(scope, resolveAgentEnvironmentProvider(boundBackend.provider, boundBackend.registry));
|
|
2494
|
+
bindScopeRetainedOwnerEnvironmentId(scope, () => {
|
|
2495
|
+
if (activeExecutor === void 0) return void 0;
|
|
2496
|
+
const execution = runtimeOwnedExecutorMaterialization(activeExecutor)?.execution;
|
|
2497
|
+
return execution?.kind === "environment" ? execution.id : void 0;
|
|
2498
|
+
});
|
|
2499
|
+
}
|
|
2489
2500
|
const originalTask = retainedOwner ? await prepareScopeRetainedOwnerTask(scope, task) : task;
|
|
2490
2501
|
const acceptedOwner = retainedOwner ? await scopeRetainedOwnerResult(scope) : void 0;
|
|
2491
2502
|
if (acceptedOwner) {
|
|
@@ -3689,4 +3700,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
3689
3700
|
//#endregion
|
|
3690
3701
|
export { createSupervisorSpanRecorder as _, isPreSpawnExecutorFailure as a, mapExecutorResult as b, withWorkerSpawnRetry as c, resolveSupervisorProfile as d, supervisorAgent as f, readRootStreamReceipt as g, readRootStream as h, workerFromBackend as i, assertCoordinationBinding as l, ROOT_STREAM_FILE as m, supervise as n, resolveWorkerSpawnRetry as o, supervisorAgentWithTestBrain as p, superviseWithTestBrain as r, retryPreSpawnRefusals as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, coordinationProfileToolPrefix as u, serveCoordinationMcp as v, gateOnDeliverable as y };
|
|
3691
3702
|
|
|
3692
|
-
//# sourceMappingURL=supervise-
|
|
3703
|
+
//# sourceMappingURL=supervise-CBd3FyCS.js.map
|