feat(Calibre): add a CLI-Anything harness for Calibre Desktop#256
feat(Calibre): add a CLI-Anything harness for Calibre Desktop#25627494539a-hub wants to merge 16 commits intoHKUDS:mainfrom
Conversation
new E2E tests
|
|
Thanks for the Calibre harness. I checked the current branch and the new Calibre Python files compile, and the unit suite passes from First, the PR includes a lot of unrelated churn outside Calibre: ComfyUI files are rewritten line-for-line, and several unrelated scripts lose their executable bit. Please remove those changes so the diff is limited to Calibre, docs, registry, skills, and the required Second, the Third, the There is also trailing whitespace reported by |
Description
This PR adds a new in-repo CLI-Anything harness for Calibre at
calibre/agent-harness, built from scratch.The harness wraps Calibre’s real native CLI surfaces instead of reimplementing Calibre internals:
calibredbfor library CRUD/search/export/backup flowsebook-metafor standalone ebook metadata inspection and updateebook-convertfor format conversion pipelinesIt is packaged as
cli-anything-calibreand supports both one-shot commands and REPL/session workflows.What This Adds
Stable capabilities
library info,library stats,library list-fields)book add/list/get/search/remove/set-field)meta show/set/set-cover/clear)export book/catalog/backup)convert formats/presets/run)session status/undo/redo/history/save)--jsonacross command groupsDesign Notes
Type of Change
For New Software CLIs (in-repo)
<SOFTWARE>.mdSOP document exists at<software>/agent-harness/<SOFTWARE>.mdSKILL.mdexists atskills/cli-anything-<software>/SKILL.mdSKILL.mdexists atcli_anything/<software>/skills/SKILL.mdcli_anything/<software>/tests/test_core.pyare present and pass without backendcli_anything/<software>/tests/test_full_e2e.pyare presentREADME.mdincludes the new software (with link to harness directory)registry.jsonincludes an entry withsource_url: null(see Contributing guide)repl_skin.pyinutils/is an unmodified copy from the pluginGeneral Checklist
--jsonflag is supported on any new commandsfeat:,fix:,docs:,test:)Validation
Validated locally with:
python -m pytest -qwithCLI_ANYTHING_FORCE_INSTALLED=1→ 25 passed in 61.35spython -m pytest -v -s cli_anything\calibre\tests\test_full_e2e.py→ 8 passed in 20.62spython -m pytest cli_anything/calibre/tests/test_full_e2e.py::test_workflow_library_mutation -v -s→ 1 passed in 6.83sAgent test (CLI-only, Sonnet 4.6) completed with full task chain:
library stats -> book add -> book search -> export book -> convert run -> meta showFinal structured output:
{"book_id":1,"export_dir":"D:\\AgentTest\\out","exported_epub":"D:\\AgentTest\\out\\Agent Test Book - OpenCode Bot.epub","converted_file":"D:\\AgentTest\\out\\converted\\agent-test.mobi","all_exit_zero":true}GUI round-trip validation summary:
D:\Books\Calibre Library)Test Coverage
Coverage includes:
CLI_ANYTHING_FORCE_INSTALLED=1)Known Limitations
calibredb,ebook-meta,ebook-convert)