Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion schema/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"session_resume": "session/resume",
"session_set_config_option": "session/set_config_option",
"session_set_mode": "session/set_mode",
"session_set_model": "session/set_model"
"session_set_model": "session/set_model",
"session_stop": "session/stop"
},
"clientMethods": {
"fs_read_text_file": "fs/read_text_file",
Expand Down
299 changes: 286 additions & 13 deletions schema/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as fs from "fs/promises";
import { dirname } from "path";
import * as prettier from "prettier";

const CURRENT_SCHEMA_RELEASE = "v0.10.8";
const CURRENT_SCHEMA_RELEASE = "v0.11.0";

await main();

Expand Down
9 changes: 4 additions & 5 deletions src/acp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export class TerminalHandle {
*
* Useful for implementing timeouts or cancellation.
*/
async kill(): Promise<schema.KillTerminalCommandResponse> {
async kill(): Promise<schema.KillTerminalResponse> {
return (
(await this.#connection.sendRequest(schema.CLIENT_METHODS.terminal_kill, {
sessionId: this.#sessionId,
Expand Down Expand Up @@ -503,8 +503,7 @@ export class ClientSideConnection implements Agent {
return client.waitForTerminalExit?.(validatedParams);
}
case schema.CLIENT_METHODS.terminal_kill: {
const validatedParams =
validate.zKillTerminalCommandRequest.parse(params);
const validatedParams = validate.zKillTerminalRequest.parse(params);
const result = await client.killTerminal?.(validatedParams);
return result ?? {};
}
Expand Down Expand Up @@ -1384,8 +1383,8 @@ export interface Client {
* @see {@link https://agentclientprotocol.com/protocol/terminals#killing-commands | Killing Commands}
*/
killTerminal?(
params: schema.KillTerminalCommandRequest,
): Promise<schema.KillTerminalCommandResponse | void>;
params: schema.KillTerminalRequest,
): Promise<schema.KillTerminalResponse | void>;

/**
* Extension method
Expand Down
15 changes: 12 additions & 3 deletions src/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ export type {
AgentResponse,
Annotations,
AudioContent,
AuthCapabilities,
AuthenticateRequest,
AuthenticateResponse,
AuthEnvVar,
AuthMethod,
AuthMethodAgent,
AuthMethodEnvVar,
AuthMethodTerminal,
AvailableCommand,
AvailableCommandInput,
AvailableCommandsUpdate,
Expand Down Expand Up @@ -37,16 +42,16 @@ export type {
ExtNotification,
ExtRequest,
ExtResponse,
FileSystemCapability,
FileSystemCapabilities,
ForkSessionRequest,
ForkSessionResponse,
HttpHeader,
ImageContent,
Implementation,
InitializeRequest,
InitializeResponse,
KillTerminalCommandRequest,
KillTerminalCommandResponse,
KillTerminalRequest,
KillTerminalResponse,
ListSessionsRequest,
ListSessionsResponse,
LoadSessionRequest,
Expand Down Expand Up @@ -105,6 +110,7 @@ export type {
SessionModeState,
SessionNotification,
SessionResumeCapabilities,
SessionStopCapabilities,
SessionUpdate,
SetSessionConfigOptionRequest,
SetSessionConfigOptionResponse,
Expand All @@ -113,6 +119,8 @@ export type {
SetSessionModeRequest,
SetSessionModeResponse,
StopReason,
StopSessionRequest,
StopSessionResponse,
Terminal,
TerminalExitStatus,
TerminalOutputRequest,
Expand Down Expand Up @@ -148,6 +156,7 @@ export const AGENT_METHODS = {
session_set_config_option: "session/set_config_option",
session_set_mode: "session/set_mode",
session_set_model: "session/set_model",
session_stop: "session/stop",
} as const;

export const CLIENT_METHODS = {
Expand Down
Loading