Open source CapCut alternative.
TypeScript
docs: cover Cut Gemini chat and the config-in-code handler rule
David Le2cc6a08d9a74
diff --git a/docs/guides/backend-apis.md b/docs/guides/backend-apis.mdindex 44f6d888..40126e0e 100644--- a/docs/guides/backend-apis.md+++ b/docs/guides/backend-apis.md@@ -73,6 +73,11 @@ credentials.402 over quota, 429 rate-limited.- Don't wrap a handler in try/catch unless it can recover and return a differentintentional response. Let unexpected errors surface to the framework.+- `process.env` holds secrets only: API keys, credentials, and other sensitive+ deploy values. Configuration — model ids, feature switches, tunables — is+ code; write the value where it's used. An env-var fallback like+ `process.env.SOME_MODEL ?? "default"` ships the feature dormant and hides the+ real value from readers.## Database@@ -135,7 +140,7 @@ global endpoint only when `GOOGLE_APPLICATION_CREDENTIALS_JSON` carries a`project_id`; without one, the provider is unavailable. Set that JSON as ahosted-deploy secret — Google credentials never live in the Mac app.-Model choice stays in code, not environment overrides:+Model choice is code (see Handler Rules on `process.env`):| Call | Model ||---|---|diff --git a/docs/guides/cut.md b/docs/guides/cut.mdindex 336ddde7..696b6a69 100644--- a/docs/guides/cut.md+++ b/docs/guides/cut.md@@ -1,6 +1,6 @@# Cut-Cut (publicly "Donkey Cut") is a standalone, free video editor. The hosted domain `cut.donkeyuse.com` serves only its client bundle — every page is client-rendered — and the page does all real work against the Cut engine: a local server the Donkey Mac app ships and supervises on the user's own Mac. The engine uses local disk, the app's bundled ffmpeg, on-device speech, and the user's own Claude/Codex CLI logins. Editing is account-free. The one signed-in feature is AI generation — images, video, and voiceovers: the page posts to Donkey's hosted inference routes with the user's Donkey session and credits (same-origin on the cut hosts — the auth cookie rides the registrable domain), and the result lands back in the project through the engine like any other media.+Cut (publicly "Donkey Cut") is a standalone, free video editor. The hosted domain `cut.donkeyuse.com` serves only its client bundle — every page is client-rendered — and the page does all real work against the Cut engine: a local server the Donkey Mac app ships and supervises on the user's own Mac. The engine uses local disk, the app's bundled ffmpeg, on-device speech, and the user's own Claude/Codex CLI logins. Editing is account-free. The signed-in features are AI generation — images, video, and voiceovers — and the assistant's Gemini models: the page posts to Donkey's hosted inference routes with the user's Donkey session and credits (same-origin on the cut hosts — the auth cookie rides the registrable domain). Generated media lands back in the project through the engine like any other file; Gemini chat turns, including their editor tool calls, run entirely in the page.**The one rule:** Cut's server side runs only on the user's Mac. On a hosted deploy every Cut API answers 404 before any handler runs, so the unauthenticated routes are unreachable there and nothing can execute off-Mac — the engine has no path to Donkey's production models; the page reaches them only through Donkey's own authenticated inference APIs. Don't wrap Cut's API routes in the Donkey auth helper, reach for Prisma, or bill against credits to "harden" them; local-only is the design for everything the engine does.@@ -36,10 +36,10 @@ Because a GUI-spawned process inherits a bare PATH, the engine rebuilds it: tool| Concern | Donkey | Cut || --- | --- | --- |-| Sign-in | Required account | None for editing; AI generation needs one |-| Billing | Credits | Free; AI generation spends credits |+| Sign-in | Required account | None for editing; AI generation and Gemini chat need one |+| Billing | Credits | Free; AI generation and Gemini chat spend credits || Storage | Database | Local disk |-| Model access | Hosted routes | CLI logins; AI generation uses Donkey's hosted routes (signed in) |+| Model access | Hosted routes | CLI logins; AI generation and Gemini chat use Donkey's hosted routes (signed in) || Distribution | The Mac app | Rides the same app |The only shared code runs one way: Cut uses a few site UI utilities, and the engine rides the app's process-environment helpers. Nothing in the Donkey product imports Cut, and Cut adds no database models.@@ -52,8 +52,8 @@ Missing tools disable the matching feature; they never affect the rest of the si| --- | --- || Encode, probe, thumbnails | the app's bundled `ffmpeg`/`ffprobe` || Transcription / subtitles | prebuilt `cut-stt` shipped beside the engine binary (the plain dev server falls back to compiling it) |-| AI assistant | the user's own `claude` and `codex` CLI logins |-| AI generation (image / video / voiceover) | a Donkey sign-in and credits (the one hosted feature) |+| AI assistant | the user's own `claude` and `codex` CLI logins; its Gemini models use a Donkey sign-in and credits instead |+| AI generation (image / video / voiceover) | a Donkey sign-in and credits || Projects, library, exports | writable local disk (Application Support when run as the engine) |## Where it lives