{"version":"0.20.0","name":"kanvas_publish","description":"Put content on displays. For unfamiliar shapes use kanvas_template get; prefer a prepared view {version:1,template,data}. Prepared data use exact schema validation, not validation. Fact: {text:\"Exact words.\"}. Preserve decimal strings. replace replaces COMPLETE data; patch edits /data with CAS/requestId; validate checks a view without publishing; notify is transient. Honor live policy/hold. Published is not painted: read status for the receiving paint. Required: operation. Required fields by operation: show(requestId); replace(sessionId,displayId,expectedRevision,data); patch(sessionId,displayId,requestId,expectedRevision,operations); validate(sessionId,view); status(sessionId); notify(sessionId,displayIds,text).","inputSchema":{"type":"object","properties":{"operation":{"type":"string","enum":["show","replace","patch","validate","status","notify"],"description":"Required operation; supply only the fields in its matching branch."},"requestId":{"type":"string"},"sessionId":{"type":"string"},"displayIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}},"sessionName":{"type":"string","minLength":1,"maxLength":160},"newSession":{"type":"boolean","const":true},"targetRef":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"contextId":{"type":"string","minLength":1,"maxLength":128},"resolution":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"sessionId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"displayIds":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"uniqueItems":true},"newSession":{"type":"boolean","const":true}},"required":["ref"],"additionalProperties":false,"oneOf":[{"required":["sessionId"],"not":{"required":["newSession"]}},{"required":["newSession"],"not":{"anyOf":[{"required":["sessionId"]},{"required":["displayIds"]}]}}]},"context":{"type":"string","maxLength":12000},"intent":{"type":"string","maxLength":1000},"data":{},"datasetId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"assetIds":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}},"templateHint":{"type":"string","enum":["email","inbox","chat","cards","record-detail","bookmarks","tool-inventory","tool-detail","developer","operations","code-workspace","sports-lineup","org-chart","flowchart","network","scoreboard","standings","tool-call-log","json","session-topology","devices","fact","number","chart","table","image-gallery","image","website","iframe","story-cards","list","progress","log","comparison","checklist","map","code","whiteboard","presentation","document","video","notifications","transcription","translation","form","schedule","roster","calendar","planner","poll","countdown","qa","overview","display-grid","settings","html","timeline","itinerary","product","weather","profile","kpi","quote","recipe","menu","leaderboard","status","procedure","join","drafting","clock","now-playing"]},"source":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":2048},"locator":{"type":"string","maxLength":500},"timestamp":{"type":"string","maxLength":60}},"additionalProperties":false},"view":{"type":"object"},"displayId":{"type":"string"},"expectedRevision":{"type":"integer"},"operations":{"minItems":1,"maxItems":32,"type":"array","items":{"oneOf":[{"properties":{"op":{"const":"checklist"},"itemId":{},"action":{},"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":{}},"required":["op","itemId","action"],"additionalProperties":false,"description":"Checklist ID: add/update value; detail:null clears. add/move beforeId or append."},{"properties":{"op":{"const":"set"},"path":{},"value":{"description":"Set value; parent must exist."}},"required":["op","path","value"],"additionalProperties":false},{"properties":{"op":{"const":"remove"},"path":{}},"required":["op","path"],"additionalProperties":false},{"properties":{"op":{"const":"appendText"},"path":{},"value":{"type":"string","minLength":1,"maxLength":20000,"description":"Append exact text."}},"required":["op","path","value"],"additionalProperties":false}],"type":"object","properties":{"op":{"type":"string"},"itemId":{"type":"string","minLength":1,"maxLength":128},"action":{"type":"string","enum":["add","remove","update","move"]},"value":{},"beforeId":{"type":"string","minLength":1,"maxLength":128},"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."}}},"description":"Atomic, ordered; validates final view."},"updateId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"text":{"type":"string","minLength":1,"maxLength":1000},"severity":{"type":"string","enum":["info","success","warning"]},"durationMs":{"type":"integer","minimum":1000,"maximum":60000},"sticky":{"type":"boolean"}},"required":["operation"],"oneOf":[{"properties":{"operation":{"const":"show"},"requestId":{"$ref":"#/$defs/c4"},"sessionId":{"$ref":"#/$defs/c1"},"displayIds":{"minItems":1,"maxItems":64,"uniqueItems":true},"sessionName":{},"newSession":{},"targetRef":{},"contextId":{},"resolution":{},"context":{},"intent":{},"data":{},"datasetId":{},"assetIds":{},"templateHint":{},"source":{},"view":{"properties":{"format":{"type":"object","properties":{"timeZone":{"type":"string","maxLength":100},"numberLocale":{"type":"string","maxLength":80},"unitSystem":{"type":"string","enum":["source","metric","imperial"]},"timeFormat":{"type":"string","enum":["locale","12h","24h"]},"dateFormat":{"type":"string","enum":["source","dmy","mdy","iso"]}},"additionalProperties":false},"selection":{"type":"object","properties":{"where":{"$ref":"#/$defs/c0"},"match":{"default":"all","type":"string","enum":["all","any"]},"sort":{"default":[],"maxItems":4,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":200},"direction":{"default":"asc","type":"string","enum":["asc","desc"]},"type":{"default":"text","type":"string","enum":["text","number"]}},"required":["field"],"additionalProperties":false}},"highlight":{"$ref":"#/$defs/c0"}},"additionalProperties":false},"version":{"type":"number","const":1},"template":{"type":"string","enum":["email","inbox","chat","cards","record-detail","bookmarks","tool-inventory","tool-detail","developer","operations","code-workspace","sports-lineup","org-chart","flowchart","network","scoreboard","standings","tool-call-log","json","session-topology","devices","fact","number","chart","table","image-gallery","image","website","iframe","story-cards","list","progress","log","comparison","checklist","map","code","whiteboard","presentation","document","video","notifications","transcription","translation","form","schedule","roster","calendar","planner","poll","countdown","qa","overview","display-grid","settings","html","timeline","itinerary","product","weather","profile","kpi","quote","recipe","menu","leaderboard","status","procedure","join","drafting","clock","now-playing"]},"title":{"$ref":"#/$defs/c3"},"showTitle":{"type":"boolean"},"showCaption":{"type":"boolean"},"showSource":{"type":"boolean"},"showControls":{"type":"boolean"},"data":{"$ref":"#/$defs/c2"},"source":{"type":"object","properties":{"title":{"$ref":"#/$defs/c3"},"url":{"type":"string","maxLength":2048},"locator":{"$ref":"#/$defs/c3"},"timestamp":{"type":"string","maxLength":60}},"additionalProperties":false},"actions":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.:-]+$"},"label":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["button","choice","input"]},"options":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"placeholder":{"$ref":"#/$defs/c3"}},"required":["id","label","kind"],"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"choice"}},"required":["kind"]},"then":{"required":["options"]}}]}}},"required":["version","template","data"],"additionalProperties":false}},"required":["operation","requestId"],"additionalProperties":false,"allOf":[{"if":{"required":["displayIds"]},"then":{"required":["sessionId"]}},{"not":{"required":["targetRef","sessionId"]}},{"not":{"required":["targetRef","displayIds"]}},{"not":{"required":["targetRef","newSession"]}},{"not":{"required":["targetRef","sessionName"]}},{"not":{"required":["targetRef","resolution"]}},{"not":{"required":["newSession","sessionId"]}},{"not":{"required":["newSession","displayIds"]}},{"not":{"required":["newSession","resolution"]}},{"not":{"required":["sessionName","sessionId"]}},{"not":{"required":["sessionName","displayIds"]}},{"not":{"required":["sessionName","resolution"]}},{"not":{"required":["resolution","displayIds"]}}],"description":"Show/chart/render on screen, including voice."},{"properties":{"operation":{"const":"replace"},"sessionId":{"$ref":"#/$defs/c1"},"displayId":{"$ref":"#/$defs/c1"},"expectedRevision":{"minimum":0,"maximum":9007199254740991},"data":{"$ref":"#/$defs/c2"}},"required":["operation","sessionId","displayId","expectedRevision","data"],"additionalProperties":false,"description":"Replace COMPLETE data on the current editable template, not a partial merge."},{"properties":{"operation":{"const":"patch"},"sessionId":{"$ref":"#/$defs/c4"},"displayId":{"$ref":"#/$defs/c4"},"requestId":{"minLength":1,"maxLength":128,"description":"Retry identical input with the same key."},"expectedRevision":{"minimum":0,"maximum":9007199254740991,"description":"Current revision."},"operations":{}},"required":["operation","sessionId","displayId","requestId","expectedRevision","operations"],"additionalProperties":false,"description":"Patch narrow /data/... fields with revision CAS and stable requestId."},{"properties":{"operation":{"const":"validate"},"sessionId":{"$ref":"#/$defs/c1"},"view":{"propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["operation","sessionId","view"],"additionalProperties":false},{"properties":{"operation":{"const":"status"},"sessionId":{"$ref":"#/$defs/c1"},"updateId":{},"requestId":{"$ref":"#/$defs/c4"}},"required":["operation","sessionId"],"additionalProperties":false,"oneOf":[{"required":["updateId"],"not":{"required":["requestId"]}},{"required":["requestId"],"not":{"required":["updateId"]}}]},{"properties":{"operation":{"const":"notify"},"sessionId":{"$ref":"#/$defs/c1"},"displayIds":{"minItems":1,"maxItems":20},"text":{},"severity":{"default":"info"},"durationMs":{"default":6000},"sticky":{"default":false}},"required":["operation","sessionId","displayIds","text"],"additionalProperties":false,"description":"Show a transient overlay notification without replacing the current view."}],"examples":[{"operation":"show","requestId":"r0","templateHint":"fact","data":{"text":"Exact supplied sentence."}},{"operation":"show","requestId":"r1","targetRef":"returned-target-ref","view":{"version":1,"template":"fact","data":{"text":"Exact supplied sentence."}}},{"operation":"show","sessionId":"s","displayIds":["d"],"requestId":"r2","view":{"version":1,"template":"fact","data":{"text":"Exact supplied sentence."}}},{"operation":"show","sessionId":"s","displayIds":["d"],"requestId":"r3","view":{"version":1,"template":"transcription","data":{"segments":[{"id":"segment-1","text":"Exact supplied words.","speaker":"Speaker A"}],"status":"live"}}},{"operation":"replace","sessionId":"s","displayId":"d","expectedRevision":3,"data":{"segments":[{"id":"segment-1","text":"Exact supplied words.","speaker":"Speaker A"}],"status":"live"}},{"operation":"patch","sessionId":"s","displayId":"d","expectedRevision":3,"requestId":"r5","operations":[{"op":"appendText","path":"/data/segments/0/text","value":" More supplied words."}]},{"operation":"validate","sessionId":"s","view":{"version":1,"template":"fact","data":{"text":"Exact supplied sentence."}}},{"operation":"status","sessionId":"s","requestId":"r7"},{"operation":"notify","sessionId":"s","displayIds":["d"],"text":"A supplied short notice.","severity":"info"}],"$defs":{"c0":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":200},"op":{"type":"string","enum":["eq","ne","contains","lt","lte","gt","gte"]},"value":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":{"default":"text","type":"string","enum":["text","number"]}},"required":["field","op","value"],"additionalProperties":false}},"c1":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"c2":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"c3":{"type":"string","maxLength":500},"c4":{"minLength":1,"maxLength":128}}},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}}