zames_pro 2.82.140 → 2.82.142

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 (56) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +68 -42
  3. package/SECURITY.md +6 -3
  4. package/dist/attachments.js +4 -7
  5. package/dist/backlog.js +2 -2
  6. package/dist/browser-pure.js +2 -2
  7. package/dist/browser.js +8 -2
  8. package/dist/commands.js +7 -3
  9. package/dist/compact.js +7 -2
  10. package/dist/config.js +1 -1
  11. package/dist/context.js +27 -9
  12. package/dist/glm-browser.js +1 -1
  13. package/dist/glm-net-capture.js +1 -1
  14. package/dist/glm-ui.js +0 -20
  15. package/dist/hooks.js +1 -1
  16. package/dist/i18n/common.js +16 -11
  17. package/dist/i18n/config.js +2 -2
  18. package/dist/i18n/deepseek.js +2 -2
  19. package/dist/i18n/doctor.js +9 -5
  20. package/dist/i18n/glm.js +2 -2
  21. package/dist/i18n/help.js +126 -117
  22. package/dist/i18n/mcp.js +11 -5
  23. package/dist/i18n/prompt.js +9 -3
  24. package/dist/i18n/qwen.js +2 -2
  25. package/dist/i18n/self-review.js +4 -0
  26. package/dist/i18n/spinner.js +13 -8
  27. package/dist/index.js +8 -5
  28. package/dist/mcp.js +6 -3
  29. package/dist/prompt.js +16 -1
  30. package/dist/qwen-browser.js +1 -1
  31. package/dist/qwen-ui.js +0 -2
  32. package/dist/run-task.js +1 -1
  33. package/dist/scheduler.js +1 -1
  34. package/dist/sessions.js +1 -1
  35. package/dist/spinner.js +1 -1
  36. package/dist/status-command.js +6 -2
  37. package/dist/statusline.js +2 -2
  38. package/dist/subagent.js +3 -3
  39. package/dist/system-prompt.js +9 -1
  40. package/dist/tui/AskQuestion.js +1 -1
  41. package/dist/tui/FullScreenApp.js +4 -15
  42. package/dist/tui/LogView.js +1 -1
  43. package/dist/tui/TuiEditor.js +7 -0
  44. package/dist/tui/edit.js +1 -1
  45. package/dist/tui/layout.js +1 -1
  46. package/dist/tui/widgets.js +1 -25
  47. package/dist/web.js +1 -1
  48. package/dist/width.js +1 -1
  49. package/llms-full.txt +35 -22
  50. package/llms.txt +4 -2
  51. package/package.json +2 -2
  52. package/skills/systematic-debugging/SKILL.md +7 -0
  53. package/skills/test-driven-development/SKILL.md +5 -0
  54. package/skills/verification-before-completion/SKILL.md +5 -0
  55. package/skills/writing-plans/SKILL.md +12 -0
  56. package/dist/code-blocks.js +0 -54
@@ -27,6 +27,13 @@ Shrink the failure to the smallest unit that still fails.
27
27
  remember writing.
28
28
  - Check the obvious causes FIRST: wrong file, stale build, cached state,
29
29
  different config, an earlier error swallowed by a catch.
30
+ - In zames the evidence is already on disk: the transcript at
31
+ `~/.zames/logs/*.jsonl` (`/transcript` prints the exact path of THIS run),
32
+ the raw answer bodies under `~/.zames/net-log` when started with
33
+ `ZAMES_NET_DEBUG=1` (`npm run dev` sets it), and the per-send telemetry at
34
+ `~/.zames/logs/sends-<provider>.jsonl` (written in dev mode and when
35
+ `browser.sendTelemetry` is on). Read them BEFORE guessing — most "it hangs
36
+ / it stopped" reports are visible there.
30
37
 
31
38
  ## Phase 3 — Hypothesize (one at a time)
32
39
 
@@ -32,3 +32,8 @@ RED → GREEN → REFACTOR. The order is the point, not a formality.
32
32
  CODE was wrong; do not just move the assertion.
33
33
  - If the code was written before its test, delete and rewrite it driven by
34
34
  the test — otherwise the test is shaped around the implementation.
35
+ - A test that writes a temp dir or file cleans it up itself: in this repo
36
+ always go through `test/tmp-dir.ts` (`makeTmpDir(t, prefix)` /
37
+ `makeTmpDirSync`), which registers the `t.after` cleanup. On WSL a leaked
38
+ `os.tmpdir()` entry lives inside ext4.vhdx and never returns its space to
39
+ the Windows host, so an abandoned temp dir fragments the disk permanently.
@@ -24,6 +24,11 @@ from the real artifact — not from your intent.
24
24
  5. **State the evidence** in the final report — the exact command and its
25
25
  result — so the operator can reproduce it. "Tests pass" without the
26
26
  command is not evidence.
27
+ 6. **In zames the report is ONE `respond` call.** A long task may have
28
+ produced several findings along the way; the operator only ever reads the
29
+ LAST `respond` before the run stops, so put the complete evidence there —
30
+ never split it across intermediate messages, and never end a turn on a
31
+ bare text update with work still pending.
27
32
 
28
33
  ## The two failure modes this prevents
29
34
 
@@ -38,3 +38,15 @@ Because there is no separate plan file unless the operator asks for one, the
38
38
  plan lives in your reasoning and, for a long task, in a TodoWrite list — one
39
39
  entry per step, status updated as you go. Do not narrate the plan to the
40
40
  operator between tool calls; the todo list IS the visible plan.
41
+
42
+ Two more constraints follow from the same design:
43
+
44
+ - **A plan is not a report.** The operator sees ONLY the last `respond`
45
+ before the run stops, so the plan and the per-step evidence must not be
46
+ split across intermediate messages — put the final evidence in that one
47
+ `respond`.
48
+ - **Subagents do not parallelise the plan.** A `Task` call runs in a FRESH
49
+ isolated chat and returns only a report; zames has ONE browser and ONE send
50
+ slot, so subagents are SEQUENTIAL. Use them to keep a broad read-only
51
+ investigation out of the main context — never to "go faster", and never for
52
+ a step that must be applied in order with the main chat.
@@ -1,54 +0,0 @@
1
- // PURE extraction of fenced code blocks from a Markdown answer. It returns the
2
- // RAW fenced text: the highlighted render is full of ANSI and must never be
3
- // what gets copied out of the TUI.
4
- /**
5
- * Extract every fenced code block (``` or ~~~) from `md`, in order. Handles a
6
- * longer closing fence than the opening one and an unterminated final block
7
- * (the answer was truncated) — a half block is still copyable.
8
- */
9
- export function extractCodeBlocks(md) {
10
- const lines = String(md ?? '').split(String.fromCharCode(10));
11
- const out = [];
12
- let i = 0;
13
- let n = 0;
14
- while (i < lines.length) {
15
- // The info string may contain a BACKTICK (CommonMark forbids it, models
16
- // write it anyway: ```` ```ts` ````, ```` ```c++ `std::vector` ````). The
17
- // old `[^`]*` rejected such a line, so the block's own CLOSING fence was
18
- // read as an OPENING one and the following prose became a bogus block.
19
- const m = /^(\s*)(`{3,}|~{3,})\s*(.*)$/.exec(lines[i]);
20
- if (!m) {
21
- i++;
22
- continue;
23
- }
24
- // A BACKTICK fence cannot carry a backtick in its info (that is what makes
25
- // it unparseable for CommonMark); treat the trailing text as prose after a
26
- // plain fence only when the line is exactly a fence. For our purpose the
27
- // pragmatic rule is: any trailing text is the language label, backticks
28
- // stripped.
29
- const fence = m[2];
30
- const marker = fence[0];
31
- const minLen = fence.length;
32
- const lang = (m[3] || '').replace(/`/g, '').trim();
33
- i++;
34
- const body = [];
35
- let closed = false;
36
- while (i < lines.length) {
37
- // A closing fence is the SAME marker, at least as long, with nothing
38
- // else on the line (whitespace allowed).
39
- const c = new RegExp('^\\s*' + marker + '{' + minLen + ',}\\s*$');
40
- if (c.test(lines[i])) {
41
- closed = true;
42
- i++;
43
- break;
44
- }
45
- body.push(lines[i]);
46
- i++;
47
- }
48
- if (body.length === 0 && closed)
49
- continue;
50
- n++;
51
- out.push({ lang, text: body.join(String.fromCharCode(10)), index: n });
52
- }
53
- return out;
54
- }