AGENTS.md
src/vs/platform/agentHost/common/state/AGENTS.mdAGENTS.md
Quality
64/100
Scores the file, not the repository.Length
551 words
9 headings · 0 code blocksRepository
188k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Protocol versioning instructions23This directory contains the VS Code-facing wrappers around the Agent Host4Protocol (AHP) state model. Read this before modifying protocol types.56## Overview78- `sessionState.ts`, `sessionActions.ts`, `sessionReducers.ts`, and9 `sessionProtocol.ts` are VS Code-facing wrappers and re-exports.10- `protocol/**` is generated from the sibling `agent-host-protocol` repo by11 `scripts/sync-agent-host-protocol.ts`. Generated files carry a `DO NOT EDIT`12 banner; update the source protocol repo and sync the copy into VS Code.13- `protocol/version/registry.ts` contains `PROTOCOL_VERSION`,14 `ACTION_INTRODUCED_IN`, `NOTIFICATION_INTRODUCED_IN`, and version helper15 functions. There is no `versions/` directory in this tree.1617## Current changeset surface1819The generated protocol includes the Changesets model:2021- `SessionSummary.changesets` is the lightweight catalogue shown in lists.22- The old `session/diffsChanged` shape is replaced by five `changeset/*`23 actions: `statusChanged`, `fileSet`, `fileRemoved`, `operationsChanged`, and24 `cleared`.25- `invokeChangesetOperation` lets clients invoke server-defined verbs against a26 changeset. The wire command and dispatch path exist even when no concrete27 operations are advertised yet.28- Changeset actions are scoped to an expanded changeset URI29 (`<sessionUri>/changeset/<id>`); see `../changesetUri.ts` for the build/parse30 helpers.31- Session teardown uses `changeset/cleared` plus the corresponding32 session-level lifecycle notification. There is no separate `changeset/disposed`33 action in the VS Code protocol copy.3435## Updating generated protocol types36371. Update the source files in the sibling `agent-host-protocol` repo.382. Run `npx tsx scripts/sync-agent-host-protocol.ts` from the VS Code repo.393. If VS Code consumers need short aliases or type guards, update the wrapper40 files in this directory after the sync.414. Compile. The generated registry catches missing action/notification version42 map entries.4344## Adding optional fields to existing types4546Optional protocol fields are usually backwards-compatible. Add the field in the47source protocol repo, sync `protocol/**`, and add wrapper exports only when VS48Code code needs them.4950## Adding new action types5152Adding a new server-produced action type is backwards-compatible when old clients53can ignore it safely. Old clients at the same protocol version ignore unknown54action types by leaving reducer state unchanged.55561. Add the action interface and union membership in the source protocol repo.572. Add the action to `ACTION_INTRODUCED_IN` in58 `protocol/version/registry.ts` through the generated sync.593. Add the reducer case in the source protocol repo and sync it into60 `protocol/reducers.ts`.614. Re-export the new action from `sessionActions.ts` when VS Code callers need62 the type directly.635. Update `../../../protocol.md` and any affected AHP docs.6465## When to bump the protocol version6667Bump `PROTOCOL_VERSION` in `protocol/version/registry.ts` when you need a68capability boundary; for example, when a client must know whether the server69supports a feature before sending a command or rendering UI.7071When bumping:72731. Update the source protocol repo's version registry and sync it into74 `protocol/version/registry.ts`.752. Assign new action and notification types to the new version in76 `ACTION_INTRODUCED_IN` or `NOTIFICATION_INTRODUCED_IN`.773. Update capability types when the feature needs client-visible capability78 negotiation.794. Update `../../../protocol.md` version history and affected AHP docs.8081## Adding new notification types8283Use the same process as new action types, but register the new notification in84`NOTIFICATION_INTRODUCED_IN`.8586## What the compiler catches8788| Mistake | Compile error |89| --------------------------------------------------------------------- | ------------------------------- |90| Add action to union, forget `ACTION_INTRODUCED_IN` entry | Mapped type index is incomplete |91| Add notification to union, forget `NOTIFICATION_INTRODUCED_IN` entry | Mapped type index is incomplete |92| Remove action or notification type that the registry still references | Registry key no longer exists |93
Also in microsoft/vscode
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| microsoft/vscode.github/instructions/accessibility.instructions.md · 188k | Copilot instructions | styledo-not | 61/100 | 3 days ago | |
| microsoft/vscode.github/instructions/chat.instructions.md · 188k | Copilot instructions | no sections | 39/100 | 3 days ago | |
| microsoft/vscodeextensions/copilot/src/platform/authentication/common/AGENTS.md · 188k | AGENTS.md | archsecurityagent-behaviour | 58/100 | 3 days ago | |
| microsoft/vscode.github/copilot-instructions.md · 188k | Copilot instructions | stylearchtypesui+2 | 74/100 | 2 days ago | |
| microsoft/vscode.github/instructions/agentHostTesting.instructions.md · 188k | Copilot instructions | teststyletesting-strategyagent-behaviour | 55/100 | 3 days ago | |
| microsoft/vscode.github/instructions/ai-customization.instructions.md · 188k | Copilot instructions | archtypesui | 58/100 | 3 days ago | |
| microsoft/vscode.github/instructions/best-practices.instructions.md · 188k | Copilot instructions | styleui | 60/100 | 3 days ago | |
| microsoft/vscode.github/instructions/buildNext.instructions.md · 188k | Copilot instructions | setupbuildtestarch+1 | 66/100 | 3 days ago | |
| microsoft/vscode.github/instructions/coding-guidelines.instructions.md · 188k | Copilot instructions | styletypesuidocs | 60/100 | 3 days ago | |
| microsoft/vscode.github/instructions/committing.instructions.md · 188k | Copilot instructions | do-not | 23/100 | 3 days ago | |
| microsoft/vscode.github/instructions/css-best-practices.instructions.md · 188k | Copilot instructions | styleui | 29/100 | 3 days ago | |
| microsoft/vscode.github/instructions/design-philosophy.instructions.md · 188k | Copilot instructions | style | 34/100 | 3 days ago | |
| microsoft/vscode.github/instructions/design-tokens.instructions.md · 188k | Copilot instructions | styledo-not | 65/100 | 3 days ago | |
| microsoft/vscode.github/instructions/disposable.instructions.md · 188k | Copilot instructions | no sections | 16/100 | 3 days ago | |
| microsoft/vscode.github/instructions/interactive.instructions.md · 188k | Copilot instructions | ui | 43/100 | 3 days ago | |
| microsoft/vscode.github/instructions/kusto.instructions.md · 188k | Copilot instructions | agent-behaviour | 16/100 | 3 days ago | |
| microsoft/vscode.github/instructions/learnings.instructions.md · 188k | Copilot instructions | style | 40/100 | 3 days ago | |
| microsoft/vscode.github/instructions/notebook.instructions.md · 188k | Copilot instructions | no sections | 48/100 | 3 days ago | |
| microsoft/vscode.github/instructions/observables.instructions.md · 188k | Copilot instructions | no sections | 40/100 | 3 days ago | |
| microsoft/vscode.github/instructions/oss-third-party-notices.instructions.md · 188k | Copilot instructions | buildgitdependenciesdeployment+1 | 65/100 | 3 days ago |
Diff against .github/instructions/accessibility.instructions.md Diff against .github/instructions/chat.instructions.md Diff against extensions/copilot/src/platform/authentication/common/AGENTS.md Diff against .github/copilot-instructions.md Diff against .github/instructions/agentHostTesting.instructions.md Diff against .github/instructions/ai-customization.instructions.md Diff against .github/instructions/best-practices.instructions.md Diff against .github/instructions/buildNext.instructions.md Diff against .github/instructions/coding-guidelines.instructions.md Diff against .github/instructions/committing.instructions.md Diff against .github/instructions/css-best-practices.instructions.md Diff against .github/instructions/design-philosophy.instructions.md Diff against .github/instructions/design-tokens.instructions.md Diff against .github/instructions/disposable.instructions.md Diff against .github/instructions/interactive.instructions.md Diff against .github/instructions/kusto.instructions.md Diff against .github/instructions/learnings.instructions.md Diff against .github/instructions/notebook.instructions.md Diff against .github/instructions/observables.instructions.md Diff against .github/instructions/oss-third-party-notices.instructions.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago |
