@tangle-network/agent-eval 0.118.3 → 0.119.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +26 -0
  3. package/dist/analyst/index.d.ts +172 -59
  4. package/dist/analyst/index.js +50 -12
  5. package/dist/analyst/index.js.map +1 -1
  6. package/dist/benchmarks/index.d.ts +50 -40
  7. package/dist/benchmarks/index.js +8 -8
  8. package/dist/campaign/index.d.ts +258 -184
  9. package/dist/campaign/index.js +7 -7
  10. package/dist/{chunk-JTMFT5QZ.js → chunk-4I2E3LLO.js} +2 -2
  11. package/dist/{chunk-KK2O4VWA.js → chunk-D7AEXSM5.js} +2 -2
  12. package/dist/{chunk-MLHRFWQK.js → chunk-JHOJHHU7.js} +85 -16
  13. package/dist/chunk-JHOJHHU7.js.map +1 -0
  14. package/dist/{chunk-F5A4GDQW.js → chunk-JM2SKQMS.js} +3 -15
  15. package/dist/chunk-JM2SKQMS.js.map +1 -0
  16. package/dist/{chunk-EGNRE7VA.js → chunk-PAHNGS65.js} +2 -2
  17. package/dist/{chunk-QWRLW4CT.js → chunk-PSXJ32SR.js} +160 -6
  18. package/dist/chunk-PSXJ32SR.js.map +1 -0
  19. package/dist/{chunk-6QIM2EAP.js → chunk-PXD6ZFNY.js} +99 -1
  20. package/dist/chunk-PXD6ZFNY.js.map +1 -0
  21. package/dist/{chunk-267UCQWI.js → chunk-QWMPPZ3X.js} +3 -3
  22. package/dist/{chunk-267UCQWI.js.map → chunk-QWMPPZ3X.js.map} +1 -1
  23. package/dist/{chunk-VNLWDTDA.js → chunk-S5TT5R3L.js} +1010 -285
  24. package/dist/chunk-S5TT5R3L.js.map +1 -0
  25. package/dist/{chunk-ZYHJNKI3.js → chunk-ULOKLHIQ.js} +42 -5
  26. package/dist/chunk-ULOKLHIQ.js.map +1 -0
  27. package/dist/{chunk-FIUFRXP3.js → chunk-WW2A73HW.js} +49 -91
  28. package/dist/chunk-WW2A73HW.js.map +1 -0
  29. package/dist/{chunk-7V3QDWNL.js → chunk-XJ7JVCHB.js} +2 -2
  30. package/dist/{chunk-EKHHBKS6.js → chunk-XMBOU5W7.js} +48 -190
  31. package/dist/chunk-XMBOU5W7.js.map +1 -0
  32. package/dist/cli.js +2 -2
  33. package/dist/contract/index.d.ts +281 -175
  34. package/dist/contract/index.js +284 -8
  35. package/dist/contract/index.js.map +1 -1
  36. package/dist/fuzz.d.ts +19 -1
  37. package/dist/fuzz.js +1 -1
  38. package/dist/index.d.ts +223 -114
  39. package/dist/index.js +38 -37
  40. package/dist/index.js.map +1 -1
  41. package/dist/openapi.json +1 -1
  42. package/dist/primeintellect/index.d.ts +311 -0
  43. package/dist/primeintellect/index.js +348 -0
  44. package/dist/primeintellect/index.js.map +1 -0
  45. package/dist/rl.d.ts +4 -0
  46. package/dist/{run-campaign-DWC67KJP.js → run-campaign-OBXSN5WK.js} +3 -3
  47. package/dist/traces.d.ts +39 -25
  48. package/dist/traces.js +3 -5
  49. package/dist/wire/index.d.ts +19 -1
  50. package/dist/wire/index.js +2 -2
  51. package/docs/trace-analysis.md +6 -2
  52. package/package.json +7 -2
  53. package/dist/chunk-6QIM2EAP.js.map +0 -1
  54. package/dist/chunk-EKHHBKS6.js.map +0 -1
  55. package/dist/chunk-F5A4GDQW.js.map +0 -1
  56. package/dist/chunk-FIUFRXP3.js.map +0 -1
  57. package/dist/chunk-MLHRFWQK.js.map +0 -1
  58. package/dist/chunk-QWRLW4CT.js.map +0 -1
  59. package/dist/chunk-VNLWDTDA.js.map +0 -1
  60. package/dist/chunk-ZYHJNKI3.js.map +0 -1
  61. /package/dist/{chunk-JTMFT5QZ.js.map → chunk-4I2E3LLO.js.map} +0 -0
  62. /package/dist/{chunk-KK2O4VWA.js.map → chunk-D7AEXSM5.js.map} +0 -0
  63. /package/dist/{chunk-EGNRE7VA.js.map → chunk-PAHNGS65.js.map} +0 -0
  64. /package/dist/{chunk-7V3QDWNL.js.map → chunk-XJ7JVCHB.js.map} +0 -0
  65. /package/dist/{run-campaign-DWC67KJP.js.map → run-campaign-OBXSN5WK.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/primeintellect/index.ts"],"sourcesContent":["import { mkdir, writeFile } from 'node:fs/promises'\nimport { dirname, join } from 'node:path'\nimport { type RunRecord, validateRunRecord } from '../run-record'\n\nexport type PrimeIntellectJson =\n | null\n | boolean\n | number\n | string\n | PrimeIntellectJson[]\n | { [key: string]: PrimeIntellectJson }\n\nexport interface PrimeIntellectMessage {\n role: 'system' | 'user' | 'assistant' | 'tool'\n content: string\n}\n\nexport interface PrimeIntellectScenario {\n id: string\n prompt: string | readonly PrimeIntellectMessage[]\n answer?: string\n requiredSubstrings?: readonly string[]\n split?: string\n info?: Record<string, PrimeIntellectJson>\n}\n\nexport interface PrimeIntellectDatasetRow {\n id: string\n prompt: PrimeIntellectMessage[]\n answer?: string\n required_substrings?: string[]\n split?: string\n info: Record<string, PrimeIntellectJson>\n}\n\nexport type PrimeIntellectScenarioMap =\n | ReadonlyMap<string, PrimeIntellectScenario>\n | Record<string, PrimeIntellectScenario>\n | readonly PrimeIntellectScenario[]\n\nexport interface PrimeIntellectRowsFromRunRecordsOptions {\n records: readonly RunRecord[]\n scenarios: PrimeIntellectScenarioMap\n requireScorable?: boolean\n includeFailed?: boolean\n}\n\nexport interface PrimeIntellectEnvironmentPackageInput {\n name: string\n version?: string\n description?: string\n tags?: readonly string[]\n moduleName?: string\n rows: readonly PrimeIntellectDatasetRow[]\n runRecords?: readonly RunRecord[]\n systemPrompt?: string\n verifiersVersion?: string\n dependencies?: readonly string[]\n readme?: string\n}\n\nexport interface PrimeIntellectPackageFile {\n path: string\n content: string\n}\n\nexport interface PrimeIntellectPackageManifest {\n schemaVersion: 1\n name: string\n moduleName: string\n version: string\n rowCount: number\n runRecordCount: number\n artifactKinds: readonly ['environment', 'dataset', 'run_records']\n}\n\nexport interface PrimeIntellectEnvironmentPackage {\n files: PrimeIntellectPackageFile[]\n manifest: PrimeIntellectPackageManifest\n}\n\nexport class PrimeIntellectBridgeError extends Error {\n constructor(message: string) {\n super(message)\n this.name = 'PrimeIntellectBridgeError'\n }\n}\n\nexport function primeIntellectRowsFromRunRecords(\n options: PrimeIntellectRowsFromRunRecordsOptions,\n): PrimeIntellectDatasetRow[] {\n const scenarioById = normalizeScenarios(options.scenarios)\n const requireScorable = options.requireScorable ?? true\n const includeFailed = options.includeFailed ?? true\n const rows: PrimeIntellectDatasetRow[] = []\n\n for (const record of options.records) {\n const validRecord = validateRunRecord(record)\n if (!includeFailed && validRecord.failureMode) continue\n\n const scenarioId = validRecord.scenarioId\n if (!scenarioId) {\n throw new PrimeIntellectBridgeError(\n `RunRecord ${validRecord.runId} is missing scenarioId; PrimeIntellect rows need stable task ids`,\n )\n }\n\n const scenario = scenarioById.get(scenarioId)\n if (!scenario) {\n throw new PrimeIntellectBridgeError(\n `RunRecord ${validRecord.runId} references unknown scenarioId ${JSON.stringify(scenarioId)}`,\n )\n }\n\n const hasAnswer = typeof scenario.answer === 'string' && scenario.answer.trim().length > 0\n const hasRequiredSubstrings = (scenario.requiredSubstrings?.length ?? 0) > 0\n if (requireScorable && !hasAnswer && !hasRequiredSubstrings) {\n throw new PrimeIntellectBridgeError(\n `Scenario ${scenario.id} has no answer or requiredSubstrings; generated environments would always score 0`,\n )\n }\n\n const score = validRecord.outcome.holdoutScore ?? validRecord.outcome.searchScore ?? null\n const split = scenario.split ?? validRecord.splitTag\n const tangleInfo = {\n run_id: validRecord.runId,\n experiment_id: validRecord.experimentId,\n candidate_id: validRecord.candidateId,\n scenario_id: scenarioId,\n split,\n score,\n cost_usd: validRecord.costUsd,\n wall_ms: validRecord.wallMs,\n failure_mode: validRecord.failureMode ?? null,\n model: validRecord.model,\n commit_sha: validRecord.commitSha,\n } satisfies Record<string, PrimeIntellectJson>\n\n rows.push({\n id: `${scenarioId}:${validRecord.runId}`,\n prompt: normalizePrompt(scenario.prompt),\n ...(hasAnswer ? { answer: scenario.answer } : {}),\n ...(hasRequiredSubstrings\n ? { required_substrings: [...(scenario.requiredSubstrings ?? [])] }\n : {}),\n split,\n info: {\n ...(scenario.info ?? {}),\n tangle: tangleInfo,\n },\n })\n }\n\n return rows\n}\n\nexport function buildPrimeIntellectEnvironmentPackage(\n input: PrimeIntellectEnvironmentPackageInput,\n): PrimeIntellectEnvironmentPackage {\n if (input.rows.length === 0) {\n throw new PrimeIntellectBridgeError('cannot build a PrimeIntellect environment with zero rows')\n }\n\n for (const record of input.runRecords ?? []) {\n validateRunRecord(record)\n }\n\n const moduleName = input.moduleName ?? toPythonModuleName(input.name)\n if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(moduleName)) {\n throw new PrimeIntellectBridgeError(\n `moduleName ${JSON.stringify(moduleName)} is not a valid Python module name`,\n )\n }\n\n const version = input.version ?? '0.1.0'\n const description =\n input.description ?? 'PrimeIntellect Verifiers environment exported from Tangle runs.'\n const verifiersVersion = input.verifiersVersion ?? '>=0.2.0,<0.3.0'\n const dependencies = unique([\n 'datasets',\n `verifiers${verifiersVersion}`,\n ...(input.dependencies ?? []),\n ])\n const tags = unique(['tangle', 'agent-eval', ...(input.tags ?? [])])\n const manifest: PrimeIntellectPackageManifest = {\n schemaVersion: 1,\n name: input.name,\n moduleName,\n version,\n rowCount: input.rows.length,\n runRecordCount: input.runRecords?.length ?? 0,\n artifactKinds: ['environment', 'dataset', 'run_records'],\n }\n\n const files: PrimeIntellectPackageFile[] = [\n {\n path: 'pyproject.toml',\n content: renderPyproject({\n name: input.name,\n version,\n description,\n dependencies,\n tags,\n }),\n },\n {\n path: 'README.md',\n content: input.readme ?? renderReadme({ name: input.name, description }),\n },\n {\n path: `${moduleName}.py`,\n content: renderEnvironmentModule({\n systemPrompt: input.systemPrompt,\n }),\n },\n {\n path: 'data/dataset.jsonl',\n content: toJsonl(input.rows),\n },\n {\n path: 'data/run_records.jsonl',\n content: toJsonl(input.runRecords ?? []),\n },\n {\n path: 'tangle-primeintellect-manifest.json',\n content: `${stableJson(manifest)}\\n`,\n },\n ]\n\n return { files, manifest }\n}\n\nexport async function writePrimeIntellectEnvironmentPackage(\n root: string,\n input: PrimeIntellectEnvironmentPackageInput,\n): Promise<PrimeIntellectEnvironmentPackage> {\n const pkg = buildPrimeIntellectEnvironmentPackage(input)\n await Promise.all(\n pkg.files.map(async (file) => {\n const target = join(root, file.path)\n await mkdir(dirname(target), { recursive: true })\n await writeFile(target, file.content, 'utf8')\n }),\n )\n return pkg\n}\n\nfunction normalizeScenarios(\n scenarios: PrimeIntellectScenarioMap,\n): Map<string, PrimeIntellectScenario> {\n const map = new Map<string, PrimeIntellectScenario>()\n if (scenarios instanceof Map) {\n for (const [id, scenario] of scenarios.entries()) {\n map.set(id, { ...scenario, id: scenario.id ?? id })\n }\n return map\n }\n\n const values = Array.isArray(scenarios) ? scenarios : Object.values(scenarios)\n for (const scenario of values) {\n if (!scenario.id) {\n throw new PrimeIntellectBridgeError('every PrimeIntellect scenario needs an id')\n }\n if (map.has(scenario.id)) {\n throw new PrimeIntellectBridgeError(`duplicate PrimeIntellect scenario id ${scenario.id}`)\n }\n map.set(scenario.id, scenario)\n }\n return map\n}\n\nfunction normalizePrompt(\n prompt: string | readonly PrimeIntellectMessage[],\n): PrimeIntellectMessage[] {\n if (typeof prompt === 'string') {\n return [{ role: 'user', content: prompt }]\n }\n return prompt.map((message) => ({ role: message.role, content: message.content }))\n}\n\nfunction toPythonModuleName(name: string): string {\n return name\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9_]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/^[0-9]/, '_$&')\n}\n\nfunction unique(values: readonly string[]): string[] {\n return [...new Set(values)]\n}\n\nfunction toJsonl(values: readonly unknown[]): string {\n if (values.length === 0) return ''\n return `${values.map((value) => stableJson(value)).join('\\n')}\\n`\n}\n\nfunction stableJson(value: unknown): string {\n return JSON.stringify(sortJson(value))\n}\n\nfunction sortJson(value: unknown): unknown {\n if (Array.isArray(value)) return value.map(sortJson)\n if (value === null || typeof value !== 'object') return value\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>)\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([key, nested]) => [key, sortJson(nested)]),\n )\n}\n\nfunction renderPyproject(input: {\n name: string\n version: string\n description: string\n dependencies: readonly string[]\n tags: readonly string[]\n}): string {\n return `[project]\nname = ${tomlString(input.name)}\nversion = ${tomlString(input.version)}\ndescription = ${tomlString(input.description)}\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\nlicense = \"MIT\"\nkeywords = ${tomlArray(input.tags)}\ndependencies = ${tomlArray(input.dependencies)}\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[tool.hatch.build]\ninclude = [\"*.py\", \"README.md\", \"data/*.jsonl\", \"tangle-primeintellect-manifest.json\"]\n\n[tool.uv]\nprerelease = \"allow\"\n\n[tool.verifiers.eval]\nnum_examples = 5\nrollouts_per_example = 3\n`\n}\n\nfunction renderReadme(input: { name: string; description: string }): string {\n return `# ${input.name}\n\n${input.description}\n\nGenerated by \\`@tangle-network/agent-eval/primeintellect\\` from validated Tangle \\`RunRecord\\` rows.\n\n## Files\n\n- \\`data/dataset.jsonl\\`: prompts and scoring references for PrimeIntellect Verifiers.\n- \\`data/run_records.jsonl\\`: original Tangle run rows for provenance and analysis.\n- \\`tangle-primeintellect-manifest.json\\`: export metadata.\n\n## Local check\n\n\\`\\`\\`sh\nuv pip install --prerelease=allow -e .\nuv run vf-eval ${input.name}\n\\`\\`\\`\n\n## Upload\n\n\\`\\`\\`sh\nprime login\nprime env push\n\\`\\`\\`\n`\n}\n\nfunction renderEnvironmentModule(input: { systemPrompt?: string }): string {\n const systemPrompt = input.systemPrompt === undefined ? 'None' : pyString(input.systemPrompt)\n return `import json\nimport re\nfrom pathlib import Path\n\nfrom datasets import Dataset\nimport verifiers as vf\n\n\nDATA_PATH = Path(__file__).parent / \"data\" / \"dataset.jsonl\"\nDEFAULT_SYSTEM_PROMPT = ${systemPrompt}\n\n\ndef _load_rows(dataset_path=None, dataset_split=None):\n path = Path(dataset_path) if dataset_path is not None else DATA_PATH\n rows = []\n with path.open(\"r\", encoding=\"utf-8\") as handle:\n for line in handle:\n row = json.loads(line)\n if dataset_split is None or row.get(\"split\") == dataset_split:\n rows.append(row)\n if not rows:\n raise ValueError(f\"No dataset rows found in {path} for split={dataset_split!r}\")\n return rows\n\n\ndef _message_text(message):\n if isinstance(message, dict):\n content = message.get(\"content\", \"\")\n else:\n content = getattr(message, \"content\", \"\")\n if isinstance(content, list):\n return \" \".join(\n str(part.get(\"text\", part)) if isinstance(part, dict) else str(part)\n for part in content\n )\n return str(content)\n\n\ndef _completion_text(completion):\n if isinstance(completion, str):\n return completion\n if isinstance(completion, list):\n return \"\\\\n\".join(_message_text(message) for message in completion)\n return _message_text(completion)\n\n\ndef _normalize(text):\n return re.sub(r\"\\\\s+\", \" \", str(text).strip().lower())\n\n\nasync def tangle_reward(completion, answer=None, required_substrings=None, **kwargs):\n response = _normalize(_completion_text(completion))\n scores = []\n if answer:\n expected = _normalize(answer)\n scores.append(1.0 if expected == response or expected in response else 0.0)\n if required_substrings:\n required = [_normalize(item) for item in required_substrings]\n hits = sum(1 for item in required if item and item in response)\n scores.append(hits / len(required))\n return max(scores) if scores else 0.0\n\n\ndef build_dataset(dataset_path=None, dataset_split=None):\n return Dataset.from_list(_load_rows(dataset_path=dataset_path, dataset_split=dataset_split))\n\n\ndef load_environment(dataset_path=None, dataset_split=None, system_prompt=DEFAULT_SYSTEM_PROMPT):\n rubric = vf.Rubric(funcs=[tangle_reward])\n return vf.SingleTurnEnv(\n dataset=lambda: build_dataset(dataset_path=dataset_path, dataset_split=dataset_split),\n system_prompt=system_prompt,\n rubric=rubric,\n )\n`\n}\n\nfunction tomlString(value: string): string {\n return JSON.stringify(value)\n}\n\nfunction tomlArray(values: readonly string[]): string {\n return `[${values.map(tomlString).join(', ')}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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkEtC;AAEA,SAAS,WAAW,OAAuB;AACzC,SAAO,KAAK,UAAU,KAAK;AAC7B;AAEA,SAAS,UAAU,QAAmC;AACpD,SAAO,IAAI,OAAO,IAAI,UAAU,EAAE,KAAK,IAAI,CAAC;AAC9C;AAEA,SAAS,SAAS,OAAuB;AACvC,SAAO,KAAK,UAAU,KAAK;AAC7B;","names":[]}
package/dist/rl.d.ts CHANGED
@@ -2384,7 +2384,9 @@ interface ChannelRollup {
2384
2384
  calls: number;
2385
2385
  inputTokens: number;
2386
2386
  outputTokens: number;
2387
+ reasoningTokens?: number;
2387
2388
  cachedTokens: number;
2389
+ cacheWriteTokens?: number;
2388
2390
  costUsd: number;
2389
2391
  unpricedCalls: number;
2390
2392
  unknownUsageCalls: number;
@@ -2396,7 +2398,9 @@ interface CostLedgerSummary {
2396
2398
  reservedCostUsd: number;
2397
2399
  inputTokens: number;
2398
2400
  outputTokens: number;
2401
+ reasoningTokens?: number;
2399
2402
  cachedTokens: number;
2403
+ cacheWriteTokens?: number;
2400
2404
  totalCostUsd: number;
2401
2405
  byChannel: ChannelRollup[];
2402
2406
  unpricedModels: string[];
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  planCampaignRun,
3
3
  runCampaign
4
- } from "./chunk-EGNRE7VA.js";
4
+ } from "./chunk-PAHNGS65.js";
5
5
  import "./chunk-PJQFMIOX.js";
6
- import "./chunk-MLHRFWQK.js";
6
+ import "./chunk-JHOJHHU7.js";
7
7
  import "./chunk-VI2UW6B6.js";
8
8
  import "./chunk-ONWEPEDO.js";
9
9
  import "./chunk-PZ5AY32C.js";
@@ -11,4 +11,4 @@ export {
11
11
  planCampaignRun,
12
12
  runCampaign
13
13
  };
14
- //# sourceMappingURL=run-campaign-DWC67KJP.js.map
14
+ //# sourceMappingURL=run-campaign-OBXSN5WK.js.map
package/dist/traces.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AxAIService, AxFunction } from '@ax-llm/ax';
1
+ import { AxAIService, AxAgentActorTurnCallbackArgs, AxFunction } from '@ax-llm/ax';
2
2
 
3
3
  /**
4
4
  * Error taxonomy for `@tangle-network/agent-eval`.
@@ -1726,11 +1726,11 @@ interface AnalyzeTracesInput {
1726
1726
  question: string;
1727
1727
  }
1728
1728
  interface AnalyzeTracesResult {
1729
- /** The responder's prose answer. */
1729
+ /** The actor's submitted prose answer. */
1730
1730
  answer: string;
1731
- /** Bulleted findings extracted from the responder's structured output. */
1731
+ /** Bulleted findings from the actor's structured completion. */
1732
1732
  findings: string[];
1733
- /** Per-actor-turn snapshots captured via `actorTurnCallback`. */
1733
+ /** Per-turn snapshots captured via `actorTurnCallback`. */
1734
1734
  turns: AnalyzeTracesTurnSnapshot[];
1735
1735
  /** Total turns the actor took. */
1736
1736
  turnCount: number;
@@ -1756,13 +1756,14 @@ interface TraceAnalystChatMessage {
1756
1756
  [key: string]: unknown;
1757
1757
  }
1758
1758
  interface AnalyzeTracesTurnSnapshot {
1759
+ stage: AxAgentActorTurnCallbackArgs['stage'];
1759
1760
  turn: number;
1760
1761
  isError: boolean;
1761
1762
  /** The JS code the actor produced for this turn. */
1762
1763
  code: string;
1763
1764
  /** The formatted action-log entry the actor sees on the next turn. */
1764
1765
  output: string;
1765
- /** Provider thought (when `actorOptions.showThoughts` is true and the
1766
+ /** Provider thought (when `executorOptions.showThoughts` is true and the
1766
1767
  * provider returns it). */
1767
1768
  thought?: string;
1768
1769
  }
@@ -1771,18 +1772,18 @@ interface AnalyzeTracesOptions {
1771
1772
  source: string | TraceAnalysisStore;
1772
1773
  /** Caller-provided AxAIService. */
1773
1774
  ai: AxAIService;
1774
- /** Model id forwarded to actor + responder. */
1775
+ /** Model id forwarded to the actor. */
1775
1776
  model?: string;
1776
- /** Recursion depth. 0 = no sub-agent dispatch. Default 1. */
1777
- maxDepth?: number;
1777
+ /** Maximum model subqueries. 0 disables model fan-out. Default 4. */
1778
+ maxSubqueries?: number;
1778
1779
  /** Maximum actor turns. Default 12. */
1779
1780
  maxTurns?: number;
1780
- /** Maximum parallel sub-agent calls in batched llmQuery. Default 2. */
1781
- maxParallelSubagents?: number;
1781
+ /** Maximum parallel model subqueries. Default 2. */
1782
+ maxParallelSubqueries?: number;
1783
+ /** Cancels in-flight model and tool work. */
1784
+ signal?: AbortSignal;
1782
1785
  /** Override the actor description. */
1783
1786
  actorDescription?: string;
1784
- /** Override the subagent description. */
1785
- subagentDescription?: string;
1786
1787
  /** Per-turn observability hook. */
1787
1788
  onTurn?: (turn: AnalyzeTracesTurnSnapshot) => void | Promise<void>;
1788
1789
  /** Override max runtime characters per turn. Default 6000. */
@@ -1790,8 +1791,7 @@ interface AnalyzeTracesOptions {
1790
1791
  /** When set, every turn's snapshot is appended to this JSONL file
1791
1792
  * immediately. If the analyst crashes mid-loop (provider 503,
1792
1793
  * network error, validator reject) the partial reasoning is still
1793
- * on disk. Replay the file with the responder afterward to recover
1794
- * evidence. */
1794
+ * on disk for diagnosis and recovery. */
1795
1795
  progressLogPath?: string;
1796
1796
  }
1797
1797
  /**
@@ -2043,7 +2043,8 @@ declare function firstStringAttr(attrs: Record<string, unknown>, keys: readonly
2043
2043
  * `otlpToRunRecords` — fold an OTLP traces.jsonl (one OTLP span per line;
2044
2044
  * the form AppWorld / HALO emit via their OpenInference OTLP exporter, the
2045
2045
  * same shape `flattenOtlpExportToNdjson` produces) into validated
2046
- * `RunRecord[]` — one record per `trace_id` (one trace == one task).
2046
+ * `RunRecord[]` — one record per `trace_id` by default, or per caller-defined
2047
+ * logical run when one task is fragmented across multiple OTLP traces.
2047
2048
  *
2048
2049
  * This is the offline ingestion primitive the AppWorld proposer bench and the
2049
2050
  * hosted Intelligence product both stand on: traces in, paper-grade rows
@@ -2106,17 +2107,28 @@ interface OtlpToRunRecordsOptions {
2106
2107
  */
2107
2108
  priceUsdPerToken?: number;
2108
2109
  /**
2109
- * Score for a trace's outcome (AppWorld `world.evaluate()` TGC/SGC, or
2110
- * any [0,1] task-success signal). Keyed by `trace_id`; falls through to
2110
+ * Map each OTLP `trace_id` to the logical run it belongs to. Use this when a
2111
+ * provider emits several traces for one task attempt. All mapped traces are
2112
+ * aggregated into one record; duplicate span ids remain isolated by their
2113
+ * source trace. The callback must return a non-empty id for every trace.
2114
+ *
2115
+ * When omitted, every `trace_id` remains an independent run.
2116
+ */
2117
+ logicalRunIdForTrace?: (traceId: string) => string;
2118
+ /**
2119
+ * Score for a produced run's outcome (AppWorld `world.evaluate()` →
2120
+ * TGC/SGC, or
2121
+ * any [0,1] task-success signal). Keyed by the logical run id when
2122
+ * `logicalRunIdForTrace` is supplied, otherwise by `trace_id`; falls through to
2111
2123
  * the error-derived default (1 = no error span, 0 = had one) when the map
2112
2124
  * has no entry or the function returns undefined.
2113
2125
  */
2114
- scoreForTrace?: (traceId: string, span: TraceAggregate) => number | undefined;
2126
+ scoreForTrace?: (runId: string, span: TraceAggregate) => number | undefined;
2115
2127
  /**
2116
2128
  * Per-record judge metadata when an external judge produced the score.
2117
- * Keyed by `trace_id`.
2129
+ * Keyed by the logical run id when supplied, otherwise by `trace_id`.
2118
2130
  */
2119
- judgeMetadataForTrace?: (traceId: string) => RunRecord['judgeMetadata'] | undefined;
2131
+ judgeMetadataForTrace?: (runId: string) => RunRecord['judgeMetadata'] | undefined;
2120
2132
  }
2121
2133
  /** A `RunRecord` plus the verbatim prompt/completion text when the trace's
2122
2134
  * LLM spans exposed it. The text is NOT on the validated `RunRecord`
@@ -2132,6 +2144,10 @@ interface OtlpTraceRunRecord {
2132
2144
  /** Per-trace rollup the score callback can inspect. */
2133
2145
  interface TraceAggregate {
2134
2146
  traceId: string;
2147
+ /** Number of source OTLP traces folded into this run. */
2148
+ sourceTraceCount: number;
2149
+ /** Source OTLP trace ids folded into this run, sorted for deterministic audit output. */
2150
+ sourceTraceIds: readonly string[];
2135
2151
  spanCount: number;
2136
2152
  llmSpanCount: number;
2137
2153
  toolSpanCount: number;
@@ -2163,10 +2179,8 @@ declare function otlpToTraceRunRecords(otlpJsonl: string, opts: OtlpToRunRecords
2163
2179
  declare function otlpRowsToTraceRunRecords(rows: Iterable<object>, opts: OtlpToRunRecordsOptions): OtlpTraceRunRecord[];
2164
2180
 
2165
2181
  /** Ax RLM prompt for bounded trace discovery and evidence-backed analysis. */
2166
- declare const TRACE_ANALYST_ACTOR_DESCRIPTION = "You answer questions about an OTLP-shaped JSONL trace dataset using the trace tools provided in the `traces` namespace.\n\nDISCOVERY \u2192 NARROW \u2192 DEEP-READ protocol \u2014 follow exactly:\n\n1. ALWAYS call `traces.getDatasetOverview({})` FIRST without a regex_pattern. The result tells you total_traces, raw_jsonl_bytes, services, agents, models, and sample_trace_ids (real ids \u2014 never fabricate one).\n\n2. Use raw_jsonl_bytes to gauge how expensive raw scans will be. `filters.regex_pattern` is the one scan-heavy filter on getDatasetOverview / queryTraces / countTraces \u2014 narrow with indexed fields (has_errors, model_names, service_names, agent_names, time bounds) BEFORE adding a regex on a large dataset.\n\n3. To list more traces than the sample, call `traces.queryTraces({ filters?, limit, offset? })`. Each summary carries raw_jsonl_bytes \u2014 use it to choose between viewTrace and searchTrace BEFORE calling either.\n\n4. Per-trace inspection:\n - SMALL trace (raw_jsonl_bytes well under 150_000): call `traces.viewTrace({ trace_id })`. Returns all spans. Per-attribute payloads are head-capped at ~4KB; large `input.value` / `output.value` / `llm.input_messages` will show a `[trace-analyst truncated: N bytes]` marker.\n - LARGE trace (raw_jsonl_bytes near or above 150_000, or you saw an `oversized` response): use `traces.searchTrace({ trace_id, regex_pattern })` to get bounded SpanMatchRecords (span metadata + matched text + surrounding context). Then call `traces.viewSpans({ trace_id, span_ids: [...] })` for surgical reads (~16KB cap, 4\u00D7 higher than discovery), or `traces.searchSpan({ trace_id, span_id, regex_pattern })` for one large span. Stays bounded regardless of trace size.\n - Useful regex patterns: `STATUS_CODE_ERROR` (failures), tool names like `grep` or `view_trace`, error strings like `MaxTurnsExceeded`, model names, attribute keys.\n\n5. ONLY call viewTrace / viewSpans / searchTrace / searchSpan with trace/span ids you have already seen in sample_trace_ids, a queryTraces page, or a previous search result. Never invent ids.\n\n5a. **Result-shape contract** \u2014 searchTrace and searchSpan return `{ trace_id, hits, total_matches, has_more }`. Iterate `result.hits` (NOT result.matches). Each hit has `{ span_id, span_name, span_kind, attribute_path, matched_text, context_before, context_after, match_offset }`. viewTrace returns `{ trace_id, spans }` (or `oversized`). viewSpans returns `{ trace_id, spans, missing_span_ids, truncated_attribute_count }`. Never assume a field name \u2014 log the result shape first if unsure.\n\n6. If viewTrace returns an `oversized` summary instead of `spans`, DO NOT retry the same call. Read the summary's top_span_names, span_count, span_response_bytes_max, error_span_count to plan a follow-up: switch to searchTrace (or searchSpan for one large span), then viewSpans on a smaller, surgical span_ids set.\n\n7. If searchTrace or searchSpan returns has_more=true, REFINE the regex to be more specific rather than blindly raising max_matches.\n\n8. If a tool errors (invalid regex, range error), STOP and reconsider \u2014 don't retry with a guessed id or argument. Use the discovery tools above to recover.\n\n9. If a ~4KB-truncated payload from viewTrace / searchTrace matters for your answer, first try viewSpans on that span id (~16KB cap). If a 16KB-truncated payload from viewSpans still matters, narrow further with searchSpan against a more specific regex rather than asking for the full payload again.\n\n10. If maxDepth > 0 and the question splits into independent semantic branches, delegate well-defined subtasks to subagents using `await llmQuery(...)`. Pass narrow context and a focused query. Examples:\n\n const reviews = await llmQuery([\n { query: 'Drill into trace abc123 \u2014 what tool calls preceded the failure?', context: { trace_id: 'abc123' } },\n { query: 'Drill into trace def456 \u2014 same failure mode?', context: { trace_id: 'def456' } },\n ]);\n\nOBSERVABILITY rules:\n- Each non-final actor turn must emit at least one `console.log(...)` for evidence. Up to 3 logs per turn is fine when correlating multiple data sources (e.g. one log for findings list, one for source-file content, one for derived analysis).\n- Do NOT combine `console.log` with `final(...)` or `askClarification(...)` in the same turn \u2014 finish gathering data first, then call final on its own turn.\n- Reuse runtime variables across turns; don't recompute.\n- When done, call `await final(answer)` with the fully-formed report. The responder rewrites the answer into output fields; if you only pass a vague summary string the responder has nothing concrete to format.\n\nCRITICAL \u2014 `final()` payload contract for evidence-grounded analysis tasks:\n- Pass a STRUCTURED object as the second arg with the actual data the responder needs to format the answer. Do NOT pass abstract instructions; pass evidence.\n- Example for per-item verdict tasks:\n ```js\n await final(\"Format the per-item verdict report from the evidence below.\", {\n findings: [\n { id: 'sub-1-finding-1', claim: '...', verdict: 'TRUE-POSITIVE', evidence: 'lines 42-45 of contracts/X.sol show ...' },\n ...all items\n ],\n systemic_summary: '3 sentences I wrote based on the evidence above'\n });\n ```\n- Calling `final(\"answer\", {})` with no evidence is a failure mode \u2014 the responder will hallucinate or echo back the field names. Always include the gathered data.\n- Premature final after a single viewSpans call is INSUFFICIENT for per-finding analysis tasks. Read the requested attributes (e.g. `spans[i].attributes['redteam.finding.title']`), and for each one perform the requested cross-reference (e.g. read the source SPAN's `attributes['source.content']`).\n\nOUTPUT contract \u2014 your final answer must include:\n- A clear prose conclusion answering the user's question.\n- Trace ids and span ids cited as evidence for each claim.\n- Failure modes named in the user's domain language, with frequency and concrete examples.\n\nDo NOT invent trace ids, span ids, error messages, or model names. Every fact must be traceable to a tool result.";
2167
- declare const TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION = "trace-analyst-actor-v5-2026-05-06";
2168
- /** Subagent prompt for focused trace-inspection subtasks. */
2169
- declare const TRACE_ANALYST_SUBAGENT_DESCRIPTION = "You are a trace-analyst subagent. Your parent has delegated a focused trace-inspection question. Use the same DISCOVERY \u2192 NARROW \u2192 DEEP-READ protocol but stay tightly scoped: do exactly what was asked, return a concise compact answer, do NOT spawn further subagents unless the parent's question is genuinely multi-branch.\n\nCite trace ids and span ids for every claim. Do NOT invent ids.";
2182
+ declare const TRACE_ANALYST_ACTOR_DESCRIPTION = "You answer questions about an OTLP-shaped JSONL trace dataset using the trace tools provided in the `traces` namespace.\n\nDISCOVERY \u2192 NARROW \u2192 DEEP-READ protocol \u2014 follow exactly:\n\n1. ALWAYS call `traces.getDatasetOverview({})` FIRST without a regex_pattern. The result tells you total_traces, raw_jsonl_bytes, services, agents, models, and sample_trace_ids (real ids \u2014 never fabricate one).\n\n2. Use raw_jsonl_bytes to gauge how expensive raw scans will be. `filters.regex_pattern` is the one scan-heavy filter on getDatasetOverview / queryTraces / countTraces \u2014 narrow with indexed fields (has_errors, model_names, service_names, agent_names, time bounds) BEFORE adding a regex on a large dataset.\n\n3. To list more traces than the sample, call `traces.queryTraces({ filters?, limit, offset? })`. Each summary carries raw_jsonl_bytes \u2014 use it to choose between viewTrace and searchTrace BEFORE calling either.\n\n4. Per-trace inspection:\n - SMALL trace (raw_jsonl_bytes well under 150_000): call `traces.viewTrace({ trace_id })`. Returns all spans. Per-attribute payloads are head-capped at ~4KB; large `input.value` / `output.value` / `llm.input_messages` will show a `[trace-analyst truncated: N bytes]` marker.\n - LARGE trace (raw_jsonl_bytes near or above 150_000, or you saw an `oversized` response): use `traces.searchTrace({ trace_id, regex_pattern })` to get bounded SpanMatchRecords (span metadata + matched text + surrounding context). Then call `traces.viewSpans({ trace_id, span_ids: [...] })` for surgical reads (~16KB cap, 4\u00D7 higher than discovery), or `traces.searchSpan({ trace_id, span_id, regex_pattern })` for one large span. Stays bounded regardless of trace size.\n - Useful regex patterns: `STATUS_CODE_ERROR` (failures), tool names like `grep` or `view_trace`, error strings like `MaxTurnsExceeded`, model names, attribute keys.\n\n5. ONLY call viewTrace / viewSpans / searchTrace / searchSpan with trace/span ids you have already seen in sample_trace_ids, a queryTraces page, or a previous search result. Never invent ids.\n\n5a. **Result-shape contract** \u2014 searchTrace and searchSpan return `{ trace_id, hits, total_matches, has_more }`. Iterate `result.hits` (NOT result.matches). Each hit has `{ span_id, span_name, span_kind, attribute_path, matched_text, context_before, context_after, match_offset }`. viewTrace returns `{ trace_id, spans }` (or `oversized`). viewSpans returns `{ trace_id, spans, missing_span_ids, truncated_attribute_count }`. Never assume a field name \u2014 log the result shape first if unsure.\n\n6. If viewTrace returns an `oversized` summary instead of `spans`, DO NOT retry the same call. Read the summary's top_span_names, span_count, span_response_bytes_max, error_span_count to plan a follow-up: switch to searchTrace (or searchSpan for one large span), then viewSpans on a smaller, surgical span_ids set.\n\n7. If searchTrace or searchSpan returns has_more=true, REFINE the regex to be more specific rather than blindly raising max_matches.\n\n8. If a tool errors (invalid regex, range error), STOP and reconsider \u2014 don't retry with a guessed id or argument. Use the discovery tools above to recover.\n\n9. If a ~4KB-truncated payload from viewTrace / searchTrace matters for your answer, first try viewSpans on that span id (~16KB cap). If a 16KB-truncated payload from viewSpans still matters, narrow further with searchSpan against a more specific regex rather than asking for the full payload again.\n\n10. If the question splits into independent reasoning branches, use bounded `llmQuery(...)` calls over evidence you already loaded. Subqueries cannot inspect the trace store, so pass the exact trace excerpts they need. Example:\n\n const reviews = await llmQuery([\n { query: 'Classify the failure mechanism in this excerpt.', context: traceAbcExcerpt },\n { query: 'Classify the failure mechanism in this excerpt.', context: traceDefExcerpt },\n ]);\n\nOBSERVABILITY rules:\n- Each discovery turn must emit at least one concise `console.log(...)` showing what evidence was learned.\n- Finish gathering evidence before submitting the analysis.\n- Reuse runtime variables across turns; don't recompute.\n\nOUTPUT contract \u2014 your final answer must include:\n- A clear prose conclusion answering the user's question.\n- Trace ids and span ids cited as evidence for each claim.\n- Failure modes named in the user's domain language, with frequency and concrete examples.\n- A concise findings array containing only claims supported by inspected evidence.\n\nDo NOT invent trace ids, span ids, error messages, or model names. Every fact must be traceable to a tool result.";
2183
+ declare const TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION = "trace-analyst-actor-v6-2026-07-14";
2170
2184
 
2171
2185
  /**
2172
2186
  * `OtlpFileTraceStore` — read-only OTLP-JSONL trace store for the
@@ -2326,4 +2340,4 @@ declare function traceAnalystFunctionGroup(opts: BuildTraceAnalystToolsOpts): {
2326
2340
  functions: AxFunction[];
2327
2341
  };
2328
2342
 
2329
- export { type AnalyzeTracesInput, type AnalyzeTracesOptions, type AnalyzeTracesResult, type AnalyzeTracesTurnSnapshot, type Artifact, type BudgetLedgerEntry, type BudgetSpec, type CaptureFetchContext, type CaptureFetchOptions, DEFAULT_REDACTION_RULES, DEFAULT_TRACE_ANALYST_BUDGETS, type DatasetOverview, type ErrorCluster, type EventFilter, type EventKind, type ExportableSpan, type ExtractUsageFromSseOptions, type ExtractedUsage, FAILURE_CLASSES, type FailureClass, FileSystemRawProviderSink, type FileSystemRawProviderSinkOptions, FileSystemTraceStore, type FileSystemTraceStoreOptions, type FlattenOtlpOptions, type GenericSpan, INPUT_VALUE, InMemoryRawProviderSink, type InMemoryRawProviderSinkOptions, InMemoryTraceStore, type JudgeSpan, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, type LlmSpan, type LlmSpanOtlpInput, type Message, NoopRawProviderSink, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OUTPUT_VALUE, type OtelExportConfig, type OtelExporter, type OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, type OtlpResourceSpans, type OtlpSpan, type OtlpToRunRecordsOptions, type OtlpTraceRunRecord, type ProjectedOtlpSpan, type ProviderRedactor, type QueryTracesPage, REDACTION_VERSION, RUN_COST_ATTR_KEYS, type RawProviderDirection, type RawProviderEvent, type RawProviderSink, type RawProviderSinkFilter, type RedactionReport, type RedactionRule, ReplayCache, type ReplayCacheEntry, ReplayCacheMissError, type ReplayCacheStats, type ReplayFetchOptions, type RetrievalSpan, type Run, type RunCompleteHook, type RunCompleteHookContext, type RunFilter, RunIntegrityError, type RunIntegrityExpectations, type RunIntegrityIssue, type RunIntegrityIssueCode, type RunIntegrityReport, type RunLayer, type RunOutcome$1 as RunOutcome, type RunStatus, SPAN_KIND_ATTR_KEYS, type SandboxSpan, type SearchSpanResult, type SearchTraceResult, type Span, type SpanBase, type SpanFilter, type SpanHandle, type SpanKind, type SpanMatchRecord, SpanNotFoundError, type SpanStatus, type SseUsageMode, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_SUBAGENT_DESCRIPTION, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, TRACE_SCHEMA_VERSION, type ToolSpan, type ToolSpanOtlpInput, type TraceAggregate, type TraceAnalysisStore, type TraceAnalystByteBudgets, type TraceAnalystFilters, type TraceAnalystHookOptions, type TraceAnalystSpan, type TraceAnalystSpanKind, type TraceAnalystSpanStatus, type TraceAnalystTraceSummary, TraceEmitter, type TraceEmitterOptions, type TraceEvent, TraceFileMissingError, type TraceInsightContext, type TraceInsightFinding, type TraceInsightPanelRole, type TraceInsightPromptInput, type TraceInsightQualityGate, type TraceInsightQuestion, type TraceInsightReadiness, type TraceInsightSuite, type TraceInsightTask, TraceNotFoundError, type TraceStore, type TraceStoreSource, type TraceStoreToOtlpOptions, type TracesToOtlpResult, type ViewSpansResult, type ViewTraceOversized, type ViewTraceResult, aggregateLlm, analyzeTraces, applyLlmSpanOtlpAttributes, applyToolSpanOtlpAttributes, argHash, asNumber, asString, assertRunCaptured, buildTraceAnalystTools, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, contextInputTokens, convertTraceStoresToOtlp, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultProviderRedactor, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, groupBy, hasCapturedToolArgs, inferDomainKeywords, inferOtlpKind, isJudgeSpan, isLlmSpan, isRetrievalSpan, isSandboxSpan, isToolSpan, iterateRawCalls, judgeSpans, llmSpanFromProvider, llmSpans, otelRunCompleteHook, otlpRowsToRunRecords, otlpRowsToTraceRunRecords, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, providerFromBaseUrl, readOtlpStatus, redactString, redactValue, runFailureClass, runsForScenario, scoreTraceInsightReadiness, stringField, throwIfRunIncomplete, tokenizeDomainWords, toolSpans, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };
2343
+ export { type AnalyzeTracesInput, type AnalyzeTracesOptions, type AnalyzeTracesResult, type AnalyzeTracesTurnSnapshot, type Artifact, type BudgetLedgerEntry, type BudgetSpec, type CaptureFetchContext, type CaptureFetchOptions, DEFAULT_REDACTION_RULES, DEFAULT_TRACE_ANALYST_BUDGETS, type DatasetOverview, type ErrorCluster, type EventFilter, type EventKind, type ExportableSpan, type ExtractUsageFromSseOptions, type ExtractedUsage, FAILURE_CLASSES, type FailureClass, FileSystemRawProviderSink, type FileSystemRawProviderSinkOptions, FileSystemTraceStore, type FileSystemTraceStoreOptions, type FlattenOtlpOptions, type GenericSpan, INPUT_VALUE, InMemoryRawProviderSink, type InMemoryRawProviderSinkOptions, InMemoryTraceStore, type JudgeSpan, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, type LlmSpan, type LlmSpanOtlpInput, type Message, NoopRawProviderSink, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OUTPUT_VALUE, type OtelExportConfig, type OtelExporter, type OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, type OtlpResourceSpans, type OtlpSpan, type OtlpToRunRecordsOptions, type OtlpTraceRunRecord, type ProjectedOtlpSpan, type ProviderRedactor, type QueryTracesPage, REDACTION_VERSION, RUN_COST_ATTR_KEYS, type RawProviderDirection, type RawProviderEvent, type RawProviderSink, type RawProviderSinkFilter, type RedactionReport, type RedactionRule, ReplayCache, type ReplayCacheEntry, ReplayCacheMissError, type ReplayCacheStats, type ReplayFetchOptions, type RetrievalSpan, type Run, type RunCompleteHook, type RunCompleteHookContext, type RunFilter, RunIntegrityError, type RunIntegrityExpectations, type RunIntegrityIssue, type RunIntegrityIssueCode, type RunIntegrityReport, type RunLayer, type RunOutcome$1 as RunOutcome, type RunStatus, SPAN_KIND_ATTR_KEYS, type SandboxSpan, type SearchSpanResult, type SearchTraceResult, type Span, type SpanBase, type SpanFilter, type SpanHandle, type SpanKind, type SpanMatchRecord, SpanNotFoundError, type SpanStatus, type SseUsageMode, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, TRACE_SCHEMA_VERSION, type ToolSpan, type ToolSpanOtlpInput, type TraceAggregate, type TraceAnalysisStore, type TraceAnalystByteBudgets, type TraceAnalystFilters, type TraceAnalystHookOptions, type TraceAnalystSpan, type TraceAnalystSpanKind, type TraceAnalystSpanStatus, type TraceAnalystTraceSummary, TraceEmitter, type TraceEmitterOptions, type TraceEvent, TraceFileMissingError, type TraceInsightContext, type TraceInsightFinding, type TraceInsightPanelRole, type TraceInsightPromptInput, type TraceInsightQualityGate, type TraceInsightQuestion, type TraceInsightReadiness, type TraceInsightSuite, type TraceInsightTask, TraceNotFoundError, type TraceStore, type TraceStoreSource, type TraceStoreToOtlpOptions, type TracesToOtlpResult, type ViewSpansResult, type ViewTraceOversized, type ViewTraceResult, aggregateLlm, analyzeTraces, applyLlmSpanOtlpAttributes, applyToolSpanOtlpAttributes, argHash, asNumber, asString, assertRunCaptured, buildTraceAnalystTools, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, contextInputTokens, convertTraceStoresToOtlp, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultProviderRedactor, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, groupBy, hasCapturedToolArgs, inferDomainKeywords, inferOtlpKind, isJudgeSpan, isLlmSpan, isRetrievalSpan, isSandboxSpan, isToolSpan, iterateRawCalls, judgeSpans, llmSpanFromProvider, llmSpans, otelRunCompleteHook, otlpRowsToRunRecords, otlpRowsToTraceRunRecords, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, providerFromBaseUrl, readOtlpStatus, redactString, redactValue, runFailureClass, runsForScenario, scoreTraceInsightReadiness, stringField, throwIfRunIncomplete, tokenizeDomainWords, toolSpans, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };
package/dist/traces.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  scoreTraceInsightReadiness,
28
28
  tokenizeDomainWords,
29
29
  traceAnalystOnRunComplete
30
- } from "./chunk-ZYHJNKI3.js";
30
+ } from "./chunk-ULOKLHIQ.js";
31
31
  import "./chunk-H5UD2323.js";
32
32
  import {
33
33
  extractUsage,
@@ -48,9 +48,8 @@ import {
48
48
  import {
49
49
  TRACE_ANALYST_ACTOR_DESCRIPTION,
50
50
  TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION,
51
- TRACE_ANALYST_SUBAGENT_DESCRIPTION,
52
51
  analyzeTraces
53
- } from "./chunk-FIUFRXP3.js";
52
+ } from "./chunk-WW2A73HW.js";
54
53
  import {
55
54
  DEFAULT_REDACTION_RULES,
56
55
  REDACTION_VERSION,
@@ -75,7 +74,7 @@ import {
75
74
  stringField,
76
75
  traceAnalystFunctionGroup,
77
76
  traceSpanKindToOpenInferenceKind
78
- } from "./chunk-6QIM2EAP.js";
77
+ } from "./chunk-PXD6ZFNY.js";
79
78
  import {
80
79
  RunIntegrityError,
81
80
  assertRunCaptured,
@@ -178,7 +177,6 @@ export {
178
177
  TOOL_NAME_ATTR_KEYS,
179
178
  TRACE_ANALYST_ACTOR_DESCRIPTION,
180
179
  TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION,
181
- TRACE_ANALYST_SUBAGENT_DESCRIPTION,
182
180
  TRACE_ANALYST_TRUNCATION_MARKER_PREFIX,
183
181
  TRACE_SCHEMA_VERSION,
184
182
  TraceEmitter,
@@ -7,8 +7,14 @@ import { Hono } from 'hono';
7
7
  type CostChannel = 'agent' | 'judge' | 'verifier' | 'analyst' | 'driver' | (string & {});
8
8
  interface CostUsage {
9
9
  inputTokens: number;
10
+ /** Includes reasoning tokens when the provider bills them as output. */
10
11
  outputTokens: number;
12
+ /** Reasoning-token subset of outputTokens, when reported. */
13
+ reasoningTokens?: number;
14
+ /** Prompt tokens served from a provider cache. */
11
15
  cachedTokens?: number;
16
+ /** Prompt tokens written into a provider cache. */
17
+ cacheWriteTokens?: number;
12
18
  }
13
19
  interface CostCallBase {
14
20
  callId: string;
@@ -75,7 +81,9 @@ interface ChannelRollup {
75
81
  calls: number;
76
82
  inputTokens: number;
77
83
  outputTokens: number;
84
+ reasoningTokens?: number;
78
85
  cachedTokens: number;
86
+ cacheWriteTokens?: number;
79
87
  costUsd: number;
80
88
  unpricedCalls: number;
81
89
  unknownUsageCalls: number;
@@ -87,7 +95,9 @@ interface CostLedgerSummary {
87
95
  reservedCostUsd: number;
88
96
  inputTokens: number;
89
97
  outputTokens: number;
98
+ reasoningTokens?: number;
90
99
  cachedTokens: number;
100
+ cacheWriteTokens?: number;
91
101
  totalCostUsd: number;
92
102
  byChannel: ChannelRollup[];
93
103
  unpricedModels: string[];
@@ -101,6 +111,10 @@ interface CostLedgerFilter {
101
111
  phase?: string;
102
112
  tags?: Record<string, string>;
103
113
  }
114
+ interface CostLedgerWaitOptions {
115
+ /** Maximum time to wait for active provider calls. Default 5 seconds. */
116
+ timeoutMs?: number;
117
+ }
104
118
  /** Append-only storage. `append` must atomically reject stale revisions. */
105
119
  interface CostLedgerPersistence {
106
120
  read(): {
@@ -120,6 +134,7 @@ declare class CostLedger {
120
134
  private readonly records;
121
135
  private readonly activeCallIds;
122
136
  private readonly lateCallIds;
137
+ private readonly idleWaiters;
123
138
  private completedTasks;
124
139
  private revision;
125
140
  private costLimitPersisted;
@@ -127,6 +142,8 @@ declare class CostLedger {
127
142
  private readonly persistence?;
128
143
  constructor(input?: number | CostLedgerOptions);
129
144
  runPaidCall<T>(input: RunPaidCallInput<T>): Promise<PaidCallResult<T>>;
145
+ /** Wait until every call started by this ledger has produced a durable outcome. */
146
+ waitForIdle(options?: CostLedgerWaitOptions): Promise<boolean>;
130
147
  /** Settle a call left pending by a crashed process after reconciling with the provider. */
131
148
  reconcile(callId: string, observed: CostReceiptInput, options?: {
132
149
  error?: string;
@@ -137,6 +154,7 @@ declare class CostLedger {
137
154
  costPerCompletedTask(): number | null;
138
155
  private execute;
139
156
  private captureLateOutcome;
157
+ private releaseActiveCall;
140
158
  private commitOutcome;
141
159
  private captureFailure;
142
160
  private commitReceipt;
@@ -152,7 +170,7 @@ declare class CostLedger {
152
170
  * Keeping callback contracts structural lets those subpaths compose while the
153
171
  * concrete {@link CostLedger} retains its private durable state.
154
172
  */
155
- type CostLedgerHandle = Pick<CostLedger, keyof CostLedger>;
173
+ type CostLedgerHandle = Pick<CostLedger, Exclude<keyof CostLedger, 'waitForIdle'>> & Partial<Pick<CostLedger, 'waitForIdle'>>;
156
174
 
157
175
  type RunStatus = 'running' | 'completed' | 'failed' | 'aborted';
158
176
  interface BudgetSpec {
@@ -34,9 +34,9 @@ import {
34
34
  runRpcOnce,
35
35
  startServer,
36
36
  startServerAsync
37
- } from "../chunk-JTMFT5QZ.js";
37
+ } from "../chunk-4I2E3LLO.js";
38
38
  import "../chunk-NJC7U437.js";
39
- import "../chunk-MLHRFWQK.js";
39
+ import "../chunk-JHOJHHU7.js";
40
40
  import "../chunk-VI2UW6B6.js";
41
41
  import "../chunk-PC4UYEBM.js";
42
42
  import "../chunk-ONWEPEDO.js";
@@ -30,19 +30,23 @@ import {
30
30
  analyzeTraces,
31
31
  } from '@tangle-network/agent-eval'
32
32
 
33
+ const abortController = new AbortController()
33
34
  const result = await analyzeTraces({
34
35
  question: 'Why did app-runtime holdout runs fail this week?',
35
36
  }, {
36
37
  source: new OtlpFileTraceStore({ path: 'traces/otlp.jsonl' }),
37
38
  ai,
38
39
  model: 'gpt-4o-2024-11-20',
40
+ maxSubqueries: 4,
41
+ maxParallelSubqueries: 2,
42
+ signal: abortController.signal,
39
43
  })
40
44
 
41
45
  console.log(result.findings)
42
46
  ```
43
47
 
44
- Products can pass any `TraceAnalysisStore`; they do not need to use the file
45
- store in production.
48
+ Products can pass any `TraceAnalysisStore`; they do not need to use the file store in production.
49
+ The analyst runs one Ax executor loop and accepts only an explicit structured `final(task, { report, findings })` result; max-turn fallback text fails loud.
46
50
 
47
51
  ## Deterministic failure coverage (no LLM)
48
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "0.118.3",
3
+ "version": "0.119.1",
4
4
  "description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
5
5
  "homepage": "https://github.com/tangle-network/agent-eval#readme",
6
6
  "repository": {
@@ -119,6 +119,11 @@
119
119
  "import": "./dist/hosted/index.js",
120
120
  "default": "./dist/hosted/index.js"
121
121
  },
122
+ "./primeintellect": {
123
+ "types": "./dist/primeintellect/index.d.ts",
124
+ "import": "./dist/primeintellect/index.js",
125
+ "default": "./dist/primeintellect/index.js"
126
+ },
122
127
  "./openapi.json": {
123
128
  "default": "./dist/openapi.json"
124
129
  }
@@ -149,7 +154,7 @@
149
154
  },
150
155
  "dependencies": {
151
156
  "@asteasolutions/zod-to-openapi": "^8.5.0",
152
- "@ax-llm/ax": "^19.0.25",
157
+ "@ax-llm/ax": "^23.0.0",
153
158
  "@hono/node-server": "^2.0.0",
154
159
  "@tangle-network/agent-core": "^0.4.11",
155
160
  "@tangle-network/agent-interface": "^0.26.0",