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
1,342 changes: 450 additions & 892 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"clean": "rm -rf dist tsconfig.tsbuildinfo",
"test": "vitest run",
"generate": "node scripts/generate.js",
"build": "npm run generate && tsc",
"build": "tsc",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint",
Expand All @@ -47,20 +47,20 @@
"zod": "^3.25.0 || ^4.0.0"
},
"devDependencies": {
"@hey-api/openapi-ts": "^0.88.1",
"@types/node": "^24.10.1",
"@typescript-eslint/eslint-plugin": "^8.48.1",
"@typescript-eslint/parser": "^8.48.1",
"@hey-api/openapi-ts": "^0.90.3",
"@types/node": "^25.0.7",
"@typescript-eslint/eslint-plugin": "^8.53.0",
"@typescript-eslint/parser": "^8.53.0",
"concurrently": "^9.2.1",
"eslint": "^9.39.1",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"http-server": "^14.1.1",
"prettier": "^3.7.4",
"tsx": "^4.21.0",
"typedoc": "^0.28.15",
"typedoc": "^0.28.16",
"typedoc-github-theme": "^0.3.1",
"typescript": "^5.9.3",
"vitest": "^4.0.15",
"vitest": "^4.0.17",
"zod": "^3.25.0 || ^4.0.0"
}
}
44 changes: 44 additions & 0 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1074,48 +1074,56 @@
"const": -32700,
"description": "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.",
"format": "int32",
"title": "Parse error",
"type": "integer"
},
{
"const": -32600,
"description": "**Invalid request**: The JSON sent is not a valid Request object.",
"format": "int32",
"title": "Invalid request",
"type": "integer"
},
{
"const": -32601,
"description": "**Method not found**: The method does not exist or is not available.",
"format": "int32",
"title": "Method not found",
"type": "integer"
},
{
"const": -32602,
"description": "**Invalid params**: Invalid method parameter(s).",
"format": "int32",
"title": "Invalid params",
"type": "integer"
},
{
"const": -32603,
"description": "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.",
"format": "int32",
"title": "Internal error",
"type": "integer"
},
{
"const": -32800,
"description": "**Request cancelled**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExecution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.",
"format": "int32",
"title": "Request cancelled",
"type": "integer"
},
{
"const": -32000,
"description": "**Authentication required**: Authentication is required before this operation can be performed.",
"format": "int32",
"title": "Authentication required",
"type": "integer"
},
{
"const": -32002,
"description": "**Resource not found**: A given resource, such as a file, was not found.",
"format": "int32",
"title": "Resource not found",
"type": "integer"
},
{
Expand Down Expand Up @@ -2508,6 +2516,17 @@
"description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)",
"type": ["object", "null"]
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/SessionConfigOptionCategory"
},
{
"type": "null"
}
],
"description": "Optional semantic category for this option (UX only)."
},
"description": {
"description": "Optional description for the Client to display to the user.",
"type": ["string", "null"]
Expand All @@ -2528,6 +2547,31 @@
"required": ["id", "name"],
"type": "object"
},
"SessionConfigOptionCategory": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSemantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully (treat as `Other`).",
"oneOf": [
{
"const": "mode",
"description": "Session mode selector.",
"type": "string"
},
{
"const": "model",
"description": "Model selector.",
"type": "string"
},
{
"const": "thought_level",
"description": "Thought/reasoning level selector.",
"type": "string"
},
{
"const": "other",
"description": "Unknown / uncategorized selector.",
"type": "string"
}
]
},
"SessionConfigSelect": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA single-value selector (dropdown) session configuration option payload.",
"properties": {
Expand Down
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.4";
const CURRENT_SCHEMA_RELEASE = "v0.10.6";

await main();

Expand Down
132 changes: 131 additions & 1 deletion src/schema/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,136 @@
// This file is auto-generated by @hey-api/openapi-ts

export type * from "./types.gen";
export type {
AgentCapabilities,
AgentNotification,
AgentRequest,
AgentResponse,
Annotations,
AudioContent,
AuthenticateRequest,
AuthenticateResponse,
AuthMethod,
AvailableCommand,
AvailableCommandInput,
AvailableCommandsUpdate,
BlobResourceContents,
CancelNotification,
CancelRequestNotification,
ClientCapabilities,
ClientNotification,
ClientRequest,
ClientResponse,
ConfigOptionUpdate,
Content,
ContentBlock,
ContentChunk,
CreateTerminalRequest,
CreateTerminalResponse,
CurrentModeUpdate,
Diff,
EmbeddedResource,
EmbeddedResourceResource,
EnvVariable,
Error,
ErrorCode,
ExtNotification,
ExtRequest,
ExtResponse,
FileSystemCapability,
ForkSessionRequest,
ForkSessionResponse,
HttpHeader,
ImageContent,
Implementation,
InitializeRequest,
InitializeResponse,
KillTerminalCommandRequest,
KillTerminalCommandResponse,
ListSessionsRequest,
ListSessionsResponse,
LoadSessionRequest,
LoadSessionResponse,
McpCapabilities,
McpServer,
McpServerHttp,
McpServerSse,
McpServerStdio,
ModelId,
ModelInfo,
NewSessionRequest,
NewSessionResponse,
PermissionOption,
PermissionOptionId,
PermissionOptionKind,
Plan,
PlanEntry,
PlanEntryPriority,
PlanEntryStatus,
PromptCapabilities,
PromptRequest,
PromptResponse,
ProtocolVersion,
ReadTextFileRequest,
ReadTextFileResponse,
ReleaseTerminalRequest,
ReleaseTerminalResponse,
RequestId,
RequestPermissionOutcome,
RequestPermissionRequest,
RequestPermissionResponse,
ResourceLink,
ResumeSessionRequest,
ResumeSessionResponse,
Role,
SelectedPermissionOutcome,
SessionCapabilities,
SessionConfigGroupId,
SessionConfigId,
SessionConfigOption,
SessionConfigOptionCategory,
SessionConfigSelect,
SessionConfigSelectGroup,
SessionConfigSelectOption,
SessionConfigSelectOptions,
SessionConfigValueId,
SessionForkCapabilities,
SessionId,
SessionInfo,
SessionInfoUpdate,
SessionListCapabilities,
SessionMode,
SessionModeId,
SessionModelState,
SessionModeState,
SessionNotification,
SessionResumeCapabilities,
SessionUpdate,
SetSessionConfigOptionRequest,
SetSessionConfigOptionResponse,
SetSessionModelRequest,
SetSessionModelResponse,
SetSessionModeRequest,
SetSessionModeResponse,
StopReason,
Terminal,
TerminalExitStatus,
TerminalOutputRequest,
TerminalOutputResponse,
TextContent,
TextResourceContents,
ToolCall,
ToolCallContent,
ToolCallId,
ToolCallLocation,
ToolCallStatus,
ToolCallUpdate,
ToolKind,
UnstructuredCommandInput,
WaitForTerminalExitRequest,
WaitForTerminalExitResponse,
WriteTextFileRequest,
WriteTextFileResponse,
} from "./types.gen";

export const AGENT_METHODS = {
authenticate: "authenticate",
Expand Down
32 changes: 28 additions & 4 deletions src/schema/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export type AgentResponse =
| ExtResponse;
}
| {
error: _Error;
error: Error;
id: RequestId;
};

Expand Down Expand Up @@ -394,7 +394,7 @@ export type ClientResponse =
| ExtResponse;
}
| {
error: _Error;
error: Error;
id: RequestId;
};

Expand Down Expand Up @@ -537,7 +537,7 @@ export type CreateTerminalRequest = {
* string output, even if this means the retained output is slightly less than the
* specified limit.
*/
outputByteLimit?: number | null;
outputByteLimit?: bigint | null;
/**
* The session ID for this request.
*/
Expand Down Expand Up @@ -675,7 +675,7 @@ export type EnvVariable = {
*
* See protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)
*/
export type _Error = {
export type Error = {
/**
* A number indicating the error type that occurred.
* This must be an integer as defined in the JSON-RPC specification.
Expand Down Expand Up @@ -2062,6 +2062,10 @@ export type SessionConfigOption = SessionConfigSelect & {
_meta?: {
[key: string]: unknown;
} | null;
/**
* Optional semantic category for this option (UX only).
*/
category?: SessionConfigOptionCategory | null;
/**
* Optional description for the Client to display to the user.
*/
Expand All @@ -2076,6 +2080,26 @@ export type SessionConfigOption = SessionConfigSelect & {
name: string;
};

/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Semantic category for a session configuration option.
*
* This is intended to help Clients distinguish broadly common selectors (e.g. model selector vs
* session mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,
* placement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown
* categories gracefully (treat as `Other`).
*
* @experimental
*/
export type SessionConfigOptionCategory =
| "mode"
| "model"
| "thought_level"
| "other";

/**
* **UNSTABLE**
*
Expand Down
Loading