ClientPortal AI
ClientPortal apps: projects, builds, changes and code
List projects in the caller's location.
Lists the ClientPortal apps in the sub-account, most recently active first. A sub-account token sees every app by default; `view=mine` limits the list to apps the caller created.
Create a project.
Creates an app in the sub-account. Then start its first build with `POST .../agent-runs`; a sub-account token sends `externalAgent: true` because its own agent writes the code.
Get a project by id.
Returns one app: its status, publication state, preview and production URLs, and its latest run.
Submit a prompt; the agent runs in the background.
Returns `runId` immediately. The agent executes asynchronously:
Get the current state of a run (poll-friendly).
Strictly tenant- and project-scoped. A run that exists under a
Answer every question of one form in a single write.
Records up to 12 answers in one run write and resumes the run once,
JSON Schema and an example for each change kind.
Static per server release: what `change` must look like for each kind
Check a change of one kind and sign a plan for it, without writing anything.
The caller's AI writes a `change` of one `kind`; the server validates it
Apply a signed plan once.
Idempotent on `planId`: a second (or concurrent) apply of the same plan
Stack-agnostic materialization hints for desktop/CLI handoff.
Returns what an agent reads before editing an app's code: its stack, the guide to start from, and the kernel bundle. Opens the app's sandbox.
Proxy a single /_edit call through desktop auth (no long-lived edit token on laptop).
Writes or deletes one file in the app's sandbox. Then start a run with `externalAgent: true` to check, build and deploy the edits.