Commit graph

5 commits

Author SHA1 Message Date
Kayshen-X fbff8857f3 feat(mcp): expose the style-guide catalogue to MCP and the CLI
get_style_guide answers "give me a guide matching this" and searches the
shipped corpus only, so an agent choosing an asset could neither see what
exists nor reach the DESIGN.md files the user imported — the material most
worth picking was invisible to MCP entirely.

list_style_guides merges both, imports first as the Asset Center paints
them, and keeps them apart by id so an import cannot take a shipped guide's
place. Passing id returns that one guide with its markdown, which is what
closes the loop for imports.

No data moved: the canonical registries already live in op-ai-skills, and
only the swatch colours and summary line were ever widget-layer concerns.
The tool reads the host's imported files, so it is a LocalFilesystem
surface and denied online for the same reason list_theme_presets is.
2026-08-11 08:03:39 +08:00
Kayshen-X 507510ee0c feat(mcp): expose the scene template catalogue to MCP and the CLI
The catalogue shipped in v0.8.3 behind File > New from template, so an
agent could only ever start from a blank frame. The 16:9 deck templates
live in it too, which makes it the entry point to the presentation
workflow rather than a convenience.

Adopting a template is its own EditorCommand instead of an authored
subtree insert: a template's boards and the palette they resolve against
have to land in one transaction, and OkWithCommand carries exactly one
command. AdoptSceneTemplate reuses adopt_template_boards, which already
encodes the decision a host without a document loader needs — take over an
untouched starter page, append anywhere else.

The two exhaustive classifiers both demanded a verdict, as designed: the
command is batchable, and it stays an unsupported bulk write inside a
collaboration session.
2026-08-11 07:52:52 +08:00
Kayshen-X 24a6305cae feat(mcp): expose deck export to MCP, the CLI, and the deck skill
The PowerPoint, self-contained HTML and slide-per-page PDF exporters
shipped in v0.8.3 but were reachable only from the desktop File menu, so
an agent could build a deck over MCP and then had no way to hand it to
anyone.

Add export_deck across all three surfaces. The destination argument is
outputPath, not filePath: filePath is reserved workspace-wide for the .op
document a call targets and is intercepted before dispatch, so it would
route the call at a document that does not exist.

The tool writes a file rather than returning base64 — a deck is a
multi-megabyte artifact and the caller wants something shareable — which
makes it a LocalFilesystem surface, denied on the online /mcp for the same
reason save_document is. The CLI resolves a relative --output against the
caller's working directory, since the daemon's is not the caller's.

Delivery guidance goes in the slides skill rather than deck-contract,
which is already at its token budget.
2026-08-11 01:29:15 +08:00
Kayshen-X 0fc6753dd9 refactor(cli,mcp,web): typed error enums for the densest stringly paths
CliError/SkillInstallError carry every op-cli failure (94 sites),
ProgramError types batch_program (14), WebCanvasError maps route
failures onto their existing HTTP statuses (23 -> 6 deliberate
boundary adapters). Display output is byte-identical to the old
strings so caller-visible text and tests are unchanged.
2026-07-26 13:20:59 +08:00
Kayshen-X 7ec373c9a7 feat(cli): export pages nodes and live selection 2026-07-12 17:52:36 +08:00