feat(notebooks): add --markdown to get, create, update, and edit - #750
Draft
andyjmorgan wants to merge 1 commit into
Draft
feat(notebooks): add --markdown to get, create, update, and edit#750andyjmorgan wants to merge 1 commit into
andyjmorgan wants to merge 1 commit into
Conversation
andyjmorgan
force-pushed
the
feat/notebooks-markdown
branch
from
August 21, 2026 14:55
bd17bdb to
691559e
Compare
andyjmorgan
marked this pull request as draft
August 21, 2026 15:45
Work with a notebook as a Markdown document instead of a JSON cells array. These call /api/unstable/notebooks, which the notebooks team has not promoted to /api/v2 yet, so the flag is documented as experimental. - get --markdown prints the document; create/update take a Markdown file - edit --markdown appends server-side via the content-fragment endpoint, so the rest of the document is not rewritten - Reject --jq alongside --markdown, and reject JSON files passed with --markdown before any request is made - Translate the backend's 5xx for notebooks that have no Markdown projection into an actionable message Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
andyjmorgan
force-pushed
the
feat/notebooks-markdown
branch
from
August 21, 2026 15:53
691559e to
770bc32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Work with a notebook as a Markdown document instead of a JSON cells array:
These hit
/api/unstable/notebooks, not yet promoted to/api/v2, so the flags are marked experimental in--help.Changes
edit --markdownappends via the content-fragment endpoint. The JSON path fetches, splices, and rewrites the whole notebook; this does not.--jqis rejected with--markdown, keyed on the flag rather thancfg.jqso an inheritedPUP_FILTERdoes not block extension subprocesses.--markdownare rejected before any request.util_ext::print_text_document;skills remote gethad the same inline idiom.Testing
getreturns frontmatter plus body,createcreates,editappends without disturbing existing content,updatereplaces, and a cells-era notebook gives the translated error rather than a raw 5xx.Known gaps
update --markdownis lossy. Replaces the whole document, drops anything Markdown cannot represent. No prompt, matching JSONupdate.document_revisionis returned but not enforced on any write path.updatereplaces,editappends; no way to change one section in place.--outputand agent mode do nothing under--markdown, matchingskills remote get.