@kernel.chat/kbot 3.74.0 → 3.83.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,70 @@
1
+ export interface StreamBrain {
2
+ /** Cross-domain knowledge graph */
3
+ domainGraph: Record<string, DomainNode>;
4
+ /** Tool names currently "loaded" in the brain's focus */
5
+ activeCapabilities: string[];
6
+ /** Currently suggested/executing tool action */
7
+ pendingAction: BrainToolAction | null;
8
+ /** History of executed tool actions */
9
+ actionHistory: BrainToolAction[];
10
+ /** Anticipation engine predictions */
11
+ predictions: Prediction[];
12
+ /** Per-user interest model: username -> likely interests */
13
+ userIntentModel: Record<string, string[]>;
14
+ /** Cross-domain insights generated when 2+ domains overlap */
15
+ insights: CrossDomainInsight[];
16
+ /** Total cross-domain connections made */
17
+ connectionsMade: number;
18
+ /** Frame counter for last suggestion */
19
+ lastSuggestionFrame: number;
20
+ /** Frame counter for last insight */
21
+ lastInsightFrame: number;
22
+ /** Frame counter for last relevance decay */
23
+ lastDecayFrame: number;
24
+ /** Whether a tool is currently executing */
25
+ executing: boolean;
26
+ }
27
+ export interface DomainNode {
28
+ name: string;
29
+ tools: string[];
30
+ relevance: number;
31
+ lastUsed: number;
32
+ facts: string[];
33
+ color: string;
34
+ }
35
+ export interface BrainToolAction {
36
+ tool: string;
37
+ args: Record<string, unknown>;
38
+ trigger: 'chat' | 'autonomous' | 'brain';
39
+ status: 'pending' | 'executing' | 'complete' | 'failed';
40
+ result: string;
41
+ displayLines: string[];
42
+ startFrame: number;
43
+ }
44
+ export interface Prediction {
45
+ text: string;
46
+ confidence: number;
47
+ suggestedTool: string;
48
+ basedOn: string;
49
+ }
50
+ export interface CrossDomainInsight {
51
+ domains: string[];
52
+ insight: string;
53
+ frame: number;
54
+ }
55
+ export interface BrainAction {
56
+ type: 'none' | 'suggest' | 'insight' | 'speech' | 'mood';
57
+ speech?: string;
58
+ mood?: string;
59
+ duration?: number;
60
+ suggestion?: BrainToolAction;
61
+ insight?: CrossDomainInsight;
62
+ }
63
+ export declare function initStreamBrain(): StreamBrain;
64
+ export declare function analyzeChatForDomains(brain: StreamBrain, username: string, text: string): void;
65
+ export declare function suggestToolAction(brain: StreamBrain): BrainToolAction | null;
66
+ export declare function executeToolAction(brain: StreamBrain, action: BrainToolAction): Promise<string>;
67
+ export declare function tickStreamBrain(brain: StreamBrain, frame: number): BrainAction | null;
68
+ export declare function handleBrainCommand(text: string, username: string, brain: StreamBrain): string | null;
69
+ export declare function drawBrainActivity(ctx: CanvasRenderingContext2D, brain: StreamBrain, x: number, y: number, width: number, height: number): void;
70
+ //# sourceMappingURL=stream-brain.d.ts.map