zames_pro 2.89.0 → 2.90.1

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 (49) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +32 -585
  3. package/dist/agent-loop.js +47 -4
  4. package/dist/ask-retry.js +49 -0
  5. package/dist/ask-state.js +80 -0
  6. package/dist/browser-base.js +69 -0
  7. package/dist/browser.js +170 -41
  8. package/dist/command-registry.js +58 -0
  9. package/dist/commands.js +25 -2
  10. package/dist/completion-check.js +77 -0
  11. package/dist/config-schema.js +8 -0
  12. package/dist/config.js +14 -0
  13. package/dist/dev-commands.js +27 -0
  14. package/dist/dev-watch.js +96 -0
  15. package/dist/first-run.js +80 -0
  16. package/dist/glm-browser.js +133 -32
  17. package/dist/i18n/common.js +6 -3
  18. package/dist/i18n/config.js +16 -0
  19. package/dist/i18n/wizard.js +25 -0
  20. package/dist/i18n.js +6 -1
  21. package/dist/index.js +1289 -919
  22. package/dist/info-commands.js +61 -0
  23. package/dist/input/layout.js +38 -1
  24. package/dist/input.js +2 -2
  25. package/dist/password-store.js +48 -0
  26. package/dist/prompt-budget.js +23 -0
  27. package/dist/provider-errors.js +53 -0
  28. package/dist/provider-fallback.js +46 -0
  29. package/dist/qwen-browser.js +155 -39
  30. package/dist/run-task.js +2 -1
  31. package/dist/scheduler-commands.js +41 -0
  32. package/dist/send-slot.js +36 -0
  33. package/dist/session-commands.js +42 -0
  34. package/dist/spinner.js +3 -3
  35. package/dist/swallow.js +45 -0
  36. package/dist/system-prompt.js +2 -2
  37. package/dist/tree-commands.js +36 -0
  38. package/dist/tui/FullScreenApp.js +13 -4
  39. package/dist/tui/InputLine.js +20 -3
  40. package/dist/tui/LogView.js +11 -5
  41. package/dist/tui/StatusBar.js +4 -1
  42. package/dist/tui/TuiApp.js +11 -2
  43. package/dist/tui/TuiEditor.js +21 -4
  44. package/dist/tui/layout.js +14 -1
  45. package/dist/tui/store.js +2 -1
  46. package/dist/tui/ui-colors.js +2 -0
  47. package/dist/width.js +10 -5
  48. package/llms-full.txt +16 -292
  49. package/package.json +2 -2
package/llms-full.txt CHANGED
@@ -51,6 +51,15 @@ While the agent works you can keep typing — a message sent mid-task is queued
51
51
  and runs right after it, in the same chat. `Esc` aborts the current generation,
52
52
  `/help` lists commands, `/exit` quits.
53
53
 
54
+ ## Table of contents
55
+
56
+ - [Quick start](#quick-start) · [How it works](#how-it-works) · [Features](#features)
57
+ - [Why zames?](#why-zames) · [Requirements](#requirements) · [Signing in](#signing-in)
58
+ - [Switching providers (DeepSeek / Qwen / GLM)](#switching-providers-deepseek--qwen--glm)
59
+ - [Installation](#installation) · [Usage](#usage) · [FAQ](#faq)
60
+ - Reference: [Commands and tools](docs/commands.md) · [MCP](docs/mcp.md) · [Configuration and themes](docs/configuration.md) · [Troubleshooting](docs/troubleshooting.md)
61
+ - [Keywords and alternatives](#keywords-and-alternatives) · [Links](#links) · [License](#license)
62
+
54
63
  ## How it works
55
64
 
56
65
  zames does not call the model API. It launches a headless Chromium with a
@@ -87,15 +96,6 @@ Key pieces:
87
96
  - **The agent is sandboxed** to the directory it was started in — no tool can
88
97
  read or write above it.
89
98
 
90
- ## Table of contents
91
-
92
- - [Quick start](#quick-start) · [Features](#features) · [Why zames?](#why-zames) · [Requirements](#requirements)
93
- - [How it works](#how-it-works) · [Installation](#installation) · [Signing in](#signing-in) · [Usage](#usage)
94
- - [Switching providers (DeepSeek / Qwen / GLM)](#switching-providers-deepseek--qwen--glm)
95
- - [Tools](#tools) · [Slash commands](#slash-commands)
96
- - [Project context, skills and memory](#project-context-skills-and-memory) · [MCP (external tools)](#mcp-external-tools) · [Configuration](#configuration)
97
- - [FAQ](#faq) · [Keywords and alternatives](#keywords-and-alternatives) · [Links](#links) · [License](#license)
98
-
99
99
  ## Features
100
100
 
101
101
  - **Tools like Claude Code / Codex** — `Read`, `Write`, `Edit`, `Bash`,
@@ -361,291 +361,14 @@ zames --task "..." --output-format jsonl \
361
361
  | jq -r 'select(.type=="assistant_final") | .message'
362
362
  ```
363
363
 
364
- ## Tools
365
-
366
- The agent has the same style of tools as Claude Code / Codex CLI:
367
-
368
- - **File tools** — `Read`, `Write`, `Edit`, `Bash`, `BashOutput`, `Glob`,
369
- `Grep`. `Read` returns raw content by default; pass `numbered=true` to get
370
- `cat -n`-style line numbers (for reference only — do not paste them into
371
- `Edit`). `Bash` takes `run_in_background`; `BashOutput` then polls or kills
372
- that process.
373
- - **Extra tools** — `LS` (list a directory), `MultiEdit` (several edits to one
374
- file applied atomically), `TodoWrite` (session task checklist), `ApplyPatch`
375
- (multi-file patch in Codex's V4A format: `*** Begin Patch` … `*** End Patch`).
376
- - **Git** — `GitStatus`, `GitDiff`, `GitLog`, `GitShow`, `GitBranchList`,
377
- `GitAdd`, `GitCommit`, `GitPush`.
378
- - **Web** — `WebFetch`, `WebSearch`.
379
- - **Subagents** — `Task` (delegate a self-contained sub-task to an agent in
380
- its own chat; `explore` is read-only, `general` may edit; capped per task).
381
- - **Operator** — `AskUser` (a modal question with options; skipped in plan
382
- mode so a plan is never interrupted).
383
- - **Service** — `respond` (final answer to the operator, ends the task).
384
-
385
- All file tools stay inside the working directory (sandbox). `Write`/`Edit` and
386
- `MultiEdit`/`ApplyPatch` make a backup (undo) before touching a file.
387
-
388
- ## Slash commands
389
-
390
- Type / in the prompt for hints (Tab completes) — that list is always complete,
391
- `/help <command>` describes any single one. Besides the session and config
392
- commands (/new or /clear, /sessions, /chats, /resume-id, /last, /chat, /cd,
393
- /pwd, /status, /config, /undo, /undo-list, /rewind, /rewind-list, /transcript,
394
- /tasks, /mcp, /skills, /memory, /remember, /init, /reload, /debug-dom, /help,
395
- /exit) there are a few that mirror Claude Code / Codex CLI:
396
-
397
- - /diff [--staged] — show the working-tree git diff (--staged for the index).
398
- - /diffstat — a one-line change summary (`git diff --stat`).
399
- - /context — show what is loaded into the prompt (AGENTS.md, MEMORY.md,
400
- skills, custom commands) and the system-prompt size.
401
- - /retry — resend the last task into the same chat (handy after a truncated
402
- or empty answer).
403
- - /rename <title> — set the current session title (shown in /sessions).
404
- - /copy — copy the last assistant answer to the OS clipboard.
405
- - /cost (alias /usage) — session stats: tasks, tool calls, duration, and the
406
- context size in tokens (DeepSeek's `accumulated_token_usage`, Qwen's
407
- `input_tokens`, GLM's `prompt_tokens`).
408
- - /export [file] — write the session transcript to a Markdown file
409
- (zames-export-<stamp>.md by default).
410
- - /doctor — diagnose node, git, config, browser, clipboard, MCP and the
411
- active chat provider (it also reports that provider's UI health).
412
- - /provider <deepseek|qwen|glm> — switch the chat backend (applied live, no
413
- restart); /provider status shows the active provider/model/login; /provider
414
- login re-runs the sign-in check. /model [id] lists or picks a Qwen/GLM model at
415
- runtime.
416
- - /add-dir <path> — validate an extra directory (the sandbox is fixed at
417
- startup; relaunch with --dir to write there).
418
- - /resume-id <id> (or picking a chat in the /chats list) — open a chat and
419
- PRINT its dialogue into the terminal, so the restored context is visible. Only the
420
- last 20 messages are shown (`RESTORED_HISTORY_LIMIT`). /last reopens the last
421
- chat of the current directory with no lookup step; /sessions shows the saved
422
- sessions with their relative age.
423
- - /help <command> — the full description of a single command (e.g. `/help diff`)
424
- instead of the whole list.
425
- - /review [focus] [--staged] — ask the agent to review uncommitted changes
426
- and report findings (no code changes).
427
- - /plan [on|off] — plan (read-only) mode. While it is on, the mutating tools
428
- (Write/Edit/MultiEdit/ApplyPatch/Bash/BashOutput, GitAdd/GitCommit/GitPush,
429
- AskUser) are removed from the tool set, and so are MCP tools with a mutating
430
- name, so the agent can investigate without touching the tree.
431
- Start in it with `--plan`.
432
- - /compact — ask the active backend to compress the current chat into a handover
433
- summary, then open a NEW chat, resend the system prompt and post the summary
434
- as the carried-over context. Use it when the context gets long.
435
- - /goal <condition> — set a **completion condition** (Claude Code parity). The
436
- agent starts working toward it at once and keeps starting new turns until a
437
- separate evaluator model judges the condition met. The goal clears itself
438
- automatically when it is met (or judged impossible), or with `/goal clear`
439
- (or its synonym `/goal off`). The condition is stored in `<project>/.zames-goal`
440
- (git-ignored) and restored on the next launch. `/goal` with no argument — or
441
- `/goal on` — shows the current state.
442
- - /loop <interval> <task> — repeat a task periodically (e.g. `/loop 10m run the
443
- tests`). /cron "<min> <hour> <dom> <month> <dow>" <task> — run on a schedule.
444
- /jobs [rm <id>|clear] lists and stops them. A fired job is put into the same
445
- message queue you type into, so it runs when the agent is free (never mid-
446
- generation) and still respects the send throttle. The FIRST run of a `/loop`
447
- is due at once (and runs as soon as the agent is idle); a `/cron` job waits
448
- for its schedule.
449
- - /thinking [on|off] and /web [on|off] — toggle the reasoning / web-search
450
- behaviour. On **DeepSeek** these are the "Deep thinking" / "Smart search"
451
- toggles; on **Qwen** they drive its thinking MODE (Thinking / Fast) and the
452
- "Web search" item in the "+" menu.
453
- These (and /queue, /jobs, /goal, `/config <sub>`) can be used WHILE the agent
454
- is working — they do not touch the in-flight generation.
455
- - /queue [list|ls|clear|c|clean] — list (`list`/`ls`) or clear
456
- (`clear`/`c`/`clean`) the messages waiting to be sent after the current
457
- task.
458
-
459
- The token context is also shown live: the status line above the input has the
460
- spinner/text on the left and the context on the right (e.g. `125k · 13%`). The
461
- percentage is of the ACTIVE provider's window — 1M for DeepSeek, a per-model
462
- value for Qwen and GLM (`qwen.contextLimit` / `glm.contextLimit`) — and it is
463
- COLORED by fill level: green below 50%, yellow 50-80%, red above 80%.
464
- It comes from the provider's own token counter (DeepSeek's
465
- `accumulated_token_usage`, Qwen's `input_tokens`, GLM's `prompt_tokens`) and is
466
- hidden until the first answer delivers it.
467
-
468
- ## Project context, skills and memory
469
-
470
- Like Codex / Claude Code, zames reads project instructions and reusable
471
- workflows from your repository and from `~/.zames`.
472
-
473
- - **AGENTS.md** — project instructions, in the repo root (or any parent folder
474
- of the working directory); the agent writes it with `/init`. Global
475
- instructions live in
476
- `~/.zames/AGENTS.md` (and `~/.claude/CLAUDE.md`). Run `/init` and the agent
477
- will explore the project and write an AGENTS.md based on the real build/test
478
- commands and conventions (use `/init --force` to overwrite an existing file).
479
- - **MEMORY.md** — durable notes that persist between sessions. The agent
480
- appends useful facts here as it works; `/remember <text>` adds one from the
481
- prompt, and any `/task`-style edit through the agent keeps the file in sync.
482
- - **Skills** — a folder with a `SKILL.md` file (YAML frontmatter: `name`,
483
- `description`, optional `allowed-tools`, `user-invokable`) plus any helper
484
- files. Discovered under `.zames/skills/`, `.claude/skills/`,
485
- `.agents/skills/`, `skills/`, and `~/.zames/skills/`. The agent reads the
486
- body only when a task matches the description. List them with `/skills`;
487
- invoke one with `/<skill-name>`.
488
- - **Custom commands** — `.md` files under `.zames/commands/` (or
489
- `.claude/commands/`). They support `$ARGUMENTS` / `{{args}}` placeholders and
490
- are invoked with `/<command-name>`.
491
-
492
- Skills and custom commands show up in the «/» completion list and in `/help`.
493
-
494
- ```
495
- /skills list discovered skills
496
- /memory show AGENTS.md / MEMORY.md in effect
497
- /remember <text> append a durable note to MEMORY.md
498
- /init [--force] analyze the project and create AGENTS.md
499
- ```
500
-
501
- ## MCP (external tools)
502
-
503
- zames can use tools from [MCP](https://modelcontextprotocol.io) servers.
504
- The flagship example is @playwright/mcp: it gives the agent a real browser
505
- (navigate, click, snapshot, type, ...) on top of the one zames already uses
506
- for the DeepSeek, Qwen or GLM chat.
507
-
508
- Drop a config file (same shape as Claude Code / Cursor):
509
-
510
- - `~/.zames/mcp.json` - global
511
- - `<project>/.zames/mcp.json` - project-scoped (later files win)
512
- - `<project>/.mcp.json` - the common MCP name
513
-
514
- ```json
515
- {
516
- "mcpServers": {
517
- "playwright": {
518
- "command": "npx",
519
- "args": ["-y", "@playwright/mcp@latest", "--headless", "--isolated"]
520
- }
521
- }
522
- }
523
- ```
524
-
525
- IMPORTANT: keep the MCP browser isolated. @playwright/mcp defaults to the
526
- SAME profile directory as zames (~/.zames/profile). If it is launched
527
- without --isolated (or without its own --user-data-dir), the MCP browser
528
- and the agent browser fight over one profile and the DeepSeek chat shows
529
- "Something went wrong when opening your profile". Always pass --isolated
530
- as in the example above.
531
- Servers can also be remote ("url": "https://...", "transport": "sse").
532
- Their tools show up in the agent as `server__tool` (e.g.
533
- `playwright__browser_navigate`) and are listed with `/mcp` and in `/status`.
534
- A server that fails to connect is skipped with a warning and never breaks the
535
- agent.
536
-
537
- ### Recommended servers (verified)
538
-
539
- A few small, high-value servers tested end to end with zames (on the DeepSeek
540
- and Qwen backends; the MCP layer is provider-agnostic, so they work with GLM
541
- too):
542
-
543
- - **Context7** (`@upstash/context7-mcp`) — fetches CURRENT, version-specific
544
- documentation for a library before the agent writes code, instead of relying
545
- on a stale training snapshot. Tools: `resolve_library_id` then `query_docs`.
546
- Verified live on DeepSeek AND Qwen: the agent called both tools and got the
547
- current Zod API. This is the one to add first.
548
-
549
- ```json
550
- {
551
- "context7": {
552
- "command": "npx",
553
- "args": ["-y", "@upstash/context7-mcp@latest"]
554
- }
555
- }
556
- ```
557
-
558
- - **Sequential Thinking** (`@modelcontextprotocol/server-sequential-thinking`)
559
- — one `sequentialthinking` tool that gives the model an explicit, revisable
560
- plan before it acts; useful for long multi-step tasks.
561
-
562
- - **Memory** (`@modelcontextprotocol/server-memory`) — a local knowledge graph
563
- (9 tools) for durable facts across chats. NOTE: zames already has `MEMORY.md`
564
- + `AGENTS.md`; add this only if you want a queryable graph.
565
-
566
- Keep the stack SMALL: every server loads its tool definitions into the model's
567
- context. Add one when you feel its absence, not before.
568
-
569
- ## Configuration
570
-
571
- Global config: `~/.zames/config.json`
572
- Local (per project): `.zamesrc.json`
573
-
574
- You can view and change settings without leaving the agent — use the
575
- `/config` command. Run it without arguments to open an interactive menu
576
- (↑/↓ to move, Enter to change, `d` to reset, `q` to quit). Booleans and enums
577
- toggle in place; numbers and strings open an input prompt.
578
-
579
- ```
580
- /config interactive settings menu (alias: menu)
581
- /config list print all editable settings (aliases: show, ls)
582
- /config get <path> show a setting
583
- /config set <path> <value> change a setting
584
- /config reset <path> reset a setting to its default (alias: unset)
585
- /config path show config file paths (alias: paths)
586
- /config lang <ru|en> switch interface and agent language
587
- (aliases: language, язык)
588
- ```
589
-
590
- Examples:
591
-
592
- ```
593
- /config set maxIterations 20
594
- /config set browser.deepThinking true # DeepSeek Deep thinking (slow; reasoning is hidden)
595
- /config set browser.webSearch false # DeepSeek Smart web search
596
- /config lang en
597
- ```
598
-
599
- Changes are written to the HOME config (`~/.zames/config.json`), NOT to the
600
- project `.zamesrc.json` — a personal toggle must not leak into git — and applied
601
- right away (where possible without a restart).
602
-
603
- ### Language
604
-
605
- `/config lang ru` or `/config lang en` switches both the interface language
606
- (help, messages, spinner) and the language the agent answers you in. The
607
- locale lives in `ui.locale` in the config file.
608
-
609
- ### Themes
610
-
611
- `/theme` opens a pick list with a LIVE preview: the arrow keys repaint the
612
- terminal as you move, Enter saves, Esc restores the previous palette.
613
- `/theme <id>` applies a palette directly, `/theme list` prints every id.
614
- The switch also works WHILE the agent is generating: `/theme <id>` and
615
- `/config set ui.theme <id>` neither interrupt the turn nor touch the chat (it is
616
- a pure terminal repaint); the bare `/theme` pick list is queued instead, because
617
- it opens a full-screen list.
618
- The same setting is reachable from the settings side:
619
- `/config set ui.theme <id>` or the `/config` menu («Terminal color theme»).
620
- The switch is instant, no restart. `zames` is the default; the bundled palettes
621
- are ports of well-known editor schemes:
622
-
623
- `zames` (default), `one-dark`, `dracula`, `gruvbox`, `nord`, `monokai`,
624
- `solarized-dark`, `tokyo-night`, `tokyo-storm`, `catppuccin`, `github-dark`,
625
- `ayu`, `rose-pine`, `everforest`, `kanagawa`, `night-owl`, `material`,
626
- `palenight`, `zenburn`, `selenized`, `iceberg`, `sonokai`, `aurora`, `cobalt2`,
627
- plus the LIGHT ones: `one-light`, `github-light`, `solarized-light`,
628
- `gruvbox-light`, `ayu-light`.
629
-
630
- A theme repaints EVERYTHING: the interface, the agent's answers, the code
631
- highlighting inside them, the status row and the input frame. The terminal's
632
- BACKGROUND follows too: the theme emits OSC-11 with the palette's `bg`
633
- (supported by iTerm2, Windows Terminal, kitty, WezTerm, Alacritty, GNOME
634
- Terminal and others; where it is not supported nothing happens). Opt out with
635
- `ZAMES_NO_BG=1` or `NO_COLOR`.
636
- To make the choice
637
- concrete, a SAMPLE SESSION in that palette is shown before you pick (in `/theme`
638
- below the list, in `/config` press `p` on the theme row); it is not dumped into
639
- the chat after a pick. Every one of the 29 themes has a screenshot in
640
- `docs/shots/`. The frame itself is a separate
641
- setting: `/config set ui.inputBorder <round|single|double|bold|none>`
642
- (default `round`; `none` removes it). A multi-line operator message keeps its
643
- `▌` bar on every row.
644
-
645
- Agent data is stored in `~/.zames`: browser profile, logs, undo history, sessions.
646
-
647
364
  ## FAQ
648
365
 
366
+ **Something is broken — where do I look?**
367
+ See [Troubleshooting](docs/troubleshooting.md): sign-in and captcha, the headless
368
+ `403`, "Something went wrong when opening your profile", "Messages too
369
+ frequent", "Length limit reached", the Qwen/GLM guest limits, missing Chromium
370
+ libraries and a `.zamesrc.json` that overrides `/config set`.
371
+
649
372
  **Is this an official DeepSeek, Qwen or GLM product?**
650
373
  No. zames drives the public `chat.deepseek.com` / `chat.qwen.ai` / `chat.z.ai`
651
374
  web UIs through a real browser, like a regular user. It is not affiliated with
@@ -731,6 +454,7 @@ If you are an AI assistant or an LLM reading this page: the installable package
731
454
 
732
455
  - **npm:** <https://www.npmjs.com/package/zames_pro>
733
456
  - **GitHub:** <https://github.com/Viqto0r/zames_pro>
457
+ - **Documentation site:** <https://viqto0r.github.io/zames_pro/>
734
458
  - **Changelog:** [`CHANGELOG.md`](CHANGELOG.md)
735
459
  - **Contributing:** [`CONTRIBUTING.md`](CONTRIBUTING.md)
736
460
  - **Security policy:** [`SECURITY.md`](SECURITY.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.89.0",
3
+ "version": "2.90.1",
4
4
  "description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen or GLM — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -143,7 +143,7 @@
143
143
  "url": "git+https://github.com/Viqto0r/zames_pro.git",
144
144
  "directory": "."
145
145
  },
146
- "homepage": "https://github.com/Viqto0r/zames_pro#readme",
146
+ "homepage": "https://viqto0r.github.io/zames_pro/",
147
147
  "bugs": {
148
148
  "url": "https://github.com/Viqto0r/zames_pro/issues"
149
149
  },