@rodrigocoliveira/agno-client 1.0.2 → 1.0.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 CHANGED
@@ -411,10 +411,10 @@ To publish this package to npm:
411
411
  npm login
412
412
 
413
413
  # Build the package
414
- pnpm build
414
+ bun run build
415
415
 
416
416
  # Publish (use --access public for scoped packages)
417
- pnpm publish --access public
417
+ npm publish --access public
418
418
  ```
419
419
 
420
420
  **Publish order:** This package depends on `@rodrigocoliveira/agno-types`, so publish types first:
@@ -1,27 +1,11 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- import { TraceSummary, PaginationInfo, TraceSessionStats, AgnoClientConfig, ChatMessage, ClientState, SessionEntry, AgentSessionDetailSchema, TeamSessionDetailSchema, RunSchema, TeamRunSchema, CreateSessionRequest, UpdateSessionRequest, ToolCall, AgentDetails, TeamDetails, ListMemoriesParams, MemoriesListResponse, UserMemory, UserMemoryStatsParams, UserMemoryStatsResponse, CreateMemoryRequest, UpdateMemoryRequest, KnowledgeConfigResponse, ContentListOptions, ContentListResponse, ContentResponse, ContentStatusResponse, VectorSearchRequest, VectorSearchResponse, ContentUpdateRequest, MetricsOptions, MetricsResponse, RefreshMetricsOptions, DayAggregatedMetrics, ListEvalRunsParams, EvalRunsListResponse, EvalSchema, ExecuteEvalRequest, UpdateEvalRunRequest, ListTracesOptions, GetTraceOptions, TraceDetail, TraceNode, GetTraceSessionStatsOptions } from '@rodrigocoliveira/agno-types';
3
- export { AgentDetails, AgnoClientConfig, AudioData, ChatMessage, ChunkerSchema, ClientState, ContentListOptions, ContentListResponse, ContentResponse, ContentStatus, ContentStatusResponse, ContentUpdateRequest, ContentUploadRequest, CreateMemoryRequest, DayAggregatedMetrics, DeleteEvalRunsRequest, DeleteMultipleMemoriesRequest, EvalComponentType, EvalRunsListResponse, EvalSchema, EvalType, ExecuteEvalRequest, GetTraceOptions, GetTraceSessionStatsOptions, ImageData, KnowledgeConfigResponse, ListEvalRunsParams, ListMemoriesParams, ListTracesOptions, MemoriesListResponse, MessageExtraData, MetricsOptions, MetricsResponse, ModelMetrics, PaginationInfo, ReaderSchema, RefreshMetricsOptions, ResponseAudioData, RunEvent, RunResponse, RunResponseContent, ScoringStrategy, SessionEntry, SortOrder, TeamDetails, TokenMetrics, ToolCall, TraceDetail, TraceNode, TraceSessionStats, TraceSessionStatsResponse, TraceStatus, TraceSummary, TracesListResponse, UpdateEvalRunRequest, UpdateMemoryRequest, UserMemory, UserMemoryStats, UserMemoryStatsParams, UserMemoryStatsResponse, VectorDbSchema, VectorSearchRequest, VectorSearchResponse, VectorSearchResult, VideoData } from '@rodrigocoliveira/agno-types';
4
-
5
- /**
6
- * Response wrapper for paginated trace results
7
- */
8
- interface PaginatedTracesResult {
9
- traces: TraceSummary[];
10
- pagination: PaginationInfo;
11
- }
12
- /**
13
- * Response wrapper for paginated trace session stats results
14
- */
15
- interface PaginatedTraceSessionStatsResult {
16
- stats: TraceSessionStats[];
17
- pagination: PaginationInfo;
18
- }
19
-
2
+ import type { AgnoClientConfig, ChatMessage, SessionEntry, AgentDetails, TeamDetails, ClientState, ToolCall, AgentSessionDetailSchema, TeamSessionDetailSchema, RunSchema, TeamRunSchema, CreateSessionRequest, UpdateSessionRequest, UserMemory, MemoriesListResponse, ListMemoriesParams, CreateMemoryRequest, UpdateMemoryRequest, UserMemoryStatsResponse, UserMemoryStatsParams, KnowledgeConfigResponse, ContentResponse, ContentStatusResponse, ContentListResponse, ContentListOptions, VectorSearchRequest, VectorSearchResponse, ContentUpdateRequest, MetricsResponse, MetricsOptions, RefreshMetricsOptions, DayAggregatedMetrics, EvalSchema, EvalRunsListResponse, ListEvalRunsParams, ExecuteEvalRequest, UpdateEvalRunRequest, TraceDetail, TraceNode, ListTracesOptions, GetTraceOptions, GetTraceSessionStatsOptions } from '@rodrigocoliveira/agno-types';
3
+ import { PaginatedTracesResult, PaginatedTraceSessionStatsResult } from './managers/traces-manager';
20
4
  /**
21
5
  * Main Agno client class
22
6
  * Provides stateful management of agent/team interactions with streaming support
23
7
  */
24
- declare class AgnoClient extends EventEmitter {
8
+ export declare class AgnoClient extends EventEmitter {
25
9
  private messageStore;
26
10
  private configManager;
27
11
  private sessionManager;
@@ -516,31 +500,4 @@ declare class AgnoClient extends EventEmitter {
516
500
  params?: Record<string, string>;
517
501
  }): Promise<PaginatedTraceSessionStatsResult>;
518
502
  }
519
-
520
- /**
521
- * Logger utility with sensitive data sanitization
522
- * Only logs in development mode to prevent auth token exposure
523
- */
524
- /**
525
- * Logger class with sanitization and environment-aware logging
526
- */
527
- declare class Logger {
528
- /**
529
- * Log debug information (only in development)
530
- */
531
- static debug(message: string, data?: unknown): void;
532
- /**
533
- * Log informational messages (only in development)
534
- */
535
- static info(message: string, data?: unknown): void;
536
- /**
537
- * Log warnings (always logs)
538
- */
539
- static warn(message: string, data?: unknown): void;
540
- /**
541
- * Log errors (always logs)
542
- */
543
- static error(message: string, data?: unknown): void;
544
- }
545
-
546
- export { AgnoClient, Logger, type PaginatedTraceSessionStatsResult, type PaginatedTracesResult };
503
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EAKX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EAER,wBAAwB,EACxB,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EAEnB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,c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C,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GACrF,OAAO,CAAC,gCAAgC,CAAC;CAuB7C"}
package/dist/index.d.ts CHANGED
@@ -1,546 +1,10 @@
1
- import EventEmitter from 'eventemitter3';
2
- import { TraceSummary, PaginationInfo, TraceSessionStats, AgnoClientConfig, ChatMessage, ClientState, SessionEntry, AgentSessionDetailSchema, TeamSessionDetailSchema, RunSchema, TeamRunSchema, CreateSessionRequest, UpdateSessionRequest, ToolCall, AgentDetails, TeamDetails, ListMemoriesParams, MemoriesListResponse, UserMemory, UserMemoryStatsParams, UserMemoryStatsResponse, CreateMemoryRequest, UpdateMemoryRequest, KnowledgeConfigResponse, ContentListOptions, ContentListResponse, ContentResponse, ContentStatusResponse, VectorSearchRequest, VectorSearchResponse, ContentUpdateRequest, MetricsOptions, MetricsResponse, RefreshMetricsOptions, DayAggregatedMetrics, ListEvalRunsParams, EvalRunsListResponse, EvalSchema, ExecuteEvalRequest, UpdateEvalRunRequest, ListTracesOptions, GetTraceOptions, TraceDetail, TraceNode, GetTraceSessionStatsOptions } from '@rodrigocoliveira/agno-types';
3
- export { AgentDetails, AgnoClientConfig, AudioData, ChatMessage, ChunkerSchema, ClientState, ContentListOptions, ContentListResponse, ContentResponse, ContentStatus, ContentStatusResponse, ContentUpdateRequest, ContentUploadRequest, CreateMemoryRequest, DayAggregatedMetrics, DeleteEvalRunsRequest, DeleteMultipleMemoriesRequest, EvalComponentType, EvalRunsListResponse, EvalSchema, EvalType, ExecuteEvalRequest, GetTraceOptions, GetTraceSessionStatsOptions, ImageData, KnowledgeConfigResponse, ListEvalRunsParams, ListMemoriesParams, ListTracesOptions, MemoriesListResponse, MessageExtraData, MetricsOptions, MetricsResponse, ModelMetrics, PaginationInfo, ReaderSchema, RefreshMetricsOptions, ResponseAudioData, RunEvent, RunResponse, RunResponseContent, ScoringStrategy, SessionEntry, SortOrder, TeamDetails, TokenMetrics, ToolCall, TraceDetail, TraceNode, TraceSessionStats, TraceSessionStatsResponse, TraceStatus, TraceSummary, TracesListResponse, UpdateEvalRunRequest, UpdateMemoryRequest, UserMemory, UserMemoryStats, UserMemoryStatsParams, UserMemoryStatsResponse, VectorDbSchema, VectorSearchRequest, VectorSearchResponse, VectorSearchResult, VideoData } from '@rodrigocoliveira/agno-types';
4
-
5
1
  /**
6
- * Response wrapper for paginated trace results
2
+ * @rodrigocoliveira/agno-client
3
+ * Core client library for Agno agents with streaming support
7
4
  */
8
- interface PaginatedTracesResult {
9
- traces: TraceSummary[];
10
- pagination: PaginationInfo;
11
- }
12
- /**
13
- * Response wrapper for paginated trace session stats results
14
- */
15
- interface PaginatedTraceSessionStatsResult {
16
- stats: TraceSessionStats[];
17
- pagination: PaginationInfo;
18
- }
19
-
20
- /**
21
- * Main Agno client class
22
- * Provides stateful management of agent/team interactions with streaming support
23
- */
24
- declare class AgnoClient extends EventEmitter {
25
- private messageStore;
26
- private configManager;
27
- private sessionManager;
28
- private memoryManager;
29
- private knowledgeManager;
30
- private evalManager;
31
- private tracesManager;
32
- private eventProcessor;
33
- private state;
34
- private pendingUISpecs;
35
- private runCompletedSuccessfully;
36
- private currentRunId?;
37
- private abortController?;
38
- constructor(config: AgnoClientConfig);
39
- /**
40
- * Get current messages
41
- */
42
- getMessages(): ChatMessage[];
43
- /**
44
- * Get current configuration
45
- */
46
- getConfig(): AgnoClientConfig;
47
- /**
48
- * Get current state
49
- */
50
- getState(): ClientState;
51
- /**
52
- * Update configuration
53
- */
54
- updateConfig(updates: Partial<AgnoClientConfig>): void;
55
- /**
56
- * Clear all messages
57
- */
58
- clearMessages(): void;
59
- /**
60
- * Send a message to the agent/team (streaming)
61
- *
62
- * To cancel a running request, use the `cancelRun()` method which:
63
- * 1. Aborts the local fetch stream (immediate UI feedback)
64
- * 2. Notifies the backend to stop processing (saves compute costs)
65
- */
66
- sendMessage(message: string | FormData, options?: {
67
- headers?: Record<string, string>;
68
- params?: Record<string, string>;
69
- }): Promise<void>;
70
- /**
71
- * Determine if a RunEvent is a team-level event (prefixed with "Team")
72
- */
73
- private isTeamEvent;
74
- /**
75
- * Determine if an event should update the user-facing message based on mode.
76
- *
77
- * In team mode: only Team* events should update the user-facing message.
78
- * In agent mode: only Run* (non-Team) events should update the user-facing message.
79
- *
80
- * Certain events are always processed regardless of mode:
81
- * - CustomEvent, RunPaused, RunContinued (control flow events)
82
- */
83
- private shouldProcessForUserMessage;
84
- /**
85
- * Emit member-specific events for internal team member activity.
86
- * Only emits when emitMemberEvents config option is true.
87
- */
88
- private emitMemberEvent;
89
- /**
90
- * Handle streaming chunk
91
- */
92
- private handleChunk;
93
- /**
94
- * Handle error
95
- */
96
- private handleError;
97
- /**
98
- * Handle RunCancelled event from backend
99
- * Cancellation is user-initiated and distinct from errors
100
- */
101
- private handleRunCancelled;
102
- /**
103
- * Handle local cancellation cleanup
104
- * Called when user cancels, regardless of backend response
105
- */
106
- private handleLocalCancellation;
107
- /**
108
- * Check if an error is a 401 Unauthorized error with "Token has expired" detail.
109
- * Only triggers token refresh for expired tokens, not other auth failures.
110
- */
111
- private isTokenExpiredError;
112
- /**
113
- * Attempt to refresh the token using the onTokenExpired callback.
114
- * If successful, updates the auth token in config.
115
- *
116
- * @returns true if token was refreshed, false otherwise
117
- */
118
- private tryRefreshToken;
119
- /**
120
- * Execute an operation with automatic token refresh on 401 Unauthorized.
121
- * Centralizes the token refresh and retry logic for all non-streaming API calls.
122
- *
123
- * @param operation - A function that performs the API call and returns a Promise
124
- * @returns The result of the operation
125
- * @throws The original error if it's not a 401 or if token refresh fails
126
- */
127
- private withTokenRefresh;
128
- /**
129
- * Execute a streaming request with automatic token refresh on 401 Unauthorized.
130
- * This method handles the complexity of rebuilding headers after token refresh.
131
- *
132
- * @param config - Configuration for the streaming request
133
- */
134
- private executeStream;
135
- /**
136
- * Check if a fetch Response is a 401 with "Token has expired" detail.
137
- * Reads the response body to check for the specific error message.
138
- */
139
- private isTokenExpiredResponse;
140
- /**
141
- * Wrapper for fetch that handles 401 "Token has expired" errors with automatic token refresh and retry.
142
- * Used for non-streaming API calls.
143
- *
144
- * @param url - The URL to fetch
145
- * @param init - Optional fetch init options (method, body, etc.)
146
- * @returns The fetch Response
147
- */
148
- private fetchWithTokenRefresh;
149
- /**
150
- * Cancel the current running agent/team run.
151
- *
152
- * This will:
153
- * 1. Abort the local fetch stream (immediate UI feedback)
154
- * 2. Notify the backend to stop processing
155
- * 3. Emit 'run:cancelled' event
156
- *
157
- * @param options - Optional request headers and query parameters
158
- * @throws Error if no run is currently streaming
159
- */
160
- cancelRun(options?: {
161
- headers?: Record<string, string>;
162
- params?: Record<string, string>;
163
- }): Promise<void>;
164
- /**
165
- * Get current run ID (if streaming)
166
- */
167
- getCurrentRunId(): string | undefined;
168
- /**
169
- * Refresh messages from the session API after run completion.
170
- * Replaces streamed messages with authoritative session data.
171
- * Preserves client-side properties like ui_component that aren't stored on the server.
172
- * @private
173
- */
174
- private refreshSessionMessages;
175
- /**
176
- * Load a session
177
- */
178
- loadSession(sessionId: string, options?: {
179
- params?: Record<string, string>;
180
- }): Promise<ChatMessage[]>;
181
- /**
182
- * Fetch all sessions
183
- */
184
- fetchSessions(options?: {
185
- params?: Record<string, string>;
186
- }): Promise<SessionEntry[]>;
187
- /**
188
- * Delete a session
189
- */
190
- deleteSession(sessionId: string, options?: {
191
- params?: Record<string, string>;
192
- }): Promise<void>;
193
- /**
194
- * Get a session by ID
195
- */
196
- getSessionById(sessionId: string, options?: {
197
- params?: Record<string, string>;
198
- }): Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
199
- /**
200
- * Get a run by ID
201
- */
202
- getRunById(sessionId: string, runId: string, options?: {
203
- params?: Record<string, string>;
204
- }): Promise<RunSchema | TeamRunSchema>;
205
- /**
206
- * Create a new session
207
- */
208
- createSession(request?: CreateSessionRequest, options?: {
209
- params?: Record<string, string>;
210
- }): Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
211
- /**
212
- * Update a session
213
- */
214
- updateSession(sessionId: string, request: UpdateSessionRequest, options?: {
215
- params?: Record<string, string>;
216
- }): Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
217
- /**
218
- * Rename a session
219
- */
220
- renameSession(sessionId: string, newName: string, options?: {
221
- params?: Record<string, string>;
222
- }): Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
223
- /**
224
- * Delete multiple sessions
225
- */
226
- deleteMultipleSessions(sessionIds: string[], options?: {
227
- params?: Record<string, string>;
228
- }): Promise<void>;
229
- /**
230
- * Add tool calls to the last message
231
- * Used by frontend execution to add tool calls that were executed locally
232
- */
233
- addToolCallsToLastMessage(toolCalls: ToolCall[]): void;
234
- /**
235
- * Hydrate a specific tool call with its UI component
236
- * If tool call doesn't exist yet, stores UI spec as pending
237
- */
238
- hydrateToolCallUI(toolCallId: string, uiSpec: any): void;
239
- /**
240
- * Apply any pending UI specs to tool calls that have just been added
241
- * Called after message updates to attach UI to newly arrived tool calls
242
- * Batches all updates to emit only one message:update event
243
- */
244
- private applyPendingUISpecs;
245
- /**
246
- * Continue a paused run with tool execution results.
247
- *
248
- * **Note:** HITL (Human-in-the-Loop) frontend tool execution is only supported for agents.
249
- * Teams do not support the continue endpoint.
250
- *
251
- * To cancel a running request, use the `cancelRun()` method.
252
- *
253
- * @param tools - Array of tool calls with execution results
254
- * @param options - Optional request headers and query parameters
255
- * @throws Error if no paused run exists
256
- * @throws Error if called with team mode (teams don't support HITL)
257
- */
258
- continueRun(tools: ToolCall[], options?: {
259
- headers?: Record<string, string>;
260
- params?: Record<string, string>;
261
- }): Promise<void>;
262
- /**
263
- * Check endpoint status
264
- */
265
- checkStatus(options?: {
266
- params?: Record<string, string>;
267
- }): Promise<boolean>;
268
- /**
269
- * Fetch agents from endpoint
270
- */
271
- fetchAgents(options?: {
272
- params?: Record<string, string>;
273
- }): Promise<AgentDetails[]>;
274
- /**
275
- * Fetch teams from endpoint
276
- */
277
- fetchTeams(options?: {
278
- params?: Record<string, string>;
279
- }): Promise<TeamDetails[]>;
280
- /**
281
- * Initialize client (check status and fetch agents/teams)
282
- * Automatically selects the first available agent or team if none is configured
283
- */
284
- initialize(options?: {
285
- params?: Record<string, string>;
286
- }): Promise<{
287
- agents: AgentDetails[];
288
- teams: TeamDetails[];
289
- }>;
290
- /**
291
- * Fetch memories with optional filtering and pagination
292
- */
293
- fetchMemories(queryParams?: ListMemoriesParams, options?: {
294
- params?: Record<string, string>;
295
- }): Promise<MemoriesListResponse>;
296
- /**
297
- * Get a specific memory by ID
298
- */
299
- getMemoryById(memoryId: string, options?: {
300
- params?: Record<string, string>;
301
- table?: string;
302
- }): Promise<UserMemory>;
303
- /**
304
- * Get all available memory topics
305
- */
306
- getMemoryTopics(options?: {
307
- params?: Record<string, string>;
308
- table?: string;
309
- }): Promise<string[]>;
310
- /**
311
- * Get user memory statistics
312
- */
313
- getUserMemoryStats(queryParams?: UserMemoryStatsParams, options?: {
314
- params?: Record<string, string>;
315
- }): Promise<UserMemoryStatsResponse>;
316
- /**
317
- * Create a new memory
318
- */
319
- createMemory(request: CreateMemoryRequest, options?: {
320
- params?: Record<string, string>;
321
- table?: string;
322
- }): Promise<UserMemory>;
323
- /**
324
- * Update an existing memory
325
- */
326
- updateMemory(memoryId: string, request: UpdateMemoryRequest, options?: {
327
- params?: Record<string, string>;
328
- table?: string;
329
- }): Promise<UserMemory>;
330
- /**
331
- * Delete a single memory
332
- */
333
- deleteMemory(memoryId: string, options?: {
334
- params?: Record<string, string>;
335
- table?: string;
336
- }): Promise<void>;
337
- /**
338
- * Delete multiple memories
339
- */
340
- deleteMultipleMemories(memoryIds: string[], options?: {
341
- params?: Record<string, string>;
342
- table?: string;
343
- userId?: string;
344
- }): Promise<void>;
345
- /**
346
- * Get knowledge configuration
347
- */
348
- getKnowledgeConfig(options?: {
349
- dbId?: string;
350
- params?: Record<string, string>;
351
- }): Promise<KnowledgeConfigResponse>;
352
- /**
353
- * List knowledge content
354
- */
355
- listKnowledgeContent(listOptions?: ContentListOptions, options?: {
356
- params?: Record<string, string>;
357
- }): Promise<ContentListResponse>;
358
- /**
359
- * Get knowledge content by ID
360
- */
361
- getKnowledgeContent(contentId: string, options?: {
362
- dbId?: string;
363
- params?: Record<string, string>;
364
- }): Promise<ContentResponse>;
365
- /**
366
- * Get knowledge content status
367
- */
368
- getKnowledgeContentStatus(contentId: string, options?: {
369
- dbId?: string;
370
- params?: Record<string, string>;
371
- }): Promise<ContentStatusResponse>;
372
- /**
373
- * Search knowledge base
374
- */
375
- searchKnowledge(request: VectorSearchRequest, options?: {
376
- params?: Record<string, string>;
377
- }): Promise<VectorSearchResponse>;
378
- /**
379
- * Upload knowledge content
380
- * @param data - FormData with file/text_content or ContentUploadRequest object
381
- */
382
- uploadKnowledgeContent(data: FormData | {
383
- name?: string;
384
- description?: string;
385
- url?: string;
386
- metadata?: Record<string, unknown>;
387
- file?: File;
388
- text_content?: string;
389
- reader_id?: string;
390
- chunker?: string;
391
- chunk_size?: number;
392
- chunk_overlap?: number;
393
- }, options?: {
394
- dbId?: string;
395
- params?: Record<string, string>;
396
- }): Promise<ContentResponse>;
397
- /**
398
- * Update knowledge content
399
- */
400
- updateKnowledgeContent(contentId: string, request: ContentUpdateRequest, options?: {
401
- dbId?: string;
402
- params?: Record<string, string>;
403
- }): Promise<ContentResponse>;
404
- /**
405
- * Delete all knowledge content
406
- */
407
- deleteAllKnowledgeContent(options?: {
408
- dbId?: string;
409
- params?: Record<string, string>;
410
- }): Promise<void>;
411
- /**
412
- * Delete knowledge content by ID
413
- */
414
- deleteKnowledgeContent(contentId: string, options?: {
415
- dbId?: string;
416
- params?: Record<string, string>;
417
- }): Promise<ContentResponse>;
418
- /**
419
- * Fetch aggregated metrics from the endpoint
420
- *
421
- * @param options - Options including date range, dbId, table, and custom params
422
- * @returns MetricsResponse containing daily aggregated metrics
423
- */
424
- fetchMetrics(options?: MetricsOptions): Promise<MetricsResponse>;
425
- /**
426
- * Refresh/recalculate metrics on the backend
427
- *
428
- * @param options - Options including dbId, table, and custom params
429
- * @returns Array of refreshed DayAggregatedMetrics
430
- */
431
- refreshMetrics(options?: RefreshMetricsOptions): Promise<DayAggregatedMetrics[]>;
432
- /**
433
- * List evaluation runs with optional filtering and pagination
434
- * @param listParams - Parameters for filtering and pagination
435
- * @param options - Optional request query parameters
436
- */
437
- listEvalRuns(listParams?: ListEvalRunsParams, options?: {
438
- params?: Record<string, string>;
439
- }): Promise<EvalRunsListResponse>;
440
- /**
441
- * Get a specific evaluation run by ID
442
- * @param evalRunId - The evaluation run ID
443
- * @param options - Optional db_id, table, and query parameters
444
- */
445
- getEvalRun(evalRunId: string, options?: {
446
- dbId?: string;
447
- table?: string;
448
- params?: Record<string, string>;
449
- }): Promise<EvalSchema>;
450
- /**
451
- * Execute a new evaluation
452
- * @param request - The evaluation request parameters
453
- * @param options - Optional db_id, table, and query parameters
454
- */
455
- executeEval(request: ExecuteEvalRequest, options?: {
456
- dbId?: string;
457
- table?: string;
458
- params?: Record<string, string>;
459
- }): Promise<EvalSchema>;
460
- /**
461
- * Update an evaluation run (rename)
462
- * @param evalRunId - The evaluation run ID
463
- * @param request - The update request with new name
464
- * @param options - Optional db_id, table, and query parameters
465
- */
466
- updateEvalRun(evalRunId: string, request: UpdateEvalRunRequest, options?: {
467
- dbId?: string;
468
- table?: string;
469
- params?: Record<string, string>;
470
- }): Promise<EvalSchema>;
471
- /**
472
- * Delete multiple evaluation runs
473
- * @param evalRunIds - Array of evaluation run IDs to delete
474
- * @param options - Optional db_id, table, and query parameters
475
- */
476
- deleteEvalRuns(evalRunIds: string[], options?: {
477
- dbId?: string;
478
- table?: string;
479
- params?: Record<string, string>;
480
- }): Promise<void>;
481
- /**
482
- * Fetch traces with optional filters
483
- * GET /traces
484
- *
485
- * @param options - Filter and pagination options
486
- * @param requestOptions - Optional per-request headers and params
487
- * @returns Paginated traces result with traces and pagination info
488
- */
489
- fetchTraces(options?: ListTracesOptions, requestOptions?: {
490
- headers?: Record<string, string>;
491
- params?: Record<string, string>;
492
- }): Promise<PaginatedTracesResult>;
493
- /**
494
- * Get trace detail or a specific span
495
- * GET /traces/{trace_id}
496
- *
497
- * @param traceId - The trace ID to fetch
498
- * @param options - Options including optional span_id, run_id, db_id
499
- * @param requestOptions - Optional per-request headers and params
500
- * @returns TraceDetail (full trace) or TraceNode (specific span)
501
- */
502
- getTraceDetail(traceId: string, options?: GetTraceOptions, requestOptions?: {
503
- headers?: Record<string, string>;
504
- params?: Record<string, string>;
505
- }): Promise<TraceDetail | TraceNode>;
506
- /**
507
- * Get trace session statistics
508
- * GET /trace_session_stats
509
- *
510
- * @param options - Filter and pagination options
511
- * @param requestOptions - Optional per-request headers and params
512
- * @returns Paginated trace session stats result
513
- */
514
- fetchTraceSessionStats(options?: GetTraceSessionStatsOptions, requestOptions?: {
515
- headers?: Record<string, string>;
516
- params?: Record<string, string>;
517
- }): Promise<PaginatedTraceSessionStatsResult>;
518
- }
519
-
520
- /**
521
- * Logger utility with sensitive data sanitization
522
- * Only logs in development mode to prevent auth token exposure
523
- */
524
- /**
525
- * Logger class with sanitization and environment-aware logging
526
- */
527
- declare class Logger {
528
- /**
529
- * Log debug information (only in development)
530
- */
531
- static debug(message: string, data?: unknown): void;
532
- /**
533
- * Log informational messages (only in development)
534
- */
535
- static info(message: string, data?: unknown): void;
536
- /**
537
- * Log warnings (always logs)
538
- */
539
- static warn(message: string, data?: unknown): void;
540
- /**
541
- * Log errors (always logs)
542
- */
543
- static error(message: string, data?: unknown): void;
544
- }
545
-
546
- export { AgnoClient, Logger, type PaginatedTraceSessionStatsResult, type PaginatedTracesResult };
5
+ export { AgnoClient } from './client';
6
+ export { Logger } from './utils/logger';
7
+ export type { PaginatedTracesResult, PaginatedTraceSessionStatsResult, } from './managers/traces-manager';
8
+ export type { AgnoClientConfig, ChatMessage, ToolCall, RunResponse, RunResponseContent, SessionEntry, AgentDetails, TeamDetails, ClientState, MessageExtraData, ImageData, VideoData, AudioData, ResponseAudioData, UserMemory, MemoriesListResponse, ListMemoriesParams, CreateMemoryRequest, UpdateMemoryRequest, DeleteMultipleMemoriesRequest, UserMemoryStats, UserMemoryStatsResponse, UserMemoryStatsParams, ContentStatus, ReaderSchema, ChunkerSchema, VectorDbSchema, KnowledgeConfigResponse, ContentResponse, ContentStatusResponse, ContentListResponse, ContentListOptions, VectorSearchRequest, VectorSearchResult, VectorSearchResponse, ContentUploadRequest, ContentUpdateRequest, TokenMetrics, ModelMetrics, DayAggregatedMetrics, MetricsResponse, MetricsOptions, RefreshMetricsOptions, EvalType, EvalComponentType, ScoringStrategy, SortOrder, EvalSchema, ListEvalRunsParams, EvalRunsListResponse, ExecuteEvalRequest, UpdateEvalRunRequest, DeleteEvalRunsRequest, TraceStatus, TraceSummary, TraceNode, TraceDetail, TraceSessionStats, TracesListResponse, TraceSessionStatsResponse, ListTracesOptions, GetTraceOptions, GetTraceSessionStatsOptions, PaginationInfo, } from '@rodrigocoliveira/agno-types';
9
+ export { RunEvent } from '@rodrigocoliveira/agno-types';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,YAAY,EACV,qBAAqB,EACrB,gCAAgC,GACjC,MAAM,2BAA2B,CAAC;AAGnC,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,SAAS,EACT,iBAAiB,EAEjB,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,6BAA6B,EAC7B,eAAe,EACf,uBAAuB,EACvB,qBAAqB,EAErB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EAEpB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,qBAAqB,EAErB,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EAErB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,2BAA2B,EAC3B,cAAc,GACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC"}