@tangle-network/agent-runtime 0.189.0 → 0.191.0

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 (104) hide show
  1. package/dist/{activation-DuYIFVQm.js → activation-BpTEBhQR.js} +3 -3
  2. package/dist/{activation-DuYIFVQm.js.map → activation-BpTEBhQR.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +3 -3
  5. package/dist/{authoring-CIE6rF8N.js → authoring-DV0fkyxx.js} +7 -3
  6. package/dist/{authoring-CIE6rF8N.js.map → authoring-DV0fkyxx.js.map} +1 -1
  7. package/dist/candidate-execution/index.d.ts +3 -3
  8. package/dist/candidate-execution/index.js +5 -5
  9. package/dist/{candidate-execution-CQYU8E5a.js → candidate-execution-BSkZErxD.js} +255 -9
  10. package/dist/candidate-execution-BSkZErxD.js.map +1 -0
  11. package/dist/conversation.d.ts +1 -1
  12. package/dist/{coordination-driver-CtbyZv5d.js → coordination-driver-Bw0Prnim.js} +672 -39
  13. package/dist/coordination-driver-Bw0Prnim.js.map +1 -0
  14. package/dist/{durable-file-g3YdfEh4.js → durable-file-D24y9zg7.js} +2 -2
  15. package/dist/{durable-file-g3YdfEh4.js.map → durable-file-D24y9zg7.js.map} +1 -1
  16. package/dist/durable.d.ts +2 -2
  17. package/dist/durable.js +3 -3
  18. package/dist/{environment-provider-C4AQiUxj.d.ts → environment-provider-CJ43FJfJ.d.ts} +2 -2
  19. package/dist/{environment-provider-DZxuH3E4.js → environment-provider-DEwsolvi.js} +44 -7
  20. package/dist/environment-provider-DEwsolvi.js.map +1 -0
  21. package/dist/environment-provider.d.ts +1 -1
  22. package/dist/environment-provider.js +1 -1
  23. package/dist/{graph-DzkWh1BI.js → graph-BzsMtBYp.js} +6 -3
  24. package/dist/graph-BzsMtBYp.js.map +1 -0
  25. package/dist/graph.d.ts +3 -3
  26. package/dist/graph.js +5 -5
  27. package/dist/{redact-C9EWk1FT.d.ts → improve-Cbbt3jE6.d.ts} +4 -36
  28. package/dist/{improvement-cycle-DP9zf-IL.js → improvement-cycle-jC89uaRW.js} +7 -7
  29. package/dist/{improvement-cycle-DP9zf-IL.js.map → improvement-cycle-jC89uaRW.js.map} +1 -1
  30. package/dist/{index-k5bcID4t.d.ts → index-B2rVjcPT.d.ts} +417 -56
  31. package/dist/{index-DCqHTdmp.d.ts → index-CUosKU4N.d.ts} +144 -4
  32. package/dist/{index-DA9jKuJc.d.ts → index-OSRVFARy.d.ts} +2 -2
  33. package/dist/{index-tf6g2B27.d.ts → index-Y14IrBuB.d.ts} +4 -4
  34. package/dist/index.d.ts +11 -10
  35. package/dist/index.js +12 -13
  36. package/dist/index.js.map +1 -1
  37. package/dist/intelligence.d.ts +6 -5
  38. package/dist/intelligence.js +6 -7
  39. package/dist/intelligence.js.map +1 -1
  40. package/dist/kernel.d.ts +6 -6
  41. package/dist/kernel.js +12 -12
  42. package/dist/{knowledge-C5lODZQC.js → knowledge-BuXP5ynd.js} +5 -5
  43. package/dist/{knowledge-C5lODZQC.js.map → knowledge-BuXP5ynd.js.map} +1 -1
  44. package/dist/knowledge.d.ts +1 -1
  45. package/dist/knowledge.js +1 -1
  46. package/dist/{loop-runner-bin-BKsjoaVu.js → loop-runner-bin-B_Xh4jLi.js} +3 -3
  47. package/dist/{loop-runner-bin-BKsjoaVu.js.map → loop-runner-bin-B_Xh4jLi.js.map} +1 -1
  48. package/dist/{loop-runner-bin-ncN_8Msd.d.ts → loop-runner-bin-C2Yw-RBc.d.ts} +3 -3
  49. package/dist/loop-runner-bin.d.ts +1 -1
  50. package/dist/loop-runner-bin.js +1 -1
  51. package/dist/mcp/bin.js +3 -3
  52. package/dist/mcp/index.d.ts +4 -4
  53. package/dist/mcp/index.js +8 -8
  54. package/dist/mcp/memory-bin.js +1 -1
  55. package/dist/{memory-server-DsKOhzGf.js → memory-server-Crkevawz.js} +2 -2
  56. package/dist/{memory-server-DsKOhzGf.js.map → memory-server-Crkevawz.js.map} +1 -1
  57. package/dist/{openai-tools-x83CTnJM.js → openai-tools-Dqg8IhKd.js} +2 -2
  58. package/dist/{openai-tools-x83CTnJM.js.map → openai-tools-Dqg8IhKd.js.map} +1 -1
  59. package/dist/{prepare-BtXhV0qj.js → prepare-B5fJ7mLS.js} +239 -227
  60. package/dist/prepare-B5fJ7mLS.js.map +1 -0
  61. package/dist/primeintellect/index.d.ts +1 -1
  62. package/dist/primeintellect/index.js +1 -1
  63. package/dist/profiles.js +1 -1
  64. package/dist/{protected-model-port-DHrayPt4.js → protected-model-port-B0xFSAjt.js} +2 -2
  65. package/dist/{protected-model-port-DHrayPt4.js.map → protected-model-port-B0xFSAjt.js.map} +1 -1
  66. package/dist/{provision-supervisor-B-_4I1In.js → provision-supervisor-DAcTZDQG.js} +8 -8
  67. package/dist/{provision-supervisor-B-_4I1In.js.map → provision-supervisor-DAcTZDQG.js.map} +1 -1
  68. package/dist/{supervisor-BSNkaM2a.js → redact-BP8Xn2A3.js} +569 -12
  69. package/dist/redact-BP8Xn2A3.js.map +1 -0
  70. package/dist/{run-layout-Cd_l2XWV.js → run-layout-B8I_LXN-.js} +3 -3
  71. package/dist/{run-layout-Cd_l2XWV.js.map → run-layout-B8I_LXN-.js.map} +1 -1
  72. package/dist/{runtime-EQgE3942.d.ts → runtime-DI4mJNXI.d.ts} +202 -4
  73. package/dist/{runtime-C98JsP83.js → runtime-Dm63BrGY.js} +69 -25
  74. package/dist/{runtime-C98JsP83.js.map → runtime-Dm63BrGY.js.map} +1 -1
  75. package/dist/{spawn-journal-CxRa-NJ2.js → spawn-journal-B9eTmVAn.js} +2 -2
  76. package/dist/{spawn-journal-CxRa-NJ2.js.map → spawn-journal-B9eTmVAn.js.map} +1 -1
  77. package/dist/{stream-agent-turn-BomJ21AK.d.ts → stream-agent-turn-_GgUW49y.d.ts} +35 -3
  78. package/dist/{structural-rollout-C8sB6B4q.js → structural-rollout-ChpGSR0q.js} +3 -3
  79. package/dist/{structural-rollout-C8sB6B4q.js.map → structural-rollout-ChpGSR0q.js.map} +1 -1
  80. package/dist/{supervise-DSu4d0b6.js → supervise-B89x7rgF.js} +287 -23
  81. package/dist/supervise-B89x7rgF.js.map +1 -0
  82. package/dist/testing.d.ts +2 -2
  83. package/dist/testing.js +13 -13
  84. package/dist/{top-app-DIBApkt1.js → top-app-KgIFpD9H.js} +3 -3
  85. package/dist/{top-app-DIBApkt1.js.map → top-app-KgIFpD9H.js.map} +1 -1
  86. package/dist/tui/bin.js +1 -1
  87. package/dist/tui/index.d.ts +1 -1
  88. package/dist/tui/index.js +2 -2
  89. package/dist/{types-BbkiJR1D.d.ts → types-DKA_PDv0.d.ts} +62 -2
  90. package/dist/{util-BfoW6RU7.js → util-mCNUeboW.js} +21 -2
  91. package/dist/util-mCNUeboW.js.map +1 -0
  92. package/dist/{workspace-archive-SVeiWLNE.js → workspace-archive-yAPDklLV.js} +4 -4
  93. package/dist/{workspace-archive-SVeiWLNE.js.map → workspace-archive-yAPDklLV.js.map} +1 -1
  94. package/package.json +8 -8
  95. package/dist/candidate-execution-CQYU8E5a.js.map +0 -1
  96. package/dist/coordination-driver-CtbyZv5d.js.map +0 -1
  97. package/dist/environment-provider-DZxuH3E4.js.map +0 -1
  98. package/dist/graph-DzkWh1BI.js.map +0 -1
  99. package/dist/prepare-BtXhV0qj.js.map +0 -1
  100. package/dist/redact-D-u-rrcn.js +0 -82
  101. package/dist/redact-D-u-rrcn.js.map +0 -1
  102. package/dist/supervise-DSu4d0b6.js.map +0 -1
  103. package/dist/supervisor-BSNkaM2a.js.map +0 -1
  104. package/dist/util-BfoW6RU7.js.map +0 -1
@@ -1,30 +1,30 @@
1
1
  import { m as ValidationError, n as AnalystError, s as PlannerError } from "./errors-CDZ8XsVj.js";
2
2
  import "./stream-agent-turn-DWWe_7bh.js";
3
- import { i as InMemorySpawnJournal, r as InMemoryResultBlobStore, s as insideCursorNamespace, v as isTraceAnalysisStore, x as contentAddress } from "./spawn-journal-CxRa-NJ2.js";
4
- import { b as zeroSpend, c as isAbortError, d as randomSuffix, h as stringifySafe, i as cloneSpend, m as sleep, r as chargedTokens, s as hasCompleteCacheBreakdown, t as addSpend } from "./util-BfoW6RU7.js";
3
+ import { i as InMemorySpawnJournal, r as InMemoryResultBlobStore, s as insideCursorNamespace, v as isTraceAnalysisStore, x as contentAddress } from "./spawn-journal-B9eTmVAn.js";
4
+ import { b as zeroSpend, c as isAbortError, d as randomSuffix, h as stringifySafe, i as cloneSpend, m as sleep, r as chargedTokens, s as hasCompleteCacheBreakdown, t as addSpend } from "./util-mCNUeboW.js";
5
5
  import { i as writeAllBytes, n as parseCommittedJsonLines, r as prepareJsonlAppend, t as isNoEntError } from "./jsonl-file-CDfsCI5s.js";
6
6
  import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction--F3v1oo8.js";
7
7
  import { l as notifySandboxEventObserver } from "./sandbox-events-DWeQRWxg.js";
8
8
  import { n as executableAgentSpecSnapshot, t as executableAgentProfileSnapshot } from "./executable-spec-DxuiDFAU.js";
9
9
  import { c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, t as assertExecutableAgentProfile } from "./model-policy-Wf2MxXJ9.js";
10
- import { Bt as createSandboxLineage, G as rollingDispatch, Gt as routerBrain, Kt as runBrainLoop, Lt as defaultSelectWinner, Ut as assertBoxlessPromptOptions, Vt as probeSandboxCapabilities, Wt as readPromptOptions, at as createExecutor, ct as createWorktreeCliExecutor, f as withDriverExecutor, gt as createPushTraceSource, n as createSupervisor, ot as createExecutorRegistry, qt as canonicalObservedModel, y as settledToIteration, zt as runAgentRounds } from "./supervisor-BSNkaM2a.js";
11
- import "./environment-provider-DZxuH3E4.js";
10
+ import { Bt as defaultSelectWinner, Ht as runAgentRounds, J as rollingDispatch, Jt as routerBrain, Kt as assertBoxlessPromptOptions, S as settledToIteration, Ut as createSandboxLineage, Wt as probeSandboxCapabilities, Xt as canonicalObservedModel, Yt as runBrainLoop, a as createSupervisor, ct as createExecutor, dt as createWorktreeCliExecutor, h as withDriverExecutor, lt as createExecutorRegistry, qt as readPromptOptions, yt as createPushTraceSource } from "./redact-BP8Xn2A3.js";
11
+ import "./environment-provider-DEwsolvi.js";
12
12
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
13
- import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-C8sB6B4q.js";
14
- import "./coordination-driver-CtbyZv5d.js";
15
- import { ht as mapExecutorResult, mt as gateOnDeliverable, n as supervise } from "./supervise-DSu4d0b6.js";
16
- import "./run-layout-Cd_l2XWV.js";
17
- import "./provision-supervisor-B-_4I1In.js";
13
+ import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-ChpGSR0q.js";
14
+ import "./coordination-driver-Bw0Prnim.js";
15
+ import { n as supervise, vt as gateOnDeliverable, yt as mapExecutorResult } from "./supervise-B89x7rgF.js";
16
+ import "./run-layout-B8I_LXN-.js";
17
+ import "./provision-supervisor-DAcTZDQG.js";
18
18
  import { t as assertAuthoredCode } from "./authored-code-DzYtiflw.js";
19
- import "./authoring-CIE6rF8N.js";
20
- import "./graph-DzkWh1BI.js";
21
- import { agentProfileSchema, canonicalAgentProfileDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
22
- import { CODING_HARNESSES, DEFAULT_TRACE_ANALYST_KINDS, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
23
- import { heldoutSignificance, runProfileMatrix } from "@tangle-network/agent-eval/campaign";
19
+ import "./authoring-DV0fkyxx.js";
20
+ import "./graph-BzsMtBYp.js";
21
+ import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
22
+ 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";
24
23
  import { createHash, randomUUID } from "node:crypto";
25
- import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
26
- import { mkdir, readFile, realpath, writeFile } from "node:fs/promises";
27
24
  import { appendFileSync, chmodSync, constants, copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readlinkSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
25
+ import { mkdir, readFile, realpath, writeFile } from "node:fs/promises";
26
+ import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
27
+ import { heldoutSignificance, runProfileMatrix } from "@tangle-network/agent-eval/campaign";
28
28
  import { execFileSync, spawn, spawnSync } from "node:child_process";
29
29
  import { tmpdir } from "node:os";
30
30
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
@@ -4723,7 +4723,7 @@ function chatWorkerSeam(opts) {
4723
4723
  * THE GRANT CANNOT DRIFT FROM THE DOCS: `search` renders from `context.coordinationTools()`, the
4724
4724
  * same descriptor objects the verbs are served from — never prose written beside them.
4725
4725
  */
4726
- /** The seven coordination verbs callable in code, and the `context.verbs` member each maps to. */
4726
+ /** The coordination verbs callable in code, and the `context.verbs` member each maps to. */
4727
4727
  const CODE_CALLABLE_VERBS = {
4728
4728
  spawn_worker: "spawnAgent",
4729
4729
  await_event: "awaitEvent",
@@ -4731,7 +4731,9 @@ const CODE_CALLABLE_VERBS = {
4731
4731
  observe_agent: "observeAgent",
4732
4732
  list_questions: "listQuestions",
4733
4733
  answer_question: "answerQuestion",
4734
- run_analyst: "runAnalyst"
4734
+ run_analyst: "runAnalyst",
4735
+ read_journal: "readJournal",
4736
+ define_analyst: "defineAnalyst"
4735
4737
  };
4736
4738
  /** The manager's own lifecycle verbs — never callable from code; `search` names them and why. */
4737
4739
  const LIFECYCLE_VERBS = [
@@ -5482,18 +5484,60 @@ function analystsFromRegistry(registry, kinds = DEFAULT_TRACE_ANALYST_KINDS, opt
5482
5484
  const registered = new Set(registry.list().map((analyst) => analyst.id));
5483
5485
  const missing = kinds.map((kind) => kind.id).filter((id) => !registered.has(id));
5484
5486
  if (missing.length > 0) throw new ValidationError(`analystsFromRegistry: ${missing.map((id) => JSON.stringify(id)).join(", ")} ${missing.length === 1 ? "is" : "are"} not registered; the registry has ${[...registered].map((id) => JSON.stringify(id)).join(", ") || "<none>"}`);
5487
+ const adapted = kinds.map((kind) => ({
5488
+ id: kind.id,
5489
+ description: kind.description,
5490
+ area: kind.area
5491
+ }));
5492
+ const authoring = opts?.authoring;
5493
+ if (authoring !== void 0 && typeof registry.register !== "function") throw new ValidationError("analystsFromRegistry: `authoring` needs a registry with `register`; pass the agent-eval AnalystRegistry itself, not a read-only shim");
5494
+ const authoringRegistry = registry;
5485
5495
  return {
5486
- kinds: kinds.map((kind) => ({
5487
- id: kind.id,
5488
- description: kind.description,
5489
- area: kind.area
5490
- })),
5496
+ kinds: adapted,
5491
5497
  run: async (kindId, trace) => {
5492
5498
  return (await registry.run(`supervise-analyst-${kindId}-${randomUUID()}`, { traceStore: trace }, {
5493
5499
  ...opts?.runOpts,
5494
5500
  only: [kindId]
5495
5501
  })).findings;
5496
- }
5502
+ },
5503
+ ...authoring === void 0 ? {} : { register: (definition) => {
5504
+ const engine = authoring.resolveEngine(definition.model);
5505
+ const analyst = createTraceAnalyst(traceAnalystFromAuthored(definition), {
5506
+ engine,
5507
+ ...authoring.settlementTimeoutMs === void 0 ? {} : { settlementTimeoutMs: authoring.settlementTimeoutMs }
5508
+ });
5509
+ try {
5510
+ authoringRegistry.register(analyst);
5511
+ } catch (error) {
5512
+ throw new ValidationError(`the lens id ${JSON.stringify(definition.id)} is already registered for this run — analyst ids are shared by every manager in the tree, so pick a more specific id: ${error instanceof Error ? error.message : String(error)}`);
5513
+ }
5514
+ return {
5515
+ id: definition.id,
5516
+ description: definition.description,
5517
+ area: definition.area
5518
+ };
5519
+ } }
5520
+ };
5521
+ }
5522
+ /**
5523
+ * Map an authored definition onto the eval definition `createTraceAnalyst` compiles.
5524
+ *
5525
+ * The version is DERIVED from the definition's own canonical digest, never supplied by the manager.
5526
+ * That is what makes an invented lens reproducible: the same authored words always compile to the
5527
+ * same analyst version, two different wordings can never share one, and a finding's `analyst_id`
5528
+ * plus version names the exact text that produced it.
5529
+ */
5530
+ function traceAnalystFromAuthored(definition) {
5531
+ return {
5532
+ id: definition.id,
5533
+ description: definition.description,
5534
+ area: definition.area,
5535
+ version: `1.0.0+authored.${canonicalCandidateDigest(definition).slice(-12)}`,
5536
+ question: definition.question,
5537
+ instructions: definition.instructions,
5538
+ toolGroup: definition.toolGroup,
5539
+ ...definition.limits === void 0 ? {} : { limits: definition.limits },
5540
+ ...definition.minimumEvidenceCitations === void 0 ? {} : { minimumEvidenceCitations: definition.minimumEvidenceCitations }
5497
5541
  };
5498
5542
  }
5499
5543
  /** The default self-improvement LENS — authored content, not a code path. On each settled worker it hands
@@ -6296,4 +6340,4 @@ function tail(s) {
6296
6340
  //#endregion
6297
6341
  export { InMemoryCorpus as $, chatWorkerSeam as A, renderLeaderboardSvg as At, SandboxRunAbortError as B, mcpSecretEnvMetadataKey as Bt, withUntrackedArtifacts as C, deterministicCompletion as Ct, codeModeSupervisorTools as D, pairwiseSignificance as Dt, runCoderChecks as E, leaderboard as Et, selectChampion as F, connectStdioMcp as Ft, equalKOnCost as G, printBenchmarkReport as H, resolveSecretEnv as Ht, assertStrategyContract as I, materializeLocalMcp as It, runPersonified as J, trajectoryReport as K, authorStrategy as L, createMcpEnvironment as Lt, discriminatingMeans as M, auditIntent as Mt, pickChampion as N, defaultAuditorInstruction as Nt, unsafeInProcessRunner as O, renderLeaderboardHtml as Ot, runStrategyEvolution as P, McpSpawnFault as Pt, FileCorpus as Q, strategyAuthorContract as R, sanitizeMcpToolSchema as Rt, copyUntrackedIntoClone as S, completionAuthorizes as St, patchDelivered as T, stopSentinel as Tt, runBenchmark as U, secretEnvOfMcpServer as Ut, openSandboxRun as V, resolveMcpServerLaunch as Vt, promotionGate as W, createShapeRegistry as X, builtinShapes as Y, registerShape as Z, NOTE_MAX_CHARS as _, localSandboxClient as _t, localShell as a, pipeline as at, composeWorkerEvidence as b, loopDispatch as bt, createVerifierEnvironment as c, widen as ct, harvestSurfaceDiffs as d, createScopeAnalyst as dt, renderCorpusToInstructions as et, analystsFromRegistry as f, registryScopeAnalyst as ft, EVIDENCE_MAX_CHARS as g, resolveSandboxClient as gt, worktreeFanout as h, defineLeaderboard as ht, jjWorkspace as i, panel as it, createChatSessionStore as j, renderPairwiseMarkdown as jt, chatTransportExecutor as k, renderLeaderboardMarkdown as kt, boxSurfaceReader as l, assertTraceDerivedFindings as lt, superviseSurface as m, harvestCorpus as mt, makeFinding$1 as n, flatWidenGate as nt, runInWorkspace as o, selectValidWinner as ot, failuresAnalyst as p, inProcessSandboxClient as pt, definePersona as q, gitWorkspace as r, loopUntil as rt, createWaterfallCollector as s, verify as st, computeFindingId$1 as t, fanout as tt, fsSurfaceReader as u, buildSteerContext as ut, VERIFY_TAIL_CHARS as v, inlineSandboxClient as vt, analyzeTrace as w, sentinelCompletion as wt, settledWorkerOut as x, superviseDispatch as xt, closingWorkerNote as y, loopCampaignDispatch as yt, strategyAuthorSystemPrompt as z, envKeyProvider as zt };
6298
6342
 
6299
- //# sourceMappingURL=runtime-C98JsP83.js.map
6343
+ //# sourceMappingURL=runtime-Dm63BrGY.js.map