feat: add permission field to the list tools response (#2080)

This commit is contained in:
Yingjie He
2025-04-08 09:47:29 -07:00
committed by GitHub
parent 76e2686c74
commit 318f419861
9 changed files with 152 additions and 17 deletions
+21 -1
View File
@@ -84,6 +84,11 @@ export type ExtensionResponse = {
extensions: Array<ExtensionEntry>;
};
/**
* Enum representing the possible permission levels for a tool.
*/
export type PermissionLevel = 'always_allow' | 'ask_before' | 'never_allow';
export type ProviderDetails = {
/**
* Indicates whether the provider is fully configured
@@ -204,6 +209,16 @@ export type ToolAnnotations = {
title?: string | null;
};
/**
* Information about the tool used for building prompts
*/
export type ToolInfo = {
description: string;
name: string;
parameters: Array<string>;
permission?: PermissionLevel | null;
};
export type UpsertConfigQuery = {
is_secret: boolean;
key: string;
@@ -213,7 +228,12 @@ export type UpsertConfigQuery = {
export type GetToolsData = {
body?: never;
path?: never;
query?: never;
query?: {
/**
* Optional extension name to filter tools
*/
extension_name?: string | null;
};
url: '/agent/tools';
};