@everworker/oneringai 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -8
- package/dist/{IProvider-CNJqZItJ.d.cts → IProvider-B8sqUzJG.d.cts} +36 -6
- package/dist/{IProvider-B6hqVVq8.d.ts → IProvider-CxDUGl6n.d.ts} +36 -6
- package/dist/{ImageModel-B64HX3lN.d.cts → ImageModel-Ds5_6sf7.d.cts} +1 -1
- package/dist/{ImageModel-DU-y_WOb.d.ts → ImageModel-OWbA277F.d.ts} +1 -1
- package/dist/capabilities/agents/index.d.cts +2 -2
- package/dist/capabilities/agents/index.d.ts +2 -2
- package/dist/capabilities/images/index.cjs +251 -106
- package/dist/capabilities/images/index.cjs.map +1 -1
- package/dist/capabilities/images/index.d.cts +2 -2
- package/dist/capabilities/images/index.d.ts +2 -2
- package/dist/capabilities/images/index.js +251 -106
- package/dist/capabilities/images/index.js.map +1 -1
- package/dist/{index-9VOnAX17.d.ts → index-CEjKTeSb.d.cts} +857 -2
- package/dist/{index-BMjyFNJQ.d.cts → index-CzGnmqOs.d.ts} +857 -2
- package/dist/index.cjs +1303 -432
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +234 -904
- package/dist/index.d.ts +234 -904
- package/dist/index.js +1286 -417
- package/dist/index.js.map +1 -1
- package/dist/shared/index.cjs +9 -0
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.js +9 -0
- package/dist/shared/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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-
|
|
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-
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
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-B8sqUzJG.cjs';
|
|
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-B8sqUzJG.cjs';
|
|
3
|
+
import { C as ContextFeatures, M as MemoryEntry, a as MemoryScope, I as IContextStorage, T as Tool, b as ToolFunction, c as ToolContext, d as ToolPermissionConfig$1, e as ContextBudget$1, f as ToolCall, g as IContextPluginNextGen, W as WorkingMemoryConfig, P as PriorityCalculator, h as MemoryPriority, i as MemoryTier, j as ContextEvents, A as AgentContextNextGenConfig, k as AuthIdentity, l as ICompactionStrategy, B as BeforeCompactionCallback, m as InputItem, n as Content, o as PreparedContext, O as OutputItem, p as ToolResult, q as ConsolidationResult, S as SerializedContextState, r as StoredContextSession, s as ITextProvider, t as ContextSessionMetadata, F as FunctionToolDefinition, L as LLMResponse, u as StreamEvent, H as HookConfig, v as HistoryMode, w as AgentEvents, x as AgentResponse, E as ExecutionContext, y as ExecutionMetrics, z as AuditEntry, D as HookName, G as ITokenEstimator$1, J as CompactionContext, K as CompactionResult, N as StaleEntryInfo, Q as PriorityContext, R as MemoryIndex, U as TaskStatusForMemory, V as WorkingMemoryAccess, X as ContextStorageListOptions, Y as ContextSessionSummary, Z as TokenUsage, _ as StreamEventType, $ as TextGenerateOptions, a0 as ModelCapabilities, a1 as MessageRole } from './index-CEjKTeSb.cjs';
|
|
4
|
+
export { a2 as AfterToolContext, a3 as AgentEventName, a4 as AgenticLoopEventName, a5 as AgenticLoopEvents, a6 as ApprovalResult, a7 as ApproveToolContext, a8 as BeforeToolContext, a9 as BuiltInTool, aa as CONTEXT_SESSION_FORMAT_VERSION, ab as CompactionItem, ac as ContentType, ad as DEFAULT_CONFIG, ae as DEFAULT_FEATURES, af as DEFAULT_MEMORY_CONFIG, ag as ErrorEvent, ah as ExecutionConfig, ai as Hook, aj as HookManager, ak as InputImageContent, al as InputTextContent, am as IterationCompleteEvent, an as JSONSchema, ao as MEMORY_PRIORITY_VALUES, ap as MemoryEntryInput, aq as MemoryIndexEntry, ar as Message, as as ModifyingHook, at as OutputTextContent, au as OutputTextDeltaEvent, av as OutputTextDoneEvent, aw as OversizedInputResult, ax as PluginConfigs, ay as ReasoningDeltaEvent, az as ReasoningDoneEvent, aA as ReasoningItem, aB as ResponseCompleteEvent, aC as ResponseCreatedEvent, aD as ResponseInProgressEvent, aE as SimpleScope, aF as TaskAwareScope, aG as ThinkingContent, aH as ToolCallArgumentsDeltaEvent, aI as ToolCallArgumentsDoneEvent, aJ as ToolCallStartEvent, aK as ToolCallState, aL as ToolExecutionContext, aM as ToolExecutionDoneEvent, aN as ToolExecutionStartEvent, aO as ToolModification, aP as ToolResultContent, aQ as ToolUseContent, aR as calculateEntrySize, aS as defaultDescribeCall, aT as forPlan, aU as forTasks, aV as getToolCallDescription, aW as isErrorEvent, aX as isOutputTextDelta, aY as isReasoningDelta, aZ as isReasoningDone, a_ as isResponseComplete, a$ as isSimpleScope, b0 as isStreamEvent, b1 as isTaskAwareScope, b2 as isTerminalMemoryStatus, b3 as isToolCallArgumentsDelta, b4 as isToolCallArgumentsDone, b5 as isToolCallStart, b6 as scopeEquals, b7 as scopeMatches } from './index-CEjKTeSb.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';
|
|
8
|
-
import { A as AudioFormat, I as IBaseModelDescription, V as VendorOptionSchema, a as IImageProvider } from './ImageModel-
|
|
9
|
-
export { b as AspectRatio, c as IImageModelDescription, d as IMAGE_MODELS, e as IMAGE_MODEL_REGISTRY, f as ISourceLinks, g as ImageEditOptions, h as ImageGenerateOptions, i as ImageGeneration, j as ImageGenerationCreateOptions, k as ImageModelCapabilities, l as ImageModelPricing, m as ImageResponse, n as ImageVariationOptions, O as OutputFormat, Q as QualityLevel, S as SimpleGenerateOptions, o as calculateImageCost, p as getActiveImageModels, q as getImageModelInfo, r as getImageModelsByVendor, s as getImageModelsWithFeature } from './ImageModel-
|
|
8
|
+
import { A as AudioFormat, I as IBaseModelDescription, V as VendorOptionSchema, a as IImageProvider } from './ImageModel-Ds5_6sf7.cjs';
|
|
9
|
+
export { b as AspectRatio, c as IImageModelDescription, d as IMAGE_MODELS, e as IMAGE_MODEL_REGISTRY, f as ISourceLinks, g as ImageEditOptions, h as ImageGenerateOptions, i as ImageGeneration, j as ImageGenerationCreateOptions, k as ImageModelCapabilities, l as ImageModelPricing, m as ImageResponse, n as ImageVariationOptions, O as OutputFormat, Q as QualityLevel, S as SimpleGenerateOptions, o as calculateImageCost, p as getActiveImageModels, q as getImageModelInfo, r as getImageModelsByVendor, s as getImageModelsWithFeature } from './ImageModel-Ds5_6sf7.cjs';
|
|
10
10
|
import { ServiceCategory } from './shared/index.cjs';
|
|
11
11
|
export { ILLMDescription, LLM_MODELS, MODEL_REGISTRY, SERVICE_DEFINITIONS, SERVICE_INFO, SERVICE_URL_PATTERNS, ServiceDefinition, ServiceInfo, ServiceType, Services, calculateCost, detectServiceFromURL, getActiveModels, getAllServiceIds, getModelInfo, getModelsByVendor, getServiceDefinition, getServiceInfo, getServicesByCategory, isKnownService } from './shared/index.cjs';
|
|
12
12
|
|
|
@@ -316,844 +316,6 @@ interface IMediaStorage {
|
|
|
316
316
|
getPath(): string;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
/**
|
|
320
|
-
* IContextStorage - Storage interface for AgentContext persistence
|
|
321
|
-
*
|
|
322
|
-
* Provides persistence operations for AgentContext sessions.
|
|
323
|
-
* Implementations can use filesystem, database, cloud storage, etc.
|
|
324
|
-
*
|
|
325
|
-
* This follows Clean Architecture - the interface is in domain layer,
|
|
326
|
-
* implementations are in infrastructure layer.
|
|
327
|
-
*/
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Serialized context state for persistence.
|
|
331
|
-
* This is the canonical definition - core layer re-exports this type.
|
|
332
|
-
*/
|
|
333
|
-
interface SerializedContextState {
|
|
334
|
-
/** Conversation history */
|
|
335
|
-
conversation: InputItem[];
|
|
336
|
-
/** Plugin states (keyed by plugin name) */
|
|
337
|
-
pluginStates: Record<string, unknown>;
|
|
338
|
-
/** System prompt */
|
|
339
|
-
systemPrompt?: string;
|
|
340
|
-
/** Metadata */
|
|
341
|
-
metadata: {
|
|
342
|
-
savedAt: number;
|
|
343
|
-
agentId?: string;
|
|
344
|
-
userId?: string;
|
|
345
|
-
model: string;
|
|
346
|
-
};
|
|
347
|
-
/** Agent-specific state (for TaskAgent, UniversalAgent, etc.) */
|
|
348
|
-
agentState?: Record<string, unknown>;
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Session summary for listing (lightweight, no full state)
|
|
352
|
-
*/
|
|
353
|
-
interface ContextSessionSummary {
|
|
354
|
-
/** Session identifier */
|
|
355
|
-
sessionId: string;
|
|
356
|
-
/** When the session was created */
|
|
357
|
-
createdAt: Date;
|
|
358
|
-
/** When the session was last saved */
|
|
359
|
-
lastSavedAt: Date;
|
|
360
|
-
/** Number of messages in history */
|
|
361
|
-
messageCount: number;
|
|
362
|
-
/** Number of memory entries */
|
|
363
|
-
memoryEntryCount: number;
|
|
364
|
-
/** Optional metadata */
|
|
365
|
-
metadata?: ContextSessionMetadata;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Session metadata (stored with session)
|
|
369
|
-
*/
|
|
370
|
-
interface ContextSessionMetadata {
|
|
371
|
-
/** Human-readable title */
|
|
372
|
-
title?: string;
|
|
373
|
-
/** Auto-generated or user-provided description */
|
|
374
|
-
description?: string;
|
|
375
|
-
/** Tags for filtering */
|
|
376
|
-
tags?: string[];
|
|
377
|
-
/** Custom key-value data */
|
|
378
|
-
[key: string]: unknown;
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* Full session state wrapper (includes metadata)
|
|
382
|
-
*/
|
|
383
|
-
interface StoredContextSession {
|
|
384
|
-
/** Format version for migration support */
|
|
385
|
-
version: number;
|
|
386
|
-
/** Session identifier */
|
|
387
|
-
sessionId: string;
|
|
388
|
-
/** When the session was created */
|
|
389
|
-
createdAt: string;
|
|
390
|
-
/** When the session was last saved */
|
|
391
|
-
lastSavedAt: string;
|
|
392
|
-
/** The serialized AgentContext state */
|
|
393
|
-
state: SerializedContextState;
|
|
394
|
-
/** Session metadata */
|
|
395
|
-
metadata: ContextSessionMetadata;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Current format version for stored sessions
|
|
399
|
-
*/
|
|
400
|
-
declare const CONTEXT_SESSION_FORMAT_VERSION = 1;
|
|
401
|
-
/**
|
|
402
|
-
* Storage interface for AgentContext persistence
|
|
403
|
-
*
|
|
404
|
-
* Implementations:
|
|
405
|
-
* - FileContextStorage: File-based storage at ~/.oneringai/agents/<agentId>/sessions/
|
|
406
|
-
* - (Future) RedisContextStorage, PostgresContextStorage, S3ContextStorage, etc.
|
|
407
|
-
*/
|
|
408
|
-
interface IContextStorage {
|
|
409
|
-
/**
|
|
410
|
-
* Save context state to a session
|
|
411
|
-
*
|
|
412
|
-
* @param sessionId - Unique session identifier
|
|
413
|
-
* @param state - Serialized AgentContext state
|
|
414
|
-
* @param metadata - Optional session metadata
|
|
415
|
-
*/
|
|
416
|
-
save(sessionId: string, state: SerializedContextState, metadata?: ContextSessionMetadata): Promise<void>;
|
|
417
|
-
/**
|
|
418
|
-
* Load context state from a session
|
|
419
|
-
*
|
|
420
|
-
* @param sessionId - Session identifier to load
|
|
421
|
-
* @returns The stored session, or null if not found
|
|
422
|
-
*/
|
|
423
|
-
load(sessionId: string): Promise<StoredContextSession | null>;
|
|
424
|
-
/**
|
|
425
|
-
* Delete a session
|
|
426
|
-
*
|
|
427
|
-
* @param sessionId - Session identifier to delete
|
|
428
|
-
*/
|
|
429
|
-
delete(sessionId: string): Promise<void>;
|
|
430
|
-
/**
|
|
431
|
-
* Check if a session exists
|
|
432
|
-
*
|
|
433
|
-
* @param sessionId - Session identifier to check
|
|
434
|
-
*/
|
|
435
|
-
exists(sessionId: string): Promise<boolean>;
|
|
436
|
-
/**
|
|
437
|
-
* List all sessions (summaries only, not full state)
|
|
438
|
-
*
|
|
439
|
-
* @param options - Optional filtering and pagination
|
|
440
|
-
* @returns Array of session summaries, sorted by lastSavedAt descending
|
|
441
|
-
*/
|
|
442
|
-
list(options?: ContextStorageListOptions): Promise<ContextSessionSummary[]>;
|
|
443
|
-
/**
|
|
444
|
-
* Update session metadata without loading full state
|
|
445
|
-
*
|
|
446
|
-
* @param sessionId - Session identifier
|
|
447
|
-
* @param metadata - Metadata to merge (existing keys preserved unless overwritten)
|
|
448
|
-
*/
|
|
449
|
-
updateMetadata?(sessionId: string, metadata: Partial<ContextSessionMetadata>): Promise<void>;
|
|
450
|
-
/**
|
|
451
|
-
* Get the storage path (for display/debugging)
|
|
452
|
-
* @deprecated Use getLocation() instead - getPath() assumes filesystem storage
|
|
453
|
-
*/
|
|
454
|
-
getPath(): string;
|
|
455
|
-
/**
|
|
456
|
-
* Get a human-readable storage location string (for display/debugging).
|
|
457
|
-
* Examples: file path, MongoDB URI, Redis key prefix, S3 bucket, etc.
|
|
458
|
-
* Falls back to getPath() if not implemented.
|
|
459
|
-
*/
|
|
460
|
-
getLocation?(): string;
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Options for listing sessions
|
|
464
|
-
*/
|
|
465
|
-
interface ContextStorageListOptions {
|
|
466
|
-
/** Filter by tags (any match) */
|
|
467
|
-
tags?: string[];
|
|
468
|
-
/** Filter by creation date range */
|
|
469
|
-
createdAfter?: Date;
|
|
470
|
-
createdBefore?: Date;
|
|
471
|
-
/** Filter by last saved date range */
|
|
472
|
-
savedAfter?: Date;
|
|
473
|
-
savedBefore?: Date;
|
|
474
|
-
/** Maximum number of results */
|
|
475
|
-
limit?: number;
|
|
476
|
-
/** Offset for pagination */
|
|
477
|
-
offset?: number;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* AgentContextNextGen - Type Definitions
|
|
482
|
-
*
|
|
483
|
-
* Clean, minimal type definitions for the next-generation context manager.
|
|
484
|
-
*/
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Token estimator interface - used for conversation and input estimation
|
|
488
|
-
* Plugins handle their own token estimation internally.
|
|
489
|
-
*/
|
|
490
|
-
interface ITokenEstimator$1 {
|
|
491
|
-
/** Estimate tokens for a string */
|
|
492
|
-
estimateTokens(text: string): number;
|
|
493
|
-
/** Estimate tokens for arbitrary data (will be JSON stringified) */
|
|
494
|
-
estimateDataTokens(data: unknown): number;
|
|
495
|
-
/**
|
|
496
|
-
* Estimate tokens for an image. Provider-specific implementations can override.
|
|
497
|
-
*
|
|
498
|
-
* Default heuristic (matches OpenAI's image token pricing):
|
|
499
|
-
* - detail='low': 85 tokens
|
|
500
|
-
* - detail='high' with known dimensions: 85 + 170 * ceil(w/512) * ceil(h/512)
|
|
501
|
-
* - Unknown dimensions: ~1000 tokens (conservative default)
|
|
502
|
-
*
|
|
503
|
-
* @param width - Image width in pixels (if known)
|
|
504
|
-
* @param height - Image height in pixels (if known)
|
|
505
|
-
* @param detail - Image detail level: 'low', 'high', or 'auto' (default 'auto')
|
|
506
|
-
*/
|
|
507
|
-
estimateImageTokens?(width?: number, height?: number, detail?: string): number;
|
|
508
|
-
}
|
|
509
|
-
/**
|
|
510
|
-
* Context plugin interface for NextGen context management.
|
|
511
|
-
*
|
|
512
|
-
* ## Implementing a Custom Plugin
|
|
513
|
-
*
|
|
514
|
-
* 1. **Extend BasePluginNextGen** - provides token caching helpers
|
|
515
|
-
* 2. **Implement getInstructions()** - return LLM usage guide (static, cached)
|
|
516
|
-
* 3. **Implement getContent()** - return formatted content (Markdown with `##` header)
|
|
517
|
-
* 4. **Call updateTokenCache()** - after any state change that affects content
|
|
518
|
-
* 5. **Implement getTools()** - return tools with `<plugin_prefix>_*` naming
|
|
519
|
-
*
|
|
520
|
-
* ## Plugin Contributions
|
|
521
|
-
*
|
|
522
|
-
* Plugins provide three types of content to the system message:
|
|
523
|
-
* 1. **Instructions** - static usage guide for the LLM (NEVER compacted)
|
|
524
|
-
* 2. **Content** - dynamic plugin data/state (may be compacted)
|
|
525
|
-
* 3. **Tools** - registered with ToolManager (NEVER compacted)
|
|
526
|
-
*
|
|
527
|
-
* ## Token Cache Lifecycle
|
|
528
|
-
*
|
|
529
|
-
* Plugins must track their own token size for budget calculation. The pattern:
|
|
530
|
-
*
|
|
531
|
-
* ```typescript
|
|
532
|
-
* // When state changes:
|
|
533
|
-
* this._entries.set(key, value);
|
|
534
|
-
* this.invalidateTokenCache(); // Clear cached size
|
|
535
|
-
*
|
|
536
|
-
* // In getContent():
|
|
537
|
-
* const content = this.formatContent();
|
|
538
|
-
* this.updateTokenCache(this.estimator.estimateTokens(content)); // Update cache
|
|
539
|
-
* return content;
|
|
540
|
-
* ```
|
|
541
|
-
*
|
|
542
|
-
* ## Content Format
|
|
543
|
-
*
|
|
544
|
-
* `getContent()` should return Markdown with a descriptive header:
|
|
545
|
-
*
|
|
546
|
-
* ```markdown
|
|
547
|
-
* ## Plugin Display Name (optional stats)
|
|
548
|
-
*
|
|
549
|
-
* Formatted content here...
|
|
550
|
-
* - Entry 1: value
|
|
551
|
-
* - Entry 2: value
|
|
552
|
-
* ```
|
|
553
|
-
*
|
|
554
|
-
* Built-in plugins use these headers:
|
|
555
|
-
* - WorkingMemory: `## Working Memory (N entries)`
|
|
556
|
-
* - InContextMemory: `## Live Context (N entries)`
|
|
557
|
-
* - PersistentInstructions: No header (user's raw instructions)
|
|
558
|
-
*
|
|
559
|
-
* ## Tool Naming Convention
|
|
560
|
-
*
|
|
561
|
-
* Use a consistent prefix based on plugin name:
|
|
562
|
-
* - `working_memory` plugin → `memory_store`, `memory_retrieve`, `memory_delete`, `memory_list`
|
|
563
|
-
* - `in_context_memory` plugin → `context_set`, `context_delete`, `context_list`
|
|
564
|
-
* - `persistent_instructions` plugin → `instructions_set`, `instructions_remove`, `instructions_list`, `instructions_clear`
|
|
565
|
-
*
|
|
566
|
-
* ## State Serialization
|
|
567
|
-
*
|
|
568
|
-
* `getState()` and `restoreState()` are **synchronous** for simplicity.
|
|
569
|
-
* If your plugin has async data, consider:
|
|
570
|
-
* - Storing only references/keys in state
|
|
571
|
-
* - Using a separate async initialization method
|
|
572
|
-
*
|
|
573
|
-
* @example
|
|
574
|
-
* ```typescript
|
|
575
|
-
* class MyPlugin extends BasePluginNextGen {
|
|
576
|
-
* readonly name = 'my_plugin';
|
|
577
|
-
* private _data = new Map<string, string>();
|
|
578
|
-
*
|
|
579
|
-
* getInstructions(): string {
|
|
580
|
-
* return '## My Plugin\n\nUse my_plugin_set to store data...';
|
|
581
|
-
* }
|
|
582
|
-
*
|
|
583
|
-
* async getContent(): Promise<string | null> {
|
|
584
|
-
* if (this._data.size === 0) return null;
|
|
585
|
-
* const lines = [...this._data].map(([k, v]) => `- ${k}: ${v}`);
|
|
586
|
-
* const content = `## My Plugin (${this._data.size} entries)\n\n${lines.join('\n')}`;
|
|
587
|
-
* this.updateTokenCache(this.estimator.estimateTokens(content));
|
|
588
|
-
* return content;
|
|
589
|
-
* }
|
|
590
|
-
*
|
|
591
|
-
* getTools(): ToolFunction[] {
|
|
592
|
-
* return [myPluginSetTool, myPluginGetTool];
|
|
593
|
-
* }
|
|
594
|
-
*
|
|
595
|
-
* getState(): unknown {
|
|
596
|
-
* return { data: Object.fromEntries(this._data) };
|
|
597
|
-
* }
|
|
598
|
-
*
|
|
599
|
-
* restoreState(state: unknown): void {
|
|
600
|
-
* const s = state as { data: Record<string, string> };
|
|
601
|
-
* this._data = new Map(Object.entries(s.data || {}));
|
|
602
|
-
* this.invalidateTokenCache();
|
|
603
|
-
* }
|
|
604
|
-
* }
|
|
605
|
-
* ```
|
|
606
|
-
*/
|
|
607
|
-
interface IContextPluginNextGen {
|
|
608
|
-
/** Unique plugin name (used for lookup and tool prefixing) */
|
|
609
|
-
readonly name: string;
|
|
610
|
-
/**
|
|
611
|
-
* Get usage instructions for the LLM.
|
|
612
|
-
*
|
|
613
|
-
* Returns static text explaining how to use this plugin's tools
|
|
614
|
-
* and data. This is placed in the system message and is NEVER
|
|
615
|
-
* compacted - it persists throughout the conversation.
|
|
616
|
-
*
|
|
617
|
-
* Instructions should include:
|
|
618
|
-
* - What the plugin does
|
|
619
|
-
* - How to use available tools
|
|
620
|
-
* - Best practices and conventions
|
|
621
|
-
*
|
|
622
|
-
* @returns Instructions string or null if no instructions needed
|
|
623
|
-
*
|
|
624
|
-
* @example
|
|
625
|
-
* ```typescript
|
|
626
|
-
* getInstructions(): string {
|
|
627
|
-
* return `## Working Memory
|
|
628
|
-
*
|
|
629
|
-
* Use memory_store to save important data for later retrieval.
|
|
630
|
-
* Use memory_retrieve to recall previously stored data.
|
|
631
|
-
*
|
|
632
|
-
* Best practices:
|
|
633
|
-
* - Use descriptive keys like 'user_preferences' not 'data1'
|
|
634
|
-
* - Store intermediate results that may be needed later`;
|
|
635
|
-
* }
|
|
636
|
-
* ```
|
|
637
|
-
*/
|
|
638
|
-
getInstructions(): string | null;
|
|
639
|
-
/**
|
|
640
|
-
* Get formatted content to include in system message.
|
|
641
|
-
*
|
|
642
|
-
* Returns the plugin's current state formatted for LLM consumption.
|
|
643
|
-
* Should be Markdown with a `## Header`. This content CAN be compacted
|
|
644
|
-
* if `isCompactable()` returns true.
|
|
645
|
-
*
|
|
646
|
-
* **IMPORTANT:** Call `updateTokenCache()` with the content's token size
|
|
647
|
-
* before returning to keep budget calculations accurate.
|
|
648
|
-
*
|
|
649
|
-
* @returns Formatted content string or null if empty
|
|
650
|
-
*
|
|
651
|
-
* @example
|
|
652
|
-
* ```typescript
|
|
653
|
-
* async getContent(): Promise<string | null> {
|
|
654
|
-
* if (this._entries.size === 0) return null;
|
|
655
|
-
*
|
|
656
|
-
* const lines = this._entries.map(e => `- ${e.key}: ${e.value}`);
|
|
657
|
-
* const content = `## My Plugin (${this._entries.size} entries)\n\n${lines.join('\n')}`;
|
|
658
|
-
*
|
|
659
|
-
* // IMPORTANT: Update token cache before returning
|
|
660
|
-
* this.updateTokenCache(this.estimator.estimateTokens(content));
|
|
661
|
-
* return content;
|
|
662
|
-
* }
|
|
663
|
-
* ```
|
|
664
|
-
*/
|
|
665
|
-
getContent(): Promise<string | null>;
|
|
666
|
-
/**
|
|
667
|
-
* Get the full raw contents of this plugin for inspection.
|
|
668
|
-
*
|
|
669
|
-
* Used by library clients to programmatically inspect plugin state.
|
|
670
|
-
* Returns the actual data structure, not the formatted string.
|
|
671
|
-
*
|
|
672
|
-
* @returns Raw plugin data (entries map, array, etc.)
|
|
673
|
-
*/
|
|
674
|
-
getContents(): unknown;
|
|
675
|
-
/**
|
|
676
|
-
* Get current token size of plugin content.
|
|
677
|
-
*
|
|
678
|
-
* Returns the cached token count from the last `updateTokenCache()` call.
|
|
679
|
-
* This is used for budget calculation in `prepare()`.
|
|
680
|
-
*
|
|
681
|
-
* The cache should be updated via `updateTokenCache()` whenever content
|
|
682
|
-
* changes. If cache is null, returns 0.
|
|
683
|
-
*
|
|
684
|
-
* @returns Current token count (0 if no content or cache not set)
|
|
685
|
-
*/
|
|
686
|
-
getTokenSize(): number;
|
|
687
|
-
/**
|
|
688
|
-
* Get token size of instructions (cached after first call).
|
|
689
|
-
*
|
|
690
|
-
* Instructions are static, so this is computed once and cached.
|
|
691
|
-
* Used for budget calculation.
|
|
692
|
-
*
|
|
693
|
-
* @returns Token count for instructions (0 if no instructions)
|
|
694
|
-
*/
|
|
695
|
-
getInstructionsTokenSize(): number;
|
|
696
|
-
/**
|
|
697
|
-
* Whether this plugin's content can be compacted when context is tight.
|
|
698
|
-
*
|
|
699
|
-
* Return true if the plugin can reduce its content size when requested.
|
|
700
|
-
* Examples: evicting low-priority entries, summarizing, removing old data.
|
|
701
|
-
*
|
|
702
|
-
* Return false if content cannot be reduced (e.g., critical state).
|
|
703
|
-
*
|
|
704
|
-
* @returns true if compact() can free tokens
|
|
705
|
-
*/
|
|
706
|
-
isCompactable(): boolean;
|
|
707
|
-
/**
|
|
708
|
-
* Compact plugin content to free tokens.
|
|
709
|
-
*
|
|
710
|
-
* Called by compaction strategies when context is too full.
|
|
711
|
-
* Should attempt to free **approximately** `targetTokensToFree` tokens.
|
|
712
|
-
*
|
|
713
|
-
* This is a **best effort** operation:
|
|
714
|
-
* - May free more or less than requested
|
|
715
|
-
* - May return 0 if nothing can be compacted (e.g., all entries are critical)
|
|
716
|
-
* - Should prioritize removing lowest-priority/oldest data first
|
|
717
|
-
*
|
|
718
|
-
* Strategies may include:
|
|
719
|
-
* - Evicting low-priority entries
|
|
720
|
-
* - Summarizing verbose content
|
|
721
|
-
* - Removing oldest data
|
|
722
|
-
* - Truncating large values
|
|
723
|
-
*
|
|
724
|
-
* **IMPORTANT:** Call `invalidateTokenCache()` or `updateTokenCache()`
|
|
725
|
-
* after modifying content.
|
|
726
|
-
*
|
|
727
|
-
* @param targetTokensToFree - Approximate tokens to free (best effort)
|
|
728
|
-
* @returns Actual tokens freed (may be 0 if nothing can be compacted)
|
|
729
|
-
*
|
|
730
|
-
* @example
|
|
731
|
-
* ```typescript
|
|
732
|
-
* async compact(targetTokensToFree: number): Promise<number> {
|
|
733
|
-
* const before = this.getTokenSize();
|
|
734
|
-
* let freed = 0;
|
|
735
|
-
*
|
|
736
|
-
* // Remove low-priority entries until target reached
|
|
737
|
-
* const sorted = [...this._entries].sort(byPriority);
|
|
738
|
-
* for (const entry of sorted) {
|
|
739
|
-
* if (entry.priority === 'critical') continue; // Never remove critical
|
|
740
|
-
* if (freed >= targetTokensToFree) break;
|
|
741
|
-
*
|
|
742
|
-
* freed += entry.tokens;
|
|
743
|
-
* this._entries.delete(entry.key);
|
|
744
|
-
* }
|
|
745
|
-
*
|
|
746
|
-
* this.invalidateTokenCache();
|
|
747
|
-
* return freed;
|
|
748
|
-
* }
|
|
749
|
-
* ```
|
|
750
|
-
*/
|
|
751
|
-
compact(targetTokensToFree: number): Promise<number>;
|
|
752
|
-
/**
|
|
753
|
-
* Get tools provided by this plugin.
|
|
754
|
-
*
|
|
755
|
-
* Tools are automatically registered with ToolManager when the plugin
|
|
756
|
-
* is added to the context. Use a consistent naming convention:
|
|
757
|
-
* `<prefix>_<action>` (e.g., `memory_store`, `context_set`).
|
|
758
|
-
*
|
|
759
|
-
* @returns Array of tool definitions (empty array if no tools)
|
|
760
|
-
*/
|
|
761
|
-
getTools(): ToolFunction[];
|
|
762
|
-
/**
|
|
763
|
-
* Cleanup resources when context is destroyed.
|
|
764
|
-
*
|
|
765
|
-
* Called when AgentContextNextGen.destroy() is invoked.
|
|
766
|
-
* Use for releasing resources, closing connections, etc.
|
|
767
|
-
*/
|
|
768
|
-
destroy(): void;
|
|
769
|
-
/**
|
|
770
|
-
* Serialize plugin state for session persistence.
|
|
771
|
-
*
|
|
772
|
-
* **MUST be synchronous.** Return a JSON-serializable object representing
|
|
773
|
-
* the plugin's current state. This is called when saving a session.
|
|
774
|
-
*
|
|
775
|
-
* For plugins with async data (e.g., external storage), return only
|
|
776
|
-
* references/keys here and handle async restoration separately.
|
|
777
|
-
*
|
|
778
|
-
* @returns Serializable state object
|
|
779
|
-
*
|
|
780
|
-
* @example
|
|
781
|
-
* ```typescript
|
|
782
|
-
* getState(): unknown {
|
|
783
|
-
* return {
|
|
784
|
-
* entries: [...this._entries].map(([k, v]) => ({ key: k, ...v })),
|
|
785
|
-
* version: 1, // Include version for future migrations
|
|
786
|
-
* };
|
|
787
|
-
* }
|
|
788
|
-
* ```
|
|
789
|
-
*/
|
|
790
|
-
getState(): unknown;
|
|
791
|
-
/**
|
|
792
|
-
* Restore plugin state from serialized data.
|
|
793
|
-
*
|
|
794
|
-
* Called when loading a saved session. The state comes from a previous
|
|
795
|
-
* `getState()` call on the same plugin type.
|
|
796
|
-
*
|
|
797
|
-
* **IMPORTANT:** Call `invalidateTokenCache()` after restoring state
|
|
798
|
-
* to ensure token counts are recalculated.
|
|
799
|
-
*
|
|
800
|
-
* @param state - Previously serialized state from getState()
|
|
801
|
-
*
|
|
802
|
-
* @example
|
|
803
|
-
* ```typescript
|
|
804
|
-
* restoreState(state: unknown): void {
|
|
805
|
-
* const s = state as { entries: Array<{ key: string; value: unknown }> };
|
|
806
|
-
* this._entries.clear();
|
|
807
|
-
* for (const entry of s.entries || []) {
|
|
808
|
-
* this._entries.set(entry.key, entry);
|
|
809
|
-
* }
|
|
810
|
-
* this.invalidateTokenCache(); // IMPORTANT: refresh token cache
|
|
811
|
-
* }
|
|
812
|
-
* ```
|
|
813
|
-
*/
|
|
814
|
-
restoreState(state: unknown): void;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* Token budget breakdown - clear and simple
|
|
818
|
-
*/
|
|
819
|
-
interface ContextBudget$1 {
|
|
820
|
-
/** Maximum context tokens for the model */
|
|
821
|
-
maxTokens: number;
|
|
822
|
-
/** Tokens reserved for LLM response */
|
|
823
|
-
responseReserve: number;
|
|
824
|
-
/** Tokens used by system message (prompt + instructions + plugin content) */
|
|
825
|
-
systemMessageTokens: number;
|
|
826
|
-
/** Tokens used by tool definitions (NEVER compacted) */
|
|
827
|
-
toolsTokens: number;
|
|
828
|
-
/** Tokens used by conversation history */
|
|
829
|
-
conversationTokens: number;
|
|
830
|
-
/** Tokens used by current input (user message or tool results) */
|
|
831
|
-
currentInputTokens: number;
|
|
832
|
-
/** Total tokens used */
|
|
833
|
-
totalUsed: number;
|
|
834
|
-
/** Available tokens (maxTokens - responseReserve - totalUsed) */
|
|
835
|
-
available: number;
|
|
836
|
-
/** Usage percentage (totalUsed / (maxTokens - responseReserve)) */
|
|
837
|
-
utilizationPercent: number;
|
|
838
|
-
/** Breakdown by component for debugging */
|
|
839
|
-
breakdown: {
|
|
840
|
-
systemPrompt: number;
|
|
841
|
-
persistentInstructions: number;
|
|
842
|
-
pluginInstructions: number;
|
|
843
|
-
pluginContents: Record<string, number>;
|
|
844
|
-
tools: number;
|
|
845
|
-
conversation: number;
|
|
846
|
-
currentInput: number;
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
/**
|
|
850
|
-
* Result of prepare() - ready for LLM call
|
|
851
|
-
*/
|
|
852
|
-
interface PreparedContext {
|
|
853
|
-
/** Final input items array for LLM */
|
|
854
|
-
input: InputItem[];
|
|
855
|
-
/** Token budget breakdown */
|
|
856
|
-
budget: ContextBudget$1;
|
|
857
|
-
/** Whether compaction was performed */
|
|
858
|
-
compacted: boolean;
|
|
859
|
-
/** Log of compaction actions taken */
|
|
860
|
-
compactionLog: string[];
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* Result of handling oversized current input
|
|
864
|
-
*/
|
|
865
|
-
interface OversizedInputResult {
|
|
866
|
-
/** Whether the input was accepted (possibly truncated) */
|
|
867
|
-
accepted: boolean;
|
|
868
|
-
/** Processed content (truncated if needed) */
|
|
869
|
-
content: string;
|
|
870
|
-
/** Error message if rejected */
|
|
871
|
-
error?: string;
|
|
872
|
-
/** Warning message if truncated */
|
|
873
|
-
warning?: string;
|
|
874
|
-
/** Original size in bytes */
|
|
875
|
-
originalSize: number;
|
|
876
|
-
/** Final size in bytes */
|
|
877
|
-
finalSize: number;
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* Feature flags for enabling/disabling plugins
|
|
881
|
-
*/
|
|
882
|
-
interface ContextFeatures {
|
|
883
|
-
/** Enable WorkingMemory plugin (default: true) */
|
|
884
|
-
workingMemory?: boolean;
|
|
885
|
-
/** Enable InContextMemory plugin (default: false) */
|
|
886
|
-
inContextMemory?: boolean;
|
|
887
|
-
/** Enable PersistentInstructions plugin (default: false) */
|
|
888
|
-
persistentInstructions?: boolean;
|
|
889
|
-
/** Enable UserInfo plugin (default: false) */
|
|
890
|
-
userInfo?: boolean;
|
|
891
|
-
}
|
|
892
|
-
/**
|
|
893
|
-
* Default feature configuration
|
|
894
|
-
*/
|
|
895
|
-
declare const DEFAULT_FEATURES: Required<ContextFeatures>;
|
|
896
|
-
/**
|
|
897
|
-
* Plugin configurations for auto-initialization.
|
|
898
|
-
* When features are enabled, plugins are created with these configs.
|
|
899
|
-
* The config shapes match each plugin's constructor parameter.
|
|
900
|
-
*/
|
|
901
|
-
interface PluginConfigs {
|
|
902
|
-
/**
|
|
903
|
-
* Working memory plugin config (used when features.workingMemory=true).
|
|
904
|
-
* See WorkingMemoryPluginConfig for full options.
|
|
905
|
-
*/
|
|
906
|
-
workingMemory?: Record<string, unknown>;
|
|
907
|
-
/**
|
|
908
|
-
* In-context memory plugin config (used when features.inContextMemory=true).
|
|
909
|
-
* See InContextMemoryConfig for full options.
|
|
910
|
-
*/
|
|
911
|
-
inContextMemory?: Record<string, unknown>;
|
|
912
|
-
/**
|
|
913
|
-
* Persistent instructions plugin config (used when features.persistentInstructions=true).
|
|
914
|
-
* Note: agentId is auto-filled from context config if not provided.
|
|
915
|
-
* See PersistentInstructionsConfig for full options.
|
|
916
|
-
*/
|
|
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>;
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* AgentContextNextGen configuration
|
|
926
|
-
*/
|
|
927
|
-
interface AgentContextNextGenConfig {
|
|
928
|
-
/** Model name (used for context window lookup) */
|
|
929
|
-
model: string;
|
|
930
|
-
/** Maximum context tokens (auto-detected from model if not provided) */
|
|
931
|
-
maxContextTokens?: number;
|
|
932
|
-
/** Tokens to reserve for response (default: 4096) */
|
|
933
|
-
responseReserve?: number;
|
|
934
|
-
/** System prompt provided by user */
|
|
935
|
-
systemPrompt?: string;
|
|
936
|
-
/**
|
|
937
|
-
* Compaction strategy name (default: 'default').
|
|
938
|
-
* Used to create strategy from StrategyRegistry if compactionStrategy not provided.
|
|
939
|
-
*/
|
|
940
|
-
strategy?: string;
|
|
941
|
-
/**
|
|
942
|
-
* Custom compaction strategy instance.
|
|
943
|
-
* If provided, overrides the `strategy` option.
|
|
944
|
-
*/
|
|
945
|
-
compactionStrategy?: ICompactionStrategy;
|
|
946
|
-
/** Feature flags */
|
|
947
|
-
features?: ContextFeatures;
|
|
948
|
-
/** Agent ID (required for PersistentInstructions) */
|
|
949
|
-
agentId?: string;
|
|
950
|
-
/** User ID for multi-user scenarios. Automatically flows to ToolContext for all tool executions. */
|
|
951
|
-
userId?: string;
|
|
952
|
-
/**
|
|
953
|
-
* Restrict this agent to a subset of registered connectors (by name).
|
|
954
|
-
* When set, only these connectors are visible in ToolContext.connectorRegistry
|
|
955
|
-
* and in dynamic tool descriptions (e.g., execute_javascript).
|
|
956
|
-
* When not set, all connectors visible to the current userId are available.
|
|
957
|
-
*/
|
|
958
|
-
connectors?: string[];
|
|
959
|
-
/** Initial tools to register */
|
|
960
|
-
tools?: ToolFunction[];
|
|
961
|
-
/** Storage for session persistence */
|
|
962
|
-
storage?: IContextStorage;
|
|
963
|
-
/** Plugin-specific configurations (used with features flags) */
|
|
964
|
-
plugins?: PluginConfigs;
|
|
965
|
-
/**
|
|
966
|
-
* Hard timeout in milliseconds for any single tool execution.
|
|
967
|
-
* Acts as a safety net: if a tool's own timeout mechanism fails
|
|
968
|
-
* (e.g. a child process doesn't exit), this will force-resolve with an error.
|
|
969
|
-
* Default: 0 (disabled - relies on each tool's own timeout)
|
|
970
|
-
*/
|
|
971
|
-
toolExecutionTimeout?: number;
|
|
972
|
-
}
|
|
973
|
-
/**
|
|
974
|
-
* Default configuration values
|
|
975
|
-
*/
|
|
976
|
-
declare const DEFAULT_CONFIG: {
|
|
977
|
-
responseReserve: number;
|
|
978
|
-
strategy: string;
|
|
979
|
-
};
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* Events emitted by AgentContextNextGen
|
|
983
|
-
*/
|
|
984
|
-
interface ContextEvents {
|
|
985
|
-
/** Emitted when context is prepared */
|
|
986
|
-
'context:prepared': {
|
|
987
|
-
budget: ContextBudget$1;
|
|
988
|
-
compacted: boolean;
|
|
989
|
-
};
|
|
990
|
-
/** Emitted when compaction is performed */
|
|
991
|
-
'context:compacted': {
|
|
992
|
-
tokensFreed: number;
|
|
993
|
-
log: string[];
|
|
994
|
-
};
|
|
995
|
-
/** Emitted right after budget is calculated in prepare() - for reactive monitoring */
|
|
996
|
-
'budget:updated': {
|
|
997
|
-
budget: ContextBudget$1;
|
|
998
|
-
timestamp: number;
|
|
999
|
-
};
|
|
1000
|
-
/** Emitted when budget reaches warning threshold (>70%) */
|
|
1001
|
-
'budget:warning': {
|
|
1002
|
-
budget: ContextBudget$1;
|
|
1003
|
-
};
|
|
1004
|
-
/** Emitted when budget reaches critical threshold (>90%) */
|
|
1005
|
-
'budget:critical': {
|
|
1006
|
-
budget: ContextBudget$1;
|
|
1007
|
-
};
|
|
1008
|
-
/** Emitted when compaction is about to start */
|
|
1009
|
-
'compaction:starting': {
|
|
1010
|
-
budget: ContextBudget$1;
|
|
1011
|
-
targetTokensToFree: number;
|
|
1012
|
-
timestamp: number;
|
|
1013
|
-
};
|
|
1014
|
-
/** Emitted when current input is too large */
|
|
1015
|
-
'input:oversized': {
|
|
1016
|
-
result: OversizedInputResult;
|
|
1017
|
-
};
|
|
1018
|
-
/** Emitted when a message is added */
|
|
1019
|
-
'message:added': {
|
|
1020
|
-
role: string;
|
|
1021
|
-
index: number;
|
|
1022
|
-
};
|
|
1023
|
-
/** Emitted when conversation is cleared */
|
|
1024
|
-
'conversation:cleared': {
|
|
1025
|
-
reason?: string;
|
|
1026
|
-
};
|
|
1027
|
-
}
|
|
1028
|
-
/**
|
|
1029
|
-
* Callback type for beforeCompaction hook.
|
|
1030
|
-
* Called before compaction starts, allowing agents to save important data.
|
|
1031
|
-
*/
|
|
1032
|
-
type BeforeCompactionCallback = (info: {
|
|
1033
|
-
budget: ContextBudget$1;
|
|
1034
|
-
targetTokensToFree: number;
|
|
1035
|
-
strategy: string;
|
|
1036
|
-
}) => Promise<void>;
|
|
1037
|
-
/**
|
|
1038
|
-
* Result of compact() operation.
|
|
1039
|
-
*/
|
|
1040
|
-
interface CompactionResult {
|
|
1041
|
-
/** Tokens actually freed by compaction */
|
|
1042
|
-
tokensFreed: number;
|
|
1043
|
-
/** Number of messages removed from conversation */
|
|
1044
|
-
messagesRemoved: number;
|
|
1045
|
-
/** Names of plugins that were compacted */
|
|
1046
|
-
pluginsCompacted: string[];
|
|
1047
|
-
/** Log of actions taken during compaction */
|
|
1048
|
-
log: string[];
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* Result of consolidate() operation.
|
|
1052
|
-
*/
|
|
1053
|
-
interface ConsolidationResult {
|
|
1054
|
-
/** Whether any consolidation was performed */
|
|
1055
|
-
performed: boolean;
|
|
1056
|
-
/** Net token change (negative = freed, positive = added, e.g., summaries) */
|
|
1057
|
-
tokensChanged: number;
|
|
1058
|
-
/** Description of actions taken */
|
|
1059
|
-
actions: string[];
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* Read-only context passed to compaction strategies.
|
|
1063
|
-
* Provides access to data needed for compaction decisions and
|
|
1064
|
-
* controlled methods to modify state.
|
|
1065
|
-
*/
|
|
1066
|
-
interface CompactionContext {
|
|
1067
|
-
/** Current budget (from prepare) */
|
|
1068
|
-
readonly budget: ContextBudget$1;
|
|
1069
|
-
/** Current conversation history (read-only) */
|
|
1070
|
-
readonly conversation: ReadonlyArray<InputItem>;
|
|
1071
|
-
/** Current input (read-only) */
|
|
1072
|
-
readonly currentInput: ReadonlyArray<InputItem>;
|
|
1073
|
-
/** Registered plugins (for querying state) */
|
|
1074
|
-
readonly plugins: ReadonlyArray<IContextPluginNextGen>;
|
|
1075
|
-
/** Strategy name for logging */
|
|
1076
|
-
readonly strategyName: string;
|
|
1077
|
-
/**
|
|
1078
|
-
* Remove messages by indices.
|
|
1079
|
-
* Handles tool pair preservation internally.
|
|
1080
|
-
*
|
|
1081
|
-
* @param indices - Array of message indices to remove
|
|
1082
|
-
* @returns Tokens actually freed
|
|
1083
|
-
*/
|
|
1084
|
-
removeMessages(indices: number[]): Promise<number>;
|
|
1085
|
-
/**
|
|
1086
|
-
* Compact a specific plugin.
|
|
1087
|
-
*
|
|
1088
|
-
* @param pluginName - Name of the plugin to compact
|
|
1089
|
-
* @param targetTokens - Approximate tokens to free
|
|
1090
|
-
* @returns Tokens actually freed
|
|
1091
|
-
*/
|
|
1092
|
-
compactPlugin(pluginName: string, targetTokens: number): Promise<number>;
|
|
1093
|
-
/**
|
|
1094
|
-
* Estimate tokens for an item.
|
|
1095
|
-
*
|
|
1096
|
-
* @param item - Input item to estimate
|
|
1097
|
-
* @returns Estimated token count
|
|
1098
|
-
*/
|
|
1099
|
-
estimateTokens(item: InputItem): number;
|
|
1100
|
-
}
|
|
1101
|
-
/**
|
|
1102
|
-
* Compaction strategy interface.
|
|
1103
|
-
*
|
|
1104
|
-
* Strategies implement two methods:
|
|
1105
|
-
* - `compact()`: Emergency compaction when thresholds exceeded (called from prepare())
|
|
1106
|
-
* - `consolidate()`: Post-cycle cleanup and optimization (called after agentic loop)
|
|
1107
|
-
*
|
|
1108
|
-
* Use `compact()` for quick, threshold-based token reduction.
|
|
1109
|
-
* Use `consolidate()` for more expensive operations like summarization.
|
|
1110
|
-
*/
|
|
1111
|
-
interface ICompactionStrategy {
|
|
1112
|
-
/** Strategy name (unique identifier) for identification and logging */
|
|
1113
|
-
readonly name: string;
|
|
1114
|
-
/** Human-readable display name for UI */
|
|
1115
|
-
readonly displayName: string;
|
|
1116
|
-
/** Description explaining the strategy behavior */
|
|
1117
|
-
readonly description: string;
|
|
1118
|
-
/** Threshold percentage (0-1) at which compact() is triggered */
|
|
1119
|
-
readonly threshold: number;
|
|
1120
|
-
/**
|
|
1121
|
-
* Plugin names this strategy requires to function.
|
|
1122
|
-
* Validation is performed when strategy is assigned to context.
|
|
1123
|
-
* If any required plugin is missing, an error is thrown.
|
|
1124
|
-
*
|
|
1125
|
-
* @example
|
|
1126
|
-
* ```typescript
|
|
1127
|
-
* readonly requiredPlugins = ['working_memory'] as const;
|
|
1128
|
-
* ```
|
|
1129
|
-
*/
|
|
1130
|
-
readonly requiredPlugins?: readonly string[];
|
|
1131
|
-
/**
|
|
1132
|
-
* Emergency compaction - triggered when context usage exceeds threshold.
|
|
1133
|
-
* Called from prepare() when utilization > threshold.
|
|
1134
|
-
*
|
|
1135
|
-
* Should be fast and focus on freeing tokens quickly.
|
|
1136
|
-
*
|
|
1137
|
-
* @param context - Compaction context with controlled access to state
|
|
1138
|
-
* @param targetToFree - Approximate tokens to free
|
|
1139
|
-
* @returns Result describing what was done
|
|
1140
|
-
*/
|
|
1141
|
-
compact(context: CompactionContext, targetToFree: number): Promise<CompactionResult>;
|
|
1142
|
-
/**
|
|
1143
|
-
* Post-cycle consolidation - run after agentic cycle completes.
|
|
1144
|
-
* Called from Agent after run()/stream() finishes (before session save).
|
|
1145
|
-
*
|
|
1146
|
-
* Use for more expensive operations:
|
|
1147
|
-
* - Summarizing long conversations
|
|
1148
|
-
* - Memory optimization and deduplication
|
|
1149
|
-
* - Promoting important data to persistent storage
|
|
1150
|
-
*
|
|
1151
|
-
* @param context - Compaction context with controlled access to state
|
|
1152
|
-
* @returns Result describing what was done
|
|
1153
|
-
*/
|
|
1154
|
-
consolidate(context: CompactionContext): Promise<ConsolidationResult>;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
319
|
/**
|
|
1158
320
|
* IAgentDefinitionStorage - Storage interface for Agent configuration persistence
|
|
1159
321
|
*
|
|
@@ -1560,6 +722,7 @@ interface IUserInfoStorage {
|
|
|
1560
722
|
*
|
|
1561
723
|
* Defines the data structures for task-based autonomous agents.
|
|
1562
724
|
*/
|
|
725
|
+
|
|
1563
726
|
/**
|
|
1564
727
|
* Task status lifecycle
|
|
1565
728
|
*/
|
|
@@ -1615,6 +778,54 @@ interface ExternalDependency {
|
|
|
1615
778
|
receivedData?: unknown;
|
|
1616
779
|
receivedAt?: number;
|
|
1617
780
|
}
|
|
781
|
+
/** Sub-routine specification: either inline tasks or a full RoutineDefinition */
|
|
782
|
+
type SubRoutineSpec = TaskInput[] | RoutineDefinition;
|
|
783
|
+
/** Map: execute a sub-routine for each element in an array */
|
|
784
|
+
interface TaskMapFlow {
|
|
785
|
+
type: 'map';
|
|
786
|
+
/** Memory key containing the source array */
|
|
787
|
+
sourceKey: string;
|
|
788
|
+
/** Sub-routine to run per element */
|
|
789
|
+
tasks: SubRoutineSpec;
|
|
790
|
+
/** Memory key for collected results array */
|
|
791
|
+
resultKey?: string;
|
|
792
|
+
/** Cap iterations (default: array.length, hard max: 1000) */
|
|
793
|
+
maxIterations?: number;
|
|
794
|
+
/** Timeout per sub-execution iteration in ms (default: no timeout) */
|
|
795
|
+
iterationTimeoutMs?: number;
|
|
796
|
+
}
|
|
797
|
+
/** Fold: accumulate a result across array elements */
|
|
798
|
+
interface TaskFoldFlow {
|
|
799
|
+
type: 'fold';
|
|
800
|
+
/** Memory key containing the source array */
|
|
801
|
+
sourceKey: string;
|
|
802
|
+
/** Sub-routine to run per element */
|
|
803
|
+
tasks: SubRoutineSpec;
|
|
804
|
+
/** Starting accumulator value */
|
|
805
|
+
initialValue: unknown;
|
|
806
|
+
/** Memory key for final accumulated result */
|
|
807
|
+
resultKey: string;
|
|
808
|
+
/** Cap iterations (default: array.length, hard max: 1000) */
|
|
809
|
+
maxIterations?: number;
|
|
810
|
+
/** Timeout per sub-execution iteration in ms (default: no timeout) */
|
|
811
|
+
iterationTimeoutMs?: number;
|
|
812
|
+
}
|
|
813
|
+
/** Until: repeat a sub-routine until a condition is met */
|
|
814
|
+
interface TaskUntilFlow {
|
|
815
|
+
type: 'until';
|
|
816
|
+
/** Sub-routine to run each iteration */
|
|
817
|
+
tasks: SubRoutineSpec;
|
|
818
|
+
/** Checked AFTER each iteration (reuses existing TaskCondition type) */
|
|
819
|
+
condition: TaskCondition;
|
|
820
|
+
/** Maximum iterations (required — no default) */
|
|
821
|
+
maxIterations: number;
|
|
822
|
+
/** Optional ICM key for current iteration index */
|
|
823
|
+
iterationKey?: string;
|
|
824
|
+
/** Timeout per sub-execution iteration in ms (default: no timeout) */
|
|
825
|
+
iterationTimeoutMs?: number;
|
|
826
|
+
}
|
|
827
|
+
/** Union of all control flow types */
|
|
828
|
+
type TaskControlFlow = TaskMapFlow | TaskFoldFlow | TaskUntilFlow;
|
|
1618
829
|
/**
|
|
1619
830
|
* Task execution settings
|
|
1620
831
|
*/
|
|
@@ -1741,6 +952,8 @@ interface Task {
|
|
|
1741
952
|
suggestedTools?: string[];
|
|
1742
953
|
/** Optional expected output description */
|
|
1743
954
|
expectedOutput?: string;
|
|
955
|
+
/** Control flow: map, fold, or until (replaces normal LLM execution for this task) */
|
|
956
|
+
controlFlow?: TaskControlFlow;
|
|
1744
957
|
/** Result after completion */
|
|
1745
958
|
result?: {
|
|
1746
959
|
success: boolean;
|
|
@@ -1776,6 +989,7 @@ interface TaskInput {
|
|
|
1776
989
|
suggestedTools?: string[];
|
|
1777
990
|
validation?: TaskValidation;
|
|
1778
991
|
expectedOutput?: string;
|
|
992
|
+
controlFlow?: TaskControlFlow;
|
|
1779
993
|
maxAttempts?: number;
|
|
1780
994
|
metadata?: Record<string, unknown>;
|
|
1781
995
|
}
|
|
@@ -1894,6 +1108,20 @@ declare function detectDependencyCycle(tasks: Task[]): string[] | null;
|
|
|
1894
1108
|
* A RoutineExecution is a running instance backed by an existing Plan.
|
|
1895
1109
|
*/
|
|
1896
1110
|
|
|
1111
|
+
/**
|
|
1112
|
+
* A parameter that a routine accepts as input.
|
|
1113
|
+
* Enables parameterized, reusable routines.
|
|
1114
|
+
*/
|
|
1115
|
+
interface RoutineParameter {
|
|
1116
|
+
/** Parameter name (used as {{param.name}} in templates) */
|
|
1117
|
+
name: string;
|
|
1118
|
+
/** Human-readable description */
|
|
1119
|
+
description: string;
|
|
1120
|
+
/** Whether this parameter must be provided (default: false) */
|
|
1121
|
+
required?: boolean;
|
|
1122
|
+
/** Default value when not provided */
|
|
1123
|
+
default?: unknown;
|
|
1124
|
+
}
|
|
1897
1125
|
/**
|
|
1898
1126
|
* A reusable routine definition (template).
|
|
1899
1127
|
*
|
|
@@ -1921,6 +1149,8 @@ interface RoutineDefinition {
|
|
|
1921
1149
|
concurrency?: PlanConcurrency;
|
|
1922
1150
|
/** Whether the LLM can dynamically add/modify tasks during execution. Default: false */
|
|
1923
1151
|
allowDynamicTasks?: boolean;
|
|
1152
|
+
/** Input parameters this routine accepts (templates use {{param.name}}) */
|
|
1153
|
+
parameters?: RoutineParameter[];
|
|
1924
1154
|
/** Tags for categorization and filtering */
|
|
1925
1155
|
tags?: string[];
|
|
1926
1156
|
/** Author/creator */
|
|
@@ -1947,6 +1177,7 @@ interface RoutineDefinitionInput {
|
|
|
1947
1177
|
instructions?: string;
|
|
1948
1178
|
concurrency?: PlanConcurrency;
|
|
1949
1179
|
allowDynamicTasks?: boolean;
|
|
1180
|
+
parameters?: RoutineParameter[];
|
|
1950
1181
|
tags?: string[];
|
|
1951
1182
|
author?: string;
|
|
1952
1183
|
metadata?: Record<string, unknown>;
|
|
@@ -2724,6 +1955,14 @@ declare class ToolManager extends EventEmitter implements IToolExecutor, IDispos
|
|
|
2724
1955
|
* Register multiple tools at once
|
|
2725
1956
|
*/
|
|
2726
1957
|
registerMany(tools: ToolFunction[], options?: Omit<ToolOptions, 'conditions'>): void;
|
|
1958
|
+
/**
|
|
1959
|
+
* Register tools produced by a specific connector.
|
|
1960
|
+
* Sets `source: 'connector:<connectorName>'` (or `'connector:<name>:<accountId>'` for identity-bound tools)
|
|
1961
|
+
* so agent-level filtering can restrict which connector tools are visible to a given agent.
|
|
1962
|
+
*/
|
|
1963
|
+
registerConnectorTools(connectorName: string, tools: ToolFunction[], options?: Omit<ToolOptions, 'source'> & {
|
|
1964
|
+
accountId?: string;
|
|
1965
|
+
}): void;
|
|
2727
1966
|
/**
|
|
2728
1967
|
* Unregister a tool by name
|
|
2729
1968
|
*/
|
|
@@ -2801,6 +2040,12 @@ declare class ToolManager extends EventEmitter implements IToolExecutor, IDispos
|
|
|
2801
2040
|
* Get all enabled tools (sorted by priority)
|
|
2802
2041
|
*/
|
|
2803
2042
|
getEnabled(): ToolFunction[];
|
|
2043
|
+
/**
|
|
2044
|
+
* Get all enabled registrations (sorted by priority).
|
|
2045
|
+
* Includes full registration metadata (source, namespace, etc.)
|
|
2046
|
+
* for use in connector-aware filtering.
|
|
2047
|
+
*/
|
|
2048
|
+
getEnabledRegistrations(): ToolRegistration[];
|
|
2804
2049
|
/**
|
|
2805
2050
|
* Get all tools (enabled and disabled)
|
|
2806
2051
|
*/
|
|
@@ -3736,8 +2981,8 @@ declare class AgentContextNextGen extends EventEmitter<ContextEvents> {
|
|
|
3736
2981
|
private readonly _agentId;
|
|
3737
2982
|
/** User ID for multi-user scenarios */
|
|
3738
2983
|
private _userId;
|
|
3739
|
-
/**
|
|
3740
|
-
private
|
|
2984
|
+
/** Auth identities this agent is scoped to (connector + optional accountId) */
|
|
2985
|
+
private _identities;
|
|
3741
2986
|
/** Storage backend */
|
|
3742
2987
|
private readonly _storage?;
|
|
3743
2988
|
/** Destroyed flag */
|
|
@@ -3768,7 +3013,7 @@ declare class AgentContextNextGen extends EventEmitter<ContextEvents> {
|
|
|
3768
3013
|
* Merges with existing ToolContext to preserve other fields (memory, signal, taskId).
|
|
3769
3014
|
*
|
|
3770
3015
|
* Connector registry resolution order:
|
|
3771
|
-
* 1. If `
|
|
3016
|
+
* 1. If `identities` is set → filtered view showing only identity connectors
|
|
3772
3017
|
* 2. If access policy + userId → scoped view via Connector.scoped()
|
|
3773
3018
|
* 3. Otherwise → full global registry
|
|
3774
3019
|
*/
|
|
@@ -3787,10 +3032,10 @@ declare class AgentContextNextGen extends EventEmitter<ContextEvents> {
|
|
|
3787
3032
|
get userId(): string | undefined;
|
|
3788
3033
|
/** Set user ID. Automatically updates ToolContext for all tool executions. */
|
|
3789
3034
|
set userId(value: string | undefined);
|
|
3790
|
-
/** Get the
|
|
3791
|
-
get
|
|
3792
|
-
/** Set
|
|
3793
|
-
set
|
|
3035
|
+
/** Get the auth identities this agent is scoped to (undefined = all visible connectors) */
|
|
3036
|
+
get identities(): AuthIdentity[] | undefined;
|
|
3037
|
+
/** Set auth identities. Updates ToolContext.connectorRegistry and identity-aware descriptions. */
|
|
3038
|
+
set identities(value: AuthIdentity[] | undefined);
|
|
3794
3039
|
/** Get/set system prompt */
|
|
3795
3040
|
get systemPrompt(): string | undefined;
|
|
3796
3041
|
set systemPrompt(value: string | undefined);
|
|
@@ -4239,11 +3484,11 @@ interface BaseAgentConfig {
|
|
|
4239
3484
|
/** User ID for multi-user scenarios. Flows to ToolContext automatically for all tool executions. */
|
|
4240
3485
|
userId?: string;
|
|
4241
3486
|
/**
|
|
4242
|
-
* Restrict this agent to
|
|
4243
|
-
*
|
|
3487
|
+
* Restrict this agent to specific auth identities (connector + optional account alias).
|
|
3488
|
+
* Each identity produces its own tool set (e.g., microsoft_work_api, microsoft_personal_api).
|
|
4244
3489
|
* When not set, all connectors visible to the current userId are available.
|
|
4245
3490
|
*/
|
|
4246
|
-
|
|
3491
|
+
identities?: AuthIdentity[];
|
|
4247
3492
|
/** Tools available to the agent */
|
|
4248
3493
|
tools?: ToolFunction[];
|
|
4249
3494
|
/** Provide a pre-configured ToolManager (advanced) */
|
|
@@ -4423,13 +3668,13 @@ declare abstract class BaseAgent<TConfig extends BaseAgentConfig = BaseAgentConf
|
|
|
4423
3668
|
*/
|
|
4424
3669
|
set userId(value: string | undefined);
|
|
4425
3670
|
/**
|
|
4426
|
-
* Get the
|
|
3671
|
+
* Get the auth identities this agent is scoped to (undefined = all visible connectors).
|
|
4427
3672
|
*/
|
|
4428
|
-
get
|
|
3673
|
+
get identities(): AuthIdentity[] | undefined;
|
|
4429
3674
|
/**
|
|
4430
|
-
*
|
|
3675
|
+
* Set auth identities at runtime. Updates ToolContext.connectorRegistry and tool descriptions.
|
|
4431
3676
|
*/
|
|
4432
|
-
set
|
|
3677
|
+
set identities(value: AuthIdentity[] | undefined);
|
|
4433
3678
|
/**
|
|
4434
3679
|
* Permission management. Returns ToolPermissionManager for approval control.
|
|
4435
3680
|
*/
|
|
@@ -4437,8 +3682,11 @@ declare abstract class BaseAgent<TConfig extends BaseAgentConfig = BaseAgentConf
|
|
|
4437
3682
|
/**
|
|
4438
3683
|
* Add a tool to the agent.
|
|
4439
3684
|
* Tools are registered with AgentContext (single source of truth).
|
|
3685
|
+
*
|
|
3686
|
+
* @param tool - The tool function to register
|
|
3687
|
+
* @param options - Optional registration options (namespace, source, priority, etc.)
|
|
4440
3688
|
*/
|
|
4441
|
-
addTool(tool: ToolFunction): void;
|
|
3689
|
+
addTool(tool: ToolFunction, options?: ToolOptions): void;
|
|
4442
3690
|
/**
|
|
4443
3691
|
* Remove a tool from the agent.
|
|
4444
3692
|
* Tools are unregistered from AgentContext (single source of truth).
|
|
@@ -4925,6 +4173,8 @@ interface ExecuteRoutineOptions {
|
|
|
4925
4173
|
model?: string;
|
|
4926
4174
|
/** Additional tools — only used when creating a new agent (no `agent` provided) */
|
|
4927
4175
|
tools?: ToolFunction[];
|
|
4176
|
+
/** Input parameter values for parameterized routines */
|
|
4177
|
+
inputs?: Record<string, unknown>;
|
|
4928
4178
|
/** Hooks — applied to agent for the duration of routine execution.
|
|
4929
4179
|
* For new agents: baked in at creation. For existing agents: registered before
|
|
4930
4180
|
* execution and unregistered after. */
|
|
@@ -9846,6 +9096,49 @@ declare class InMemoryHistoryStorage implements IHistoryStorage {
|
|
|
9846
9096
|
restoreState(state: SerializedHistoryState): Promise<void>;
|
|
9847
9097
|
}
|
|
9848
9098
|
|
|
9099
|
+
/**
|
|
9100
|
+
* Routine Control Flow — map, fold, until handlers + template resolution
|
|
9101
|
+
*
|
|
9102
|
+
* Control flow tasks delegate to executeRoutine() recursively with the shared agent,
|
|
9103
|
+
* using ICM keys (__map_item, __map_index, etc.) to pass iteration state.
|
|
9104
|
+
*/
|
|
9105
|
+
|
|
9106
|
+
/** Well-known ICM/WM keys used by the routine execution framework. */
|
|
9107
|
+
declare const ROUTINE_KEYS: {
|
|
9108
|
+
/** Plan overview with task statuses (ICM) */
|
|
9109
|
+
readonly PLAN: "__routine_plan";
|
|
9110
|
+
/** Dependency results location guide (ICM) */
|
|
9111
|
+
readonly DEPS: "__routine_deps";
|
|
9112
|
+
/** Prefix for per-dependency result keys (ICM/WM) */
|
|
9113
|
+
readonly DEP_RESULT_PREFIX: "__dep_result_";
|
|
9114
|
+
/** Current map/fold item (ICM) */
|
|
9115
|
+
readonly MAP_ITEM: "__map_item";
|
|
9116
|
+
/** Current map/fold index, 0-based (ICM) */
|
|
9117
|
+
readonly MAP_INDEX: "__map_index";
|
|
9118
|
+
/** Total items in map/fold (ICM) */
|
|
9119
|
+
readonly MAP_TOTAL: "__map_total";
|
|
9120
|
+
/** Running fold accumulator (ICM) */
|
|
9121
|
+
readonly FOLD_ACCUMULATOR: "__fold_accumulator";
|
|
9122
|
+
/** Prefix for large dep results stored in WM findings tier */
|
|
9123
|
+
readonly WM_DEP_FINDINGS_PREFIX: "findings/__dep_result_";
|
|
9124
|
+
};
|
|
9125
|
+
interface ControlFlowResult {
|
|
9126
|
+
completed: boolean;
|
|
9127
|
+
result?: unknown;
|
|
9128
|
+
error?: string;
|
|
9129
|
+
}
|
|
9130
|
+
/**
|
|
9131
|
+
* Resolve template placeholders in text.
|
|
9132
|
+
*
|
|
9133
|
+
* Supported namespaces:
|
|
9134
|
+
* - {{param.name}} → inputs[name]
|
|
9135
|
+
* - {{map.item}} / {{map.index}} / {{map.total}} → ICM keys
|
|
9136
|
+
* - {{fold.accumulator}} → ICM key
|
|
9137
|
+
*
|
|
9138
|
+
* Non-string values are JSON.stringify'd. Unresolved templates are left as-is.
|
|
9139
|
+
*/
|
|
9140
|
+
declare function resolveTemplates(text: string, inputs: Record<string, unknown>, icmPlugin: InContextMemoryPluginNextGen | null): string;
|
|
9141
|
+
|
|
9849
9142
|
/**
|
|
9850
9143
|
* FilePersistentInstructionsStorage - File-based storage for persistent instructions
|
|
9851
9144
|
*
|
|
@@ -11113,6 +10406,8 @@ interface GenericAPIToolOptions {
|
|
|
11113
10406
|
description?: string;
|
|
11114
10407
|
/** User ID for multi-user OAuth */
|
|
11115
10408
|
userId?: string;
|
|
10409
|
+
/** Account alias for multi-account OAuth (baked into tool name and context) */
|
|
10410
|
+
accountId?: string;
|
|
11116
10411
|
/** Permission config for the tool */
|
|
11117
10412
|
permission?: ToolPermissionConfig$1;
|
|
11118
10413
|
}
|
|
@@ -11141,6 +10436,8 @@ interface GenericAPICallResult {
|
|
|
11141
10436
|
interface ConnectorToolsOptions {
|
|
11142
10437
|
/** Optional scoped registry for access-controlled connector lookup */
|
|
11143
10438
|
registry?: IConnectorRegistry;
|
|
10439
|
+
/** Account alias for multi-account OAuth. When set, tools are prefixed with accountId and context is bound. */
|
|
10440
|
+
accountId?: string;
|
|
11144
10441
|
}
|
|
11145
10442
|
/**
|
|
11146
10443
|
* ConnectorTools - Main API for vendor-dependent tools
|
|
@@ -11284,6 +10581,34 @@ declare class ConnectorTools {
|
|
|
11284
10581
|
*/
|
|
11285
10582
|
private static maintainCacheSize;
|
|
11286
10583
|
private static resolveConnector;
|
|
10584
|
+
/**
|
|
10585
|
+
* Generate tools for a set of auth identities.
|
|
10586
|
+
* Each identity gets its own tool set with unique name prefixes.
|
|
10587
|
+
*
|
|
10588
|
+
* @param identities - Array of auth identities
|
|
10589
|
+
* @param userId - Optional user ID for multi-user OAuth
|
|
10590
|
+
* @param options - Optional registry for scoped connector lookup
|
|
10591
|
+
* @returns Map of identity key to tool array
|
|
10592
|
+
*
|
|
10593
|
+
* @example
|
|
10594
|
+
* ```typescript
|
|
10595
|
+
* const toolsByIdentity = ConnectorTools.forIdentities([
|
|
10596
|
+
* { connector: 'microsoft', accountId: 'work' },
|
|
10597
|
+
* { connector: 'microsoft', accountId: 'personal' },
|
|
10598
|
+
* { connector: 'github' },
|
|
10599
|
+
* ]);
|
|
10600
|
+
* // Keys: 'microsoft:work', 'microsoft:personal', 'github'
|
|
10601
|
+
* ```
|
|
10602
|
+
*/
|
|
10603
|
+
static forIdentities(identities: AuthIdentity[], userId?: string, options?: {
|
|
10604
|
+
registry?: IConnectorRegistry;
|
|
10605
|
+
}): Map<string, ToolFunction[]>;
|
|
10606
|
+
/**
|
|
10607
|
+
* Wrap a tool to inject accountId into ToolContext at execute time.
|
|
10608
|
+
* This allows identity-bound tools to use the correct account without
|
|
10609
|
+
* modifying every service tool factory.
|
|
10610
|
+
*/
|
|
10611
|
+
private static bindAccountId;
|
|
11287
10612
|
private static createGenericAPITool;
|
|
11288
10613
|
}
|
|
11289
10614
|
|
|
@@ -11333,43 +10658,56 @@ declare class OAuthManager {
|
|
|
11333
10658
|
* Automatically refreshes if expired
|
|
11334
10659
|
*
|
|
11335
10660
|
* @param userId - User identifier for multi-user support (optional)
|
|
10661
|
+
* @param accountId - Account alias for multi-account support (optional)
|
|
11336
10662
|
*/
|
|
11337
|
-
getToken(userId?: string): Promise<string>;
|
|
10663
|
+
getToken(userId?: string, accountId?: string): Promise<string>;
|
|
11338
10664
|
/**
|
|
11339
10665
|
* Force refresh the token
|
|
11340
10666
|
*
|
|
11341
10667
|
* @param userId - User identifier for multi-user support (optional)
|
|
10668
|
+
* @param accountId - Account alias for multi-account support (optional)
|
|
11342
10669
|
*/
|
|
11343
|
-
refreshToken(userId?: string): Promise<string>;
|
|
10670
|
+
refreshToken(userId?: string, accountId?: string): Promise<string>;
|
|
11344
10671
|
/**
|
|
11345
10672
|
* Check if current token is valid
|
|
11346
10673
|
*
|
|
11347
10674
|
* @param userId - User identifier for multi-user support (optional)
|
|
10675
|
+
* @param accountId - Account alias for multi-account support (optional)
|
|
11348
10676
|
*/
|
|
11349
|
-
isTokenValid(userId?: string): Promise<boolean>;
|
|
10677
|
+
isTokenValid(userId?: string, accountId?: string): Promise<boolean>;
|
|
11350
10678
|
/**
|
|
11351
10679
|
* Start authorization flow (Authorization Code only)
|
|
11352
10680
|
* Returns URL for user to visit
|
|
11353
10681
|
*
|
|
11354
10682
|
* @param userId - User identifier for multi-user support (optional)
|
|
10683
|
+
* @param accountId - Account alias for multi-account support (optional)
|
|
11355
10684
|
* @returns Authorization URL for the user to visit
|
|
11356
10685
|
*/
|
|
11357
|
-
startAuthFlow(userId?: string): Promise<string>;
|
|
10686
|
+
startAuthFlow(userId?: string, accountId?: string): Promise<string>;
|
|
11358
10687
|
/**
|
|
11359
10688
|
* Handle OAuth callback (Authorization Code only)
|
|
11360
10689
|
* Call this with the callback URL after user authorizes
|
|
11361
10690
|
*
|
|
11362
10691
|
* @param callbackUrl - Full callback URL with code and state parameters
|
|
11363
10692
|
* @param userId - Optional user identifier (can be extracted from state if embedded)
|
|
10693
|
+
* @param accountId - Optional account alias (can be extracted from state if embedded)
|
|
11364
10694
|
*/
|
|
11365
|
-
handleCallback(callbackUrl: string, userId?: string): Promise<void>;
|
|
10695
|
+
handleCallback(callbackUrl: string, userId?: string, accountId?: string): Promise<void>;
|
|
11366
10696
|
/**
|
|
11367
10697
|
* Revoke token (if supported by provider)
|
|
11368
10698
|
*
|
|
11369
10699
|
* @param revocationUrl - Optional revocation endpoint URL
|
|
11370
10700
|
* @param userId - User identifier for multi-user support (optional)
|
|
10701
|
+
* @param accountId - Account alias for multi-account support (optional)
|
|
10702
|
+
*/
|
|
10703
|
+
revokeToken(revocationUrl?: string, userId?: string, accountId?: string): Promise<void>;
|
|
10704
|
+
/**
|
|
10705
|
+
* List account aliases for a user (Authorization Code only)
|
|
10706
|
+
*
|
|
10707
|
+
* @param userId - User identifier (optional)
|
|
10708
|
+
* @returns Array of account aliases (e.g., ['work', 'personal'])
|
|
11371
10709
|
*/
|
|
11372
|
-
|
|
10710
|
+
listAccounts(userId?: string): Promise<string[]>;
|
|
11373
10711
|
private validateConfig;
|
|
11374
10712
|
}
|
|
11375
10713
|
|
|
@@ -11392,6 +10730,10 @@ declare class MemoryStorage implements ITokenStorage {
|
|
|
11392
10730
|
* Get number of stored tokens
|
|
11393
10731
|
*/
|
|
11394
10732
|
size(): number;
|
|
10733
|
+
/**
|
|
10734
|
+
* List all storage keys (for account enumeration)
|
|
10735
|
+
*/
|
|
10736
|
+
listKeys(): Promise<string[]>;
|
|
11395
10737
|
}
|
|
11396
10738
|
|
|
11397
10739
|
/**
|
|
@@ -11416,6 +10758,11 @@ declare class FileStorage implements ITokenStorage {
|
|
|
11416
10758
|
getToken(key: string): Promise<StoredToken$1 | null>;
|
|
11417
10759
|
deleteToken(key: string): Promise<void>;
|
|
11418
10760
|
hasToken(key: string): Promise<boolean>;
|
|
10761
|
+
/**
|
|
10762
|
+
* List all storage keys by decrypting each token file and reading _storageKey.
|
|
10763
|
+
* Falls back to returning hashed filenames for tokens stored before multi-account support.
|
|
10764
|
+
*/
|
|
10765
|
+
listKeys(): Promise<string[]>;
|
|
11419
10766
|
/**
|
|
11420
10767
|
* List all token keys (for debugging)
|
|
11421
10768
|
*/
|
|
@@ -11438,7 +10785,7 @@ declare class FileStorage implements ITokenStorage {
|
|
|
11438
10785
|
/**
|
|
11439
10786
|
* Fetch with automatic authentication using connector's configured auth scheme
|
|
11440
10787
|
*
|
|
11441
|
-
* Same API as standard fetch(), but with additional authProvider and optional userId parameters.
|
|
10788
|
+
* Same API as standard fetch(), but with additional authProvider and optional userId/accountId parameters.
|
|
11442
10789
|
* Authentication is handled automatically based on the connector's configuration:
|
|
11443
10790
|
* - Bearer tokens (GitHub, Slack, Stripe)
|
|
11444
10791
|
* - Bot tokens (Discord)
|
|
@@ -11449,6 +10796,7 @@ declare class FileStorage implements ITokenStorage {
|
|
|
11449
10796
|
* @param options - Standard fetch options (DO NOT set Authorization header - it's added automatically)
|
|
11450
10797
|
* @param authProvider - Name of registered connector (e.g., 'github', 'slack')
|
|
11451
10798
|
* @param userId - Optional user identifier for multi-user support (omit for single-user mode)
|
|
10799
|
+
* @param accountId - Optional account alias for multi-account OAuth (e.g., 'work', 'personal')
|
|
11452
10800
|
* @returns Promise<Response> - Same as standard fetch
|
|
11453
10801
|
*
|
|
11454
10802
|
* @example Single-user mode:
|
|
@@ -11461,37 +10809,28 @@ declare class FileStorage implements ITokenStorage {
|
|
|
11461
10809
|
* const data = await response.json();
|
|
11462
10810
|
* ```
|
|
11463
10811
|
*
|
|
11464
|
-
* @example
|
|
11465
|
-
* ```typescript
|
|
11466
|
-
* const response = await authenticatedFetch(
|
|
11467
|
-
* '/user/repos', // Resolves to https://api.github.com/user/repos
|
|
11468
|
-
* { method: 'GET' },
|
|
11469
|
-
* 'github'
|
|
11470
|
-
* );
|
|
11471
|
-
* const repos = await response.json();
|
|
11472
|
-
* ```
|
|
11473
|
-
*
|
|
11474
|
-
* @example Multi-user mode:
|
|
10812
|
+
* @example Multi-account mode:
|
|
11475
10813
|
* ```typescript
|
|
11476
10814
|
* const response = await authenticatedFetch(
|
|
11477
|
-
* '/
|
|
10815
|
+
* 'https://graph.microsoft.com/v1.0/me',
|
|
11478
10816
|
* { method: 'GET' },
|
|
11479
|
-
* '
|
|
11480
|
-
* '
|
|
10817
|
+
* 'microsoft',
|
|
10818
|
+
* 'alice',
|
|
10819
|
+
* 'work' // Use Alice's work Microsoft account
|
|
11481
10820
|
* );
|
|
11482
|
-
* const repos = await response.json();
|
|
11483
10821
|
* ```
|
|
11484
10822
|
*/
|
|
11485
|
-
declare function authenticatedFetch(url: string | URL, options: RequestInit | undefined, authProvider: string, userId?: string): Promise<Response>;
|
|
10823
|
+
declare function authenticatedFetch(url: string | URL, options: RequestInit | undefined, authProvider: string, userId?: string, accountId?: string): Promise<Response>;
|
|
11486
10824
|
/**
|
|
11487
|
-
* Create an authenticated fetch function bound to a specific connector and optionally a user
|
|
10825
|
+
* Create an authenticated fetch function bound to a specific connector and optionally a user/account
|
|
11488
10826
|
*
|
|
11489
10827
|
* Useful for creating reusable fetch functions for a specific API and/or user.
|
|
11490
10828
|
* Uses connector's configured auth scheme (Bearer, Bot, Basic, custom headers).
|
|
11491
10829
|
*
|
|
11492
10830
|
* @param authProvider - Name of registered connector
|
|
11493
10831
|
* @param userId - Optional user identifier to bind to (omit for single-user mode)
|
|
11494
|
-
* @
|
|
10832
|
+
* @param accountId - Optional account alias for multi-account OAuth (e.g., 'work', 'personal')
|
|
10833
|
+
* @returns Fetch function bound to that connector (and user/account)
|
|
11495
10834
|
*
|
|
11496
10835
|
* @example Single-user mode:
|
|
11497
10836
|
* ```typescript
|
|
@@ -11502,27 +10841,17 @@ declare function authenticatedFetch(url: string | URL, options: RequestInit | un
|
|
|
11502
10841
|
* const emails = await msftFetch('https://graph.microsoft.com/v1.0/me/messages');
|
|
11503
10842
|
* ```
|
|
11504
10843
|
*
|
|
11505
|
-
* @example
|
|
11506
|
-
* ```typescript
|
|
11507
|
-
* const githubFetch = createAuthenticatedFetch('github');
|
|
11508
|
-
*
|
|
11509
|
-
* // Relative URLs resolved against connector's baseURL
|
|
11510
|
-
* const repos = await githubFetch('/user/repos');
|
|
11511
|
-
* const issues = await githubFetch('/user/issues');
|
|
11512
|
-
* ```
|
|
11513
|
-
*
|
|
11514
|
-
* @example Multi-user mode:
|
|
10844
|
+
* @example Multi-account mode:
|
|
11515
10845
|
* ```typescript
|
|
11516
|
-
* // Create fetch
|
|
11517
|
-
* const
|
|
11518
|
-
* const
|
|
10846
|
+
* // Create fetch for Alice's work Microsoft account
|
|
10847
|
+
* const workFetch = createAuthenticatedFetch('microsoft', 'alice', 'work');
|
|
10848
|
+
* const personalFetch = createAuthenticatedFetch('microsoft', 'alice', 'personal');
|
|
11519
10849
|
*
|
|
11520
|
-
*
|
|
11521
|
-
* const
|
|
11522
|
-
* const bobRepos = await bobFetch('/user/repos');
|
|
10850
|
+
* const workEmails = await workFetch('/me/messages');
|
|
10851
|
+
* const personalEmails = await personalFetch('/me/messages');
|
|
11523
10852
|
* ```
|
|
11524
10853
|
*/
|
|
11525
|
-
declare function createAuthenticatedFetch(authProvider: string, userId?: string): (url: string | URL, options?: RequestInit) => Promise<Response>;
|
|
10854
|
+
declare function createAuthenticatedFetch(authProvider: string, userId?: string, accountId?: string): (url: string | URL, options?: RequestInit) => Promise<Response>;
|
|
11526
10855
|
|
|
11527
10856
|
/**
|
|
11528
10857
|
* Tool Generator - Auto-generate tools for registered connectors
|
|
@@ -13693,6 +13022,7 @@ interface MicrosoftFetchOptions {
|
|
|
13693
13022
|
method?: string;
|
|
13694
13023
|
body?: unknown;
|
|
13695
13024
|
userId?: string;
|
|
13025
|
+
accountId?: string;
|
|
13696
13026
|
queryParams?: Record<string, string | number | boolean>;
|
|
13697
13027
|
accept?: string;
|
|
13698
13028
|
}
|
|
@@ -13756,7 +13086,7 @@ declare function isTeamsMeetingUrl(input: string): boolean;
|
|
|
13756
13086
|
* @returns The resolved meeting ID and optional subject
|
|
13757
13087
|
* @throws Error if the URL cannot be resolved or input is empty
|
|
13758
13088
|
*/
|
|
13759
|
-
declare function resolveMeetingId(connector: Connector, input: string, prefix: string, effectiveUserId?: string): Promise<{
|
|
13089
|
+
declare function resolveMeetingId(connector: Connector, input: string, prefix: string, effectiveUserId?: string, effectiveAccountId?: string): Promise<{
|
|
13760
13090
|
meetingId: string;
|
|
13761
13091
|
subject?: string;
|
|
13762
13092
|
}>;
|
|
@@ -14302,7 +13632,7 @@ declare const desktopTools: (ToolFunction<DesktopScreenshotArgs, DesktopScreensh
|
|
|
14302
13632
|
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
|
|
14303
13633
|
*
|
|
14304
13634
|
* Generated by: scripts/generate-tool-registry.ts
|
|
14305
|
-
* Generated at: 2026-02-
|
|
13635
|
+
* Generated at: 2026-02-25T20:33:26.091Z
|
|
14306
13636
|
*
|
|
14307
13637
|
* To regenerate: npm run generate:tools
|
|
14308
13638
|
*/
|
|
@@ -14923,4 +14253,4 @@ declare class ProviderConfigAgent {
|
|
|
14923
14253
|
reset(): void;
|
|
14924
14254
|
}
|
|
14925
14255
|
|
|
14926
|
-
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 IContextSnapshot, 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, type IPluginSnapshot, 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 IToolSnapshot, type IUserInfoStorage, type IVideoModelDescription, type IVideoProvider, type IViewContextComponent, type IViewContextData, 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, formatPluginDisplayName, 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 };
|
|
14256
|
+
export { AGENT_DEFINITION_FORMAT_VERSION, AIError, APPROVAL_STATE_VERSION, Agent, type AgentConfig$1 as AgentConfig, AgentContextNextGen, 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, AuthIdentity, 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, CUSTOM_TOOL_DEFINITION_VERSION, CheckpointManager, type CheckpointStrategy, CircuitBreaker, type CircuitBreakerConfig, type CircuitBreakerEvents, type CircuitBreakerMetrics, CircuitOpenError, type CircuitState, type ClipboardImageResult, CompactionContext, CompactionResult, Connector, ConnectorAccessContext, ConnectorAuth, ConnectorConfig, ConnectorConfigResult, ConnectorConfigStore, ConnectorFetchOptions, type ConnectorToolEntry, ConnectorTools, type ConnectorToolsOptions, ConsoleMetrics, ConsolidationResult, Content, ContextBudget$1 as ContextBudget, ContextEvents, ContextFeatures, type ContextManagerConfig, type ContextOverflowBudget, ContextOverflowError, ContextSessionMetadata, ContextSessionSummary, ContextStorageListOptions, type ControlFlowResult, 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_CONTEXT_CONFIG, DEFAULT_DESKTOP_CONFIG, 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, ICompactionStrategy, IConnectorAccessPolicy, type IConnectorConfigStorage, IConnectorRegistry, type IContextCompactor, type IContextComponent, IContextPluginNextGen, type IContextSnapshot, 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, type IPluginSnapshot, IProvider, type IResearchSource, type IRoutineDefinitionStorage, type ISTTModelDescription, type IScrapeProvider, type ISearchProvider, type ISpeechToTextProvider, type ITTSModelDescription, ITextProvider, type ITextToSpeechProvider, ITokenEstimator$1 as ITokenEstimator, ITokenStorage, type IToolExecutionPipeline, type IToolExecutionPlugin, type IToolExecutor, type IToolSnapshot, type IUserInfoStorage, type IVideoModelDescription, type IVideoProvider, type IViewContextComponent, type IViewContextData, 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, 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 PluginExecutionContext, PreparedContext, ProviderAuthError, ProviderCapabilities, ProviderConfigAgent, ProviderContextLengthError, ProviderError, ProviderErrorMapper, ProviderNotFoundError, ProviderRateLimitError, ROUTINE_KEYS, 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, type RoutineParameter, 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, 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, StoredContextSession, type StoredToken, type StrategyInfo, StrategyRegistry, type StrategyRegistryEntry, StreamEvent, StreamEventType, StreamHelpers, StreamState, type SubRoutineSpec, SummarizeCompactor, TERMINAL_TASK_STATUSES, type TTSModelCapabilities, type TTSOptions, type TTSResponse, TTS_MODELS, TTS_MODEL_REGISTRY, type Task, type AgentConfig as TaskAgentStateConfig, type TaskCondition, type TaskControlFlow, type TaskExecution, type TaskFailure, type TaskFoldFlow, type TaskInput, type TaskMapFlow, type TaskStatus, TaskStatusForMemory, TaskTimeoutError, ToolContext as TaskToolContext, type TaskUntilFlow, 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, formatPluginDisplayName, 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, resolveTemplates, retryWithBackoff, sanitizeToolName, setMediaOutputHandler, setMediaStorage, setMetricsCollector, simpleTokenEstimator, toConnectorOptions, toolRegistry, index as tools, updateTaskStatus, validatePath, writeFile };
|