zames_pro 2.67.2 → 2.67.4

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/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.67.4] - 2026-10-08
11
+
12
+ ### Fixed
13
+
14
+ - **readme:** `npm run build:readme` generated a `README.ru.md` again even
15
+ though it is no longer published (removed from `files[]` in 2.67.1) and a
16
+ test asserted it must not exist — so a local build wrote an untracked file
17
+ and could trip the drift test. The generator now writes ONLY `README.md`.
18
+
19
+ ## [2.67.3] - 2026-10-08
20
+
21
+ ### Fixed
22
+
23
+ - **input:** a terminal resize no longer clears the whole viewport. The
24
+ 2.67.2 fix removed the duplicate footer by clearing the screen (`ESC[2J`),
25
+ but that pushed the history above into the scrollback and left a blank gap
26
+ between the input line and the text the operator was reading. The block is
27
+ now erased with a RELATIVE move (the cursor row within the block), which
28
+ lands on the block top row after a reflow and clears ONLY our own rows —
29
+ the history above stays visible and in place.
30
+
10
31
  ## [2.67.2] - 2026-10-08
11
32
 
12
33
  ### Fixed
package/dist/input.js CHANGED
@@ -681,25 +681,25 @@ export class LineEditor {
681
681
  }
682
682
  _writeBlock() {
683
683
  const cols = process.stdout.columns || 80;
684
- // After a resize the relative erase is unreliable (the terminal
685
- // re-flowed everything and the cursor row changed). Re-DRAW the block
686
- // from a known position instead: clear the visible viewport, go HOME,
687
- // fill it with blank lines, then draw at the bottom. ESC[2J clears the
688
- // SCREEN, not the scrollback, so the history above is preserved.
684
+ // After a resize the terminal re-flowed the lines above the block, so
685
+ // the block's ABSOLUTE row changed. But the cursor is still on the input
686
+ // line and `_eraseBlock` moves up by the cursor row WITHIN the block — a
687
+ // RELATIVE move that still lands on the block top row, whatever the
688
+ // reflow did. So we clear ONLY our own block (status + input) and leave
689
+ // the history above it visible and in place. We deliberately do NOT clear
690
+ // the whole viewport (ESC[2J): that pushed the history into the scrollback
691
+ // and left a blank gap between the footer and the text the operator was
692
+ // reading (they had to scroll up to see their own chat). `_blockRows` is
693
+ // kept so the shrink-padding (`_padShrink`) can still push a shorter block
694
+ // back down to the bottom.
689
695
  if (this._resizeRepin) {
690
696
  this._resizeRepin = false;
691
697
  this._eraseBlock();
692
698
  this._lastStatusBlock = '';
699
+ // Forget the old block height: after a reflow the shrink-padding must
700
+ // not add scroll (it would push the freshly drawn block up and open a
701
+ // gap above the footer). The normal path records the new height.
693
702
  this._blockRows = 0;
694
- // Clear the VISIBLE viewport before re-pinning. After a resize the
695
- // terminal re-flowed the lines above the block, and padding to the
696
- // bottom scrolls the OLD copy of the block back into view — without the
697
- // clear the old status/input stays on screen as a DUPLICATE of the
698
- // freshly drawn one (the artifact seen on resize). The scrollback buffer
699
- // is untouched: ESC[2J clears the screen, NOT the scrollback, so the
700
- // history printed above is still reachable by scrolling up.
701
- process.stdout.write(ESC + '[2J' + ESC + '[H');
702
- this._padToBottom();
703
703
  }
704
704
  // Status line above the input: the spinner/answer text on the left and the
705
705
  // token context right-aligned on the SAME row (10k · 12%). The context is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.67.2",
3
+ "version": "2.67.4",
4
4
  "description": "Terminal coding agent that drives chat.deepseek.com through Playwright — 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": {
@@ -1,22 +1,21 @@
1
- // Assemble README.md and README.ru.md from two language sources.
1
+ // Assemble README.md from the two language sources.
2
2
  //
3
3
  // Why: npm renders exactly ONE readme per package (README.md in the root) and
4
- // has no language tabs, so a separate README.ru.md is invisible on the npm
5
- // page. But npm renders the readme with GitHub Flavored Markdown (via
6
- // GitHub's API), so a <details> block DOES work there -- and on GitHub too.
7
- // We therefore keep the English text on top and fold the other language into
8
- // a collapsible block at the bottom. README.ru.md is generated too so the
9
- // GitHub switcher can point at it directly, but it is NOT published to npm
10
- // (see "files" in package.json):
11
- // it would just duplicate the folded block.
4
+ // has no language tabs. npm renders the readme with GitHub Flavored Markdown
5
+ // (via GitHub's API), so a <details> block DOES work there -- and on GitHub
6
+ // too. We keep the English text on top and fold the Russian translation into
7
+ // a collapsible block at the bottom. The language switcher is an in-page
8
+ // `#readme-ru` anchor, so one README.md serves both languages -- there is
9
+ // no separate README.ru.md anymore (it was invisible on npm and just
10
+ // duplicated the folded block).
12
11
  //
13
12
  // The two sources (docs/readme.en.md, docs/readme.ru.md) are the single point
14
13
  // of edit for each language; this script wires the switcher and the collapsible
15
- // cross-language block so neither README has to be maintained by hand. The
16
- // generated files are committed; test/readme-built.test.ts re-runs buildReadmes()
17
- // and fails if they drift from the sources.
14
+ // cross-language block so neither language has to be maintained by hand. The
15
+ // generated file is committed; test/readme-built.test.ts re-runs buildReadmes()
16
+ // and fails if it drifts from the sources.
18
17
  //
19
- // Usage: npm run build:readme
18
+ // Usage: npom run build:readme
20
19
 
21
20
  import fs from 'node:fs'
22
21
  import path from 'node:path'
@@ -70,19 +69,14 @@ function details(summary: string, body: string): string {
70
69
  ].join(NL)
71
70
  }
72
71
 
73
- // Returns the two generated readmes WITHOUT touching the disk, so a test can
74
- // compare them against the committed files. Both files carry the SAME content
75
- // (English on top, Russian folded): README.md is what npm publishes, and
76
- // README.ru.md exists only so the GitHub language switcher has a target. The
77
- // switcher is an IN-PAGE `#readme-ru` anchor, so it works from either file
78
- // without fetching the other one.
79
- export function buildReadmes(rootDir: string): {
80
- readmeEn: string
81
- readmeRu: string
82
- } {
72
+ // Returns the generated README.md WITHOUT touching the disk, so a test can
73
+ // compare it against the committed file. Only README.md is generated: the
74
+ // Russian translation lives inside it as a <details> block, and the switcher
75
+ // is an in-page `#readme-ru` anchor.
76
+ export function buildReadmes(rootDir: string): { readmeEn: string } {
83
77
  const en = readSource(rootDir, 'readme.en.md')
84
78
  const ru = readSource(rootDir, 'readme.ru.md')
85
- const doc = [
79
+ const readmeEn = [
86
80
  en.head,
87
81
  '',
88
82
  EN_SWITCH,
@@ -93,7 +87,7 @@ export function buildReadmes(rootDir: string): {
93
87
  details('🇷🇺 Читать по-русски (Russian)', ru.body),
94
88
  '',
95
89
  ].join(NL)
96
- return { readmeEn: doc, readmeRu: doc }
90
+ return { readmeEn }
97
91
  }
98
92
 
99
93
  // Run only when invoked directly (not when imported by a test).
@@ -101,8 +95,7 @@ const invoked =
101
95
  process.argv[1] &&
102
96
  path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)
103
97
  if (invoked) {
104
- const { readmeEn, readmeRu } = buildReadmes(root)
98
+ const { readmeEn } = buildReadmes(root)
105
99
  fs.writeFileSync(path.join(root, 'README.md'), readmeEn)
106
- fs.writeFileSync(path.join(root, 'README.ru.md'), readmeRu)
107
- console.log('build-readme: wrote README.md and README.ru.md')
100
+ console.log('build-readme: wrote README.md')
108
101
  }