@ggui-ai/ui-gen 0.21.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.
Files changed (57) hide show
  1. package/dist/adapters/generation-dispatch.d.ts +1 -1
  2. package/dist/adapters/generation-dispatch.js +198 -59
  3. package/dist/adapters/generation-dispatch.js.map +1 -1
  4. package/dist/adapters/index.js +35 -10
  5. package/dist/adapters/index.js.map +1 -1
  6. package/dist/advanced/index.d.ts +2 -2
  7. package/dist/advanced/index.js +381 -58
  8. package/dist/advanced/index.js.map +1 -1
  9. package/dist/boilerplate.js.map +1 -1
  10. package/dist/check/index.d.ts +1 -1
  11. package/dist/check/index.js.map +1 -1
  12. package/dist/{create-ui-generator-D7kOXNjJ.d.ts → create-ui-generator-BEkzEtNz.d.ts} +1 -1
  13. package/dist/{dispatch-DGvhmARp.d.ts → dispatch-DJNpQ7DI.d.ts} +1 -1
  14. package/dist/evaluation/axis-checks/index.d.ts +3 -3
  15. package/dist/evaluation/axis-checks/index.js.map +1 -1
  16. package/dist/evaluation/axis-checks/registry.d.ts +1 -1
  17. package/dist/evaluation/index.d.ts +3 -3
  18. package/dist/evaluation/index.js +37 -20
  19. package/dist/evaluation/index.js.map +1 -1
  20. package/dist/harness/check/runtime-render/index.d.ts +1 -1
  21. package/dist/harness/index.d.ts +1 -1
  22. package/dist/harness/index.js +34 -9
  23. package/dist/harness/index.js.map +1 -1
  24. package/dist/harness/prompts.js +1 -1
  25. package/dist/harness/prompts.js.map +1 -1
  26. package/dist/harness/result-types.d.ts +15 -2
  27. package/dist/harness/result-types.js.map +1 -1
  28. package/dist/harness/runtime.d.ts +1 -1
  29. package/dist/harness/runtime.js.map +1 -1
  30. package/dist/harness/types-public.d.ts +1 -1
  31. package/dist/harness/types-public.js.map +1 -1
  32. package/dist/harness/validator-trace-sink.d.ts +1 -1
  33. package/dist/index.d.ts +22 -6
  34. package/dist/index.js +381 -58
  35. package/dist/index.js.map +1 -1
  36. package/dist/patch.d.ts +1 -1
  37. package/dist/{types-public-CzYqZclY.d.ts → types-public-mM_-1Yk3.d.ts} +16 -1
  38. package/dist/workflows.d.ts +1 -1
  39. package/package.json +12 -12
  40. package/src/adapters/claude/claude-code-login.ts +62 -7
  41. package/src/adapters/claude/sdk.ts +6 -5
  42. package/src/boilerplate/templates/layouts/chat-mobile.tsx.tmpl +7 -3
  43. package/src/boilerplate/templates/layouts/chat-universal.tsx.tmpl +7 -3
  44. package/src/contract-context.ts +1 -1
  45. package/src/create-ui-generator.ts +30 -0
  46. package/src/evaluation/index.ts +1 -0
  47. package/src/evaluation/llm-evaluator.ts +40 -13
  48. package/src/evaluation/types-public.ts +16 -0
  49. package/src/evaluation/visual-evaluator.ts +9 -6
  50. package/src/generator-build.ts +158 -0
  51. package/src/harness/claude-code-login-query.ts +5 -4
  52. package/src/harness/coding/assemble-result.ts +8 -1
  53. package/src/harness/coding/generate-task-runner.ts +75 -36
  54. package/src/harness/coding/run-coding-turn.ts +9 -0
  55. package/src/harness/coding/run-eval-round.ts +160 -5
  56. package/src/harness/result-types.ts +14 -0
  57. package/src/index.ts +2 -1
@@ -49,11 +49,25 @@ export type ModelRoles = Partial<Record<ModelRole, string>>;
49
49
  // Generation Result
50
50
  // =============================================================================
51
51
 
52
+ /**
53
+ * The same-exchange guard (ggui#404) ended this generation: the coding model
54
+ * made one identical tool exchange (same tool, same input, same result)
55
+ * `repeats` times, so the loop stopped instead of burning its remaining turns.
56
+ * Present ONLY when that guard ended the run — whether anything shipped is
57
+ * the compiled code's to say (the loop falls back to an earlier build).
58
+ */
59
+ export interface SameExchangeBreak {
60
+ readonly tool: string;
61
+ readonly repeats: number;
62
+ }
63
+
52
64
  export interface GenerationResult extends AdapterResult {
53
65
  /** Number of generation passes the harness performed */
54
66
  passesUsed: number;
55
67
  /** Three-tier evaluation result (tier 0 + LLM tier 1+2 + visual) */
56
68
  evalResult?: EvalResult;
69
+ /** Set only when the same-exchange guard ended the run (ggui#404); no key otherwise. */
70
+ sameExchangeBreak?: SameExchangeBreak;
57
71
  /** Whether background improvement should be spawned (auto-improve mode) */
58
72
  needsBackgroundImprovement?: boolean;
59
73
  /** Whether at least one commit passed the self-check (compile + type check + lint) */
package/src/index.ts CHANGED
@@ -21,7 +21,8 @@ export {
21
21
  } from './create-ui-generator.js';
22
22
  export type { CreateUiGeneratorOptions } from './create-ui-generator.js';
23
23
  export type { ProviderRetryInfo } from './harness/llm-router.js';
24
- export type { GenerationResult } from './harness/result-types.js';
24
+ export type { GenerationResult, SameExchangeBreak } from './harness/result-types.js';
25
+ export type { UiGenBuild } from './generator-build.js';
25
26
 
26
27
  // Generator registry seam re-export. The interface + slug helpers live
27
28
  // in `@ggui-ai/mcp-server-core`; the in-memory factory lives in