feat (acp): exposed available tools in acp schema (#10097)

This commit is contained in:
Lifei Zhou
2026-06-30 15:43:08 +10:00
committed by GitHub
parent d43c692127
commit 2084c43476
15 changed files with 543 additions and 40 deletions
+28
View File
@@ -15,12 +15,20 @@ export type GooseExtension = {
display_name?: string | null;
timeout?: number | null;
bundled?: boolean | null;
/**
* Tool allowlist for this extension. Omit this field to allow all tools.
*/
available_tools?: Array<string> | null;
type: 'builtin';
} | {
name: string;
description?: string | null;
display_name?: string | null;
bundled?: boolean | null;
/**
* Tool allowlist for this extension. Omit this field to allow all tools.
*/
available_tools?: Array<string> | null;
type: 'platform';
} | {
server: McpServer;
@@ -29,6 +37,10 @@ export type GooseExtension = {
timeout?: number | null;
socket?: string | null;
bundled?: boolean | null;
/**
* Tool allowlist for this extension. Omit this field to allow all tools.
*/
available_tools?: Array<string> | null;
type: 'mcp';
};
@@ -1527,12 +1539,20 @@ export type RecipeExtensionDto = {
display_name?: string | null;
timeout?: number | null;
bundled?: boolean | null;
/**
* Tool allowlist for this extension. Omit this field to allow all tools.
*/
available_tools?: Array<string> | null;
type: 'builtin';
} | {
name: string;
description?: string | null;
display_name?: string | null;
bundled?: boolean | null;
/**
* Tool allowlist for this extension. Omit this field to allow all tools.
*/
available_tools?: Array<string> | null;
type: 'platform';
} | {
name: string;
@@ -1546,6 +1566,10 @@ export type RecipeExtensionDto = {
timeout?: number | null;
cwd?: string | null;
bundled?: boolean | null;
/**
* Tool allowlist for this extension. Omit this field to allow all tools.
*/
available_tools?: Array<string> | null;
type: 'stdio';
} | {
name: string;
@@ -1561,6 +1585,10 @@ export type RecipeExtensionDto = {
timeout?: number | null;
socket?: string | null;
bundled?: boolean | null;
/**
* Tool allowlist for this extension. Omit this field to allow all tools.
*/
available_tools?: Array<string> | null;
type: 'streamable_http';
};
+28
View File
@@ -134,6 +134,10 @@ export const zGooseExtension = z.union([
z.boolean(),
z.null()
]).optional(),
available_tools: z.union([
z.array(z.string()),
z.null()
]).optional(),
type: z.literal('builtin')
}),
z.object({
@@ -150,6 +154,10 @@ export const zGooseExtension = z.union([
z.boolean(),
z.null()
]).optional(),
available_tools: z.union([
z.array(z.string()),
z.null()
]).optional(),
type: z.literal('platform')
}),
z.object({
@@ -171,6 +179,10 @@ export const zGooseExtension = z.union([
z.boolean(),
z.null()
]).optional(),
available_tools: z.union([
z.array(z.string()),
z.null()
]).optional(),
type: z.literal('mcp')
})
]);
@@ -1464,6 +1476,10 @@ export const zRecipeExtensionDto = z.union([
z.boolean(),
z.null()
]).optional(),
available_tools: z.union([
z.array(z.string()),
z.null()
]).optional(),
type: z.literal('builtin')
}),
z.object({
@@ -1480,6 +1496,10 @@ export const zRecipeExtensionDto = z.union([
z.boolean(),
z.null()
]).optional(),
available_tools: z.union([
z.array(z.string()),
z.null()
]).optional(),
type: z.literal('platform')
}),
z.object({
@@ -1504,6 +1524,10 @@ export const zRecipeExtensionDto = z.union([
z.boolean(),
z.null()
]).optional(),
available_tools: z.union([
z.array(z.string()),
z.null()
]).optional(),
type: z.literal('stdio')
}),
z.object({
@@ -1528,6 +1552,10 @@ export const zRecipeExtensionDto = z.union([
z.boolean(),
z.null()
]).optional(),
available_tools: z.union([
z.array(z.string()),
z.null()
]).optional(),
type: z.literal('streamable_http')
})
]);