dave-code 1.0.4 → 1.2.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 +39 -5
- package/bin/aiClient.js +878 -159
- package/bin/check.js +11 -0
- package/bin/cliMenu.js +251 -172
- package/bin/commandRouter.js +70 -0
- package/bin/configManager.js +153 -64
- package/bin/contextManager.js +167 -0
- package/bin/index.js +2103 -573
- package/bin/markdownRenderer.js +264 -0
- package/bin/memoryManager.js +182 -0
- package/bin/planManager.js +291 -0
- package/bin/projectNotebookManager.js +839 -0
- package/bin/runtimeEvents.js +104 -0
- package/bin/scanManager.js +561 -0
- package/bin/sessionManager.js +182 -0
- package/bin/terminalRenderer.js +701 -0
- package/bin/textWidth.js +194 -0
- package/bin/thunderManager.js +302 -0
- package/bin/thunderOrchestrator.js +263 -0
- package/bin/thunderPrompts.js +53 -0
- package/bin/thunderRenderer.js +200 -0
- package/bin/toolRuntime.js +1607 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -5,10 +5,19 @@ A terminal-based AI coding assistant CLI similar to Claude Code. Dave Code integ
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- ⚡ **Interactive CLI REPL**: Ask questions and run commands in your workspace with animated terminal visual elements.
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
8
|
+
- 🧭 **Structured Activity Timeline**: Model requests, tool calls, permissions, retries, and context compaction use one stable event-driven terminal renderer.
|
|
9
|
+
- 🔒 **Explicit Coding Turns**: Normal chat is read-only. Workspace changes are available only through a non-empty `/code ...` request and every mutation is still confirmed.
|
|
10
|
+
- 📋 **Persistent Named Plans**: `/plan name: request` creates a detailed what-and-how implementation plan. Multiple plans are stored per workspace and shown in the status panel.
|
|
11
|
+
- ✍️ **Stream-Aware Answers**: Anthropic, OpenAI-compatible, and Gemini endpoints use streaming transport with automatic fallback; text is committed after tool/final classification so tool prefaces cannot overlap the UI.
|
|
12
|
+
- 🛠️ **Complete Workspace Tools**: Read, search, focused exact edits, file creation, directory creation, move, delete, and workspace command execution, including recovery of DeepSeek DSML tool calls.
|
|
13
|
+
- 🔐 **Confirmed Mutations**: Edits, writes, moves, deletes, and commands show a preview and require approval before changing the workspace.
|
|
14
|
+
- 💾 **Workspace-Aware Sessions**: New sessions remember their workspace and active file. Older sessions without workspace metadata require one `/open <project-directory>` before file tools can continue.
|
|
15
|
+
- 🔎 **Adaptive Scan**: every repository task starts with a scan that chooses an active-context budget and a compact reading strategy. On first Highway use, Dave outlines effective files locally, reads only key entry/configuration/request-related source, and creates the notebook with one synthesis call for typical repositories. Later scans reuse the ready notebook directly.
|
|
16
|
+
- 🗒️ **Private Highway Notebook**: the per-workspace notebook keeps twelve fixed project-analysis sections plus evidence-backed file cards under `~/.dave-code-notes/`. It is never printed automatically, detects external drift, and refreshes after Dave changes code.
|
|
17
|
+
- 📖 **Budget-Aware Reading**: Files that fit the active budget can be read whole; larger results are streamed in numbered pages with a stable continuation cursor.
|
|
18
|
+
- 🧭 **Coherent Context Cache**: Unchanged outlines and ranges replay their exact content. Older tool results are summarized only after the model has received the complete latest result.
|
|
19
|
+
- 🧠 **Workspace Memory**: Durable preferences, conventions, architecture facts, commands, decisions, and debugging learnings can be extracted across chats, retrieved by relevance, and audited or disabled with `/memory`.
|
|
20
|
+
- 🧠 **Reasoning Privacy**: Removes `<think>` and reasoning blocks from the terminal and future conversation context.
|
|
12
21
|
- 📊 **Token Usage Statistics**: Real-time prompt, completion, and total token usage tracked and printed after each request. Run `/stats` or `/tokens` to see session totals.
|
|
13
22
|
- 🌐 **Proxy & Key Configuration**: Interactively configure API keys, models, base URLs, and proxies via `/config`, `/model`, or `/api`.
|
|
14
23
|
|
|
@@ -35,11 +44,34 @@ npm install -g dave-code
|
|
|
35
44
|
|
|
36
45
|
3. Type `/help` to see list of available commands.
|
|
37
46
|
|
|
47
|
+
Streaming is enabled by default. Set `DAVE_CODE_STREAM=0` to force compatibility mode for endpoints that do not support SSE. Set `DAVE_CODE_DEBUG=1` to enable local request diagnostics; API credentials are redacted.
|
|
48
|
+
|
|
49
|
+
Dave uses native structured tools for OpenAI-compatible, Anthropic, and Gemini providers. For an older endpoint that only understands text tags, set `"toolMode": "legacy"` in that profile. Optional profile fields include `provider`, `maxOutputTokens`, `contextWindowTokens`, and `temperature`. Dave recognizes common model context windows automatically; set `contextWindowTokens` for custom endpoints or models whose limits differ.
|
|
50
|
+
|
|
51
|
+
Dave renders terminal-safe Markdown instead of printing its source markers. Headings, emphasis, inline and fenced code, lists, quotes, links, and tables receive a readable terminal layout. Wide tables automatically switch to a vertical field view. Common LaTeX written as `$...$`, `$$...$$`, `\(...\)`, or `\[...\]` is converted to Unicode mathematics for terminals.
|
|
52
|
+
|
|
53
|
+
Font family and font size are controlled by the host terminal (for example Windows Terminal, iTerm2, or the IDE terminal), not by a portable CLI escape sequence. Dave adapts its layout to the reported terminal width and caps prose width for readability; change the font in the terminal profile and Dave will reflow on the next render.
|
|
54
|
+
|
|
38
55
|
## Available Commands
|
|
39
56
|
|
|
57
|
+
Dave Code has two session-scoped workflows. **Highway** uses a focused single Agent. **Thunder** creates a PM-led office team, negotiates staffing and validation depth, performs parallel read-only planning, and waits for an explicit `/code <plan>` before any workspace change. Both modes use `Scan → Read → Act → Verify` and share the same workspace snapshot cache.
|
|
58
|
+
|
|
59
|
+
Highway keeps the visible `Scan → Read → Act → Verify` track. Scan is deliberately lightweight: it inspects cached metadata, compact file outlines, and the private notebook catalog, then makes one capped planning call. Dave uses the recommended read plan automatically; set `DAVE_CODE_REVIEW_PLAN=1` when an interactive pre-read review is desired.
|
|
60
|
+
|
|
61
|
+
READ creates or incrementally updates the private notebook. The model receives only a compact read brief and can fetch notebook sections on demand, so the same long notebook text is not resent on every tool step. Token budgets are soft warnings; physical context pressure triggers automatic structured compaction while recent messages remain lossless. Thunder intentionally keeps its metadata-only team scan.
|
|
62
|
+
|
|
63
|
+
Use `/mode highway`, `/mode thunder`, or `/thunder <request>`. Use `/agents` to inspect the latest active Thunder team. Thunder defaults to six members and four concurrent model requests; its performance tier requires explicit approval.
|
|
64
|
+
|
|
65
|
+
Running `/mode` opens a two-position horizontal selector. Use the left/right arrow keys and Enter; entering Thunder plays a short green activation transition before the team workflow starts.
|
|
66
|
+
|
|
40
67
|
- `/help` - Show help instructions.
|
|
41
68
|
- `/stats` / `/tokens` - Display session and last request token usage statistics.
|
|
42
|
-
- `/effort` -
|
|
69
|
+
- `/effort` - Deprecated compatibility notice; adaptive Scan now chooses context budgets automatically.
|
|
70
|
+
- `/memory` - View, toggle, or delete cross-chat memories for the current workspace.
|
|
71
|
+
- `/note status|refresh|rebuild|clear` - Inspect or maintain the private Highway project notebook without displaying its body. Thunder reports this command as unsupported.
|
|
72
|
+
- `/plan <name>: <request>` - Create a read-only implementation plan that explains both what to change and how to change it. Run `/plan` without arguments to manage saved plans.
|
|
73
|
+
- `/code <request-or-plan-name>` - Authorize one coding turn. `/code @<plan-name>` selects a plan explicitly and `/code --prompt <text>` forces an ad-hoc request.
|
|
74
|
+
- `/undo` - Restore the most recent file mutation recorded by the current Dave process.
|
|
43
75
|
- `/model` - Switch active LLM profile.
|
|
44
76
|
- `/api` - Set or change the API key for the active profile.
|
|
45
77
|
- `/open <path>` - Open a file or folder in your workspace.
|
|
@@ -48,6 +80,8 @@ npm install -g dave-code
|
|
|
48
80
|
- `/lang` - Switch terminal interface between Chinese and English.
|
|
49
81
|
- `/exit` - Exit the assistant.
|
|
50
82
|
|
|
83
|
+
Read-only chat and planning can list, glob, read, and regex-search workspace files. Sensitive files such as `.env`, private keys, certificates, and credential files always require explicit confirmation before their contents are sent to a model. Commands, writes, edits, directory creation, moves, and deletes are blocked outside `/code`. Mutation prompts accept `y` for this action, `a` for the same tool during the current turn, and `n` to deny; move and delete always ask individually.
|
|
84
|
+
|
|
51
85
|
## License
|
|
52
86
|
|
|
53
87
|
ISC License.
|