import type { FilePart } from 'ai'; import type { ImagePart } from 'ai'; import type { JSONValue } from '@ai-sdk/provider'; import type { LanguageModelUsage } from 'ai'; import type { LanguageModelV3 } from '@ai-sdk/provider'; import type { LanguageModelV3ToolResultOutput } from '@ai-sdk/provider'; import type { LanguageModelV3Usage } from '@ai-sdk/provider'; import type { ModelMessage } from '@ai-sdk/provider-utils'; import type { ProviderOptions } from '@ai-sdk/provider-utils'; import type { ReasoningPart } from '@ai-sdk/provider-utils'; import type { SystemModelMessage } from '@ai-sdk/provider-utils'; import type { TextPart } from 'ai'; import type { TextPart as TextPart_2 } from '@ai-sdk/provider-utils'; import type { ToolApprovalRequest } from '@ai-sdk/provider-utils'; import type { ToolModelMessage } from '@ai-sdk/provider-utils'; import type { ToolResultOutput } from '@ai-sdk/provider-utils'; import type { ToolResultPart } from '@ai-sdk/provider-utils'; import { ToolSet } from 'ai'; import { z } from 'zod'; declare type AgentToolRegistry = { generateText: { input: { messages: JsonModelMessage[]; systemPrompt?: string; tools: ToolSet; model?: string; }; output: JsonResponseMessage[]; }; taskEvent: { input: TaskEvent; output: void; }; invokeTool: { input: { toolName: string; input: unknown; }; output: ToolResponse; }; }; export { AgentToolRegistry } export { AgentToolRegistry as AgentToolRegistry_alias_1 } export { AgentToolRegistry as AgentToolRegistry_alias_2 } declare const agentWorkflow: WorkflowFn; export { agentWorkflow } export { agentWorkflow as agentWorkflow_alias_1 } export { agentWorkflow as agentWorkflow_alias_2 } declare type AgentWorkflowInput = { tools: Readonly; maxToolRoundTrips?: number; userMessage: readonly JsonUserModelMessage[]; outputSchema?: z.ZodSchema; model?: string; } & ({ messages: JsonModelMessage[]; } | { systemPrompt: string; }); export { AgentWorkflowInput } export { AgentWorkflowInput as AgentWorkflowInput_alias_1 } export { AgentWorkflowInput as AgentWorkflowInput_alias_2 } declare type BaseApprovalConfig = z.infer; export { BaseApprovalConfig } export { BaseApprovalConfig as BaseApprovalConfig_alias_1 } export { BaseApprovalConfig as BaseApprovalConfig_alias_2 } /** * Base approval configuration pattern */ declare const baseApprovalConfigSchema: z.ZodObject<{ level: z.ZodOptional>; autoApprove: z.ZodOptional; maxCost: z.ZodOptional; }, z.core.$strip>; export { baseApprovalConfigSchema } export { baseApprovalConfigSchema as baseApprovalConfigSchema_alias_1 } export { baseApprovalConfigSchema as baseApprovalConfigSchema_alias_2 } /** * Base error class that preserves error name in stack traces * * All custom errors should extend this class to ensure: * - Proper stack trace with error name * - Cause chain support * - Consistent error handling */ declare class BaseError extends Error { name: string; cause?: Error | undefined; constructor(name: string, message: string, cause?: Error | undefined); } export { BaseError } export { BaseError as BaseError_alias_1 } export { BaseError as BaseError_alias_2 } declare type BaseModelConfig = z.infer; export { BaseModelConfig } export { BaseModelConfig as BaseModelConfig_alias_1 } export { BaseModelConfig as BaseModelConfig_alias_2 } /** * Base model configuration pattern * Used wherever a provider/model combination needs to be specified */ declare const baseModelConfigSchema: z.ZodObject<{ provider: z.ZodOptional; model: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strip>; export { baseModelConfigSchema } export { baseModelConfigSchema as baseModelConfigSchema_alias_1 } export { baseModelConfigSchema as baseModelConfigSchema_alias_2 } declare interface BaseWorkflowContext { step: StepFn; logger: Logger; tools: WorkflowTools; } export { BaseWorkflowContext } export { BaseWorkflowContext as BaseWorkflowContext_alias_1 } export { BaseWorkflowContext as BaseWorkflowContext_alias_2 } declare interface BreakStep { break: true; } export { BreakStep } export { BreakStep as BreakStep_alias_1 } export { BreakStep as BreakStep_alias_2 } /** * Break statement - exits the nearest enclosing loop */ declare const BreakStepSchema: z.ZodObject<{ break: z.ZodLiteral; }, z.core.$strip>; export { BreakStepSchema } export { BreakStepSchema as BreakStepSchema_alias_1 } export { BreakStepSchema as BreakStepSchema_alias_2 } declare type CommandProvider = { executeCommand?: (command: string, needApprove: boolean) => Promise<{ stdout: string; stderr: string; exitCode: number; summary?: string; }>; }; export { CommandProvider } export { CommandProvider as CommandProvider_alias_1 } export { CommandProvider as CommandProvider_alias_2 } /** * Utility to compute exponential backoff delays for rate-limit handling. generated by polka.codes * * The backoff starts at baseSeconds and doubles each time, capped at capSeconds. * Example with base=2, cap=60: 2, 4, 8, 16, 32, 60, 60, ... */ declare function computeRateLimitBackoffSeconds(count: number, baseSeconds?: number, capSeconds?: number): number; export { computeRateLimitBackoffSeconds } export { computeRateLimitBackoffSeconds as computeRateLimitBackoffSeconds_alias_1 } declare type Config = NonNullable>; export { Config } export { Config as Config_alias_1 } declare type ConfigRule = z.infer; export { ConfigRule } export { ConfigRule as ConfigRule_alias_1 } declare const configSchema: z.ZodOptional; outputPrice: z.ZodOptional; cacheWritesPrice: z.ZodOptional; cacheReadsPrice: z.ZodOptional; }, z.core.$strip>>>>; providers: z.ZodOptional; defaultModel: z.ZodOptional; defaultParameters: z.ZodOptional>; location: z.ZodOptional; project: z.ZodOptional; keyFile: z.ZodOptional; baseUrl: z.ZodOptional; name: z.ZodOptional; }, z.core.$strip>>>; defaultProvider: z.ZodOptional; defaultModel: z.ZodOptional; defaultParameters: z.ZodOptional>; maxMessageCount: z.ZodOptional; budget: z.ZodOptional; retryCount: z.ZodOptional; requestTimeoutSeconds: z.ZodOptional; summaryThreshold: z.ZodOptional; scripts: z.ZodOptional, z.ZodObject<{ workflow: z.ZodString; description: z.ZodOptional; input: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ script: z.ZodString; description: z.ZodOptional; permissions: z.ZodOptional>; network: z.ZodOptional; subprocess: z.ZodOptional; }, z.core.$strip>>; timeout: z.ZodOptional; memory: z.ZodOptional; }, z.core.$strict>]>>>; commands: z.ZodOptional; model: z.ZodOptional; parameters: z.ZodOptional>; budget: z.ZodOptional; rules: z.ZodOptional, z.ZodObject<{ url: z.ZodString; }, z.core.$strict>, z.ZodObject<{ repo: z.ZodString; path: z.ZodString; tag: z.ZodOptional; commit: z.ZodOptional; branch: z.ZodOptional; }, z.core.$strict>]>>>, z.ZodString]>>; }, z.core.$strip>>>; tools: z.ZodOptional; model: z.ZodOptional; parameters: z.ZodOptional>; budget: z.ZodOptional; rules: z.ZodOptional, z.ZodObject<{ url: z.ZodString; }, z.core.$strict>, z.ZodObject<{ repo: z.ZodString; path: z.ZodString; tag: z.ZodOptional; commit: z.ZodOptional; branch: z.ZodOptional; }, z.core.$strict>]>>>, z.ZodString]>>; }, z.core.$strip>, z.ZodBoolean]>>; }, z.core.$strip>>; mcpServers: z.ZodOptional>; env: z.ZodOptional>; tools: z.ZodOptional; model: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strict>]>>>; }, z.core.$strict>>>; rules: z.ZodOptional, z.ZodObject<{ url: z.ZodString; }, z.core.$strict>, z.ZodObject<{ repo: z.ZodString; path: z.ZodString; tag: z.ZodOptional; commit: z.ZodOptional; branch: z.ZodOptional; }, z.core.$strict>]>>>, z.ZodString]>>; excludeFiles: z.ZodOptional>; agent: z.ZodOptional; strategy: z.ZodOptional>; continueOnCompletion: z.ZodOptional; maxIterations: z.ZodOptional; timeout: z.ZodOptional; requireApprovalFor: z.ZodOptional>; autoApproveSafeTasks: z.ZodOptional; maxAutoApprovalCost: z.ZodOptional; pauseOnError: z.ZodOptional; workingBranch: z.ZodOptional; destructiveOperations: z.ZodOptional>; maxConcurrency: z.ZodOptional; autoSaveInterval: z.ZodOptional; workingDir: z.ZodOptional; continuousImprovement: z.ZodOptional; sleepTimeBetweenTasks: z.ZodOptional; maxCycles: z.ZodOptional; }, z.core.$strict>>; discovery: z.ZodOptional>; cacheTime: z.ZodOptional; checkChanges: z.ZodOptional; }, z.core.$strict>>; safety: z.ZodOptional>; blockDestructive: z.ZodOptional; maxFileSize: z.ZodOptional; }, z.core.$strict>>; healthCheck: z.ZodOptional; interval: z.ZodOptional; }, z.core.$strict>>; approval: z.ZodOptional>; autoApproveSafeTasks: z.ZodOptional; maxAutoApprovalCost: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>; memory: z.ZodOptional>; type: z.ZodDefault>>; path: z.ZodDefault>; }, z.core.$strict>>; loadRules: z.ZodOptional>; }, z.core.$strict>>>; export { configSchema } export { configSchema as configSchema_alias_1 } declare interface ContinueStep { continue: true; } export { ContinueStep } export { ContinueStep as ContinueStep_alias_1 } export { ContinueStep as ContinueStep_alias_2 } /** * Continue statement - skips to next iteration of nearest enclosing loop */ declare const ContinueStepSchema: z.ZodObject<{ continue: z.ZodLiteral; }, z.core.$strip>; export { ContinueStepSchema } export { ContinueStepSchema as ContinueStepSchema_alias_1 } export { ContinueStepSchema as ContinueStepSchema_alias_2 } /** * Convert a JSON Schema to a Zod schema * Supports a subset of JSON SchemaDraft 7 * * This is exported to allow reuse in other parts of the codebase that need to * convert JSON schemas to Zod schemas (e.g., MCP server tool schema conversion). */ declare function convertJsonSchemaToZod(schema: JsonSchema): z.ZodTypeAny; export { convertJsonSchemaToZod } export { convertJsonSchemaToZod as convertJsonSchemaToZod_alias_1 } export { convertJsonSchemaToZod as convertJsonSchemaToZod_alias_2 } /** * Convert Portkey pricing (cents per token) to ModelInfo (USD per 1M tokens) * Formula: cents_per_token * 10 = usd_per_1M_tokens */ export declare function convertPortkeyToModelInfo(portkey: PortkeyPricingResponse): ModelInfo; declare function createContext(tools: WorkflowTools, stepFn?: StepFn, logger?: Logger): BaseWorkflowContext; export { createContext } export { createContext as createContext_alias_1 } export { createContext as createContext_alias_2 } declare function createDynamicWorkflow = BaseWorkflowContext>(definition: WorkflowFile | string, options?: DynamicWorkflowRunnerOptions): (workflowId: string, input: Record, context: TContext) => Promise; export { createDynamicWorkflow } export { createDynamicWorkflow as createDynamicWorkflow_alias_1 } export { createDynamicWorkflow as createDynamicWorkflow_alias_2 } /** * Factory that creates NAMED error classes (not anonymous) for proper stack traces * * The factory returns a named class that extends BaseError. * Stack traces will show the actual error class name, not "BaseError" or "createErrorClass". * * @example * ```typescript * export const FileSystemAccessError = createErrorClass( * 'FileSystemAccessError', * ([path, operation]: [string, string]) => `Failed to ${operation} ${path}` * ) * * // Stack trace will show: "at new FileSystemAccessError" * // NOT: "at new createErrorClass" or "at new BaseError" * ``` */ declare function createErrorClass(name: string, template: (args: T) => string): new (...args: T) => BaseError; export { createErrorClass } export { createErrorClass as createErrorClass_alias_1 } export { createErrorClass as createErrorClass_alias_2 } /** * Create an error tool response * * @param message - The error message * @returns An error tool response object * * @example * ```ts * return createErrorResponse('Failed to read file') * ``` */ declare function createErrorResponse(message: string): ToolResponse; export { createErrorResponse } export { createErrorResponse as createErrorResponse_alias_1 } export { createErrorResponse as createErrorResponse_alias_2 } /** * Create a file content XML element */ export declare function createFileElement(tagName: string, path: string, content?: string, attrs?: Record): string; /** * Create a provider capability error response * Use this when a required provider capability is not available * * @param capability - The capability that's missing (e.g., "read file", "write file") * @returns An error response indicating the missing capability * * @example * ```ts * if (!provider.readFile) { * return createProviderErrorResponse('read file') * } * ``` */ declare function createProviderErrorResponse(capability: string): ToolResponse; export { createProviderErrorResponse as createProviderError } export { createProviderErrorResponse } export { createProviderErrorResponse as createProviderErrorResponse_alias_1 } export { createProviderErrorResponse as createProviderErrorResponse_alias_2 } /** * Create a successful tool response * * @param value - The response value (string or JSON string) * @param type - Response type ('text' or 'json') * @returns A successful tool response object * * @example * ```ts * return createSuccessResponse('File content loaded') * return createSuccessResponse(JSON.stringify(data), 'json') * ``` */ declare function createSuccessResponse(value: string, type?: 'text' | 'json'): ToolResponse; export { createSuccessResponse } export { createSuccessResponse as createSuccessResponse_alias_1 } export { createSuccessResponse as createSuccessResponse_alias_2 } /** * Create a validation error response * Use this when input validation fails * * @param errors - The validation error details * @returns An error response with validation details * * @example * ```ts * const result = schema.safeParse(input) * if (!result.success) { * return createValidationErrorResponse(result.error) * } * ``` */ declare function createValidationErrorResponse(errors: { message: string; }): ToolResponse; export { createValidationErrorResponse } export { createValidationErrorResponse as createValidationErrorResponse_alias_1 } export { createValidationErrorResponse as createValidationErrorResponse_alias_2 } /** * Database statistics */ declare type DatabaseStats = { totalEntries: number; entriesByType: Record; databaseSize: number; }; export { DatabaseStats } export { DatabaseStats as DatabaseStats_alias_1 } export { DatabaseStats as DatabaseStats_alias_2 } /** * Deep merge utility with EXPLICIT path specification * * This utility performs a shallow merge by default, with deep merging * ONLY for paths explicitly specified. This prevents accidental deep * merging of unexpected properties. * * @example * ```typescript * const config = { a: 1, b: { x: 1, y: 2 }, c: { z: 3 } } * const override = { a: 2, b: { x: 10 }, c: 'not-an-object' } * * // Deep merge only 'b', shallow merge everything else * const result = deepMerge(config, override, ['b']) * // Result: { a: 2, b: { x: 10, y: 2 }, c: 'not-an-object' } * * // Note: 'c' was NOT deep merged because it's not in deepPaths * // Note: 'b.x' was updated while 'b.y' was preserved (deep merge) * ``` * * @param base - The base object to merge into * @param override - The object with values to override * @param deepPaths - Array of keys that should be deep merged (must be plain objects) * @returns A new object with merged values */ declare function deepMerge(base: T, override: Partial, deepPaths: Array): T; export { deepMerge } export { deepMerge as deepMerge_alias_1 } export { deepMerge as deepMerge_alias_2 } declare const _default: { handler: ToolHandler<{ readonly name: "askFollowupQuestion"; readonly description: "Ask the user for missing information that blocks progress. Use direct questions, add short mutually exclusive options when helpful, and group related questions in one call."; readonly parameters: z.ZodObject<{ questions: z.ZodArray>; }, z.core.$strip>>; }, z.core.$strip>; }, InteractionProvider>; name: "askFollowupQuestion"; description: "Ask the user for missing information that blocks progress. Use direct questions, add short mutually exclusive options when helpful, and group related questions in one call."; parameters: z.ZodObject<{ questions: z.ZodArray>; }, z.core.$strip>>; }, z.core.$strip>; }; export { _default as askFollowupQuestion } export { _default as askFollowupQuestion_alias_1 } export { _default as default_alias } declare const _default_10: { handler: ToolHandler<{ readonly name: "search"; readonly description: "Search the web for current information, facts, news, documentation, or research that may not be available locally."; readonly parameters: z.ZodObject<{ query: z.ZodString; }, z.core.$strip>; }, WebProvider>; name: "search"; description: "Search the web for current information, facts, news, documentation, or research that may not be available locally."; parameters: z.ZodObject<{ query: z.ZodString; }, z.core.$strip>; }; export { _default_10 as default_alias_9 } export { _default_10 as search } export { _default_10 as search_alias_1 } declare const _default_11: { handler: ToolHandler<{ readonly name: "searchFiles"; readonly description: "Search files in a directory with a Rust regex pattern and optional file globs. Use this to find code, text, or references before reading specific files."; readonly parameters: z.ZodObject<{ path: z.ZodString; regex: z.ZodString; filePattern: z.ZodOptional; }, z.core.$strip>; }, FilesystemProvider>; name: "searchFiles"; description: "Search files in a directory with a Rust regex pattern and optional file globs. Use this to find code, text, or references before reading specific files."; parameters: z.ZodObject<{ path: z.ZodString; regex: z.ZodString; filePattern: z.ZodOptional; }, z.core.$strip>; }; export { _default_11 as default_alias_10 } export { _default_11 as searchFiles } export { _default_11 as searchFiles_alias_1 } declare const _default_12: { handler: ToolHandler<{ readonly name: "writeToFile"; readonly description: "Write complete content to a file, creating parent directories if needed. Use this for new files or full-file replacement. For targeted edits to existing files, prefer replaceInFile. Always provide the complete intended file content."; readonly parameters: z.ZodObject<{ path: z.ZodString; content: z.ZodString; }, z.core.$strip>; }, FilesystemProvider>; name: "writeToFile"; description: "Write complete content to a file, creating parent directories if needed. Use this for new files or full-file replacement. For targeted edits to existing files, prefer replaceInFile. Always provide the complete intended file content."; parameters: z.ZodObject<{ path: z.ZodString; content: z.ZodString; }, z.core.$strip>; }; export { _default_12 as default_alias_11 } export { _default_12 as writeToFile } export { _default_12 as writeToFile_alias_1 } declare const _default_2: { handler: ToolHandler<{ readonly name: "executeCommand"; readonly description: "Run one CLI command from the project-root working directory. Use for builds, tests, diagnostics, and other command-line tasks. After calling executeCommand, wait for the command result before deciding on the next action."; readonly parameters: z.ZodObject<{ command: z.ZodString; requiresApproval: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }, CommandProvider>; name: "executeCommand"; description: "Run one CLI command from the project-root working directory. Use for builds, tests, diagnostics, and other command-line tasks. After calling executeCommand, wait for the command result before deciding on the next action."; parameters: z.ZodObject<{ command: z.ZodString; requiresApproval: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }; export { _default_2 as default_alias_1 } export { _default_2 as executeCommand } export { _default_2 as executeCommand_alias_1 } declare const _default_3: { handler: ToolHandler<{ readonly name: "fetchUrl"; readonly description: "Fetch one or more HTTP(S) URLs and return their content as Markdown. Use for webpages and raw hosted files such as README or source files."; readonly parameters: z.ZodObject<{ url: z.ZodPipe, z.ZodArray>; }, z.core.$strip>; }, WebProvider>; name: "fetchUrl"; description: "Fetch one or more HTTP(S) URLs and return their content as Markdown. Use for webpages and raw hosted files such as README or source files."; parameters: z.ZodObject<{ url: z.ZodPipe, z.ZodArray>; }, z.core.$strip>; }; export { _default_3 as default_alias_2 } export { _default_3 as fetchUrl } export { _default_3 as fetchUrl_alias_1 } declare const _default_4: { handler: ToolHandler<{ readonly name: "listFiles"; readonly description: "List files and directories under a directory. Use this for project structure discovery and file existence checks. Recursive listing is enabled by default and can be limited with maxCount."; readonly parameters: z.ZodObject<{ path: z.ZodString; maxCount: z.ZodDefault>>; recursive: z.ZodDefault, z.ZodBoolean>>; includeIgnored: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }, FilesystemProvider>; name: "listFiles"; description: "List files and directories under a directory. Use this for project structure discovery and file existence checks. Recursive listing is enabled by default and can be limited with maxCount."; parameters: z.ZodObject<{ path: z.ZodString; maxCount: z.ZodDefault>>; recursive: z.ZodDefault, z.ZodBoolean>>; includeIgnored: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }; export { _default_4 as default_alias_3 } export { _default_4 as listFiles } export { _default_4 as listFiles_alias_1 } declare const _default_5: { handler: ToolHandler<{ readonly name: "readBinaryFile"; readonly description: "Read a non-text file, such as an image or PDF, from a URL or local file:// path."; readonly parameters: z.ZodObject<{ url: z.ZodString; }, z.core.$strip>; }, FilesystemProvider>; name: "readBinaryFile"; description: "Read a non-text file, such as an image or PDF, from a URL or local file:// path."; parameters: z.ZodObject<{ url: z.ZodString; }, z.core.$strip>; }; export { _default_5 as default_alias_4 } export { _default_5 as readBinaryFile } export { _default_5 as readBinaryFile_alias_1 } declare const _default_6: { handler: ToolHandler<{ readonly name: "readFile"; readonly description: "Read one or more text files. Use this to inspect known files before editing, understand code, or read configuration. Prefer searchFiles for content searches and listFiles for directory discovery. The result includes line numbers; use offset and limit for large files."; readonly parameters: z.ZodObject<{ path: z.ZodPipe, z.ZodArray>; offset: z.ZodOptional; limit: z.ZodOptional; includeIgnored: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }, FilesystemProvider>; name: "readFile"; description: "Read one or more text files. Use this to inspect known files before editing, understand code, or read configuration. Prefer searchFiles for content searches and listFiles for directory discovery. The result includes line numbers; use offset and limit for large files."; parameters: z.ZodObject<{ path: z.ZodPipe, z.ZodArray>; offset: z.ZodOptional; limit: z.ZodOptional; includeIgnored: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }; export { _default_6 as default_alias_5 } export { _default_6 as readFile } export { _default_6 as readFile_alias_1 } declare const _default_7: { handler: ToolHandler<{ readonly name: "removeFile"; readonly description: "Remove a file at the specified path."; readonly parameters: z.ZodObject<{ path: z.ZodString; }, z.core.$strip>; }, FilesystemProvider>; name: "removeFile"; description: "Remove a file at the specified path."; parameters: z.ZodObject<{ path: z.ZodString; }, z.core.$strip>; }; export { _default_7 as default_alias_6 } export { _default_7 as removeFile } export { _default_7 as removeFile_alias_1 } declare const _default_8: { handler: ToolHandler<{ readonly name: "renameFile"; readonly description: "Rename or move a file from source path to target path."; readonly parameters: z.ZodObject<{ source_path: z.ZodString; target_path: z.ZodString; }, z.core.$strip>; }, FilesystemProvider>; name: "renameFile"; description: "Rename or move a file from source path to target path."; parameters: z.ZodObject<{ source_path: z.ZodString; target_path: z.ZodString; }, z.core.$strip>; }; export { _default_8 as default_alias_7 } export { _default_8 as renameFile } export { _default_8 as renameFile_alias_1 } declare const _default_9: { handler: ToolHandler<{ readonly name: "replaceInFile"; readonly description: "Make targeted edits to an existing file with SEARCH/REPLACE blocks. Use writeToFile for new files or full-file replacement. Read the file first when you do not know the exact text to replace.\n\nSEARCH/REPLACE format:\n<<<<<<< SEARCH\n[exact content to find]\n=======\n[new content to replace with]\n>>>>>>> REPLACE\n\nRules:\n1. SEARCH content must match EXACTLY (character-for-character including whitespace)\n2. Each block replaces only first occurrence\n3. Include just enough lines for uniqueness (not too many, not too few)\n4. Keep blocks concise (don't include long unchanged sections)\n5. List blocks in order they appear in file\n6. Use multiple blocks for multiple independent changes\n\nSpecial operations:\n- Move code: Two blocks (delete from original + insert at new location)\n- Delete code: Empty REPLACE section"; readonly parameters: z.ZodObject<{ path: z.ZodString; diff: z.ZodString; }, z.core.$strip>; }, FilesystemProvider>; name: "replaceInFile"; description: "Make targeted edits to an existing file with SEARCH/REPLACE blocks. Use writeToFile for new files or full-file replacement. Read the file first when you do not know the exact text to replace.\n\nSEARCH/REPLACE format:\n<<<<<<< SEARCH\n[exact content to find]\n=======\n[new content to replace with]\n>>>>>>> REPLACE\n\nRules:\n1. SEARCH content must match EXACTLY (character-for-character including whitespace)\n2. Each block replaces only first occurrence\n3. Include just enough lines for uniqueness (not too many, not too few)\n4. Keep blocks concise (don't include long unchanged sections)\n5. List blocks in order they appear in file\n6. Use multiple blocks for multiple independent changes\n\nSpecial operations:\n- Move code: Two blocks (delete from original + insert at new location)\n- Delete code: Empty REPLACE section"; parameters: z.ZodObject<{ path: z.ZodString; diff: z.ZodString; }, z.core.$strip>; }; export { _default_9 as default_alias_8 } export { _default_9 as replaceInFile } export { _default_9 as replaceInFile_alias_1 } /** * Default memory configuration */ declare const DEFAULT_MEMORY_CONFIG: MemoryConfig; export { DEFAULT_MEMORY_CONFIG } export { DEFAULT_MEMORY_CONFIG as DEFAULT_MEMORY_CONFIG_alias_1 } export { DEFAULT_MEMORY_CONFIG as DEFAULT_MEMORY_CONFIG_alias_2 } /** * Represents a directory entry */ declare interface DirectoryEntry { name: string; isDirectory: boolean; isFile: boolean; } export { DirectoryEntry } export { DirectoryEntry as DirectoryEntry_alias_1 } export { DirectoryEntry as DirectoryEntry_alias_2 } /** * Returns the directory portion of a path string. * Strips trailing slashes, then takes everything up to the last slash. */ export declare function dirname(path: string): string; declare type DynamicStepRuntimeContext = { workflowId: string; stepId: string; input: Record; state: Record; tools: WorkflowTools; logger: Logger; step: StepFn; runWorkflow: (workflowId: string, input?: Record) => Promise; toolInfo: Readonly | undefined; agentTools: Record Promise>; }; export { DynamicStepRuntimeContext } export { DynamicStepRuntimeContext as DynamicStepRuntimeContext_alias_1 } export { DynamicStepRuntimeContext as DynamicStepRuntimeContext_alias_2 } declare type DynamicWorkflowParseResult = { success: true; definition: WorkflowFile; } | { success: false; error: string; }; export { DynamicWorkflowParseResult } export { DynamicWorkflowParseResult as DynamicWorkflowParseResult_alias_1 } export { DynamicWorkflowParseResult as DynamicWorkflowParseResult_alias_2 } declare type DynamicWorkflowRegistry = ToolRegistry & { runWorkflow: RunWorkflowTool; }; export { DynamicWorkflowRegistry } export { DynamicWorkflowRegistry as DynamicWorkflowRegistry_alias_1 } export { DynamicWorkflowRegistry as DynamicWorkflowRegistry_alias_2 } declare type DynamicWorkflowRunnerOptions = { /** * Tool definitions used when a step does not have persisted `code` * and needs to be executed via `agentWorkflow`. */ toolInfo?: Readonly; /** * Model id forwarded to `agentWorkflow` for agent-executed steps. */ model?: string; /** * Maximum round trips for agent-executed steps. */ maxToolRoundTrips?: number; /** * Customize per-step system prompt for agent-executed steps. */ stepSystemPrompt?: (args: { workflowId: string; step: WorkflowStepDefinition; input: Record; state: Record; }) => string; /** * Whether to wrap plain text agent responses in an object { result: ... }. * Defaults to false. */ wrapAgentResultInObject?: boolean; /** * Built-in workflows that can be called by name if not found in the definition. */ builtInWorkflows?: Record>; /** * Allow unsafe code execution in condition expressions. * When false (default), only simple comparisons and property access are allowed. * When true, arbitrary JavaScript code can be executed in conditions. * WARNING: Setting to true with untrusted workflow definitions is a security risk. * @default false */ allowUnsafeCodeExecution?: boolean; }; export { DynamicWorkflowRunnerOptions } export { DynamicWorkflowRunnerOptions as DynamicWorkflowRunnerOptions_alias_1 } export { DynamicWorkflowRunnerOptions as DynamicWorkflowRunnerOptions_alias_2 } declare type ExitReason = { type: 'UsageExceeded'; messages: JsonModelMessage[]; } | { type: 'Exit'; message: string; object?: any; messages: JsonModelMessage[]; } | { type: 'Error'; error: { message: string; stack?: string; }; messages: JsonModelMessage[]; }; export { ExitReason } export { ExitReason as ExitReason_alias_1 } export { ExitReason as ExitReason_alias_2 } export declare function fetchPricing(provider: string, model: string): Promise; /** * File statistics */ declare interface FileStats { size: number; isDirectory: boolean; isFile: boolean; } export { FileStats } export { FileStats as FileStats_alias_1 } export { FileStats as FileStats_alias_2 } /** * File system provider interface for abstracting file operations. * This allows the core package to run in different environments: * - Node.js (local filesystem) * - Cloudflare edge runtime (remote storage, KV, R2, etc.) */ declare interface FileSystemProvider { /** * Check if a path exists */ exists(path: string): Promise | boolean; /** * Read a directory and return entries */ readdir(path: string): Promise; /** * Read file content as text */ readFile(path: string): Promise; /** * Read file content as a buffer */ readFileAsBuffer(path: string): Promise; /** * Get file statistics */ stat(path: string): Promise; /** * Join path segments */ join(...paths: string[]): string; /** * Normalize a path */ normalize(path: string): string; } export { FileSystemProvider } export { FileSystemProvider as FileSystemProvider_alias_1 } export { FileSystemProvider as FileSystemProvider_alias_2 } declare type FilesystemProvider = { readFile?: (path: string, includeIgnored: boolean) => Promise; writeFile?: (path: string, content: string) => Promise; fileExists?: (path: string) => Promise; removeFile?: (path: string) => Promise; renameFile?: (sourcePath: string, targetPath: string) => Promise; listFiles?: (path: string, recursive: boolean, maxCount: number, includeIgnored: boolean) => Promise<[string[], boolean]>; searchFiles?: (path: string, regex: string, filePattern: string) => Promise; readBinaryFile?: (url: string) => Promise<{ base64Data: string; mediaType: string; }>; }; export { FilesystemProvider } export { FilesystemProvider as FilesystemProvider_alias_1 } export { FilesystemProvider as FilesystemProvider_alias_2 } /** * Options for configuring the file system provider */ declare interface FileSystemProviderOptions { /** * Base directory for relative paths */ baseDir?: string; } export { FileSystemProviderOptions } export { FileSystemProviderOptions as FileSystemProviderOptions_alias_1 } export { FileSystemProviderOptions as FileSystemProviderOptions_alias_2 } declare const fromJsonModelMessage: (msg: JsonModelMessage) => ModelMessage; export { fromJsonModelMessage } export { fromJsonModelMessage as fromJsonModelMessage_alias_1 } export { fromJsonModelMessage as fromJsonModelMessage_alias_2 } declare type FullToolInfo = ToolInfo & { handler: ToolHandler; }; export { FullToolInfo } export { FullToolInfo as FullToolInfo_alias_1 } /** * Get file statistics for a skill */ declare function getSkillStats(skill: Skill): { totalSize: number; fileCount: number; largestFile: { name: string; size: number; }; }; export { getSkillStats } export { getSkillStats as getSkillStats_alias_1 } export { getSkillStats as getSkillStats_alias_2 } declare type GetTodoItemOutput = TodoItem & { subItems: { id: string; title: string; }[]; }; export { GetTodoItemOutput } export { GetTodoItemOutput as GetTodoItemOutput_alias_1 } export { GetTodoItemOutput as GetTodoItemOutput_alias_2 } export declare const handler: ToolHandler; export declare const handler_alias_1: ToolHandler; export declare const handler_alias_10: ToolHandler; export declare const handler_alias_11: ToolHandler; export declare const handler_alias_2: ToolHandler; export declare const handler_alias_3: ToolHandler; export declare const handler_alias_4: ToolHandler; export declare const handler_alias_5: ToolHandler; export declare const handler_alias_6: ToolHandler; export declare const handler_alias_7: ToolHandler; export declare const handler_alias_8: ToolHandler; export declare const handler_alias_9: ToolHandler; declare interface IfElseStep { id: string; if: { condition: string; thenBranch: WorkflowControlFlowStep[]; elseBranch?: WorkflowControlFlowStep[]; }; output?: string | null; } export { IfElseStep } export { IfElseStep as IfElseStep_alias_1 } export { IfElseStep as IfElseStep_alias_2 } /** * If/else branch - conditionally executes steps */ declare const IfElseStepSchema: z.ZodType; export { IfElseStepSchema } export { IfElseStepSchema as IfElseStepSchema_alias_1 } export { IfElseStepSchema as IfElseStepSchema_alias_2 } declare const IGNORED_DIRECTORIES: readonly [".git", "node_modules", ".next", ".turbo", "dist", "build", "coverage", ".cache", ".vscode", ".idea", "tmp", "temp", ".DS_Store"]; export { IGNORED_DIRECTORIES } export { IGNORED_DIRECTORIES as IGNORED_DIRECTORIES_alias_1 } export { IGNORED_DIRECTORIES as IGNORED_DIRECTORIES_alias_2 } /** * Memory Store Interface * * This interface defines the contract for memory store implementations. * Implementations can use different storage backends (SQLite, PostgreSQL, Redis, etc.) * while maintaining the same API for the core memory logic. */ declare interface IMemoryStore { /** * Read memory by topic name * * @param topic - The topic name * @returns The content, or undefined if not found */ readMemory(topic: string): Promise; /** * Update memory with operation * * @param operation - The operation to perform ('append', 'replace', 'remove') * @param topic - The topic name * @param content - The content (required for append/replace) * @param metadata - Optional metadata (entry_type, status, priority, tags, timestamps) */ updateMemory(operation: 'append' | 'replace' | 'remove', topic: string, content: string | undefined, metadata?: { entry_type?: string; status?: string; priority?: string; tags?: string; created_at?: number; updated_at?: number; last_accessed?: number; }): Promise; /** * Query memory with filters * * @param query - The query filters * @param options - Query options (operation, includeMetadata) * @returns Array of entries or count */ queryMemory(query: MemoryQuery, options?: QueryOptions): Promise; /** * Batch update memory * * @param operations - Array of memory operations */ batchUpdateMemory(operations: MemoryOperation[]): Promise; /** * Get database statistics * * @returns Database statistics */ getStats(): Promise; /** * Close the memory store and release resources */ close(): Promise; } export { IMemoryStore } export { IMemoryStore as IMemoryStore_alias_1 } export { IMemoryStore as IMemoryStore_alias_2 } declare type InteractionProvider = { askFollowupQuestion?: (question: string, options: string[]) => Promise; }; export { InteractionProvider } export { InteractionProvider as InteractionProvider_alias_1 } export { InteractionProvider as InteractionProvider_alias_2 } /** * Joins all given path segments, then normalizes the result. */ export declare function join(...parts: string[]): string; /** Content of an assistant message. It can be a string or an array of text, image, reasoning, redacted reasoning, and tool call parts. */ declare type JsonAssistantContent = string | Array; /** An assistant message. It can contain text, tool calls, or a combination of text and tool calls. */ declare type JsonAssistantModelMessage = { role: 'assistant'; content: JsonAssistantContent; /** Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. */ providerOptions?: ProviderOptions; }; declare type JsonDataContent = { type: 'base64' | 'url'; value: string; }; /** File content part of a prompt. It contains a file. */ declare interface JsonFilePart { type: 'file'; /** File data. Can either be: - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer - URL: a URL that points to the image */ data: JsonDataContent; /** Optional filename of the file. */ filename?: string; /** IANA media type of the file. @see https://www.iana.org/assignments/media-types/media-types.xhtml */ mediaType: string; /** Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. */ providerOptions?: ProviderOptions; } export { JsonFilePart } export { JsonFilePart as JsonFilePart_alias_1 } export { JsonFilePart as JsonFilePart_alias_2 } declare interface JsonImagePart { type: 'image'; /** Image data. Can either be: - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer - URL: a URL that points to the image */ image: JsonDataContent; /** Optional IANA media type of the image. @see https://www.iana.org/assignments/media-types/media-types.xhtml */ mediaType?: string; /** Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. */ providerOptions?: ProviderOptions; } export { JsonImagePart } export { JsonImagePart as JsonImagePart_alias_1 } export { JsonImagePart as JsonImagePart_alias_2 } declare type JsonModelMessage = SystemModelMessage | JsonUserModelMessage | JsonAssistantModelMessage | ToolModelMessage; export { JsonModelMessage } export { JsonModelMessage as JsonModelMessage_alias_1 } export { JsonModelMessage as JsonModelMessage_alias_2 } declare type JsonResponseMessage = JsonAssistantModelMessage | ToolModelMessage; export { JsonResponseMessage } export { JsonResponseMessage as JsonResponseMessage_alias_1 } export { JsonResponseMessage as JsonResponseMessage_alias_2 } declare interface JsonSchema { type?: JsonSchemaType | JsonSchemaType[]; enum?: JsonSchemaEnum; properties?: Record; required?: string[]; items?: JsonSchema; additionalProperties?: boolean | JsonSchema; description?: string; [key: string]: unknown; } /** * JSON Schema enum values - can be string, number, or boolean */ declare type JsonSchemaEnum = (string | number | boolean)[]; /** * JSON Schema type to Zod type mapping */ declare type JsonSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null'; declare interface JsonToolCallPart { type: 'tool-call'; /** ID of the tool call. This ID is used to match the tool call with the tool result. */ toolCallId: string; /** Name of the tool that is being called. */ toolName: string; /** Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema. */ input: JSONValue; /** Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. */ providerOptions?: ProviderOptions; /** Whether the tool call was executed by the provider. */ providerExecuted?: boolean; } /** Content of a user message. It can be a string or an array of text and image parts. */ declare type JsonUserContent = string | Array; export { JsonUserContent } export { JsonUserContent as JsonUserContent_alias_1 } export { JsonUserContent as JsonUserContent_alias_2 } /** A user message. It can contain text or a combination of text and images. */ declare type JsonUserModelMessage = { role: 'user'; content: JsonUserContent; /** Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. */ providerOptions?: ProviderOptions; }; export { JsonUserModelMessage } export { JsonUserModelMessage as JsonUserModelMessage_alias_1 } export { JsonUserModelMessage as JsonUserModelMessage_alias_2 } /** * List all available skills with their descriptions * * This tool enables agents to discover what specialized capabilities * are available based on task context. */ declare function listSkills(input: ListSkillsInput, context: SkillContext): Promise; export { listSkills } export { listSkills as listSkills_alias_1 } export { listSkills as listSkills_alias_2 } declare type ListSkillsInput = z.infer; export { ListSkillsInput } export { ListSkillsInput as ListSkillsInput_alias_1 } export { ListSkillsInput as ListSkillsInput_alias_2 } /** * Tool input parameters for listing skills */ declare const ListSkillsInputSchema: z.ZodObject<{ filter: z.ZodOptional; }, z.core.$strip>; export { ListSkillsInputSchema } export { ListSkillsInputSchema as ListSkillsInputSchema_alias_1 } export { ListSkillsInputSchema as ListSkillsInputSchema_alias_2 } declare type ListSkillsOutput = z.infer; export { ListSkillsOutput } export { ListSkillsOutput as ListSkillsOutput_alias_1 } export { ListSkillsOutput as ListSkillsOutput_alias_2 } /** * Tool output for listing skills */ declare const ListSkillsOutputSchema: z.ZodObject<{ skills: z.ZodArray; }, z.core.$strip>>; total: z.ZodNumber; }, z.core.$strip>; export { ListSkillsOutputSchema } export { ListSkillsOutputSchema as ListSkillsOutputSchema_alias_1 } export { ListSkillsOutputSchema as ListSkillsOutputSchema_alias_2 } /** * Tool info for listSkills (used in agent workflow) */ declare const listSkillsToolInfo: { readonly name: "listSkills"; readonly description: "List available skills and their descriptions. Use this to discover specialized capabilities for the current task."; readonly parameters: z.ZodObject<{ filter: z.ZodOptional; }, z.core.$strip>; readonly returns: z.ZodObject<{ skills: z.ZodArray; }, z.core.$strip>>; total: z.ZodNumber; }, z.core.$strip>; }; export { listSkillsToolInfo } export { listSkillsToolInfo as listSkillsToolInfo_alias_1 } export { listSkillsToolInfo as listSkillsToolInfo_alias_2 } declare type ListTodoItemsOutput = TodoItem[]; export { ListTodoItemsOutput } export { ListTodoItemsOutput as ListTodoItemsOutput_alias_1 } export { ListTodoItemsOutput as ListTodoItemsOutput_alias_2 } /** * Load a skill by name to access its instructions and resources * * This tool enables agents to autonomously load specialized knowledge * and capabilities based on task context. */ declare function loadSkill(input: LoadSkillInput, context: SkillContext): Promise; export { loadSkill } export { loadSkill as loadSkill_alias_1 } export { loadSkill as loadSkill_alias_2 } declare type LoadSkillInput = z.infer; export { LoadSkillInput } export { LoadSkillInput as LoadSkillInput_alias_1 } export { LoadSkillInput as LoadSkillInput_alias_2 } /** * Tool input parameters for loading a skill */ declare const LoadSkillInputSchema: z.ZodObject<{ skillName: z.ZodString; }, z.core.$strip>; export { LoadSkillInputSchema } export { LoadSkillInputSchema as LoadSkillInputSchema_alias_1 } export { LoadSkillInputSchema as LoadSkillInputSchema_alias_2 } declare type LoadSkillOutput = z.infer; export { LoadSkillOutput } export { LoadSkillOutput as LoadSkillOutput_alias_1 } export { LoadSkillOutput as LoadSkillOutput_alias_2 } /** * Tool output for loading a skill */ declare const LoadSkillOutputSchema: z.ZodObject<{ success: z.ZodBoolean; skill: z.ZodOptional; }, z.core.$strip>>; error: z.ZodOptional; warnings: z.ZodOptional>; }, z.core.$strip>; export { LoadSkillOutputSchema } export { LoadSkillOutputSchema as LoadSkillOutputSchema_alias_1 } export { LoadSkillOutputSchema as LoadSkillOutputSchema_alias_2 } /** * Tool info for loadSkill (used in agent workflow) */ declare const loadSkillToolInfo: { readonly name: "loadSkill"; readonly description: "Load a skill by name to access its instructions and bundled resources for a specialized task."; readonly parameters: z.ZodObject<{ skillName: z.ZodString; }, z.core.$strip>; readonly returns: z.ZodObject<{ success: z.ZodBoolean; skill: z.ZodOptional; }, z.core.$strip>>; error: z.ZodOptional; warnings: z.ZodOptional>; }, z.core.$strip>; }; export { loadSkillToolInfo } export { loadSkillToolInfo as loadSkillToolInfo_alias_1 } export { loadSkillToolInfo as loadSkillToolInfo_alias_2 } declare interface Logger { debug: (...args: any[]) => void; info: (...args: any[]) => void; warn: (...args: any[]) => void; error: (...args: any[]) => void; } export { Logger } export { Logger as Logger_alias_1 } export { Logger as Logger_alias_2 } declare const makeStepFn: () => StepFn; export { makeStepFn } export { makeStepFn as makeStepFn_alias_1 } export { makeStepFn as makeStepFn_alias_2 } declare type McpServerConfig = z.infer; export { McpServerConfig } export { McpServerConfig as McpServerConfig_alias_1 } declare const mcpServerConfigSchema: z.ZodObject<{ command: z.ZodString; args: z.ZodOptional>; env: z.ZodOptional>; tools: z.ZodOptional; model: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strict>]>>>; }, z.core.$strict>; export { mcpServerConfigSchema } export { mcpServerConfigSchema as mcpServerConfigSchema_alias_1 } declare type MemoryConfig = z.infer & MemoryStoreConfig; export { MemoryConfig } export { MemoryConfig as MemoryConfig_alias_1 } export { MemoryConfig as MemoryConfig_alias_2 } /** * Memory configuration schema * Controls the persistent memory store feature */ declare const memoryConfigSchema: z.ZodOptional>; type: z.ZodDefault>>; path: z.ZodDefault>; }, z.core.$strict>>; export { memoryConfigSchema } export { memoryConfigSchema as memoryConfigSchema_alias_1 } export { memoryConfigSchema as memoryConfigSchema_alias_2 } /** * Memory entry types */ declare type MemoryEntry = { id: string; name: string; scope: string; content: string; entry_type: string; status?: string; priority?: 'low' | 'medium' | 'high' | 'critical'; tags?: string; metadata?: string; created_at: number; updated_at: number; last_accessed: number; }; export { MemoryEntry } export { MemoryEntry as MemoryEntry_alias_1 } export { MemoryEntry as MemoryEntry_alias_2 } /** * Memory operation for batch updates */ declare type MemoryOperation = { operation: 'append' | 'replace' | 'remove'; name: string; content?: string; metadata?: { entry_type?: string; status?: string; priority?: string; tags?: string; metadata?: string; created_at?: number; updated_at?: number; last_accessed?: number; }; }; export { MemoryOperation } export { MemoryOperation as MemoryOperation_alias_1 } export { MemoryOperation as MemoryOperation_alias_2 } declare interface MemoryProvider { listMemoryTopics: () => Promise; readMemory: (topic?: string) => Promise; updateMemory: (operation: 'append' | 'replace' | 'remove', topic: string | undefined, content: string | undefined) => Promise; } export { MemoryProvider } export { MemoryProvider as MemoryProvider_alias_1 } export { MemoryProvider as MemoryProvider_alias_2 } /** * Memory query filters */ declare type MemoryQuery = { scope?: 'global' | 'project' | 'auto'; name?: string; type?: string; status?: string; priority?: string; tags?: string | string[]; search?: string; limit?: number; offset?: number; sortBy?: 'created' | 'updated' | 'accessed' | 'name'; sortOrder?: 'asc' | 'desc'; createdAfter?: number; createdBefore?: number; updatedAfter?: number; updatedBefore?: number; }; export { MemoryQuery } export { MemoryQuery as MemoryQuery_alias_1 } export { MemoryQuery as MemoryQuery_alias_2 } /** * Memory Store Configuration */ declare type MemoryStoreConfig = { enabled: boolean; type: 'sqlite' | 'memory' | string; path?: string; [key: string]: any; }; export { MemoryStoreConfig } export { MemoryStoreConfig as MemoryStoreConfig_alias_1 } export { MemoryStoreConfig as MemoryStoreConfig_alias_2 } declare class MockProvider implements ToolProvider { listTodoItems(id?: string | null, _status?: string | null): Promise<{ id: string; title: string; status: "open"; description: string; }[]>; getTodoItem(id: string): Promise; updateTodoItem(input: UpdateTodoItemInput): Promise<{ id: string; }>; readFile(_path: string, _includeIgnored?: boolean): Promise; writeFile(_path: string, _content: string): Promise; removeFile(_path: string): Promise; renameFile(_sourcePath: string, _targetPath: string): Promise; listFiles(_path: string, _recursive: boolean, _maxCount: number, _includeIgnored?: boolean): Promise<[string[], boolean]>; searchFiles(_path: string, _regex: string, _filePattern: string): Promise; executeCommand(_command: string, _needApprove: boolean): Promise<{ stdout: string; stderr: string; exitCode: number; summary?: string; }>; askFollowupQuestion(_question: string, _options?: string[]): Promise; search(_query: string): Promise; listMemoryTopics(): Promise; readMemory(_topic?: string): Promise; updateMemory(_operation: 'append' | 'replace' | 'remove', _topic?: string, _content?: string): Promise; } export { MockProvider } export { MockProvider as MockProvider_alias_1 } export { MockProvider as MockProvider_alias_2 } declare type ModelConfig = z.infer; export { ModelConfig } export { ModelConfig as ModelConfig_alias_1 } export { ModelConfig as ModelConfig_alias_2 } /** * Model configuration with optional provider override * Combines base model config with budget and rules */ declare const modelConfigSchema: z.ZodObject<{ provider: z.ZodOptional; model: z.ZodOptional; parameters: z.ZodOptional>; budget: z.ZodOptional; rules: z.ZodOptional>]>>; }, z.core.$strip>; export { modelConfigSchema } export { modelConfigSchema as modelConfigSchema_alias_1 } export { modelConfigSchema as modelConfigSchema_alias_2 } declare type ModelInfo = { inputPrice: number; outputPrice: number; cacheWritesPrice: number; cacheReadsPrice: number; }; export { ModelInfo } export { ModelInfo as ModelInfo_alias_1 } export { ModelInfo as ModelInfo_alias_2 } export { ModelInfo as ModelInfo_alias_3 } /** * Node.js file system provider implementation * Uses the node:fs module for file operations */ declare class NodeFileSystemProvider implements FileSystemProvider { readonly _options: FileSystemProviderOptions; constructor(_options?: FileSystemProviderOptions); exists(path: string): boolean; readdir(path: string): Promise; readFile(path: string): Promise; readFileAsBuffer(path: string): Promise; stat(path: string): Promise; join(...paths: string[]): string; normalize(path: string): string; } export { NodeFileSystemProvider } export { NodeFileSystemProvider as NodeFileSystemProvider_alias_1 } export { NodeFileSystemProvider as NodeFileSystemProvider_alias_2 } declare function parseDynamicWorkflowDefinition(source: string): DynamicWorkflowParseResult; export { parseDynamicWorkflowDefinition } export { parseDynamicWorkflowDefinition as parseDynamicWorkflowDefinition_alias_1 } export { parseDynamicWorkflowDefinition as parseDynamicWorkflowDefinition_alias_2 } declare const parseJsonFromMarkdown: (markdown: string) => ParseOutputResult; export { parseJsonFromMarkdown } export { parseJsonFromMarkdown as parseJsonFromMarkdown_alias_1 } export { parseJsonFromMarkdown as parseJsonFromMarkdown_alias_2 } declare type ParseOutputResult = { success: true; data: T; } | { success: false; error?: string; }; export { ParseOutputResult } export { ParseOutputResult as ParseOutputResult_alias_1 } export { ParseOutputResult as ParseOutputResult_alias_2 } declare interface PortkeyPricingConfig { provider: string; model: string; pricing: PortkeyPricingResponse; } export { PortkeyPricingConfig } export { PortkeyPricingConfig as PortkeyPricingConfig_alias_1 } export { PortkeyPricingConfig as PortkeyPricingConfig_alias_2 } declare interface PortkeyPricingResponse { request_token?: { price: number; }; response_token?: { price: number; }; cache_write_input_token?: { price: number; }; cache_read_input_token?: { price: number; }; additional_units?: Record; } export { PortkeyPricingResponse } export { PortkeyPricingResponse as PortkeyPricingResponse_alias_1 } export { PortkeyPricingResponse as PortkeyPricingResponse_alias_2 } /** * Simplify boolean string preprocessing * Converts 'true'/'false' strings to actual booleans */ export declare function preprocessBoolean(val: unknown): unknown; declare class PricingService { #private; constructor(fallbackPrices?: Record>>); getPricing(provider: string, model: string): Promise; } export { PricingService } export { PricingService as PricingService_alias_1 } export { PricingService as PricingService_alias_2 } declare type ProviderConfig = z.infer; export { ProviderConfig } export { ProviderConfig as ProviderConfig_alias_1 } export { ProviderConfig as ProviderConfig_alias_2 } /** * Provider configuration (credentials and settings) * Separate from model selection - this is about auth and provider settings */ declare const providerConfigSchema: z.ZodObject<{ apiKey: z.ZodOptional; defaultModel: z.ZodOptional; defaultParameters: z.ZodOptional>; location: z.ZodOptional; project: z.ZodOptional; keyFile: z.ZodOptional; baseUrl: z.ZodOptional; name: z.ZodOptional; }, z.core.$strip>; export { providerConfigSchema } export { providerConfigSchema as providerConfigSchema_alias_1 } export { providerConfigSchema as providerConfigSchema_alias_2 } declare type ProviderMetadataEntry = { provider: string; model: string; metadata: Record; timestamp: number; }; declare const providerModelSchema: z.ZodObject<{ provider: z.ZodOptional; model: z.ZodOptional; parameters: z.ZodOptional>; budget: z.ZodOptional; rules: z.ZodOptional, z.ZodObject<{ url: z.ZodString; }, z.core.$strict>, z.ZodObject<{ repo: z.ZodString; path: z.ZodString; tag: z.ZodOptional; commit: z.ZodOptional; branch: z.ZodOptional; }, z.core.$strict>]>>>, z.ZodString]>>; }, z.core.$strip>; export { providerModelSchema } export { providerModelSchema as providerModelSchema_alias_1 } /** * Query options */ declare type QueryOptions = { operation?: 'select' | 'delete' | 'count'; includeMetadata?: boolean; }; export { QueryOptions } export { QueryOptions as QueryOptions_alias_1 } export { QueryOptions as QueryOptions_alias_2 } /** * Read a supporting file from a loaded skill * * This tool enables agents to access supporting files bundled with skills, * such as reference documentation, examples, scripts, or templates. * Files are returned as plain text content. */ declare function readSkillFile(input: ReadSkillFileInput, context: SkillContext): Promise; export { readSkillFile } export { readSkillFile as readSkillFile_alias_1 } export { readSkillFile as readSkillFile_alias_2 } declare type ReadSkillFileInput = z.infer; export { ReadSkillFileInput } export { ReadSkillFileInput as ReadSkillFileInput_alias_1 } export { ReadSkillFileInput as ReadSkillFileInput_alias_2 } /** * Tool input parameters for reading a skill file */ declare const ReadSkillFileInputSchema: z.ZodObject<{ skillName: z.ZodString; filename: z.ZodString; }, z.core.$strip>; export { ReadSkillFileInputSchema } export { ReadSkillFileInputSchema as ReadSkillFileInputSchema_alias_1 } export { ReadSkillFileInputSchema as ReadSkillFileInputSchema_alias_2 } declare type ReadSkillFileOutput = z.infer; export { ReadSkillFileOutput } export { ReadSkillFileOutput as ReadSkillFileOutput_alias_1 } export { ReadSkillFileOutput as ReadSkillFileOutput_alias_2 } /** * Tool output for reading a skill file */ declare const ReadSkillFileOutputSchema: z.ZodObject<{ success: z.ZodBoolean; content: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>; export { ReadSkillFileOutputSchema } export { ReadSkillFileOutputSchema as ReadSkillFileOutputSchema_alias_1 } export { ReadSkillFileOutputSchema as ReadSkillFileOutputSchema_alias_2 } /** * Tool info for readSkillFile (used in agent workflow) */ declare const readSkillFileToolInfo: { readonly name: "readSkillFile"; readonly description: "Read a supporting file bundled with a skill, such as reference documentation, examples, scripts, or templates."; readonly parameters: z.ZodObject<{ skillName: z.ZodString; filename: z.ZodString; }, z.core.$strip>; readonly returns: z.ZodObject<{ success: z.ZodBoolean; content: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>; }; export { readSkillFileToolInfo } export { readSkillFileToolInfo as readSkillFileToolInfo_alias_1 } export { readSkillFileToolInfo as readSkillFileToolInfo_alias_2 } declare const replaceInFile_2: (fileContent: string, diff: string) => ReplaceResult; export { replaceInFile_2 as replaceInFileHelper } export { replaceInFile_2 as replaceInFile_alias_2 } export { replaceInFile_2 as replaceInFile_alias_3 } declare type ReplaceResult = { content: string; status: 'no_diff_applied' | 'some_diff_applied' | 'all_diff_applied'; appliedCount: number; totalCount: number; }; export { ReplaceResult } export { ReplaceResult as ReplaceResult_alias_1 } /** * Resolve home directory in path * Supports both Unix (HOME) and Windows (USERPROFILE) environments */ declare function resolveHomePath(path: string): string; export { resolveHomePath } export { resolveHomePath as resolveHomePath_alias_1 } export { resolveHomePath as resolveHomePath_alias_2 } declare const responsePrompts: { readonly errorInvokeTool: (tool: string, error: unknown) => string; readonly requireUseTool: "Error: No tool use detected. You MUST use a tool before proceeding.\ne.g. tool_name\n\nEnsure the opening and closing tags are correctly nested and closed, and that you are using the correct tool name.\nAvoid unnecessary text or symbols before or after the tool use.\nAvoid unnecessary escape characters or special characters.\n"; readonly requireUseToolNative: "Error: No tool use detected. You MUST use a tool before proceeding.\n"; readonly toolResults: (tool: string, result: LanguageModelV3ToolResultOutput) => Array; readonly commandResult: (command: string, exitCode: number, stdout: string, stderr: string) => string; }; export { responsePrompts } export { responsePrompts as responsePrompts_alias_1 } export { responsePrompts as responsePrompts_alias_2 } declare const ruleSchema: z.ZodUnion, z.ZodObject<{ url: z.ZodString; }, z.core.$strict>, z.ZodObject<{ repo: z.ZodString; path: z.ZodString; tag: z.ZodOptional; commit: z.ZodOptional; branch: z.ZodOptional; }, z.core.$strict>]>; export { ruleSchema } export { ruleSchema as ruleSchema_alias_1 } /** * Type for the runWorkflow tool that allows workflows to call other workflows */ declare type RunWorkflowTool = { input: { workflowId: string; input?: Record; }; output: unknown; }; export { RunWorkflowTool } export { RunWorkflowTool as RunWorkflowTool_alias_1 } export { RunWorkflowTool as RunWorkflowTool_alias_2 } declare type ScriptConfig = z.infer; export { ScriptConfig } export { ScriptConfig as ScriptConfig_alias_1 } declare const scriptSchema: z.ZodUnion, z.ZodObject<{ workflow: z.ZodString; description: z.ZodOptional; input: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ script: z.ZodString; description: z.ZodOptional; permissions: z.ZodOptional>; network: z.ZodOptional; subprocess: z.ZodOptional; }, z.core.$strip>>; timeout: z.ZodOptional; memory: z.ZodOptional; }, z.core.$strict>]>; export { scriptSchema } export { scriptSchema as scriptSchema_alias_1 } /** * Represents a loaded Agent Skill with all its content */ declare interface Skill extends SkillReference { /** * Main instructions content (SKILL.md without frontmatter) */ content: string; /** * Additional files bundled with the skill * Key is relative path from skill directory (e.g., "reference.md", "scripts/helper.py") * Value is file content */ files: Map; } export { Skill } export { Skill as Skill_alias_1 } export { Skill as Skill_alias_2 } declare const SKILL_ERROR_MESSAGES: { readonly MISSING_FRONTMATTER: "SKILL.md must begin with YAML frontmatter enclosed in ---"; readonly FRONTMATTER_INVALID: "Invalid frontmatter: {message}"; readonly SKILL_NOT_FOUND: "Skill not found"; readonly CONTEXT_NOT_INITIALIZED: "Skill context not initialized"; }; export { SKILL_ERROR_MESSAGES } export { SKILL_ERROR_MESSAGES as SKILL_ERROR_MESSAGES_alias_1 } export { SKILL_ERROR_MESSAGES as SKILL_ERROR_MESSAGES_alias_2 } /** * Constants for Agent Skills system */ declare const SKILL_LIMITS: { readonly MAX_FILE_SIZE: number; readonly MAX_SKILL_SIZE: number; readonly MAX_DEPTH: 10; readonly MAX_FILES: 500; readonly MIN_DESCRIPTION_LENGTH: 20; readonly MAX_DESCRIPTION_LENGTH: 1024; readonly MAX_NAME_LENGTH: 64; }; export { SKILL_LIMITS } export { SKILL_LIMITS as SKILL_LIMITS_alias_1 } export { SKILL_LIMITS as SKILL_LIMITS_alias_2 } /** * Context object passed to agents and tools for skill operations */ declare interface SkillContext { /** * Currently active/loaded skill (if any) */ activeSkill: Skill | null; /** * All available skills discovered from all sources (metadata only) */ availableSkills: SkillReference[]; /** * History of skills loaded during the session (for debugging/telemetry) */ skillLoadingHistory: string[]; /** * Load a skill by name */ loadSkill: (name: string) => Promise; } export { SkillContext } export { SkillContext as SkillContext_alias_1 } export { SkillContext as SkillContext_alias_2 } /** * Error thrown when skill discovery fails * * Note: This error has a custom `path` property that is accessed by callers. * Keeping as a class since the error factory doesn't support custom properties. */ declare class SkillDiscoveryError extends Error { path: string; constructor(message: string, path: string); } export { SkillDiscoveryError } export { SkillDiscoveryError as SkillDiscoveryError_alias_1 } export { SkillDiscoveryError as SkillDiscoveryError_alias_2 } /** * Service for discovering and loading Agent Skills from filesystem * * Skills are discovered from three sources with priority: * 1. Project skills at .claude/skills/ (highest priority) * 2. Personal skills at ~/.claude/skills/ * 3. Plugin skills at node_modules (lowest priority) */ declare class SkillDiscoveryService { private fs; private personalSkillsDir; private projectSkillsDir; private pluginSkillsDirs; constructor(options: { cwd: string; personalSkillsDir?: string; pluginSkillsDirs?: string[]; fs?: FileSystemProvider; }); /** * Discover all available skills from all sources * Removes duplicates (project skills take priority over personal/plugin) */ discoverAll(): Promise; /** * Discover skills in a specific directory */ discoverInDirectory(dir: string, source: 'personal' | 'project' | 'plugin'): Promise; /** * Discover skills from plugin directories (node_modules) */ discoverPlugins(): Promise; /** * Load a single skill from its directory */ loadSkill(skillPath: string, source: 'personal' | 'project' | 'plugin'): Promise; /** * Parse SKILL.md content and extract frontmatter */ private parseSkillMd; /** * Parse and validate YAML frontmatter */ private parseMetadata; /** * Recursively load files from a directory into the files map * @returns The total size of all files loaded (in bytes) */ private loadDirectoryFiles; /** * Create an initial skill context object */ createContext(): Promise; } export { SkillDiscoveryService } export { SkillDiscoveryService as SkillDiscoveryService_alias_1 } export { SkillDiscoveryService as SkillDiscoveryService_alias_2 } declare type SkillMetadata = z.infer; export { SkillMetadata } export { SkillMetadata as SkillMetadata_alias_1 } export { SkillMetadata as SkillMetadata_alias_2 } /** * Zod schema for skill metadata (YAML frontmatter in SKILL.md) */ declare const skillMetadataSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodString; allowedTools: z.ZodOptional>; }, z.core.$strip>; export { skillMetadataSchema } export { skillMetadataSchema as skillMetadataSchema_alias_1 } export { skillMetadataSchema as skillMetadataSchema_alias_2 } /** * Represents a reference to a discovered skill (metadata only) */ declare interface SkillReference { /** * Parsed metadata from SKILL.md frontmatter */ metadata: SkillMetadata; /** * Absolute path to the skill directory on disk */ path: string; /** * Where the skill was loaded from */ source: 'personal' | 'project' | 'plugin'; } export { SkillReference } export { SkillReference as SkillReference_alias_1 } export { SkillReference as SkillReference_alias_2 } declare type SkillSource = keyof typeof SOURCE_ICONS; export { SkillSource } export { SkillSource as SkillSource_alias_1 } export { SkillSource as SkillSource_alias_2 } /** * Error thrown when skill validation fails * * Note: This error has a custom `path` property that is accessed by callers. * Keeping as a class since the error factory doesn't support custom properties. */ declare class SkillValidationError extends Error { path: string; constructor(message: string, path: string); } export { SkillValidationError } export { SkillValidationError as SkillValidationError_alias_1 } export { SkillValidationError as SkillValidationError_alias_2 } declare const SOURCE_ICONS: { readonly project: "📁"; readonly personal: "🏠"; readonly plugin: "🔌"; }; export { SOURCE_ICONS } export { SOURCE_ICONS as SOURCE_ICONS_alias_1 } export { SOURCE_ICONS as SOURCE_ICONS_alias_2 } declare interface StepFn { (name: string, fn: () => Promise): Promise; (name: string, options: StepOptions, fn: () => Promise): Promise; } export { StepFn } export { StepFn as StepFn_alias_1 } export { StepFn as StepFn_alias_2 } declare type StepOptions = { retry?: number; }; export { StepOptions } export { StepOptions as StepOptions_alias_1 } export { StepOptions as StepOptions_alias_2 } /** * Security validation patterns to detect suspicious content * * Note: Patterns use case-insensitive flag (/i) but NOT global (/g) to avoid * stateful lastIndex issues when RegExp.test() is called multiple times. */ declare const SUSPICIOUS_PATTERNS: readonly [RegExp, RegExp, RegExp]; export { SUSPICIOUS_PATTERNS } export { SUSPICIOUS_PATTERNS as SUSPICIOUS_PATTERNS_alias_1 } export { SUSPICIOUS_PATTERNS as SUSPICIOUS_PATTERNS_alias_2 } /** * Union type of all possible task events */ declare type TaskEvent = TaskEventStartTask | TaskEventStartRequest | TaskEventEndRequest | TaskEventText | TaskEventToolUse | TaskEventToolResult | TaskEventToolError | TaskEventUsageExceeded | TaskEventEndTask; export { TaskEvent } export { TaskEvent as TaskEvent_alias_1 } export { TaskEvent as TaskEvent_alias_2 } /** * Base interface for all task events */ declare interface TaskEventBase { kind: TaskEventKind; } export { TaskEventBase } export { TaskEventBase as TaskEventBase_alias_1 } export { TaskEventBase as TaskEventBase_alias_2 } declare type TaskEventCallback = (event: TaskEvent) => void | Promise; export { TaskEventCallback } export { TaskEventCallback as TaskEventCallback_alias_1 } export { TaskEventCallback as TaskEventCallback_alias_2 } /** * Event for request end */ declare interface TaskEventEndRequest extends TaskEventBase { kind: TaskEventKind.EndRequest; message: string; } export { TaskEventEndRequest } export { TaskEventEndRequest as TaskEventEndRequest_alias_1 } export { TaskEventEndRequest as TaskEventEndRequest_alias_2 } /** * Event for task end */ declare interface TaskEventEndTask extends TaskEventBase { kind: TaskEventKind.EndTask; exitReason: ExitReason; } export { TaskEventEndTask } export { TaskEventEndTask as TaskEventEndTask_alias_1 } export { TaskEventEndTask as TaskEventEndTask_alias_2 } /** * Enum representing different kinds of task events */ declare enum TaskEventKind { StartTask = "StartTask", StartRequest = "StartRequest", EndRequest = "EndRequest", Text = "Text", Reasoning = "Reasoning", ToolUse = "ToolUse", ToolReply = "ToolReply", ToolError = "ToolError", UsageExceeded = "UsageExceeded", EndTask = "EndTask" } export { TaskEventKind } export { TaskEventKind as TaskEventKind_alias_1 } export { TaskEventKind as TaskEventKind_alias_2 } /** * Event for request start */ declare interface TaskEventStartRequest extends TaskEventBase { kind: TaskEventKind.StartRequest; userMessage: readonly JsonModelMessage[]; } export { TaskEventStartRequest } export { TaskEventStartRequest as TaskEventStartRequest_alias_1 } export { TaskEventStartRequest as TaskEventStartRequest_alias_2 } /** * Event for task start */ declare interface TaskEventStartTask extends TaskEventBase { kind: TaskEventKind.StartTask; systemPrompt: string; } export { TaskEventStartTask } export { TaskEventStartTask as TaskEventStartTask_alias_1 } export { TaskEventStartTask as TaskEventStartTask_alias_2 } /** * Event for text/reasoning updates */ declare interface TaskEventText extends TaskEventBase { kind: TaskEventKind.Text | TaskEventKind.Reasoning; newText: string; } export { TaskEventText } export { TaskEventText as TaskEventText_alias_1 } export { TaskEventText as TaskEventText_alias_2 } declare interface TaskEventToolError extends TaskEventBase { kind: TaskEventKind.ToolError; tool: string; error: ToolResponseResult; } export { TaskEventToolError } export { TaskEventToolError as TaskEventToolError_alias_1 } export { TaskEventToolError as TaskEventToolError_alias_2 } declare interface TaskEventToolResult extends TaskEventBase { kind: TaskEventKind.ToolReply; tool: string; content: ToolResponseResult; } export { TaskEventToolResult } export { TaskEventToolResult as TaskEventToolResult_alias_1 } export { TaskEventToolResult as TaskEventToolResult_alias_2 } /** * Event for tool-related updates */ declare interface TaskEventToolUse extends TaskEventBase { kind: TaskEventKind.ToolUse; tool: string; params: Record; } export { TaskEventToolUse } export { TaskEventToolUse as TaskEventToolUse_alias_1 } export { TaskEventToolUse as TaskEventToolUse_alias_2 } /** * Event for task usage exceeded */ declare interface TaskEventUsageExceeded extends TaskEventBase { kind: TaskEventKind.UsageExceeded; } export { TaskEventUsageExceeded } export { TaskEventUsageExceeded as TaskEventUsageExceeded_alias_1 } export { TaskEventUsageExceeded as TaskEventUsageExceeded_alias_2 } declare type TodoItem = z.infer; export { TodoItem } export { TodoItem as TodoItem_alias_1 } export { TodoItem as TodoItem_alias_2 } declare const TodoItemSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodString; description: z.ZodString; status: z.ZodEnum<{ open: "open"; completed: "completed"; closed: "closed"; }>; }, z.core.$strip>; export { TodoItemSchema } export { TodoItemSchema as TodoItemSchema_alias_1 } export { TodoItemSchema as TodoItemSchema_alias_2 } declare type TodoProvider = { listTodoItems: (id?: string | null, status?: string | null) => Promise; getTodoItem: (id: string) => Promise; updateTodoItem: (input: UpdateTodoItemInput) => Promise; }; export { TodoProvider } export { TodoProvider as TodoProvider_alias_1 } export { TodoProvider as TodoProvider_alias_2 } declare const TodoStatus: z.ZodEnum<{ open: "open"; completed: "completed"; closed: "closed"; }>; export { TodoStatus } export { TodoStatus as TodoStatus_alias_1 } export { TodoStatus as TodoStatus_alias_2 } declare const toJsonModelMessage: (msg: ModelMessage) => JsonModelMessage; export { toJsonModelMessage } export { toJsonModelMessage as toJsonModelMessage_alias_1 } export { toJsonModelMessage as toJsonModelMessage_alias_2 } /** * Tool groups that can be used in step.tools arrays. * - "readonly": File reading operations only * - "readwrite": Full file system access * - "internet": Network operations (fetch, search) * - "all": All available tools (special keyword, not in this map) */ declare const TOOL_GROUPS: Record; export { TOOL_GROUPS } export { TOOL_GROUPS as TOOL_GROUPS_alias_1 } export { TOOL_GROUPS as TOOL_GROUPS_alias_2 } declare type ToolConfig = z.infer; export { ToolConfig } export { ToolConfig as ToolConfig_alias_1 } export { ToolConfig as ToolConfig_alias_2 } /** * Helper to create a model config schema with tool-specific overrides * Used in MCP server tool configuration */ declare const toolConfigSchema: z.ZodUnion; model: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strip>]>; export { toolConfigSchema } export { toolConfigSchema as toolConfigSchema_alias_1 } export { toolConfigSchema as toolConfigSchema_alias_2 } declare type ToolHandler<_T, P> = (provider: P, args: Partial>) => Promise; export { ToolHandler } export { ToolHandler as ToolHandler_alias_1 } declare type ToolInfo = { name: string; description: string; parameters: z.ZodObject; }; export { ToolInfo } export { ToolInfo as ToolInfo_alias_1 } export declare const toolInfo: { readonly name: "askFollowupQuestion"; readonly description: "Ask the user for missing information that blocks progress. Use direct questions, add short mutually exclusive options when helpful, and group related questions in one call."; readonly parameters: z.ZodObject<{ questions: z.ZodArray>; }, z.core.$strip>>; }, z.core.$strip>; }; export declare const toolInfo_alias_1: { readonly name: "executeCommand"; readonly description: "Run one CLI command from the project-root working directory. Use for builds, tests, diagnostics, and other command-line tasks. After calling executeCommand, wait for the command result before deciding on the next action."; readonly parameters: z.ZodObject<{ command: z.ZodString; requiresApproval: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }; export declare const toolInfo_alias_10: { readonly name: "searchFiles"; readonly description: "Search files in a directory with a Rust regex pattern and optional file globs. Use this to find code, text, or references before reading specific files."; readonly parameters: z.ZodObject<{ path: z.ZodString; regex: z.ZodString; filePattern: z.ZodOptional; }, z.core.$strip>; }; export declare const toolInfo_alias_11: { readonly name: "writeToFile"; readonly description: "Write complete content to a file, creating parent directories if needed. Use this for new files or full-file replacement. For targeted edits to existing files, prefer replaceInFile. Always provide the complete intended file content."; readonly parameters: z.ZodObject<{ path: z.ZodString; content: z.ZodString; }, z.core.$strip>; }; export declare const toolInfo_alias_2: { readonly name: "fetchUrl"; readonly description: "Fetch one or more HTTP(S) URLs and return their content as Markdown. Use for webpages and raw hosted files such as README or source files."; readonly parameters: z.ZodObject<{ url: z.ZodPipe, z.ZodArray>; }, z.core.$strip>; }; export declare const toolInfo_alias_3: { readonly name: "listFiles"; readonly description: "List files and directories under a directory. Use this for project structure discovery and file existence checks. Recursive listing is enabled by default and can be limited with maxCount."; readonly parameters: z.ZodObject<{ path: z.ZodString; maxCount: z.ZodDefault>>; recursive: z.ZodDefault, z.ZodBoolean>>; includeIgnored: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }; export declare const toolInfo_alias_4: { readonly name: "readBinaryFile"; readonly description: "Read a non-text file, such as an image or PDF, from a URL or local file:// path."; readonly parameters: z.ZodObject<{ url: z.ZodString; }, z.core.$strip>; }; export declare const toolInfo_alias_5: { readonly name: "readFile"; readonly description: "Read one or more text files. Use this to inspect known files before editing, understand code, or read configuration. Prefer searchFiles for content searches and listFiles for directory discovery. The result includes line numbers; use offset and limit for large files."; readonly parameters: z.ZodObject<{ path: z.ZodPipe, z.ZodArray>; offset: z.ZodOptional; limit: z.ZodOptional; includeIgnored: z.ZodDefault, z.ZodBoolean>>; }, z.core.$strip>; }; export declare const toolInfo_alias_6: { readonly name: "removeFile"; readonly description: "Remove a file at the specified path."; readonly parameters: z.ZodObject<{ path: z.ZodString; }, z.core.$strip>; }; export declare const toolInfo_alias_7: { readonly name: "renameFile"; readonly description: "Rename or move a file from source path to target path."; readonly parameters: z.ZodObject<{ source_path: z.ZodString; target_path: z.ZodString; }, z.core.$strip>; }; export declare const toolInfo_alias_8: { readonly name: "replaceInFile"; readonly description: "Make targeted edits to an existing file with SEARCH/REPLACE blocks. Use writeToFile for new files or full-file replacement. Read the file first when you do not know the exact text to replace.\n\nSEARCH/REPLACE format:\n<<<<<<< SEARCH\n[exact content to find]\n=======\n[new content to replace with]\n>>>>>>> REPLACE\n\nRules:\n1. SEARCH content must match EXACTLY (character-for-character including whitespace)\n2. Each block replaces only first occurrence\n3. Include just enough lines for uniqueness (not too many, not too few)\n4. Keep blocks concise (don't include long unchanged sections)\n5. List blocks in order they appear in file\n6. Use multiple blocks for multiple independent changes\n\nSpecial operations:\n- Move code: Two blocks (delete from original + insert at new location)\n- Delete code: Empty REPLACE section"; readonly parameters: z.ZodObject<{ path: z.ZodString; diff: z.ZodString; }, z.core.$strip>; }; export declare const toolInfo_alias_9: { readonly name: "search"; readonly description: "Search the web for current information, facts, news, documentation, or research that may not be available locally."; readonly parameters: z.ZodObject<{ query: z.ZodString; }, z.core.$strip>; }; declare type ToolParameter = { name: string; description: string; required: boolean; usageValue?: string; allowMultiple?: boolean; children?: ToolParameter[]; }; export { ToolParameter } export { ToolParameter as ToolParameter_alias_1 } declare type ToolParameterValue = string | { [key: string]: ToolParameterValue; } | ToolParameterValue[]; export { ToolParameterValue } export { ToolParameterValue as ToolParameterValue_alias_1 } declare type ToolProvider = FilesystemProvider & CommandProvider & InteractionProvider & WebProvider & Partial & Partial; export { ToolProvider } export { ToolProvider as ToolProvider_alias_1 } export { ToolProvider as ToolProvider_alias_2 } declare type ToolRegistry = Record>; export { ToolRegistry } export { ToolRegistry as ToolRegistry_alias_1 } export { ToolRegistry as ToolRegistry_alias_2 } declare type ToolResponse = { success: boolean; message: ToolResponseResult; }; export { ToolResponse } export { ToolResponse as ToolResponse_alias_1 } declare type ToolResponseResult = ToolResultOutput; export { ToolResponseResult } export { ToolResponseResult as ToolResponseResult_alias_1 } declare type ToolResponseResultContentPart = Extract['value'][number]; export { ToolResponseResultContentPart } export { ToolResponseResultContentPart as ToolResponseResultContentPart_alias_1 } declare type ToolResponseResultMedia = Extract; export { ToolResponseResultMedia } export { ToolResponseResultMedia as ToolResponseResultMedia_alias_1 } declare type ToolSignature = { input: I; output: O; }; export { ToolSignature } export { ToolSignature as ToolSignature_alias_1 } export { ToolSignature as ToolSignature_alias_2 } declare type Totals = { input: number; output: number; cachedRead: number; cost: number; messageCount: number; }; declare interface TryCatchStep { id: string; try: { trySteps: WorkflowControlFlowStep[]; catchSteps: WorkflowControlFlowStep[]; }; output?: string | null; } export { TryCatchStep } export { TryCatchStep as TryCatchStep_alias_1 } export { TryCatchStep as TryCatchStep_alias_2 } /** * Try/catch block - error handling */ declare const TryCatchStepSchema: z.ZodObject<{ id: z.ZodString; try: z.ZodObject<{ trySteps: z.ZodArray>>>; catchSteps: z.ZodArray>>>; }, z.core.$strip>; output: z.ZodOptional>; }, z.core.$strip>; export { TryCatchStepSchema } export { TryCatchStepSchema as TryCatchStepSchema_alias_1 } export { TryCatchStepSchema as TryCatchStepSchema_alias_2 } declare type UpdateTodoItemInput = z.infer; export { UpdateTodoItemInput } export { UpdateTodoItemInput as UpdateTodoItemInput_alias_1 } export { UpdateTodoItemInput as UpdateTodoItemInput_alias_2 } declare const UpdateTodoItemInputSchema: z.ZodObject<{ operation: z.ZodEnum<{ add: "add"; update: "update"; }>; id: z.ZodOptional>; parentId: z.ZodOptional>; title: z.ZodOptional>; description: z.ZodOptional>; status: z.ZodOptional>>; }, z.core.$strip>; export { UpdateTodoItemInputSchema } export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_1 } export { UpdateTodoItemInputSchema as UpdateTodoItemInputSchema_alias_2 } declare type UpdateTodoItemOutput = z.infer; export { UpdateTodoItemOutput } export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_1 } export { UpdateTodoItemOutput as UpdateTodoItemOutput_alias_2 } declare const UpdateTodoItemOutputSchema: z.ZodObject<{ id: z.ZodString; }, z.core.$strip>; export { UpdateTodoItemOutputSchema } export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_1 } export { UpdateTodoItemOutputSchema as UpdateTodoItemOutputSchema_alias_2 } /** * Tracks token / cost usage across any mix of LLM models. * Supports optional caps on total messages and total cost. */ declare class UsageMeter { #private; constructor(modelInfos?: Record>>, opts?: { maxMessages?: number; maxCost?: number; pricingService?: PricingService; }); addUsage(llm: LanguageModelV3, resp: { usage: LanguageModelV3Usage; providerMetadata?: Record; } | { totalUsage: LanguageModelV3Usage; providerMetadata?: Record; } | { totalUsage: LanguageModelUsage; providerMetadata?: Record; }, options?: { modelInfo?: ModelInfo; }): Promise; /** Override the running totals (e.g., restore from saved state). */ setUsage(newUsage: Partial, options?: { clearMetadata?: boolean; }): void; /** Manually bump the message count (useful if you record some messages without token info). */ incrementMessageCount(n?: number): void; /** Reset the running totals. */ resetUsage(): void; /** Return true once either messages or cost exceed the configured caps. */ isLimitExceeded(): { messageCount: boolean; maxMessages: number; cost: boolean; maxCost: number; result: boolean; }; /** Same as isLimitExceeded but throws an error if a limit is hit. */ checkLimit(): void; /** Getter for the aggregated totals (immutable copy). */ get usage(): { input: number; output: number; cachedRead: number; cost: number; messageCount: number; }; /** Getter for provider metadata entries (immutable copy). */ get providerMetadata(): ProviderMetadataEntry[]; /** Calculate cache statistics from stored metadata entries. */ get cacheStats(): { totalCachedTokens: number; totalRequests: number; requestsWithCache: number; cacheHitRate: number; entries: ProviderMetadataEntry[]; }; /** Clear stored provider metadata entries. */ clearProviderMetadata(): void; /** Merge another UsageMeter's totals into this one. */ merge(other: UsageMeter): void; /** Wait for all pending usage updates to complete. */ waitForPending(): Promise; getUsageText(): string; onFinishHandler(llm: LanguageModelV3): (evt: { totalUsage: LanguageModelUsage; providerMetadata?: Record; } | { totalUsage: LanguageModelV3Usage; providerMetadata?: Record; }) => Promise; } export { UsageMeter } export { UsageMeter as UsageMeter_alias_1 } /** * Validate a skill's metadata * Note: Zod already validates name format, max length, and description max length * This function only validates requirements not covered by Zod */ declare function validateSkillMetadata(skill: Skill): string[]; export { validateSkillMetadata } export { validateSkillMetadata as validateSkillMetadata_alias_1 } export { validateSkillMetadata as validateSkillMetadata_alias_2 } /** * Validate file references in skill content * * Warns about external references and absolute paths */ declare function validateSkillReferences(skill: Skill): string[]; export { validateSkillReferences } export { validateSkillReferences as validateSkillReferences_alias_1 } export { validateSkillReferences as validateSkillReferences_alias_2 } /** * Validate a skill's security constraints * * @throws {SkillValidationError} if validation fails */ declare function validateSkillSecurity(skill: Skill): void; export { validateSkillSecurity } export { validateSkillSecurity as validateSkillSecurity_alias_1 } export { validateSkillSecurity as validateSkillSecurity_alias_2 } /** * Validate a workflow file for common issues */ declare function validateWorkflowFile(definition: WorkflowFile): ValidationResult; export { validateWorkflowFile } export { validateWorkflowFile as validateWorkflowFile_alias_1 } export { validateWorkflowFile as validateWorkflowFile_alias_2 } declare type ValidationResult = { success: true; } | { success: false; errors: string[]; }; export { ValidationResult } export { ValidationResult as ValidationResult_alias_1 } export { ValidationResult as ValidationResult_alias_2 } declare type WebProvider = { fetchUrl?: (url: string) => Promise; search?: (query: string) => Promise; }; export { WebProvider } export { WebProvider as WebProvider_alias_1 } export { WebProvider as WebProvider_alias_2 } declare interface WhileLoopStep { id: string; while: { condition: string; steps: WorkflowControlFlowStep[]; }; output?: string | null; } export { WhileLoopStep } export { WhileLoopStep as WhileLoopStep_alias_1 } export { WhileLoopStep as WhileLoopStep_alias_2 } /** * While loop - repeats steps while condition is true */ declare const WhileLoopStepSchema: z.ZodType; export { WhileLoopStepSchema } export { WhileLoopStepSchema as WhileLoopStepSchema_alias_1 } export { WhileLoopStepSchema as WhileLoopStepSchema_alias_2 } declare type WorkflowControlFlowStep = z.infer | WhileLoopStep | IfElseStep | BreakStep | ContinueStep | TryCatchStep; export { WorkflowControlFlowStep } export { WorkflowControlFlowStep as WorkflowControlFlowStep_alias_1 } export { WorkflowControlFlowStep as WorkflowControlFlowStep_alias_2 } /** * Any step that can appear in a workflow's steps array * Can be a basic step, control flow, or jump statement */ declare const WorkflowControlFlowStepSchema: z.ZodType; export { WorkflowControlFlowStepSchema } export { WorkflowControlFlowStepSchema as WorkflowControlFlowStepSchema_alias_1 } export { WorkflowControlFlowStepSchema as WorkflowControlFlowStepSchema_alias_2 } declare type WorkflowDefinition = z.infer; export { WorkflowDefinition } export { WorkflowDefinition as WorkflowDefinition_alias_1 } export { WorkflowDefinition as WorkflowDefinition_alias_2 } /** * Workflow definition - now supports control flow in steps */ declare const WorkflowDefinitionSchema: z.ZodObject<{ task: z.ZodString; inputs: z.ZodOptional>; default: z.ZodOptional>; }, z.core.$strip>>>>; steps: z.ZodArray>>; output: z.ZodOptional>; }, z.core.$strip>; export { WorkflowDefinitionSchema } export { WorkflowDefinitionSchema as WorkflowDefinitionSchema_alias_1 } export { WorkflowDefinitionSchema as WorkflowDefinitionSchema_alias_2 } declare type WorkflowFile = z.infer; export { WorkflowFile } export { WorkflowFile as WorkflowFile_alias_1 } export { WorkflowFile as WorkflowFile_alias_2 } declare const WorkflowFileSchema: z.ZodObject<{ workflows: z.ZodRecord>; default: z.ZodOptional>; }, z.core.$strip>>>>; steps: z.ZodArray>>; output: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; export { WorkflowFileSchema } export { WorkflowFileSchema as WorkflowFileSchema_alias_1 } export { WorkflowFileSchema as WorkflowFileSchema_alias_2 } declare type WorkflowFn = BaseWorkflowContext> = (input: TInput, context: TContext) => Promise; export { WorkflowFn } export { WorkflowFn as WorkflowFn_alias_1 } export { WorkflowFn as WorkflowFn_alias_2 } declare type WorkflowInputDefinition = z.infer; export { WorkflowInputDefinition } export { WorkflowInputDefinition as WorkflowInputDefinition_alias_1 } export { WorkflowInputDefinition as WorkflowInputDefinition_alias_2 } declare const WorkflowInputDefinitionSchema: z.ZodObject<{ id: z.ZodString; description: z.ZodOptional>; default: z.ZodOptional>; }, z.core.$strip>; export { WorkflowInputDefinitionSchema } export { WorkflowInputDefinitionSchema as WorkflowInputDefinitionSchema_alias_1 } export { WorkflowInputDefinitionSchema as WorkflowInputDefinitionSchema_alias_2 } declare type WorkflowStepDefinition = z.infer; export { WorkflowStepDefinition } export { WorkflowStepDefinition as WorkflowStepDefinition_alias_1 } export { WorkflowStepDefinition as WorkflowStepDefinition_alias_2 } /** * Basic workflow step - executes a task */ declare const WorkflowStepDefinitionSchema: z.ZodObject<{ id: z.ZodString; tools: z.ZodOptional>>; task: z.ZodString; output: z.ZodOptional>; expected_outcome: z.ZodOptional>; outputSchema: z.ZodOptional>; timeout: z.ZodOptional>; }, z.core.$strip>; export { WorkflowStepDefinitionSchema } export { WorkflowStepDefinitionSchema as WorkflowStepDefinitionSchema_alias_1 } export { WorkflowStepDefinitionSchema as WorkflowStepDefinitionSchema_alias_2 } declare type WorkflowTools = { [K in keyof TTools]: (input: TTools[K]['input']) => Promise; }; export { WorkflowTools } export { WorkflowTools as WorkflowTools_alias_1 } export { WorkflowTools as WorkflowTools_alias_2 } export { }