/** * The memory refusals in the kit's own words: the shipped `refusal` line set * (crates/cotton-core/kits/shell/lines/refusal.json → `memory.*`), read from the * file itself so the sentences cannot drift from the Rust server's. The * personal object keeps no per-database line overrides, so the kit's words are * the words (Rust `shell_lines::resolve` with no rows). */import refusal from"../../../../../../crates/cotton-core/kits/shell/lines/refusal.json";/** One `refusal` line by its dotted key, `{name}` filled; the literal `refusal.<line>` when the kit has none (Rust's fallback). */exportfunction say(line: string, fills: Record<string, string> = {}): string {let at: unknown = refusal;for (const key of line.split(".")) at = at && typeof at === "object" ? (at asRecord<string, unknown>)[key] : undefined;if (typeof at !== "string") return`refusal.${line}`;return at.replace(/\{(\w+)\}/g, (whole, name: string) => fills[name] ?? whole);}