@tangle-network/agent-runtime 0.337.1 → 0.337.2

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.
Files changed (52) hide show
  1. package/dist/{activation-BgWVlVu2.js → activation-BDP6Eivv.js} +2 -2
  2. package/dist/{activation-BgWVlVu2.js.map → activation-BDP6Eivv.js.map} +1 -1
  3. package/dist/{activation-DMehb166.d.ts → activation-DRHM55Oo.d.ts} +2 -2
  4. package/dist/agent.d.ts +1 -1
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-Dg9a6qsm.js → coordination-driver-BHkFVqIq.js} +2 -2
  7. package/dist/{coordination-driver-Dg9a6qsm.js.map → coordination-driver-BHkFVqIq.js.map} +1 -1
  8. package/dist/{delegate-aC14Cww3.js → delegate-B-T_ZB50.js} +2 -2
  9. package/dist/{delegate-aC14Cww3.js.map → delegate-B-T_ZB50.js.map} +1 -1
  10. package/dist/durable.d.ts +1 -1
  11. package/dist/durable.js +3 -3
  12. package/dist/{graph-Cfx711ES.js → graph-C4RFlWAJ.js} +4 -4
  13. package/dist/{graph-Cfx711ES.js.map → graph-C4RFlWAJ.js.map} +1 -1
  14. package/dist/{improvement-cycle-DHKcb_YW.js → improvement-cycle-D1I4hQvf.js} +3 -3
  15. package/dist/{improvement-cycle-DHKcb_YW.js.map → improvement-cycle-D1I4hQvf.js.map} +1 -1
  16. package/dist/index.d.ts +4 -4
  17. package/dist/index.js +7 -7
  18. package/dist/intelligence.d.ts +2 -2
  19. package/dist/intelligence.js +3 -3
  20. package/dist/kernel.d.ts +1 -1
  21. package/dist/kernel.js +8 -8
  22. package/dist/{loop-runner-bin-B86AiPBf.d.ts → loop-runner-bin-DOuBIJ2O.d.ts} +2 -2
  23. package/dist/{loop-runner-bin-BSKBNC38.js → loop-runner-bin-Dv5QvYDH.js} +3 -3
  24. package/dist/{loop-runner-bin-BSKBNC38.js.map → loop-runner-bin-Dv5QvYDH.js.map} +1 -1
  25. package/dist/loop-runner-bin.d.ts +1 -1
  26. package/dist/loop-runner-bin.js +1 -1
  27. package/dist/mcp/bin.js +3 -3
  28. package/dist/mcp/index.d.ts +2 -2
  29. package/dist/mcp/index.js +4 -4
  30. package/dist/{openai-tools-DHO2QS1q.d.ts → openai-tools-Oxk4KQrY.d.ts} +2 -2
  31. package/dist/profiles.d.ts +1 -1
  32. package/dist/{provision-supervisor-72YFf-i_.js → provision-supervisor-DGegCUH4.js} +3 -3
  33. package/dist/{provision-supervisor-72YFf-i_.js.map → provision-supervisor-DGegCUH4.js.map} +1 -1
  34. package/dist/{runtime-qFLOq1R9.js → runtime-BOGpotnH.js} +9 -71
  35. package/dist/runtime-BOGpotnH.js.map +1 -0
  36. package/dist/{search-executor-CGxvizHh.js → search-executor-Cm1WZmL-.js} +3 -2
  37. package/dist/search-executor-Cm1WZmL-.js.map +1 -0
  38. package/dist/{server-_FldJ9Cl.js → server-hZWM-G8w.js} +3 -3
  39. package/dist/{server-_FldJ9Cl.js.map → server-hZWM-G8w.js.map} +1 -1
  40. package/dist/{supervise-H4BTN6uA.js → supervise-CvAKVfue.js} +3 -3
  41. package/dist/{supervise-H4BTN6uA.js.map → supervise-CvAKVfue.js.map} +1 -1
  42. package/dist/{supervisor-C27ne4yv.js → supervisor-Rz8AGpYb.js} +151 -65
  43. package/dist/supervisor-Rz8AGpYb.js.map +1 -0
  44. package/dist/testing.d.ts +1 -1
  45. package/dist/testing.js +12 -12
  46. package/dist/tui/index.d.ts +1 -1
  47. package/dist/tui/index.js +1 -1
  48. package/dist/{types-CupCBY-j.d.ts → types-Dl5L4r8Z.d.ts} +20 -8
  49. package/package.json +3 -3
  50. package/dist/runtime-qFLOq1R9.js.map +0 -1
  51. package/dist/search-executor-CGxvizHh.js.map +0 -1
  52. package/dist/supervisor-C27ne4yv.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-C27ne4yv.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, Wi as createSandboxTurnEventCollector, Xi as notifySandboxEventObserver, Y as coordinationProfileToolPrefix, aa as insideCursorNamespace, ct as mapExecutorResult, da as isTraceAnalysisStore, en as CheckUnavailableError, f as withDriverExecutor, ga as detachedSnapshot, gt as createWorktreeCliExecutor, ha as detachedFrozen, ia as InMemorySpawnJournal, kn as runBrainLoop, ma as contentAddress, mt as createExecutorRegistry, ot as rollingDispatch, pt as createExecutor, r as createSupervisor, ra as InMemoryResultBlobStore, st as gateOnDeliverable, un as verdictFromJudgeScore, xn as runAgentRounds, yn as defaultSelectWinner } from "./supervisor-Rz8AGpYb.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-CGxvizHh.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-Cm1WZmL-.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-QTkLe1Z6.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-Dg9a6qsm.js";
11
- import { r as supervise } from "./supervise-H4BTN6uA.js";
10
+ import { D as foldCoordinationRecords, w as createInMemoryRunContext } from "./coordination-driver-BHkFVqIq.js";
11
+ import { r as supervise } from "./supervise-CvAKVfue.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-72YFf-i_.js";
15
- import "./delegate-aC14Cww3.js";
16
- import "./graph-Cfx711ES.js";
14
+ import "./provision-supervisor-DGegCUH4.js";
15
+ import "./delegate-B-T_ZB50.js";
16
+ import "./graph-C4RFlWAJ.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";
@@ -6209,7 +6209,7 @@ async function openSandboxRun(client, options, deliverable) {
6209
6209
  ...error !== void 0 ? { error: errorMessage(error) } : {}
6210
6210
  });
6211
6211
  async function settle(box, events, turnIndex, turnKind) {
6212
- const collector = createTurnEventCollector();
6212
+ const collector = createSandboxTurnEventCollector();
6213
6213
  const outcomeTracker = createAgentRunOutcomeTracker();
6214
6214
  try {
6215
6215
  for await (const ev of events) {
@@ -6397,68 +6397,6 @@ function hashText(value) {
6397
6397
  }
6398
6398
  return (hash >>> 0).toString(16).padStart(8, "0");
6399
6399
  }
6400
- /**
6401
- * Collect one turn's events, keeping only the newest snapshot of each streamed text or
6402
- * reasoning part.
6403
- *
6404
- * opencode sends `message.part.updated` once per token, and every frame carries the part's
6405
- * whole cumulative text, so keeping every frame holds O(L²) bytes per turn: two concurrent
6406
- * audit workflows took the platform API from 459 MB to an OOM at 1.95 GB in 11 minutes.
6407
- * A snapshot (a frame whose part carries `text`) whose text extends the previous snapshot
6408
- * of the same part replaces it and moves to the newest position, which is the rule the
6409
- * Sandbox SDK's text collectors already apply, so the collected text is unchanged. The kept
6410
- * frame drops its `delta`, because its text already holds every earlier increment and a
6411
- * reader that joins `delta ?? part.text` across frames would otherwise read only the last
6412
- * one. Delta-only frames and every other event are kept as they arrived.
6413
- */
6414
- function createTurnEventCollector() {
6415
- const slots = [];
6416
- const snapshots = /* @__PURE__ */ new Map();
6417
- return {
6418
- push(event) {
6419
- const snapshot = partSnapshot(event);
6420
- if (!snapshot) {
6421
- slots.push(event);
6422
- return;
6423
- }
6424
- const previous = snapshots.get(snapshot.key);
6425
- const extends_ = previous !== void 0 && snapshot.text.startsWith(previous.text);
6426
- if (extends_) slots[previous.at] = void 0;
6427
- snapshots.set(snapshot.key, {
6428
- at: slots.length,
6429
- text: snapshot.text
6430
- });
6431
- slots.push(extends_ ? withoutDelta(event) : event);
6432
- },
6433
- events() {
6434
- return slots.filter((event) => event !== void 0);
6435
- }
6436
- };
6437
- }
6438
- function partSnapshot(event) {
6439
- if (event?.type !== "message.part.updated") return void 0;
6440
- const data = asRecord$1(event.data);
6441
- const part = asRecord$1(data?.part) ?? asRecord$1(asRecord$1(data?.properties)?.part);
6442
- if (!part || typeof part.id !== "string") return void 0;
6443
- if (part.type !== "text" && part.type !== "reasoning" && part.type !== "thinking") return void 0;
6444
- const text = typeof part.text === "string" ? part.text : typeof part.content === "string" ? part.content : void 0;
6445
- return text === void 0 ? void 0 : {
6446
- key: `${part.type}:${part.id}`,
6447
- text
6448
- };
6449
- }
6450
- function withoutDelta(event) {
6451
- const data = asRecord$1(event.data);
6452
- if (!data || !("delta" in data)) return event;
6453
- const { delta: _delta, ...rest } = data;
6454
- return {
6455
- ...event,
6456
- data: rest
6457
- };
6458
- }
6459
- function asRecord$1(value) {
6460
- return value !== null && typeof value === "object" ? value : void 0;
6461
- }
6462
6400
  //#endregion
6463
6401
  //#region src/runtime/authored-code.ts
6464
6402
  /**
@@ -9590,4 +9528,4 @@ function tail(s) {
9590
9528
  //#endregion
9591
9529
  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 };
9592
9530
 
9593
- //# sourceMappingURL=runtime-qFLOq1R9.js.map
9531
+ //# sourceMappingURL=runtime-BOGpotnH.js.map