@ggui-ai/ui-gen 0.23.0 → 0.25.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.
- package/dist/adapter-Cg_rkpGq.d.ts +201 -0
- package/dist/adapters/generation-dispatch.d.ts +58 -15
- package/dist/adapters/generation-dispatch.js +1418 -180
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +3 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +12 -8
- package/dist/advanced/index.js +1467 -239
- package/dist/advanced/index.js.map +1 -1
- package/dist/{axes-CzLEMDeB.d.ts → axes-CKVCzR_x.d.ts} +1 -1
- package/dist/bank-CT4eEkta.d.ts +118 -0
- package/dist/blueprint-validator.js +153 -59
- package/dist/blueprint-validator.js.map +1 -1
- package/dist/boilerplate.js +24 -12
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +12 -4
- package/dist/check/index.js +94 -2
- package/dist/check/index.js.map +1 -1
- package/dist/classifier/index.d.ts +2 -2
- package/dist/compose.d.ts +2 -2
- package/dist/{create-ui-generator-D0kbWwln.d.ts → create-ui-generator-DFnnArrv.d.ts} +43 -11
- package/dist/{dispatch-wxaIMwZt.d.ts → dispatch-CStl9eAw.d.ts} +5 -3
- package/dist/evaluation/axis-checks/index.d.ts +6 -5
- package/dist/evaluation/axis-checks/index.js +90 -2
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +4 -3
- package/dist/evaluation/axis-checks/registry.js +88 -1
- package/dist/evaluation/axis-checks/registry.js.map +1 -1
- package/dist/evaluation/index.d.ts +301 -23
- package/dist/evaluation/index.js +746 -30
- package/dist/evaluation/index.js.map +1 -1
- package/dist/evaluation/types.d.ts +9 -1
- package/dist/evaluation/types.js.map +1 -1
- package/dist/fragments/index.d.ts +3 -3
- package/dist/harness/check/runtime-render/index.d.ts +30 -11
- package/dist/harness/check/runtime-render/index.js +203 -60
- package/dist/harness/check/runtime-render/index.js.map +1 -1
- package/dist/harness/check/runtime-render/render-check-worker.d.ts +8 -1
- package/dist/harness/check/runtime-render/render-check-worker.js +72 -32
- package/dist/harness/check/runtime-render/render-check-worker.js.map +1 -1
- package/dist/harness/index.d.ts +5 -4
- package/dist/harness/index.js +33 -15
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/prompts.js.map +1 -1
- package/dist/harness/result-types.d.ts +4 -3
- package/dist/harness/runtime.d.ts +11 -4
- package/dist/harness/runtime.js +26 -14
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +13 -4
- package/dist/harness/types-public.js +33 -15
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +4 -3
- package/dist/hash.d.ts +1 -1
- package/dist/index.d.ts +59 -8
- package/dist/index.js +1476 -241
- package/dist/index.js.map +1 -1
- package/dist/{llm-router-DwwUK1bz.d.ts → llm-router-nfO7wPec.d.ts} +3 -1
- package/dist/patch.d.ts +4 -3
- package/dist/policy.d.ts +8 -5
- package/dist/policy.js.map +1 -1
- package/dist/tools/get-primitives-ts.d.ts +1 -1
- package/dist/tools/get-primitives-ts.js +1 -1
- package/dist/tools/get-primitives-ts.js.map +1 -1
- package/dist/tools/render-check-worker.d.ts +7 -1
- package/dist/tools/render-check-worker.js +55 -23
- package/dist/tools/render-check-worker.js.map +1 -1
- package/dist/{types-BOvHNG7K.d.ts → types-Dh1s4K9j.d.ts} +1 -1
- package/dist/{types-public-Ow-tNtFE.d.ts → types-public-BJTLpzWn.d.ts} +208 -15
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/workflows.d.ts +4 -3
- package/package.json +12 -12
- package/src/adapters/generation-dispatch.ts +173 -98
- package/src/adapters/tools.ts +2 -1
- package/src/boilerplate/free-design-prompt.ts +1 -1
- package/src/boilerplate/generate.ts +26 -1
- package/src/boilerplate/hard-sections.ts +13 -13
- package/src/boilerplate/system-prompt.ts +1 -1
- package/src/check/index.ts +1 -0
- package/src/check/run-tier0.ts +80 -1
- package/src/check/sample-props.ts +63 -0
- package/src/coding-agent/tools.ts +4 -1
- package/src/create-harness.ts +3 -3
- package/src/create-ui-generator.ts +204 -95
- package/src/evaluation/__fixtures__/png.ts +100 -0
- package/src/evaluation/axis-checks/checks/state-merge.ts +1 -1
- package/src/evaluation/axis-checks/checks/universal.ts +111 -0
- package/src/evaluation/axis-checks/dispatch.ts +4 -1
- package/src/evaluation/criteria/bank.ts +85 -0
- package/src/evaluation/criteria/context.ts +52 -0
- package/src/evaluation/criteria/resolve.ts +159 -0
- package/src/evaluation/criteria/select.ts +79 -0
- package/src/evaluation/index.ts +23 -0
- package/src/evaluation/ink-extent.ts +200 -0
- package/src/evaluation/theme-css.ts +12 -5
- package/src/evaluation/types-public.ts +200 -11
- package/src/evaluation/types.ts +9 -0
- package/src/evaluation/visual-evaluator.ts +636 -30
- package/src/harness/check/runtime-render/adapter.ts +221 -75
- package/src/harness/check/runtime-render/index.ts +75 -2
- package/src/harness/check/runtime-render/render-check-host.ts +82 -19
- package/src/harness/check/runtime-render/render-check-worker.ts +83 -29
- package/src/harness/check/runtime-render/render-check.ts +154 -117
- package/src/harness/coding/generate-task-runner.ts +60 -4
- package/src/harness/coding/init-session.ts +13 -0
- package/src/harness/coding/run-coding-turn.ts +7 -3
- package/src/harness/coding/run-eval-round.ts +257 -15
- package/src/harness/policy.ts +11 -0
- package/src/harness/primitive-slice.ts +104 -0
- package/src/harness/runtime.ts +5 -0
- package/src/harness/types-public.ts +9 -1
- package/src/harness-tool-names.ts +38 -0
- package/src/index.ts +16 -0
- package/src/policy.ts +7 -4
- package/src/run-check.ts +2 -0
- package/src/tools/get-primitives-ts.ts +1 -1
- package/src/tools/get-wire.ts +1 -1
- package/src/tools/render-check-worker.ts +74 -23
- package/src/tools/render-check.ts +0 -60
- package/src/tools.ts +11 -1
- package/src/validation/primitives.ts +1 -1
- package/dist/render-check-Blwj8gB6.d.ts +0 -105
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { C as Classification } from '../axes-
|
|
2
|
-
import { E as EvalIssue } from '../types-public-
|
|
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';
|
|
3
4
|
import '../design-mode-DLufhrNp.js';
|
|
4
5
|
import '@ggui-ai/protocol';
|
|
5
|
-
import '../types-
|
|
6
|
+
import '../types-Dh1s4K9j.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Live validator-tier trace sink — devtools introspection of every
|
package/dist/hash.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
export { C as CreateUiGeneratorOptions, c as createUiGenerator, e as extractComponentCode } from './create-ui-generator-
|
|
2
|
-
export {
|
|
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';
|
|
3
4
|
export { GenerationResult, SameExchangeBreak } from './harness/result-types.js';
|
|
4
5
|
import { GeneratorBuild, UiGenerator } from '@ggui-ai/mcp-server-core';
|
|
5
6
|
import { D as DesignMode } from './design-mode-DLufhrNp.js';
|
|
6
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
8
|
export { CreateInMemoryGeneratorRegistryOptions, createInMemoryGeneratorRegistry } from '@ggui-ai/mcp-server-core/in-memory';
|
|
8
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
|
+
import { LLMToolDef } from './llm.js';
|
|
9
11
|
import Anthropic from '@anthropic-ai/sdk';
|
|
10
12
|
export { A as AESTHETIC_BRIEF_MAX_CHARS, G as GenerationProfileInput } from './styling-profile-CxfvV48g.js';
|
|
13
|
+
export { VisualEvalAgentSpec } from './adapters/generation-dispatch.js';
|
|
11
14
|
import { AppGenerationProfileEffort, ModelTier } from '@ggui-ai/protocol';
|
|
12
15
|
import './harness/runtime.js';
|
|
13
|
-
import './types-public-
|
|
14
|
-
import './axes-
|
|
15
|
-
import './types-
|
|
16
|
+
import './types-public-BJTLpzWn.js';
|
|
17
|
+
import './axes-CKVCzR_x.js';
|
|
18
|
+
import './types-Dh1s4K9j.js';
|
|
19
|
+
import './bank-CT4eEkta.js';
|
|
20
|
+
import 'zod';
|
|
16
21
|
import './generate-9IeNT4ZY.js';
|
|
17
|
-
import './llm.js';
|
|
18
22
|
import '@ggui-ai/gadgets';
|
|
19
23
|
import './evaluation/types.js';
|
|
24
|
+
import './harness/types-public.js';
|
|
25
|
+
import './policy.js';
|
|
20
26
|
import './adapters/types.js';
|
|
21
|
-
import 'zod';
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
29
|
* ui-gen's precise {@link GeneratorBuild}: the core port's generic shape with
|
|
@@ -34,6 +39,12 @@ interface UiGenBuild extends GeneratorBuild {
|
|
|
34
39
|
readonly boilerplateTemplateSha256: string;
|
|
35
40
|
};
|
|
36
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* The build identity for `designMode`, computed once per process per design
|
|
44
|
+
* mode and pitfalls env gate (the only env the templates read), so a changed
|
|
45
|
+
* gate is never answered from a stale memo.
|
|
46
|
+
*/
|
|
47
|
+
declare function generatorBuild(designMode: DesignMode): UiGenBuild;
|
|
37
48
|
|
|
38
49
|
/**
|
|
39
50
|
* Compile raw JSX/TSX component code emitted by `createUiGenerator` into
|
|
@@ -121,6 +132,14 @@ declare function compileComponentCode(source: string): Promise<string>;
|
|
|
121
132
|
*/
|
|
122
133
|
declare function withBrowserCompile(generator: UiGenerator): UiGenerator;
|
|
123
134
|
|
|
135
|
+
/** The coding tools every harness declares (`what.codingTools`). */
|
|
136
|
+
declare const HARNESS_CODING_TOOLS: readonly LLMToolDef[];
|
|
137
|
+
/** The scoped fallback the runtime promotes into `codingTools` on a duplicate-fingerprint escape. */
|
|
138
|
+
declare const HARNESS_SCOPED_TOOLS: readonly LLMToolDef[];
|
|
139
|
+
/** One tool's entry: `<name>@<first 8 hex of sha256(JSON.stringify(def))>`. */
|
|
140
|
+
declare function harnessToolEntry(def: LLMToolDef): string;
|
|
141
|
+
declare function harnessToolNames(designMode: DesignMode): string[];
|
|
142
|
+
|
|
124
143
|
/**
|
|
125
144
|
* Construct an Anthropic SDK client from a raw API key string.
|
|
126
145
|
*
|
|
@@ -134,6 +153,38 @@ declare function withBrowserCompile(generator: UiGenerator): UiGenerator;
|
|
|
134
153
|
*/
|
|
135
154
|
declare function createAnthropicClient(rawKey: string | undefined): Anthropic;
|
|
136
155
|
|
|
156
|
+
/**
|
|
157
|
+
* ggui#1185 — generation through the machine's own Claude Code login.
|
|
158
|
+
*
|
|
159
|
+
* The Claude SDK adapter spawns the Claude Code binary. Given no provider
|
|
160
|
+
* key, that binary authenticates with whatever `claude` is logged in as on
|
|
161
|
+
* the machine — the operator's own plan. This module holds the three
|
|
162
|
+
* things that make such a run honest and reproducible:
|
|
163
|
+
*
|
|
164
|
+
* 1. {@link CLAUDE_CODE_LOGIN_CREDENTIAL} — the sentinel a `ProviderKeyRef`
|
|
165
|
+
* carries in place of a key, the same shape `bedrock-iam` already uses
|
|
166
|
+
* for "authenticate with ambient credentials, not a key I hold".
|
|
167
|
+
* 2. {@link loginChildEnv} — the spawned process sees an ALLOWLIST of the
|
|
168
|
+
* parent's env, never the parent's env minus a few names: no provider
|
|
169
|
+
* key (the binary prefers an env key over its login, so a stale
|
|
170
|
+
* `ANTHROPIC_API_KEY` would silently take the run off the login path),
|
|
171
|
+
* no other secret the parent merely holds, and no switch that would
|
|
172
|
+
* change what the binary does (ggui#1278).
|
|
173
|
+
* 3. {@link claudeCodeLoginQueryOptions} — the SDK options that keep the
|
|
174
|
+
* run bounded: no built-in tool (`tools: []`), no `~/.claude` settings,
|
|
175
|
+
* hooks or MCP servers leaking in (`settingSources: []`). Not
|
|
176
|
+
* `--bare`, either: on the SDK's bundled binary `-p` reads the login
|
|
177
|
+
* store as it always has, so no flag is needed — and the flag it
|
|
178
|
+
* would be (`--no-bare`) is one that binary rejects; see the note on
|
|
179
|
+
* the function below.
|
|
180
|
+
*
|
|
181
|
+
* Opt-in, off by default; the default stays a provider key. The copy that
|
|
182
|
+
* names what this does lives with the CLI flag that enables it.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
/** Sentinel credential: "no key — use the machine's Claude Code login". */
|
|
186
|
+
declare const CLAUDE_CODE_LOGIN_CREDENTIAL: "claude-code-login";
|
|
187
|
+
|
|
137
188
|
/** Bump when a level's meaning changes; the price line beside it follows. */
|
|
138
189
|
declare const EFFORT_TABLE_VERSION = 1;
|
|
139
190
|
interface EffortDials {
|
|
@@ -152,4 +203,4 @@ declare const EFFORT_DIALS: Readonly<Record<AppGenerationProfileEffort, EffortDi
|
|
|
152
203
|
/** The dials for a named level; `undefined` when no level is named (the deployment's options stand). */
|
|
153
204
|
declare function effortDials(effort: AppGenerationProfileEffort | undefined): EffortDials | undefined;
|
|
154
205
|
|
|
155
|
-
export { CompileComponentCodeError, DesignMode, EFFORT_DIALS, EFFORT_TABLE_VERSION, type EffortDials, type UiGenBuild, compileComponentCode, createAnthropicClient, effortDials, withBrowserCompile };
|
|
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 };
|