Port generation to OpenUI Cloud - #10
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
Conversation
Screens are now generated through api.thesys.dev/v1/embed with AppLess' own component library sent as a managed chatLibrary config block, so the Cloud owns prompt generation (generateSystemPrompt from @openuidev/thesys-server) and openui-lang validation while routing the model call to Cerebras. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Keeps the port to a provider swap: no new src modules or tests - the AppLess prompt prose lives in scripts/generate-prompt.mjs (which replaces scripts/embed-prompt.mjs) next to the chatLibrary serialisation. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Summary
AppLess no longer talks to Cerebras directly. Screens are generated through OpenUI Cloud (
https://api.thesys.dev/v1/embed/chat/completions) with the app's own native component library handed over as a managedchatLibraryconfig block, so the Cloud generates the system prompt (generateSystemPromptfrom@openuidev/thesys-server) and validates the streamed openui-lang against that same library, while routing the model call to Cerebras only. No behaviour beyond the provider swap changes: same contract, same renderer, same local tool loop, no new src modules and no test changes.Request shape:
Routing travels twice on purpose: with a managed config block the Cloud builds its metadata from the config and honours the request-level
providerfield, whilemetadata.thesysis the documented form for plain embed requests — both agree, so either path routes Cerebras-only.@openuidev/thesys-serveris Node-only, so prompt generation stays a build step:scripts/generate-prompt.mjsreplacesscripts/embed-prompt.mjs(which required a sibling checkout of the web repo to copy a prompt from). It bundles the native contract with esbuild, serialises it to achatLibrary(library.toJSONSchema()+ per-component descriptions +componentGroups), passes the AppLess-specific prose from the old prompt assystemPromptOptions, and embeds the result:src/genos/ui/contract.tsxis now the single source for both the renderer and the wire library, sonpm run generate:promptis the only step when components change.Responses arrive wrapped in the Cloud's inline section markers, so
cleanLang()strips them before parsing (stripInlineMarkers()insrc/genos/store.ts) — including a marker split across chunk boundaries, since a trailing]]>openui…fragment is never valid openui-lang:]]>openui:end