import { i as isSDKError, n as SDKError, r as isRetryable, t as ErrorCode } from "./index-BFYASYJk.js"; import { C as AuthProvider, D as RefreshableTokenAuth, E as ReadTokenAuth, O as StaticTokenAuth, S as TokenValidationResult, T as NoAuth, _ as SendMessageRequest, a as BatchScopedTokenPayloadSchema, b as SessionScopedTokenPayloadSchema, c as CreateSessionResponse, d as ProductSchema, f as ProductSecrets, g as ReadTokenPayloadSchema, h as ReadTokenPayload, i as BatchScopedTokenPayload, l as Product, m as ProjectScopedTokenPayloadSchema, n as getTokenTTL, o as CreateSessionRequest, p as ProjectScopedTokenPayload, r as isTokenExpiringSoon, s as CreateSessionRequestSchema, t as decodeToken, u as ProductAuthInfo, v as SendMessageRequestSchema, w as CallbackAuth, x as TokenScope, y as SessionScopedTokenPayload } from "./tokens-browser-DCV3-WHc.js"; import { ChannelAccessResult, EnvTokenAuth, ProductAuth, ProductTokenIssuer, SidecarAuth, canBatchTokenAccessChannel, canProjectTokenAccessChannel, canSessionTokenAccessChannel, canTokenAccessChannel, extractProjectFromChannel, extractSessionFromChannel, generateApiKey, generateSecureToken, generateSigningSecret, getAllowedChannelPatterns, getTokenScope, hashApiKey, isBatchScopedToken, isProjectScopedToken, isSessionScopedToken, issueBatchScopedToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, validateChannelSubscription, validateTokenScope, verifyApiKey, verifyReadToken } from "./auth/index.js"; import { a as EventChannel, c as EventBufferConfig, i as ChannelHandler, n as EventDeduplicator, o as BufferedEvent, r as ChannelConfig, s as EventBuffer, t as DeduplicatorConfig } from "./index-CuBvSsBf.js"; import { S as TransportMode, _ as StreamOptions, a as RecordedRequest, b as TransportEvents, c as TransportAdapter, d as ConnectionQuality, f as ConnectionState, g as SSEEvent, h as RequestOptions, i as MockTransportConfig, l as ConnectionManager, m as ReconnectionConfig, n as MockStreamEvent, o as BaseTransportAdapter, p as DEFAULT_RECONNECTION_CONFIG, r as MockTransportAdapter, s as Subscription, t as MockResponse, u as ConnectionManagerConfig, v as SubscriptionState, x as TransportMetrics, y as TransportConfig } from "./index-Dq6SfGaX.js"; import { a as ProtectionOptions, c as CircuitBreaker, d as CircuitOpenError, f as CircuitState, i as withTimeout, l as CircuitBreakerConfig, n as createTimeoutController, o as createProtectedFn, r as sleep, s as withProtection, t as TimeoutError, u as CircuitBreakerStats } from "./index-CKDeaS7l.js"; import { ParsedSSEEvent, SSEChunkParser, SSEEventData, SSEParserOptions, StreamTokenUsage, StreamUsageAccumulator, StreamUsageExtractor, consumeSSEStream, createStreamUsageExtractor, createUsageCallback, parseSSEData, parseSSEStream } from "./sse/index.js"; import { $ as CONTENT_KEY_FIELD, A as TANGLE_SUBJECT_KEY, B as GEN_AI_MODEL_KEYS, C as RUN_KEY_ATTRS, D as TANGLE_RUN_ID_KEY, E as TANGLE_RUN_ID_CAMEL_KEY, F as TRIGGER_ID_ATTRS, G as GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS, H as GEN_AI_OUTPUT_TOKEN_KEYS, I as TRIGGER_SOURCE_ATTRS, J as GEN_AI_USAGE_OUTPUT_TOKENS, K as GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS, L as WORKFLOW_MARKER_ATTRS, M as TANGLE_TRIGGER_KIND_KEY, N as TANGLE_TRIGGER_SOURCE_KEY, O as TANGLE_RUN_KIND_KEY, P as TANGLE_WORKFLOW_ID_KEY, Q as CONTENT_KEYS, R as GEN_AI_CONVERSATION_ID, S as PARENT_RUN_KEY_ATTRS, T as SUBJECT_KEY_ATTRS, U as GEN_AI_REQUEST_MODEL, V as GEN_AI_OPERATION_NAME, W as GEN_AI_RESPONSE_MODEL, X as genAiUsageAttributes, Y as GenAiUsage, Z as CONTENT_COMPLETION_KEY, _ as promptTokens, a as TOKEN_USAGE_CACHE_READ_INCLUSIVE_KEYS, at as DeclaredIntentMatch, b as tokenCount, c as TOKEN_USAGE_COST_KEYS, ct as asContentField, d as TOKEN_USAGE_OUTPUT_KEYS, dt as declaredTaskText, et as CONTENT_PROMPT_KEY, f as TokenUsageCounts, ft as extractContent, g as firstUsageCostUsd, gt as resolveDeclaredIntent, h as firstTokenCount, ht as normalizeContentAttributes, i as TOKEN_USAGE_CACHE_READ_EXCLUSIVE_KEYS, it as ContentField, j as TANGLE_TRIGGER_ID_KEY, k as TANGLE_RUN_PARENT_ID_KEY, l as TOKEN_USAGE_DETAIL_KEYS, lt as asContentString, m as cacheHitRate, mt as logRecordContentBag, n as TOKEN_USAGE_CACHE_BAG_READ_KEYS, nt as CONTENT_TOOL_NAME_KEY, o as TOKEN_USAGE_CACHE_WRITE_EXCLUSIVE_KEYS, ot as INDEXED_CONTENT_KEY_LIKE_PATTERNS, p as addTokenUsage, pt as hasContent, q as GEN_AI_USAGE_INPUT_TOKENS, r as TOKEN_USAGE_CACHE_BAG_WRITE_KEYS, rt as CONTENT_TOOL_RESULT_KEY, s as TOKEN_USAGE_CACHE_WRITE_INCLUSIVE_KEYS, st as NormalizedContent, t as TOKEN_USAGE_CACHE_BAG_KEYS, tt as CONTENT_TOOL_ARGS_KEY, u as TOKEN_USAGE_INPUT_KEYS, ut as classifyAgent, v as readTokenCostUsd, w as RUN_KIND_ATTRS, x as tokenUsageSource, y as readTokenUsage, z as GEN_AI_INPUT_TOKEN_KEYS } from "./index-BvjA5i93.js"; import { A as ToolStateCompleted, C as TerminalDataEvent, D as TextPart, E as TerminalResizeEvent, F as isReasoningPart, I as isSubtaskPart, L as isTextPart, M as ToolStatePending, N as ToolStateRunning, O as ToolPart, P as isFilePart, R as isToolPart, S as SubtaskPart, T as TerminalExitEvent, _ as ReplayEndEvent, a as DoneEvent, b as SessionUpdatedEvent, c as ExecutionCompletedEvent, d as FilePart, f as HeartbeatEvent, g as ReasoningPart, h as PartBase, i as ConnectionInitEvent, j as ToolStateError, k as ToolState, l as ExecutionFailedEvent, m as Part, n as AgentEventType, o as ErrorEvent, p as MessagePartUpdatedEvent, r as AgentEventTypeSchema, s as EventMetadata, t as AgentEvent, u as ExecutionStartedEvent, v as ReplayStartEvent, w as TerminalEvent, x as StatusEvent, y as ResultEvent } from "./index-CQPGv8jg.js"; //#region src/cache/index.d.ts /** * Response Caching * * In-memory cache with TTL and cache-control support. */ /** Cache entry */ interface CacheEntry { data: T; cachedAt: number; expiresAt: number; etag?: string; } /** Cache configuration */ interface CacheConfig { /** Default TTL in ms (default: 60000 = 1 minute) */ defaultTtlMs?: number; /** Max entries (default: 1000) */ maxEntries?: number; /** Cache key generator */ keyGenerator?: (path: string, params?: Record) => string; } /** Cache interface for different storage backends */ interface CacheStorage { get(key: string): T | undefined | Promise; set(key: string, value: T, ttlMs?: number): void | Promise; delete(key: string): void | Promise; clear(): void | Promise; } /** In-memory LRU cache */ declare class MemoryCache implements CacheStorage> { private cache; private readonly maxEntries; constructor(maxEntries?: number); get(key: string): CacheEntry | undefined; set(key: string, value: CacheEntry): void; delete(key: string): void; clear(): void; /** Get cache stats */ stats(): { size: number; maxEntries: number; }; } /** Response cache manager */ declare class ResponseCache { private storage; private defaultTtlMs; private keyGenerator; constructor(config?: CacheConfig); private defaultKeyGenerator; /** Get cached response */ get(path: string, params?: Record): Promise; /** Get with stale-while-revalidate support */ getWithMeta(path: string, params?: Record): Promise<{ data: T; stale: boolean; etag?: string; } | undefined>; /** Cache response */ set(path: string, data: T, options?: { params?: Record; ttlMs?: number; etag?: string; }): Promise; /** Invalidate cache entry */ invalidate(path: string, params?: Record): Promise; /** Invalidate all entries matching prefix */ invalidatePrefix(_prefix: string): Promise; /** Clear entire cache */ clear(): Promise; /** Parse Cache-Control header */ static parseCacheControl(header: string): { maxAge?: number; noCache?: boolean; noStore?: boolean; }; } //#endregion //#region src/middleware/index.d.ts /** Request context passed through interceptor chain */ interface RequestContext { /** Original request options */ request: RequestOptions; /** Request start time */ startedAt: number; /** Unique request ID */ requestId: string; /** Retry attempt number (0 = first attempt) */ attempt: number; /** Custom metadata */ meta: Record; } /** Response context */ interface ResponseContext { /** Request context */ request: RequestContext; /** Response data */ data: T; /** Response time in ms */ durationMs: number; /** HTTP status (if available) */ status?: number; } /** Error context */ interface ErrorContext { /** Request context */ request: RequestContext; /** The error */ error: SDKError; /** Duration before error */ durationMs: number; } /** Interceptor interface */ interface Interceptor { /** Modify request before sending */ onRequest?(ctx: RequestContext): RequestContext | Promise; /** Process successful response */ onResponse?(ctx: ResponseContext): T | Promise; /** Handle error (can transform or rethrow) */ onError?(ctx: ErrorContext): void | Promise; } /** Interceptor chain executor */ declare class InterceptorChain { private interceptors; /** Add interceptor to chain */ use(interceptor: Interceptor): this; /** Remove interceptor */ remove(interceptor: Interceptor): this; /** Run request through interceptors */ executeRequest(ctx: RequestContext): Promise; /** Run response through interceptors (reverse order) */ executeResponse(ctx: ResponseContext): Promise; /** Notify interceptors of error */ executeError(ctx: ErrorContext): Promise; } /** Generate unique request ID */ declare function generateRequestId(): string; /** Logging interceptor */ declare function createLoggingInterceptor(logger?: { debug?(msg: string, data?: unknown): void; info?(msg: string, data?: unknown): void; error?(msg: string, data?: unknown): void; }): Interceptor; /** Metrics interceptor */ declare function createMetricsInterceptor(onMetric: (metric: { path: string; method: string; status: "success" | "error"; durationMs: number; errorCode?: string; }) => void): Interceptor; /** Header injection interceptor */ declare function createHeaderInterceptor(headers: Record | (() => Record | Promise>)): Interceptor; //#endregion //#region src/storage/index.d.ts /** * Offline Storage Abstraction * * Platform-agnostic storage interface with implementations for different environments. */ /** Storage interface */ interface Storage { get(key: string): Promise; set(key: string, value: T): Promise; delete(key: string): Promise; clear(): Promise; keys(): Promise; } /** In-memory storage (default fallback) */ declare class MemoryStorage implements Storage { private data; get(key: string): Promise; set(key: string, value: T): Promise; delete(key: string): Promise; clear(): Promise; keys(): Promise; } /** Browser localStorage wrapper */ declare class LocalStorage implements Storage { private prefix; constructor(prefix?: string); private key; get(key: string): Promise; set(key: string, value: T): Promise; delete(key: string): Promise; clear(): Promise; keys(): Promise; } /** Offline request queue */ interface QueuedRequest { id: string; path: string; method: string; body?: unknown; headers?: Record; createdAt: number; attempts: number; idempotencyKey?: string; } /** Offline queue manager */ declare class OfflineQueue { private storage; private readonly storageKey; constructor(storage: Storage); /** Add request to queue */ enqueue(request: Omit): Promise; /** Get all queued requests */ getQueue(): Promise; /** Get next request to process */ peek(): Promise; /** Remove request from queue */ dequeue(id: string): Promise; /** Increment attempt count */ incrementAttempts(id: string): Promise; /** Get queue size */ size(): Promise; /** Clear queue */ clear(): Promise; /** Process queue with handler */ process(handler: (request: QueuedRequest) => Promise, options?: { maxAttempts?: number; batchSize?: number; }): Promise<{ processed: number; failed: number; }>; } /** Detect available storage */ declare function detectStorage(): Storage; //#endregion //#region src/platform/index.d.ts /** * Secure credential storage interface. * Implementations should use platform-specific secure storage: * - Web: Encrypted localStorage or IndexedDB * - React Native: react-native-keychain * - Electron: safeStorage + electron-store * - Tauri: tauri-plugin-keyring * - Node: keytar or encrypted file */ interface SecureStorage { /** Store a credential securely */ setCredential(key: string, value: string): Promise; /** Retrieve a credential */ getCredential(key: string): Promise; /** Delete a credential */ deleteCredential(key: string): Promise; /** Check if secure storage is available */ isAvailable(): Promise; } /** * Network connectivity information. * Implementations should use platform-specific APIs: * - Web: navigator.onLine + online/offline events * - React Native: @react-native-community/netinfo * - Electron: net.online * - Tauri: network events * - Node/TUI: assume online or use dns lookup */ interface NetworkInfo { /** Check if device is online */ isOnline(): boolean; /** Subscribe to connectivity changes */ onConnectivityChange(callback: (online: boolean) => void): () => void; /** Get connection quality hint (optional) */ getConnectionType?(): "wifi" | "cellular" | "ethernet" | "unknown"; } /** * State persistence adapter for cross-session state. * Handles syncing SDK state (sessions, queued requests, cache) * to platform-appropriate storage. */ interface PersistenceAdapter { /** Save state snapshot */ saveState(namespace: string, state: T): Promise; /** Load state snapshot */ loadState(namespace: string): Promise; /** Clear namespace */ clearState(namespace: string): Promise; /** Subscribe to external state changes (for multi-window/tab sync) */ onExternalChange?(namespace: string, callback: (state: unknown) => void): () => void; } /** * Platform capabilities descriptor. * Used to adapt SDK behavior to platform constraints. */ interface PlatformCapabilities { /** Platform identifier */ platform: "web" | "react-native" | "electron" | "tauri" | "node"; /** Supports background execution */ supportsBackground: boolean; /** Supports secure credential storage */ supportsSecureStorage: boolean; /** Supports WebSocket */ supportsWebSocket: boolean; /** Supports SSE (EventSource) */ supportsSSE: boolean; /** Max concurrent connections (browser limits) */ maxConnections?: number; } /** * Platform adapter combining all platform-specific interfaces. * Each platform provides one implementation of this interface. */ interface PlatformAdapter { /** Platform capabilities */ capabilities: PlatformCapabilities; /** General key-value storage */ storage: Storage; /** Secure credential storage (optional) */ secureStorage?: SecureStorage; /** Network info (optional) */ network?: NetworkInfo; /** State persistence (optional) */ persistence?: PersistenceAdapter; /** Fetch implementation */ fetch: typeof fetch; } /** * In-memory secure storage fallback. * NOT SECURE - use only for development/testing. */ declare class MemorySecureStorage implements SecureStorage { private credentials; setCredential(key: string, value: string): Promise; getCredential(key: string): Promise; deleteCredential(key: string): Promise; isAvailable(): Promise; } /** * Browser-based network info using navigator.onLine. */ declare class BrowserNetworkInfo implements NetworkInfo { isOnline(): boolean; onConnectivityChange(callback: (online: boolean) => void): () => void; getConnectionType(): "wifi" | "cellular" | "ethernet" | "unknown"; } /** * Node.js network info (assumes always online). */ declare class NodeNetworkInfo implements NetworkInfo { isOnline(): boolean; onConnectivityChange(_callback: (online: boolean) => void): () => void; } /** * Storage-based persistence adapter. * Uses provided Storage implementation for state persistence. */ declare class StoragePersistence implements PersistenceAdapter { private storage; constructor(storage: Storage); saveState(namespace: string, state: T): Promise; loadState(namespace: string): Promise; clearState(namespace: string): Promise; } /** * Browser persistence with localStorage and storage events for tab sync. */ declare class BrowserPersistence implements PersistenceAdapter { private prefix; constructor(prefix?: string); saveState(namespace: string, state: T): Promise; loadState(namespace: string): Promise; clearState(namespace: string): Promise; onExternalChange(namespace: string, callback: (state: unknown) => void): () => void; } /** * Detect current platform. */ declare function detectPlatform(): PlatformCapabilities["platform"]; /** * Create default platform adapter for current environment. * Override with platform-specific implementations for better integration. */ declare function createDefaultPlatformAdapter(): PlatformAdapter; /** * Type-safe platform adapter factory. * Use this to create platform adapters with proper typing. */ declare function createPlatformAdapter(config: Partial & { capabilities: PlatformCapabilities; }): PlatformAdapter; //#endregion //#region src/retry/index.d.ts /** Retry configuration */ interface RetryConfig { /** Max retry attempts (default: 3) */ maxAttempts?: number; /** Initial delay in ms (default: 1000) */ initialDelayMs?: number; /** Max delay in ms (default: 30000) */ maxDelayMs?: number; /** Backoff multiplier (default: 2) */ multiplier?: number; /** Jitter factor 0-1 (default: 0.2) */ jitter?: number; /** Custom retry predicate */ shouldRetry?: (error: SDKError, attempt: number) => boolean; /** Callback before retry */ onRetry?: (error: SDKError, attempt: number, delayMs: number) => void; /** Cancels pending backoff and prevents another attempt. */ signal?: AbortSignal; } /** Calculate delay for attempt with jitter */ declare function calculateDelay(attempt: number, config: RetryConfig): number; /** Execute function with retry */ declare function withRetry(fn: (attempt: number) => Promise, config?: RetryConfig): Promise; /** Idempotency key generator */ declare function generateIdempotencyKey(): string; /** Retry decorator for class methods */ declare function Retryable(config?: RetryConfig): (_target: object, _propertyKey: string, descriptor: TypedPropertyDescriptor<(...args: unknown[]) => Promise>) => TypedPropertyDescriptor<(...args: unknown[]) => Promise>; //#endregion //#region src/utils/channel-matching.d.ts /** * Channel Pattern Matching * * Generic utility for matching channel patterns with wildcard support. * Used for channel subscriptions and event filtering. * * Pattern syntax: * - "*" matches all channels * - "foo.*" matches "foo.bar", "foo.baz", etc. (dot-separated) * - "foo:*" matches "foo:bar", "foo:baz", etc. (colon-separated) * - "foo.bar" matches exactly "foo.bar" * - "session:abc" matches exactly "session:abc" */ /** * Check if a pattern matches a channel name. * * @param pattern - The pattern to match against (supports wildcards) * @param channel - The channel name to check * @returns true if the pattern matches the channel */ declare function matchesChannel(pattern: string, channel: string): boolean; /** * Check if any subscribed channel pattern matches the given channel. * * @param subscribedChannels - Set or array of channel patterns * @param channel - The channel to check * @returns true if any pattern matches the channel */ declare function matchesAnyChannel(subscribedChannels: Set | string[], channel: string): boolean; //#endregion //#region src/utils/session-translator.d.ts /** * Session ID Translator * * Generic utility for translating session IDs in event objects. * Used to map internal session IDs to client-facing session IDs. */ interface SessionTranslation { /** The internal session ID to replace */ from: string; /** The client-facing session ID to use */ to: string; } /** * Translate session IDs in an event object. * Performs a deep string replacement via JSON serialization. * * @param event - The event object to translate * @param translation - The session ID mapping * @returns A new event object with translated session IDs */ declare function translateSessionId(event: T, translation: SessionTranslation): T; /** * Create a reusable translator function for a specific session mapping. * Pre-compiles the regex pattern for better performance when translating * many events with the same mapping. */ declare function createSessionTranslator(translation: SessionTranslation): (event: T) => T; /** * Extract session ID from various event structures. * Handles different event formats that may contain session information. */ declare function extractSessionId(event: unknown): string | null; //#endregion export { type AgentEvent, type AgentEventType, AgentEventTypeSchema, type AuthProvider, BaseTransportAdapter, type BatchScopedTokenPayload, BatchScopedTokenPayloadSchema, BrowserNetworkInfo, BrowserPersistence, type BufferedEvent, CONTENT_COMPLETION_KEY, CONTENT_KEYS, CONTENT_KEY_FIELD, CONTENT_PROMPT_KEY, CONTENT_TOOL_ARGS_KEY, CONTENT_TOOL_NAME_KEY, CONTENT_TOOL_RESULT_KEY, type CacheConfig, type CacheStorage, CallbackAuth, type ChannelAccessResult, type ChannelConfig, type ChannelHandler, CircuitBreaker, type CircuitBreakerConfig, type CircuitBreakerStats, CircuitOpenError, type CircuitState, type ConnectionInitEvent, ConnectionManager, type ConnectionManagerConfig, type ConnectionQuality, type ConnectionState, type ContentField, type CreateSessionRequest, CreateSessionRequestSchema, type CreateSessionResponse, DEFAULT_RECONNECTION_CONFIG, type DeclaredIntentMatch, type DeduplicatorConfig, type DoneEvent, EnvTokenAuth, type ErrorCode, type ErrorContext, type ErrorEvent, EventBuffer, type EventBufferConfig, EventChannel, EventDeduplicator, type EventMetadata, type ExecutionCompletedEvent, type ExecutionFailedEvent, type ExecutionStartedEvent, type FilePart, GEN_AI_CONVERSATION_ID, GEN_AI_INPUT_TOKEN_KEYS, GEN_AI_MODEL_KEYS, GEN_AI_OPERATION_NAME, GEN_AI_OUTPUT_TOKEN_KEYS, GEN_AI_REQUEST_MODEL, GEN_AI_RESPONSE_MODEL, GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS, GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS, GEN_AI_USAGE_INPUT_TOKENS, GEN_AI_USAGE_OUTPUT_TOKENS, type GenAiUsage, type HeartbeatEvent, INDEXED_CONTENT_KEY_LIKE_PATTERNS, type Interceptor, InterceptorChain, LocalStorage, MemoryCache, MemorySecureStorage, MemoryStorage, type MessagePartUpdatedEvent, type MockResponse, type MockStreamEvent, MockTransportAdapter, type MockTransportConfig, type NetworkInfo, NoAuth, NodeNetworkInfo, type NormalizedContent, OfflineQueue, PARENT_RUN_KEY_ATTRS, type ParsedSSEEvent, type Part, type PartBase, type PersistenceAdapter, type PlatformAdapter, type PlatformCapabilities, type Product, ProductAuth, type ProductAuthInfo, ProductSchema, type ProductSecrets, ProductTokenIssuer, type ProjectScopedTokenPayload, ProjectScopedTokenPayloadSchema, type ProtectionOptions, type QueuedRequest, RUN_KEY_ATTRS, RUN_KIND_ATTRS, ReadTokenAuth, type ReadTokenPayload, ReadTokenPayloadSchema, type ReasoningPart, type ReconnectionConfig, type RecordedRequest, RefreshableTokenAuth, type ReplayEndEvent, type ReplayStartEvent, type RequestContext, type RequestOptions, ResponseCache, type ResponseContext, type ResultEvent, type RetryConfig, Retryable, SDKError, SSEChunkParser, type SSEEvent, type SSEEventData, type SSEParserOptions, SUBJECT_KEY_ATTRS, type SecureStorage, type SendMessageRequest, SendMessageRequestSchema, type SessionScopedTokenPayload, SessionScopedTokenPayloadSchema, type SessionTranslation, type SessionUpdatedEvent, SidecarAuth, StaticTokenAuth, type StatusEvent, type Storage, StoragePersistence, type StreamOptions, type StreamTokenUsage, type StreamUsageAccumulator, StreamUsageExtractor, type Subscription, type SubscriptionState, type SubtaskPart, TANGLE_RUN_ID_CAMEL_KEY, TANGLE_RUN_ID_KEY, TANGLE_RUN_KIND_KEY, TANGLE_RUN_PARENT_ID_KEY, TANGLE_SUBJECT_KEY, TANGLE_TRIGGER_ID_KEY, TANGLE_TRIGGER_KIND_KEY, TANGLE_TRIGGER_SOURCE_KEY, TANGLE_WORKFLOW_ID_KEY, TOKEN_USAGE_CACHE_BAG_KEYS, TOKEN_USAGE_CACHE_BAG_READ_KEYS, TOKEN_USAGE_CACHE_BAG_WRITE_KEYS, TOKEN_USAGE_CACHE_READ_EXCLUSIVE_KEYS, TOKEN_USAGE_CACHE_READ_INCLUSIVE_KEYS, TOKEN_USAGE_CACHE_WRITE_EXCLUSIVE_KEYS, TOKEN_USAGE_CACHE_WRITE_INCLUSIVE_KEYS, TOKEN_USAGE_COST_KEYS, TOKEN_USAGE_DETAIL_KEYS, TOKEN_USAGE_INPUT_KEYS, TOKEN_USAGE_OUTPUT_KEYS, TRIGGER_ID_ATTRS, TRIGGER_SOURCE_ATTRS, type TerminalDataEvent, type TerminalEvent, type TerminalExitEvent, type TerminalResizeEvent, type TextPart, TimeoutError, type TokenScope, type TokenUsageCounts, type TokenValidationResult, type ToolPart, type ToolState, type ToolStateCompleted, type ToolStateError, type ToolStatePending, type ToolStateRunning, type TransportAdapter, type TransportConfig, type TransportEvents, type TransportMetrics, type TransportMode, WORKFLOW_MARKER_ATTRS, addTokenUsage, asContentField, asContentString, cacheHitRate, calculateDelay, canBatchTokenAccessChannel, canProjectTokenAccessChannel, canSessionTokenAccessChannel, canTokenAccessChannel, classifyAgent, consumeSSEStream, createDefaultPlatformAdapter, createHeaderInterceptor, createLoggingInterceptor, createMetricsInterceptor, createPlatformAdapter, createProtectedFn, createSessionTranslator, createStreamUsageExtractor, createTimeoutController, createUsageCallback, declaredTaskText, decodeToken, detectPlatform, detectStorage, extractContent, extractProjectFromChannel, extractSessionFromChannel, extractSessionId, firstTokenCount, firstUsageCostUsd, genAiUsageAttributes, generateApiKey, generateIdempotencyKey, generateRequestId, generateSecureToken, generateSigningSecret, getAllowedChannelPatterns, getTokenScope, getTokenTTL, hasContent, hashApiKey, isBatchScopedToken, isFilePart, isProjectScopedToken, isReasoningPart, isRetryable, isSDKError, isSessionScopedToken, isSubtaskPart, isTextPart, isTokenExpiringSoon, isToolPart, issueBatchScopedToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, logRecordContentBag, matchesAnyChannel, matchesChannel, normalizeContentAttributes, parseSSEData, parseSSEStream, promptTokens, readTokenCostUsd, readTokenUsage, resolveDeclaredIntent, sleep, tokenCount, tokenUsageSource, translateSessionId, validateChannelSubscription, validateTokenScope, verifyApiKey, verifyReadToken, withProtection, withRetry, withTimeout }; //# sourceMappingURL=index.d.ts.map