@everworker/oneringai 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { I as IConnectorRegistry, a as IConnectorAccessPolicy, C as ConnectorAccessContext, b as Connector, c as ConnectorConfig, d as ITokenStorage, e as IProvider, f as ConnectorFetchOptions, P as ProviderCapabilities, S as StoredToken$1, g as ConnectorAuth, h as ConnectorConfigResult } from './IProvider-Br817mKc.cjs';
2
2
  export { A as APIKeyConnectorAuth, D as DEFAULT_BASE_DELAY_MS, i as DEFAULT_CONNECTOR_TIMEOUT, j as DEFAULT_MAX_DELAY_MS, k as DEFAULT_MAX_RETRIES, l as DEFAULT_RETRYABLE_STATUSES, J as JWTConnectorAuth, O as OAuthConnectorAuth } from './IProvider-Br817mKc.cjs';
3
- import { I as InputItem, T as ToolFunction, M as MemoryEntry, a as MemoryScope, b as Tool, c as ToolContext, d as ToolPermissionConfig$1, e as ToolCall, 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-WlQwiNF8.cjs';
4
- export { x as AfterToolContext, y as AgentEventName, z as AgenticLoopEventName, B as AgenticLoopEvents, D as ApprovalResult, G as ApproveToolContext, J as BeforeToolContext, K as BuiltInTool, N as CompactionItem, Q as ContentType, R as DEFAULT_MEMORY_CONFIG, U as ErrorEvent, V as ExecutionConfig, X as Hook, Y as HookManager, Z as HookName, _ as InputImageContent, $ as InputTextContent, a0 as IterationCompleteEvent, a1 as JSONSchema, a2 as MEMORY_PRIORITY_VALUES, a3 as MemoryEntryInput, a4 as MemoryIndexEntry, a5 as Message, a6 as ModifyingHook, a7 as OutputTextContent, a8 as OutputTextDeltaEvent, a9 as OutputTextDoneEvent, aa as ReasoningItem, ab as ResponseCompleteEvent, ac as ResponseCreatedEvent, ad as ResponseInProgressEvent, ae as SimpleScope, af as TaskAwareScope, ag as ToolCallArgumentsDeltaEvent, ah as ToolCallArgumentsDoneEvent, ai as ToolCallStartEvent, aj as ToolCallState, ak as ToolExecutionContext, al as ToolExecutionDoneEvent, am as ToolExecutionStartEvent, an as ToolModification, ao as ToolResultContent, ap as ToolUseContent, aq as calculateEntrySize, ar as defaultDescribeCall, as as forPlan, at as forTasks, au as getToolCallDescription, av as isErrorEvent, aw as isOutputTextDelta, ax as isResponseComplete, ay as isSimpleScope, az as isStreamEvent, aA as isTaskAwareScope, aB as isTerminalMemoryStatus, aC as isToolCallArgumentsDelta, aD as isToolCallArgumentsDone, aE as isToolCallStart, aF as scopeEquals, aG as scopeMatches } from './index-WlQwiNF8.cjs';
3
+ import { I as InputItem, T as ToolFunction, M as MemoryEntry, a as MemoryScope, b as Tool, c as ToolContext, d as ToolPermissionConfig$1, e as ToolCall, 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 HookName, o as StaleEntryInfo, p as PriorityContext, q as MemoryIndex, r as TaskStatusForMemory, s as WorkingMemoryAccess, t as TokenUsage, u as StreamEventType, v as TextGenerateOptions, w as ModelCapabilities, x as MessageRole } from './index-CR5PHkck.cjs';
4
+ export { y as AfterToolContext, z as AgentEventName, B as AgenticLoopEventName, D as AgenticLoopEvents, G as ApprovalResult, J as ApproveToolContext, K as BeforeToolContext, N as BuiltInTool, Q as CompactionItem, R as ContentType, U as DEFAULT_MEMORY_CONFIG, V as ErrorEvent, X as ExecutionConfig, Y as Hook, Z as HookManager, _ as InputImageContent, $ as InputTextContent, a0 as IterationCompleteEvent, a1 as JSONSchema, a2 as MEMORY_PRIORITY_VALUES, a3 as MemoryEntryInput, a4 as MemoryIndexEntry, a5 as Message, a6 as ModifyingHook, a7 as OutputTextContent, a8 as OutputTextDeltaEvent, a9 as OutputTextDoneEvent, aa as ReasoningItem, ab as ResponseCompleteEvent, ac as ResponseCreatedEvent, ad as ResponseInProgressEvent, ae as SimpleScope, af as TaskAwareScope, ag as ToolCallArgumentsDeltaEvent, ah as ToolCallArgumentsDoneEvent, ai as ToolCallStartEvent, aj as ToolCallState, ak as ToolExecutionContext, al as ToolExecutionDoneEvent, am as ToolExecutionStartEvent, an as ToolModification, ao as ToolResultContent, ap as ToolUseContent, aq as calculateEntrySize, ar as defaultDescribeCall, as as forPlan, at as forTasks, au as getToolCallDescription, av as isErrorEvent, aw as isOutputTextDelta, ax as isResponseComplete, ay as isSimpleScope, az as isStreamEvent, aA as isTaskAwareScope, aB as isTerminalMemoryStatus, aC as isToolCallArgumentsDelta, aD as isToolCallArgumentsDone, aE as isToolCallStart, aF as scopeEquals, aG as scopeMatches } from './index-CR5PHkck.cjs';
5
5
  import { EventEmitter } from 'eventemitter3';
6
6
  import { V as Vendor } from './Vendor-DYh_bzwo.cjs';
7
7
  export { a as VENDORS, i as isVendor } from './Vendor-DYh_bzwo.cjs';
@@ -152,38 +152,55 @@ interface CustomToolListOptions {
152
152
  /**
153
153
  * Storage interface for custom tool definitions
154
154
  *
155
+ * Custom tools support optional per-user isolation for multi-tenant scenarios.
156
+ * When userId is not provided, defaults to 'default' user.
157
+ *
155
158
  * Implementations:
156
- * - FileCustomToolStorage: File-based storage at ~/.oneringai/custom-tools/
159
+ * - FileCustomToolStorage: File-based storage at ~/.oneringai/users/<userId>/custom-tools/
157
160
  */
158
161
  interface ICustomToolStorage {
159
162
  /**
160
163
  * Save a custom tool definition
164
+ * @param userId - Optional user ID for isolation (defaults to 'default')
165
+ * @param definition - Tool definition to save
161
166
  */
162
- save(definition: CustomToolDefinition): Promise<void>;
167
+ save(userId: string | undefined, definition: CustomToolDefinition): Promise<void>;
163
168
  /**
164
169
  * Load a custom tool definition by name
170
+ * @param userId - Optional user ID for isolation (defaults to 'default')
171
+ * @param name - Tool name
165
172
  */
166
- load(name: string): Promise<CustomToolDefinition | null>;
173
+ load(userId: string | undefined, name: string): Promise<CustomToolDefinition | null>;
167
174
  /**
168
175
  * Delete a custom tool definition by name
176
+ * @param userId - Optional user ID for isolation (defaults to 'default')
177
+ * @param name - Tool name
169
178
  */
170
- delete(name: string): Promise<void>;
179
+ delete(userId: string | undefined, name: string): Promise<void>;
171
180
  /**
172
181
  * Check if a custom tool exists
182
+ * @param userId - Optional user ID for isolation (defaults to 'default')
183
+ * @param name - Tool name
173
184
  */
174
- exists(name: string): Promise<boolean>;
185
+ exists(userId: string | undefined, name: string): Promise<boolean>;
175
186
  /**
176
187
  * List custom tools (summaries only)
188
+ * @param userId - Optional user ID for isolation (defaults to 'default')
189
+ * @param options - Filtering and pagination options
177
190
  */
178
- list(options?: CustomToolListOptions): Promise<CustomToolSummary[]>;
191
+ list(userId: string | undefined, options?: CustomToolListOptions): Promise<CustomToolSummary[]>;
179
192
  /**
180
193
  * Update metadata without loading full definition
194
+ * @param userId - Optional user ID for isolation (defaults to 'default')
195
+ * @param name - Tool name
196
+ * @param metadata - Metadata to update
181
197
  */
182
- updateMetadata?(name: string, metadata: Record<string, unknown>): Promise<void>;
198
+ updateMetadata?(userId: string | undefined, name: string, metadata: Record<string, unknown>): Promise<void>;
183
199
  /**
184
- * Get the storage path/location (for display/debugging)
200
+ * Get the storage path/location for a specific user (for display/debugging)
201
+ * @param userId - Optional user ID for isolation (defaults to 'default')
185
202
  */
186
- getPath(): string;
203
+ getPath(userId: string | undefined): string;
187
204
  }
188
205
 
189
206
  /**
@@ -869,6 +886,8 @@ interface ContextFeatures {
869
886
  inContextMemory?: boolean;
870
887
  /** Enable PersistentInstructions plugin (default: false) */
871
888
  persistentInstructions?: boolean;
889
+ /** Enable UserInfo plugin (default: false) */
890
+ userInfo?: boolean;
872
891
  }
873
892
  /**
874
893
  * Default feature configuration
@@ -896,6 +915,11 @@ interface PluginConfigs {
896
915
  * See PersistentInstructionsConfig for full options.
897
916
  */
898
917
  persistentInstructions?: Record<string, unknown>;
918
+ /**
919
+ * User info plugin config (used when features.userInfo=true).
920
+ * See UserInfoPluginConfig for full options.
921
+ */
922
+ userInfo?: Record<string, unknown>;
899
923
  }
900
924
  /**
901
925
  * AgentContextNextGen configuration
@@ -1460,409 +1484,943 @@ interface IMemoryStorage {
1460
1484
  }
1461
1485
 
1462
1486
  /**
1463
- * StorageRegistry - Centralized storage backend registry
1464
- *
1465
- * Provides a single point of configuration for all storage backends
1466
- * used across the library. Subsystems resolve their storage at execution
1467
- * time (not construction time) via `resolve()`, which lazily creates
1468
- * and caches a default when nothing has been configured.
1469
- *
1470
- * Storage types are split into two categories:
1471
- * - **Global singletons**: customTools, media, agentDefinitions, connectorConfig, oauthTokens
1472
- * - **Per-agent factories** (need agentId): sessions, persistentInstructions, workingMemory
1487
+ * IUserInfoStorage - Storage interface for user information
1473
1488
  *
1474
- * For multi-user / multi-tenant environments, factories receive an optional
1475
- * `StorageContext` (opaque, like `ConnectorAccessContext`) so backends can
1476
- * partition data by userId, tenantId, or any custom field.
1477
- *
1478
- * @example
1479
- * ```typescript
1480
- * import { StorageRegistry } from '@everworker/oneringai';
1481
- *
1482
- * // Single-tenant (simple)
1483
- * StorageRegistry.configure({
1484
- * customTools: new MongoCustomToolStorage(),
1485
- * media: new S3MediaStorage(),
1486
- * sessions: (agentId) => new RedisContextStorage(agentId),
1487
- * });
1489
+ * Abstracted storage interface following Clean Architecture principles.
1490
+ * Implementations can use file system, database, or any other storage backend.
1488
1491
  *
1489
- * // Multi-tenant
1490
- * StorageRegistry.configure({
1491
- * sessions: (agentId, ctx) => new RedisContextStorage(agentId, ctx?.userId),
1492
- * customTools: new MongoCustomToolStorage(), // global singletons are unaffected
1493
- * });
1494
- * ```
1492
+ * User information is stored per userId - each user has their own isolated data.
1495
1493
  */
1496
-
1497
1494
  /**
1498
- * Opaque context passed to per-agent storage factories.
1499
- *
1500
- * The library imposes no structure — consumers define their own shape
1501
- * (e.g., `{ userId: 'alice', tenantId: 'acme' }`).
1502
- *
1503
- * Mirrors the `ConnectorAccessContext` pattern used by `Connector.scoped()`.
1495
+ * A single user info entry, independently addressable by key.
1504
1496
  */
1505
- type StorageContext = Record<string, unknown>;
1497
+ interface UserInfoEntry {
1498
+ /** User-supplied key (e.g., "theme", "language") */
1499
+ id: string;
1500
+ /** Value (any JSON-serializable data) */
1501
+ value: unknown;
1502
+ /** Type of the value for display/debugging */
1503
+ valueType: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'null';
1504
+ /** Optional description for self-documentation */
1505
+ description?: string;
1506
+ /** Timestamp when entry was first created */
1507
+ createdAt: number;
1508
+ /** Timestamp when entry was last updated */
1509
+ updatedAt: number;
1510
+ }
1506
1511
  /**
1507
- * Storage configuration map.
1512
+ * Storage interface for user information
1508
1513
  *
1509
- * Global singletons are stored directly.
1510
- * Per-agent factories are functions that accept an agentId (and optional
1511
- * StorageContext for multi-tenant scenarios) and return a storage instance.
1514
+ * Implementations handle the actual storage mechanism while the plugin
1515
+ * handles the business logic.
1516
+ *
1517
+ * Design: Single storage instance handles ALL users. UserId is passed to
1518
+ * each method, allowing efficient multi-tenant storage.
1519
+ * When userId is undefined, defaults to 'default' user.
1512
1520
  */
1513
- interface StorageConfig {
1514
- media: IMediaStorage;
1515
- agentDefinitions: IAgentDefinitionStorage;
1516
- connectorConfig: IConnectorConfigStorage;
1517
- oauthTokens: ITokenStorage;
1518
- customTools: (context?: StorageContext) => ICustomToolStorage;
1519
- sessions: (agentId: string, context?: StorageContext) => IContextStorage;
1520
- persistentInstructions: (agentId: string, context?: StorageContext) => IPersistentInstructionsStorage;
1521
- workingMemory: (context?: StorageContext) => IMemoryStorage;
1522
- }
1523
- declare class StorageRegistry {
1524
- /** Internal storage map */
1525
- private static entries;
1526
- /** Default context passed to all factory calls (set via setContext) */
1527
- private static _context;
1521
+ interface IUserInfoStorage {
1528
1522
  /**
1529
- * Configure multiple storage backends at once.
1530
- *
1531
- * @example
1532
- * ```typescript
1533
- * // Single-tenant
1534
- * StorageRegistry.configure({
1535
- * customTools: new MongoCustomToolStorage(),
1536
- * sessions: (agentId) => new RedisContextStorage(agentId),
1537
- * });
1523
+ * Load user info entries from storage for a specific user
1538
1524
  *
1539
- * // Multi-tenant
1540
- * StorageRegistry.configure({
1541
- * sessions: (agentId, ctx) => new TenantContextStorage(agentId, ctx?.tenantId),
1542
- * persistentInstructions: (agentId, ctx) => new TenantInstructionsStorage(agentId, ctx?.userId),
1543
- * });
1544
- * ```
1525
+ * @param userId - Optional user ID for isolation (defaults to 'default')
1526
+ * @returns The stored user info entries, or null if none exist
1545
1527
  */
1546
- static configure(config: Partial<StorageConfig>): void;
1528
+ load(userId: string | undefined): Promise<UserInfoEntry[] | null>;
1547
1529
  /**
1548
- * Set the default StorageContext.
1549
- *
1550
- * This context is automatically passed to all per-agent factory calls
1551
- * (sessions, persistentInstructions, workingMemory) when no explicit
1552
- * context is provided. Typically set once at app startup with global
1553
- * tenant/environment info, or per-request in multi-tenant servers.
1554
- *
1555
- * @example
1556
- * ```typescript
1557
- * // Single-tenant app — set once at init
1558
- * StorageRegistry.setContext({ tenantId: 'acme', environment: 'production' });
1530
+ * Save user info entries to storage for a specific user
1559
1531
  *
1560
- * // Multi-tenant server set per-request
1561
- * app.use((req, res, next) => {
1562
- * StorageRegistry.setContext({ userId: req.user.id, tenantId: req.tenant.id });
1563
- * next();
1564
- * });
1565
- * ```
1566
- */
1567
- static setContext(context: StorageContext | undefined): void;
1568
- /**
1569
- * Get the current default StorageContext.
1570
- */
1571
- static getContext(): StorageContext | undefined;
1572
- /**
1573
- * Set a single storage backend.
1574
- */
1575
- static set<K extends keyof StorageConfig>(key: K, value: StorageConfig[K]): void;
1576
- /**
1577
- * Get a storage backend (or undefined if not configured).
1532
+ * @param userId - Optional user ID for isolation (defaults to 'default')
1533
+ * @param entries - The user info entries to save
1578
1534
  */
1579
- static get<K extends keyof StorageConfig>(key: K): StorageConfig[K] | undefined;
1535
+ save(userId: string | undefined, entries: UserInfoEntry[]): Promise<void>;
1580
1536
  /**
1581
- * Resolve a storage backend, lazily creating and caching a default if needed.
1537
+ * Delete user info from storage for a specific user
1582
1538
  *
1583
- * If a value has been configured via `set()` or `configure()`, returns that.
1584
- * Otherwise, calls `defaultFactory()`, caches the result, and returns it.
1539
+ * @param userId - Optional user ID for isolation (defaults to 'default')
1585
1540
  */
1586
- static resolve<K extends keyof StorageConfig>(key: K, defaultFactory: () => StorageConfig[K]): StorageConfig[K];
1541
+ delete(userId: string | undefined): Promise<void>;
1587
1542
  /**
1588
- * Check if a storage backend has been configured.
1543
+ * Check if user info exists in storage for a specific user
1544
+ *
1545
+ * @param userId - Optional user ID for isolation (defaults to 'default')
1546
+ * @returns true if user info exists
1589
1547
  */
1590
- static has(key: keyof StorageConfig): boolean;
1548
+ exists(userId: string | undefined): Promise<boolean>;
1591
1549
  /**
1592
- * Clear all configured storage backends and context.
1593
- * Useful for testing.
1550
+ * Get the storage path for a specific user (for display/debugging)
1551
+ *
1552
+ * @param userId - Optional user ID for isolation (defaults to 'default')
1553
+ * @returns Human-readable path to the storage location
1594
1554
  */
1595
- static reset(): void;
1555
+ getPath(userId: string | undefined): string;
1596
1556
  }
1597
1557
 
1598
1558
  /**
1599
- * Tool executor interface
1559
+ * Task and Plan entities for TaskAgent
1560
+ *
1561
+ * Defines the data structures for task-based autonomous agents.
1600
1562
  */
1601
-
1602
- interface IToolExecutor {
1603
- /**
1604
- * Execute a tool function
1605
- * @param toolName - Name of the tool to execute
1606
- * @param args - Parsed arguments object
1607
- * @returns Tool execution result
1608
- */
1609
- execute(toolName: string, args: any): Promise<any>;
1610
- /**
1611
- * Check if tool is available
1612
- */
1613
- hasToolFunction(toolName: string): boolean;
1614
- /**
1615
- * Get tool definition
1616
- */
1617
- getToolDefinition(toolName: string): Tool | undefined;
1618
- /**
1619
- * Register a new tool
1620
- */
1621
- registerTool(tool: ToolFunction): void;
1622
- /**
1623
- * Unregister a tool
1624
- */
1625
- unregisterTool(toolName: string): void;
1626
- /**
1627
- * List all registered tools
1628
- */
1629
- listTools(): string[];
1630
- }
1631
-
1632
1563
  /**
1633
- * Interface for objects that manage resources and need explicit cleanup.
1634
- *
1635
- * Implementing classes should release all resources (event listeners, timers,
1636
- * connections, etc.) when destroy() is called. After destruction, the instance
1637
- * should not be used.
1564
+ * Task status lifecycle
1638
1565
  */
1639
- interface IDisposable {
1640
- /**
1641
- * Releases all resources held by this instance.
1642
- *
1643
- * After calling destroy():
1644
- * - All event listeners should be removed
1645
- * - All timers/intervals should be cleared
1646
- * - All internal state should be cleaned up
1647
- * - The instance should not be reused
1648
- *
1649
- * Multiple calls to destroy() should be safe (idempotent).
1650
- */
1651
- destroy(): void;
1652
- /**
1653
- * Returns true if destroy() has been called.
1654
- * Methods should check this before performing operations.
1655
- */
1656
- readonly isDestroyed: boolean;
1657
- }
1566
+ type TaskStatus = 'pending' | 'blocked' | 'in_progress' | 'waiting_external' | 'completed' | 'failed' | 'skipped' | 'cancelled';
1658
1567
  /**
1659
- * Async version of IDisposable for resources requiring async cleanup.
1568
+ * Terminal statuses - task will not progress further
1660
1569
  */
1661
- interface IAsyncDisposable {
1662
- /**
1663
- * Asynchronously releases all resources held by this instance.
1664
- */
1665
- destroy(): Promise<void>;
1666
- /**
1667
- * Returns true if destroy() has been called.
1668
- */
1669
- readonly isDestroyed: boolean;
1670
- }
1570
+ declare const TERMINAL_TASK_STATUSES: TaskStatus[];
1671
1571
  /**
1672
- * Helper to check if an object is destroyed and throw if so.
1673
- * @param obj - The disposable object to check
1674
- * @param operation - Name of the operation being attempted
1572
+ * Check if a task status is terminal (task will not progress further)
1675
1573
  */
1676
- declare function assertNotDestroyed(obj: IDisposable | IAsyncDisposable, operation: string): void;
1677
-
1574
+ declare function isTerminalStatus(status: TaskStatus): boolean;
1678
1575
  /**
1679
- * Generic Circuit Breaker implementation
1680
- *
1681
- * Prevents cascading failures by failing fast when a system is down.
1682
- * Works for any async operation (LLM calls, tool execution, etc.)
1576
+ * Plan status
1683
1577
  */
1684
-
1578
+ type PlanStatus = 'pending' | 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled';
1685
1579
  /**
1686
- * Circuit breaker states
1580
+ * Condition operators for conditional task execution
1687
1581
  */
1688
- type CircuitState = 'closed' | 'open' | 'half-open';
1582
+ type ConditionOperator = 'exists' | 'not_exists' | 'equals' | 'contains' | 'truthy' | 'greater_than' | 'less_than';
1689
1583
  /**
1690
- * Circuit breaker configuration
1584
+ * Task condition - evaluated before execution
1691
1585
  */
1692
- interface CircuitBreakerConfig {
1693
- /** Number of failures before opening circuit */
1694
- failureThreshold: number;
1695
- /** Number of successes to close from half-open */
1696
- successThreshold: number;
1697
- /** Time to wait in open state before trying half-open (ms) */
1698
- resetTimeoutMs: number;
1699
- /** Time window for counting failures (ms) */
1700
- windowMs: number;
1701
- /** Classify errors - return true if error should count as failure */
1702
- isRetryable?: (error: Error) => boolean;
1586
+ interface TaskCondition {
1587
+ memoryKey: string;
1588
+ operator: ConditionOperator;
1589
+ value?: unknown;
1590
+ onFalse: 'skip' | 'fail' | 'wait';
1703
1591
  }
1704
1592
  /**
1705
- * Circuit breaker metrics
1593
+ * External dependency configuration
1706
1594
  */
1707
- interface CircuitBreakerMetrics {
1708
- name: string;
1709
- state: CircuitState;
1710
- totalRequests: number;
1711
- successCount: number;
1712
- failureCount: number;
1713
- rejectedCount: number;
1714
- recentFailures: number;
1715
- consecutiveSuccesses: number;
1716
- lastFailureTime?: number;
1717
- lastSuccessTime?: number;
1718
- lastStateChange: number;
1719
- nextRetryTime?: number;
1720
- failureRate: number;
1721
- successRate: number;
1722
- }
1723
- /**
1724
- * Circuit breaker events
1725
- */
1726
- interface CircuitBreakerEvents {
1727
- opened: {
1728
- name: string;
1729
- failureCount: number;
1730
- lastError: string;
1731
- nextRetryTime: number;
1732
- };
1733
- 'half-open': {
1734
- name: string;
1735
- timestamp: number;
1736
- };
1737
- closed: {
1738
- name: string;
1739
- successCount: number;
1740
- timestamp: number;
1595
+ interface ExternalDependency {
1596
+ type: 'webhook' | 'poll' | 'manual' | 'scheduled';
1597
+ /** For webhook: unique ID to match incoming webhook */
1598
+ webhookId?: string;
1599
+ /** For poll: how to check if complete */
1600
+ pollConfig?: {
1601
+ toolName: string;
1602
+ toolArgs: Record<string, unknown>;
1603
+ intervalMs: number;
1604
+ maxAttempts: number;
1741
1605
  };
1606
+ /** For scheduled: when to resume */
1607
+ scheduledAt?: number;
1608
+ /** For manual: description of what's needed */
1609
+ manualDescription?: string;
1610
+ /** Timeout for all types */
1611
+ timeoutMs?: number;
1612
+ /** Current state */
1613
+ state: 'waiting' | 'received' | 'timeout';
1614
+ /** Data received from external source */
1615
+ receivedData?: unknown;
1616
+ receivedAt?: number;
1742
1617
  }
1743
1618
  /**
1744
- * Default configuration
1745
- */
1746
- declare const DEFAULT_CIRCUIT_BREAKER_CONFIG: CircuitBreakerConfig;
1747
- /**
1748
- * Circuit breaker error - thrown when circuit is open
1749
- */
1750
- declare class CircuitOpenError extends Error {
1751
- readonly breakerName: string;
1752
- readonly nextRetryTime: number;
1753
- readonly failureCount: number;
1754
- readonly lastError: string;
1755
- constructor(breakerName: string, nextRetryTime: number, failureCount: number, lastError: string);
1756
- }
1757
- /**
1758
- * Generic circuit breaker for any async operation
1619
+ * Task execution settings
1759
1620
  */
1760
- declare class CircuitBreaker<T = any> extends EventEmitter<CircuitBreakerEvents> {
1761
- readonly name: string;
1762
- private state;
1763
- private config;
1764
- private failures;
1765
- private lastError;
1766
- private consecutiveSuccesses;
1767
- private openedAt?;
1768
- private lastStateChange;
1769
- private totalRequests;
1770
- private successCount;
1771
- private failureCount;
1772
- private rejectedCount;
1773
- private lastFailureTime?;
1774
- private lastSuccessTime?;
1775
- constructor(name: string, config?: Partial<CircuitBreakerConfig>);
1776
- /**
1777
- * Execute function with circuit breaker protection
1778
- */
1779
- execute(fn: () => Promise<T>): Promise<T>;
1621
+ interface TaskExecution {
1622
+ /** Can run in parallel with other parallel tasks */
1623
+ parallel?: boolean;
1624
+ /** Max concurrent if this spawns sub-work */
1625
+ maxConcurrency?: number;
1626
+ /** Priority (higher = executed first) */
1627
+ priority?: number;
1780
1628
  /**
1781
- * Record successful execution
1629
+ * Maximum LLM iterations (tool-call loops) per agent.run() for this task.
1630
+ * Prevents runaway agents. Default: 15.
1782
1631
  */
1783
- private recordSuccess;
1632
+ maxIterations?: number;
1784
1633
  /**
1785
- * Record failed execution
1634
+ * If true (default), re-check condition immediately before LLM call
1635
+ * to protect against race conditions when parallel tasks modify memory.
1636
+ * Set to false to skip re-check for performance if you know condition won't change.
1786
1637
  */
1787
- private recordFailure;
1638
+ raceProtection?: boolean;
1639
+ }
1640
+ /**
1641
+ * Task completion validation settings
1642
+ *
1643
+ * Used to verify that a task actually achieved its goal before marking it complete.
1644
+ * Supports multiple validation approaches:
1645
+ * - Programmatic checks (memory keys, hooks)
1646
+ * - LLM self-reflection with completeness scoring
1647
+ * - Natural language criteria evaluation
1648
+ */
1649
+ interface TaskValidation {
1788
1650
  /**
1789
- * Transition to new state
1651
+ * Natural language completion criteria.
1652
+ * These are evaluated by LLM self-reflection to determine if the task is complete.
1653
+ * Examples:
1654
+ * - "The response contains at least 3 specific examples"
1655
+ * - "User's email has been validated and stored in memory"
1656
+ * - "All requested data fields are present in the output"
1657
+ *
1658
+ * This is the RECOMMENDED approach for flexible, intelligent validation.
1790
1659
  */
1791
- private transitionTo;
1660
+ completionCriteria?: string[];
1792
1661
  /**
1793
- * Remove failures outside the time window
1662
+ * Minimum completeness score (0-100) to consider task successful.
1663
+ * LLM self-reflection returns a score; if below this threshold:
1664
+ * - If requireUserApproval is set, ask user
1665
+ * - Otherwise, follow the mode setting (strict = fail, warn = continue)
1666
+ * Default: 80
1794
1667
  */
1795
- private pruneOldFailures;
1668
+ minCompletionScore?: number;
1796
1669
  /**
1797
- * Get current state
1670
+ * When to require user approval:
1671
+ * - 'never': Never ask user, use automated decision (default)
1672
+ * - 'uncertain': Ask user when score is between minCompletionScore and minCompletionScore + 15
1673
+ * - 'always': Always ask user to confirm task completion
1798
1674
  */
1799
- getState(): CircuitState;
1675
+ requireUserApproval?: 'never' | 'uncertain' | 'always';
1800
1676
  /**
1801
- * Get current metrics
1677
+ * Memory keys that must exist after task completion.
1678
+ * If the task should store data in memory, list the required keys here.
1679
+ * This is a hard requirement checked BEFORE LLM reflection.
1802
1680
  */
1803
- getMetrics(): CircuitBreakerMetrics;
1681
+ requiredMemoryKeys?: string[];
1804
1682
  /**
1805
- * Manually reset circuit breaker (force close)
1683
+ * Custom validation function name (registered via validateTask hook).
1684
+ * The hook will be called with this identifier to dispatch to the right validator.
1685
+ * Runs AFTER LLM reflection, can override the result.
1806
1686
  */
1807
- reset(): void;
1687
+ customValidator?: string;
1808
1688
  /**
1809
- * Check if circuit is allowing requests
1689
+ * Validation mode:
1690
+ * - 'strict': Validation failure marks task as failed (default)
1691
+ * - 'warn': Validation failure logs warning but task still completes
1810
1692
  */
1811
- isOpen(): boolean;
1693
+ mode?: 'strict' | 'warn';
1812
1694
  /**
1813
- * Get configuration
1695
+ * Skip LLM self-reflection validation.
1696
+ * LLM validation is opt-in: set to `false` to enable it (requires completionCriteria).
1697
+ * Default: undefined (treated as true — validation auto-passes).
1814
1698
  */
1815
- getConfig(): CircuitBreakerConfig;
1699
+ skipReflection?: boolean;
1816
1700
  }
1817
-
1818
1701
  /**
1819
- * Tool Execution Plugin System Types
1820
- *
1821
- * Provides a pluggable architecture for extending tool execution with
1822
- * custom behavior like logging, analytics, permission prompts, UI updates, etc.
1823
- *
1824
- * @module tool-execution
1702
+ * Result of task validation (returned by LLM reflection)
1825
1703
  */
1826
-
1704
+ interface TaskValidationResult {
1705
+ /** Whether the task is considered complete */
1706
+ isComplete: boolean;
1707
+ /** Completeness score from 0-100 */
1708
+ completionScore: number;
1709
+ /** LLM's explanation of why the task is/isn't complete */
1710
+ explanation: string;
1711
+ /** Per-criterion evaluation results */
1712
+ criteriaResults?: Array<{
1713
+ criterion: string;
1714
+ met: boolean;
1715
+ evidence?: string;
1716
+ }>;
1717
+ /** Whether user approval is needed */
1718
+ requiresUserApproval: boolean;
1719
+ /** Reason for requiring user approval */
1720
+ approvalReason?: string;
1721
+ }
1827
1722
  /**
1828
- * Context passed through the execution pipeline.
1829
- * Contains all information about the current tool execution.
1723
+ * A single unit of work
1830
1724
  */
1831
- interface PluginExecutionContext {
1832
- /** Name of the tool being executed */
1833
- toolName: string;
1834
- /** Original arguments passed to the tool (immutable) */
1835
- readonly args: unknown;
1836
- /** Mutable arguments that plugins can modify */
1837
- mutableArgs: unknown;
1838
- /** Metadata for passing data between plugins */
1839
- metadata: Map<string, unknown>;
1840
- /** Timestamp when execution started (ms since epoch) */
1841
- startTime: number;
1842
- /** The tool function being executed */
1843
- tool: ToolFunction;
1844
- /** Unique execution ID for tracing */
1845
- executionId: string;
1725
+ interface Task {
1726
+ id: string;
1727
+ name: string;
1728
+ description: string;
1729
+ status: TaskStatus;
1730
+ /** Tasks that must complete before this one (task IDs) */
1731
+ dependsOn: string[];
1732
+ /** External dependency (if waiting on external event) */
1733
+ externalDependency?: ExternalDependency;
1734
+ /** Condition for execution */
1735
+ condition?: TaskCondition;
1736
+ /** Execution settings */
1737
+ execution?: TaskExecution;
1738
+ /** Completion validation settings */
1739
+ validation?: TaskValidation;
1740
+ /** Tool names the LLM should prefer for this task (advisory, not enforced) */
1741
+ suggestedTools?: string[];
1742
+ /** Optional expected output description */
1743
+ expectedOutput?: string;
1744
+ /** Result after completion */
1745
+ result?: {
1746
+ success: boolean;
1747
+ output?: unknown;
1748
+ error?: string;
1749
+ /** Validation score (0-100) if validation was performed */
1750
+ validationScore?: number;
1751
+ /** Explanation of validation result */
1752
+ validationExplanation?: string;
1753
+ };
1754
+ /** Timestamps */
1755
+ createdAt: number;
1756
+ startedAt?: number;
1757
+ completedAt?: number;
1758
+ lastUpdatedAt: number;
1759
+ /** Retry tracking */
1760
+ attempts: number;
1761
+ maxAttempts: number;
1762
+ /** Metadata for extensions */
1763
+ metadata?: Record<string, unknown>;
1846
1764
  }
1847
1765
  /**
1848
- * Result of a plugin's beforeExecute hook.
1849
- *
1850
- * - `void` or `undefined`: Continue execution with original args
1851
- * - `{ abort: true, result: ... }`: Abort and return this result immediately
1852
- * - `{ modifiedArgs: ... }`: Continue with modified arguments
1766
+ * Input for creating a task
1853
1767
  */
1854
- type BeforeExecuteResult = void | undefined | {
1855
- abort: true;
1856
- result: unknown;
1857
- } | {
1858
- modifiedArgs: unknown;
1859
- };
1860
- /**
1861
- * Plugin interface for extending tool execution.
1862
- *
1863
- * Plugins can hook into the execution lifecycle to:
1864
- * - Modify arguments before execution
1865
- * - Transform results after execution
1768
+ interface TaskInput {
1769
+ id?: string;
1770
+ name: string;
1771
+ description: string;
1772
+ dependsOn?: string[];
1773
+ externalDependency?: ExternalDependency;
1774
+ condition?: TaskCondition;
1775
+ execution?: TaskExecution;
1776
+ suggestedTools?: string[];
1777
+ validation?: TaskValidation;
1778
+ expectedOutput?: string;
1779
+ maxAttempts?: number;
1780
+ metadata?: Record<string, unknown>;
1781
+ }
1782
+ /**
1783
+ * Plan concurrency settings
1784
+ */
1785
+ interface PlanConcurrency {
1786
+ maxParallelTasks: number;
1787
+ strategy: 'fifo' | 'priority' | 'shortest-first';
1788
+ /**
1789
+ * How to handle failures when executing tasks in parallel
1790
+ * - 'fail-fast': Stop on first failure (Promise.all behavior) - DEFAULT
1791
+ * - 'continue': Continue other tasks on failure, mark failed ones
1792
+ * - 'fail-all': Wait for all to complete, then report all failures together
1793
+ */
1794
+ failureMode?: 'fail-fast' | 'continue' | 'fail-all';
1795
+ }
1796
+ /**
1797
+ * Execution plan - a goal with steps to achieve it
1798
+ */
1799
+ interface Plan {
1800
+ id: string;
1801
+ goal: string;
1802
+ context?: string;
1803
+ tasks: Task[];
1804
+ /** Concurrency settings */
1805
+ concurrency?: PlanConcurrency;
1806
+ /** Can agent modify the plan? */
1807
+ allowDynamicTasks: boolean;
1808
+ /** Plan status */
1809
+ status: PlanStatus;
1810
+ /** Why is the plan suspended? */
1811
+ suspendedReason?: {
1812
+ type: 'waiting_external' | 'manual_pause' | 'error';
1813
+ taskId?: string;
1814
+ message?: string;
1815
+ };
1816
+ /** Timestamps */
1817
+ createdAt: number;
1818
+ startedAt?: number;
1819
+ completedAt?: number;
1820
+ lastUpdatedAt: number;
1821
+ /** For resume: which task to continue from */
1822
+ currentTaskId?: string;
1823
+ /** Metadata */
1824
+ metadata?: Record<string, unknown>;
1825
+ }
1826
+ /**
1827
+ * Input for creating a plan
1828
+ */
1829
+ interface PlanInput {
1830
+ goal: string;
1831
+ context?: string;
1832
+ tasks: TaskInput[];
1833
+ concurrency?: PlanConcurrency;
1834
+ allowDynamicTasks?: boolean;
1835
+ metadata?: Record<string, unknown>;
1836
+ /** Skip dependency cycle detection (default: false) */
1837
+ skipCycleCheck?: boolean;
1838
+ }
1839
+ /**
1840
+ * Memory access interface for condition evaluation
1841
+ */
1842
+ interface ConditionMemoryAccess {
1843
+ get(key: string): Promise<unknown>;
1844
+ }
1845
+ /**
1846
+ * Create a task with defaults
1847
+ */
1848
+ declare function createTask(input: TaskInput): Task;
1849
+ /**
1850
+ * Create a plan with tasks
1851
+ * @throws {DependencyCycleError} If circular dependencies detected (unless skipCycleCheck is true)
1852
+ */
1853
+ declare function createPlan(input: PlanInput): Plan;
1854
+ /**
1855
+ * Check if a task can be executed (dependencies met, status is pending)
1856
+ */
1857
+ declare function canTaskExecute(task: Task, allTasks: Task[]): boolean;
1858
+ /**
1859
+ * Get the next tasks that can be executed
1860
+ */
1861
+ declare function getNextExecutableTasks(plan: Plan): Task[];
1862
+ /**
1863
+ * Evaluate a task condition against memory
1864
+ */
1865
+ declare function evaluateCondition(condition: TaskCondition, memory: ConditionMemoryAccess): Promise<boolean>;
1866
+ /**
1867
+ * Update task status and timestamps
1868
+ */
1869
+ declare function updateTaskStatus(task: Task, status: TaskStatus): Task;
1870
+ /**
1871
+ * Check if a task is blocked by dependencies
1872
+ */
1873
+ declare function isTaskBlocked(task: Task, allTasks: Task[]): boolean;
1874
+ /**
1875
+ * Get the dependency tasks for a task
1876
+ */
1877
+ declare function getTaskDependencies(task: Task, allTasks: Task[]): Task[];
1878
+ /**
1879
+ * Resolve task name dependencies to task IDs
1880
+ * Modifies taskInputs in place
1881
+ */
1882
+ declare function resolveDependencies(taskInputs: TaskInput[], tasks: Task[]): void;
1883
+ /**
1884
+ * Detect dependency cycles in tasks using depth-first search
1885
+ * @param tasks Array of tasks with resolved dependencies (IDs, not names)
1886
+ * @returns Array of task IDs forming the cycle (e.g., ['A', 'B', 'C', 'A']), or null if no cycle
1887
+ */
1888
+ declare function detectDependencyCycle(tasks: Task[]): string[] | null;
1889
+
1890
+ /**
1891
+ * Routine entities for reusable task-based workflows.
1892
+ *
1893
+ * A RoutineDefinition is a template (recipe) that can be executed multiple times.
1894
+ * A RoutineExecution is a running instance backed by an existing Plan.
1895
+ */
1896
+
1897
+ /**
1898
+ * A reusable routine definition (template).
1899
+ *
1900
+ * Defines what to do but has no runtime state.
1901
+ * Multiple RoutineExecutions can be created from one RoutineDefinition.
1902
+ */
1903
+ interface RoutineDefinition {
1904
+ /** Unique routine identifier */
1905
+ id: string;
1906
+ /** Human-readable name */
1907
+ name: string;
1908
+ /** Description of what this routine accomplishes */
1909
+ description: string;
1910
+ /** Version string for tracking routine evolution */
1911
+ version?: string;
1912
+ /** Task templates in execution order (dependencies may override order) */
1913
+ tasks: TaskInput[];
1914
+ /** Tool names that must be available before starting */
1915
+ requiredTools?: string[];
1916
+ /** Plugin names that must be enabled before starting (e.g. 'working_memory') */
1917
+ requiredPlugins?: string[];
1918
+ /** Additional instructions injected into system prompt when routine is active */
1919
+ instructions?: string;
1920
+ /** Concurrency settings for task execution */
1921
+ concurrency?: PlanConcurrency;
1922
+ /** Whether the LLM can dynamically add/modify tasks during execution. Default: false */
1923
+ allowDynamicTasks?: boolean;
1924
+ /** Tags for categorization and filtering */
1925
+ tags?: string[];
1926
+ /** Author/creator */
1927
+ author?: string;
1928
+ /** When the definition was created (ISO string) */
1929
+ createdAt: string;
1930
+ /** When the definition was last updated (ISO string) */
1931
+ updatedAt: string;
1932
+ /** Metadata for extensions */
1933
+ metadata?: Record<string, unknown>;
1934
+ }
1935
+ /**
1936
+ * Input for creating a RoutineDefinition.
1937
+ * id, createdAt, updatedAt are auto-generated if not provided.
1938
+ */
1939
+ interface RoutineDefinitionInput {
1940
+ id?: string;
1941
+ name: string;
1942
+ description: string;
1943
+ version?: string;
1944
+ tasks: TaskInput[];
1945
+ requiredTools?: string[];
1946
+ requiredPlugins?: string[];
1947
+ instructions?: string;
1948
+ concurrency?: PlanConcurrency;
1949
+ allowDynamicTasks?: boolean;
1950
+ tags?: string[];
1951
+ author?: string;
1952
+ metadata?: Record<string, unknown>;
1953
+ }
1954
+ /**
1955
+ * Execution status for a routine run
1956
+ */
1957
+ type RoutineExecutionStatus = 'pending' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
1958
+ /**
1959
+ * Runtime state when executing a routine.
1960
+ * Created from a RoutineDefinition, delegates task management to Plan.
1961
+ */
1962
+ interface RoutineExecution {
1963
+ /** Unique execution ID */
1964
+ id: string;
1965
+ /** Reference to the routine definition ID */
1966
+ routineId: string;
1967
+ /** The live plan managing task execution (created via createPlan) */
1968
+ plan: Plan;
1969
+ /** Current execution status */
1970
+ status: RoutineExecutionStatus;
1971
+ /** Overall progress (0-100) based on completed tasks */
1972
+ progress: number;
1973
+ /** Timestamps */
1974
+ startedAt?: number;
1975
+ completedAt?: number;
1976
+ lastUpdatedAt: number;
1977
+ /** Error message if failed */
1978
+ error?: string;
1979
+ /** Metadata */
1980
+ metadata?: Record<string, unknown>;
1981
+ }
1982
+ /**
1983
+ * Create a RoutineDefinition with defaults.
1984
+ * Validates task dependency references and detects cycles.
1985
+ */
1986
+ declare function createRoutineDefinition(input: RoutineDefinitionInput): RoutineDefinition;
1987
+ /**
1988
+ * Create a RoutineExecution from a RoutineDefinition.
1989
+ * Instantiates all tasks into a Plan via createPlan().
1990
+ */
1991
+ declare function createRoutineExecution(definition: RoutineDefinition): RoutineExecution;
1992
+ /**
1993
+ * Compute routine progress (0-100) from plan task statuses.
1994
+ */
1995
+ declare function getRoutineProgress(execution: RoutineExecution): number;
1996
+
1997
+ /**
1998
+ * IRoutineDefinitionStorage - Storage interface for routine definitions.
1999
+ *
2000
+ * Follows the same userId-optional pattern as ICustomToolStorage and IUserInfoStorage.
2001
+ * When userId is undefined, defaults to 'default' user in storage implementation.
2002
+ */
2003
+
2004
+ interface IRoutineDefinitionStorage {
2005
+ save(userId: string | undefined, definition: RoutineDefinition): Promise<void>;
2006
+ load(userId: string | undefined, id: string): Promise<RoutineDefinition | null>;
2007
+ delete(userId: string | undefined, id: string): Promise<void>;
2008
+ exists(userId: string | undefined, id: string): Promise<boolean>;
2009
+ list(userId: string | undefined, options?: {
2010
+ tags?: string[];
2011
+ search?: string;
2012
+ limit?: number;
2013
+ offset?: number;
2014
+ }): Promise<RoutineDefinition[]>;
2015
+ getPath(userId: string | undefined): string;
2016
+ }
2017
+
2018
+ /**
2019
+ * StorageRegistry - Centralized storage backend registry
2020
+ *
2021
+ * Provides a single point of configuration for all storage backends
2022
+ * used across the library. Subsystems resolve their storage at execution
2023
+ * time (not construction time) via `resolve()`, which lazily creates
2024
+ * and caches a default when nothing has been configured.
2025
+ *
2026
+ * Storage types are split into two categories:
2027
+ * - **Global singletons**: customTools, media, agentDefinitions, connectorConfig, oauthTokens
2028
+ * - **Per-agent factories** (need agentId): sessions, persistentInstructions, workingMemory
2029
+ *
2030
+ * For multi-user / multi-tenant environments, factories receive an optional
2031
+ * `StorageContext` (opaque, like `ConnectorAccessContext`) so backends can
2032
+ * partition data by userId, tenantId, or any custom field.
2033
+ *
2034
+ * @example
2035
+ * ```typescript
2036
+ * import { StorageRegistry } from '@everworker/oneringai';
2037
+ *
2038
+ * // Single-tenant (simple)
2039
+ * StorageRegistry.configure({
2040
+ * customTools: new MongoCustomToolStorage(),
2041
+ * media: new S3MediaStorage(),
2042
+ * sessions: (agentId) => new RedisContextStorage(agentId),
2043
+ * });
2044
+ *
2045
+ * // Multi-tenant
2046
+ * StorageRegistry.configure({
2047
+ * sessions: (agentId, ctx) => new RedisContextStorage(agentId, ctx?.userId),
2048
+ * customTools: new MongoCustomToolStorage(), // global singletons are unaffected
2049
+ * });
2050
+ * ```
2051
+ */
2052
+
2053
+ /**
2054
+ * Opaque context passed to per-agent storage factories.
2055
+ *
2056
+ * The library imposes no structure — consumers define their own shape
2057
+ * (e.g., `{ userId: 'alice', tenantId: 'acme' }`).
2058
+ *
2059
+ * Mirrors the `ConnectorAccessContext` pattern used by `Connector.scoped()`.
2060
+ */
2061
+ type StorageContext = Record<string, unknown>;
2062
+ /**
2063
+ * Storage configuration map.
2064
+ *
2065
+ * Global singletons are stored directly.
2066
+ * Per-agent factories are functions that accept an agentId (and optional
2067
+ * StorageContext for multi-tenant scenarios) and return a storage instance.
2068
+ */
2069
+ interface StorageConfig {
2070
+ media: IMediaStorage;
2071
+ agentDefinitions: IAgentDefinitionStorage;
2072
+ connectorConfig: IConnectorConfigStorage;
2073
+ oauthTokens: ITokenStorage;
2074
+ customTools: (context?: StorageContext) => ICustomToolStorage;
2075
+ sessions: (agentId: string, context?: StorageContext) => IContextStorage;
2076
+ persistentInstructions: (agentId: string, context?: StorageContext) => IPersistentInstructionsStorage;
2077
+ workingMemory: (context?: StorageContext) => IMemoryStorage;
2078
+ userInfo: (context?: StorageContext) => IUserInfoStorage;
2079
+ routineDefinitions: (context?: StorageContext) => IRoutineDefinitionStorage;
2080
+ }
2081
+ declare class StorageRegistry {
2082
+ /** Internal storage map */
2083
+ private static entries;
2084
+ /** Default context passed to all factory calls (set via setContext) */
2085
+ private static _context;
2086
+ /**
2087
+ * Configure multiple storage backends at once.
2088
+ *
2089
+ * @example
2090
+ * ```typescript
2091
+ * // Single-tenant
2092
+ * StorageRegistry.configure({
2093
+ * customTools: new MongoCustomToolStorage(),
2094
+ * sessions: (agentId) => new RedisContextStorage(agentId),
2095
+ * });
2096
+ *
2097
+ * // Multi-tenant
2098
+ * StorageRegistry.configure({
2099
+ * sessions: (agentId, ctx) => new TenantContextStorage(agentId, ctx?.tenantId),
2100
+ * persistentInstructions: (agentId, ctx) => new TenantInstructionsStorage(agentId, ctx?.userId),
2101
+ * });
2102
+ * ```
2103
+ */
2104
+ static configure(config: Partial<StorageConfig>): void;
2105
+ /**
2106
+ * Set the default StorageContext.
2107
+ *
2108
+ * This context is automatically passed to all per-agent factory calls
2109
+ * (sessions, persistentInstructions, workingMemory) when no explicit
2110
+ * context is provided. Typically set once at app startup with global
2111
+ * tenant/environment info, or per-request in multi-tenant servers.
2112
+ *
2113
+ * @example
2114
+ * ```typescript
2115
+ * // Single-tenant app — set once at init
2116
+ * StorageRegistry.setContext({ tenantId: 'acme', environment: 'production' });
2117
+ *
2118
+ * // Multi-tenant server — set per-request
2119
+ * app.use((req, res, next) => {
2120
+ * StorageRegistry.setContext({ userId: req.user.id, tenantId: req.tenant.id });
2121
+ * next();
2122
+ * });
2123
+ * ```
2124
+ */
2125
+ static setContext(context: StorageContext | undefined): void;
2126
+ /**
2127
+ * Get the current default StorageContext.
2128
+ */
2129
+ static getContext(): StorageContext | undefined;
2130
+ /**
2131
+ * Set a single storage backend.
2132
+ */
2133
+ static set<K extends keyof StorageConfig>(key: K, value: StorageConfig[K]): void;
2134
+ /**
2135
+ * Get a storage backend (or undefined if not configured).
2136
+ */
2137
+ static get<K extends keyof StorageConfig>(key: K): StorageConfig[K] | undefined;
2138
+ /**
2139
+ * Resolve a storage backend, lazily creating and caching a default if needed.
2140
+ *
2141
+ * If a value has been configured via `set()` or `configure()`, returns that.
2142
+ * Otherwise, calls `defaultFactory()`, caches the result, and returns it.
2143
+ */
2144
+ static resolve<K extends keyof StorageConfig>(key: K, defaultFactory: () => StorageConfig[K]): StorageConfig[K];
2145
+ /**
2146
+ * Check if a storage backend has been configured.
2147
+ */
2148
+ static has(key: keyof StorageConfig): boolean;
2149
+ /**
2150
+ * Clear all configured storage backends and context.
2151
+ * Useful for testing.
2152
+ */
2153
+ static reset(): void;
2154
+ }
2155
+
2156
+ /**
2157
+ * Tool executor interface
2158
+ */
2159
+
2160
+ interface IToolExecutor {
2161
+ /**
2162
+ * Execute a tool function
2163
+ * @param toolName - Name of the tool to execute
2164
+ * @param args - Parsed arguments object
2165
+ * @returns Tool execution result
2166
+ */
2167
+ execute(toolName: string, args: any): Promise<any>;
2168
+ /**
2169
+ * Check if tool is available
2170
+ */
2171
+ hasToolFunction(toolName: string): boolean;
2172
+ /**
2173
+ * Get tool definition
2174
+ */
2175
+ getToolDefinition(toolName: string): Tool | undefined;
2176
+ /**
2177
+ * Register a new tool
2178
+ */
2179
+ registerTool(tool: ToolFunction): void;
2180
+ /**
2181
+ * Unregister a tool
2182
+ */
2183
+ unregisterTool(toolName: string): void;
2184
+ /**
2185
+ * List all registered tools
2186
+ */
2187
+ listTools(): string[];
2188
+ }
2189
+
2190
+ /**
2191
+ * Interface for objects that manage resources and need explicit cleanup.
2192
+ *
2193
+ * Implementing classes should release all resources (event listeners, timers,
2194
+ * connections, etc.) when destroy() is called. After destruction, the instance
2195
+ * should not be used.
2196
+ */
2197
+ interface IDisposable {
2198
+ /**
2199
+ * Releases all resources held by this instance.
2200
+ *
2201
+ * After calling destroy():
2202
+ * - All event listeners should be removed
2203
+ * - All timers/intervals should be cleared
2204
+ * - All internal state should be cleaned up
2205
+ * - The instance should not be reused
2206
+ *
2207
+ * Multiple calls to destroy() should be safe (idempotent).
2208
+ */
2209
+ destroy(): void;
2210
+ /**
2211
+ * Returns true if destroy() has been called.
2212
+ * Methods should check this before performing operations.
2213
+ */
2214
+ readonly isDestroyed: boolean;
2215
+ }
2216
+ /**
2217
+ * Async version of IDisposable for resources requiring async cleanup.
2218
+ */
2219
+ interface IAsyncDisposable {
2220
+ /**
2221
+ * Asynchronously releases all resources held by this instance.
2222
+ */
2223
+ destroy(): Promise<void>;
2224
+ /**
2225
+ * Returns true if destroy() has been called.
2226
+ */
2227
+ readonly isDestroyed: boolean;
2228
+ }
2229
+ /**
2230
+ * Helper to check if an object is destroyed and throw if so.
2231
+ * @param obj - The disposable object to check
2232
+ * @param operation - Name of the operation being attempted
2233
+ */
2234
+ declare function assertNotDestroyed(obj: IDisposable | IAsyncDisposable, operation: string): void;
2235
+
2236
+ /**
2237
+ * Generic Circuit Breaker implementation
2238
+ *
2239
+ * Prevents cascading failures by failing fast when a system is down.
2240
+ * Works for any async operation (LLM calls, tool execution, etc.)
2241
+ */
2242
+
2243
+ /**
2244
+ * Circuit breaker states
2245
+ */
2246
+ type CircuitState = 'closed' | 'open' | 'half-open';
2247
+ /**
2248
+ * Circuit breaker configuration
2249
+ */
2250
+ interface CircuitBreakerConfig {
2251
+ /** Number of failures before opening circuit */
2252
+ failureThreshold: number;
2253
+ /** Number of successes to close from half-open */
2254
+ successThreshold: number;
2255
+ /** Time to wait in open state before trying half-open (ms) */
2256
+ resetTimeoutMs: number;
2257
+ /** Time window for counting failures (ms) */
2258
+ windowMs: number;
2259
+ /** Classify errors - return true if error should count as failure */
2260
+ isRetryable?: (error: Error) => boolean;
2261
+ }
2262
+ /**
2263
+ * Circuit breaker metrics
2264
+ */
2265
+ interface CircuitBreakerMetrics {
2266
+ name: string;
2267
+ state: CircuitState;
2268
+ totalRequests: number;
2269
+ successCount: number;
2270
+ failureCount: number;
2271
+ rejectedCount: number;
2272
+ recentFailures: number;
2273
+ consecutiveSuccesses: number;
2274
+ lastFailureTime?: number;
2275
+ lastSuccessTime?: number;
2276
+ lastStateChange: number;
2277
+ nextRetryTime?: number;
2278
+ failureRate: number;
2279
+ successRate: number;
2280
+ }
2281
+ /**
2282
+ * Circuit breaker events
2283
+ */
2284
+ interface CircuitBreakerEvents {
2285
+ opened: {
2286
+ name: string;
2287
+ failureCount: number;
2288
+ lastError: string;
2289
+ nextRetryTime: number;
2290
+ };
2291
+ 'half-open': {
2292
+ name: string;
2293
+ timestamp: number;
2294
+ };
2295
+ closed: {
2296
+ name: string;
2297
+ successCount: number;
2298
+ timestamp: number;
2299
+ };
2300
+ }
2301
+ /**
2302
+ * Default configuration
2303
+ */
2304
+ declare const DEFAULT_CIRCUIT_BREAKER_CONFIG: CircuitBreakerConfig;
2305
+ /**
2306
+ * Circuit breaker error - thrown when circuit is open
2307
+ */
2308
+ declare class CircuitOpenError extends Error {
2309
+ readonly breakerName: string;
2310
+ readonly nextRetryTime: number;
2311
+ readonly failureCount: number;
2312
+ readonly lastError: string;
2313
+ constructor(breakerName: string, nextRetryTime: number, failureCount: number, lastError: string);
2314
+ }
2315
+ /**
2316
+ * Generic circuit breaker for any async operation
2317
+ */
2318
+ declare class CircuitBreaker<T = any> extends EventEmitter<CircuitBreakerEvents> {
2319
+ readonly name: string;
2320
+ private state;
2321
+ private config;
2322
+ private failures;
2323
+ private lastError;
2324
+ private consecutiveSuccesses;
2325
+ private openedAt?;
2326
+ private lastStateChange;
2327
+ private totalRequests;
2328
+ private successCount;
2329
+ private failureCount;
2330
+ private rejectedCount;
2331
+ private lastFailureTime?;
2332
+ private lastSuccessTime?;
2333
+ constructor(name: string, config?: Partial<CircuitBreakerConfig>);
2334
+ /**
2335
+ * Execute function with circuit breaker protection
2336
+ */
2337
+ execute(fn: () => Promise<T>): Promise<T>;
2338
+ /**
2339
+ * Record successful execution
2340
+ */
2341
+ private recordSuccess;
2342
+ /**
2343
+ * Record failed execution
2344
+ */
2345
+ private recordFailure;
2346
+ /**
2347
+ * Transition to new state
2348
+ */
2349
+ private transitionTo;
2350
+ /**
2351
+ * Remove failures outside the time window
2352
+ */
2353
+ private pruneOldFailures;
2354
+ /**
2355
+ * Get current state
2356
+ */
2357
+ getState(): CircuitState;
2358
+ /**
2359
+ * Get current metrics
2360
+ */
2361
+ getMetrics(): CircuitBreakerMetrics;
2362
+ /**
2363
+ * Manually reset circuit breaker (force close)
2364
+ */
2365
+ reset(): void;
2366
+ /**
2367
+ * Check if circuit is allowing requests
2368
+ */
2369
+ isOpen(): boolean;
2370
+ /**
2371
+ * Get configuration
2372
+ */
2373
+ getConfig(): CircuitBreakerConfig;
2374
+ }
2375
+
2376
+ /**
2377
+ * Tool Execution Plugin System Types
2378
+ *
2379
+ * Provides a pluggable architecture for extending tool execution with
2380
+ * custom behavior like logging, analytics, permission prompts, UI updates, etc.
2381
+ *
2382
+ * @module tool-execution
2383
+ */
2384
+
2385
+ /**
2386
+ * Context passed through the execution pipeline.
2387
+ * Contains all information about the current tool execution.
2388
+ */
2389
+ interface PluginExecutionContext {
2390
+ /** Name of the tool being executed */
2391
+ toolName: string;
2392
+ /** Original arguments passed to the tool (immutable) */
2393
+ readonly args: unknown;
2394
+ /** Mutable arguments that plugins can modify */
2395
+ mutableArgs: unknown;
2396
+ /** Metadata for passing data between plugins */
2397
+ metadata: Map<string, unknown>;
2398
+ /** Timestamp when execution started (ms since epoch) */
2399
+ startTime: number;
2400
+ /** The tool function being executed */
2401
+ tool: ToolFunction;
2402
+ /** Unique execution ID for tracing */
2403
+ executionId: string;
2404
+ }
2405
+ /**
2406
+ * Result of a plugin's beforeExecute hook.
2407
+ *
2408
+ * - `void` or `undefined`: Continue execution with original args
2409
+ * - `{ abort: true, result: ... }`: Abort and return this result immediately
2410
+ * - `{ modifiedArgs: ... }`: Continue with modified arguments
2411
+ */
2412
+ type BeforeExecuteResult = void | undefined | {
2413
+ abort: true;
2414
+ result: unknown;
2415
+ } | {
2416
+ modifiedArgs: unknown;
2417
+ };
2418
+ /**
2419
+ * Plugin interface for extending tool execution.
2420
+ *
2421
+ * Plugins can hook into the execution lifecycle to:
2422
+ * - Modify arguments before execution
2423
+ * - Transform results after execution
1866
2424
  * - Handle errors
1867
2425
  * - Emit side effects (logging, UI updates, analytics)
1868
2426
  *
@@ -3620,6 +4178,7 @@ declare abstract class BaseAgent<TConfig extends BaseAgentConfig = BaseAgentConf
3620
4178
  protected _config: TConfig;
3621
4179
  protected _agentContext: AgentContextNextGen;
3622
4180
  protected _permissionManager: ToolPermissionManager;
4181
+ protected _ownsContext: boolean;
3623
4182
  protected _isDestroyed: boolean;
3624
4183
  protected _cleanupCallbacks: Array<() => void | Promise<void>>;
3625
4184
  protected _logger: FrameworkLogger;
@@ -4152,9 +4711,113 @@ declare class Agent extends BaseAgent<AgentConfig$1, AgentEvents> implements IDi
4152
4711
  isRunning(): boolean;
4153
4712
  isPaused(): boolean;
4154
4713
  isCancelled(): boolean;
4714
+ /**
4715
+ * Clear conversation history, resetting the context for a fresh interaction.
4716
+ * Plugins (working memory, in-context memory, etc.) are NOT affected.
4717
+ */
4718
+ clearConversation(reason?: string): void;
4719
+ /**
4720
+ * Register a hook on the agent. Can be called after creation.
4721
+ */
4722
+ registerHook(name: HookName, hook: Function): void;
4723
+ /**
4724
+ * Unregister a previously registered hook by reference.
4725
+ */
4726
+ unregisterHook(name: HookName, hook: Function): boolean;
4155
4727
  destroy(): void;
4156
4728
  }
4157
4729
 
4730
+ /**
4731
+ * Routine Execution Runner
4732
+ *
4733
+ * Executes a RoutineDefinition by creating an Agent, running tasks in dependency order,
4734
+ * validating completion via LLM self-reflection, and using working/in-context memory
4735
+ * as the bridge between tasks.
4736
+ */
4737
+
4738
+ /**
4739
+ * Options for executing a routine.
4740
+ *
4741
+ * Two modes:
4742
+ * 1. **New agent**: Pass `connector` + `model` (+ optional `tools`, `hooks`).
4743
+ * An agent is created internally and destroyed after execution.
4744
+ * 2. **Existing agent**: Pass `agent` (a pre-created Agent instance).
4745
+ * The agent is NOT destroyed after execution — caller owns its lifecycle.
4746
+ * The agent's existing connector, model, tools, and hooks are used.
4747
+ */
4748
+ interface ExecuteRoutineOptions {
4749
+ /** Routine definition to execute */
4750
+ definition: RoutineDefinition;
4751
+ /**
4752
+ * Pre-created Agent instance. When provided, `connector`/`model`/`tools` are ignored.
4753
+ * The agent is NOT destroyed after execution — caller manages its lifecycle.
4754
+ */
4755
+ agent?: Agent;
4756
+ /** Connector name — required when `agent` is not provided */
4757
+ connector?: string;
4758
+ /** Model ID — required when `agent` is not provided */
4759
+ model?: string;
4760
+ /** Additional tools — only used when creating a new agent (no `agent` provided) */
4761
+ tools?: ToolFunction[];
4762
+ /** Hooks — applied to agent for the duration of routine execution.
4763
+ * For new agents: baked in at creation. For existing agents: registered before
4764
+ * execution and unregistered after. */
4765
+ hooks?: HookConfig;
4766
+ /** Called when a task starts executing (set to in_progress) */
4767
+ onTaskStarted?: (task: Task, execution: RoutineExecution) => void;
4768
+ /** Called when a task completes successfully */
4769
+ onTaskComplete?: (task: Task, execution: RoutineExecution) => void;
4770
+ /** Called when a task fails */
4771
+ onTaskFailed?: (task: Task, execution: RoutineExecution) => void;
4772
+ /** Called after each validation attempt (whether pass or fail) */
4773
+ onTaskValidation?: (task: Task, result: TaskValidationResult, execution: RoutineExecution) => void;
4774
+ /** Configurable prompts (all have sensible defaults) */
4775
+ prompts?: {
4776
+ /** Override system prompt builder. Receives definition, should return full system prompt. */
4777
+ system?: (definition: RoutineDefinition) => string;
4778
+ /** Override task prompt builder. Receives task, should return the user message for that task. */
4779
+ task?: (task: Task) => string;
4780
+ /** Override validation prompt builder. Receives task + validation context (response, memory state, tool calls). */
4781
+ validation?: (task: Task, context: ValidationContext) => string;
4782
+ };
4783
+ }
4784
+ /**
4785
+ * Context snapshot passed to the validation prompt builder.
4786
+ * Contains everything the validator needs to evaluate task completion
4787
+ * WITHOUT conversation history.
4788
+ */
4789
+ interface ValidationContext {
4790
+ /** Agent's final text output */
4791
+ responseText: string;
4792
+ /** Current in-context memory entries (key-value pairs set via context_set) */
4793
+ inContextMemory: string | null;
4794
+ /** Current working memory index (keys + descriptions of stored data) */
4795
+ workingMemoryIndex: string | null;
4796
+ /** Formatted log of all tool calls made during this task execution */
4797
+ toolCallLog: string;
4798
+ }
4799
+ /**
4800
+ * Execute a routine definition.
4801
+ *
4802
+ * Creates an Agent with working memory + in-context memory enabled, then runs
4803
+ * each task in dependency order. Between tasks, conversation history is cleared
4804
+ * but memory plugins persist, allowing tasks to share data via memory.
4805
+ *
4806
+ * @example
4807
+ * ```typescript
4808
+ * const execution = await executeRoutine({
4809
+ * definition: myRoutine,
4810
+ * connector: 'openai',
4811
+ * model: 'gpt-4',
4812
+ * tools: [myCustomTool],
4813
+ * onTaskComplete: (task) => console.log(`✓ ${task.name}`),
4814
+ * });
4815
+ *
4816
+ * console.log(execution.status); // 'completed' | 'failed'
4817
+ * ```
4818
+ */
4819
+ declare function executeRoutine(options: ExecuteRoutineOptions): Promise<RoutineExecution>;
4820
+
4158
4821
  /**
4159
4822
  * BasePluginNextGen - Base class for context plugins
4160
4823
  *
@@ -4706,6 +5369,96 @@ declare class PersistentInstructionsPluginNextGen implements IContextPluginNextG
4706
5369
  private createInstructionsClearTool;
4707
5370
  }
4708
5371
 
5372
+ /**
5373
+ * UserInfoPluginNextGen - User information storage plugin for NextGen context
5374
+ *
5375
+ * Stores key-value information about the current user (preferences, context, metadata).
5376
+ * Data is user-scoped, not agent-scoped - different agents share the same user data.
5377
+ *
5378
+ * Use cases:
5379
+ * - User preferences (theme, language, timezone)
5380
+ * - User context (location, role, permissions)
5381
+ * - User metadata (name, email, profile info)
5382
+ *
5383
+ * Storage: ~/.oneringai/users/<userId>/user_info.json
5384
+ *
5385
+ * Design:
5386
+ * - UserId passed at construction time from AgentContextNextGen._userId
5387
+ * - User data IS injected into context via getContent() (entries rendered as markdown)
5388
+ * - In-memory cache with lazy loading + write-through to storage
5389
+ * - Tools access current user's data only (no cross-user access)
5390
+ */
5391
+
5392
+ interface UserInfoPluginConfig {
5393
+ /** Custom storage implementation (default: FileUserInfoStorage) */
5394
+ storage?: IUserInfoStorage;
5395
+ /** Maximum total size across all entries in bytes (default: 100000 / ~100KB) */
5396
+ maxTotalSize?: number;
5397
+ /** Maximum number of entries (default: 100) */
5398
+ maxEntries?: number;
5399
+ /** User ID for storage isolation (resolved from AgentContextNextGen._userId) */
5400
+ userId?: string;
5401
+ }
5402
+ interface SerializedUserInfoState {
5403
+ version: 1;
5404
+ entries: UserInfoEntry[];
5405
+ userId?: string;
5406
+ }
5407
+ declare class UserInfoPluginNextGen implements IContextPluginNextGen {
5408
+ readonly name = "user_info";
5409
+ private _destroyed;
5410
+ private _storage;
5411
+ /** In-memory cache of entries */
5412
+ private _entries;
5413
+ /** Whether entries have been loaded from storage */
5414
+ private _initialized;
5415
+ private readonly maxTotalSize;
5416
+ private readonly maxEntries;
5417
+ private readonly estimator;
5418
+ private readonly explicitStorage?;
5419
+ /** UserId for getContent() and lazy initialization */
5420
+ readonly userId: string | undefined;
5421
+ private _tokenCache;
5422
+ private _instructionsTokenCache;
5423
+ constructor(config?: UserInfoPluginConfig);
5424
+ getInstructions(): string;
5425
+ getContent(): Promise<string | null>;
5426
+ getContents(): Map<string, UserInfoEntry>;
5427
+ getTokenSize(): number;
5428
+ getInstructionsTokenSize(): number;
5429
+ isCompactable(): boolean;
5430
+ compact(_targetTokensToFree: number): Promise<number>;
5431
+ getTools(): ToolFunction[];
5432
+ destroy(): void;
5433
+ getState(): SerializedUserInfoState;
5434
+ restoreState(state: unknown): void;
5435
+ /**
5436
+ * Check if initialized
5437
+ */
5438
+ get isInitialized(): boolean;
5439
+ private assertNotDestroyed;
5440
+ /**
5441
+ * Lazy load entries from storage
5442
+ */
5443
+ private ensureInitialized;
5444
+ /**
5445
+ * Render entries as markdown for context injection
5446
+ */
5447
+ private renderContent;
5448
+ /**
5449
+ * Resolve storage instance (lazy singleton)
5450
+ */
5451
+ private resolveStorage;
5452
+ /**
5453
+ * Persist current entries to storage
5454
+ */
5455
+ private persistToStorage;
5456
+ private createUserInfoSetTool;
5457
+ private createUserInfoGetTool;
5458
+ private createUserInfoRemoveTool;
5459
+ private createUserInfoClearTool;
5460
+ }
5461
+
4709
5462
  /**
4710
5463
  * DefaultCompactionStrategy - Standard compaction behavior
4711
5464
  *
@@ -7683,438 +8436,114 @@ declare class WorkingMemory extends EventEmitter<WorkingMemoryEvents> implements
7683
8436
  * Store a summary derived from raw data (normal priority)
7684
8437
  *
7685
8438
  * Use this for processed/summarized data that extracts key information.
7686
- * Links back to source data for cleanup tracking.
7687
- *
7688
- * @param key - Key without tier prefix (prefix is added automatically)
7689
- * @param description - Brief description for the index
7690
- * @param value - The summary data
7691
- * @param derivedFrom - Key(s) this summary was derived from
7692
- * @param options - Optional scope and task IDs
7693
- */
7694
- storeSummary(key: string, description: string, value: unknown, derivedFrom: string | string[], options?: {
7695
- taskIds?: string[];
7696
- scope?: MemoryScope;
7697
- }): Promise<void>;
7698
- /**
7699
- * Store final findings (high priority, kept longest)
7700
- *
7701
- * Use this for conclusions, insights, or final results that should be preserved.
7702
- * These are the last to be evicted and typically span the entire plan.
7703
- *
7704
- * @param key - Key without tier prefix (prefix is added automatically)
7705
- * @param description - Brief description for the index
7706
- * @param value - The findings data
7707
- * @param derivedFrom - Optional key(s) these findings were derived from
7708
- * @param options - Optional scope, task IDs, and pinned flag
7709
- */
7710
- storeFindings(key: string, description: string, value: unknown, _derivedFrom?: string | string[], options?: {
7711
- taskIds?: string[];
7712
- scope?: MemoryScope;
7713
- pinned?: boolean;
7714
- }): Promise<void>;
7715
- /**
7716
- * Clean up raw data after summary/findings are created
7717
- *
7718
- * Call this after creating summaries to free up memory used by raw data.
7719
- * Only deletes entries in the 'raw' tier.
7720
- *
7721
- * @param derivedFromKeys - Keys to delete (typically from derivedFrom metadata)
7722
- * @returns Number of entries deleted
7723
- */
7724
- cleanupRawData(derivedFromKeys: string[]): Promise<number>;
7725
- /**
7726
- * Get all entries by tier
7727
- *
7728
- * @param tier - The tier to filter by
7729
- * @returns Array of entries in that tier
7730
- */
7731
- getByTier(tier: MemoryTier): Promise<MemoryEntry[]>;
7732
- /**
7733
- * Promote an entry to a higher tier
7734
- *
7735
- * Changes the key prefix and updates priority.
7736
- * Use this when raw data becomes more valuable (e.g., frequently accessed).
7737
- *
7738
- * @param key - Current key (with tier prefix)
7739
- * @param toTier - Target tier to promote to
7740
- * @returns New key with updated prefix
7741
- */
7742
- promote(key: string, toTier: MemoryTier): Promise<string>;
7743
- /**
7744
- * Get tier statistics
7745
- *
7746
- * @returns Count and size by tier
7747
- */
7748
- getTierStats(): Promise<Record<MemoryTier, {
7749
- count: number;
7750
- sizeBytes: number;
7751
- }>>;
7752
- /**
7753
- * Get statistics about memory usage
7754
- */
7755
- getStats(): Promise<{
7756
- totalEntries: number;
7757
- totalSizeBytes: number;
7758
- utilizationPercent: number;
7759
- byPriority: Record<MemoryPriority, number>;
7760
- pinnedCount: number;
7761
- }>;
7762
- /**
7763
- * Get the configured memory limit
7764
- */
7765
- getLimit(): number;
7766
- /**
7767
- * Check if the WorkingMemory instance has been destroyed
7768
- */
7769
- get isDestroyed(): boolean;
7770
- /**
7771
- * Destroy the WorkingMemory instance
7772
- * Removes all event listeners and clears internal state
7773
- */
7774
- destroy(): void;
7775
- /**
7776
- * Serialize all memory entries for persistence
7777
- *
7778
- * Returns a serializable representation of all memory entries
7779
- * that can be saved to storage and restored later.
7780
- *
7781
- * @returns Serialized memory state
7782
- */
7783
- serialize(): Promise<SerializedMemory>;
7784
- /**
7785
- * Restore memory entries from serialized state
7786
- *
7787
- * Clears existing memory and repopulates from the serialized state.
7788
- * Timestamps are reset to current time.
7789
- *
7790
- * @param state - Previously serialized memory state
7791
- */
7792
- restore(state: SerializedMemory): Promise<void>;
7793
- }
7794
-
7795
- /**
7796
- * Task and Plan entities for TaskAgent
7797
- *
7798
- * Defines the data structures for task-based autonomous agents.
7799
- */
7800
- /**
7801
- * Task status lifecycle
7802
- */
7803
- type TaskStatus = 'pending' | 'blocked' | 'in_progress' | 'waiting_external' | 'completed' | 'failed' | 'skipped' | 'cancelled';
7804
- /**
7805
- * Terminal statuses - task will not progress further
7806
- */
7807
- declare const TERMINAL_TASK_STATUSES: TaskStatus[];
7808
- /**
7809
- * Check if a task status is terminal (task will not progress further)
7810
- */
7811
- declare function isTerminalStatus(status: TaskStatus): boolean;
7812
- /**
7813
- * Plan status
7814
- */
7815
- type PlanStatus = 'pending' | 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled';
7816
- /**
7817
- * Condition operators for conditional task execution
7818
- */
7819
- type ConditionOperator = 'exists' | 'not_exists' | 'equals' | 'contains' | 'truthy' | 'greater_than' | 'less_than';
7820
- /**
7821
- * Task condition - evaluated before execution
7822
- */
7823
- interface TaskCondition {
7824
- memoryKey: string;
7825
- operator: ConditionOperator;
7826
- value?: unknown;
7827
- onFalse: 'skip' | 'fail' | 'wait';
7828
- }
7829
- /**
7830
- * External dependency configuration
7831
- */
7832
- interface ExternalDependency {
7833
- type: 'webhook' | 'poll' | 'manual' | 'scheduled';
7834
- /** For webhook: unique ID to match incoming webhook */
7835
- webhookId?: string;
7836
- /** For poll: how to check if complete */
7837
- pollConfig?: {
7838
- toolName: string;
7839
- toolArgs: Record<string, unknown>;
7840
- intervalMs: number;
7841
- maxAttempts: number;
7842
- };
7843
- /** For scheduled: when to resume */
7844
- scheduledAt?: number;
7845
- /** For manual: description of what's needed */
7846
- manualDescription?: string;
7847
- /** Timeout for all types */
7848
- timeoutMs?: number;
7849
- /** Current state */
7850
- state: 'waiting' | 'received' | 'timeout';
7851
- /** Data received from external source */
7852
- receivedData?: unknown;
7853
- receivedAt?: number;
7854
- }
7855
- /**
7856
- * Task execution settings
7857
- */
7858
- interface TaskExecution {
7859
- /** Can run in parallel with other parallel tasks */
7860
- parallel?: boolean;
7861
- /** Max concurrent if this spawns sub-work */
7862
- maxConcurrency?: number;
7863
- /** Priority (higher = executed first) */
7864
- priority?: number;
8439
+ * Links back to source data for cleanup tracking.
8440
+ *
8441
+ * @param key - Key without tier prefix (prefix is added automatically)
8442
+ * @param description - Brief description for the index
8443
+ * @param value - The summary data
8444
+ * @param derivedFrom - Key(s) this summary was derived from
8445
+ * @param options - Optional scope and task IDs
8446
+ */
8447
+ storeSummary(key: string, description: string, value: unknown, derivedFrom: string | string[], options?: {
8448
+ taskIds?: string[];
8449
+ scope?: MemoryScope;
8450
+ }): Promise<void>;
7865
8451
  /**
7866
- * If true (default), re-check condition immediately before LLM call
7867
- * to protect against race conditions when parallel tasks modify memory.
7868
- * Set to false to skip re-check for performance if you know condition won't change.
8452
+ * Store final findings (high priority, kept longest)
8453
+ *
8454
+ * Use this for conclusions, insights, or final results that should be preserved.
8455
+ * These are the last to be evicted and typically span the entire plan.
8456
+ *
8457
+ * @param key - Key without tier prefix (prefix is added automatically)
8458
+ * @param description - Brief description for the index
8459
+ * @param value - The findings data
8460
+ * @param derivedFrom - Optional key(s) these findings were derived from
8461
+ * @param options - Optional scope, task IDs, and pinned flag
7869
8462
  */
7870
- raceProtection?: boolean;
7871
- }
7872
- /**
7873
- * Task completion validation settings
7874
- *
7875
- * Used to verify that a task actually achieved its goal before marking it complete.
7876
- * Supports multiple validation approaches:
7877
- * - Programmatic checks (memory keys, hooks)
7878
- * - LLM self-reflection with completeness scoring
7879
- * - Natural language criteria evaluation
7880
- */
7881
- interface TaskValidation {
8463
+ storeFindings(key: string, description: string, value: unknown, _derivedFrom?: string | string[], options?: {
8464
+ taskIds?: string[];
8465
+ scope?: MemoryScope;
8466
+ pinned?: boolean;
8467
+ }): Promise<void>;
7882
8468
  /**
7883
- * Natural language completion criteria.
7884
- * These are evaluated by LLM self-reflection to determine if the task is complete.
7885
- * Examples:
7886
- * - "The response contains at least 3 specific examples"
7887
- * - "User's email has been validated and stored in memory"
7888
- * - "All requested data fields are present in the output"
8469
+ * Clean up raw data after summary/findings are created
7889
8470
  *
7890
- * This is the RECOMMENDED approach for flexible, intelligent validation.
8471
+ * Call this after creating summaries to free up memory used by raw data.
8472
+ * Only deletes entries in the 'raw' tier.
8473
+ *
8474
+ * @param derivedFromKeys - Keys to delete (typically from derivedFrom metadata)
8475
+ * @returns Number of entries deleted
7891
8476
  */
7892
- completionCriteria?: string[];
8477
+ cleanupRawData(derivedFromKeys: string[]): Promise<number>;
7893
8478
  /**
7894
- * Minimum completeness score (0-100) to consider task successful.
7895
- * LLM self-reflection returns a score; if below this threshold:
7896
- * - If requireUserApproval is set, ask user
7897
- * - Otherwise, follow the mode setting (strict = fail, warn = continue)
7898
- * Default: 80
8479
+ * Get all entries by tier
8480
+ *
8481
+ * @param tier - The tier to filter by
8482
+ * @returns Array of entries in that tier
7899
8483
  */
7900
- minCompletionScore?: number;
8484
+ getByTier(tier: MemoryTier): Promise<MemoryEntry[]>;
7901
8485
  /**
7902
- * When to require user approval:
7903
- * - 'never': Never ask user, use automated decision (default)
7904
- * - 'uncertain': Ask user when score is between minCompletionScore and minCompletionScore + 15
7905
- * - 'always': Always ask user to confirm task completion
8486
+ * Promote an entry to a higher tier
8487
+ *
8488
+ * Changes the key prefix and updates priority.
8489
+ * Use this when raw data becomes more valuable (e.g., frequently accessed).
8490
+ *
8491
+ * @param key - Current key (with tier prefix)
8492
+ * @param toTier - Target tier to promote to
8493
+ * @returns New key with updated prefix
7906
8494
  */
7907
- requireUserApproval?: 'never' | 'uncertain' | 'always';
8495
+ promote(key: string, toTier: MemoryTier): Promise<string>;
7908
8496
  /**
7909
- * Memory keys that must exist after task completion.
7910
- * If the task should store data in memory, list the required keys here.
7911
- * This is a hard requirement checked BEFORE LLM reflection.
8497
+ * Get tier statistics
8498
+ *
8499
+ * @returns Count and size by tier
7912
8500
  */
7913
- requiredMemoryKeys?: string[];
8501
+ getTierStats(): Promise<Record<MemoryTier, {
8502
+ count: number;
8503
+ sizeBytes: number;
8504
+ }>>;
7914
8505
  /**
7915
- * Custom validation function name (registered via validateTask hook).
7916
- * The hook will be called with this identifier to dispatch to the right validator.
7917
- * Runs AFTER LLM reflection, can override the result.
8506
+ * Get statistics about memory usage
7918
8507
  */
7919
- customValidator?: string;
8508
+ getStats(): Promise<{
8509
+ totalEntries: number;
8510
+ totalSizeBytes: number;
8511
+ utilizationPercent: number;
8512
+ byPriority: Record<MemoryPriority, number>;
8513
+ pinnedCount: number;
8514
+ }>;
7920
8515
  /**
7921
- * Validation mode:
7922
- * - 'strict': Validation failure marks task as failed (default)
7923
- * - 'warn': Validation failure logs warning but task still completes
8516
+ * Get the configured memory limit
7924
8517
  */
7925
- mode?: 'strict' | 'warn';
8518
+ getLimit(): number;
7926
8519
  /**
7927
- * Skip LLM self-reflection validation.
7928
- * Set to true if you only want programmatic validation (memory keys, hooks).
7929
- * Default: false (reflection is enabled when completionCriteria is set)
8520
+ * Check if the WorkingMemory instance has been destroyed
7930
8521
  */
7931
- skipReflection?: boolean;
7932
- }
7933
- /**
7934
- * Result of task validation (returned by LLM reflection)
7935
- */
7936
- interface TaskValidationResult {
7937
- /** Whether the task is considered complete */
7938
- isComplete: boolean;
7939
- /** Completeness score from 0-100 */
7940
- completionScore: number;
7941
- /** LLM's explanation of why the task is/isn't complete */
7942
- explanation: string;
7943
- /** Per-criterion evaluation results */
7944
- criteriaResults?: Array<{
7945
- criterion: string;
7946
- met: boolean;
7947
- evidence?: string;
7948
- }>;
7949
- /** Whether user approval is needed */
7950
- requiresUserApproval: boolean;
7951
- /** Reason for requiring user approval */
7952
- approvalReason?: string;
7953
- }
7954
- /**
7955
- * A single unit of work
7956
- */
7957
- interface Task {
7958
- id: string;
7959
- name: string;
7960
- description: string;
7961
- status: TaskStatus;
7962
- /** Tasks that must complete before this one (task IDs) */
7963
- dependsOn: string[];
7964
- /** External dependency (if waiting on external event) */
7965
- externalDependency?: ExternalDependency;
7966
- /** Condition for execution */
7967
- condition?: TaskCondition;
7968
- /** Execution settings */
7969
- execution?: TaskExecution;
7970
- /** Completion validation settings */
7971
- validation?: TaskValidation;
7972
- /** Optional expected output description */
7973
- expectedOutput?: string;
7974
- /** Result after completion */
7975
- result?: {
7976
- success: boolean;
7977
- output?: unknown;
7978
- error?: string;
7979
- /** Validation score (0-100) if validation was performed */
7980
- validationScore?: number;
7981
- /** Explanation of validation result */
7982
- validationExplanation?: string;
7983
- };
7984
- /** Timestamps */
7985
- createdAt: number;
7986
- startedAt?: number;
7987
- completedAt?: number;
7988
- lastUpdatedAt: number;
7989
- /** Retry tracking */
7990
- attempts: number;
7991
- maxAttempts: number;
7992
- /** Metadata for extensions */
7993
- metadata?: Record<string, unknown>;
7994
- }
7995
- /**
7996
- * Input for creating a task
7997
- */
7998
- interface TaskInput {
7999
- id?: string;
8000
- name: string;
8001
- description: string;
8002
- dependsOn?: string[];
8003
- externalDependency?: ExternalDependency;
8004
- condition?: TaskCondition;
8005
- execution?: TaskExecution;
8006
- validation?: TaskValidation;
8007
- expectedOutput?: string;
8008
- maxAttempts?: number;
8009
- metadata?: Record<string, unknown>;
8010
- }
8011
- /**
8012
- * Plan concurrency settings
8013
- */
8014
- interface PlanConcurrency {
8015
- maxParallelTasks: number;
8016
- strategy: 'fifo' | 'priority' | 'shortest-first';
8522
+ get isDestroyed(): boolean;
8017
8523
  /**
8018
- * How to handle failures when executing tasks in parallel
8019
- * - 'fail-fast': Stop on first failure (Promise.all behavior) - DEFAULT
8020
- * - 'continue': Continue other tasks on failure, mark failed ones
8021
- * - 'fail-all': Wait for all to complete, then report all failures together
8524
+ * Destroy the WorkingMemory instance
8525
+ * Removes all event listeners and clears internal state
8022
8526
  */
8023
- failureMode?: 'fail-fast' | 'continue' | 'fail-all';
8024
- }
8025
- /**
8026
- * Execution plan - a goal with steps to achieve it
8027
- */
8028
- interface Plan {
8029
- id: string;
8030
- goal: string;
8031
- context?: string;
8032
- tasks: Task[];
8033
- /** Concurrency settings */
8034
- concurrency?: PlanConcurrency;
8035
- /** Can agent modify the plan? */
8036
- allowDynamicTasks: boolean;
8037
- /** Plan status */
8038
- status: PlanStatus;
8039
- /** Why is the plan suspended? */
8040
- suspendedReason?: {
8041
- type: 'waiting_external' | 'manual_pause' | 'error';
8042
- taskId?: string;
8043
- message?: string;
8044
- };
8045
- /** Timestamps */
8046
- createdAt: number;
8047
- startedAt?: number;
8048
- completedAt?: number;
8049
- lastUpdatedAt: number;
8050
- /** For resume: which task to continue from */
8051
- currentTaskId?: string;
8052
- /** Metadata */
8053
- metadata?: Record<string, unknown>;
8054
- }
8055
- /**
8056
- * Input for creating a plan
8057
- */
8058
- interface PlanInput {
8059
- goal: string;
8060
- context?: string;
8061
- tasks: TaskInput[];
8062
- concurrency?: PlanConcurrency;
8063
- allowDynamicTasks?: boolean;
8064
- metadata?: Record<string, unknown>;
8065
- /** Skip dependency cycle detection (default: false) */
8066
- skipCycleCheck?: boolean;
8067
- }
8068
- /**
8069
- * Memory access interface for condition evaluation
8070
- */
8071
- interface ConditionMemoryAccess {
8072
- get(key: string): Promise<unknown>;
8527
+ destroy(): void;
8528
+ /**
8529
+ * Serialize all memory entries for persistence
8530
+ *
8531
+ * Returns a serializable representation of all memory entries
8532
+ * that can be saved to storage and restored later.
8533
+ *
8534
+ * @returns Serialized memory state
8535
+ */
8536
+ serialize(): Promise<SerializedMemory>;
8537
+ /**
8538
+ * Restore memory entries from serialized state
8539
+ *
8540
+ * Clears existing memory and repopulates from the serialized state.
8541
+ * Timestamps are reset to current time.
8542
+ *
8543
+ * @param state - Previously serialized memory state
8544
+ */
8545
+ restore(state: SerializedMemory): Promise<void>;
8073
8546
  }
8074
- /**
8075
- * Create a task with defaults
8076
- */
8077
- declare function createTask(input: TaskInput): Task;
8078
- /**
8079
- * Create a plan with tasks
8080
- * @throws {DependencyCycleError} If circular dependencies detected (unless skipCycleCheck is true)
8081
- */
8082
- declare function createPlan(input: PlanInput): Plan;
8083
- /**
8084
- * Check if a task can be executed (dependencies met, status is pending)
8085
- */
8086
- declare function canTaskExecute(task: Task, allTasks: Task[]): boolean;
8087
- /**
8088
- * Get the next tasks that can be executed
8089
- */
8090
- declare function getNextExecutableTasks(plan: Plan): Task[];
8091
- /**
8092
- * Evaluate a task condition against memory
8093
- */
8094
- declare function evaluateCondition(condition: TaskCondition, memory: ConditionMemoryAccess): Promise<boolean>;
8095
- /**
8096
- * Update task status and timestamps
8097
- */
8098
- declare function updateTaskStatus(task: Task, status: TaskStatus): Task;
8099
- /**
8100
- * Check if a task is blocked by dependencies
8101
- */
8102
- declare function isTaskBlocked(task: Task, allTasks: Task[]): boolean;
8103
- /**
8104
- * Get the dependency tasks for a task
8105
- */
8106
- declare function getTaskDependencies(task: Task, allTasks: Task[]): Task[];
8107
- /**
8108
- * Resolve task name dependencies to task IDs
8109
- * Modifies taskInputs in place
8110
- */
8111
- declare function resolveDependencies(taskInputs: TaskInput[], tasks: Task[]): void;
8112
- /**
8113
- * Detect dependency cycles in tasks using depth-first search
8114
- * @param tasks Array of tasks with resolved dependencies (IDs, not names)
8115
- * @returns Array of task IDs forming the cycle (e.g., ['A', 'B', 'C', 'A']), or null if no cycle
8116
- */
8117
- declare function detectDependencyCycle(tasks: Task[]): string[] | null;
8118
8547
 
8119
8548
  /**
8120
8549
  * ExternalDependencyHandler - handles external dependencies
@@ -9544,14 +9973,15 @@ declare function createFileMediaStorage(config?: FileMediaStorageConfig): FileMe
9544
9973
  /**
9545
9974
  * FileCustomToolStorage - File-based storage for custom tool definitions
9546
9975
  *
9547
- * Stores custom tools as JSON files on disk.
9548
- * Path: ~/.oneringai/custom-tools/<sanitized-name>.json
9976
+ * Stores custom tools as JSON files on disk with per-user isolation.
9977
+ * Path: ~/.oneringai/users/<userId>/custom-tools/<sanitized-name>.json
9549
9978
  *
9550
9979
  * Features:
9980
+ * - Per-user isolation (multi-tenant safe)
9551
9981
  * - Cross-platform path handling
9552
9982
  * - Safe name sanitization
9553
9983
  * - Atomic file operations (write to .tmp then rename)
9554
- * - Index file for fast listing
9984
+ * - Per-user index file for fast listing
9555
9985
  * - Search support (case-insensitive substring on name + description)
9556
9986
  */
9557
9987
 
@@ -9559,48 +9989,60 @@ declare function createFileMediaStorage(config?: FileMediaStorageConfig): FileMe
9559
9989
  * Configuration for FileCustomToolStorage
9560
9990
  */
9561
9991
  interface FileCustomToolStorageConfig {
9562
- /** Override the base directory (default: ~/.oneringai/custom-tools) */
9992
+ /** Override the base directory (default: ~/.oneringai/users) */
9563
9993
  baseDirectory?: string;
9564
9994
  /** Pretty-print JSON (default: true) */
9565
9995
  prettyPrint?: boolean;
9566
9996
  }
9567
9997
  /**
9568
9998
  * File-based storage for custom tool definitions
9999
+ *
10000
+ * Single instance handles all users. UserId is passed to each method.
9569
10001
  */
9570
10002
  declare class FileCustomToolStorage implements ICustomToolStorage {
9571
10003
  private readonly baseDirectory;
9572
- private readonly indexPath;
9573
10004
  private readonly prettyPrint;
9574
- private index;
9575
10005
  constructor(config?: FileCustomToolStorageConfig);
10006
+ /**
10007
+ * Get the directory path for a specific user's custom tools
10008
+ */
10009
+ private getUserDirectory;
10010
+ /**
10011
+ * Get the index file path for a specific user
10012
+ */
10013
+ private getUserIndexPath;
10014
+ /**
10015
+ * Get the tool file path for a specific user
10016
+ */
10017
+ private getToolPath;
9576
10018
  /**
9577
10019
  * Save a custom tool definition
9578
10020
  */
9579
- save(definition: CustomToolDefinition): Promise<void>;
10021
+ save(userId: string | undefined, definition: CustomToolDefinition): Promise<void>;
9580
10022
  /**
9581
10023
  * Load a custom tool definition by name
9582
10024
  */
9583
- load(name: string): Promise<CustomToolDefinition | null>;
10025
+ load(userId: string | undefined, name: string): Promise<CustomToolDefinition | null>;
9584
10026
  /**
9585
10027
  * Delete a custom tool definition
9586
10028
  */
9587
- delete(name: string): Promise<void>;
10029
+ delete(userId: string | undefined, name: string): Promise<void>;
9588
10030
  /**
9589
10031
  * Check if a custom tool exists
9590
10032
  */
9591
- exists(name: string): Promise<boolean>;
10033
+ exists(userId: string | undefined, name: string): Promise<boolean>;
9592
10034
  /**
9593
10035
  * List custom tools (summaries only)
9594
10036
  */
9595
- list(options?: CustomToolListOptions): Promise<CustomToolSummary[]>;
10037
+ list(userId: string | undefined, options?: CustomToolListOptions): Promise<CustomToolSummary[]>;
9596
10038
  /**
9597
10039
  * Update metadata without loading full definition
9598
10040
  */
9599
- updateMetadata(name: string, metadata: Record<string, unknown>): Promise<void>;
10041
+ updateMetadata(userId: string | undefined, name: string, metadata: Record<string, unknown>): Promise<void>;
9600
10042
  /**
9601
- * Get storage path
10043
+ * Get storage path for a specific user
9602
10044
  */
9603
- getPath(): string;
10045
+ getPath(userId: string | undefined): string;
9604
10046
  private ensureDirectory;
9605
10047
  private loadIndex;
9606
10048
  private saveIndex;
@@ -9613,6 +10055,138 @@ declare class FileCustomToolStorage implements ICustomToolStorage {
9613
10055
  */
9614
10056
  declare function createFileCustomToolStorage(config?: FileCustomToolStorageConfig): FileCustomToolStorage;
9615
10057
 
10058
+ /**
10059
+ * FileUserInfoStorage - File-based storage for user information
10060
+ *
10061
+ * Stores user information as a JSON file on disk.
10062
+ * Path: ~/.oneringai/users/<userId>/user_info.json
10063
+ * Windows: %APPDATA%/oneringai/users/<userId>/user_info.json
10064
+ *
10065
+ * Features:
10066
+ * - Cross-platform path handling
10067
+ * - Safe user ID sanitization
10068
+ * - Atomic file operations
10069
+ * - Automatic directory creation
10070
+ * - Multi-user support (one storage instance for all users)
10071
+ */
10072
+
10073
+ /**
10074
+ * Configuration for FileUserInfoStorage
10075
+ */
10076
+ interface FileUserInfoStorageConfig {
10077
+ /** Override the base directory (default: ~/.oneringai/users) */
10078
+ baseDirectory?: string;
10079
+ /** Override the filename (default: user_info.json) */
10080
+ filename?: string;
10081
+ }
10082
+ /**
10083
+ * File-based storage for user information
10084
+ *
10085
+ * Single instance handles all users. UserId is passed to each method.
10086
+ */
10087
+ declare class FileUserInfoStorage implements IUserInfoStorage {
10088
+ private readonly baseDirectory;
10089
+ private readonly filename;
10090
+ constructor(config?: FileUserInfoStorageConfig);
10091
+ /**
10092
+ * Get the directory path for a specific user
10093
+ */
10094
+ private getUserDirectory;
10095
+ /**
10096
+ * Get the file path for a specific user
10097
+ */
10098
+ private getUserFilePath;
10099
+ /**
10100
+ * Load user info entries from file for a specific user
10101
+ */
10102
+ load(userId: string | undefined): Promise<UserInfoEntry[] | null>;
10103
+ /**
10104
+ * Save user info entries to file for a specific user
10105
+ * Creates directory if it doesn't exist.
10106
+ */
10107
+ save(userId: string | undefined, entries: UserInfoEntry[]): Promise<void>;
10108
+ /**
10109
+ * Delete user info file for a specific user
10110
+ */
10111
+ delete(userId: string | undefined): Promise<void>;
10112
+ /**
10113
+ * Check if user info file exists for a specific user
10114
+ */
10115
+ exists(userId: string | undefined): Promise<boolean>;
10116
+ /**
10117
+ * Get the file path for a specific user (for display/debugging)
10118
+ */
10119
+ getPath(userId: string | undefined): string;
10120
+ /**
10121
+ * Ensure the directory exists
10122
+ */
10123
+ private ensureDirectory;
10124
+ }
10125
+
10126
+ /**
10127
+ * FileRoutineDefinitionStorage - File-based storage for routine definitions.
10128
+ *
10129
+ * Stores routines as JSON files on disk with per-user isolation.
10130
+ * Path: ~/.oneringai/users/<userId>/routines/<sanitized-id>.json
10131
+ *
10132
+ * Features:
10133
+ * - Per-user isolation (multi-tenant safe)
10134
+ * - Cross-platform path handling
10135
+ * - Safe ID sanitization
10136
+ * - Atomic file operations (write to .tmp then rename)
10137
+ * - Per-user index file for fast listing/filtering
10138
+ * - Index auto-rebuild if missing
10139
+ */
10140
+
10141
+ /**
10142
+ * Configuration for FileRoutineDefinitionStorage
10143
+ */
10144
+ interface FileRoutineDefinitionStorageConfig {
10145
+ /** Override the base directory (default: ~/.oneringai/users) */
10146
+ baseDirectory?: string;
10147
+ /** Pretty-print JSON (default: true) */
10148
+ prettyPrint?: boolean;
10149
+ }
10150
+ /**
10151
+ * File-based storage for routine definitions.
10152
+ *
10153
+ * Single instance handles all users. UserId is passed to each method.
10154
+ */
10155
+ declare class FileRoutineDefinitionStorage implements IRoutineDefinitionStorage {
10156
+ private readonly baseDirectory;
10157
+ private readonly prettyPrint;
10158
+ constructor(config?: FileRoutineDefinitionStorageConfig);
10159
+ private getUserDirectory;
10160
+ private getIndexPath;
10161
+ private getRoutinePath;
10162
+ save(userId: string | undefined, definition: RoutineDefinition): Promise<void>;
10163
+ load(userId: string | undefined, id: string): Promise<RoutineDefinition | null>;
10164
+ delete(userId: string | undefined, id: string): Promise<void>;
10165
+ exists(userId: string | undefined, id: string): Promise<boolean>;
10166
+ list(userId: string | undefined, options?: {
10167
+ tags?: string[];
10168
+ search?: string;
10169
+ limit?: number;
10170
+ offset?: number;
10171
+ }): Promise<RoutineDefinition[]>;
10172
+ getPath(userId: string | undefined): string;
10173
+ private ensureDirectory;
10174
+ private loadIndex;
10175
+ private saveIndex;
10176
+ private updateIndex;
10177
+ private removeFromIndex;
10178
+ private definitionToIndexEntry;
10179
+ /**
10180
+ * Rebuild index by scanning directory for .json files (excluding _index.json).
10181
+ * Returns empty index if directory doesn't exist.
10182
+ */
10183
+ private rebuildIndex;
10184
+ }
10185
+ /**
10186
+ * Create a FileRoutineDefinitionStorage with default configuration
10187
+ */
10188
+ declare function createFileRoutineDefinitionStorage(config?: FileRoutineDefinitionStorageConfig): FileRoutineDefinitionStorage;
10189
+
9616
10190
  /**
9617
10191
  * Video Model Registry
9618
10192
  *
@@ -12895,6 +13469,259 @@ interface CreatePRArgs {
12895
13469
  */
12896
13470
  declare function createCreatePRTool(connector: Connector, userId?: string): ToolFunction<CreatePRArgs, GitHubCreatePRResult>;
12897
13471
 
13472
+ /**
13473
+ * Microsoft Graph Tools - Shared Types and Helpers
13474
+ *
13475
+ * Foundation for all Microsoft Graph connector tools.
13476
+ * Provides authenticated fetch, delegated/app mode switching, and result types.
13477
+ */
13478
+
13479
+ /**
13480
+ * Get the user path prefix for Microsoft Graph API requests.
13481
+ *
13482
+ * - OAuth `authorization_code` flow (delegated): returns `/me` (ignores targetUser)
13483
+ * - OAuth `client_credentials` flow (application): returns `/users/${targetUser}` (requires targetUser)
13484
+ * - API key / other: returns `/me`
13485
+ */
13486
+ declare function getUserPathPrefix(connector: Connector, targetUser?: string): string;
13487
+ /**
13488
+ * Options for microsoftFetch
13489
+ */
13490
+ interface MicrosoftFetchOptions {
13491
+ method?: string;
13492
+ body?: unknown;
13493
+ userId?: string;
13494
+ queryParams?: Record<string, string | number | boolean>;
13495
+ accept?: string;
13496
+ }
13497
+ /**
13498
+ * Make an authenticated Microsoft Graph API request through the connector.
13499
+ *
13500
+ * Adds standard headers and parses JSON response.
13501
+ * Handles empty response bodies (e.g., sendMail returns 202 with no body).
13502
+ * Throws MicrosoftAPIError on non-ok responses.
13503
+ */
13504
+ declare function microsoftFetch<T = unknown>(connector: Connector, endpoint: string, options?: MicrosoftFetchOptions): Promise<T>;
13505
+ /**
13506
+ * Normalize an email array from any format the LLM might send into plain strings.
13507
+ *
13508
+ * Accepts:
13509
+ * - Plain strings: `["alice@contoso.com"]`
13510
+ * - Graph recipient objects: `[{ emailAddress: { address: "alice@contoso.com" } }]`
13511
+ * - Graph attendee objects: `[{ emailAddress: { address: "alice@contoso.com", name: "Alice" }, type: "required" }]`
13512
+ * - Bare email objects: `[{ address: "alice@contoso.com" }]` or `[{ email: "alice@contoso.com" }]`
13513
+ *
13514
+ * Always returns `string[]` of email addresses.
13515
+ */
13516
+ declare function normalizeEmails(input: unknown[]): string[];
13517
+ /**
13518
+ * Convert an array of email addresses (any format) to Microsoft Graph recipient format.
13519
+ * Normalizes input first, so it's safe to pass LLM output directly.
13520
+ */
13521
+ declare function formatRecipients(emails: unknown[]): {
13522
+ emailAddress: {
13523
+ address: string;
13524
+ };
13525
+ }[];
13526
+ /**
13527
+ * Convert an array of email addresses (any format) to Microsoft Graph attendee format.
13528
+ * Normalizes input first, so it's safe to pass LLM output directly.
13529
+ */
13530
+ declare function formatAttendees(emails: unknown[]): {
13531
+ emailAddress: {
13532
+ address: string;
13533
+ };
13534
+ type: string;
13535
+ }[];
13536
+ /**
13537
+ * Check if a meeting ID input is a Teams join URL.
13538
+ *
13539
+ * Teams join URLs look like:
13540
+ * - `https://teams.microsoft.com/l/meetup-join/19%3ameeting_...`
13541
+ * - `https://teams.live.com/l/meetup-join/...`
13542
+ *
13543
+ * IMPORTANT: A Teams join URL does NOT contain the Graph API meeting ID.
13544
+ * To resolve a URL to a meeting ID, use `resolveMeetingId()` which calls
13545
+ * `GET /me/onlineMeetings?$filter=JoinWebUrl eq '{url}'`.
13546
+ */
13547
+ declare function isTeamsMeetingUrl(input: string): boolean;
13548
+ /**
13549
+ * Resolve a meeting input (ID or Teams URL) to a Graph API online meeting ID.
13550
+ *
13551
+ * - Raw meeting IDs are passed through as-is
13552
+ * - Teams join URLs are resolved via `GET /me/onlineMeetings?$filter=JoinWebUrl eq '{url}'`
13553
+ *
13554
+ * @returns The resolved meeting ID and optional subject
13555
+ * @throws Error if the URL cannot be resolved or input is empty
13556
+ */
13557
+ declare function resolveMeetingId(connector: Connector, input: string, prefix: string, effectiveUserId?: string): Promise<{
13558
+ meetingId: string;
13559
+ subject?: string;
13560
+ }>;
13561
+ interface MicrosoftDraftEmailResult {
13562
+ success: boolean;
13563
+ draftId?: string;
13564
+ webLink?: string;
13565
+ error?: string;
13566
+ }
13567
+ interface MicrosoftSendEmailResult {
13568
+ success: boolean;
13569
+ error?: string;
13570
+ }
13571
+ interface MicrosoftCreateMeetingResult {
13572
+ success: boolean;
13573
+ eventId?: string;
13574
+ webLink?: string;
13575
+ onlineMeetingUrl?: string;
13576
+ error?: string;
13577
+ }
13578
+ interface MicrosoftEditMeetingResult {
13579
+ success: boolean;
13580
+ eventId?: string;
13581
+ webLink?: string;
13582
+ error?: string;
13583
+ }
13584
+ interface MicrosoftGetTranscriptResult {
13585
+ success: boolean;
13586
+ transcript?: string;
13587
+ meetingSubject?: string;
13588
+ error?: string;
13589
+ }
13590
+ interface MicrosoftFindSlotsResult {
13591
+ success: boolean;
13592
+ slots?: MeetingSlotSuggestion[];
13593
+ emptySuggestionsReason?: string;
13594
+ error?: string;
13595
+ }
13596
+ interface MeetingSlotSuggestion {
13597
+ start: string;
13598
+ end: string;
13599
+ confidence: string;
13600
+ attendeeAvailability: {
13601
+ attendee: string;
13602
+ availability: string;
13603
+ }[];
13604
+ }
13605
+
13606
+ /**
13607
+ * Microsoft Graph - Create Draft Email Tool
13608
+ *
13609
+ * Create a draft email or draft reply in the user's mailbox.
13610
+ */
13611
+
13612
+ interface CreateDraftEmailArgs {
13613
+ to: string[];
13614
+ subject: string;
13615
+ body: string;
13616
+ cc?: string[];
13617
+ replyToMessageId?: string;
13618
+ targetUser?: string;
13619
+ }
13620
+ /**
13621
+ * Create a Microsoft Graph create_draft_email tool
13622
+ */
13623
+ declare function createDraftEmailTool(connector: Connector, userId?: string): ToolFunction<CreateDraftEmailArgs, MicrosoftDraftEmailResult>;
13624
+
13625
+ /**
13626
+ * Microsoft Graph - Send Email Tool
13627
+ *
13628
+ * Send an email or reply to an existing message.
13629
+ */
13630
+
13631
+ interface SendEmailArgs {
13632
+ to: string[];
13633
+ subject: string;
13634
+ body: string;
13635
+ cc?: string[];
13636
+ replyToMessageId?: string;
13637
+ targetUser?: string;
13638
+ }
13639
+ /**
13640
+ * Create a Microsoft Graph send_email tool
13641
+ */
13642
+ declare function createSendEmailTool(connector: Connector, userId?: string): ToolFunction<SendEmailArgs, MicrosoftSendEmailResult>;
13643
+
13644
+ /**
13645
+ * Microsoft Graph - Create Meeting Tool
13646
+ *
13647
+ * Create a calendar event with optional Teams online meeting.
13648
+ */
13649
+
13650
+ interface CreateMeetingArgs {
13651
+ subject: string;
13652
+ startDateTime: string;
13653
+ endDateTime: string;
13654
+ attendees: string[];
13655
+ body?: string;
13656
+ isOnlineMeeting?: boolean;
13657
+ location?: string;
13658
+ timeZone?: string;
13659
+ targetUser?: string;
13660
+ }
13661
+ /**
13662
+ * Create a Microsoft Graph create_meeting tool
13663
+ */
13664
+ declare function createMeetingTool(connector: Connector, userId?: string): ToolFunction<CreateMeetingArgs, MicrosoftCreateMeetingResult>;
13665
+
13666
+ /**
13667
+ * Microsoft Graph - Edit Meeting Tool
13668
+ *
13669
+ * Update an existing calendar event.
13670
+ */
13671
+
13672
+ interface EditMeetingArgs {
13673
+ eventId: string;
13674
+ subject?: string;
13675
+ startDateTime?: string;
13676
+ endDateTime?: string;
13677
+ attendees?: string[];
13678
+ body?: string;
13679
+ isOnlineMeeting?: boolean;
13680
+ location?: string;
13681
+ timeZone?: string;
13682
+ targetUser?: string;
13683
+ }
13684
+ /**
13685
+ * Create a Microsoft Graph edit_meeting tool
13686
+ */
13687
+ declare function createEditMeetingTool(connector: Connector, userId?: string): ToolFunction<EditMeetingArgs, MicrosoftEditMeetingResult>;
13688
+
13689
+ /**
13690
+ * Microsoft Graph - Get Meeting Transcript Tool
13691
+ *
13692
+ * Retrieve the transcript from a Teams online meeting.
13693
+ * Requires OnlineMeetingTranscript.Read.All permission.
13694
+ */
13695
+
13696
+ interface GetMeetingTranscriptArgs {
13697
+ meetingId: string;
13698
+ targetUser?: string;
13699
+ }
13700
+ /**
13701
+ * Create a Microsoft Graph get_meeting_transcript tool
13702
+ */
13703
+ declare function createGetMeetingTranscriptTool(connector: Connector, userId?: string): ToolFunction<GetMeetingTranscriptArgs, MicrosoftGetTranscriptResult>;
13704
+
13705
+ /**
13706
+ * Microsoft Graph - Find Meeting Slots Tool
13707
+ *
13708
+ * Find available meeting time slots for a set of attendees.
13709
+ */
13710
+
13711
+ interface FindMeetingSlotsArgs {
13712
+ attendees: string[];
13713
+ startDateTime: string;
13714
+ endDateTime: string;
13715
+ duration: number;
13716
+ timeZone?: string;
13717
+ maxResults?: number;
13718
+ targetUser?: string;
13719
+ }
13720
+ /**
13721
+ * Create a Microsoft Graph find_meeting_slots tool
13722
+ */
13723
+ declare function createFindMeetingSlotsTool(connector: Connector, userId?: string): ToolFunction<FindMeetingSlotsArgs, MicrosoftFindSlotsResult>;
13724
+
12898
13725
  /**
12899
13726
  * Desktop Automation Tools - Types
12900
13727
  *
@@ -13273,7 +14100,7 @@ declare const desktopTools: (ToolFunction<DesktopScreenshotArgs, DesktopScreensh
13273
14100
  * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
13274
14101
  *
13275
14102
  * Generated by: scripts/generate-tool-registry.ts
13276
- * Generated at: 2026-02-18T21:07:52.434Z
14103
+ * Generated at: 2026-02-20T17:46:07.292Z
13277
14104
  *
13278
14105
  * To regenerate: npm run generate:tools
13279
14106
  */
@@ -13712,6 +14539,13 @@ type index_IDesktopDriver = IDesktopDriver;
13712
14539
  type index_IDocumentTransformer = IDocumentTransformer;
13713
14540
  type index_IFormatHandler = IFormatHandler;
13714
14541
  type index_ImageFilterOptions = ImageFilterOptions;
14542
+ type index_MeetingSlotSuggestion = MeetingSlotSuggestion;
14543
+ type index_MicrosoftCreateMeetingResult = MicrosoftCreateMeetingResult;
14544
+ type index_MicrosoftDraftEmailResult = MicrosoftDraftEmailResult;
14545
+ type index_MicrosoftEditMeetingResult = MicrosoftEditMeetingResult;
14546
+ type index_MicrosoftFindSlotsResult = MicrosoftFindSlotsResult;
14547
+ type index_MicrosoftGetTranscriptResult = MicrosoftGetTranscriptResult;
14548
+ type index_MicrosoftSendEmailResult = MicrosoftSendEmailResult;
13715
14549
  type index_MouseButton = MouseButton;
13716
14550
  type index_NutTreeDriver = NutTreeDriver;
13717
14551
  declare const index_NutTreeDriver: typeof NutTreeDriver;
@@ -13746,19 +14580,25 @@ declare const index_createDesktopMouseScrollTool: typeof createDesktopMouseScrol
13746
14580
  declare const index_createDesktopScreenshotTool: typeof createDesktopScreenshotTool;
13747
14581
  declare const index_createDesktopWindowFocusTool: typeof createDesktopWindowFocusTool;
13748
14582
  declare const index_createDesktopWindowListTool: typeof createDesktopWindowListTool;
14583
+ declare const index_createDraftEmailTool: typeof createDraftEmailTool;
13749
14584
  declare const index_createEditFileTool: typeof createEditFileTool;
14585
+ declare const index_createEditMeetingTool: typeof createEditMeetingTool;
13750
14586
  declare const index_createExecuteJavaScriptTool: typeof createExecuteJavaScriptTool;
14587
+ declare const index_createFindMeetingSlotsTool: typeof createFindMeetingSlotsTool;
14588
+ declare const index_createGetMeetingTranscriptTool: typeof createGetMeetingTranscriptTool;
13751
14589
  declare const index_createGetPRTool: typeof createGetPRTool;
13752
14590
  declare const index_createGitHubReadFileTool: typeof createGitHubReadFileTool;
13753
14591
  declare const index_createGlobTool: typeof createGlobTool;
13754
14592
  declare const index_createGrepTool: typeof createGrepTool;
13755
14593
  declare const index_createImageGenerationTool: typeof createImageGenerationTool;
13756
14594
  declare const index_createListDirectoryTool: typeof createListDirectoryTool;
14595
+ declare const index_createMeetingTool: typeof createMeetingTool;
13757
14596
  declare const index_createPRCommentsTool: typeof createPRCommentsTool;
13758
14597
  declare const index_createPRFilesTool: typeof createPRFilesTool;
13759
14598
  declare const index_createReadFileTool: typeof createReadFileTool;
13760
14599
  declare const index_createSearchCodeTool: typeof createSearchCodeTool;
13761
14600
  declare const index_createSearchFilesTool: typeof createSearchFilesTool;
14601
+ declare const index_createSendEmailTool: typeof createSendEmailTool;
13762
14602
  declare const index_createSpeechToTextTool: typeof createSpeechToTextTool;
13763
14603
  declare const index_createTextToSpeechTool: typeof createTextToSpeechTool;
13764
14604
  declare const index_createVideoTools: typeof createVideoTools;
@@ -13788,6 +14628,8 @@ declare const index_editFile: typeof editFile;
13788
14628
  declare const index_executeInVM: typeof executeInVM;
13789
14629
  declare const index_executeJavaScript: typeof executeJavaScript;
13790
14630
  declare const index_expandTilde: typeof expandTilde;
14631
+ declare const index_formatAttendees: typeof formatAttendees;
14632
+ declare const index_formatRecipients: typeof formatRecipients;
13791
14633
  declare const index_getAllBuiltInTools: typeof getAllBuiltInTools;
13792
14634
  declare const index_getBackgroundOutput: typeof getBackgroundOutput;
13793
14635
  declare const index_getDesktopDriver: typeof getDesktopDriver;
@@ -13798,19 +14640,24 @@ declare const index_getToolCategories: typeof getToolCategories;
13798
14640
  declare const index_getToolRegistry: typeof getToolRegistry;
13799
14641
  declare const index_getToolsByCategory: typeof getToolsByCategory;
13800
14642
  declare const index_getToolsRequiringConnector: typeof getToolsRequiringConnector;
14643
+ declare const index_getUserPathPrefix: typeof getUserPathPrefix;
13801
14644
  declare const index_glob: typeof glob;
13802
14645
  declare const index_grep: typeof grep;
13803
14646
  declare const index_hydrateCustomTool: typeof hydrateCustomTool;
13804
14647
  declare const index_isBlockedCommand: typeof isBlockedCommand;
13805
14648
  declare const index_isExcludedExtension: typeof isExcludedExtension;
14649
+ declare const index_isTeamsMeetingUrl: typeof isTeamsMeetingUrl;
13806
14650
  declare const index_jsonManipulator: typeof jsonManipulator;
13807
14651
  declare const index_killBackgroundProcess: typeof killBackgroundProcess;
13808
14652
  declare const index_listDirectory: typeof listDirectory;
13809
14653
  declare const index_mergeTextPieces: typeof mergeTextPieces;
14654
+ declare const index_microsoftFetch: typeof microsoftFetch;
14655
+ declare const index_normalizeEmails: typeof normalizeEmails;
13810
14656
  declare const index_parseKeyCombo: typeof parseKeyCombo;
13811
14657
  declare const index_parseRepository: typeof parseRepository;
13812
14658
  declare const index_readFile: typeof readFile;
13813
14659
  declare const index_resetDefaultDriver: typeof resetDefaultDriver;
14660
+ declare const index_resolveMeetingId: typeof resolveMeetingId;
13814
14661
  declare const index_resolveRepository: typeof resolveRepository;
13815
14662
  declare const index_setMediaOutputHandler: typeof setMediaOutputHandler;
13816
14663
  declare const index_setMediaStorage: typeof setMediaStorage;
@@ -13819,7 +14666,7 @@ declare const index_validatePath: typeof validatePath;
13819
14666
  declare const index_webFetch: typeof webFetch;
13820
14667
  declare const index_writeFile: typeof writeFile;
13821
14668
  declare namespace index {
13822
- export { type index_BashResult as BashResult, type index_ConnectorToolEntry as ConnectorToolEntry, index_ConnectorTools as ConnectorTools, type index_CustomToolMetaToolsOptions as CustomToolMetaToolsOptions, 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_HydrateOptions as HydrateOptions, 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_createCustomToolDelete as createCustomToolDelete, index_createCustomToolDraft as createCustomToolDraft, index_createCustomToolList as createCustomToolList, index_createCustomToolLoad as createCustomToolLoad, index_createCustomToolMetaTools as createCustomToolMetaTools, index_createCustomToolSave as createCustomToolSave, index_createCustomToolTest as createCustomToolTest, 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_customToolDelete as customToolDelete, index_customToolDraft as customToolDraft, index_customToolList as customToolList, index_customToolLoad as customToolLoad, index_customToolSave as customToolSave, index_customToolTest as customToolTest, 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_executeInVM as executeInVM, 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_hydrateCustomTool as hydrateCustomTool, 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 };
14669
+ export { type index_BashResult as BashResult, type index_ConnectorToolEntry as ConnectorToolEntry, index_ConnectorTools as ConnectorTools, type index_CustomToolMetaToolsOptions as CustomToolMetaToolsOptions, 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_HydrateOptions as HydrateOptions, 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_MeetingSlotSuggestion as MeetingSlotSuggestion, type index_MicrosoftCreateMeetingResult as MicrosoftCreateMeetingResult, type index_MicrosoftDraftEmailResult as MicrosoftDraftEmailResult, type index_MicrosoftEditMeetingResult as MicrosoftEditMeetingResult, type index_MicrosoftFindSlotsResult as MicrosoftFindSlotsResult, type index_MicrosoftGetTranscriptResult as MicrosoftGetTranscriptResult, type index_MicrosoftSendEmailResult as MicrosoftSendEmailResult, 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_createCustomToolDelete as createCustomToolDelete, index_createCustomToolDraft as createCustomToolDraft, index_createCustomToolList as createCustomToolList, index_createCustomToolLoad as createCustomToolLoad, index_createCustomToolMetaTools as createCustomToolMetaTools, index_createCustomToolSave as createCustomToolSave, index_createCustomToolTest as createCustomToolTest, 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_createDraftEmailTool as createDraftEmailTool, index_createEditFileTool as createEditFileTool, index_createEditMeetingTool as createEditMeetingTool, index_createExecuteJavaScriptTool as createExecuteJavaScriptTool, index_createFindMeetingSlotsTool as createFindMeetingSlotsTool, index_createGetMeetingTranscriptTool as createGetMeetingTranscriptTool, 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_createMeetingTool as createMeetingTool, index_createPRCommentsTool as createPRCommentsTool, index_createPRFilesTool as createPRFilesTool, index_createReadFileTool as createReadFileTool, index_createSearchCodeTool as createSearchCodeTool, index_createSearchFilesTool as createSearchFilesTool, index_createSendEmailTool as createSendEmailTool, 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_customToolDelete as customToolDelete, index_customToolDraft as customToolDraft, index_customToolList as customToolList, index_customToolLoad as customToolLoad, index_customToolSave as customToolSave, index_customToolTest as customToolTest, 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_executeInVM as executeInVM, index_executeJavaScript as executeJavaScript, index_expandTilde as expandTilde, index_formatAttendees as formatAttendees, index_formatRecipients as formatRecipients, 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_getUserPathPrefix as getUserPathPrefix, index_glob as glob, index_grep as grep, index_hydrateCustomTool as hydrateCustomTool, index_isBlockedCommand as isBlockedCommand, index_isExcludedExtension as isExcludedExtension, index_isTeamsMeetingUrl as isTeamsMeetingUrl, index_jsonManipulator as jsonManipulator, index_killBackgroundProcess as killBackgroundProcess, index_listDirectory as listDirectory, index_mergeTextPieces as mergeTextPieces, index_microsoftFetch as microsoftFetch, index_normalizeEmails as normalizeEmails, index_parseKeyCombo as parseKeyCombo, index_parseRepository as parseRepository, index_readFile as readFile, index_resetDefaultDriver as resetDefaultDriver, index_resolveMeetingId as resolveMeetingId, 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 };
13823
14670
  }
13824
14671
 
13825
14672
  /**
@@ -13874,4 +14721,4 @@ declare class ProviderConfigAgent {
13874
14721
  reset(): void;
13875
14722
  }
13876
14723
 
13877
- 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, CUSTOM_TOOL_DEFINITION_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, type CustomToolDefinition, type CustomToolListOptions, type CustomToolMetaToolsOptions, type CustomToolMetadata, type CustomToolSummary, type CustomToolTestCase, 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, FileCustomToolStorage, type FileCustomToolStorageConfig, 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 HydrateOptions, 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 ICustomToolStorage, 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 StorageConfig, type StorageContext, StorageRegistry, 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, type ToolSource, 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, createCustomToolDelete, createCustomToolDraft, createCustomToolList, createCustomToolLoad, createCustomToolMetaTools, createCustomToolSave, createCustomToolTest, createDesktopGetCursorTool, createDesktopGetScreenSizeTool, createDesktopKeyboardKeyTool, createDesktopKeyboardTypeTool, createDesktopMouseClickTool, createDesktopMouseDragTool, createDesktopMouseMoveTool, createDesktopMouseScrollTool, createDesktopScreenshotTool, createDesktopWindowFocusTool, createDesktopWindowListTool, createEditFileTool, createEstimator, createExecuteJavaScriptTool, createFileAgentDefinitionStorage, createFileContextStorage, createFileCustomToolStorage, createFileMediaStorage, createGetPRTool, createGitHubReadFileTool, createGlobTool, createGrepTool, createImageGenerationTool, createImageProvider, createListDirectoryTool, createMessageWithImages, createMetricsCollector, createPRCommentsTool, createPRFilesTool, createPlan, createProvider, createReadFileTool, createSearchCodeTool, createSearchFilesTool, createSpeechToTextTool, createTask, createTextMessage, createTextToSpeechTool, createVideoProvider, createVideoTools, createWriteFileTool, customToolDelete, customToolDraft, customToolList, customToolLoad, customToolSave, customToolTest, 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, hydrateCustomTool, isBlockedCommand, isExcludedExtension, isTaskBlocked, isTerminalStatus, killBackgroundProcess, listConnectorsByServiceTypes, listDirectory, listVendorIds, listVendors, listVendorsByAuthType, listVendorsByCategory, listVendorsWithLogos, logger, mergeTextPieces, metrics, parseKeyCombo, parseRepository, readClipboardImage, readDocumentAsContent, readFile, registerScrapeProvider, resetDefaultDriver, resolveConnector, resolveDependencies, resolveMaxContextTokens, resolveModelCapabilities, resolveRepository, retryWithBackoff, sanitizeToolName, setMediaOutputHandler, setMediaStorage, setMetricsCollector, simpleTokenEstimator, toConnectorOptions, toolRegistry, index as tools, updateTaskStatus, validatePath, writeFile };
14724
+ 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, CUSTOM_TOOL_DEFINITION_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, type CustomToolDefinition, type CustomToolListOptions, type CustomToolMetaToolsOptions, type CustomToolMetadata, type CustomToolSummary, type CustomToolTestCase, 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, type ExecuteRoutineOptions, ExecutionContext, ExecutionMetrics, type ExtendedFetchOptions, type ExternalDependency, type ExternalDependencyEvents, ExternalDependencyHandler, type FetchedContent, FileAgentDefinitionStorage, type FileAgentDefinitionStorageConfig, FileConnectorStorage, type FileConnectorStorageConfig, FileContextStorage, type FileContextStorageConfig, FileCustomToolStorage, type FileCustomToolStorageConfig, FileMediaStorage as FileMediaOutputHandler, FileMediaStorage, type FileMediaStorageConfig, FilePersistentInstructionsStorage, type FilePersistentInstructionsStorageConfig, FileRoutineDefinitionStorage, type FileRoutineDefinitionStorageConfig, FileStorage, type FileStorageConfig, FileUserInfoStorage, type FileUserInfoStorageConfig, 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, HookName, type HydrateOptions, 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 ICustomToolStorage, 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 IRoutineDefinitionStorage, 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 IUserInfoStorage, 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, type MeetingSlotSuggestion, MemoryConnectorStorage, MemoryEntry, MemoryEvictionCompactor, MemoryIndex, MemoryPriority, MemoryScope, MemoryStorage, MessageBuilder, MessageRole, type MetricTags, type MetricsCollector, type MetricsCollectorType, type MicrosoftCreateMeetingResult, type MicrosoftDraftEmailResult, type MicrosoftEditMeetingResult, type MicrosoftFindSlotsResult, type MicrosoftGetTranscriptResult, type MicrosoftSendEmailResult, 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, type RoutineDefinition, type RoutineDefinitionInput, type RoutineExecution, type RoutineExecutionStatus, 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 SerializedUserInfoState, type SerializedWorkingMemoryState, SerperProvider, ServiceCategory, type ServiceToolFactory, type ShellToolConfig, type SimpleIcon, type SimpleVideoGenerateOptions, type SourceCapabilities, type SourceResult, SpeechToText, type SpeechToTextConfig, type StdioTransportConfig, type StorageConfig, type StorageContext, StorageRegistry, 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, type ToolSource, ToolTimeoutError, type TransportConfig, TruncateCompactor, type UserInfoEntry, type UserInfoPluginConfig, UserInfoPluginNextGen, VENDOR_ICON_MAP, VIDEO_MODELS, VIDEO_MODEL_REGISTRY, type ValidationContext, 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, createCustomToolDelete, createCustomToolDraft, createCustomToolList, createCustomToolLoad, createCustomToolMetaTools, createCustomToolSave, createCustomToolTest, createDesktopGetCursorTool, createDesktopGetScreenSizeTool, createDesktopKeyboardKeyTool, createDesktopKeyboardTypeTool, createDesktopMouseClickTool, createDesktopMouseDragTool, createDesktopMouseMoveTool, createDesktopMouseScrollTool, createDesktopScreenshotTool, createDesktopWindowFocusTool, createDesktopWindowListTool, createDraftEmailTool, createEditFileTool, createEditMeetingTool, createEstimator, createExecuteJavaScriptTool, createFileAgentDefinitionStorage, createFileContextStorage, createFileCustomToolStorage, createFileMediaStorage, createFileRoutineDefinitionStorage, createFindMeetingSlotsTool, createGetMeetingTranscriptTool, createGetPRTool, createGitHubReadFileTool, createGlobTool, createGrepTool, createImageGenerationTool, createImageProvider, createListDirectoryTool, createMeetingTool, createMessageWithImages, createMetricsCollector, createPRCommentsTool, createPRFilesTool, createPlan, createProvider, createReadFileTool, createRoutineDefinition, createRoutineExecution, createSearchCodeTool, createSearchFilesTool, createSendEmailTool, createSpeechToTextTool, createTask, createTextMessage, createTextToSpeechTool, createVideoProvider, createVideoTools, createWriteFileTool, customToolDelete, customToolDraft, customToolList, customToolLoad, customToolSave, customToolTest, desktopGetCursor, desktopGetScreenSize, desktopKeyboardKey, desktopKeyboardType, desktopMouseClick, desktopMouseDrag, desktopMouseMove, desktopMouseScroll, desktopScreenshot, desktopTools, desktopWindowFocus, desktopWindowList, detectDependencyCycle, developerTools, documentToContent, editFile, evaluateCondition, executeRoutine, extractJSON, extractJSONField, extractNumber, findConnectorByServiceTypes, formatAttendees, formatRecipients, generateEncryptionKey, generateSimplePlan, generateWebAPITool, getActiveSTTModels, getActiveTTSModels, getActiveVideoModels, getAllBuiltInTools, getAllVendorLogos, getAllVendorTemplates, getBackgroundOutput, getConnectorTools, getCredentialsSetupURL, getDesktopDriver, getDocsURL, getMediaOutputHandler, getMediaStorage, getNextExecutableTasks, getRegisteredScrapeProviders, getRoutineProgress, getSTTModelInfo, getSTTModelsByVendor, getSTTModelsWithFeature, getTTSModelInfo, getTTSModelsByVendor, getTTSModelsWithFeature, getTaskDependencies, getToolByName, getToolCategories, getToolRegistry, getToolsByCategory, getToolsRequiringConnector, getUserPathPrefix, getVendorAuthTemplate, getVendorColor, getVendorDefaultBaseURL, getVendorInfo, getVendorLogo, getVendorLogoCdnUrl, getVendorLogoSvg, getVendorTemplate, getVideoModelInfo, getVideoModelsByVendor, getVideoModelsWithAudio, getVideoModelsWithFeature, glob, globalErrorHandler, grep, hasClipboardImage, hasVendorLogo, hydrateCustomTool, isBlockedCommand, isExcludedExtension, isTaskBlocked, isTeamsMeetingUrl, isTerminalStatus, killBackgroundProcess, listConnectorsByServiceTypes, listDirectory, listVendorIds, listVendors, listVendorsByAuthType, listVendorsByCategory, listVendorsWithLogos, logger, mergeTextPieces, metrics, microsoftFetch, normalizeEmails, parseKeyCombo, parseRepository, readClipboardImage, readDocumentAsContent, readFile, registerScrapeProvider, resetDefaultDriver, resolveConnector, resolveDependencies, resolveMaxContextTokens, resolveMeetingId, resolveModelCapabilities, resolveRepository, retryWithBackoff, sanitizeToolName, setMediaOutputHandler, setMediaStorage, setMetricsCollector, simpleTokenEstimator, toConnectorOptions, toolRegistry, index as tools, updateTaskStatus, validatePath, writeFile };