@tangle-network/agent-runtime 0.287.1 → 0.288.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-Dyv1dMkl.d.ts → activation-BkV764Zd.d.ts} +3 -3
- package/dist/{activation-v8YzadAV.js → activation-DxeYsJ_d.js} +2 -2
- package/dist/{activation-v8YzadAV.js.map → activation-DxeYsJ_d.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-JuhaM7h9.js → coordination-driver-DpdpPon7.js} +2 -2
- package/dist/{coordination-driver-JuhaM7h9.js.map → coordination-driver-DpdpPon7.js.map} +1 -1
- package/dist/{delegate-mU1hNp4x.js → delegate-CKmKw7Jx.js} +2 -2
- package/dist/{delegate-mU1hNp4x.js.map → delegate-CKmKw7Jx.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +2 -2
- package/dist/{graph-BrbDHk_N.js → graph-jaIFIblc.js} +5 -5
- package/dist/{graph-BrbDHk_N.js.map → graph-jaIFIblc.js.map} +1 -1
- package/dist/{improvement-cycle-DBvwFjzV.js → improvement-cycle-AzMyQTUA.js} +4 -4
- package/dist/{improvement-cycle-DBvwFjzV.js.map → improvement-cycle-AzMyQTUA.js.map} +1 -1
- package/dist/{index-bw6F9zYu.d.ts → index-Tzd4_vIu.d.ts} +4 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +8 -8
- package/dist/intelligence.d.ts +3 -3
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-aBNPvBlN.d.ts → loop-runner-bin-CeVE_cd8.d.ts} +3 -3
- package/dist/{loop-runner-bin-DnzN8uSs.js → loop-runner-bin-D8lRa440.js} +3 -3
- package/dist/{loop-runner-bin-DnzN8uSs.js.map → loop-runner-bin-D8lRa440.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 +5 -5
- package/dist/mcp/index.js +5 -5
- package/dist/{model-policy-BbSCSak0.js → model-policy-CA5d1YUP.js} +6 -4
- package/dist/model-policy-CA5d1YUP.js.map +1 -0
- package/dist/{openai-tools-lQtFkNKQ.d.ts → openai-tools-CWp4nc4r.d.ts} +2 -2
- package/dist/profiles.d.ts +2 -2
- package/dist/profiles.js +1 -1
- package/dist/{provision-supervisor-Cqsvapjc.js → provision-supervisor-MoeFCVIJ.js} +4 -4
- package/dist/{provision-supervisor-Cqsvapjc.js.map → provision-supervisor-MoeFCVIJ.js.map} +1 -1
- package/dist/{runtime-hBrhhci-.js → runtime-DBeE_6EE.js} +9 -9
- package/dist/{runtime-hBrhhci-.js.map → runtime-DBeE_6EE.js.map} +1 -1
- package/dist/{search-method-qqof5BPa.js → search-method-Bvvx_KS6.js} +4 -4
- package/dist/search-method-Bvvx_KS6.js.map +1 -0
- package/dist/{server-t5Xne9Nn.js → server-BJjYpmS8.js} +3 -3
- package/dist/{server-t5Xne9Nn.js.map → server-BJjYpmS8.js.map} +1 -1
- package/dist/{stream-agent-turn-CUMwVuOz.d.ts → stream-agent-turn-DMoigo5H.d.ts} +2 -2
- package/dist/{substrate-CdOWExde.d.ts → substrate-C9cGwDJ5.d.ts} +2 -2
- package/dist/{supervise-C-OUl-0_.js → supervise-CvpJpknN.js} +5 -4
- package/dist/supervise-CvpJpknN.js.map +1 -0
- package/dist/{supervisor-DCSxS4UB.js → supervisor-D0-rYBEM.js} +29 -4
- package/dist/supervisor-D0-rYBEM.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-D5n136cu.d.ts → types-BPO06pPv.d.ts} +12 -1
- package/package.json +1 -1
- package/dist/model-policy-BbSCSak0.js.map +0 -1
- package/dist/search-method-qqof5BPa.js.map +0 -1
- package/dist/supervise-C-OUl-0_.js.map +0 -1
- package/dist/supervisor-DCSxS4UB.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as RetainedInteractiveAdmissionError, d as RetainedRunDispatchBindingError, f as RuntimeRunStateError, i as ConfigError, l as RetainedInteractiveBindingError, m as ValidationError$1, r as BackendTransportError, t as AgentEvalError$1, u as RetainedRunAdmissionError } from "./errors-DodWX-cb.js";
|
|
2
|
-
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, l as profileProviderModel, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-
|
|
2
|
+
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, l as profileProviderModel, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-CA5d1YUP.js";
|
|
3
3
|
import { S as verifyWorkspaceSnapshotArtifacts, i as verifyAgentCandidateWorkspaceArchive } from "./workspace-archive-MhowMCmp.js";
|
|
4
4
|
import { n as assertNoSymlinkDescendant, r as publishExclusiveDurableFile } from "./durable-file-DWQA4ooo.js";
|
|
5
5
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
|
|
@@ -9452,6 +9452,7 @@ const outsideKinds = /* @__PURE__ */ new Set([
|
|
|
9452
9452
|
"workspace-restored",
|
|
9453
9453
|
"trace-unpropagated",
|
|
9454
9454
|
"paused",
|
|
9455
|
+
"driver-attempt",
|
|
9455
9456
|
"node-inputs-resolved",
|
|
9456
9457
|
"edge-verdict",
|
|
9457
9458
|
"join-state"
|
|
@@ -9527,6 +9528,7 @@ async function replaySpawnTree(journal, blobs, root) {
|
|
|
9527
9528
|
if (ev.kind === "workspace-restored") continue;
|
|
9528
9529
|
if (ev.kind === "trace-unpropagated") continue;
|
|
9529
9530
|
if (ev.kind === "paused") continue;
|
|
9531
|
+
if (ev.kind === "driver-attempt") continue;
|
|
9530
9532
|
if (ev.kind === "node-inputs-resolved") continue;
|
|
9531
9533
|
if (ev.kind === "edge-verdict") continue;
|
|
9532
9534
|
if (ev.kind === "join-state") continue;
|
|
@@ -10739,7 +10741,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
10739
10741
|
const attemptId = node?.attemptId ?? newExecutionAttemptId(executionId);
|
|
10740
10742
|
const trace = createPushTraceSource({ runId: executionId });
|
|
10741
10743
|
const providerModel = concreteProfileModel(createProfile);
|
|
10742
|
-
const tokenLimits = enforceTokenLimits(profileModelExecutionSettings(createProfile, `providerAsExecutor(${provider.name})
|
|
10744
|
+
const tokenLimits = enforceTokenLimits(profileModelExecutionSettings(createProfile, `providerAsExecutor(${provider.name})`, "provider").tokenLimits, "provider", `providerAsExecutor(${provider.name})`);
|
|
10743
10745
|
const plannedDeclaration = {
|
|
10744
10746
|
effectiveProfile: createProfile,
|
|
10745
10747
|
backend: provider.name,
|
|
@@ -23889,6 +23891,7 @@ function normalizeWorkerSlotBound(value) {
|
|
|
23889
23891
|
/** Runtime-owned provider evidence is written through this private scope capability. */
|
|
23890
23892
|
const runtimeOwnedProviderMeters = /* @__PURE__ */ new WeakMap();
|
|
23891
23893
|
const pauseRecorders = /* @__PURE__ */ new WeakMap();
|
|
23894
|
+
const driverAttemptRecorders = /* @__PURE__ */ new WeakMap();
|
|
23892
23895
|
const recoveryStarters = /* @__PURE__ */ new WeakMap();
|
|
23893
23896
|
const retainedReleasers = /* @__PURE__ */ new WeakMap();
|
|
23894
23897
|
const retainedSlotClosers = /* @__PURE__ */ new WeakMap();
|
|
@@ -25096,6 +25099,22 @@ function createScope(args) {
|
|
|
25096
25099
|
subtreeReaders.set(scope, () => summarizeTeam(children.values()));
|
|
25097
25100
|
liveTeamReaders.set(scope, () => readLiveTeam(children.values(), ownerTurns, ownerLastTurnAt));
|
|
25098
25101
|
runtimeOwnedProviderMeters.set(scope, async (spend, providerModel, detail, accountingOnly) => meterInternal(spend, detail, providerModel, accountingOnly, true));
|
|
25102
|
+
let driverAttemptSeq;
|
|
25103
|
+
driverAttemptRecorders.set(scope, async (record) => {
|
|
25104
|
+
if (driverAttemptSeq === void 0) driverAttemptSeq = (await args.journal.loadTree(args.root) ?? []).reduce((next, event) => event.kind === "driver-attempt" && event.id === args.parentId ? Math.max(next, event.seq + 1) : next, 0);
|
|
25105
|
+
const attemptId = ownerMaterializationStates.get(scope)?.attemptId;
|
|
25106
|
+
await args.journal.appendEvent(args.root, {
|
|
25107
|
+
kind: "driver-attempt",
|
|
25108
|
+
id: args.parentId,
|
|
25109
|
+
record: {
|
|
25110
|
+
...record,
|
|
25111
|
+
...record.error === void 0 ? {} : { error: errorText(record.error) }
|
|
25112
|
+
},
|
|
25113
|
+
...attemptId === void 0 ? {} : { attemptId },
|
|
25114
|
+
seq: driverAttemptSeq++,
|
|
25115
|
+
at: new Date(now()).toISOString()
|
|
25116
|
+
});
|
|
25117
|
+
});
|
|
25099
25118
|
let pauseSeq = 0;
|
|
25100
25119
|
pauseRecorders.set(scope, async (pause) => {
|
|
25101
25120
|
await args.journal.appendEvent(args.root, {
|
|
@@ -25292,6 +25311,12 @@ function recordScopeOwnerPause(scope, pause) {
|
|
|
25292
25311
|
if (record === void 0) throw new ValidationError$1("scope: pause recorder is not bound to this scope");
|
|
25293
25312
|
return record(pause);
|
|
25294
25313
|
}
|
|
25314
|
+
/** @internal Persist the owner's driver outcome even after its scope has been aborted. */
|
|
25315
|
+
function recordScopeOwnerDriverAttempt(scope, attempt) {
|
|
25316
|
+
const record = driverAttemptRecorders.get(scope);
|
|
25317
|
+
if (record === void 0) throw new ValidationError$1("scope: driver attempt recorder is not bound to this scope");
|
|
25318
|
+
return record(attempt);
|
|
25319
|
+
}
|
|
25295
25320
|
/** @internal Meter Runtime-owned accounting that does not represent provider execution. */
|
|
25296
25321
|
function meterRuntimeOwnedAccounting(scope, spend, detail) {
|
|
25297
25322
|
const meter = runtimeOwnedProviderMeters.get(scope);
|
|
@@ -28820,6 +28845,6 @@ function isNonEmptySpend(s) {
|
|
|
28820
28845
|
return s.iterations > 0 || s.tokens.input > 0 || s.tokens.output > 0 || s.usd > 0 || s.ms > 0 || s.tokensKnown === false || s.usdKnown === false || Object.values(s.resources ?? {}).some((resource) => resource.amount > 0 || !resource.known);
|
|
28821
28846
|
}
|
|
28822
28847
|
//#endregion
|
|
28823
|
-
export {
|
|
28848
|
+
export { waitUntil as $, executableAgentProfileSnapshot as $i, materializeTreeView as $n, sanitizeAgentRuntimeEvent as $r, claimsAuthority as $t, driverExecutorFactory as A, withTimeout as Aa, worktreeCliProfileMaterialization as Ai, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as An, persistHarnessTranscript as Ar, cliInPlaceExecutor as At, recordScopeOwnerDriverAttempt as B, teardownExecutor as Ba, knownExecutionBindingReceipt as Bi, decodeToolPart as Bn, buildLoopOtelSpans as Br, WORKER_TRACE_PROPAGATION as Bt, createContinuationKeeper as C, promptCacheTokenClasses as Ca, promptOnlyProfileMaterialization as Ci, captureBeforeDestroy as Cn, environmentGone as Cr, recoverRetainedInteractiveRun as Ct, passedItems as D, throwAbort as Da, sandboxActProfileMaterialization as Di, runBrainLoop as Dn, runAbortable as Dr, rollingDispatch as Dt, failedItems as E, stringifySafe as Ea, renderUnsupported as Ei, routerBrain as En, linkAbort as Er, queueOf as Et, beginScopeOwnerAttempt as F, decodeHarnessUsage as Fa, attestRuntimeOwnedPendingExecutor as Fi, resolveAgentEnvironmentProvider as Fn, readTraceContextFromEnv as Fr, createWorktreeCliExecutor as Ft, settledToIteration as G, runtimeOwnedDriveHarnessProviderEvidence as Gi, FileSpawnJournal as Gn, flatOtelSpan as Gr, taskToPrompt as Gt, recordScopeOwnerPause as H, promptFromAgentTurnInput as Ha, newExecutionAttemptId as Hi, registerRetainedExecutorPreparation as Hn, buildRuntimeEventOtelSpans as Hr, workerTraceEnv as Ht, createScope as I, abortError$2 as Ia, attestRuntimeOwnedScopeOwner as Ii, sandboxClientAsProvider as In, traceContextToEnv as Ir, DEFAULT_SANDBOX_STEERING_MAX_TURNS as It, createWaitProbes as J, runtimeOwnedExecutorProviderEvidence as Ji, SpawnEventIndex as Jn, padSpanId as Jr, readWorkerProgress as Jt, createWorkerSlots as K, runtimeOwnedExecutorExecutionBinding as Ki, InMemoryResultBlobStore as Kn, generateSpanId as Kr, DEFAULT_STALL_AFTER_MS as Kt, deriveNodeExecutionIdentity as L, awaitAbortable$1 as La, authoredProfileDigest as Li, unavailablePauseMs as Ln, defaultRedactor as Lr, createSteerableSandboxSession as Lt, withDriverExecutor as M, addResourceSpend as Ma, prepareJsonlAppend as Mi, createAgentEnvironmentProviderRegistry as Mn, contentAddress as Mr, createExecutor as Mt, SUBTREE_RESULT_LIMIT as N, resourceTelemetry as Na, readCommittedJsonLines as Ni, providerAsExecutor as Nn, createPropagatingTraceEmitter as Nr, createExecutorRegistry as Nt, verdictFromJudgeScore as O, throwIfAborted as Oa, unsupportedProfileDimensions as Oi, canonicalObservedModelParts as On, captureHarnessTranscript as Or, bindReusableExecutorExecutionId as Ot, assertRecursiveReservationPolicy as P, withBudgetResources as Pa, writeAllBytes as Pi, providerAsSandboxClient as Pn, mergeTraceEnv as Pr, snapshotExecutorConfig as Pt, validateWaitSpec as Q, unknownMaterializationReceipt as Qi, loadSpawnForest as Qn, createRuntimeStreamEventCollector as Qr, PEER_MAIL_WIRE_KEY as Qt, meterRuntimeOwnedAccounting as R, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Ra, finalizeRuntimeOwnedPendingExecutor as Ri, unavailableSignalOfFailure as Rn, defaultRedactorIdentityMaterial as Rr, createRouterTranscript as Rt, composeContinuationNote as S, isAbortError$2 as Sa, promptModelProfileMaterialization as Si, SandboxEvidenceRetentionError as Sn, destroyInteractiveEnvironment as Sr, reconnectRetainedInteractiveRun as St, expandQuestions as T, sleep as Ta, renderProfileMaterializationIssues as Ti, readPromptOptions as Tn, abortError as Tr, freeSlots as Tt, restoreScopeOwnerAcceptedExecution as U, promptOptionsFromAgentTurnInput as Ua, providerAttemptEvidence as Ui, retainedExecutorSeamKey as Un, createOpenInferenceFileExporter as Ur, workerTraceHeaders as Ut, recordScopeOwnerMaterialization as V, teardownSurfaces as Va, knownMaterializationReceipt as Vi, sandboxSessionTraceSource as Vn, buildLoopSpanNodes as Vr, readWorkerTraceContext as Vt, scopeOwnerExecutorNodeContext as W, providerMessageText as Wa, recordRuntimeOwnedDriveHarnessProviderEvidence as Wi, FileResultBlobStore as Wn, createOtelExporter as Wr, workerTraceSeamKey as Wt, pollFor as X, runtimeOwnedScopeOwnerRuntime as Xi, encodeResultBlob as Xn, toOtelAttributes as Xr, AUTHORITY_MARKERS as Xt, isWaitOutcome as Y, runtimeOwnedPendingExecutorMaterialization as Yi, assertContentAddress as Yn, padTraceId as Yr, createInbox as Yt, timerAt as Z, unknownExecutionBindingReceipt as Zi, insideCursorNamespace as Zn, createRuntimeEventCollector as Zr, DEFAULT_PEER_MAIL_LIMITS as Zt, CheckUnavailableError as _, addSpend as _a, controlProfileMaterialization as _i, isTerminalDecision as _n, reconnectRetainedRun as _r, workerInteractiveAdmissionFile as _t, collectDelivered as a, assertSandboxServedModel as aa, createWorktree as ai, isTerminalNodeStatus as an, parseWorkerToolTraceArtifact as ar, reconcileScopeRetainedOwnerEnvironment as at, bestComposite as b, deleteBoxSafe as ba, profileMaterializationAxes$1 as bi, probeSandboxCapabilities as bn, startRetainedRunInEnvironment as br, workerInteractiveBindingFile as bt, runTree as c, createSandboxUsageLedger as ca, LOCAL_HARNESSES as ci, addHarnessUsage as cn, BudgetReconcileFault as cr, scopeRetainedOwnerResourceReader as ct, classifyDriverFailure as d, mapSandboxEvent as da, localHarnessExecutable as di, readCodexRolloutSession as dn, createBudgetPool as dr, SPAWN_RESOURCE_PATH_MAX_BYTES as dt, executableAgentSpecSnapshot as ea, sanitizeKnowledgeReadinessReport as ei, createPeerMailbox as en, pendingWaits as er, bindScopeRetainedOwnerEnvironmentId as et, runDriverWithRetry as f, mapSandboxToolEvent as fa, parseCodexTokenUsage as fi, bridgeRuntimeAttachmentsKey as fn, meterUsageEvent as fr, environmentReader as ft, CONTINUATION_FACTS as g, sumSandboxUsage as ga, assertProfileMaterialization as gi, defaultSelectWinner as gn, errMessage as gr, readWorkerInteractiveAdmissions as gt, CONTINUATIONS_DIR as h, sandboxProgressEvents as ha, AGENT_PROFILE_MATERIALIZATION_AXES as hi, createSandboxForSpec as hn, spendFromUsageTotals as hr, interactiveAdmissionSeamKey as ht, bestDelivered as i, readSandboxOutcome as ia, captureWorktreeDiff as ii, isLiveNodeStatus as in, isTraceAnalysisStore as ir, prepareScopeRetainedOwnerTask as it, isDriverSpec as j, zeroSpend as ja, isNoEntError as ji, LEAF_CONTINUATION_TASK as jn, readHarnessTranscript as jr, cliWorktreeExecutor as jt, driverChild as k, unmeteredSpend as ka, validateProfileMaterialization as ki, observedModelMatchesDeclared as kn, harnessTranscriptArtifact as kr, captureReusableExecutorConfig as kt, DriverAttemptsExhaustedError as l, extractLlmCallEvent as la, harnessInvocation as li, createCodexRolloutStoreReader as ln, ReservationWaitRefused as lr, scopeRetainedOwnerRestorePoint as lt, upstreamUnavailableSignal as m, sandboxEventServedBackend as ma, terminateProcessTreeAndConfirm as mi, TERMINAL_DECISIONS as mn, spendFromUsageEvents as mr, resolveSpawnResourcePaths as mt, createRootHandle as n, detachedSnapshot as na, runSettledCommand as ni, peerMailTools as nn, WORKER_TOOL_TRACE_SCHEMA_VERSION as nr, consumeScopeRetainedOwnerResult as nt, pickBestDelivered as o, canonicalStreamEventFromSandboxEvent as oa, removeWorktree as oi, bridgeAdmissionRefusal as on, workerTraceAnalysisStore as or, scopeRetainedOwnerContext as ot, summarizeDriverAttempts as p, notifySandboxEventObserver as pa, CodexExecutionDiagnosticError as pi, bridgeStopSignalKey as pn, newUsageTotals as pr, hostDirectoryReader as pt, openSlotGroup as q, runtimeOwnedExecutorMaterialization as qi, InMemorySpawnJournal as qn, loopEventToOtelSpan as qr, createActivityLog as qt, createSupervisor as r, projectSandboxOutcome as ra, runWorktreeHarness as ri, peerMailVerbNames as rn, captureWorkerTraceEvidence as rr, noteScopeRetainedOwnerCoordination as rt, runFinalizer as s, createSandboxToolPartState as sa, DEFAULT_LOCAL_HARNESS as si, bridgeModelRouteRefusal as sn, executorFailure as sr, scopeRetainedOwnerPriorSpend as st, DEFAULT_MAX_DEPTH as t, detachedFrozen as ta, sanitizeRuntimeStreamEvent as ti, isPeerMailEnvelope as tn, replaySpawnTree as tr, bindScopeRetainedOwnerProvider as tt, HarnessTurnFailedError as u, isSandboxTerminalEvent as ua, harnessSupportsReasoningEffort as ui, harnessUsageIsEmpty as un, assertValidBudget as ur, scopeRetainedOwnerResult as ut, admitContinuationPolicy as v, chargedTokens as va, defineProfileMaterializationContract as vi, runAgentRounds as vn, recoverRetainedRun as vr, attachWorker as vt, distillFindings as w, randomSuffix as wa, promptResourceProfileMaterialization as wi, assertBoxlessPromptOptions as wn, RunCancellationReason as wr, startRetainedInteractiveRun as wt, checkVerdictOf as x, hasCompleteCacheBreakdown as xa, promptControlProfileMaterialization as xi, acquireSandbox as xn, retainedCreateMaterial as xr, workerInteractiveBindingsDir as xt, admitFinding as y, cloneSpend as ya, fullProfileMaterialization as yi, createSandboxLineage as yn, startRetainedRun as yr, readWorkerInteractiveBinding as yt, meterRuntimeOwnedProviderAttempt as z, armDeadlineTimer as za, inheritRuntimeOwnedExecutorAttestation as zi, createPushTraceSource as zn, resolveRedactor as zr, createInPlaceCliExecutor as zt };
|
|
28824
28849
|
|
|
28825
|
-
//# sourceMappingURL=supervisor-
|
|
28850
|
+
//# sourceMappingURL=supervisor-D0-rYBEM.js.map
|