@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
|
@@ -83,6 +83,23 @@ interface CriterionCoverage {
|
|
|
83
83
|
/** Populated for `skipped` / `not-applicable` — why no verdict. */
|
|
84
84
|
readonly reason?: string;
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Coverage of the screenshot JUDGE leg for one eval round (ggui#1221) — a
|
|
88
|
+
* different surface from the `visual` CRITERION in `criteriaCoverage` (the
|
|
89
|
+
* LLM evaluator's read of the source). `ran` = a frame was captured and
|
|
90
|
+
* judged; `skipped` = the leg was configured but produced no verdict
|
|
91
|
+
* (no browser, a launch or in-page failure, an unbundlable component, an
|
|
92
|
+
* unparsable judge answer) with `reason` naming why; `not-applicable` =
|
|
93
|
+
* the round had no visual leg configured. Before this row a skipped leg
|
|
94
|
+
* left NO trace on the result — `{ issues: [] }` read exactly like a
|
|
95
|
+
* clean run, and every bootstrap mint on a browserless runtime "passed"
|
|
96
|
+
* its visual round that way.
|
|
97
|
+
*/
|
|
98
|
+
interface VisualCoverage {
|
|
99
|
+
readonly status: CriterionRunStatus;
|
|
100
|
+
/** Populated for `skipped` / `not-applicable` — why no verdict. */
|
|
101
|
+
readonly reason?: string;
|
|
102
|
+
}
|
|
86
103
|
/**
|
|
87
104
|
* The static criteria `runLLMEvaluation` runs, in stamp order — the
|
|
88
105
|
* ONE list both the evaluator's coverage stamp and the harness's
|
|
@@ -103,6 +120,13 @@ declare const LLM_EVAL_STATIC_CRITERIA: ReadonlyArray<{
|
|
|
103
120
|
* exit runs before the evaluator module is lazily loaded.
|
|
104
121
|
*/
|
|
105
122
|
declare function notApplicableCoverage(reason: string): CriterionCoverage[];
|
|
123
|
+
/** One contract-feedback round (ggui#1261): what bought it, and the source it was fed back on. */
|
|
124
|
+
interface ContractFeedbackRecord {
|
|
125
|
+
/** The exit-probe issue subcategories that bought the round, e.g. `runtime:prop-sensitivity:currentUser`. */
|
|
126
|
+
readonly firedOn: readonly string[];
|
|
127
|
+
/** The component source as it stood when the model was told — the round's BEFORE. */
|
|
128
|
+
readonly sourceBefore: string;
|
|
129
|
+
}
|
|
106
130
|
interface EvalResult {
|
|
107
131
|
issues: EvalIssue[];
|
|
108
132
|
pass: string[];
|
|
@@ -122,6 +146,14 @@ interface EvalResult {
|
|
|
122
146
|
* probe runner; absent on eval paths that never invoke the probe.
|
|
123
147
|
*/
|
|
124
148
|
runtimeProbe?: RuntimeProbeMeta;
|
|
149
|
+
/**
|
|
150
|
+
* The contract-feedback round, when one fired this generation (ggui#1261):
|
|
151
|
+
* which exit-probe findings bought it and the source as it stood when the
|
|
152
|
+
* model was told. `runtimeProbe` and the `runtime:*` issues on this result
|
|
153
|
+
* are the probe's verdict AFTER that round; `sourceBefore` beside the final
|
|
154
|
+
* source is the round's before/after. Absent when no such round fired.
|
|
155
|
+
*/
|
|
156
|
+
contractFeedback?: ContractFeedbackRecord;
|
|
125
157
|
/**
|
|
126
158
|
* Per-canvas visual verdicts. Stamped by the harness ONLY when the
|
|
127
159
|
* visual leg ran with `visualEvaluation.canvases` set (arm-neutral —
|
|
@@ -131,6 +163,13 @@ interface EvalResult {
|
|
|
131
163
|
* never here — this object is serialized into reports.
|
|
132
164
|
*/
|
|
133
165
|
visual?: VisualEvalSummary;
|
|
166
|
+
/**
|
|
167
|
+
* Whether the screenshot judge leg ran, was skipped (with the reason) or
|
|
168
|
+
* was not configured — ALWAYS stamped by the harness's eval round
|
|
169
|
+
* (ggui#1221), so a consumer can tell a clean visual run from a leg
|
|
170
|
+
* that silently could not run. See {@link VisualCoverage}.
|
|
171
|
+
*/
|
|
172
|
+
visualCoverage?: VisualCoverage;
|
|
134
173
|
}
|
|
135
174
|
/** One canvas's visual verdict, PNG-free — see `EvalResult.visual`. */
|
|
136
175
|
/**
|
|
@@ -173,6 +212,23 @@ interface CanvasVisualSummary {
|
|
|
173
212
|
*/
|
|
174
213
|
fit?: 'fill';
|
|
175
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* ggui#1195 — the fit reading on the canvas whose policy FAILS an overflow
|
|
217
|
+
* (the inline chat card): the box it was judged at (`ceiling` — the order's
|
|
218
|
+
* declared viewport when one was carried, else the class box), whether that
|
|
219
|
+
* box was declared, and how many px of content sit below it (0 = fits).
|
|
220
|
+
* Present only when such a canvas was judged with a measurable height, so
|
|
221
|
+
* the bar and the ledger read one number for "does the hello fit".
|
|
222
|
+
*/
|
|
223
|
+
interface VisualFitStamp {
|
|
224
|
+
readonly canvas: CanvasClass;
|
|
225
|
+
readonly ceiling: {
|
|
226
|
+
readonly width: number;
|
|
227
|
+
readonly height: number;
|
|
228
|
+
};
|
|
229
|
+
readonly declared: boolean;
|
|
230
|
+
readonly overflowPx: number;
|
|
231
|
+
}
|
|
176
232
|
/** The visual leg's per-canvas summary — see `EvalResult.visual`. */
|
|
177
233
|
interface VisualEvalSummary {
|
|
178
234
|
/** Mean of the canvas scores (rounded). */
|
|
@@ -180,6 +236,8 @@ interface VisualEvalSummary {
|
|
|
180
236
|
/** Every canvas passed. */
|
|
181
237
|
passed: boolean;
|
|
182
238
|
canvases: CanvasVisualSummary[];
|
|
239
|
+
/** ggui#1195 — see {@link VisualFitStamp}; absent when no fail-policy canvas was judged. */
|
|
240
|
+
fit?: VisualFitStamp;
|
|
183
241
|
/** The design tree the judge painted with (ggui#1042): `src` + `srcSha256` — `design@judge`. */
|
|
184
242
|
design?: {
|
|
185
243
|
readonly src: string;
|
|
@@ -301,4 +359,4 @@ declare function getLLMCriteria(designMode?: DesignMode): EvalCriterion[];
|
|
|
301
359
|
*/
|
|
302
360
|
declare function buildCodingCriteriaSummary(designMode?: DesignMode): string;
|
|
303
361
|
|
|
304
|
-
export { type AxisCheck as A, type CanvasJudgeRecord as C, DEFAULT_QUALITY_CONFIG as D, type EvalIssue as E, LLM_EVAL_STATIC_CRITERIA as L, type Priority as P, type QualityConfig as Q, type RuntimeProbeStatus as R, type VisualEvalSummary as V, type AxisCheckInput as a, type EvalResult as b, type EvalTier as c,
|
|
362
|
+
export { type AxisCheck as A, type CanvasJudgeRecord as C, DEFAULT_QUALITY_CONFIG as D, type EvalIssue as E, LLM_EVAL_STATIC_CRITERIA as L, type Priority as P, type QualityConfig as Q, type RuntimeProbeStatus as R, type VisualEvalSummary as V, type AxisCheckInput as a, type EvalResult as b, type EvalTier as c, type VisualCoverage as d, CRITERIA as e, type CanvasVisualSummary as f, type ContractFeedbackRecord as g, type CriterionCoverage as h, type CriterionRunStatus as i, type EvalCategory as j, type EvalCriterion as k, type EvalOutcome as l, matches as m, type QualityMode as n, buildCodingCriteriaSummary as o, criteriaFor as p, getActionableIssues as q, getCriteriaByPriority as r, getCriterionById as s, getLLMCriteria as t, isBlocked as u, notApplicableCoverage as v, priorityForIssue as w };
|