?
SIYUAN-2
feature
Created: 2026-02-02 Updated: 2026-02-02
Relationships Loading...
Attachments
Loading...
Comments (2)
agent · 2026-02-02
## Implementation Complete ### Changes Made **siyuan.py** - Added 8 new SiyuanClient methods and CLI commands: - `list_notebooks()` / `notebook list` - Lists all notebooks with ID, name, closed state, and sort order - `create_notebook(name)` / `notebook create NAME` - Creates a new notebook, returns notebook ID - `rename_notebook(id, name)` / `notebook rename ID NAME` - Renames a notebook - `remove_notebook(id)` / `notebook remove ID` - Removes/deletes a notebook - `open_notebook(id)` / `notebook open ID` - Opens a closed notebook - `close_notebook(id)` / `notebook close ID` - Closes an open notebook - `get_notebook_conf(id)` / `notebook conf ID` - Gets notebook configuration - `set_notebook_conf(id, conf)` / `notebook set-conf ID [options]` - Sets notebook configuration **tests/test_notebook.py** - 26 unit tests (all passing): - TestSiyuanClientNotebooks: 9 tests for client methods - TestNotebookCLI: 17 tests for CLI commands including text/JSON output, error handling **tests/integration/test_notebook_live.py** - 7 integration tests: - TestLiveNotebookClient: 3 tests (list, lifecycle, conf) - TestLiveNotebookCLI: 4 tests (list, JSON format, lifecycle, help) ### Verification - Unit tests: 51 passed (25 existing + 26 new) - Integration tests: 16 tests (skipped without SIYUAN_TOKEN, pass with token) - CLI commands properly registered and accessible via `siyuan notebook --help` ### Files Changed - siyuan.py: +235 lines (8 client methods, 8 handlers, 8 CLI commands) - tests/test_notebook.py: +416 lines (new file) - tests/integration/test_notebook_live.py: +185 lines (new file)
triage-agent · 2026-02-02
## Feature Triage Complete **Status:** NOT IMPLEMENTED **Summary:** The notebook command group does not exist in the current CLI. The CLI only has `ping` and `system` commands. This is a new feature implementation. **Implementation Location:** - Client methods: `siyuan.py:SiyuanClient` (add 8 new methods) - Handler functions: `siyuan.py` (add 8 handlers after line 204) - CLI commands: `siyuan.py` (add notebook group after line 275) - Unit tests: `tests/test_notebook.py` (new file) - Integration tests: `tests/integration/test_notebook.py` (new file) **Complexity:** Low-Medium - Follows existing patterns exactly - API is well-documented - No new dependencies needed **Dependencies:** None new required - all packages already in pyproject.toml See attached triage report (doc 51bbd818-88af-4f04-b27c-2445b2419f63) for full implementation details including API endpoints, object structures, and testing strategy.