[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69A8PYD8JAPS928HBEGSTWS":3,"skill-same:01M69A8PYD8JAPS928HBEGSTWS":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":17,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M69A8PYD8JAPS928HBEGSTWS","canvas-apps","交互式画布应用开发","Interactive and SHARED canvas apps — page actions, the canvas_kv store, requests the page queues, the session's files and declared commands (canvas-ws), saving apps. Load before any canvas that takes input, uses files, or is shared.","交互式且共享的画布（canvas）应用——页面动作、canvas_kv 存储、页面排队的请求、会话文件及声明的命令（canvas-ws）、保存应用。在加载任何需要输入、使用文件或共享的画布之前先加载本技能。","microsoft\u002FPilotSwarm","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69A6RNK492A5JSNBTXANKX5",16,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fsystem\u002Fskills\u002Fcanvas-apps\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BWKS60NTYJHFE9FQSXGDKS","低代码应用开发","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"canvas","canvas apps","apps","actions","page","interactive","session","files","shared","commands","input","store","requests","load","queues","2026-11-10 10:12:30",false,"---\nname: canvas-apps\ndescription: Interactive and SHARED canvas apps — page actions, the canvas_kv store, requests the page queues, the session's files and declared commands (canvas-ws), saving apps. Load before any canvas that takes input, uses files, or is shared.\n---\n\n# Canvas Apps\n\nA canvas visual is disposable presentation. A canvas app holds state, lets\nseveral people use it at once, and asks the session to do things. For page\nlayout, chart form, color and the sandbox rules, load `html-visuals` first.\n\n## The three lanes\n\n| Lane | Who writes | Reaches | Wakes you | Durable | Costs you |\n|---|---|---|---|---|---|\n| **KV** (`canvas_kv`) | any permitted viewer, and you | every viewer, ~50 ms | no | yes | tens of tokens per key |\n| **Action** (`canvas-action`) | a viewer with session write | you | yes — one turn | as a message | a whole turn |\n| **Tick** (`update_canvas`) | you only | every viewer, ~50 ms | no | no | patch: tens · data: thousands |\n\n**The KV is for state, the action is for attention.** Never put a payload\nin an action when you can put an id there and the payload in the KV.\nOutbound costs output tokens, inbound costs a turn — the turn is the unit.\n\nCheapest first: `canvas_kv(put)` one key · `update_canvas(patch)` a subtree ·\n`draw_canvas(fromArtifact)` a filename · `update_canvas(data)` whole state ·\n`draw_canvas(html)` the whole document.\n\n## The KV store\n\nOne row per key, per session, per slot. The page supplies only the key; the\nserver stamps the writer (`by`) and the time (`at`). Keys: letters, digits,\n`. _ \u002F -`, ≤200 chars. Values ≤16 KB; 1000 keys and 2 MB per canvas.\n\nReserved prefixes:\n\n```\napp\u002F…            the app's shared state — notes, votes, the board\nreq\u002F\u003CreqId>      a request from the page to you (below)\nevt\u002F\u003Cn>          a note from you to the page (you write, viewers read)\nui\u002F\u003CwriterId>    one viewer's ephemeral state (presence, drafts) — only theirs\ncfg\u002F…            you and the owner write, everyone reads\n```\n\n**Never keep a list in one key.** One key per item (`app\u002Fnote\u002F\u003Cuuid>`), one\nkey per person (`app\u002Fvote\u002F\u003Cme.id>`), a claim is `put` with `ifMatch: 0`,\nordering is a field inside the item. Counters: per-person keys, count them.\nFree text several people edit: split into per-section keys and show `by`.\nFrame-rate state (a game board, live spectating) does not belong here.\n\nYour tool: `canvas_kv({op: get|put|list|delete, key, value, prefix, limit,\nafter, ifMatch, slot, session_id})`. `ifMatch: 0` = create only; `ifMatch: N`\n= the current rev must be N. `list` pages by `after` (the last key of the\nprevious page). `slot` picks the canvas (1-5, default 1); `session_id`\ntargets an ANCESTOR session's canvas, as the other canvas tools do.\n\n### Who may write\n\nTwo switches, both needed. The **owner's policy** on the canvas\n(`owner` default | `readers` = anyone the session is read-shared with |\n`link`), set in the share dialog. And **your app's declaration** in the\nmanifest: `\"kv\": { \"write\": \"viewers\" }`. Without both, only the owner, the\nsession's writers, and you write. Rows are author-bound: a collaborator\nedits only rows they wrote unless you share the prefix\n(`\"kv\": { \"write\": \"viewers\", \"shared\": [\"app\u002Ftask\u002F*\"] }`).\n\nEveryone reads. Every write is attributed: `by.kind` is `user` (signed in),\n`link` (bearer — label unverified) or `agent`.\n\n## The page side — paste this helper\n\nNothing is injected into the document. Paste `CanvasKV()` into your page:\n\n```js\nfunction CanvasKV() {\n  const waiting = new Map(); let n = 0; const listeners = [];\n  const ask = (msg, retryMs) => new Promise((res, rej) => {\n    const id = ++n; waiting.set(id, { res, rej });\n    const send = () => parent.postMessage({ type: \"canvas-kv\", id, ...msg }, \"*\");\n    send();\n    \u002F\u002F The host may not be listening yet on a cold open: re-post until answered.\n    if (retryMs) { const t = setInterval(() => waiting.has(id) ? send() : clearInterval(t), retryMs); }\n  });\n  window.addEventListener(\"message\", (e) => {\n    const m = e.data || {};\n    if (m.type === \"canvas-kv-change\") { listeners.forEach((f) => f(m)); return; }\n    if (m.type !== \"canvas-kv-result\" && m.type !== \"canvas-kv-ready\") return;\n    const w = waiting.get(m.id); if (!w) return; waiting.delete(m.id);\n    m.ok ? w.res(m) : w.rej(Object.assign(new Error(m.error || \"failed\"), { code: m.code, rev: m.rev }));\n  });\n  const listAll = async (prefix) => {          \u002F\u002F every key under a prefix, across pages\n    let after = null, out = [];\n    do { const r = await ask({ op: \"list\", prefix, after }); out = out.concat(r.entries); after = r.nextAfter; } while (after);\n    return out;\n  };\n  return {\n    ready: ask({ op: \"ready\" }, 500),                          \u002F\u002F → { me, canWrite, policy, entries (first 200) }\n    listAll,                                                   \u002F\u002F → [{ key, v, by, at, rev }]\n    get: (key) => ask({ op: \"get\", key }).then((r) => r.entry),\n    put: (key, value, ifMatch) => ask({ op: \"put\", key, value, ifMatch }),   \u002F\u002F → { rev } | rejects { code, rev }\n    del: (key, ifMatch) => ask({ op: \"delete\", key, ifMatch }),\n    onChange: (f) => listeners.push(f),                        \u002F\u002F { key, rev, op, v?, by, at }\n  };\n}\n```\n\n```js\nconst kv = CanvasKV();\nconst { canWrite, me } = await kv.ready;\nrenderAll(await kv.listAll(\"app\u002F\"));                 \u002F\u002F list the app prefix — ready carries only the first 200 keys\nkv.onChange(async (c) => applyOne(c.v === undefined && c.op !== \"delete\" ? { ...c, v: (await kv.get(c.key))?.v } : c));\nif (!canWrite) lockTheUI(\"You can view this board but not edit it.\");\nsetInterval(() => document.visibilityState === \"visible\" && kv.listAll(\"app\u002F\").then(renderAll), 15000); \u002F\u002F resync if the live feed drops\n```\n\n`me` is `{ id, kind, label, relation, canWrite }`; `relation` is `owner |\nadmin | collaborator | viewer | link`. **`me.id` is `provider\u002Fsubject`** —\nit contains a slash, so a per-person key `app\u002Fvote\u002F\u003Cme.id>` spans two\nsegments (fine; list by prefix `app\u002Fvote\u002F`). `label` is the person's\ndisplay name (their email or subject when no name is known).\n\nEntries are `{ key, v, by, at, rev }` — `v` is what a page stored; `by` and\n`at` let you attribute and order. A `canvas-kv-change` may arrive **without\n`v`** (the value was too big to ride the ping): fetch the key, as above.\n`op: \"delete\"` drops the key. Rejections carry `code` — `FORBIDDEN`,\n`CONFLICT` (with the current `rev`, so a claim can show who won),\n`INVALID_KEY`, `TOO_LARGE`, `QUOTA`, `NOT_READY` (retry). Render from the KV,\nnot from state baked into the document; preserve in-flight drafts across\nre-renders.\n\nNew keys are open to every admitted writer; only overwrites are\nauthor-bound. \"Only the owner may add\" is a UI rule, not a server rule.\n\n## Requests: the KV carries the payload, the action rings the doorbell\n\n```\npage   put req\u002F\u003Cid> { op, args, status: \"queued\" }        every viewer sees it\npage   canvas-action { action: \"request\", data: { id } }  turn starts (if the viewer may ring)\nyou    canvas_kv get req\u002F\u003Cid> → put { status: \"working\" } → put { status: \"done\", result }\npage   renders the answer. No redraw.\n```\n\nContract: `\"responseContract\": { \"actions\": { \"request\": { \"id\": \"string\" } } }`.\nRows carry `{ op, args, status, result?, error? }` with `status` in\n`suggested | queued | working | done | failed`.\n\n**Only the owner and you decide what you act on. Everyone else suggests.**\nA collaborator's `req\u002F*` row is capped to `status: \"suggested\"` by the\nserver; the owner promotes it by writing `status: \"queued\"`. Your drain, on\nEVERY wake (a cron tick, a child completion, any turn):\n\n```\ncanvas_kv list req\u002F  →  take every row with status \"queued\"  (never \"suggested\")\ndo the work, land each row in \"done\" or \"failed\"  — never leave one \"working\"\n```\n\nThe doorbell only shortens the wait; the status is the boundary. An app\nwhose requests progress only while the owner has a tab open is broken for\nautonomous use: render `queued` honestly (\"picked up on the next run\"), and\n`suggested` as \"waiting for the owner\", never a spinner.\n\nRecovery after a memory gap: `canvas_kv list req\u002F` (unfinished work),\n`canvas_kv list app\u002F` (current state), `read_canvas(manifestOnly)` (the\narmed contract). This is why app state lives in the KV, not in chat.\n\n**Promotion is a decision, never a reflex.** Only the owner's ask or your own\ntask moves KV content into an artifact, a shared fact, or an external write\n(ADO, a PR comment, email). Carry `by` across. Never promote link-written\ncontent into a shared fact without the owner saying so.\n\n## Actions (the doorbell)\n\n```js\nparent.postMessage({ type: \"canvas-action\", action: \"request\", data: { id } }, \"*\");\n```\n\nThe browser validates against your contract (no contract → nothing is\naccepted) and delivers conforming posts as `[canvas-action] {...}` user\nmessages hidden from the chat pane. Answer on the canvas (a KV put or a\npatch), not with a redraw that wipes drafts. Actions are accepted only from\na viewer with session write; everyone else's request lands `suggested`.\nNever BLOCK on a canvas control — the chat box is the fallback, and real\napproval gates stay on `ask_user`. Batch a whole form into ONE action with a\n`json` field.\n\n## The manifest: the app's interface, for the agent who did not write it\n\nA canvas worth drawing twice is an app, and an app is driven by agents who\nnever read its HTML — you after a context regeneration, and every other\nsession that finds it in the catalog. The manifest comment right after\n`\u003C!doctype html>` is the whole interface. Write it as if for a stranger:\n\n```html\n\u003C!-- CANVAS-APP-MANIFEST\n{ \"manifestVersion\": 1, \"name\": \"release-signoff\", \"version\": \"1.2.0\",\n  \"description\": \"Use when several approvers sign off a release train together.\",\n  \"tags\": [\"release\", \"approval\", \"collaborative\"],\n  \"kv\": { \"write\": \"viewers\", \"shared\": [\"app\u002Fitem\u002F*\"] },\n  \"responseContract\": { \"actions\": { \"request\": { \"id\": \"string\" } } },\n  \"interface\": {\n    \"keys\": [\n      { \"key\": \"app\u002Fitem\u002F\u003Cid>\", \"writer\": \"both\",\n        \"shape\": { \"title\": \"Fix login redirect\", \"owner\": \"sam\", \"decision\": \"approve|reject|null\", \"note\": \"\" },\n        \"note\": \"One row per checklist item. The AGENT seeds them; approvers set decision and note.\" },\n      { \"key\": \"cfg\u002Fdeadline\", \"writer\": \"agent\", \"shape\": \"2026-09-01T17:00:00Z\" },\n      { \"key\": \"ui\u002F\u003CwriterId>\", \"writer\": \"page\", \"shape\": { \"at\": \"iso\" }, \"note\": \"Presence heartbeat.\" }\n    ],\n    \"requests\": [\n      { \"op\": \"seed\", \"args\": { \"items\": [{ \"id\": \"5502432\", \"title\": \"…\", \"owner\": \"…\" }] },\n        \"result\": { \"seeded\": 12 }, \"note\": \"Owner asks the agent to (re)load the checklist from the train.\" },\n      { \"op\": \"store\", \"args\": {}, \"result\": { \"artifact\": \"signoff-\u003Ctrain>.md\" },\n        \"note\": \"Owner presses Store: the agent writes the decisions as a report artifact.\" }\n    ],\n    \"events\": [ { \"key\": \"evt\u002Fbanner\", \"shape\": { \"text\": \"Freeze at 17:00 UTC\" }, \"note\": \"Rendered at the top.\" } ],\n    \"notes\": \"Render everything from app\u002Fitem\u002F*. A row with decision null is pending. Count approvals by listing.\" } }\n-->\n```\n\n`interface.keys` says which KV keys exist, who writes them and what a value\nlooks like. `interface.requests` says which `req\u002F*` ops the page queues, with\ntheir args and what `result` the page renders when you land them.\n`interface.events` says which `evt\u002F*` notes the page shows. Caps: 32 entries\nper list, 512 bytes per shape, 6 KB for the block. `description` is the text\nthe catalog ranks on: say WHEN to use the app, not how it works.\n\nRe-learn any app with `read_canvas({manifestOnly: true})` — never by\nre-reading the bytes. `draw_canvas({fromArtifact})` hands you the same card.\n\n## Publish and find\n\n```\npublish_canvas_app({ name: \"release-signoff\", description: \"Use when …\", tags: [...] })\n   → the canvas bytes → pinned artifact app-\u003Cname>.html on this session\n   → the card (manifest + armed contract + source) → SHARED fact apps\u002F\u003Cname>\n   → every session can find it\n\nfind_canvas_app({ query: \"sign off a release\" })\n   → ranked cards { key, name, description, tags, kv, source }\nread_facts({ key_pattern: \"apps\u002F\u003Cname>\", scope: \"shared\" })   → the full card, incl. interface\ndraw_canvas({ fromArtifact: card.source })                     → on screen, card returned again\n```\n\n**Look before building.** When the user asks for an app — a board, a poll, a\nsign-off sheet, a review workbench — search first and offer what exists.\nWhen the user is doing something an app fits (reading a diff, running a\nmeeting, watching a deploy), search and suggest rather than waiting to be\nasked. Publish when the user says to share it.\n\n**Driving an app you found:** draw it, `canvas_kv(list, \"app\u002F\")` to see its\nstate, seed the keys its `interface.keys` name (the shapes are examples to\ncopy), drain `req\u002F*` on every wake and land each with the `result` shape the\ncard gives. You never need the HTML.\n\n**Publish the shell, never the data.** Publishing makes the document readable\nby every session. A reusable app reads its rows from the KV; a page with a\ncustomer list baked into a JS literal is not reusable and must not be\npublished. Republishing the same name replaces the card and the artifact.\n\n## The session's folders (canvas-ws)\n\nA canvas app can read and change the session's files, and run commands you\ndeclare, with no turn of yours: a git history viewer, a notes editor, a\ntest-log browser. It is for the session's **owner** only; for anyone else\nevery call fails.\n\nDeclare the access in the manifest. The server checks every call against\nthis block, read from the document you drew; the page cannot widen it.\n\n```\n\"workspace\": {\n  \"read\":  [\"work\u002F**\"],                       list and read\n  \"write\": [\"home\u002Fnotes\u002F*.md\"],               also write, move, delete\n  \"watch\": true,                              the page hears when files change\n  \"commands\": {\n    \"history\": { \"in\": \"work\",\n      \"run\": [\"git\", \"log\", \"--format=%H%x09%an%x09%ar%x09%s\", \"-n\", \"{limit}\", \"--\", \"{path}\"],\n      \"params\": { \"path\": { \"type\": \"path\" }, \"limit\": { \"type\": \"int\", \"min\": 1, \"max\": 200, \"default\": 50 } } },\n    \"show\": { \"in\": \"work\", \"run\": [\"git\", \"show\", \"--stat\", \"--patch\", \"{sha}\"],\n      \"params\": { \"sha\": { \"type\": \"sha\" } } }\n  }\n}\n```\n\nPaths are `\u003Cfolder>\u002F\u003Cpath>`: `work` is the working folder, an extra folder\nkeeps its name (`home`, `shared`). In a session with no repo, the person's\nown folder IS the working folder, so it is `work`, not `home`. Call `info()`\nto see the names. `**` crosses folders, `*` does not.\nDeclare the least you need. `.git` is read-only whatever you declare.\nA command's `in` is a session folder or a folder inside one (`work\u002Ftfenv`\nfor a repo cloned into the working folder); its `path` values must be\ninside it and are passed relative to it.\n\nCommands: `run[0]` is a program name (no path). A `{param}` must be a whole\nargument, never part of one. Types: `path` (inside the command's folder, a\nfile the app may read, or a folder it may read all of), `int` (`min`\ndefaults to 0), `enum` (`values`), `ref` (a branch or tag), `sha` (hex),\n`text` (one line, not starting with `-`). There is no shell.\n`timeoutSeconds` ≤ 60, output ≤ 1 MB. For git: `run[1]` is the subcommand\n(log, show, diff, status, blame, ls-files, add, commit, restore, reset,\nstash, switch, checkout, mv, rm, …), with no options before it; choose the\nrepository with `in` (`work\u002Ftfenv`), never `-C`. Options that start\nprograms or reach outside (`--output`, `--no-index`, `--exec`, …) and\nabsolute or `..` paths are refused when you draw. Git runs with no network,\nno hooks, and not in a repository whose own settings start programs.\nThe deployment decides whether commands run at all and which programs may\nrun (git by default). A page cannot know which: handle\n`CANVAS_WS_COMMANDS_DISABLED` and `CANVAS_WS_PROGRAM_NOT_ALLOWED`. Your next\nturn is told a command ran (once a minute per command), not what it did.\n\nPaste this helper:\n\n```js\nfunction CanvasWorkspace() {\n  const waiting = new Map(); let n = 0; const listeners = [];\n  const ask = (msg, tries = 20) => new Promise((res, rej) => {\n    const id = ++n; waiting.set(id, { res, rej, msg, tries });\n    parent.postMessage({ type: \"canvas-ws\", id, ...msg }, \"*\");\n  });\n  window.addEventListener(\"message\", (e) => {\n    const m = e.data || {};\n    if (m.type === \"canvas-ws-change\") { listeners.forEach((f) => f(m)); return; }\n    if (m.type !== \"canvas-ws-result\") return;\n    const w = waiting.get(m.id); if (!w) return; waiting.delete(m.id);\n    if (!m.ok && m.code === \"NOT_READY\" && w.tries > 0) { setTimeout(() => ask(w.msg, w.tries - 1).then(w.res, w.rej), 250); return; }\n    m.ok ? w.res(m.result) : w.rej(Object.assign(new Error(m.error || \"failed\"), { code: m.code }));\n  });\n  const b64 = { enc: (s) => { const u = new TextEncoder().encode(s); let b = \"\"; for (let i = 0; i \u003C u.length; i += 0x8000) b += String.fromCharCode.apply(null, u.subarray(i, i + 0x8000)); return btoa(b); },\n                dec: (s) => new TextDecoder().decode(Uint8Array.from(atob(s), (c) => c.charCodeAt(0))) };\n  return {\n    info: () => ask({ op: \"info\" }),                            \u002F\u002F → { folders, read, write, commands, commandsEnabled, maxBytes }\n    list: (path) => ask({ op: \"list\", path }),                  \u002F\u002F → { entries: [{ name, path, kind, size, mtimeMs, readOnly? }] }\n    readText: (path) => ask({ op: \"read\", path }).then((r) => ({ ...r, text: b64.dec(r.contentBase64) })),   \u002F\u002F + etag\n    writeText: (path, text, ifMatch) => ask({ op: \"write\", path, contentBase64: b64.enc(text), ifMatch }),   \u002F\u002F ifMatch: etag, or null = create only\n    mkdir: (path) => ask({ op: \"mkdir\", path }),\n    move: (path, toPath) => ask({ op: \"move\", path, toPath }),\n    remove: (path, recursive) => ask({ op: \"delete\", path, recursive }),\n    run: (command, params) => ask({ op: \"run\", command, params }),   \u002F\u002F → { exitCode, stdout, stderr, truncated }\n    download: (path) => ask({ op: \"download\", path }),          \u002F\u002F from a click handler only: saves the file (a folder as .zip)\n    watch: (f) => { listeners.push(f); return ask({ op: \"watch\" }); },   \u002F\u002F f({ reason: \"agent\" | \"owner\" | \"canvas\" })\n  };\n}\n```\n\nA write with a stale `ifMatch` fails `WORKSPACE_FILES_CONFLICT`: read again,\nshow both, let the person choose. A create-only write (`ifMatch: null`) on\na file that exists fails `WORKSPACE_FILES_EXISTS`. Other codes:\n\n| Code | Means |\n|---|---|\n| `CANVAS_WS_DENIED` | outside your block; or `watch` not declared; or the repo's git settings start programs |\n| `CANVAS_WS_UNDECLARED` | no block, or a broken one (the message says what is wrong) |\n| `CANVAS_WS_TIMEOUT`, `CANVAS_WS_BUSY`, `CANVAS_WS_RUN_FAILED` | a command ran too long, too many ran at once (try again), or it did not start |\n| `WORKSPACE_FILES_NOT_FOUND`, `_READ_ONLY`, `_TOO_LARGE`, `_OUTSIDE` | no such path; `.git` and read-only files; over the size limit; a link or a path out of the folder (canvas apps never follow links) |\n| `WORKSPACE_FILES_BUSY` | too many file calls at once in the portal: try again in a moment |\n| `NOT_READY`, `NOT_ALLOWED`, `BUSY`, `UNAVAILABLE` | from the portal: the page is still loading (the helper retries), a download without a click, a download already running, no workspace support |\n\nThe change notice carries no paths: read again what you show. Your next\nturn is told which files the page changed.\n\nA link in a canvas opens in a new tab, never in the canvas frame. A page\nthat sends itself elsewhere (`location.href = ...`) loses the session: the\npage it loads gets no answers, and the portal offers to show the canvas\nagain.\n\n## Where html-visuals differs\n\n`html-visuals` was written for single-writer canvases. For a KV app, two of\nits rules invert: state lives in the KV, not batched into one submit action\n(the \"Forms: batch the input\" pattern is for canvases WITHOUT a store), and\nany viewer with session write may post actions, not only the creator.\n\n## Fit the pane\n\nDesign the shell to the viewport (`html, body { height: 100% }`, grid rows\n`auto 1fr auto`, only the middle scrolls with `min-height: 0`), never\n`overflow: hidden` on `body`, `100dvh` not `100vh`, inputs at 16 px, sticky\nheaders on long lists. A resize reflows and never reloads. Test at ~380,\n~700 and full width.\n","# Canvas Apps\n\nA canvas visual is disposable presentation. A canvas app holds state, lets\nseveral people use it at once, and asks the session to do things. For page\nlayout, chart form, color and the sandbox rules, load `html-visuals` first.\n\n## The three lanes\n\n| Lane | Who writes | Reaches | Wakes you | Durable | Costs you |\n|---|---|---|---|---|---|\n| **KV** (`canvas_kv`) | any permitted viewer, and you | every viewer, ~50 ms | no | yes | tens of tokens per key |\n| **Action** (`canvas-action`) | a viewer with session write | you | yes — one turn | as a message | a whole turn |\n| **Tick** (`update_canvas`) | you only | every viewer, ~50 ms | no | no | patch: tens · data: thousands |\n\n**The KV is for state, the action is for attention.** Never put a payload\nin an action when you can put an id there and the payload in the KV.\nOutbound costs output tokens, inbound costs a turn — the turn is the unit.\n\nCheapest first: `canvas_kv(put)` one key · `update_canvas(patch)` a subtree ·\n`draw_canvas(fromArtifact)` a filename · `update_canvas(data)` whole state ·\n`draw_canvas(html)` the whole document.\n\n## The KV store\n\nOne row per key, per session, per slot. The page supplies only the key; the\nserver stamps the writer (`by`) and the time (`at`). Keys: letters, digits,\n`. _ \u002F -`, ≤200 chars. Values ≤16 KB; 1000 keys and 2 MB per canvas.\n\nReserved prefixes:\n\n```\napp\u002F…            the app's shared state — notes, votes, the board\nreq\u002F\u003CreqId>      a request from the page to you (below)\nevt\u002F\u003Cn>          a note from you to the page (you write, viewers read)\nui\u002F\u003CwriterId>    one viewer's ephemeral state (presence, drafts) — only theirs\ncfg\u002F…            you and the owner write, everyone reads\n```\n\n**Never keep a list in one key.** One key per item (`app\u002Fnote\u002F\u003Cuuid>`), one\nkey per person (`app\u002Fvote\u002F\u003Cme.id>`), a claim is `put` with `ifMatch: 0`,\nordering is a field inside the item. Counters: per-person keys, count them.\nFree text several people edit: split into per-section keys and show `by`.\nFrame-rate state (a game board, live spectating) does not belong here.\n\nYour tool: `canvas_kv({op: get|put|list|delete, key, value, prefix, limit,\nafter, ifMatch, slot, session_id})`. `ifMatch: 0` = create only; `ifMatch: N`\n= the current rev must be N. `list` pages by `after` (the last key of the\nprevious page). `slot` picks the canvas (1-5, default 1); `session_id`\ntargets an ANCESTOR session's canvas, as the other canvas tools do.\n\n### Who may write\n\nTwo switches, both needed. The **owner's policy** on the canvas\n(`owner` default | `readers` = anyone the session is read-shared with |\n`link`), set in the share dialog. And **your app's declaration** in the\nmanifest: `\"kv\": { \"write\": \"viewers\" }`. Without both, only the owner, the\nsession's writers, and you write. Rows are author-bound: a collaborator\nedits only rows they wrote unless you share the prefix\n(`\"kv\": { \"write\": \"viewers\", \"shared\": [\"app\u002Ftask\u002F*\"] }`).\n\nEveryone reads. Every write is attributed: `by.kind` is `user` (signed in),\n`link` (bearer — label unverified) or `agent`.\n\n## The page side — paste this helper\n\nNothing is injected into the document. Paste `CanvasKV()` into your page:\n\n```js\nfunction CanvasKV() {\n  const waiting = new Map(); let n = 0; const listeners = [];\n  const ask = (msg, retryMs) => new Promise((res, rej) => {\n    const id = ++n; waiting.set(id, { res, rej });\n    const send = () => parent.postMessage({ type: \"canvas-kv\", id, ...msg }, \"*\");\n    send();\n    \u002F\u002F The host may not be listening yet on a cold open: re-post until answered.\n    if (retryMs) { const t = setInterval(() => waiting.has(id) ? send() : clearInterval(t), retryMs); }\n  });\n  window.addEventListener(\"message\", (e) => {\n    const m = e.data || {};\n    if (m.type === \"canvas-kv-change\") { listeners.forEach((f) => f(m)); return; }\n    if (m.type !== \"canvas-kv-result\" && m.type !== \"canvas-kv-ready\") return;\n    const w = waiting.get(m.id); if (!w) return; waiting.delete(m.id);\n    m.ok ? w.res(m) : w.rej(Object.assign(new Error(m.error || \"failed\"), { code: m.code, rev: m.rev }));\n  });\n  const listAll = async (prefix) => {          \u002F\u002F every key under a prefix, across pages\n    let after = null, out = [];\n    do { const r = await ask({ op: \"list\", prefix, after }); out = out.concat(r.entries); after = r.nextAfter; } while (after);\n    return out;\n  };\n  return {\n    ready: ask({ op: \"ready\" }, 500),                          \u002F\u002F → { me, canWrite, policy, entries (first 200) }\n    listAll,                                                   \u002F\u002F → [{ key, v, by, at, rev }]\n    get: (key) => ask({ op: \"get\", key }).then((r) => r.entry),\n    put: (key, value, ifMatch) => ask({ op: \"put\", key, value, ifMatch }),   \u002F\u002F → { rev } | rejects { code, rev }\n    del: (key, ifMatch) => ask({ op: \"delete\", key, ifMatch }),\n    onChange: (f) => listeners.push(f),                        \u002F\u002F { key, rev, op, v?, by, at }\n  };\n}\n```\n\n```js\nconst kv = CanvasKV();\nconst { canWrite, me } = await kv.ready;\nrenderAll(await kv.listAll(\"app\u002F\"));                 \u002F\u002F list the app prefix — ready carries only the first 200 keys\nkv.onChange(async (c) => applyOne(c.v === undefined && c.op !== \"delete\" ? { ...c, v: (await kv.get(c.key))?.v } : c));\nif (!canWrite) lockTheUI(\"You can view this board but not edit it.\");\nsetInterval(() => document.visibilityState === \"visible\" && kv.listAll(\"app\u002F\").then(renderAll), 15000); \u002F\u002F resync if the live feed drops\n```\n\n`me` is `{ id, kind, label, relation, canWrite }`; `relation` is `owner |\nadmin | collaborator | viewer | link`. **`me.id` is `provider\u002Fsubject`** —\nit contains a slash, so a per-person key `app\u002Fvote\u002F\u003Cme.id>` spans two\nsegments (fine; list by prefix `app\u002Fvote\u002F`). `label` is the person's\ndisplay name (their email or subject when no name is known).\n\nEntries are `{ key, v, by, at, rev }` — `v` is what a page stored; `by` and\n`at` let you attribute and order. A `canvas-kv-change` may arrive **without\n`v`** (the value was too big to ride the ping): fetch the key, as above.\n`op: \"delete\"` drops the key. Rejections carry `code` — `FORBIDDEN`,\n`CONFLICT` (with the current `rev`, so a claim can show who won),\n`INVALID_KEY`, `TOO_LARGE`, `QUOTA`, `NOT_READY` (retry). Render from the KV,\nnot from state baked into the document; preserve in-flight drafts across\nre-renders.\n\nNew keys are open to every admitted writer; only overwrites are\nauthor-bound. \"Only the owner may add\" is a UI rule, not a server rule.\n\n## Requests: the KV carries the payload, the action rings the doorbell\n\n```\npage   put req\u002F\u003Cid> { op, args, status: \"queued\" }        every viewer sees it\npage   canvas-action { action: \"request\", data: { id } }  turn starts (if the viewer may ring)\nyou    canvas_kv get req\u002F\u003Cid> → put { status: \"working\" } → put { status: \"done\", result }\npage   renders the answer. No redraw.\n```\n\nContract: `\"responseContract\": { \"actions\": { \"request\": { \"id\": \"string\" } } }`.\nRows carry `{ op, args, status, result?, error? }` with `status` in\n`suggested | queued | working | done | failed`.\n\n**Only the owner and you decide what you act on. Everyone else suggests.**\nA collaborator's `req\u002F*` row is capped to `status: \"suggested\"` by the\nserver; the owner promotes it by writing `status: \"queued\"`. Your drain, on\nEVERY wake (a cron tick, a child completion, any turn):\n\n```\ncanvas_kv list req\u002F  →  take every row with status \"queued\"  (never \"suggested\")\ndo the work, land each row in \"done\" or \"failed\"  — never leave one \"working\"\n```\n\nThe doorbell only shortens the wait; the status is the boundary. An app\nwhose requests progress only while the owner has a tab open is broken for\nautonomous use: render `queued` honestly (\"picked up on the next run\"), and\n`suggested` as \"waiting for the owner\", never a spinner.\n\nRecovery after a memory gap: `canvas_kv list req\u002F` (unfinished work),\n`canvas_kv list app\u002F` (current state), `read_canvas(manifestOnly)` (the\narmed contract). This is why app state lives in the KV, not in chat.\n\n**Promotion is a decision, never a reflex.** Only the owner's ask or your own\ntask moves KV content into an artifact, a shared fact, or an external write\n(ADO, a PR comment, email). Carry `by` across. Never promote link-written\ncontent into a shared fact without the owner saying so.\n\n## Actions (the doorbell)\n\n```js\nparent.postMessage({ type: \"canvas-action\", action: \"request\", data: { id } }, \"*\");\n```\n\nThe browser validates against your contract (no contract → nothing is\naccepted) and delivers conforming posts as `[canvas-action] {...}` user\nmessages hidden from the chat pane. Answer on the canvas (a KV put or a\npatch), not with a redraw that wipes drafts. Actions are accepted only from\na viewer with session write; everyone else's request lands `suggested`.\nNever BLOCK on a canvas control — the chat box is the fallback, and real\napproval gates stay on `ask_user`. Batch a whole form into ONE action with a\n`json` field.\n\n## The manifest: the app's interface, for the agent who did not write it\n\nA canvas worth drawing twice is an app, and an app is driven by agents who\nnever read its HTML — you after a context regeneration, and every other\nsession that finds it in the catalog. The manifest comment right after\n`\u003C!doctype html>` is the whole interface. Write it as if for a stranger:\n\n```html\n\u003C!-- CANVAS-APP-MANIFEST\n{ \"manifestVersion\": 1, \"name\": \"release-signoff\", \"version\": \"1.2.0\",\n  \"description\": \"Use when several approvers sign off a release train together.\",\n  \"tags\": [\"release\", \"approval\", \"collaborative\"],\n  \"kv\": { \"write\": \"viewers\", \"shared\": [\"app\u002Fitem\u002F*\"] },\n  \"responseContract\": { \"actions\": { \"request\": { \"id\": \"string\" } } },\n  \"interface\": {\n    \"keys\": [\n      { \"key\": \"app\u002Fitem\u002F\u003Cid>\", \"writer\": \"both\",\n        \"shape\": { \"title\": \"Fix login redirect\", \"owner\": \"sam\", \"decision\": \"approve|reject|null\", \"note\": \"\" },\n        \"note\": \"One row per checklist item. The AGENT seeds them; approvers set decision and note.\" },\n      { \"key\": \"cfg\u002Fdeadline\", \"writer\": \"agent\", \"shape\": \"2026-09-01T17:00:00Z\" },\n      { \"key\": \"ui\u002F\u003CwriterId>\", \"writer\": \"page\", \"shape\": { \"at\": \"iso\" }, \"note\": \"Presence heartbeat.\" }\n    ],\n    \"requests\": [\n      { \"op\": \"seed\", \"args\": { \"items\": [{ \"id\": \"5502432\", \"title\": \"…\", \"owner\": \"…\" }] },\n        \"result\": { \"seeded\": 12 }, \"note\": \"Owner asks the agent to (re)load the checklist from the train.\" },\n      { \"op\": \"store\", \"args\": {}, \"result\": { \"artifact\": \"signoff-\u003Ctrain>.md\" },\n        \"note\": \"Owner presses Store: the agent writes the decisions as a report artifact.\" }\n    ],\n    \"events\": [ { \"key\": \"evt\u002Fbanner\", \"shape\": { \"text\": \"Freeze at 17:00 UTC\" }, \"note\": \"Rendered at the top.\" } ],\n    \"notes\": \"Render everything from app\u002Fitem\u002F*. A row with decision null is pending. Count approvals by listing.\" } }\n-->\n```\n\n`interface.keys` says which KV keys exist, who writes them and what a value\nlooks like. `interface.requests` says which `req\u002F*` ops the page queues, with\ntheir args and what `result` the page renders when you land them.\n`interface.events` says which `evt\u002F*` notes the page shows. Caps: 32 entries\nper list, 512 bytes per shape, 6 KB for the block. `description` is the text\nthe catalog ranks on: say WHEN to use the app, not how it works.\n\nRe-learn any app with `read_canvas({manifestOnly: true})` — never by\nre-reading the bytes. `draw_canvas({fromArtifact})` hands you the same card.\n\n## Publish and find\n\n```\npublish_canvas_app({ name: \"release-signoff\", description: \"Use when …\", tags: [...] })\n   → the canvas bytes → pinned artifact app-\u003Cname>.html on this session\n   → the card (manifest + armed contract + source) → SHARED fact apps\u002F\u003Cname>\n   → every session can find it\n\nfind_canvas_app({ query: \"sign off a release\" })\n   → ranked cards { key, name, description, tags, kv, source }\nread_facts({ key_pattern: \"apps\u002F\u003Cname>\", scope: \"shared\" })   → the full card, incl. interface\ndraw_canvas({ fromArtifact: card.source })                     → on screen, card returned again\n```\n\n**Look before building.** When the user asks for an app — a board, a poll, a\nsign-off sheet, a review workbench — search first and offer what exists.\nWhen the user is doing something an app fits (reading a diff, running a\nmeeting, watching a deploy), search and suggest rather than waiting to be\nasked. Publish when the user says to share it.\n\n**Driving an app you found:** draw it, `canvas_kv(list, \"app\u002F\")` to see its\nstate, seed the keys its `interface.keys` name (the shapes are examples to\ncopy), drain `req\u002F*` on every wake and land each with the `result` shape the\ncard gives. You never need the HTML.\n\n**Publish the shell, never the data.** Publishing makes the document readable\nby every session. A reusable app reads its rows from the KV; a page with a\ncustomer list baked into a JS literal is not reusable and must not be\npublished. Republishing the same name replaces the card and the artifact.\n\n## The session's folders (canvas-ws)\n\nA canvas app can read and change the session's files, and run commands you\ndeclare, with no turn of yours: a git history viewer, a notes editor, a\ntest-log browser. It is for the session's **owner** only; for anyone else\nevery call fails.\n\nDeclare the access in the manifest. The server checks every call against\nthis block, read from the document you drew; the page cannot widen it.\n\n```\n\"workspace\": {\n  \"read\":  [\"work\u002F**\"],                       list and read\n  \"write\": [\"home\u002Fnotes\u002F*.md\"],               also write, move, delete\n  \"watch\": true,                              the page hears when files change\n  \"commands\": {\n    \"history\": { \"in\": \"work\",\n      \"run\": [\"git\", \"log\", \"--format=%H%x09%an%x09%ar%x09%s\", \"-n\", \"{limit}\", \"--\", \"{path}\"],\n      \"params\": { \"path\": { \"type\": \"path\" }, \"limit\": { \"type\": \"int\", \"min\": 1, \"max\": 200, \"default\": 50 } } },\n    \"show\": { \"in\": \"work\", \"run\": [\"git\", \"show\", \"--stat\", \"--patch\", \"{sha}\"],\n      \"params\": { \"sha\": { \"type\": \"sha\" } } }\n  }\n}\n```\n\nPaths are `\u003Cfolder>\u002F\u003Cpath>`: `work` is the working folder, an extra folder\nkeeps its name (`home`, `shared`). In a session with no repo, the person's\nown folder IS the working folder, so it is `work`, not `home`. Call `info()`\nto see the names. `**` crosses folders, `*` does not.\nDeclare the least you need. `.git` is read-only whatever you declare.\nA command's `in` is a session folder or a folder inside one (`work\u002Ftfenv`\nfor a repo cloned into the working folder); its `path` values must be\ninside it and are passed relative to it.\n\nCommands: `run[0]` is a program name (no path). A `{param}` must be a whole\nargument, never part of one. Types: `path` (inside the command's folder, a\nfile the app may read, or a folder it may read all of), `int` (`min`\ndefaults to 0), `enum` (`values`), `ref` (a branch or tag), `sha` (hex),\n`text` (one line, not starting with `-`). There is no shell.\n`timeoutSeconds` ≤ 60, output ≤ 1 MB. For git: `run[1]` is the subcommand\n(log, show, diff, status, blame, ls-files, add, commit, restore, reset,\nstash, switch, checkout, mv, rm, …), with no options before it; choose the\nrepository with `in` (`work\u002Ftfenv`), never `-C`. Options that start\nprograms or reach outside (`--output`, `--no-index`, `--exec`, …) and\nabsolute or `..` paths are refused when you draw. Git runs with no network,\nno hooks, and not in a repository whose own settings start programs.\nThe deployment decides whether commands run at all and which programs may\nrun (git by default). A page cannot know which: handle\n`CANVAS_WS_COMMANDS_DISABLED` and `CANVAS_WS_PROGRAM_NOT_ALLOWED`. Your next\nturn is told a command ran (once a minute per command), not what it did.\n\nPaste this helper:\n\n```js\nfunction CanvasWorkspace() {\n  const waiting = new Map(); let n = 0; const listeners = [];\n  const ask = (msg, tries = 20) => new Promise((res, rej) => {\n    const id = ++n; waiting.set(id, { res, rej, msg, tries });\n    parent.postMessage({ type: \"canvas-ws\", id, ...msg }, \"*\");\n  });\n  window.addEventListener(\"message\", (e) => {\n    const m = e.data || {};\n    if (m.type === \"canvas-ws-change\") { listeners.forEach((f) => f(m)); return; }\n    if (m.type !== \"canvas-ws-result\") return;\n    const w = waiting.get(m.id); if (!w) return; waiting.delete(m.id);\n    if (!m.ok && m.code === \"NOT_READY\" && w.tries > 0) { setTimeout(() => ask(w.msg, w.tries - 1).then(w.res, w.rej), 250); return; }\n    m.ok ? w.res(m.result) : w.rej(Object.assign(new Error(m.error || \"failed\"), { code: m.code }));\n  });\n  const b64 = { enc: (s) => { const u = new TextEncoder().encode(s); let b = \"\"; for (let i = 0; i \u003C u.length; i += 0x8000) b += String.fromCharCode.apply(null, u.subarray(i, i + 0x8000)); return btoa(b); },\n                dec: (s) => new TextDecoder().decode(Uint8Array.from(atob(s), (c) => c.charCodeAt(0))) };\n  return {\n    info: () => ask({ op: \"info\" }),                            \u002F\u002F → { folders, read, write, commands, commandsEnabled, maxBytes }\n    list: (path) => ask({ op: \"list\", path }),                  \u002F\u002F → { entries: [{ name, path, kind, size, mtimeMs, readOnly? }] }\n    readText: (path) => ask({ op: \"read\", path }).then((r) => ({ ...r, text: b64.dec(r.contentBase64) })),   \u002F\u002F + etag\n    writeText: (path, text, ifMatch) => ask({ op: \"write\", path, contentBase64: b64.enc(text), ifMatch }),   \u002F\u002F ifMatch: etag, or null = create only\n    mkdir: (path) => ask({ op: \"mkdir\", path }),\n    move: (path, toPath) => ask({ op: \"move\", path, toPath }),\n    remove: (path, recursive) => ask({ op: \"delete\", path, recursive }),\n    run: (command, params) => ask({ op: \"run\", command, params }),   \u002F\u002F → { exitCode, stdout, stderr, truncated }\n    download: (path) => ask({ op: \"download\", path }),          \u002F\u002F from a click handler only: saves the file (a folder as .zip)\n    watch: (f) => { listeners.push(f); return ask({ op: \"watch\" }); },   \u002F\u002F f({ reason: \"agent\" | \"owner\" | \"canvas\" })\n  };\n}\n```\n\nA write with a stale `ifMatch` fails `WORKSPACE_FILES_CONFLICT`: read again,\nshow both, let the person choose. A create-only write (`ifMatch: null`) on\na file that exists fails `WORKSPACE_FILES_EXISTS`. Other codes:\n\n| Code | Means |\n|---|---|\n| `CANVAS_WS_DENIED` | outside your block; or `watch` not declared; or the repo's git settings start programs |\n| `CANVAS_WS_UNDECLARED` | no block, or a broken one (the message says what is wrong) |\n| `CANVAS_WS_TIMEOUT`, `CANVAS_WS_BUSY`, `CANVAS_WS_RUN_FAILED` | a command ran too long, too many ran at once (try again), or it did not start |\n| `WORKSPACE_FILES_NOT_FOUND`, `_READ_ONLY`, `_TOO_LARGE`, `_OUTSIDE` | no such path; `.git` and read-only files; over the size limit; a link or a path out of the folder (canvas apps never follow links) |\n| `WORKSPACE_FILES_BUSY` | too many file calls at once in the portal: try again in a moment |\n| `NOT_READY`, `NOT_ALLOWED`, `BUSY`, `UNAVAILABLE` | from the portal: the page is still loading (the helper retries), a download without a click, a download already running, no workspace support |\n\nThe change notice carries no paths: read again what you show. Your next\nturn is told which files the page changed.\n\nA link in a canvas opens in a new tab, never in the canvas frame. A page\nthat sends itself elsewhere (`location.href = ...`) loses the session: the\npage it loads gets no answers, and the portal offers to show the canvas\nagain.\n\n## Where html-visuals differs\n\n`html-visuals` was written for single-writer canvases. For a KV app, two of\nits rules invert: state lives in the KV, not batched into one submit action\n(the \"Forms: batch the input\" pattern is for canvases WITHOUT a store), and\nany viewer with session write may post actions, not only the creator.\n\n## Fit the pane\n\nDesign the shell to the viewport (`html, body { height: 100% }`, grid rows\n`auto 1fr auto`, only the middle scrolls with `min-height: 0`), never\n`overflow: hidden` on `body`, `100dvh` not `100vh`, inputs at 16 px, sticky\nheaders on long lists. A resize reflows and never reloads. Test at ~380,\n~700 and full width.\n",{"name":5,"description":7},"main","cecafe1ca7a9f2778a6166abdd12f6165d99f777","packages\u002Fsdk\u002Fplugins\u002Fsystem\u002Fskills\u002Fcanvas-apps",10,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-15 00:36:04",{"source":9,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add microsoft\u002FPilotSwarm --skill canvas-apps",{"tool":66,"command":67},"bunx","bunx skills add microsoft\u002FPilotSwarm --skill canvas-apps",{"tool":69,"command":70},"pnpm","pnpm dlx skills add microsoft\u002FPilotSwarm --skill canvas-apps","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fsystem\u002Fskills\u002Fcanvas-apps\u002FSKILL.md",true,[],[75,83,90,97,104,111],{"skillNo":76,"name":77,"nameZh":17,"description":78,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":82},"01M760N7TCZBTY635MYZQ8YAB0","workflow-testing","Load before you test a Workflow with mocked effects — the test, test_respond and test_advance operations, fixtures, interception ids, valid answers, the virtual clock, test evidence and what a test run does not prove.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Ftest-mode-skills\u002Fworkflow-testing\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":84,"name":85,"nameZh":17,"description":86,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":82},"01M760N4RKD6BMYPGHD490SNN2","workflow-tools","Every argument of the Workflow tools, testing a revision, package definitions and the refusals you can fix. Load when a Workflow tool's short description is not enough.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-tools\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":17,"description":93,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":82},"01M760N1P2VTGVE6C4N5WF3FVR","workflow-reference","Field reference for Workflow YAML (root keys, every state type, bindings, outputs, runtime error codes), what the engine guarantees, and a review fan-out example. For design, call load_skill with name workflow-authoring.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-reference\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":17,"description":100,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":82},"01M760MZ5CFSAX4FYMEXZJBGM2","workflow-patterns","Load when one Workflow must run different nodes in its branches at the same time (a different prompt or model for each branch), or loops back to a state (a polling loop). Named branches, the router pattern, examples that compile.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-patterns\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":17,"description":107,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":82},"01M760MWKBDJFEECRFAF3BAVQ2","workflow-authoring","Load before you create, edit, publish or run a Workflow (pilotswarm.dev\u002Fv1) — choosing states, bounded graphs, bindings, typed contracts, agent and parallel states, the lifecycle and failure diagnosis.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002Fpackages\u002Fsdk\u002Fplugins\u002Fworkflow\u002Fskills\u002Fworkflow-authoring\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":17,"description":114,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":82},"01M760MN4Y9199ARAY85DWD08X","tla-formal-validation","Required for any change to the core orchestrations (the durable session orchestration, session hydration and dehydration, and the Workflow controller and store). Teaches how to model the change in TLA+, update the existing models, run TLC with the repo runner, read the results, turn a counterexample into a fix and a regression test, and record the binding to the code.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPilotSwarm\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftla-formal-validation\u002FSKILL.md",[],[]]