/** * Session-start profile injection helper. * * Builds a + block from * viking://user//memories/profile.md * viking://user//memories/preferences/ (ls with abstracts) * viking://user//memories/entities/ (ls with abstracts) * * Budget enforced via the CJK-aware estimateTokens() below — codepoint >= * 0x3000 counts at 1.5 tokens, else chars/4. * * Returned block is the *inner* content only (no outer ). */ import type { FetchJSON } from './recall-core.ts'; /** * Token estimate that splits CJK from the rest: CJK/Hiragana/Katakana/Hangul * codepoints (>= 0x3000) count at 1.5 tokens/char, everything else at chars/4. */ export declare function estimateTokens(text: string | undefined | null): number; export interface ProfileBlockResult { block: string; chars: number; tokens: number; profileUri: string; profileChars: number; prefCount: number; entCount: number; droppedPref: number; droppedEnt: number; } /** * Build the profile injection block. * * Returns null when neither profile.md nor either listing has any content. * The returned `block` is just the inner / * payload — the caller wraps it in . */ export declare function buildProfileBlock(fetchJSON: FetchJSON, totalBudgetTokens: number, actorPeerId?: string): Promise; //# sourceMappingURL=profile-inject.d.ts.map