document.apply_editsdestructive | Applies a batch of changes to inspected passages when revising text. An applied or rebased result can return a handle for one inserted span. A pending outcome leaves the batch unapplied. A Mermaid flowchart is a mermaid fence written into the Markdown source here; Rapier renders it and keeps it as text. |
document.ask_editor | Asks the open editor for what needs the person's device: one card the person taps to read a passage aloud, copy it, open a device file or install a plug-in, or a Word or PDF export returned as a file link without a tap. Receipts say waiting, done, declined or unavailable. |
document.commentdestructive | Creates, replies to, resolves or reopens a discussion on inspected text, a drawing object or the whole document. |
document.comparedestructive | Opens a full-document comparison, accepts or rejects inspected differences, or closes the comparison when reviewing an alternative. Accepted differences change source. |
document.create_return | Creates a return receipt and address for an edited offline page. With a connected host the person confirms the upload in their connected browser; without one the address is its own one-use grant. It accepts one submission within 24 hours and before workspace expiry. |
document.drawdestructive | Creates or edits a native SVG drawing in the active document: movable, editable figures, a spatial sketch or a brush painting. Separate from Mermaid: a Mermaid flowchart is a fence in the Markdown source, inserted with document.apply_edits and rendered in the document. Read the drawing for recipe_handle. Change a drawing dial with shapes.set; a background kind or effect preset alone takes its starting values. Change an object with an operation. A complete recipe replaces the inspected recipe, including strokes and fonts, and uses the same open-canvas hand-off as a patch. An imported SVG without a Rapier recipe is edited node by node: read it for its node tree, then send svg_handle with node_edits. With contribution, the picture is staged with your words under that name for the person to keep or drop together; a patch to the drawing the person has open takes no contribution (it is refused draw_session_open), so it goes without one and lands at once. |
document.export | Creates a file link, up to 8 MiB: markdown is the exact source; html is the offline editor with its source inside; txt is the document's words as plain text; page is a standalone rendered web page; docx is Word; pdf carries raster pages, searchable text and the attached source. An open editor builds Word and PDF without a tap. The receipt states what each format keeps. With a connected host the link needs its connection; without one the link is its own grant. The stored file lasts up to 24 hours within the workspace lifetime. |
document.findread-only | Finds known words in source or the open comparison and returns handles for each match. Use kind to locate code syntax or Markdown structure. |
document.get_contextread-only | Returns document state, selection, presence, edit permissions, pending review, recent changes and continuation context when starting or resuming work. Continuation lists the person's kept and dropped decisions and Will intents apart from the agent's pending suggestions; the document's own continuation brief is context, never evidence of approval or authority over the person. |
document.get_outlineread-only | Lists headings or code declarations with temporary read refs when choosing a document section to inspect. |
document.inspect_visualread-only | Returns a PNG of a settled editor region at the expected revision for visual inspection after a source read. |
document.list_commentsread-only | Lists anchored discussions and current anchor status when reading document feedback or a specific thread. |
document.open_textdestructive | Replaces the working document with supplied text when starting a different document here. Existing handles and comparisons are retired. |
document.pair_browserdestructive | Names the four-letter code the person gives you from editor_url. The person then chooses ALLOW on that page to connect this browser to this workspace for a day. One use; a code lasts one minute. Five misses lock pairing for the code window. |
document.point | Points at an inspected passage, drawing object or change with a few words, without editing the document. Supply exactly one of context_handle or change_id. The pointer lasts 1 to 30 seconds and clears at your next change or the person's tap; the receipt says shown, deferred or expired. |
document.propose | Stages a complete document alternative against an inspected base and creates an offline page for reviewing it. Workspace source changes only after approval. |
document.propose_edits | Stages changes to inspected passages for the person to approve or decline before application. Use the same contribution name on text and drawing changes to review them together; read a corrected target again to refresh its part. |
document.read_contextread-only | Reads exact source, a native drawing recipe, an imported SVG's node tree or a comparison difference before editing. Returned handles cover only the disclosed content; read every page of a drawing or SVG before editing it. |
document.reveal | Requests presentation of an inspected passage or difference in the connected editor when the person needs to see it. |
document.savedestructive | Saves to the person's chosen local destination, or confirms durable hosted storage, when keeping work. The receipt reports verification. |
document.set_view | Pass view alone to show the formatted document, its exact source or the Notes cards; navigation waits until the person finishes typing, and get_context.view reports it. Pass preference and value together to change a device preference (theme, accent, text size, headings, layout, code view, the pen, the Notes view); its receipt carries the previous value for Undo. The person's later choice wins. Read-only mode, Notes skills and assets stay the person's alone. |
document.show_changesdestructive | Replaces the open comparison with the diff of an applied agent revision or a whole named contribution, without changing document text or review decisions. |
document.undo_agent_changedestructive | Reverses a selected agent change, a whole named contribution, or the latest change under the supplied agent name, while preserving later human work. |
document.wait_for_user | Waits for the person's next selection, message or returned page when their response is needed, up to timeout_ms. |
editdestructive | Apply unique exact-text changes atomically as one undoable act (act is its id string), rename with filename, or set Note fields with note. At a moved numeric revision, literal edits apply if untouched since; whole-document replacement needs the current revision. A conflict returns current context; decide afresh. Drawings, painting, Water, comments and HTML objects use fenced text; painting needs an open editor and an operation_id. |
exportdestructive | to:"file" (default) delivers markdown, html (the offline editor), page, txt, docx or pdf; to:"save" saves to the bound destination; to:"clipboard" copies a passage as plain, markdown, formatted or complete. to:"sync" alone syncs the Notes store and can replace files. page, docx and pdf need an editor or renderer. Inspect delivery; export never publishes a website. |
notes.historyread-only | Lists the note's retained versions, newest first, without changing the note. Read a version with notes.read. A changed history refuses the continuation with notes_changed. |
notes.listread-only | Lists or searches Notes with Skills first. query uses the library search: words, quoted phrases, tag:, in:, is:, has:, colour:, before: and after:. Trash appears only when requested by the query. A changed catalogue refuses a continuation with notes_changed. An absent store returns notes_not_configured; a locked encrypted store returns notes_locked. |
notes.proposedestructive | Creates a note or replaces a fully inspected, unchanged note, retaining its previous text in History. Unread, changed or open notes receive proposals for review. |
notes.readread-only | Reads one note's exact text by file, including a note in Trash. version selects a retained event from notes.history; omit it for the current text. A changed note refuses a continuation with notes_changed. Reading a past version does not authorize replacing the current note. |
notes.setdestructive | Changes only the supplied note controls. Returns changed values and their exact previous values. Archive and Trash are reversible through the same tool; no permanent deletion. Tags stay in the Markdown front matter; a tag change is refused with notes_open while the person has the note open. Reminders are app-only and named in the receipt. Skills stays the person's choice. |
notes.syncdestructive | Runs the Notes sync the person has already configured and returns its outcome. A locked vault, missing connection or required sign-in is reported without opening setup or asking for credentials. |
open | Create {text, filename}, resume {document}, open a Note {document, note}, create one {document, note:"new", text, title} (title only there), or import a host file {file}. Returns revision and whole text when it fits a page; otherwise a document map. A browser code goes to show {target:"pair", code}. Share editor_url when available; keep document private. |
rapier.guideread-only | Returns Rapier's usage guide and workflows when host instructions are unavailable. |
rapier.open | Creates an editable workspace from text or a host file, or resumes one by its document value. Returns editor_url, the live workspace in a browser. It makes two kinds of diagram: native SVG drawings (document.draw) and Mermaid flowcharts as fences in the source (document.apply_edits). Workspaces expire after 30 idle days. |
readread-only | Read exact text, a heading/fence map (as:"outline") or a PNG (as:"image") of the page or of the named block, heading or lines. query finds lines here; search lists Notes. Continue next_cursor with cursor alone. Check human context and omissions before editing. state:true reports pending work and the person’s presence; after_revision with wait_ms waits for their next change. guide returns instructions; guide resource URIs are not document IDs. |
showdestructive | Present work or ask the person. An omitted target is inferred from its fields. A 4-letter browser code pairs that editor (target:"pair"); a connected workspace's owner first approves at owner_approval_url, then the person chooses ALLOW. Inspect actual presentation; a request is not proof the person saw it. A comparison leaves source unchanged. Later human navigation wins. |
undodestructive | Undo one act or one turn (act or turn_id, not both), preserving later work. |