OptionalkeyExternal system identifier assigned to this note. Set as the note's
key for future upsert matching. Required when the runtime does not
already know the key (i.e., from onNoteCreated); ignored from
onNoteUpdated when the key was already established on create.
OptionalexternalThe content string as the external system now stores it, post-write.
For systems whose write-back returns a representation of what was
actually stored (e.g. Google Drive comment content after a create),
pass that verbatim. For systems that only accept plain text, this
will often be a lossy plain-text version of the Plot markdown — that
is exactly the point: storing the lossy form as baseline lets the
next sync-in recognize it and skip overwriting the richer Plot
version.
Must exactly match the string your connector's sync-in path emits as
NewNote.content for this note on re-ingest.
Result returned from Connector.onNoteCreated and Connector.onNoteUpdated to report what the external system now has stored for the note.
The runtime hashes
externalContentand stores it as the note's sync baseline. On the next sync-in, if the incoming content hashes to the same value, the runtime knows the external side hasn't changed and preserves Plot's (possibly formatted) content. When the external side is edited, the hash diverges and the runtime overwrites Plot's content with the new external version.Omitting
externalContentskips baseline tracking — the next sync-in will overwrite Plot's content (previous behavior). Always provide it when the write-back's return value reflects what the external system actually stored (often lossy plain-text), so the round-trip does not clobber the original Plot markdown.The hash covers only the content string — the runtime intentionally does not include a content-type in the hash, so write-back and sync-in do not have to agree on a content-type label for the same underlying bytes. Return exactly the string your connector's sync-in path will emit as
NewNote.contentfor this note on the next re-ingest.For back-compat,
onNoteCreatedmay also return a plain string, which is treated as{ key }with no baseline.