@ggui-ai/ui-gen 0.22.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 (90) 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 +549 -129
  4. package/dist/adapters/generation-dispatch.js.map +1 -1
  5. package/dist/adapters/index.js +1 -1
  6. package/dist/adapters/index.js.map +1 -1
  7. package/dist/advanced/index.d.ts +5 -3
  8. package/dist/advanced/index.js +601 -144
  9. package/dist/advanced/index.js.map +1 -1
  10. package/dist/blueprint-validator.js +178 -54
  11. package/dist/blueprint-validator.js.map +1 -1
  12. package/dist/boilerplate.js +1 -0
  13. package/dist/boilerplate.js.map +1 -1
  14. package/dist/check/index.d.ts +2 -1
  15. package/dist/check/index.js +47 -1
  16. package/dist/check/index.js.map +1 -1
  17. package/dist/{create-ui-generator-BEkzEtNz.d.ts → create-ui-generator-GIhzx08x.d.ts} +34 -10
  18. package/dist/{dispatch-DJNpQ7DI.d.ts → dispatch-BnAH56p4.d.ts} +1 -1
  19. package/dist/evaluation/axis-checks/index.d.ts +4 -3
  20. package/dist/evaluation/axis-checks/index.js +19 -4
  21. package/dist/evaluation/axis-checks/index.js.map +1 -1
  22. package/dist/evaluation/axis-checks/registry.d.ts +2 -1
  23. package/dist/evaluation/axis-checks/registry.js +19 -4
  24. package/dist/evaluation/axis-checks/registry.js.map +1 -1
  25. package/dist/evaluation/index.d.ts +4 -3
  26. package/dist/evaluation/index.js +21 -6
  27. package/dist/evaluation/index.js.map +1 -1
  28. package/dist/harness/check/runtime-render/index.d.ts +27 -8
  29. package/dist/harness/check/runtime-render/index.js +217 -54
  30. package/dist/harness/check/runtime-render/index.js.map +1 -1
  31. package/dist/harness/check/runtime-render/render-check-worker.d.ts +8 -1
  32. package/dist/harness/check/runtime-render/render-check-worker.js +72 -32
  33. package/dist/harness/check/runtime-render/render-check-worker.js.map +1 -1
  34. package/dist/harness/index.d.ts +2 -1
  35. package/dist/harness/index.js +3 -2
  36. package/dist/harness/index.js.map +1 -1
  37. package/dist/harness/prompts.js.map +1 -1
  38. package/dist/harness/result-types.d.ts +2 -1
  39. package/dist/harness/runtime.d.ts +2 -1
  40. package/dist/harness/runtime.js +2 -1
  41. package/dist/harness/runtime.js.map +1 -1
  42. package/dist/harness/types-public.d.ts +18 -5
  43. package/dist/harness/types-public.js +1 -0
  44. package/dist/harness/types-public.js.map +1 -1
  45. package/dist/harness/validator-trace-sink.d.ts +2 -1
  46. package/dist/index.d.ts +38 -3
  47. package/dist/index.js +592 -144
  48. package/dist/index.js.map +1 -1
  49. package/dist/patch.d.ts +2 -1
  50. package/dist/policy.d.ts +7 -4
  51. package/dist/policy.js.map +1 -1
  52. package/dist/tools/get-primitives-ts.d.ts +1 -1
  53. package/dist/tools/get-primitives-ts.js +1 -1
  54. package/dist/tools/get-primitives-ts.js.map +1 -1
  55. package/dist/tools/render-check-worker.d.ts +7 -1
  56. package/dist/tools/render-check-worker.js +55 -23
  57. package/dist/tools/render-check-worker.js.map +1 -1
  58. package/dist/{types-public-mM_-1Yk3.d.ts → types-public-Bk6d1WLN.d.ts} +98 -9
  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/workflows.d.ts +2 -1
  63. package/package.json +12 -12
  64. package/src/adapters/generation-dispatch.ts +137 -96
  65. package/src/advanced/generator.ts +16 -1
  66. package/src/blueprint-validator.ts +21 -6
  67. package/src/boilerplate/hard-sections.ts +1 -0
  68. package/src/check/run-tier0.ts +80 -1
  69. package/src/coding-agent/tools.ts +6 -1
  70. package/src/create-ui-generator.ts +185 -95
  71. package/src/evaluation/axis-checks/checks/state-payload.ts +29 -4
  72. package/src/evaluation/types-public.ts +94 -8
  73. package/src/harness/check/runtime-render/adapter.ts +223 -58
  74. package/src/harness/check/runtime-render/index.ts +75 -2
  75. package/src/harness/check/runtime-render/render-check-host.ts +111 -26
  76. package/src/harness/check/runtime-render/render-check-worker.ts +83 -29
  77. package/src/harness/check/runtime-render/render-check.ts +173 -117
  78. package/src/harness/coding/generate-task-runner.ts +57 -4
  79. package/src/harness/coding/init-session.ts +13 -0
  80. package/src/harness/coding/run-eval-round.ts +238 -13
  81. package/src/harness/llm-router.ts +3 -3
  82. package/src/harness/policy.ts +11 -0
  83. package/src/harness/primitive-slice.ts +104 -0
  84. package/src/harness/types-public.ts +17 -5
  85. package/src/index.ts +4 -0
  86. package/src/policy.ts +7 -4
  87. package/src/tools/get-primitives-ts.ts +1 -1
  88. package/src/tools/render-check-worker.ts +74 -23
  89. package/src/validation/primitives.ts +1 -1
  90. package/dist/render-check-C0CqVceF.d.ts +0 -87
@@ -1,5 +1,6 @@
1
1
  import { C as Classification } from '../axes-CzLEMDeB.js';
2
- import { E as EvalIssue } from '../types-public-mM_-1Yk3.js';
2
+ import { E as EvalIssue } from '../types-public-Bk6d1WLN.js';
3
+ import '@ggui-ai/mcp-server-core';
3
4
  import '../design-mode-DLufhrNp.js';
4
5
  import '@ggui-ai/protocol';
5
6
  import '../types-BOvHNG7K.js';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { C as CreateUiGeneratorOptions, c as createUiGenerator, e as extractComponentCode } from './create-ui-generator-BEkzEtNz.js';
1
+ export { C as CreateUiGeneratorOptions, c as createUiGenerator, e as extractComponentCode } from './create-ui-generator-GIhzx08x.js';
2
+ export { R as RuntimeRenderProbeConfig } from './adapter-Du7P_5Fx.js';
2
3
  export { P as ProviderRetryInfo } from './llm-router-DwwUK1bz.js';
3
4
  export { GenerationResult, SameExchangeBreak } from './harness/result-types.js';
4
5
  import { GeneratorBuild, UiGenerator } from '@ggui-ai/mcp-server-core';
@@ -10,13 +11,15 @@ import Anthropic from '@anthropic-ai/sdk';
10
11
  export { A as AESTHETIC_BRIEF_MAX_CHARS, G as GenerationProfileInput } from './styling-profile-CxfvV48g.js';
11
12
  import { AppGenerationProfileEffort, ModelTier } from '@ggui-ai/protocol';
12
13
  import './harness/runtime.js';
13
- import './types-public-mM_-1Yk3.js';
14
+ import './types-public-Bk6d1WLN.js';
14
15
  import './axes-CzLEMDeB.js';
15
16
  import './types-BOvHNG7K.js';
16
17
  import './generate-9IeNT4ZY.js';
17
18
  import './llm.js';
18
19
  import '@ggui-ai/gadgets';
19
20
  import './evaluation/types.js';
21
+ import './harness/types-public.js';
22
+ import './policy.js';
20
23
  import './adapters/types.js';
21
24
  import 'zod';
22
25
 
@@ -134,6 +137,38 @@ declare function withBrowserCompile(generator: UiGenerator): UiGenerator;
134
137
  */
135
138
  declare function createAnthropicClient(rawKey: string | undefined): Anthropic;
136
139
 
140
+ /**
141
+ * ggui#1185 — generation through the machine's own Claude Code login.
142
+ *
143
+ * The Claude SDK adapter spawns the Claude Code binary. Given no provider
144
+ * key, that binary authenticates with whatever `claude` is logged in as on
145
+ * the machine — the operator's own plan. This module holds the three
146
+ * things that make such a run honest and reproducible:
147
+ *
148
+ * 1. {@link CLAUDE_CODE_LOGIN_CREDENTIAL} — the sentinel a `ProviderKeyRef`
149
+ * carries in place of a key, the same shape `bedrock-iam` already uses
150
+ * for "authenticate with ambient credentials, not a key I hold".
151
+ * 2. {@link loginChildEnv} — the spawned process sees an ALLOWLIST of the
152
+ * parent's env, never the parent's env minus a few names: no provider
153
+ * key (the binary prefers an env key over its login, so a stale
154
+ * `ANTHROPIC_API_KEY` would silently take the run off the login path),
155
+ * no other secret the parent merely holds, and no switch that would
156
+ * change what the binary does (ggui#1278).
157
+ * 3. {@link claudeCodeLoginQueryOptions} — the SDK options that keep the
158
+ * run bounded: no built-in tool (`tools: []`), no `~/.claude` settings,
159
+ * hooks or MCP servers leaking in (`settingSources: []`). Not
160
+ * `--bare`, either: on the SDK's bundled binary `-p` reads the login
161
+ * store as it always has, so no flag is needed — and the flag it
162
+ * would be (`--no-bare`) is one that binary rejects; see the note on
163
+ * the function below.
164
+ *
165
+ * Opt-in, off by default; the default stays a provider key. The copy that
166
+ * names what this does lives with the CLI flag that enables it.
167
+ */
168
+
169
+ /** Sentinel credential: "no key — use the machine's Claude Code login". */
170
+ declare const CLAUDE_CODE_LOGIN_CREDENTIAL: "claude-code-login";
171
+
137
172
  /** Bump when a level's meaning changes; the price line beside it follows. */
138
173
  declare const EFFORT_TABLE_VERSION = 1;
139
174
  interface EffortDials {
@@ -152,4 +187,4 @@ declare const EFFORT_DIALS: Readonly<Record<AppGenerationProfileEffort, EffortDi
152
187
  /** The dials for a named level; `undefined` when no level is named (the deployment's options stand). */
153
188
  declare function effortDials(effort: AppGenerationProfileEffort | undefined): EffortDials | undefined;
154
189
 
155
- export { CompileComponentCodeError, DesignMode, EFFORT_DIALS, EFFORT_TABLE_VERSION, type EffortDials, type UiGenBuild, compileComponentCode, createAnthropicClient, effortDials, withBrowserCompile };
190
+ export { CLAUDE_CODE_LOGIN_CREDENTIAL, CompileComponentCodeError, DesignMode, EFFORT_DIALS, EFFORT_TABLE_VERSION, type EffortDials, type UiGenBuild, compileComponentCode, createAnthropicClient, effortDials, withBrowserCompile };