@ggui-ai/ui-gen 0.24.0 → 0.26.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.
- package/README.md +2 -2
- package/dist/{adapter-Du7P_5Fx.d.ts → adapter-BJwn74rx.d.ts} +49 -1
- package/dist/adapters/generation-dispatch.d.ts +32 -7
- package/dist/adapters/generation-dispatch.js +1997 -216
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +29 -6
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +15 -12
- package/dist/advanced/index.js +2013 -270
- package/dist/advanced/index.js.map +1 -1
- package/dist/{axes-CzLEMDeB.d.ts → axes-CKVCzR_x.d.ts} +1 -1
- package/dist/bank-Ctdp3FUA.d.ts +118 -0
- package/dist/blueprint-validator.js +416 -92
- package/dist/blueprint-validator.js.map +1 -1
- package/dist/boilerplate.d.ts +2 -2
- package/dist/boilerplate.js +34 -15
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +13 -5
- package/dist/check/index.js +56 -3
- package/dist/check/index.js.map +1 -1
- package/dist/classifier/index.d.ts +2 -2
- package/dist/compose.d.ts +2 -2
- package/dist/{create-ui-generator-GIhzx08x.d.ts → create-ui-generator-N4gRXpcL.d.ts} +11 -4
- package/dist/{design-mode-DLufhrNp.d.ts → design-mode-DGWN_Gkm.d.ts} +1 -1
- package/dist/{dispatch-BnAH56p4.d.ts → dispatch-BUoXRj_r.d.ts} +6 -4
- package/dist/evaluation/axis-checks/index.d.ts +7 -6
- package/dist/evaluation/axis-checks/index.js +90 -2
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +6 -5
- package/dist/evaluation/axis-checks/registry.js +88 -1
- package/dist/evaluation/axis-checks/registry.js.map +1 -1
- package/dist/evaluation/index.d.ts +189 -344
- package/dist/evaluation/index.js +1272 -59
- package/dist/evaluation/index.js.map +1 -1
- package/dist/evaluation/types.d.ts +26 -1
- package/dist/evaluation/types.js.map +1 -1
- package/dist/fragments/index.d.ts +3 -3
- package/dist/{generate-9IeNT4ZY.d.ts → generate-tSO_shQ0.d.ts} +1 -1
- package/dist/harness/check/runtime-render/index.d.ts +7 -7
- package/dist/harness/check/runtime-render/index.js +416 -92
- package/dist/harness/check/runtime-render/index.js.map +1 -1
- package/dist/harness/check/runtime-render/render-check-worker.js +393 -88
- package/dist/harness/check/runtime-render/render-check-worker.js.map +1 -1
- package/dist/harness/index.d.ts +5 -6
- package/dist/harness/index.js +69 -20
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/prompts.d.ts +2 -2
- package/dist/harness/prompts.js +10 -1
- package/dist/harness/prompts.js.map +1 -1
- package/dist/harness/result-types.d.ts +19 -5
- package/dist/harness/result-types.js.map +1 -1
- package/dist/harness/runtime.d.ts +21 -7
- package/dist/harness/runtime.js +36 -17
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +6 -4
- package/dist/harness/types-public.js +43 -18
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +6 -5
- package/dist/hash.d.ts +1 -1
- package/dist/index.d.ts +64 -13
- package/dist/index.js +2023 -270
- package/dist/index.js.map +1 -1
- package/dist/patch.d.ts +5 -5
- package/dist/policy.d.ts +1 -1
- package/dist/{prompts-YU9piOgs.d.ts → prompts-BhNUuRoZ.d.ts} +1 -1
- package/dist/tools/get-primitives-ts.d.ts +1 -1
- package/dist/tools/get-primitives-ts.js +1 -1
- package/dist/tools/get-primitives-ts.js.map +1 -1
- package/dist/tools/render-check-worker.js +8 -1
- package/dist/tools/render-check-worker.js.map +1 -1
- package/dist/{types-BOvHNG7K.d.ts → types-Dh1s4K9j.d.ts} +1 -1
- package/dist/types-public-B7wn4ce5.d.ts +959 -0
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/visual-evaluator-C9L-o6ap.d.ts +639 -0
- package/dist/workflows.d.ts +5 -5
- package/package.json +12 -12
- package/src/adapters/generation-dispatch.ts +38 -2
- package/src/adapters/tools.ts +2 -1
- package/src/boilerplate/free-design-prompt.ts +4 -4
- package/src/boilerplate/generate.ts +26 -1
- package/src/boilerplate/hard-sections.ts +14 -14
- package/src/boilerplate/system-prompt.ts +1 -1
- package/src/boilerplate/templates/layouts/chat-mobile.tsx.tmpl +3 -1
- package/src/boilerplate/templates/layouts/chat-universal.tsx.tmpl +3 -1
- package/src/boilerplate/templates/layouts/fullscreen-desktop.tsx.tmpl +3 -1
- package/src/boilerplate/templates/layouts/fullscreen-universal.tsx.tmpl +3 -1
- package/src/check/index.ts +1 -0
- package/src/check/run-tier0.ts +6 -3
- package/src/check/sample-props.ts +63 -0
- package/src/coding-agent/tools.ts +4 -1
- package/src/contract-context.ts +1 -1
- package/src/create-harness.ts +3 -3
- package/src/create-ui-generator.ts +20 -1
- package/src/evaluation/__fixtures__/png.ts +100 -0
- package/src/evaluation/axis-checks/checks/state-merge.ts +1 -1
- package/src/evaluation/axis-checks/checks/universal.ts +111 -0
- package/src/evaluation/axis-checks/dispatch.ts +4 -1
- package/src/evaluation/cost-tracker.ts +54 -6
- package/src/evaluation/criteria/bank.ts +85 -0
- package/src/evaluation/criteria/context.ts +52 -0
- package/src/evaluation/criteria/edge-probe.ts +286 -0
- package/src/evaluation/criteria/edge.ts +202 -0
- package/src/evaluation/criteria/resolve.ts +207 -0
- package/src/evaluation/criteria/select.ts +79 -0
- package/src/evaluation/index.ts +27 -0
- package/src/evaluation/ink-extent.ts +200 -0
- package/src/evaluation/judge-spend.ts +48 -0
- package/src/evaluation/theme-css.ts +12 -5
- package/src/evaluation/types-public.ts +221 -3
- package/src/evaluation/types.ts +19 -0
- package/src/evaluation/visual-evaluator.ts +853 -51
- package/src/harness/check/runtime-render/adapter.ts +18 -0
- package/src/harness/check/runtime-render/probe-pending.ts +111 -0
- package/src/harness/check/runtime-render/render-check-host.ts +10 -6
- package/src/harness/check/runtime-render/render-check-worker.ts +6 -3
- package/src/harness/check/runtime-render/render-check.ts +417 -133
- package/src/harness/check/runtime-render/walk.ts +200 -0
- package/src/harness/coding/assemble-result.ts +2 -0
- package/src/harness/coding/generate-task-runner.ts +30 -0
- package/src/harness/coding/init-session.ts +5 -3
- package/src/harness/coding/run-coding-turn.ts +12 -4
- package/src/harness/coding/run-eval-round.ts +82 -3
- package/src/harness/in-loop-evaluation.ts +39 -0
- package/src/harness/llm-router.ts +58 -1
- package/src/harness/result-types.ts +9 -0
- package/src/harness/runtime.ts +14 -0
- package/src/harness/types-public.ts +10 -1
- package/src/harness-tool-names.ts +38 -0
- package/src/index.ts +17 -0
- package/src/internal/verdict-line.ts +33 -0
- package/src/run-check.ts +2 -0
- package/src/taught-tokens.ts +32 -0
- package/src/tools/get-primitives-ts.ts +1 -1
- package/src/tools/get-wire.ts +1 -1
- package/src/tools/render-check-worker.ts +2 -1
- package/src/tools/render-check.ts +8 -67
- package/src/tools.ts +11 -1
- package/src/validation/primitives.ts +1 -1
- package/dist/llm-router-DwwUK1bz.d.ts +0 -265
- package/dist/types-public-Bk6d1WLN.d.ts +0 -451
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AxisCheck, a as AxisCheckInput,
|
|
1
|
+
import { r as CriteriaSelection, h as CriteriaContext, C as CriteriaAnswerCounts, s as VisionFinishReason, k as CriteriaBlock } from '../types-public-B7wn4ce5.js';
|
|
2
|
+
export { A as AxisCheck, a as AxisCheckInput, t as CRITERIA, n as CanvasHostPresentation, j as CanvasJudgeRecord, l as CanvasPresentationOutcome, u as CanvasVisualSummary, v as ContractFeedbackRecord, w as CriterionCoverage, x as CriterionRunStatus, D as DEFAULT_QUALITY_CONFIG, y as EvalCategory, z as EvalCriterion, E as EvalIssue, B as EvalOutcome, e as EvalResult, q as EvalTier, H as HostInlineFrame, F as HostPresentationIgnoredReason, G as LLM_EVAL_STATIC_CRITERIA, I as Priority, Q as QualityConfig, K as QualityMode, o as VisualEvalSummary, M as buildCodingCriteriaSummary, N as criteriaFor, O as getActionableIssues, S as getCriteriaByPriority, T as getCriterionById, U as getLLMCriteria, W as isBlocked, m as matches, X as notApplicableCoverage, Y as priorityForIssue } from '../types-public-B7wn4ce5.js';
|
|
3
3
|
import * as _anthropic_ai_claude_agent_sdk from '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import { McpServerConfig } from '@anthropic-ai/claude-agent-sdk';
|
|
5
|
-
import { EvaluationContext, EvaluationConfig, QualityMetadata, EvaluationResult, EvaluationIssue } from './types.js';
|
|
5
|
+
import { EvaluationContext, EvaluationConfig, QualityMetadata, EvaluationResult, EvaluationIssue, CriteriaAnswer } from './types.js';
|
|
6
6
|
export { DEFAULT_EVAL_MAX_ROUNDS, DimensionScores, MAX_EVAL_ROUNDS_HARD_LIMIT } from './types.js';
|
|
7
|
-
export { R as RunAxisChecksInput, r as runAxisChecks } from '../dispatch-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { C as CanvasClass, g as CanvasViewport } from '../design-mode-DLufhrNp.js';
|
|
12
|
-
export { a as CANVAS_BREAKPOINTS, b as CANVAS_CLASSES, c as CANVAS_DESCRIPTORS, d as CANVAS_VIEWPORTS, e as CanvasDescriptor, f as CanvasDisplayMode, j as canvasDisplayModeForShell, k as canvasForRendering, l as canvasForViewportWidth, m as describeCanvas } from '../design-mode-DLufhrNp.js';
|
|
7
|
+
export { R as RunAxisChecksInput, r as runAxisChecks } from '../dispatch-BUoXRj_r.js';
|
|
8
|
+
import { E as EdgeVerdict, a as EdgeBlock, C as CriteriaCallTokens } from '../visual-evaluator-C9L-o6ap.js';
|
|
9
|
+
export { b as CARD_HEIGHT_EXPRESSION, c as CONTENT_HEIGHT_EXPRESSION, d as CanvasFitPolicy, e as CanvasVisualResult, f as CaptureMode, g as ChromiumProvider, h as CriteriaContextInput, i as CriteriaContextSources, j as EDGE_TOLERANCE_PX, k as EdgeOffset, H as HOST_COLOUR_PATTERN, l as HOST_FRAME_BOUNDS, J as JUDGE_GROUND_MARGIN_PX, m as JUDGE_INK_INSET_PX, n as JudgeDesignIdentity, N as NaturalCaptureOptions, S as ScreenshotAttempt, o as ScreenshotBrowser, p as ScreenshotClip, q as ScreenshotDeps, r as ScreenshotLauncher, s as ScreenshotPage, t as StoredCaptureInput, u as StoredCaptureOutcome, v as StoredCaptureVerdict, w as VISUAL_EVAL_PROMPT, x as VISUAL_JUDGE_MAX_OUTPUT_TOKENS, y as VISUAL_JUDGE_PROMPT_DIGEST, z as VISUAL_JUDGE_PROMPT_VERSION, A as VisualEvalConfig, B as VisualEvalContext, D as VisualEvalDeps, F as VisualEvalDetailed, G as VisualEvalOutcome, I as VisualEvaluationResult, V as VisualLegTokens, K as callMultimodalLLM, L as canvasBlankIssue, M as canvasFitPolicy, O as canvasOverflowIssue, P as captureScreenshot, Q as captureScreenshotDetailed, R as chromaOfCssTokens, T as criteriaContextFor, U as designTreeSha256, W as judgeDesignIdentity, X as judgeEdges, Y as judgeStoredCapture, Z as resetJudgeDesignIdentityCache, _ as resolveDesignPackageDir, $ as resolveLaunchOptions, a0 as runVisualEval, a1 as runVisualEvaluation, a2 as runVisualEvaluationDetailed, a3 as summarizeVisualResult } from '../visual-evaluator-C9L-o6ap.js';
|
|
10
|
+
export { b as CANVAS_BREAKPOINTS, c as CANVAS_CLASSES, d as CANVAS_DESCRIPTORS, e as CANVAS_VIEWPORTS, C as CanvasClass, f as CanvasDescriptor, g as CanvasDisplayMode, a as CanvasViewport, j as canvasDisplayModeForShell, k as canvasForRendering, l as canvasForViewportWidth, m as describeCanvas } from '../design-mode-DGWN_Gkm.js';
|
|
13
11
|
import { AppTheme } from '@ggui-ai/protocol';
|
|
14
|
-
import '
|
|
15
|
-
|
|
16
|
-
import '../types-BOvHNG7K.js';
|
|
12
|
+
import { C as CriteriaBank } from '../bank-Ctdp3FUA.js';
|
|
13
|
+
export { B as BankRow, a as CriteriaScope, b as bankRows, c as criteriaBankSchema, p as parseCriteriaBank } from '../bank-Ctdp3FUA.js';
|
|
17
14
|
import '../llm.js';
|
|
15
|
+
import '@ggui-ai/mcp-server-core';
|
|
16
|
+
import '../axes-CKVCzR_x.js';
|
|
17
|
+
import '../types-Dh1s4K9j.js';
|
|
18
|
+
import '../styling-profile-CxfvV48g.js';
|
|
19
|
+
import 'puppeteer-core';
|
|
20
|
+
import 'zod';
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
23
|
* Options for running the evaluation loop.
|
|
@@ -186,364 +189,206 @@ declare function extractCompiledCode(messages: SdkMessage[]): string | undefined
|
|
|
186
189
|
*/
|
|
187
190
|
declare function extractSourceCode(messages: SdkMessage[]): string | undefined;
|
|
188
191
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
readonly
|
|
192
|
+
/** A channel difference at or below this is the same colour (anti-aliasing and compositing noise). */
|
|
193
|
+
declare const INK_TOLERANCE = 8;
|
|
194
|
+
interface PixelRegion {
|
|
195
|
+
readonly x: number;
|
|
196
|
+
readonly y: number;
|
|
197
|
+
readonly width: number;
|
|
198
|
+
readonly height: number;
|
|
194
199
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
* tree — a phantom design skew for any caller composing the path.
|
|
205
|
-
*/
|
|
206
|
-
declare function designTreeSha256(root: string): string;
|
|
207
|
-
/**
|
|
208
|
-
* The identity of the tree at `src`, computed once per process per path (a
|
|
209
|
-
* judge run paints hundreds of frames from one tree).
|
|
210
|
-
*
|
|
211
|
-
* `null` when the tree cannot be READ (ggui#1110): a deployed image ships the
|
|
212
|
-
* design package as built output with no `src/`, and an identity is a receipt
|
|
213
|
-
* about a judgement — never a precondition for making one. Before this,
|
|
214
|
-
* `scandir` threw ENOENT inside the evaluation round wherever the package ships
|
|
215
|
-
* built output only, the round returned no evaluation at all, and a bar refused
|
|
216
|
-
* a card that had cleared it. A row without the receipt says so; a round that cannot
|
|
217
|
-
* stamp one still runs.
|
|
218
|
-
*/
|
|
219
|
-
declare function judgeDesignIdentity(src: string): JudgeDesignIdentity | null;
|
|
220
|
-
/** Test seam: forget cached identities (a test that rewrites a tree between runs). */
|
|
221
|
-
declare function resetJudgeDesignIdentityCache(): void;
|
|
222
|
-
|
|
223
|
-
interface VisualEvalConfig {
|
|
224
|
-
/** LLM provider for multimodal evaluation */
|
|
225
|
-
provider: 'claude' | 'google';
|
|
226
|
-
/** Model ID (must support vision/multimodal) */
|
|
227
|
-
model?: string;
|
|
228
|
-
/** Pass threshold for visual score (0-100) */
|
|
229
|
-
passThreshold: number;
|
|
230
|
-
/** Sample props to render the component with */
|
|
231
|
-
sampleProps?: Record<string, unknown>;
|
|
232
|
-
/** Viewport dimensions for screenshot */
|
|
233
|
-
viewport?: {
|
|
234
|
-
width: number;
|
|
235
|
-
height: number;
|
|
236
|
-
};
|
|
237
|
-
/**
|
|
238
|
-
* Per-canvas judging — ARM-NEUTRAL (the same judge, prompt and
|
|
239
|
-
* threshold in every design mode). When set, the SAME rendered HTML
|
|
240
|
-
* shell is screenshotted once per class at `CANVAS_VIEWPORTS[class]`
|
|
241
|
-
* and judged once per class; the result carries one entry per class
|
|
242
|
-
* in `canvases`, and the single-shot fields aggregate: `finalScore` =
|
|
243
|
-
* mean of the canvas scores (rounded), `passed` = every canvas passed,
|
|
244
|
-
* `dimensions` = per-dimension means, `issues` = every canvas's issues
|
|
245
|
-
* (description prefixed `[<canvas>]`). Unset (or empty) = today's
|
|
246
|
-
* single screenshot at `viewport`; no `canvases` field on the result.
|
|
247
|
-
*/
|
|
248
|
-
canvases?: readonly CanvasClass[];
|
|
249
|
-
/**
|
|
250
|
-
* ggui#1195 — the box a canvas is COMPOSED for and CAPTURED at when the
|
|
251
|
-
* order declared one (the chat card at the visitor's real column, not the
|
|
252
|
-
* class's 400×640). Keyed by canvas; a canvas without an entry is judged
|
|
253
|
-
* at `CANVAS_VIEWPORTS[canvas]` as before. The composer's
|
|
254
|
-
* `rendering.viewport` and this entry are ONE value written once (the
|
|
255
|
-
* seam derives it), so the judge never scores a box the mint did not
|
|
256
|
-
* target. Only read in per-canvas mode. Captured at WHOLE CSS px: the
|
|
257
|
-
* browser's device-metrics override takes integers (measured — a 383.5 px
|
|
258
|
-
* width is refused by CDP), so a fractional declared box is rounded once
|
|
259
|
-
* where it enters and the capture, the ceiling and the reported
|
|
260
|
-
* `viewport` all carry that same integer box.
|
|
261
|
-
*/
|
|
262
|
-
canvasViewports?: Partial<Readonly<Record<CanvasClass, CanvasViewport>>>;
|
|
263
|
-
/**
|
|
264
|
-
* Optional provider-routing override — see
|
|
265
|
-
* `AgentConfig.routeOverride`. Threaded onto the agent this
|
|
266
|
-
* evaluator constructs so its multimodal call never falls back to
|
|
267
|
-
* `process.env` for credentials or model routing.
|
|
268
|
-
*/
|
|
269
|
-
/**
|
|
270
|
-
* Vision calls per judged canvas on the SAME captured frame, aggregated by
|
|
271
|
-
* the median (ggui#1072). Default 1 — a single judgement, byte-identical to
|
|
272
|
-
* the instrument before this option existed. K is an instrument dial: a
|
|
273
|
-
* run mixes K at its own peril.
|
|
274
|
-
*/
|
|
275
|
-
judgeK?: number;
|
|
276
|
-
/** The canvases sampled `judgeK` times; default = every judged canvas when `judgeK > 1`. */
|
|
277
|
-
judgeKCanvases?: readonly CanvasClass[];
|
|
278
|
-
/**
|
|
279
|
-
* The design `src` tree the judge bundles the component against
|
|
280
|
-
* (ggui#1042): an explicit input, so a judge-only re-judge names the tree
|
|
281
|
-
* it painted with. Default: the design package beside this one.
|
|
282
|
-
*/
|
|
283
|
-
designSrcDir?: string;
|
|
284
|
-
/** The mode the caller composed `cssTokens` in — a receipt on the row, never a switch (ggui#1076: judge and runtime must name the same mode). */
|
|
285
|
-
themeMode?: 'light' | 'dark';
|
|
286
|
-
routeOverride?: AgentConfig['routeOverride'];
|
|
287
|
-
/**
|
|
288
|
-
* Provider-429-retry observer — see `AgentConfig.onRetry`.
|
|
289
|
-
* Without it, a rate-limited retry inside the evaluation call
|
|
290
|
-
* happens (the agent's retry loop is unconditional) but never
|
|
291
|
-
* reaches the caller's structured log.
|
|
292
|
-
*/
|
|
293
|
-
onRetry?: AgentConfig['onRetry'];
|
|
200
|
+
interface InkExtent {
|
|
201
|
+
/** `(lastInkRow + 1) / region.height`, rounded to 3 places; `0` when nothing differs from the ground. */
|
|
202
|
+
readonly ratio: number;
|
|
203
|
+
/** The last region row (0-based from the region's top) carrying ink; `null` when there is none — the blank. */
|
|
204
|
+
readonly lastInkRow: number | null;
|
|
205
|
+
/** The region read, in image px. */
|
|
206
|
+
readonly region: PixelRegion;
|
|
207
|
+
/** The dominant colour the ink was read against, `[r, g, b]`. */
|
|
208
|
+
readonly ground: readonly [number, number, number];
|
|
294
209
|
}
|
|
295
|
-
/**
|
|
296
|
-
interface
|
|
297
|
-
|
|
298
|
-
viewport: CanvasViewport;
|
|
299
|
-
/** The judge's weighted score for this canvas (0-100). */
|
|
300
|
-
score: number;
|
|
301
|
-
/** `score >= passThreshold`. */
|
|
302
|
-
passed: boolean;
|
|
303
|
-
/** The PNG the judge saw — kept for artefact persistence + the human look. */
|
|
304
|
-
screenshotPng: Buffer;
|
|
305
|
-
/**
|
|
306
|
-
* The document's scroll height at this canvas's viewport, CSS px — what
|
|
307
|
-
* the box would have to be for nothing to be hidden (ggui#1027). `null`
|
|
308
|
-
* when the page could not be measured.
|
|
309
|
-
*/
|
|
310
|
-
contentHeight: number | null;
|
|
311
|
-
/** `contentHeight > viewport.height` — a measurement; what it MEANS is {@link canvasFitPolicy}'s. */
|
|
312
|
-
overflow: boolean;
|
|
313
|
-
/** How `score` was reached — always present (ggui#1072). */
|
|
314
|
-
judge: CanvasJudgeRecord;
|
|
315
|
-
/** How the judge composed the mount (ggui#1100): `'fill'` on every fullscreen canvas, absent on the inline card. */
|
|
316
|
-
fit?: 'fill';
|
|
317
|
-
/** ggui#1195 — `true` when the order DECLARED this canvas's box (`config.canvasViewports` carried an entry), whatever its value. */
|
|
318
|
-
declared?: true;
|
|
210
|
+
/** Why a capture could not be read — reported, never mistaken for a blank. */
|
|
211
|
+
interface InkUnreadable {
|
|
212
|
+
readonly reason: string;
|
|
319
213
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
readonly overflow: 'fail' | 'warn' | 'none';
|
|
214
|
+
interface DecodedImage {
|
|
215
|
+
readonly width: number;
|
|
216
|
+
readonly height: number;
|
|
217
|
+
readonly channels: 3 | 4;
|
|
218
|
+
/** Row-major, `channels` bytes per pixel, scanline filters undone. */
|
|
219
|
+
readonly pixels: Uint8Array;
|
|
327
220
|
}
|
|
221
|
+
/** The PNG subset the judge's browser writes: 8-bit RGB (colour type 2) or RGBA (6), not interlaced. */
|
|
222
|
+
declare function decodePng(png: Uint8Array): DecodedImage | InkUnreadable;
|
|
328
223
|
/**
|
|
329
|
-
* The
|
|
330
|
-
*
|
|
331
|
-
* a 640 px card was scored 86 from a full-page capture that showed the
|
|
332
|
-
* judge what no user sees) and an overflow is a critical layout issue that
|
|
333
|
-
* fails the canvas. A phone's first screen may scroll, so the overflow is
|
|
334
|
-
* reported as a major issue and the score stands. Pages (`md`/`lg`/`xl`)
|
|
335
|
-
* scroll by design: measured, never judged.
|
|
336
|
-
*/
|
|
337
|
-
declare function canvasFitPolicy(canvas: CanvasClass): CanvasFitPolicy;
|
|
338
|
-
/** The deterministic fit issue — one per overflowing canvas, in the judge's issue shape so it rides the same channel. */
|
|
339
|
-
declare function canvasOverflowIssue(canvas: CanvasClass, viewport: CanvasViewport, contentHeight: number, verdict: 'fail' | 'warn'): EvaluationIssue;
|
|
340
|
-
/**
|
|
341
|
-
* `runVisualEvaluation`'s result. Identical to `EvaluationResult` when
|
|
342
|
-
* `config.canvases` is unset; with canvases set, `canvases` holds the
|
|
343
|
-
* per-class verdicts and the base fields aggregate them (see
|
|
344
|
-
* `VisualEvalConfig.canvases`).
|
|
224
|
+
* The ink extent of a capture, read `insetPx` in from every edge — the judge's inset skips a host
|
|
225
|
+
* panel's gap, rounded corners and hairline ({@link JUDGE_INK_INSET_PX}); `0` reads the whole image.
|
|
345
226
|
*/
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
/** The design tree the judge painted with (ggui#1042) — present on every per-canvas judgement. */
|
|
349
|
-
design?: JudgeDesignIdentity;
|
|
350
|
-
/** The mode `cssTokens` were composed in, when the caller said (ggui#1076). */
|
|
351
|
-
themeMode?: 'light' | 'dark';
|
|
352
|
-
}
|
|
353
|
-
/** Injection points for `runVisualEvaluation` — screenshot deps plus the judge call (tests). */
|
|
354
|
-
interface VisualEvalDeps extends ScreenshotDeps {
|
|
355
|
-
/** The multimodal judge call (default: `callMultimodalLLM`). */
|
|
356
|
-
judge?: typeof callMultimodalLLM;
|
|
357
|
-
}
|
|
358
|
-
interface VisualEvalContext {
|
|
359
|
-
/** Compiled JavaScript code (ESM with imports) */
|
|
360
|
-
compiledCode: string;
|
|
361
|
-
/** Original user prompt */
|
|
362
|
-
originalPrompt: string;
|
|
363
|
-
/** Design system CSS tokens */
|
|
364
|
-
cssTokens?: string;
|
|
365
|
-
/** The app's generation profile (#991) — judged relative to, never against. */
|
|
366
|
-
profile?: GenerationProfileInput;
|
|
367
|
-
}
|
|
227
|
+
declare function readInkExtent(png: Uint8Array, insetPx?: number): InkExtent | InkUnreadable;
|
|
228
|
+
|
|
368
229
|
/**
|
|
369
|
-
* The
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* not the design package at all: the judge then walked a directory that does not
|
|
377
|
-
* exist, threw ENOENT inside every evaluation round on that deployment, and a
|
|
378
|
-
* bar refused cards no one could judge. `@ggui-ai/design` exports `./package.json`,
|
|
379
|
-
* so the module resolver answers correctly in every layout — scoped, flattened,
|
|
380
|
-
* hoisted — and the receipt keeps working inside the image.
|
|
230
|
+
* The stylesheet a visual judge renders under for an app: the app's theme
|
|
231
|
+
* composed the way the runtime composes it (`composeThemeCss`, layer `page`
|
|
232
|
+
* — one composition, never a second), so a judged canvas paints the tokens a
|
|
233
|
+
* visitor's page paints. `themeId` is the registered ladder the app's theme
|
|
234
|
+
* sits on (the runtime's base layer); an unknown id composes the default
|
|
235
|
+
* ladder. Neither given ⇒ the design's default tokens, byte-for-byte what the
|
|
236
|
+
* judge used before.
|
|
381
237
|
*/
|
|
382
|
-
declare function
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
waitForSelector(selector: string, options: {
|
|
394
|
-
timeout: number;
|
|
395
|
-
}): Promise<unknown>;
|
|
396
|
-
/** Evaluates a JS expression in the page and returns its serialised value — the fit measurement (ggui#1027). */
|
|
397
|
-
evaluate(expression: string): Promise<unknown>;
|
|
398
|
-
screenshot(options: {
|
|
399
|
-
type: 'png';
|
|
400
|
-
fullPage: boolean;
|
|
401
|
-
}): Promise<Uint8Array>;
|
|
402
|
-
}
|
|
403
|
-
/** The browser surface the capture uses — a structural subset of puppeteer's `Browser`. */
|
|
404
|
-
interface ScreenshotBrowser {
|
|
405
|
-
newPage(): Promise<ScreenshotPage>;
|
|
406
|
-
close(): Promise<void>;
|
|
407
|
-
}
|
|
408
|
-
type ScreenshotLauncher = (options: LaunchOptions) => Promise<ScreenshotBrowser>;
|
|
409
|
-
/** The two members of `@sparticuz/chromium` the fallback launch path reads. */
|
|
410
|
-
interface ChromiumProvider {
|
|
411
|
-
readonly args: string[];
|
|
412
|
-
executablePath(): Promise<string>;
|
|
238
|
+
declare function cssTokensForAppTheme(theme: AppTheme | undefined, mode?: 'light' | 'dark', themeId?: string): string;
|
|
239
|
+
|
|
240
|
+
/** Bump when a selection rule changes: it is hashed into every `criteriaSetId`. */
|
|
241
|
+
declare const CRITERIA_SELECTOR_VERSION = "selector@2";
|
|
242
|
+
/** The context as one string, keys sorted at every level — what the id hashes and what the record stores. */
|
|
243
|
+
declare function canonicalCriteriaContext(ctx: CriteriaContext): string;
|
|
244
|
+
/** sha256(bank version | selector version | canonical context), 16 hex — a label at this scale, not a security digest. */
|
|
245
|
+
declare function criteriaSetIdFor(bankVersion: string, ctx: CriteriaContext): string;
|
|
246
|
+
interface CriteriaSelectionResult {
|
|
247
|
+
readonly criteriaSetId: string;
|
|
248
|
+
readonly selection: CriteriaSelection[];
|
|
413
249
|
}
|
|
414
250
|
/**
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
251
|
+
* Select the bank's rows for one card. The bank-level `applies` gate is read first (canvases always;
|
|
252
|
+
* kind only when the caller named one and the bank names kinds other than `*`); then each row's
|
|
253
|
+
* `scope`. An empty scope is `static`; a matched scope is `context` with the keys that matched.
|
|
418
254
|
*/
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
launch?: ScreenshotLauncher;
|
|
422
|
-
/** Environment the executable-path override is read from (default: `process.env`). */
|
|
423
|
-
env?: NodeJS.ProcessEnv;
|
|
424
|
-
/** Loads `@sparticuz/chromium` (default: dynamic import) — only consulted when no override is set. */
|
|
425
|
-
loadChromium?: () => Promise<ChromiumProvider>;
|
|
426
|
-
/** Post-load settle time before the screenshot, ms (default 1000). */
|
|
427
|
-
settleMs?: number;
|
|
428
|
-
}
|
|
255
|
+
declare function selectCriteria(bank: CriteriaBank, ctx: CriteriaContext): CriteriaSelectionResult;
|
|
256
|
+
|
|
429
257
|
/**
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
258
|
+
* From K judge answers and the capture's measurements to one `CriteriaBlock` — ggui#1436.
|
|
259
|
+
*
|
|
260
|
+
* The judge is asked every `evaluation: judge` row (this block IS their implementation; the row's
|
|
261
|
+
* `status` is carried on the verdict as the author wrote it). An `instrument` row is answered by a
|
|
262
|
+
* measurement the capture already ran when its status is `live` and a binding exists; otherwise it
|
|
263
|
+
* reads `n/a` with the reason from `status`. A `human` row reads `n/a` for the judge. K-majority per
|
|
264
|
+
* id; a tie or an unanswered id reads `n/a` (the CTO's A2) — a `must` at `n/a` is never a pass when
|
|
265
|
+
* a gate later reads the set.
|
|
434
266
|
*/
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}, deps?: Pick<ScreenshotDeps, 'env' | 'loadChromium'>): Promise<LaunchOptions>;
|
|
267
|
+
|
|
268
|
+
/** The instruments the capture runs today, by the bank ids they answer (v1 binding; a bank field may replace it). */
|
|
269
|
+
declare const INSTRUMENT_BY_ID: Readonly<Record<string, 'fit' | 'fill'>>;
|
|
439
270
|
/**
|
|
440
|
-
*
|
|
441
|
-
*
|
|
271
|
+
* ggui#1663 — instruments that read BESIDE a judge row, report-only: the row keeps the judge's verdict and gains the
|
|
272
|
+
* measurement as `instrument`, so the two can be compared before any verdict moves.
|
|
442
273
|
*/
|
|
443
|
-
|
|
444
|
-
interface
|
|
445
|
-
readonly
|
|
446
|
-
readonly reason?: string;
|
|
447
|
-
/** The document's scroll height at the viewport (ggui#1027); `null` when unmeasurable. */
|
|
274
|
+
declare const INSTRUMENT_BESIDE_JUDGE: Readonly<Record<string, 'edge'>>;
|
|
275
|
+
interface CriteriaMeasurements {
|
|
276
|
+
readonly overflow: boolean;
|
|
448
277
|
readonly contentHeight: number | null;
|
|
278
|
+
readonly viewportHeight: number;
|
|
279
|
+
readonly inkRatio: number | null;
|
|
280
|
+
/**
|
|
281
|
+
* ggui#1663 — the edge rule on the capture's DOM: absent when this capture had no page to read (a stored frame),
|
|
282
|
+
* `null` when the probe ran and failed.
|
|
283
|
+
*/
|
|
284
|
+
readonly edge?: EdgeVerdict | null;
|
|
449
285
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
*/
|
|
486
|
-
declare const VISUAL_JUDGE_PROMPT_VERSION = "v2-bounded-issues";
|
|
487
|
-
declare const VISUAL_JUDGE_PROMPT_DIGEST: string;
|
|
488
|
-
declare function callMultimodalLLM(config: VisualEvalConfig, model: string, prompt: string, screenshot: Buffer, originalPrompt: string, profileBlock?: string): Promise<LLMResponse>;
|
|
286
|
+
declare function resolveCriteriaBlock(args: {
|
|
287
|
+
readonly bank: CriteriaBank;
|
|
288
|
+
readonly context: CriteriaContext;
|
|
289
|
+
readonly selected: CriteriaSelectionResult;
|
|
290
|
+
readonly answers: readonly CriteriaAnswer[][];
|
|
291
|
+
readonly measurements: CriteriaMeasurements;
|
|
292
|
+
/**
|
|
293
|
+
* ggui#1127 — why a judge row has no answer, when the caller knows: a salvaged criteria answer keeps no criteria,
|
|
294
|
+
* so its rows say so instead of reading as a clean `n/a`. Absent ⇒ "not answered".
|
|
295
|
+
*/
|
|
296
|
+
readonly unansweredReason?: string;
|
|
297
|
+
/** ggui#1687 — the call that answered, as it came back: its answer's counts and its stop reason. */
|
|
298
|
+
readonly call?: {
|
|
299
|
+
readonly answer: CriteriaAnswerCounts;
|
|
300
|
+
readonly finishReason?: VisionFinishReason;
|
|
301
|
+
};
|
|
302
|
+
}): CriteriaBlock;
|
|
303
|
+
/** The judge's prompt block for the selected `judge` rows; empty when none is selected. */
|
|
304
|
+
/** The capture the judge is handed: its canvas class and the box it was taken at (the class box, or a declared one). */
|
|
305
|
+
interface CriteriaJudgeFrame {
|
|
306
|
+
readonly canvas: CriteriaContext['canvas'];
|
|
307
|
+
readonly width: number;
|
|
308
|
+
readonly height: number;
|
|
309
|
+
/** ggui#1492 — the host whose presentation framed this canvas (e.g. "a chat widget, inline, reference theme"); absent ⇒ the judge's own stand-in. */
|
|
310
|
+
readonly hostLabel?: string;
|
|
311
|
+
}
|
|
312
|
+
/** What the block carries besides the selected rows: the frame's box, and the props the card was rendered with. */
|
|
313
|
+
interface CriteriaJudgeInputs {
|
|
314
|
+
readonly frame?: CriteriaJudgeFrame;
|
|
315
|
+
/** JSON text of the props the card was rendered with; bounded by {@link CRITERIA_PROPS_MAX_CHARS}. */
|
|
316
|
+
readonly propsJson?: string;
|
|
317
|
+
}
|
|
318
|
+
/** The judge's prompt block for the selected `judge` rows; empty when none is selected. */
|
|
319
|
+
declare function buildCriteriaJudgeBlock(bank: CriteriaBank, selected: CriteriaSelectionResult, inputs?: CriteriaJudgeInputs): string;
|
|
320
|
+
|
|
489
321
|
/**
|
|
490
|
-
*
|
|
322
|
+
* `space.edge`'s measurement (#1663): the expression a capture evaluates in the page to produce {@link EdgeBlock}s for
|
|
323
|
+
* {@link judgeEdges}. It runs where the screenshot is taken, on the same DOM at the same width, so the rule reads what
|
|
324
|
+
* the judge's frame shows. It only reads layout; it never writes to the page.
|
|
491
325
|
*
|
|
492
|
-
*
|
|
493
|
-
* 2. Takes a screenshot via puppeteer (if available)
|
|
494
|
-
* 3. Sends screenshot to multimodal LLM for visual scoring
|
|
326
|
+
* What it measures, under `#root`, in CSS px from the card's left edge:
|
|
495
327
|
*
|
|
496
|
-
*
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
328
|
+
* - **Text blocks.** Text is grouped by its nearest non-inline element. A block's edge is its first visible character
|
|
329
|
+
* in ink: text in a transparent colour, private-use icon-font glyphs and formatting characters are not characters of
|
|
330
|
+
* the block. Its extent is the union of its inked line boxes. A marker before the text (an icon or image that paints,
|
|
331
|
+
* or a number or bullet on the same line) makes it a hanging marker: `edge` is the marker's, `textEdge` the text's.
|
|
332
|
+
* - **Control groups.** Native and ARIA controls, and bounded boxes the visitor clicks (a pointer cursor or a tab stop,
|
|
333
|
+
* holding no control of their own), group by their parent and are measured at the first control: the border box
|
|
334
|
+
* when bounded, else its text. A control's contents are never blocks of the enclosing column.
|
|
335
|
+
* - **Surfaces.** A non-inline box with a border on at least three sides, its own fill different from what it sits on,
|
|
336
|
+
* or a shadow. A table is a surface measured at its rule and not descended into. A box with no text, control, image
|
|
337
|
+
* or icon inside (a loading bar) is a `placeholder`, which is not a block.
|
|
338
|
+
* - **Roles.** A list item is `list-item` when its list follows a paragraph; text centred in a box wider than it, or
|
|
339
|
+
* controls in a centring row, are `centred`.
|
|
340
|
+
* - **Rows, first, read by geometry.** Items set on one line, however the CSS lays them out: an item after another
|
|
341
|
+
* measured item on its line that holds one block (a text, a control, or a box holding at most one text) belongs to
|
|
342
|
+
* the row and is not measured. An item with a stack inside it is a column.
|
|
343
|
+
* - **Ornaments:** text with no letters or digits is not measured.
|
|
344
|
+
*
|
|
345
|
+
* Hidden elements (through any ancestor), zero-size ones and transparent text are skipped. What the rows and ornament
|
|
346
|
+
* rules set aside is counted. A frame with no text in ink is reported as placeholders only. The expression returns a
|
|
347
|
+
* JSON value; {@link parseEdgeProbe} is its typed read. *
|
|
348
|
+
* **Validated instrument (#1663, 2026-10-02):** this file as of `cec465319` (with `7bb4da13e`) passed a fresh sealed
|
|
349
|
+
* blind draw at the registered bar (27/30, κ 0.76), stricter than the design lead's reading on its disagreements. Any
|
|
350
|
+
* later change to what this file measures or decides is a new instrument until another fresh sealed draw.
|
|
506
351
|
*/
|
|
507
|
-
interface VisualEvalDetailed {
|
|
508
|
-
readonly result: VisualEvaluationResult | null;
|
|
509
|
-
readonly unavailableReason?: string;
|
|
510
|
-
readonly canvas?: CanvasClass;
|
|
511
|
-
}
|
|
512
|
-
declare function runVisualEvaluation(context: VisualEvalContext, config: VisualEvalConfig, deps?: VisualEvalDeps): Promise<VisualEvaluationResult | null>;
|
|
513
|
-
declare function runVisualEvaluationDetailed(context: VisualEvalContext, config: VisualEvalConfig, deps?: VisualEvalDeps): Promise<VisualEvalDetailed>;
|
|
514
|
-
/** The per-canvas verdicts without the PNGs — what the harness stamps on `EvalResult.visual`. */
|
|
515
|
-
declare function summarizeVisualResult(result: VisualEvaluationResult): VisualEvalSummary | undefined;
|
|
516
352
|
|
|
517
|
-
/** What the
|
|
518
|
-
interface
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
summary?: VisualEvalSummary;
|
|
527
|
-
/**
|
|
528
|
-
* ggui#1221 — whether the judge leg ran or was skipped (with the reason
|
|
529
|
-
* `runVisualEvaluationDetailed` names). Always present: the absence of a
|
|
530
|
-
* summary used to be indistinguishable from a clean single-shot run.
|
|
531
|
-
*/
|
|
532
|
-
coverage: VisualCoverage;
|
|
353
|
+
/** What the probe returns: the measured blocks, and whether the frame showed nothing to evaluate. */
|
|
354
|
+
interface EdgeProbe {
|
|
355
|
+
readonly blocks: readonly EdgeBlock[];
|
|
356
|
+
readonly placeholdersOnly: boolean;
|
|
357
|
+
/** What the probe saw and did not measure, by rule, so a dropped block is counted rather than silent. */
|
|
358
|
+
readonly skipped: {
|
|
359
|
+
readonly rowItems: number;
|
|
360
|
+
readonly ornaments: number;
|
|
361
|
+
};
|
|
533
362
|
}
|
|
363
|
+
declare const EDGE_BLOCKS_EXPRESSION: string;
|
|
534
364
|
/**
|
|
535
|
-
*
|
|
536
|
-
*
|
|
365
|
+
* The probe's typed read: `null` when the page had no `#root` or returned something else, so a failed measurement is
|
|
366
|
+
* reported as unmeasured and never read as "no offsets". A malformed block fails the whole read for the same reason.
|
|
537
367
|
*/
|
|
538
|
-
declare function
|
|
368
|
+
declare function parseEdgeProbe(value: unknown): EdgeProbe | null;
|
|
539
369
|
|
|
540
370
|
/**
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
*
|
|
371
|
+
* ggui#1640 — one judged frame's (or one visual evaluation's) spend, summed over EVERY leg the judge reports.
|
|
372
|
+
*
|
|
373
|
+
* The judge reports its legs apart: the scoring calls' `inputTokens` / `outputTokens`, and, since ggui#1436, the
|
|
374
|
+
* report-only criteria call's `criteriaTokens`. A caller that sums only the first leg under-counts, and a dollar
|
|
375
|
+
* ceiling built on that sum stops late. {@link judgedFrameTokens} is the one sum. The two `satisfies` tables below list
|
|
376
|
+
* every `*Tokens` member of the results it reads, so a leg added to either result type fails the build here until the
|
|
377
|
+
* sum counts it.
|
|
546
378
|
*/
|
|
547
|
-
declare function cssTokensForAppTheme(theme: AppTheme | undefined, mode?: 'light' | 'dark'): string;
|
|
548
379
|
|
|
549
|
-
|
|
380
|
+
/** A spend in tokens: input and output, over every leg. */
|
|
381
|
+
interface JudgeSpend {
|
|
382
|
+
readonly inputTokens: number;
|
|
383
|
+
readonly outputTokens: number;
|
|
384
|
+
}
|
|
385
|
+
/** The legs {@link judgedFrameTokens} reads, as both result types carry them. */
|
|
386
|
+
interface JudgedTokens {
|
|
387
|
+
readonly inputTokens?: number;
|
|
388
|
+
readonly outputTokens?: number;
|
|
389
|
+
readonly criteriaTokens?: CriteriaCallTokens;
|
|
390
|
+
}
|
|
391
|
+
/** A judged frame's spend over every leg: the scoring calls plus the report-only criteria call, when one ran. */
|
|
392
|
+
declare function judgedFrameTokens(result: JudgedTokens): JudgeSpend;
|
|
393
|
+
|
|
394
|
+
export { CRITERIA_SELECTOR_VERSION, CriteriaBank, CriteriaCallTokens, type CriteriaMeasurements, type CriteriaSelectionResult, type DecodedImage, EDGE_BLOCKS_EXPRESSION, EdgeBlock, type EdgeProbe, EdgeVerdict, type EvaluateScoreInput, EvaluationConfig, EvaluationContext, EvaluationIssue, type EvaluationLoopOptions, type EvaluationLoopResult, EvaluationResult, INK_TOLERANCE, INSTRUMENT_BESIDE_JUDGE, INSTRUMENT_BY_ID, type InkExtent, type InkUnreadable, type JudgeSpend, type JudgedTokens, type PixelRegion, QualityMetadata, type SdkMessage, buildCriteriaJudgeBlock, buildFixPrompt, canonicalCriteriaContext, computeEvaluationScore, createEvaluationToolsServer, criteriaSetIdFor, cssTokensForAppTheme, decodePng, extractCompiledCode, extractCompiledCodeFromMessage, extractEvalResult, extractSourceCode, extractSourceCodeFromMessage, extractToolResultTexts, getEvaluatorSystemPrompt, judgedFrameTokens, parseEdgeProbe, readInkExtent, resolveCriteriaBlock, runEvaluation, runEvaluationLoop, selectCriteria };
|