@serjm/deepseek-code 0.4.2 → 0.4.5

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +72 -108
  3. package/README.ru.md +73 -108
  4. package/dist/api/index.d.ts +9 -0
  5. package/dist/api/index.d.ts.map +1 -1
  6. package/dist/api/index.js +65 -2
  7. package/dist/api/index.js.map +1 -1
  8. package/dist/cli/index.d.ts +1 -0
  9. package/dist/cli/index.d.ts.map +1 -1
  10. package/dist/cli/index.js +15 -8
  11. package/dist/cli/index.js.map +1 -1
  12. package/dist/cli/interactive.d.ts.map +1 -1
  13. package/dist/cli/interactive.js +65 -3
  14. package/dist/cli/interactive.js.map +1 -1
  15. package/dist/commands/index.d.ts.map +1 -1
  16. package/dist/commands/index.js +63 -41
  17. package/dist/commands/index.js.map +1 -1
  18. package/dist/config/defaults.d.ts.map +1 -1
  19. package/dist/config/defaults.js +8 -7
  20. package/dist/config/defaults.js.map +1 -1
  21. package/dist/core/agent-loop.d.ts +44 -2
  22. package/dist/core/agent-loop.d.ts.map +1 -1
  23. package/dist/core/agent-loop.js +318 -59
  24. package/dist/core/agent-loop.js.map +1 -1
  25. package/dist/core/i18n.d.ts +3 -0
  26. package/dist/core/i18n.d.ts.map +1 -1
  27. package/dist/core/i18n.js +9 -0
  28. package/dist/core/i18n.js.map +1 -1
  29. package/dist/core/metrics.d.ts +3 -1
  30. package/dist/core/metrics.d.ts.map +1 -1
  31. package/dist/core/metrics.js +34 -5
  32. package/dist/core/metrics.js.map +1 -1
  33. package/dist/tools/bash.d.ts.map +1 -1
  34. package/dist/tools/bash.js +299 -20
  35. package/dist/tools/bash.js.map +1 -1
  36. package/dist/tools/chrome.d.ts.map +1 -1
  37. package/dist/tools/chrome.js +1 -0
  38. package/dist/tools/chrome.js.map +1 -1
  39. package/dist/tools/glob.d.ts.map +1 -1
  40. package/dist/tools/glob.js +40 -3
  41. package/dist/tools/glob.js.map +1 -1
  42. package/dist/tools/grep.d.ts.map +1 -1
  43. package/dist/tools/grep.js +69 -13
  44. package/dist/tools/grep.js.map +1 -1
  45. package/dist/tools/read.d.ts.map +1 -1
  46. package/dist/tools/read.js +91 -0
  47. package/dist/tools/read.js.map +1 -1
  48. package/dist/tools/types.d.ts +21 -1
  49. package/dist/tools/types.d.ts.map +1 -1
  50. package/dist/tools/types.js +34 -0
  51. package/dist/tools/types.js.map +1 -1
  52. package/dist/ui/app.d.ts.map +1 -1
  53. package/dist/ui/app.js +234 -162
  54. package/dist/ui/app.js.map +1 -1
  55. package/dist/ui/chat-view.d.ts +24 -3
  56. package/dist/ui/chat-view.d.ts.map +1 -1
  57. package/dist/ui/chat-view.js +116 -58
  58. package/dist/ui/chat-view.js.map +1 -1
  59. package/dist/ui/input-bar.d.ts.map +1 -1
  60. package/dist/ui/input-bar.js +38 -4
  61. package/dist/ui/input-bar.js.map +1 -1
  62. package/dist/ui/setup-wizard.js +1 -1
  63. package/dist/ui/setup-wizard.js.map +1 -1
  64. package/dist/ui/status-bar.d.ts +5 -1
  65. package/dist/ui/status-bar.d.ts.map +1 -1
  66. package/dist/ui/status-bar.js +10 -4
  67. package/dist/ui/status-bar.js.map +1 -1
  68. package/dist/utils/logger.d.ts +15 -0
  69. package/dist/utils/logger.d.ts.map +1 -1
  70. package/dist/utils/logger.js +47 -0
  71. package/dist/utils/logger.js.map +1 -1
  72. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.5 — TUI Stabilization, Multimodal & Pipeline
4
+
5
+ ### Added
6
+ - **Tool-call activity in history** — finished tool batches are committed to the scrollback as a readable per-call list (`✓`/`✗` + tool + file/command + duration), so you can see exactly what the agent did.
7
+ - **Crash guard** — stray runtime errors are recorded to `~/.deepseek-code/crash.log` instead of dropping you back to the shell mid-session.
8
+ - `read_file` now supports images (PNG, JPG, GIF, WEBP, SVG, BMP) — reads as binary, encodes to base64 data URL.
9
+ - `read_file` now supports Jupyter notebooks (`.ipynb`) — parses JSON, extracts code and markdown cells.
10
+ - `read_file` now supports PDF files — naive text extraction + base64 data URL as fallback.
11
+ - `dataUrlsToContentBlocks()` utility in API layer converts data: URLs to `ContentBlock[]` for multimodal messages.
12
+ - `npm run check` pipeline: lint → typecheck → build → test in one command.
13
+ - **Big Paste Preview** — dialog shown when pasting >500 chars, displaying char/line count with Enter to confirm or Esc to cancel.
14
+ - **Follow-up Queue Indicator** — StatusBar shows `[F:1]` badge when follow-up messages are queued during agent run, cleared on new message send.
15
+
16
+ ### Changed
17
+ - **Chat history now renders through Ink `<Static>`** — finalized messages are printed once to the terminal scrollback. This eliminates the full-screen redraw flicker and enables native mouse-wheel scrolling. The in-app PageUp/PageDown windowing was removed in favor of the terminal's own scrollback.
18
+ - **Shell commands run asynchronously** — `run_shell_command` now uses `spawn` instead of blocking `execSync`, so long commands (installs, builds, tests) no longer freeze the UI and can be cancelled. Cancellation/timeout kills the whole process tree (`taskkill /t` on Windows, process-group on POSIX).
19
+ - Cancellation signal is now plumbed to every tool.
20
+ - `buildMessages()` in API layer now properly passes `ContentBlock[]` for multimodal messages (no longer casts to string).
21
+ - **Removed `deepseek-vl2`** — only `deepseek-v4-pro` and `deepseek-v4-flash` remain; images pass as base64 data URLs in text.
22
+
23
+ ### Fixed
24
+ - **Screen flicker on long output is gone** — the live region is now height-bounded (wrap-aware) so Ink never falls back to clearing the whole terminal each frame, which was the cause of both the shaking and the broken scrollback.
25
+ - Default model set to `deepseek-v4-pro`; `DEEPSEEK_MODELS` updated to V4-Flash / V4-Pro.
26
+ - Removed false vision-model warning on image paste — DeepSeek V4 models receive images as text-embedded data URLs.
27
+
28
+ ### Known Issues
29
+ - **Ctrl+C on Windows may still drop to the shell** instead of pausing the agent. Cancellation is now cooperative and the process no longer hard-crashes, but the clean pause-on-interrupt is still under investigation on Windows terminals.
30
+ - The new `<Static>` rendering has been validated primarily on **Windows Terminal**; appearance may differ on cmd.exe, the VS Code terminal, macOS, or Linux.
31
+ - Switching between `deepseek-v4-pro` and `deepseek-v4-flash` updates the configured model, but the practical difference in responses has not been independently verified.
32
+
33
+ ## 0.4.4 — TUI Stability & Release Candidate
34
+
35
+ ### Fixed
36
+ - Execution Summary now includes details for failed tool calls: tool name, label, and error.
37
+ - Increased Windows glob test timeout to reduce flaky failures on slower Windows runs.
38
+ - Fixed CLI argument parsing so `--json` or `--headless` without a prompt no longer treats `node` and the script path as an agent prompt.
39
+ - Added a Node fallback for `grep_search` when `rg` is not installed.
40
+ - Stream timeouts now surface as explicit errors instead of being hidden as user cancellations.
41
+ - Added Windows shell policy guidance and runtime rejection for common Unix-only inspection commands in Windows shells.
42
+ - PowerShell cmdlets such as `Remove-Item`, `Get-Content`, and `Select-String` now execute through PowerShell on Windows instead of falling through to `cmd.exe`.
43
+ - Commands that mix PowerShell cmdlets with `cmd`/Bash chaining operators such as `&&` are now rejected with a clear Windows shell policy error.
44
+ - `mkdir -p` is now rejected on Windows to avoid creating a literal `-p` directory.
45
+ - Default interactive agent iteration limit increased from 100 to 200, and max-iteration stops now still emit Execution Summary.
46
+ - Added automatic context compaction between agent iterations when the last request approaches the context window limit, with compact progress shown in the TUI status bar.
47
+ - Blocked broad process-kill commands such as `taskkill /F /IM node.exe` so the agent cannot terminate itself or unrelated Node-based sessions.
48
+ - TUI status bar now shows `VIEW:FOLLOW` or `VIEW:PAUSED` with keyboard scroll hints.
49
+ - `/help` now explicitly documents that mouse wheel input is not captured in the TUI.
50
+ - Added explicit `/budget normal` and `/budget large` modes while keeping the interactive default budget off.
51
+ - Stabilized streaming output by batching assistant chunks to reduce TUI rerenders.
52
+ - Stabilized slash-command editing, including `/model`, Backspace/Delete, Esc, and Ctrl+U behavior.
53
+ - Preserved live follow-up input while the agent is running, so user messages are queued into the active loop instead of being lost.
54
+
55
+ ### Changed
56
+ - Added an interactive budget preset for future use, but it is not enabled by default.
57
+ - Reverted the restrictive default interactive budget because it stopped real large-project work too early.
58
+
59
+ ### Known Issues
60
+ - Mouse wheel support is not enabled in the production TUI.
61
+ - History scrolling remains keyboard-first with PageUp, PageDown, and End.
62
+ - Large project acceptance testing is still required before publication.
63
+
64
+ ## 0.4.3 — Project Mode & Browser Control
65
+
66
+ ### Improvements
67
+ - Improved Chrome browser mode handling.
68
+ - `/chrome --headed` and `/chrome --headless` now switch the desired browser mode without launching Chrome.
69
+ - Browser checks remain headed by default and open visibly unless headless mode is explicitly selected.
70
+ - Browser test reports now show the actual browser mode.
71
+
72
+ ### Agent Quality
73
+ - Added Execution Policy to reduce unnecessary reads, repeated tool calls, temporary files, and over-scoped work.
74
+ - Added Source of Truth Policy to prevent invented versions, release notes, features, links, dates, and metrics.
75
+ - Added Project Acceptance Policy for web/container projects: build alone is not enough; dev server, browser page, error overlay, console, container build, and git hygiene must be checked when relevant.
76
+ - Added Failed Tool Calls Policy: failed commands must be reported and classified as critical or non-critical.
77
+
3
78
  ## 0.4.2 — Update Visibility Improvements
4
79
 
5
80
  ### New Features
package/README.md CHANGED
@@ -1,15 +1,16 @@
1
1
  <div align="center">
2
2
  <br/>
3
3
  <h1>DeepSeek Code</h1>
4
- <p><strong>Open-source AI coding agent for developers who want a fast terminal workflow without Copilot pricing.</strong></p>
4
+ <p><strong>A terminal AI coding agent for real repository work, powered by the DeepSeek API.</strong></p>
5
5
 
6
6
  <p>
7
7
  <a href="https://github.com/SerjMihashin/deepseek-code/blob/master/LICENSE">
8
8
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License"/>
9
9
  </a>
10
10
  <img src="https://img.shields.io/badge/TypeScript-5.7-blue" alt="TypeScript"/>
11
- <img src="https://img.shields.io/badge/DeepSeek-API-orange" alt="DeepSeek"/>
12
- <img src="https://img.shields.io/badge/status-alpha-yellow" alt="Status"/>
11
+ <img src="https://img.shields.io/badge/Node-%3E%3D20-green" alt="Node >= 20"/>
12
+ <img src="https://img.shields.io/badge/DeepSeek-API-orange" alt="DeepSeek API"/>
13
+ <img src="https://img.shields.io/badge/status-active_development-yellow" alt="Status"/>
13
14
  </p>
14
15
 
15
16
  <p>
@@ -18,35 +19,20 @@
18
19
  <br/>
19
20
  </div>
20
21
 
21
- ---
22
+ DeepSeek Code (`dsc`) is an open-source CLI/TUI agent that helps you work inside an existing codebase: inspect files, plan changes, edit code, run checks, use Chrome for web flows, and produce an honest execution summary.
22
23
 
23
- ## What's new in 0.4.x
24
+ It is designed for developers who want an agent in the terminal, not a black-box cloud workspace. The project is actively evolving toward a stable, practical coding assistant for large repositories.
24
25
 
25
- - Startup update notice and improved `/changelog` modes.
26
- - `/changelog` command to view release notes inside the CLI.
27
- - `/update-check` command to check the latest npm version.
28
- - Stability and honest reporting improvements.
29
- - `/budget` commands to limit runaway agent loops.
30
- - Git Files section in Execution Summary.
31
- - Interactive `/lang` picker and runtime response language.
32
- - InputBar Home/End and Alt+Enter newline fallback.
26
+ ## Why Developers Use It
33
27
 
34
- See [CHANGELOG.md](./CHANGELOG.md) for details.
35
-
36
- ---
37
-
38
- ## The Short Version
39
-
40
- DeepSeek Code is a terminal-first AI coding agent. It reads your project, edits files, runs commands, reviews code, remembers context, and can automate Chrome when a task needs a browser.
41
-
42
- It is built for developers who want a practical local workflow:
43
-
44
- - **Lower cost**: use DeepSeek API directly instead of a fixed monthly coding subscription.
45
- - **Real project work**: inspect files, patch code, run tests, and continue from previous sessions.
46
- - **Terminal-native**: no IDE lock-in, no heavy desktop app, no cloud workspace requirement.
47
- - **User-controlled automation**: choose read-only planning, manual approvals, auto-edit, or full turbo mode.
48
-
49
- ---
28
+ | Need | What DeepSeek Code provides |
29
+ |---|---|
30
+ | Work from the terminal | TUI with streaming output, tool activity, status, token/cost info, and keyboard navigation |
31
+ | Keep control | Plan, Default, Auto-Edit, and Turbo approval modes |
32
+ | Use real project context | Reads/searches repository files, edits focused ranges, runs build/test commands |
33
+ | Debug web projects | Chrome automation for pages, forms, console, network state, and screenshots |
34
+ | Avoid hidden failures | Execution Summary reports tool calls, changed files, failed commands, and verification gaps |
35
+ | Keep costs flexible | Uses your own DeepSeek API key instead of a fixed coding subscription |
50
36
 
51
37
  ## Install
52
38
 
@@ -54,42 +40,36 @@ It is built for developers who want a practical local workflow:
54
40
  npm install -g @serjm/deepseek-code
55
41
  ```
56
42
 
57
- Run it:
43
+ Run in a project:
58
44
 
59
45
  ```bash
60
- deepseek-code
46
+ dsc
61
47
  ```
62
48
 
63
- Or run without installing:
49
+ One-shot and headless runs:
64
50
 
65
51
  ```bash
52
+ dsc -p "Find why tests are failing and propose a fix"
53
+ dsc --headless --json -p "Review this repository for risky changes"
66
54
  npx @serjm/deepseek-code
67
55
  ```
68
56
 
69
- Short alias:
57
+ Requires Node.js 20+ and a DeepSeek API key.
70
58
 
71
- ```bash
72
- dsc
73
- dsc -p "Find the bug in auth.ts and patch it"
74
- dsc --headless --json -p "Review this repository"
75
- ```
76
-
77
- ---
78
-
79
- ## Why Use It
59
+ ## What Is New In 0.4.4
80
60
 
81
- | Need | DeepSeek Code |
82
- |---|---|
83
- | Fix code from the terminal | Reads files, proposes patches, and runs verification commands |
84
- | Keep costs predictable | Uses your DeepSeek API key directly |
85
- | Work inside existing repos | Runs where your code already lives |
86
- | Avoid blind automation | Approval modes keep edits and shell commands under your control |
87
- | Debug browser flows | Built-in Chrome automation for pages, forms, console, screenshots, and network state |
88
- | Keep context over time | Project memory and resumable sessions help with longer work |
61
+ - More stable TUI streaming with batched output and live follow-up input.
62
+ - Slash-command editing fixes for `/model`, Backspace/Delete, Esc, and Ctrl+U.
63
+ - Clear `VIEW:FOLLOW` / `VIEW:PAUSED` status for reading long sessions.
64
+ - Failed tool call details in Execution Summary.
65
+ - Explicit stream timeout errors instead of silent aborts.
66
+ - Windows-friendly `grep_search` fallback when `rg` is unavailable.
67
+ - Windows shell policy and guardrails for Unix-only commands such as `head`.
68
+ - Explicit `/budget normal` and `/budget large` modes; default interactive budget remains off.
89
69
 
90
- ---
70
+ See [CHANGELOG.md](./CHANGELOG.md) for the full release history.
91
71
 
92
- ## What It Can Do
72
+ ## Typical Workflow
93
73
 
94
74
  ```text
95
75
  You: "Find why checkout fails after login and fix it"
@@ -98,44 +78,45 @@ DeepSeek Code:
98
78
  1. Searches the relevant files
99
79
  2. Reads the auth and checkout code
100
80
  3. Applies a focused patch
101
- 4. Runs tests or the command you approve
102
- 5. Summarizes the change
81
+ 4. Runs approved checks
82
+ 5. Reports what changed, what passed, what failed, and what was not checked
103
83
  ```
104
84
 
105
- Core features:
106
-
107
- - **Autonomous coding agent**: plans, reads, edits, searches, and runs commands.
108
- - **Full terminal UI**: streaming output, tool activity, status, costs, and context usage.
109
- - **Approval modes**: Plan, Default, Auto-Edit, and Turbo.
110
- - **Browser automation**: open pages, click, fill forms, inspect console/network, take screenshots.
111
- - **MCP support**: connect external tool servers for custom workflows.
112
- - **Persistent memory**: save project facts with `/remember`.
113
- - **AI code review**: use `/review` to inspect bugs, risks, and security issues.
114
- - **Headless mode**: CI-friendly JSON output with `--headless --json`.
85
+ ## Core Features
115
86
 
116
- ---
87
+ - **Agent loop**: plan, inspect, edit, verify, and continue.
88
+ - **TUI**: live status, streaming response, tool activity, scroll/follow indicators, and keyboard controls.
89
+ - **Approval modes**: read-only planning, manual confirmation, auto-edit, or trusted full automation.
90
+ - **Browser tools**: Chrome-based checks for rendered UI, console errors, forms, screenshots, and network behavior.
91
+ - **Session continuity**: continue previous work and save project facts with `/remember`.
92
+ - **Review mode**: use `/review` for bug, regression, and security-oriented code review.
93
+ - **Headless mode**: scriptable output via `--headless --json`.
94
+ - **Budget modes**: `/budget audit`, `/budget normal`, `/budget large`, `/budget off`.
117
95
 
118
- ## Commands
96
+ ## Useful Commands
119
97
 
120
98
  | Command | Description |
121
99
  |---|---|
122
- | `/help` | Show available commands |
123
- | `/setup` | Configure API key, language, and approval mode |
100
+ | `/help` | Show commands and keyboard controls |
101
+ | `/setup` | Configure API key, language, model, and approval mode |
102
+ | `/model` | Switch model or open the model picker |
103
+ | `/lang` | Switch response language |
124
104
  | `/remember <text>` | Save project context |
125
105
  | `/memory` | Show saved memories |
126
106
  | `/review` | Run AI code review |
127
- | `/checkpoint` | Save a git checkpoint |
128
- | `/restore` | Restore a checkpoint |
129
- | `/theme` | Switch terminal theme |
130
- | `/lang` | Switch language |
131
- | `/git <cmd>` | Run git operations |
132
- | `/loop <interval> <task>` | Schedule recurring work |
133
- | `/sandbox` | Run commands in Docker isolation |
134
- | `/mcp` | Manage MCP servers |
135
- | `/stats` | Show session statistics |
136
- | `/clear` | Clear chat |
137
-
138
- ---
107
+ | `/checkpoint` / `/restore` | Save or restore git checkpoints |
108
+ | `/budget status\|off\|audit\|normal\|large` | Control loop limits explicitly |
109
+ | `/chrome` | Manage Chrome mode |
110
+ | `/browser-test` | Run browser checks |
111
+ | `/stats` | Show tokens, cost, and session statistics |
112
+ | `/changelog` | Read release notes inside the CLI |
113
+
114
+ Keyboard highlights:
115
+
116
+ - `PageUp` / `PageDown`: read chat history.
117
+ - `End`: jump back to the latest message.
118
+ - `Shift+Enter` / `Alt+Enter`: insert a newline.
119
+ - Mouse wheel is not captured in the TUI yet; this is intentional while terminal mouse support is being hardened.
139
120
 
140
121
  ## Configuration
141
122
 
@@ -157,20 +138,22 @@ Or create `.deepseek-code/settings.json` in your project:
157
138
  }
158
139
  ```
159
140
 
160
- ---
161
-
162
141
  ## Safety Model
163
142
 
164
- DeepSeek Code is designed around explicit control:
143
+ DeepSeek Code is built around explicit control:
165
144
 
166
145
  - **Plan**: read-only analysis.
167
- - **Default**: asks before edits and commands.
168
- - **Auto-Edit**: file edits are automatic, shell commands still need approval.
146
+ - **Default**: asks before edits and shell commands.
147
+ - **Auto-Edit**: edits files automatically; shell commands still need confirmation.
169
148
  - **Turbo**: full automation for trusted local work.
170
149
 
171
- It also supports command sanitization, file size limits, `.deepseekignore`, checkpoints, and optional Docker sandboxing.
150
+ The agent also uses path checks, dangerous command blocking, file size limits, `.deepseekignore`, checkpoints, optional sandboxing, Windows shell guidance, and honest final reporting.
151
+
152
+ ## Project Status
172
153
 
173
- ---
154
+ DeepSeek Code is in active development. The current focus is stability for real development work: large repositories, transparent tool activity, reliable input, honest summaries, Windows-first ergonomics, and release-quality packaging.
155
+
156
+ Planned work includes deeper TUI hardening, safer mouse-wheel research, larger project exams, and stronger acceptance workflows for browser-based projects.
174
157
 
175
158
  ## Development
176
159
 
@@ -178,32 +161,13 @@ It also supports command sanitization, file size limits, `.deepseekignore`, chec
178
161
  git clone https://github.com/SerjMihashin/deepseek-code.git
179
162
  cd deepseek-code
180
163
  npm install
164
+ npm run lint
165
+ npm run typecheck
181
166
  npm run build
182
167
  npm test
183
- ```
184
-
185
- Package check:
186
-
187
- ```bash
188
168
  npm pack --dry-run
189
- npm publish --dry-run --access public
190
- ```
191
-
192
- Publish to npm:
193
-
194
- ```bash
195
- npm login
196
- npm publish --access public
197
- ```
198
-
199
- If npm asks for two-factor authentication:
200
-
201
- ```bash
202
- npm publish --access public --otp=123456
203
169
  ```
204
170
 
205
- ---
206
-
207
171
  ## License
208
172
 
209
173
  Apache-2.0 © 2026 Serj Mikhashin
package/README.ru.md CHANGED
@@ -1,15 +1,16 @@
1
1
  <div align="center">
2
2
  <br/>
3
3
  <h1>DeepSeek Code</h1>
4
- <p><strong>Open-source AI-агент для разработки в терминале: дешевле подписок, ближе к вашему коду, без привязки к IDE.</strong></p>
4
+ <p><strong>AI coding agent в терминале для реальной работы с проектами, на базе DeepSeek API.</strong></p>
5
5
 
6
6
  <p>
7
7
  <a href="https://github.com/SerjMihashin/deepseek-code/blob/master/LICENSE">
8
8
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License"/>
9
9
  </a>
10
10
  <img src="https://img.shields.io/badge/TypeScript-5.7-blue" alt="TypeScript"/>
11
- <img src="https://img.shields.io/badge/DeepSeek-API-orange" alt="DeepSeek"/>
12
- <img src="https://img.shields.io/badge/status-alpha-yellow" alt="Status"/>
11
+ <img src="https://img.shields.io/badge/Node-%3E%3D20-green" alt="Node >= 20"/>
12
+ <img src="https://img.shields.io/badge/DeepSeek-API-orange" alt="DeepSeek API"/>
13
+ <img src="https://img.shields.io/badge/status-active_development-yellow" alt="Status"/>
13
14
  </p>
14
15
 
15
16
  <p>
@@ -18,35 +19,20 @@
18
19
  <br/>
19
20
  </div>
20
21
 
21
- ---
22
+ DeepSeek Code (`dsc`) — это open-source CLI/TUI агент для разработки. Он запускается прямо в вашем репозитории, читает код, планирует изменения, правит файлы, запускает проверки, умеет работать с Chrome для web-проектов и честно показывает итог выполнения.
22
23
 
23
- ## Что нового в 0.4.x
24
+ Проект активно развивается в сторону стабильного coding agent для больших кодовых баз: прозрачный live status, надежный ввод, понятные отчеты, Windows-first ergonomics и безопасная подготовка релизов.
24
25
 
25
- - Уведомление об обновлениях при запуске и улучшенные режимы `/changelog`.
26
- - `/changelog` показывает список изменений прямо в CLI.
27
- - `/update-check` проверяет последнюю версию в npm.
28
- - Улучшена стабильность и честность отчётов.
29
- - `/budget` команды ограничивают runaway tool/API calls.
30
- - Execution Summary показывает Files: changed/untracked/dirty before run.
31
- - `/lang` picker и ответы на выбранном языке.
32
- - InputBar: Home/End и Alt+Enter для новой строки.
33
-
34
- Подробнее в [CHANGELOG.md](./CHANGELOG.md).
35
-
36
- ---
37
-
38
- ## Коротко
39
-
40
- DeepSeek Code — это AI-агент для разработки прямо в терминале. Он читает проект, редактирует файлы, запускает команды, делает code review, запоминает контекст и умеет управлять Chrome, когда задача выходит за пределы кода.
41
-
42
- Он подходит, если нужен практичный локальный workflow:
43
-
44
- - **Ниже стоимость**: используется ваш DeepSeek API key, без дорогой фиксированной подписки.
45
- - **Реальная работа с проектом**: поиск по коду, патчи, тесты, продолжение прошлых сессий.
46
- - **Терминальный подход**: без привязки к конкретной IDE и без отдельного облачного workspace.
47
- - **Контроль над автоматизацией**: режимы от read-only анализа до полного turbo.
26
+ ## Зачем он нужен
48
27
 
49
- ---
28
+ | Задача | Что дает DeepSeek Code |
29
+ |---|---|
30
+ | Работать из терминала | TUI со streaming output, tool activity, статусом, токенами/стоимостью и навигацией |
31
+ | Не отдавать все на автопилот | Режимы Plan, Default, Auto-Edit и Turbo |
32
+ | Разбираться в реальном проекте | Поиск по репозиторию, чтение файлов, точечные правки, запуск build/test |
33
+ | Проверять web-флоу | Chrome automation: страницы, формы, console, network, screenshots |
34
+ | Видеть правду в отчете | Execution Summary показывает tool calls, измененные файлы, failed commands и gaps |
35
+ | Контролировать стоимость | Используется ваш DeepSeek API key, без фиксированной подписки на coding IDE |
50
36
 
51
37
  ## Установка
52
38
 
@@ -54,88 +40,84 @@ DeepSeek Code — это AI-агент для разработки прямо в
54
40
  npm install -g @serjm/deepseek-code
55
41
  ```
56
42
 
57
- Запуск:
43
+ Запуск в проекте:
58
44
 
59
45
  ```bash
60
- deepseek-code
46
+ dsc
61
47
  ```
62
48
 
63
- Запуск без установки:
49
+ Разовые и headless-запуски:
64
50
 
65
51
  ```bash
52
+ dsc -p "Найди, почему падают тесты, и предложи фикс"
53
+ dsc --headless --json -p "Проведи ревью этого репозитория"
66
54
  npx @serjm/deepseek-code
67
55
  ```
68
56
 
69
- Короткий алиас:
57
+ Требуется Node.js 20+ и DeepSeek API key.
70
58
 
71
- ```bash
72
- dsc
73
- dsc -p "Найди баг в auth.ts и исправь"
74
- dsc --headless --json -p "Сделай review репозитория"
75
- ```
59
+ ## Что нового в 0.4.4
76
60
 
77
- ---
61
+ - Более стабильный streaming в TUI: chunks батчатся, меньше лишних rerender.
62
+ - Live follow-up: можно писать агенту во время выполнения задачи.
63
+ - Исправлено редактирование slash-команд: `/model`, Backspace/Delete, Esc, Ctrl+U.
64
+ - Явный статус чтения истории: `VIEW:FOLLOW` и `VIEW:PAUSED`.
65
+ - Execution Summary показывает детали failed tool calls.
66
+ - Stream timeout теперь виден как ошибка, а не выглядит как молчаливый обрыв.
67
+ - `grep_search` работает на Windows даже без установленного `rg`.
68
+ - Windows shell policy: меньше падений из-за `head`, `sed`, `cat` и Unix-only команд.
69
+ - Добавлены `/budget normal` и `/budget large`; по умолчанию interactive budget остается выключенным.
78
70
 
79
- ## Зачем он нужен
71
+ Полная история изменений: [CHANGELOG.md](./CHANGELOG.md).
80
72
 
81
- | Задача | Что делает DeepSeek Code |
82
- |---|---|
83
- | Исправить код из терминала | Читает файлы, предлагает патчи и запускает проверочные команды |
84
- | Держать расходы под контролем | Работает напрямую через ваш DeepSeek API key |
85
- | Работать в существующих репозиториях | Запускается там, где уже лежит код |
86
- | Не отдавать все на автопилот | Режимы подтверждений контролируют правки и shell-команды |
87
- | Отлаживать browser flow | Встроенный Chrome: страницы, формы, консоль, network, скриншоты |
88
- | Не терять контекст | Память проекта и продолжение сессий помогают на длинных задачах |
89
-
90
- ---
91
-
92
- ## Что он умеет
73
+ ## Как выглядит рабочий сценарий
93
74
 
94
75
  ```text
95
76
  Вы: "Найди, почему checkout падает после логина, и исправь"
96
77
 
97
78
  DeepSeek Code:
98
- 1. Ищет релевантные файлы
79
+ 1. Находит релевантные файлы
99
80
  2. Читает auth и checkout код
100
81
  3. Вносит точечный патч
101
- 4. Запускает тесты или команду после подтверждения
102
- 5. Кратко объясняет результат
82
+ 4. Запускает подтвержденные проверки
83
+ 5. Честно пишет, что изменено, что прошло, что упало и что не проверялось
103
84
  ```
104
85
 
105
- Основные возможности:
86
+ ## Возможности
106
87
 
107
- - **Автономный coding agent**: планирует, читает, редактирует, ищет и запускает команды.
108
- - **Полноценный terminal UI**: streaming output, цепочка инструментов, статус, стоимость и контекст.
109
- - **Режимы подтверждений**: Plan, Default, Auto-Edit и Turbo.
110
- - **Автоматизация браузера**: открыть страницу, кликнуть, заполнить форму, проверить console/network, сделать screenshot.
111
- - **MCP support**: подключение внешних tool-серверов для своих workflows.
112
- - **Постоянная память**: сохраняйте факты проекта через `/remember`.
113
- - **AI code review**: команда `/review` ищет баги, риски и проблемы безопасности.
114
- - **Headless mode**: JSON-вывод для CI и скриптов через `--headless --json`.
88
+ - **Agent loop**: планирование, чтение, правки, проверки и продолжение диалога.
89
+ - **TUI**: live status, streaming, tool activity, scroll/follow indicators и keyboard controls.
90
+ - **Режимы контроля**: read-only plan, ручные подтверждения, auto-edit или turbo для доверенной локальной работы.
91
+ - **Browser tools**: Chrome-проверки для UI, console errors, forms, screenshots и network behavior.
92
+ - **Память и сессии**: продолжение работы и сохранение фактов проекта через `/remember`.
93
+ - **Code review**: `/review` для поиска багов, регрессий, рисков и security-проблем.
94
+ - **Headless mode**: JSON-вывод для скриптов и CI через `--headless --json`.
95
+ - **Budget modes**: `/budget audit`, `/budget normal`, `/budget large`, `/budget off`.
115
96
 
116
- ---
117
-
118
- ## Команды
97
+ ## Основные команды
119
98
 
120
99
  | Команда | Описание |
121
100
  |---|---|
122
- | `/help` | Показать команды |
123
- | `/setup` | Настроить API key, язык и режим подтверждений |
124
- | `/remember <text>` | Сохранить контекст проекта |
101
+ | `/help` | Показать команды и горячие клавиши |
102
+ | `/setup` | Настроить API key, язык, модель и режим подтверждений |
103
+ | `/model` | Сменить модель или открыть выбор модели |
104
+ | `/lang` | Сменить язык ответов |
105
+ | `/remember <text>` | Сохранить факт о проекте |
125
106
  | `/memory` | Показать сохраненную память |
126
107
  | `/review` | Запустить AI code review |
127
- | `/checkpoint` | Сохранить git checkpoint |
128
- | `/restore` | Восстановить checkpoint |
129
- | `/theme` | Сменить тему |
130
- | `/lang` | Сменить язык |
131
- | `/git <cmd>` | Git-операции |
132
- | `/loop <interval> <task>` | Запланировать повторяющуюся задачу |
133
- | `/sandbox` | Запуск через Docker isolation |
134
- | `/mcp` | Управление MCP-серверами |
135
- | `/stats` | Статистика сессии |
136
- | `/clear` | Очистить чат |
137
-
138
- ---
108
+ | `/checkpoint` / `/restore` | Сохранить или восстановить git checkpoint |
109
+ | `/budget status\|off\|audit\|normal\|large` | Явно управлять лимитами agent loop |
110
+ | `/chrome` | Управление Chrome mode |
111
+ | `/browser-test` | Запустить browser checks |
112
+ | `/stats` | Показать токены, стоимость и статистику сессии |
113
+ | `/changelog` | Читать release notes внутри CLI |
114
+
115
+ Горячие клавиши:
116
+
117
+ - `PageUp` / `PageDown`: читать историю.
118
+ - `End`: вернуться к последнему сообщению.
119
+ - `Shift+Enter` / `Alt+Enter`: новая строка во вводе.
120
+ - Mouse wheel пока не захватывается в TUI намеренно: поддержка мыши будет включаться только после отдельного безопасного исследования.
139
121
 
140
122
  ## Конфигурация
141
123
 
@@ -157,20 +139,22 @@ export DEEPSEEK_MODEL="deepseek-chat"
157
139
  }
158
140
  ```
159
141
 
160
- ---
161
-
162
142
  ## Контроль и безопасность
163
143
 
164
144
  DeepSeek Code построен вокруг явного контроля:
165
145
 
166
146
  - **Plan**: только read-only анализ.
167
- - **Default**: спрашивает перед правками и командами.
147
+ - **Default**: спрашивает перед правками и shell-командами.
168
148
  - **Auto-Edit**: правки файлов автоматические, shell-команды требуют подтверждения.
169
149
  - **Turbo**: полная автоматизация для доверенной локальной работы.
170
150
 
171
- Также есть санитизация команд, лимиты размера файлов, `.deepseekignore`, checkpoints и опциональный Docker sandbox.
151
+ Дополнительно есть path checks, блокировка опасных команд, лимиты размера файлов, `.deepseekignore`, checkpoints, опциональный sandbox, Windows shell guidance и честный финальный отчет.
152
+
153
+ ## Статус проекта
172
154
 
173
- ---
155
+ Проект находится в активной разработке. Основной фокус сейчас — довести CLI до состояния, где им реально удобно работать над большими проектами: прозрачный activity/status, стабильный TUI, надежный ввод, честные отчеты, отсутствие мусорных файлов и предсказуемый release workflow.
156
+
157
+ В планах: дальнейшая стабилизация TUI, безопасное исследование mouse wheel, large-project exams и более строгие acceptance-проверки для web-проектов.
174
158
 
175
159
  ## Разработка
176
160
 
@@ -178,32 +162,13 @@ DeepSeek Code построен вокруг явного контроля:
178
162
  git clone https://github.com/SerjMihashin/deepseek-code.git
179
163
  cd deepseek-code
180
164
  npm install
165
+ npm run lint
166
+ npm run typecheck
181
167
  npm run build
182
168
  npm test
183
- ```
184
-
185
- Проверить пакет:
186
-
187
- ```bash
188
169
  npm pack --dry-run
189
- npm publish --dry-run --access public
190
170
  ```
191
171
 
192
- Опубликовать в npm:
193
-
194
- ```bash
195
- npm login
196
- npm publish --access public
197
- ```
198
-
199
- Если npm просит двухфакторный код:
200
-
201
- ```bash
202
- npm publish --access public --otp=123456
203
- ```
204
-
205
- ---
206
-
207
172
  ## Лицензия
208
173
 
209
174
  Apache-2.0 © 2026 Serj Mikhashin
@@ -49,6 +49,9 @@ export interface ToolCallMessage {
49
49
  content: string | null;
50
50
  tool_calls: NonNullable<ChatMessage['tool_calls']>;
51
51
  }
52
+ export declare class StreamTimeoutError extends Error {
53
+ constructor(timeoutMs: number);
54
+ }
52
55
  export declare class DeepSeekAPI {
53
56
  private client;
54
57
  private model;
@@ -74,4 +77,10 @@ export declare class DeepSeekAPI {
74
77
  */
75
78
  getEmbedding(text: string): Promise<number[]>;
76
79
  }
80
+ /**
81
+ * Convert a string that contains data: URLs into ContentBlock[] for vision models.
82
+ * If no data: URLs found, returns the original string.
83
+ * Used to upgrade read_file output (images/PDF as base64) into multimodal input.
84
+ */
85
+ export declare function dataUrlsToContentBlocks(text: string): string | ContentBlock[];
77
86
  //# sourceMappingURL=index.d.ts.map