@tangle-network/agent-runtime 0.336.0 → 0.336.1
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-DZbEj4oG.d.ts → activation-D3h2jg6U.d.ts} +2 -2
- package/dist/{activation-BT3VoIpg.js → activation-WRMocDPp.js} +2 -2
- package/dist/{activation-BT3VoIpg.js.map → activation-WRMocDPp.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-rNoFHYmZ.js → coordination-driver-DIxyUXKr.js} +2 -2
- package/dist/{coordination-driver-rNoFHYmZ.js.map → coordination-driver-DIxyUXKr.js.map} +1 -1
- package/dist/{delegate-BdwThtY9.js → delegate-DZ_EV8BU.js} +2 -2
- package/dist/{delegate-BdwThtY9.js.map → delegate-DZ_EV8BU.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +3 -3
- package/dist/{graph-Bph_DX-z.js → graph-DOIziP_V.js} +4 -4
- package/dist/{graph-Bph_DX-z.js.map → graph-DOIziP_V.js.map} +1 -1
- package/dist/{improvement-cycle-Coj69usO.js → improvement-cycle-DRiKtfty.js} +3 -3
- package/dist/{improvement-cycle-Coj69usO.js.map → improvement-cycle-DRiKtfty.js.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-9MtarSBu.js → loop-runner-bin-DCCieRnZ.js} +3 -3
- package/dist/{loop-runner-bin-9MtarSBu.js.map → loop-runner-bin-DCCieRnZ.js.map} +1 -1
- package/dist/{loop-runner-bin-BTC2czoj.d.ts → loop-runner-bin-DXMrEOWf.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 +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-DWuf9K9X.d.ts → openai-tools-mpuNXxBB.d.ts} +2 -2
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-Ced9EeHy.js → provision-supervisor-BGXehCW5.js} +3 -3
- package/dist/{provision-supervisor-Ced9EeHy.js.map → provision-supervisor-BGXehCW5.js.map} +1 -1
- package/dist/{runtime-DMVBv34m.js → runtime-B-qPSZyM.js} +74 -11
- package/dist/runtime-B-qPSZyM.js.map +1 -0
- package/dist/{search-executor-BNTeMygV.js → search-executor-B6X1doWD.js} +2 -2
- package/dist/{search-executor-BNTeMygV.js.map → search-executor-B6X1doWD.js.map} +1 -1
- package/dist/{server-z7xI_ItY.js → server-BwdkANs5.js} +3 -3
- package/dist/{server-z7xI_ItY.js.map → server-BwdkANs5.js.map} +1 -1
- package/dist/{supervise-ISaRiWVe.js → supervise-N4Wilrg1.js} +31 -6
- package/dist/supervise-N4Wilrg1.js.map +1 -0
- package/dist/{supervisor-B-bkXttM.js → supervisor-CLi80MYC.js} +51 -7
- package/dist/supervisor-CLi80MYC.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/dist/{types-BO8kh52C.d.ts → types-C9qQxCd9.d.ts} +47 -3
- package/package.json +1 -1
- package/dist/runtime-DMVBv34m.js.map +0 -1
- package/dist/supervise-ISaRiWVe.js.map +0 -1
- package/dist/supervisor-B-bkXttM.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { o as writeAtomicDurableFile } from "./durable-file-B_eJr6Mb.js";
|
|
2
|
-
import { D as settledToIteration, Di as executableAgentProfileSnapshot, Dn as readPromptOptions, En as assertBoxlessPromptOptions, Oi as executableAgentSpecSnapshot, On as routerBrain, Qn as runAbortable, Sn as createSandboxLineage, Y as coordinationProfileToolPrefix, Yi as notifySandboxEventObserver, ct as mapExecutorResult, en as CheckUnavailableError, f as withDriverExecutor, gt as createWorktreeCliExecutor, ha as detachedSnapshot, ia as insideCursorNamespace, kn as runBrainLoop, ma as detachedFrozen, mt as createExecutorRegistry, na as InMemoryResultBlobStore, ot as rollingDispatch, pa as contentAddress, pt as createExecutor, r as createSupervisor, ra as InMemorySpawnJournal, st as gateOnDeliverable, ua as isTraceAnalysisStore, un as verdictFromJudgeScore, xn as runAgentRounds, yn as defaultSelectWinner } from "./supervisor-
|
|
2
|
+
import { D as settledToIteration, Di as executableAgentProfileSnapshot, Dn as readPromptOptions, En as assertBoxlessPromptOptions, Oi as executableAgentSpecSnapshot, On as routerBrain, Qn as runAbortable, Sn as createSandboxLineage, Y as coordinationProfileToolPrefix, Yi as notifySandboxEventObserver, ct as mapExecutorResult, en as CheckUnavailableError, f as withDriverExecutor, gt as createWorktreeCliExecutor, ha as detachedSnapshot, ia as insideCursorNamespace, kn as runBrainLoop, ma as detachedFrozen, mt as createExecutorRegistry, na as InMemoryResultBlobStore, ot as rollingDispatch, pa as contentAddress, pt as createExecutor, r as createSupervisor, ra as InMemorySpawnJournal, st as gateOnDeliverable, ua as isTraceAnalysisStore, un as verdictFromJudgeScore, xn as runAgentRounds, yn as defaultSelectWinner } from "./supervisor-CLi80MYC.js";
|
|
3
3
|
import { i as ConfigError, m as ValidationError, n as AnalystError, s as PlannerError } from "./errors-DodWX-cb.js";
|
|
4
|
-
import { B as runAgentic, G as observe, K as renderReport, U as ObservationError, V as sample, X as strategyAuthorMethod, a as reconcileInterruptedSearchCalls, c as searchExecutor, q as profileChatClient, r as dedicatedLane, x as runtimeShipDecision, z as refine } from "./search-executor-
|
|
4
|
+
import { B as runAgentic, G as observe, K as renderReport, U as ObservationError, V as sample, X as strategyAuthorMethod, a as reconcileInterruptedSearchCalls, c as searchExecutor, q as profileChatClient, r as dedicatedLane, x as runtimeShipDecision, z as refine } from "./search-executor-B6X1doWD.js";
|
|
5
5
|
import { $ as isAsyncIterable, Ct as armDeadlineTimer, F as canonicalCandidateDigest$1, G as chargedTokens, K as cloneSpend, M as markPutStreamVerified, Q as isAbortError, U as addSpend, V as sha256Bytes$1, X as fnv1a32Hex, Y as errorMessage, Z as hasCompleteCacheBreakdown, at as sleep, dt as zeroSpend, et as mapWithConcurrency, nt as randomSuffix, ot as stringifySafe, w as captureMaterializedWorkspace, x as WorkspaceScanLimitError, z as immutableCandidateValue } from "./sandbox-profile-compat-D_ZOL80S.js";
|
|
6
6
|
import { a as readCommittedJsonLines, i as readCommittedJsonFile, n as isNoEntError, o as upsertCommittedJsonLine, s as withJsonlFileLock, t as appendCommittedJsonLine } from "./jsonl-file-DBv31uPi.js";
|
|
7
7
|
import { c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, p as canonicalObservedModelParts, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-CyCUwHed.js";
|
|
8
8
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
|
|
9
9
|
import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction-DFCeo4vg.js";
|
|
10
|
-
import { D as foldCoordinationRecords, w as createInMemoryRunContext } from "./coordination-driver-
|
|
11
|
-
import { r as supervise } from "./supervise-
|
|
10
|
+
import { D as foldCoordinationRecords, w as createInMemoryRunContext } from "./coordination-driver-DIxyUXKr.js";
|
|
11
|
+
import { r as supervise } from "./supervise-N4Wilrg1.js";
|
|
12
12
|
import { a as graphRunsFor, d as recordGraphRun, i as graphRegistry, l as lookupGraph, p as taskShapeDigest, r as graphFromStored, t as digestOfGraph } from "./graph-registry-DAI6KNXB.js";
|
|
13
13
|
import "./run-layout-Cu8H7aeh.js";
|
|
14
|
-
import "./provision-supervisor-
|
|
15
|
-
import "./delegate-
|
|
16
|
-
import "./graph-
|
|
14
|
+
import "./provision-supervisor-BGXehCW5.js";
|
|
15
|
+
import "./delegate-DZ_EV8BU.js";
|
|
16
|
+
import "./graph-DOIziP_V.js";
|
|
17
17
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256Bytes, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
18
18
|
import { CODING_HARNESSES, DEFAULT_TRACE_ANALYST_KINDS, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, createTraceAnalyst, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
|
|
19
19
|
import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
|
|
@@ -6091,11 +6091,11 @@ async function openSandboxRun(client, options, deliverable) {
|
|
|
6091
6091
|
...error !== void 0 ? { error: errorMessage(error) } : {}
|
|
6092
6092
|
});
|
|
6093
6093
|
async function settle(box, events, turnIndex, turnKind) {
|
|
6094
|
-
const
|
|
6094
|
+
const collector = createTurnEventCollector();
|
|
6095
6095
|
const outcomeTracker = createAgentRunOutcomeTracker();
|
|
6096
6096
|
try {
|
|
6097
6097
|
for await (const ev of events) {
|
|
6098
|
-
|
|
6098
|
+
collector.push(ev);
|
|
6099
6099
|
outcomeTracker.observe(ev);
|
|
6100
6100
|
notifySandboxEventObserver(ev, options.onSandboxEvent, {
|
|
6101
6101
|
turnIndex,
|
|
@@ -6104,9 +6104,10 @@ async function openSandboxRun(client, options, deliverable) {
|
|
|
6104
6104
|
});
|
|
6105
6105
|
}
|
|
6106
6106
|
} catch (err) {
|
|
6107
|
-
if (isAbortError(err)) throw new SandboxRunAbortError(
|
|
6107
|
+
if (isAbortError(err)) throw new SandboxRunAbortError(collector.events());
|
|
6108
6108
|
throw err;
|
|
6109
6109
|
}
|
|
6110
|
+
const collected = collector.events();
|
|
6110
6111
|
const outcome = outcomeTracker.finish();
|
|
6111
6112
|
if (deliverable.kind === "events") return {
|
|
6112
6113
|
out: deliverable.fromEvents(collected),
|
|
@@ -6278,6 +6279,68 @@ function hashText(value) {
|
|
|
6278
6279
|
}
|
|
6279
6280
|
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
6280
6281
|
}
|
|
6282
|
+
/**
|
|
6283
|
+
* Collect one turn's events, keeping only the newest snapshot of each streamed text or
|
|
6284
|
+
* reasoning part.
|
|
6285
|
+
*
|
|
6286
|
+
* opencode sends `message.part.updated` once per token, and every frame carries the part's
|
|
6287
|
+
* whole cumulative text, so keeping every frame holds O(L²) bytes per turn: two concurrent
|
|
6288
|
+
* audit workflows took the platform API from 459 MB to an OOM at 1.95 GB in 11 minutes.
|
|
6289
|
+
* A snapshot (a frame whose part carries `text`) whose text extends the previous snapshot
|
|
6290
|
+
* of the same part replaces it and moves to the newest position, which is the rule the
|
|
6291
|
+
* Sandbox SDK's text collectors already apply, so the collected text is unchanged. The kept
|
|
6292
|
+
* frame drops its `delta`, because its text already holds every earlier increment and a
|
|
6293
|
+
* reader that joins `delta ?? part.text` across frames would otherwise read only the last
|
|
6294
|
+
* one. Delta-only frames and every other event are kept as they arrived.
|
|
6295
|
+
*/
|
|
6296
|
+
function createTurnEventCollector() {
|
|
6297
|
+
const slots = [];
|
|
6298
|
+
const snapshots = /* @__PURE__ */ new Map();
|
|
6299
|
+
return {
|
|
6300
|
+
push(event) {
|
|
6301
|
+
const snapshot = partSnapshot(event);
|
|
6302
|
+
if (!snapshot) {
|
|
6303
|
+
slots.push(event);
|
|
6304
|
+
return;
|
|
6305
|
+
}
|
|
6306
|
+
const previous = snapshots.get(snapshot.key);
|
|
6307
|
+
const extends_ = previous !== void 0 && snapshot.text.startsWith(previous.text);
|
|
6308
|
+
if (extends_) slots[previous.at] = void 0;
|
|
6309
|
+
snapshots.set(snapshot.key, {
|
|
6310
|
+
at: slots.length,
|
|
6311
|
+
text: snapshot.text
|
|
6312
|
+
});
|
|
6313
|
+
slots.push(extends_ ? withoutDelta(event) : event);
|
|
6314
|
+
},
|
|
6315
|
+
events() {
|
|
6316
|
+
return slots.filter((event) => event !== void 0);
|
|
6317
|
+
}
|
|
6318
|
+
};
|
|
6319
|
+
}
|
|
6320
|
+
function partSnapshot(event) {
|
|
6321
|
+
if (event?.type !== "message.part.updated") return void 0;
|
|
6322
|
+
const data = asRecord$1(event.data);
|
|
6323
|
+
const part = asRecord$1(data?.part) ?? asRecord$1(asRecord$1(data?.properties)?.part);
|
|
6324
|
+
if (!part || typeof part.id !== "string") return void 0;
|
|
6325
|
+
if (part.type !== "text" && part.type !== "reasoning" && part.type !== "thinking") return void 0;
|
|
6326
|
+
const text = typeof part.text === "string" ? part.text : typeof part.content === "string" ? part.content : void 0;
|
|
6327
|
+
return text === void 0 ? void 0 : {
|
|
6328
|
+
key: `${part.type}:${part.id}`,
|
|
6329
|
+
text
|
|
6330
|
+
};
|
|
6331
|
+
}
|
|
6332
|
+
function withoutDelta(event) {
|
|
6333
|
+
const data = asRecord$1(event.data);
|
|
6334
|
+
if (!data || !("delta" in data)) return event;
|
|
6335
|
+
const { delta: _delta, ...rest } = data;
|
|
6336
|
+
return {
|
|
6337
|
+
...event,
|
|
6338
|
+
data: rest
|
|
6339
|
+
};
|
|
6340
|
+
}
|
|
6341
|
+
function asRecord$1(value) {
|
|
6342
|
+
return value !== null && typeof value === "object" ? value : void 0;
|
|
6343
|
+
}
|
|
6281
6344
|
//#endregion
|
|
6282
6345
|
//#region src/runtime/authored-code.ts
|
|
6283
6346
|
/**
|
|
@@ -9409,4 +9472,4 @@ function tail(s) {
|
|
|
9409
9472
|
//#endregion
|
|
9410
9473
|
export { runBenchmark as $, McpSpawnFault as $t, connectRemoteSupervisor as A, inlineSandboxClient as At, chatTransportExecutor as B, runIsolatedCheck as Bt, analyzeTrace as C, observationFromRegistry as Ct, compileSearchSpec as D, defineLeaderboard as Dt, assertSearchSpec as E, harvestCorpus as Et, profileRunsForName as F, checkProgramDigest as Ft, assertStrategyContract as G, leaderboard as Gt, createChatSessionStore as H, deterministicCompletion as Ht, recordProfileRun as I, declaredCheckDeliverable as It, strategyAuthorSystemPrompt as J, renderLeaderboardMarkdown as Jt, authorStrategy as K, pairwiseSignificance as Kt, patchDelivered as L, declaredCheckDigest as Lt, loadProfile as M, loopDispatch as Mt, pickBestProfile as N, superviseDispatch as Nt, searchPresets as O, resolveSandboxClient as Ot, profileRegistry as P, assertDeclaredCheck as Pt, printBenchmarkReport as Q, openSqlRunStore as Qt, runCoderChecks as R, declaredCheckJudge as Rt, withUntrackedArtifacts as S, registryScopeAnalyst as St, SEARCH_SPEC_CORRELATION_KEY as T, HarvestError as Tt, runStrategyEvolution as U, sentinelCompletion as Ut, chatWorkerSeam as V, completionAuthorizes as Vt, strategyTournament as W, stopSentinel as Wt, openSandboxRun as X, renderPairwiseMarkdown as Xt, SandboxRunAbortError as Y, renderLeaderboardSvg as Yt, createS3PrivateCasStore as Z, SqlRunOwnershipError as Zt, VERIFY_TAIL_CHARS as _, verify as _t, localShell as a, mcpSecretEnvMetadataKey as an, builtinShapes as at, settledWorkerOut as b, buildSteerContext as bt, createVerifierEnvironment as c, secretEnvOfMcpServer as cn, FileCorpus as ct, harvestSurfaceDiffs as d, fanout as dt, connectStdioMcp as en, createPrivateCasArtifactPort as et, analystsFromRegistry as f, flatWidenGate as ft, NOTE_MAX_CHARS as g, selectValidWinner as gt, EVIDENCE_MAX_CHARS as h, pipeline as ht, jjWorkspace as i, envKeyProvider as in, runPersonified as it, bestProfileFor as j, loopCampaignDispatch as jt, searchSpecDigest as k, localSandboxClient as kt, boxSurfaceReader as l, createTangleSandboxExactProcessProvider as ln, InMemoryCorpus as lt, worktreeFanout as m, panel as mt, makeFinding$1 as n, createMcpEnvironment as nn, trajectoryReport as nt, runInWorkspace as o, resolveMcpServerLaunch as on, createShapeRegistry as ot, failuresAnalyst as p, loopUntil as pt, strategyAuthorContract as q, renderLeaderboardHtml as qt, gitWorkspace as r, sanitizeMcpToolSchema as rn, definePersona as rt, createWaterfallCollector as s, resolveSecretEnv as sn, registerShape as st, computeFindingId$1 as t, materializeLocalMcp as tn, equalKOnCost as tt, fsSurfaceReader as u, renderCorpusToInstructions as ut, closingWorkerNote as v, widen as vt, createFencedSqlRunContext as w, inProcessSandboxClient as wt, copyUntrackedIntoClone as x, createScopeAnalyst as xt, composeWorkerEvidence as y, assertTraceDerivedFindings as yt, graphDesignerExtraTools as z, readDeclaredCheck as zt };
|
|
9411
9474
|
|
|
9412
|
-
//# sourceMappingURL=runtime-
|
|
9475
|
+
//# sourceMappingURL=runtime-B-qPSZyM.js.map
|