@tangle-network/agent-runtime 0.132.4 → 0.132.6
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/README.md +2 -2
- package/dist/{activation-DFJBEC62.js → activation-U2mou_hT.js} +2 -2
- package/dist/{activation-DFJBEC62.js.map → activation-U2mou_hT.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-WS1l0lU1.js → authoring-sf0VpHlY.js} +2 -2
- package/dist/{authoring-WS1l0lU1.js.map → authoring-sf0VpHlY.js.map} +1 -1
- package/dist/{conversation-D95pue6P.js → conversation-BiII3X_6.js} +3 -3
- package/dist/{conversation-D95pue6P.js.map → conversation-BiII3X_6.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/conversation.js +1 -1
- package/dist/{environment-provider-DlYw_pjo.d.ts → environment-provider-CkSDxRZd.d.ts} +2 -2
- package/dist/environment-provider.d.ts +1 -1
- package/dist/{graph-B9hFN-zX.js → graph-DjTw-HMK.js} +2 -2
- package/dist/{graph-B9hFN-zX.js.map → graph-DjTw-HMK.js.map} +1 -1
- package/dist/{improvement-cycle-DgZtiPDT.js → improvement-cycle-paspYVfE.js} +4 -4
- package/dist/{improvement-cycle-DgZtiPDT.js.map → improvement-cycle-paspYVfE.js.map} +1 -1
- package/dist/{index-CcpNgmQY.d.ts → index-BsrFZu0N.d.ts} +4 -4
- package/dist/{index-iwZ0at5o.d.ts → index-Cdf9NET5.d.ts} +2 -2
- package/dist/{index-D9dVsozT.d.ts → index-DixXnx07.d.ts} +73 -7
- package/dist/index.d.ts +8 -8
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +6 -6
- package/dist/kernel.js +7 -7
- package/dist/{knowledge-By_lZ80W.js → knowledge-DV8PEBph.js} +3 -3
- package/dist/{knowledge-By_lZ80W.js.map → knowledge-DV8PEBph.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-D9OAFkP_.d.ts → loop-runner-bin-BqJGlXju.d.ts} +3 -3
- package/dist/{loop-runner-bin-CjsTZUVS.js → loop-runner-bin-C1G7gPX0.js} +3 -3
- package/dist/{loop-runner-bin-CjsTZUVS.js.map → loop-runner-bin-C1G7gPX0.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/{materialization-DBXuH34A.js → materialization-JR_nN_oT.js} +18 -2
- package/dist/materialization-JR_nN_oT.js.map +1 -0
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-BATxru3h.js → openai-tools-Ba0yu9hI.js} +2 -2
- package/dist/{openai-tools-BATxru3h.js.map → openai-tools-Ba0yu9hI.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{redact-mWj5eu4X.d.ts → redact-BAnM2avI.d.ts} +3 -3
- package/dist/{runtime-YuPbrgG1.js → runtime-BeBAzfnW.js} +65 -15
- package/dist/runtime-BeBAzfnW.js.map +1 -0
- package/dist/{runtime-aXvRThzL.d.ts → runtime-CKk_poJ-.d.ts} +3 -3
- package/dist/{stream-agent-turn-BxwZJVfZ.js → stream-agent-turn-Bo5ZSAUR.js} +2 -2
- package/dist/{stream-agent-turn-BxwZJVfZ.js.map → stream-agent-turn-Bo5ZSAUR.js.map} +1 -1
- package/dist/{stream-agent-turn-BXiMHdCf.d.ts → stream-agent-turn-By46GZlo.d.ts} +2 -2
- package/dist/{structural-rollout-Dq0j-JHl.js → structural-rollout-DGkq_Grt.js} +18 -9
- package/dist/structural-rollout-DGkq_Grt.js.map +1 -0
- package/dist/{supervise-BDj-uFfb.js → supervise-B2fTctMn.js} +40 -5
- package/dist/supervise-B2fTctMn.js.map +1 -0
- package/dist/{supervisor-DlVTwwJb.js → supervisor-BTuNGicF.js} +36 -5
- package/dist/supervisor-BTuNGicF.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +11 -11
- package/dist/{types-B9KAen_0.d.ts → types-BjUQODeG.d.ts} +21 -2
- package/package.json +4 -4
- package/dist/materialization-DBXuH34A.js.map +0 -1
- package/dist/runtime-YuPbrgG1.js.map +0 -1
- package/dist/structural-rollout-Dq0j-JHl.js.map +0 -1
- package/dist/supervise-BDj-uFfb.js.map +0 -1
- package/dist/supervisor-DlVTwwJb.js.map +0 -1
|
@@ -4,7 +4,7 @@ import { _ as captureWorkerTraceEvidence, c as replaySpawnTree, f as attestNeste
|
|
|
4
4
|
import { c as randomUuid, d as throwAbort, f as throwIfAborted, l as sleep, m as zeroTokenUsage, n as cloneTokenUsage, o as mapWithConcurrency, p as withTimeout, r as deleteBoxSafe, s as randomSuffix, t as addTokenUsage, u as stringifySafe } from "./util-Dr--8wAL.js";
|
|
5
5
|
import { a as notifySandboxEventObserver, n as extractLlmCallEvent } from "./sandbox-events-vIwmuPdl.js";
|
|
6
6
|
import { a as concreteProfileModel, l as resolveRouterRetryPolicy, o as profileBridgeWireModel, s as profileModelExecutionSettings, t as assertExecutableAgentProfile, u as agentHarness } from "./model-policy-mWSoToiQ.js";
|
|
7
|
-
import { _ as
|
|
7
|
+
import { _ as runtimeOwnedScopeOwnerRuntime, a as authoredProfileDigest, b as executableAgentProfileSnapshot, c as knownExecutionBindingReceipt, f as runtimeOwnedDeferredExecutorRuntime, g as runtimeOwnedPendingExecutorMaterialization, h as runtimeOwnedExecutorMaterialization, l as knownMaterializationReceipt, m as runtimeOwnedExecutorExecutionBinding, n as attestRuntimeOwnedExecutor, o as finalizeRuntimeOwnedPendingExecutor, r as attestRuntimeOwnedPendingExecutor, t as attestRuntimeOwnedDeferredExecutor, u as newExecutionAttemptId, v as unknownExecutionBindingReceipt, x as executableAgentSpecSnapshot, y as unknownMaterializationReceipt } from "./materialization-JR_nN_oT.js";
|
|
8
8
|
import { i as resolveAgentEnvironmentProvider, n as providerAsExecutor, r as providerAsSandboxClient } from "./environment-provider-mDsjfGjY.js";
|
|
9
9
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-C7iJOWm3.js";
|
|
10
10
|
import { estimateCost, isModelPriced } from "@tangle-network/agent-eval";
|
|
@@ -6453,7 +6453,12 @@ const routerToolsInlineExecutor = (spec, ctx) => {
|
|
|
6453
6453
|
});
|
|
6454
6454
|
};
|
|
6455
6455
|
function assertObservedRouterModel(observed, expected, context) {
|
|
6456
|
-
if (observed !== void 0 && observed
|
|
6456
|
+
if (observed !== void 0 && !observedRouterModelMatches(observed, expected)) throw new ValidationError(`${context}: provider reported model ${JSON.stringify(observed)} but AgentProfile requires ${JSON.stringify(expected)}`);
|
|
6457
|
+
}
|
|
6458
|
+
function observedRouterModelMatches(observed, expected) {
|
|
6459
|
+
if (observed === expected) return true;
|
|
6460
|
+
const suffix = observed.startsWith(`${expected}@`) ? observed.slice(expected.length + 1) : "";
|
|
6461
|
+
return suffix.length > 0 && /^[A-Za-z0-9._-]+$/u.test(suffix);
|
|
6457
6462
|
}
|
|
6458
6463
|
function routerRequestIdentity(ctx) {
|
|
6459
6464
|
const correlation = ctx.node?.identity?.correlation;
|
|
@@ -7146,6 +7151,8 @@ async function* streamBridgeSession(args) {
|
|
|
7146
7151
|
let turns = 0;
|
|
7147
7152
|
let transportAttempts = 0;
|
|
7148
7153
|
let lastText = "";
|
|
7154
|
+
let observedModel;
|
|
7155
|
+
let observedSystemFingerprint;
|
|
7149
7156
|
const toolCalls = [];
|
|
7150
7157
|
const promptCache = {};
|
|
7151
7158
|
let nextPrompt = taskToPrompt(args.task);
|
|
@@ -7224,6 +7231,11 @@ async function* streamBridgeSession(args) {
|
|
|
7224
7231
|
maxReconnects: args.maxReconnects,
|
|
7225
7232
|
traceHeaders: args.traceHeaders
|
|
7226
7233
|
})) {
|
|
7234
|
+
if (chunk.model !== void 0) observedModel = mergeBridgeObservedModel(observedModel, chunk.model);
|
|
7235
|
+
if (chunk.systemFingerprint !== void 0) {
|
|
7236
|
+
if (observedSystemFingerprint !== void 0 && observedSystemFingerprint !== chunk.systemFingerprint) throw new ValidationError(`bridgeExecutor: bridge changed system fingerprint from ${JSON.stringify(observedSystemFingerprint)} to ${JSON.stringify(chunk.systemFingerprint)}`);
|
|
7237
|
+
observedSystemFingerprint = chunk.systemFingerprint;
|
|
7238
|
+
}
|
|
7227
7239
|
if (chunk.content) turnText += chunk.content;
|
|
7228
7240
|
for (const step of chunk.toolCalls ?? []) {
|
|
7229
7241
|
toolCalls.push(step.toolName);
|
|
@@ -7322,7 +7334,8 @@ async function* streamBridgeSession(args) {
|
|
|
7322
7334
|
};
|
|
7323
7335
|
const out = {
|
|
7324
7336
|
content: lastText,
|
|
7325
|
-
model:
|
|
7337
|
+
...observedModel !== void 0 ? { model: observedModel } : {},
|
|
7338
|
+
...observedSystemFingerprint ? { system_fingerprint: observedSystemFingerprint } : {},
|
|
7326
7339
|
toolCalls,
|
|
7327
7340
|
transportAttempts,
|
|
7328
7341
|
...Object.keys(promptCache).length > 0 ? { promptCache } : {},
|
|
@@ -7330,7 +7343,7 @@ async function* streamBridgeSession(args) {
|
|
|
7330
7343
|
};
|
|
7331
7344
|
args.onArtifact({
|
|
7332
7345
|
outRef: contentRef("bridge", {
|
|
7333
|
-
model:
|
|
7346
|
+
model: observedModel ?? null,
|
|
7334
7347
|
session: args.sessionId,
|
|
7335
7348
|
content: lastText
|
|
7336
7349
|
}),
|
|
@@ -7621,6 +7634,16 @@ async function cancelBridgeRunToTerminal(seam, run, grace, stopSignal) {
|
|
|
7621
7634
|
function errorMessage(error) {
|
|
7622
7635
|
return error instanceof Error ? error.message : String(error);
|
|
7623
7636
|
}
|
|
7637
|
+
function mergeBridgeObservedModel(current, next) {
|
|
7638
|
+
if (current === void 0 || current === next) return next;
|
|
7639
|
+
if (bridgeModelIdentityBase(current) !== bridgeModelIdentityBase(next)) throw new ValidationError(`bridgeExecutor: bridge changed response model from ${JSON.stringify(current)} to ${JSON.stringify(next)}`);
|
|
7640
|
+
if (current.includes("@") && next.includes("@")) throw new ValidationError(`bridgeExecutor: bridge changed response model snapshot from ${JSON.stringify(current)} to ${JSON.stringify(next)}`);
|
|
7641
|
+
return current.includes("@") ? current : next;
|
|
7642
|
+
}
|
|
7643
|
+
function bridgeModelIdentityBase(model) {
|
|
7644
|
+
const at = model.lastIndexOf("@");
|
|
7645
|
+
return at > 0 ? model.slice(0, at) : model;
|
|
7646
|
+
}
|
|
7624
7647
|
function assertBridgeProfileMaterialization(value, profile, wireModel) {
|
|
7625
7648
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization receipt must be an object");
|
|
7626
7649
|
const raw = value;
|
|
@@ -7949,6 +7972,14 @@ function parseSseFrame(frame) {
|
|
|
7949
7972
|
error: new BackendTransportError("bridge", `bridgeExecutor: bridge stream error: ${parsed.error.message ?? parsed.error.type ?? "unknown"}`)
|
|
7950
7973
|
};
|
|
7951
7974
|
const out = {};
|
|
7975
|
+
if (parsed.model !== void 0) {
|
|
7976
|
+
if (typeof parsed.model !== "string" || parsed.model.length === 0) throw new ValidationError("bridgeExecutor: bridge response model must be a non-empty string");
|
|
7977
|
+
out.model = parsed.model;
|
|
7978
|
+
}
|
|
7979
|
+
if (parsed.system_fingerprint !== void 0) {
|
|
7980
|
+
if (typeof parsed.system_fingerprint !== "string" || parsed.system_fingerprint.length === 0) throw new ValidationError("bridgeExecutor: bridge system_fingerprint must be a non-empty string");
|
|
7981
|
+
out.systemFingerprint = parsed.system_fingerprint;
|
|
7982
|
+
}
|
|
7952
7983
|
const choice = parsed.choices?.[0];
|
|
7953
7984
|
const content = choice?.delta?.content ?? choice?.message?.content;
|
|
7954
7985
|
if (typeof content === "string" && content.length > 0) out.content = content;
|
|
@@ -12136,4 +12167,4 @@ function isNonEmptySpend(s) {
|
|
|
12136
12167
|
//#endregion
|
|
12137
12168
|
export { runAgentRounds as $, bindReusableExecutorExecutionId as A, createWorktree as At, workerTraceHeaders as B, controlProfileMaterialization as Bt, queueOf as C, createRuntimeStreamEventCollector as Ct, assertValidBudget as D, runSettledCommand as Dt, teardownExecutor as E, sanitizeRuntimeStreamEvent as Et, snapshotExecutorConfig as F, localHarnessExecutable as Ft, decodeToolPart as G, promptModelProfileMaterialization as Gt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as H, fullProfileMaterialization as Ht, createWorktreeCliExecutor as I, parseCodexTokenUsage as It, createActivityLog as J, renderProfileMaterializationIssues as Jt, sandboxSessionTraceSource as K, promptOnlyProfileMaterialization as Kt, WORKER_TRACE_PROPAGATION as L, CodexExecutionDiagnosticError as Lt, cliWorktreeExecutor as M, DEFAULT_LOCAL_HARNESS as Mt, createExecutor as N, LOCAL_HARNESSES as Nt, createBudgetPool as O, runWorktreeHarness as Ot, createExecutorRegistry as P, harnessSupportsReasoningEffort as Pt, defaultSelectWinner as Q, readWorkerTraceContext as R, AGENT_PROFILE_MATERIALIZATION_AXES as Rt, freeSlots as S, createRuntimeEventCollector as St, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as T, sanitizeKnowledgeReadinessReport as Tt, createSteerableSandboxSession as U, profileMaterializationAxes$1 as Ut, workerTraceSeamKey as V, defineProfileMaterializationContract as Vt, createPushTraceSource as W, promptControlProfileMaterialization as Wt, createInbox as X, validateProfileMaterialization as Xt, readWorkerProgress as Y, sandboxActProfileMaterialization as Yt, createSandboxForSpec as Z, worktreeCliProfileMaterialization as Zt, pollFor as _, generateSpanId as _t, pickBestDelivered as a, createPropagatingTraceEmitter as at, waitUntil as b, padTraceId as bt, driverChild as c, traceContextToEnv as ct, deriveNodeExecutionIdentity as d, buildLoopSpanNodes as dt, createSandboxLineage as et, recordScopeOwnerMaterialization as f, buildRuntimeEventOtelSpans as ft, isWaitOutcome as g, flatOtelSpan as gt, createWaitProbes as h, exportEvalRuns as ht, collectDelivered as i, runBrainLoop as it, captureReusableExecutorConfig as j, removeWorktree as jt, spendFromUsageEvents as k, captureWorktreeDiff as kt, withDriverExecutor as l, INTELLIGENCE_WIRE_VERSION as lt, settledToIteration as m, createOtelExporter as mt, createSupervisor as n, acquireSandbox as nt, runFinalizer as o, mergeTraceEnv as ot, scopeOwnerExecutorNodeContext as p, createOpenInferenceFileExporter as pt, DEFAULT_STALL_AFTER_MS as q, promptResourceProfileMaterialization as qt, bestDelivered as r, routerBrain as rt, runTree as s, readTraceContextFromEnv as st, createRootHandle as t, probeSandboxCapabilities as tt, createScope as u, buildLoopOtelSpans as ut, timerAt as v, loopEventToOtelSpan as vt, rollingDispatch as w, sanitizeAgentRuntimeEvent as wt, effectiveConcurrency as x, toOtelAttributes as xt, validateWaitSpec as y, padSpanId as yt, workerTraceEnv as z, assertProfileMaterialization as zt };
|
|
12138
12169
|
|
|
12139
|
-
//# sourceMappingURL=supervisor-
|
|
12170
|
+
//# sourceMappingURL=supervisor-BTuNGicF.js.map
|