Skip to content

Commit 6fa24c3

Browse files
committed
Hide terminal from docs
1 parent 91e42cd commit 6fa24c3

5 files changed

Lines changed: 122 additions & 206 deletions

File tree

docs/protocol/schema.mdx

Lines changed: 3 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -517,121 +517,6 @@ See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protoc
517517
The actual update content.
518518
</ResponseField>
519519

520-
<a id="terminal-create"></a>
521-
### <span class="font-mono">terminal/create</span>
522-
523-
#### <span class="font-mono">CreateTerminalRequest</span>
524-
525-
**Type:** Object
526-
527-
**Properties:**
528-
529-
<ResponseField name="args" type={<><span>"string"</span><span>[]</span></>} >
530-
</ResponseField>
531-
<ResponseField name="command" type={"string"} required>
532-
</ResponseField>
533-
<ResponseField name="cwd" type={"string | null"} >
534-
</ResponseField>
535-
<ResponseField name="env" type={<><span><a href="#envvariable">EnvVariable</a></span><span>[]</span></>} >
536-
</ResponseField>
537-
<ResponseField name="outputByteLimit" type={"integer | null"} >
538-
539-
- Minimum: `0`
540-
541-
</ResponseField>
542-
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
543-
</ResponseField>
544-
545-
#### <span class="font-mono">CreateTerminalResponse</span>
546-
547-
**Type:** Object
548-
549-
**Properties:**
550-
551-
<ResponseField name="terminalId" type={"string"} required></ResponseField>
552-
553-
<a id="terminal-output"></a>
554-
### <span class="font-mono">terminal/output</span>
555-
556-
#### <span class="font-mono">TerminalOutputRequest</span>
557-
558-
**Type:** Object
559-
560-
**Properties:**
561-
562-
<ResponseField
563-
name="sessionId"
564-
type={<a href="#sessionid">SessionId</a>}
565-
required
566-
></ResponseField>
567-
<ResponseField name="terminalId" type={"string"} required></ResponseField>
568-
569-
#### <span class="font-mono">TerminalOutputResponse</span>
570-
571-
**Type:** Object
572-
573-
**Properties:**
574-
575-
<ResponseField
576-
name="exitStatus"
577-
type={
578-
<>
579-
<span>
580-
<a href="#terminalexitstatus">TerminalExitStatus</a>
581-
</span>
582-
<span> | null</span>
583-
</>
584-
}
585-
></ResponseField>
586-
<ResponseField name="output" type={"string"} required></ResponseField>
587-
<ResponseField name="truncated" type={"boolean"} required></ResponseField>
588-
589-
<a id="terminal-release"></a>
590-
### <span class="font-mono">terminal/release</span>
591-
592-
#### <span class="font-mono">ReleaseTerminalRequest</span>
593-
594-
**Type:** Object
595-
596-
**Properties:**
597-
598-
<ResponseField
599-
name="sessionId"
600-
type={<a href="#sessionid">SessionId</a>}
601-
required
602-
></ResponseField>
603-
<ResponseField name="terminalId" type={"string"} required></ResponseField>
604-
605-
<a id="terminal-wait_for_exit"></a>
606-
### <span class="font-mono">terminal/wait_for_exit</span>
607-
608-
#### <span class="font-mono">WaitForTerminalExitRequest</span>
609-
610-
**Type:** Object
611-
612-
**Properties:**
613-
614-
<ResponseField
615-
name="sessionId"
616-
type={<a href="#sessionid">SessionId</a>}
617-
required
618-
></ResponseField>
619-
<ResponseField name="terminalId" type={"string"} required></ResponseField>
620-
621-
#### <span class="font-mono">WaitForTerminalExitResponse</span>
622-
623-
**Type:** Object
624-
625-
**Properties:**
626-
627-
<ResponseField name="exitCode" type={"integer | null"} >
628-
629-
- Minimum: `0`
630-
631-
</ResponseField>
632-
<ResponseField name="signal" type={"string | null"} >
633-
</ResponseField>
634-
635520
## <span class="font-mono">AgentCapabilities</span>
636521

637522
Capabilities supported by the agent.
@@ -753,6 +638,9 @@ Determines which file operations the agent can request.
753638

754639
</ResponseField>
755640
<ResponseField name="terminal" type={"boolean"} >
641+
**UNSTABLE**
642+
643+
This capability is not part of the spec yet, and may be removed or changed at any point.
756644

757645
- Default: `false`
758646

@@ -1615,20 +1503,6 @@ response to confirm successful cancellation.
16151503

16161504
</ResponseField>
16171505

1618-
## <span class="font-mono">TerminalExitStatus</span>
1619-
1620-
**Type:** Object
1621-
1622-
**Properties:**
1623-
1624-
<ResponseField name="exitCode" type={"integer | null"} >
1625-
1626-
- Minimum: `0`
1627-
1628-
</ResponseField>
1629-
<ResponseField name="signal" type={"string | null"} >
1630-
</ResponseField>
1631-
16321506
## <span class="font-mono">TextContent</span>
16331507

16341508
Text provided to or from an LLM.

rust/client.rs

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,41 +54,59 @@ pub trait Client {
5454
args: ReadTextFileRequest,
5555
) -> impl Future<Output = Result<ReadTextFileResponse, Error>>;
5656

57+
/// Handles session update notifications from the agent.
58+
///
59+
/// This is a notification endpoint (no response expected) that receives
60+
/// real-time updates about session progress, including message chunks,
61+
/// tool calls, and execution plans.
62+
///
63+
/// Note: Clients SHOULD continue accepting tool call updates even after
64+
/// sending a `session/cancel` notification, as the agent may send final
65+
/// updates before responding with the cancelled stop reason.
66+
///
67+
/// See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
68+
fn session_notification(
69+
&self,
70+
args: SessionNotification,
71+
) -> impl Future<Output = Result<(), Error>>;
72+
73+
// Experimental terminal support
74+
75+
/// **UNSTABLE**
76+
///
77+
/// This method is not part of the spec, and may be removed or changed at any point.
78+
#[doc(hidden)]
5779
fn create_terminal(
5880
&self,
5981
args: CreateTerminalRequest,
6082
) -> impl Future<Output = Result<CreateTerminalResponse, Error>>;
6183

84+
/// **UNSTABLE**
85+
///
86+
/// This method is not part of the spec, and may be removed or changed at any point.
87+
#[doc(hidden)]
6288
fn terminal_output(
6389
&self,
6490
args: TerminalOutputRequest,
6591
) -> impl Future<Output = Result<TerminalOutputResponse, Error>>;
6692

93+
/// **UNSTABLE**
94+
///
95+
/// This method is not part of the spec, and may be removed or changed at any point.
96+
#[doc(hidden)]
6797
fn release_terminal(
6898
&self,
6999
args: ReleaseTerminalRequest,
70100
) -> impl Future<Output = Result<(), Error>>;
71101

102+
/// **UNSTABLE**
103+
///
104+
/// This method is not part of the spec, and may be removed or changed at any point.
105+
#[doc(hidden)]
72106
fn wait_for_terminal_exit(
73107
&self,
74108
args: WaitForTerminalExitRequest,
75109
) -> impl Future<Output = Result<WaitForTerminalExitResponse, Error>>;
76-
77-
/// Handles session update notifications from the agent.
78-
///
79-
/// This is a notification endpoint (no response expected) that receives
80-
/// real-time updates about session progress, including message chunks,
81-
/// tool calls, and execution plans.
82-
///
83-
/// Note: Clients SHOULD continue accepting tool call updates even after
84-
/// sending a `session/cancel` notification, as the agent may send final
85-
/// updates before responding with the cancelled stop reason.
86-
///
87-
/// See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
88-
fn session_notification(
89-
&self,
90-
args: SessionNotification,
91-
) -> impl Future<Output = Result<(), Error>>;
92110
}
93111

94112
// Session updates
@@ -277,7 +295,7 @@ impl std::fmt::Display for TerminalId {
277295
}
278296

279297
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
280-
#[schemars(extend("x-side" = "client", "x-method" = "terminal/create"))]
298+
#[schemars(extend("x-docs-ignore" = true))]
281299
#[serde(rename_all = "camelCase")]
282300
pub struct CreateTerminalRequest {
283301
pub session_id: SessionId,
@@ -293,22 +311,22 @@ pub struct CreateTerminalRequest {
293311
}
294312

295313
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
296-
#[schemars(extend("x-side" = "client", "x-method" = "terminal/create"))]
314+
#[schemars(extend("x-docs-ignore" = true))]
297315
#[serde(rename_all = "camelCase")]
298316
pub struct CreateTerminalResponse {
299317
pub terminal_id: TerminalId,
300318
}
301319

302320
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
303-
#[schemars(extend("x-side" = "client", "x-method" = "terminal/output"))]
321+
#[schemars(extend("x-docs-ignore" = true))]
304322
#[serde(rename_all = "camelCase")]
305323
pub struct TerminalOutputRequest {
306324
pub session_id: SessionId,
307325
pub terminal_id: TerminalId,
308326
}
309327

310328
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
311-
#[schemars(extend("x-side" = "client", "x-method" = "terminal/output"))]
329+
#[schemars(extend("x-docs-ignore" = true))]
312330
#[serde(rename_all = "camelCase")]
313331
pub struct TerminalOutputResponse {
314332
pub output: String,
@@ -317,30 +335,31 @@ pub struct TerminalOutputResponse {
317335
}
318336

319337
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
320-
#[schemars(extend("x-side" = "client", "x-method" = "terminal/release"))]
338+
#[schemars(extend("x-docs-ignore" = true))]
321339
#[serde(rename_all = "camelCase")]
322340
pub struct ReleaseTerminalRequest {
323341
pub session_id: SessionId,
324342
pub terminal_id: TerminalId,
325343
}
326344

327345
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
328-
#[schemars(extend("x-side" = "client", "x-method" = "terminal/wait_for_exit"))]
346+
#[schemars(extend("x-docs-ignore" = true))]
329347
#[serde(rename_all = "camelCase")]
330348
pub struct WaitForTerminalExitRequest {
331349
pub session_id: SessionId,
332350
pub terminal_id: TerminalId,
333351
}
334352

335353
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
336-
#[schemars(extend("x-side" = "client", "x-method" = "terminal/wait_for_exit"))]
354+
#[schemars(extend("x-docs-ignore" = true))]
337355
#[serde(rename_all = "camelCase")]
338356
pub struct WaitForTerminalExitResponse {
339357
#[serde(flatten)]
340358
pub exit_status: TerminalExitStatus,
341359
}
342360

343361
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
362+
#[schemars(extend("x-docs-ignore" = true))]
344363
#[serde(rename_all = "camelCase")]
345364
pub struct TerminalExitStatus {
346365
pub exit_code: Option<u32>,
@@ -362,7 +381,12 @@ pub struct ClientCapabilities {
362381
/// Determines which file operations the agent can request.
363382
#[serde(default)]
364383
pub fs: FileSystemCapability,
384+
385+
/// **UNSTABLE**
386+
///
387+
/// This capability is not part of the spec yet, and may be removed or changed at any point.
365388
#[serde(default)]
389+
#[doc(hidden)]
366390
pub terminal: bool,
367391
}
368392

schema/schema.json

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
},
211211
"terminal": {
212212
"default": false,
213+
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.",
213214
"type": "boolean"
214215
}
215216
},
@@ -466,8 +467,7 @@
466467
},
467468
"required": ["sessionId", "command"],
468469
"type": "object",
469-
"x-method": "terminal/create",
470-
"x-side": "client"
470+
"x-docs-ignore": true
471471
},
472472
"CreateTerminalResponse": {
473473
"properties": {
@@ -477,8 +477,7 @@
477477
},
478478
"required": ["terminalId"],
479479
"type": "object",
480-
"x-method": "terminal/create",
481-
"x-side": "client"
480+
"x-docs-ignore": true
482481
},
483482
"EmbeddedResource": {
484483
"description": "The contents of a resource, embedded into a prompt or tool call result.",
@@ -945,8 +944,7 @@
945944
},
946945
"required": ["sessionId", "terminalId"],
947946
"type": "object",
948-
"x-method": "terminal/release",
949-
"x-side": "client"
947+
"x-docs-ignore": true
950948
},
951949
"RequestPermissionOutcome": {
952950
"description": "The outcome of a permission request.",
@@ -1292,7 +1290,8 @@
12921290
"type": ["string", "null"]
12931291
}
12941292
},
1295-
"type": "object"
1293+
"type": "object",
1294+
"x-docs-ignore": true
12961295
},
12971296
"TerminalOutputRequest": {
12981297
"properties": {
@@ -1305,8 +1304,7 @@
13051304
},
13061305
"required": ["sessionId", "terminalId"],
13071306
"type": "object",
1308-
"x-method": "terminal/output",
1309-
"x-side": "client"
1307+
"x-docs-ignore": true
13101308
},
13111309
"TerminalOutputResponse": {
13121310
"properties": {
@@ -1329,8 +1327,7 @@
13291327
},
13301328
"required": ["output", "truncated"],
13311329
"type": "object",
1332-
"x-method": "terminal/output",
1333-
"x-side": "client"
1330+
"x-docs-ignore": true
13341331
},
13351332
"TextContent": {
13361333
"description": "Text provided to or from an LLM.",
@@ -1631,8 +1628,7 @@
16311628
},
16321629
"required": ["sessionId", "terminalId"],
16331630
"type": "object",
1634-
"x-method": "terminal/wait_for_exit",
1635-
"x-side": "client"
1631+
"x-docs-ignore": true
16361632
},
16371633
"WaitForTerminalExitResponse": {
16381634
"properties": {
@@ -1646,8 +1642,7 @@
16461642
}
16471643
},
16481644
"type": "object",
1649-
"x-method": "terminal/wait_for_exit",
1650-
"x-side": "client"
1645+
"x-docs-ignore": true
16511646
},
16521647
"WriteTextFileRequest": {
16531648
"description": "Request to write content to a text file.\n\nOnly available if the client supports the `fs.writeTextFile` capability.",

0 commit comments

Comments
 (0)