Open source CapCut alternative.
TypeScript
docs: note when ChatGPT app changes ship and when they need review
David Le21de1ae2085f
diff --git a/docs/guides/chatgpt-app.md b/docs/guides/chatgpt-app.mdindex 758d2e3a..ea3a45f5 100644--- a/docs/guides/chatgpt-app.md+++ b/docs/guides/chatgpt-app.md@@ -24,15 +24,13 @@ Captured document → worker renderer → signed mediaChatGPT reads the editor's tool catalog and sends a batch through `edit_project`; the editor open in the card claims it, runs it on the document the user is looking at as one undo step, saves, and reports the result. Nothing else runs a batch: with no card open the tool answers that the project has to be opened first, and undo and redo step the card's own history, which the user's edits share. Editing, previews and exportsspend no credits; commands that generate media spend the account's credits, and-imports and exports use its storage allowance. The server's instructions and-tool descriptions say so, with the repository linked, so ChatGPT explains the-economics before it acts.+imports and exports use its storage allowance; the server instructions and+tool descriptions say so.## Client boundariesThe standalone widget imports `@donkeycut/artifact-player/ArtifactVideo`, the-same player used by website previews and shared videos. The package owns video-buffers, visibility handling, and teardown. HLS loads on demand. The widget is+same player used by website previews and shared videos. The widget isbuilt by `npm run chatgpt:build`, which also runs before the site's developmentand production builds. Rebuild it after editing widget code. ChatGPT caches thewidget HTML it reads over MCP, so the entry script and stylesheet keep stable@@ -47,19 +45,16 @@ Donkey Cut link. ChatGPT's sandbox drops null-valued keys from a tool resultbefore the widget sees it, so the widget contract treats a missing key and nullalike.-Opening a project plays the proxy the editor already rendered for it, the-same file the share page serves, so nobody waits on a render to watch. A+Opening a project plays the proxy the editor already rendered for it, so+nobody waits on a render to watch. Arender is for a revision with no current proxy, such as one edited fromChatGPT; it uses the existing headless renderer and a captured document, andrepeated requests for the same saved revision reuse a queued, running, or-available completed preview. A collected preview can be rendered again.-Browser and Mac projects retain their existing render paths; they become-accessible to ChatGPT after the user saves them to the cloud in Donkey Cut.+completed preview. Browser and Mac projects reach ChatGPT once the user saves+them to the cloud.The widget polls while visible and renews expiring playback URLs through the-host bridge. It has no account cookie or OAuth token. Preview rendering uses-no Donkey Cut AI credits. Derived previews remain exempt from storage quota;-retained media uses the account's existing storage allowance.+host bridge; it holds no account cookie or OAuth token.Editable cards frame Donkey Cut through a one-use, one-minute link that createsa partitioned session cookie. Reconnect renews that link through the tool bridge@@ -71,8 +66,7 @@ covers loading, and `frameDomains` permits the app's own domain.Donkey Cut supplies the account identity to ChatGPT through OpenID Connect.The user signs in and consents to project access and identity sharing. The`openid` and `email` scopes expose the account ID, email, and stored verification-status through `/api/chatgpt/oauth/userinfo`. Unverified accounts can connect;-profile settings offer email verification.+status through `/api/chatgpt/oauth/userinfo`.Discovery lives at `/.well-known/openid-configuration` and`/.well-known/oauth-authorization-server`. Configure `CHATGPT_OIDC_PRIVATE_KEY`@@ -92,43 +86,48 @@ already issued media links valid until their normal expiry.The integration defaults to disabled in the `chatgptApp` setting. Deploy thePrisma models in `site/prisma/Chatgpt.prisma` through the project's databaserelease process, deploy the site and cloud worker, then enable the setting in-su. Generating the Prisma client does not deploy those tables.+su.Set the same `CUT_RUNNER_SECRET` on the hosted site and the`donkey-cut-worker` Cloudflare Worker before deployment. The Worker passes it-to the render container so document-backed renders can read media and fonts-through the authenticated hosted API.+to the render container.Create a ChatGPT developer-mode app pointing at`https://donkeycut.com/api/chatgpt/mcp`. Upload `site/public/chatgpt-app-icon.png`as the app icon. Use the predefined public OAuth clientID `donkey-chatgpt`, no client secret, and scopes`projects:read previews:render projects:write openid email`. The listing-should describe supported editing and disclose generation credits and storage-limits.+discloses generation credits and storage limits.Configure the exact redirect URI supplied by ChatGPT in `chatgptApp.redirectUris`.The default is ChatGPT's stable callback; discovery advertises issueridentification, and every authorization redirect includes `iss`. The embedded-resource declares `https://chatgpt.donkeycut.com` as its dedicated widget domain.-ChatGPT uses this identifier to derive an OpenAI-hosted sandbox origin. The-widget HTML arrives through MCP, its scripts and styles load from-`donkeycut.com`, and video loads from `media.donkeycut.com`. This setup requires-no DNS record or Cloudflare Worker for `chatgpt.donkeycut.com`.+resource declares `https://chatgpt.donkeycut.com` as its widget domain, from+which ChatGPT derives a sandbox origin. The widget HTML arrives through MCP,+its scripts and styles load from `donkeycut.com`, and video loads from+`media.donkeycut.com`; `chatgpt.donkeycut.com` needs no DNS record or Worker.-Public submission verifies control of the MCP server's host, `donkeycut.com`,-through OpenAI's generated well-known challenge URL. Add the exact token from-the submission portal when that challenge is issued.+Public submission verifies control of `donkeycut.com` through OpenAI's+well-known challenge URL; add the token from the submission portal when it is+issued.Run the client tests with `bun test src/clients/chatgpt`. The browser fixture-`bun run scripts/eval-chatgpt-widget.ts` checks selection, repeated polling,-playback, URL recovery, hidden playback, the editor frame, and teardown-against a mock host. With-the dev server and a local worker up, `bun run scripts/eval-chatgpt-workflow.ts`-drives the whole editing workflow through the MCP tools in process: create,-import, inspect, edit, preview, undo, redo, export.+`bun run scripts/eval-chatgpt-widget.ts` checks the widget against a mock+host. With the dev server and a local worker up,+`bun run scripts/eval-chatgpt-workflow.ts` drives the editing workflow through+the MCP tools in process.The final deployment check connects a real account in ChatGPT, opens a cloud-project, renders it, and reconnects after revocation. The fixture does not-exercise ChatGPT's account-linking UI or the production database.+project, renders it, and reconnects after revocation.++## Publishing changes++OpenAI keeps the tool metadata it scanned with each published version. A changed+tool description, schema, annotation, `_meta`, CSP, frame domain or server+instruction ships on deploy and replaces the published one once OpenAI's+automated checks pass; removed tools go at once. Widget code at the same+resource URI goes live on deploy, cached up to an hour. Renaming a tool, moving+the widget's resource URI, or editing the listing needs a new version submitted+for review, and a new server origin needs a new app. See OpenAI's+[review guide](https://developers.openai.com/plugins/deploy/app-review#how-published-mcp-metadata-versions-work).## Source entrypoints