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