{"version":"0.43.0","id":"kanvas.view.patch","operationId":"kanvas.view.patch","title":"view patch","requiredInputs":["sessionId","displayId","operations"],"description":"Patch current content without regeneration or resetting compatible poll/form/QA participation. may use an explicit revision guard and a stable requestId. Operations: set/remove/appendText at /data/...; checklist uses {op:\"checklist\",action:\"add|remove|update|move\",itemId,value?:{text,detail,checked},beforeId?}. checked sets one item; detail:null clears; add/move append unless beforeId. The final view is validated; no source-binding, server-counter, identity or permission changes. Read current state after a conflict. Waits briefly for genuine browser acknowledgement and returns per-display delivery outcomes. Applied delivery confirms that revision; inspect later only when unconfirmed. Top-level status is the historical update lifecycle, while delivery reports the current per-display observation. Concurrency: expectedRevision is OPTIONAL stale-write guard. Supplying a stale guard rejects the call; omitting optional guards does not waive authorization or other preconditions. After a conflict, inspect the operation-specific error and read current authorized state before retrying; current-value fields vary by operation.","guidance":"Patch narrow /data/... fields with revision CAS and stable requestId. This append assumes an existing transcription segment; retain all other data.","inputSchema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"maxLength":128},"displayId":{"type":"string","minLength":1,"maxLength":128},"requestId":{"description":"Stable ID deduplicates retries; omission creates a fresh ID per call.","type":"string","minLength":1,"maxLength":128},"expectedRevision":{"description":"Current revision.","type":"integer","minimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":32,"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"timeline"},"action":{"type":"string","enum":["select","next","previous","clear"]},"eventId":{"type":"string","minLength":1,"maxLength":128}},"required":["op","action"],"additionalProperties":false,"description":"Select a stable timeline event ID, move next/previous in chronological order, or clear back to static. eventId only with select. Equal dates keep input order; ends clamp. Without selection next starts first, previous starts last. Reuses atomic publication/history and revision checks."},{"type":"object","properties":{"op":{"type":"string","const":"instrument"},"changes":{"minItems":1,"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(key:[0-9]{1,3}|string:[a-zA-Z0-9_.-]{1,40}:(fret:[0-9]{1,2}|mute))$"},"value":{"anyOf":[{"type":"object","properties":{"highlight":{"default":true,"type":"boolean"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"label":{"type":"string","maxLength":50},"finger":{"type":"string","maxLength":12},"pitch":{"type":"object","properties":{"midi":{"type":"integer","minimum":0,"maximum":127,"description":"MIDI pitch number; middle C is 60 (C4). No MIDI input or audio."},"label":{"type":"string","minLength":1,"maxLength":30,"description":"Supplied spelling, e.g. Eb4 rather than D#4."}},"required":["midi","label"],"additionalProperties":false}},"additionalProperties":false},{"type":"null"}],"description":"Complete visual state for this element; null clears it. Other elements/configuration are preserved."}},"required":["id","value"],"additionalProperties":false}},"label":{"type":"string","maxLength":100}},"required":["op","changes"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"instrument-sequence"},"action":{"type":"string","enum":["append","replace-future","replace","pause","resume","seek","clear"]},"frames":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9_.:-]+$"},"durationMs":{"type":"integer","minimum":250,"maximum":120000},"elements":{"type":"object","propertyNames":{"type":"string","pattern":"^(key:[0-9]{1,3}|string:[a-zA-Z0-9_.-]{1,40}:(fret:[0-9]{1,2}|mute))$"},"additionalProperties":{"type":"object","properties":{"highlight":{"default":true,"type":"boolean"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"label":{"type":"string","maxLength":50},"finger":{"type":"string","maxLength":12},"pitch":{"type":"object","properties":{"midi":{"type":"integer","minimum":0,"maximum":127,"description":"MIDI pitch number; middle C is 60 (C4). No MIDI input or audio."},"label":{"type":"string","minLength":1,"maxLength":30,"description":"Supplied spelling, e.g. Eb4 rather than D#4."}},"required":["midi","label"],"additionalProperties":false}},"additionalProperties":false}}},"required":["id","durationMs","elements"],"additionalProperties":false}},"positionMs":{"type":"number","minimum":0,"maximum":30720000}},"required":["op","action"],"additionalProperties":false,"description":"Supplied complete highlight states, locally timed. Same clock/transport semantics as captions. clear preserves current visible highlights as static elements. No sound."},{"type":"object","properties":{"op":{"type":"string","const":"sequence"},"action":{"type":"string","enum":["append","replace-future","replace","pause","resume","seek","clear"]},"chunks":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9_.:-]+$"},"durationMs":{"type":"integer","minimum":250,"maximum":120000},"text":{"type":"string","minLength":1,"maxLength":400}},"required":["id","durationMs","text"],"additionalProperties":false}},"positionMs":{"type":"number","minimum":0,"maximum":120000000}},"required":["op","action"],"additionalProperties":false,"description":"Live captions only. append retains clock; replace-future retains current/past; replace resets paused at zero. pause/resume/seek use server time. clear empties and pauses. Read kanvas_call with operationId:\"kanvas.display.current\" and arguments:{…}.sequenceStatus. All mutations use the ordinary patch revision/requestId."},{"type":"object","properties":{"op":{"type":"string","const":"roster"},"action":{"type":"string","enum":["add","remove","update"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"shift":{"type":"string","minLength":1,"maxLength":128},"person":{"type":"string","minLength":1,"maxLength":128},"value":{"type":"object","properties":{"code":{"anyOf":[{"type":"string","minLength":1,"maxLength":8},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"additionalProperties":false}},"required":["op","action","date","shift"],"additionalProperties":false,"description":"Target one roster assignment by date+shift+optional person. add/remove/update; value code/note, null clears. Atomic and revision-bound."},{"type":"object","properties":{"op":{"type":"string","const":"checklist"},"itemId":{"type":"string","minLength":1,"maxLength":128},"action":{"type":"string","enum":["add","remove","update","move"]},"value":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000},"detail":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"checked":{"type":"boolean"}},"additionalProperties":false},"beforeId":{"type":"string","minLength":1,"maxLength":128}},"required":["op","itemId","action"],"additionalProperties":false,"description":"Checklist ID: add/update value; detail:null clears. add/move beforeId or append."},{"type":"object","properties":{"op":{"type":"string","const":"set"},"path":{"type":"string","minLength":1,"maxLength":512,"description":"JSON pointer /data/field; escape ~ as ~0 and / as ~1. No whole-data, array insert/remove or metadata edits."},"value":{"description":"Set value; parent must exist."}},"required":["op","path","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"remove"},"path":{"type":"string","minLength":1,"maxLength":512,"description":"JSON pointer /data/field; escape ~ as ~0 and / as ~1. No whole-data, array insert/remove or metadata edits."}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"appendText"},"path":{"type":"string","minLength":1,"maxLength":512,"description":"JSON pointer /data/field; escape ~ as ~0 and / as ~1. No whole-data, array insert/remove or metadata edits."},"value":{"type":"string","minLength":1,"maxLength":20000,"description":"Append exact text."}},"required":["op","path","value"],"additionalProperties":false}]},"description":"Atomic, ordered; validates final view."}},"required":["sessionId","displayId","operations"],"additionalProperties":false,"examples":[{"sessionId":"session-id","displayId":"display-id","expectedRevision":3,"requestId":"patch-1","operations":[{"op":"appendText","path":"/data/segments/0/text","value":" More supplied words."}]}]},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"examples":[{"tool":"kanvas_call","arguments":{"operationId":"kanvas.view.patch","arguments":{"sessionId":"session-id","displayId":"display-id","expectedRevision":3,"requestId":"patch-1","operations":[{"op":"appendText","path":"/data/segments/0/text","value":" More supplied words."}]}}}],"exampleNotice":"Examples are valid syntax with illustrative IDs and source data. Substitute live authorized IDs/revisions; examples never grant consent."}