Skip to content

Commit aa3cca0

Browse files
authored
docs: reconcile stable and draft protocol pages (#2541)
* docs: reconcile stable and draft protocol pages and check them in CI The stable and draft copies of each protocol page had drifted: clarifications for stable features existed only in the draft, and some stable text was missing from the draft. Reconciled (v1 and v2): - Backported to stable: the tool `name` description, the auth-flow and notice bullets in the overviews, the notice and compaction fallback sentences, the terminal-auth initialize example, the model_config context_size example, v1 session-setup notes, and the v1 file-system roots note. - Forwarded to draft: the v1 Conventions section and Message IDs heading, the v2 extension-capabilities sentence, and the current cancellation wording. - Fixed v2 links to initialization#prompt-capabilities, which is #session-prompt-capabilities. scripts/check_draft_docs.py compares each pair after normalizing link prefixes, wrapping and table padding, and checks the remaining differences against a committed baseline in scripts/draft-differences/. It runs in npm run check and CI. * docs: drop the draft docs CI check, keep the reconciliation
1 parent 01b1eab commit aa3cca0

21 files changed

Lines changed: 198 additions & 61 deletions

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ All paths in the protocol should be absolute
3333
## Updating existing methods, their params, or output
3434

3535
- Update the mintlify docs and guides in the `docs` directory
36+
- Make the same change in both the stable page and its `draft/` copy, unless the change is draft-only
3637
- Run `npm run check` to make sure the json and zod schemas gets generated properly
3738

3839
Never write readme files related to the conversation unless explicitly asked to.

‎docs/protocol/v1/draft/cancellation.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The JSON-RPC specification doesn't define any standard mechanism for request can
1111

1212
In order to provide a consistent approach to cancellation, ACP defines a `$/cancel_request` notification that can be sent to cancel requests.
1313

14-
Cancellation will remain optional as it might not be implementable in all clients or servers. For example if the implementation uses a single threaded synchronous programming language then there is little it can do to react to a `$/cancel_request` notification.
14+
Cancellation remains optional as it might not be implementable in all clients or servers. For example if the implementation uses a single threaded synchronous programming language then there is little it can do to react to a `$/cancel_request` notification.
1515

1616
When a `$/cancel_request` notification is received by a supporting implementation, the implementation:
1717

@@ -23,7 +23,7 @@ When a `$/cancel_request` notification is received by a supporting implementatio
2323

2424
The calling side **MAY** implement graceful cancellation processing by waiting for the response from the remote side.
2525

26-
Cancellation **MAY** also be done explicitly on a per-feature basis within the protocol to cover specific scenarios (e.g., cancellation of a [prompt turn](/protocol/v1/draft/prompt-turn#cancellation))
26+
Cancellation **MAY** also be done explicitly on a per-feature basis within the protocol to cover specific scenarios, such as cancellation of a [prompt turn](/protocol/v1/draft/prompt-turn#cancellation).
2727

2828
## Internal Cancellation
2929

‎docs/protocol/v1/draft/overview.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ All methods follow standard JSON-RPC 2.0 [error handling](https://www.jsonrpc.or
240240

241241
See [Errors](/protocol/v1/draft/error) for the error codes ACP uses and when to use them.
242242

243+
## Conventions
244+
245+
Unless explicitly defined otherwise in the schema, ACP-defined JSON object property keys use `camelCase`. String values carried by discriminator fields use `snake_case`. The JSON-RPC envelope fields (`jsonrpc`, `id`, `method`, `params`, `result`, and `error`) follow the JSON-RPC 2.0 specification.
246+
243247
## Extensibility
244248

245249
The protocol provides built-in mechanisms for adding custom functionality while maintaining compatibility:

‎docs/protocol/v1/draft/prompt-turn.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ The Agent then reports text responses from the model:
261261
}
262262
```
263263

264+
#### Message IDs
265+
264266
The Agent **MAY** include an opaque, unique `messageId` on message chunks. Chunks with the same `messageId` belong to the same message; a changed `messageId` indicates a new message.
265267

266268
If the model requested tool calls, these are also reported immediately:

‎docs/protocol/v1/draft/session-setup.mdx‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,16 @@ To load an existing session, Clients **MUST** call the `session/load` method wit
136136
The Agent **MUST** replay the entire conversation to the Client in the form of
137137
`session/update` notifications (like `session/prompt`).
138138

139-
- [Session compactions](/protocol/v1/draft/prompt-turn#session-compaction) are
140-
replayed using the same update, chunk, and patch semantics as live delivery.
141-
The Client's `session.compaction` capability is required for replay as well as
142-
live delivery.
143-
- Live-only [notices](/protocol/v1/draft/prompt-turn#session-notices) are not
144-
conversation history and **SHOULD NOT** be replayed. If the underlying
145-
condition is still relevant after loading finishes, the Agent may emit a new
146-
notice as a new live event, subject to the Client's `session.notices`
147-
capability.
139+
[Session compactions](/protocol/v1/draft/prompt-turn#session-compaction) are
140+
replayed using the same update, chunk, and patch semantics as live delivery.
141+
The Client's `session.compaction` capability is required for replay as well as
142+
live delivery.
143+
144+
Live-only [notices](/protocol/v1/draft/prompt-turn#session-notices) are not
145+
conversation history and **SHOULD NOT** be replayed. If the underlying
146+
condition is still relevant after loading finishes, the Agent may emit a new
147+
notice as a new live event, subject to the Client's `session.notices`
148+
capability.
148149

149150
For example, a user message from the conversation history:
150151

‎docs/protocol/v1/file-system.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ The `fs/read_text_file` method allows Agents to read text file contents from the
4747
```
4848

4949
<ParamField path="sessionId" type="SessionId" required>
50-
The [Session ID](/protocol/v1/session-setup#session-id) for this request
50+
The [Session ID](/protocol/v1/session-setup#session-id) for this request. The
51+
session determines which filesystem roots are in scope for the path.
5152
</ParamField>
5253

5354
<ParamField path="path" type="string" required>
@@ -92,7 +93,8 @@ The `fs/write_text_file` method allows Agents to write or update text files in t
9293
```
9394

9495
<ParamField path="sessionId" type="SessionId" required>
95-
The [Session ID](/protocol/v1/session-setup#session-id) for this request
96+
The [Session ID](/protocol/v1/session-setup#session-id) for this request. The
97+
session determines which filesystem roots are in scope for the path.
9698
</ParamField>
9799

98100
<ParamField path="path" type="string" required>

‎docs/protocol/v1/initialization.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ They **SHOULD** also provide a name and version to the Agent.
3636
"params": {
3737
"protocolVersion": 1,
3838
"clientCapabilities": {
39+
"auth": {
40+
"terminal": true
41+
},
3942
"fs": {
4043
"readTextFile": true,
4144
"writeTextFile": true

‎docs/protocol/v1/overview.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ A typical flow follows this pattern:
2020
<Step title="Initialization Phase">
2121

2222
- Client → Agent: `initialize` to establish connection
23-
- Client → Agent: `authenticate` if required by the Agent
23+
- Client: completes an advertised authentication flow if required; for example,
24+
`authenticate` for an Agent-handled method or launch and reconnect for a
25+
terminal method
2426

2527
</Step>
2628

@@ -33,7 +35,7 @@ A typical flow follows this pattern:
3335

3436
<Step title="Prompt Turn">
3537
- Client → Agent: `session/prompt` to send user message
36-
- Agent → Client: `session/update` notifications for progress updates
38+
- Agent → Client: `session/update` notifications for progress updates and user-facing notices
3739
- Agent → Client: File operations or permission requests as needed
3840
- Client → Agent: `session/cancel` to interrupt processing if needed
3941
- Turn ends and the Agent sends the `session/prompt` response with a stop reason

‎docs/protocol/v1/session-config-options.mdx‎

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Session Config Options"
33
description: "Flexible configuration selectors for agent sessions"
44
---
55

6-
Agents can provide an arbitrary list of configuration options for a session, allowing Clients to offer users customizable selectors for things like models, modes, reasoning levels, and more.
6+
Agents can provide an arbitrary list of configuration options for a session, allowing Clients to offer users customizable selectors for things like models, model parameters, modes, reasoning levels, and more.
77

88
<Info>
99
Session Config Options are the preferred way to expose session-level
@@ -61,6 +61,23 @@ During [Session Setup](/protocol/v1/session-setup) the Agent **MAY** return a li
6161
"description": "The most powerful model"
6262
}
6363
]
64+
},
65+
{
66+
"id": "context_size",
67+
"name": "Context Size",
68+
"category": "model_config",
69+
"type": "select",
70+
"currentValue": "200k",
71+
"options": [
72+
{
73+
"value": "200k",
74+
"name": "200K"
75+
},
76+
{
77+
"value": "1m",
78+
"name": "1M"
79+
}
80+
]
6481
}
6582
]
6683
}
@@ -327,6 +344,23 @@ The Agent **MUST** respond with the complete list of all configuration options a
327344
"description": "The most powerful model"
328345
}
329346
]
347+
},
348+
{
349+
"id": "context_size",
350+
"name": "Context Size",
351+
"category": "model_config",
352+
"type": "select",
353+
"currentValue": "200k",
354+
"options": [
355+
{
356+
"value": "200k",
357+
"name": "200K"
358+
},
359+
{
360+
"value": "1m",
361+
"name": "1M"
362+
}
363+
]
330364
}
331365
]
332366
}
@@ -391,6 +425,23 @@ The Agent can also change configuration options and notify the Client by sending
391425
"description": "The most powerful model"
392426
}
393427
]
428+
},
429+
{
430+
"id": "context_size",
431+
"name": "Context Size",
432+
"category": "model_config",
433+
"type": "select",
434+
"currentValue": "200k",
435+
"options": [
436+
{
437+
"value": "200k",
438+
"name": "200K"
439+
},
440+
{
441+
"value": "1m",
442+
"name": "1M"
443+
}
444+
]
394445
}
395446
]
396447
}

‎docs/protocol/v1/session-setup.mdx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Sessions represent a specific conversation or thread between the [Client](/proto
77

88
Before creating a session, Clients **MUST** first complete the [initialization](/protocol/v1/initialization) phase to establish protocol compatibility and capabilities.
99

10+
If the Agent requires authentication, `session/new` may fail with an `auth_required` error until the Client completes the [authentication flow](/protocol/v1/authentication).
11+
1012
<br />
1113

1214
```mermaid
@@ -82,7 +84,7 @@ The Agent **MUST** respond with a unique [Session ID](#session-id) that identifi
8284

8385
## Loading Sessions
8486

85-
Agents that support the `loadSession` capability allow Clients to resume previous conversations. This feature enables persistence across restarts and sharing sessions between different Client instances.
87+
Agents that support the `loadSession` capability allow Clients to resume previous conversations with history replay. This feature enables persistence across restarts and sharing sessions between different Client instances.
8688

8789
### Checking Support
8890

@@ -196,6 +198,8 @@ When **all** the conversation entries have been streamed to the Client, the Agen
196198
}
197199
```
198200

201+
The response **MAY** also include initial mode, model, or session configuration state when those features are supported by the Agent.
202+
199203
The Client can then continue sending prompts as if the session was never interrupted.
200204

201205
## Resuming Sessions

0 commit comments

Comments
 (0)