diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml index 53e8ec8..2b88ac3 100644 --- a/clients/python/pyproject.toml +++ b/clients/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "agent-eval-rpc" -version = "0.96.5" +version = "0.97.0" description = "Python RPC client for @tangle-network/agent-eval — judge content against rubrics over HTTP or stdio RPC. Eval logic runs in the Node runtime; this package is a thin wire client." readme = "README.md" requires-python = ">=3.10" diff --git a/clients/python/src/agent_eval_rpc/__init__.py b/clients/python/src/agent_eval_rpc/__init__.py index 10ba8e0..bcc76ee 100644 --- a/clients/python/src/agent_eval_rpc/__init__.py +++ b/clients/python/src/agent_eval_rpc/__init__.py @@ -58,7 +58,7 @@ try: __version__ = version("agent-eval-rpc") except PackageNotFoundError: - __version__ = "0.96.5" + __version__ = "0.97.0" __all__ = [ "Client", diff --git a/package.json b/package.json index c29b1d3..02ec29f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tangle-network/agent-eval", - "version": "0.96.5", + "version": "0.97.0", "description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.", "homepage": "https://github.com/tangle-network/agent-eval#readme", "repository": { diff --git a/src/campaign/types.ts b/src/campaign/types.ts index 42a2a52..e856717 100644 --- a/src/campaign/types.ts +++ b/src/campaign/types.ts @@ -274,6 +274,14 @@ export interface ProposeContext { * reflective / agentic generators both conform. They are proposers for the * SAME loop, not separate loops. The loop body (`runOptimization`) and the * gated promotion shell (`runImprovementLoop`) are proposer-agnostic. + * + * This is THE optimization proposer — every optimizer is a factory + * `xProposer(opts): SurfaceProposer` (`evolutionaryProposer`, `aceProposer`, + * `gepaProposer`, `skillOptProposer`, `traceAnalystProposer`, `haloProposer`, + * `memoryCurationProposer`, `fapoProposer`), all exported from `/campaign` and + * drivable by `selfImprove({ proposer })`. Not to be confused with the + * behavior-fuzzing `MutationProposer` (`fuzz/types`), a scenario generator for + * a different loop. */ export interface SurfaceProposer { kind: string diff --git a/src/fuzz/fuzz-agent.test.ts b/src/fuzz/fuzz-agent.test.ts index 020f575..5b6749e 100644 --- a/src/fuzz/fuzz-agent.test.ts +++ b/src/fuzz/fuzz-agent.test.ts @@ -6,7 +6,14 @@ import { fuzzAgent } from './fuzz-agent' import { composeGates } from './gates' import { mutationProposer, noveltyObjective } from './policies' import { makeExploreTools } from './tools' -import type { BehaviorSpace, Cell, Evaluation, Evaluator, ExploreOptions, Proposer } from './types' +import type { + BehaviorSpace, + Cell, + Evaluation, + Evaluator, + ExploreOptions, + MutationProposer, +} from './types' interface Scn { id: string @@ -46,7 +53,7 @@ const seedsFor = (cell: Cell): Scn[] => [ }, ] -const proposer: Proposer = mutationProposer({ +const proposer: MutationProposer = mutationProposer({ scenarioId: (s) => s.id, mutationsFor: () => [ { @@ -163,7 +170,7 @@ describe('fuzzAgent (adversarial preset)', () => { // allocation (base's mutation operator runs dry on easy cells, which is // legitimate engine behavior, not an allocation skew). let n = 0 - const fresh: Proposer = (ctx) => + const fresh: MutationProposer = (ctx) => Array.from({ length: ctx.count }, () => { n++ return { diff --git a/src/fuzz/index.ts b/src/fuzz/index.ts index 7ccca1d..0a4a5dc 100644 --- a/src/fuzz/index.ts +++ b/src/fuzz/index.ts @@ -34,6 +34,7 @@ export type { ExploreEvent, ExploreOptions, Finding, + MutationProposer, Objective, ObjectiveContext, ProposeContext, diff --git a/src/fuzz/policies.ts b/src/fuzz/policies.ts index e135b01..994d3ec 100644 --- a/src/fuzz/policies.ts +++ b/src/fuzz/policies.ts @@ -1,8 +1,8 @@ /** * Shipped policies for the exploration engine. * - * `Proposer` is a plain function type — an agent running a generator skill IS a - * proposer (`(ctx) => dispatchToSkill(ctx)`), no wrapper needed. `mutationProposer` + * `MutationProposer` is a plain function type — an agent running a generator skill + * IS a proposer (`(ctx) => dispatchToSkill(ctx)`), no wrapper needed. `mutationProposer` * builds the deterministic, LLM-free one from mutation operators. Objectives are * interfaces because the engine reads `kind` + `threshold` off them. */ @@ -11,10 +11,10 @@ import type { AdversarialMutation } from '../rl/adversarial' import type { Cell, Evaluation, + MutationProposer, Objective, ObjectiveContext, ProposeContext, - Proposer, } from './types' const clamp01 = (x: number): number => Math.max(0, Math.min(1, x)) @@ -29,7 +29,7 @@ const clamp01 = (x: number): number => Math.max(0, Math.min(1, x)) export function mutationProposer(opts: { mutationsFor: (cell: Cell) => AdversarialMutation[] scenarioId: (s: S) => string -}): Proposer { +}): MutationProposer { return async (ctx: ProposeContext): Promise => { const mutations = opts.mutationsFor(ctx.cell) const parents = [...ctx.elites, ...ctx.seeds] diff --git a/src/fuzz/types.ts b/src/fuzz/types.ts index 5bb9020..b3ad9a8 100644 --- a/src/fuzz/types.ts +++ b/src/fuzz/types.ts @@ -86,8 +86,17 @@ export interface ProposeContext { * Produces candidate scenarios for a cell. A plain function — `mutationProposer` * builds one from mutation operators; an agent running a generator skill IS one * (`(ctx) => dispatchToSkill(ctx)`), no wrapper needed. + * + * Distinct from the optimization `SurfaceProposer` (`campaign/types`): that one + * is the proposer in the surface-optimization loop (`runOptimization`); this one + * is the scenario generator in the behavior-fuzzing loop. `SurfaceProposer` is + * THE optimization proposer. */ -export type Proposer = (ctx: ProposeContext) => Promise | S[] +export type MutationProposer = (ctx: ProposeContext) => Promise | S[] + +/** @deprecated Renamed to `MutationProposer` to disambiguate from the + * optimization `SurfaceProposer`. Kept as an alias for back-compat. */ +export type Proposer = MutationProposer /** * What "interesting" means. `interest` in [0,1]; a candidate is notable (gate- @@ -249,7 +258,7 @@ export interface ExploreOptions { /** The input stratification plan. */ space: BehaviorSpace /** Candidate generator. */ - proposer: Proposer + proposer: MutationProposer /** Runs the target → multi-objective `Evaluation`. */ evaluate: Evaluator /** Seed corpus per cell. */