[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X0BH6S6KG4X661THM9N9EH":3,"skill-same:01M6X0BH6S6KG4X661THM9N9EH":68},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6X0BH6S6KG4X661THM9N9EH","channels-migration",null,"Migrate code that talks to or implements the Agent Host Protocol from the pre-channels model to the current channel-based model. Use when asked to upgrade an AHP client\u002Fserver, when seeing references to `agenthost:\u002Froot`, `\u003Cprovider>:\u002F\u003Cuuid>` session URIs, a `notification` wrapper method, an `envelope` field inside `action` params, a `resource` field on subscribe\u002Funsubscribe\u002Fsnapshot results, or `session` \u002F `terminal` \u002F `changeset` fields on command params or action payloads.","microsoft\u002Fagent-host-protocol","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M6X0BCPTDPXJBHT607YWT2G4",453,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fblob\u002Fmain\u002Fplugins\u002Fchannels-migration-plugin\u002Fskills\u002Fchannels-migration\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"channels migration","channels","migration","use","when","notification","host","upgrade","references","provider","terminal","session","payloads","results","command","changeset","model","migrate","server","code","2026-11-10 10:12:30",false,"---\ndescription: >-\n  Migrate code that talks to or implements the Agent Host Protocol from the\n  pre-channels model to the current channel-based model. Use when asked to\n  upgrade an AHP client\u002Fserver, when seeing references to `agenthost:\u002Froot`,\n  `\u003Cprovider>:\u002F\u003Cuuid>` session URIs, a `notification` wrapper method, an\n  `envelope` field inside `action` params, a `resource` field on\n  subscribe\u002Funsubscribe\u002Fsnapshot results, or `session` \u002F `terminal` \u002F\n  `changeset` fields on command params or action payloads.\n---\n\n# AHP Channels Migration\n\nThis skill helps you migrate a codebase that consumes (or implements) the\nAgent Host Protocol from the **pre-channels model** to the **channel-based\nmodel** introduced by RFC #117. The migration was folded into the protocol\nas a single breaking step alongside the `0.2.0` version bump (which also\nintroduced changesets and the `session\u002FcustomizationUpdated` action). The\ncombined wire format on `0.2.0` is what this skill targets; there is no\ntransitional version.\n\nThe migration is mechanical in most places but touches several shapes at once,\nso do it in passes rather than file-by-file. The order below minimises the\nchance of leaving the codebase in a half-broken state.\n\n## How to use this skill\n\n1. Start with the **Mental model** section so you understand what \"channel\"\n   means and why fields moved.\n2. Work through the **Migration passes** in order. Each pass is independent\n   enough that you can land it as its own commit.\n3. Use the **Grep cheat sheet** at the bottom to find every site that needs\n   updating in your codebase.\n4. When in doubt about a specific type's new shape, look it up in the AHP\n   repo's `types\u002F*.ts` (`state.ts`, `actions.ts`, `commands.ts`,\n   `messages.ts`, `notifications.ts`) or in `docs\u002Fspecification\u002F`.\n\n## Mental model\n\nIn the pre-channels world, AHP had a privileged \"state subscription\"\nmechanism: clients subscribed to a URI, got a snapshot, and received action\nenvelopes for that URI's state. Notifications (session catalogue events,\nauth-required) were stuffed inside a single `notification` wrapper method.\nThe URI of a state-bearing resource was embedded directly into the action\npayload (`action.session`, `action.terminal`).\n\nIn the channel-based world, every push-style interaction lives on a\n**channel**, identified by a URI. Subscriptions, action delivery, and\nprotocol notifications all carry a top-level `channel: URI` field that\nidentifies which subscription a message belongs to. A channel MAY have\nassociated state (root, sessions, terminals), or it MAY be stateless (future\nuse: logging, MCP, LSP relay). The wire shape is uniform across types.\n\nConcretely:\n\n- **Root URI**: `agenthost:\u002Froot` → `ahp-root:\u002F\u002F`\n- **Session URI scheme**: provider-named (`copilot:\u002F\u003Cuuid>`) →\n  `ahp-session:\u002F\u003Cuuid>` in docs\u002Fexamples. The provider lives on\n  `SessionSummary.provider`, not in the URI. (Live session URIs are\n  announced by the server, so this is mainly a docs\u002Fexample change for\n  consumers — but type-level shape changes still apply.)\n- **Terminal URI scheme** (docs\u002Fexamples): `ahp-terminal:\u002F\u003Cid>`. Server-\n  defined; clients treat as opaque.\n- **Changeset URI scheme** (docs\u002Fexamples): `ahp-changeset:\u002F\u003Cid>`. Server-\n  defined; obtained by expanding a `Changeset.uriTemplate`.\n  Changesets are a new channel type introduced in the same step.\n- **`channel` everywhere**: `subscribe`\u002F`unsubscribe`\u002Faction-envelope\u002F\n  `dispatchAction`\u002Fevery protocol notification AND every command has\n  `channel: URI` at the top level of its params. Commands that are\n  connection-level rather than channel-scoped (e.g. `initialize`, `ping`,\n  `listSessions`, the `resource*` filesystem commands, `authenticate`)\n  set `channel` to the literal `'ahp-root:\u002F\u002F'`.\n- **Action payloads are channel-less**: `session: URI` and `terminal: URI`\n  fields are gone from individual actions. Routing is by envelope.\n- **Notifications are top-level methods**: the `notification` wrapper and\n  the `ProtocolNotification` union are gone.\n- **`SessionDiffsChangedAction` is gone**: replaced by\n  `SessionChangesetsChangedAction` (catalogue updates on a session) plus a\n  new family of per-changeset actions (`changeset\u002FstatusChanged`,\n  `changeset\u002FfileSet`, `changeset\u002FfileRemoved`,\n  `changeset\u002FoperationsChanged`, `changeset\u002Fcleared`) and the\n  `invokeChangesetOperation` command. See `docs\u002Fguide\u002Fchangesets.md`.\n\n## Migration passes\n\nApply these in order. After each pass, run your typecheck\u002Ftest loop.\n\n### Pass 1 — Rename the root URI\n\n```\nagenthost:\u002Froot  →  ahp-root:\u002F\u002F\n```\n\nThis is the one immediately-wire-breaking rename. Any client that subscribes\nto root state with the old URI will receive an error from a channels-era\nserver.\n\nUpdate every literal occurrence in code, tests, fixtures, configuration, and\ndocumentation. Search patterns:\n\n- TypeScript\u002FJavaScript\u002FJSON: `agenthost:\u002Froot`\n- Anywhere the URI is constructed from constants: look for an `AHP_ROOT_URI`\n  or similar constant.\n\n### Pass 2 — `subscribe` \u002F `unsubscribe` params: `resource` → `channel`\n\n```ts\n\u002F\u002F before\n{ method: 'subscribe',   params: { resource: \u003Curi> } }\n{ method: 'unsubscribe', params: { resource: \u003Curi> } }\n\n\u002F\u002F after\n{ method: 'subscribe',   params: { channel: \u003Curi> } }\n{ method: 'unsubscribe', params: { channel: \u003Curi> } }\n```\n\n`SubscribeParams.resource` is now `SubscribeParams.channel`.\n`UnsubscribeParams.resource` is now `UnsubscribeParams.channel`. The URI\nvalue is unchanged for state channels — only the field name moves.\n\n### Pass 3 — `SubscribeResult` becomes `{ snapshot? }`\n\nThe result of a `subscribe` request was a flat snapshot. It is now wrapped\nin an optional `snapshot` field, because stateless channels return no\nsnapshot.\n\n```ts\n\u002F\u002F before — SubscribeResult was the snapshot directly\n{\n  resource: 'ahp-session:\u002F\u003Cuuid>',\n  state:    { ... },\n  fromSeq:  5,\n}\n\n\u002F\u002F after — SubscribeResult is { snapshot?: Snapshot }\n{\n  snapshot: {\n    resource: 'ahp-session:\u002F\u003Cuuid>',\n    state:    { ... },\n    fromSeq:  5,\n  }\n}\n```\n\nFor stateless channels, `snapshot` is omitted entirely:\n\n```ts\n\u002F\u002F stateless channel: subscribe returns an empty result\n{}\n```\n\nUpdate every place that destructures the subscribe response. If your client\nthreaded the snapshot directly into reducers, you now need to read\n`result.snapshot` and handle `undefined` (stateless) as a separate path.\n\n### Pass 4 — Action envelopes carry `channel`; action payloads lose theirs\n\nThe envelope grew a top-level `channel` field. Every individual session and\nterminal action lost its inner channel-identifier field.\n\n```ts\n\u002F\u002F before — ActionEnvelope\n{\n  action: { type: 'session\u002Fdelta', session: 'copilot:\u002F\u003Cuuid>', turnId: 't1', ... },\n  serverSeq: 6,\n  origin: { ... },\n}\n\n\u002F\u002F after — ActionEnvelope\n{\n  channel: 'ahp-session:\u002F\u003Cuuid>',\n  action:  { type: 'session\u002Fdelta', turnId: 't1', ... },  \u002F\u002F no `session` field\n  serverSeq: 6,\n  origin: { ... },\n}\n```\n\n**Producer-side changes** (anything that builds action envelopes or\nindividual actions): stop populating `session`\u002F`terminal` on action payloads.\nPopulate `envelope.channel` instead. The two are typically the same URI you\nwere already using.\n\n**Consumer-side changes** (anything that routes actions to per-session or\nper-terminal reducers): switch your dispatch keying from\n`action.session` \u002F `action.terminal` to `envelope.channel`. The reducer\nselection becomes \"look at the envelope's `channel`, route by URI scheme\".\n\nAction interfaces that lost their channel field — full list:\n\n- All session actions: `SessionReadyAction`, `SessionCreationFailedAction`,\n  `SessionTurnStartedAction`, `SessionDeltaAction`,\n  `SessionResponsePartAction`, `SessionToolCallStartAction`,\n  `SessionToolCallDeltaAction`, `SessionToolCallReadyAction`,\n  `SessionToolCallConfirmedAction`, `SessionToolCallCompleteAction`,\n  `SessionToolCallResultConfirmedAction`,\n  `SessionToolCallContentChangedAction`, `SessionTurnCompleteAction`,\n  `SessionTurnCancelledAction`, `SessionErrorAction`,\n  `SessionTitleChangedAction`, `SessionUsageAction`,\n  `SessionReasoningAction`, `SessionModelChangedAction`,\n  `SessionServerToolsChangedAction`,\n  `SessionActiveClientChangedAction`,\n  `SessionActiveClientToolsChangedAction`,\n  `SessionPendingMessageSetAction`,\n  `SessionPendingMessageRemovedAction`,\n  `SessionQueuedMessagesReorderedAction`,\n  `SessionInputRequestedAction`, `SessionInputAnswerChangedAction`,\n  `SessionInputCompletedAction`, `SessionCustomizationsChangedAction`,\n  `SessionCustomizationToggledAction`,\n  `SessionCustomizationUpdatedAction`, `SessionTruncatedAction`,\n  `SessionIsReadChangedAction`, `SessionIsArchivedChangedAction`,\n  `SessionActivityChangedAction`,\n  `SessionChangesetsChangedAction` (replaces the removed\n  `SessionDiffsChangedAction`),\n  `SessionConfigChangedAction`, `SessionMetaChangedAction`.\n- Tool-call actions also lost `session` because `ToolCallActionBase` no\n  longer carries it. `turnId` and `toolCallId` remain.\n- All terminal actions: `TerminalDataAction`, `TerminalInputAction`,\n  `TerminalResizedAction`, `TerminalClaimedAction`,\n  `TerminalTitleChangedAction`, `TerminalCwdChangedAction`,\n  `TerminalExitedAction`, `TerminalClearedAction`,\n  `TerminalCommandDetectionAvailableAction`,\n  `TerminalCommandExecutedAction`, `TerminalCommandFinishedAction`.\n- All changeset actions (new in `0.2.0`):\n  `ChangesetStatusChangedAction`, `ChangesetFileSetAction`,\n  `ChangesetFileRemovedAction`, `ChangesetOperationsChangedAction`,\n  `ChangesetClearedAction`. These never carried a `changeset: URI` field\n  in shipping code — it was removed before they were released.\n\n### Pass 5 — `action` server notification: drop the `envelope` wrapper\n\nThe server → client `action` method previously wrapped its envelope:\n\n```ts\n\u002F\u002F before\n{ method: 'action', params: { envelope: ActionEnvelope } }\n\n\u002F\u002F after\n{ method: 'action', params: ActionEnvelope }   \u002F\u002F envelope is the params, flat\n```\n\nWherever you build or parse `action` notifications, remove the extra\n`{ envelope: ... }` nesting.\n\n### Pass 6 — `dispatchAction` gains a `channel`\n\nClient → server still uses the `dispatchAction` method name (this did **not**\nget renamed to `action`). The params type adds a top-level `channel`:\n\n```ts\n\u002F\u002F before\n{\n  method: 'dispatchAction',\n  params: { clientSeq: 1, action: { type: 'session\u002FturnStarted', session: '...', ... } }\n}\n\n\u002F\u002F after\n{\n  method: 'dispatchAction',\n  params: {\n    channel:   'ahp-session:\u002F\u003Cuuid>',\n    clientSeq: 1,\n    action:    { type: 'session\u002FturnStarted', turnId: '...', ... }   \u002F\u002F no `session`\n  }\n}\n```\n\n### Pass 7 — Protocol notifications become top-level methods\n\nThe `notification` wrapper method is gone. Each protocol notification is\nnow its own top-level JSON-RPC method with its own params type, and each\ncarries a top-level `channel`.\n\n| Pre-channels                                         | Post-channels (method)          | Params type                  |\n|------------------------------------------------------|---------------------------------|------------------------------|\n| `notification` → `notify\u002FsessionAdded`               | `root\u002FsessionAdded`             | `SessionAddedParams`         |\n| `notification` → `notify\u002FsessionRemoved`             | `root\u002FsessionRemoved`           | `SessionRemovedParams`       |\n| `notification` → `notify\u002FsessionSummaryChanged`      | `root\u002FsessionSummaryChanged`    | `SessionSummaryChangedParams`|\n| `notification` → `notify\u002FauthRequired`               | `auth\u002Frequired`                 | `AuthRequiredParams`         |\n\nEach new params type has `channel: URI` as its top-level field. For\n`root\u002F*` notifications, `channel` is `ahp-root:\u002F\u002F`. For `auth\u002Frequired`,\n`channel` can be any channel the auth requirement is scoped to.\n\n```ts\n\u002F\u002F before\n{\n  method: 'notification',\n  params: {\n    notification: {\n      type:    'notify\u002FsessionAdded',\n      summary: { resource: 'copilot:\u002F\u003Cuuid>', ... }\n    }\n  }\n}\n\n\u002F\u002F after\n{\n  method: 'root\u002FsessionAdded',\n  params: {\n    channel: 'ahp-root:\u002F\u002F',\n    summary: { resource: 'ahp-session:\u002F\u003Cuuid>', ... }\n  }\n}\n```\n\nDrop any code that imports `ProtocolNotification`, the `NotificationType`\nenum, `NotificationMethodParams`, or the combined `NotificationMap` — these\ntypes were removed. Replace them with the per-method params types and a\ndirect lookup on the wire-level method name. The type-level constraint\nthat every entry in `ClientNotificationMap` \u002F `ServerNotificationMap` has\n`params extends { channel: URI }` is enforced in\n`types\u002Fversion\u002Fmessage-checks.ts`, alongside an equivalent check that\nevery entry in `CommandMap` \u002F `ServerCommandMap` has\n`params extends BaseParams` (see Pass 10).\n\n### Pass 8 — Session URI scheme (docs\u002Fexamples + helpers)\n\nIf your code constructs session URIs via a helper like\n`AgentSession.uri(provider, rawId)`, the provider component is no longer\nencoded in the scheme. Update the helper to produce `ahp-session:\u002F\u003CrawId>`\nand remove any `AgentSession.provider(session)` lookups that extracted the\nprovider from the URI. Read the provider from `SessionSummary.provider`\ninstead.\n\nFor session URIs that are **announced** by an existing AHP server you talk\nto, you do not need to change anything in your client beyond accepting the\nnew scheme. Treat session URIs as opaque strings except where you\nspecifically construct them.\n\n### Pass 9 — Reconnect \u002F replay behaviour for stateless channels\n\n`reconnect` still carries `subscriptions: URI[]`. State-channel replay\nbehaviour is unchanged. Stateless channels (where they exist) are\nre-subscribed on reconnect — missed messages are dropped, never replayed.\nIf you implement a server: do not include stateless channels in the\n`replay` result's `actions` list. They will simply re-subscribe.\n\n### Pass 10 — Commands carry `channel: URI`\n\nEvery command's params now extends `BaseParams { channel: URI }`. The\n`channel` field tells the server which channel the command targets, so a\nrouter can dispatch any incoming message — request, response, or\nnotification — by inspecting `params.channel` without further\ndeserialisation.\n\nThere are two flavours:\n\n**Channel-scoped commands** — rename the existing\n`session` \u002F `terminal` \u002F `changeset` field to `channel`. The URI value is\nunchanged.\n\n| Command                     | Old field             | New field |\n|-----------------------------|-----------------------|-----------|\n| `createSession`             | `session: URI`        | `channel: URI` |\n| `disposeSession`            | `session: URI`        | `channel: URI` |\n| `createTerminal`            | `terminal: URI`       | `channel: URI` |\n| `disposeTerminal`           | `terminal: URI`       | `channel: URI` |\n| `fetchTurns`                | `session: URI`        | `channel: URI` |\n| `completions`               | `session: URI`        | `channel: URI` |\n| `invokeChangesetOperation`  | `changeset: URI`      | `channel: URI` |\n| `subscribe`, `unsubscribe`, `dispatchAction` | already `channel` (Passes 2 & 6) | unchanged |\n\n**Connection-level commands** — narrow `channel` to the literal\n`'ahp-root:\u002F\u002F'`. Add the field explicitly; the TS types enforce it.\n\nMethods: `initialize`, `ping`, `reconnect`, `listSessions`,\n`authenticate`, `resolveSessionConfig`, `sessionConfigCompletions`,\n`resourceRead`, `resourceWrite`, `resourceList`, `resourceCopy`,\n`resourceDelete`, `resourceMove`, `resourceRequest`.\n\n```ts\n\u002F\u002F before\n{ method: 'initialize', params: { protocolVersions: ['0.2.0'], clientId: 'c1' } }\n{ method: 'listSessions', params: {} }\n{ method: 'createSession', params: { session: 'ahp-session:\u002F\u003Cuuid>', provider: 'copilot' } }\n{ method: 'fetchTurns', params: { session: 'ahp-session:\u002F\u003Cuuid>', limit: 20 } }\n\n\u002F\u002F after\n{ method: 'initialize',   params: { channel: 'ahp-root:\u002F\u002F', protocolVersions: ['0.2.0'], clientId: 'c1' } }\n{ method: 'listSessions', params: { channel: 'ahp-root:\u002F\u002F' } }\n{ method: 'createSession', params: { channel: 'ahp-session:\u002F\u003Cuuid>', provider: 'copilot' } }\n{ method: 'fetchTurns',   params: { channel: 'ahp-session:\u002F\u003Cuuid>', limit: 20 } }\n```\n\nThe compile-time check `_CheckCommandsHaveChannel` in\n`types\u002Fversion\u002Fmessage-checks.ts` verifies that every entry in\n`CommandMap` \u002F `ServerCommandMap` has params assignable to `BaseParams`.\nIf you forget to add `channel` to a new command's params, the check\nfails to compile and points at the missing field.\n\n## Grep cheat sheet\n\nRun these searches in your codebase. Each pattern is a strong signal that a\nmigration site still needs attention.\n\n| Pattern                              | What it indicates |\n|--------------------------------------|--------------------|\n| `agenthost:\u002Froot`                    | Old root URI literal (Pass 1) |\n| `\"resource\"`\u002F`resource:` near `subscribe`\u002F`unsubscribe`\u002F`Subscribe` | Old subscribe param shape (Pass 2) |\n| `result.resource` \u002F `result.state` \u002F `result.fromSeq` right after subscribe | Old flat-snapshot subscribe result (Pass 3) |\n| `action.session` \u002F `action.terminal` | Reading the channel off the action payload — should be from the envelope (Pass 4) |\n| `session:` inside an action literal  | Producer writing pre-channels payload (Pass 4) |\n| `params.envelope` near `'action'`    | Old `action` server notification wrapper (Pass 5) |\n| `dispatchAction` without `channel`   | Client dispatch missing channel (Pass 6) |\n| `'notification'` as a JSON-RPC method name | Old protocol notification wrapper (Pass 7) |\n| `notify\u002FsessionAdded`, `notify\u002FsessionRemoved`, `notify\u002FsessionSummaryChanged`, `notify\u002FauthRequired` | Old protocol notification names (Pass 7) |\n| `ProtocolNotification`, `NotificationType`, `NotificationMethodParams`, `NotificationMap` | Removed types (Pass 7) |\n| `SessionAddedNotification`, `SessionRemovedNotification`, `SessionSummaryChangedNotification`, `AuthRequiredNotification` | Old notification interfaces — renamed to `*Params` (Pass 7) |\n| `AgentSession.provider`, `provider` extracted from session scheme | Old provider-via-scheme helper (Pass 8) |\n| `SessionDiffsChangedAction`, `summary.diffs`, `session\u002FdiffsChanged` | Removed in favour of changesets (Pass 4 list) |\n| `CreateSessionParams\\W+session:`, `DisposeSessionParams\\W+session:`, `CreateTerminalParams\\W+terminal:`, `DisposeTerminalParams\\W+terminal:`, `FetchTurnsParams\\W+session:`, `CompletionsParams\\W+session:`, `InvokeChangesetOperationParams\\W+changeset:` | Channel-scoped command params still using the old field name (Pass 10) |\n| `ListSessionsParams()`, `PingParams()`, `ResourceReadParams\\(uri:` (no `channel:`), or any other command params constructed without `channel` | Connection-level command missing the `channel: 'ahp-root:\u002F\u002F'` literal (Pass 10) |\n\n## Verification checklist\n\nAfter the migration, your code should:\n\n- [ ] Subscribe to `ahp-root:\u002F\u002F` instead of `agenthost:\u002Froot`.\n- [ ] Pass `{ channel }` (not `{ resource }`) to `subscribe` and `unsubscribe`.\n- [ ] Read `result.snapshot` from `subscribe` responses; tolerate\n      `snapshot === undefined` for stateless channels.\n- [ ] Build action envelopes with a top-level `channel`. No\n      `session` \u002F `terminal` fields inside individual action payloads.\n- [ ] Consume the `action` server notification's params as the envelope\n      itself, not as `{ envelope }`.\n- [ ] Build `dispatchAction` params with a top-level `channel`.\n- [ ] Receive protocol notifications as top-level methods\n      (`root\u002FsessionAdded`, `root\u002FsessionRemoved`,\n      `root\u002FsessionSummaryChanged`, `auth\u002Frequired`) rather than nested\n      inside `notification`.\n- [ ] No imports of `ProtocolNotification`, `NotificationType`,\n      `NotificationMethodParams`, or `NotificationMap`.\n- [ ] Resolve a session's provider via `SessionSummary.provider`, not via\n      the URI scheme.\n- [ ] No `SessionDiffsChangedAction` \u002F `summary.diffs` references; consume\n      `SessionState.changesets` plus the `changeset\u002F*` action family instead.\n- [ ] Every command's params carries `channel: URI`. Channel-scoped\n      commands (`createSession`, `disposeSession`, `createTerminal`,\n      `disposeTerminal`, `fetchTurns`, `completions`,\n      `invokeChangesetOperation`) pass the target channel URI;\n      connection-level commands pass the literal `'ahp-root:\u002F\u002F'`.\n\nWhen all these are true, your consumer is on the channels model.\n\n## References\n\nFor the full normative description of the channel model, consult these\ndocuments in the `microsoft\u002Fagent-host-protocol` repository:\n\n- `docs\u002Fspecification\u002Fsubscriptions.md` — Channels & Subscriptions (the\n  framework, including stateless channels and the URI scheme table)\n- `docs\u002Fspecification\u002Froot-channel.md` — Root channel state, actions, and\n  protocol notifications\n- `docs\u002Fspecification\u002Fsession-channel.md` — Session channel lifecycle,\n  client-action validation, pending-message consumption\n- `docs\u002Fspecification\u002Fterminal-channel.md` — Terminal channel data flow\n  and command detection\n- `docs\u002Fspecification\u002Flifecycle.md` — Connection handshake and reconnection\n- `docs\u002Fguide\u002Fchangesets.md` — Changeset channel model, catalogue,\n  per-changeset state, and `invokeChangesetOperation`\n- `types\u002Factions.ts`, `types\u002Fcommands.ts`, `types\u002Fmessages.ts`,\n  `types\u002Fnotifications.ts` — Source-of-truth type definitions\n  (`BaseParams` lives in `commands.ts`)\n- `types\u002Fversion\u002Fmessage-checks.ts` — Compile-time checks that every\n  command and notification carries `channel: URI`\n- GitHub issue [#117](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fissues\u002F117)\n  — The RFC that introduced the channel model\n","# AHP Channels Migration\n\nThis skill helps you migrate a codebase that consumes (or implements) the\nAgent Host Protocol from the **pre-channels model** to the **channel-based\nmodel** introduced by RFC #117. The migration was folded into the protocol\nas a single breaking step alongside the `0.2.0` version bump (which also\nintroduced changesets and the `session\u002FcustomizationUpdated` action). The\ncombined wire format on `0.2.0` is what this skill targets; there is no\ntransitional version.\n\nThe migration is mechanical in most places but touches several shapes at once,\nso do it in passes rather than file-by-file. The order below minimises the\nchance of leaving the codebase in a half-broken state.\n\n## How to use this skill\n\n1. Start with the **Mental model** section so you understand what \"channel\"\n   means and why fields moved.\n2. Work through the **Migration passes** in order. Each pass is independent\n   enough that you can land it as its own commit.\n3. Use the **Grep cheat sheet** at the bottom to find every site that needs\n   updating in your codebase.\n4. When in doubt about a specific type's new shape, look it up in the AHP\n   repo's `types\u002F*.ts` (`state.ts`, `actions.ts`, `commands.ts`,\n   `messages.ts`, `notifications.ts`) or in `docs\u002Fspecification\u002F`.\n\n## Mental model\n\nIn the pre-channels world, AHP had a privileged \"state subscription\"\nmechanism: clients subscribed to a URI, got a snapshot, and received action\nenvelopes for that URI's state. Notifications (session catalogue events,\nauth-required) were stuffed inside a single `notification` wrapper method.\nThe URI of a state-bearing resource was embedded directly into the action\npayload (`action.session`, `action.terminal`).\n\nIn the channel-based world, every push-style interaction lives on a\n**channel**, identified by a URI. Subscriptions, action delivery, and\nprotocol notifications all carry a top-level `channel: URI` field that\nidentifies which subscription a message belongs to. A channel MAY have\nassociated state (root, sessions, terminals), or it MAY be stateless (future\nuse: logging, MCP, LSP relay). The wire shape is uniform across types.\n\nConcretely:\n\n- **Root URI**: `agenthost:\u002Froot` → `ahp-root:\u002F\u002F`\n- **Session URI scheme**: provider-named (`copilot:\u002F\u003Cuuid>`) →\n  `ahp-session:\u002F\u003Cuuid>` in docs\u002Fexamples. The provider lives on\n  `SessionSummary.provider`, not in the URI. (Live session URIs are\n  announced by the server, so this is mainly a docs\u002Fexample change for\n  consumers — but type-level shape changes still apply.)\n- **Terminal URI scheme** (docs\u002Fexamples): `ahp-terminal:\u002F\u003Cid>`. Server-\n  defined; clients treat as opaque.\n- **Changeset URI scheme** (docs\u002Fexamples): `ahp-changeset:\u002F\u003Cid>`. Server-\n  defined; obtained by expanding a `Changeset.uriTemplate`.\n  Changesets are a new channel type introduced in the same step.\n- **`channel` everywhere**: `subscribe`\u002F`unsubscribe`\u002Faction-envelope\u002F\n  `dispatchAction`\u002Fevery protocol notification AND every command has\n  `channel: URI` at the top level of its params. Commands that are\n  connection-level rather than channel-scoped (e.g. `initialize`, `ping`,\n  `listSessions`, the `resource*` filesystem commands, `authenticate`)\n  set `channel` to the literal `'ahp-root:\u002F\u002F'`.\n- **Action payloads are channel-less**: `session: URI` and `terminal: URI`\n  fields are gone from individual actions. Routing is by envelope.\n- **Notifications are top-level methods**: the `notification` wrapper and\n  the `ProtocolNotification` union are gone.\n- **`SessionDiffsChangedAction` is gone**: replaced by\n  `SessionChangesetsChangedAction` (catalogue updates on a session) plus a\n  new family of per-changeset actions (`changeset\u002FstatusChanged`,\n  `changeset\u002FfileSet`, `changeset\u002FfileRemoved`,\n  `changeset\u002FoperationsChanged`, `changeset\u002Fcleared`) and the\n  `invokeChangesetOperation` command. See `docs\u002Fguide\u002Fchangesets.md`.\n\n## Migration passes\n\nApply these in order. After each pass, run your typecheck\u002Ftest loop.\n\n### Pass 1 — Rename the root URI\n\n```\nagenthost:\u002Froot  →  ahp-root:\u002F\u002F\n```\n\nThis is the one immediately-wire-breaking rename. Any client that subscribes\nto root state with the old URI will receive an error from a channels-era\nserver.\n\nUpdate every literal occurrence in code, tests, fixtures, configuration, and\ndocumentation. Search patterns:\n\n- TypeScript\u002FJavaScript\u002FJSON: `agenthost:\u002Froot`\n- Anywhere the URI is constructed from constants: look for an `AHP_ROOT_URI`\n  or similar constant.\n\n### Pass 2 — `subscribe` \u002F `unsubscribe` params: `resource` → `channel`\n\n```ts\n\u002F\u002F before\n{ method: 'subscribe',   params: { resource: \u003Curi> } }\n{ method: 'unsubscribe', params: { resource: \u003Curi> } }\n\n\u002F\u002F after\n{ method: 'subscribe',   params: { channel: \u003Curi> } }\n{ method: 'unsubscribe', params: { channel: \u003Curi> } }\n```\n\n`SubscribeParams.resource` is now `SubscribeParams.channel`.\n`UnsubscribeParams.resource` is now `UnsubscribeParams.channel`. The URI\nvalue is unchanged for state channels — only the field name moves.\n\n### Pass 3 — `SubscribeResult` becomes `{ snapshot? }`\n\nThe result of a `subscribe` request was a flat snapshot. It is now wrapped\nin an optional `snapshot` field, because stateless channels return no\nsnapshot.\n\n```ts\n\u002F\u002F before — SubscribeResult was the snapshot directly\n{\n  resource: 'ahp-session:\u002F\u003Cuuid>',\n  state:    { ... },\n  fromSeq:  5,\n}\n\n\u002F\u002F after — SubscribeResult is { snapshot?: Snapshot }\n{\n  snapshot: {\n    resource: 'ahp-session:\u002F\u003Cuuid>',\n    state:    { ... },\n    fromSeq:  5,\n  }\n}\n```\n\nFor stateless channels, `snapshot` is omitted entirely:\n\n```ts\n\u002F\u002F stateless channel: subscribe returns an empty result\n{}\n```\n\nUpdate every place that destructures the subscribe response. If your client\nthreaded the snapshot directly into reducers, you now need to read\n`result.snapshot` and handle `undefined` (stateless) as a separate path.\n\n### Pass 4 — Action envelopes carry `channel`; action payloads lose theirs\n\nThe envelope grew a top-level `channel` field. Every individual session and\nterminal action lost its inner channel-identifier field.\n\n```ts\n\u002F\u002F before — ActionEnvelope\n{\n  action: { type: 'session\u002Fdelta', session: 'copilot:\u002F\u003Cuuid>', turnId: 't1', ... },\n  serverSeq: 6,\n  origin: { ... },\n}\n\n\u002F\u002F after — ActionEnvelope\n{\n  channel: 'ahp-session:\u002F\u003Cuuid>',\n  action:  { type: 'session\u002Fdelta', turnId: 't1', ... },  \u002F\u002F no `session` field\n  serverSeq: 6,\n  origin: { ... },\n}\n```\n\n**Producer-side changes** (anything that builds action envelopes or\nindividual actions): stop populating `session`\u002F`terminal` on action payloads.\nPopulate `envelope.channel` instead. The two are typically the same URI you\nwere already using.\n\n**Consumer-side changes** (anything that routes actions to per-session or\nper-terminal reducers): switch your dispatch keying from\n`action.session` \u002F `action.terminal` to `envelope.channel`. The reducer\nselection becomes \"look at the envelope's `channel`, route by URI scheme\".\n\nAction interfaces that lost their channel field — full list:\n\n- All session actions: `SessionReadyAction`, `SessionCreationFailedAction`,\n  `SessionTurnStartedAction`, `SessionDeltaAction`,\n  `SessionResponsePartAction`, `SessionToolCallStartAction`,\n  `SessionToolCallDeltaAction`, `SessionToolCallReadyAction`,\n  `SessionToolCallConfirmedAction`, `SessionToolCallCompleteAction`,\n  `SessionToolCallResultConfirmedAction`,\n  `SessionToolCallContentChangedAction`, `SessionTurnCompleteAction`,\n  `SessionTurnCancelledAction`, `SessionErrorAction`,\n  `SessionTitleChangedAction`, `SessionUsageAction`,\n  `SessionReasoningAction`, `SessionModelChangedAction`,\n  `SessionServerToolsChangedAction`,\n  `SessionActiveClientChangedAction`,\n  `SessionActiveClientToolsChangedAction`,\n  `SessionPendingMessageSetAction`,\n  `SessionPendingMessageRemovedAction`,\n  `SessionQueuedMessagesReorderedAction`,\n  `SessionInputRequestedAction`, `SessionInputAnswerChangedAction`,\n  `SessionInputCompletedAction`, `SessionCustomizationsChangedAction`,\n  `SessionCustomizationToggledAction`,\n  `SessionCustomizationUpdatedAction`, `SessionTruncatedAction`,\n  `SessionIsReadChangedAction`, `SessionIsArchivedChangedAction`,\n  `SessionActivityChangedAction`,\n  `SessionChangesetsChangedAction` (replaces the removed\n  `SessionDiffsChangedAction`),\n  `SessionConfigChangedAction`, `SessionMetaChangedAction`.\n- Tool-call actions also lost `session` because `ToolCallActionBase` no\n  longer carries it. `turnId` and `toolCallId` remain.\n- All terminal actions: `TerminalDataAction`, `TerminalInputAction`,\n  `TerminalResizedAction`, `TerminalClaimedAction`,\n  `TerminalTitleChangedAction`, `TerminalCwdChangedAction`,\n  `TerminalExitedAction`, `TerminalClearedAction`,\n  `TerminalCommandDetectionAvailableAction`,\n  `TerminalCommandExecutedAction`, `TerminalCommandFinishedAction`.\n- All changeset actions (new in `0.2.0`):\n  `ChangesetStatusChangedAction`, `ChangesetFileSetAction`,\n  `ChangesetFileRemovedAction`, `ChangesetOperationsChangedAction`,\n  `ChangesetClearedAction`. These never carried a `changeset: URI` field\n  in shipping code — it was removed before they were released.\n\n### Pass 5 — `action` server notification: drop the `envelope` wrapper\n\nThe server → client `action` method previously wrapped its envelope:\n\n```ts\n\u002F\u002F before\n{ method: 'action', params: { envelope: ActionEnvelope } }\n\n\u002F\u002F after\n{ method: 'action', params: ActionEnvelope }   \u002F\u002F envelope is the params, flat\n```\n\nWherever you build or parse `action` notifications, remove the extra\n`{ envelope: ... }` nesting.\n\n### Pass 6 — `dispatchAction` gains a `channel`\n\nClient → server still uses the `dispatchAction` method name (this did **not**\nget renamed to `action`). The params type adds a top-level `channel`:\n\n```ts\n\u002F\u002F before\n{\n  method: 'dispatchAction',\n  params: { clientSeq: 1, action: { type: 'session\u002FturnStarted', session: '...', ... } }\n}\n\n\u002F\u002F after\n{\n  method: 'dispatchAction',\n  params: {\n    channel:   'ahp-session:\u002F\u003Cuuid>',\n    clientSeq: 1,\n    action:    { type: 'session\u002FturnStarted', turnId: '...', ... }   \u002F\u002F no `session`\n  }\n}\n```\n\n### Pass 7 — Protocol notifications become top-level methods\n\nThe `notification` wrapper method is gone. Each protocol notification is\nnow its own top-level JSON-RPC method with its own params type, and each\ncarries a top-level `channel`.\n\n| Pre-channels                                         | Post-channels (method)          | Params type                  |\n|------------------------------------------------------|---------------------------------|------------------------------|\n| `notification` → `notify\u002FsessionAdded`               | `root\u002FsessionAdded`             | `SessionAddedParams`         |\n| `notification` → `notify\u002FsessionRemoved`             | `root\u002FsessionRemoved`           | `SessionRemovedParams`       |\n| `notification` → `notify\u002FsessionSummaryChanged`      | `root\u002FsessionSummaryChanged`    | `SessionSummaryChangedParams`|\n| `notification` → `notify\u002FauthRequired`               | `auth\u002Frequired`                 | `AuthRequiredParams`         |\n\nEach new params type has `channel: URI` as its top-level field. For\n`root\u002F*` notifications, `channel` is `ahp-root:\u002F\u002F`. For `auth\u002Frequired`,\n`channel` can be any channel the auth requirement is scoped to.\n\n```ts\n\u002F\u002F before\n{\n  method: 'notification',\n  params: {\n    notification: {\n      type:    'notify\u002FsessionAdded',\n      summary: { resource: 'copilot:\u002F\u003Cuuid>', ... }\n    }\n  }\n}\n\n\u002F\u002F after\n{\n  method: 'root\u002FsessionAdded',\n  params: {\n    channel: 'ahp-root:\u002F\u002F',\n    summary: { resource: 'ahp-session:\u002F\u003Cuuid>', ... }\n  }\n}\n```\n\nDrop any code that imports `ProtocolNotification`, the `NotificationType`\nenum, `NotificationMethodParams`, or the combined `NotificationMap` — these\ntypes were removed. Replace them with the per-method params types and a\ndirect lookup on the wire-level method name. The type-level constraint\nthat every entry in `ClientNotificationMap` \u002F `ServerNotificationMap` has\n`params extends { channel: URI }` is enforced in\n`types\u002Fversion\u002Fmessage-checks.ts`, alongside an equivalent check that\nevery entry in `CommandMap` \u002F `ServerCommandMap` has\n`params extends BaseParams` (see Pass 10).\n\n### Pass 8 — Session URI scheme (docs\u002Fexamples + helpers)\n\nIf your code constructs session URIs via a helper like\n`AgentSession.uri(provider, rawId)`, the provider component is no longer\nencoded in the scheme. Update the helper to produce `ahp-session:\u002F\u003CrawId>`\nand remove any `AgentSession.provider(session)` lookups that extracted the\nprovider from the URI. Read the provider from `SessionSummary.provider`\ninstead.\n\nFor session URIs that are **announced** by an existing AHP server you talk\nto, you do not need to change anything in your client beyond accepting the\nnew scheme. Treat session URIs as opaque strings except where you\nspecifically construct them.\n\n### Pass 9 — Reconnect \u002F replay behaviour for stateless channels\n\n`reconnect` still carries `subscriptions: URI[]`. State-channel replay\nbehaviour is unchanged. Stateless channels (where they exist) are\nre-subscribed on reconnect — missed messages are dropped, never replayed.\nIf you implement a server: do not include stateless channels in the\n`replay` result's `actions` list. They will simply re-subscribe.\n\n### Pass 10 — Commands carry `channel: URI`\n\nEvery command's params now extends `BaseParams { channel: URI }`. The\n`channel` field tells the server which channel the command targets, so a\nrouter can dispatch any incoming message — request, response, or\nnotification — by inspecting `params.channel` without further\ndeserialisation.\n\nThere are two flavours:\n\n**Channel-scoped commands** — rename the existing\n`session` \u002F `terminal` \u002F `changeset` field to `channel`. The URI value is\nunchanged.\n\n| Command                     | Old field             | New field |\n|-----------------------------|-----------------------|-----------|\n| `createSession`             | `session: URI`        | `channel: URI` |\n| `disposeSession`            | `session: URI`        | `channel: URI` |\n| `createTerminal`            | `terminal: URI`       | `channel: URI` |\n| `disposeTerminal`           | `terminal: URI`       | `channel: URI` |\n| `fetchTurns`                | `session: URI`        | `channel: URI` |\n| `completions`               | `session: URI`        | `channel: URI` |\n| `invokeChangesetOperation`  | `changeset: URI`      | `channel: URI` |\n| `subscribe`, `unsubscribe`, `dispatchAction` | already `channel` (Passes 2 & 6) | unchanged |\n\n**Connection-level commands** — narrow `channel` to the literal\n`'ahp-root:\u002F\u002F'`. Add the field explicitly; the TS types enforce it.\n\nMethods: `initialize`, `ping`, `reconnect`, `listSessions`,\n`authenticate`, `resolveSessionConfig`, `sessionConfigCompletions`,\n`resourceRead`, `resourceWrite`, `resourceList`, `resourceCopy`,\n`resourceDelete`, `resourceMove`, `resourceRequest`.\n\n```ts\n\u002F\u002F before\n{ method: 'initialize', params: { protocolVersions: ['0.2.0'], clientId: 'c1' } }\n{ method: 'listSessions', params: {} }\n{ method: 'createSession', params: { session: 'ahp-session:\u002F\u003Cuuid>', provider: 'copilot' } }\n{ method: 'fetchTurns', params: { session: 'ahp-session:\u002F\u003Cuuid>', limit: 20 } }\n\n\u002F\u002F after\n{ method: 'initialize',   params: { channel: 'ahp-root:\u002F\u002F', protocolVersions: ['0.2.0'], clientId: 'c1' } }\n{ method: 'listSessions', params: { channel: 'ahp-root:\u002F\u002F' } }\n{ method: 'createSession', params: { channel: 'ahp-session:\u002F\u003Cuuid>', provider: 'copilot' } }\n{ method: 'fetchTurns',   params: { channel: 'ahp-session:\u002F\u003Cuuid>', limit: 20 } }\n```\n\nThe compile-time check `_CheckCommandsHaveChannel` in\n`types\u002Fversion\u002Fmessage-checks.ts` verifies that every entry in\n`CommandMap` \u002F `ServerCommandMap` has params assignable to `BaseParams`.\nIf you forget to add `channel` to a new command's params, the check\nfails to compile and points at the missing field.\n\n## Grep cheat sheet\n\nRun these searches in your codebase. Each pattern is a strong signal that a\nmigration site still needs attention.\n\n| Pattern                              | What it indicates |\n|--------------------------------------|--------------------|\n| `agenthost:\u002Froot`                    | Old root URI literal (Pass 1) |\n| `\"resource\"`\u002F`resource:` near `subscribe`\u002F`unsubscribe`\u002F`Subscribe` | Old subscribe param shape (Pass 2) |\n| `result.resource` \u002F `result.state` \u002F `result.fromSeq` right after subscribe | Old flat-snapshot subscribe result (Pass 3) |\n| `action.session` \u002F `action.terminal` | Reading the channel off the action payload — should be from the envelope (Pass 4) |\n| `session:` inside an action literal  | Producer writing pre-channels payload (Pass 4) |\n| `params.envelope` near `'action'`    | Old `action` server notification wrapper (Pass 5) |\n| `dispatchAction` without `channel`   | Client dispatch missing channel (Pass 6) |\n| `'notification'` as a JSON-RPC method name | Old protocol notification wrapper (Pass 7) |\n| `notify\u002FsessionAdded`, `notify\u002FsessionRemoved`, `notify\u002FsessionSummaryChanged`, `notify\u002FauthRequired` | Old protocol notification names (Pass 7) |\n| `ProtocolNotification`, `NotificationType`, `NotificationMethodParams`, `NotificationMap` | Removed types (Pass 7) |\n| `SessionAddedNotification`, `SessionRemovedNotification`, `SessionSummaryChangedNotification`, `AuthRequiredNotification` | Old notification interfaces — renamed to `*Params` (Pass 7) |\n| `AgentSession.provider`, `provider` extracted from session scheme | Old provider-via-scheme helper (Pass 8) |\n| `SessionDiffsChangedAction`, `summary.diffs`, `session\u002FdiffsChanged` | Removed in favour of changesets (Pass 4 list) |\n| `CreateSessionParams\\W+session:`, `DisposeSessionParams\\W+session:`, `CreateTerminalParams\\W+terminal:`, `DisposeTerminalParams\\W+terminal:`, `FetchTurnsParams\\W+session:`, `CompletionsParams\\W+session:`, `InvokeChangesetOperationParams\\W+changeset:` | Channel-scoped command params still using the old field name (Pass 10) |\n| `ListSessionsParams()`, `PingParams()`, `ResourceReadParams\\(uri:` (no `channel:`), or any other command params constructed without `channel` | Connection-level command missing the `channel: 'ahp-root:\u002F\u002F'` literal (Pass 10) |\n\n## Verification checklist\n\nAfter the migration, your code should:\n\n- [ ] Subscribe to `ahp-root:\u002F\u002F` instead of `agenthost:\u002Froot`.\n- [ ] Pass `{ channel }` (not `{ resource }`) to `subscribe` and `unsubscribe`.\n- [ ] Read `result.snapshot` from `subscribe` responses; tolerate\n      `snapshot === undefined` for stateless channels.\n- [ ] Build action envelopes with a top-level `channel`. No\n      `session` \u002F `terminal` fields inside individual action payloads.\n- [ ] Consume the `action` server notification's params as the envelope\n      itself, not as `{ envelope }`.\n- [ ] Build `dispatchAction` params with a top-level `channel`.\n- [ ] Receive protocol notifications as top-level methods\n      (`root\u002FsessionAdded`, `root\u002FsessionRemoved`,\n      `root\u002FsessionSummaryChanged`, `auth\u002Frequired`) rather than nested\n      inside `notification`.\n- [ ] No imports of `ProtocolNotification`, `NotificationType`,\n      `NotificationMethodParams`, or `NotificationMap`.\n- [ ] Resolve a session's provider via `SessionSummary.provider`, not via\n      the URI scheme.\n- [ ] No `SessionDiffsChangedAction` \u002F `summary.diffs` references; consume\n      `SessionState.changesets` plus the `changeset\u002F*` action family instead.\n- [ ] Every command's params carries `channel: URI`. Channel-scoped\n      commands (`createSession`, `disposeSession`, `createTerminal`,\n      `disposeTerminal`, `fetchTurns`, `completions`,\n      `invokeChangesetOperation`) pass the target channel URI;\n      connection-level commands pass the literal `'ahp-root:\u002F\u002F'`.\n\nWhen all these are true, your consumer is on the channels model.\n\n## References\n\nFor the full normative description of the channel model, consult these\ndocuments in the `microsoft\u002Fagent-host-protocol` repository:\n\n- `docs\u002Fspecification\u002Fsubscriptions.md` — Channels & Subscriptions (the\n  framework, including stateless channels and the URI scheme table)\n- `docs\u002Fspecification\u002Froot-channel.md` — Root channel state, actions, and\n  protocol notifications\n- `docs\u002Fspecification\u002Fsession-channel.md` — Session channel lifecycle,\n  client-action validation, pending-message consumption\n- `docs\u002Fspecification\u002Fterminal-channel.md` — Terminal channel data flow\n  and command detection\n- `docs\u002Fspecification\u002Flifecycle.md` — Connection handshake and reconnection\n- `docs\u002Fguide\u002Fchangesets.md` — Changeset channel model, catalogue,\n  per-changeset state, and `invokeChangesetOperation`\n- `types\u002Factions.ts`, `types\u002Fcommands.ts`, `types\u002Fmessages.ts`,\n  `types\u002Fnotifications.ts` — Source-of-truth type definitions\n  (`BaseParams` lives in `commands.ts`)\n- `types\u002Fversion\u002Fmessage-checks.ts` — Compile-time checks that every\n  command and notification carries `channel: URI`\n- GitHub issue [#117](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fissues\u002F117)\n  — The RFC that introduced the channel model\n",{"description":7},"main","fc1eabf3f9464aea494c62390fc35559f62e9007","plugins\u002Fchannels-migration-plugin\u002Fskills\u002Fchannels-migration",163,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol","https:\u002F\u002Fmicrosoft.github.io\u002Fagent-host-protocol\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 06:36:49",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add microsoft\u002Fagent-host-protocol --skill channels-migration",{"tool":60,"command":61},"bunx","bunx skills add microsoft\u002Fagent-host-protocol --skill channels-migration",{"tool":63,"command":64},"pnpm","pnpm dlx skills add microsoft\u002Fagent-host-protocol --skill channels-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fblob\u002Fmain\u002Fplugins\u002Fchannels-migration-plugin\u002Fskills\u002Fchannels-migration\u002FSKILL.md",true,[],[69,94,119,136],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":39},"01M6X0CEJHJZY0435V3KC9ZX7F","release-ahp","Cut a coordinated AHP release (spec + all 6 clients) — bumps manifests, dates CHANGELOGs, promotes website docs alongside the development bump in one PR, and pushes seven release tags before merging. Use when the user says \"release AHP X.Y.Z\", \"publish AHP\", \"cut a release\", \"tag the release\", or similar. Includes recovery for missing publish triggers.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fblob\u002Fmain\u002Fskills\u002Frelease-ahp\u002FSKILL.md",[],[76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,23,22,91,92,93],"release","release ahp","user","tags","clients","spec","cut","merge","recovery","artifact","with","publish","pr","workflow","manifest","auto","dates","for",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6X0C79Z6CYD3ZKP7441E6MT","groom-backlog","Audits recently closed PRs in agent-host-protocol (AHP) to make sure any future work they promised has a tracking issue (filing new ones or linking PRs to existing ones), then triages every open issue into implementable-now \u002F no-longer-relevant \u002F blocked-on-a-dependency, closing or annotating each accordingly, and finally prioritizes and implements the ready issues. Validates every follow-up and issue against the current state of this repo — the canonical `types\u002F`, the generated client mirrors, the conformance fixtures, and the published versioned artifacts — before acting. Use when asked to triage or groom the issue backlog, file follow-up issues from merged PRs, audit closed PRs for un-tracked work, or work through the open issues.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fblob\u002Fmain\u002Fskills\u002Fgroom-backlog\u002FSKILL.md",[],[101,102,103,104,23,105,25,106,107,108,109,110,111,112,113,114,115,116,117,118],"groom","groom backlog","backlog","generated","sure","now","open","work","closing","linking","audit","dependency","issues","up","ready","relevant","types","filing",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":39},"01M6X0BWF1YVDX6T9XQ9W20DQ2","session-metadata-migration","Migrate code that talks to or implements the Agent Host Protocol to the flattened SessionState model. Use when asked to upgrade an AHP client\u002Fserver\u002Fbinding and you see a `summary` sub-object on `SessionState` (e.g. `state.summary.title`, `session.summary.modifiedAt`), `model` \u002F `agent` on `SessionState` \u002F `SessionSummary` \u002F `ChatState` \u002F `ChatSummary`, the `session\u002FmodelChanged` or `session\u002FagentChanged` actions, numeric `createdAt` \u002F `modifiedAt`, or `model` \u002F `agent` arguments to `createSession` \u002F `createChat`.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fblob\u002Fmain\u002Fplugins\u002Fsession-metadata-migration-plugin\u002Fskills\u002Fsession-metadata-migration\u002FSKILL.md",[],[126,21,127,30,22,35,128,25,26,129,23,130,131,36,38,132,37,133,134,135],"metadata","session metadata migration","actions","ahp client","you","object","state","title","binding","protocol",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":39},"01M6X0BR7E8HSADCKTWFXY4VX7","ahp-client","Interact with an Agent Host Protocol (AHP) server via WebSocket. Use when asked to connect to, message, or control an AHP server.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol\u002Fblob\u002Fmain\u002Fplugins\u002Fcopilot-plugin\u002Fskills\u002Fahp-client\u002FSKILL.md",[],[143,129,144,25,22,145,23,86,37,146,147,148,135],"client","websocket","connect","message","control","via"]