UNPKG

prompt-version-manager

Version:

Centralized prompt management system for Human Behavior AI agents

75 lines 2.1 kB
/** * Execution tracking for PVM TypeScript - stores execution data for dashboard. * Matches Python's execution storage format exactly. */ export interface ExecutionData { id: string; timestamp: string; model: string; prompt_hash: string; tag: string; tokens: { prompt: number; completion: number; total: number; }; latency_ms: number; cost: number; chain_id: string | null; parent_execution_id: string | null; metadata: Record<string, any>; } export interface ExecutionIndex { executions: Array<{ id: string; timestamp: string; model: string; tag: string; tokens: number; cost: number; chain_id: string | null; }>; chains: Record<string, { id: string; executions: string[]; created: string; }>; metrics: { total_executions: number; total_tokens: number; total_cost: number; models_used: Record<string, { count: number; tokens: number; cost: number; }>; }; } export declare class ExecutionTracker { private repoPath; private executionsDir; private indexFile; private index; constructor(repoPath?: string); private loadIndexSync; private loadIndex; private saveIndex; trackExecution(executionId: string, model: string, promptHash: string, tag: string, tokens: { prompt: number; completion: number; total: number; }, latencyMs: number, cost: number, chainId?: string | null, parentExecutionId?: string | null, metadata?: Record<string, any>): Promise<string>; private queueForSync; private trySyncAsync; getExecutions(limit?: number): Promise<ExecutionData[]>; getMetrics(): Record<string, any>; getChains(): Record<string, any>; getTimeline(_days?: number): Promise<Array<{ date: string; executions: number; tokens: number; cost: number; models: string[]; }>>; } //# sourceMappingURL=execution-tracker.d.ts.map