Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/formmorpheus/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: formmorpheus
description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, list_commands, run_command), the window key, the dock, or ios/project.yml."
description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, comfy_status, comfy_workflows, comfy_job, comfy_generate, list_commands, run_command), the window key, the dock, or ios/project.yml."
license: Apache-2.0
metadata:
author: nodemode-ai
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Each tool's description starts with its class, and its annotations say it too (`

| Class | Tools | What happens |
| --- | --- | --- |
| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `list_commands` | runs at once; refused only when the person blocked agents |
| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `comfy_status`, `comfy_workflows`, `comfy_job`, `list_commands` | runs at once; refused only when the person blocked agents |
| Changes the library | `manage_movie`, and `run_command` for a command of that class | runs when the person allowed outside agents; otherwise asks in the window (deny, once, always), and with no window open it is refused |
| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" |
| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles`, `comfy_generate` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" |

The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing choice (ask, allowed, blocked) is `backend/app/services/agent_access.py`. An agent tab the person opened in the app's own dock carries an in-app token and is not asked for library changes; it is still asked before an export or an import.

Expand All @@ -34,15 +34,16 @@ The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing
6. `list_characters {query?}` reads the Characters library (one `.fmo` per character in the data folder's `Characters` folder). `add_character {character, movie?, at?}` asks first, then the window opens `movie` (or uses the open one), places a copy of the character with fresh ids at `at` or the Playhead, and saves the movie; the answer gives `content`, `movie` and `saved`.
7. `list_voices {engine?}` reads which voice engines are ready (`builtin`, `local`, `online`) and their voices. `add_voice {text, engine?, voice?, language?, speed?, model?, movie?, at?}` asks first, then the window speaks the text, places the sound on the Timeline at `at` or the Playhead, and saves the movie. See `sub-skills/ai-voice`.
8. `list_subtitles {movie}` reads the movie's subtitles: whether the video shows them, the look, and each line in seconds and frames. `set_subtitles {movie?, lines?, srt?, mode?, show?, from_voices?, style?}` asks first, then the window changes the subtitles of the open movie (or `movie`, which it opens) and saves. See `sub-skills/subtitles`.
9. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one.
9. `comfy_status` reads the person's Comfy server (address, reachable, generation pack installed and recent enough, memory profile, device, whether a key is stored; never the key). `comfy_workflows` lists the workflows with their slots and whether each is ready. `comfy_generate {mode, prompt?, seed?, slots?, movie?}` asks first, then the window sends the blocks selected on its Timeline to Comfy (modes `fluid`, `animate`, `erase`, `add`, `relight`, `matte`, `upscale`), waits for the job, places the results on new tracks at the source's start and saves; the answer gives `blocks`, `movie` and `saved`. `comfy_job {job}` reads one job's state and result files. Check `comfy_status` and `comfy_workflows` first: the pack may be missing, and a workflow may lack models.
10. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one.

## Refusals

Every refusal is one plain sentence. Pass it to the person as it is.

- Outside agents are off: ask the person to open FormMorpheus and allow outside agents.
- Blocked: the person turned agents off in Preferences; do not retry.
- Open FormMorpheus first: export, import, add_character, add_voice and set_subtitles need the window.
- Open FormMorpheus first: export, import, add_character, add_voice, set_subtitles and comfy_generate need the window.
- The person said no: do not ask again at once; a repeat within `DECLINE_PAUSE` seconds is refused without asking.
- Nobody answered within the wait: the question expired; ask the person to answer in the window.

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/formmorpheus/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: formmorpheus
description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, list_commands, run_command), the window key, the dock, or ios/project.yml."
description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, comfy_status, comfy_workflows, comfy_job, comfy_generate, list_commands, run_command), the window key, the dock, or ios/project.yml."
license: Apache-2.0
metadata:
author: nodemode-ai
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Each tool's description starts with its class, and its annotations say it too (`

| Class | Tools | What happens |
| --- | --- | --- |
| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `list_commands` | runs at once; refused only when the person blocked agents |
| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `comfy_status`, `comfy_workflows`, `comfy_job`, `list_commands` | runs at once; refused only when the person blocked agents |
| Changes the library | `manage_movie`, and `run_command` for a command of that class | runs when the person allowed outside agents; otherwise asks in the window (deny, once, always), and with no window open it is refused |
| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" |
| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles`, `comfy_generate` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" |

The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing choice (ask, allowed, blocked) is `backend/app/services/agent_access.py`. An agent tab the person opened in the app's own dock carries an in-app token and is not asked for library changes; it is still asked before an export or an import.

Expand All @@ -34,15 +34,16 @@ The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing
6. `list_characters {query?}` reads the Characters library (one `.fmo` per character in the data folder's `Characters` folder). `add_character {character, movie?, at?}` asks first, then the window opens `movie` (or uses the open one), places a copy of the character with fresh ids at `at` or the Playhead, and saves the movie; the answer gives `content`, `movie` and `saved`.
7. `list_voices {engine?}` reads which voice engines are ready (`builtin`, `local`, `online`) and their voices. `add_voice {text, engine?, voice?, language?, speed?, model?, movie?, at?}` asks first, then the window speaks the text, places the sound on the Timeline at `at` or the Playhead, and saves the movie. See `sub-skills/ai-voice`.
8. `list_subtitles {movie}` reads the movie's subtitles: whether the video shows them, the look, and each line in seconds and frames. `set_subtitles {movie?, lines?, srt?, mode?, show?, from_voices?, style?}` asks first, then the window changes the subtitles of the open movie (or `movie`, which it opens) and saves. See `sub-skills/subtitles`.
9. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one.
9. `comfy_status` reads the person's Comfy server (address, reachable, generation pack installed and recent enough, memory profile, device, whether a key is stored; never the key). `comfy_workflows` lists the workflows with their slots and whether each is ready. `comfy_generate {mode, prompt?, seed?, slots?, movie?}` asks first, then the window sends the blocks selected on its Timeline to Comfy (modes `fluid`, `animate`, `erase`, `add`, `relight`, `matte`, `upscale`), waits for the job, places the results on new tracks at the source's start and saves; the answer gives `blocks`, `movie` and `saved`. `comfy_job {job}` reads one job's state and result files. Check `comfy_status` and `comfy_workflows` first: the pack may be missing, and a workflow may lack models.
10. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one.

## Refusals

Every refusal is one plain sentence. Pass it to the person as it is.

- Outside agents are off: ask the person to open FormMorpheus and allow outside agents.
- Blocked: the person turned agents off in Preferences; do not retry.
- Open FormMorpheus first: export, import, add_character, add_voice and set_subtitles need the window.
- Open FormMorpheus first: export, import, add_character, add_voice, set_subtitles and comfy_generate need the window.
- The person said no: do not ask again at once; a repeat within `DECLINE_PAUSE` seconds is refused without asking.
- Nobody answered within the wait: the question expired; ask the person to answer in the window.

Expand Down
9 changes: 6 additions & 3 deletions .docs/wiki/Agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ The server is `POST /mcp` on the engine: Streamable HTTP in stateless JSON, prot

| Class | Tools | What happens |
|---|---|---|
| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `list_commands`, and through `run_command` the commands `list_deleted`, `list_exports`, `list_stacks`, `export_capabilities`, `list_fonts` | run at once; refused only when agents are blocked |
| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `comfy_status`, `comfy_workflows`, `comfy_job`, `list_commands`, and through `run_command` the commands `list_deleted`, `list_exports`, `list_stacks`, `export_capabilities`, `list_fonts` | run at once; refused only when agents are blocked |
| Changes the library | `manage_movie` (create, rename, duplicate, delete, restore) and, through `run_command`, `set_tags` and `set_stack` | ask in the window under Ask; go ahead under Allowed |
| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles` | ask every time, then the open window carries them out |
| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles`, `comfy_generate` | ask every time, then the open window carries them out |

- A movie is found by name inside the library folder only. Delete moves a movie to Recently Deleted; nothing is erased.
- `import_file` takes an absolute path inside the library folder, a picture, video, sound, font or layered image file, up to 2 GB. The window opens the movie, imports the file and saves the movie.
- `export_movie` is carried out by the window, which renders the movie and writes the file to the Exports folder. Formats the browser cannot encode go through the person's ffmpeg.
- `list_characters` reads the Characters library (one `.fmo` per character in `Characters/` of the data folder). `add_character {character, movie?, at?}` is carried out by the window: it opens `movie` (or uses the open one), places a copy of the character with fresh ids at `at` or the Playhead through the Characters panel's Add to Movie, and saves the movie.
- `list_voices {engine?}` reads, for `builtin`, `local` and `online`, whether each is ready, why not when it is not, and its voices when it is. `add_voice {text, engine?, voice?, language?, speed?, model?, movie?, at?}` is carried out by the window: it speaks the text (at most 10000 characters, 2000 online, and online sends the text to that service), places the sound on the Timeline of `movie` (or the open movie) at `at` or the Playhead, and saves the movie.
- `list_subtitles {movie}` reads the movie's subtitles from its file, without the window: whether the video shows them, the look, and each line with its id, start and end in seconds and frames (at most 500 lines, with a count of the rest). `set_subtitles {movie?, lines?, srt?, mode?, show?, from_voices?, style?}` is carried out by the window: `lines` (seconds) or `srt` (the text of a .srt or .vtt file) give the lines, `mode` is `replace` (default) or `add`, `from_voices` makes lines from every AI-voice sound, `show` turns them on or off and `style` sets font, size, position, color and band. It changes `movie` (or the open movie) and saves it. At most 2000 lines.
- The server waits 2 minutes for an answer to a question, 10 minutes for an export or a spoken line and 2 minutes for an import or an added character.
- `comfy_status` reads, in the engine and without the window, the Comfy server's address, whether it can be reached, whether Comfy-FormBridge-Suite is installed and recent enough, its memory profile and device, and only whether a sign-in key is saved. `comfy_workflows` reads the workflows the server offers, their slots and what each lacks. `comfy_job {job}` reads one job's state, progress, result files and failure reason. All three call `services/comfy_bridge.py` and turn its errors into plain tool errors.
- `comfy_generate {mode, prompt?, seed?, slots?, movie?}` is carried out by the window. `mode` is fluid, animate, erase, add, relight, matte or upscale; the window's own mode-to-workflow map picks the workflow, and the sources are the blocks selected in the window, so the agent does not name files. The tool checks the handshake first, so a person is not asked when the pack is missing. After the yes the window sends the job, waits, places the results on new tracks at the source's start as one undo step, and saves the movie, as `add_voice` does (`runComfyFromAgent` in `app/features/comfy-generate.ts`, called from `app/agent-bridge.ts`).
- The server waits 2 minutes for an answer to a question, 10 minutes for an export or a spoken line, 2 minutes for an import or an added character and 30 minutes for a Comfy job, which can be slow on a computer without a graphics card.
- No tool reads another file or folder on the computer, and none returns the window key, a socket ticket or a tab's token.

## The Outside agents choice
Expand Down Expand Up @@ -71,6 +73,7 @@ The engine queues the question, the window polls `/api/mcp/bridge/next` with its
| `FORMMORPHEUS_AGENT_DIR` | the working folder of the Claude Code, Codex and Cursor tabs (default `Agent` in the data folder) |
| `FORMMORPHEUS_MCP_URL` | for `./formmorpheus mcp`: the engine's `/mcp` address; no engine is started then |
| `FORMMORPHEUS_MCP_AUTOSTART` | for `./formmorpheus mcp`: `0` never starts an engine |
| `FORMMORPHEUS_COMFY_URL` | the address of the Comfy server that `comfy_*` tools and Generate use; wins over the saved address (default `http://127.0.0.1:8188`) |

The engine sets `FORMMORPHEUS_TERMINAL`, `FORMMORPHEUS_URL` and `FORMMORPHEUS_MCP_URL` in every tab, and `FORMMORPHEUS_INAPP_TOKEN` in the Codex, Cursor and Antigravity tabs. The launcher sets `FORMMORPHEUS_CALLER_DIR`. None of these is set by hand.

Expand Down
Loading
Loading