- Dockerfile now runs tsc during build so committed dist/ is never stale - ChatResult interface was missing history[] and memoryUpdates[] fields - Re-add missing MemoryUpdate import in orchestrator.ts - Rebuild dist/ with all new fields included Made-with: Cursor
28 lines
993 B
TypeScript
28 lines
993 B
TypeScript
import { LLMMessage } from './llm';
|
|
import { ToolContext, MemoryUpdate } from './tools';
|
|
export declare function listSessions(): {
|
|
id: string;
|
|
messages: number;
|
|
createdAt: string;
|
|
lastActiveAt: string;
|
|
}[];
|
|
export declare function clearSession(sessionId: string): void;
|
|
export interface ChatResult {
|
|
reply: string;
|
|
reasoning: string | null;
|
|
sessionId: string;
|
|
turns: number;
|
|
toolCalls: string[];
|
|
model: string;
|
|
/** Updated conversation history — caller should persist this */
|
|
history: LLMMessage[];
|
|
/** Knowledge items the AI chose to save this turn */
|
|
memoryUpdates: MemoryUpdate[];
|
|
}
|
|
export declare function orchestratorChat(sessionId: string, userMessage: string, ctx: ToolContext, opts?: {
|
|
/** Pre-load history from DB — replaces in-memory session history */
|
|
preloadedHistory?: LLMMessage[];
|
|
/** Knowledge items to inject as context at start of conversation */
|
|
knowledgeContext?: string;
|
|
}): Promise<ChatResult>;
|