RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/microsoft/vscode

AGENTS.md

src/vs/platform/agentHost/common/state/AGENTS.md
AGENTS.md

Quality

64/100

Scores the file, not the repository.

Length

551 words

9 headings · 0 code blocks

Repository

188k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
microsoft/vscode/src/vs/platform/agentHost/common/state/AGENTS.mdRawGitHub
1# Protocol versioning instructions
2 
3This directory contains the VS Code-facing wrappers around the Agent Host
4Protocol (AHP) state model. Read this before modifying protocol types.
5 
6## Overview
7 
8- `sessionState.ts`, `sessionActions.ts`, `sessionReducers.ts`, and
9 `sessionProtocol.ts` are VS Code-facing wrappers and re-exports.
10- `protocol/**` is generated from the sibling `agent-host-protocol` repo by
11 `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 helper
15 functions. There is no `versions/` directory in this tree.
16 
17## Current changeset surface
18 
19The generated protocol includes the Changesets model:
20 
21- `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`, and
24 `cleared`.
25- `invokeChangesetOperation` lets clients invoke server-defined verbs against a
26 changeset. The wire command and dispatch path exist even when no concrete
27 operations are advertised yet.
28- Changeset actions are scoped to an expanded changeset URI
29 (`<sessionUri>/changeset/<id>`); see `../changesetUri.ts` for the build/parse
30 helpers.
31- Session teardown uses `changeset/cleared` plus the corresponding
32 session-level lifecycle notification. There is no separate `changeset/disposed`
33 action in the VS Code protocol copy.
34 
35## Updating generated protocol types
36 
371. 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 wrapper
40 files in this directory after the sync.
414. Compile. The generated registry catches missing action/notification version
42 map entries.
43 
44## Adding optional fields to existing types
45 
46Optional protocol fields are usually backwards-compatible. Add the field in the
47source protocol repo, sync `protocol/**`, and add wrapper exports only when VS
48Code code needs them.
49 
50## Adding new action types
51 
52Adding a new server-produced action type is backwards-compatible when old clients
53can ignore it safely. Old clients at the same protocol version ignore unknown
54action types by leaving reducer state unchanged.
55 
561. Add the action interface and union membership in the source protocol repo.
572. Add the action to `ACTION_INTRODUCED_IN` in
58 `protocol/version/registry.ts` through the generated sync.
593. Add the reducer case in the source protocol repo and sync it into
60 `protocol/reducers.ts`.
614. Re-export the new action from `sessionActions.ts` when VS Code callers need
62 the type directly.
635. Update `../../../protocol.md` and any affected AHP docs.
64 
65## When to bump the protocol version
66 
67Bump `PROTOCOL_VERSION` in `protocol/version/registry.ts` when you need a
68capability boundary; for example, when a client must know whether the server
69supports a feature before sending a command or rendering UI.
70 
71When bumping:
72 
731. Update the source protocol repo's version registry and sync it into
74 `protocol/version/registry.ts`.
752. Assign new action and notification types to the new version in
76 `ACTION_INTRODUCED_IN` or `NOTIFICATION_INTRODUCED_IN`.
773. Update capability types when the feature needs client-visible capability
78 negotiation.
794. Update `../../../protocol.md` version history and affected AHP docs.
80 
81## Adding new notification types
82 
83Use the same process as new action types, but register the new notification in
84`NOTIFICATION_INTRODUCED_IN`.
85 
86## What the compiler catches
87 
88| 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 

Commands it names

  • npx tsx scripts/sync-agent-host-protocol.ts

Sections

  • Protocol versioning instructions
  • Overview
  • Current changeset surface
  • Updating generated protocol types
  • Adding optional fields to existing types
  • Adding new action types
  • When to bump the protocol version
  • Adding new notification types
  • What the compiler catches

What it covers

buildarchitecturetypesgit-prdeploymentagent-behaviour

Stack — with the evidence

typescript

(1.00)

node

(1.00)

javascript

(0.60)

eslint

(0.60)

github-actions

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
microsoft
Language
—
License
—
Archived
no

All configs in this repo

Also in microsoft/vscode

Diff this repo’s formats

One 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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
microsoft/vscode.github/instructions/accessibility.instructions.md · 188kCopilot instructionstypescriptnode+3styledo-not61/1003 days ago
microsoft/vscode.github/instructions/chat.instructions.md · 188kCopilot instructionstypescriptnode+3no sections39/1003 days ago
microsoft/vscodeextensions/copilot/src/platform/authentication/common/AGENTS.md · 188kAGENTS.mdtypescriptnode+3archsecurityagent-behaviour58/1003 days ago
microsoft/vscode.github/copilot-instructions.md · 188kCopilot instructionstypescriptnode+3stylearchtypesui+274/1002 days ago
microsoft/vscode.github/instructions/agentHostTesting.instructions.md · 188kCopilot instructionstypescriptnode+3teststyletesting-strategyagent-behaviour55/1003 days ago
microsoft/vscode.github/instructions/ai-customization.instructions.md · 188kCopilot instructionstypescriptnode+3archtypesui58/1003 days ago
microsoft/vscode.github/instructions/best-practices.instructions.md · 188kCopilot instructionstypescriptnode+3styleui60/1003 days ago
microsoft/vscode.github/instructions/buildNext.instructions.md · 188kCopilot instructionstypescriptnode+3setupbuildtestarch+166/1003 days ago
microsoft/vscode.github/instructions/coding-guidelines.instructions.md · 188kCopilot instructionstypescriptnode+3styletypesuidocs60/1003 days ago
microsoft/vscode.github/instructions/committing.instructions.md · 188kCopilot instructionstypescriptnode+3do-not23/1003 days ago
microsoft/vscode.github/instructions/css-best-practices.instructions.md · 188kCopilot instructionstypescriptnode+3styleui29/1003 days ago
microsoft/vscode.github/instructions/design-philosophy.instructions.md · 188kCopilot instructionstypescriptnode+3style34/1003 days ago
microsoft/vscode.github/instructions/design-tokens.instructions.md · 188kCopilot instructionstypescriptnode+3styledo-not65/1003 days ago
microsoft/vscode.github/instructions/disposable.instructions.md · 188kCopilot instructionstypescriptnode+3no sections16/1003 days ago
microsoft/vscode.github/instructions/interactive.instructions.md · 188kCopilot instructionstypescriptnode+3ui43/1003 days ago
microsoft/vscode.github/instructions/kusto.instructions.md · 188kCopilot instructionstypescriptnode+3agent-behaviour16/1003 days ago
microsoft/vscode.github/instructions/learnings.instructions.md · 188kCopilot instructionstypescriptnode+3style40/1003 days ago
microsoft/vscode.github/instructions/notebook.instructions.md · 188kCopilot instructionstypescriptnode+3no sections48/1003 days ago
microsoft/vscode.github/instructions/observables.instructions.md · 188kCopilot instructionstypescriptnode+3no sections40/1003 days ago
microsoft/vscode.github/instructions/oss-third-party-notices.instructions.md · 188kCopilot instructionstypescriptnode+3buildgitdependenciesdeployment+165/1003 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.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
wpscanteam/wpscanAGENTS.md · 9.7kAGENTS.mdrubyvue+3setupbuildteststyle+6100/1002 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
trick77/agents-md-syncAGENTS.md · 2AGENTS.mdtypescriptnode+4setupbuildteststyle+5100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack