@tangle-network/agent-runtime 0.225.1 → 0.225.4
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-zQ47z9FG.js → activation-CrFLG_DS.js} +2 -2
- package/dist/{activation-zQ47z9FG.js.map → activation-CrFLG_DS.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-BqLV8b5T.js → coordination-driver-BHAYNyz2.js} +2 -2
- package/dist/{coordination-driver-BqLV8b5T.js.map → coordination-driver-BHAYNyz2.js.map} +1 -1
- package/dist/{delegate-CaAMnaO5.js → delegate-G_1flRn0.js} +2 -2
- package/dist/{delegate-CaAMnaO5.js.map → delegate-G_1flRn0.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +2 -2
- package/dist/{graph-I8lfvnso.js → graph-DPTDr-JY.js} +4 -4
- package/dist/{graph-I8lfvnso.js.map → graph-DPTDr-JY.js.map} +1 -1
- package/dist/{improvement-cycle-BULzVVIR.js → improvement-cycle-CSl1J2fH.js} +4 -4
- package/dist/{improvement-cycle-BULzVVIR.js.map → improvement-cycle-CSl1J2fH.js.map} +1 -1
- package/dist/{index-C2T1Z3jZ.d.ts → index-ClXIBpKe.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-BMCpT2i0.d.ts → loop-runner-bin-BRfsk-9d.d.ts} +2 -2
- package/dist/{loop-runner-bin-Cq39sFKO.js → loop-runner-bin-Zb_e0jPb.js} +3 -3
- package/dist/{loop-runner-bin-Cq39sFKO.js.map → loop-runner-bin-Zb_e0jPb.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 +1 -1
- package/dist/mcp/index.js +5 -5
- package/dist/{model-policy-DKDyr-fc.js → model-policy-BbSCSak0.js} +4 -4
- package/dist/model-policy-BbSCSak0.js.map +1 -0
- package/dist/profiles.js +1 -1
- package/dist/{provision-supervisor-DmJM7tiC.js → provision-supervisor-D8zAN2xH.js} +8 -35
- package/dist/provision-supervisor-D8zAN2xH.js.map +1 -0
- package/dist/{runtime-DHRhpyLd.js → runtime-BQIkc_DK.js} +24 -24
- package/dist/runtime-BQIkc_DK.js.map +1 -0
- package/dist/{server-C9iqlpwt.js → server-CzAToCHC.js} +3 -3
- package/dist/{server-C9iqlpwt.js.map → server-CzAToCHC.js.map} +1 -1
- package/dist/{structural-rollout-1Y1xqzLI.js → structural-rollout-BUxgTW0g.js} +6 -7
- package/dist/structural-rollout-BUxgTW0g.js.map +1 -0
- package/dist/{supervise-DhIgG9_d.js → supervise-C3cbVtiO.js} +9 -15
- package/dist/supervise-C3cbVtiO.js.map +1 -0
- package/dist/{supervisor-BXzhAITL.js → supervisor-xPfp7VGA.js} +239 -172
- package/dist/supervisor-xPfp7VGA.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/model-policy-DKDyr-fc.js.map +0 -1
- package/dist/provision-supervisor-DmJM7tiC.js.map +0 -1
- package/dist/runtime-DHRhpyLd.js.map +0 -1
- package/dist/structural-rollout-1Y1xqzLI.js.map +0 -1
- package/dist/supervise-DhIgG9_d.js.map +0 -1
- package/dist/supervisor-BXzhAITL.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $n as generateSpanId, $r as runtimeOwnedExecutorProviderEvidence, Ai as sleep, At as WORKER_TRACE_PROPAGATION, C as scopeOwnerExecutorNodeContext, Cr as defineProfileMaterializationContract, Dn as registerRetainedExecutorPreparation, Dr as promptModelProfileMaterialization, Dt as newUsageTotals, Er as promptControlProfileMaterialization, Et as meterUsageEvent, F as scopeRetainedOwnerResult, Fi as withTimeout, Fr as worktreeCliProfileMaterialization, Gi as teardownExecutor, Ii as zeroSpend, Jr as providerAttemptEvidence, Li as addResourceSpend, M as prepareScopeRetainedOwnerTask, Mn as runAbortable, N as scopeRetainedOwnerContext, Nr as unsupportedProfileDimensions, On as retainedExecutorSeamKey, P as scopeRetainedOwnerPriorSpend, Pi as unmeteredSpend, Q as captureReusableExecutorConfig, Qr as runtimeOwnedExecutorMaterialization, Ri as resourceTelemetry, S as restoreScopeOwnerAcceptedExecution, Si as addSpend, Sn as resolveAgentEnvironmentProvider, Sr as controlProfileMaterialization, St as contentAddress, Tr as profileMaterializationAxes$1, Ui as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Vr as attestRuntimeOwnedScopeOwner, Wr as inheritRuntimeOwnedExecutorAttestation, Xn as createOtelExporter, Xr as runtimeOwnedDriveHarnessProviderEvidence, Xt as bridgeAdmissionRefusal, Yr as recordRuntimeOwnedDriveHarnessProviderEvidence, Z as bindReusableExecutorExecutionId, Zr as runtimeOwnedExecutorExecutionBinding, Zt as bridgeModelRouteRefusal, b as meterRuntimeOwnedProviderAttempt, d as runDriverWithRetry, ei as runtimeOwnedPendingExecutorMaterialization, f as driverChild, g as beginScopeOwnerAttempt, j as consumeScopeRetainedOwnerResult, jr as renderUnsupported, kn as RunCancellationReason, kt as spendFromUsageTotals, m as isDriverSpec, mn as routerBrain, n as createSupervisor, nn as bridgeRuntimeAttachmentsKey, o as runFinalizer, p as driverExecutorFactory, r as bestDelivered, rn as bridgeStopSignalKey, rr as toOtelAttributes, rt as snapshotExecutorConfig, s as runTree, si as detachedSnapshot, t as createRootHandle, ti as runtimeOwnedScopeOwnerRuntime, tt as createExecutor, u as defaultUnmetContractSteer, v as deriveNodeExecutionIdentity, wr as fullProfileMaterialization, wt as assertValidBudget, x as recordScopeOwnerMaterialization, xr as assertProfileMaterialization, y as meterRuntimeOwnedAccounting, zi as withBudgetResources, zt as createInbox } from "./supervisor-xPfp7VGA.js";
|
|
2
2
|
import { i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
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-
|
|
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 { t as createStdioToolServer } from "./tool-server-BJbCPhoW.js";
|
|
6
|
-
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-
|
|
6
|
+
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-BHAYNyz2.js";
|
|
7
7
|
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-hZREkcfu.js";
|
|
8
8
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
9
9
|
import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -476,7 +476,7 @@ function assertCoordinationTransport(options) {
|
|
|
476
476
|
if (!isLoopbackHost(options.host ?? "127.0.0.1") && !options.authentication) throw new ConfigError("coordination non-loopback address requires authentication; allowUnauthenticatedRemote is no longer supported");
|
|
477
477
|
if (options.authentication !== void 0 && options.authentication !== true && (typeof options.authentication !== "object" || options.authentication === null || Array.isArray(options.authentication))) throw new ConfigError("coordination authentication must be true or a credential lifetime configuration");
|
|
478
478
|
const ttl = typeof options.authentication === "object" ? options.authentication.ttlMs : void 0;
|
|
479
|
-
if (ttl !== void 0 && (!Number.isSafeInteger(ttl) || ttl <= 0 ||
|
|
479
|
+
if (ttl !== void 0 && (!Number.isSafeInteger(ttl) || ttl <= 0 || !Number.isSafeInteger(Date.now() + ttl))) throw new ConfigError("coordination credential ttlMs must be a positive safe integer with a safe expiry");
|
|
480
480
|
if (options.publicUrl !== void 0 && !options.authentication) throw new ConfigError("coordination publicUrl requires authentication");
|
|
481
481
|
const signingKeys = typeof options.authentication === "object" ? options.authentication.signingKeys : void 0;
|
|
482
482
|
if (signingKeys !== void 0) {
|
|
@@ -526,9 +526,11 @@ async function serveCoordinationMcp(opts) {
|
|
|
526
526
|
const rotateCredential = () => {
|
|
527
527
|
if (!opts.authentication) throw new ConfigError("coordination authentication is not configured");
|
|
528
528
|
if (closed) throw new ConfigError("coordination server is closed");
|
|
529
|
+
const expiresAt = Date.now() + (auth?.ttlMs ?? 9e5);
|
|
530
|
+
if (!Number.isSafeInteger(expiresAt)) throw new ConfigError("coordination credential expiry must remain a safe integer");
|
|
529
531
|
for (const [credential, expiry] of revoked) if (expiry <= Date.now()) revoked.delete(credential);
|
|
530
532
|
if (token) revoked.set(token.toString(), credentialExpiresAt);
|
|
531
|
-
credentialExpiresAt =
|
|
533
|
+
credentialExpiresAt = expiresAt;
|
|
532
534
|
const nonce = randomBytes(32).toString("base64url");
|
|
533
535
|
let text = nonce;
|
|
534
536
|
if (signingKeys) {
|
|
@@ -1788,15 +1790,7 @@ function isAsyncIterable$1(value) {
|
|
|
1788
1790
|
* timer lets the process exit mid-backoff when nothing else is pending. */
|
|
1789
1791
|
function defaultSleep(ms, signal) {
|
|
1790
1792
|
if (ms <= 0 || signal?.aborted) return Promise.resolve();
|
|
1791
|
-
return
|
|
1792
|
-
const done = () => {
|
|
1793
|
-
clearTimeout(timer);
|
|
1794
|
-
signal?.removeEventListener("abort", done);
|
|
1795
|
-
resolve();
|
|
1796
|
-
};
|
|
1797
|
-
const timer = setTimeout(done, ms);
|
|
1798
|
-
signal?.addEventListener("abort", done, { once: true });
|
|
1799
|
-
});
|
|
1793
|
+
return sleep(ms, signal);
|
|
1800
1794
|
}
|
|
1801
1795
|
//#endregion
|
|
1802
1796
|
//#region src/runtime/supervise/supervise.ts
|
|
@@ -3394,4 +3388,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
3394
3388
|
//#endregion
|
|
3395
3389
|
export { mapExecutorResult as _, isPreSpawnExecutorFailure as a, withWorkerSpawnRetry as c, resolveSupervisorProfile as d, supervisorAgent as f, gateOnDeliverable as g, serveCoordinationMcp as h, workerFromBackend as i, assertCoordinationBinding as l, createSupervisorSpanRecorder 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 };
|
|
3396
3390
|
|
|
3397
|
-
//# sourceMappingURL=supervise-
|
|
3391
|
+
//# sourceMappingURL=supervise-C3cbVtiO.js.map
|