PPTX Editor Plugin
The PPTX Editor plugin provides PowerPoint presentation editing (.pptx / .pptm) through the same dynamic tool-injection pattern as the Document Editor. The agent always has a pptx_open tool; opening a presentation injects the editing tools, which are removed again on close. Editing happens in an isolated python-pptx worker subprocess designed to run inside the Workspace Isolation sandbox.
Configuration
plugins:
- module: codumentor.plugins.pptx_editor
class: PptxEditorPlugin
args:
enabled: true
target_agents: "main" # "main", "subagent", or "all" (default: "main")
Parameters
- enabled (optional): Whether the plugin is enabled (default:
true) - target_agents (optional): Which agents receive the tools —
"main","subagent", or"all"(default:"main")
Tool Reference
Always Available
| Tool | Description |
|---|---|
pptx_open | Open a .pptx/.pptm presentation (in place or as a copy); macros in .pptm files are preserved. Triggers injection of the editing tools. |
Injected When a Presentation Is Open
| Tool | Description |
|---|---|
pptx_read_outline | Per-slide outline: index, title, layout, shape count, notes flag |
pptx_read_slide | Read one slide: shapes (id, type, position, text, tables) and notes |
pptx_search | Regex search across slide text and notes (up to 200 matches) |
pptx_write_text | Replace a shape's text (preserves run formatting by default) |
pptx_write_notes | Write/replace a slide's speaker notes |
pptx_replace_text | Find/replace across slide text and (optionally) notes |
pptx_list_layouts | List slide layouts on the active master |
pptx_add_slide / pptx_delete_slide | Add or remove a slide |
pptx_move_slide / pptx_duplicate_slide | Reorder or deep-copy a slide |
pptx_add_textbox | Add a textbox at a given position/size |
pptx_add_image | Embed an image from a repo path or base64 blob |
pptx_set_shape_position | Update a shape's left/top/width/height |
pptx_delete_shape | Remove a shape by id |
pptx_python | Sandboxed python-pptx access for advanced edits |
pptx_save | Save the presentation (emits a UI download card) |
pptx_close | Close the presentation (optionally saving first) |
How It Works
An onPromptAssemble hook (priority 10) tracks which sessions have an open presentation. Only pptx_open is visible until a presentation is opened; the editing tools are injected on the next turn and removed again after pptx_close — the same pattern documented for the Document Editor.
Saved presentations are downloadable through the UI (a plugin.pptx_editor.file_saved event renders a download card); the download endpoint is provided by the File Links plugin.
Notes
- Requirements:
python-pptx >= 1.0.0. The editing worker is a JSON-Lines subprocess that holds the presentation in memory and is meant to run inside the bwrap sandbox. - Lengths: Position/size tools accept raw EMU integers or
{value, unit}objects withunitone ofpt,in,cm,mm,emu. - Limits: Search returns at most 200 matches (flagged when truncated).
- See also the Document Editor and XLSX Editor plugins, which share this architecture.