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
10 changes: 10 additions & 0 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"name": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUpdate the programmatic name of the tool being invoked.\n\nThis field is optional. Omitting it or sending `null` both mean that\nthe existing name is left unchanged.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"content": {
"description": "Replace the content collection.",
"type": ["array", "null"],
Expand Down Expand Up @@ -5332,6 +5337,11 @@
"description": "Human-readable title describing what the tool is doing.",
"type": "string"
},
"name": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProgrammatic name of the tool being invoked.\n\nThis field is optional. Omitting it or sending `null` both mean that no\ntool name is available.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"kind": {
"description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment.",
"x-deserialize-default-on-error": true,
Expand Down
15 changes: 15 additions & 0 deletions schema/v2/schema.unstable.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,11 @@
}
]
},
"name": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProgrammatic name of the tool being invoked.\n\nThis field is optional and has patch semantics. Omission means no\nchange, `null` clears the name, and a string replaces it. For a tool\ncall ID the client has not seen before, omission or `null` means that no\ntool name is available.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"title": {
"description": "Human-readable title describing what the tool is doing.",
"type": ["string", "null"],
Expand Down Expand Up @@ -960,6 +965,11 @@
"type": "string",
"const": "failed"
},
{
"description": "The tool call was cancelled before it completed.",
"type": "string",
"const": "cancelled"
},
{
"title": "other",
"description": "Custom or future tool call status.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
Expand Down Expand Up @@ -6991,6 +7001,11 @@
"type": "string",
"const": "completed"
},
{
"description": "The task was cancelled before it completed.",
"type": "string",
"const": "cancelled"
},
{
"title": "other",
"description": "Custom or future plan entry status.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import * as fs from "fs/promises";
import { dirname } from "path";
import * as prettier from "prettier";

const CURRENT_V1_SCHEMA_RELEASE = "schema-v1.19.1";
const CURRENT_V2_SCHEMA_RELEASE = "schema-v2.0.0-alpha.1";
const CURRENT_V1_SCHEMA_RELEASE = "schema-v1.20.0";
const CURRENT_V2_SCHEMA_RELEASE = "schema-v2.0.0-alpha.2";

// ── Extensible-union pipeline ────────────────────────────────────────────────
// Several schemas model forward compatibility as an "extensible union": known
Expand Down
26 changes: 26 additions & 0 deletions src/schema/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,19 @@ export type ToolCallUpdate = {
* Update the human-readable title.
*/
title?: string | null;
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Update the programmatic name of the tool being invoked.
*
* This field is optional. Omitting it or sending `null` both mean that
* the existing name is left unchanged.
*
* @experimental
*/
name?: string | null;
/**
* Replace the content collection.
*/
Expand Down Expand Up @@ -3786,6 +3799,19 @@ export type ToolCall = {
* Human-readable title describing what the tool is doing.
*/
title: string;
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Programmatic name of the tool being invoked.
*
* This field is optional. Omitting it or sending `null` both mean that no
* tool name is available.
*
* @experimental
*/
name?: string | null;
/**
* The category of tool being invoked.
* Helps clients choose appropriate icons and UI treatment.
Expand Down
2 changes: 2 additions & 0 deletions src/schema/zod.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ export const zToolCallUpdate = z.object({
kind: defaultOnError(zToolKind.nullish(), () => undefined),
status: defaultOnError(zToolCallStatus.nullish(), () => undefined),
title: defaultOnError(z.string().nullish(), () => undefined),
name: defaultOnError(z.string().nullish(), () => undefined),
content: defaultOnError(
vecSkipError(zToolCallContent).nullish(),
() => undefined,
Expand Down Expand Up @@ -2493,6 +2494,7 @@ export const zContentChunk = z.object({
export const zToolCall = z.object({
toolCallId: zToolCallId,
title: z.string(),
name: defaultOnError(z.string().nullish(), () => undefined),
kind: defaultOnError(zToolKind.optional(), () => undefined),
status: defaultOnError(zToolCallStatus.optional(), () => undefined),
content: defaultOnError(vecSkipError(zToolCallContent).optional(), () => []),
Expand Down
20 changes: 18 additions & 2 deletions src/v2/schema/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ export type ToolCallUpdate = {
* Unique identifier for this tool call within the session.
*/
toolCallId: ToolCallId;
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Programmatic name of the tool being invoked.
*
* This field is optional and has patch semantics. Omission means no
* change, `null` clears the name, and a string replaces it. For a tool
* call ID the client has not seen before, omission or `null` means that no
* tool name is available.
*
* @experimental
*/
name?: string | null;
/**
* Human-readable title describing what the tool is doing.
*/
Expand Down Expand Up @@ -221,7 +236,7 @@ export type ToolKind =
* See protocol docs: [Status](https://agentclientprotocol.com/protocol/v2/draft/tool-calls#status)
*/
export type ToolCallStatus =
"pending" | "in_progress" | "completed" | "failed" | string;
"pending" | "in_progress" | "completed" | "failed" | "cancelled" | string;

/**
* Content produced by a tool call.
Expand Down Expand Up @@ -4284,7 +4299,8 @@ export type PlanEntryPriority = "high" | "medium" | "low" | string;
* Tracks the lifecycle of each task from planning through completion.
* See protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/v2/draft/agent-plan#plan-entries)
*/
export type PlanEntryStatus = "pending" | "in_progress" | "completed" | string;
export type PlanEntryStatus =
"pending" | "in_progress" | "completed" | "cancelled" | string;

/**
* A plan represented as structured entries.
Expand Down
3 changes: 3 additions & 0 deletions src/v2/schema/zod.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const zToolCallStatus = z.union([
z.literal("in_progress"),
z.literal("completed"),
z.literal("failed"),
z.literal("cancelled"),
z.string(),
]);

Expand Down Expand Up @@ -522,6 +523,7 @@ export const zToolCallLocation = z.object({
*/
export const zToolCallUpdate = z.object({
toolCallId: zToolCallId,
name: defaultOnError(z.string().nullish(), () => undefined),
title: defaultOnError(z.string().nullish(), () => undefined),
kind: defaultOnError(zToolKind.nullish(), () => undefined),
status: defaultOnError(zToolCallStatus.nullish(), () => undefined),
Expand Down Expand Up @@ -2823,6 +2825,7 @@ export const zPlanEntryStatus = z.union([
z.literal("pending"),
z.literal("in_progress"),
z.literal("completed"),
z.literal("cancelled"),
z.string(),
]);

Expand Down