@tangle-network/agent-runtime 0.182.0 → 0.184.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-BfLdmBd5.js → activation-DrWfiqev.js} +2 -2
- package/dist/{activation-BfLdmBd5.js.map → activation-DrWfiqev.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-Dh_8qg7q.js → authoring-BuiTFCaU.js} +4 -4
- package/dist/authoring-BuiTFCaU.js.map +1 -0
- package/dist/{coordination-driver-DBvHI8ZG.js → coordination-driver-DeBJDK3d.js} +19 -11
- package/dist/coordination-driver-DeBJDK3d.js.map +1 -0
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +1 -1
- package/dist/{graph-lU6GacsN.js → graph-eCLaYrD2.js} +5 -5
- package/dist/graph-eCLaYrD2.js.map +1 -0
- package/dist/graph.d.ts +1 -1
- package/dist/graph.js +3 -3
- package/dist/{improvement-cycle-DezfYhlh.js → improvement-cycle-BnalCCbE.js} +3 -3
- package/dist/{improvement-cycle-DezfYhlh.js.map → improvement-cycle-BnalCCbE.js.map} +1 -1
- package/dist/{index-z2A6q-v0.d.ts → index-BhtdFMnG.d.ts} +16 -16
- package/dist/{index-BG4l6MHH.d.ts → index-Dg2UXocB.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- 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/{knowledge-CioWuU6F.js → knowledge-DeB1HtZK.js} +3 -3
- package/dist/{knowledge-CioWuU6F.js.map → knowledge-DeB1HtZK.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-Rzj8NOjr.js → loop-runner-bin-DAN-QutS.js} +3 -3
- package/dist/{loop-runner-bin-Rzj8NOjr.js.map → loop-runner-bin-DAN-QutS.js.map} +1 -1
- package/dist/{loop-runner-bin-Dj0GJJWz.d.ts → loop-runner-bin-NanoP_bG.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 +30 -3
- package/dist/mcp/index.js +52 -6
- package/dist/mcp/index.js.map +1 -1
- package/dist/{openai-tools-B4Gbj7BL.js → openai-tools-Dy1Cquei.js} +2 -2
- package/dist/{openai-tools-B4Gbj7BL.js.map → openai-tools-Dy1Cquei.js.map} +1 -1
- package/dist/{provision-supervisor-BBPNrEQk.js → provision-supervisor-D7pZC0Yf.js} +4 -4
- package/dist/{provision-supervisor-BBPNrEQk.js.map → provision-supervisor-D7pZC0Yf.js.map} +1 -1
- package/dist/{runtime-Db1JYl9P.js → runtime-c_txq11Z.js} +9 -9
- package/dist/{runtime-Db1JYl9P.js.map → runtime-c_txq11Z.js.map} +1 -1
- package/dist/{structural-rollout-dG-cTxPq.js → structural-rollout-DIp3CKAo.js} +2 -2
- package/dist/{structural-rollout-dG-cTxPq.js.map → structural-rollout-DIp3CKAo.js.map} +1 -1
- package/dist/{supervise-rDa_CeUP.js → supervise-8iDK6Mjz.js} +9 -9
- package/dist/supervise-8iDK6Mjz.js.map +1 -0
- package/dist/{supervisor-Df9kT_z3.js → supervisor-CKZR4Uaf.js} +49 -31
- package/dist/supervisor-CKZR4Uaf.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 +4 -4
- package/skills/codemode/SKILL.md +1 -1
- package/skills/supervise/SKILL.md +2 -2
- package/dist/authoring-Dh_8qg7q.js.map +0 -1
- package/dist/coordination-driver-DBvHI8ZG.js.map +0 -1
- package/dist/graph-lU6GacsN.js.map +0 -1
- package/dist/supervise-rDa_CeUP.js.map +0 -1
- package/dist/supervisor-Df9kT_z3.js.map +0 -1
|
@@ -10767,7 +10767,7 @@ async function teardownExecutor(executor, grace, deadlineAtMs, now) {
|
|
|
10767
10767
|
*
|
|
10768
10768
|
* 1. `SuperviseOptions.maxLiveWorkers` (`src/runtime/supervise/supervise.ts`) — supervised-tree
|
|
10769
10769
|
* level. One shared Scope counter bounds every spawned manager and leaf in the recursive tree;
|
|
10770
|
-
* `
|
|
10770
|
+
* `spawn_worker` fails closed with `error: 'max-live-workers'` past it. Unset ⇒ NO tree cap.
|
|
10771
10771
|
* `CoordinationToolsOptions.maxLiveWorkers` remains the local form for a toolbox mounted on a
|
|
10772
10772
|
* caller-owned Scope that has no tree limit.
|
|
10773
10773
|
* 2. `SandboxLineage`'s `maxConcurrency` / `DEFAULT_FORK_CONCURRENCY = 4`
|
|
@@ -11886,6 +11886,16 @@ function assertRetainedCapabilityRequirements(providerName, capabilities) {
|
|
|
11886
11886
|
if (retained?.exactRunIdentity !== true || retained.resultIdentity !== true || retained.eventIdentity !== true || retained.cancellationIdempotency !== true || !capabilities.streaming.detach || !capabilities.streaming.replay || !capabilities.streaming.turnIdempotency) throw new Error(`provider "${providerName}" cannot control a retry-safe retained run`);
|
|
11887
11887
|
}
|
|
11888
11888
|
//#endregion
|
|
11889
|
+
//#region src/runtime/workspace-cwd.ts
|
|
11890
|
+
/**
|
|
11891
|
+
* Resolve the one provider-owned cwd that an interactive retained start must use.
|
|
11892
|
+
* Runtime preserves this provider string and does not interpret its path syntax.
|
|
11893
|
+
*/
|
|
11894
|
+
function effectiveWorkspaceCwd(explicitCwd, workspaceCwd) {
|
|
11895
|
+
if (explicitCwd !== void 0 && workspaceCwd !== void 0 && explicitCwd !== workspaceCwd) throw new Error("retained interactive cwd conflicts with environment.workspace.cwd");
|
|
11896
|
+
return explicitCwd ?? workspaceCwd;
|
|
11897
|
+
}
|
|
11898
|
+
//#endregion
|
|
11889
11899
|
//#region src/runtime/retained-interactive.ts
|
|
11890
11900
|
/**
|
|
11891
11901
|
* Start one retry-safe native coding-agent TUI without dispatching a headless turn.
|
|
@@ -11895,49 +11905,50 @@ function assertRetainedCapabilityRequirements(providerName, capabilities) {
|
|
|
11895
11905
|
*/
|
|
11896
11906
|
async function startRetainedInteractiveRun(options) {
|
|
11897
11907
|
options.signal?.throwIfAborted();
|
|
11898
|
-
|
|
11899
|
-
assertStableText(
|
|
11900
|
-
|
|
11901
|
-
if (
|
|
11902
|
-
|
|
11908
|
+
const startOptions = resolveRetainedInteractiveStart(options);
|
|
11909
|
+
assertStableText(startOptions.environment.idempotencyKey, "environment idempotency key");
|
|
11910
|
+
assertStableText(startOptions.interactiveIdempotencyKey, "interactive idempotency key");
|
|
11911
|
+
if (typeof startOptions.onAdmission !== "function") throw new Error("startRetainedInteractiveRun requires an awaited onAdmission durability hook");
|
|
11912
|
+
if (!startOptions.provider.get) throw new Error(`provider "${startOptions.provider.name}" cannot reconstruct an environment by id`);
|
|
11913
|
+
const profile = agentProfileSchema.parse(startOptions.environment.profile);
|
|
11903
11914
|
if (profile.harness === void 0) throw new Error("retained interactive runs require AgentProfile.harness");
|
|
11904
11915
|
const requestedProfileDigest = canonicalAgentProfileDigest(profile);
|
|
11905
|
-
const identity = mintRetainedIdentity(
|
|
11906
|
-
const intent = interactiveIntent(
|
|
11907
|
-
if (
|
|
11908
|
-
else assertExactInteractiveIntent(
|
|
11909
|
-
const providerCapabilities = AgentEnvironmentCapabilitiesSchema.parse(await awaitAbortable$1(Promise.resolve().then(() =>
|
|
11910
|
-
assertInteractiveCapabilities(
|
|
11911
|
-
const environment = await createInteractiveEnvironment(() =>
|
|
11912
|
-
...
|
|
11916
|
+
const identity = mintRetainedIdentity(startOptions.environment.idempotencyKey, startOptions.interactiveIdempotencyKey);
|
|
11917
|
+
const intent = interactiveIntent(startOptions, profile, identity);
|
|
11918
|
+
if (startOptions.intent === void 0) await admitDurably(startOptions.onAdmission, intent);
|
|
11919
|
+
else assertExactInteractiveIntent(startOptions.intent, intent);
|
|
11920
|
+
const providerCapabilities = AgentEnvironmentCapabilitiesSchema.parse(await awaitAbortable$1(Promise.resolve().then(() => startOptions.provider.capabilities()), startOptions.signal));
|
|
11921
|
+
assertInteractiveCapabilities(startOptions.provider.name, providerCapabilities);
|
|
11922
|
+
const environment = await createInteractiveEnvironment(() => startOptions.provider.create({
|
|
11923
|
+
...startOptions.environment,
|
|
11913
11924
|
profile,
|
|
11914
|
-
signal:
|
|
11915
|
-
metadata: retainedEnvironmentMetadata(
|
|
11916
|
-
}),
|
|
11925
|
+
signal: startOptions.signal,
|
|
11926
|
+
metadata: retainedEnvironmentMetadata(startOptions.environment.metadata, startOptions.environment.idempotencyKey)
|
|
11927
|
+
}), startOptions.signal);
|
|
11917
11928
|
let capabilities;
|
|
11918
11929
|
try {
|
|
11919
|
-
assertExactEnvironment(
|
|
11920
|
-
|
|
11921
|
-
capabilities = interactiveCapabilitiesForEnvironment(
|
|
11922
|
-
assertInteractiveMethods(
|
|
11930
|
+
assertExactEnvironment(startOptions.provider.name, environment);
|
|
11931
|
+
startOptions.signal?.throwIfAborted();
|
|
11932
|
+
capabilities = interactiveCapabilitiesForEnvironment(startOptions.provider.name, providerCapabilities, environment);
|
|
11933
|
+
assertInteractiveMethods(startOptions.provider.name, environment);
|
|
11923
11934
|
} catch (error) {
|
|
11924
11935
|
await destroyUnusedEnvironment(environment, error);
|
|
11925
11936
|
throw error;
|
|
11926
11937
|
}
|
|
11927
|
-
const request = interactiveRequest(
|
|
11928
|
-
await admitDurably(
|
|
11938
|
+
const request = interactiveRequest(startOptions, environment, profile, requestedProfileDigest, identity);
|
|
11939
|
+
await admitDurably(startOptions.onAdmission, {
|
|
11929
11940
|
phase: "interactive_environment",
|
|
11930
|
-
provider:
|
|
11941
|
+
provider: startOptions.provider.name,
|
|
11931
11942
|
environmentId: environment.id,
|
|
11932
|
-
idempotencyKey:
|
|
11933
|
-
interactiveIdempotencyKey:
|
|
11943
|
+
idempotencyKey: startOptions.environment.idempotencyKey,
|
|
11944
|
+
interactiveIdempotencyKey: startOptions.interactiveIdempotencyKey,
|
|
11934
11945
|
request
|
|
11935
11946
|
});
|
|
11936
|
-
const ref = exactStartedRef(request, await startInteractiveProcess(environment, () => environment.startInteractive(request, { signal:
|
|
11937
|
-
await admitDurably(
|
|
11947
|
+
const ref = exactStartedRef(request, await startInteractiveProcess(environment, () => environment.startInteractive(request, { signal: startOptions.signal }), startOptions.signal));
|
|
11948
|
+
await admitDurably(startOptions.onAdmission, {
|
|
11938
11949
|
phase: "interactive_started",
|
|
11939
|
-
idempotencyKey:
|
|
11940
|
-
interactiveIdempotencyKey:
|
|
11950
|
+
idempotencyKey: startOptions.environment.idempotencyKey,
|
|
11951
|
+
interactiveIdempotencyKey: startOptions.interactiveIdempotencyKey,
|
|
11941
11952
|
ref
|
|
11942
11953
|
});
|
|
11943
11954
|
return createRetainedInteractiveRunHandle(environment, ref, capabilities, request);
|
|
@@ -11990,6 +12001,13 @@ async function reconnectRetainedInteractiveRun(options) {
|
|
|
11990
12001
|
await handle.status({ signal: options.signal });
|
|
11991
12002
|
return handle;
|
|
11992
12003
|
}
|
|
12004
|
+
function resolveRetainedInteractiveStart(options) {
|
|
12005
|
+
const cwd = effectiveWorkspaceCwd(options.cwd, options.environment.workspace?.cwd);
|
|
12006
|
+
return {
|
|
12007
|
+
...options,
|
|
12008
|
+
...cwd === void 0 ? {} : { cwd }
|
|
12009
|
+
};
|
|
12010
|
+
}
|
|
11993
12011
|
function interactiveRequest(options, environment, profile, requestedProfileDigest, identity) {
|
|
11994
12012
|
const start = {
|
|
11995
12013
|
profile,
|
|
@@ -15538,4 +15556,4 @@ function isNonEmptySpend(s) {
|
|
|
15538
15556
|
//#endregion
|
|
15539
15557
|
export { bridgeModelRouteRefusal as $, INTELLIGENCE_WIRE_VERSION as $t, readWorkerInteractiveBinding as A, controlProfileMaterialization as An, peerMailVerbNames as At, retainedCreateMaterial as B, sandboxActProfileMaterialization as Bn, createSandboxLineage as Bt, timerAt as C, LOCAL_HARNESSES as Cn, AUTHORITY_MARKERS as Ct, readWorkerInteractiveAdmissions as D, CodexExecutionDiagnosticError as Dn, createPeerMailbox as Dt, interactiveAdmissionSeamKey as E, parseCodexTokenUsage as En, claimsAuthority as Et, startRetainedInteractiveRun as F, promptModelProfileMaterialization as Fn, TERMINAL_DECISIONS as Ft, rollingDispatch as G, routerBrain as Gt, effectiveConcurrency as H, validateProfileMaterialization as Hn, acquireSandbox as Ht, reconnectRetainedRun as I, promptOnlyProfileMaterialization as In, createSandboxForSpec as It, assertValidBudget as J, observedModelMatchesDeclared as Jt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as K, runBrainLoop as Kt, recoverRetainedRun as L, promptResourceProfileMaterialization as Ln, defaultSelectWinner as Lt, workerInteractiveBindingsDir as M, fullProfileMaterialization as Mn, isTerminalNodeStatus as Mt, reconnectRetainedInteractiveRun as N, profileMaterializationAxes$1 as Nn, createInPlaceCliExecutor as Nt, workerInteractiveAdmissionFile as O, AGENT_PROFILE_MATERIALIZATION_AXES as On, isPeerMailEnvelope as Ot, recoverRetainedInteractiveRun as P, promptControlProfileMaterialization as Pn, taskToPrompt as Pt, bridgeAdmissionRead as Q, traceContextToEnv as Qt, startRetainedRun as R, renderProfileMaterializationIssues as Rn, isTerminalDecision as Rt, pollFor as S, DEFAULT_LOCAL_HARNESS as Sn, createInbox as St, waitUntil as T, localHarnessExecutable as Tn, PEER_MAIL_WIRE_KEY as Tt, freeSlots as U, worktreeCliProfileMaterialization as Un, assertBoxlessPromptOptions as Ut, destroyInteractiveEnvironment as V, unsupportedProfileDimensions as Vn, probeSandboxCapabilities as Vt, queueOf as W, readPromptOptions as Wt, spendFromUsageEvents as X, mergeTraceEnv as Xt, createBudgetPool as Y, createPropagatingTraceEmitter as Yt, bindReusableExecutorExecutionId as Z, readTraceContextFromEnv as Zt, recordScopeOwnerMaterialization as _, runSettledCommand as _n, decodeToolPart as _t, uncertainSpawnBudgets as a, exportEvalRuns as an, createExecutor as at, createWaitProbes as b, createWorktree as bn, createActivityLog as bt, pickBestDelivered as c, loopEventToOtelSpan as cn, createWorktreeCliExecutor as ct, driverChild as d, toOtelAttributes as dn, workerTraceEnv as dt, buildLoopOtelSpans as en, bridgeRuntimeAttachmentsKey as et, withDriverExecutor as f, createRuntimeEventCollector as fn, workerTraceHeaders as ft, meterRuntimeOwnedProviderAttempt as g, sanitizeRuntimeStreamEvent as gn, createPushTraceSource as gt, meterRuntimeOwnedAccounting as h, sanitizeKnowledgeReadinessReport as hn, createSteerableSandboxSession as ht, sumMeasuredSpendFromEvents as i, createOtelExporter as in, cliWorktreeExecutor as it, workerInteractiveBindingFile as j, defineProfileMaterializationContract as jn, isLiveNodeStatus as jt, attachWorker as k, assertProfileMaterialization as kn, peerMailTools as kt, runFinalizer as l, padSpanId as ln, WORKER_TRACE_PROPAGATION as lt, deriveNodeExecutionIdentity as m, sanitizeAgentRuntimeEvent as mn, DEFAULT_SANDBOX_STEERING_MAX_TURNS as mt, createSupervisor as n, buildRuntimeEventOtelSpans as nn, captureReusableExecutorConfig as nt, bestDelivered as o, flatOtelSpan as on, createExecutorRegistry as ot, createScope as p, createRuntimeStreamEventCollector as pn, workerTraceSeamKey as pt, teardownExecutor as q, canonicalObservedModel as qt, maxSeqOf as r, createOpenInferenceFileExporter as rn, cliInPlaceExecutor as rt, collectDelivered as s, generateSpanId as sn, snapshotExecutorConfig as st, createRootHandle as t, buildLoopSpanNodes as tn, bridgeStopSignalKey as tt, runTree as u, padTraceId as un, readWorkerTraceContext as ut, scopeOwnerExecutorNodeContext as v, runWorktreeHarness as vn, sandboxSessionTraceSource as vt, validateWaitSpec as w, harnessSupportsReasoningEffort as wn, DEFAULT_PEER_MAIL_LIMITS as wt, isWaitOutcome as x, removeWorktree as xn, readWorkerProgress as xt, settledToIteration as y, captureWorktreeDiff as yn, DEFAULT_STALL_AFTER_MS as yt, startRetainedRunInEnvironment as z, renderUnsupported as zn, runAgentRounds as zt };
|
|
15540
15558
|
|
|
15541
|
-
//# sourceMappingURL=supervisor-
|
|
15559
|
+
//# sourceMappingURL=supervisor-CKZR4Uaf.js.map
|