@ggui-ai/ui-gen 0.15.0 → 0.17.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 (123) hide show
  1. package/dist/adapters/generation-dispatch.d.ts +24 -4
  2. package/dist/adapters/generation-dispatch.js +5188 -3920
  3. package/dist/adapters/generation-dispatch.js.map +1 -1
  4. package/dist/adapters/index.js +33 -26
  5. package/dist/adapters/index.js.map +1 -1
  6. package/dist/advanced/index.d.ts +22 -13
  7. package/dist/advanced/index.js +4889 -3561
  8. package/dist/advanced/index.js.map +1 -1
  9. package/dist/blueprint-validator.js +8 -12
  10. package/dist/blueprint-validator.js.map +1 -1
  11. package/dist/boilerplate.d.ts +19 -1
  12. package/dist/boilerplate.js +671 -254
  13. package/dist/boilerplate.js.map +1 -1
  14. package/dist/check/index.d.ts +17 -3
  15. package/dist/check/index.js +34 -25
  16. package/dist/check/index.js.map +1 -1
  17. package/dist/compose.js +1 -1
  18. package/dist/compose.js.map +1 -1
  19. package/dist/create-ui-generator-C8Ki9Wz1.d.ts +189 -0
  20. package/dist/design-mode-DLufhrNp.d.ts +61 -0
  21. package/dist/{dispatch-BuZfTh9r.d.ts → dispatch-D2htzi9h.d.ts} +4 -1
  22. package/dist/evaluation/axis-checks/index.d.ts +4 -3
  23. package/dist/evaluation/axis-checks/index.js +300 -14
  24. package/dist/evaluation/axis-checks/index.js.map +1 -1
  25. package/dist/evaluation/axis-checks/registry.d.ts +2 -1
  26. package/dist/evaluation/axis-checks/registry.js +253 -1
  27. package/dist/evaluation/axis-checks/registry.js.map +1 -1
  28. package/dist/evaluation/index.d.ts +297 -5
  29. package/dist/evaluation/index.js +4515 -120
  30. package/dist/evaluation/index.js.map +1 -1
  31. package/dist/fragments/index.js +1 -1
  32. package/dist/fragments/index.js.map +1 -1
  33. package/dist/{generate-BTfvELgl.d.ts → generate-9IeNT4ZY.d.ts} +10 -1
  34. package/dist/harness/check/runtime-render/index.d.ts +3 -1
  35. package/dist/harness/check/runtime-render/index.js +8 -12
  36. package/dist/harness/check/runtime-render/index.js.map +1 -1
  37. package/dist/harness/index.d.ts +3 -1
  38. package/dist/harness/index.js +913 -441
  39. package/dist/harness/index.js.map +1 -1
  40. package/dist/harness/llm-trace-sink.d.ts +3 -3
  41. package/dist/harness/llm-trace-sink.js.map +1 -1
  42. package/dist/harness/prompts.d.ts +2 -1
  43. package/dist/harness/prompts.js +6 -3
  44. package/dist/harness/prompts.js.map +1 -1
  45. package/dist/harness/result-types.d.ts +17 -5
  46. package/dist/harness/result-types.js.map +1 -1
  47. package/dist/harness/runtime.d.ts +28 -3
  48. package/dist/harness/runtime.js +702 -274
  49. package/dist/harness/runtime.js.map +1 -1
  50. package/dist/harness/types-public.d.ts +39 -1
  51. package/dist/harness/types-public.js +913 -441
  52. package/dist/harness/types-public.js.map +1 -1
  53. package/dist/harness/validator-trace-sink.d.ts +2 -1
  54. package/dist/index.d.ts +32 -6
  55. package/dist/index.js +4899 -3560
  56. package/dist/index.js.map +1 -1
  57. package/dist/patch.d.ts +3 -1
  58. package/dist/{prompts-BVhtH3M1.d.ts → prompts-YU9piOgs.d.ts} +21 -45
  59. package/dist/providers/index.d.ts +2 -2
  60. package/dist/providers/index.js.map +1 -1
  61. package/dist/styling-profile-CxfvV48g.d.ts +35 -0
  62. package/dist/tools/get-primitives-ts.d.ts +1 -1
  63. package/dist/tools/get-primitives-ts.js +1 -1
  64. package/dist/tools/get-primitives-ts.js.map +1 -1
  65. package/dist/{types-public-CkNWEov9.d.ts → types-public-DVSssdc-.d.ts} +85 -5
  66. package/dist/validation/index.d.ts +1 -1
  67. package/dist/validation/index.js +4 -4
  68. package/dist/validation/index.js.map +1 -1
  69. package/dist/workflows.d.ts +3 -1
  70. package/package.json +12 -12
  71. package/src/adapters/generation-dispatch.ts +62 -4
  72. package/src/adapters/provider-router.ts +7 -6
  73. package/src/adapters/tools.ts +5 -5
  74. package/src/advanced/generator.ts +11 -10
  75. package/src/advanced/index.ts +5 -4
  76. package/src/boilerplate/free-design-prompt.ts +336 -0
  77. package/src/boilerplate/generate.ts +10 -1
  78. package/src/boilerplate/hard-sections.ts +257 -0
  79. package/src/boilerplate/render.ts +32 -8
  80. package/src/boilerplate/styling-profile.ts +166 -0
  81. package/src/boilerplate/system-prompt.ts +101 -237
  82. package/src/boilerplate/templates/base-free.tsx.tmpl +24 -0
  83. package/src/check/run-tier0.ts +82 -20
  84. package/src/coding-agent/tools.ts +8 -2
  85. package/src/contract-context.ts +43 -14
  86. package/src/create-harness.ts +15 -0
  87. package/src/create-ui-generator.ts +112 -27
  88. package/src/design-mode.ts +192 -0
  89. package/src/design-system-docs.ts +24 -17
  90. package/src/effort.ts +48 -0
  91. package/src/evaluation/axis-checks/checks/grid.ts +148 -0
  92. package/src/evaluation/axis-checks/checks/universal.ts +244 -0
  93. package/src/evaluation/axis-checks/dispatch.ts +82 -13
  94. package/src/evaluation/axis-checks/extras.ts +5 -0
  95. package/src/evaluation/axis-checks/helpers.ts +12 -0
  96. package/src/evaluation/axis-checks/registry.ts +2 -0
  97. package/src/evaluation/cost-tracker.ts +2 -3
  98. package/src/evaluation/design-identity.ts +96 -0
  99. package/src/evaluation/index.ts +63 -2
  100. package/src/evaluation/llm-evaluator.ts +89 -21
  101. package/src/evaluation/theme-css.ts +14 -0
  102. package/src/evaluation/types-public.ts +137 -8
  103. package/src/evaluation/visual-evaluator.ts +759 -54
  104. package/src/fragments/render.ts +1 -1
  105. package/src/harness/check/runtime-render/prepare-mockup.ts +18 -11
  106. package/src/harness/coding/dupe-break.ts +0 -0
  107. package/src/harness/coding/init-session.ts +2 -0
  108. package/src/harness/coding/run-coding-turn.ts +9 -14
  109. package/src/harness/coding/run-eval-round.ts +46 -5
  110. package/src/harness/llm-trace-sink.ts +3 -3
  111. package/src/harness/result-types.ts +15 -3
  112. package/src/harness/runtime.ts +28 -0
  113. package/src/harness/types-public.ts +38 -0
  114. package/src/index.ts +28 -0
  115. package/src/internal/extract-call-signatures.ts +2 -2
  116. package/src/pin-fixtures.ts +98 -0
  117. package/src/providers/bedrock.ts +4 -4
  118. package/src/run-check.ts +11 -10
  119. package/src/tools/get-primitives-ts.ts +1 -1
  120. package/src/tools.ts +2 -1
  121. package/src/validation/allowed-imports.ts +8 -2
  122. package/src/validation/primitives.ts +1 -1
  123. package/dist/create-ui-generator-D6TKuv9V.d.ts +0 -106
@@ -1,10 +1,12 @@
1
1
  import * as _ggui_ai_protocol from '@ggui-ai/protocol';
2
2
  import { JsonValue, DataContract, JsonObject, GadgetDescriptor } from '@ggui-ai/protocol';
3
+ import { G as GenerationProfileInput } from '../styling-profile-CxfvV48g.js';
3
4
  import { C as Classification } from '../axes-CzLEMDeB.js';
4
- import { E as EvalIssue, R as RuntimeProbeStatus, A as AxisCheck, c as EvalTier } from '../types-public-CkNWEov9.js';
5
+ import { E as EvalIssue, R as RuntimeProbeStatus, A as AxisCheck, c as EvalTier } from '../types-public-DVSssdc-.js';
5
6
  import { LLMToolDef } from '../llm.js';
6
7
  import { H as HarnessFragment, a as CacheTier } from '../types-BOvHNG7K.js';
7
8
  import { ProcessMode, HarnessPolicy } from '../policy.js';
9
+ import { D as DesignMode, C as CanvasClass } from '../design-mode-DLufhrNp.js';
8
10
 
9
11
  /** Called by the executor to run a single task. One of these per task.id. */
10
12
  type TaskRunner = (task: Task, ctx: TaskContext) => Promise<JsonValue>;
@@ -355,6 +357,16 @@ interface Harness {
355
357
  readonly id: HarnessId;
356
358
  readonly name: HarnessName;
357
359
  readonly classification: Classification;
360
+ /**
361
+ * Which triad this harness materialised — threaded from
362
+ * `CreateHarnessInput.designMode` into the HOW leg (prompt), the WHAT
363
+ * leg (boilerplate) and every CHECK consumer (tier-0 gate, axis
364
+ * checks, evaluator criteria). `constrained` unless the caller opted
365
+ * into `free`.
366
+ */
367
+ readonly designMode: DesignMode;
368
+ /** The app's generation profile in force for this harness (#991), if any. */
369
+ readonly profile?: GenerationProfileInput;
358
370
  readonly how: HowLeg;
359
371
  readonly what: WhatLeg;
360
372
  readonly check: CheckLeg;
@@ -421,6 +433,12 @@ type SystemPromptBuilder = (input: {
421
433
  readonly shellType?: string;
422
434
  readonly screen?: string;
423
435
  readonly axisDelta?: string;
436
+ /** Which triad to teach — see `CreateHarnessInput.designMode`. */
437
+ readonly designMode?: DesignMode;
438
+ /** Rendering canvas class (`free` mode) — see `CreateHarnessInput.canvas`. */
439
+ readonly canvas?: CanvasClass;
440
+ /** The app's generation profile (#991) — see `CreateHarnessInput.profile`. */
441
+ readonly profile?: GenerationProfileInput;
424
442
  }) => string;
425
443
  interface CreateHarnessInput {
426
444
  readonly classification: Classification;
@@ -429,6 +447,26 @@ interface CreateHarnessInput {
429
447
  readonly shellType?: "chat" | "fullscreen" | "spatial";
430
448
  readonly screen?: "mobile" | "tablet" | "desktop" | "universal";
431
449
  readonly overrides?: HarnessOverrides;
450
+ /**
451
+ * Which triad to materialise. `constrained` (default) is today's
452
+ * design-system triad, byte-identical to the pre-`designMode`
453
+ * harness (same prompt, boilerplate, tier-0 legs, criteria and id).
454
+ * `free` relaxes only the design vocabulary; every hard contract
455
+ * stays. See `../design-mode.ts`.
456
+ */
457
+ readonly designMode?: DesignMode;
458
+ /**
459
+ * Rendering canvas class the `free` prompt states explicitly. When
460
+ * omitted the prompt derives it from `shellType` × `screen`. Ignored
461
+ * by the `constrained` prompt.
462
+ */
463
+ readonly canvas?: CanvasClass;
464
+ /**
465
+ * The app's generation profile (#991): operator-declared free text the
466
+ * HOW leg renders as one bounded section and every judge reads under its
467
+ * own frame. Absent = byte-identical prompts.
468
+ */
469
+ readonly profile?: GenerationProfileInput;
432
470
  /**
433
471
  * Pre-resolved static harness policy. When omitted, `createHarness`
434
472
  * falls back to `DEFAULT_HARNESS_POLICY` from `@ggui-ai/ui-gen/policy`.