[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A0ADFAK6MJHGPD2JHGAXRH":3,"skill-same:01M7A0ADFAK6MJHGPD2JHGAXRH":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7A0ADFAK6MJHGPD2JHGAXRH","agent-rpc",null,"Sideboard agent control plane. Agents talk JSON-RPC over a loopback WebSocket owned by the desktop (or the drain-owner process). Do not add new Sideboard capabilities as MCP-only tools. Use when adding a host method, a harness hook, or migrating a tool off stdio MCP.","mattlevine\u002Fsideboard","mattlevine","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F836225?v=4","01M7A0A4TN8FJQD7Q6MB7K1HK1","Matt Levine","01M7A0A4V7C06D7JKTFA89TEM7",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fagent-rpc\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: agent-rpc\ndescription: >-\n  Sideboard agent control plane. Agents talk JSON-RPC over a loopback\n  WebSocket owned by the desktop (or the drain-owner process). Do not add\n  new Sideboard capabilities as MCP-only tools. Use when adding a host\n  method, a harness hook, or migrating a tool off stdio MCP.\n---\n\n# Agent RPC\n\nMCP stdio is the **legacy** agent transport (Codex until a hook lands;\nClaude\u002FOpenCode orchestration until those hooks land). The authority for\nagent host calls is JSON-RPC on a loopback WebSocket started by the desktop.\n\nThis is **not** an MCP shim. Do not spawn `sideboard mcp` to implement a\nnew agent method. Do not add a stdio JSON-RPC that speaks MCP on one side\nand this protocol on the other.\n\n## Judge\n\nA change is done when:\n\n1. `pnpm --filter @sideboard-ai\u002Fcore test` covers the new method (auth,\n   dispatch, and the harness hook if you added one).\n2. The method lives in `packages\u002Fcore\u002Fsrc\u002Fagent-rpc\u002F` and is registered on\n   the dispatcher — not only in `packages\u002Fcore\u002Fsrc\u002Fmcp\u002Fserver.ts`.\n3. The harness that should use it does **not** expose the same name on\n   injected Sideboard MCP (no duplicate tools).\n\nBreak the judge once: a test with a bad `authToken` must fail closed.\n\n## Protocol\n\n- JSON-RPC 2.0 text frames over WebSocket (`ws:\u002F\u002F127.0.0.1:\u003Cport>\u002Fagent-rpc`).\n- Bind loopback only. The upgrade URL must carry `authToken` as a query\n  param (timing-safe compare against `agent-runtime.json`, mode `0600`);\n  every request also carries `authToken`. Missing or wrong token → 401 \u002F\n  `Unauthorized`.\n- Long waits **hold the call** and send `runtime.progress` notifications.\n  The hold cap (`AGENT_RPC_JOB_HOLD_MAX_MS`) must stay under the harness's\n  own idle guard (Cursor: `CURSOR_STREAM_IDLE_MS`), and the hook must feed\n  progress back into that guard. MCP `wait_*` keeps the 45s cap until that\n  harness migrates.\n- Methods that touch the worktree (`job.*`) require an absolute `cwd` param.\n  The desktop's cwd is not the agent's.\n- Desktop (drain owner) writes `{appDataDir}\u002Fagent-runtime.json`. Hooks\n  attach only when that file names a **live** pid; otherwise the harness\n  keeps injected MCP. There is no in-process fallback inside a hook.\n\n## Harness hooks (not MCP)\n\nThe model still sees **named tools**. Those tools are native to the harness\nand `execute` is a WebSocket client.\n\n| Harness | Hook | Status |\n|---------|------|--------|\n| Cursor worktree | `@cursor\u002Fsdk` `customTools` | Pilot: `present_artifact`, `wait_for_job`, `stop_job` |\n| Cursor orchestration | same | Pilot set plus `wait_for_turn` (`turn.wait`) |\n| Claude | Agent SDK `createSdkMcpServer` (`claude-runner.ts`) | Worktree pilot: same three (`mcp__sideboard_rpc__*`). Orchestration still MCP. |\n| OpenCode | `OPENCODE_CONFIG_DIR` plugin (`tool()` execute → WebSocket) | Worktree pilot: same three. Orchestration still MCP. |\n| Codex | — | Still MCP. Codex plugins only bundle MCP\u002Fapps, not in-process execute. Do not rip MCP. |\n\nDo not teach the model to `curl` the socket or Bash-out to a CLI as the\nprimary path. That is not a hook.\n\nNode runners (`cursor-runner`, `claude-runner`) live at\n`packages\u002Fcore\u002Fdist\u002Fagents\u002F\u003Cname>.js`. Resolve them like Cursor\n(`__dirname` of the core CJS bundle, then `agents\u002F\u003Cname>.js`). Never\n`process.cwd()` — Electron's cwd is `apps\u002Fdesktop`.\n\n## Fan-out\n\nMigrating the remaining MCP tools is the same shape every time:\n\n1. Add handler + schema on the dispatcher.\n2. Expose it on every hooked harness (Cursor `customTools`, Claude SDK\n   server, OpenCode plugin). Codex stays on injected MCP until it has an\n   in-process execute hook.\n3. Omit that name from injected Sideboard MCP for that harness\n   (`SIDEBOARD_AGENT_RPC_NATIVE=1` skips the pilot set and `wait_for_turn`\n   on orchestration MCP; extend the omit list as names move).\n4. Throw away any MCP-only duplicate. Two names for one method is a failed\n   migration.\n\nPilot methods (`ui.presentArtifact`, `job.wait`, `job.stop`, `turn.wait`)\nbefore porting the rest. Next batch: `ask_user`, `present_*`, run-scripts,\n`notify_orchestrator`, then Account issue tools, then the remaining\norchestration fleet (`send_to_chat`, `create_workspace`, …).\n\n## Do not\n\n- Rip MCP from Codex (or Claude\u002FOpenCode orchestration) until that harness\n  has an in-process execute hook. Shipping a socket nobody calls is fine;\n  stripping tools with no replacement is not. Cursor worktree and Cursor\n  orchestration already hook the RPC-covered set.\n- Add a stdio MCP whose only job is to speak this WebSocket (a shim). Claude\n  Agent SDK in-process `createSdkMcpServer` is the documented custom-tool\n  hook, not a stdio shim.\n- Use vendor MCP (Linear, GitHub, PostHog) as the Sideboard control plane.\n- Bind `0.0.0.0` or skip `authToken`.\n- Document this as “Sideboard is an MCP server” in new copy. User-facing\n  `sideboard mcp` stays for hosts that only speak MCP until they are gone.\n","# Agent RPC\n\nMCP stdio is the **legacy** agent transport (Codex until a hook lands;\nClaude\u002FOpenCode orchestration until those hooks land). The authority for\nagent host calls is JSON-RPC on a loopback WebSocket started by the desktop.\n\nThis is **not** an MCP shim. Do not spawn `sideboard mcp` to implement a\nnew agent method. Do not add a stdio JSON-RPC that speaks MCP on one side\nand this protocol on the other.\n\n## Judge\n\nA change is done when:\n\n1. `pnpm --filter @sideboard-ai\u002Fcore test` covers the new method (auth,\n   dispatch, and the harness hook if you added one).\n2. The method lives in `packages\u002Fcore\u002Fsrc\u002Fagent-rpc\u002F` and is registered on\n   the dispatcher — not only in `packages\u002Fcore\u002Fsrc\u002Fmcp\u002Fserver.ts`.\n3. The harness that should use it does **not** expose the same name on\n   injected Sideboard MCP (no duplicate tools).\n\nBreak the judge once: a test with a bad `authToken` must fail closed.\n\n## Protocol\n\n- JSON-RPC 2.0 text frames over WebSocket (`ws:\u002F\u002F127.0.0.1:\u003Cport>\u002Fagent-rpc`).\n- Bind loopback only. The upgrade URL must carry `authToken` as a query\n  param (timing-safe compare against `agent-runtime.json`, mode `0600`);\n  every request also carries `authToken`. Missing or wrong token → 401 \u002F\n  `Unauthorized`.\n- Long waits **hold the call** and send `runtime.progress` notifications.\n  The hold cap (`AGENT_RPC_JOB_HOLD_MAX_MS`) must stay under the harness's\n  own idle guard (Cursor: `CURSOR_STREAM_IDLE_MS`), and the hook must feed\n  progress back into that guard. MCP `wait_*` keeps the 45s cap until that\n  harness migrates.\n- Methods that touch the worktree (`job.*`) require an absolute `cwd` param.\n  The desktop's cwd is not the agent's.\n- Desktop (drain owner) writes `{appDataDir}\u002Fagent-runtime.json`. Hooks\n  attach only when that file names a **live** pid; otherwise the harness\n  keeps injected MCP. There is no in-process fallback inside a hook.\n\n## Harness hooks (not MCP)\n\nThe model still sees **named tools**. Those tools are native to the harness\nand `execute` is a WebSocket client.\n\n| Harness | Hook | Status |\n|---------|------|--------|\n| Cursor worktree | `@cursor\u002Fsdk` `customTools` | Pilot: `present_artifact`, `wait_for_job`, `stop_job` |\n| Cursor orchestration | same | Pilot set plus `wait_for_turn` (`turn.wait`) |\n| Claude | Agent SDK `createSdkMcpServer` (`claude-runner.ts`) | Worktree pilot: same three (`mcp__sideboard_rpc__*`). Orchestration still MCP. |\n| OpenCode | `OPENCODE_CONFIG_DIR` plugin (`tool()` execute → WebSocket) | Worktree pilot: same three. Orchestration still MCP. |\n| Codex | — | Still MCP. Codex plugins only bundle MCP\u002Fapps, not in-process execute. Do not rip MCP. |\n\nDo not teach the model to `curl` the socket or Bash-out to a CLI as the\nprimary path. That is not a hook.\n\nNode runners (`cursor-runner`, `claude-runner`) live at\n`packages\u002Fcore\u002Fdist\u002Fagents\u002F\u003Cname>.js`. Resolve them like Cursor\n(`__dirname` of the core CJS bundle, then `agents\u002F\u003Cname>.js`). Never\n`process.cwd()` — Electron's cwd is `apps\u002Fdesktop`.\n\n## Fan-out\n\nMigrating the remaining MCP tools is the same shape every time:\n\n1. Add handler + schema on the dispatcher.\n2. Expose it on every hooked harness (Cursor `customTools`, Claude SDK\n   server, OpenCode plugin). Codex stays on injected MCP until it has an\n   in-process execute hook.\n3. Omit that name from injected Sideboard MCP for that harness\n   (`SIDEBOARD_AGENT_RPC_NATIVE=1` skips the pilot set and `wait_for_turn`\n   on orchestration MCP; extend the omit list as names move).\n4. Throw away any MCP-only duplicate. Two names for one method is a failed\n   migration.\n\nPilot methods (`ui.presentArtifact`, `job.wait`, `job.stop`, `turn.wait`)\nbefore porting the rest. Next batch: `ask_user`, `present_*`, run-scripts,\n`notify_orchestrator`, then Account issue tools, then the remaining\norchestration fleet (`send_to_chat`, `create_workspace`, …).\n\n## Do not\n\n- Rip MCP from Codex (or Claude\u002FOpenCode orchestration) until that harness\n  has an in-process execute hook. Shipping a socket nobody calls is fine;\n  stripping tools with no replacement is not. Cursor worktree and Cursor\n  orchestration already hook the RPC-covered set.\n- Add a stdio MCP whose only job is to speak this WebSocket (a shim). Claude\n  Agent SDK in-process `createSdkMcpServer` is the documented custom-tool\n  hook, not a stdio shim.\n- Use vendor MCP (Linear, GitHub, PostHog) as the Sideboard control plane.\n- Bind `0.0.0.0` or skip `authToken`.\n- Document this as “Sideboard is an MCP server” in new copy. User-facing\n  `sideboard mcp` stays for hosts that only speak MCP until they are gone.\n",{"name":5,"description":7},"main","02fe9a8780abdb3554a042bd4e4d84b774167ee7",".claude\u002Fskills\u002Fagent-rpc",0,"https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard","https:\u002F\u002Fgithub.com\u002Fmattlevine","2026-11-15 03:17:37",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add mattlevine\u002Fsideboard --skill agent-rpc",{"tool":37,"command":38},"bunx","bunx skills add mattlevine\u002Fsideboard --skill agent-rpc",{"tool":40,"command":41},"pnpm","pnpm dlx skills add mattlevine\u002Fsideboard --skill agent-rpc","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fagent-rpc\u002FSKILL.md",true,[],[46,53,59,65,72,79],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E0618TWSY135JSVJYDSDB7","skill-improver","When a miss will recur — you made it twice, or a person told you the rule — write the lesson into the skill before the turn ends. One sentence, in the same change. Run in the turn, not on a schedule.","https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fskill-improver\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7A0C7G870SK6SZTGMATAF26","release","https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Frelease\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7A0C5ABGQBF6Q94FSXH6Y2M","long-running","https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Flong-running\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7A0C2YWWYF5PME33KYS13SP","worktree-install","Reinstall dependencies in a Sideboard worktree after merge-from-main or a lockfile change. Use when `pnpm install` hangs, several worktrees install at once, or a native build is outside the permitted directory.","https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworktree-install\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7A0BWTS631GV69KGJW80RDQ","review","Merge-readiness review for this repository. Use when reviewing a PR, worktree diff, or Sideboard Review (Approve \u002F Approve with nits \u002F Request changes).","https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":80,"name":55,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7A0BDG6EZP7GTVVT0Z8FFS0","Cut a Sideboard version. Default: bump, README\u002Fchangelog, commit, merge, then push\u002Fretarget the `v*` tag so `.github\u002Fworkflows\u002Frelease.yml` publishes npm (OIDC) and the signed Mac desktop. No workflow_dispatch. Do not pack Electron in a worktree turn. Use for electron release, desktop release, pnpm release, or “I’ll publish npms.”","https:\u002F\u002Fgithub.com\u002Fmattlevine\u002Fsideboard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frelease\u002FSKILL.md",[],[]]