import * as z from "zod/v3"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AuthConfig, AuthConfig$Outbound } from "./authconfig.js"; import { ObjectPermissions, ObjectPermissions$Outbound } from "./objectpermissions.js"; import { PersonObject, PersonObject$Outbound } from "./personobject.js"; /** * The type of tool. */ export declare const ToolMetadataType: { readonly Retrieval: "RETRIEVAL"; readonly Action: "ACTION"; }; /** * The type of tool. */ export type ToolMetadataType = OpenEnum; /** * Indicates the kind of knowledge a tool would access or modify. */ export declare const KnowledgeType: { readonly NeutralKnowledge: "NEUTRAL_KNOWLEDGE"; readonly CompanyKnowledge: "COMPANY_KNOWLEDGE"; readonly WorldKnowledge: "WORLD_KNOWLEDGE"; }; /** * Indicates the kind of knowledge a tool would access or modify. */ export type KnowledgeType = OpenEnum; /** * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. */ export declare const WriteActionType: { readonly Redirect: "REDIRECT"; readonly Execution: "EXECUTION"; readonly Mcp: "MCP"; }; /** * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. */ export type WriteActionType = OpenEnum; /** * The type of authentication being used. * * @remarks * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. * 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. * 'OAUTH_USER' uses individual user tokens for external API calls. * 'DWD' refers to domain wide delegation. */ export declare const AuthType: { readonly None: "NONE"; readonly OauthUser: "OAUTH_USER"; readonly OauthAdmin: "OAUTH_ADMIN"; readonly ApiKey: "API_KEY"; readonly BasicAuth: "BASIC_AUTH"; readonly Dwd: "DWD"; }; /** * The type of authentication being used. * * @remarks * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. * 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. * 'OAUTH_USER' uses individual user tokens for external API calls. * 'DWD' refers to domain wide delegation. */ export type AuthType = OpenEnum; /** * The manifest for a tool that can be used to augment Glean Assistant. */ export type ToolMetadata = { /** * The type of tool. */ type: ToolMetadataType; /** * Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. */ name: string; /** * Human understandable name of the tool. Max 50 characters. */ displayName: string; /** * An opaque id which is unique identifier for the tool. */ toolId?: string | undefined; /** * Description of the tool meant for a human. */ displayDescription: string; /** * URL used to fetch the logo. */ logoUrl?: string | undefined; /** * Name of the generated object. This will be used to indicate to the end user what the generated object contains. */ objectName?: string | undefined; /** * Indicates the kind of knowledge a tool would access or modify. */ knowledgeType?: KnowledgeType | undefined; createdBy?: PersonObject | undefined; lastUpdatedBy?: PersonObject | undefined; /** * The time the tool was created in ISO format (ISO 8601) */ createdAt?: Date | undefined; /** * The time the tool was last updated in ISO format (ISO 8601) */ lastUpdatedAt?: Date | undefined; /** * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. */ writeActionType?: WriteActionType | undefined; /** * The type of authentication being used. * * @remarks * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. * 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. * 'OAUTH_USER' uses individual user tokens for external API calls. * 'DWD' refers to domain wide delegation. */ authType?: AuthType | undefined; /** * Config for tool's authentication method. */ auth?: AuthConfig | undefined; permissions?: ObjectPermissions | undefined; /** * Usage instructions for the LLM to use this action. */ usageInstructions?: string | undefined; /** * Whether this action has been fully configured and validated. */ isSetupFinished?: boolean | undefined; }; /** @internal */ export declare const ToolMetadataType$inboundSchema: z.ZodType; /** @internal */ export declare const ToolMetadataType$outboundSchema: z.ZodType; /** @internal */ export declare const KnowledgeType$inboundSchema: z.ZodType; /** @internal */ export declare const KnowledgeType$outboundSchema: z.ZodType; /** @internal */ export declare const WriteActionType$inboundSchema: z.ZodType; /** @internal */ export declare const WriteActionType$outboundSchema: z.ZodType; /** @internal */ export declare const AuthType$inboundSchema: z.ZodType; /** @internal */ export declare const AuthType$outboundSchema: z.ZodType; /** @internal */ export declare const ToolMetadata$inboundSchema: z.ZodType; /** @internal */ export type ToolMetadata$Outbound = { type: string; name: string; displayName: string; toolId?: string | undefined; displayDescription: string; logoUrl?: string | undefined; objectName?: string | undefined; knowledgeType?: string | undefined; createdBy?: PersonObject$Outbound | undefined; lastUpdatedBy?: PersonObject$Outbound | undefined; createdAt?: string | undefined; lastUpdatedAt?: string | undefined; writeActionType?: string | undefined; authType?: string | undefined; auth?: AuthConfig$Outbound | undefined; permissions?: ObjectPermissions$Outbound | undefined; usageInstructions?: string | undefined; isSetupFinished?: boolean | undefined; }; /** @internal */ export declare const ToolMetadata$outboundSchema: z.ZodType; export declare function toolMetadataToJSON(toolMetadata: ToolMetadata): string; export declare function toolMetadataFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=toolmetadata.d.ts.map