No description
  • Python 97.6%
  • Shell 2.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lyra 5aae98a44d docs: finalize readme and agents inventory
Add the standard License section with the SPDX identifier to
match the sibling forge plugins. Drop the _wiki/ and .a0proj/
rows from the README directory table (untracked local-only
paths absent from a fresh clone) and state that the plugin
ships no WebUI assets. Complete the AGENTS.md project
structure inventory with LICENSE and README.md.
2026-09-16 11:18:44 +02:00
helpers refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
prompts refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
tests fix: derive CLI test paths from repo location 2026-09-16 11:04:13 +02:00
tools refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
.gitignore refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
AGENTS.md docs: finalize readme and agents inventory 2026-09-16 11:18:44 +02:00
default_config.yaml refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
deploy.sh refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
hooks.py refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
LICENSE chore: update LICENSE year to 2026, copyright humankind 2026-08-27 13:56:27 +02:00
plugin.yaml refactor: flatten project structure to match standard plugin layout 2026-08-26 22:54:38 +02:00
README.md docs: finalize readme and agents inventory 2026-09-16 11:18:44 +02:00

MD Editor

Section-based Markdown editor plugin for Agent Zero. Parses Markdown by heading hierarchy and provides atomic section editing with uniqueness validation, backup, and GFM checkbox support.

Quick Start

# Deploy the plugin to Agent Zero
bash deploy.sh deploy

# Run the test suite
python -m pytest tests/test_md_editor.py -v

# Build a distributable ZIP
bash deploy.sh zip

Requires Agent Zero framework and Python 3.12+. No external dependencies beyond the standard library.

Section editing

{"tool_name": "md_editor:replace", "tool_args": {"path": "/path/to/file.md", "heading": "Section A", "content": "New content"}}

Checkbox operations

{"tool_name": "md_editor:check", "tool_args": {"path": "/path/to/todo.md", "label": "Buy groceries"}}
{"tool_name": "md_editor:uncheck", "tool_args": {"path": "/path/to/todo.md", "label": "Send email", "heading": "Work"}}
{"tool_name": "md_editor:list_checkboxes", "tool_args": {"path": "/path/to/todo.md", "heading": "Shopping", "include_children": true}}

Key Directories

Directory Purpose
helpers/ Core parsing and editing logic
tools/ Agent Zero tool class (MdEditor)
prompts/ Tool prompt documentation injected into agent context
tests/ Pytest test suite (178 tests)

Key Files

  • plugin.yaml - Plugin manifest (name, version, settings sections)
  • helpers/md_editor_core.py - Core parsing engine: parse_sections, edit_section, set_checkbox, atomic_write, and CLI entry point
  • tools/md_editor.py - Agent Zero tool class routing all operations through the Python API
  • hooks.py - Lifecycle hooks: install, uninstall, pre_update with module cache clearing
  • prompts/agent.system.tool.md_editor.md - Tool prompt injected into agent system context
  • default_config.yaml - Default configuration (no settings currently configurable)
  • LICENSE - MIT license
  • deploy.sh - Deployment script: deploy, zip, validate, clean
  • tests/test_md_editor.py - Pytest suite with 178 tests covering parsing, editing, checkboxes, CLI, and file I/O
  • AGENTS.md - Engineering contracts and development guidelines

Tech Stack

Python 3.12+ | Agent Zero Framework | pytest | rsync

Notes

  • All edits use atomic writes via tempfile.mkstemp + os.replace() with .bak backup by default.
  • Headings inside fenced code blocks are ignored during parsing.
  • Setext-style headings (=== / --- underlines) are detected and warned about but not parsed.
  • Delete always includes child sections regardless of the include_children parameter.
  • Content is passed as a string directly through the Python API — no shell escaping issues with backticks, quotes, or emojis.
  • The plugin ships no WebUI assets; after deploying Python code changes, an Agent Zero process restart is required due to sys.modules caching.

Operations

Operation Description
replace Replace section content (optionally rename heading)
append Append text to section end
prepend Insert text after heading line
delete Remove entire section (always includes children)
list List all headings with line numbers
validate Check for ambiguous (duplicate) headings
read Read section or entire file with line numbers
write Write content to file (create or overwrite)
check Check a checkbox by label text (case-insensitive)
uncheck Uncheck a checkbox by label text (case-insensitive)
list_checkboxes List all checkboxes with status and line numbers
  • See AGENTS.md for detailed guidance for AI coding agents.

License

MIT License. See LICENSE for details.

SPDX-License-Identifier: MIT