toolpack-sdk 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -3
- package/dist/index.cjs +171 -171
- package/dist/index.d.cts +66 -5
- package/dist/index.d.ts +66 -5
- package/dist/index.js +172 -172
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -252,9 +252,21 @@ interface ToolpackCredentials {
|
|
|
252
252
|
/** Netlify auth token. Fallback: NETLIFY_AUTH_TOKEN */
|
|
253
253
|
netlifyAuthToken?: string;
|
|
254
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* Who a run acts for, e.g. the signed-in user of the host application.
|
|
257
|
+
* Supplied by the host (never by the model), so a tool can trust it for per-user data.
|
|
258
|
+
*/
|
|
259
|
+
interface ToolActor {
|
|
260
|
+
/** The host application's stable id for the actor. */
|
|
261
|
+
id: string;
|
|
262
|
+
/** What the actor is, in the host's terms (e.g. 'user'). */
|
|
263
|
+
kind?: string;
|
|
264
|
+
}
|
|
255
265
|
interface ToolContext {
|
|
256
266
|
/** Absolute path to the workspace/project root */
|
|
257
267
|
workspaceRoot: string;
|
|
268
|
+
/** Who this run acts for, when the host set one (see ToolpackInitConfig.actor). */
|
|
269
|
+
actor?: ToolActor;
|
|
258
270
|
/**
|
|
259
271
|
* Tool-specific config from toolsConfig.additionalConfigurations.
|
|
260
272
|
* Includes credentials (ctx.config.credentials) and per-tool settings
|
|
@@ -267,6 +279,8 @@ interface ToolContext {
|
|
|
267
279
|
processRegistry?: ProcessRegistry;
|
|
268
280
|
/** Per-tenant GitHub App installation-token cache (github-tools). */
|
|
269
281
|
githubTokenStore?: GithubTokenStore;
|
|
282
|
+
/** Aborted when the run was stopped. A long-running tool can watch it to end its own work early. */
|
|
283
|
+
signal?: AbortSignal;
|
|
270
284
|
}
|
|
271
285
|
/**
|
|
272
286
|
* Hints about tool behaviour sent to MCP clients in tools/list.
|
|
@@ -740,7 +754,8 @@ interface CompletionResponse<T = unknown> {
|
|
|
740
754
|
interface CompletionChunk {
|
|
741
755
|
delta: string;
|
|
742
756
|
usage?: Usage;
|
|
743
|
-
|
|
757
|
+
/** 'aborted' is the last chunk of a stream that was stopped by the request's AbortSignal. */
|
|
758
|
+
finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'error' | 'aborted';
|
|
744
759
|
tool_calls?: ToolCallResult[];
|
|
745
760
|
/** Present when chunk comes from a workflow step */
|
|
746
761
|
workflowStep?: {
|
|
@@ -1377,6 +1392,8 @@ interface AIClientConfig {
|
|
|
1377
1392
|
toolsConfig?: ToolsConfig;
|
|
1378
1393
|
systemPrompt?: string;
|
|
1379
1394
|
disableBaseContext?: boolean;
|
|
1395
|
+
/** Disable automatic tool usage guidance injection into the system prompt */
|
|
1396
|
+
disableToolGuidance?: boolean;
|
|
1380
1397
|
/** Human-in-the-loop configuration for tool confirmation */
|
|
1381
1398
|
hitlConfig?: HitlConfig;
|
|
1382
1399
|
/** Callback for handling tool confirmation requests */
|
|
@@ -1385,6 +1402,8 @@ interface AIClientConfig {
|
|
|
1385
1402
|
conversationId?: string;
|
|
1386
1403
|
/** Context window management configuration */
|
|
1387
1404
|
contextWindowConfig?: ContextWindowConfig;
|
|
1405
|
+
/** Who tool calls act for; passed to every tool as `ctx.actor`. A function is read on each call. */
|
|
1406
|
+
actor?: ToolActor | (() => ToolActor | null | undefined);
|
|
1388
1407
|
}
|
|
1389
1408
|
declare class AIClient extends EventEmitter {
|
|
1390
1409
|
private providers;
|
|
@@ -1398,11 +1417,13 @@ declare class AIClient extends EventEmitter {
|
|
|
1398
1417
|
private activeMode;
|
|
1399
1418
|
private overrideSystemPrompt?;
|
|
1400
1419
|
private disableBaseContext;
|
|
1420
|
+
private disableToolGuidance;
|
|
1401
1421
|
private toolResultMaxChars;
|
|
1402
1422
|
private hitlConfig?;
|
|
1403
1423
|
private onToolConfirm?;
|
|
1404
1424
|
private conversationId?;
|
|
1405
1425
|
private contextWindowConfig?;
|
|
1426
|
+
private actor?;
|
|
1406
1427
|
private contextWindowStateManager?;
|
|
1407
1428
|
private providerModelCache;
|
|
1408
1429
|
private ruleLoader;
|
|
@@ -1488,13 +1509,17 @@ declare class AIClient extends EventEmitter {
|
|
|
1488
1509
|
* When tools are enabled and autoExecute is true, handles the full
|
|
1489
1510
|
* tool call → execute → send result → get final answer loop.
|
|
1490
1511
|
*/
|
|
1491
|
-
generate<T = unknown>(request: CompletionRequest<T>, providerName?: string
|
|
1512
|
+
generate<T = unknown>(request: CompletionRequest<T>, providerName?: string, options?: {
|
|
1513
|
+
getLatestRequestTools?: () => RequestToolDefinition[];
|
|
1514
|
+
}): Promise<CompletionResponse<T>>;
|
|
1492
1515
|
/**
|
|
1493
1516
|
* unified stream completion
|
|
1494
1517
|
* When tools are enabled and autoExecute is true, handles tool calls
|
|
1495
1518
|
* by collecting them, executing, and re-calling the model.
|
|
1496
1519
|
*/
|
|
1497
|
-
stream(request: CompletionRequest, providerName?: string
|
|
1520
|
+
stream(request: CompletionRequest, providerName?: string, options?: {
|
|
1521
|
+
getLatestRequestTools?: () => RequestToolDefinition[];
|
|
1522
|
+
}): AsyncGenerator<CompletionChunk>;
|
|
1498
1523
|
/**
|
|
1499
1524
|
* unified embed
|
|
1500
1525
|
*/
|
|
@@ -1690,6 +1715,8 @@ declare class VertexAIAdapter extends ProviderAdapter {
|
|
|
1690
1715
|
|
|
1691
1716
|
declare class GeminiAdapter extends ProviderAdapter {
|
|
1692
1717
|
private genAI;
|
|
1718
|
+
private readonly rawContentCache;
|
|
1719
|
+
private static readonly RAW_CONTENT_CACHE_MAX;
|
|
1693
1720
|
constructor(apiKey: string);
|
|
1694
1721
|
supportsFileUpload(): boolean;
|
|
1695
1722
|
/**
|
|
@@ -1820,7 +1847,7 @@ declare class OllamaProvider extends ProviderAdapter {
|
|
|
1820
1847
|
private probeToolSupport;
|
|
1821
1848
|
}
|
|
1822
1849
|
|
|
1823
|
-
declare function ollamaRequest(baseUrl: string, path: string, method: 'GET' | 'POST', body?: object, timeoutMs?: number): Promise<{
|
|
1850
|
+
declare function ollamaRequest(baseUrl: string, path: string, method: 'GET' | 'POST', body?: object, timeoutMs?: number, signal?: AbortSignal): Promise<{
|
|
1824
1851
|
status: number;
|
|
1825
1852
|
body: string;
|
|
1826
1853
|
}>;
|
|
@@ -1920,6 +1947,12 @@ declare function fetchUrlAsBase64(url: string): Promise<{
|
|
|
1920
1947
|
data: string;
|
|
1921
1948
|
mimeType: string;
|
|
1922
1949
|
}>;
|
|
1950
|
+
interface FileEnvelope {
|
|
1951
|
+
type: 'file';
|
|
1952
|
+
mimeType: string;
|
|
1953
|
+
url: string;
|
|
1954
|
+
}
|
|
1955
|
+
declare function parseFileEnvelope(content: string): FileEnvelope | null;
|
|
1923
1956
|
declare function normalizeImagePart(part: ImagePart): Promise<{
|
|
1924
1957
|
data: string;
|
|
1925
1958
|
mimeType: string;
|
|
@@ -3192,6 +3225,8 @@ interface ToolpackInitConfig {
|
|
|
3192
3225
|
customProviders?: ProviderAdapter[] | Record<string, ProviderAdapter>;
|
|
3193
3226
|
/** Disable base agent context injection (for testing or custom prompts) */
|
|
3194
3227
|
disableBaseContext?: boolean;
|
|
3228
|
+
/** Disable automatic tool usage guidance injection into the system prompt */
|
|
3229
|
+
disableToolGuidance?: boolean;
|
|
3195
3230
|
mcp?: McpToolsConfig;
|
|
3196
3231
|
/**
|
|
3197
3232
|
* Optional Knowledge instance for RAG (Retrieval-Augmented Generation).
|
|
@@ -3218,6 +3253,12 @@ interface ToolpackInitConfig {
|
|
|
3218
3253
|
}) => Promise<ConfirmationDecision>;
|
|
3219
3254
|
/** Optional conversation ID for tracking context across confirmations */
|
|
3220
3255
|
conversationId?: string;
|
|
3256
|
+
/**
|
|
3257
|
+
* Who this instance's tool calls act for (e.g. the signed-in user). Passed to every tool as
|
|
3258
|
+
* `ctx.actor`; the model never sees or sets it. Pass a function when one instance serves
|
|
3259
|
+
* several actors: it is read on each tool call.
|
|
3260
|
+
*/
|
|
3261
|
+
actor?: ToolActor | (() => ToolActor | null | undefined);
|
|
3221
3262
|
/**
|
|
3222
3263
|
* Optional interceptors that wrap each `generate()` call in the direct execution path.
|
|
3223
3264
|
* Each interceptor receives the full CompletionRequest and a `next()` function.
|
|
@@ -3647,6 +3688,26 @@ declare class SQLiteConversationStore implements ConversationStore {
|
|
|
3647
3688
|
close(): void;
|
|
3648
3689
|
}
|
|
3649
3690
|
|
|
3691
|
+
/**
|
|
3692
|
+
* Helpers that make a stop (an AbortSignal) take effect at once, also while a provider call is
|
|
3693
|
+
* under way. A provider that does not pass the signal to its own HTTP call keeps that call open
|
|
3694
|
+
* in the background, but the caller no longer waits for it.
|
|
3695
|
+
*/
|
|
3696
|
+
/** Thrown when a call was stopped by its AbortSignal. `name` is 'AbortError', as for fetch. */
|
|
3697
|
+
declare class AbortedError extends SDKError {
|
|
3698
|
+
constructor(message?: string);
|
|
3699
|
+
}
|
|
3700
|
+
/**
|
|
3701
|
+
* Resolves or rejects like `promise`, unless `signal` is aborted first: then it rejects with an
|
|
3702
|
+
* AbortedError right away. What `promise` does after that is ignored.
|
|
3703
|
+
*/
|
|
3704
|
+
declare function raceAbort<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
3705
|
+
/**
|
|
3706
|
+
* Yields what `source` yields, and ends quietly as soon as `signal` is aborted, also while it is
|
|
3707
|
+
* waiting for the next item. The source is told to finish, and is not waited for.
|
|
3708
|
+
*/
|
|
3709
|
+
declare function untilAborted<T>(source: AsyncIterable<T>, signal?: AbortSignal): AsyncGenerator<T>;
|
|
3710
|
+
|
|
3650
3711
|
declare const TOOLPACK_DIR_NAME = ".toolpack";
|
|
3651
3712
|
declare const CONFIG_DIR_NAME = "config";
|
|
3652
3713
|
declare const CONFIG_FILE_NAME = "toolpack.config.json";
|
|
@@ -4032,4 +4093,4 @@ declare class RuleLoader {
|
|
|
4032
4093
|
private readFile;
|
|
4033
4094
|
}
|
|
4034
4095
|
|
|
4035
|
-
export { AGENT_MODE, AGENT_PLANNING_PROMPT, AGENT_WORKFLOW, AIClient, type AIClientConfig, type AddBypassRuleOptions, AnthropicAdapter, AnthropicVertexAdapter, type AnthropicVertexConfig, type AssembledPrompt, type AssemblerOptions, AuthenticationError, BM25Engine, BM25SearchEngine, type BM25SearchResult, BUILT_IN_MODES, type BypassRuleType, CHAT_MODE, CHAT_WORKFLOW, CODING_MODE, CODING_PLANNING_PROMPT, CODING_WORKFLOW, CONFIG_DIR_NAME, CONFIG_FILE_NAME, type CompletionChunk, type CompletionOptions, type CompletionRequest, type CompletionResponse, type ConfirmationDecision, type ConfirmationLevel$1 as ConfirmationLevel, ConnectionError, type ContextPrunedEvent, type ContextWindowConfig, ContextWindowConfigError, ContextWindowExceededError, type ContextWindowExceededEvent, type ContextWindowState, ContextWindowStateManager, type ContextWindowStrategy, type ContextWindowWarningEvent, ConversationNotFoundError, type ConversationScope, type ConversationSearchOptions, type ConversationStore, type ConversationSummarizedEvent, DEFAULT_MODE_NAME, DEFAULT_TOOLS_CONFIG, DEFAULT_TOOL_SEARCH_CONFIG, DEFAULT_WORKFLOW, DEFAULT_WORKFLOW_CONFIG, type EmbeddingRequest, type EmbeddingResponse, FILE_LIMITS, type FilePart, type FileUploadRequest, type FileUploadResponse, GeminiAdapter, type GetOptions, type HitlConfig, type ImageDataPart, type ImageFilePart, type ImagePart, type ImageUrlPart, InMemoryConversationStore, type InMemoryConversationStoreConfig, InsufficientContextError, InvalidRequestError, type JsonRpcRequest, type JsonRpcResponse, type KnowledgeInstance, type McpAgentDefinition, type McpAuthConfig, McpClient, type McpClientConfig, McpConnectionError, type McpCustomAuthConfig, type McpJwtAuthConfig, type McpServerCapabilities, type McpServerConfig, type McpServerExposeConfig, type McpServerHandle, type McpStaticAuthConfig, McpTimeoutError, type McpTool, McpToolManager, type McpToolsConfig, type McpTransport, type MediaOptions, type MediaUploadStrategy, type Message, type MessageContent, type ModeBlockedHint, type ModeConfig, ModeRegistry, OllamaAdapter, type OllamaAdapterConfig, type OllamaModelInfo, OllamaProvider, type OllamaProviderEntry, type OnToolConfirmCallback, OpenAIAdapter, OpenRouterAdapter, type OpenRouterOptions, PageError, type Participant, type Plan, type PlanStep, Planner, type PromptMessage, ProviderAdapter, type ProviderConfig, ProviderError, type ProviderInfo, type ProviderModelInfo, type ProviderOptions, type PruneResult, RateLimitError, type RequestToolDefinition, type Role, RuleLoader, type RuntimeConfigStatus, SDKError, SQLiteConversationStore, type SQLiteConversationStoreConfig, type SearchHistoryEntry, type SearchOptions, type SearchResult, type Skill, type SkillSection, type SkillToolsOptions, type SkillValidationMode, type SlmModelEntry, type StoredMessage, SummarizationError, type SummarizationOptions, type SummarizationResult, TOOLPACK_DIR_NAME, TOOL_SEARCH_NAME, type TextPart, TimeoutError, type ToolAnnotations, type ToolCall, type ToolCallFunction, type ToolCallMessage, type ToolCallRequest, type ToolCallResult, type ToolCategory, type ToolConfirmation, type ToolConfirmationRequestedEvent, type ToolConfirmationResolvedEvent, type ToolContext, type ToolDefinition, ToolDiscoveryCache, type ToolLogEvent, type ToolParameterProperty, type ToolParameters, type ToolProgressEvent, type ToolProject, type ToolProjectDependencies, type ToolProjectManifest, ToolRegistry, type ToolResult, ToolRouter, type ToolSchema, type ToolSearchConfig, Toolpack, type ToolpackConfig, type ToolpackCredentials, type ToolpackInitConfig, type ToolpackInterceptor, type ToolpackMcpServerConfig, type ToolpackNextFunction, type ToolsConfig, type Usage, VertexAIAdapter, type VertexAIConfig, type WorkflowConfig, type WorkflowEvents, WorkflowExecutor, type WorkflowProgress, type WorkflowResult, addBypassRule, buildSummarizedHistory, cloudDeployTool, cloudListTool, cloudStatusTool, cloudToolsProject, codingExtractFunctionTool, codingFindReferencesTool, codingFindSymbolTool, codingGetCallHierarchyTool, codingGetDiagnosticsTool, codingGetExportsTool, codingGetImportsTool, codingGetOutlineTool, codingGetSymbolsTool, codingGoToDefinitionTool, codingMultiFileEditTool, codingRefactorRenameTool, codingToolsProject, countTokens, createContextWindowStateManager, createMcpToolProject, createMode, createSkillTools, createSummarizationReport, createSummarySystemMessage, createToolProject, dbCountTool, dbDeleteTool, dbInsertTool, dbQueryTool, dbSchemaTool, dbTablesTool, dbToolsProject, dbUpdateTool, diffApplyTool, diffCreateTool, diffPreviewTool, diffToolsProject, disconnectMcpToolProject, ensureGlobalConfigDir, ensureLocalConfigDir, estimateSummaryTokens, estimateTokenCount, execKillTool, execListProcessesTool, execReadOutputTool, execRunBackgroundTool, execRunBlockingTool, execRunShellTool, execRunTool, execTailOutputTool, execToolsProject, extractConversationKeypoints, fetchUrlAsBase64, fsAppendFileTool, fsBatchReadTool, fsBatchWriteTool, fsCopyTool, fsCreateDirTool, fsDeleteDirTool, fsDeleteFileTool, fsExistsTool, fsGlobTool, fsListDirTool, fsMoveTool, fsReadFileRangeTool, fsReadFileTool, fsReplaceInFileTool, fsSearchTool, fsStatTool, fsToolsProject, fsTreeTool, fsWriteFileTool, generateSummarizationPrompt, generateToolCategoriesPrompt, getContextWindowPercentage, getDefaultSlmModel, getGlobalConfigDir, getGlobalConfigPath, getGlobalToolpackDir, getLocalConfigDir, getLocalConfigPath, getLocalToolpackDir, getMessageStats, getMimeType, getOllamaBaseUrl, getOllamaProviderEntries, getRegisteredSlmModels, getRuntimeConfigStatus, getSafeOutputReserve, getToolSearchSchema, getToolpackConfig, getUserHomeDir, gitAddTool, gitBlameTool, gitBranchCreateTool, gitBranchListTool, gitCheckoutTool, gitCloneTool, gitCommitTool, gitDiffTool, gitLogTool, gitStatusTool, gitToolsProject, githubContentsGetTextTool, githubGraphqlExecuteTool, githubIssuesCommentsCreateTool, githubPrDiffGetTool, githubPrFilesListTool, githubPrReviewCommentsReplyTool, githubPrReviewThreadsListTool, githubPrReviewThreadsResolveTool, githubPrReviewsSubmitTool, githubToolsProject, groupMessagesByRole, handleContextWindowError, httpDeleteTool, httpDownloadTool, httpGetTool, httpPostTool, httpPutTool, httpToolsProject, initializeGlobalConfigIfFirstRun, isContextWindowError, isDataUri, isRegisteredSlm, isToolSearchTool, k8sApplyManifestTool, k8sDeleteResourceTool, k8sDescribeTool, k8sGetConfigMapTool, k8sGetLogsTool, k8sGetNamespacesTool, k8sListDeploymentsTool, k8sListPodsTool, k8sListServicesTool, k8sSwitchContextTool, k8sToolsProject, k8sWaitForDeploymentTool, loadFullConfig, loadRuntimeConfig, loadToolsConfig, mergeSummarizationResults, normalizeImagePart, ollamaRequest, ollamaStream, parseDataUri, parseSkillFile, parseSummarizationResponse, prepareSummarizationRequest, pruneMessages, readFileAsBase64, reloadToolpackConfig, removeBypassRule, saveToolsConfig, slackAuthTestTool, slackChatPostEphemeralTool, slackChatPostMessageTool, slackConversationsHistoryTool, slackConversationsRepliesTool, slackReactionsAddTool, slackToolsProject, systemCwdTool, systemDiskUsageTool, systemEnvTool, systemInfoTool, systemSetEnvTool, systemToolsProject, toDataUri, toolSearchDefinition, truncateMessage, validateSummarizationResult, webExtractLinksTool, webFeedTool, webFetchTool, webMapTool, webMetadataTool, webScrapeTool, webScreenshotTool, webSearchTool, webSitemapTool, webToolsProject, wouldExceedContextWindow };
|
|
4096
|
+
export { AGENT_MODE, AGENT_PLANNING_PROMPT, AGENT_WORKFLOW, AIClient, type AIClientConfig, AbortedError, type AddBypassRuleOptions, AnthropicAdapter, AnthropicVertexAdapter, type AnthropicVertexConfig, type AssembledPrompt, type AssemblerOptions, AuthenticationError, BM25Engine, BM25SearchEngine, type BM25SearchResult, BUILT_IN_MODES, type BypassRuleType, CHAT_MODE, CHAT_WORKFLOW, CODING_MODE, CODING_PLANNING_PROMPT, CODING_WORKFLOW, CONFIG_DIR_NAME, CONFIG_FILE_NAME, type CompletionChunk, type CompletionOptions, type CompletionRequest, type CompletionResponse, type ConfirmationDecision, type ConfirmationLevel$1 as ConfirmationLevel, ConnectionError, type ContextPrunedEvent, type ContextWindowConfig, ContextWindowConfigError, ContextWindowExceededError, type ContextWindowExceededEvent, type ContextWindowState, ContextWindowStateManager, type ContextWindowStrategy, type ContextWindowWarningEvent, ConversationNotFoundError, type ConversationScope, type ConversationSearchOptions, type ConversationStore, type ConversationSummarizedEvent, DEFAULT_MODE_NAME, DEFAULT_TOOLS_CONFIG, DEFAULT_TOOL_SEARCH_CONFIG, DEFAULT_WORKFLOW, DEFAULT_WORKFLOW_CONFIG, type EmbeddingRequest, type EmbeddingResponse, FILE_LIMITS, type FileEnvelope, type FilePart, type FileUploadRequest, type FileUploadResponse, GeminiAdapter, type GetOptions, type HitlConfig, type ImageDataPart, type ImageFilePart, type ImagePart, type ImageUrlPart, InMemoryConversationStore, type InMemoryConversationStoreConfig, InsufficientContextError, InvalidRequestError, type JsonRpcRequest, type JsonRpcResponse, type KnowledgeInstance, type McpAgentDefinition, type McpAuthConfig, McpClient, type McpClientConfig, McpConnectionError, type McpCustomAuthConfig, type McpJwtAuthConfig, type McpServerCapabilities, type McpServerConfig, type McpServerExposeConfig, type McpServerHandle, type McpStaticAuthConfig, McpTimeoutError, type McpTool, McpToolManager, type McpToolsConfig, type McpTransport, type MediaOptions, type MediaUploadStrategy, type Message, type MessageContent, type ModeBlockedHint, type ModeConfig, ModeRegistry, OllamaAdapter, type OllamaAdapterConfig, type OllamaModelInfo, OllamaProvider, type OllamaProviderEntry, type OnToolConfirmCallback, OpenAIAdapter, OpenRouterAdapter, type OpenRouterOptions, PageError, type Participant, type Plan, type PlanStep, Planner, type PromptMessage, ProviderAdapter, type ProviderConfig, ProviderError, type ProviderInfo, type ProviderModelInfo, type ProviderOptions, type PruneResult, RateLimitError, type RequestToolDefinition, type Role, RuleLoader, type RuntimeConfigStatus, SDKError, SQLiteConversationStore, type SQLiteConversationStoreConfig, type SearchHistoryEntry, type SearchOptions, type SearchResult, type Skill, type SkillSection, type SkillToolsOptions, type SkillValidationMode, type SlmModelEntry, type StoredMessage, SummarizationError, type SummarizationOptions, type SummarizationResult, TOOLPACK_DIR_NAME, TOOL_SEARCH_NAME, type TextPart, TimeoutError, type ToolActor, type ToolAnnotations, type ToolCall, type ToolCallFunction, type ToolCallMessage, type ToolCallRequest, type ToolCallResult, type ToolCategory, type ToolConfirmation, type ToolConfirmationRequestedEvent, type ToolConfirmationResolvedEvent, type ToolContext, type ToolDefinition, ToolDiscoveryCache, type ToolLogEvent, type ToolParameterProperty, type ToolParameters, type ToolProgressEvent, type ToolProject, type ToolProjectDependencies, type ToolProjectManifest, ToolRegistry, type ToolResult, ToolRouter, type ToolSchema, type ToolSearchConfig, Toolpack, type ToolpackConfig, type ToolpackCredentials, type ToolpackInitConfig, type ToolpackInterceptor, type ToolpackMcpServerConfig, type ToolpackNextFunction, type ToolsConfig, type Usage, VertexAIAdapter, type VertexAIConfig, type WorkflowConfig, type WorkflowEvents, WorkflowExecutor, type WorkflowProgress, type WorkflowResult, addBypassRule, buildSummarizedHistory, cloudDeployTool, cloudListTool, cloudStatusTool, cloudToolsProject, codingExtractFunctionTool, codingFindReferencesTool, codingFindSymbolTool, codingGetCallHierarchyTool, codingGetDiagnosticsTool, codingGetExportsTool, codingGetImportsTool, codingGetOutlineTool, codingGetSymbolsTool, codingGoToDefinitionTool, codingMultiFileEditTool, codingRefactorRenameTool, codingToolsProject, countTokens, createContextWindowStateManager, createMcpToolProject, createMode, createSkillTools, createSummarizationReport, createSummarySystemMessage, createToolProject, dbCountTool, dbDeleteTool, dbInsertTool, dbQueryTool, dbSchemaTool, dbTablesTool, dbToolsProject, dbUpdateTool, diffApplyTool, diffCreateTool, diffPreviewTool, diffToolsProject, disconnectMcpToolProject, ensureGlobalConfigDir, ensureLocalConfigDir, estimateSummaryTokens, estimateTokenCount, execKillTool, execListProcessesTool, execReadOutputTool, execRunBackgroundTool, execRunBlockingTool, execRunShellTool, execRunTool, execTailOutputTool, execToolsProject, extractConversationKeypoints, fetchUrlAsBase64, fsAppendFileTool, fsBatchReadTool, fsBatchWriteTool, fsCopyTool, fsCreateDirTool, fsDeleteDirTool, fsDeleteFileTool, fsExistsTool, fsGlobTool, fsListDirTool, fsMoveTool, fsReadFileRangeTool, fsReadFileTool, fsReplaceInFileTool, fsSearchTool, fsStatTool, fsToolsProject, fsTreeTool, fsWriteFileTool, generateSummarizationPrompt, generateToolCategoriesPrompt, getContextWindowPercentage, getDefaultSlmModel, getGlobalConfigDir, getGlobalConfigPath, getGlobalToolpackDir, getLocalConfigDir, getLocalConfigPath, getLocalToolpackDir, getMessageStats, getMimeType, getOllamaBaseUrl, getOllamaProviderEntries, getRegisteredSlmModels, getRuntimeConfigStatus, getSafeOutputReserve, getToolSearchSchema, getToolpackConfig, getUserHomeDir, gitAddTool, gitBlameTool, gitBranchCreateTool, gitBranchListTool, gitCheckoutTool, gitCloneTool, gitCommitTool, gitDiffTool, gitLogTool, gitStatusTool, gitToolsProject, githubContentsGetTextTool, githubGraphqlExecuteTool, githubIssuesCommentsCreateTool, githubPrDiffGetTool, githubPrFilesListTool, githubPrReviewCommentsReplyTool, githubPrReviewThreadsListTool, githubPrReviewThreadsResolveTool, githubPrReviewsSubmitTool, githubToolsProject, groupMessagesByRole, handleContextWindowError, httpDeleteTool, httpDownloadTool, httpGetTool, httpPostTool, httpPutTool, httpToolsProject, initializeGlobalConfigIfFirstRun, isContextWindowError, isDataUri, isRegisteredSlm, isToolSearchTool, k8sApplyManifestTool, k8sDeleteResourceTool, k8sDescribeTool, k8sGetConfigMapTool, k8sGetLogsTool, k8sGetNamespacesTool, k8sListDeploymentsTool, k8sListPodsTool, k8sListServicesTool, k8sSwitchContextTool, k8sToolsProject, k8sWaitForDeploymentTool, loadFullConfig, loadRuntimeConfig, loadToolsConfig, mergeSummarizationResults, normalizeImagePart, ollamaRequest, ollamaStream, parseDataUri, parseFileEnvelope, parseSkillFile, parseSummarizationResponse, prepareSummarizationRequest, pruneMessages, raceAbort, readFileAsBase64, reloadToolpackConfig, removeBypassRule, saveToolsConfig, slackAuthTestTool, slackChatPostEphemeralTool, slackChatPostMessageTool, slackConversationsHistoryTool, slackConversationsRepliesTool, slackReactionsAddTool, slackToolsProject, systemCwdTool, systemDiskUsageTool, systemEnvTool, systemInfoTool, systemSetEnvTool, systemToolsProject, toDataUri, toolSearchDefinition, truncateMessage, untilAborted, validateSummarizationResult, webExtractLinksTool, webFeedTool, webFetchTool, webMapTool, webMetadataTool, webScrapeTool, webScreenshotTool, webSearchTool, webSitemapTool, webToolsProject, wouldExceedContextWindow };
|
package/dist/index.d.ts
CHANGED
|
@@ -252,9 +252,21 @@ interface ToolpackCredentials {
|
|
|
252
252
|
/** Netlify auth token. Fallback: NETLIFY_AUTH_TOKEN */
|
|
253
253
|
netlifyAuthToken?: string;
|
|
254
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* Who a run acts for, e.g. the signed-in user of the host application.
|
|
257
|
+
* Supplied by the host (never by the model), so a tool can trust it for per-user data.
|
|
258
|
+
*/
|
|
259
|
+
interface ToolActor {
|
|
260
|
+
/** The host application's stable id for the actor. */
|
|
261
|
+
id: string;
|
|
262
|
+
/** What the actor is, in the host's terms (e.g. 'user'). */
|
|
263
|
+
kind?: string;
|
|
264
|
+
}
|
|
255
265
|
interface ToolContext {
|
|
256
266
|
/** Absolute path to the workspace/project root */
|
|
257
267
|
workspaceRoot: string;
|
|
268
|
+
/** Who this run acts for, when the host set one (see ToolpackInitConfig.actor). */
|
|
269
|
+
actor?: ToolActor;
|
|
258
270
|
/**
|
|
259
271
|
* Tool-specific config from toolsConfig.additionalConfigurations.
|
|
260
272
|
* Includes credentials (ctx.config.credentials) and per-tool settings
|
|
@@ -267,6 +279,8 @@ interface ToolContext {
|
|
|
267
279
|
processRegistry?: ProcessRegistry;
|
|
268
280
|
/** Per-tenant GitHub App installation-token cache (github-tools). */
|
|
269
281
|
githubTokenStore?: GithubTokenStore;
|
|
282
|
+
/** Aborted when the run was stopped. A long-running tool can watch it to end its own work early. */
|
|
283
|
+
signal?: AbortSignal;
|
|
270
284
|
}
|
|
271
285
|
/**
|
|
272
286
|
* Hints about tool behaviour sent to MCP clients in tools/list.
|
|
@@ -740,7 +754,8 @@ interface CompletionResponse<T = unknown> {
|
|
|
740
754
|
interface CompletionChunk {
|
|
741
755
|
delta: string;
|
|
742
756
|
usage?: Usage;
|
|
743
|
-
|
|
757
|
+
/** 'aborted' is the last chunk of a stream that was stopped by the request's AbortSignal. */
|
|
758
|
+
finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'error' | 'aborted';
|
|
744
759
|
tool_calls?: ToolCallResult[];
|
|
745
760
|
/** Present when chunk comes from a workflow step */
|
|
746
761
|
workflowStep?: {
|
|
@@ -1377,6 +1392,8 @@ interface AIClientConfig {
|
|
|
1377
1392
|
toolsConfig?: ToolsConfig;
|
|
1378
1393
|
systemPrompt?: string;
|
|
1379
1394
|
disableBaseContext?: boolean;
|
|
1395
|
+
/** Disable automatic tool usage guidance injection into the system prompt */
|
|
1396
|
+
disableToolGuidance?: boolean;
|
|
1380
1397
|
/** Human-in-the-loop configuration for tool confirmation */
|
|
1381
1398
|
hitlConfig?: HitlConfig;
|
|
1382
1399
|
/** Callback for handling tool confirmation requests */
|
|
@@ -1385,6 +1402,8 @@ interface AIClientConfig {
|
|
|
1385
1402
|
conversationId?: string;
|
|
1386
1403
|
/** Context window management configuration */
|
|
1387
1404
|
contextWindowConfig?: ContextWindowConfig;
|
|
1405
|
+
/** Who tool calls act for; passed to every tool as `ctx.actor`. A function is read on each call. */
|
|
1406
|
+
actor?: ToolActor | (() => ToolActor | null | undefined);
|
|
1388
1407
|
}
|
|
1389
1408
|
declare class AIClient extends EventEmitter {
|
|
1390
1409
|
private providers;
|
|
@@ -1398,11 +1417,13 @@ declare class AIClient extends EventEmitter {
|
|
|
1398
1417
|
private activeMode;
|
|
1399
1418
|
private overrideSystemPrompt?;
|
|
1400
1419
|
private disableBaseContext;
|
|
1420
|
+
private disableToolGuidance;
|
|
1401
1421
|
private toolResultMaxChars;
|
|
1402
1422
|
private hitlConfig?;
|
|
1403
1423
|
private onToolConfirm?;
|
|
1404
1424
|
private conversationId?;
|
|
1405
1425
|
private contextWindowConfig?;
|
|
1426
|
+
private actor?;
|
|
1406
1427
|
private contextWindowStateManager?;
|
|
1407
1428
|
private providerModelCache;
|
|
1408
1429
|
private ruleLoader;
|
|
@@ -1488,13 +1509,17 @@ declare class AIClient extends EventEmitter {
|
|
|
1488
1509
|
* When tools are enabled and autoExecute is true, handles the full
|
|
1489
1510
|
* tool call → execute → send result → get final answer loop.
|
|
1490
1511
|
*/
|
|
1491
|
-
generate<T = unknown>(request: CompletionRequest<T>, providerName?: string
|
|
1512
|
+
generate<T = unknown>(request: CompletionRequest<T>, providerName?: string, options?: {
|
|
1513
|
+
getLatestRequestTools?: () => RequestToolDefinition[];
|
|
1514
|
+
}): Promise<CompletionResponse<T>>;
|
|
1492
1515
|
/**
|
|
1493
1516
|
* unified stream completion
|
|
1494
1517
|
* When tools are enabled and autoExecute is true, handles tool calls
|
|
1495
1518
|
* by collecting them, executing, and re-calling the model.
|
|
1496
1519
|
*/
|
|
1497
|
-
stream(request: CompletionRequest, providerName?: string
|
|
1520
|
+
stream(request: CompletionRequest, providerName?: string, options?: {
|
|
1521
|
+
getLatestRequestTools?: () => RequestToolDefinition[];
|
|
1522
|
+
}): AsyncGenerator<CompletionChunk>;
|
|
1498
1523
|
/**
|
|
1499
1524
|
* unified embed
|
|
1500
1525
|
*/
|
|
@@ -1690,6 +1715,8 @@ declare class VertexAIAdapter extends ProviderAdapter {
|
|
|
1690
1715
|
|
|
1691
1716
|
declare class GeminiAdapter extends ProviderAdapter {
|
|
1692
1717
|
private genAI;
|
|
1718
|
+
private readonly rawContentCache;
|
|
1719
|
+
private static readonly RAW_CONTENT_CACHE_MAX;
|
|
1693
1720
|
constructor(apiKey: string);
|
|
1694
1721
|
supportsFileUpload(): boolean;
|
|
1695
1722
|
/**
|
|
@@ -1820,7 +1847,7 @@ declare class OllamaProvider extends ProviderAdapter {
|
|
|
1820
1847
|
private probeToolSupport;
|
|
1821
1848
|
}
|
|
1822
1849
|
|
|
1823
|
-
declare function ollamaRequest(baseUrl: string, path: string, method: 'GET' | 'POST', body?: object, timeoutMs?: number): Promise<{
|
|
1850
|
+
declare function ollamaRequest(baseUrl: string, path: string, method: 'GET' | 'POST', body?: object, timeoutMs?: number, signal?: AbortSignal): Promise<{
|
|
1824
1851
|
status: number;
|
|
1825
1852
|
body: string;
|
|
1826
1853
|
}>;
|
|
@@ -1920,6 +1947,12 @@ declare function fetchUrlAsBase64(url: string): Promise<{
|
|
|
1920
1947
|
data: string;
|
|
1921
1948
|
mimeType: string;
|
|
1922
1949
|
}>;
|
|
1950
|
+
interface FileEnvelope {
|
|
1951
|
+
type: 'file';
|
|
1952
|
+
mimeType: string;
|
|
1953
|
+
url: string;
|
|
1954
|
+
}
|
|
1955
|
+
declare function parseFileEnvelope(content: string): FileEnvelope | null;
|
|
1923
1956
|
declare function normalizeImagePart(part: ImagePart): Promise<{
|
|
1924
1957
|
data: string;
|
|
1925
1958
|
mimeType: string;
|
|
@@ -3192,6 +3225,8 @@ interface ToolpackInitConfig {
|
|
|
3192
3225
|
customProviders?: ProviderAdapter[] | Record<string, ProviderAdapter>;
|
|
3193
3226
|
/** Disable base agent context injection (for testing or custom prompts) */
|
|
3194
3227
|
disableBaseContext?: boolean;
|
|
3228
|
+
/** Disable automatic tool usage guidance injection into the system prompt */
|
|
3229
|
+
disableToolGuidance?: boolean;
|
|
3195
3230
|
mcp?: McpToolsConfig;
|
|
3196
3231
|
/**
|
|
3197
3232
|
* Optional Knowledge instance for RAG (Retrieval-Augmented Generation).
|
|
@@ -3218,6 +3253,12 @@ interface ToolpackInitConfig {
|
|
|
3218
3253
|
}) => Promise<ConfirmationDecision>;
|
|
3219
3254
|
/** Optional conversation ID for tracking context across confirmations */
|
|
3220
3255
|
conversationId?: string;
|
|
3256
|
+
/**
|
|
3257
|
+
* Who this instance's tool calls act for (e.g. the signed-in user). Passed to every tool as
|
|
3258
|
+
* `ctx.actor`; the model never sees or sets it. Pass a function when one instance serves
|
|
3259
|
+
* several actors: it is read on each tool call.
|
|
3260
|
+
*/
|
|
3261
|
+
actor?: ToolActor | (() => ToolActor | null | undefined);
|
|
3221
3262
|
/**
|
|
3222
3263
|
* Optional interceptors that wrap each `generate()` call in the direct execution path.
|
|
3223
3264
|
* Each interceptor receives the full CompletionRequest and a `next()` function.
|
|
@@ -3647,6 +3688,26 @@ declare class SQLiteConversationStore implements ConversationStore {
|
|
|
3647
3688
|
close(): void;
|
|
3648
3689
|
}
|
|
3649
3690
|
|
|
3691
|
+
/**
|
|
3692
|
+
* Helpers that make a stop (an AbortSignal) take effect at once, also while a provider call is
|
|
3693
|
+
* under way. A provider that does not pass the signal to its own HTTP call keeps that call open
|
|
3694
|
+
* in the background, but the caller no longer waits for it.
|
|
3695
|
+
*/
|
|
3696
|
+
/** Thrown when a call was stopped by its AbortSignal. `name` is 'AbortError', as for fetch. */
|
|
3697
|
+
declare class AbortedError extends SDKError {
|
|
3698
|
+
constructor(message?: string);
|
|
3699
|
+
}
|
|
3700
|
+
/**
|
|
3701
|
+
* Resolves or rejects like `promise`, unless `signal` is aborted first: then it rejects with an
|
|
3702
|
+
* AbortedError right away. What `promise` does after that is ignored.
|
|
3703
|
+
*/
|
|
3704
|
+
declare function raceAbort<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
3705
|
+
/**
|
|
3706
|
+
* Yields what `source` yields, and ends quietly as soon as `signal` is aborted, also while it is
|
|
3707
|
+
* waiting for the next item. The source is told to finish, and is not waited for.
|
|
3708
|
+
*/
|
|
3709
|
+
declare function untilAborted<T>(source: AsyncIterable<T>, signal?: AbortSignal): AsyncGenerator<T>;
|
|
3710
|
+
|
|
3650
3711
|
declare const TOOLPACK_DIR_NAME = ".toolpack";
|
|
3651
3712
|
declare const CONFIG_DIR_NAME = "config";
|
|
3652
3713
|
declare const CONFIG_FILE_NAME = "toolpack.config.json";
|
|
@@ -4032,4 +4093,4 @@ declare class RuleLoader {
|
|
|
4032
4093
|
private readFile;
|
|
4033
4094
|
}
|
|
4034
4095
|
|
|
4035
|
-
export { AGENT_MODE, AGENT_PLANNING_PROMPT, AGENT_WORKFLOW, AIClient, type AIClientConfig, type AddBypassRuleOptions, AnthropicAdapter, AnthropicVertexAdapter, type AnthropicVertexConfig, type AssembledPrompt, type AssemblerOptions, AuthenticationError, BM25Engine, BM25SearchEngine, type BM25SearchResult, BUILT_IN_MODES, type BypassRuleType, CHAT_MODE, CHAT_WORKFLOW, CODING_MODE, CODING_PLANNING_PROMPT, CODING_WORKFLOW, CONFIG_DIR_NAME, CONFIG_FILE_NAME, type CompletionChunk, type CompletionOptions, type CompletionRequest, type CompletionResponse, type ConfirmationDecision, type ConfirmationLevel$1 as ConfirmationLevel, ConnectionError, type ContextPrunedEvent, type ContextWindowConfig, ContextWindowConfigError, ContextWindowExceededError, type ContextWindowExceededEvent, type ContextWindowState, ContextWindowStateManager, type ContextWindowStrategy, type ContextWindowWarningEvent, ConversationNotFoundError, type ConversationScope, type ConversationSearchOptions, type ConversationStore, type ConversationSummarizedEvent, DEFAULT_MODE_NAME, DEFAULT_TOOLS_CONFIG, DEFAULT_TOOL_SEARCH_CONFIG, DEFAULT_WORKFLOW, DEFAULT_WORKFLOW_CONFIG, type EmbeddingRequest, type EmbeddingResponse, FILE_LIMITS, type FilePart, type FileUploadRequest, type FileUploadResponse, GeminiAdapter, type GetOptions, type HitlConfig, type ImageDataPart, type ImageFilePart, type ImagePart, type ImageUrlPart, InMemoryConversationStore, type InMemoryConversationStoreConfig, InsufficientContextError, InvalidRequestError, type JsonRpcRequest, type JsonRpcResponse, type KnowledgeInstance, type McpAgentDefinition, type McpAuthConfig, McpClient, type McpClientConfig, McpConnectionError, type McpCustomAuthConfig, type McpJwtAuthConfig, type McpServerCapabilities, type McpServerConfig, type McpServerExposeConfig, type McpServerHandle, type McpStaticAuthConfig, McpTimeoutError, type McpTool, McpToolManager, type McpToolsConfig, type McpTransport, type MediaOptions, type MediaUploadStrategy, type Message, type MessageContent, type ModeBlockedHint, type ModeConfig, ModeRegistry, OllamaAdapter, type OllamaAdapterConfig, type OllamaModelInfo, OllamaProvider, type OllamaProviderEntry, type OnToolConfirmCallback, OpenAIAdapter, OpenRouterAdapter, type OpenRouterOptions, PageError, type Participant, type Plan, type PlanStep, Planner, type PromptMessage, ProviderAdapter, type ProviderConfig, ProviderError, type ProviderInfo, type ProviderModelInfo, type ProviderOptions, type PruneResult, RateLimitError, type RequestToolDefinition, type Role, RuleLoader, type RuntimeConfigStatus, SDKError, SQLiteConversationStore, type SQLiteConversationStoreConfig, type SearchHistoryEntry, type SearchOptions, type SearchResult, type Skill, type SkillSection, type SkillToolsOptions, type SkillValidationMode, type SlmModelEntry, type StoredMessage, SummarizationError, type SummarizationOptions, type SummarizationResult, TOOLPACK_DIR_NAME, TOOL_SEARCH_NAME, type TextPart, TimeoutError, type ToolAnnotations, type ToolCall, type ToolCallFunction, type ToolCallMessage, type ToolCallRequest, type ToolCallResult, type ToolCategory, type ToolConfirmation, type ToolConfirmationRequestedEvent, type ToolConfirmationResolvedEvent, type ToolContext, type ToolDefinition, ToolDiscoveryCache, type ToolLogEvent, type ToolParameterProperty, type ToolParameters, type ToolProgressEvent, type ToolProject, type ToolProjectDependencies, type ToolProjectManifest, ToolRegistry, type ToolResult, ToolRouter, type ToolSchema, type ToolSearchConfig, Toolpack, type ToolpackConfig, type ToolpackCredentials, type ToolpackInitConfig, type ToolpackInterceptor, type ToolpackMcpServerConfig, type ToolpackNextFunction, type ToolsConfig, type Usage, VertexAIAdapter, type VertexAIConfig, type WorkflowConfig, type WorkflowEvents, WorkflowExecutor, type WorkflowProgress, type WorkflowResult, addBypassRule, buildSummarizedHistory, cloudDeployTool, cloudListTool, cloudStatusTool, cloudToolsProject, codingExtractFunctionTool, codingFindReferencesTool, codingFindSymbolTool, codingGetCallHierarchyTool, codingGetDiagnosticsTool, codingGetExportsTool, codingGetImportsTool, codingGetOutlineTool, codingGetSymbolsTool, codingGoToDefinitionTool, codingMultiFileEditTool, codingRefactorRenameTool, codingToolsProject, countTokens, createContextWindowStateManager, createMcpToolProject, createMode, createSkillTools, createSummarizationReport, createSummarySystemMessage, createToolProject, dbCountTool, dbDeleteTool, dbInsertTool, dbQueryTool, dbSchemaTool, dbTablesTool, dbToolsProject, dbUpdateTool, diffApplyTool, diffCreateTool, diffPreviewTool, diffToolsProject, disconnectMcpToolProject, ensureGlobalConfigDir, ensureLocalConfigDir, estimateSummaryTokens, estimateTokenCount, execKillTool, execListProcessesTool, execReadOutputTool, execRunBackgroundTool, execRunBlockingTool, execRunShellTool, execRunTool, execTailOutputTool, execToolsProject, extractConversationKeypoints, fetchUrlAsBase64, fsAppendFileTool, fsBatchReadTool, fsBatchWriteTool, fsCopyTool, fsCreateDirTool, fsDeleteDirTool, fsDeleteFileTool, fsExistsTool, fsGlobTool, fsListDirTool, fsMoveTool, fsReadFileRangeTool, fsReadFileTool, fsReplaceInFileTool, fsSearchTool, fsStatTool, fsToolsProject, fsTreeTool, fsWriteFileTool, generateSummarizationPrompt, generateToolCategoriesPrompt, getContextWindowPercentage, getDefaultSlmModel, getGlobalConfigDir, getGlobalConfigPath, getGlobalToolpackDir, getLocalConfigDir, getLocalConfigPath, getLocalToolpackDir, getMessageStats, getMimeType, getOllamaBaseUrl, getOllamaProviderEntries, getRegisteredSlmModels, getRuntimeConfigStatus, getSafeOutputReserve, getToolSearchSchema, getToolpackConfig, getUserHomeDir, gitAddTool, gitBlameTool, gitBranchCreateTool, gitBranchListTool, gitCheckoutTool, gitCloneTool, gitCommitTool, gitDiffTool, gitLogTool, gitStatusTool, gitToolsProject, githubContentsGetTextTool, githubGraphqlExecuteTool, githubIssuesCommentsCreateTool, githubPrDiffGetTool, githubPrFilesListTool, githubPrReviewCommentsReplyTool, githubPrReviewThreadsListTool, githubPrReviewThreadsResolveTool, githubPrReviewsSubmitTool, githubToolsProject, groupMessagesByRole, handleContextWindowError, httpDeleteTool, httpDownloadTool, httpGetTool, httpPostTool, httpPutTool, httpToolsProject, initializeGlobalConfigIfFirstRun, isContextWindowError, isDataUri, isRegisteredSlm, isToolSearchTool, k8sApplyManifestTool, k8sDeleteResourceTool, k8sDescribeTool, k8sGetConfigMapTool, k8sGetLogsTool, k8sGetNamespacesTool, k8sListDeploymentsTool, k8sListPodsTool, k8sListServicesTool, k8sSwitchContextTool, k8sToolsProject, k8sWaitForDeploymentTool, loadFullConfig, loadRuntimeConfig, loadToolsConfig, mergeSummarizationResults, normalizeImagePart, ollamaRequest, ollamaStream, parseDataUri, parseSkillFile, parseSummarizationResponse, prepareSummarizationRequest, pruneMessages, readFileAsBase64, reloadToolpackConfig, removeBypassRule, saveToolsConfig, slackAuthTestTool, slackChatPostEphemeralTool, slackChatPostMessageTool, slackConversationsHistoryTool, slackConversationsRepliesTool, slackReactionsAddTool, slackToolsProject, systemCwdTool, systemDiskUsageTool, systemEnvTool, systemInfoTool, systemSetEnvTool, systemToolsProject, toDataUri, toolSearchDefinition, truncateMessage, validateSummarizationResult, webExtractLinksTool, webFeedTool, webFetchTool, webMapTool, webMetadataTool, webScrapeTool, webScreenshotTool, webSearchTool, webSitemapTool, webToolsProject, wouldExceedContextWindow };
|
|
4096
|
+
export { AGENT_MODE, AGENT_PLANNING_PROMPT, AGENT_WORKFLOW, AIClient, type AIClientConfig, AbortedError, type AddBypassRuleOptions, AnthropicAdapter, AnthropicVertexAdapter, type AnthropicVertexConfig, type AssembledPrompt, type AssemblerOptions, AuthenticationError, BM25Engine, BM25SearchEngine, type BM25SearchResult, BUILT_IN_MODES, type BypassRuleType, CHAT_MODE, CHAT_WORKFLOW, CODING_MODE, CODING_PLANNING_PROMPT, CODING_WORKFLOW, CONFIG_DIR_NAME, CONFIG_FILE_NAME, type CompletionChunk, type CompletionOptions, type CompletionRequest, type CompletionResponse, type ConfirmationDecision, type ConfirmationLevel$1 as ConfirmationLevel, ConnectionError, type ContextPrunedEvent, type ContextWindowConfig, ContextWindowConfigError, ContextWindowExceededError, type ContextWindowExceededEvent, type ContextWindowState, ContextWindowStateManager, type ContextWindowStrategy, type ContextWindowWarningEvent, ConversationNotFoundError, type ConversationScope, type ConversationSearchOptions, type ConversationStore, type ConversationSummarizedEvent, DEFAULT_MODE_NAME, DEFAULT_TOOLS_CONFIG, DEFAULT_TOOL_SEARCH_CONFIG, DEFAULT_WORKFLOW, DEFAULT_WORKFLOW_CONFIG, type EmbeddingRequest, type EmbeddingResponse, FILE_LIMITS, type FileEnvelope, type FilePart, type FileUploadRequest, type FileUploadResponse, GeminiAdapter, type GetOptions, type HitlConfig, type ImageDataPart, type ImageFilePart, type ImagePart, type ImageUrlPart, InMemoryConversationStore, type InMemoryConversationStoreConfig, InsufficientContextError, InvalidRequestError, type JsonRpcRequest, type JsonRpcResponse, type KnowledgeInstance, type McpAgentDefinition, type McpAuthConfig, McpClient, type McpClientConfig, McpConnectionError, type McpCustomAuthConfig, type McpJwtAuthConfig, type McpServerCapabilities, type McpServerConfig, type McpServerExposeConfig, type McpServerHandle, type McpStaticAuthConfig, McpTimeoutError, type McpTool, McpToolManager, type McpToolsConfig, type McpTransport, type MediaOptions, type MediaUploadStrategy, type Message, type MessageContent, type ModeBlockedHint, type ModeConfig, ModeRegistry, OllamaAdapter, type OllamaAdapterConfig, type OllamaModelInfo, OllamaProvider, type OllamaProviderEntry, type OnToolConfirmCallback, OpenAIAdapter, OpenRouterAdapter, type OpenRouterOptions, PageError, type Participant, type Plan, type PlanStep, Planner, type PromptMessage, ProviderAdapter, type ProviderConfig, ProviderError, type ProviderInfo, type ProviderModelInfo, type ProviderOptions, type PruneResult, RateLimitError, type RequestToolDefinition, type Role, RuleLoader, type RuntimeConfigStatus, SDKError, SQLiteConversationStore, type SQLiteConversationStoreConfig, type SearchHistoryEntry, type SearchOptions, type SearchResult, type Skill, type SkillSection, type SkillToolsOptions, type SkillValidationMode, type SlmModelEntry, type StoredMessage, SummarizationError, type SummarizationOptions, type SummarizationResult, TOOLPACK_DIR_NAME, TOOL_SEARCH_NAME, type TextPart, TimeoutError, type ToolActor, type ToolAnnotations, type ToolCall, type ToolCallFunction, type ToolCallMessage, type ToolCallRequest, type ToolCallResult, type ToolCategory, type ToolConfirmation, type ToolConfirmationRequestedEvent, type ToolConfirmationResolvedEvent, type ToolContext, type ToolDefinition, ToolDiscoveryCache, type ToolLogEvent, type ToolParameterProperty, type ToolParameters, type ToolProgressEvent, type ToolProject, type ToolProjectDependencies, type ToolProjectManifest, ToolRegistry, type ToolResult, ToolRouter, type ToolSchema, type ToolSearchConfig, Toolpack, type ToolpackConfig, type ToolpackCredentials, type ToolpackInitConfig, type ToolpackInterceptor, type ToolpackMcpServerConfig, type ToolpackNextFunction, type ToolsConfig, type Usage, VertexAIAdapter, type VertexAIConfig, type WorkflowConfig, type WorkflowEvents, WorkflowExecutor, type WorkflowProgress, type WorkflowResult, addBypassRule, buildSummarizedHistory, cloudDeployTool, cloudListTool, cloudStatusTool, cloudToolsProject, codingExtractFunctionTool, codingFindReferencesTool, codingFindSymbolTool, codingGetCallHierarchyTool, codingGetDiagnosticsTool, codingGetExportsTool, codingGetImportsTool, codingGetOutlineTool, codingGetSymbolsTool, codingGoToDefinitionTool, codingMultiFileEditTool, codingRefactorRenameTool, codingToolsProject, countTokens, createContextWindowStateManager, createMcpToolProject, createMode, createSkillTools, createSummarizationReport, createSummarySystemMessage, createToolProject, dbCountTool, dbDeleteTool, dbInsertTool, dbQueryTool, dbSchemaTool, dbTablesTool, dbToolsProject, dbUpdateTool, diffApplyTool, diffCreateTool, diffPreviewTool, diffToolsProject, disconnectMcpToolProject, ensureGlobalConfigDir, ensureLocalConfigDir, estimateSummaryTokens, estimateTokenCount, execKillTool, execListProcessesTool, execReadOutputTool, execRunBackgroundTool, execRunBlockingTool, execRunShellTool, execRunTool, execTailOutputTool, execToolsProject, extractConversationKeypoints, fetchUrlAsBase64, fsAppendFileTool, fsBatchReadTool, fsBatchWriteTool, fsCopyTool, fsCreateDirTool, fsDeleteDirTool, fsDeleteFileTool, fsExistsTool, fsGlobTool, fsListDirTool, fsMoveTool, fsReadFileRangeTool, fsReadFileTool, fsReplaceInFileTool, fsSearchTool, fsStatTool, fsToolsProject, fsTreeTool, fsWriteFileTool, generateSummarizationPrompt, generateToolCategoriesPrompt, getContextWindowPercentage, getDefaultSlmModel, getGlobalConfigDir, getGlobalConfigPath, getGlobalToolpackDir, getLocalConfigDir, getLocalConfigPath, getLocalToolpackDir, getMessageStats, getMimeType, getOllamaBaseUrl, getOllamaProviderEntries, getRegisteredSlmModels, getRuntimeConfigStatus, getSafeOutputReserve, getToolSearchSchema, getToolpackConfig, getUserHomeDir, gitAddTool, gitBlameTool, gitBranchCreateTool, gitBranchListTool, gitCheckoutTool, gitCloneTool, gitCommitTool, gitDiffTool, gitLogTool, gitStatusTool, gitToolsProject, githubContentsGetTextTool, githubGraphqlExecuteTool, githubIssuesCommentsCreateTool, githubPrDiffGetTool, githubPrFilesListTool, githubPrReviewCommentsReplyTool, githubPrReviewThreadsListTool, githubPrReviewThreadsResolveTool, githubPrReviewsSubmitTool, githubToolsProject, groupMessagesByRole, handleContextWindowError, httpDeleteTool, httpDownloadTool, httpGetTool, httpPostTool, httpPutTool, httpToolsProject, initializeGlobalConfigIfFirstRun, isContextWindowError, isDataUri, isRegisteredSlm, isToolSearchTool, k8sApplyManifestTool, k8sDeleteResourceTool, k8sDescribeTool, k8sGetConfigMapTool, k8sGetLogsTool, k8sGetNamespacesTool, k8sListDeploymentsTool, k8sListPodsTool, k8sListServicesTool, k8sSwitchContextTool, k8sToolsProject, k8sWaitForDeploymentTool, loadFullConfig, loadRuntimeConfig, loadToolsConfig, mergeSummarizationResults, normalizeImagePart, ollamaRequest, ollamaStream, parseDataUri, parseFileEnvelope, parseSkillFile, parseSummarizationResponse, prepareSummarizationRequest, pruneMessages, raceAbort, readFileAsBase64, reloadToolpackConfig, removeBypassRule, saveToolsConfig, slackAuthTestTool, slackChatPostEphemeralTool, slackChatPostMessageTool, slackConversationsHistoryTool, slackConversationsRepliesTool, slackReactionsAddTool, slackToolsProject, systemCwdTool, systemDiskUsageTool, systemEnvTool, systemInfoTool, systemSetEnvTool, systemToolsProject, toDataUri, toolSearchDefinition, truncateMessage, untilAborted, validateSummarizationResult, webExtractLinksTool, webFeedTool, webFetchTool, webMapTool, webMetadataTool, webScrapeTool, webScreenshotTool, webSearchTool, webSitemapTool, webToolsProject, wouldExceedContextWindow };
|