@tangle-network/agent-eval 1.0.3 → 1.0.5

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 (42) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/analyst/index.js +5 -5
  3. package/dist/{benchmark-command-BeDZB3BQ.js → benchmark-command-C3mZhNh7.js} +5 -5
  4. package/dist/{benchmark-command-BeDZB3BQ.js.map → benchmark-command-C3mZhNh7.js.map} +1 -1
  5. package/dist/benchmarks/index.js +3 -3
  6. package/dist/builder-eval/index.d.ts +1 -1
  7. package/dist/builder-eval/index.js +1 -1
  8. package/dist/campaign/index.d.ts +2 -2
  9. package/dist/campaign/index.js +5 -5
  10. package/dist/{campaign-DKZiYHUq.js → campaign-VKtf8HRr.js} +5 -5
  11. package/dist/{campaign-DKZiYHUq.js.map → campaign-VKtf8HRr.js.map} +1 -1
  12. package/dist/cli.js +1 -1
  13. package/dist/contract/index.js +4 -4
  14. package/dist/{define-agent-eval-BVhGn7VV.js → define-agent-eval-gXgVUX1h.js} +3 -3
  15. package/dist/{define-agent-eval-BVhGn7VV.js.map → define-agent-eval-gXgVUX1h.js.map} +1 -1
  16. package/dist/{dspy-rlm-engine-C0zR2xiM.js → dspy-rlm-engine-Xt3znknf.js} +2 -2
  17. package/dist/{dspy-rlm-engine-C0zR2xiM.js.map → dspy-rlm-engine-Xt3znknf.js.map} +1 -1
  18. package/dist/{external-optimizer-process-DKgrrX0J.js → external-optimizer-process-BgitfZ-Q.js} +2 -2
  19. package/dist/{external-optimizer-process-DKgrrX0J.js.map → external-optimizer-process-BgitfZ-Q.js.map} +1 -1
  20. package/dist/{external-optimizer-subprocess-wzMaA0oN.js → external-optimizer-subprocess-CeHuAaMJ.js} +8 -17
  21. package/dist/{external-optimizer-subprocess-wzMaA0oN.js.map → external-optimizer-subprocess-CeHuAaMJ.js.map} +1 -1
  22. package/dist/{findings-store-DNSvmy8U.js → findings-store-Bp-0Guuv.js} +2 -2
  23. package/dist/{findings-store-DNSvmy8U.js.map → findings-store-Bp-0Guuv.js.map} +1 -1
  24. package/dist/index.d.ts +2 -14
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +4 -4
  27. package/dist/{llm-judge-BYBLxREr.js → llm-judge-CyDyqb6V.js} +5 -6
  28. package/dist/{llm-judge-BYBLxREr.js.map → llm-judge-CyDyqb6V.js.map} +1 -1
  29. package/dist/openapi.json +1 -1
  30. package/dist/{proposal-findings-duV5flPv.js → proposal-findings-BclX0PFh.js} +2 -2
  31. package/dist/{proposal-findings-duV5flPv.js.map → proposal-findings-BclX0PFh.js.map} +1 -1
  32. package/dist/{sandbox-harness--VUvMji7.d.ts → sandbox-harness-BS6c6UZV.d.ts} +20 -9
  33. package/dist/sandbox-harness-BS6c6UZV.d.ts.map +1 -0
  34. package/dist/{sandbox-harness-BuacGaVn.js → sandbox-harness-BzAUasgY.js} +37 -20
  35. package/dist/sandbox-harness-BzAUasgY.js.map +1 -0
  36. package/dist/{skillopt-optimization-method-DmfZz-2d.js → skillopt-optimization-method-O35aMdxU.js} +4 -4
  37. package/dist/{skillopt-optimization-method-DmfZz-2d.js.map → skillopt-optimization-method-O35aMdxU.js.map} +1 -1
  38. package/dist/wire/index.d.ts +4 -4
  39. package/docs/concepts.md +8 -0
  40. package/package.json +1 -1
  41. package/dist/sandbox-harness--VUvMji7.d.ts.map +0 -1
  42. package/dist/sandbox-harness-BuacGaVn.js.map +0 -1
@@ -213,9 +213,9 @@ export declare const FeedbackTrajectorySchema: z.ZodObject<{
213
213
  value: z.ZodUnknown;
214
214
  reason: z.ZodOptional<z.ZodString>;
215
215
  severity: z.ZodOptional<z.ZodEnum<{
216
- error: "error";
217
216
  critical: "critical";
218
217
  info: "info";
218
+ error: "error";
219
219
  warning: "warning";
220
220
  }>>;
221
221
  createdAt: z.ZodString;
@@ -249,9 +249,9 @@ export declare const FeedbackTrajectorySchema: z.ZodObject<{
249
249
  value: z.ZodUnknown;
250
250
  reason: z.ZodOptional<z.ZodString>;
251
251
  severity: z.ZodOptional<z.ZodEnum<{
252
- error: "error";
253
252
  critical: "critical";
254
253
  info: "info";
254
+ error: "error";
255
255
  warning: "warning";
256
256
  }>>;
257
257
  createdAt: z.ZodString;
@@ -267,10 +267,10 @@ export declare const FeedbackTrajectorySchema: z.ZodObject<{
267
267
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
268
268
  }, z.core.$strip>>;
269
269
  split: z.ZodOptional<z.ZodEnum<{
270
- train: "train";
271
270
  dev: "dev";
272
- test: "test";
273
271
  holdout: "holdout";
272
+ train: "train";
273
+ test: "test";
274
274
  }>>;
275
275
  tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
276
276
  createdAt: z.ZodString;
package/docs/concepts.md CHANGED
@@ -67,6 +67,14 @@ after allocation; callbacks use the scope signal for workload cancellation.
67
67
  Retirements run in reverse order even after setup or workload failure, and a
68
68
  failed retirement remains a failed assertion in the report.
69
69
 
70
+ Use `scope.resource({ name, create, ready, retire, onCreate })` to measure acquisition,
71
+ register retirement before readiness, and retain the allocated resource when readiness fails.
72
+ A step marked `advisory` retains its failure timing while required expectations still gate
73
+ the report. Unmarked steps and all setup/cleanup measurements remain required.
74
+
75
+ Expectations accept the existing assertion objects or `[name, passed, details?]` tuples.
76
+ Both produce the same named assertion report; details retain expected/actual/message fields.
77
+
70
78
  Pass the product's existing `measure` adapter to retain its server timing
71
79
  ledgers. A poll returns `undefined` when its budget expires; the scenario must
72
80
  assert the condition when exhaustion is a failure. The scope's budget signal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
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": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"sandbox-harness--VUvMji7.d.ts","names":[],"sources":["../src/sandbox-harness.ts"],"mappings":"A,UAMiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,MAAM;;EAEN,aAAa;;UAGE;EACf;EACA,MACE,gBACA,gBACA;IACG;IAAoB;;;UAGV;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;;UAGe;EACf;EACA,KACE,OAAO,wBACP,iBACA,QAAQ,gBACP,QAAQ;;UAkDI;EACf;EACA,QAAQ;EACR,MAAM;EACN,OAAO;EACP;;EAEA;;;UAgEe;EACf;EACA;EACA;EACA;EACA;EACA;;UAEe;EACf;EACA;EACA;EACA;;UAEe;EACf;EACA,YAAY;EACZ,SAAS;EACT;EACA,WAAW;;UAEI;EACf,QAAQ;EACR,SAAS,YAAY;EACrB,QAAQ,cAAc,WAAW,mBAAmB,QAAQ;;EAE5D,MAAM,cAAc;EACpB,KAAK,GACH,YAAY,QAAQ,IACpB,QAAQ,OAAO,eACf;IAAU;IAAmB;MAC5B,QAAQ;;UAEI,gBAAgB;EAC/B,MAAM,OAAO,eAAe,QAAQ;EACpC,OAAO;IACL;IACA,QAAQ,OAAO;IACf,IAAI,OAAO,GAAG,OAAO,eAAe;IACpC,UAAU,OAAO,GAAG,QAAQ,kBAAkB;;EAEhD,gBAAgB,OAAO,MAAM;EAC7B,YAAY,OAAO,MAAM;;EAEzB;;;iBAIoB,mBAAmB,GACvC,MAAM,gBAAgB,IACtB;EACE,SAAS;EACT,UAAU;IAEX,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sandbox-harness-BuacGaVn.js","names":["delay"],"sources":["../src/sandbox-harness.ts"],"sourcesContent":["import { setTimeout as delay } from 'node:timers/promises'\nimport { runBoundedProcess } from './bounded-process'\n\nimport type { TraceEmitter } from './trace/emitter'\nimport type { SandboxSpan } from './trace/schema'\n\nexport interface HarnessConfig {\n /** Setup command (e.g. \"pnpm install\"). Non-zero exit fails the run. */\n setupCommand?: string\n /** Run command (e.g. \"pnpm build\"). */\n runCommand?: string\n /** Test command (e.g. \"pnpm test --run\"). Drives the test count + pass count. */\n testCommand?: string\n /** Absolute cwd for the subprocess driver. Ignored by docker driver. */\n cwd?: string\n /** Max wall-clock per phase in ms. Default 10 minutes. */\n timeoutMs?: number\n /** Captured stdout + stderr cap, default 16 MiB; excess is dropped. */\n maxOutputBytes?: number\n /** Image for the docker driver. */\n image?: string\n /** Extra env vars (validated; shell-escaped). */\n env?: Record<string, string>\n /** Parser for the test output — maps stdout/stderr/exit code → pass count. */\n testParser?: TestOutputParser\n}\n\nexport interface TestOutputParser {\n id: string\n parse(\n stdout: string,\n stderr: string,\n exitCode: number,\n ): { testsTotal: number; testsPassed: number } | undefined\n}\n\nexport interface SandboxResult {\n phase: 'setup' | 'run' | 'test'\n exitCode: number\n stdout: string\n stderr: string\n wallMs: number\n testsTotal?: number\n testsPassed?: number\n /** A timed-out phase always fails, even with exitCode 0. Absent/false means natural exit. */\n killedByTimeout?: boolean\n /** Captured output exceeded maxOutputBytes. */\n outputTruncated?: boolean\n}\n\nexport interface SandboxDriver {\n id: string\n exec(\n phase: SandboxResult['phase'],\n command: string,\n config: HarnessConfig,\n ): Promise<SandboxResult>\n}\n\ninterface SubprocessSandboxDriverOptions {\n cwd?: string\n env?: Record<string, string>\n}\n\nexport class SubprocessSandboxDriver implements SandboxDriver {\n id = 'subprocess'\n constructor(private options: SubprocessSandboxDriverOptions = {}) {}\n\n async exec(\n phase: SandboxResult['phase'],\n command: string,\n config: HarnessConfig,\n ): Promise<SandboxResult> {\n const effectiveEnv = { ...process.env, ...(this.options.env ?? {}), ...(config.env ?? {}) }\n const result = await runBoundedProcess({\n command,\n shell: true,\n cwd: config.cwd ?? this.options.cwd,\n env: effectiveEnv,\n envMode: 'replace',\n timeoutMs: config.timeoutMs ?? 10 * 60_000,\n maxOutputBytes: config.maxOutputBytes ?? 16 * 1024 * 1024,\n })\n // A timed-out phase never reaches the parser: the output of a killed\n // process is a fragment, and a fragment that happens to parse would\n // report a pass for a run that never finished.\n const parsed =\n !result.killedByTimeout && phase === 'test' && config.testParser\n ? config.testParser.parse(result.stdout, result.stderr, result.exitCode)\n : undefined\n return {\n phase,\n exitCode: result.exitCode,\n stdout: result.stdout,\n stderr: result.runnerError ? result.stderr + result.runnerError : result.stderr,\n wallMs: result.wallMs,\n testsTotal: parsed?.testsTotal,\n testsPassed: parsed?.testsPassed,\n killedByTimeout: result.killedByTimeout || undefined,\n outputTruncated: result.outputTruncated || undefined,\n }\n }\n}\n\n// ── Harness orchestration ────────────────────────────────────────────\n\nexport interface SandboxHarnessResult {\n passed: boolean\n setup?: SandboxResult\n run?: SandboxResult\n test?: SandboxResult\n totalWallMs: number\n /** Final score — 0 when no tests; otherwise testsPassed/testsTotal. */\n score: number\n}\n\nexport class SandboxHarness {\n constructor(private driver: SandboxDriver = new SubprocessSandboxDriver()) {}\n\n async run(config: HarnessConfig, emitter: TraceEmitter): Promise<SandboxHarnessResult> {\n const handle = await emitter.sandbox({\n name: `sandbox(${this.driver.id})`,\n image: config.image,\n command: [config.setupCommand, config.runCommand, config.testCommand]\n .filter(Boolean)\n .join(' && '),\n })\n const result: SandboxHarnessResult = { passed: false, totalWallMs: 0, score: 0 }\n try {\n for (const phase of ['setup', 'run', 'test'] as const) {\n const command = config[`${phase}Command`]\n if (!command) continue\n const measured = await this.driver.exec(phase, command, config)\n result[phase] = measured\n result.totalWallMs += measured.wallMs\n const passed = !measured.killedByTimeout && measured.exitCode === 0\n if (phase !== 'test' && !passed) {\n await handle.fail(\n measured.killedByTimeout\n ? `${phase} timed out after ${measured.wallMs}ms`\n : `${phase} failed (exit ${measured.exitCode})`,\n {\n exitCode: measured.exitCode,\n wallMs: result.totalWallMs,\n } as Partial<SandboxSpan>,\n )\n return result\n }\n }\n const test = result.test\n result.passed = !test || (!test.killedByTimeout && test.exitCode === 0)\n result.score =\n test?.testsTotal !== undefined && test.testsTotal > 0\n ? (test.testsPassed ?? 0) / test.testsTotal\n : result.passed\n ? 1\n : 0\n await handle.end({\n ...(test\n ? {\n exitCode: test.exitCode,\n testsTotal: test.testsTotal,\n testsPassed: test.testsPassed,\n status: result.passed ? 'ok' : 'error',\n }\n : {}),\n wallMs: result.totalWallMs,\n } as Partial<SandboxSpan>)\n } catch (err) {\n await handle.fail(err instanceof Error ? err : String(err))\n throw err\n }\n return result\n }\n}\n\n/** Portable integration report; products may retain extra timing and assertion fields. */\nexport interface HarnessAssertion {\n name: string\n status: 'pass' | 'fail' | 'skip'\n expected?: string\n actual?: string\n message?: string\n soft?: boolean\n}\nexport interface HarnessTiming {\n name: string\n durationMs: number\n success: boolean\n error?: string\n}\nexport interface HarnessReport {\n pass: boolean\n assertions: HarnessAssertion[]\n timings: HarnessTiming[]\n error?: string\n metadata?: Record<string, unknown>\n}\nexport interface HarnessScope {\n signal: AbortSignal\n check(...assertions: HarnessAssertion[]): void\n measure(name: string, run: () => Promise<unknown>): Promise<HarnessTiming>\n /** Register retirement immediately after allocation; cleanup ignores workload cancellation. */\n defer(retire: () => Promise<unknown>): void\n poll<T>(\n read: () => Promise<T>,\n ready: (value: T) => boolean,\n budget: { timeoutMs: number; intervalMs: number },\n ): Promise<T | undefined>\n}\nexport interface HarnessScenario<T> {\n setup(scope: HarnessScope): Promise<T>\n steps: ReadonlyArray<{\n name: string\n when?: (state: T) => boolean\n run(state: T, scope: HarnessScope): Promise<unknown>\n expect?: (state: T, timing: HarnessTiming) => HarnessAssertion[]\n }>\n expectations?: (state: T) => HarnessAssertion[]\n metadata?: (state: T) => Record<string, unknown>\n /** Includes setup and steps. Transports must honor scope.signal. */\n budgetMs: number\n}\n\n/** Campaigns own whole-scenario retries; polling only repeats the declared read. */\nexport async function runSandboxScenario<T>(\n spec: HarnessScenario<T>,\n options: {\n signal?: AbortSignal\n measure?: HarnessScope['measure']\n } = {},\n): Promise<HarnessReport> {\n if (!(spec.budgetMs > 0 && Number.isSafeInteger(spec.budgetMs)))\n throw new Error('Scenario budgetMs must be positive and finite')\n const signal = AbortSignal.any([\n AbortSignal.timeout(spec.budgetMs),\n ...(options.signal ? [options.signal] : []),\n ])\n const report: HarnessReport = { pass: false, assertions: [], timings: [] }\n const retirements: Array<() => Promise<unknown>> = []\n const scope: HarnessScope = {\n signal,\n check: (...assertions) => {\n report.assertions.push(...assertions)\n },\n defer: (retire) => {\n retirements.push(retire)\n },\n async measure(name, run) {\n const start = performance.now()\n let measured: HarnessTiming = { name, durationMs: 0, success: true }\n try {\n if (options.measure) measured = await options.measure(name, run)\n else {\n const result = (await run()) as { success?: boolean; error?: string } | undefined\n if (result?.success === false)\n throw new Error(result.error ?? 'measured operation returned success=false')\n measured.durationMs = Math.round(performance.now() - start)\n }\n } catch (error) {\n measured = {\n name,\n durationMs: Math.round(performance.now() - start),\n success: false,\n error: error instanceof Error ? error.message : String(error),\n }\n }\n report.timings.push(measured)\n return measured\n },\n async poll(read, ready, budget) {\n if (!(budget.timeoutMs > 0 && budget.intervalMs > 0))\n throw new Error('Polling timeout and interval must be positive')\n const deadline = performance.now() + budget.timeoutMs\n while (performance.now() < deadline) {\n signal.throwIfAborted()\n const value = await read()\n if (ready(value)) return value\n await delay(\n Math.min(budget.intervalMs, Math.max(0, deadline - performance.now())),\n undefined,\n { signal },\n )\n }\n return undefined\n },\n }\n try {\n signal.throwIfAborted()\n const state = await spec.setup(scope)\n for (const step of spec.steps) {\n signal.throwIfAborted()\n if (step.when && !step.when(state)) continue\n const timing = await scope.measure(step.name, () => step.run(state, scope))\n scope.check(...(step.expect?.(state, timing) ?? []))\n }\n signal.throwIfAborted()\n scope.check(...(spec.expectations?.(state) ?? []))\n report.metadata = spec.metadata?.(state)\n } catch (error) {\n report.error = error instanceof Error ? error.message : String(error)\n } finally {\n for (const retire of retirements.reverse()) {\n const measured = await scope.measure('cleanup', retire)\n if (!measured.success)\n scope.check({ name: 'cleanup', status: 'fail', message: measured.error })\n }\n }\n report.pass =\n !report.error &&\n report.timings.every((t) =>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