AI/MCP Ability to create notebooks #89
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-69-create-notebook"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changed
create_notebook now works from the in-app chat too: Chat.Tools has it (one shared definition with agents' keys), the chat prompt mentions it, and the chat's MCP token can call it for My files or a folder (C34). In chat it makes the notebook straight away rather than as a draft, since an empty notebook has nothing to preview. Full precommit passes (C35).
Fixes #69
Red, then green
bash -o pipefail -c 'export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; MIX_ENV=test mix test test/rm_analyzer/remarkable/new_notebook_test.exs test/rm_analyzer_web/notes_mcp_agent_test.exs test/rm_analyzer/api_keys_test.exs 2>&1 | tail -3'60213ac): exit 119dddce): exit 0bash -lc 'export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; mix test test/rm_analyzer_web/notes_mcp_agent_test.exs test/rm_analyzer/chat/backends/claude_test.exs'60213ac): exit 183980b8): exit 0Checks
bash -o pipefail -c 'export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; mix precommit 2>&1 | tail -3', exit 019dddce(27 pass) and checked write-gating, folder scoping, name cleanup and retry idempotence in the diff; untested on a real tablet or cloud. (Prover):bash -o pipefail -c 'export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; cd /tmp/pv69 && MIX_ENV=test mix test test/rm_analyzer/remarkable/new_notebook_test.exs test/rm_analyzer_web/notes_mcp_agent_test.exs test/rm_analyzer/api_keys_test.exs 2>&1 | tail -3', exit 019dddce: create_notebook is write-only (needs can_write), scopes through Remarkable.folder_path + Chat.Notes.reaches_folder? like make_pdf (D3), refuses My files, trash and out-of-scope folders for a limited key, and its .content mirrors NewPdf's working cPages shape; the notebook, MCP agent, API key, NewPdf and agent tools suites pass (42 tests). (Nye):/home/peak/work/rm-analyzer-1-6-1/run-tests.sh /home/peak/work/rm-analyzer-1-6-1/rm-analyzer test/rm_analyzer/remarkable/new_notebook_test.exs test/rm_analyzer_web/notes_mcp_agent_test.exs test/rm_analyzer/api_keys_test.exs test/rm_analyzer/remarkable/new_pdf_test.exs test/rm_analyzer/agent_tools_test.exs, exit 083980b8. (Upper Wolfjaw):bash -lc 'export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; mix precommit', exit 083980b8(34 pass); checked write-gating, folder scoping, name cleanup and the chat path. Untested on a real paired tablet or cloud. The chat makes notebooks without a draft, so an injected note could make an empty one, which is low impact. (Prover):bash -o pipefail -c 'export PATH=$HOME/.local/bin:$PATH; eval "$(mise activate bash --shims)"; cd /tmp/pv69b && MIX_ENV=test mix test test/rm_analyzer/remarkable/new_notebook_test.exs test/rm_analyzer_web/notes_mcp_agent_test.exs test/rm_analyzer/api_keys_test.exs test/rm_analyzer/chat/backends/claude_test.exs 2>&1 | tail -3', exit 0Risks
Not run against a real paired reMarkable from the chat (tests stop at "No reMarkable is paired"); the cloud write path is the same Notebooks.make the MCP side already uses. Making it immediately instead of as an approve/discard draft is my call; easy to change if Jeremy wants a draft card. No screenshots: the only UI change is the tool line text "Made a notebook, ".
Prover
Passed (Sonnet): Read the diff against main and re-ran the notebook, MCP agent, API key and chat backend tests in my own worktree at
83980b8(34 pass); checked write-gating, folder scoping, name cleanup and the chat path. Untested on a real paired tablet or cloud. The chat makes notebooks without a draft, so an injected note could make an empty one, which is low impact.Every command above was run by Fortysix's Basecamp itself, on the branch named.