feat: AI-authored UI — JSX-source pages compiled to the SDUI tree (ADR-0080)#2056
Merged
Conversation
…-0080 M1) New @object-ui/sdui-parser package — parse, never execute. - parse.ts: bounded recursive-descent JSX subset -> SchemaNode tree; whitelist (= registry types) + reject events/dangerouslySetInnerHTML - validate.ts: tree vs manifest — unknown/missing/enum/type, requires, binding sites - codegen.ts: manifest -> JSX.IntrinsicElements .d.ts (the AI type surface) - index.ts: compile() pipeline + manifestFromConfigs() registry adapter Verified: parse->tree + sanitize (6 checks); tsc against generated .d.ts catches missing-required/wrong-type/bad-enum/unknown-prop on real .tsx. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…derer Proven end-to-end: compile() tree -> actual @object-ui/react SchemaRenderer -> nested HTML with binding threaded. Documents the render contract (node arrives as props.schema; containers render schema.children). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…fest/block-list codegen - core Registry: ComponentMeta.tier + ComponentRegistry.getPublicConfigs() - parser: manifestFromConfigs publicOnly filter; generateBlockList() 清单 - scripts/gen-manifest.ts: serialize public tier -> manifest.json + .d.ts + blocks.md - tier.test.ts: capability(all) vs contract(public) separation verified Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…untime) PageRenderer compiles a kind:'jsx' page's source (parse, never execute) to the SchemaNode tree and renders it; compile errors surface as a loud banner (ADR-0078). Manifest/whitelist keyed by registry tag (getAllTypes+getConfig) — configs carry the namespaced type, so bare <flex> needs the key, not config.type. Adds @object-ui/sdui-parser dep + a console preview (Command Center) used for browser verification. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
added a commit
that referenced
this pull request
Jun 28, 2026
…e + tsconfig) (#2057) #2056 added the @object-ui/sdui-parser import in components/page.tsx but not the workspace src aliases, so CI could not resolve it (364 test suites + console E2E build failed). Mirror the @object-ui/core alias in all three maps. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the runtime + tooling for ADR-0080 (AI-authored UI pages). AI writes a constrained JSX/HTML+Tailwind source; it is parsed, never executed, into the existing
SchemaNodetree and rendered by the normalSchemaRenderer.What's here
@object-ui/sdui-parser(new, pure/zero-React):parse(bounded JSX grammar + whitelist sanitization) ·validate(vs registry manifest: unknown/missing/enum/type +requires+ binding sites) ·codegen(JSX.IntrinsicElements.d.ts— the AI type surface) ·compile()· tier-aware manifest + block-list generation.PageRenderer: renderskind:'jsx'pages — compiles the source to a tree, renders it, surfaces compile errors as a loud banner (ADR-0078).ComponentRegistry:tier+getPublicConfigs()(capability vs contract).sdui-jsx-preview) used for browser verification.Verification
tscagainst the generated.d.tscatches missing-required / wrong-type / bad-enum / unknown-prop on real.tsx.render.test.tsxthrough the actualSchemaRenderer.kind:'jsx'page renders end-to-end via the live registry (flex/grid/card/text/badge/stack); the completeness gate forced correct authoring.Follow-ups (per ADR staging, not in this PR)
tier:'public'+ completeinputson the curated ~35 blocks.@objectstack/sdui-parser+ wire theos buildsave-gate tocompile().🤖 Generated with Claude Code