@tangle-network/agent-runtime 0.134.3 → 0.134.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-BJS5eud7.js → activation-q9Zo4NRy.js} +3 -3
- package/dist/{activation-BJS5eud7.js.map → activation-q9Zo4NRy.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/analyst-loop.d.ts +1 -1
- package/dist/{authoring-zj6jq4HE.js → authoring-CmzMOTKX.js} +2 -2
- package/dist/{authoring-zj6jq4HE.js.map → authoring-CmzMOTKX.js.map} +1 -1
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-DDOdYrRO.js → candidate-execution-CyCLYLfK.js} +4 -4
- package/dist/{candidate-execution-DDOdYrRO.js.map → candidate-execution-CyCLYLfK.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/{environment-provider-CCASQ5FA.d.ts → environment-provider-DIRm41xB.d.ts} +3 -3
- package/dist/environment-provider.d.ts +1 -1
- package/dist/{graph-D0bln4rR.js → graph-B0wXX8Pr.js} +2 -2
- package/dist/{graph-D0bln4rR.js.map → graph-B0wXX8Pr.js.map} +1 -1
- package/dist/{improvement-cycle-fezPL8Th.js → improvement-cycle-4dO93TTE.js} +4 -4
- package/dist/{improvement-cycle-fezPL8Th.js.map → improvement-cycle-4dO93TTE.js.map} +1 -1
- package/dist/{index-BDPN51IH.d.ts → index-7VFw3_z0.d.ts} +4 -4
- package/dist/{index-Dg4MfLHq.d.ts → index-BbdLlSh6.d.ts} +3 -3
- package/dist/{index-gevMEHnE.d.ts → index-SWNlB0Hv.d.ts} +29 -23
- package/dist/index.d.ts +9 -9
- package/dist/index.js +11 -11
- package/dist/intelligence.d.ts +5 -5
- package/dist/intelligence.js +5 -5
- package/dist/kernel.d.ts +7 -7
- package/dist/kernel.js +6 -6
- package/dist/{knowledge-BXtZD-pC.js → knowledge-EDOC3wEs.js} +5 -5
- package/dist/{knowledge-BXtZD-pC.js.map → knowledge-EDOC3wEs.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-CjDcX5ua.js → loop-runner-bin-CoBcsxpe.js} +3 -3
- package/dist/{loop-runner-bin-CjDcX5ua.js.map → loop-runner-bin-CoBcsxpe.js.map} +1 -1
- package/dist/{loop-runner-bin-DvaXefJJ.d.ts → loop-runner-bin-DXqzpr4i.d.ts} +3 -3
- 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 +4 -4
- package/dist/{openai-tools-CycyI0v2.js → openai-tools-BQHlv-Ex.js} +2 -2
- package/dist/{openai-tools-CycyI0v2.js.map → openai-tools-BQHlv-Ex.js.map} +1 -1
- package/dist/{openai-tools-CF2RMD7_.d.ts → openai-tools-BulrPqjW.d.ts} +2 -2
- package/dist/{prepare-Cv7NzRZl.js → prepare-Czki1LBy.js} +3 -1
- package/dist/{prepare-Cv7NzRZl.js.map → prepare-Czki1LBy.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{protected-model-port-RnAK2ZrP.js → protected-model-port-OhS0l_6m.js} +2 -2
- package/dist/{protected-model-port-RnAK2ZrP.js.map → protected-model-port-OhS0l_6m.js.map} +1 -1
- package/dist/{redact-8ssmxJ0J.d.ts → redact-DTVIFTeR.d.ts} +3 -3
- package/dist/{runtime-CFD7S185.d.ts → runtime-C60zv0Q4.d.ts} +4 -4
- package/dist/{runtime-Btwztu5V.js → runtime-DJMlvPY7.js} +6 -6
- package/dist/{runtime-Btwztu5V.js.map → runtime-DJMlvPY7.js.map} +1 -1
- package/dist/{stream-agent-turn-8rmaOWtn.d.ts → stream-agent-turn-BLuTjcvw.d.ts} +3 -3
- package/dist/{structural-rollout-BHluS9JC.js → structural-rollout-GX7EzxeM.js} +2 -2
- package/dist/{structural-rollout-BHluS9JC.js.map → structural-rollout-GX7EzxeM.js.map} +1 -1
- package/dist/{supervise-BvjQqKsp.js → supervise-7JtBc_eW.js} +2 -2
- package/dist/{supervise-BvjQqKsp.js.map → supervise-7JtBc_eW.js.map} +1 -1
- package/dist/{supervisor-BsniJxSa.js → supervisor-Bfh5Gq_P.js} +52 -13
- package/dist/supervisor-Bfh5Gq_P.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +108 -96
- package/dist/testing.js.map +1 -1
- package/dist/{types-XtB9WZzr.d.ts → types-CfQbuWgo.d.ts} +2 -2
- package/dist/{types-Cz4m4Iv6.d.ts → types-DzZCZcwI.d.ts} +12 -12
- package/dist/{workspace-archive-DFwzVhbk.js → workspace-archive-B_JDld25.js} +2 -2
- package/dist/{workspace-archive-DFwzVhbk.js.map → workspace-archive-B_JDld25.js.map} +1 -1
- package/package.json +10 -10
- package/dist/supervisor-BsniJxSa.js.map +0 -1
|
@@ -4164,6 +4164,28 @@ function createSandboxLineage(client, capabilities, options = {}) {
|
|
|
4164
4164
|
async fork(parent, prompts, specs, signal) {
|
|
4165
4165
|
if (prompts.length === 0) throw new ValidationError("SandboxLineage.fork: prompts must be non-empty");
|
|
4166
4166
|
if (signal.aborted) throwAbort();
|
|
4167
|
+
const branched = await branchParent(parent.box, prompts.length, forkConcurrency, signal);
|
|
4168
|
+
if (branched !== void 0) {
|
|
4169
|
+
owned.push(...branched);
|
|
4170
|
+
if (branched.length !== prompts.length) throw new ValidationError(`SandboxLineage.fork: Sandbox returned ${branched.length} of ${prompts.length} requested children`);
|
|
4171
|
+
return mapWithConcurrency(branched, forkConcurrency, async (box, i) => {
|
|
4172
|
+
throwIfAborted(signal);
|
|
4173
|
+
const spec = specs[i % specs.length];
|
|
4174
|
+
if (!spec) throw new ValidationError("SandboxLineage.fork: no AgentRunSpec for branch");
|
|
4175
|
+
await spec.prepareBox?.(box, {
|
|
4176
|
+
signal,
|
|
4177
|
+
recordMount
|
|
4178
|
+
});
|
|
4179
|
+
const sessionId = mintSessionId();
|
|
4180
|
+
return {
|
|
4181
|
+
handle: {
|
|
4182
|
+
box,
|
|
4183
|
+
sessionId
|
|
4184
|
+
},
|
|
4185
|
+
events: promptEvents(streaming, box, prompts[i], sessionId, signal)
|
|
4186
|
+
};
|
|
4187
|
+
});
|
|
4188
|
+
}
|
|
4167
4189
|
const checkpointId = capabilities.canFork ? await checkpointForFork(parent.box, signal) : void 0;
|
|
4168
4190
|
return mapWithConcurrency(prompts, forkConcurrency, async (prompt, i) => {
|
|
4169
4191
|
throwIfAborted(signal);
|
|
@@ -4218,10 +4240,28 @@ function mintSessionId() {
|
|
|
4218
4240
|
return `loop-sess-${randomUuid()}`;
|
|
4219
4241
|
}
|
|
4220
4242
|
/**
|
|
4243
|
+
* Branch a running parent through the current Sandbox SDK, in bounded waves.
|
|
4244
|
+
* `undefined` means the box exposes only the legacy checkpoint API (or no
|
|
4245
|
+
* branching API), so the caller may try the legacy capability-gated path.
|
|
4246
|
+
*/
|
|
4247
|
+
async function branchParent(box, count, concurrency, signal) {
|
|
4248
|
+
const branch = box.branch;
|
|
4249
|
+
if (typeof branch !== "function") return void 0;
|
|
4250
|
+
const children = [];
|
|
4251
|
+
for (let offset = 0; offset < count; offset += concurrency) {
|
|
4252
|
+
throwIfAborted(signal);
|
|
4253
|
+
const requested = Math.min(concurrency, count - offset);
|
|
4254
|
+
const batch = await branch.call(box, requested);
|
|
4255
|
+
children.push(...batch);
|
|
4256
|
+
if (batch.length !== requested) return children;
|
|
4257
|
+
}
|
|
4258
|
+
return children;
|
|
4259
|
+
}
|
|
4260
|
+
/**
|
|
4221
4261
|
* Checkpoint the parent leaving it running, returning the checkpoint id to fork
|
|
4222
|
-
* from, or `undefined` when the box exposes no `checkpoint`
|
|
4223
|
-
*
|
|
4224
|
-
*
|
|
4262
|
+
* from, or `undefined` when the box exposes no legacy `checkpoint` method or
|
|
4263
|
+
* the call produced no id. `undefined` makes the caller use fresh boxes — a
|
|
4264
|
+
* fork that cannot preserve context must not pretend to share it.
|
|
4225
4265
|
*/
|
|
4226
4266
|
async function checkpointForFork(box, signal) {
|
|
4227
4267
|
const checkpoint = box.checkpoint;
|
|
@@ -4235,10 +4275,9 @@ async function checkpointForFork(box, signal) {
|
|
|
4235
4275
|
* platform advertised `canFork`; a missing `fork` here is a contract violation
|
|
4236
4276
|
* (probe said yes, box says no) and fails loud rather than silently degrading.
|
|
4237
4277
|
*
|
|
4238
|
-
* `signal` gates entry only: the SDK's `fork(checkpointId, options)`
|
|
4239
|
-
* abort signal
|
|
4240
|
-
*
|
|
4241
|
-
* cancellation is responsive at branch boundaries, not mid-fork.
|
|
4278
|
+
* `signal` gates entry only: the legacy SDK's `fork(checkpointId, options)`
|
|
4279
|
+
* takes no abort signal, so an in-flight fork cannot be interrupted. The
|
|
4280
|
+
* caller checks abort per branch, so cancellation is responsive at boundaries.
|
|
4242
4281
|
*/
|
|
4243
4282
|
async function forkFromCheckpoint(box, checkpointId, signal) {
|
|
4244
4283
|
const fork = box.fork;
|
|
@@ -4460,8 +4499,8 @@ async function runAgentRounds(options) {
|
|
|
4460
4499
|
}
|
|
4461
4500
|
}
|
|
4462
4501
|
/**
|
|
4463
|
-
* Build the lineage when either lineage flag is set. Probes the
|
|
4464
|
-
* capability once per run (
|
|
4502
|
+
* Build the lineage when either lineage flag is set. Probes the legacy fork
|
|
4503
|
+
* capability once per run (live branching is detected on each box).
|
|
4465
4504
|
* Rejects the lineage + `onWorkerBox` combination: both claim the same
|
|
4466
4505
|
* box-ownership channel, and silently honoring one would leak or double-free.
|
|
4467
4506
|
*/
|
|
@@ -4485,9 +4524,9 @@ async function setUpLineage(options, maxConcurrency, recordMount) {
|
|
|
4485
4524
|
* Decide, for one round, how each iteration acquires its sandbox stream:
|
|
4486
4525
|
* - refine (1 task) + `sessionContinuity` + a live parent handle ⇒ continue
|
|
4487
4526
|
* the parent session on its box.
|
|
4488
|
-
* - fanout (N tasks) + `forkFanout` + a live parent handle ⇒
|
|
4489
|
-
*
|
|
4490
|
-
*
|
|
4527
|
+
* - fanout (N tasks) + `forkFanout` + a live parent handle ⇒ branch the parent
|
|
4528
|
+
* box once and stream each branch from a child box (legacy CRIU or fresh-box
|
|
4529
|
+
* fallback is handled inside the lineage).
|
|
4491
4530
|
* - otherwise (round 0, no parent, the off flag) ⇒ start a fresh box per
|
|
4492
4531
|
* iteration THROUGH the lineage so it's owned + a handle is recorded for a
|
|
4493
4532
|
* later round to descend from.
|
|
@@ -12524,4 +12563,4 @@ function isNonEmptySpend(s) {
|
|
|
12524
12563
|
//#endregion
|
|
12525
12564
|
export { createInbox as $, renderProfileMaterializationIssues as $t, createBudgetPool as A, sanitizeKnowledgeReadinessReport as At, WORKER_TRACE_PROPAGATION as B, localHarnessExecutable as Bt, effectiveConcurrency as C, loopEventToOtelSpan as Ct, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as D, createRuntimeEventCollector as Dt, rollingDispatch as E, toOtelAttributes as Et, cliWorktreeExecutor as F, createWorktree as Ft, DEFAULT_SANDBOX_STEERING_MAX_TURNS as G, controlProfileMaterialization as Gt, workerTraceEnv as H, CodexExecutionDiagnosticError as Ht, createExecutor as I, removeWorktree as It, decodeToolPart as J, profileMaterializationAxes$1 as Jt, createSteerableSandboxSession as K, defineProfileMaterializationContract as Kt, createExecutorRegistry as L, DEFAULT_LOCAL_HARNESS as Lt, bindReusableExecutorExecutionId as M, runSettledCommand as Mt, bridgeStopSignalKey as N, runWorktreeHarness as Nt, teardownExecutor as O, createRuntimeStreamEventCollector as Ot, captureReusableExecutorConfig as P, captureWorktreeDiff as Pt, readWorkerProgress as Q, promptResourceProfileMaterialization as Qt, snapshotExecutorConfig as R, LOCAL_HARNESSES as Rt, waitUntil as S, generateSpanId as St, queueOf as T, padTraceId as Tt, workerTraceHeaders as U, AGENT_PROFILE_MATERIALIZATION_AXES as Ut, readWorkerTraceContext as V, parseCodexTokenUsage as Vt, workerTraceSeamKey as W, assertProfileMaterialization as Wt, DEFAULT_STALL_AFTER_MS as X, promptModelProfileMaterialization as Xt, sandboxSessionTraceSource as Y, promptControlProfileMaterialization as Yt, createActivityLog as Z, promptOnlyProfileMaterialization as Zt, createWaitProbes as _, buildRuntimeEventOtelSpans as _t, pickBestDelivered as a, acquireSandbox as at, timerAt as b, exportEvalRuns as bt, driverChild as c, canonicalObservedModel as ct, deriveNodeExecutionIdentity as d, mergeTraceEnv as dt, sandboxActProfileMaterialization as en, createSandboxForSpec as et, meterRuntimeOwnedAccounting as f, readTraceContextFromEnv as ft, settledToIteration as g, buildLoopSpanNodes as gt, scopeOwnerExecutorNodeContext as h, buildLoopOtelSpans as ht, collectDelivered as i, probeSandboxCapabilities as it, spendFromUsageEvents as j, sanitizeRuntimeStreamEvent as jt, assertValidBudget as k, sanitizeAgentRuntimeEvent as kt, withDriverExecutor as l, observedModelMatchesDeclared as lt, recordScopeOwnerMaterialization as m, INTELLIGENCE_WIRE_VERSION as mt, createSupervisor as n, worktreeCliProfileMaterialization as nn, runAgentRounds as nt, runFinalizer as o, routerBrain as ot, meterRuntimeOwnedProviderAttempt as p, traceContextToEnv as pt, createPushTraceSource as q, fullProfileMaterialization as qt, bestDelivered as r, createSandboxLineage as rt, runTree as s, runBrainLoop as st, createRootHandle as t, validateProfileMaterialization as tn, defaultSelectWinner as tt, createScope as u, createPropagatingTraceEmitter as ut, isWaitOutcome as v, createOpenInferenceFileExporter as vt, freeSlots as w, padSpanId as wt, validateWaitSpec as x, flatOtelSpan as xt, pollFor as y, createOtelExporter as yt, createWorktreeCliExecutor as z, harnessSupportsReasoningEffort as zt };
|
|
12526
12565
|
|
|
12527
|
-
//# sourceMappingURL=supervisor-
|
|
12566
|
+
//# sourceMappingURL=supervisor-Bfh5Gq_P.js.map
|