HEL-828: wire life/persona/receipt confirmation onto 4575b275 (original author delivery, 12 files per MANIFEST in HEL-828-source-4575b275.zip)

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
Chief Engineer
2026-10-24 11:08:53 +08:00
co-authored by multica-agent
parent 4575b27515
commit 58d65aea05
12 changed files with 526 additions and 43 deletions
+13
View File
@@ -26,6 +26,8 @@ export interface LifeEvent {
// When and how she told you ("19:34 告诉你", "你们一起经历的"); only ever present on records she has shared.
told?: string;
memoryIds: string[];
// Real records only: the (already server-trimmed) companion messages in which she told it.
messageIds?: string[];
}
export interface Memory {
id: string;
@@ -75,7 +77,18 @@ export type ServerEvent = {
text: string;
speech_tags: string[];
};
// Only on a successful real final while the R2 backend is enabled; demo and older servers omit it.
receipt?: Receipt | null;
};
export interface Receipt {
message_id: number;
turn_id: string;
// The epoch of the turn that produced the message; on a replay it can differ from the frame's current epoch.
epoch: number;
token: string;
text_hash: string;
expires_at: number;
}
export const defaultSettings: Settings = { city: '杭州', appearance: 'reference-v1', reduced: false, services: { '对话模型': '', 'ASR': '', 'TTS': '', '视觉观察': '' } };
export function validateCreation(name: string, birth: string, relation: string, now = new Date()): string {
if (!name.trim() || name.trim().length > 20 || (/[<>]/u.test(name) || [...name].some(c => c.charCodeAt(0) < 32)))