@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.
Files changed (106) hide show
  1. package/README.md +2 -2
  2. package/dist/{adapter-Cg_rkpGq.d.ts → adapter-BJwn74rx.d.ts} +49 -1
  3. package/dist/adapters/generation-dispatch.d.ts +8 -5
  4. package/dist/adapters/generation-dispatch.js +1118 -193
  5. package/dist/adapters/generation-dispatch.js.map +1 -1
  6. package/dist/adapters/index.js +27 -6
  7. package/dist/adapters/index.js.map +1 -1
  8. package/dist/advanced/index.d.ts +10 -9
  9. package/dist/advanced/index.js +1126 -202
  10. package/dist/advanced/index.js.map +1 -1
  11. package/dist/blueprint-validator.js +416 -92
  12. package/dist/blueprint-validator.js.map +1 -1
  13. package/dist/boilerplate.d.ts +2 -2
  14. package/dist/boilerplate.js +10 -3
  15. package/dist/boilerplate.js.map +1 -1
  16. package/dist/check/index.d.ts +3 -2
  17. package/dist/check/index.js +9 -2
  18. package/dist/check/index.js.map +1 -1
  19. package/dist/{create-ui-generator-DFnnArrv.d.ts → create-ui-generator-N4gRXpcL.d.ts} +3 -4
  20. package/dist/{design-mode-DLufhrNp.d.ts → design-mode-DGWN_Gkm.d.ts} +1 -1
  21. package/dist/{dispatch-CStl9eAw.d.ts → dispatch-BUoXRj_r.d.ts} +2 -2
  22. package/dist/evaluation/axis-checks/index.d.ts +5 -4
  23. package/dist/evaluation/axis-checks/index.js.map +1 -1
  24. package/dist/evaluation/axis-checks/registry.d.ts +4 -3
  25. package/dist/evaluation/index.d.ts +107 -539
  26. package/dist/evaluation/index.js +552 -55
  27. package/dist/evaluation/index.js.map +1 -1
  28. package/dist/evaluation/types.d.ts +17 -0
  29. package/dist/evaluation/types.js.map +1 -1
  30. package/dist/{generate-9IeNT4ZY.d.ts → generate-tSO_shQ0.d.ts} +1 -1
  31. package/dist/harness/check/runtime-render/index.d.ts +5 -5
  32. package/dist/harness/check/runtime-render/index.js +416 -92
  33. package/dist/harness/check/runtime-render/index.js.map +1 -1
  34. package/dist/harness/check/runtime-render/render-check-worker.js +393 -88
  35. package/dist/harness/check/runtime-render/render-check-worker.js.map +1 -1
  36. package/dist/harness/index.d.ts +4 -5
  37. package/dist/harness/index.js +36 -5
  38. package/dist/harness/index.js.map +1 -1
  39. package/dist/harness/prompts.d.ts +2 -2
  40. package/dist/harness/prompts.js +10 -1
  41. package/dist/harness/prompts.js.map +1 -1
  42. package/dist/harness/result-types.d.ts +17 -3
  43. package/dist/harness/result-types.js.map +1 -1
  44. package/dist/harness/runtime.d.ts +14 -6
  45. package/dist/harness/runtime.js +11 -4
  46. package/dist/harness/runtime.js.map +1 -1
  47. package/dist/harness/types-public.d.ts +4 -2
  48. package/dist/harness/types-public.js +10 -3
  49. package/dist/harness/types-public.js.map +1 -1
  50. package/dist/harness/validator-trace-sink.d.ts +4 -3
  51. package/dist/index.d.ts +46 -11
  52. package/dist/index.js +1128 -200
  53. package/dist/index.js.map +1 -1
  54. package/dist/patch.d.ts +3 -3
  55. package/dist/{prompts-YU9piOgs.d.ts → prompts-BhNUuRoZ.d.ts} +1 -1
  56. package/dist/tools/render-check-worker.js +8 -1
  57. package/dist/tools/render-check-worker.js.map +1 -1
  58. package/dist/{types-public-BJTLpzWn.d.ts → types-public-B7wn4ce5.d.ts} +384 -3
  59. package/dist/validation/index.d.ts +1 -1
  60. package/dist/validation/index.js +1 -1
  61. package/dist/validation/index.js.map +1 -1
  62. package/dist/visual-evaluator-C9L-o6ap.d.ts +639 -0
  63. package/dist/workflows.d.ts +3 -3
  64. package/package.json +12 -12
  65. package/src/adapters/generation-dispatch.ts +2 -0
  66. package/src/boilerplate/free-design-prompt.ts +3 -3
  67. package/src/boilerplate/hard-sections.ts +1 -1
  68. package/src/boilerplate/templates/layouts/chat-mobile.tsx.tmpl +3 -1
  69. package/src/boilerplate/templates/layouts/chat-universal.tsx.tmpl +3 -1
  70. package/src/boilerplate/templates/layouts/fullscreen-desktop.tsx.tmpl +3 -1
  71. package/src/boilerplate/templates/layouts/fullscreen-universal.tsx.tmpl +3 -1
  72. package/src/check/run-tier0.ts +6 -3
  73. package/src/contract-context.ts +1 -1
  74. package/src/evaluation/cost-tracker.ts +54 -6
  75. package/src/evaluation/criteria/edge-probe.ts +286 -0
  76. package/src/evaluation/criteria/edge.ts +202 -0
  77. package/src/evaluation/criteria/resolve.ts +55 -7
  78. package/src/evaluation/index.ts +5 -1
  79. package/src/evaluation/judge-spend.ts +48 -0
  80. package/src/evaluation/types-public.ts +91 -0
  81. package/src/evaluation/types.ts +10 -0
  82. package/src/evaluation/visual-evaluator.ts +236 -40
  83. package/src/harness/check/runtime-render/adapter.ts +18 -0
  84. package/src/harness/check/runtime-render/probe-pending.ts +111 -0
  85. package/src/harness/check/runtime-render/render-check-host.ts +10 -6
  86. package/src/harness/check/runtime-render/render-check-worker.ts +6 -3
  87. package/src/harness/check/runtime-render/render-check.ts +417 -133
  88. package/src/harness/check/runtime-render/walk.ts +200 -0
  89. package/src/harness/coding/assemble-result.ts +2 -0
  90. package/src/harness/coding/generate-task-runner.ts +27 -0
  91. package/src/harness/coding/init-session.ts +5 -3
  92. package/src/harness/coding/run-coding-turn.ts +5 -1
  93. package/src/harness/coding/run-eval-round.ts +63 -3
  94. package/src/harness/in-loop-evaluation.ts +39 -0
  95. package/src/harness/llm-router.ts +58 -1
  96. package/src/harness/result-types.ts +9 -0
  97. package/src/harness/runtime.ts +9 -0
  98. package/src/harness/types-public.ts +10 -1
  99. package/src/index.ts +5 -0
  100. package/src/internal/verdict-line.ts +33 -0
  101. package/src/taught-tokens.ts +32 -0
  102. package/src/tools/render-check-worker.ts +2 -1
  103. package/src/tools/render-check.ts +8 -7
  104. package/src/validation/primitives.ts +1 -1
  105. package/dist/llm-router-nfO7wPec.d.ts +0 -267
  106. package/dist/{bank-CT4eEkta.d.ts → bank-Ctdp3FUA.d.ts} +3 -3
@@ -1,8 +1,9 @@
1
1
  import { C as Classification } from '../axes-CKVCzR_x.js';
2
- import { E as EvalIssue } from '../types-public-BJTLpzWn.js';
3
- import '@ggui-ai/mcp-server-core';
4
- import '../design-mode-DLufhrNp.js';
2
+ import { E as EvalIssue } from '../types-public-B7wn4ce5.js';
5
3
  import '@ggui-ai/protocol';
4
+ import '../llm.js';
5
+ import '@ggui-ai/mcp-server-core';
6
+ import '../design-mode-DGWN_Gkm.js';
6
7
  import '../types-Dh1s4K9j.js';
7
8
 
8
9
  /**
package/dist/index.d.ts CHANGED
@@ -1,29 +1,31 @@
1
- export { C as CreateUiGeneratorOptions, c as createUiGenerator, e as extractComponentCode } from './create-ui-generator-DFnnArrv.js';
2
- export { R as RuntimeRenderProbeConfig } from './adapter-Cg_rkpGq.js';
3
- export { P as ProviderRetryInfo } from './llm-router-nfO7wPec.js';
1
+ export { C as CreateUiGeneratorOptions, c as createUiGenerator, e as extractComponentCode } from './create-ui-generator-N4gRXpcL.js';
2
+ export { R as RuntimeRenderProbeConfig } from './adapter-BJwn74rx.js';
3
+ import { Q as QualityConfig } from './types-public-B7wn4ce5.js';
4
+ export { P as ProviderRetryInfo } from './types-public-B7wn4ce5.js';
4
5
  export { GenerationResult, SameExchangeBreak } from './harness/result-types.js';
5
6
  import { GeneratorBuild, UiGenerator } from '@ggui-ai/mcp-server-core';
6
- import { D as DesignMode } from './design-mode-DLufhrNp.js';
7
- export { a as CANVAS_BREAKPOINTS, b as CANVAS_CLASSES, c as CANVAS_DESCRIPTORS, d as CANVAS_VIEWPORTS, C as CanvasClass, e as CanvasDescriptor, f as CanvasDisplayMode, g as CanvasViewport, h as DEFAULT_DESIGN_MODE, i as DESIGN_MODES, j as canvasDisplayModeForShell, k as canvasForRendering, l as canvasForViewportWidth, m as describeCanvas } from './design-mode-DLufhrNp.js';
7
+ import { D as DesignMode } from './design-mode-DGWN_Gkm.js';
8
+ 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, h as DEFAULT_DESIGN_MODE, i as DESIGN_MODES, j as canvasDisplayModeForShell, k as canvasForRendering, l as canvasForViewportWidth, m as describeCanvas } from './design-mode-DGWN_Gkm.js';
8
9
  export { CreateInMemoryGeneratorRegistryOptions, createInMemoryGeneratorRegistry } from '@ggui-ai/mcp-server-core/in-memory';
9
- export { R as RenderingContext, b as buildContractsContext, a as buildRenderingContext, c as buildVarianceContext, d as canvasForRenderingContext, i as injectContracts, e as injectRenderingContext, f as injectVariance } from './prompts-YU9piOgs.js';
10
+ export { R as RenderingContext, b as buildContractsContext, a as buildRenderingContext, c as buildVarianceContext, d as canvasForRenderingContext, i as injectContracts, e as injectRenderingContext, f as injectVariance } from './prompts-BhNUuRoZ.js';
10
11
  import { LLMToolDef } from './llm.js';
11
12
  import Anthropic from '@anthropic-ai/sdk';
12
13
  export { A as AESTHETIC_BRIEF_MAX_CHARS, G as GenerationProfileInput } from './styling-profile-CxfvV48g.js';
13
14
  export { VisualEvalAgentSpec } from './adapters/generation-dispatch.js';
14
15
  import { AppGenerationProfileEffort, ModelTier } from '@ggui-ai/protocol';
15
16
  import './harness/runtime.js';
16
- import './types-public-BJTLpzWn.js';
17
+ import './bank-Ctdp3FUA.js';
18
+ import 'zod';
19
+ import './generate-tSO_shQ0.js';
17
20
  import './axes-CKVCzR_x.js';
18
21
  import './types-Dh1s4K9j.js';
19
- import './bank-CT4eEkta.js';
20
- import 'zod';
21
- import './generate-9IeNT4ZY.js';
22
22
  import '@ggui-ai/gadgets';
23
23
  import './evaluation/types.js';
24
24
  import './harness/types-public.js';
25
25
  import './policy.js';
26
26
  import './adapters/types.js';
27
+ import './visual-evaluator-C9L-o6ap.js';
28
+ import 'puppeteer-core';
27
29
 
28
30
  /**
29
31
  * ui-gen's precise {@link GeneratorBuild}: the core port's generic shape with
@@ -46,6 +48,39 @@ interface UiGenBuild extends GeneratorBuild {
46
48
  */
47
49
  declare function generatorBuild(designMode: DesignMode): UiGenBuild;
48
50
 
51
+ /**
52
+ * Which in-loop evaluation legs a generation runs (ggui#1513).
53
+ *
54
+ * The harness gates its evaluation rounds on this, and nothing else does:
55
+ * the text evaluator runs when `evaluation.enabled`, and the visual judge
56
+ * runs when `visualEvaluation.enabled` or when a quality config asks for it
57
+ * (`qualityConfig.visualEval`). A host that needs to know whether a
58
+ * generation's token counts (`GenerationMetadata`) can include evaluation
59
+ * calls reads it here, with the options it configured the generator with,
60
+ * instead of keeping its own copy of the rule.
61
+ */
62
+
63
+ /** The switches that turn an in-loop evaluation leg on. */
64
+ interface InLoopEvaluationSwitches {
65
+ readonly evaluation?: {
66
+ readonly enabled: boolean;
67
+ };
68
+ readonly visualEvaluation?: {
69
+ readonly enabled: boolean;
70
+ };
71
+ readonly qualityConfig?: Pick<QualityConfig, "visualEval">;
72
+ }
73
+ /** The in-loop evaluation legs these options turn on. */
74
+ declare function inLoopEvaluation(options: InLoopEvaluationSwitches): {
75
+ readonly text: boolean;
76
+ readonly visual: boolean;
77
+ };
78
+ /**
79
+ * True when these options turn either leg on: a generation built with them
80
+ * can spend tokens on evaluation calls as well as on its coding turns.
81
+ */
82
+ declare function runsInLoopEvaluation(options: InLoopEvaluationSwitches): boolean;
83
+
49
84
  /**
50
85
  * Compile raw JSX/TSX component code emitted by `createUiGenerator` into
51
86
  * plain ESM that the browser's `ReactComponentRenderer` can mount.
@@ -203,4 +238,4 @@ declare const EFFORT_DIALS: Readonly<Record<AppGenerationProfileEffort, EffortDi
203
238
  /** The dials for a named level; `undefined` when no level is named (the deployment's options stand). */
204
239
  declare function effortDials(effort: AppGenerationProfileEffort | undefined): EffortDials | undefined;
205
240
 
206
- export { CLAUDE_CODE_LOGIN_CREDENTIAL, CompileComponentCodeError, DesignMode, EFFORT_DIALS, EFFORT_TABLE_VERSION, type EffortDials, HARNESS_CODING_TOOLS, HARNESS_SCOPED_TOOLS, type UiGenBuild, compileComponentCode, createAnthropicClient, effortDials, generatorBuild, harnessToolEntry, harnessToolNames, withBrowserCompile };
241
+ export { CLAUDE_CODE_LOGIN_CREDENTIAL, CompileComponentCodeError, DesignMode, EFFORT_DIALS, EFFORT_TABLE_VERSION, type EffortDials, HARNESS_CODING_TOOLS, HARNESS_SCOPED_TOOLS, type InLoopEvaluationSwitches, type UiGenBuild, compileComponentCode, createAnthropicClient, effortDials, generatorBuild, harnessToolEntry, harnessToolNames, inLoopEvaluation, runsInLoopEvaluation, withBrowserCompile };