@tuttiai/core 0.5.0 → 0.7.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/dist/index.d.ts +21 -4
- package/dist/index.js +652 -184
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import pino from 'pino';
|
|
2
|
+
import { TelemetryConfig, TuttiEventType, TuttiEvent, ScoreConfig, AgentResult, Session, LLMProvider, SessionStore, AgentConfig, ChatMessage, Voice, Permission, BudgetConfig, ChatRequest, ChatResponse, StreamChunk } from '@tuttiai/types';
|
|
3
|
+
export { AgentConfig, AgentMemoryConfig, AgentResult, BudgetConfig, ChatMessage, ChatRequest, ChatResponse, ContentBlock, LLMProvider, MemoryConfig, Permission, ScoreConfig, Session, SessionStore, StopReason, StreamChunk, TelemetryConfig, TextBlock, TokenUsage, Tool, ToolContext, ToolDefinition, ToolMemoryHelpers, ToolResult, ToolResultBlock, ToolUseBlock, TuttiEvent, TuttiEventHandler, TuttiEventType, Voice, VoiceContext } from '@tuttiai/types';
|
|
4
|
+
|
|
5
|
+
declare const createLogger: (name: string) => pino.Logger<never, boolean>;
|
|
6
|
+
declare const logger: pino.Logger<never, boolean>;
|
|
7
|
+
|
|
8
|
+
declare const TuttiTracer: {
|
|
9
|
+
agentRun<T>(agentName: string, sessionId: string, fn: () => Promise<T>): Promise<T>;
|
|
10
|
+
llmCall<T>(model: string, fn: () => Promise<T>): Promise<T>;
|
|
11
|
+
toolCall<T>(toolName: string, fn: () => Promise<T>): Promise<T>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
declare function initTelemetry(config: TelemetryConfig): void;
|
|
15
|
+
declare function shutdownTelemetry(): Promise<void>;
|
|
3
16
|
|
|
4
17
|
declare class EventBus {
|
|
5
18
|
private listeners;
|
|
@@ -73,6 +86,7 @@ declare class AgentRunner {
|
|
|
73
86
|
constructor(provider: LLMProvider, events: EventBus, sessions: SessionStore, semanticMemory?: SemanticMemoryStore | undefined);
|
|
74
87
|
run(agent: AgentConfig, input: string, session_id?: string): Promise<AgentResult>;
|
|
75
88
|
private executeWithTimeout;
|
|
89
|
+
private streamToResponse;
|
|
76
90
|
private executeTool;
|
|
77
91
|
}
|
|
78
92
|
|
|
@@ -114,7 +128,7 @@ declare class PostgresSessionStore implements SessionStore {
|
|
|
114
128
|
*/
|
|
115
129
|
initialize(): Promise<void>;
|
|
116
130
|
create(agent_name: string): Session;
|
|
117
|
-
get(
|
|
131
|
+
get(_id: string): Session | undefined;
|
|
118
132
|
/**
|
|
119
133
|
* Async version of get() that queries Postgres directly.
|
|
120
134
|
* Use this when you need to load a session from the database.
|
|
@@ -202,6 +216,7 @@ declare class AnthropicProvider implements LLMProvider {
|
|
|
202
216
|
private client;
|
|
203
217
|
constructor(options?: AnthropicProviderOptions);
|
|
204
218
|
chat(request: ChatRequest): Promise<ChatResponse>;
|
|
219
|
+
stream(request: ChatRequest): AsyncGenerator<StreamChunk>;
|
|
205
220
|
}
|
|
206
221
|
|
|
207
222
|
interface OpenAIProviderOptions {
|
|
@@ -214,6 +229,7 @@ declare class OpenAIProvider implements LLMProvider {
|
|
|
214
229
|
private client;
|
|
215
230
|
constructor(options?: OpenAIProviderOptions);
|
|
216
231
|
chat(request: ChatRequest): Promise<ChatResponse>;
|
|
232
|
+
stream(request: ChatRequest): AsyncGenerator<StreamChunk>;
|
|
217
233
|
}
|
|
218
234
|
|
|
219
235
|
interface GeminiProviderOptions {
|
|
@@ -224,6 +240,7 @@ declare class GeminiProvider implements LLMProvider {
|
|
|
224
240
|
private client;
|
|
225
241
|
constructor(options?: GeminiProviderOptions);
|
|
226
242
|
chat(request: ChatRequest): Promise<ChatResponse>;
|
|
243
|
+
stream(request: ChatRequest): AsyncGenerator<StreamChunk>;
|
|
227
244
|
}
|
|
228
245
|
|
|
229
|
-
export { AgentRouter, AgentRunner, AnthropicProvider, type AnthropicProviderOptions, EventBus, GeminiProvider, type GeminiProviderOptions, InMemorySemanticStore, InMemorySessionStore, type MemoryEntry, OpenAIProvider, type OpenAIProviderOptions, PermissionGuard, PostgresSessionStore, PromptGuard, ScoreLoader, SecretsManager, type SemanticMemoryStore, TokenBudget, TuttiRuntime, defineScore, validateScore };
|
|
246
|
+
export { AgentRouter, AgentRunner, AnthropicProvider, type AnthropicProviderOptions, EventBus, GeminiProvider, type GeminiProviderOptions, InMemorySemanticStore, InMemorySessionStore, type MemoryEntry, OpenAIProvider, type OpenAIProviderOptions, PermissionGuard, PostgresSessionStore, PromptGuard, ScoreLoader, SecretsManager, type SemanticMemoryStore, TokenBudget, TuttiRuntime, TuttiTracer, createLogger, defineScore, initTelemetry, logger, shutdownTelemetry, validateScore };
|