feat(canvas): register figcraft's canvas tools in the termul MCP server
Merged
GN
3d ago+1659+1659+0123456789012345678901234567890123456789-167-167-012345678901234567890123456789
Summary
- Agents need figcraft's own tools, with file access limited to the project.
- Part 5 of 10 in a stacked series. Review and merge bottom-up; each PR targets the one below it. Canvas mode v3 (figcraft engine). Spec:
spec-openpencil-canvas-mode; architecture spine 2026-10-16 (AD-17 to AD-31).
Related Issue
No issue. Split from #1369 so each part stays under 50 files.
Type of Change
- feat: new feature
What Changed
- Registers figcraft's 18 tools from its own definitions (names cannot drift).
save_filesaves through the host, exports write only inside the project,open_fileanswersUNSUPPORTED_IN_KIOSK. - Pins the fork release
termul-v0.1.0and formats two filesbiome ciflagged on dev.
Scope
- E3-2. Proven with a probe agent spawned through the real ACP path.
How It Was Tested
-
bun run typecheckon this branch - Each part is a checkpoint that was built and tested when it was made (
cargo testfor canvas and host_mcp, vitest, real runs in headless Edge). The bottom and top of the stack were rebuilt and re-tested on currentdev.
Checklist
- PR title follows the conventional commit format
- Explained why no issue exists
- Added or updated tests
- Read AGENTS.md
- A human reviewed the complete diff before submission
🤖 Generated with Claude Code
Summary by cubic
Registers figcraft's own canvas tools, resources, and prompts in the host termul MCP server, with file access constrained to the session's project.
- Tool, resource, and prompt surfaces are read from the pinned
figcraft-mcpcrate at runtime so names and schemas cannot drift. Every canvas call runs through a new kiosk policy in the parent:file.savebecomeshost.save, exports run inline and write only to paths validated inside the project, andopen_fileplus other path-taking commands answerUNSUPPORTED_IN_KIOSK. - The renderer gateway answers
host.savewith the canvas store's save and replies with the document's project-relative path. - Pins the figcraft fork to the
termul-v0.1.0release tag (previously a rev), making the pin check fail closed on any tag mismatch.
Migration
- Part 5 of 10 in a stack: review and merge bottom-up, each PR targeting the one below it.