@tangle-network/agent-core 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/auth/browser.d.ts +22 -0
- package/dist/auth/browser.d.ts.map +1 -0
- package/dist/auth/browser.js +43 -0
- package/dist/auth/browser.js.map +1 -0
- package/dist/auth/index.d.ts +430 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +841 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/computer-use/index.d.ts +122 -0
- package/dist/computer-use/index.d.ts.map +1 -0
- package/dist/computer-use/index.js +422 -0
- package/dist/computer-use/index.js.map +1 -0
- package/dist/errors-DJ6U6cHY.js +146 -0
- package/dist/errors-DJ6U6cHY.js.map +1 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.js +2 -0
- package/dist/events-CUWh9qrv.js +263 -0
- package/dist/events-CUWh9qrv.js.map +1 -0
- package/dist/index-CFA8kgHJ.d.ts +352 -0
- package/dist/index-CFA8kgHJ.d.ts.map +1 -0
- package/dist/index-CtebBodu.d.ts +108 -0
- package/dist/index-CtebBodu.d.ts.map +1 -0
- package/dist/index-DiQX9bjq.d.ts +55 -0
- package/dist/index-DiQX9bjq.d.ts.map +1 -0
- package/dist/index-DlPznmKA.d.ts +158 -0
- package/dist/index-DlPznmKA.d.ts.map +1 -0
- package/dist/index-z2wPdzFb.d.ts +133 -0
- package/dist/index-z2wPdzFb.d.ts.map +1 -0
- package/dist/index.d.ts +565 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +822 -0
- package/dist/index.js.map +1 -0
- package/dist/resilience/index.d.ts +2 -0
- package/dist/resilience/index.js +2 -0
- package/dist/resilience-BQzDfw_C.js +221 -0
- package/dist/resilience-BQzDfw_C.js.map +1 -0
- package/dist/sse/index.d.ts +174 -0
- package/dist/sse/index.d.ts.map +1 -0
- package/dist/sse/index.js +303 -0
- package/dist/sse/index.js.map +1 -0
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +2 -0
- package/dist/transport-mKLoQep5.js +427 -0
- package/dist/transport-mKLoQep5.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types-D5VLaol0.js +31 -0
- package/dist/types-D5VLaol0.js.map +1 -0
- package/dist/types-DC6OJ1um.js +331 -0
- package/dist/types-DC6OJ1um.js.map +1 -0
- package/dist/types-DiDSGM8K.d.ts +320 -0
- package/dist/types-DiDSGM8K.d.ts.map +1 -0
- package/package.json +132 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
import { i as isSDKError, n as SDKError, r as isRetryable, t as ErrorCode } from "./index-DiQX9bjq.js";
|
|
2
|
+
import { C as ReadTokenAuth, S as NoAuth, T as StaticTokenAuth, _ as SessionScopedTokenPayloadSchema, a as CreateSessionResponse, b as AuthProvider, c as ProductSchema, d as ProjectScopedTokenPayloadSchema, f as ReadTokenPayload, g as SessionScopedTokenPayload, h as SendMessageRequestSchema, i as CreateSessionRequestSchema, l as ProductSecrets, m as SendMessageRequest, n as BatchScopedTokenPayloadSchema, o as Product, p as ReadTokenPayloadSchema, r as CreateSessionRequest, s as ProductAuthInfo, t as BatchScopedTokenPayload, u as ProjectScopedTokenPayload, v as TokenScope, w as RefreshableTokenAuth, x as CallbackAuth, y as TokenValidationResult } from "./types-DiDSGM8K.js";
|
|
3
|
+
import { ChannelAccessResult, EnvTokenAuth, ProductAuth, ProductTokenIssuer, SidecarAuth, canBatchTokenAccessChannel, canProjectTokenAccessChannel, canSessionTokenAccessChannel, canTokenAccessChannel, decodeToken, extractProjectFromChannel, extractSessionFromChannel, generateApiKey, generateSecureToken, generateSigningSecret, getAllowedChannelPatterns, getTokenScope, getTokenTTL, hashApiKey, isBatchScopedToken, isProjectScopedToken, isSessionScopedToken, isTokenExpiringSoon, issueBatchScopedToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, validateChannelSubscription, validateTokenScope, verifyApiKey, verifyReadToken } from "./auth/index.js";
|
|
4
|
+
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-DlPznmKA.js";
|
|
5
|
+
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-CFA8kgHJ.js";
|
|
6
|
+
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-CtebBodu.js";
|
|
7
|
+
import { ParsedSSEEvent, SSEChunkParser, SSEEventData, SSEParserOptions, StreamTokenUsage, StreamUsageAccumulator, StreamUsageExtractor, consumeSSEStream, createStreamUsageExtractor, createUsageCallback, parseSSEData, parseSSEStream } from "./sse/index.js";
|
|
8
|
+
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-z2wPdzFb.js";
|
|
9
|
+
|
|
10
|
+
//#region src/cache/index.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Response Caching
|
|
13
|
+
*
|
|
14
|
+
* In-memory cache with TTL and cache-control support.
|
|
15
|
+
*/
|
|
16
|
+
/** Cache entry */
|
|
17
|
+
interface CacheEntry<T> {
|
|
18
|
+
data: T;
|
|
19
|
+
cachedAt: number;
|
|
20
|
+
expiresAt: number;
|
|
21
|
+
etag?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Cache configuration */
|
|
24
|
+
interface CacheConfig {
|
|
25
|
+
/** Default TTL in ms (default: 60000 = 1 minute) */
|
|
26
|
+
defaultTtlMs?: number;
|
|
27
|
+
/** Max entries (default: 1000) */
|
|
28
|
+
maxEntries?: number;
|
|
29
|
+
/** Cache key generator */
|
|
30
|
+
keyGenerator?: (path: string, params?: Record<string, unknown>) => string;
|
|
31
|
+
}
|
|
32
|
+
/** Cache interface for different storage backends */
|
|
33
|
+
interface CacheStorage<T = unknown> {
|
|
34
|
+
get(key: string): T | undefined | Promise<T | undefined>;
|
|
35
|
+
set(key: string, value: T, ttlMs?: number): void | Promise<void>;
|
|
36
|
+
delete(key: string): void | Promise<void>;
|
|
37
|
+
clear(): void | Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
/** In-memory LRU cache */
|
|
40
|
+
declare class MemoryCache<T = unknown> implements CacheStorage<CacheEntry<T>> {
|
|
41
|
+
private cache;
|
|
42
|
+
private readonly maxEntries;
|
|
43
|
+
constructor(maxEntries?: number);
|
|
44
|
+
get(key: string): CacheEntry<T> | undefined;
|
|
45
|
+
set(key: string, value: CacheEntry<T>): void;
|
|
46
|
+
delete(key: string): void;
|
|
47
|
+
clear(): void;
|
|
48
|
+
/** Get cache stats */
|
|
49
|
+
stats(): {
|
|
50
|
+
size: number;
|
|
51
|
+
maxEntries: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Response cache manager */
|
|
55
|
+
declare class ResponseCache<T = unknown> {
|
|
56
|
+
private storage;
|
|
57
|
+
private defaultTtlMs;
|
|
58
|
+
private keyGenerator;
|
|
59
|
+
constructor(config?: CacheConfig);
|
|
60
|
+
private defaultKeyGenerator;
|
|
61
|
+
/** Get cached response */
|
|
62
|
+
get(path: string, params?: Record<string, unknown>): Promise<T | undefined>;
|
|
63
|
+
/** Get with stale-while-revalidate support */
|
|
64
|
+
getWithMeta(path: string, params?: Record<string, unknown>): Promise<{
|
|
65
|
+
data: T;
|
|
66
|
+
stale: boolean;
|
|
67
|
+
etag?: string;
|
|
68
|
+
} | undefined>;
|
|
69
|
+
/** Cache response */
|
|
70
|
+
set(path: string, data: T, options?: {
|
|
71
|
+
params?: Record<string, unknown>;
|
|
72
|
+
ttlMs?: number;
|
|
73
|
+
etag?: string;
|
|
74
|
+
}): Promise<void>;
|
|
75
|
+
/** Invalidate cache entry */
|
|
76
|
+
invalidate(path: string, params?: Record<string, unknown>): Promise<void>;
|
|
77
|
+
/** Invalidate all entries matching prefix */
|
|
78
|
+
invalidatePrefix(_prefix: string): Promise<void>;
|
|
79
|
+
/** Clear entire cache */
|
|
80
|
+
clear(): Promise<void>;
|
|
81
|
+
/** Parse Cache-Control header */
|
|
82
|
+
static parseCacheControl(header: string): {
|
|
83
|
+
maxAge?: number;
|
|
84
|
+
noCache?: boolean;
|
|
85
|
+
noStore?: boolean;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/middleware/index.d.ts
|
|
90
|
+
/** Request context passed through interceptor chain */
|
|
91
|
+
interface RequestContext {
|
|
92
|
+
/** Original request options */
|
|
93
|
+
request: RequestOptions;
|
|
94
|
+
/** Request start time */
|
|
95
|
+
startedAt: number;
|
|
96
|
+
/** Unique request ID */
|
|
97
|
+
requestId: string;
|
|
98
|
+
/** Retry attempt number (0 = first attempt) */
|
|
99
|
+
attempt: number;
|
|
100
|
+
/** Custom metadata */
|
|
101
|
+
meta: Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
/** Response context */
|
|
104
|
+
interface ResponseContext<T = unknown> {
|
|
105
|
+
/** Request context */
|
|
106
|
+
request: RequestContext;
|
|
107
|
+
/** Response data */
|
|
108
|
+
data: T;
|
|
109
|
+
/** Response time in ms */
|
|
110
|
+
durationMs: number;
|
|
111
|
+
/** HTTP status (if available) */
|
|
112
|
+
status?: number;
|
|
113
|
+
}
|
|
114
|
+
/** Error context */
|
|
115
|
+
interface ErrorContext {
|
|
116
|
+
/** Request context */
|
|
117
|
+
request: RequestContext;
|
|
118
|
+
/** The error */
|
|
119
|
+
error: SDKError;
|
|
120
|
+
/** Duration before error */
|
|
121
|
+
durationMs: number;
|
|
122
|
+
}
|
|
123
|
+
/** Interceptor interface */
|
|
124
|
+
interface Interceptor {
|
|
125
|
+
/** Modify request before sending */
|
|
126
|
+
onRequest?(ctx: RequestContext): RequestContext | Promise<RequestContext>;
|
|
127
|
+
/** Process successful response */
|
|
128
|
+
onResponse?<T>(ctx: ResponseContext<T>): T | Promise<T>;
|
|
129
|
+
/** Handle error (can transform or rethrow) */
|
|
130
|
+
onError?(ctx: ErrorContext): void | Promise<void>;
|
|
131
|
+
}
|
|
132
|
+
/** Interceptor chain executor */
|
|
133
|
+
declare class InterceptorChain {
|
|
134
|
+
private interceptors;
|
|
135
|
+
/** Add interceptor to chain */
|
|
136
|
+
use(interceptor: Interceptor): this;
|
|
137
|
+
/** Remove interceptor */
|
|
138
|
+
remove(interceptor: Interceptor): this;
|
|
139
|
+
/** Run request through interceptors */
|
|
140
|
+
executeRequest(ctx: RequestContext): Promise<RequestContext>;
|
|
141
|
+
/** Run response through interceptors (reverse order) */
|
|
142
|
+
executeResponse<T>(ctx: ResponseContext<T>): Promise<T>;
|
|
143
|
+
/** Notify interceptors of error */
|
|
144
|
+
executeError(ctx: ErrorContext): Promise<void>;
|
|
145
|
+
}
|
|
146
|
+
/** Generate unique request ID */
|
|
147
|
+
declare function generateRequestId(): string;
|
|
148
|
+
/** Logging interceptor */
|
|
149
|
+
declare function createLoggingInterceptor(logger?: {
|
|
150
|
+
debug?(msg: string, data?: unknown): void;
|
|
151
|
+
info?(msg: string, data?: unknown): void;
|
|
152
|
+
error?(msg: string, data?: unknown): void;
|
|
153
|
+
}): Interceptor;
|
|
154
|
+
/** Metrics interceptor */
|
|
155
|
+
declare function createMetricsInterceptor(onMetric: (metric: {
|
|
156
|
+
path: string;
|
|
157
|
+
method: string;
|
|
158
|
+
status: "success" | "error";
|
|
159
|
+
durationMs: number;
|
|
160
|
+
errorCode?: string;
|
|
161
|
+
}) => void): Interceptor;
|
|
162
|
+
/** Header injection interceptor */
|
|
163
|
+
declare function createHeaderInterceptor(headers: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>)): Interceptor;
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/storage/index.d.ts
|
|
166
|
+
/**
|
|
167
|
+
* Offline Storage Abstraction
|
|
168
|
+
*
|
|
169
|
+
* Platform-agnostic storage interface with implementations for different environments.
|
|
170
|
+
*/
|
|
171
|
+
/** Storage interface */
|
|
172
|
+
interface Storage {
|
|
173
|
+
get<T>(key: string): Promise<T | null>;
|
|
174
|
+
set<T>(key: string, value: T): Promise<void>;
|
|
175
|
+
delete(key: string): Promise<void>;
|
|
176
|
+
clear(): Promise<void>;
|
|
177
|
+
keys(): Promise<string[]>;
|
|
178
|
+
}
|
|
179
|
+
/** In-memory storage (default fallback) */
|
|
180
|
+
declare class MemoryStorage implements Storage {
|
|
181
|
+
private data;
|
|
182
|
+
get<T>(key: string): Promise<T | null>;
|
|
183
|
+
set<T>(key: string, value: T): Promise<void>;
|
|
184
|
+
delete(key: string): Promise<void>;
|
|
185
|
+
clear(): Promise<void>;
|
|
186
|
+
keys(): Promise<string[]>;
|
|
187
|
+
}
|
|
188
|
+
/** Browser localStorage wrapper */
|
|
189
|
+
declare class LocalStorage implements Storage {
|
|
190
|
+
private prefix;
|
|
191
|
+
constructor(prefix?: string);
|
|
192
|
+
private key;
|
|
193
|
+
get<T>(key: string): Promise<T | null>;
|
|
194
|
+
set<T>(key: string, value: T): Promise<void>;
|
|
195
|
+
delete(key: string): Promise<void>;
|
|
196
|
+
clear(): Promise<void>;
|
|
197
|
+
keys(): Promise<string[]>;
|
|
198
|
+
}
|
|
199
|
+
/** Offline request queue */
|
|
200
|
+
interface QueuedRequest {
|
|
201
|
+
id: string;
|
|
202
|
+
path: string;
|
|
203
|
+
method: string;
|
|
204
|
+
body?: unknown;
|
|
205
|
+
headers?: Record<string, string>;
|
|
206
|
+
createdAt: number;
|
|
207
|
+
attempts: number;
|
|
208
|
+
idempotencyKey?: string;
|
|
209
|
+
}
|
|
210
|
+
/** Offline queue manager */
|
|
211
|
+
declare class OfflineQueue {
|
|
212
|
+
private storage;
|
|
213
|
+
private readonly storageKey;
|
|
214
|
+
constructor(storage: Storage);
|
|
215
|
+
/** Add request to queue */
|
|
216
|
+
enqueue(request: Omit<QueuedRequest, "id" | "createdAt" | "attempts">): Promise<string>;
|
|
217
|
+
/** Get all queued requests */
|
|
218
|
+
getQueue(): Promise<QueuedRequest[]>;
|
|
219
|
+
/** Get next request to process */
|
|
220
|
+
peek(): Promise<QueuedRequest | null>;
|
|
221
|
+
/** Remove request from queue */
|
|
222
|
+
dequeue(id: string): Promise<void>;
|
|
223
|
+
/** Increment attempt count */
|
|
224
|
+
incrementAttempts(id: string): Promise<void>;
|
|
225
|
+
/** Get queue size */
|
|
226
|
+
size(): Promise<number>;
|
|
227
|
+
/** Clear queue */
|
|
228
|
+
clear(): Promise<void>;
|
|
229
|
+
/** Process queue with handler */
|
|
230
|
+
process(handler: (request: QueuedRequest) => Promise<boolean>, options?: {
|
|
231
|
+
maxAttempts?: number;
|
|
232
|
+
batchSize?: number;
|
|
233
|
+
}): Promise<{
|
|
234
|
+
processed: number;
|
|
235
|
+
failed: number;
|
|
236
|
+
}>;
|
|
237
|
+
}
|
|
238
|
+
/** Detect available storage */
|
|
239
|
+
declare function detectStorage(): Storage;
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/platform/index.d.ts
|
|
242
|
+
/**
|
|
243
|
+
* Secure credential storage interface.
|
|
244
|
+
* Implementations should use platform-specific secure storage:
|
|
245
|
+
* - Web: Encrypted localStorage or IndexedDB
|
|
246
|
+
* - React Native: react-native-keychain
|
|
247
|
+
* - Electron: safeStorage + electron-store
|
|
248
|
+
* - Tauri: tauri-plugin-keyring
|
|
249
|
+
* - Node: keytar or encrypted file
|
|
250
|
+
*/
|
|
251
|
+
interface SecureStorage {
|
|
252
|
+
/** Store a credential securely */
|
|
253
|
+
setCredential(key: string, value: string): Promise<void>;
|
|
254
|
+
/** Retrieve a credential */
|
|
255
|
+
getCredential(key: string): Promise<string | null>;
|
|
256
|
+
/** Delete a credential */
|
|
257
|
+
deleteCredential(key: string): Promise<void>;
|
|
258
|
+
/** Check if secure storage is available */
|
|
259
|
+
isAvailable(): Promise<boolean>;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Network connectivity information.
|
|
263
|
+
* Implementations should use platform-specific APIs:
|
|
264
|
+
* - Web: navigator.onLine + online/offline events
|
|
265
|
+
* - React Native: @react-native-community/netinfo
|
|
266
|
+
* - Electron: net.online
|
|
267
|
+
* - Tauri: network events
|
|
268
|
+
* - Node/TUI: assume online or use dns lookup
|
|
269
|
+
*/
|
|
270
|
+
interface NetworkInfo {
|
|
271
|
+
/** Check if device is online */
|
|
272
|
+
isOnline(): boolean;
|
|
273
|
+
/** Subscribe to connectivity changes */
|
|
274
|
+
onConnectivityChange(callback: (online: boolean) => void): () => void;
|
|
275
|
+
/** Get connection quality hint (optional) */
|
|
276
|
+
getConnectionType?(): "wifi" | "cellular" | "ethernet" | "unknown";
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* State persistence adapter for cross-session state.
|
|
280
|
+
* Handles syncing SDK state (sessions, queued requests, cache)
|
|
281
|
+
* to platform-appropriate storage.
|
|
282
|
+
*/
|
|
283
|
+
interface PersistenceAdapter {
|
|
284
|
+
/** Save state snapshot */
|
|
285
|
+
saveState<T>(namespace: string, state: T): Promise<void>;
|
|
286
|
+
/** Load state snapshot */
|
|
287
|
+
loadState<T>(namespace: string): Promise<T | null>;
|
|
288
|
+
/** Clear namespace */
|
|
289
|
+
clearState(namespace: string): Promise<void>;
|
|
290
|
+
/** Subscribe to external state changes (for multi-window/tab sync) */
|
|
291
|
+
onExternalChange?(namespace: string, callback: (state: unknown) => void): () => void;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Platform capabilities descriptor.
|
|
295
|
+
* Used to adapt SDK behavior to platform constraints.
|
|
296
|
+
*/
|
|
297
|
+
interface PlatformCapabilities {
|
|
298
|
+
/** Platform identifier */
|
|
299
|
+
platform: "web" | "react-native" | "electron" | "tauri" | "node";
|
|
300
|
+
/** Supports background execution */
|
|
301
|
+
supportsBackground: boolean;
|
|
302
|
+
/** Supports secure credential storage */
|
|
303
|
+
supportsSecureStorage: boolean;
|
|
304
|
+
/** Supports WebSocket */
|
|
305
|
+
supportsWebSocket: boolean;
|
|
306
|
+
/** Supports SSE (EventSource) */
|
|
307
|
+
supportsSSE: boolean;
|
|
308
|
+
/** Max concurrent connections (browser limits) */
|
|
309
|
+
maxConnections?: number;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Platform adapter combining all platform-specific interfaces.
|
|
313
|
+
* Each platform provides one implementation of this interface.
|
|
314
|
+
*/
|
|
315
|
+
interface PlatformAdapter {
|
|
316
|
+
/** Platform capabilities */
|
|
317
|
+
capabilities: PlatformCapabilities;
|
|
318
|
+
/** General key-value storage */
|
|
319
|
+
storage: Storage;
|
|
320
|
+
/** Secure credential storage (optional) */
|
|
321
|
+
secureStorage?: SecureStorage;
|
|
322
|
+
/** Network info (optional) */
|
|
323
|
+
network?: NetworkInfo;
|
|
324
|
+
/** State persistence (optional) */
|
|
325
|
+
persistence?: PersistenceAdapter;
|
|
326
|
+
/** Fetch implementation */
|
|
327
|
+
fetch: typeof fetch;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* In-memory secure storage fallback.
|
|
331
|
+
* NOT SECURE - use only for development/testing.
|
|
332
|
+
*/
|
|
333
|
+
declare class MemorySecureStorage implements SecureStorage {
|
|
334
|
+
private credentials;
|
|
335
|
+
setCredential(key: string, value: string): Promise<void>;
|
|
336
|
+
getCredential(key: string): Promise<string | null>;
|
|
337
|
+
deleteCredential(key: string): Promise<void>;
|
|
338
|
+
isAvailable(): Promise<boolean>;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Browser-based network info using navigator.onLine.
|
|
342
|
+
*/
|
|
343
|
+
declare class BrowserNetworkInfo implements NetworkInfo {
|
|
344
|
+
isOnline(): boolean;
|
|
345
|
+
onConnectivityChange(callback: (online: boolean) => void): () => void;
|
|
346
|
+
getConnectionType(): "wifi" | "cellular" | "ethernet" | "unknown";
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Node.js network info (assumes always online).
|
|
350
|
+
*/
|
|
351
|
+
declare class NodeNetworkInfo implements NetworkInfo {
|
|
352
|
+
isOnline(): boolean;
|
|
353
|
+
onConnectivityChange(_callback: (online: boolean) => void): () => void;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Storage-based persistence adapter.
|
|
357
|
+
* Uses provided Storage implementation for state persistence.
|
|
358
|
+
*/
|
|
359
|
+
declare class StoragePersistence implements PersistenceAdapter {
|
|
360
|
+
private storage;
|
|
361
|
+
constructor(storage: Storage);
|
|
362
|
+
saveState<T>(namespace: string, state: T): Promise<void>;
|
|
363
|
+
loadState<T>(namespace: string): Promise<T | null>;
|
|
364
|
+
clearState(namespace: string): Promise<void>;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Browser persistence with localStorage and storage events for tab sync.
|
|
368
|
+
*/
|
|
369
|
+
declare class BrowserPersistence implements PersistenceAdapter {
|
|
370
|
+
private prefix;
|
|
371
|
+
constructor(prefix?: string);
|
|
372
|
+
saveState<T>(namespace: string, state: T): Promise<void>;
|
|
373
|
+
loadState<T>(namespace: string): Promise<T | null>;
|
|
374
|
+
clearState(namespace: string): Promise<void>;
|
|
375
|
+
onExternalChange(namespace: string, callback: (state: unknown) => void): () => void;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Detect current platform.
|
|
379
|
+
*/
|
|
380
|
+
declare function detectPlatform(): PlatformCapabilities["platform"];
|
|
381
|
+
/**
|
|
382
|
+
* Create default platform adapter for current environment.
|
|
383
|
+
* Override with platform-specific implementations for better integration.
|
|
384
|
+
*/
|
|
385
|
+
declare function createDefaultPlatformAdapter(): PlatformAdapter;
|
|
386
|
+
/**
|
|
387
|
+
* Type-safe platform adapter factory.
|
|
388
|
+
* Use this to create platform adapters with proper typing.
|
|
389
|
+
*/
|
|
390
|
+
declare function createPlatformAdapter(config: Partial<PlatformAdapter> & {
|
|
391
|
+
capabilities: PlatformCapabilities;
|
|
392
|
+
}): PlatformAdapter;
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region src/retry/index.d.ts
|
|
395
|
+
/** Retry configuration */
|
|
396
|
+
interface RetryConfig {
|
|
397
|
+
/** Max retry attempts (default: 3) */
|
|
398
|
+
maxAttempts?: number;
|
|
399
|
+
/** Initial delay in ms (default: 1000) */
|
|
400
|
+
initialDelayMs?: number;
|
|
401
|
+
/** Max delay in ms (default: 30000) */
|
|
402
|
+
maxDelayMs?: number;
|
|
403
|
+
/** Backoff multiplier (default: 2) */
|
|
404
|
+
multiplier?: number;
|
|
405
|
+
/** Jitter factor 0-1 (default: 0.2) */
|
|
406
|
+
jitter?: number;
|
|
407
|
+
/** Custom retry predicate */
|
|
408
|
+
shouldRetry?: (error: SDKError, attempt: number) => boolean;
|
|
409
|
+
/** Callback before retry */
|
|
410
|
+
onRetry?: (error: SDKError, attempt: number, delayMs: number) => void;
|
|
411
|
+
}
|
|
412
|
+
/** Calculate delay for attempt with jitter */
|
|
413
|
+
declare function calculateDelay(attempt: number, config: RetryConfig): number;
|
|
414
|
+
/** Execute function with retry */
|
|
415
|
+
declare function withRetry<T>(fn: (attempt: number) => Promise<T>, config?: RetryConfig): Promise<T>;
|
|
416
|
+
/** Idempotency key generator */
|
|
417
|
+
declare function generateIdempotencyKey(): string;
|
|
418
|
+
/** Retry decorator for class methods */
|
|
419
|
+
declare function Retryable(config?: RetryConfig): <T>(_target: object, _propertyKey: string, descriptor: TypedPropertyDescriptor<(...args: unknown[]) => Promise<T>>) => TypedPropertyDescriptor<(...args: unknown[]) => Promise<T>>;
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/telemetry/genai-attributes.d.ts
|
|
422
|
+
/**
|
|
423
|
+
* OpenTelemetry GenAI semantic-convention span attributes — the single
|
|
424
|
+
* vocabulary every trace producer in the stack emits and the intelligence
|
|
425
|
+
* ingest reads, so model / token / cost attribution is identical regardless of
|
|
426
|
+
* which producer lowered the span (workflow emitter, SDK trace sink, …).
|
|
427
|
+
*
|
|
428
|
+
* Writers emit the PRIMARY keys (`GEN_AI_*`). The ingest reader accepts the
|
|
429
|
+
* wider candidate lists (`GEN_AI_*_KEYS`) because foreign SDKs spell the same
|
|
430
|
+
* field differently (Langfuse, raw OTLP GenAI, our own legacy `model`).
|
|
431
|
+
* Co-locating writer keys and reader candidates here is the drift guard: a
|
|
432
|
+
* writer's key and the reader's first candidate can never silently disagree.
|
|
433
|
+
*
|
|
434
|
+
* Spec: OpenTelemetry GenAI semantic conventions (`gen_ai.*`).
|
|
435
|
+
*/
|
|
436
|
+
/** Model that served a request — the primary key writers emit. */
|
|
437
|
+
declare const GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
|
|
438
|
+
/** Model named on a response — a reader fallback; writers prefer request.model. */
|
|
439
|
+
declare const GEN_AI_RESPONSE_MODEL = "gen_ai.response.model";
|
|
440
|
+
/** Prompt / input token count. */
|
|
441
|
+
declare const GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens";
|
|
442
|
+
/** Completion / output token count. */
|
|
443
|
+
declare const GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens";
|
|
444
|
+
/** Operation name (e.g. `"invoke_agent"`). */
|
|
445
|
+
declare const GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
|
|
446
|
+
/** Conversation / session id grouping a multi-turn agent run. */
|
|
447
|
+
declare const GEN_AI_CONVERSATION_ID = "gen_ai.conversation.id";
|
|
448
|
+
/**
|
|
449
|
+
* Reader candidate keys for the model, highest priority first. The first entry
|
|
450
|
+
* is the writers' primary key; the rest accept foreign-SDK spellings.
|
|
451
|
+
*/
|
|
452
|
+
declare const GEN_AI_MODEL_KEYS: readonly string[];
|
|
453
|
+
/** Reader candidate keys for input tokens, highest priority first. These name
|
|
454
|
+
* SPAN ATTRIBUTES on a lowered span — for the raw producer `tokenUsage` OBJECT
|
|
455
|
+
* field names (a distinct layer) see `TOKEN_USAGE_INPUT_KEYS` in
|
|
456
|
+
* `token-usage.ts`; a new producer shape may need an entry in both. */
|
|
457
|
+
declare const GEN_AI_INPUT_TOKEN_KEYS: readonly string[];
|
|
458
|
+
/** Reader candidate keys for output tokens, highest priority first. */
|
|
459
|
+
declare const GEN_AI_OUTPUT_TOKEN_KEYS: readonly string[];
|
|
460
|
+
/** A model/token usage record to lower into the GenAI attribute bag. */
|
|
461
|
+
interface GenAiUsage {
|
|
462
|
+
/** Model slug; omitted from the attribute bag when absent or empty. */
|
|
463
|
+
model?: string;
|
|
464
|
+
/** Prompt tokens; omitted unless a finite, non-negative number. */
|
|
465
|
+
inputTokens?: number;
|
|
466
|
+
/** Completion tokens; omitted unless a finite, non-negative number. */
|
|
467
|
+
outputTokens?: number;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Lower a usage record to the GenAI semantic-convention attribute bag, OMITTING
|
|
471
|
+
* any unknown field. A synthesized zero token count or empty model would
|
|
472
|
+
* corrupt every downstream token/cost aggregate, so absent stays absent — the
|
|
473
|
+
* ingest then reads "cost not computed", never "free". This is the writer-side
|
|
474
|
+
* mirror of {@link GEN_AI_MODEL_KEYS} / the `*_TOKEN_KEYS` reader candidates.
|
|
475
|
+
*/
|
|
476
|
+
declare function genAiUsageAttributes(usage: GenAiUsage): Record<string, string | number>;
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region src/telemetry/token-usage.d.ts
|
|
479
|
+
/**
|
|
480
|
+
* Candidate field names for a producer-supplied `tokenUsage` bag on a
|
|
481
|
+
* `message.updated` trace event. Agents and SDK layers disagree on the
|
|
482
|
+
* spelling: `StreamTokenUsage` emits `inputTokens`/`outputTokens`, the eval and
|
|
483
|
+
* workflow agent.run paths emit `input`/`output`, and persisted / foreign
|
|
484
|
+
* shapes use snake_case or prompt/completion naming. A reader that wants the
|
|
485
|
+
* token counts must try all of them, highest-priority first, or it silently
|
|
486
|
+
* drops usage for the producers it does not name.
|
|
487
|
+
*
|
|
488
|
+
* Shared so every `tokenUsage` reader (the trace sink's root-span aggregation,
|
|
489
|
+
* the signal extractor) keys off the identical set and cannot drift.
|
|
490
|
+
*
|
|
491
|
+
* Distinct layer from `genai-attributes.ts`: those keys (`GEN_AI_*_TOKEN_KEYS`)
|
|
492
|
+
* name OTel SPAN ATTRIBUTES on an already-lowered span; these name the fields of
|
|
493
|
+
* the raw producer `tokenUsage` OBJECT before lowering. A new producer that
|
|
494
|
+
* spells token usage differently may need an entry in BOTH places.
|
|
495
|
+
*/
|
|
496
|
+
declare const TOKEN_USAGE_INPUT_KEYS: readonly string[];
|
|
497
|
+
declare const TOKEN_USAGE_OUTPUT_KEYS: readonly string[];
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region src/utils/channel-matching.d.ts
|
|
500
|
+
/**
|
|
501
|
+
* Channel Pattern Matching
|
|
502
|
+
*
|
|
503
|
+
* Generic utility for matching channel patterns with wildcard support.
|
|
504
|
+
* Used for channel subscriptions and event filtering.
|
|
505
|
+
*
|
|
506
|
+
* Pattern syntax:
|
|
507
|
+
* - "*" matches all channels
|
|
508
|
+
* - "foo.*" matches "foo.bar", "foo.baz", etc. (dot-separated)
|
|
509
|
+
* - "foo:*" matches "foo:bar", "foo:baz", etc. (colon-separated)
|
|
510
|
+
* - "foo.bar" matches exactly "foo.bar"
|
|
511
|
+
* - "session:abc" matches exactly "session:abc"
|
|
512
|
+
*/
|
|
513
|
+
/**
|
|
514
|
+
* Check if a pattern matches a channel name.
|
|
515
|
+
*
|
|
516
|
+
* @param pattern - The pattern to match against (supports wildcards)
|
|
517
|
+
* @param channel - The channel name to check
|
|
518
|
+
* @returns true if the pattern matches the channel
|
|
519
|
+
*/
|
|
520
|
+
declare function matchesChannel(pattern: string, channel: string): boolean;
|
|
521
|
+
/**
|
|
522
|
+
* Check if any subscribed channel pattern matches the given channel.
|
|
523
|
+
*
|
|
524
|
+
* @param subscribedChannels - Set or array of channel patterns
|
|
525
|
+
* @param channel - The channel to check
|
|
526
|
+
* @returns true if any pattern matches the channel
|
|
527
|
+
*/
|
|
528
|
+
declare function matchesAnyChannel(subscribedChannels: Set<string> | string[], channel: string): boolean;
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region src/utils/session-translator.d.ts
|
|
531
|
+
/**
|
|
532
|
+
* Session ID Translator
|
|
533
|
+
*
|
|
534
|
+
* Generic utility for translating session IDs in event objects.
|
|
535
|
+
* Used to map internal session IDs to client-facing session IDs.
|
|
536
|
+
*/
|
|
537
|
+
interface SessionTranslation {
|
|
538
|
+
/** The internal session ID to replace */
|
|
539
|
+
from: string;
|
|
540
|
+
/** The client-facing session ID to use */
|
|
541
|
+
to: string;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Translate session IDs in an event object.
|
|
545
|
+
* Performs a deep string replacement via JSON serialization.
|
|
546
|
+
*
|
|
547
|
+
* @param event - The event object to translate
|
|
548
|
+
* @param translation - The session ID mapping
|
|
549
|
+
* @returns A new event object with translated session IDs
|
|
550
|
+
*/
|
|
551
|
+
declare function translateSessionId<T>(event: T, translation: SessionTranslation): T;
|
|
552
|
+
/**
|
|
553
|
+
* Create a reusable translator function for a specific session mapping.
|
|
554
|
+
* Pre-compiles the regex pattern for better performance when translating
|
|
555
|
+
* many events with the same mapping.
|
|
556
|
+
*/
|
|
557
|
+
declare function createSessionTranslator(translation: SessionTranslation): <T>(event: T) => T;
|
|
558
|
+
/**
|
|
559
|
+
* Extract session ID from various event structures.
|
|
560
|
+
* Handles different event formats that may contain session information.
|
|
561
|
+
*/
|
|
562
|
+
declare function extractSessionId(event: unknown): string | null;
|
|
563
|
+
//#endregion
|
|
564
|
+
export { type AgentEvent, type AgentEventType, AgentEventTypeSchema, type AuthProvider, BaseTransportAdapter, type BatchScopedTokenPayload, BatchScopedTokenPayloadSchema, BrowserNetworkInfo, BrowserPersistence, type BufferedEvent, 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 CreateSessionRequest, CreateSessionRequestSchema, type CreateSessionResponse, DEFAULT_RECONNECTION_CONFIG, 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_INPUT_TOKENS, GEN_AI_USAGE_OUTPUT_TOKENS, type GenAiUsage, type HeartbeatEvent, type Interceptor, InterceptorChain, LocalStorage, MemoryCache, MemorySecureStorage, MemoryStorage, type MessagePartUpdatedEvent, type MockResponse, type MockStreamEvent, MockTransportAdapter, type MockTransportConfig, type NetworkInfo, NoAuth, NodeNetworkInfo, OfflineQueue, 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, 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, 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, TOKEN_USAGE_INPUT_KEYS, TOKEN_USAGE_OUTPUT_KEYS, type TerminalDataEvent, type TerminalEvent, type TerminalExitEvent, type TerminalResizeEvent, type TextPart, TimeoutError, type TokenScope, type TokenValidationResult, type ToolPart, type ToolState, type ToolStateCompleted, type ToolStateError, type ToolStatePending, type ToolStateRunning, type TransportAdapter, type TransportConfig, type TransportEvents, type TransportMetrics, type TransportMode, calculateDelay, canBatchTokenAccessChannel, canProjectTokenAccessChannel, canSessionTokenAccessChannel, canTokenAccessChannel, consumeSSEStream, createDefaultPlatformAdapter, createHeaderInterceptor, createLoggingInterceptor, createMetricsInterceptor, createPlatformAdapter, createProtectedFn, createSessionTranslator, createStreamUsageExtractor, createTimeoutController, createUsageCallback, decodeToken, detectPlatform, detectStorage, extractProjectFromChannel, extractSessionFromChannel, extractSessionId, genAiUsageAttributes, generateApiKey, generateIdempotencyKey, generateRequestId, generateSecureToken, generateSigningSecret, getAllowedChannelPatterns, getTokenScope, getTokenTTL, hashApiKey, isBatchScopedToken, isFilePart, isProjectScopedToken, isReasoningPart, isRetryable, isSDKError, isSessionScopedToken, isSubtaskPart, isTextPart, isTokenExpiringSoon, isToolPart, issueBatchScopedToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, matchesAnyChannel, matchesChannel, parseSSEData, parseSSEStream, sleep, translateSessionId, validateChannelSubscription, validateTokenScope, verifyApiKey, verifyReadToken, withProtection, withRetry, withTimeout };
|
|
565
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/cache/index.ts","../src/middleware/index.ts","../src/storage/index.ts","../src/platform/index.ts","../src/retry/index.ts","../src/telemetry/genai-attributes.ts","../src/telemetry/token-usage.ts","../src/utils/channel-matching.ts","../src/utils/session-translator.ts"],"mappings":";;;;;;;;;;;;;;;;UAOU,UAAA;EACR,IAAA,EAAM,CAAA;EACN,QAAA;EACA,SAAA;EACA,IAAA;AAAA;;UAIe,WAAA;EARI;EAUnB,YAAA;EATM;EAWN,UAAA;EATA;EAWA,YAAA,IAAgB,IAAA,UAAc,MAAA,GAAS,MAAA;AAAA;;UAIxB,YAAA;EACf,GAAA,CAAI,GAAA,WAAc,CAAA,eAAgB,OAAA,CAAQ,CAAA;EAC1C,GAAA,CAAI,GAAA,UAAa,KAAA,EAAO,CAAA,EAAG,KAAA,mBAAwB,OAAA;EACnD,MAAA,CAAO,GAAA,kBAAqB,OAAA;EAC5B,KAAA,WAAgB,OAAA;AAAA;;cAIL,WAAA,yBAAoC,YAAA,CAAa,UAAA,CAAW,CAAA;EAAA,QAC/D,KAAA;EAAA,iBACS,UAAA;c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