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
22 changes: 11 additions & 11 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2863,6 +2863,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"]
},
"close": {
"anyOf": [
{
"$ref": "#/$defs/SessionCloseCapabilities"
},
{
"type": "null"
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/close`."
},
"fork": {
"anyOf": [
{
Expand Down Expand Up @@ -2895,17 +2906,6 @@
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/resume`."
},
"stop": {
"anyOf": [
{
"$ref": "#/$defs/SessionCloseCapabilities"
},
{
"type": "null"
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/close`."
}
},
"type": "object"
Expand Down
21 changes: 18 additions & 3 deletions 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.11.1";
const CURRENT_SCHEMA_RELEASE = "v0.11.2";

await main();

Expand Down Expand Up @@ -51,9 +51,24 @@ async function main() {
.replace(`from "zod"`, `from "zod/v4"`)
// Weird type issue
.replaceAll(
"_meta: z.union([z.record(z.unknown()), z.null()]).optional()",
"_meta: z.union([z.record(z.string(), z.unknown()), z.null()]).optional()",
"_meta: z.record(z.unknown()).nullish()",
"_meta: z.record(z.string(), z.unknown()).nullish()",
)
.replaceAll("z.record(z.string())", "z.record(z.string(), z.string())")
.replaceAll(
/z\.coerce\s*\.bigint\(\)\s*\.min\(BigInt\("-9223372036854775808"\),\s*\{\s*message:\s*"Invalid value: Expected int64 to be >= -9223372036854775808",\s*\}\s*\)\s*\.max\(BigInt\("9223372036854775807"\),\s*\{\s*message:\s*"Invalid value: Expected int64 to be <= 9223372036854775807",\s*\}\s*\)/gm,
"z.number()",
)
.replaceAll(
/z\.coerce\s*\.bigint\(\)\s*\.gte\(BigInt\(0\)\)\s*\.max\(BigInt\("18446744073709551615"\),\s*\{\s*message:\s*"Invalid value: Expected uint64 to be <= 18446744073709551615",\s*\}\s*\)/gm,
"z.number()",
),

// .replaceAll(
// /z\s*\.coerce\s*\.bigint\(\)\s*\.min\([\s\S]+?\)\s*\.max\([\s\S]+?\)/gm,

// "z.number()",
// ),
),
);

Expand Down
20 changes: 10 additions & 10 deletions src/schema/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2281,35 +2281,35 @@ export type SessionCapabilities = {
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Whether the agent supports `session/fork`.
* Whether the agent supports `session/close`.
*
* @experimental
*/
fork?: SessionForkCapabilities | null;
/**
* Whether the agent supports `session/list`.
*/
list?: SessionListCapabilities | null;
close?: SessionCloseCapabilities | null;
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Whether the agent supports `session/resume`.
* Whether the agent supports `session/fork`.
*
* @experimental
*/
resume?: SessionResumeCapabilities | null;
fork?: SessionForkCapabilities | null;
/**
* Whether the agent supports `session/list`.
*/
list?: SessionListCapabilities | null;
/**
* **UNSTABLE**
*
* This capability is not part of the spec yet, and may be removed or changed at any point.
*
* Whether the agent supports `session/close`.
* Whether the agent supports `session/resume`.
*
* @experimental
*/
stop?: SessionCloseCapabilities | null;
resume?: SessionResumeCapabilities | null;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/schema/zod.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1156,10 +1156,10 @@ export const zSessionResumeCapabilities = z.object({
*/
export const zSessionCapabilities = z.object({
_meta: z.record(z.string(), z.unknown()).nullish(),
close: zSessionCloseCapabilities.nullish(),
fork: zSessionForkCapabilities.nullish(),
list: zSessionListCapabilities.nullish(),
resume: zSessionResumeCapabilities.nullish(),
stop: zSessionCloseCapabilities.nullish(),
});

/**
Expand Down
Loading