zames_pro 2.75.4 → 2.75.6

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 (79) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +12 -6
  3. package/dist/agent-loop.js +61 -1
  4. package/dist/browser.js +40 -8
  5. package/dist/commands.js +0 -1
  6. package/dist/config.js +8 -3
  7. package/dist/deepseek-ui.js +1 -3
  8. package/dist/i18n/common.js +13 -16
  9. package/dist/i18n/config.js +2 -2
  10. package/dist/i18n/help.js +6 -10
  11. package/dist/i18n/spinner.js +16 -5
  12. package/dist/index.js +0 -49
  13. package/dist/net-capture.js +43 -11
  14. package/dist/provider-handoff.js +0 -4
  15. package/dist/qwen-ui.js +0 -8
  16. package/dist/run-task.js +24 -1
  17. package/dist/shell.js +0 -6
  18. package/dist/system-prompt.js +52 -2
  19. package/dist/tools.js +33 -0
  20. package/dist/tui/AskQuestion.js +108 -0
  21. package/dist/tui/FullScreenApp.js +2 -1
  22. package/dist/tui/InputLine.js +0 -3
  23. package/dist/tui/StatusBar.js +5 -10
  24. package/dist/tui/TuiEditor.js +0 -43
  25. package/dist/tui/keys.js +0 -2
  26. package/dist/tui/run-ask.js +22 -0
  27. package/dist/tui/store.js +0 -2
  28. package/dist/tui/widgets.js +3 -9
  29. package/package.json +3 -2
  30. package/scripts/build-readme.mts +0 -101
  31. package/scripts/changelog-draft.mts +0 -93
  32. package/scripts/clean-dist.mts +0 -17
  33. package/scripts/coverage-gate.mts +0 -112
  34. package/scripts/ctd-live-driver.mts +0 -51
  35. package/scripts/ctd-live.tsx +0 -33
  36. package/scripts/escd-live-driver.mts +0 -37
  37. package/scripts/eslint-ts6.mts +0 -58
  38. package/scripts/inline-status-driver.mts +0 -31
  39. package/scripts/inline-status.tsx +0 -33
  40. package/scripts/mouse-churn.mts +0 -34
  41. package/scripts/qwen-models-smoke.mts +0 -117
  42. package/scripts/qwen-smoke.mts +0 -221
  43. package/scripts/release.mts +0 -199
  44. package/scripts/render-demo.mts +0 -154
  45. package/scripts/render-how-it-works.mts +0 -229
  46. package/scripts/ru-shot.mts +0 -20
  47. package/scripts/self-smoke.mts +0 -309
  48. package/scripts/tui-comp-shot.mts +0 -63
  49. package/scripts/tui-components.tsx +0 -62
  50. package/scripts/tui-config-driver.mts +0 -82
  51. package/scripts/tui-config-probe.tsx +0 -74
  52. package/scripts/tui-edit-driver.mts +0 -100
  53. package/scripts/tui-edit-probe.tsx +0 -38
  54. package/scripts/tui-editor-probe.tsx +0 -24
  55. package/scripts/tui-input-driver.mts +0 -54
  56. package/scripts/tui-input-shot.tsx +0 -59
  57. package/scripts/tui-log-driver.mts +0 -35
  58. package/scripts/tui-log-shot.tsx +0 -48
  59. package/scripts/tui-longpaste-driver.mts +0 -56
  60. package/scripts/tui-longpaste.tsx +0 -35
  61. package/scripts/tui-manyselect-shot.mts +0 -34
  62. package/scripts/tui-manyselect.tsx +0 -17
  63. package/scripts/tui-mouse-churn-probe.tsx +0 -28
  64. package/scripts/tui-paste-driver.mts +0 -88
  65. package/scripts/tui-paste-kinds.tsx +0 -76
  66. package/scripts/tui-pastetest.mts +0 -38
  67. package/scripts/tui-probe.tsx +0 -62
  68. package/scripts/tui-repro.tsx +0 -64
  69. package/scripts/tui-resize.mts +0 -70
  70. package/scripts/tui-scroll-driver.mts +0 -53
  71. package/scripts/tui-scroll-probe.tsx +0 -46
  72. package/scripts/tui-shot.mts +0 -106
  73. package/scripts/tui-status-driver.mts +0 -24
  74. package/scripts/tui-status-shot.tsx +0 -27
  75. package/scripts/tui-submit.tsx +0 -57
  76. package/scripts/tui-wheel-driver.mts +0 -61
  77. package/scripts/tui-wheel-probe.tsx +0 -48
  78. package/scripts/tui-widgets-driver.mts +0 -20
  79. package/scripts/tui-widgets.tsx +0 -44
@@ -1,57 +0,0 @@
1
- // Minimal probe: mount the REAL FullScreenApp with a store whose submit
2
- // callback logs what it receives. Used to verify the bracketed-paste ->
3
- // [Pasted lines#N] -> expandPastes path end to end.
4
-
5
- import React from 'react'
6
- import fs from 'node:fs'
7
- import { render } from 'ink'
8
- import { TuiStore } from '../src/tui/store.js'
9
- import { FullScreenApp } from '../src/tui/FullScreenApp.js'
10
- import { initialEditState } from '../src/tui/edit.js'
11
- import { expandPastes } from '../src/input/layout.js'
12
-
13
- const LOG = process.env.PROBE_SUBMIT_LOG || '/tmp/paste-submit.log'
14
- const store = new TuiStore()
15
- store.set({
16
- title: 'probe',
17
- version: '0',
18
- workdir: '/tmp',
19
- prompt: '> ',
20
- locale: 'en',
21
- commands: [],
22
- edit: { ...initialEditState(), buf: '' },
23
- })
24
- const inputProps = {
25
- onSubmit: (text: string) => {
26
- // Mirrors TuiEditor.handleSubmit: expand the paste markers from the
27
- // CURRENT store snapshot, which is what the agent actually receives.
28
- const expanded = expandPastes(store.getSnapshot().pastes, text)
29
- fs.appendFileSync(
30
- LOG,
31
- 'SUBMIT=' + JSON.stringify(expanded) + String.fromCharCode(10),
32
- )
33
- },
34
- onEscape: () => {},
35
- onCtrlC: () => {},
36
- onCopyCode: () => {},
37
- onAttach: () => null,
38
- onClipboard: () => Promise.resolve(null),
39
- onHistoryChange: () => {},
40
- onClearScreen: () => {},
41
- attachments: [],
42
- onPastesChange: (p: unknown) => {
43
- // Mirrors TuiEditor.buildInputProps: the adapter writes the paste list
44
- // BACK into the store, which is what handleSubmit reads to expand markers.
45
- store.set({ pastes: p as never })
46
- fs.appendFileSync(
47
- LOG,
48
- 'PASTES=' + JSON.stringify(p) + String.fromCharCode(10),
49
- )
50
- },
51
- }
52
- render(<FullScreenApp store={store} inputProps={inputProps} />, {
53
- exitOnCtrlC: false,
54
- patchConsole: false,
55
- alternateScreen: true,
56
- })
57
- setInterval(() => {}, 1 << 30)
@@ -1,61 +0,0 @@
1
- // Drive scripts/tui-wheel-probe.tsx under a pty and send REAL SGR wheel events
2
- // (mouse reporting must be on for these to arrive; the probe sets nothing, so
3
- // this also proves the SCROLL mode sequences are emitted). Prints the buffer
4
- // and scroll transitions the probe logged: the buffer must NEVER change and
5
- // the scroll must INCREASE on wheel-up.
6
- import { spawn } from 'node:child_process'
7
- import fs from 'node:fs'
8
- import path from 'node:path'
9
-
10
- const ESC = String.fromCharCode(27)
11
- const LOG = '/tmp/wheel-probe.log'
12
- const SCROLL = process.argv.includes('--scroll')
13
- // SGR wheel-up = Cb 64, wheel-down = 65: ESC [ < 64 ; col ; row M
14
- try {
15
- fs.unlinkSync(LOG)
16
- } catch {
17
- /* ignore */
18
- }
19
-
20
- const child = spawn(
21
- 'script',
22
- ['-qec', 'npx tsx scripts/tui-wheel-probe.tsx', '/dev/null'],
23
- {
24
- cwd: path.resolve('.'),
25
- env: {
26
- ...process.env,
27
- COLUMNS: '80',
28
- LINES: '24',
29
- PROBE_WHEEL_LOG: LOG,
30
- ...(SCROLL ? { PROBE_MOUSE_SCROLL: '1' } : {}),
31
- },
32
- },
33
- )
34
- child.stdout.on('data', () => {})
35
- child.stderr.on('data', () => {})
36
-
37
- setTimeout(() => {
38
- // Five wheel-up notches.
39
- for (let i = 0; i < 5; i++) {
40
- child.stdin.write(ESC + '[<64;10;10M')
41
- setTimeout(() => {}, 50)
42
- }
43
- setTimeout(() => child.kill('SIGTERM'), 800)
44
- }, 6000)
45
-
46
- child.on('close', () => {
47
- let lines: string[] = []
48
- try {
49
- lines = fs.readFileSync(LOG, 'utf-8').trim().split(String.fromCharCode(10))
50
- } catch {
51
- /* ignore */
52
- }
53
- const parsed = lines.map(
54
- (l) => JSON.parse(l) as { buf: string; scroll: number },
55
- )
56
- const bufs = [...new Set(parsed.map((p) => p.buf))]
57
- const scrolls = parsed.map((p) => p.scroll)
58
- console.log('BUFS=' + JSON.stringify(bufs))
59
- console.log('SCROLLS=' + JSON.stringify(scrolls))
60
- process.exit(0)
61
- })
@@ -1,48 +0,0 @@
1
- // Mount the REAL TuiEditor with a NON-EMPTY input history and a long log, so a
2
- // pty can send real SGR wheel events and the probe can log whether the INPUT
3
- // BUFFER or the LOG scroll offset changed. This distinguishes the two failure
4
- // modes the operator kept hitting: wheel must scroll the LOG (SCROLL mode) and
5
- // must NEVER touch the input history.
6
-
7
- import fs from 'node:fs'
8
- import { TuiEditor } from '../src/tui/TuiEditor.js'
9
-
10
- const LOG = process.env.PROBE_WHEEL_LOG || '/tmp/wheel-probe.log'
11
- fs.writeFileSync(LOG, '')
12
-
13
- const ed = new TuiEditor({
14
- prompt: '> ',
15
- commands: [],
16
- locale: 'en',
17
- alternateScreen: true,
18
- })
19
- ed.onSubmit = () => {}
20
- ed.onAttach = () => null
21
- ed.onClipboard = () => Promise.resolve(null)
22
- // Mouse-wheel scroll of the log is opt-in (config.ui.mouseScroll). Set it from
23
- // the env so the driver can exercise BOTH modes on a real pty.
24
- ed.setHeader?.({ mouseScroll: process.env.PROBE_MOUSE_SCROLL === '1' })
25
-
26
- // A non-empty history: a wheel-to-history bug would replace the empty buffer
27
- // with one of these lines.
28
- const snap = ed.store.getSnapshot()
29
- ed.store.set({
30
- edit: { ...snap.edit, history: ['OLD_COMMAND_ONE', 'OLD_COMMAND_TWO'] },
31
- scroll: 0,
32
- })
33
- // A tall log so there is something to scroll.
34
- for (let i = 0; i < 40; i++) ed.printAbove('log line ' + i)
35
-
36
- const report = (): void => {
37
- const s = ed.store.getSnapshot()
38
- fs.appendFileSync(
39
- LOG,
40
- JSON.stringify({ buf: s.edit.buf, scroll: s.scroll }) +
41
- String.fromCharCode(10),
42
- )
43
- }
44
- ed.store.subscribe(report)
45
- report()
46
-
47
- ed.start()
48
- setInterval(() => {}, 1 << 30)
@@ -1,20 +0,0 @@
1
- import { spawn } from 'node:child_process'
2
- import path from 'node:path'
3
- import { Term } from '../test/vt100.mts'
4
- const NL = String.fromCharCode(10)
5
- const term = new Term(16, 60)
6
- const child = spawn(
7
- 'script',
8
- ['-qec', 'npx tsx scripts/tui-widgets.tsx', '/dev/null'],
9
- {
10
- cwd: path.resolve('.'),
11
- env: { ...process.env, COLUMNS: '60', LINES: '16' },
12
- },
13
- )
14
- child.stdout.on('data', (d) => term.write(d.toString('utf-8')))
15
- child.stderr.on('data', (d) => term.write(d.toString('utf-8')))
16
- setTimeout(() => {
17
- process.stdout.write(term.render() + NL)
18
- child.kill('SIGTERM')
19
- }, 5000)
20
- child.on('close', () => process.exit(0))
@@ -1,44 +0,0 @@
1
- import React from 'react'
2
- import { render, Box, Text } from 'ink'
3
- import {
4
- Checkbox,
5
- Select,
6
- Panel,
7
- HintBar,
8
- CodeBlock,
9
- } from '../src/tui/widgets.js'
10
- render(
11
- React.createElement(
12
- Box,
13
- { flexDirection: 'column' },
14
- React.createElement(
15
- Text,
16
- null,
17
- 'Checkbox: ',
18
- React.createElement(Checkbox, { checked: true, focused: true }),
19
- ' ',
20
- React.createElement(Checkbox, { checked: false, focused: false }),
21
- ),
22
- React.createElement(
23
- Text,
24
- null,
25
- 'Select: ',
26
- React.createElement(Select, { value: 'qwen3.7-plus', focused: true }),
27
- ),
28
- React.createElement(
29
- Panel,
30
- { title: 'Панель', subtitle: '2', width: 50 },
31
- React.createElement(Text, null, 'содержимое'),
32
- ),
33
- React.createElement(HintBar, {
34
- hints: [
35
- ['↑/↓', 'выбор'],
36
- ['Enter', 'ok'],
37
- ['Esc', 'отмена'],
38
- ],
39
- }),
40
- React.createElement(CodeBlock, { code: 'const a = 1', lang: 'ts' }),
41
- ),
42
- { exitOnCtrlC: false, patchConsole: false },
43
- )
44
- setInterval(() => {}, 1 << 30)