@everworker/oneringai 0.1.4 → 0.2.1

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/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { I as IConnectorRegistry, a as IConnectorAccessPolicy, C as ConnectorAccessContext, b as Connector, A as AudioFormat, c as IBaseModelDescription, V as VendorOptionSchema, d as IImageProvider, e as ConnectorFetchOptions, f as ITokenStorage, S as StoredToken$1, g as ConnectorConfig, h as ConnectorAuth, i as ConnectorConfigResult } from './ImageModel-qNJHPh4q.js';
2
- export { m as APIKeyConnectorAuth, D as AspectRatio, L as DEFAULT_BASE_DELAY_MS, G as DEFAULT_CONNECTOR_TIMEOUT, M as DEFAULT_MAX_DELAY_MS, H as DEFAULT_MAX_RETRIES, K as DEFAULT_RETRYABLE_STATUSES, n as IImageModelDescription, q as IMAGE_MODELS, r as IMAGE_MODEL_REGISTRY, F as ISourceLinks, y as ImageEditOptions, x as ImageGenerateOptions, j as ImageGeneration, k as ImageGenerationCreateOptions, o as ImageModelCapabilities, p as ImageModelPricing, B as ImageResponse, z as ImageVariationOptions, J as JWTConnectorAuth, O as OAuthConnectorAuth, E as OutputFormat, Q as QualityLevel, l as SimpleGenerateOptions, w as calculateImageCost, u as getActiveImageModels, s as getImageModelInfo, t as getImageModelsByVendor, v as getImageModelsWithFeature } from './ImageModel-qNJHPh4q.js';
3
- import { T as Tool, a as ToolFunction, b as ToolContext, c as ToolPermissionConfig$1, d as ToolCall, I as InputItem, M as MemoryEntry, e as MemoryScope, W as WorkingMemoryConfig, P as PriorityCalculator, f as MemoryPriority, g as MemoryTier, C as Content, O as OutputItem, h as ToolResult, i as ITextProvider, F as FunctionToolDefinition, L as LLMResponse, S as StreamEvent, H as HookConfig, j as HistoryMode, A as AgentEvents, k as AgentResponse, E as ExecutionContext, l as ExecutionMetrics, m as AuditEntry, n as StaleEntryInfo, o as PriorityContext, p as MemoryIndex, q as TaskStatusForMemory, r as WorkingMemoryAccess, s as TokenUsage, t as StreamEventType, u as TextGenerateOptions, v as ModelCapabilities, w as MessageRole } from './index-CEp1H4fV.js';
4
- export { aD as AfterToolContext, av as AgentEventName, ay as AgenticLoopEventName, ax as AgenticLoopEvents, aG as ApprovalResult, aE as ApproveToolContext, aC as BeforeToolContext, a8 as BuiltInTool, a3 as CompactionItem, Y as ContentType, D as DEFAULT_MEMORY_CONFIG, am as ErrorEvent, aw as ExecutionConfig, aA as Hook, au as HookManager, az as HookName, _ as InputImageContent, Z as InputTextContent, ak as IterationCompleteEvent, aa as JSONSchema, X as MEMORY_PRIORITY_VALUES, x as MemoryEntryInput, y as MemoryIndexEntry, a2 as Message, aB as ModifyingHook, $ as OutputTextContent, ad as OutputTextDeltaEvent, ae as OutputTextDoneEvent, a4 as ReasoningItem, al as ResponseCompleteEvent, ab as ResponseCreatedEvent, ac as ResponseInProgressEvent, B as SimpleScope, z as TaskAwareScope, ag as ToolCallArgumentsDeltaEvent, ah as ToolCallArgumentsDoneEvent, af as ToolCallStartEvent, a5 as ToolCallState, a9 as ToolExecutionContext, aj as ToolExecutionDoneEvent, ai as ToolExecutionStartEvent, aF as ToolModification, a1 as ToolResultContent, a0 as ToolUseContent, V as calculateEntrySize, a6 as defaultDescribeCall, J as forPlan, G as forTasks, a7 as getToolCallDescription, at as isErrorEvent, ao as isOutputTextDelta, as as isResponseComplete, Q as isSimpleScope, an as isStreamEvent, R as isTaskAwareScope, U as isTerminalMemoryStatus, aq as isToolCallArgumentsDelta, ar as isToolCallArgumentsDone, ap as isToolCallStart, K as scopeEquals, N as scopeMatches } from './index-CEp1H4fV.js';
1
+ import { I as IConnectorRegistry, a as IConnectorAccessPolicy, C as ConnectorAccessContext, b as Connector, c as IProvider, d as ConnectorFetchOptions, P as ProviderCapabilities, e as ITokenStorage, S as StoredToken$1, f as ConnectorConfig, g as ConnectorAuth, h as ConnectorConfigResult } from './IProvider-DcYJ3YE-.js';
2
+ export { A as APIKeyConnectorAuth, k as DEFAULT_BASE_DELAY_MS, D as DEFAULT_CONNECTOR_TIMEOUT, l as DEFAULT_MAX_DELAY_MS, i as DEFAULT_MAX_RETRIES, j as DEFAULT_RETRYABLE_STATUSES, J as JWTConnectorAuth, O as OAuthConnectorAuth } from './IProvider-DcYJ3YE-.js';
3
+ import { T as Tool, a as ToolFunction, b as ToolContext, c as ToolPermissionConfig$1, d as ToolCall, I as InputItem, M as MemoryEntry, e as MemoryScope, W as WorkingMemoryConfig, P as PriorityCalculator, f as MemoryPriority, g as MemoryTier, C as Content, O as OutputItem, h as ToolResult, i as ITextProvider, F as FunctionToolDefinition, L as LLMResponse, S as StreamEvent, H as HookConfig, j as HistoryMode, A as AgentEvents, k as AgentResponse, E as ExecutionContext, l as ExecutionMetrics, m as AuditEntry, n as StaleEntryInfo, o as PriorityContext, p as MemoryIndex, q as TaskStatusForMemory, r as WorkingMemoryAccess, s as TokenUsage, t as StreamEventType, u as TextGenerateOptions, v as ModelCapabilities, w as MessageRole } from './index-DVb6vfA3.js';
4
+ export { aD as AfterToolContext, av as AgentEventName, ay as AgenticLoopEventName, ax as AgenticLoopEvents, aG as ApprovalResult, aE as ApproveToolContext, aC as BeforeToolContext, a8 as BuiltInTool, a3 as CompactionItem, Y as ContentType, D as DEFAULT_MEMORY_CONFIG, am as ErrorEvent, aw as ExecutionConfig, aA as Hook, au as HookManager, az as HookName, _ as InputImageContent, Z as InputTextContent, ak as IterationCompleteEvent, aa as JSONSchema, X as MEMORY_PRIORITY_VALUES, x as MemoryEntryInput, y as MemoryIndexEntry, a2 as Message, aB as ModifyingHook, $ as OutputTextContent, ad as OutputTextDeltaEvent, ae as OutputTextDoneEvent, a4 as ReasoningItem, al as ResponseCompleteEvent, ab as ResponseCreatedEvent, ac as ResponseInProgressEvent, B as SimpleScope, z as TaskAwareScope, ag as ToolCallArgumentsDeltaEvent, ah as ToolCallArgumentsDoneEvent, af as ToolCallStartEvent, a5 as ToolCallState, a9 as ToolExecutionContext, aj as ToolExecutionDoneEvent, ai as ToolExecutionStartEvent, aF as ToolModification, a1 as ToolResultContent, a0 as ToolUseContent, V as calculateEntrySize, a6 as defaultDescribeCall, J as forPlan, G as forTasks, a7 as getToolCallDescription, at as isErrorEvent, ao as isOutputTextDelta, as as isResponseComplete, Q as isSimpleScope, an as isStreamEvent, R as isTaskAwareScope, U as isTerminalMemoryStatus, aq as isToolCallArgumentsDelta, ar as isToolCallArgumentsDone, ap as isToolCallStart, K as scopeEquals, N as scopeMatches } from './index-DVb6vfA3.js';
5
5
  import { EventEmitter } from 'eventemitter3';
6
6
  import { V as Vendor } from './Vendor-DYh_bzwo.js';
7
7
  export { a as VENDORS, i as isVendor } from './Vendor-DYh_bzwo.js';
8
- import { I as IProvider, P as ProviderCapabilities } from './IProvider-BP49c93d.js';
8
+ import { A as AudioFormat, I as IBaseModelDescription, V as VendorOptionSchema, a as IImageProvider } from './ImageModel-BJ2mVPGV.js';
9
+ export { r as AspectRatio, d as IImageModelDescription, g as IMAGE_MODELS, h as IMAGE_MODEL_REGISTRY, s as ISourceLinks, o as ImageEditOptions, n as ImageGenerateOptions, b as ImageGeneration, c as ImageGenerationCreateOptions, e as ImageModelCapabilities, f as ImageModelPricing, q as ImageResponse, p as ImageVariationOptions, O as OutputFormat, Q as QualityLevel, S as SimpleGenerateOptions, m as calculateImageCost, k as getActiveImageModels, i as getImageModelInfo, j as getImageModelsByVendor, l as getImageModelsWithFeature } from './ImageModel-BJ2mVPGV.js';
9
10
  import { ServiceCategory } from './shared/index.js';
10
11
  export { ILLMDescription, LLM_MODELS, MODEL_REGISTRY, SERVICE_DEFINITIONS, SERVICE_INFO, SERVICE_URL_PATTERNS, ServiceDefinition, ServiceInfo, ServiceType, Services, calculateCost, detectServiceFromURL, getActiveModels, getAllServiceIds, getModelInfo, getModelsByVendor, getServiceDefinition, getServiceInfo, getServicesByCategory, isKnownService } from './shared/index.js';
11
12
 
@@ -1335,6 +1336,7 @@ interface SerializedContextState {
1335
1336
  metadata: {
1336
1337
  savedAt: number;
1337
1338
  agentId?: string;
1339
+ userId?: string;
1338
1340
  model: string;
1339
1341
  };
1340
1342
  /** Agent-specific state (for TaskAgent, UniversalAgent, etc.) */
@@ -1441,9 +1443,16 @@ interface IContextStorage {
1441
1443
  */
1442
1444
  updateMetadata?(sessionId: string, metadata: Partial<ContextSessionMetadata>): Promise<void>;
1443
1445
  /**
1444
- * Get the storage path/location (for display/debugging)
1446
+ * Get the storage path (for display/debugging)
1447
+ * @deprecated Use getLocation() instead - getPath() assumes filesystem storage
1445
1448
  */
1446
1449
  getPath(): string;
1450
+ /**
1451
+ * Get a human-readable storage location string (for display/debugging).
1452
+ * Examples: file path, MongoDB URI, Redis key prefix, S3 bucket, etc.
1453
+ * Falls back to getPath() if not implemented.
1454
+ */
1455
+ getLocation?(): string;
1447
1456
  }
1448
1457
  /**
1449
1458
  * Options for listing sessions
@@ -1478,6 +1487,19 @@ interface ITokenEstimator$1 {
1478
1487
  estimateTokens(text: string): number;
1479
1488
  /** Estimate tokens for arbitrary data (will be JSON stringified) */
1480
1489
  estimateDataTokens(data: unknown): number;
1490
+ /**
1491
+ * Estimate tokens for an image. Provider-specific implementations can override.
1492
+ *
1493
+ * Default heuristic (matches OpenAI's image token pricing):
1494
+ * - detail='low': 85 tokens
1495
+ * - detail='high' with known dimensions: 85 + 170 * ceil(w/512) * ceil(h/512)
1496
+ * - Unknown dimensions: ~1000 tokens (conservative default)
1497
+ *
1498
+ * @param width - Image width in pixels (if known)
1499
+ * @param height - Image height in pixels (if known)
1500
+ * @param detail - Image detail level: 'low', 'high', or 'auto' (default 'auto')
1501
+ */
1502
+ estimateImageTokens?(width?: number, height?: number, detail?: string): number;
1481
1503
  }
1482
1504
  /**
1483
1505
  * Context plugin interface for NextGen context management.
@@ -1913,6 +1935,15 @@ interface AgentContextNextGenConfig {
1913
1935
  features?: ContextFeatures;
1914
1936
  /** Agent ID (required for PersistentInstructions) */
1915
1937
  agentId?: string;
1938
+ /** User ID for multi-user scenarios. Automatically flows to ToolContext for all tool executions. */
1939
+ userId?: string;
1940
+ /**
1941
+ * Restrict this agent to a subset of registered connectors (by name).
1942
+ * When set, only these connectors are visible in ToolContext.connectorRegistry
1943
+ * and in dynamic tool descriptions (e.g., execute_javascript).
1944
+ * When not set, all connectors visible to the current userId are available.
1945
+ */
1946
+ connectors?: string[];
1916
1947
  /** Initial tools to register */
1917
1948
  tools?: ToolFunction[];
1918
1949
  /** Storage for session persistence */
@@ -2339,6 +2370,10 @@ declare class AgentContextNextGen extends EventEmitter<ContextEvents> {
2339
2370
  private _sessionId;
2340
2371
  /** Agent ID */
2341
2372
  private readonly _agentId;
2373
+ /** User ID for multi-user scenarios */
2374
+ private _userId;
2375
+ /** Allowed connector names (when agent is restricted to a subset) */
2376
+ private _allowedConnectors;
2342
2377
  /** Storage backend */
2343
2378
  private readonly _storage?;
2344
2379
  /** Destroyed flag */
@@ -2362,12 +2397,34 @@ declare class AgentContextNextGen extends EventEmitter<ContextEvents> {
2362
2397
  * @throws Error if any required plugin is missing
2363
2398
  */
2364
2399
  private validateStrategyDependencies;
2400
+ /**
2401
+ * Sync identity fields and connector registry to ToolContext.
2402
+ * Merges with existing ToolContext to preserve other fields (memory, signal, taskId).
2403
+ *
2404
+ * Connector registry resolution order:
2405
+ * 1. If `connectors` (allowed names) is set → filtered view of global registry
2406
+ * 2. If access policy + userId → scoped view via Connector.scoped()
2407
+ * 3. Otherwise → full global registry
2408
+ */
2409
+ private syncToolContext;
2410
+ /**
2411
+ * Build the connector registry appropriate for this agent's config.
2412
+ */
2413
+ private buildConnectorRegistry;
2365
2414
  /** Get the tool manager */
2366
2415
  get tools(): ToolManager;
2367
2416
  /** Get the model name */
2368
2417
  get model(): string;
2369
2418
  /** Get the agent ID */
2370
2419
  get agentId(): string;
2420
+ /** Get the current user ID */
2421
+ get userId(): string | undefined;
2422
+ /** Set user ID. Automatically updates ToolContext for all tool executions. */
2423
+ set userId(value: string | undefined);
2424
+ /** Get the allowed connector names (undefined = all visible connectors) */
2425
+ get connectors(): string[] | undefined;
2426
+ /** Set allowed connector names. Updates ToolContext.connectorRegistry. */
2427
+ set connectors(value: string[] | undefined);
2371
2428
  /** Get/set system prompt */
2372
2429
  get systemPrompt(): string | undefined;
2373
2430
  set systemPrompt(value: string | undefined);
@@ -2521,6 +2578,10 @@ declare class AgentContextNextGen extends EventEmitter<ContextEvents> {
2521
2578
  * Estimate tokens for a single InputItem.
2522
2579
  */
2523
2580
  private estimateItemTokens;
2581
+ /**
2582
+ * Estimate tokens for a single image, using the estimator's image method if available.
2583
+ */
2584
+ private _estimateImageTokens;
2524
2585
  /**
2525
2586
  * Run compaction to free up tokens.
2526
2587
  * Delegates to the current compaction strategy.
@@ -2779,6 +2840,14 @@ interface BaseAgentConfig {
2779
2840
  registry?: IConnectorRegistry;
2780
2841
  /** Agent name (optional, auto-generated if not provided) */
2781
2842
  name?: string;
2843
+ /** User ID for multi-user scenarios. Flows to ToolContext automatically for all tool executions. */
2844
+ userId?: string;
2845
+ /**
2846
+ * Restrict this agent to a subset of registered connectors (by name).
2847
+ * Only these connectors will be visible in tool descriptions and sandbox execution.
2848
+ * When not set, all connectors visible to the current userId are available.
2849
+ */
2850
+ connectors?: string[];
2782
2851
  /** Tools available to the agent */
2783
2852
  tools?: ToolFunction[];
2784
2853
  /** Provide a pre-configured ToolManager (advanced) */
@@ -2948,6 +3017,22 @@ declare abstract class BaseAgent<TConfig extends BaseAgentConfig = BaseAgentConf
2948
3017
  * This is the primary way to access tools, memory, and history.
2949
3018
  */
2950
3019
  get context(): AgentContextNextGen;
3020
+ /**
3021
+ * Get the current user ID. Delegates to AgentContextNextGen.
3022
+ */
3023
+ get userId(): string | undefined;
3024
+ /**
3025
+ * Set user ID at runtime. Automatically updates ToolContext for all tool executions.
3026
+ */
3027
+ set userId(value: string | undefined);
3028
+ /**
3029
+ * Get the allowed connector names (undefined = all visible connectors).
3030
+ */
3031
+ get connectors(): string[] | undefined;
3032
+ /**
3033
+ * Restrict this agent to a subset of connectors. Updates ToolContext.connectorRegistry.
3034
+ */
3035
+ set connectors(value: string[] | undefined);
2951
3036
  /**
2952
3037
  * Permission management. Returns ToolPermissionManager for approval control.
2953
3038
  */
@@ -3335,6 +3420,7 @@ declare class Agent extends BaseAgent<AgentConfig$1, AgentEvents> implements IDi
3335
3420
  * const agent = Agent.create({
3336
3421
  * connector: 'openai', // or Connector instance
3337
3422
  * model: 'gpt-4',
3423
+ * userId: 'user-123', // flows to all tool executions automatically
3338
3424
  * instructions: 'You are a helpful assistant',
3339
3425
  * tools: [myTool]
3340
3426
  * });
@@ -3870,6 +3956,8 @@ interface InContextEntry {
3870
3956
  value: unknown;
3871
3957
  updatedAt: number;
3872
3958
  priority: InContextPriority;
3959
+ /** If true, this entry is displayed in the user's side panel UI */
3960
+ showInUI?: boolean;
3873
3961
  }
3874
3962
  interface InContextMemoryConfig {
3875
3963
  /** Maximum number of entries (default: 20) */
@@ -3880,6 +3968,8 @@ interface InContextMemoryConfig {
3880
3968
  defaultPriority?: InContextPriority;
3881
3969
  /** Whether to show timestamps in output (default: false) */
3882
3970
  showTimestamps?: boolean;
3971
+ /** Callback fired when entries change. Receives all current entries. */
3972
+ onEntriesChanged?: (entries: InContextEntry[]) => void;
3883
3973
  }
3884
3974
  interface SerializedInContextMemoryState {
3885
3975
  entries: InContextEntry[];
@@ -3892,6 +3982,7 @@ declare class InContextMemoryPluginNextGen implements IContextPluginNextGen {
3892
3982
  private _destroyed;
3893
3983
  private _tokenCache;
3894
3984
  private _instructionsTokenCache;
3985
+ private _notifyTimer;
3895
3986
  constructor(config?: InContextMemoryConfig);
3896
3987
  getInstructions(): string;
3897
3988
  getContent(): Promise<string | null>;
@@ -3907,7 +3998,7 @@ declare class InContextMemoryPluginNextGen implements IContextPluginNextGen {
3907
3998
  /**
3908
3999
  * Store or update a key-value pair
3909
4000
  */
3910
- set(key: string, description: string, value: unknown, priority?: InContextPriority): void;
4001
+ set(key: string, description: string, value: unknown, priority?: InContextPriority, showInUI?: boolean): void;
3911
4002
  /**
3912
4003
  * Get a value by key
3913
4004
  */
@@ -3928,6 +4019,7 @@ declare class InContextMemoryPluginNextGen implements IContextPluginNextGen {
3928
4019
  description: string;
3929
4020
  priority: InContextPriority;
3930
4021
  updatedAt: number;
4022
+ showInUI: boolean;
3931
4023
  }>;
3932
4024
  /**
3933
4025
  * Clear all entries
@@ -3943,6 +4035,11 @@ declare class InContextMemoryPluginNextGen implements IContextPluginNextGen {
3943
4035
  * Critical entries are excluded.
3944
4036
  */
3945
4037
  private getEvictableEntries;
4038
+ /**
4039
+ * Debounced notification when entries change.
4040
+ * Calls config.onEntriesChanged with all current entries.
4041
+ */
4042
+ private notifyEntriesChanged;
3946
4043
  private assertNotDestroyed;
3947
4044
  private createContextSetTool;
3948
4045
  private createContextDeleteTool;
@@ -6055,7 +6152,7 @@ declare function createVideoProvider(connector: Connector): IVideoProvider;
6055
6152
  /**
6056
6153
  * Search result interface
6057
6154
  */
6058
- interface SearchResult$1 {
6155
+ interface SearchResult {
6059
6156
  /** Page title */
6060
6157
  title: string;
6061
6158
  /** Direct URL to the page */
@@ -6091,7 +6188,7 @@ interface SearchResponse$1 {
6091
6188
  /** Provider name */
6092
6189
  provider: string;
6093
6190
  /** Search results */
6094
- results: SearchResult$1[];
6191
+ results: SearchResult[];
6095
6192
  /** Number of results */
6096
6193
  count: number;
6097
6194
  /** Error message if failed */
@@ -6302,8 +6399,7 @@ declare function listConnectorsByServiceTypes(serviceTypes: string[]): string[];
6302
6399
  * FALLBACK STRATEGY:
6303
6400
  * The webScrape tool uses this provider with a fallback chain:
6304
6401
  * 1. Try native fetch (webFetch) - fastest, free
6305
- * 2. Try JS rendering (webFetchJS) - handles SPAs
6306
- * 3. Try external API provider - handles bot protection, etc.
6402
+ * 2. Try external API provider - handles bot protection, SPAs, etc.
6307
6403
  */
6308
6404
 
6309
6405
  /**
@@ -6488,6 +6584,328 @@ declare class ScrapeProvider {
6488
6584
  static createWithFallback(config: ScrapeProviderFallbackConfig): IScrapeProvider;
6489
6585
  }
6490
6586
 
6587
+ /**
6588
+ * Document Reader Types
6589
+ *
6590
+ * Core types for the universal file-to-LLM-content converter.
6591
+ */
6592
+ type DocumentFormat = 'docx' | 'pptx' | 'odt' | 'odp' | 'ods' | 'rtf' | 'xlsx' | 'csv' | 'pdf' | 'html' | 'txt' | 'md' | 'json' | 'xml' | 'yaml' | 'yml' | 'png' | 'jpg' | 'jpeg' | 'gif' | 'webp' | 'svg';
6593
+ type DocumentFamily = 'office' | 'spreadsheet' | 'pdf' | 'html' | 'text' | 'image';
6594
+ interface PieceMetadata {
6595
+ sourceFilename: string;
6596
+ format: DocumentFormat;
6597
+ index: number;
6598
+ section?: string;
6599
+ sizeBytes: number;
6600
+ estimatedTokens: number;
6601
+ label?: string;
6602
+ }
6603
+ interface DocumentTextPiece {
6604
+ type: 'text';
6605
+ content: string;
6606
+ metadata: PieceMetadata;
6607
+ }
6608
+ interface DocumentImagePiece {
6609
+ type: 'image';
6610
+ base64: string;
6611
+ mimeType: string;
6612
+ width?: number;
6613
+ height?: number;
6614
+ metadata: PieceMetadata;
6615
+ }
6616
+ type DocumentPiece = DocumentTextPiece | DocumentImagePiece;
6617
+ interface DocumentMetadata {
6618
+ filename: string;
6619
+ format: DocumentFormat;
6620
+ family: DocumentFamily;
6621
+ mimeType: string;
6622
+ totalPieces: number;
6623
+ totalTextPieces: number;
6624
+ totalImagePieces: number;
6625
+ totalSizeBytes: number;
6626
+ estimatedTokens: number;
6627
+ processingTimeMs: number;
6628
+ formatSpecific?: Record<string, unknown>;
6629
+ }
6630
+ interface DocumentResult {
6631
+ success: boolean;
6632
+ pieces: DocumentPiece[];
6633
+ metadata: DocumentMetadata;
6634
+ error?: string;
6635
+ warnings: string[];
6636
+ }
6637
+ interface FileSource {
6638
+ type: 'file';
6639
+ path: string;
6640
+ }
6641
+ interface URLSource {
6642
+ type: 'url';
6643
+ url: string;
6644
+ headers?: Record<string, string>;
6645
+ }
6646
+ interface BufferSource {
6647
+ type: 'buffer';
6648
+ buffer: Buffer | Uint8Array;
6649
+ filename: string;
6650
+ mimeType?: string;
6651
+ }
6652
+ interface BlobSource {
6653
+ type: 'blob';
6654
+ blob: Blob;
6655
+ filename: string;
6656
+ }
6657
+ type DocumentSource = FileSource | URLSource | BufferSource | BlobSource;
6658
+ interface ImageFilterOptions {
6659
+ /** Skip images narrower than this (default: 50px) */
6660
+ minWidth?: number;
6661
+ /** Skip images shorter than this (default: 50px) */
6662
+ minHeight?: number;
6663
+ /** Skip images smaller than this in bytes (default: 1024) */
6664
+ minSizeBytes?: number;
6665
+ /** Maximum images to keep (default: 50 at extraction, 20 at content conversion) */
6666
+ maxImages?: number;
6667
+ /** Exclude images whose filename/label matches these patterns */
6668
+ excludePatterns?: RegExp[];
6669
+ }
6670
+ interface ExcelFormatOptions {
6671
+ /** Maximum rows per sheet (default: 1000) */
6672
+ maxRows?: number;
6673
+ /** Maximum columns per sheet (default: 50) */
6674
+ maxColumns?: number;
6675
+ /** Table output format (default: 'markdown') */
6676
+ tableFormat?: 'markdown' | 'csv' | 'json';
6677
+ /** Include formulas as comments (default: false) */
6678
+ includeFormulas?: boolean;
6679
+ }
6680
+ interface PDFFormatOptions {
6681
+ /** Include PDF metadata in output (default: true) */
6682
+ includeMetadata?: boolean;
6683
+ }
6684
+ interface HTMLFormatOptions {
6685
+ /** Maximum HTML length to process (default: 50000) */
6686
+ maxLength?: number;
6687
+ }
6688
+ interface OfficeFormatOptions {
6689
+ /** Include speaker notes for PPTX (default: true) */
6690
+ includeSpeakerNotes?: boolean;
6691
+ }
6692
+ interface DocumentReadOptions {
6693
+ /** Maximum estimated tokens in output (default: 100000) */
6694
+ maxTokens?: number;
6695
+ /** Maximum output size in bytes (default: 5MB) */
6696
+ maxOutputBytes?: number;
6697
+ /** Extract images from documents (default: true) */
6698
+ extractImages?: boolean;
6699
+ /** Image detail level for LLM (default: 'auto') */
6700
+ imageDetail?: 'auto' | 'low' | 'high';
6701
+ /** Image filtering options */
6702
+ imageFilter?: ImageFilterOptions;
6703
+ /** Specific pages/sheets to read (format-dependent) */
6704
+ pages?: number[] | string[];
6705
+ /** Additional transformers to apply */
6706
+ transformers?: IDocumentTransformer[];
6707
+ /** Skip built-in transformers (default: false) */
6708
+ skipDefaultTransformers?: boolean;
6709
+ /** Format-specific options */
6710
+ formatOptions?: {
6711
+ excel?: ExcelFormatOptions;
6712
+ pdf?: PDFFormatOptions;
6713
+ html?: HTMLFormatOptions;
6714
+ office?: OfficeFormatOptions;
6715
+ };
6716
+ }
6717
+ interface DocumentReaderConfig {
6718
+ /** Default options for all read() calls */
6719
+ defaults?: DocumentReadOptions;
6720
+ /** Custom format handlers (override built-in) */
6721
+ handlers?: Map<DocumentFamily, IFormatHandler>;
6722
+ /** Maximum download size for URL sources (default: 50MB) */
6723
+ maxDownloadSizeBytes?: number;
6724
+ /** Download timeout for URL sources (default: 60000ms) */
6725
+ downloadTimeoutMs?: number;
6726
+ }
6727
+ interface TransformerContext {
6728
+ filename: string;
6729
+ format: DocumentFormat;
6730
+ family: DocumentFamily;
6731
+ options: DocumentReadOptions;
6732
+ }
6733
+ interface IDocumentTransformer {
6734
+ readonly name: string;
6735
+ readonly appliesTo: DocumentFormat[];
6736
+ readonly priority?: number;
6737
+ transform(pieces: DocumentPiece[], context: TransformerContext): Promise<DocumentPiece[]>;
6738
+ }
6739
+ interface IFormatHandler {
6740
+ readonly name: string;
6741
+ readonly supportedFormats: DocumentFormat[];
6742
+ handle(buffer: Buffer, filename: string, format: DocumentFormat, options: DocumentReadOptions): Promise<DocumentPiece[]>;
6743
+ }
6744
+ interface FormatDetectionResult {
6745
+ format: DocumentFormat;
6746
+ family: DocumentFamily;
6747
+ mimeType: string;
6748
+ confidence: 'high' | 'medium' | 'low';
6749
+ }
6750
+ interface DocumentToContentOptions {
6751
+ /** Image detail for LLM content (default: 'auto') */
6752
+ imageDetail?: 'auto' | 'low' | 'high';
6753
+ /** Additional image filtering at content conversion time */
6754
+ imageFilter?: ImageFilterOptions;
6755
+ /** Maximum images in content output (default: 20) */
6756
+ maxImages?: number;
6757
+ /** Merge adjacent text pieces into one (default: true) */
6758
+ mergeAdjacentText?: boolean;
6759
+ }
6760
+
6761
+ /**
6762
+ * Document Reader
6763
+ *
6764
+ * Universal file-to-LLM-content converter.
6765
+ * Reads arbitrary formats and produces DocumentPiece arrays.
6766
+ */
6767
+
6768
+ /**
6769
+ * Main document reader class.
6770
+ *
6771
+ * @example
6772
+ * ```typescript
6773
+ * const reader = DocumentReader.create();
6774
+ * const result = await reader.read('/path/to/doc.pdf');
6775
+ * console.log(result.pieces); // DocumentPiece[]
6776
+ * ```
6777
+ */
6778
+ declare class DocumentReader {
6779
+ private handlers;
6780
+ private config;
6781
+ private constructor();
6782
+ /**
6783
+ * Create a new DocumentReader instance
6784
+ */
6785
+ static create(config?: DocumentReaderConfig): DocumentReader;
6786
+ /**
6787
+ * Register all default format handlers (lazy-loaded)
6788
+ */
6789
+ private registerDefaultHandlers;
6790
+ /**
6791
+ * Register a custom format handler
6792
+ */
6793
+ registerHandler(family: DocumentFamily, handler: IFormatHandler): void;
6794
+ /**
6795
+ * Read a document from any source
6796
+ */
6797
+ read(source: DocumentSource | string, options?: DocumentReadOptions): Promise<DocumentResult>;
6798
+ /**
6799
+ * Parse a string source (auto-detect path vs URL)
6800
+ */
6801
+ private parseStringSource;
6802
+ /**
6803
+ * Resolve any source to a buffer and filename
6804
+ */
6805
+ private resolveSource;
6806
+ /**
6807
+ * Extract filename from URL and response headers
6808
+ */
6809
+ private extractFilenameFromURL;
6810
+ /**
6811
+ * Get the handler for a format family, loading defaults lazily
6812
+ */
6813
+ private getHandler;
6814
+ /**
6815
+ * Filter images based on options
6816
+ */
6817
+ private filterImages;
6818
+ /**
6819
+ * Run the transformer pipeline
6820
+ */
6821
+ private runTransformers;
6822
+ /**
6823
+ * Assemble metadata from pieces
6824
+ */
6825
+ private assembleMetadata;
6826
+ }
6827
+ /**
6828
+ * Merge text pieces into a single markdown string
6829
+ */
6830
+ declare function mergeTextPieces(pieces: DocumentPiece[]): string;
6831
+
6832
+ /**
6833
+ * Format Detector
6834
+ *
6835
+ * Detects document format from filename extension and optional magic bytes.
6836
+ */
6837
+
6838
+ /**
6839
+ * Static utility for detecting document formats
6840
+ */
6841
+ declare class FormatDetector {
6842
+ /**
6843
+ * Detect format from filename and optional buffer
6844
+ */
6845
+ static detect(filename: string, _buffer?: Buffer | Uint8Array): FormatDetectionResult;
6846
+ /**
6847
+ * Check if an extension is a supported document format
6848
+ * Used by readFile to detect when to use DocumentReader
6849
+ */
6850
+ static isDocumentFormat(ext: string): boolean;
6851
+ /**
6852
+ * Check if an extension is a binary document format
6853
+ * (i.e., cannot be read as UTF-8)
6854
+ */
6855
+ static isBinaryDocumentFormat(ext: string): boolean;
6856
+ /**
6857
+ * Check if a Content-Type header indicates a document format
6858
+ * Used by webFetch to detect downloadable documents
6859
+ */
6860
+ static isDocumentMimeType(contentType: string): boolean;
6861
+ /**
6862
+ * Detect format from Content-Type header
6863
+ */
6864
+ static detectFromMimeType(contentType: string): FormatDetectionResult | null;
6865
+ /**
6866
+ * Get all supported document extensions
6867
+ */
6868
+ static getSupportedExtensions(): string[];
6869
+ /**
6870
+ * Get the normalized extension from a filename
6871
+ */
6872
+ static getExtension(filename: string): string;
6873
+ }
6874
+
6875
+ /**
6876
+ * Document Content Bridge
6877
+ *
6878
+ * Converts DocumentResult → Content[] for LLM consumption.
6879
+ * Provides readDocumentAsContent() as a one-call convenience.
6880
+ */
6881
+
6882
+ /**
6883
+ * Convert a DocumentResult to Content[] for LLM input.
6884
+ *
6885
+ * - Text pieces → InputTextContent
6886
+ * - Image pieces → InputImageContent (with data URI)
6887
+ * - Adjacent text pieces merged by default
6888
+ * - Additional image filtering applied
6889
+ */
6890
+ declare function documentToContent(result: DocumentResult, options?: DocumentToContentOptions): Content[];
6891
+ /**
6892
+ * One-call convenience: read a document and convert to Content[] for LLM input.
6893
+ *
6894
+ * @example
6895
+ * ```typescript
6896
+ * const content = await readDocumentAsContent('/path/to/doc.pdf', {
6897
+ * imageFilter: { minWidth: 100, minHeight: 100 },
6898
+ * imageDetail: 'auto',
6899
+ * });
6900
+ *
6901
+ * agent.run([
6902
+ * { type: 'input_text', text: 'Analyze this document:' },
6903
+ * ...content,
6904
+ * ]);
6905
+ * ```
6906
+ */
6907
+ declare function readDocumentAsContent(source: DocumentSource | string, options?: DocumentReadOptions & DocumentToContentOptions): Promise<Content[]>;
6908
+
6491
6909
  /**
6492
6910
  * IMediaStorage - Storage interface for multimedia outputs (images, video, audio)
6493
6911
  *
@@ -8054,6 +8472,13 @@ interface ITokenEstimator {
8054
8472
  * Estimate tokens for structured data
8055
8473
  */
8056
8474
  estimateDataTokens(data: unknown, contentType?: TokenContentType): number;
8475
+ /**
8476
+ * Estimate tokens for an image.
8477
+ * @param width - Image width in pixels (if known)
8478
+ * @param height - Image height in pixels (if known)
8479
+ * @param detail - Image detail level: 'low', 'high', or 'auto'
8480
+ */
8481
+ estimateImageTokens?(width?: number, height?: number, detail?: string): number;
8057
8482
  }
8058
8483
  /**
8059
8484
  * Abstract interface for compaction strategies
@@ -8243,6 +8668,14 @@ declare class ApproximateTokenEstimator implements ITokenEstimator {
8243
8668
  * Estimate tokens for structured data (always uses 'mixed' estimation)
8244
8669
  */
8245
8670
  estimateDataTokens(data: unknown, contentType?: TokenContentType): number;
8671
+ /**
8672
+ * Estimate tokens for an image using tile-based model (matches OpenAI pricing).
8673
+ *
8674
+ * - detail='low': 85 tokens
8675
+ * - detail='high' with known dimensions: 85 + 170 per 512×512 tile
8676
+ * - Unknown dimensions: 1000 tokens (conservative default)
8677
+ */
8678
+ estimateImageTokens(width?: number, height?: number, detail?: string): number;
8246
8679
  }
8247
8680
 
8248
8681
  /**
@@ -8572,8 +9005,13 @@ declare class FileContextStorage implements IContextStorage {
8572
9005
  updateMetadata(sessionId: string, metadata: Partial<ContextSessionMetadata>): Promise<void>;
8573
9006
  /**
8574
9007
  * Get the storage path (for display/debugging)
9008
+ * @deprecated Use getLocation() instead
8575
9009
  */
8576
9010
  getPath(): string;
9011
+ /**
9012
+ * Get a human-readable storage location string (for display/debugging)
9013
+ */
9014
+ getLocation(): string;
8577
9015
  /**
8578
9016
  * Get the agent ID
8579
9017
  */
@@ -9404,8 +9842,12 @@ declare class ProviderErrorMapper {
9404
9842
  */
9405
9843
 
9406
9844
  /**
9407
- * Factory function type for creating service-specific tools
9408
- * Takes a Connector and returns an array of tools that use it
9845
+ * Factory function type for creating service-specific tools.
9846
+ * Takes a Connector and returns an array of tools that use it.
9847
+ *
9848
+ * The `userId` parameter is a legacy fallback — tools should prefer reading
9849
+ * userId from ToolContext at execution time (auto-populated by Agent).
9850
+ * Factory userId is used as fallback when ToolContext is not available.
9409
9851
  */
9410
9852
  type ServiceToolFactory = (connector: Connector, userId?: string) => ToolFunction[];
9411
9853
  /**
@@ -10982,6 +11424,7 @@ declare const bash: ToolFunction<BashArgs, BashResult>;
10982
11424
  *
10983
11425
  * Common types and configuration for filesystem operations.
10984
11426
  */
11427
+
10985
11428
  /**
10986
11429
  * Configuration for filesystem tools
10987
11430
  */
@@ -11023,11 +11466,18 @@ interface FilesystemToolConfig {
11023
11466
  * Default: common binary extensions
11024
11467
  */
11025
11468
  excludeExtensions?: string[];
11469
+ /**
11470
+ * Document reader config for non-text file formats (PDF, DOCX, XLSX, etc.).
11471
+ * When set, read_file will automatically convert binary document formats to markdown.
11472
+ */
11473
+ documentReaderConfig?: DocumentReaderConfig;
11026
11474
  }
11027
11475
  /**
11028
11476
  * Default configuration
11029
11477
  */
11030
- declare const DEFAULT_FILESYSTEM_CONFIG: Required<FilesystemToolConfig>;
11478
+ /** FilesystemToolConfig with all base fields required (documentReaderConfig remains optional) */
11479
+ type FilesystemToolConfigDefaults = Required<Omit<FilesystemToolConfig, 'documentReaderConfig'>> & Pick<FilesystemToolConfig, 'documentReaderConfig'>;
11480
+ declare const DEFAULT_FILESYSTEM_CONFIG: FilesystemToolConfigDefaults;
11031
11481
  /**
11032
11482
  * Result of a file read operation
11033
11483
  */
@@ -11382,7 +11832,7 @@ interface WebFetchResult {
11382
11832
  url: string;
11383
11833
  title: string;
11384
11834
  content: string;
11385
- contentType: 'html' | 'json' | 'text' | 'error';
11835
+ contentType: 'html' | 'json' | 'text' | 'document' | 'error';
11386
11836
  qualityScore: number;
11387
11837
  requiresJS: boolean;
11388
11838
  suggestedAction?: string;
@@ -11392,51 +11842,24 @@ interface WebFetchResult {
11392
11842
  byline?: string;
11393
11843
  wasReadabilityUsed?: boolean;
11394
11844
  wasTruncated?: boolean;
11845
+ documentMetadata?: Record<string, unknown>;
11395
11846
  }
11396
11847
  declare const webFetch: ToolFunction<WebFetchArgs, WebFetchResult>;
11397
11848
 
11398
11849
  /**
11399
- * Web Fetch with JavaScript - Uses Puppeteer for JS-rendered sites
11400
- * Optional tool - requires puppeteer to be installed
11401
- */
11402
-
11403
- interface WebFetchJSArgs {
11404
- url: string;
11405
- waitForSelector?: string;
11406
- timeout?: number;
11407
- takeScreenshot?: boolean;
11408
- }
11409
- interface WebFetchJSResult {
11410
- success: boolean;
11411
- url: string;
11412
- title: string;
11413
- content: string;
11414
- screenshot?: string;
11415
- loadTime: number;
11416
- error?: string;
11417
- suggestion?: string;
11418
- excerpt?: string;
11419
- byline?: string;
11420
- wasReadabilityUsed?: boolean;
11421
- wasTruncated?: boolean;
11422
- }
11423
- declare const webFetchJS: ToolFunction<WebFetchJSArgs, WebFetchJSResult>;
11424
-
11425
- /**
11426
- * Web Search Tool - Clean interface for LLM
11850
+ * Web Search Tool Factory
11427
11851
  *
11428
- * ARCHITECTURE:
11429
- * - LLM sees simple interface: { query, numResults, country, language }
11430
- * - Connector configuration is INTERNAL (auto-detected by serviceType)
11431
- * - Uses shared findConnectorByServiceTypes() utility
11432
- * - Fallback to environment variables if no connector configured
11852
+ * Creates a web_search tool bound to a specific Connector.
11853
+ * Follows the ConnectorTools pattern (like GitHub tools).
11433
11854
  *
11434
- * Supports: Serper.dev, Brave, Tavily, RapidAPI
11855
+ * Usage:
11856
+ * ConnectorTools.registerService('serper', (connector) => [createWebSearchTool(connector)]);
11857
+ * // or directly:
11858
+ * const tool = createWebSearchTool(myConnector);
11435
11859
  */
11436
11860
 
11437
11861
  /**
11438
11862
  * Arguments for web_search tool
11439
- * CLEAN and SIMPLE - no connector details exposed
11440
11863
  */
11441
11864
  interface WebSearchArgs {
11442
11865
  /** Search query string */
@@ -11452,27 +11875,35 @@ interface WebSearchResult {
11452
11875
  success: boolean;
11453
11876
  query: string;
11454
11877
  provider: string;
11455
- results: SearchResult$1[];
11878
+ results: SearchResult[];
11456
11879
  count: number;
11457
11880
  error?: string;
11458
11881
  }
11459
- declare const webSearch: ToolFunction<WebSearchArgs, WebSearchResult>;
11882
+ /**
11883
+ * Create a web_search tool bound to a specific connector.
11884
+ *
11885
+ * @param connector - Connector instance providing auth for the search API
11886
+ */
11887
+ declare function createWebSearchTool(connector: Connector): ToolFunction<WebSearchArgs, WebSearchResult>;
11460
11888
 
11461
11889
  /**
11462
- * Web Scrape Tool - Clean interface for LLM
11890
+ * Web Scrape Tool Factory
11463
11891
  *
11464
- * ARCHITECTURE:
11465
- * - LLM sees simple interface: { url, timeout, includeHtml, includeMarkdown, includeLinks, waitForSelector }
11466
- * - Connector configuration is INTERNAL (auto-detected by serviceType)
11467
- * - Uses shared findConnectorByServiceTypes() utility
11468
- * - Automatic fallback chain: native fetch -> JS rendering -> external API
11892
+ * Creates a web_scrape tool bound to a specific Connector.
11893
+ * Follows the ConnectorTools pattern (like GitHub tools).
11469
11894
  *
11470
- * Supports: ZenRows, Jina Reader, Firecrawl, ScrapingBee
11895
+ * Fallback chain:
11896
+ * 1. Native fetch (free/fast) via webFetch
11897
+ * 2. External API via the bound connector (e.g., ZenRows, Firecrawl)
11898
+ *
11899
+ * Usage:
11900
+ * ConnectorTools.registerService('zenrows', (connector) => [createWebScrapeTool(connector)]);
11901
+ * // or directly:
11902
+ * const tool = createWebScrapeTool(myConnector);
11471
11903
  */
11472
11904
 
11473
11905
  /**
11474
11906
  * Arguments for web_scrape tool
11475
- * CLEAN and SIMPLE - no connector/strategy details exposed
11476
11907
  */
11477
11908
  interface WebScrapeArgs {
11478
11909
  /** URL to scrape */
@@ -11495,7 +11926,7 @@ interface WebScrapeResult {
11495
11926
  url: string;
11496
11927
  /** Final URL after redirects */
11497
11928
  finalUrl?: string;
11498
- /** Method used: 'native', 'js', or external provider name */
11929
+ /** Method used: 'native' or external provider name */
11499
11930
  method: string;
11500
11931
  /** Page title */
11501
11932
  title: string;
@@ -11518,23 +11949,23 @@ interface WebScrapeResult {
11518
11949
  /** Error message if failed */
11519
11950
  error?: string;
11520
11951
  }
11521
- declare const webScrape: ToolFunction<WebScrapeArgs, WebScrapeResult>;
11522
-
11523
11952
  /**
11524
- * Serper.dev search provider
11525
- * Fast Google search results via API
11953
+ * Create a web_scrape tool bound to a specific connector.
11954
+ *
11955
+ * @param connector - Connector instance providing auth for the scrape API
11526
11956
  */
11527
- interface SearchResult {
11528
- title: string;
11529
- url: string;
11530
- snippet: string;
11531
- position: number;
11532
- }
11957
+ declare function createWebScrapeTool(connector: Connector): ToolFunction<WebScrapeArgs, WebScrapeResult>;
11533
11958
 
11534
11959
  /**
11535
11960
  * JavaScript Execution Tool
11536
- * Executes JavaScript in a sandboxed VM with connector integration
11537
- * Connectors provide authenticated access to external APIs (GitHub, Microsoft, etc.)
11961
+ * Executes JavaScript in a sandboxed VM with connector integration.
11962
+ * Connectors provide authenticated access to external APIs (GitHub, Slack, etc.)
11963
+ *
11964
+ * Key features:
11965
+ * - userId auto-injected from ToolContext into authenticatedFetch calls
11966
+ * - Connector list always scoped to current userId via global access policy
11967
+ * - Dynamic description regenerated at each LLM call with current connectors
11968
+ * - Configurable timeout per invocation
11538
11969
  */
11539
11970
 
11540
11971
  interface ExecuteJSArgs {
@@ -11549,22 +11980,38 @@ interface ExecuteJSResult {
11549
11980
  error?: string;
11550
11981
  executionTime: number;
11551
11982
  }
11983
+ /**
11984
+ * Options for creating the execute_javascript tool.
11985
+ */
11986
+ interface ExecuteJavaScriptToolOptions {
11987
+ /**
11988
+ * Maximum allowed timeout in milliseconds for code execution.
11989
+ * The LLM can request up to this value via the `timeout` parameter.
11990
+ * Default: 30000 (30s). Set higher for long-running API calls.
11991
+ */
11992
+ maxTimeout?: number;
11993
+ /**
11994
+ * Default timeout in milliseconds when not specified by the LLM.
11995
+ * Default: 10000 (10s).
11996
+ */
11997
+ defaultTimeout?: number;
11998
+ }
11552
11999
  /**
11553
12000
  * Create an execute_javascript tool.
11554
12001
  *
11555
12002
  * The tool uses `descriptionFactory` to generate a dynamic description that
11556
- * always reflects the currently registered connectors. This ensures the LLM
11557
- * sees up-to-date connector information even if connectors are registered
11558
- * after the tool is created.
12003
+ * always reflects the connectors available to the current user. Connector
12004
+ * visibility is determined by the global access policy (if set) scoped by
12005
+ * the agent's userId from ToolContext.
12006
+ *
12007
+ * @param options - Optional configuration for timeout limits
11559
12008
  */
11560
- declare function createExecuteJavaScriptTool(): ToolFunction<ExecuteJSArgs, ExecuteJSResult>;
12009
+ declare function createExecuteJavaScriptTool(options?: ExecuteJavaScriptToolOptions): ToolFunction<ExecuteJSArgs, ExecuteJSResult>;
11561
12010
  /**
11562
12011
  * Default executeJavaScript tool instance.
11563
12012
  *
11564
- * This tool uses `descriptionFactory` to generate dynamic descriptions,
11565
- * so the connector list is always current when the tool is sent to the LLM.
11566
- * You can use either this default instance or create new ones with
11567
- * `createExecuteJavaScriptTool()` - both will have dynamic descriptions.
12013
+ * Uses the global connector registry (scoped by userId at runtime).
12014
+ * For custom timeouts, use createExecuteJavaScriptTool(options).
11568
12015
  */
11569
12016
  declare const executeJavaScript: ToolFunction<ExecuteJSArgs, ExecuteJSResult>;
11570
12017
 
@@ -11678,7 +12125,7 @@ interface SpeechToTextResult {
11678
12125
  durationSeconds?: number;
11679
12126
  error?: string;
11680
12127
  }
11681
- declare function createSpeechToTextTool(connector: Connector, storage?: IMediaStorage, _userId?: string): ToolFunction<SpeechToTextArgs, SpeechToTextResult>;
12128
+ declare function createSpeechToTextTool(connector: Connector, storage?: IMediaStorage): ToolFunction<SpeechToTextArgs, SpeechToTextResult>;
11682
12129
 
11683
12130
  /**
11684
12131
  * GitHub Tools - Shared Types and Helpers
@@ -12015,17 +12462,391 @@ interface CreatePRArgs {
12015
12462
  */
12016
12463
  declare function createCreatePRTool(connector: Connector, userId?: string): ToolFunction<CreatePRArgs, GitHubCreatePRResult>;
12017
12464
 
12465
+ /**
12466
+ * Desktop Automation Tools - Types
12467
+ *
12468
+ * Interfaces and types for OS-level desktop automation (screenshot, mouse, keyboard, windows).
12469
+ * All coordinates are in PHYSICAL pixel space (screenshot space).
12470
+ * The driver converts to logical OS coords internally using scaleFactor.
12471
+ */
12472
+ type MouseButton = 'left' | 'right' | 'middle';
12473
+ interface DesktopPoint {
12474
+ x: number;
12475
+ y: number;
12476
+ }
12477
+ interface DesktopScreenSize {
12478
+ /** Physical pixel width (screenshot space) */
12479
+ physicalWidth: number;
12480
+ /** Physical pixel height (screenshot space) */
12481
+ physicalHeight: number;
12482
+ /** Logical OS width */
12483
+ logicalWidth: number;
12484
+ /** Logical OS height */
12485
+ logicalHeight: number;
12486
+ /** Scale factor (physical / logical), e.g. 2.0 on Retina */
12487
+ scaleFactor: number;
12488
+ }
12489
+ interface DesktopScreenshot {
12490
+ /** Base64-encoded PNG image data */
12491
+ base64: string;
12492
+ /** Width in physical pixels */
12493
+ width: number;
12494
+ /** Height in physical pixels */
12495
+ height: number;
12496
+ }
12497
+ interface DesktopWindow {
12498
+ /** Window identifier (platform-specific) */
12499
+ id: number;
12500
+ /** Window title */
12501
+ title: string;
12502
+ /** Application name */
12503
+ appName?: string;
12504
+ /** Window bounds in physical pixel coords */
12505
+ bounds?: {
12506
+ x: number;
12507
+ y: number;
12508
+ width: number;
12509
+ height: number;
12510
+ };
12511
+ }
12512
+ interface IDesktopDriver {
12513
+ /** Initialize the driver (dynamic import, permission checks, scale detection) */
12514
+ initialize(): Promise<void>;
12515
+ /** Whether the driver is initialized */
12516
+ readonly isInitialized: boolean;
12517
+ /** Current scale factor (physical / logical) */
12518
+ readonly scaleFactor: number;
12519
+ screenshot(region?: {
12520
+ x: number;
12521
+ y: number;
12522
+ width: number;
12523
+ height: number;
12524
+ }): Promise<DesktopScreenshot>;
12525
+ getScreenSize(): Promise<DesktopScreenSize>;
12526
+ mouseMove(x: number, y: number): Promise<void>;
12527
+ mouseClick(x: number, y: number, button: MouseButton, clickCount: number): Promise<void>;
12528
+ mouseDrag(startX: number, startY: number, endX: number, endY: number, button: MouseButton): Promise<void>;
12529
+ mouseScroll(deltaX: number, deltaY: number, x?: number, y?: number): Promise<void>;
12530
+ getCursorPosition(): Promise<DesktopPoint>;
12531
+ keyboardType(text: string, delay?: number): Promise<void>;
12532
+ keyboardKey(keys: string): Promise<void>;
12533
+ getWindowList(): Promise<DesktopWindow[]>;
12534
+ focusWindow(windowId: number): Promise<void>;
12535
+ }
12536
+ interface DesktopToolConfig {
12537
+ /** Custom driver implementation (defaults to NutTreeDriver) */
12538
+ driver?: IDesktopDriver;
12539
+ /**
12540
+ * Human-like delay range in ms added between actions.
12541
+ * Set to [0, 0] for instant actions.
12542
+ * Default: [50, 150]
12543
+ */
12544
+ humanDelay?: [number, number];
12545
+ /**
12546
+ * Whether to humanize mouse movements (curved path vs instant teleport).
12547
+ * Default: false
12548
+ */
12549
+ humanizeMovement?: boolean;
12550
+ }
12551
+ declare const DEFAULT_DESKTOP_CONFIG: Required<DesktopToolConfig>;
12552
+ /**
12553
+ * Apply a random human-like delay based on config.
12554
+ */
12555
+ declare function applyHumanDelay(config: DesktopToolConfig): Promise<void>;
12556
+ interface DesktopScreenshotArgs {
12557
+ region?: {
12558
+ x: number;
12559
+ y: number;
12560
+ width: number;
12561
+ height: number;
12562
+ };
12563
+ }
12564
+ interface DesktopScreenshotResult {
12565
+ success: boolean;
12566
+ width?: number;
12567
+ height?: number;
12568
+ /** Base64 PNG for text summary */
12569
+ base64?: string;
12570
+ /** Image array for multimodal provider handling */
12571
+ __images?: Array<{
12572
+ base64: string;
12573
+ mediaType: string;
12574
+ }>;
12575
+ error?: string;
12576
+ }
12577
+ interface DesktopMouseMoveArgs {
12578
+ x: number;
12579
+ y: number;
12580
+ }
12581
+ interface DesktopMouseMoveResult {
12582
+ success: boolean;
12583
+ x?: number;
12584
+ y?: number;
12585
+ error?: string;
12586
+ }
12587
+ interface DesktopMouseClickArgs {
12588
+ x?: number;
12589
+ y?: number;
12590
+ button?: MouseButton;
12591
+ clickCount?: number;
12592
+ }
12593
+ interface DesktopMouseClickResult {
12594
+ success: boolean;
12595
+ x?: number;
12596
+ y?: number;
12597
+ button?: MouseButton;
12598
+ clickCount?: number;
12599
+ error?: string;
12600
+ }
12601
+ interface DesktopMouseDragArgs {
12602
+ startX: number;
12603
+ startY: number;
12604
+ endX: number;
12605
+ endY: number;
12606
+ button?: MouseButton;
12607
+ }
12608
+ interface DesktopMouseDragResult {
12609
+ success: boolean;
12610
+ error?: string;
12611
+ }
12612
+ interface DesktopMouseScrollArgs {
12613
+ deltaX?: number;
12614
+ deltaY?: number;
12615
+ x?: number;
12616
+ y?: number;
12617
+ }
12618
+ interface DesktopMouseScrollResult {
12619
+ success: boolean;
12620
+ error?: string;
12621
+ }
12622
+ interface DesktopGetCursorResult {
12623
+ success: boolean;
12624
+ x?: number;
12625
+ y?: number;
12626
+ error?: string;
12627
+ }
12628
+ interface DesktopKeyboardTypeArgs {
12629
+ text: string;
12630
+ delay?: number;
12631
+ }
12632
+ interface DesktopKeyboardTypeResult {
12633
+ success: boolean;
12634
+ error?: string;
12635
+ }
12636
+ interface DesktopKeyboardKeyArgs {
12637
+ keys: string;
12638
+ }
12639
+ interface DesktopKeyboardKeyResult {
12640
+ success: boolean;
12641
+ error?: string;
12642
+ }
12643
+ interface DesktopGetScreenSizeResult {
12644
+ success: boolean;
12645
+ physicalWidth?: number;
12646
+ physicalHeight?: number;
12647
+ logicalWidth?: number;
12648
+ logicalHeight?: number;
12649
+ scaleFactor?: number;
12650
+ error?: string;
12651
+ }
12652
+ interface DesktopWindowListResult {
12653
+ success: boolean;
12654
+ windows?: DesktopWindow[];
12655
+ error?: string;
12656
+ }
12657
+ interface DesktopWindowFocusArgs {
12658
+ windowId: number;
12659
+ }
12660
+ interface DesktopWindowFocusResult {
12661
+ success: boolean;
12662
+ error?: string;
12663
+ }
12664
+ declare const DESKTOP_TOOL_NAMES: readonly ["desktop_screenshot", "desktop_mouse_move", "desktop_mouse_click", "desktop_mouse_drag", "desktop_mouse_scroll", "desktop_get_cursor", "desktop_keyboard_type", "desktop_keyboard_key", "desktop_get_screen_size", "desktop_window_list", "desktop_window_focus"];
12665
+ type DesktopToolName = (typeof DESKTOP_TOOL_NAMES)[number];
12666
+
12667
+ /**
12668
+ * NutTreeDriver - Desktop automation driver using @nut-tree-fork/nut-js
12669
+ *
12670
+ * Handles:
12671
+ * - Dynamic import of @nut-tree-fork/nut-js (optional peer dep)
12672
+ * - Scale factor detection for Retina/HiDPI displays
12673
+ * - Coordinate conversion: physical pixels (screenshot space) ↔ logical OS coords
12674
+ * - PNG encoding of raw RGBA screenshots
12675
+ */
12676
+
12677
+ /**
12678
+ * Parse a key combo string like "ctrl+c", "cmd+shift+s", "enter"
12679
+ * Returns nut-tree Key enum values.
12680
+ */
12681
+ declare function parseKeyCombo(keys: string, KeyEnum: Record<string, any>): any[];
12682
+ declare class NutTreeDriver implements IDesktopDriver {
12683
+ private _isInitialized;
12684
+ private _scaleFactor;
12685
+ private _nut;
12686
+ private _windowCache;
12687
+ get isInitialized(): boolean;
12688
+ get scaleFactor(): number;
12689
+ initialize(): Promise<void>;
12690
+ private assertInitialized;
12691
+ /** Convert physical (screenshot) coords to logical (OS) coords */
12692
+ private toLogical;
12693
+ /** Convert logical (OS) coords to physical (screenshot) coords */
12694
+ private toPhysical;
12695
+ screenshot(region?: {
12696
+ x: number;
12697
+ y: number;
12698
+ width: number;
12699
+ height: number;
12700
+ }): Promise<DesktopScreenshot>;
12701
+ getScreenSize(): Promise<DesktopScreenSize>;
12702
+ mouseMove(x: number, y: number): Promise<void>;
12703
+ mouseClick(x: number, y: number, button: MouseButton, clickCount: number): Promise<void>;
12704
+ mouseDrag(startX: number, startY: number, endX: number, endY: number, button: MouseButton): Promise<void>;
12705
+ mouseScroll(deltaX: number, deltaY: number, x?: number, y?: number): Promise<void>;
12706
+ getCursorPosition(): Promise<DesktopPoint>;
12707
+ keyboardType(text: string, delay?: number): Promise<void>;
12708
+ keyboardKey(keys: string): Promise<void>;
12709
+ getWindowList(): Promise<DesktopWindow[]>;
12710
+ focusWindow(windowId: number): Promise<void>;
12711
+ }
12712
+
12713
+ /**
12714
+ * Lazy singleton driver accessor for desktop tools.
12715
+ *
12716
+ * First call initializes the driver (dynamic import + scale detection).
12717
+ * Subsequent calls reuse the same instance.
12718
+ */
12719
+
12720
+ /**
12721
+ * Get (or create) the desktop driver instance.
12722
+ * If config.driver is provided, uses that instead of the default.
12723
+ */
12724
+ declare function getDesktopDriver(config?: DesktopToolConfig): Promise<IDesktopDriver>;
12725
+ /**
12726
+ * Reset the default driver (for testing).
12727
+ */
12728
+ declare function resetDefaultDriver(): void;
12729
+
12730
+ /**
12731
+ * Desktop Screenshot Tool
12732
+ *
12733
+ * Captures a screenshot of the entire screen or a specific region.
12734
+ * Returns base64 PNG with __images convention for multimodal provider handling.
12735
+ */
12736
+
12737
+ declare function createDesktopScreenshotTool(config?: DesktopToolConfig): ToolFunction<DesktopScreenshotArgs, DesktopScreenshotResult>;
12738
+ declare const desktopScreenshot: ToolFunction<DesktopScreenshotArgs, DesktopScreenshotResult>;
12739
+
12740
+ /**
12741
+ * Desktop Mouse Move Tool
12742
+ *
12743
+ * Moves the mouse cursor to a specific position on screen.
12744
+ * Coordinates are in physical pixel space (same as screenshot pixels).
12745
+ */
12746
+
12747
+ declare function createDesktopMouseMoveTool(config?: DesktopToolConfig): ToolFunction<DesktopMouseMoveArgs, DesktopMouseMoveResult>;
12748
+ declare const desktopMouseMove: ToolFunction<DesktopMouseMoveArgs, DesktopMouseMoveResult>;
12749
+
12750
+ /**
12751
+ * Desktop Mouse Click Tool
12752
+ *
12753
+ * Clicks at the current cursor position or at specified coordinates.
12754
+ * If x/y are provided, moves to that position first, then clicks.
12755
+ */
12756
+
12757
+ declare function createDesktopMouseClickTool(config?: DesktopToolConfig): ToolFunction<DesktopMouseClickArgs, DesktopMouseClickResult>;
12758
+ declare const desktopMouseClick: ToolFunction<DesktopMouseClickArgs, DesktopMouseClickResult>;
12759
+
12760
+ /**
12761
+ * Desktop Mouse Drag Tool
12762
+ *
12763
+ * Drags from one position to another (press, move, release).
12764
+ */
12765
+
12766
+ declare function createDesktopMouseDragTool(config?: DesktopToolConfig): ToolFunction<DesktopMouseDragArgs, DesktopMouseDragResult>;
12767
+ declare const desktopMouseDrag: ToolFunction<DesktopMouseDragArgs, DesktopMouseDragResult>;
12768
+
12769
+ /**
12770
+ * Desktop Mouse Scroll Tool
12771
+ *
12772
+ * Scrolls the mouse wheel at the current position or at specified coordinates.
12773
+ */
12774
+
12775
+ declare function createDesktopMouseScrollTool(config?: DesktopToolConfig): ToolFunction<DesktopMouseScrollArgs, DesktopMouseScrollResult>;
12776
+ declare const desktopMouseScroll: ToolFunction<DesktopMouseScrollArgs, DesktopMouseScrollResult>;
12777
+
12778
+ /**
12779
+ * Desktop Get Cursor Tool
12780
+ *
12781
+ * Returns the current cursor position in physical pixel (screenshot) coordinates.
12782
+ */
12783
+
12784
+ declare function createDesktopGetCursorTool(config?: DesktopToolConfig): ToolFunction<Record<string, never>, DesktopGetCursorResult>;
12785
+ declare const desktopGetCursor: ToolFunction<Record<string, never>, DesktopGetCursorResult>;
12786
+
12787
+ /**
12788
+ * Desktop Keyboard Type Tool
12789
+ *
12790
+ * Types text as if from a physical keyboard.
12791
+ */
12792
+
12793
+ declare function createDesktopKeyboardTypeTool(config?: DesktopToolConfig): ToolFunction<DesktopKeyboardTypeArgs, DesktopKeyboardTypeResult>;
12794
+ declare const desktopKeyboardType: ToolFunction<DesktopKeyboardTypeArgs, DesktopKeyboardTypeResult>;
12795
+
12796
+ /**
12797
+ * Desktop Keyboard Key Tool
12798
+ *
12799
+ * Presses keyboard shortcuts or special keys (e.g., "ctrl+c", "enter", "cmd+shift+s").
12800
+ */
12801
+
12802
+ declare function createDesktopKeyboardKeyTool(config?: DesktopToolConfig): ToolFunction<DesktopKeyboardKeyArgs, DesktopKeyboardKeyResult>;
12803
+ declare const desktopKeyboardKey: ToolFunction<DesktopKeyboardKeyArgs, DesktopKeyboardKeyResult>;
12804
+
12805
+ /**
12806
+ * Desktop Get Screen Size Tool
12807
+ *
12808
+ * Returns the screen dimensions (physical, logical, and scale factor).
12809
+ */
12810
+
12811
+ declare function createDesktopGetScreenSizeTool(config?: DesktopToolConfig): ToolFunction<Record<string, never>, DesktopGetScreenSizeResult>;
12812
+ declare const desktopGetScreenSize: ToolFunction<Record<string, never>, DesktopGetScreenSizeResult>;
12813
+
12814
+ /**
12815
+ * Desktop Window List Tool
12816
+ *
12817
+ * Lists all visible windows with their IDs, titles, and bounds.
12818
+ */
12819
+
12820
+ declare function createDesktopWindowListTool(config?: DesktopToolConfig): ToolFunction<Record<string, never>, DesktopWindowListResult>;
12821
+ declare const desktopWindowList: ToolFunction<Record<string, never>, DesktopWindowListResult>;
12822
+
12823
+ /**
12824
+ * Desktop Window Focus Tool
12825
+ *
12826
+ * Brings a specific window to the foreground by its window ID.
12827
+ */
12828
+
12829
+ declare function createDesktopWindowFocusTool(config?: DesktopToolConfig): ToolFunction<DesktopWindowFocusArgs, DesktopWindowFocusResult>;
12830
+ declare const desktopWindowFocus: ToolFunction<DesktopWindowFocusArgs, DesktopWindowFocusResult>;
12831
+
12832
+ /**
12833
+ * A bundle of all desktop automation tools.
12834
+ * Includes: screenshot, mouse (move, click, drag, scroll, getCursor),
12835
+ * keyboard (type, key), screen info, and window management.
12836
+ */
12837
+ declare const desktopTools: (ToolFunction<DesktopScreenshotArgs, DesktopScreenshotResult> | ToolFunction<DesktopMouseMoveArgs, DesktopMouseMoveResult> | ToolFunction<DesktopMouseClickArgs, DesktopMouseClickResult> | ToolFunction<DesktopMouseDragArgs, DesktopMouseDragResult> | ToolFunction<DesktopMouseScrollArgs, DesktopMouseScrollResult> | ToolFunction<Record<string, never>, DesktopGetCursorResult> | ToolFunction<DesktopKeyboardTypeArgs, DesktopKeyboardTypeResult> | ToolFunction<DesktopKeyboardKeyArgs, DesktopKeyboardKeyResult> | ToolFunction<Record<string, never>, DesktopGetScreenSizeResult> | ToolFunction<Record<string, never>, DesktopWindowListResult> | ToolFunction<DesktopWindowFocusArgs, DesktopWindowFocusResult>)[];
12838
+
12018
12839
  /**
12019
12840
  * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
12020
12841
  *
12021
12842
  * Generated by: scripts/generate-tool-registry.ts
12022
- * Generated at: 2026-02-08T21:31:53.497Z
12843
+ * Generated at: 2026-02-11T15:50:34.835Z
12023
12844
  *
12024
12845
  * To regenerate: npm run generate:tools
12025
12846
  */
12026
12847
 
12027
12848
  /** Tool category for grouping */
12028
- type ToolCategory = 'filesystem' | 'shell' | 'web' | 'code' | 'json' | 'connector' | 'other';
12849
+ type ToolCategory = 'filesystem' | 'shell' | 'web' | 'code' | 'json' | 'connector' | 'desktop' | 'other';
12029
12850
  /** Metadata for a tool in the registry */
12030
12851
  interface ToolRegistryEntry {
12031
12852
  /** Tool name (matches definition.function.name) */
@@ -12197,10 +13018,53 @@ type index_BashResult = BashResult;
12197
13018
  type index_ConnectorToolEntry = ConnectorToolEntry;
12198
13019
  type index_ConnectorTools = ConnectorTools;
12199
13020
  declare const index_ConnectorTools: typeof ConnectorTools;
13021
+ declare const index_DEFAULT_DESKTOP_CONFIG: typeof DEFAULT_DESKTOP_CONFIG;
12200
13022
  declare const index_DEFAULT_FILESYSTEM_CONFIG: typeof DEFAULT_FILESYSTEM_CONFIG;
12201
13023
  declare const index_DEFAULT_SHELL_CONFIG: typeof DEFAULT_SHELL_CONFIG;
13024
+ declare const index_DESKTOP_TOOL_NAMES: typeof DESKTOP_TOOL_NAMES;
13025
+ type index_DesktopGetCursorResult = DesktopGetCursorResult;
13026
+ type index_DesktopGetScreenSizeResult = DesktopGetScreenSizeResult;
13027
+ type index_DesktopKeyboardKeyArgs = DesktopKeyboardKeyArgs;
13028
+ type index_DesktopKeyboardKeyResult = DesktopKeyboardKeyResult;
13029
+ type index_DesktopKeyboardTypeArgs = DesktopKeyboardTypeArgs;
13030
+ type index_DesktopKeyboardTypeResult = DesktopKeyboardTypeResult;
13031
+ type index_DesktopMouseClickArgs = DesktopMouseClickArgs;
13032
+ type index_DesktopMouseClickResult = DesktopMouseClickResult;
13033
+ type index_DesktopMouseDragArgs = DesktopMouseDragArgs;
13034
+ type index_DesktopMouseDragResult = DesktopMouseDragResult;
13035
+ type index_DesktopMouseMoveArgs = DesktopMouseMoveArgs;
13036
+ type index_DesktopMouseMoveResult = DesktopMouseMoveResult;
13037
+ type index_DesktopMouseScrollArgs = DesktopMouseScrollArgs;
13038
+ type index_DesktopMouseScrollResult = DesktopMouseScrollResult;
13039
+ type index_DesktopPoint = DesktopPoint;
13040
+ type index_DesktopScreenSize = DesktopScreenSize;
13041
+ type index_DesktopScreenshot = DesktopScreenshot;
13042
+ type index_DesktopScreenshotArgs = DesktopScreenshotArgs;
13043
+ type index_DesktopScreenshotResult = DesktopScreenshotResult;
13044
+ type index_DesktopToolConfig = DesktopToolConfig;
13045
+ type index_DesktopToolName = DesktopToolName;
13046
+ type index_DesktopWindow = DesktopWindow;
13047
+ type index_DesktopWindowFocusArgs = DesktopWindowFocusArgs;
13048
+ type index_DesktopWindowFocusResult = DesktopWindowFocusResult;
13049
+ type index_DesktopWindowListResult = DesktopWindowListResult;
13050
+ type index_DocumentFamily = DocumentFamily;
13051
+ type index_DocumentFormat = DocumentFormat;
13052
+ type index_DocumentImagePiece = DocumentImagePiece;
13053
+ type index_DocumentMetadata = DocumentMetadata;
13054
+ type index_DocumentPiece = DocumentPiece;
13055
+ type index_DocumentReadOptions = DocumentReadOptions;
13056
+ type index_DocumentReader = DocumentReader;
13057
+ declare const index_DocumentReader: typeof DocumentReader;
13058
+ type index_DocumentReaderConfig = DocumentReaderConfig;
13059
+ type index_DocumentResult = DocumentResult;
13060
+ type index_DocumentSource = DocumentSource;
13061
+ type index_DocumentTextPiece = DocumentTextPiece;
13062
+ type index_DocumentToContentOptions = DocumentToContentOptions;
12202
13063
  type index_EditFileResult = EditFileResult;
12203
13064
  type index_FilesystemToolConfig = FilesystemToolConfig;
13065
+ type index_FormatDetectionResult = FormatDetectionResult;
13066
+ type index_FormatDetector = FormatDetector;
13067
+ declare const index_FormatDetector: typeof FormatDetector;
12204
13068
  type index_GenericAPICallArgs = GenericAPICallArgs;
12205
13069
  type index_GenericAPICallResult = GenericAPICallResult;
12206
13070
  type index_GenericAPIToolOptions = GenericAPIToolOptions;
@@ -12216,6 +13080,13 @@ type index_GitHubSearchFilesResult = GitHubSearchFilesResult;
12216
13080
  type index_GlobResult = GlobResult;
12217
13081
  type index_GrepMatch = GrepMatch;
12218
13082
  type index_GrepResult = GrepResult;
13083
+ type index_IDesktopDriver = IDesktopDriver;
13084
+ type index_IDocumentTransformer = IDocumentTransformer;
13085
+ type index_IFormatHandler = IFormatHandler;
13086
+ type index_ImageFilterOptions = ImageFilterOptions;
13087
+ type index_MouseButton = MouseButton;
13088
+ type index_NutTreeDriver = NutTreeDriver;
13089
+ declare const index_NutTreeDriver: typeof NutTreeDriver;
12219
13090
  type index_ReadFileResult = ReadFileResult;
12220
13091
  type index_SearchResult = SearchResult;
12221
13092
  type index_ServiceToolFactory = ServiceToolFactory;
@@ -12225,9 +13096,21 @@ type index_ToolRegistry = ToolRegistry;
12225
13096
  declare const index_ToolRegistry: typeof ToolRegistry;
12226
13097
  type index_ToolRegistryEntry = ToolRegistryEntry;
12227
13098
  type index_WriteFileResult = WriteFileResult;
13099
+ declare const index_applyHumanDelay: typeof applyHumanDelay;
12228
13100
  declare const index_bash: typeof bash;
12229
13101
  declare const index_createBashTool: typeof createBashTool;
12230
13102
  declare const index_createCreatePRTool: typeof createCreatePRTool;
13103
+ declare const index_createDesktopGetCursorTool: typeof createDesktopGetCursorTool;
13104
+ declare const index_createDesktopGetScreenSizeTool: typeof createDesktopGetScreenSizeTool;
13105
+ declare const index_createDesktopKeyboardKeyTool: typeof createDesktopKeyboardKeyTool;
13106
+ declare const index_createDesktopKeyboardTypeTool: typeof createDesktopKeyboardTypeTool;
13107
+ declare const index_createDesktopMouseClickTool: typeof createDesktopMouseClickTool;
13108
+ declare const index_createDesktopMouseDragTool: typeof createDesktopMouseDragTool;
13109
+ declare const index_createDesktopMouseMoveTool: typeof createDesktopMouseMoveTool;
13110
+ declare const index_createDesktopMouseScrollTool: typeof createDesktopMouseScrollTool;
13111
+ declare const index_createDesktopScreenshotTool: typeof createDesktopScreenshotTool;
13112
+ declare const index_createDesktopWindowFocusTool: typeof createDesktopWindowFocusTool;
13113
+ declare const index_createDesktopWindowListTool: typeof createDesktopWindowListTool;
12231
13114
  declare const index_createEditFileTool: typeof createEditFileTool;
12232
13115
  declare const index_createExecuteJavaScriptTool: typeof createExecuteJavaScriptTool;
12233
13116
  declare const index_createGetPRTool: typeof createGetPRTool;
@@ -12244,13 +13127,28 @@ declare const index_createSearchFilesTool: typeof createSearchFilesTool;
12244
13127
  declare const index_createSpeechToTextTool: typeof createSpeechToTextTool;
12245
13128
  declare const index_createTextToSpeechTool: typeof createTextToSpeechTool;
12246
13129
  declare const index_createVideoTools: typeof createVideoTools;
13130
+ declare const index_createWebScrapeTool: typeof createWebScrapeTool;
13131
+ declare const index_createWebSearchTool: typeof createWebSearchTool;
12247
13132
  declare const index_createWriteFileTool: typeof createWriteFileTool;
13133
+ declare const index_desktopGetCursor: typeof desktopGetCursor;
13134
+ declare const index_desktopGetScreenSize: typeof desktopGetScreenSize;
13135
+ declare const index_desktopKeyboardKey: typeof desktopKeyboardKey;
13136
+ declare const index_desktopKeyboardType: typeof desktopKeyboardType;
13137
+ declare const index_desktopMouseClick: typeof desktopMouseClick;
13138
+ declare const index_desktopMouseDrag: typeof desktopMouseDrag;
13139
+ declare const index_desktopMouseMove: typeof desktopMouseMove;
13140
+ declare const index_desktopMouseScroll: typeof desktopMouseScroll;
13141
+ declare const index_desktopScreenshot: typeof desktopScreenshot;
13142
+ declare const index_desktopTools: typeof desktopTools;
13143
+ declare const index_desktopWindowFocus: typeof desktopWindowFocus;
13144
+ declare const index_desktopWindowList: typeof desktopWindowList;
12248
13145
  declare const index_developerTools: typeof developerTools;
12249
13146
  declare const index_editFile: typeof editFile;
12250
13147
  declare const index_executeJavaScript: typeof executeJavaScript;
12251
13148
  declare const index_expandTilde: typeof expandTilde;
12252
13149
  declare const index_getAllBuiltInTools: typeof getAllBuiltInTools;
12253
13150
  declare const index_getBackgroundOutput: typeof getBackgroundOutput;
13151
+ declare const index_getDesktopDriver: typeof getDesktopDriver;
12254
13152
  declare const index_getMediaOutputHandler: typeof getMediaOutputHandler;
12255
13153
  declare const index_getMediaStorage: typeof getMediaStorage;
12256
13154
  declare const index_getToolByName: typeof getToolByName;
@@ -12265,20 +13163,20 @@ declare const index_isExcludedExtension: typeof isExcludedExtension;
12265
13163
  declare const index_jsonManipulator: typeof jsonManipulator;
12266
13164
  declare const index_killBackgroundProcess: typeof killBackgroundProcess;
12267
13165
  declare const index_listDirectory: typeof listDirectory;
13166
+ declare const index_mergeTextPieces: typeof mergeTextPieces;
13167
+ declare const index_parseKeyCombo: typeof parseKeyCombo;
12268
13168
  declare const index_parseRepository: typeof parseRepository;
12269
13169
  declare const index_readFile: typeof readFile;
13170
+ declare const index_resetDefaultDriver: typeof resetDefaultDriver;
12270
13171
  declare const index_resolveRepository: typeof resolveRepository;
12271
13172
  declare const index_setMediaOutputHandler: typeof setMediaOutputHandler;
12272
13173
  declare const index_setMediaStorage: typeof setMediaStorage;
12273
13174
  declare const index_toolRegistry: typeof toolRegistry;
12274
13175
  declare const index_validatePath: typeof validatePath;
12275
13176
  declare const index_webFetch: typeof webFetch;
12276
- declare const index_webFetchJS: typeof webFetchJS;
12277
- declare const index_webScrape: typeof webScrape;
12278
- declare const index_webSearch: typeof webSearch;
12279
13177
  declare const index_writeFile: typeof writeFile;
12280
13178
  declare namespace index {
12281
- export { type index_BashResult as BashResult, type index_ConnectorToolEntry as ConnectorToolEntry, index_ConnectorTools as ConnectorTools, index_DEFAULT_FILESYSTEM_CONFIG as DEFAULT_FILESYSTEM_CONFIG, index_DEFAULT_SHELL_CONFIG as DEFAULT_SHELL_CONFIG, type index_EditFileResult as EditFileResult, FileMediaStorage as FileMediaOutputHandler, type index_FilesystemToolConfig as FilesystemToolConfig, type index_GenericAPICallArgs as GenericAPICallArgs, type index_GenericAPICallResult as GenericAPICallResult, type index_GenericAPIToolOptions as GenericAPIToolOptions, type index_GitHubCreatePRResult as GitHubCreatePRResult, type index_GitHubGetPRResult as GitHubGetPRResult, type index_GitHubPRCommentEntry as GitHubPRCommentEntry, type index_GitHubPRCommentsResult as GitHubPRCommentsResult, type index_GitHubPRFilesResult as GitHubPRFilesResult, type index_GitHubReadFileResult as GitHubReadFileResult, type index_GitHubRepository as GitHubRepository, type index_GitHubSearchCodeResult as GitHubSearchCodeResult, type index_GitHubSearchFilesResult as GitHubSearchFilesResult, type index_GlobResult as GlobResult, type index_GrepMatch as GrepMatch, type index_GrepResult as GrepResult, type IMediaStorage as IMediaOutputHandler, type MediaStorageMetadata as MediaOutputMetadata, type MediaStorageResult as MediaOutputResult, type index_ReadFileResult as ReadFileResult, type index_SearchResult as SearchResult, type index_ServiceToolFactory as ServiceToolFactory, type index_ShellToolConfig as ShellToolConfig, type index_ToolCategory as ToolCategory, index_ToolRegistry as ToolRegistry, type index_ToolRegistryEntry as ToolRegistryEntry, type index_WriteFileResult as WriteFileResult, index_bash as bash, index_createBashTool as createBashTool, index_createCreatePRTool as createCreatePRTool, index_createEditFileTool as createEditFileTool, index_createExecuteJavaScriptTool as createExecuteJavaScriptTool, index_createGetPRTool as createGetPRTool, index_createGitHubReadFileTool as createGitHubReadFileTool, index_createGlobTool as createGlobTool, index_createGrepTool as createGrepTool, index_createImageGenerationTool as createImageGenerationTool, index_createListDirectoryTool as createListDirectoryTool, index_createPRCommentsTool as createPRCommentsTool, index_createPRFilesTool as createPRFilesTool, index_createReadFileTool as createReadFileTool, index_createSearchCodeTool as createSearchCodeTool, index_createSearchFilesTool as createSearchFilesTool, index_createSpeechToTextTool as createSpeechToTextTool, index_createTextToSpeechTool as createTextToSpeechTool, index_createVideoTools as createVideoTools, index_createWriteFileTool as createWriteFileTool, index_developerTools as developerTools, index_editFile as editFile, index_executeJavaScript as executeJavaScript, index_expandTilde as expandTilde, index_getAllBuiltInTools as getAllBuiltInTools, index_getBackgroundOutput as getBackgroundOutput, index_getMediaOutputHandler as getMediaOutputHandler, index_getMediaStorage as getMediaStorage, index_getToolByName as getToolByName, index_getToolCategories as getToolCategories, index_getToolRegistry as getToolRegistry, index_getToolsByCategory as getToolsByCategory, index_getToolsRequiringConnector as getToolsRequiringConnector, index_glob as glob, index_grep as grep, index_isBlockedCommand as isBlockedCommand, index_isExcludedExtension as isExcludedExtension, index_jsonManipulator as jsonManipulator, index_killBackgroundProcess as killBackgroundProcess, index_listDirectory as listDirectory, index_parseRepository as parseRepository, index_readFile as readFile, index_resolveRepository as resolveRepository, index_setMediaOutputHandler as setMediaOutputHandler, index_setMediaStorage as setMediaStorage, index_toolRegistry as toolRegistry, index_validatePath as validatePath, index_webFetch as webFetch, index_webFetchJS as webFetchJS, index_webScrape as webScrape, index_webSearch as webSearch, index_writeFile as writeFile };
13179
+ export { type index_BashResult as BashResult, type index_ConnectorToolEntry as ConnectorToolEntry, index_ConnectorTools as ConnectorTools, index_DEFAULT_DESKTOP_CONFIG as DEFAULT_DESKTOP_CONFIG, index_DEFAULT_FILESYSTEM_CONFIG as DEFAULT_FILESYSTEM_CONFIG, index_DEFAULT_SHELL_CONFIG as DEFAULT_SHELL_CONFIG, index_DESKTOP_TOOL_NAMES as DESKTOP_TOOL_NAMES, type index_DesktopGetCursorResult as DesktopGetCursorResult, type index_DesktopGetScreenSizeResult as DesktopGetScreenSizeResult, type index_DesktopKeyboardKeyArgs as DesktopKeyboardKeyArgs, type index_DesktopKeyboardKeyResult as DesktopKeyboardKeyResult, type index_DesktopKeyboardTypeArgs as DesktopKeyboardTypeArgs, type index_DesktopKeyboardTypeResult as DesktopKeyboardTypeResult, type index_DesktopMouseClickArgs as DesktopMouseClickArgs, type index_DesktopMouseClickResult as DesktopMouseClickResult, type index_DesktopMouseDragArgs as DesktopMouseDragArgs, type index_DesktopMouseDragResult as DesktopMouseDragResult, type index_DesktopMouseMoveArgs as DesktopMouseMoveArgs, type index_DesktopMouseMoveResult as DesktopMouseMoveResult, type index_DesktopMouseScrollArgs as DesktopMouseScrollArgs, type index_DesktopMouseScrollResult as DesktopMouseScrollResult, type index_DesktopPoint as DesktopPoint, type index_DesktopScreenSize as DesktopScreenSize, type index_DesktopScreenshot as DesktopScreenshot, type index_DesktopScreenshotArgs as DesktopScreenshotArgs, type index_DesktopScreenshotResult as DesktopScreenshotResult, type index_DesktopToolConfig as DesktopToolConfig, type index_DesktopToolName as DesktopToolName, type index_DesktopWindow as DesktopWindow, type index_DesktopWindowFocusArgs as DesktopWindowFocusArgs, type index_DesktopWindowFocusResult as DesktopWindowFocusResult, type index_DesktopWindowListResult as DesktopWindowListResult, type index_DocumentFamily as DocumentFamily, type index_DocumentFormat as DocumentFormat, type index_DocumentImagePiece as DocumentImagePiece, type index_DocumentMetadata as DocumentMetadata, type index_DocumentPiece as DocumentPiece, type index_DocumentReadOptions as DocumentReadOptions, index_DocumentReader as DocumentReader, type index_DocumentReaderConfig as DocumentReaderConfig, type index_DocumentResult as DocumentResult, type index_DocumentSource as DocumentSource, type index_DocumentTextPiece as DocumentTextPiece, type index_DocumentToContentOptions as DocumentToContentOptions, type index_EditFileResult as EditFileResult, FileMediaStorage as FileMediaOutputHandler, type index_FilesystemToolConfig as FilesystemToolConfig, type index_FormatDetectionResult as FormatDetectionResult, index_FormatDetector as FormatDetector, type index_GenericAPICallArgs as GenericAPICallArgs, type index_GenericAPICallResult as GenericAPICallResult, type index_GenericAPIToolOptions as GenericAPIToolOptions, type index_GitHubCreatePRResult as GitHubCreatePRResult, type index_GitHubGetPRResult as GitHubGetPRResult, type index_GitHubPRCommentEntry as GitHubPRCommentEntry, type index_GitHubPRCommentsResult as GitHubPRCommentsResult, type index_GitHubPRFilesResult as GitHubPRFilesResult, type index_GitHubReadFileResult as GitHubReadFileResult, type index_GitHubRepository as GitHubRepository, type index_GitHubSearchCodeResult as GitHubSearchCodeResult, type index_GitHubSearchFilesResult as GitHubSearchFilesResult, type index_GlobResult as GlobResult, type index_GrepMatch as GrepMatch, type index_GrepResult as GrepResult, type index_IDesktopDriver as IDesktopDriver, type index_IDocumentTransformer as IDocumentTransformer, type index_IFormatHandler as IFormatHandler, type IMediaStorage as IMediaOutputHandler, type index_ImageFilterOptions as ImageFilterOptions, type MediaStorageMetadata as MediaOutputMetadata, type MediaStorageResult as MediaOutputResult, type index_MouseButton as MouseButton, index_NutTreeDriver as NutTreeDriver, type index_ReadFileResult as ReadFileResult, type index_SearchResult as SearchResult, type index_ServiceToolFactory as ServiceToolFactory, type index_ShellToolConfig as ShellToolConfig, type index_ToolCategory as ToolCategory, index_ToolRegistry as ToolRegistry, type index_ToolRegistryEntry as ToolRegistryEntry, type index_WriteFileResult as WriteFileResult, index_applyHumanDelay as applyHumanDelay, index_bash as bash, index_createBashTool as createBashTool, index_createCreatePRTool as createCreatePRTool, index_createDesktopGetCursorTool as createDesktopGetCursorTool, index_createDesktopGetScreenSizeTool as createDesktopGetScreenSizeTool, index_createDesktopKeyboardKeyTool as createDesktopKeyboardKeyTool, index_createDesktopKeyboardTypeTool as createDesktopKeyboardTypeTool, index_createDesktopMouseClickTool as createDesktopMouseClickTool, index_createDesktopMouseDragTool as createDesktopMouseDragTool, index_createDesktopMouseMoveTool as createDesktopMouseMoveTool, index_createDesktopMouseScrollTool as createDesktopMouseScrollTool, index_createDesktopScreenshotTool as createDesktopScreenshotTool, index_createDesktopWindowFocusTool as createDesktopWindowFocusTool, index_createDesktopWindowListTool as createDesktopWindowListTool, index_createEditFileTool as createEditFileTool, index_createExecuteJavaScriptTool as createExecuteJavaScriptTool, index_createGetPRTool as createGetPRTool, index_createGitHubReadFileTool as createGitHubReadFileTool, index_createGlobTool as createGlobTool, index_createGrepTool as createGrepTool, index_createImageGenerationTool as createImageGenerationTool, index_createListDirectoryTool as createListDirectoryTool, index_createPRCommentsTool as createPRCommentsTool, index_createPRFilesTool as createPRFilesTool, index_createReadFileTool as createReadFileTool, index_createSearchCodeTool as createSearchCodeTool, index_createSearchFilesTool as createSearchFilesTool, index_createSpeechToTextTool as createSpeechToTextTool, index_createTextToSpeechTool as createTextToSpeechTool, index_createVideoTools as createVideoTools, index_createWebScrapeTool as createWebScrapeTool, index_createWebSearchTool as createWebSearchTool, index_createWriteFileTool as createWriteFileTool, index_desktopGetCursor as desktopGetCursor, index_desktopGetScreenSize as desktopGetScreenSize, index_desktopKeyboardKey as desktopKeyboardKey, index_desktopKeyboardType as desktopKeyboardType, index_desktopMouseClick as desktopMouseClick, index_desktopMouseDrag as desktopMouseDrag, index_desktopMouseMove as desktopMouseMove, index_desktopMouseScroll as desktopMouseScroll, index_desktopScreenshot as desktopScreenshot, index_desktopTools as desktopTools, index_desktopWindowFocus as desktopWindowFocus, index_desktopWindowList as desktopWindowList, index_developerTools as developerTools, index_editFile as editFile, index_executeJavaScript as executeJavaScript, index_expandTilde as expandTilde, index_getAllBuiltInTools as getAllBuiltInTools, index_getBackgroundOutput as getBackgroundOutput, index_getDesktopDriver as getDesktopDriver, index_getMediaOutputHandler as getMediaOutputHandler, index_getMediaStorage as getMediaStorage, index_getToolByName as getToolByName, index_getToolCategories as getToolCategories, index_getToolRegistry as getToolRegistry, index_getToolsByCategory as getToolsByCategory, index_getToolsRequiringConnector as getToolsRequiringConnector, index_glob as glob, index_grep as grep, index_isBlockedCommand as isBlockedCommand, index_isExcludedExtension as isExcludedExtension, index_jsonManipulator as jsonManipulator, index_killBackgroundProcess as killBackgroundProcess, index_listDirectory as listDirectory, index_mergeTextPieces as mergeTextPieces, index_parseKeyCombo as parseKeyCombo, index_parseRepository as parseRepository, index_readFile as readFile, index_resetDefaultDriver as resetDefaultDriver, index_resolveRepository as resolveRepository, index_setMediaOutputHandler as setMediaOutputHandler, index_setMediaStorage as setMediaStorage, index_toolRegistry as toolRegistry, index_validatePath as validatePath, index_webFetch as webFetch, index_writeFile as writeFile };
12282
13180
  }
12283
13181
 
12284
13182
  /**
@@ -12333,4 +13231,4 @@ declare class ProviderConfigAgent {
12333
13231
  reset(): void;
12334
13232
  }
12335
13233
 
12336
- export { AGENT_DEFINITION_FORMAT_VERSION, AIError, APPROVAL_STATE_VERSION, Agent, type AgentConfig$1 as AgentConfig, AgentContextNextGen, type AgentContextNextGenConfig, type AgentDefinitionListOptions, type AgentDefinitionMetadata, type AgentDefinitionSummary, AgentEvents, type AgentMetrics, type AgentPermissionsConfig, AgentResponse, type AgentSessionConfig, type AgentState, type AgentStatus, type ApprovalCacheEntry, type ApprovalDecision, ApproximateTokenEstimator, AudioFormat, AuditEntry, type AuthTemplate, type AuthTemplateField, type BackoffConfig, type BackoffStrategyType, BaseMediaProvider, BasePluginNextGen, BaseProvider, type BaseProviderConfig$1 as BaseProviderConfig, type BaseProviderResponse, BaseTextProvider, type BashResult, type BeforeExecuteResult, BraveProvider, CONNECTOR_CONFIG_VERSION, CONTEXT_SESSION_FORMAT_VERSION, CheckpointManager, type CheckpointStrategy, CircuitBreaker, type CircuitBreakerConfig, type CircuitBreakerEvents, type CircuitBreakerMetrics, CircuitOpenError, type CircuitState, type ClipboardImageResult, type CompactionContext, type CompactionResult, Connector, ConnectorAccessContext, ConnectorAuth, ConnectorConfig, ConnectorConfigResult, ConnectorConfigStore, ConnectorFetchOptions, type ConnectorToolEntry, ConnectorTools, type ConnectorToolsOptions, ConsoleMetrics, type ConsolidationResult, Content, type ContextBudget$1 as ContextBudget, type ContextEvents, type ContextFeatures, type ContextManagerConfig, type ContextOverflowBudget, ContextOverflowError, type ContextSessionMetadata, type ContextSessionSummary, type ContextStorageListOptions, type ConversationMessage, type CreateConnectorOptions, DEFAULT_ALLOWLIST, DEFAULT_BACKOFF_CONFIG, DEFAULT_CHECKPOINT_STRATEGY, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_CONFIG, DEFAULT_CONTEXT_CONFIG, DEFAULT_FEATURES, DEFAULT_FILESYSTEM_CONFIG, DEFAULT_HISTORY_MANAGER_CONFIG, DEFAULT_PERMISSION_CONFIG, DEFAULT_RATE_LIMITER_CONFIG, DEFAULT_SHELL_CONFIG, type DefaultAllowlistedTool, DefaultCompactionStrategy, type DefaultCompactionStrategyConfig, DependencyCycleError, type DirectCallOptions, type EditFileResult, type ErrorContext, ErrorHandler, type ErrorHandlerConfig, type ErrorHandlerEvents, type EvictionStrategy, ExecutionContext, ExecutionMetrics, type ExtendedFetchOptions, type ExternalDependency, type ExternalDependencyEvents, ExternalDependencyHandler, type FetchedContent, FileAgentDefinitionStorage, type FileAgentDefinitionStorageConfig, FileConnectorStorage, type FileConnectorStorageConfig, FileContextStorage, type FileContextStorageConfig, FileMediaStorage as FileMediaOutputHandler, FileMediaStorage, type FileMediaStorageConfig, FilePersistentInstructionsStorage, type FilePersistentInstructionsStorageConfig, FileStorage, type FileStorageConfig, type FilesystemToolConfig, FrameworkLogger, FunctionToolDefinition, type GeneratedPlan, type GenericAPICallArgs, type GenericAPICallResult, type GenericAPIToolOptions, type GitHubCreatePRResult, type GitHubGetPRResult, type GitHubPRCommentEntry, type GitHubPRCommentsResult, type GitHubPRFilesResult, type GitHubReadFileResult, type GitHubRepository, type GitHubSearchCodeResult, type GitHubSearchFilesResult, type GlobResult, type GrepMatch, type GrepResult, type HTTPTransportConfig, type HistoryManagerEvents, type HistoryMessage, HistoryMode, HookConfig, type IAgentDefinitionStorage, type IAgentStateStorage, type IAgentStorage, type IAsyncDisposable, IBaseModelDescription, type ICapabilityProvider, type ICompactionStrategy, IConnectorAccessPolicy, type IConnectorConfigStorage, IConnectorRegistry, type IContextCompactor, type IContextComponent, type IContextPluginNextGen, type IContextStorage, type IContextStrategy, type IDisposable, type IHistoryManager, type IHistoryManagerConfig, type IHistoryStorage, IImageProvider, type IMCPClient, type IMediaStorage as IMediaOutputHandler, type IMediaStorage, type IMemoryStorage, type IPersistentInstructionsStorage, type IPlanStorage, IProvider, type IResearchSource, type ISTTModelDescription, type IScrapeProvider, type ISearchProvider, type ISpeechToTextProvider, type ITTSModelDescription, ITextProvider, type ITextToSpeechProvider, type ITokenEstimator$1 as ITokenEstimator, ITokenStorage, type IToolExecutionPipeline, type IToolExecutionPlugin, type IToolExecutor, type IVideoModelDescription, type IVideoProvider, type IVoiceInfo, type InContextEntry, type InContextMemoryConfig, InContextMemoryPluginNextGen, type InContextPriority, InMemoryAgentStateStorage, InMemoryHistoryStorage, InMemoryMetrics, InMemoryPlanStorage, InMemoryStorage, InputItem, type InstructionEntry, InvalidConfigError, InvalidToolArgumentsError, type JSONExtractionResult, LLMResponse, type LogEntry, type LogLevel, type LoggerConfig, LoggingPlugin, type LoggingPluginOptions, MCPClient, type MCPClientConnectionState, type MCPClientState, type MCPConfiguration, MCPConnectionError, MCPError, type MCPPrompt, type MCPPromptResult, MCPProtocolError, MCPRegistry, type MCPResource, type MCPResourceContent, MCPResourceError, type MCPServerCapabilities, type MCPServerConfig, MCPTimeoutError, type MCPTool, MCPToolError, type MCPToolResult, type MCPTransportType, type MediaStorageMetadata as MediaOutputMetadata, type MediaStorageResult as MediaOutputResult, type MediaStorageEntry, type MediaStorageListOptions, type MediaStorageMetadata, type MediaStorageResult, MemoryConnectorStorage, MemoryEntry, MemoryEvictionCompactor, MemoryIndex, MemoryPriority, MemoryScope, MemoryStorage, MessageBuilder, MessageRole, type MetricTags, type MetricsCollector, type MetricsCollectorType, ModelCapabilities, ModelNotSupportedError, type EvictionStrategy$1 as NextGenEvictionStrategy, NoOpMetrics, type OAuthConfig, type OAuthFlow, OAuthManager, OutputItem, type OversizedInputResult, ParallelTasksError, type PermissionCheckContext, type PermissionCheckResult, type PermissionManagerEvent, type PermissionScope, type PersistentInstructionsConfig, PersistentInstructionsPluginNextGen, type Plan, type PlanConcurrency, type PlanInput, type PlanStatus, PlanningAgent, type PlanningAgentConfig, type PluginConfigs, type PluginExecutionContext, type PreparedContext, ProviderAuthError, ProviderCapabilities, ProviderConfigAgent, ProviderContextLengthError, ProviderError, ProviderErrorMapper, ProviderNotFoundError, ProviderRateLimitError, RapidAPIProvider, RateLimitError, type RateLimiterConfig, type RateLimiterMetrics, type ReadFileResult, type FetchOptions as ResearchFetchOptions, type ResearchFinding, type ResearchPlan, type ResearchProgress, type ResearchQuery, type ResearchResult, type SearchOptions as ResearchSearchOptions, type SearchResponse as ResearchSearchResponse, type RiskLevel, SIMPLE_ICONS_CDN, type STTModelCapabilities, type STTOptions, type STTOutputFormat$1 as STTOutputFormat, type STTResponse, STT_MODELS, STT_MODEL_REGISTRY, ScopedConnectorRegistry, type ScrapeFeature, type ScrapeOptions, ScrapeProvider, type ScrapeProviderConfig, type ScrapeProviderFallbackConfig, type ScrapeResponse, type ScrapeResult, type SearchOptions$1 as SearchOptions, SearchProvider, type SearchProviderConfig, type SearchResponse$1 as SearchResponse, type SearchResult$1 as SearchResult, type SegmentTimestamp, type SerializedApprovalEntry, type SerializedApprovalState, type SerializedContextState, type SerializedHistoryState, type SerializedInContextMemoryState, type SerializedPersistentInstructionsState, type SerializedToolState, type SerializedWorkingMemoryState, SerperProvider, ServiceCategory, type ServiceToolFactory, type ShellToolConfig, type SimpleIcon, type SimpleVideoGenerateOptions, type SourceCapabilities, type SourceResult, SpeechToText, type SpeechToTextConfig, type StdioTransportConfig, type StoredAgentDefinition, type StoredAgentType, type StoredConnectorConfig, type StoredContextSession, type StoredToken, type StrategyInfo, StrategyRegistry, type StrategyRegistryEntry, StreamEvent, StreamEventType, StreamHelpers, StreamState, SummarizeCompactor, TERMINAL_TASK_STATUSES, type TTSModelCapabilities, type TTSOptions, type TTSResponse, TTS_MODELS, TTS_MODEL_REGISTRY, type Task, type AgentConfig as TaskAgentStateConfig, type TaskCondition, type TaskExecution, type TaskFailure, type TaskInput, type TaskStatus, TaskStatusForMemory, TaskTimeoutError, ToolContext as TaskToolContext, type TaskValidation, TaskValidationError, type TaskValidationResult, TavilyProvider, type TemplateCredentials, TextGenerateOptions, TextToSpeech, type TextToSpeechConfig, TokenBucketRateLimiter, type TokenContentType, Tool, ToolCall, type ToolCategory, type ToolCondition, ToolContext, ToolExecutionError, ToolExecutionPipeline, type ToolExecutionPipelineOptions, ToolFunction, ToolManager, type ToolManagerConfig, type ToolManagerEvent, type ToolManagerStats, type ToolMetadata, ToolNotFoundError, type ToolOptions, type ToolPermissionConfig, ToolPermissionManager, type ToolRegistration, ToolRegistry, type ToolRegistryEntry, ToolResult, type ToolSelectionContext, ToolTimeoutError, type TransportConfig, TruncateCompactor, VENDOR_ICON_MAP, VIDEO_MODELS, VIDEO_MODEL_REGISTRY, Vendor, type VendorInfo, type VendorLogo, VendorOptionSchema, type VendorRegistryEntry, type VendorTemplate, type VideoExtendOptions, type VideoGenerateOptions, VideoGeneration, type VideoGenerationCreateOptions, type VideoJob, type VideoModelCapabilities, type VideoModelPricing, type VideoResponse, type VideoStatus, type WordTimestamp, WorkingMemory, WorkingMemoryAccess, WorkingMemoryConfig, type WorkingMemoryEvents, type WorkingMemoryPluginConfig, WorkingMemoryPluginNextGen, type WriteFileResult, addJitter, allVendorTemplates, assertNotDestroyed, authenticatedFetch, backoffSequence, backoffWait, bash, buildAuthConfig, buildEndpointWithQuery, buildQueryString, calculateBackoff, calculateSTTCost, calculateTTSCost, calculateVideoCost, canTaskExecute, createAgentStorage, createAuthenticatedFetch, createBashTool, createConnectorFromTemplate, createCreatePRTool, createEditFileTool, createEstimator, createExecuteJavaScriptTool, createFileAgentDefinitionStorage, createFileContextStorage, createFileMediaStorage, createGetPRTool, createGitHubReadFileTool, createGlobTool, createGrepTool, createImageGenerationTool, createImageProvider, createListDirectoryTool, createMessageWithImages, createMetricsCollector, createPRCommentsTool, createPRFilesTool, createPlan, createProvider, createReadFileTool, createSearchCodeTool, createSearchFilesTool, createSpeechToTextTool, createTask, createTextMessage, createTextToSpeechTool, createVideoProvider, createVideoTools, createWriteFileTool, detectDependencyCycle, developerTools, editFile, evaluateCondition, extractJSON, extractJSONField, extractNumber, findConnectorByServiceTypes, generateEncryptionKey, generateSimplePlan, generateWebAPITool, getActiveSTTModels, getActiveTTSModels, getActiveVideoModels, getAllBuiltInTools, getAllVendorLogos, getAllVendorTemplates, getBackgroundOutput, getConnectorTools, getCredentialsSetupURL, getDocsURL, getMediaOutputHandler, getMediaStorage, getNextExecutableTasks, getRegisteredScrapeProviders, getSTTModelInfo, getSTTModelsByVendor, getSTTModelsWithFeature, getTTSModelInfo, getTTSModelsByVendor, getTTSModelsWithFeature, getTaskDependencies, getToolByName, getToolCategories, getToolRegistry, getToolsByCategory, getToolsRequiringConnector, getVendorAuthTemplate, getVendorColor, getVendorDefaultBaseURL, getVendorInfo, getVendorLogo, getVendorLogoCdnUrl, getVendorLogoSvg, getVendorTemplate, getVideoModelInfo, getVideoModelsByVendor, getVideoModelsWithAudio, getVideoModelsWithFeature, glob, globalErrorHandler, grep, hasClipboardImage, hasVendorLogo, isBlockedCommand, isExcludedExtension, isTaskBlocked, isTerminalStatus, killBackgroundProcess, listConnectorsByServiceTypes, listDirectory, listVendorIds, listVendors, listVendorsByAuthType, listVendorsByCategory, listVendorsWithLogos, logger, metrics, parseRepository, readClipboardImage, readFile, registerScrapeProvider, resolveConnector, resolveDependencies, resolveRepository, retryWithBackoff, setMediaOutputHandler, setMediaStorage, setMetricsCollector, simpleTokenEstimator, toConnectorOptions, toolRegistry, index as tools, updateTaskStatus, validatePath, writeFile };
13234
+ export { AGENT_DEFINITION_FORMAT_VERSION, AIError, APPROVAL_STATE_VERSION, Agent, type AgentConfig$1 as AgentConfig, AgentContextNextGen, type AgentContextNextGenConfig, type AgentDefinitionListOptions, type AgentDefinitionMetadata, type AgentDefinitionSummary, AgentEvents, type AgentMetrics, type AgentPermissionsConfig, AgentResponse, type AgentSessionConfig, type AgentState, type AgentStatus, type ApprovalCacheEntry, type ApprovalDecision, ApproximateTokenEstimator, AudioFormat, AuditEntry, type AuthTemplate, type AuthTemplateField, type BackoffConfig, type BackoffStrategyType, BaseMediaProvider, BasePluginNextGen, BaseProvider, type BaseProviderConfig$1 as BaseProviderConfig, type BaseProviderResponse, BaseTextProvider, type BashResult, type BeforeExecuteResult, BraveProvider, CONNECTOR_CONFIG_VERSION, CONTEXT_SESSION_FORMAT_VERSION, CheckpointManager, type CheckpointStrategy, CircuitBreaker, type CircuitBreakerConfig, type CircuitBreakerEvents, type CircuitBreakerMetrics, CircuitOpenError, type CircuitState, type ClipboardImageResult, type CompactionContext, type CompactionResult, Connector, ConnectorAccessContext, ConnectorAuth, ConnectorConfig, ConnectorConfigResult, ConnectorConfigStore, ConnectorFetchOptions, type ConnectorToolEntry, ConnectorTools, type ConnectorToolsOptions, ConsoleMetrics, type ConsolidationResult, Content, type ContextBudget$1 as ContextBudget, type ContextEvents, type ContextFeatures, type ContextManagerConfig, type ContextOverflowBudget, ContextOverflowError, type ContextSessionMetadata, type ContextSessionSummary, type ContextStorageListOptions, type ConversationMessage, type CreateConnectorOptions, DEFAULT_ALLOWLIST, DEFAULT_BACKOFF_CONFIG, DEFAULT_CHECKPOINT_STRATEGY, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_CONFIG, DEFAULT_CONTEXT_CONFIG, DEFAULT_DESKTOP_CONFIG, DEFAULT_FEATURES, DEFAULT_FILESYSTEM_CONFIG, DEFAULT_HISTORY_MANAGER_CONFIG, DEFAULT_PERMISSION_CONFIG, DEFAULT_RATE_LIMITER_CONFIG, DEFAULT_SHELL_CONFIG, DESKTOP_TOOL_NAMES, type DefaultAllowlistedTool, DefaultCompactionStrategy, type DefaultCompactionStrategyConfig, DependencyCycleError, type DesktopGetCursorResult, type DesktopGetScreenSizeResult, type DesktopKeyboardKeyArgs, type DesktopKeyboardKeyResult, type DesktopKeyboardTypeArgs, type DesktopKeyboardTypeResult, type DesktopMouseClickArgs, type DesktopMouseClickResult, type DesktopMouseDragArgs, type DesktopMouseDragResult, type DesktopMouseMoveArgs, type DesktopMouseMoveResult, type DesktopMouseScrollArgs, type DesktopMouseScrollResult, type DesktopPoint, type DesktopScreenSize, type DesktopScreenshot, type DesktopScreenshotArgs, type DesktopScreenshotResult, type DesktopToolConfig, type DesktopToolName, type DesktopWindow, type DesktopWindowFocusArgs, type DesktopWindowFocusResult, type DesktopWindowListResult, type DirectCallOptions, type DocumentFamily, type DocumentFormat, type DocumentImagePiece, type DocumentMetadata, type DocumentPiece, type DocumentReadOptions, DocumentReader, type DocumentReaderConfig, type DocumentResult, type DocumentSource, type DocumentTextPiece, type DocumentToContentOptions, type EditFileResult, type ErrorContext, ErrorHandler, type ErrorHandlerConfig, type ErrorHandlerEvents, type EvictionStrategy, ExecutionContext, ExecutionMetrics, type ExtendedFetchOptions, type ExternalDependency, type ExternalDependencyEvents, ExternalDependencyHandler, type FetchedContent, FileAgentDefinitionStorage, type FileAgentDefinitionStorageConfig, FileConnectorStorage, type FileConnectorStorageConfig, FileContextStorage, type FileContextStorageConfig, FileMediaStorage as FileMediaOutputHandler, FileMediaStorage, type FileMediaStorageConfig, FilePersistentInstructionsStorage, type FilePersistentInstructionsStorageConfig, FileStorage, type FileStorageConfig, type FilesystemToolConfig, type FormatDetectionResult, FormatDetector, FrameworkLogger, FunctionToolDefinition, type GeneratedPlan, type GenericAPICallArgs, type GenericAPICallResult, type GenericAPIToolOptions, type GitHubCreatePRResult, type GitHubGetPRResult, type GitHubPRCommentEntry, type GitHubPRCommentsResult, type GitHubPRFilesResult, type GitHubReadFileResult, type GitHubRepository, type GitHubSearchCodeResult, type GitHubSearchFilesResult, type GlobResult, type GrepMatch, type GrepResult, type HTTPTransportConfig, type HistoryManagerEvents, type HistoryMessage, HistoryMode, HookConfig, type IAgentDefinitionStorage, type IAgentStateStorage, type IAgentStorage, type IAsyncDisposable, IBaseModelDescription, type ICapabilityProvider, type ICompactionStrategy, IConnectorAccessPolicy, type IConnectorConfigStorage, IConnectorRegistry, type IContextCompactor, type IContextComponent, type IContextPluginNextGen, type IContextStorage, type IContextStrategy, type IDesktopDriver, type IDisposable, type IDocumentTransformer, type IFormatHandler, type IHistoryManager, type IHistoryManagerConfig, type IHistoryStorage, IImageProvider, type IMCPClient, type IMediaStorage as IMediaOutputHandler, type IMediaStorage, type IMemoryStorage, type IPersistentInstructionsStorage, type IPlanStorage, IProvider, type IResearchSource, type ISTTModelDescription, type IScrapeProvider, type ISearchProvider, type ISpeechToTextProvider, type ITTSModelDescription, ITextProvider, type ITextToSpeechProvider, type ITokenEstimator$1 as ITokenEstimator, ITokenStorage, type IToolExecutionPipeline, type IToolExecutionPlugin, type IToolExecutor, type IVideoModelDescription, type IVideoProvider, type IVoiceInfo, type ImageFilterOptions, type InContextEntry, type InContextMemoryConfig, InContextMemoryPluginNextGen, type InContextPriority, InMemoryAgentStateStorage, InMemoryHistoryStorage, InMemoryMetrics, InMemoryPlanStorage, InMemoryStorage, InputItem, type InstructionEntry, InvalidConfigError, InvalidToolArgumentsError, type JSONExtractionResult, LLMResponse, type LogEntry, type LogLevel, type LoggerConfig, LoggingPlugin, type LoggingPluginOptions, MCPClient, type MCPClientConnectionState, type MCPClientState, type MCPConfiguration, MCPConnectionError, MCPError, type MCPPrompt, type MCPPromptResult, MCPProtocolError, MCPRegistry, type MCPResource, type MCPResourceContent, MCPResourceError, type MCPServerCapabilities, type MCPServerConfig, MCPTimeoutError, type MCPTool, MCPToolError, type MCPToolResult, type MCPTransportType, type MediaStorageMetadata as MediaOutputMetadata, type MediaStorageResult as MediaOutputResult, type MediaStorageEntry, type MediaStorageListOptions, type MediaStorageMetadata, type MediaStorageResult, MemoryConnectorStorage, MemoryEntry, MemoryEvictionCompactor, MemoryIndex, MemoryPriority, MemoryScope, MemoryStorage, MessageBuilder, MessageRole, type MetricTags, type MetricsCollector, type MetricsCollectorType, ModelCapabilities, ModelNotSupportedError, type MouseButton, type EvictionStrategy$1 as NextGenEvictionStrategy, NoOpMetrics, NutTreeDriver, type OAuthConfig, type OAuthFlow, OAuthManager, OutputItem, type OversizedInputResult, ParallelTasksError, type PermissionCheckContext, type PermissionCheckResult, type PermissionManagerEvent, type PermissionScope, type PersistentInstructionsConfig, PersistentInstructionsPluginNextGen, type PieceMetadata, type Plan, type PlanConcurrency, type PlanInput, type PlanStatus, PlanningAgent, type PlanningAgentConfig, type PluginConfigs, type PluginExecutionContext, type PreparedContext, ProviderAuthError, ProviderCapabilities, ProviderConfigAgent, ProviderContextLengthError, ProviderError, ProviderErrorMapper, ProviderNotFoundError, ProviderRateLimitError, RapidAPIProvider, RateLimitError, type RateLimiterConfig, type RateLimiterMetrics, type ReadFileResult, type FetchOptions as ResearchFetchOptions, type ResearchFinding, type ResearchPlan, type ResearchProgress, type ResearchQuery, type ResearchResult, type SearchOptions as ResearchSearchOptions, type SearchResponse as ResearchSearchResponse, type RiskLevel, SIMPLE_ICONS_CDN, type STTModelCapabilities, type STTOptions, type STTOutputFormat$1 as STTOutputFormat, type STTResponse, STT_MODELS, STT_MODEL_REGISTRY, ScopedConnectorRegistry, type ScrapeFeature, type ScrapeOptions, ScrapeProvider, type ScrapeProviderConfig, type ScrapeProviderFallbackConfig, type ScrapeResponse, type ScrapeResult, type SearchOptions$1 as SearchOptions, SearchProvider, type SearchProviderConfig, type SearchResponse$1 as SearchResponse, type SearchResult, type SegmentTimestamp, type SerializedApprovalEntry, type SerializedApprovalState, type SerializedContextState, type SerializedHistoryState, type SerializedInContextMemoryState, type SerializedPersistentInstructionsState, type SerializedToolState, type SerializedWorkingMemoryState, SerperProvider, ServiceCategory, type ServiceToolFactory, type ShellToolConfig, type SimpleIcon, type SimpleVideoGenerateOptions, type SourceCapabilities, type SourceResult, SpeechToText, type SpeechToTextConfig, type StdioTransportConfig, type StoredAgentDefinition, type StoredAgentType, type StoredConnectorConfig, type StoredContextSession, type StoredToken, type StrategyInfo, StrategyRegistry, type StrategyRegistryEntry, StreamEvent, StreamEventType, StreamHelpers, StreamState, SummarizeCompactor, TERMINAL_TASK_STATUSES, type TTSModelCapabilities, type TTSOptions, type TTSResponse, TTS_MODELS, TTS_MODEL_REGISTRY, type Task, type AgentConfig as TaskAgentStateConfig, type TaskCondition, type TaskExecution, type TaskFailure, type TaskInput, type TaskStatus, TaskStatusForMemory, TaskTimeoutError, ToolContext as TaskToolContext, type TaskValidation, TaskValidationError, type TaskValidationResult, TavilyProvider, type TemplateCredentials, TextGenerateOptions, TextToSpeech, type TextToSpeechConfig, TokenBucketRateLimiter, type TokenContentType, Tool, ToolCall, type ToolCategory, type ToolCondition, ToolContext, ToolExecutionError, ToolExecutionPipeline, type ToolExecutionPipelineOptions, ToolFunction, ToolManager, type ToolManagerConfig, type ToolManagerEvent, type ToolManagerStats, type ToolMetadata, ToolNotFoundError, type ToolOptions, type ToolPermissionConfig, ToolPermissionManager, type ToolRegistration, ToolRegistry, type ToolRegistryEntry, ToolResult, type ToolSelectionContext, ToolTimeoutError, type TransportConfig, TruncateCompactor, VENDOR_ICON_MAP, VIDEO_MODELS, VIDEO_MODEL_REGISTRY, Vendor, type VendorInfo, type VendorLogo, VendorOptionSchema, type VendorRegistryEntry, type VendorTemplate, type VideoExtendOptions, type VideoGenerateOptions, VideoGeneration, type VideoGenerationCreateOptions, type VideoJob, type VideoModelCapabilities, type VideoModelPricing, type VideoResponse, type VideoStatus, type WordTimestamp, WorkingMemory, WorkingMemoryAccess, WorkingMemoryConfig, type WorkingMemoryEvents, type WorkingMemoryPluginConfig, WorkingMemoryPluginNextGen, type WriteFileResult, addJitter, allVendorTemplates, assertNotDestroyed, authenticatedFetch, backoffSequence, backoffWait, bash, buildAuthConfig, buildEndpointWithQuery, buildQueryString, calculateBackoff, calculateSTTCost, calculateTTSCost, calculateVideoCost, canTaskExecute, createAgentStorage, createAuthenticatedFetch, createBashTool, createConnectorFromTemplate, createCreatePRTool, createDesktopGetCursorTool, createDesktopGetScreenSizeTool, createDesktopKeyboardKeyTool, createDesktopKeyboardTypeTool, createDesktopMouseClickTool, createDesktopMouseDragTool, createDesktopMouseMoveTool, createDesktopMouseScrollTool, createDesktopScreenshotTool, createDesktopWindowFocusTool, createDesktopWindowListTool, createEditFileTool, createEstimator, createExecuteJavaScriptTool, createFileAgentDefinitionStorage, createFileContextStorage, createFileMediaStorage, createGetPRTool, createGitHubReadFileTool, createGlobTool, createGrepTool, createImageGenerationTool, createImageProvider, createListDirectoryTool, createMessageWithImages, createMetricsCollector, createPRCommentsTool, createPRFilesTool, createPlan, createProvider, createReadFileTool, createSearchCodeTool, createSearchFilesTool, createSpeechToTextTool, createTask, createTextMessage, createTextToSpeechTool, createVideoProvider, createVideoTools, createWriteFileTool, desktopGetCursor, desktopGetScreenSize, desktopKeyboardKey, desktopKeyboardType, desktopMouseClick, desktopMouseDrag, desktopMouseMove, desktopMouseScroll, desktopScreenshot, desktopTools, desktopWindowFocus, desktopWindowList, detectDependencyCycle, developerTools, documentToContent, editFile, evaluateCondition, extractJSON, extractJSONField, extractNumber, findConnectorByServiceTypes, generateEncryptionKey, generateSimplePlan, generateWebAPITool, getActiveSTTModels, getActiveTTSModels, getActiveVideoModels, getAllBuiltInTools, getAllVendorLogos, getAllVendorTemplates, getBackgroundOutput, getConnectorTools, getCredentialsSetupURL, getDesktopDriver, getDocsURL, getMediaOutputHandler, getMediaStorage, getNextExecutableTasks, getRegisteredScrapeProviders, getSTTModelInfo, getSTTModelsByVendor, getSTTModelsWithFeature, getTTSModelInfo, getTTSModelsByVendor, getTTSModelsWithFeature, getTaskDependencies, getToolByName, getToolCategories, getToolRegistry, getToolsByCategory, getToolsRequiringConnector, getVendorAuthTemplate, getVendorColor, getVendorDefaultBaseURL, getVendorInfo, getVendorLogo, getVendorLogoCdnUrl, getVendorLogoSvg, getVendorTemplate, getVideoModelInfo, getVideoModelsByVendor, getVideoModelsWithAudio, getVideoModelsWithFeature, glob, globalErrorHandler, grep, hasClipboardImage, hasVendorLogo, isBlockedCommand, isExcludedExtension, isTaskBlocked, isTerminalStatus, killBackgroundProcess, listConnectorsByServiceTypes, listDirectory, listVendorIds, listVendors, listVendorsByAuthType, listVendorsByCategory, listVendorsWithLogos, logger, mergeTextPieces, metrics, parseKeyCombo, parseRepository, readClipboardImage, readDocumentAsContent, readFile, registerScrapeProvider, resetDefaultDriver, resolveConnector, resolveDependencies, resolveRepository, retryWithBackoff, setMediaOutputHandler, setMediaStorage, setMetricsCollector, simpleTokenEstimator, toConnectorOptions, toolRegistry, index as tools, updateTaskStatus, validatePath, writeFile };