@vercel/agent-eval 1.1.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/cli.js +318 -102
  2. package/dist/cli.js.map +1 -1
  3. package/dist/lib/agents/claude-code/agent.d.ts +30 -0
  4. package/dist/lib/agents/claude-code/agent.d.ts.map +1 -0
  5. package/dist/lib/agents/claude-code/agent.js +81 -0
  6. package/dist/lib/agents/claude-code/agent.js.map +1 -0
  7. package/dist/lib/agents/claude-code/run.mjs +217 -0
  8. package/dist/lib/agents/codex/agent.d.ts +61 -0
  9. package/dist/lib/agents/codex/agent.d.ts.map +1 -0
  10. package/dist/lib/agents/codex/agent.js +222 -0
  11. package/dist/lib/agents/codex/agent.js.map +1 -0
  12. package/dist/lib/agents/codex/run.mjs +365 -0
  13. package/dist/lib/agents/cursor/agent.d.ts +32 -0
  14. package/dist/lib/agents/cursor/agent.d.ts.map +1 -0
  15. package/dist/lib/agents/cursor/agent.js +87 -0
  16. package/dist/lib/agents/cursor/agent.js.map +1 -0
  17. package/dist/lib/agents/cursor/run.mjs +183 -0
  18. package/dist/lib/agents/eval-helper.mjs +226 -0
  19. package/dist/lib/agents/gemini/agent.d.ts +27 -0
  20. package/dist/lib/agents/gemini/agent.d.ts.map +1 -0
  21. package/dist/lib/agents/gemini/agent.js +70 -0
  22. package/dist/lib/agents/gemini/agent.js.map +1 -0
  23. package/dist/lib/agents/gemini/run.mjs +180 -0
  24. package/dist/lib/agents/index.js +5 -5
  25. package/dist/lib/agents/index.js.map +1 -1
  26. package/dist/lib/agents/opencode/agent.d.ts +68 -0
  27. package/dist/lib/agents/opencode/agent.d.ts.map +1 -0
  28. package/dist/lib/agents/opencode/agent.js +166 -0
  29. package/dist/lib/agents/opencode/agent.js.map +1 -0
  30. package/dist/lib/agents/opencode/run.mjs +308 -0
  31. package/dist/lib/agents/plugin/contract.d.ts +157 -0
  32. package/dist/lib/agents/plugin/contract.d.ts.map +1 -0
  33. package/dist/lib/agents/plugin/contract.js +22 -0
  34. package/dist/lib/agents/plugin/contract.js.map +1 -0
  35. package/dist/lib/agents/plugin/orchestrator.d.ts +59 -0
  36. package/dist/lib/agents/plugin/orchestrator.d.ts.map +1 -0
  37. package/dist/lib/agents/plugin/orchestrator.js +346 -0
  38. package/dist/lib/agents/plugin/orchestrator.js.map +1 -0
  39. package/dist/lib/agents/shared.d.ts +17 -1
  40. package/dist/lib/agents/shared.d.ts.map +1 -1
  41. package/dist/lib/agents/shared.js +42 -3
  42. package/dist/lib/agents/shared.js.map +1 -1
  43. package/dist/lib/agents/types.d.ts +8 -1
  44. package/dist/lib/agents/types.d.ts.map +1 -1
  45. package/dist/lib/config.d.ts.map +1 -1
  46. package/dist/lib/config.js +19 -0
  47. package/dist/lib/config.js.map +1 -1
  48. package/dist/lib/fingerprint.d.ts +39 -1
  49. package/dist/lib/fingerprint.d.ts.map +1 -1
  50. package/dist/lib/fingerprint.js +62 -7
  51. package/dist/lib/fingerprint.js.map +1 -1
  52. package/dist/lib/results.d.ts +5 -1
  53. package/dist/lib/results.d.ts.map +1 -1
  54. package/dist/lib/results.js +8 -2
  55. package/dist/lib/results.js.map +1 -1
  56. package/dist/lib/runner.d.ts +3 -0
  57. package/dist/lib/runner.d.ts.map +1 -1
  58. package/dist/lib/runner.js +4 -1
  59. package/dist/lib/runner.js.map +1 -1
  60. package/dist/lib/types.d.ts +20 -0
  61. package/dist/lib/types.d.ts.map +1 -1
  62. package/dist/lib/types.js.map +1 -1
  63. package/package.json +2 -2
  64. package/dist/lib/agents/claude-code.d.ts +0 -33
  65. package/dist/lib/agents/claude-code.d.ts.map +0 -1
  66. package/dist/lib/agents/claude-code.js +0 -310
  67. package/dist/lib/agents/claude-code.js.map +0 -1
  68. package/dist/lib/agents/codex.d.ts +0 -23
  69. package/dist/lib/agents/codex.d.ts.map +0 -1
  70. package/dist/lib/agents/codex.js +0 -364
  71. package/dist/lib/agents/codex.js.map +0 -1
  72. package/dist/lib/agents/cursor.d.ts +0 -10
  73. package/dist/lib/agents/cursor.d.ts.map +0 -1
  74. package/dist/lib/agents/cursor.js +0 -207
  75. package/dist/lib/agents/cursor.js.map +0 -1
  76. package/dist/lib/agents/gemini.d.ts +0 -10
  77. package/dist/lib/agents/gemini.d.ts.map +0 -1
  78. package/dist/lib/agents/gemini.js +0 -208
  79. package/dist/lib/agents/gemini.js.map +0 -1
  80. package/dist/lib/agents/opencode.d.ts +0 -46
  81. package/dist/lib/agents/opencode.d.ts.map +0 -1
  82. package/dist/lib/agents/opencode.js +0 -365
  83. package/dist/lib/agents/opencode.js.map +0 -1
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Generic agent orchestrator.
3
+ *
4
+ * `runWithDefinition` is the single host-side run() that every agent shares. It
5
+ * reproduces the exact flow the old per-agent adapters had (claude-code.ts is the
6
+ * reference), but the agent-specific parts — install, config, auth env, and CLI
7
+ * invocation/transcript-capture — come from the {@link AgentDefinition} and the
8
+ * agent's in-sandbox `run.mjs`.
9
+ *
10
+ * Everything that is agent-AGNOSTIC stays here (and in shared.ts): sandbox
11
+ * lifecycle, the git baseline, the neutral-workspace relocation, validation,
12
+ * generated-file capture, transcript o11y parsing, and abort/timeout handling.
13
+ * None of that can move into the sandbox — it IS the host↔sandbox control plane.
14
+ */
15
+ import type { AgentRunOptions, AgentRunResult } from '../types.js';
16
+ import type { AgentDefinition } from './contract.js';
17
+ /** The judge-config.json payload eval-helper.mjs reads to invoke the judge. */
18
+ interface JudgeRuntimeConfig {
19
+ /** Sandbox-relative runner the judge spawns (codegen run.mjs, or judge-run.mjs). */
20
+ runnerPath: string;
21
+ /** Model the judge grades with (null → let the agent CLI default). */
22
+ model: string | null;
23
+ /** Host-computed runner extra (e.g. codex's resolved model/effort). */
24
+ extra: Record<string, unknown> | null;
25
+ }
26
+ interface JudgeRuntime {
27
+ /** The judge agent's definition (the codegen `def` itself when self-grading). */
28
+ judgeDef: AgentDefinition;
29
+ /** Options the judge runs under (model pinned; apiKey re-resolved if cross-agent). */
30
+ judgeOptions: AgentRunOptions;
31
+ /** True when the judge reuses the codegen agent (no extra install/runner needed). */
32
+ isSelf: boolean;
33
+ /** Auth env set on the vitest process so the in-sandbox judge inherits credentials. */
34
+ authEnv: Record<string, string>;
35
+ /** Judge runner source to ship at JUDGE_RUNNER_PATH; null when self-grading. */
36
+ runnerSource: string | null;
37
+ /** The judge-config.json payload eval-helper.mjs reads. */
38
+ config: JudgeRuntimeConfig;
39
+ }
40
+ /**
41
+ * Resolve the agentic-judge runtime for this run.
42
+ *
43
+ * Default (no `options.judge`): the judge IS the codegen agent+model — self-grading,
44
+ * the historical behavior. No second runner or install is needed; it reuses run.mjs.
45
+ *
46
+ * Pinned (`options.judge` set): the judge grades with a fixed agent+model regardless
47
+ * of the model under test — the apples-to-apples choice for cross-model dashboards.
48
+ * When the pinned agent differs from the codegen agent we resolve ITS definition,
49
+ * key (own env var → VERCEL_OIDC_TOKEN), auth env, and runner from the registry; the
50
+ * caller also installs that agent's CLI (it isn't installed by the codegen setup).
51
+ */
52
+ export declare function resolveJudgeRuntime(def: AgentDefinition, options: AgentRunOptions): JudgeRuntime;
53
+ /**
54
+ * The shared host-side run(). Each agent's createXxxAgent() wires this up with its
55
+ * definition; the public Agent interface is unchanged, so runner.ts is untouched.
56
+ */
57
+ export declare function runWithDefinition(def: AgentDefinition, fixturePath: string, options: AgentRunOptions): Promise<AgentRunResult>;
58
+ export {};
59
+ //# sourceMappingURL=orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../../../src/lib/agents/plugin/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAuBnE,OAAO,KAAK,EAAE,eAAe,EAA+B,MAAM,eAAe,CAAC;AAoBlF,+EAA+E;AAC/E,UAAU,kBAAkB;IAC1B,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACvC;AAED,UAAU,YAAY;IACpB,iFAAiF;IACjF,QAAQ,EAAE,eAAe,CAAC;IAC1B,sFAAsF;IACtF,YAAY,EAAE,eAAe,CAAC;IAC9B,qFAAqF;IACrF,MAAM,EAAE,OAAO,CAAC;IAChB,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,gFAAgF;IAChF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2DAA2D;IAC3D,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,GAAG,YAAY,CAqChG;AAyFD;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,eAAe,EACpB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,cAAc,CAAC,CA6MzB"}
@@ -0,0 +1,346 @@
1
+ /**
2
+ * Generic agent orchestrator.
3
+ *
4
+ * `runWithDefinition` is the single host-side run() that every agent shares. It
5
+ * reproduces the exact flow the old per-agent adapters had (claude-code.ts is the
6
+ * reference), but the agent-specific parts — install, config, auth env, and CLI
7
+ * invocation/transcript-capture — come from the {@link AgentDefinition} and the
8
+ * agent's in-sandbox `run.mjs`.
9
+ *
10
+ * Everything that is agent-AGNOSTIC stays here (and in shared.ts): sandbox
11
+ * lifecycle, the git baseline, the neutral-workspace relocation, validation,
12
+ * generated-file capture, transcript o11y parsing, and abort/timeout handling.
13
+ * None of that can move into the sandbox — it IS the host↔sandbox control plane.
14
+ */
15
+ import { readFileSync } from 'node:fs';
16
+ import { fileURLToPath } from 'node:url';
17
+ import { createSandbox, collectLocalFiles, splitTestFiles, verifyNoTestFiles, } from '../../sandbox.js';
18
+ import { runValidation, captureGeneratedFiles, createVitestConfig, initGitAndCommit, injectTranscriptContext, prepareNeutralWorkspace, resolveAgentApiKey, EVAL_HELPER_PATH, JUDGE_TRANSCRIPT_FILE, JUDGE_CONFIG_PATH, JUDGE_RUNNER_PATH, } from '../shared.js';
19
+ import { getAgent } from '../registry.js';
20
+ /** Well-known paths inside the sandbox for the runner + its result file. */
21
+ const RUNNER_PATH = '__agent_eval__/run.mjs';
22
+ const RESULT_PATH = '__agent_eval__/agent-result.json';
23
+ /**
24
+ * Host-disk path to the in-sandbox eval helper, resolved next to the compiled
25
+ * output (dist/lib/agents/eval-helper.mjs) and in src during dev. Shipped into the
26
+ * sandbox at {@link EVAL_HELPER_PATH} before validation so EVAL.ts judge matchers
27
+ * can re-invoke the agent in this sandbox.
28
+ */
29
+ const EVAL_HELPER_DISK_PATH = fileURLToPath(new URL('../eval-helper.mjs', import.meta.url));
30
+ /**
31
+ * Resolve the agentic-judge runtime for this run.
32
+ *
33
+ * Default (no `options.judge`): the judge IS the codegen agent+model — self-grading,
34
+ * the historical behavior. No second runner or install is needed; it reuses run.mjs.
35
+ *
36
+ * Pinned (`options.judge` set): the judge grades with a fixed agent+model regardless
37
+ * of the model under test — the apples-to-apples choice for cross-model dashboards.
38
+ * When the pinned agent differs from the codegen agent we resolve ITS definition,
39
+ * key (own env var → VERCEL_OIDC_TOKEN), auth env, and runner from the registry; the
40
+ * caller also installs that agent's CLI (it isn't installed by the codegen setup).
41
+ */
42
+ export function resolveJudgeRuntime(def, options) {
43
+ const spec = options.judge;
44
+ // Same harness as codegen (default, or judge.agent omitted/equal): reuse run.mjs,
45
+ // just pin the model when asked. Identical to pre-feature behavior when unset.
46
+ if (!spec || (spec.agent ?? def.name) === def.name) {
47
+ const judgeOptions = spec ? { ...options, model: spec.model } : options;
48
+ return {
49
+ judgeDef: def,
50
+ judgeOptions,
51
+ isSelf: true,
52
+ authEnv: def.authEnv(judgeOptions),
53
+ runnerSource: null,
54
+ config: {
55
+ runnerPath: RUNNER_PATH,
56
+ model: spec?.model ?? options.model ?? null,
57
+ extra: def.runnerExtra?.(judgeOptions) ?? null,
58
+ },
59
+ };
60
+ }
61
+ // Pinned to a DIFFERENT agent — resolve its definition + key + runner.
62
+ const judgeDef = getAgent(spec.agent).definition;
63
+ const judgeApiKey = resolveAgentApiKey(judgeDef.getApiKeyEnvVar) ?? '';
64
+ const judgeOptions = { ...options, model: spec.model, apiKey: judgeApiKey };
65
+ return {
66
+ judgeDef,
67
+ judgeOptions,
68
+ isSelf: false,
69
+ authEnv: judgeDef.authEnv(judgeOptions),
70
+ runnerSource: readFileSync(judgeDef.runnerPath, 'utf8'),
71
+ config: {
72
+ runnerPath: JUDGE_RUNNER_PATH,
73
+ model: spec.model,
74
+ extra: judgeDef.runnerExtra?.(judgeOptions) ?? null,
75
+ },
76
+ };
77
+ }
78
+ /**
79
+ * Run all install steps for an agent, reproducing the old per-step error wording.
80
+ * Throws on final failure so the caller's catch turns it into an error result.
81
+ */
82
+ async function runInstallSteps(sandbox, def, options) {
83
+ for (const step of def.install(options)) {
84
+ const exec = () => step.kind === 'shell'
85
+ ? sandbox.runShell(step.script ?? '')
86
+ : sandbox.runCommand(step.cmd ?? '', step.args ?? []);
87
+ let result = await exec();
88
+ // Optional single retry (the project `npm install` flakes occasionally).
89
+ if (result.exitCode !== 0 && step.retryOnce) {
90
+ result = await exec();
91
+ }
92
+ if (result.exitCode !== 0) {
93
+ // Match the old messages verbatim:
94
+ // last10 → `${prefix} (exit code N):\n<last 10 lines of stdout+stderr>`
95
+ // stderr → `${prefix}: <stderr>`
96
+ if (step.errorBody === 'last10') {
97
+ const body = (result.stdout + result.stderr).trim().split('\n').slice(-10).join('\n');
98
+ throw new Error(`${step.errorPrefix} (exit code ${result.exitCode}):\n${body}`);
99
+ }
100
+ throw new Error(`${step.errorPrefix}: ${result.stderr}`);
101
+ }
102
+ }
103
+ }
104
+ /** Write the agent's config files into the sandbox (codex TOML, opencode.json, …). */
105
+ async function writeConfigFiles(sandbox, def, options) {
106
+ for (const cf of def.configFiles(options)) {
107
+ if (cf.viaShell) {
108
+ // Absolute `~` paths writeFiles can't target (codex heredoc).
109
+ await sandbox.runShell(cf.viaShell);
110
+ }
111
+ else if (cf.path) {
112
+ await sandbox.writeFiles({ [cf.path]: cf.content ?? '' });
113
+ }
114
+ }
115
+ }
116
+ /**
117
+ * Read the RunnerResult the in-sandbox run.mjs produced.
118
+ *
119
+ * Source of truth = the result file. If that can't be read, fall back to the
120
+ * `__AGENT_RESULT__` status line on stdout. If NEITHER is parseable, the runner
121
+ * itself crashed (couldn't spawn node, fs error, …) — throw with the tail so the
122
+ * caller's catch produces a structured error result (mirrors the old CLI-crash path).
123
+ */
124
+ async function readRunnerResult(sandbox, resultPath, nodeResult) {
125
+ // 1. Preferred: the result file.
126
+ try {
127
+ const raw = await sandbox.readFile(resultPath);
128
+ if (raw && raw.trim())
129
+ return JSON.parse(raw);
130
+ }
131
+ catch {
132
+ // fall through to the marker line
133
+ }
134
+ const combined = `${nodeResult.stdout || ''}\n${nodeResult.stderr || ''}`;
135
+ // 2. Fallback: the compact status line (no transcript — it can be huge).
136
+ const markerLine = combined.split('\n').find((l) => l.startsWith('__AGENT_RESULT__'));
137
+ if (markerLine) {
138
+ try {
139
+ const status = JSON.parse(markerLine.slice('__AGENT_RESULT__'.length).trim());
140
+ return {
141
+ ok: !!status.ok,
142
+ output: combined,
143
+ transcript: null,
144
+ observedModel: status.observedModel ?? null,
145
+ error: status.error ?? null,
146
+ agentExitCode: status.agentExitCode ?? -1,
147
+ };
148
+ }
149
+ catch {
150
+ // fall through to the throw
151
+ }
152
+ }
153
+ // 3. Runner crashed — surface the last lines (old "CLI crash" behavior).
154
+ const tail = combined.trim().split('\n').slice(-5).join('\n');
155
+ throw new Error(tail || `agent runner exited with code ${nodeResult.exitCode}`);
156
+ }
157
+ /**
158
+ * The shared host-side run(). Each agent's createXxxAgent() wires this up with its
159
+ * definition; the public Agent interface is unchanged, so runner.ts is untouched.
160
+ */
161
+ export async function runWithDefinition(def, fixturePath, options) {
162
+ const startTime = Date.now();
163
+ let sandbox = null;
164
+ let agentOutput = '';
165
+ let transcript;
166
+ let observedModel;
167
+ let aborted = false;
168
+ let sandboxStopped = false;
169
+ // --- abort wiring (identical to the old adapter) ---------------------------
170
+ const abortHandler = () => {
171
+ aborted = true;
172
+ if (sandbox && !sandboxStopped) {
173
+ sandboxStopped = true;
174
+ sandbox.stop().catch(() => { });
175
+ }
176
+ };
177
+ if (options.signal) {
178
+ if (options.signal.aborted) {
179
+ return { success: false, output: '', error: 'Aborted before start', duration: 0 };
180
+ }
181
+ options.signal.addEventListener('abort', abortHandler);
182
+ }
183
+ try {
184
+ // 1. Collect fixture files; hold test files back until validation.
185
+ const allFiles = await collectLocalFiles(fixturePath);
186
+ const { workspaceFiles, testFiles } = splitTestFiles(allFiles);
187
+ if (aborted) {
188
+ return { success: false, output: '', error: 'Aborted', duration: Date.now() - startTime };
189
+ }
190
+ // 2. Create the sandbox.
191
+ sandbox = await createSandbox({
192
+ timeout: options.timeout,
193
+ runtime: 'node24',
194
+ backend: options.sandbox,
195
+ });
196
+ if (aborted) {
197
+ return {
198
+ success: false,
199
+ output: '',
200
+ error: 'Aborted',
201
+ duration: Date.now() - startTime,
202
+ sandboxId: sandbox.sandboxId,
203
+ };
204
+ }
205
+ // 3. Upload workspace, establish the git baseline, run user setup, relocate to
206
+ // the neutral workspace. (All agent-agnostic; unchanged shared helpers.)
207
+ await sandbox.uploadFiles(workspaceFiles);
208
+ await initGitAndCommit(sandbox);
209
+ if (options.setup) {
210
+ await options.setup(sandbox);
211
+ }
212
+ const neutralWorkspace = await prepareNeutralWorkspace(sandbox);
213
+ // 4. SETUP from the definition: install (project deps + CLI) then config files.
214
+ await runInstallSteps(sandbox, def, options);
215
+ await writeConfigFiles(sandbox, def, options);
216
+ // 4b. If the agentic judge is pinned to a DIFFERENT agent, install its CLI +
217
+ // config too — the codegen setup above only installed the codegen agent.
218
+ // (npm install of project deps re-runs idempotently; the CLI is the point.)
219
+ const judgeRuntime = resolveJudgeRuntime(def, options);
220
+ if (!judgeRuntime.isSelf) {
221
+ await runInstallSteps(sandbox, judgeRuntime.judgeDef, judgeRuntime.judgeOptions);
222
+ await writeConfigFiles(sandbox, judgeRuntime.judgeDef, judgeRuntime.judgeOptions);
223
+ }
224
+ // 5. Guard: no stray test files leaked into the workspace before the agent runs.
225
+ await verifyNoTestFiles(sandbox);
226
+ // 6. Ship the agent's in-sandbox runner. We read run.mjs from disk on the host
227
+ // (next to the compiled definition) and write it into the sandbox.
228
+ const runnerSource = readFileSync(def.runnerPath, 'utf8');
229
+ await sandbox.writeFiles({ [RUNNER_PATH]: runnerSource });
230
+ // 7. INVOKE the runner. Auth + neutral env are set on the node process (merged,
231
+ // neutral overrides — same precedence as the old adapter). The apiKey rides
232
+ // in env only, never in the argv JSON.
233
+ const input = {
234
+ prompt: options.prompt,
235
+ model: options.model,
236
+ modelPolicy: options.modelPolicy,
237
+ webResearch: options.webResearch,
238
+ agentOptions: options.agentOptions,
239
+ cwd: sandbox.getWorkingDirectory(), // post-relocation cwd; transcript paths use it
240
+ resultPath: RESULT_PATH,
241
+ // Optional host-computed values (e.g. codex's resolved model/effort/verbosity
242
+ // that must match the TOML config). Omitted entirely for agents without it.
243
+ extra: def.runnerExtra?.(options),
244
+ };
245
+ const runEnv = { ...def.authEnv(options), ...neutralWorkspace.env };
246
+ const nodeResult = await sandbox.runCommand('node', [RUNNER_PATH, JSON.stringify(input)], { env: runEnv });
247
+ // 8. Read the runner's result (file → marker → throw-on-crash).
248
+ const runnerResult = await readRunnerResult(sandbox, RESULT_PATH, nodeResult);
249
+ agentOutput = runnerResult.output;
250
+ transcript = runnerResult.transcript ?? undefined;
251
+ observedModel = runnerResult.observedModel ?? undefined;
252
+ if (aborted) {
253
+ return {
254
+ success: false,
255
+ output: agentOutput,
256
+ transcript,
257
+ error: 'Aborted',
258
+ duration: Date.now() - startTime,
259
+ sandboxId: sandbox.sandboxId,
260
+ };
261
+ }
262
+ // 9. Agent CLI failed (non-zero exit). Return a failed result, NOT a throw —
263
+ // mirrors the old non-zero-exit path exactly.
264
+ if (!runnerResult.ok) {
265
+ return {
266
+ success: false,
267
+ output: agentOutput,
268
+ transcript,
269
+ error: runnerResult.error ?? `${def.displayName} exited with code ${runnerResult.agentExitCode}`,
270
+ duration: Date.now() - startTime,
271
+ sandboxId: sandbox.sandboxId,
272
+ observedModel,
273
+ };
274
+ }
275
+ // 10. VALIDATION (unchanged shared helpers; parseTranscript runs host-side here).
276
+ // The JUDGE's auth env is set on the eval process so EVAL.ts judge matchers can
277
+ // re-invoke the agent in-sandbox (the vitest process inherits it to children).
278
+ // By default the judge is the codegen agent+model; options.judge pins a fixed one
279
+ // (judgeRuntime was resolved at step 4b so its CLI could be installed).
280
+ const validationEnv = { ...judgeRuntime.authEnv, ...neutralWorkspace.env };
281
+ if (options.validation !== 'none') {
282
+ await sandbox.uploadFiles(testFiles);
283
+ await createVitestConfig(sandbox);
284
+ await injectTranscriptContext(sandbox, transcript, def.o11yAgentName, options.model);
285
+ // Judge runtime: ship the eval helper, materialize the raw transcript as a
286
+ // file the judge agent can read by path, record the judge config, and — only
287
+ // when the judge is a DIFFERENT agent — ship its runner alongside run.mjs.
288
+ const judgeFiles = {
289
+ [EVAL_HELPER_PATH]: readFileSync(EVAL_HELPER_DISK_PATH, 'utf8'),
290
+ [JUDGE_TRANSCRIPT_FILE]: transcript ?? '',
291
+ [JUDGE_CONFIG_PATH]: JSON.stringify(judgeRuntime.config),
292
+ };
293
+ if (judgeRuntime.runnerSource) {
294
+ judgeFiles[JUDGE_RUNNER_PATH] = judgeRuntime.runnerSource;
295
+ }
296
+ await sandbox.writeFiles(judgeFiles);
297
+ }
298
+ const validationResults = await runValidation(sandbox, options.scripts ?? [], options.validation, validationEnv);
299
+ // 11. Capture generated/deleted files (git diff).
300
+ const { generatedFiles, deletedFiles } = await captureGeneratedFiles(sandbox);
301
+ return {
302
+ success: validationResults.allPassed,
303
+ output: agentOutput,
304
+ transcript,
305
+ duration: Date.now() - startTime,
306
+ testResult: validationResults.test,
307
+ scriptsResults: validationResults.scripts,
308
+ sandboxId: sandbox.sandboxId,
309
+ generatedFiles,
310
+ deletedFiles,
311
+ observedModel,
312
+ };
313
+ }
314
+ catch (error) {
315
+ // Abort wins over a generic error (same as the old adapter).
316
+ if (aborted) {
317
+ return {
318
+ success: false,
319
+ output: agentOutput,
320
+ transcript,
321
+ error: 'Aborted',
322
+ duration: Date.now() - startTime,
323
+ sandboxId: sandbox?.sandboxId,
324
+ };
325
+ }
326
+ return {
327
+ success: false,
328
+ output: agentOutput,
329
+ transcript,
330
+ error: error instanceof Error ? error.message : String(error),
331
+ duration: Date.now() - startTime,
332
+ sandboxId: sandbox?.sandboxId,
333
+ observedModel,
334
+ };
335
+ }
336
+ finally {
337
+ if (options.signal) {
338
+ options.signal.removeEventListener('abort', abortHandler);
339
+ }
340
+ if (sandbox && !sandboxStopped) {
341
+ sandboxStopped = true;
342
+ await sandbox.stop();
343
+ }
344
+ }
345
+ }
346
+ //# sourceMappingURL=orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../../../src/lib/agents/plugin/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAElB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,g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;QACD,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,WAAW;YACnB,UAAU;YACV,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAC7D,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;YAChC,SAAS,EAAE,OAAO,EAAE,SAAS;YAC7B,aAAa;SACd,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5D,CAAC;QACD,IAAI,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/B,cAAc,GAAG,IAAI,CAAC;YACtB,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -15,6 +15,22 @@ type AnySandbox = SandboxManager | DockerSandboxManager;
15
15
  export declare const TRANSCRIPT_CONTEXT_DIR = "__agent_eval__";
16
16
  /** Path to the results file inside the sandbox. */
17
17
  export declare const TRANSCRIPT_CONTEXT_PATH = "__agent_eval__/results.json";
18
+ /** The in-sandbox eval helper, aliased to `@vercel/agent-eval/eval` for EVAL.ts. */
19
+ export declare const EVAL_HELPER_PATH = "__agent_eval__/eval-helper.mjs";
20
+ /** Raw transcript materialized as a file so the judge agent can read it by path. */
21
+ export declare const JUDGE_TRANSCRIPT_FILE = "__agent_eval__/transcript.txt";
22
+ /** Judge config (`{ runnerPath, model, extra }`) read by eval-helper.mjs. */
23
+ export declare const JUDGE_CONFIG_PATH = "__agent_eval__/judge-config.json";
24
+ /** The judge agent's runner, shipped separately ONLY when the judge agent differs
25
+ * from the codegen agent. When they match, the judge reuses the codegen run.mjs. */
26
+ export declare const JUDGE_RUNNER_PATH = "__agent_eval__/judge-run.mjs";
27
+ /**
28
+ * Resolve an agent's API key from the host env. Single source of truth shared by
29
+ * the CLI (codegen agent) and the orchestrator (a pinned judge agent): the agent's
30
+ * own key env var, falling back to VERCEL_OIDC_TOKEN — which authenticates both the
31
+ * Vercel Sandbox and the AI Gateway. Returns undefined when neither is set.
32
+ */
33
+ export declare function resolveAgentApiKey(getApiKeyEnvVar: () => string): string | undefined;
18
34
  /**
19
35
  * Combined validation results.
20
36
  */
@@ -30,7 +46,7 @@ export interface NeutralWorkspace {
30
46
  /**
31
47
  * Run validation scripts in the sandbox.
32
48
  */
33
- export declare function runValidation(sandbox: AnySandbox, scripts: string[], validation?: ValidationMode): Promise<ValidationResults>;
49
+ export declare function runValidation(sandbox: AnySandbox, scripts: string[], validation?: ValidationMode, env?: Record<string, string>): Promise<ValidationResults>;
34
50
  export declare function prepareNeutralWorkspace(sandbox: AnySandbox): Promise<NeutralWorkspace>;
35
51
  export declare function initGitAndCommit(sandbox: AnySandbox): Promise<void>;
36
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/lib/agents/shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,6CAA6C;AAC7C,KAAK,UAAU,GAAG,cAAc,GAAG,oBAAoB,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,mDAAmD;AACnD,eAAO,MAAM,uBAAuB,gCAA2C,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE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C,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAqC5B;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA0B5F;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAYzE;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC;IAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAmC7E;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B3E;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,UAAU,EACnB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAEnB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa;;CAEhB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa;;CAEhB,CAAC"}
@@ -10,6 +10,27 @@ import { parseTranscript } from '../o11y/index.js';
10
10
  export const TRANSCRIPT_CONTEXT_DIR = '__agent_eval__';
11
11
  /** Path to the results file inside the sandbox. */
12
12
  export const TRANSCRIPT_CONTEXT_PATH = `${TRANSCRIPT_CONTEXT_DIR}/results.json`;
13
+ // ── Agentic-judge runtime, shipped into the sandbox before validation ──────────
14
+ // These paths are mirrored as literals in eval-helper.mjs (a zero-dep file that
15
+ // cannot import this module). Keep the two in sync.
16
+ /** The in-sandbox eval helper, aliased to `@vercel/agent-eval/eval` for EVAL.ts. */
17
+ export const EVAL_HELPER_PATH = `${TRANSCRIPT_CONTEXT_DIR}/eval-helper.mjs`;
18
+ /** Raw transcript materialized as a file so the judge agent can read it by path. */
19
+ export const JUDGE_TRANSCRIPT_FILE = `${TRANSCRIPT_CONTEXT_DIR}/transcript.txt`;
20
+ /** Judge config (`{ runnerPath, model, extra }`) read by eval-helper.mjs. */
21
+ export const JUDGE_CONFIG_PATH = `${TRANSCRIPT_CONTEXT_DIR}/judge-config.json`;
22
+ /** The judge agent's runner, shipped separately ONLY when the judge agent differs
23
+ * from the codegen agent. When they match, the judge reuses the codegen run.mjs. */
24
+ export const JUDGE_RUNNER_PATH = `${TRANSCRIPT_CONTEXT_DIR}/judge-run.mjs`;
25
+ /**
26
+ * Resolve an agent's API key from the host env. Single source of truth shared by
27
+ * the CLI (codegen agent) and the orchestrator (a pinned judge agent): the agent's
28
+ * own key env var, falling back to VERCEL_OIDC_TOKEN — which authenticates both the
29
+ * Vercel Sandbox and the AI Gateway. Returns undefined when neither is set.
30
+ */
31
+ export function resolveAgentApiKey(getApiKeyEnvVar) {
32
+ return process.env[getApiKeyEnvVar()] ?? process.env.VERCEL_OIDC_TOKEN;
33
+ }
13
34
  /**
14
35
  * Detect which eval file exists in the sandbox (EVAL.ts or EVAL.tsx).
15
36
  * Case-sensitive: Only matches exact uppercase filenames.
@@ -40,7 +61,11 @@ async function detectEvalFile(sandbox) {
40
61
  /**
41
62
  * Run validation scripts in the sandbox.
42
63
  */
43
- export async function runValidation(sandbox, scripts, validation = 'vitest') {
64
+ export async function runValidation(sandbox, scripts, validation = 'vitest',
65
+ // Auth/neutral env for the eval process. EVAL.ts judge matchers re-invoke the
66
+ // agent CLI in-sandbox, which needs the same credentials the codegen run used —
67
+ // so the vitest process must carry them (it inherits them to its child spawns).
68
+ env) {
44
69
  const results = {
45
70
  allPassed: true,
46
71
  scripts: {},
@@ -49,7 +74,7 @@ export async function runValidation(sandbox, scripts, validation = 'vitest') {
49
74
  // Detect which eval file exists (EVAL.ts or EVAL.tsx)
50
75
  const evalFile = await detectEvalFile(sandbox);
51
76
  // Always run vitest for the eval file (explicitly specify the file)
52
- const testResult = await sandbox.runCommand('npx', ['vitest', 'run', evalFile]);
77
+ const testResult = await sandbox.runCommand('npx', ['vitest', 'run', evalFile], env ? { env } : undefined);
53
78
  results.test = {
54
79
  success: testResult.exitCode === 0,
55
80
  output: testResult.stdout + testResult.stderr,
@@ -95,7 +120,9 @@ export async function prepareNeutralWorkspace(sandbox) {
95
120
  }
96
121
  export async function initGitAndCommit(sandbox) {
97
122
  await sandbox.writeFiles({
98
- ".gitignore": "node_modules/\n",
123
+ // `__agent_eval__/` holds framework scaffolding only (the runner, transcript,
124
+ // judge I/O) — never agent output — so keep it out of the captured git diff.
125
+ ".gitignore": "node_modules/\n__agent_eval__/\n",
99
126
  });
100
127
  // init a git repo and set user and name since those are needed. Commit everything to have a clean diff with HEAD to capture
101
128
  // the generated files
@@ -145,6 +172,10 @@ export async function captureGeneratedFiles(sandbox) {
145
172
  export async function createVitestConfig(sandbox) {
146
173
  // Detect which eval file exists
147
174
  const evalFile = await detectEvalFile(sandbox);
175
+ // Absolute path to the shipped eval helper. It is BOTH the source of the
176
+ // `environment`/`transcript` exports (aliased to `@vercel/agent-eval/eval`) and
177
+ // the setup file that registers the judge matchers via expect.extend.
178
+ const helperPath = `${sandbox.getWorkingDirectory()}/${EVAL_HELPER_PATH}`;
148
179
  await sandbox.writeFiles({
149
180
  'vitest.config.ts': `
150
181
  import { defineConfig } from 'vitest/config';
@@ -152,6 +183,14 @@ export default defineConfig({
152
183
  test: {
153
184
  include: ['${evalFile}'],
154
185
  globals: false,
186
+ // Agentic judge matchers spawn a full agent run in-sandbox; give them room.
187
+ // The sandbox-level timeout is the real bound.
188
+ testTimeout: 900000,
189
+ hookTimeout: 900000,
190
+ setupFiles: ['${helperPath}'],
191
+ },
192
+ resolve: {
193
+ alias: { '@vercel/agent-eval/eval': '${helperPath}' },
155
194
  },
156
195
  });
157
196
  `,
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/lib/agents/shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEvD,mDAAmD;AACnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,sBAAsB,eAAe,CAAC;AAgBhF;;;;GAIG;AACH,KAAK,UAAU,cAAc,CAAC,OAAmB;IAC/C,IAAI,CAAC;QACH,iEAAiE;QACjE,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,QAAQ,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAE/D,sDAAsD;YACtD,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC/B,OAAO,UAAU,CAAC;YACpB,CAAC;YAED,oBAAoB;YACpB,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC9B,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,gBAAgB;IAClB,CAAC;IAED,2DAA2D;IAC3D,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAmB,EACnB,OAAiB,EACjB,aA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AC;QAEF,MAAM,OAAO,CAAC,UAAU,CAAC;YACvB,CAAC,uBAAuB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;SAC5D,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,8DAA8D;IAChE,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE,8BAA8B;IACvC,aAAa,EAAE,iCAAiC;IAChD,YAAY,EAAE,oBAAoB;CAC1B,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY,EAAE,mBAAmB;CACzB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,2BAA2B;IACpC,YAAY,EAAE,gBAAgB;CACtB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,gBAAgB;CACtB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,gBAAgB;CACtB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Agent interface and common types for all agents.
3
3
  */
4
- import type { ModelPolicy, ModelTier, SetupFunction, SandboxBackend, ValidationMode } from '../types.js';
4
+ import type { JudgeConfig, ModelPolicy, ModelTier, SetupFunction, SandboxBackend, ValidationMode } from '../types.js';
5
+ import type { AgentDefinition } from './plugin/contract.js';
5
6
  /**
6
7
  * Common options for all agents.
7
8
  */
@@ -44,6 +45,9 @@ export interface AgentRunOptions {
44
45
  webResearch?: boolean;
45
46
  /** Agent-specific options (e.g., binaryUrl, extraProviders for opencode) */
46
47
  agentOptions?: Record<string, unknown>;
48
+ /** Pin the agentic LLM judge to a fixed agent+model. Undefined → the judge
49
+ * self-grades with this run's agent+model. */
50
+ judge?: JudgeConfig;
47
51
  }
48
52
  /**
49
53
  * Result from running a script.
@@ -93,5 +97,8 @@ export interface Agent {
93
97
  getApiKeyEnvVar(): string;
94
98
  /** Get the default model for this agent */
95
99
  getDefaultModel(): ModelTier;
100
+ /** The host-side definition (auth, runner path, install). Exposed so the
101
+ * orchestrator can resolve a DIFFERENT agent as the judge via the registry. */
102
+ definition: AgentDefinition;
96
103
  }
97
104
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/agents/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEzG;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,qCAAqC;IACrC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAClC;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,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