kanna-code 0.2.0 → 0.3.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.
package/README.md CHANGED
@@ -30,6 +30,12 @@
30
30
  bun install -g kanna-code
31
31
  ```
32
32
 
33
+ If Bun isn't installed, install it first:
34
+
35
+ ```bash
36
+ curl -fsSL https://bun.sh/install | bash
37
+ ```
38
+
33
39
  Then run from any project directory:
34
40
 
35
41
  ```bash
@@ -40,9 +46,12 @@ That's it. Kanna opens in your browser at [`localhost:3210`](http://localhost:32
40
46
 
41
47
  ## Features
42
48
 
49
+ - **Multi-provider support** — switch between Claude and Codex (OpenAI) from the chat input, with per-provider model selection, reasoning effort controls, and Codex fast mode
43
50
  - **Project-first sidebar** — chats grouped under projects, with live status indicators (idle, running, waiting, failed)
44
- - **Local project discovery** — auto-discovers projects from `~/.claude/projects`
45
- - **Rich transcript rendering** — user messages, assistant responses, collapsible tool call groups, plan mode dialogs, and interactive prompts
51
+ - **Drag-and-drop project ordering** — reorder project groups in the sidebar with persistent ordering
52
+ - **Local project discovery** — auto-discovers projects from both Claude and Codex local history
53
+ - **Rich transcript rendering** — hydrated tool calls, collapsible tool groups, plan mode dialogs, and interactive prompts with full result display
54
+ - **Quick responses** — lightweight structured queries (e.g. title generation) via Haiku with automatic Codex fallback
46
55
  - **Plan mode** — review and approve agent plans before execution
47
56
  - **Persistent local history** — refresh-safe routes backed by JSONL event logs and compacted snapshots
48
57
  - **Auto-generated titles** — chat titles generated in the background via Claude Haiku
@@ -56,30 +65,39 @@ Browser (React + Zustand)
56
65
  ↕ WebSocket
57
66
  Bun Server (HTTP + WS)
58
67
  ├── WSRouter ─── subscription & command routing
59
- ├── AgentCoordinator ─── Claude Agent SDK turn management
68
+ ├── AgentCoordinator ─── multi-provider turn management
69
+ ├── ProviderCatalog ─── provider/model/effort normalization
70
+ ├── QuickResponseAdapter ─── structured queries with provider fallback
60
71
  ├── EventStore ─── JSONL persistence + snapshot compaction
61
72
  └── ReadModels ─── derived views (sidebar, chat, projects)
62
73
  ↕ stdio
63
- Claude Agent SDK (local process)
74
+ Claude Agent SDK / Codex App Server (local processes)
64
75
 
65
76
  Local File System (~/.kanna/data/, project dirs)
66
77
  ```
67
78
 
68
- **Key patterns:** Event sourcing for all state mutations. CQRS with separate write (event log) and read (derived snapshots) paths. Reactive broadcasting — subscribers get pushed fresh snapshots on every state change. Agent coordination with tool gating for user-approval flows.
79
+ **Key patterns:** Event sourcing for all state mutations. CQRS with separate write (event log) and read (derived snapshots) paths. Reactive broadcasting — subscribers get pushed fresh snapshots on every state change. Multi-provider agent coordination with tool gating for user-approval flows. Provider-agnostic transcript hydration for unified rendering.
69
80
 
70
81
  ## Requirements
71
82
 
72
83
  - [Bun](https://bun.sh) v1.0+
73
84
  - A working [Claude Code](https://docs.anthropic.com/en/docs/claude-code) environment
85
+ - *(Optional)* [Codex CLI](https://github.com/openai/codex) for Codex provider support
74
86
 
75
87
  ## Install
76
88
 
77
- Install globally via bun:
89
+ Install Kanna globally:
78
90
 
79
91
  ```bash
80
92
  bun install -g kanna-code
81
93
  ```
82
94
 
95
+ If Bun isn't installed, install it first:
96
+
97
+ ```bash
98
+ curl -fsSL https://bun.sh/install | bash
99
+ ```
100
+
83
101
  Or clone and build from source:
84
102
 
85
103
  ```bash
@@ -131,19 +149,23 @@ src/
131
149
  │ ├── app/ App router, pages, central state hook, socket client
132
150
  │ ├── components/ Messages, chat chrome, dialogs, buttons, inputs
133
151
  │ ├── hooks/ Theme, standalone mode detection
134
- │ ├── stores/ Zustand stores (chat input persistence)
152
+ │ ├── stores/ Zustand stores (chat input, preferences, project order)
135
153
  │ └── lib/ Formatters, path utils, transcript parsing
136
154
  ├── server/ Bun backend
137
155
  │ ├── cli.ts CLI entry point & browser launcher
138
156
  │ ├── server.ts HTTP/WS server setup & static serving
139
- │ ├── agent.ts AgentCoordinator (Claude SDK turn management)
157
+ │ ├── agent.ts AgentCoordinator (multi-provider turn management)
158
+ │ ├── codex-app-server.ts Codex App Server JSON-RPC client
159
+ │ ├── provider-catalog.ts Provider/model/effort normalization
160
+ │ ├── quick-response.ts Structured queries with provider fallback
140
161
  │ ├── ws-router.ts WebSocket message routing & subscriptions
141
162
  │ ├── event-store.ts JSONL persistence, replay & compaction
142
- │ ├── discovery.ts Auto-discover projects from ~/.claude/projects
163
+ │ ├── discovery.ts Auto-discover projects from Claude and Codex local state
143
164
  │ ├── read-models.ts Derive view models from event state
144
165
  │ └── events.ts Event type definitions
145
166
  └── shared/ Shared between client & server
146
- ├── types.ts Core data types
167
+ ├── types.ts Core data types, provider catalog, transcript entries
168
+ ├── tools.ts Tool call normalization and hydration
147
169
  ├── protocol.ts WebSocket message protocol
148
170
  ├── ports.ts Port configuration
149
171
  └── branding.ts App name, data directory paths