export interface CreateAppOptions { /** Optional display name accepted by the developer API. */ name?: string; prompt?: string; /** * Create identity: retries/refreshes with the SAME key converge on the same * app (server-side genesis journal). Required for the create flow; mint one * per create intent and keep it until navigation succeeds. */ idempotencyKey?: string; /** Provisioning intent marker; "create-flow" runs the parentless genesis lane. */ intent?: string; /** Request first-class oApp mode; honored server-side only with intent "create-flow". */ oapp?: boolean; } export interface CreatedApp { appId: string; slug?: string; /** Immediately routable (slug + edge route are minted at creation). */ url: string; /** Server-normalized first prompt to hand off to the app's widget, when supplied. */ prompt?: string; /** * F-1200: unforgeable create-flow handoff. The caller redirects the owner to * `${url}#bounded_prompt=&bounded_handoff=`; the widget requires * this token before it will auto-run the prompt. Absent when the server has no * HANDOFF_SECRET configured (the widget then degrades to prefill-only). */ handoff?: string; } export interface AppListItem { appId: string; name: string; slug?: string; /** Canonical app URL, when supplied by the developer API. */ url?: string; /** Genesis lifecycle: a provisional child still building, or one whose * create run failed (rebuild reuses the same app/slot in place). */ buildStatus?: 'building' | 'build_failed'; } export declare function create(options?: CreateAppOptions): Promise; /** * F-1200: build the create-flow redirect the owner is sent to after `create()`, with the * prompt and handoff carried in the URL FRAGMENT (never the query - fragments never reach * servers, logs, or Referer). Encoding is byte-exact so the widget's `URLSearchParams` * parse + `.trim()` reproduces the SAME prompt string dev-api hashed into the handoff; * getting this wrong would make the widget reject a genuine token and degrade to prefill. * First-party product callers should use this instead of hand-building the URL. * * Returns `${url}#bounded_prompt=` with no `&bounded_handoff=` when the server * minted no handoff (HANDOFF_SECRET unset) - the widget then prefills without auto-running. */ export declare function buildCreateRedirectUrl(app: Pick): string; export declare function list(): Promise; /** * Registered first-party product surfaces only - * dev-api CORS blocks calls from generated-app origins. Server-side callers unaffected. */ export declare const apps: { create: typeof create; list: typeof list; buildCreateRedirectUrl: typeof buildCreateRedirectUrl; };