@ggui-ai/ui-gen 0.23.0 → 0.24.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 (67) hide show
  1. package/dist/adapter-Du7P_5Fx.d.ts +201 -0
  2. package/dist/adapters/generation-dispatch.d.ts +33 -12
  3. package/dist/adapters/generation-dispatch.js +510 -128
  4. package/dist/adapters/generation-dispatch.js.map +1 -1
  5. package/dist/adapters/index.js.map +1 -1
  6. package/dist/advanced/index.d.ts +5 -3
  7. package/dist/advanced/index.js +551 -142
  8. package/dist/advanced/index.js.map +1 -1
  9. package/dist/blueprint-validator.js +153 -59
  10. package/dist/blueprint-validator.js.map +1 -1
  11. package/dist/boilerplate.js.map +1 -1
  12. package/dist/check/index.d.ts +2 -1
  13. package/dist/check/index.js +47 -1
  14. package/dist/check/index.js.map +1 -1
  15. package/dist/{create-ui-generator-D0kbWwln.d.ts → create-ui-generator-GIhzx08x.d.ts} +34 -10
  16. package/dist/{dispatch-wxaIMwZt.d.ts → dispatch-BnAH56p4.d.ts} +1 -1
  17. package/dist/evaluation/axis-checks/index.d.ts +4 -3
  18. package/dist/evaluation/axis-checks/index.js.map +1 -1
  19. package/dist/evaluation/axis-checks/registry.d.ts +2 -1
  20. package/dist/evaluation/index.d.ts +4 -3
  21. package/dist/evaluation/index.js.map +1 -1
  22. package/dist/harness/check/runtime-render/index.d.ts +29 -10
  23. package/dist/harness/check/runtime-render/index.js +203 -60
  24. package/dist/harness/check/runtime-render/index.js.map +1 -1
  25. package/dist/harness/check/runtime-render/render-check-worker.d.ts +8 -1
  26. package/dist/harness/check/runtime-render/render-check-worker.js +72 -32
  27. package/dist/harness/check/runtime-render/render-check-worker.js.map +1 -1
  28. package/dist/harness/index.d.ts +2 -1
  29. package/dist/harness/index.js.map +1 -1
  30. package/dist/harness/prompts.js.map +1 -1
  31. package/dist/harness/result-types.d.ts +2 -1
  32. package/dist/harness/runtime.d.ts +2 -1
  33. package/dist/harness/runtime.js.map +1 -1
  34. package/dist/harness/types-public.d.ts +11 -2
  35. package/dist/harness/types-public.js.map +1 -1
  36. package/dist/harness/validator-trace-sink.d.ts +2 -1
  37. package/dist/index.d.ts +38 -3
  38. package/dist/index.js +553 -143
  39. package/dist/index.js.map +1 -1
  40. package/dist/patch.d.ts +2 -1
  41. package/dist/policy.d.ts +7 -4
  42. package/dist/policy.js.map +1 -1
  43. package/dist/tools/render-check-worker.d.ts +7 -1
  44. package/dist/tools/render-check-worker.js +55 -23
  45. package/dist/tools/render-check-worker.js.map +1 -1
  46. package/dist/{types-public-Ow-tNtFE.d.ts → types-public-Bk6d1WLN.d.ts} +77 -11
  47. package/dist/workflows.d.ts +2 -1
  48. package/package.json +12 -12
  49. package/src/adapters/generation-dispatch.ts +137 -96
  50. package/src/check/run-tier0.ts +80 -1
  51. package/src/create-ui-generator.ts +185 -95
  52. package/src/evaluation/types-public.ts +73 -11
  53. package/src/harness/check/runtime-render/adapter.ts +221 -75
  54. package/src/harness/check/runtime-render/index.ts +75 -2
  55. package/src/harness/check/runtime-render/render-check-host.ts +82 -19
  56. package/src/harness/check/runtime-render/render-check-worker.ts +83 -29
  57. package/src/harness/check/runtime-render/render-check.ts +154 -117
  58. package/src/harness/coding/generate-task-runner.ts +57 -4
  59. package/src/harness/coding/init-session.ts +13 -0
  60. package/src/harness/coding/run-eval-round.ts +238 -15
  61. package/src/harness/policy.ts +11 -0
  62. package/src/harness/primitive-slice.ts +104 -0
  63. package/src/harness/types-public.ts +9 -1
  64. package/src/index.ts +4 -0
  65. package/src/policy.ts +7 -4
  66. package/src/tools/render-check-worker.ts +74 -23
  67. package/dist/render-check-Blwj8gB6.d.ts +0 -105
@@ -2,9 +2,10 @@ import { SingleComponentParams } from './harness/runtime.js';
2
2
  import { ModelRef } from '@ggui-ai/protocol';
3
3
  import { GadgetCatalogAdapter } from '@ggui-ai/gadgets';
4
4
  import { GeneratorTier, UiGenerator } from '@ggui-ai/mcp-server-core';
5
+ import { R as RuntimeRenderProbeConfig } from './adapter-Du7P_5Fx.js';
5
6
  import { GenerationResult } from './harness/result-types.js';
6
7
  import { D as DesignMode } from './design-mode-DLufhrNp.js';
7
- import { Q as QualityConfig } from './types-public-Ow-tNtFE.js';
8
+ import { Q as QualityConfig } from './types-public-Bk6d1WLN.js';
8
9
  import { EvaluationConfig } from './evaluation/types.js';
9
10
  import { A as AgentConfig } from './llm-router-DwwUK1bz.js';
10
11
 
@@ -44,16 +45,39 @@ import { A as AgentConfig } from './llm-router-DwwUK1bz.js';
44
45
 
45
46
  interface CreateUiGeneratorOptions {
46
47
  /**
47
- * Wire `DEFAULT_RUNTIME_RENDER_CHECK` into the harness's check leg.
48
- * When `true`, every coding turn ends with a happy-dom runtime-render
49
- * probe that catches contract-wiring bugs (missing `useAction()`,
50
- * wrong stream channel name, etc.).
48
+ * Wire the runtime-render check into the harness's check leg — one
49
+ * instance per generator, built from `runtimeRenderProbe` (the default
50
+ * bounds when it is absent). When `true`, the runtime-render probe runs
51
+ * ONCE at the exit decision,
52
+ * after the coding turns, in an isolated subprocess: it mounts the
53
+ * compiled component against the contract and catches crash-class and
54
+ * contract-wiring bugs (a render that throws, a missing `useAction()`,
55
+ * a wrong stream channel name). It is never on the per-turn hot path.
51
56
  *
52
- * Default: `false` for OSS — keeps cold-start light. The probe pulls
53
- * happy-dom + @testing-library on first use (~700-1500ms cold). Bench
54
- * enables it via dispatch's own default for stricter quality gating.
57
+ * Without an `evaluation` config the round is observe + one repair turn
58
+ * (ggui#1380): a recoverable render crash buys exactly one repair turn
59
+ * and one re-probe, then the generation serves what it has; a probe that
60
+ * timed out, could not run, or had nothing to probe never blocks and
61
+ * never repairs. The probe's status and timing ride the result's
62
+ * metadata (`runtimeProbe`, `evalMs`). With an `evaluation` config the
63
+ * probe is the evaluation round's exit gate instead.
64
+ *
65
+ * Default: `false` — keeps cold-start light. The probe pulls happy-dom
66
+ * + @testing-library on first use (~700-1500ms cold). A serving
67
+ * deployment that wants the probe's verdict on every card sets it.
55
68
  */
56
69
  readonly enableRuntimeRender?: boolean;
70
+ /**
71
+ * How the runtime-render probe runs its isolated worker (ggui#1380). A
72
+ * serving deployment sets the probe's wall-clock bound, worker heap and
73
+ * concurrency here; the defaults are the evaluation lane's (30 s, 512 MB,
74
+ * no concurrency cap). The generator builds ONE check from it and hands
75
+ * that instance to every generation it dispatches — the concurrency cap
76
+ * lives on the instance, so it bounds the workers this generator has
77
+ * live at once. Only read when `enableRuntimeRender` is on. Never part
78
+ * of the prompt or the identity.
79
+ */
80
+ readonly runtimeRenderProbe?: RuntimeRenderProbeConfig;
57
81
  /** Maximum coding attempts per generation pass. */
58
82
  readonly maxAttempts?: number;
59
83
  /** Maximum evaluation rounds. */
@@ -71,7 +95,7 @@ interface CreateUiGeneratorOptions {
71
95
  * stylesheet to render under). Forwarded verbatim; never part of the
72
96
  * prompt or the identity. Default: none — the round runs as today.
73
97
  */
74
- readonly visualEvaluation?: SingleComponentParams['visualEvaluation'];
98
+ readonly visualEvaluation?: SingleComponentParams["visualEvaluation"];
75
99
  /** Quality config controlling eval tiers + improvement behavior. */
76
100
  readonly qualityConfig?: QualityConfig;
77
101
  /**
@@ -152,7 +176,7 @@ interface CreateUiGeneratorOptions {
152
176
  * request. Absent (default) is a no-op — retries still happen and
153
177
  * still log via `console.warn`, just without a caller-side hook.
154
178
  */
155
- readonly onRetry?: AgentConfig['onRetry'];
179
+ readonly onRetry?: AgentConfig["onRetry"];
156
180
  /**
157
181
  * Generation observer. Invoked once per successful `generate()` with
158
182
  * the FULL harness result — source, compiled code, token counters,
@@ -1,6 +1,6 @@
1
1
  import { DataContract } from '@ggui-ai/protocol';
2
2
  import { C as Classification } from './axes-CzLEMDeB.js';
3
- import { E as EvalIssue } from './types-public-Ow-tNtFE.js';
3
+ import { E as EvalIssue } from './types-public-Bk6d1WLN.js';
4
4
  import { D as DesignMode, C as CanvasClass } from './design-mode-DLufhrNp.js';
5
5
 
6
6
  interface RunAxisChecksInput {
@@ -1,10 +1,11 @@
1
- export { R as RunAxisChecksInput, r as runAxisChecks } from '../../dispatch-wxaIMwZt.js';
1
+ export { R as RunAxisChecksInput, r as runAxisChecks } from '../../dispatch-BnAH56p4.js';
2
2
  export { REGISTRY } from './registry.js';
3
- import { A as AxisCheck } from '../../types-public-Ow-tNtFE.js';
4
- export { a as AxisCheckInput, m as matches } from '../../types-public-Ow-tNtFE.js';
3
+ import { A as AxisCheck } from '../../types-public-Bk6d1WLN.js';
4
+ export { a as AxisCheckInput, m as matches } from '../../types-public-Bk6d1WLN.js';
5
5
  import '@ggui-ai/protocol';
6
6
  import '../../axes-CzLEMDeB.js';
7
7
  import '../../design-mode-DLufhrNp.js';
8
+ import '@ggui-ai/mcp-server-core';
8
9
  import '../../types-BOvHNG7K.js';
9
10
 
10
11
  declare const EXTRA_CHECKS: readonly AxisCheck[];