kanna-code 0.1.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,87 @@
1
+ export const STORE_VERSION = 1 as const
2
+ export const PROTOCOL_VERSION = 1 as const
3
+
4
+ export type KannaStatus =
5
+ | "idle"
6
+ | "starting"
7
+ | "running"
8
+ | "waiting_for_user"
9
+ | "failed"
10
+
11
+ export interface ProjectSummary {
12
+ id: string
13
+ localPath: string
14
+ title: string
15
+ createdAt: number
16
+ updatedAt: number
17
+ }
18
+
19
+ export interface SidebarChatRow {
20
+ _id: string
21
+ _creationTime: number
22
+ chatId: string
23
+ title: string
24
+ status: KannaStatus
25
+ localPath: string
26
+ lastMessageAt?: number
27
+ hasAutomation: boolean
28
+ }
29
+
30
+ export interface SidebarProjectGroup {
31
+ groupKey: string
32
+ localPath: string
33
+ chats: SidebarChatRow[]
34
+ }
35
+
36
+ export interface SidebarData {
37
+ projectGroups: SidebarProjectGroup[]
38
+ }
39
+
40
+ export interface LocalProjectSummary {
41
+ localPath: string
42
+ title: string
43
+ source: "saved" | "discovered"
44
+ lastOpenedAt?: number
45
+ chatCount: number
46
+ }
47
+
48
+ export interface LocalProjectsSnapshot {
49
+ machine: {
50
+ id: "local"
51
+ displayName: string
52
+ }
53
+ projects: LocalProjectSummary[]
54
+ }
55
+
56
+ export interface TranscriptEntry {
57
+ _id: string
58
+ messageId?: string
59
+ message: string
60
+ createdAt: number
61
+ hidden?: boolean
62
+ }
63
+
64
+ export interface ChatRuntime {
65
+ chatId: string
66
+ projectId: string
67
+ localPath: string
68
+ title: string
69
+ status: KannaStatus
70
+ planMode: boolean
71
+ resumeSessionId: string | null
72
+ }
73
+
74
+ export interface ChatSnapshot {
75
+ runtime: ChatRuntime
76
+ messages: TranscriptEntry[]
77
+ }
78
+
79
+ export interface KannaSnapshot {
80
+ sidebar: SidebarData
81
+ chat?: ChatSnapshot | null
82
+ }
83
+
84
+ export interface PendingToolSnapshot {
85
+ toolUseId: string
86
+ toolName: "AskUserQuestion" | "ExitPlanMode"
87
+ }