@tangle-network/agent-runtime 0.133.6 → 0.133.8
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-yW1CcPiM.js → activation-CbgOt7bK.js} +2 -2
- package/dist/{activation-yW1CcPiM.js.map → activation-CbgOt7bK.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-Cbz3BYqD.js → authoring-DI2ZcORJ.js} +2 -2
- package/dist/{authoring-Cbz3BYqD.js.map → authoring-DI2ZcORJ.js.map} +1 -1
- package/dist/candidate-execution/index.js +1 -1
- package/dist/{candidate-execution-y946fuY1.js → candidate-execution-_u2HIWeX.js} +27 -2
- package/dist/candidate-execution-_u2HIWeX.js.map +1 -0
- package/dist/{graph-BcwxFLW_.js → graph-CnLcp2Tl.js} +2 -2
- package/dist/{graph-BcwxFLW_.js.map → graph-CnLcp2Tl.js.map} +1 -1
- package/dist/{improvement-cycle-DJQqqICz.js → improvement-cycle-ekj_ODWY.js} +3 -3
- package/dist/{improvement-cycle-DJQqqICz.js.map → improvement-cycle-ekj_ODWY.js.map} +1 -1
- package/dist/{index-DLjXduyp.d.ts → index-CP8LBWD1.d.ts} +2 -2
- package/dist/{index-kMp8g-jT.d.ts → index-Cgo-tyB8.d.ts} +41 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +7 -7
- package/dist/{knowledge-CD5Xx1J3.js → knowledge-BdJoVN9q.js} +3 -3
- package/dist/{knowledge-CD5Xx1J3.js.map → knowledge-BdJoVN9q.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-CC5c39zY.d.ts → loop-runner-bin-BX_266wJ.d.ts} +2 -2
- package/dist/{loop-runner-bin-BrF0g950.js → loop-runner-bin-C1uQcY_O.js} +3 -3
- package/dist/{loop-runner-bin-BrF0g950.js.map → loop-runner-bin-C1uQcY_O.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 +4 -4
- package/dist/{openai-tools-BEeoh5i0.js → openai-tools-BTznyT19.js} +2 -2
- package/dist/{openai-tools-BEeoh5i0.js.map → openai-tools-BTznyT19.js.map} +1 -1
- package/dist/{runtime-BX5c47Qm.js → runtime-Br49sl8u.js} +79 -17
- package/dist/runtime-Br49sl8u.js.map +1 -0
- package/dist/{structural-rollout-CHq3qJau.js → structural-rollout-C4_mifPH.js} +2 -2
- package/dist/{structural-rollout-CHq3qJau.js.map → structural-rollout-C4_mifPH.js.map} +1 -1
- package/dist/{supervise-D-e9RIuG.js → supervise-BTwl4Cdi.js} +19 -5
- package/dist/supervise-BTwl4Cdi.js.map +1 -0
- package/dist/{supervisor-GBIOnjUo.js → supervisor-BA87pb7g.js} +39 -3
- package/dist/supervisor-BA87pb7g.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/package.json +1 -1
- package/dist/candidate-execution-y946fuY1.js.map +0 -1
- package/dist/runtime-BX5c47Qm.js.map +0 -1
- package/dist/supervise-D-e9RIuG.js.map +0 -1
- package/dist/supervisor-GBIOnjUo.js.map +0 -1
|
@@ -5976,6 +5976,9 @@ const routerSeamKey = "router";
|
|
|
5976
5976
|
const sandboxSeamKey = "sandbox";
|
|
5977
5977
|
const cliSeamKey = "cli";
|
|
5978
5978
|
const bridgeSeamKey = "bridge";
|
|
5979
|
+
/** Internal control seam used by Runtime-owned external supervisors. A completion request stops
|
|
5980
|
+
* the next bridge turn; it must not abort the paid request that is already streaming. */
|
|
5981
|
+
const bridgeStopSignalKey = "__bridge_stop_signal";
|
|
5979
5982
|
const maxBridgeTimeoutMs = 2147483647;
|
|
5980
5983
|
const bridgeModelCredentialHeader = "x-cli-bridge-model-credential";
|
|
5981
5984
|
const bridgeModelBaseUrlHeader = "x-cli-bridge-model-base-url";
|
|
@@ -7007,6 +7010,7 @@ function bridgeProfileModel(profile, context) {
|
|
|
7007
7010
|
}
|
|
7008
7011
|
const bridgeExecutor = (spec, ctx) => {
|
|
7009
7012
|
const base = readSeam(ctx, bridgeSeamKey, "bridge");
|
|
7013
|
+
const stopSignal = readOptionalAbortSignal(ctx, bridgeStopSignalKey, "bridge");
|
|
7010
7014
|
const modelCredential = validateBridgeModelCredential(base.modelCredential, base.bridgeUrl, "bridgeExecutor");
|
|
7011
7015
|
const effectiveProfile = agentProfileSchema.parse(spec.profile);
|
|
7012
7016
|
const model = bridgeProfileModel(effectiveProfile, "bridgeExecutor");
|
|
@@ -7116,6 +7120,7 @@ const bridgeExecutor = (spec, ctx) => {
|
|
|
7116
7120
|
return streamBridgeSession({
|
|
7117
7121
|
task,
|
|
7118
7122
|
signal,
|
|
7123
|
+
...stopSignal === void 0 ? {} : { stopSignal },
|
|
7119
7124
|
profile: effectiveProfile,
|
|
7120
7125
|
seam,
|
|
7121
7126
|
sessionId,
|
|
@@ -7290,6 +7295,10 @@ async function* streamBridgeSession(args) {
|
|
|
7290
7295
|
const promptCache = {};
|
|
7291
7296
|
let nextPrompt = taskToPrompt(args.task);
|
|
7292
7297
|
for (let t = 0; args.maxTurns === 0 || t < args.maxTurns; t += 1) {
|
|
7298
|
+
if (args.stopSignal?.aborted) {
|
|
7299
|
+
observation.note = "settled after completion request";
|
|
7300
|
+
break;
|
|
7301
|
+
}
|
|
7293
7302
|
const pending = inbox.drain();
|
|
7294
7303
|
if (pending.length) {
|
|
7295
7304
|
const folded = inbox.fold(pending);
|
|
@@ -7353,7 +7362,18 @@ async function* streamBridgeSession(args) {
|
|
|
7353
7362
|
let turnKnownCostSubtotal = 0;
|
|
7354
7363
|
let turnEstimatedCostSubtotal = 0;
|
|
7355
7364
|
let interrupted = false;
|
|
7365
|
+
let profileMaterializationPublished = false;
|
|
7366
|
+
const publishProfileMaterialization = () => {
|
|
7367
|
+
if (!profileMaterializationPublished && activeRun.terminal && activeRun.profileMaterialization !== void 0) {
|
|
7368
|
+
args.onProfileMaterialization(activeRun.profileMaterialization);
|
|
7369
|
+
profileMaterializationPublished = true;
|
|
7370
|
+
}
|
|
7371
|
+
};
|
|
7356
7372
|
try {
|
|
7373
|
+
if (args.stopSignal?.aborted) {
|
|
7374
|
+
observation.note = "settled after completion request";
|
|
7375
|
+
break;
|
|
7376
|
+
}
|
|
7357
7377
|
args.onProviderAttemptStart();
|
|
7358
7378
|
for await (const chunk of streamDurableBridgeRun({
|
|
7359
7379
|
seam,
|
|
@@ -7441,8 +7461,9 @@ async function* streamBridgeSession(args) {
|
|
|
7441
7461
|
sawEstimatedUsd = true;
|
|
7442
7462
|
}
|
|
7443
7463
|
}
|
|
7444
|
-
|
|
7464
|
+
publishProfileMaterialization();
|
|
7445
7465
|
} catch (error) {
|
|
7466
|
+
publishProfileMaterialization();
|
|
7446
7467
|
if (interruptSig.aborted && !args.signal.aborted && !args.controller.signal.aborted) {
|
|
7447
7468
|
if (!await cancelBridgeRunToTerminal(seam, activeRun, "infinity", external)) throw new ValidationError(`bridgeExecutor: interrupted run ${activeRun.id} did not reach terminal state`);
|
|
7448
7469
|
interrupted = true;
|
|
@@ -7464,12 +7485,21 @@ async function* streamBridgeSession(args) {
|
|
|
7464
7485
|
});
|
|
7465
7486
|
if (!sawTurnTokenUsage || !turnTokensKnown) tokensKnown = false;
|
|
7466
7487
|
if (!sawTurnCostStatus || !turnUsdKnown) usdKnown = false;
|
|
7488
|
+
if (!sawTurnCostStatus || !turnUsdKnown) yield {
|
|
7489
|
+
kind: "cost",
|
|
7490
|
+
usd: 0,
|
|
7491
|
+
usdKnown: false
|
|
7492
|
+
};
|
|
7467
7493
|
yield { kind: "iteration" };
|
|
7468
7494
|
if (!interrupted && turnText) lastText = turnText;
|
|
7469
7495
|
if (interrupted) {
|
|
7470
7496
|
observation.note = `turn ${turns} interrupted, resuming`;
|
|
7471
7497
|
continue;
|
|
7472
7498
|
}
|
|
7499
|
+
if (args.stopSignal?.aborted) {
|
|
7500
|
+
observation.note = "settled after completion request";
|
|
7501
|
+
break;
|
|
7502
|
+
}
|
|
7473
7503
|
if (inbox.pending() === 0) break;
|
|
7474
7504
|
}
|
|
7475
7505
|
observation.note = "settled";
|
|
@@ -8734,6 +8764,12 @@ function readSeam(ctx, key, who) {
|
|
|
8734
8764
|
if (seam === void 0 || seam === null) throw new ValidationError(`${who} executor: missing required seam "${key}" on ExecutorContext`);
|
|
8735
8765
|
return seam;
|
|
8736
8766
|
}
|
|
8767
|
+
function readOptionalAbortSignal(ctx, key, who) {
|
|
8768
|
+
const value = ctx.seams[key];
|
|
8769
|
+
if (value === void 0) return void 0;
|
|
8770
|
+
if (value === null || typeof value !== "object" || typeof value.aborted !== "boolean" || typeof value.addEventListener !== "function") throw new ValidationError(`${who} executor: seam "${key}" must be an AbortSignal`);
|
|
8771
|
+
return value;
|
|
8772
|
+
}
|
|
8737
8773
|
/** A leaf task is opaque (`unknown`). A string is the prompt verbatim; an object
|
|
8738
8774
|
* with a `prompt`/`content`/`task` string field uses it; otherwise it serializes.
|
|
8739
8775
|
* Module-exported (not package surface) so sibling leaf executors read a task
|
|
@@ -12358,6 +12394,6 @@ function isNonEmptySpend(s) {
|
|
|
12358
12394
|
return s.iterations > 0 || s.tokens.input > 0 || s.tokens.output > 0 || s.usd > 0 || s.ms > 0 || s.tokensKnown === false || s.usdKnown === false;
|
|
12359
12395
|
}
|
|
12360
12396
|
//#endregion
|
|
12361
|
-
export {
|
|
12397
|
+
export { createSandboxForSpec as $, sandboxActProfileMaterialization as $t, spendFromUsageEvents as A, sanitizeRuntimeStreamEvent as At, readWorkerTraceContext as B, parseCodexTokenUsage as Bt, freeSlots as C, padSpanId as Ct, teardownExecutor as D, createRuntimeStreamEventCollector as Dt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as E, createRuntimeEventCollector as Et, createExecutor as F, removeWorktree as Ft, createSteerableSandboxSession as G, defineProfileMaterializationContract as Gt, workerTraceHeaders as H, AGENT_PROFILE_MATERIALIZATION_AXES as Ht, createExecutorRegistry as I, DEFAULT_LOCAL_HARNESS as It, sandboxSessionTraceSource as J, promptControlProfileMaterialization as Jt, createPushTraceSource as K, fullProfileMaterialization as Kt, snapshotExecutorConfig as L, LOCAL_HARNESSES as Lt, bridgeStopSignalKey as M, runWorktreeHarness as Mt, captureReusableExecutorConfig as N, captureWorktreeDiff as Nt, assertValidBudget as O, sanitizeAgentRuntimeEvent as Ot, cliWorktreeExecutor as P, createWorktree as Pt, createInbox as Q, renderProfileMaterializationIssues as Qt, createWorktreeCliExecutor as R, harnessSupportsReasoningEffort as Rt, effectiveConcurrency as S, loopEventToOtelSpan as St, rollingDispatch as T, toOtelAttributes as Tt, workerTraceSeamKey as U, assertProfileMaterialization as Ut, workerTraceEnv as V, CodexExecutionDiagnosticError as Vt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as W, controlProfileMaterialization as Wt, createActivityLog as X, promptOnlyProfileMaterialization as Xt, DEFAULT_STALL_AFTER_MS as Y, promptModelProfileMaterialization as Yt, readWorkerProgress as Z, promptResourceProfileMaterialization as Zt, isWaitOutcome as _, createOpenInferenceFileExporter as _t, pickBestDelivered as a, routerBrain as at, validateWaitSpec as b, flatOtelSpan as bt, driverChild as c, observedModelMatchesDeclared as ct, deriveNodeExecutionIdentity as d, readTraceContextFromEnv as dt, validateProfileMaterialization as en, defaultSelectWinner as et, meterRuntimeOwnedProviderAttempt as f, traceContextToEnv as ft, createWaitProbes as g, buildRuntimeEventOtelSpans as gt, settledToIteration as h, buildLoopSpanNodes as ht, collectDelivered as i, acquireSandbox as it, bindReusableExecutorExecutionId as j, runSettledCommand as jt, createBudgetPool as k, sanitizeKnowledgeReadinessReport as kt, withDriverExecutor as l, createPropagatingTraceEmitter as lt, scopeOwnerExecutorNodeContext as m, buildLoopOtelSpans as mt, createSupervisor as n, createSandboxLineage as nt, runFinalizer as o, runBrainLoop as ot, recordScopeOwnerMaterialization as p, INTELLIGENCE_WIRE_VERSION as pt, decodeToolPart as q, profileMaterializationAxes$1 as qt, bestDelivered as r, probeSandboxCapabilities as rt, runTree as s, canonicalObservedModel as st, createRootHandle as t, worktreeCliProfileMaterialization as tn, runAgentRounds as tt, createScope as u, mergeTraceEnv as ut, pollFor as v, createOtelExporter as vt, queueOf as w, padTraceId as wt, waitUntil as x, generateSpanId as xt, timerAt as y, exportEvalRuns as yt, WORKER_TRACE_PROPAGATION as z, localHarnessExecutable as zt };
|
|
12362
12398
|
|
|
12363
|
-
//# sourceMappingURL=supervisor-
|
|
12399
|
+
//# sourceMappingURL=supervisor-BA87pb7g.js.map
|