import { SessionEnrichments } from "./core/enrichments.js"; import { AmplitudeAI, FlushOptions } from "./client.js"; import { Session } from "./session.js"; //#region src/bound-agent.d.ts type UserMessageOpts = Partial[0], 'content'>>; type AiMessageOpts = Partial[0], 'content' | 'model' | 'provider' | 'latencyMs'>>; type ToolCallOpts = Partial[0], 'toolName' | 'latencyMs' | 'success'>>; type EmbeddingOpts = Partial[0], 'model' | 'provider' | 'latencyMs'>>; type SpanOpts = Partial[0], 'spanName' | 'latencyMs'>>; type SessionEndOpts = Partial[0]>; type SessionEnrichmentOpts = Partial[0], 'enrichments'>>; type ScoreOpts = Partial[0], 'name' | 'value' | 'targetId'>>; interface AgentOptions { userId?: string | null; parentAgentId?: string | null; customerOrgId?: string | null; agentVersion?: string | null; description?: string | null; context?: Record | null; env?: string | null; sessionId?: string | null; traceId?: string | null; groups?: Record | null; deviceId?: string | null; browserSessionId?: string | null; } declare class BoundAgent { readonly _ai: AmplitudeAI; readonly _defaults: Record; constructor(ai: AmplitudeAI, opts: AgentOptions & { agentId: string; }); get agentId(): string; get ai(): AmplitudeAI; child(agentId: string, overrides?: AgentOptions): BoundAgent; private _merge; trackUserMessage(content: string, opts?: UserMessageOpts): string; trackAiMessage(content: string, model: string, provider: string, latencyMs: number, opts?: AiMessageOpts): string; trackRunCost(totalCostUsd: number, inputTokens: number, outputTokens: number, model: string, provider: string, opts?: Omit[0], 'totalCostUsd' | 'inputTokens' | 'outputTokens' | 'model' | 'provider'>): string; trackToolCall(toolName: string, latencyMs: number, success: boolean, opts?: ToolCallOpts): string; trackEmbedding(model: string, provider: string, latencyMs: number, opts?: EmbeddingOpts): string; trackSpan(spanName: string, latencyMs: number, opts?: SpanOpts): string; trackSessionEnd(opts?: SessionEndOpts): void; trackSessionEnrichment(enrichments: SessionEnrichments, opts?: SessionEnrichmentOpts): void; score(name: string, value: number, targetId: string, opts?: ScoreOpts): void; /** * Create a {@link Session}. * * `idleTimeoutMinutes` hints to the enrichment pipeline how long to wait * before considering the session idle. Defaults to the pipeline default * (~30 min). Positive values up to 90 days (129600) are honored; larger * values are clamped to 90 days. Set to `-1` when you intend to end the * session explicitly: it is enriched early when an explicit * `[Agent] Session End` is emitted (e.g. on `run`/`end`), and otherwise * auto-closes after a 90-day inactivity backstop — so a session that is never * explicitly ended still flushes eventually rather than leaking open. * * @throws {RangeError} if `idleTimeoutMinutes` is a negative value other than * the `-1` sentinel. */ session(opts?: { sessionId?: string | null; idleTimeoutMinutes?: number | null; userId?: string | null; deviceId?: string | null; browserSessionId?: string | null; autoFlush?: boolean; tags?: string[] | null; }): Session; flush(options?: FlushOptions): unknown; shutdown(): void; } //#endregion export { AgentOptions, AiMessageOpts, BoundAgent, EmbeddingOpts, ScoreOpts, SessionEndOpts, SessionEnrichmentOpts, SpanOpts, ToolCallOpts, UserMessageOpts }; //# sourceMappingURL=bound-agent.d.ts.map