create-ai-chat-context-experimental
Version:
Phase 2: TypeScript rewrite - AI Chat Context & Memory System with conversation extraction and AICF format support (powered by aicf-core v2.1.0).
43 lines • 1.29 kB
TypeScript
/**
* This file is part of create-ai-chat-context-experimental.
* Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
* See LICENSE file for details.
*/
import type { Message, MessageMetadata } from '../types/index.js';
export interface MessageCreateOptions {
id?: string;
conversationId: string;
timestamp?: string;
role: 'user' | 'assistant';
content: string;
metadata?: Partial<MessageMetadata>;
prefix?: string;
index?: number;
}
/**
* Build messages consistently
*/
export declare class MessageBuilder {
/**
* Create a message with standard structure
*/
static create(options: MessageCreateOptions): Message;
/**
* Add or merge metadata to a message
*/
static withMetadata(message: Message, metadata: Partial<MessageMetadata>): Message;
/**
* Generate consistent ID
*/
static generateId(prefix?: string, index?: number): string;
/**
* Create message with platform metadata
*/
static createWithPlatform(options: MessageCreateOptions & {
platform: string;
extractedFrom: string;
messageType: 'user_request' | 'ai_response';
rawLength?: number;
}): Message;
}
//# sourceMappingURL=MessageBuilder.d.ts.map