Repository navigation
Accept notes from GAM and Video Creator as Markdown - #224
Merged
Merged
Conversation
POST /api/notes/from-markdown takes {title, markdown, folder_name?, tags?,
source_app?} and handles everything a plain create leaves to the caller:
- converts the Markdown with markdown_to_blocks, the converter the
assistant's plans already use;
- files the note under the default category;
- puts it in the app's own top-level folder ("From GAM", "From Video
Creator"), or a named one. The folder is made the first time, matched
case-insensitively, and is never the Archive Bin or a saved search;
- tags it with the app;
- writes a first version, so the note has a history from the start.
The sibling apps call it with the person's own Bearer token when the
person applies a note their assistant proposed, so they never need to know
BlockNote's format.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD34N1XKXjKUUzmys6G
davior
pushed a commit
to davior/gam
that referenced
this pull request
Nov 6, 2026
"A summary of all the videos about dogs in Gecko Notes" now ends in a note proposal. The flow: - The assistant searches, reads, and drafts the note in Markdown, linking each asset as [Name](/a/<id>). - The person reads it on the card and applies it. - Only then does GAM send it to Notes as them. - propose_note (assistant/tools.py). It checks every linked id is the caller's asset; the same title again rewrites that note; at most 3 per turn. - Apply writes it through app/notes_client.py to gecko-notes' POST /api/notes/from-markdown (davior/gecko-notes#224). Notes makes the blocks and the "From GAM" folder. - The caller's own token is forwarded. Only the Apply request has it; a turn runs as GAM. - Asset links are made absolute with the page's origin. - Notes being down, a JWT mismatch, an older Notes, or no token is a skipped item with a sentence; the rest of the proposal still applies. - The Apply body takes note_refs. Results carry note_ref and note_url. - The panel shows a "New note" row: its folder, how many assets it links, its text on request, and "Open in Gecko Notes" once made. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1geD34N1XKXjKUUzmys6G
davior
pushed a commit
to davior/gvc
that referenced
this pull request
Nov 6, 2026
Ask for the script, a shot list or research "in Gecko Notes" and the assistant proposes a note: a title and the whole text in Markdown, with GAM assets linked as [Name](/a/<id>). It shows as a card under the reply, with the text to read and "Create in Gecko Notes" / Discard. A note is not part of the video, so it never goes through the spec proposal or the editor. It is made by its own button: - as whoever presses it, with that request's token (the turn's is gone by then); - through gecko-notes' POST /api/notes/from-markdown (davior/gecko-notes#224), which files it under "From Video Creator"; - marked created only once Notes says so, and refused a second time. - propose_note (assistant/tools.py), offered only when the turn holds a token. The same title again rewrites that note; at most 3 per turn. - AssistantTurn.proposed_notes (migration 7c3e1f9a5b24, nullable). - NotesClient.create_from_markdown, plus POST /turns/{id}/notes/{ref}/create and .../discard. Links become absolute with GAM_BASE_URL, and an older Notes answers notes_outdated. - NoteCard in the assistant panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1geD34N1XKXjKUUzmys6G
davior
marked this pull request as ready for review
November 6, 2026 09:56
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.
What
POST /api/notes/from-markdown: a way for GAM's and Video Creator's assistants to file a note in Gecko Notes. The flow: the person asks one of those assistants for a note (e.g. "a summary of all the videos about dogs"), reviews the proposed note, and presses Apply. That app then sends the Markdown here with the person's own Bearer token.Body:
{title, markdown, folder_name?, tags?, source_app?: "gam" | "gvc"}. Everything a plainPOST /api/notesleaves to the caller is decided here, so the other apps only ever send text:markdown_to_blocks, the converter the assistant's plans already use (headings, lists, tables, links, code).gamorvideo-creator.A blank title takes the first heading, else "Untitled". Empty text is refused (
400 empty_note), and the Markdown is capped at 200 KB.No change to auth: a Bearer token the other apps forward is verified by the existing middleware, as for any request.
Testing
backend/tests/test_notes_from_markdown.py(6 tests) runs against the real app and real auth middleware, with a token sent the way another app sends it. It checks:Deployment
Generated by Claude Code