@kernel.chat/kbot 3.88.0 → 3.93.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,58 @@
1
+ export interface NarrativeEngine {
2
+ worldLore: LoreEntry[];
3
+ activeNarrative: string | null;
4
+ narrativeQueue: string[];
5
+ locationStories: Map<string, string>;
6
+ discoveries: Discovery[];
7
+ lastNarrationFrame: number;
8
+ }
9
+ interface LoreEntry {
10
+ title: string;
11
+ content: string;
12
+ category: 'origin' | 'history' | 'mystery' | 'legend' | 'discovery';
13
+ location?: number;
14
+ timestamp: number;
15
+ }
16
+ interface Discovery {
17
+ what: string;
18
+ where: number;
19
+ when: number;
20
+ narrator: string;
21
+ lore: string;
22
+ }
23
+ /**
24
+ * Generate 5-8 origin stories for a newly created world.
25
+ */
26
+ export declare function generateOriginLore(): LoreEntry[];
27
+ /**
28
+ * Generate a story for a location the robot visits for the first time.
29
+ */
30
+ export declare function generateLocationStory(worldX: number, biome: string, features: string[]): string;
31
+ /**
32
+ * Narrate a discovery — ore, cave, structure, or conversation deposit.
33
+ */
34
+ export declare function narrateDiscovery(what: string, where: number, who: string): Discovery;
35
+ /**
36
+ * Periodic narration — returns a line every ~3 minutes (NARRATION_COOLDOWN_FRAMES),
37
+ * or null if it's not time yet.
38
+ */
39
+ export declare function tickNarrative(engine: NarrativeEngine, frame: number, robotX: number, mood: string, facts: number, users: number): string | null;
40
+ /**
41
+ * Handle chat commands that trigger narrative responses.
42
+ */
43
+ export declare function handleNarrativeCommand(text: string, username: string, engine: NarrativeEngine, robotX: number): string | null;
44
+ /**
45
+ * Save narrative state to ~/.kbot/narrative-state.json.
46
+ */
47
+ export declare function saveNarrative(engine: NarrativeEngine): void;
48
+ /**
49
+ * Load narrative state from disk. Returns null if no saved state.
50
+ */
51
+ export declare function loadNarrative(): NarrativeEngine | null;
52
+ /**
53
+ * Create a fresh NarrativeEngine with origin lore.
54
+ */
55
+ export declare function createNarrativeEngine(): NarrativeEngine;
56
+ export declare function registerNarrativeEngineTools(): void;
57
+ export {};
58
+ //# sourceMappingURL=narrative-engine.d.ts.map