@ggui-ai/ui-gen 0.24.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-Du7P_5Fx.d.ts → adapter-Cg_rkpGq.d.ts} +1 -1
- package/dist/adapters/generation-dispatch.d.ts +27 -5
- package/dist/adapters/generation-dispatch.js +909 -53
- 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 -10
- package/dist/advanced/index.js +917 -98
- 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/boilerplate.js +24 -12
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +11 -4
- package/dist/check/index.js +47 -1
- 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-GIhzx08x.d.ts → create-ui-generator-DFnnArrv.d.ts} +11 -3
- package/dist/{dispatch-BnAH56p4.d.ts → dispatch-CStl9eAw.d.ts} +5 -3
- package/dist/evaluation/axis-checks/index.d.ts +5 -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 +3 -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 +300 -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 +5 -5
- package/dist/harness/index.d.ts +4 -4
- package/dist/harness/index.js +33 -15
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/result-types.d.ts +3 -3
- package/dist/harness/runtime.d.ts +10 -4
- package/dist/harness/runtime.js +26 -14
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +3 -3
- 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 +3 -3
- package/dist/hash.d.ts +1 -1
- package/dist/index.d.ts +25 -9
- package/dist/index.js +926 -101
- 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 +3 -3
- package/dist/policy.d.ts +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/{types-BOvHNG7K.d.ts → types-Dh1s4K9j.d.ts} +1 -1
- package/dist/{types-public-Bk6d1WLN.d.ts → types-public-BJTLpzWn.d.ts} +134 -7
- 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 +3 -3
- package/package.json +12 -12
- package/src/adapters/generation-dispatch.ts +36 -2
- 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/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 +20 -1
- 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 +130 -3
- package/src/evaluation/types.ts +9 -0
- package/src/evaluation/visual-evaluator.ts +636 -30
- package/src/harness/coding/generate-task-runner.ts +3 -0
- package/src/harness/coding/run-coding-turn.ts +7 -3
- package/src/harness/coding/run-eval-round.ts +19 -0
- package/src/harness/runtime.ts +5 -0
- package/src/harness-tool-names.ts +38 -0
- package/src/index.ts +12 -0
- 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.ts +0 -60
- package/src/tools.ts +11 -1
- package/src/validation/primitives.ts +1 -1
package/dist/check/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DataContract, JsonObject, PropsSpec, ActionSpec, StreamSpec } from '@ggui-ai/protocol';
|
|
2
2
|
import { D as DesignMode } from '../design-mode-DLufhrNp.js';
|
|
3
|
-
import { b as EvalResult, E as EvalIssue } from '../types-public-
|
|
3
|
+
import { b as EvalResult, E as EvalIssue } from '../types-public-BJTLpzWn.js';
|
|
4
4
|
export { j as jsonSchemaTypeToTs } from '../json-schema-ts-CbB78b3n.js';
|
|
5
5
|
import '@ggui-ai/mcp-server-core';
|
|
6
|
-
import '../axes-
|
|
7
|
-
import '../types-
|
|
6
|
+
import '../axes-CKVCzR_x.js';
|
|
7
|
+
import '../types-Dh1s4K9j.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The four contract-declared wire kinds, matching `@ggui-ai/wire` hooks.
|
|
@@ -244,4 +244,11 @@ designMode?: DesignMode): Promise<EvalIssue[]>;
|
|
|
244
244
|
*/
|
|
245
245
|
declare function runTier0(sourceCode: string, contract?: DataContract, designMode?: DesignMode): Promise<EvalResult>;
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
/**
|
|
248
|
+
* Generate sample props from a PropsSpec contract.
|
|
249
|
+
* Uses `example` values from each PropEntry when available,
|
|
250
|
+
* otherwise synthesizes plausible defaults from the JSON Schema.
|
|
251
|
+
*/
|
|
252
|
+
declare function generateSampleProps(spec: PropsSpec): JsonObject;
|
|
253
|
+
|
|
254
|
+
export { type ContractIssue, type ReactLintDiagnostic, type TypeCheckDiagnostic, type TypeCheckResult, type WireCallSite, type WireImportReport, type WireImportSite, type WireKind, type WirePreservationReport, checkWireImports, checkWirePreservation, collectExpectedWires, extractPropsInterface, extractWireCallSites, extractWireImports, generateSampleProps, inferPropsSpecFromSampleData, lintReactHooks, propsSpecToTypeScript, runTier0, runTier0Checks, typecheck, validateActionSpecConformance, validateAllContracts, validatePropsAgainstSchema, validateStreamSpecConformance };
|
package/dist/check/index.js
CHANGED
|
@@ -1821,6 +1821,52 @@ async function runTier0(sourceCode, contract, designMode = DEFAULT_DESIGN_MODE)
|
|
|
1821
1821
|
return { issues, pass };
|
|
1822
1822
|
}
|
|
1823
1823
|
|
|
1824
|
-
|
|
1824
|
+
// src/check/sample-props.ts
|
|
1825
|
+
function generateSampleProps(spec) {
|
|
1826
|
+
const props = {};
|
|
1827
|
+
for (const [name, entry] of Object.entries(spec.properties)) {
|
|
1828
|
+
if (entry.example !== void 0) {
|
|
1829
|
+
props[name] = entry.example;
|
|
1830
|
+
continue;
|
|
1831
|
+
}
|
|
1832
|
+
if (entry.default !== void 0) {
|
|
1833
|
+
props[name] = entry.default;
|
|
1834
|
+
continue;
|
|
1835
|
+
}
|
|
1836
|
+
props[name] = synthesizeFromSchema(entry.schema);
|
|
1837
|
+
}
|
|
1838
|
+
return props;
|
|
1839
|
+
}
|
|
1840
|
+
function synthesizeFromSchema(schema) {
|
|
1841
|
+
const declared = Array.isArray(schema.type) ? schema.type.find((t) => t !== "null") : schema.type;
|
|
1842
|
+
switch (declared) {
|
|
1843
|
+
case "string":
|
|
1844
|
+
return "sample";
|
|
1845
|
+
case "number":
|
|
1846
|
+
case "integer":
|
|
1847
|
+
return 0;
|
|
1848
|
+
case "boolean":
|
|
1849
|
+
return false;
|
|
1850
|
+
case "null":
|
|
1851
|
+
return null;
|
|
1852
|
+
case "array": {
|
|
1853
|
+
if (schema.items) return [synthesizeFromSchema(schema.items) ?? null];
|
|
1854
|
+
return [];
|
|
1855
|
+
}
|
|
1856
|
+
case "object": {
|
|
1857
|
+
const obj = {};
|
|
1858
|
+
if (schema.properties) {
|
|
1859
|
+
for (const [k, v] of Object.entries(schema.properties)) {
|
|
1860
|
+
obj[k] = synthesizeFromSchema(v);
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
return obj;
|
|
1864
|
+
}
|
|
1865
|
+
default:
|
|
1866
|
+
return void 0;
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
export { checkWireImports, checkWirePreservation, collectExpectedWires, extractPropsInterface, extractWireCallSites, extractWireImports, generateSampleProps, inferPropsSpecFromSampleData, jsonSchemaTypeToTs, lintReactHooks, propsSpecToTypeScript, runTier0, runTier0Checks, typecheck, validateActionSpecConformance, validateAllContracts, validatePropsAgainstSchema, validateStreamSpecConformance };
|
|
1825
1871
|
//# sourceMappingURL=index.js.map
|
|
1826
1872
|
//# sourceMappingURL=index.js.map
|