@tangle-network/agent-eval 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/adapters/http.d.ts +1 -1
- package/dist/{agent-profile-Dngk3LZ0.js → agent-profile-4j6f2n-x.js} +4 -4
- package/dist/agent-profile-4j6f2n-x.js.map +1 -0
- package/dist/{agent-profile-BO8ruI6R.d.ts → agent-profile-DU5InUT9.d.ts} +4 -4
- package/dist/{agent-profile-BO8ruI6R.d.ts.map → agent-profile-DU5InUT9.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +2 -2
- package/dist/analyst/index.js +1 -1
- package/dist/app-grade/index.d.ts +1 -1
- package/dist/{benchmark-command-CoNndRCk.js → benchmark-command-DkUpd9Q6.js} +2 -2
- package/dist/{benchmark-command-CoNndRCk.js.map → benchmark-command-DkUpd9Q6.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +1 -1
- package/dist/{campaign-Bl07uIaf.js → campaign-C2mmydmx.js} +2 -2
- package/dist/{campaign-Bl07uIaf.js.map → campaign-C2mmydmx.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/contract/index.d.ts +3 -3
- package/dist/{define-agent-eval-Bx3b9B01.d.ts → define-agent-eval-DGWBgCid.d.ts} +2 -2
- package/dist/{define-agent-eval-Bx3b9B01.d.ts.map → define-agent-eval-DGWBgCid.d.ts.map} +1 -1
- package/dist/{index-DfqAy8ct.d.ts → index-Bp3w4fWc.d.ts} +2 -2
- package/dist/{index-DfqAy8ct.d.ts.map → index-Bp3w4fWc.d.ts.map} +1 -1
- package/dist/{index-DFso1b2W.d.ts → index-DX87wzX3.d.ts} +3 -3
- package/dist/{index-DFso1b2W.d.ts.map → index-DX87wzX3.d.ts.map} +1 -1
- package/dist/{index-CM12lr9E.d.ts → index-QLDWZTxI.d.ts} +2 -2
- package/dist/{index-CM12lr9E.d.ts.map → index-QLDWZTxI.d.ts.map} +1 -1
- package/dist/{index-7tWvC0aW.d.ts → index-YS58LHlx.d.ts} +5 -5
- package/dist/{index-7tWvC0aW.d.ts.map → index-YS58LHlx.d.ts.map} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/wire/index.d.ts +2 -2
- package/package.json +5 -5
- package/dist/agent-profile-Dngk3LZ0.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
|
|
2
2
|
import { i as JudgeError, n as CaptureIntegrityError, o as NotFoundError, r as ConfigError, s as ValidationError, t as AgentEvalError } from "./errors-DeEEV9Vx.js";
|
|
3
3
|
import { a as hashCanonical, r as canonicalString } from "./canonical-CicJlINA.js";
|
|
4
|
-
import { a as agentProfileModelId, i as agentProfileId, n as HARNESS_NATIVE_MODEL, o as expandProfileAxes, r as agentProfileHash, s as harnessAxisOf, t as CODING_HARNESSES } from "./agent-profile-
|
|
4
|
+
import { a as agentProfileModelId, i as agentProfileId, n as HARNESS_NATIVE_MODEL, o as expandProfileAxes, r as agentProfileHash, s as harnessAxisOf, t as CODING_HARNESSES } from "./agent-profile-4j6f2n-x.js";
|
|
5
5
|
import { a as groupRunsByAgentProfileCell, c as verifyAgentProfileCell, i as buildAgentProfileCell, l as hashJson, o as toAgentProfileJson, r as agentProfileCellKey, s as validateAgentProfileCell, t as AGENT_PROFILE_KINDS, u as manifestContentDigest } from "./agent-profile-cell-CT5JYueM.js";
|
|
6
6
|
import { r as observedSplitScore, t as isRealnessGated } from "./reward-DqMfaEax.js";
|
|
7
7
|
import { i as isToolSpan, n as isJudgeSpan, r as isLlmSpan, t as FAILURE_CLASSES } from "./schema-D-xu3MU_.js";
|
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@tangle-network/agent-eval — wire protocol",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.22",
|
|
6
6
|
"description": "HTTP and stdio RPC interface to agent-eval. The TypeScript runtime is the source of truth; this spec is the contract that cross-language clients (Python, Rust, Go) generate from.\n\nWire-protocol version: 1.1.0. Bumps on breaking changes to request/response schemas.",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Tangle Network",
|
package/dist/wire/index.d.ts
CHANGED
|
@@ -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
|
-
dev: "dev";
|
|
271
|
-
holdout: "holdout";
|
|
272
270
|
train: "train";
|
|
271
|
+
dev: "dev";
|
|
273
272
|
test: "test";
|
|
273
|
+
holdout: "holdout";
|
|
274
274
|
}>>;
|
|
275
275
|
tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
276
276
|
createdAt: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-eval",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
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": {
|
|
@@ -244,10 +244,10 @@
|
|
|
244
244
|
"dependencies": {
|
|
245
245
|
"@asteasolutions/zod-to-openapi": "^9.1.0",
|
|
246
246
|
"@hono/node-server": "^2.1.5",
|
|
247
|
-
"@tangle-network/agent-core": "^1.0.
|
|
248
|
-
"@tangle-network/agent-interface": "^5.10.
|
|
249
|
-
"@tangle-network/agent-trace-contract": "^2.2.
|
|
250
|
-
"@tangle-network/harness-sessions": "^1.0.
|
|
247
|
+
"@tangle-network/agent-core": "^1.0.3",
|
|
248
|
+
"@tangle-network/agent-interface": "^5.10.20",
|
|
249
|
+
"@tangle-network/agent-trace-contract": "^2.2.2",
|
|
250
|
+
"@tangle-network/harness-sessions": "^1.0.11",
|
|
251
251
|
"hono": "^4.13.14",
|
|
252
252
|
"linear-sum-assignment": "1.0.9",
|
|
253
253
|
"re2js": "2.9.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-profile-Dngk3LZ0.js","names":[],"sources":["../src/agent-profile.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport type { AgentProfile } from '@tangle-network/agent-interface'\nimport { type HarnessType, harnessSupportsModel } from '@tangle-network/agent-interface'\nimport { ValidationError } from './errors'\nimport { canonicalString } from './ledger-core/canonical'\n\nexport type { AgentProfile, HarnessType } from '@tangle-network/agent-interface'\n\n/**\n * The agentic coding harnesses an eval sweeps by default — the ones we care about\n * ranking. This is the SINGLE source of that list; consumers import it instead of\n * re-declaring their own (a re-declared list is how the fleet drifts). Pass an\n * explicit `harnesses` (e.g. `harnessTypeSchema.options` for literally every known\n * harness) to widen beyond these.\n */\nexport const CODING_HARNESSES: readonly HarnessType[] = [\n 'opencode',\n 'claude-code',\n 'codex',\n 'kimi-code',\n]\n\nexport interface ProfileAxisSpec {\n /** The domain profile to sweep. Its prompt/tools/skills are held fixed; only the\n * harness and model vary. `model.default` is the fallback model. */\n base: AgentProfile\n /** Harnesses to cross. Default: {@link CODING_HARNESSES}. */\n harnesses?: readonly HarnessType[]\n /** Models to cross. Default: `[base.model.default]` — one model, i.e. today's\n * single-model behaviour, so omitting this never changes an existing run. */\n models?: readonly string[]\n /** Force every (harness, model) pair verbatim, even ones the harness can't run —\n * for deliberately testing failure modes. Default (false): SNAP instead — a\n * vendor-locked harness runs only the swept models in its family, or its native\n * default when it supports none, so no harness is dropped and none gets a\n * guaranteed-failing foreign-model cell. */\n keepIncompatible?: boolean\n}\n\n/** Model sentinel for a vendor-locked harness that supports none of the swept models:\n * it carries no provider prefix, so `harnessSupportsModel` accepts it and the harness\n * resolves it to its own native default model at runtime (e.g. kimi-code → its Kimi\n * model). Lets `expandProfileAxes` snap-instead-of-drop without a per-harness flagship\n * table that would rot as router catalogs change. */\nexport const HARNESS_NATIVE_MODEL = 'default'\n\n/**\n * Expand a base profile across the harness × model matrix into the `AgentProfile[]`\n * that `runProfileMatrix` / `selfImprove` score — the ONE place \"which harnesses ×\n * which models do we evaluate\" lives, so no product hand-rolls its own harness list\n * or column→profile mapping (the pattern that let those copies drift and silently\n * break the harness pivot).\n *\n * Each cell clones `base`, sets the canonical top-level `harness` and `model.default`,\n * and stamps `metadata.harness` + `metadata.harnessModel` for matrix grouping. Both\n * metadata fields are hash-bearing, so every cell gets a distinct `agentProfileId` row\n * and results join back by harness/model via {@link harnessAxisOf} with no\n * hand-recomputed key. A vendor-locked harness snaps to its family's swept models — or\n * its native default ({@link HARNESS_NATIVE_MODEL}) when it supports none — so every\n * requested harness runs; `keepIncompatible` forces every pair verbatim.\n *\n * Omit `harnesses`/`models` to sweep the full default set — the \"turn it on for\n * everything we care about\" switch, identical in shape whether one harness or all.\n */\nexport function expandProfileAxes(spec: ProfileAxisSpec): AgentProfile[] {\n const harnesses = spec.harnesses ?? CODING_HARNESSES\n if (harnesses.length === 0) throw new ValidationError('expandProfileAxes: no harnesses to sweep')\n const baseModel = spec.base.model?.default\n const models = spec.models ?? (baseModel ? [baseModel] : [])\n if (models.length === 0) {\n throw new ValidationError(\n 'expandProfileAxes: no models to sweep — base profile has no model.default and none were supplied',\n )\n }\n const out: AgentProfile[] = []\n const seen = new Set<string>()\n for (const harness of harnesses) {\n // A universal (router-backed) harness — opencode/pi/claudish, and claude-code/codex\n // since agent-interface 5.6.0 — runs every swept model. A vendor-locked harness\n // (kimi-code) runs only the swept models in its own family; when it supports NONE\n // of them it snaps to its native default (the `HARNESS_NATIVE_MODEL` sentinel it\n // resolves at runtime) rather than being dropped, so every requested harness still appears in the\n // sweep on a model it can actually run — e.g. sweeping `deepseek/x` puts opencode\n // on deepseek and kimi-code on its own Kimi model, a real head-to-head.\n // `keepIncompatible` forces every (harness, model) pair verbatim (failure-mode runs).\n const supported = spec.keepIncompatible\n ? models\n : models.filter((model) => harnessSupportsModel(harness, model))\n const effective = supported.length > 0 ? supported : [HARNESS_NATIVE_MODEL]\n for (const model of effective) {\n const profile: AgentProfile = {\n ...spec.base,\n harness,\n name: `${spec.base.name ?? 'agent'}/${harness}/${model}`,\n model: { ...spec.base.model, default: model },\n metadata: { ...(spec.base.metadata ?? {}), harness, harnessModel: model },\n }\n const id = agentProfileId(profile)\n if (seen.has(id)) continue\n seen.add(id)\n out.push(profile)\n }\n }\n if (out.length === 0) {\n // Unreachable in normal use — snapping guarantees ≥1 cell per harness — but keep a\n // fail-closed guard so a future refactor can't silently produce an empty sweep.\n throw new ValidationError(\n `expandProfileAxes: produced no profiles (harnesses=[${harnesses.join(', ')}], models=[${models.join(', ')}]).`,\n )\n }\n return out\n}\n\n/**\n * Read the (harness, model) a matrix cell ran under, off a profile or a result row's\n * profile — the join-back for a `byHarness` pivot. Returns undefined when the profile\n * wasn't produced by {@link expandProfileAxes}. Callers group `result.byProfile` by\n * this instead of recomputing an id (recomputing the wrong key is what broke the pivot\n * in the hand-rolled copies).\n */\nexport function harnessAxisOf(\n profile: Pick<AgentProfile, 'metadata'>,\n): { harness: HarnessType; model: string } | undefined {\n const m = profile.metadata as Record<string, unknown> | undefined\n const harness = m?.harness\n const model = m?.harnessModel\n if (typeof harness === 'string' && typeof model === 'string') {\n return { harness: harness as HarnessType, model }\n }\n return undefined\n}\n\n/**\n * Collision-resistant, path-safe, human-readable profile id for eval artifacts.\n * Scorecard joins still use `agentProfileHash`; this id is for run ids, matrix\n * keys, and directory names where two profiles must not collapse onto one row.\n * The suffix is the first 64 bits of the behaviour hash, enough for ordinary\n * eval matrices while keeping filenames readable.\n */\nexport function agentProfileId(profile: AgentProfile): string {\n const label = pathSafeProfileLabel(agentProfileDisplayLabel(profile)) ?? 'profile'\n return `${label}-${agentProfileHash(profile).slice(0, 16)}`\n}\n\n/**\n * Model snapshot used for `RunRecord.model`. Eval surfaces require a concrete\n * model id because run records reject bare/missing model aliases.\n */\nexport function agentProfileModelId(profile: AgentProfile): string {\n const model = profile.model?.default?.trim()\n if (!model) {\n const label = agentProfileDisplayLabel(profile) ?? 'unnamed profile'\n throw new ValidationError(\n `AgentProfile \"${label}\" has no model.default — cannot record eval run`,\n )\n }\n return model\n}\n\nfunction agentProfileDisplayLabel(profile: AgentProfile): string | undefined {\n return profile.name?.trim() || profile.version?.trim() || undefined\n}\n\nfunction pathSafeProfileLabel(label: string | undefined): string | undefined {\n const safe = label\n ?.trim()\n .replace(/[^A-Za-z0-9._-]+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '')\n return safe || undefined\n}\n\nfunction compact<T extends Record<string, unknown>>(input: T): Partial<T> {\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(input)) {\n if (value !== undefined) out[key] = value\n }\n return out as Partial<T>\n}\n\n/**\n * Deterministic behaviour identity for the canonical\n * `@tangle-network/agent-interface` AgentProfile.\n *\n * `name` and `description` are labels and do not affect the hash. Profile\n * `version`, prompt, model hints, tools, resources, hooks, modes, permissions,\n * and extensions do affect the hash. Resource array order is hash-bearing\n * because mount order can change agent behaviour. Undefined fields are treated\n * as absent; explicit `null` fields remain hash-bearing.\n */\nexport function agentProfileHash(profile: AgentProfile): string {\n const model = agentProfileModelId(profile)\n const behaviour = compact({\n ...profile,\n name: undefined,\n description: undefined,\n tags: profile.tags ? [...profile.tags].sort() : undefined,\n model: compact({ ...profile.model, default: model }),\n })\n return createHash('sha256').update(canonicalString(behaviour)).digest('hex')\n}\n"],"mappings":";;;;;;;;;;;;AAeA,MAAa,mBAA2C;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