dscli-agent 0.4.0__tar.gz → 0.6.0__tar.gz
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.
- {dscli_agent-0.4.0/dscli_agent.egg-info → dscli_agent-0.6.0}/PKG-INFO +66 -32
- dscli_agent-0.4.0/PKG-INFO → dscli_agent-0.6.0/README.md +569 -565
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/__init__.py +1 -1
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/agent.py +174 -42
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/browser.py +1780 -1697
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/cli.py +71 -6
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/compaction.py +11 -5
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/config.py +5 -2
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/display.py +12 -5
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/prompts.py +81 -30
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/protocol.py +36 -2
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/scraper.py +39 -2
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/tokens.py +2 -2
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/tools.py +111 -18
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/tui.py +1312 -1057
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/ui.py +0 -17
- dscli_agent-0.4.0/README.md → dscli_agent-0.6.0/dscli_agent.egg-info/PKG-INFO +599 -535
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/pyproject.toml +3 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_agent.py +1355 -1125
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_browser.py +1062 -833
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_cli.py +88 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_compaction.py +329 -302
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_display.py +438 -398
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_protocol.py +55 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_tokens.py +15 -8
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_tools.py +64 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_tui.py +806 -670
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/LICENSE +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/__main__.py +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/attachments.py +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/branding.py +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli/providers.py +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli_agent.egg-info/SOURCES.txt +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli_agent.egg-info/dependency_links.txt +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli_agent.egg-info/entry_points.txt +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli_agent.egg-info/requires.txt +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/dscli_agent.egg-info/top_level.txt +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/setup.cfg +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_branding.py +0 -0
- {dscli_agent-0.4.0 → dscli_agent-0.6.0}/tests/test_config.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dscli-agent
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: A local coding agent that uses DeepSeek web chat as its model
|
|
5
5
|
Author: Anish
|
|
6
6
|
License-Expression: MIT
|
|
@@ -106,11 +106,33 @@ dscli
|
|
|
106
106
|
|
|
107
107
|
dscli shows an inline terminal UI inspired by Claude Code: a cleared screen and gradient
|
|
108
108
|
ASCII wordmark on launch, an animated spinner with rotating status verbs, a smoothly
|
|
109
|
-
revealed streaming answer,
|
|
110
|
-
|
|
109
|
+
revealed streaming answer, tree-style tool cards, approval prompts that name the action
|
|
110
|
+
and path without printing file contents, and the final answer rendered as Markdown.
|
|
111
|
+
|
|
112
|
+
Each tool call renders as a card with a short result summary and, when there is more to
|
|
113
|
+
see, a preview of the output:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
▪ Read(dscli/config.py · lines 1-40)
|
|
117
|
+
└ Read lines 1-40 of 120 (Ctrl+O to expand)
|
|
118
|
+
|
|
119
|
+
▪ Edit(dscli/config.py)
|
|
120
|
+
└ Accepted config.py (Ctrl+O to expand)
|
|
121
|
+
|
|
122
|
+
▪ Bash(grep -n "read_file" dscli/prompts.py)
|
|
123
|
+
└ 121:- Do NOT use read_file, write_file, apply_patch, list_files...
|
|
124
|
+
243: non-empty plan. Start by investigating with read_file and list_files
|
|
125
|
+
… +2 lines (Ctrl+O to expand)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Failed calls keep the `▪` header and show the error under the `└` branch. Long paths are
|
|
129
|
+
shortened in the middle and long commands are trimmed to keep the card on one line.
|
|
130
|
+
Press `Ctrl+O` at the prompt to print the full output of the most recent tool card or
|
|
131
|
+
thinking block.
|
|
111
132
|
Accents use a muted palette that matches the wordmark: sage for success, dusty rose for
|
|
112
|
-
errors, and soft teal for
|
|
113
|
-
|
|
133
|
+
errors, and soft teal for highlights. Markdown answers — streamed, interrupted, and
|
|
134
|
+
final — use the same palette for headings, links, inline code, and fenced code
|
|
135
|
+
highlighting. The same muted colors apply to the plain and non-TTY output.
|
|
114
136
|
Output stays in normal scrollback after startup; dscli does not take over the full
|
|
115
137
|
screen, and the welcome card shows the workspace, model, active modes, and shortcuts.
|
|
116
138
|
Plans
|
|
@@ -132,12 +154,12 @@ DeepThink is always enabled, and the UI streams the model's reasoning live in a
|
|
|
132
154
|
compact block above the reply:
|
|
133
155
|
|
|
134
156
|
```text
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
157
|
+
Thinking
|
|
158
|
+
│ I should inspect the configuration first.
|
|
159
|
+
│ … +12 rows (Ctrl+O to expand)
|
|
160
|
+
│ charlie line
|
|
161
|
+
│ delta line
|
|
162
|
+
│ echo line
|
|
141
163
|
```
|
|
142
164
|
|
|
143
165
|
The first sentence stays pinned at the top while the newest three wrapped rows
|
|
@@ -147,11 +169,11 @@ it collapses to the same limited view with a `Ctrl+O` hint; press `Ctrl+O` at th
|
|
|
147
169
|
prompt to print the full reasoning block (up to 500 rows) into the transcript.
|
|
148
170
|
The streamed block is TUI-only; `--plain` and `run` do not show it.
|
|
149
171
|
|
|
150
|
-
The prompt footer tracks session
|
|
151
|
-
same progress bar renders below the live Thinking and Responding output:
|
|
172
|
+
The prompt footer tracks the session's context volume against a 1,000,000-token budget,
|
|
173
|
+
and the same progress bar renders below the live Thinking and Responding output:
|
|
152
174
|
|
|
153
175
|
```text
|
|
154
|
-
|
|
176
|
+
context ███████░░░░░ 612.4k / 1.0M · 61%
|
|
155
177
|
```
|
|
156
178
|
|
|
157
179
|
Counts are estimated locally from every prompt sent and reply received (one token per
|
|
@@ -161,7 +183,7 @@ a new chat is opened.
|
|
|
161
183
|
|
|
162
184
|
### Conversation compaction
|
|
163
185
|
|
|
164
|
-
When the
|
|
186
|
+
When the count reaches 1,000,000 tokens, dscli compacts the session instead of
|
|
165
187
|
stopping. Before the next prompt is sent it asks the current chat to write a structured
|
|
166
188
|
compaction summary — an `<analysis>` pass followed by a `<summary>` covering the request,
|
|
167
189
|
technical decisions, files and code, errors and fixes, user messages, pending tasks, and
|
|
@@ -179,9 +201,14 @@ Files are saved under `%APPDATA%\dscli\compactions` on Windows
|
|
|
179
201
|
`~/.config/dscli/compactions` elsewhere) as `compaction-YYYYmmdd-HHMMSS.txt`. The check
|
|
180
202
|
runs before every model turn, so it also works mid-task; the TUI shows a
|
|
181
203
|
`Compacting conversation` spinner while the summary is written, then a
|
|
182
|
-
`⟳ Compacted 1.0M tokens → … · new chat` notice. `/new` clears the recorded
|
|
204
|
+
`⟳ Compacted context at 1.0M tokens → … · new chat` notice. `/new` clears the recorded
|
|
183
205
|
conversation as well.
|
|
184
206
|
|
|
207
|
+
Type `/compact` in `dscli chat` to compact on demand. dscli asks the current chat for the
|
|
208
|
+
summary, writes the compaction file, and starts a new DeepSeek chat; the next message you
|
|
209
|
+
send resumes the compacted conversation there, with the compaction attached. `/compact`
|
|
210
|
+
needs at least one earlier message, and `/new` discards a pending compaction.
|
|
211
|
+
|
|
185
212
|
### Deeplanning mode
|
|
186
213
|
|
|
187
214
|
```powershell
|
|
@@ -208,14 +235,15 @@ every run with `dscli config --set deeplanning=true`, or turn it off for one run
|
|
|
208
235
|
| `Ctrl+C` | While the agent is working: interrupt the current turn, keep the browser session, and return to the prompt. At the prompt: clear the input. |
|
|
209
236
|
| `Ctrl+D` | Exit dscli. |
|
|
210
237
|
| `↑` / `↓` | Browse previous messages. |
|
|
211
|
-
| `Ctrl+O` | Expand the last thinking block in full. |
|
|
238
|
+
| `Ctrl+O` | Expand the last thinking block or tool output in full. |
|
|
212
239
|
|
|
213
240
|
Typing `/` opens an autocomplete menu. History is saved to
|
|
214
241
|
`%APPDATA%\dscli\chat_history` (`~/Library/Application Support/dscli/chat_history` on
|
|
215
242
|
macOS, `~/.config/dscli/chat_history` elsewhere).
|
|
216
243
|
|
|
217
|
-
Slash commands: `/help` lists commands and shortcuts, `/
|
|
218
|
-
conversation
|
|
244
|
+
Slash commands: `/help` lists commands and shortcuts, `/compact` summarizes the
|
|
245
|
+
conversation and continues it in a new chat, `/new` starts a fresh conversation so the
|
|
246
|
+
agent forgets earlier turns, and `/exit` (or `/quit`) closes dscli.
|
|
219
247
|
|
|
220
248
|
If Cloudflare interrupts a headless run, dscli opens the persistent profile in a visible
|
|
221
249
|
Chrome window and resubmits the interrupted prompt. Complete the check in that window.
|
|
@@ -225,8 +253,8 @@ current model turn restarts with the same prompt in a fresh chat, so an answer t
|
|
|
225
253
|
already streaming when the check appeared is fetched again. Set
|
|
226
254
|
`dscli config --set auto_human_check=false` to fail fast instead.
|
|
227
255
|
|
|
228
|
-
When dscli asks to write a file or run a command, it shows the title and
|
|
229
|
-
|
|
256
|
+
When dscli asks to write a file or run a command, it shows the title and, for commands,
|
|
257
|
+
the exact command. File contents and diffs are never printed.
|
|
230
258
|
Answer `y` to approve once, `n` to deny, `a` to approve everything for the rest of the
|
|
231
259
|
session, or `q` to quit.
|
|
232
260
|
|
|
@@ -269,7 +297,7 @@ dscli run --prompt-file task.md -y
|
|
|
269
297
|
dscli run "Review the docs" --no-shell
|
|
270
298
|
```
|
|
271
299
|
|
|
272
|
-
The final answer is printed to stdout. Progress
|
|
300
|
+
The final answer is printed to stdout. Progress and approval prompts go to
|
|
273
301
|
stderr, so `dscli run ... > result.txt` captures only the answer. `run` never uses the
|
|
274
302
|
interactive UI; its output contract is unchanged.
|
|
275
303
|
|
|
@@ -289,7 +317,7 @@ failures and unconfirmed completions are always logged to stderr, including unde
|
|
|
289
317
|
| `--headed` / `--headless` | Show or hide the browser. Headless is the default. |
|
|
290
318
|
| `--search` | Turn DeepSeek's Search mode on for the run (DeepThink is always on). |
|
|
291
319
|
| `--deeplanning` | Require a non-empty `update_plan` before writes or commands (alias: `--deep-planning`). |
|
|
292
|
-
| `--max-steps N` | Maximum model turns (default
|
|
320
|
+
| `--max-steps N` | Maximum model turns (default 20, cap 150). |
|
|
293
321
|
| `--timeout N` | Response timeout per turn in seconds (default 300). |
|
|
294
322
|
| `--verify CMD` | Run CMD automatically after file edits; failures block success. |
|
|
295
323
|
| `--no-verify` | Disable the configured `verify_command` for this run. |
|
|
@@ -357,6 +385,7 @@ creep and unnecessary abstractions, confirm hard-to-reverse actions, reference c
|
|
|
357
385
|
| `write_file` | **Create** a new file. Refuses to overwrite an existing non-empty file. |
|
|
358
386
|
| `apply_patch` | The only way to edit an existing file: exact `search` → `replace`. |
|
|
359
387
|
| `list_files` | Bounded recursive listing. |
|
|
388
|
+
| `search_files` | Search text files for a literal string; returns `path:line` matches. |
|
|
360
389
|
| `delete_file` | Delete one file when explicitly requested (approval required). |
|
|
361
390
|
| `run_command` | Run a command with an approval prompt via PowerShell, cmd.exe, sh, or bash. |
|
|
362
391
|
| `update_plan` | Create or revise the task plan; the task cannot finish while steps are unfinished. |
|
|
@@ -404,8 +433,9 @@ model can modify the files it checks, so review the final diff.
|
|
|
404
433
|
|
|
405
434
|
- Tools are confined to the workspace unless `--allow-outside` is passed.
|
|
406
435
|
- `.git` is never writable through the tools.
|
|
407
|
-
- Every write, patch, delete, and command shows
|
|
408
|
-
`[y]es / [n]o / [a]ll / [q]uit` before changing anything.
|
|
436
|
+
- Every write, patch, delete, and command shows the action and affected path (or the
|
|
437
|
+
exact command) and asks `[y]es / [n]o / [a]ll / [q]uit` before changing anything.
|
|
438
|
+
File contents and diffs are never printed. `-y` skips the prompts.
|
|
409
439
|
- Command execution is enabled by default, but every model-requested command still
|
|
410
440
|
requires approval. The prompt names the interpreter (PowerShell, cmd.exe, sh, or
|
|
411
441
|
bash). `--no-shell` disables model-requested commands for a run.
|
|
@@ -420,7 +450,8 @@ model can modify the files it checks, so review the final diff.
|
|
|
420
450
|
through the browser.
|
|
421
451
|
|
|
422
452
|
This is still an assistant with write access to your files. Use a clean workspace or
|
|
423
|
-
version control, and review
|
|
453
|
+
version control, and review the changes in your VCS after a run; approval prompts show
|
|
454
|
+
only the action and path, not the file contents.
|
|
424
455
|
|
|
425
456
|
## Configuration
|
|
426
457
|
|
|
@@ -439,7 +470,9 @@ Useful keys: `url` (the DeepSeek chat URL; set it only for a custom deployment),
|
|
|
439
470
|
import), `chrome_profile` (empty = Chrome's last-used profile, or a name such as
|
|
440
471
|
`Default` / `Profile 1`), `user_agent` (empty = derive a normal Chrome UA from the
|
|
441
472
|
installed browser), `response_timeout_sec`, `first_response_timeout_sec`,
|
|
442
|
-
`stable_seconds`, `fallback_stable_seconds`, `
|
|
473
|
+
`stable_seconds`, `fallback_stable_seconds`, `activity_settle_seconds` (how long the
|
|
474
|
+
page must stay free of DOM mutations before a reply counts as finished; default 1.5),
|
|
475
|
+
`auto_human_check` (true = open a visible
|
|
443
476
|
window to solve a verification check; false = fail fast), `max_steps`, `max_tool_calls`,
|
|
444
477
|
`max_read_chars`, `max_attachment_mb`, `search`, `deeplanning`, `shell_enabled`
|
|
445
478
|
(default true; every command still requires approval), `allow_outside`,
|
|
@@ -502,10 +535,11 @@ profile.
|
|
|
502
535
|
may exceed the chat's limit, or the selector may have changed. Run `doctor` and check
|
|
503
536
|
the reported counts.
|
|
504
537
|
|
|
505
|
-
**A response is cut off around 12 s after the last text change.**
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
538
|
+
**A response is cut off around 12 s after the last text change.** dscli normally waits
|
|
539
|
+
for the reply text to stabilize while the page itself stops changing DOM nodes and
|
|
540
|
+
text (`activity_settle_seconds`, default 1.5 s). If the page keeps mutating, the
|
|
541
|
+
fallback detector returns the reply after `fallback_stable_seconds` of text stability.
|
|
542
|
+
Increase `fallback_stable_seconds` if replies are still streaming at that point.
|
|
509
543
|
|
|
510
544
|
**Chrome will not launch.** Set `"channel": ""` in the config to use Playwright's
|
|
511
545
|
Chromium, after running `python -m playwright install chromium`.
|
|
@@ -522,7 +556,7 @@ Debug screenshots and unparsed replies are written to `%APPDATA%\dscli\debug`.
|
|
|
522
556
|
- Streaming is approximated by polling the DOM, not by tokens from the model. The
|
|
523
557
|
interactive chat streams a final answer as the page updates only after it declares
|
|
524
558
|
`complete: true`; tool calls still wait for the complete, validated JSON envelope.
|
|
525
|
-
The
|
|
559
|
+
The context bar is likewise a local estimate of sent and received text, not usage
|
|
526
560
|
reported by DeepSeek.
|
|
527
561
|
- Interrupting with Ctrl+C clicks DeepSeek's labelled stop button when dscli can find
|
|
528
562
|
it. If the page does not expose one, generation may continue in the web chat; the
|