zames_pro 2.15.5 → 2.17.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 -1
- package/dist/agent-loop.js +5 -1
- package/dist/browser.js +600 -17
- package/dist/commands.js +1 -0
- package/dist/config-menu.js +4 -0
- package/dist/config.js +15 -1
- package/dist/i18n.js +38 -1
- package/dist/index.js +53 -4
- package/dist/input.js +51 -9
- package/dist/net-capture.js +32 -4
- package/dist/spinner.js +39 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,42 @@ directory, reads and edits files, runs commands, and commits to git.
|
|
|
9
9
|
## Requirements
|
|
10
10
|
|
|
11
11
|
- Node.js >= 18
|
|
12
|
-
- A DeepSeek account
|
|
12
|
+
- A DeepSeek account. On first launch zames asks for your DeepSeek
|
|
13
|
+
login/password in the terminal (and stores them in `~/.zames/config.json`
|
|
14
|
+
after a successful sign-in, so a later logout is handled automatically
|
|
15
|
+
without asking you again). You can also sign in manually in the browser
|
|
16
|
+
window when the browser is headed.
|
|
17
|
+
|
|
18
|
+
## Signing in
|
|
19
|
+
|
|
20
|
+
The browser runs **headless by default**. When DeepSeek requires a sign-in,
|
|
21
|
+
zames:
|
|
22
|
+
|
|
23
|
+
1. reuses the session stored in the persistent profile (`~/.zames/profile`)
|
|
24
|
+
if it is still valid;
|
|
25
|
+
2. otherwise signs in automatically with the saved credentials
|
|
26
|
+
(`browser.auth.username` / `browser.auth.password`);
|
|
27
|
+
3. otherwise asks you for the login/password in the terminal (in a TTY) and,
|
|
28
|
+
after a successful sign-in, remembers them for next time;
|
|
29
|
+
4. otherwise falls back to a manual sign-in hint.
|
|
30
|
+
|
|
31
|
+
To sign in by hand (for example, if DeepSeek shows a captcha), run with a
|
|
32
|
+
visible window:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
zames --headed
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The `--headless` flag (the default) and `headless: true` in the config keep
|
|
39
|
+
the browser without a window; `--headed` / `headless: false` show it.
|
|
40
|
+
|
|
41
|
+
Headless works out of the box: a headless Chrome normally advertises a
|
|
42
|
+
`HeadlessChrome/...` User-Agent that DeepSeek's CDN blocks with a 403, so
|
|
43
|
+
zames strips that marker before loading the page (keeping the real engine
|
|
44
|
+
version). You do not need `--headed` just to log in.
|
|
45
|
+
|
|
46
|
+
Credentials and toggles can also be edited from `/config`
|
|
47
|
+
(`browser.auth.username`, `browser.auth.password`, `browser.auth.saveSession`).
|
|
13
48
|
|
|
14
49
|
## Installation
|
|
15
50
|
|
|
@@ -71,6 +106,7 @@ zames --new-chat
|
|
|
71
106
|
zames --resend-prompt
|
|
72
107
|
zames --dir <path>
|
|
73
108
|
zames --headless
|
|
109
|
+
zames --headed
|
|
74
110
|
zames --debug
|
|
75
111
|
zames --version
|
|
76
112
|
zames --help
|
|
@@ -206,6 +242,8 @@ Examples:
|
|
|
206
242
|
```
|
|
207
243
|
/config set maxIterations 20
|
|
208
244
|
/config set confirmation.bash false
|
|
245
|
+
/config set browser.deepThinking true # DeepSeek Deep thinking (slow; reasoning is hidden)
|
|
246
|
+
/config set browser.webSearch false # DeepSeek Smart web search
|
|
209
247
|
/config lang en
|
|
210
248
|
```
|
|
211
249
|
|
package/dist/agent-loop.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getGitContext, formatGitContext } from './gitTools.js';
|
|
|
4
4
|
import { parseXmlToolCalls } from './xml-toolcall.js';
|
|
5
5
|
import { translate } from './i18n.js';
|
|
6
6
|
import { normText } from './browser.js';
|
|
7
|
-
export async function runAgentLoop({ browser, tools, task, workdir, maxIterations = 0, freshChat = false, sendSystemPrompt = false, transcript = null, attachments = [], onThinking = () => { }, onAssistantThought = () => { }, onToolCall = () => { }, onToolResult = () => { }, onAssistantMessage = () => { }, onChatReady = () => { }, onWarning = () => { }, debugLog = false, locale = 'ru', }) {
|
|
7
|
+
export async function runAgentLoop({ browser, tools, task, workdir, maxIterations = 0, freshChat = false, sendSystemPrompt = false, transcript = null, attachments = [], onThinking = () => { }, onSendPause = () => { }, onAssistantThought = () => { }, onToolCall = () => { }, onToolResult = () => { }, onAssistantMessage = () => { }, onChatReady = () => { }, onWarning = () => { }, debugLog = false, locale = 'ru', }) {
|
|
8
8
|
// UI callbacks must NEVER break the agent loop. A rendering error (a huge
|
|
9
9
|
// tool result, a broken markdown frame, a closed terminal) used to throw
|
|
10
10
|
// out of the loop right after a tool call — the session looked "stopped
|
|
@@ -26,6 +26,10 @@ export async function runAgentLoop({ browser, tools, task, workdir, maxIteration
|
|
|
26
26
|
// Previously safeThinking() fired before browser.ask(), so the spinner ran
|
|
27
27
|
// through the whole throttle pause / chat-open phase with nothing in flight.
|
|
28
28
|
browser.onSendStart = safeThinking;
|
|
29
|
+
// Animate the send-interval pause too: the browser reports the remaining
|
|
30
|
+
// seconds, the UI shows an animated status instead of a frozen line.
|
|
31
|
+
const safeSendPause = safe(onSendPause);
|
|
32
|
+
browser.onSendPause = safeSendPause;
|
|
29
33
|
const safeAssistantThought = safe(onAssistantThought);
|
|
30
34
|
const safeToolCall = safe(onToolCall);
|
|
31
35
|
const safeToolResult = safe(onToolResult);
|