@ggui-ai/ui-gen 0.25.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-Cg_rkpGq.d.ts → adapter-BJwn74rx.d.ts} +49 -1
- package/dist/adapters/generation-dispatch.d.ts +8 -5
- package/dist/adapters/generation-dispatch.js +1118 -193
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +27 -6
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +10 -9
- package/dist/advanced/index.js +1126 -202
- package/dist/advanced/index.js.map +1 -1
- 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 +10 -3
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +3 -2
- package/dist/check/index.js +9 -2
- package/dist/check/index.js.map +1 -1
- package/dist/{create-ui-generator-DFnnArrv.d.ts → create-ui-generator-N4gRXpcL.d.ts} +3 -4
- package/dist/{design-mode-DLufhrNp.d.ts → design-mode-DGWN_Gkm.d.ts} +1 -1
- package/dist/{dispatch-CStl9eAw.d.ts → dispatch-BUoXRj_r.d.ts} +2 -2
- package/dist/evaluation/axis-checks/index.d.ts +5 -4
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +4 -3
- package/dist/evaluation/index.d.ts +107 -539
- package/dist/evaluation/index.js +552 -55
- package/dist/evaluation/index.js.map +1 -1
- package/dist/evaluation/types.d.ts +17 -0
- package/dist/evaluation/types.js.map +1 -1
- package/dist/{generate-9IeNT4ZY.d.ts → generate-tSO_shQ0.d.ts} +1 -1
- package/dist/harness/check/runtime-render/index.d.ts +5 -5
- 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 +4 -5
- package/dist/harness/index.js +36 -5
- 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 +17 -3
- package/dist/harness/result-types.js.map +1 -1
- package/dist/harness/runtime.d.ts +14 -6
- package/dist/harness/runtime.js +11 -4
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +4 -2
- package/dist/harness/types-public.js +10 -3
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +4 -3
- package/dist/index.d.ts +46 -11
- package/dist/index.js +1128 -200
- package/dist/index.js.map +1 -1
- package/dist/patch.d.ts +3 -3
- package/dist/{prompts-YU9piOgs.d.ts → prompts-BhNUuRoZ.d.ts} +1 -1
- package/dist/tools/render-check-worker.js +8 -1
- package/dist/tools/render-check-worker.js.map +1 -1
- package/dist/{types-public-BJTLpzWn.d.ts → types-public-B7wn4ce5.d.ts} +384 -3
- 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 +3 -3
- package/package.json +12 -12
- package/src/adapters/generation-dispatch.ts +2 -0
- package/src/boilerplate/free-design-prompt.ts +3 -3
- package/src/boilerplate/hard-sections.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/run-tier0.ts +6 -3
- package/src/contract-context.ts +1 -1
- package/src/evaluation/cost-tracker.ts +54 -6
- package/src/evaluation/criteria/edge-probe.ts +286 -0
- package/src/evaluation/criteria/edge.ts +202 -0
- package/src/evaluation/criteria/resolve.ts +55 -7
- package/src/evaluation/index.ts +5 -1
- package/src/evaluation/judge-spend.ts +48 -0
- package/src/evaluation/types-public.ts +91 -0
- package/src/evaluation/types.ts +10 -0
- package/src/evaluation/visual-evaluator.ts +236 -40
- 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 +27 -0
- package/src/harness/coding/init-session.ts +5 -3
- package/src/harness/coding/run-coding-turn.ts +5 -1
- package/src/harness/coding/run-eval-round.ts +63 -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 +9 -0
- package/src/harness/types-public.ts +10 -1
- package/src/index.ts +5 -0
- package/src/internal/verdict-line.ts +33 -0
- package/src/taught-tokens.ts +32 -0
- package/src/tools/render-check-worker.ts +2 -1
- package/src/tools/render-check.ts +8 -7
- package/src/validation/primitives.ts +1 -1
- package/dist/llm-router-nfO7wPec.d.ts +0 -267
- package/dist/{bank-CT4eEkta.d.ts → bank-Ctdp3FUA.d.ts} +3 -3
|
@@ -46,6 +46,7 @@ import { runSandboxed } from '@ggui-ai/sandbox';
|
|
|
46
46
|
import type { SandboxResult } from '@ggui-ai/sandbox';
|
|
47
47
|
import type { ProbeHostLoad } from '../../../evaluation/types-public.js';
|
|
48
48
|
import type { RenderCheckResult, RunRenderCheckInput } from './render-check.js';
|
|
49
|
+
import { parseVerdictLine } from '../../../internal/verdict-line.js';
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* The subprocess bounds of one isolated check (ggui#1380). They are
|
|
@@ -227,12 +228,9 @@ export function mapSandboxResultToCheckResult(
|
|
|
227
228
|
t0,
|
|
228
229
|
);
|
|
229
230
|
}
|
|
230
|
-
|
|
231
|
-
if (stdout.length === 0) {
|
|
232
|
-
return unverified('render check worker exited without producing a verdict.', t0);
|
|
233
|
-
}
|
|
231
|
+
let verdict: RenderCheckResult | undefined;
|
|
234
232
|
try {
|
|
235
|
-
|
|
233
|
+
verdict = parseVerdictLine<RenderCheckResult>(result.stdout);
|
|
236
234
|
} catch (err) {
|
|
237
235
|
return unverified(
|
|
238
236
|
`render check worker verdict was not valid JSON — ${
|
|
@@ -241,6 +239,10 @@ export function mapSandboxResultToCheckResult(
|
|
|
241
239
|
t0,
|
|
242
240
|
);
|
|
243
241
|
}
|
|
242
|
+
if (verdict === undefined) {
|
|
243
|
+
return unverified('render check worker exited without producing a verdict.', t0);
|
|
244
|
+
}
|
|
245
|
+
return verdict;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
/**
|
|
@@ -269,7 +271,9 @@ export async function runRenderCheckViaWorker(
|
|
|
269
271
|
gracePeriodMs: bounds.gracePeriodMs,
|
|
270
272
|
maxStdoutBytes: CHECK_STDOUT_CAP,
|
|
271
273
|
nodeHeapMb: bounds.heapMb,
|
|
272
|
-
|
|
274
|
+
// ggui#1398: the check learns its own deadline, so its report-only
|
|
275
|
+
// pending phase can step aside instead of pushing it past the bound.
|
|
276
|
+
stdin: JSON.stringify({ ...input, deadlineAt: t0 + bounds.timeoutMs }),
|
|
273
277
|
// NODE_ENV steers React's production vs development build — keep
|
|
274
278
|
// parity with the caller; everything else stays on the sandbox's
|
|
275
279
|
// default allowlist.
|
|
@@ -43,7 +43,8 @@ import { resolve as resolvePath } from 'node:path';
|
|
|
43
43
|
import { fileURLToPath } from 'node:url';
|
|
44
44
|
import * as esbuild from 'esbuild';
|
|
45
45
|
import { runRenderCheckInProcess } from './render-check.js';
|
|
46
|
-
import type { RunRenderCheckInput } from './render-check.js';
|
|
46
|
+
import type { RenderCheckResult, RunRenderCheckInput } from './render-check.js';
|
|
47
|
+
import { formatVerdictLine } from '../../../internal/verdict-line.js';
|
|
47
48
|
|
|
48
49
|
async function readAllStdin(): Promise<string> {
|
|
49
50
|
const chunks: Buffer[] = [];
|
|
@@ -53,8 +54,10 @@ async function readAllStdin(): Promise<string> {
|
|
|
53
54
|
return Buffer.concat(chunks).toString('utf8');
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
function emit(value:
|
|
57
|
-
|
|
57
|
+
function emit(value: RenderCheckResult): void {
|
|
58
|
+
// One prefixed line: the host reads the last such line, so a card that
|
|
59
|
+
// writes to stdout while it is checked cannot corrupt the verdict.
|
|
60
|
+
process.stdout.write(formatVerdictLine(value));
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
/**
|