@ggui-ai/ui-gen 0.20.0 → 0.22.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/dist/adapters/base.d.ts +7 -0
- package/dist/adapters/base.js +1 -0
- package/dist/adapters/base.js.map +1 -1
- package/dist/adapters/generation-dispatch.d.ts +17 -3
- package/dist/adapters/generation-dispatch.js +1078 -3464
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +60 -3
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +4 -4
- package/dist/advanced/index.js +1346 -3557
- package/dist/advanced/index.js.map +1 -1
- package/dist/blueprint-validator.js +10 -3
- package/dist/blueprint-validator.js.map +1 -1
- package/dist/boilerplate.js +2 -2
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +1 -1
- package/dist/check/index.js.map +1 -1
- package/dist/{create-ui-generator-CxPvudbs.d.ts → create-ui-generator-BEkzEtNz.d.ts} +2 -2
- package/dist/{dispatch-N8wdNOX-.d.ts → dispatch-DJNpQ7DI.d.ts} +1 -1
- package/dist/evaluation/axis-checks/index.d.ts +3 -3
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +1 -1
- package/dist/evaluation/index.d.ts +38 -6
- package/dist/evaluation/index.js +670 -3374
- package/dist/evaluation/index.js.map +1 -1
- package/dist/harness/check/runtime-render/index.d.ts +2 -2
- package/dist/harness/check/runtime-render/index.js +10 -3
- package/dist/harness/check/runtime-render/index.js.map +1 -1
- package/dist/harness/check/runtime-render/render-check-worker.js +5 -3
- package/dist/harness/check/runtime-render/render-check-worker.js.map +1 -1
- package/dist/harness/index.d.ts +2 -2
- package/dist/harness/index.js +587 -30
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/llm-trace-sink.d.ts +7 -1
- package/dist/harness/llm-trace-sink.js.map +1 -1
- package/dist/harness/prompts.js +1 -1
- package/dist/harness/prompts.js.map +1 -1
- package/dist/harness/result-types.d.ts +15 -2
- package/dist/harness/result-types.js.map +1 -1
- package/dist/harness/runtime.d.ts +11 -2
- package/dist/harness/runtime.js +3 -3
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +1 -1
- package/dist/harness/types-public.js +2 -2
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +1 -1
- package/dist/index.d.ts +23 -7
- package/dist/index.js +1346 -3557
- package/dist/index.js.map +1 -1
- package/dist/{llm-router-D7fjBhtr.d.ts → llm-router-DwwUK1bz.d.ts} +16 -3
- package/dist/patch.d.ts +1 -1
- package/dist/providers/index.js +5 -4
- package/dist/providers/index.js.map +1 -1
- package/dist/{render-check-WfOVO9kU.d.ts → render-check-C0CqVceF.d.ts} +17 -0
- package/dist/{types-public-DKR_h70H.d.ts → types-public-mM_-1Yk3.d.ts} +59 -1
- 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/workflows.d.ts +1 -1
- package/package.json +16 -12
- package/src/adapters/base.ts +8 -0
- package/src/adapters/claude/claude-code-login.ts +128 -0
- package/src/adapters/claude/sdk.ts +9 -1
- package/src/adapters/generation-dispatch.ts +19 -2
- package/src/adapters/openai/tokens.ts +18 -0
- package/src/adapters/provider-router.ts +28 -0
- package/src/boilerplate/generate.ts +19 -4
- package/src/boilerplate/hard-sections.ts +1 -1
- package/src/boilerplate/templates/layouts/chat-mobile.tsx.tmpl +7 -3
- package/src/boilerplate/templates/layouts/chat-universal.tsx.tmpl +7 -3
- package/src/contract-context.ts +1 -1
- package/src/create-ui-generator.ts +49 -10
- package/src/evaluation/design-identity.ts +16 -5
- package/src/evaluation/index.ts +1 -0
- package/src/evaluation/llm-evaluator.ts +40 -13
- package/src/evaluation/types-public.ts +58 -0
- package/src/evaluation/visual-evaluator.ts +240 -30
- package/src/generator-build.ts +158 -0
- package/src/harness/check/runtime-render/adapter.ts +9 -0
- package/src/harness/check/runtime-render/render-check.ts +26 -5
- package/src/harness/claude-code-login-query.ts +529 -0
- package/src/harness/coding/assemble-result.ts +18 -2
- package/src/harness/coding/generate-task-runner.ts +75 -36
- package/src/harness/coding/run-coding-turn.ts +9 -0
- package/src/harness/coding/run-eval-round.ts +338 -38
- package/src/harness/enforced-coding.ts +20 -0
- package/src/harness/llm-router.ts +390 -55
- package/src/harness/llm-trace-sink.ts +7 -1
- package/src/harness/result-types.ts +14 -0
- package/src/harness/runtime.ts +6 -0
- package/src/index.ts +2 -1
- package/src/providers/openai.ts +31 -19
- package/src/validation/primitives.ts +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as CanvasJudgeRecord, E as EvalIssue, V as VisualEvalSummary } from '../types-public-
|
|
2
|
-
export { A as AxisCheck, a as AxisCheckInput,
|
|
1
|
+
import { C as CanvasJudgeRecord, E as EvalIssue, V as VisualEvalSummary, d as VisualCoverage } from '../types-public-mM_-1Yk3.js';
|
|
2
|
+
export { A as AxisCheck, a as AxisCheckInput, e as CRITERIA, f as CanvasVisualSummary, g as ContractFeedbackRecord, h as CriterionCoverage, i as CriterionRunStatus, D as DEFAULT_QUALITY_CONFIG, j as EvalCategory, k as EvalCriterion, l as EvalOutcome, b as EvalResult, c as EvalTier, L as LLM_EVAL_STATIC_CRITERIA, P as Priority, Q as QualityConfig, n as QualityMode, o as buildCodingCriteriaSummary, p as criteriaFor, q as getActionableIssues, r as getCriteriaByPriority, s as getCriterionById, t as getLLMCriteria, u as isBlocked, m as matches, v as notApplicableCoverage, w as priorityForIssue } from '../types-public-mM_-1Yk3.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
5
|
import { EvaluationContext, EvaluationConfig, QualityMetadata, EvaluationResult, EvaluationIssue } 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 { A as AgentConfig, L as LLMResponse } from '../llm-router-
|
|
7
|
+
export { R as RunAxisChecksInput, r as runAxisChecks } from '../dispatch-DJNpQ7DI.js';
|
|
8
|
+
import { A as AgentConfig, L as LLMResponse } from '../llm-router-DwwUK1bz.js';
|
|
9
9
|
import { G as GenerationProfileInput } from '../styling-profile-CxfvV48g.js';
|
|
10
10
|
import { LaunchOptions } from 'puppeteer-core';
|
|
11
11
|
import { C as CanvasClass, g as CanvasViewport } from '../design-mode-DLufhrNp.js';
|
|
@@ -191,7 +191,17 @@ interface JudgeDesignIdentity {
|
|
|
191
191
|
/** sha256 over every rendering input under `src` (see {@link isDesignRenderingInput}) — sorted relative path, then contents. */
|
|
192
192
|
readonly srcSha256: string;
|
|
193
193
|
}
|
|
194
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* sha256 over every rendering input under `root` (sorted relative path +
|
|
196
|
+
* contents) — the identity of a design tree as it paints.
|
|
197
|
+
*
|
|
198
|
+
* A function of the TREE, not of the spelling of `root`: the relative keys
|
|
199
|
+
* are taken against the RESOLVED root, so `…/design/src`, `…/design/src/` and
|
|
200
|
+
* `…/ui-gen/../design/src` hash the same bytes. Before this the key was
|
|
201
|
+
* sliced by the unresolved root's length while each entry had already been
|
|
202
|
+
* resolved, so an un-normalised root produced a different hash for the same
|
|
203
|
+
* tree — a phantom design skew for any caller composing the path.
|
|
204
|
+
*/
|
|
195
205
|
declare function designTreeSha256(root: string): string;
|
|
196
206
|
/**
|
|
197
207
|
* The identity of the tree at `src`, computed once per process per path (a
|
|
@@ -235,6 +245,20 @@ interface VisualEvalConfig {
|
|
|
235
245
|
* single screenshot at `viewport`; no `canvases` field on the result.
|
|
236
246
|
*/
|
|
237
247
|
canvases?: readonly CanvasClass[];
|
|
248
|
+
/**
|
|
249
|
+
* ggui#1195 — the box a canvas is COMPOSED for and CAPTURED at when the
|
|
250
|
+
* order declared one (the chat card at the visitor's real column, not the
|
|
251
|
+
* class's 400×640). Keyed by canvas; a canvas without an entry is judged
|
|
252
|
+
* at `CANVAS_VIEWPORTS[canvas]` as before. The composer's
|
|
253
|
+
* `rendering.viewport` and this entry are ONE value written once (the
|
|
254
|
+
* seam derives it), so the judge never scores a box the mint did not
|
|
255
|
+
* target. Only read in per-canvas mode. Captured at WHOLE CSS px: the
|
|
256
|
+
* browser's device-metrics override takes integers (measured — a 383.5 px
|
|
257
|
+
* width is refused by CDP), so a fractional declared box is rounded once
|
|
258
|
+
* where it enters and the capture, the ceiling and the reported
|
|
259
|
+
* `viewport` all carry that same integer box.
|
|
260
|
+
*/
|
|
261
|
+
canvasViewports?: Partial<Readonly<Record<CanvasClass, CanvasViewport>>>;
|
|
238
262
|
/**
|
|
239
263
|
* Optional provider-routing override — see
|
|
240
264
|
* `AgentConfig.routeOverride`. Threaded onto the agent this
|
|
@@ -289,6 +313,8 @@ interface CanvasVisualResult {
|
|
|
289
313
|
judge: CanvasJudgeRecord;
|
|
290
314
|
/** How the judge composed the mount (ggui#1100): `'fill'` on every fullscreen canvas, absent on the inline card. */
|
|
291
315
|
fit?: 'fill';
|
|
316
|
+
/** ggui#1195 — `true` when the order DECLARED this canvas's box (`config.canvasViewports` carried an entry), whatever its value. */
|
|
317
|
+
declared?: true;
|
|
292
318
|
}
|
|
293
319
|
/** How a canvas is captured for the judge and what an overflow means there (ggui#1027). */
|
|
294
320
|
type CaptureMode = 'viewport' | 'full-page';
|
|
@@ -497,12 +523,18 @@ interface VisualEvalOutcome {
|
|
|
497
523
|
* the single-shot path (byte-identical to the pre-canvas result).
|
|
498
524
|
*/
|
|
499
525
|
summary?: VisualEvalSummary;
|
|
526
|
+
/**
|
|
527
|
+
* ggui#1221 — whether the judge leg ran or was skipped (with the reason
|
|
528
|
+
* `runVisualEvaluationDetailed` names). Always present: the absence of a
|
|
529
|
+
* summary used to be indistinguishable from a clean single-shot run.
|
|
530
|
+
*/
|
|
531
|
+
coverage: VisualCoverage;
|
|
500
532
|
}
|
|
501
533
|
/**
|
|
502
534
|
* Run visual evaluation and return tier 2 EvalIssues (+ the per-canvas
|
|
503
535
|
* summary when canvases were requested).
|
|
504
536
|
*/
|
|
505
|
-
declare function runVisualEval(context: VisualEvalContext, config: VisualEvalConfig): Promise<VisualEvalOutcome>;
|
|
537
|
+
declare function runVisualEval(context: VisualEvalContext, config: VisualEvalConfig, deps?: VisualEvalDeps): Promise<VisualEvalOutcome>;
|
|
506
538
|
|
|
507
539
|
/**
|
|
508
540
|
* The stylesheet a visual judge renders under for an app: the app's theme
|