tuilens 0.0.0-stage → 0.6.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/CHANGELOG.md +231 -0
- package/CONTRIBUTING.md +28 -0
- package/LICENSE +21 -0
- package/README.md +516 -2
- package/README.zh-CN.md +508 -0
- package/SECURITY.md +12 -0
- package/THIRD_PARTY.md +25 -0
- package/dist/scripts/benchmark-overhead.d.ts +1 -0
- package/dist/scripts/benchmark-overhead.js +462 -0
- package/dist/scripts/benchmark-overhead.js.map +1 -0
- package/dist/scripts/soak.d.ts +1 -0
- package/dist/scripts/soak.js +30 -0
- package/dist/scripts/soak.js.map +1 -0
- package/dist/src/core/bounded-file.d.ts +5 -0
- package/dist/src/core/bounded-file.js +58 -0
- package/dist/src/core/bounded-file.js.map +1 -0
- package/dist/src/core/click-target.d.ts +10 -0
- package/dist/src/core/click-target.js +48 -0
- package/dist/src/core/click-target.js.map +1 -0
- package/dist/src/core/compact.d.ts +6 -0
- package/dist/src/core/compact.js +14 -0
- package/dist/src/core/compact.js.map +1 -0
- package/dist/src/core/diff.d.ts +5 -0
- package/dist/src/core/diff.js +161 -0
- package/dist/src/core/diff.js.map +1 -0
- package/dist/src/core/error-catalog.d.ts +10 -0
- package/dist/src/core/error-catalog.js +88 -0
- package/dist/src/core/error-catalog.js.map +1 -0
- package/dist/src/core/errors.d.ts +23 -0
- package/dist/src/core/errors.js +43 -0
- package/dist/src/core/errors.js.map +1 -0
- package/dist/src/core/executable.d.ts +14 -0
- package/dist/src/core/executable.js +108 -0
- package/dist/src/core/executable.js.map +1 -0
- package/dist/src/core/i18n.d.ts +14 -0
- package/dist/src/core/i18n.js +27 -0
- package/dist/src/core/i18n.js.map +1 -0
- package/dist/src/core/input.d.ts +10 -0
- package/dist/src/core/input.js +305 -0
- package/dist/src/core/input.js.map +1 -0
- package/dist/src/core/locator.d.ts +4 -0
- package/dist/src/core/locator.js +98 -0
- package/dist/src/core/locator.js.map +1 -0
- package/dist/src/core/progress.d.ts +6 -0
- package/dist/src/core/progress.js +31 -0
- package/dist/src/core/progress.js.map +1 -0
- package/dist/src/core/protocol.d.ts +857 -0
- package/dist/src/core/protocol.js +338 -0
- package/dist/src/core/protocol.js.map +1 -0
- package/dist/src/core/types.d.ts +487 -0
- package/dist/src/core/types.js +2 -0
- package/dist/src/core/types.js.map +1 -0
- package/dist/src/core/validation.d.ts +11 -0
- package/dist/src/core/validation.js +263 -0
- package/dist/src/core/validation.js.map +1 -0
- package/dist/src/doctor.d.ts +23 -0
- package/dist/src/doctor.js +176 -0
- package/dist/src/doctor.js.map +1 -0
- package/dist/src/engine/browser-engine.d.ts +14 -0
- package/dist/src/engine/browser-engine.js +167 -0
- package/dist/src/engine/browser-engine.js.map +1 -0
- package/dist/src/engine/browser-host.d.ts +32 -0
- package/dist/src/engine/browser-host.js +92 -0
- package/dist/src/engine/browser-host.js.map +1 -0
- package/dist/src/engine/browser-runtime.d.ts +59 -0
- package/dist/src/engine/browser-runtime.js +749 -0
- package/dist/src/engine/browser-runtime.js.map +1 -0
- package/dist/src/engine/headless-core.d.ts +79 -0
- package/dist/src/engine/headless-core.js +620 -0
- package/dist/src/engine/headless-core.js.map +1 -0
- package/dist/src/engine/kitty-diacritics.d.ts +3 -0
- package/dist/src/engine/kitty-diacritics.js +25 -0
- package/dist/src/engine/kitty-diacritics.js.map +1 -0
- package/dist/src/engine/kitty-runtime.d.ts +22 -0
- package/dist/src/engine/kitty-runtime.js +534 -0
- package/dist/src/engine/kitty-runtime.js.map +1 -0
- package/dist/src/engine/osc1337.d.ts +23 -0
- package/dist/src/engine/osc1337.js +342 -0
- package/dist/src/engine/osc1337.js.map +1 -0
- package/dist/src/engine/snapshot-codec.d.ts +34 -0
- package/dist/src/engine/snapshot-codec.js +111 -0
- package/dist/src/engine/snapshot-codec.js.map +1 -0
- package/dist/src/engine/visual-renderer.d.ts +31 -0
- package/dist/src/engine/visual-renderer.js +526 -0
- package/dist/src/engine/visual-renderer.js.map +1 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.js +23 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/cli.d.ts +2 -0
- package/dist/src/interfaces/cli.js +754 -0
- package/dist/src/interfaces/cli.js.map +1 -0
- package/dist/src/interfaces/mcp-config.d.ts +18 -0
- package/dist/src/interfaces/mcp-config.js +65 -0
- package/dist/src/interfaces/mcp-config.js.map +1 -0
- package/dist/src/interfaces/mcp-progress.d.ts +24 -0
- package/dist/src/interfaces/mcp-progress.js +64 -0
- package/dist/src/interfaces/mcp-progress.js.map +1 -0
- package/dist/src/interfaces/mcp-resources.d.ts +11 -0
- package/dist/src/interfaces/mcp-resources.js +355 -0
- package/dist/src/interfaces/mcp-resources.js.map +1 -0
- package/dist/src/interfaces/mcp-tools.d.ts +11 -0
- package/dist/src/interfaces/mcp-tools.js +52 -0
- package/dist/src/interfaces/mcp-tools.js.map +1 -0
- package/dist/src/interfaces/mcp.d.ts +8 -0
- package/dist/src/interfaces/mcp.js +172 -0
- package/dist/src/interfaces/mcp.js.map +1 -0
- package/dist/src/interfaces/schemas.d.ts +2 -0
- package/dist/src/interfaces/schemas.js +3 -0
- package/dist/src/interfaces/schemas.js.map +1 -0
- package/dist/src/perf/resource.d.ts +55 -0
- package/dist/src/perf/resource.js +201 -0
- package/dist/src/perf/resource.js.map +1 -0
- package/dist/src/perf/runner.d.ts +168 -0
- package/dist/src/perf/runner.js +484 -0
- package/dist/src/perf/runner.js.map +1 -0
- package/dist/src/perf/schema.d.ts +1550 -0
- package/dist/src/perf/schema.js +94 -0
- package/dist/src/perf/schema.js.map +1 -0
- package/dist/src/perf/stats.d.ts +14 -0
- package/dist/src/perf/stats.js +33 -0
- package/dist/src/perf/stats.js.map +1 -0
- package/dist/src/probe.d.ts +38 -0
- package/dist/src/probe.js +81 -0
- package/dist/src/probe.js.map +1 -0
- package/dist/src/profiles/index.d.ts +4 -0
- package/dist/src/profiles/index.js +4 -0
- package/dist/src/profiles/index.js.map +1 -0
- package/dist/src/profiles/presets/alacritty.d.ts +36 -0
- package/dist/src/profiles/presets/alacritty.js +30 -0
- package/dist/src/profiles/presets/alacritty.js.map +1 -0
- package/dist/src/profiles/presets/index.d.ts +3 -0
- package/dist/src/profiles/presets/index.js +21 -0
- package/dist/src/profiles/presets/index.js.map +1 -0
- package/dist/src/profiles/presets/iterm2.d.ts +37 -0
- package/dist/src/profiles/presets/iterm2.js +32 -0
- package/dist/src/profiles/presets/iterm2.js.map +1 -0
- package/dist/src/profiles/presets/kitty.d.ts +36 -0
- package/dist/src/profiles/presets/kitty.js +30 -0
- package/dist/src/profiles/presets/kitty.js.map +1 -0
- package/dist/src/profiles/presets/linux.d.ts +26 -0
- package/dist/src/profiles/presets/linux.js +23 -0
- package/dist/src/profiles/presets/linux.js.map +1 -0
- package/dist/src/profiles/presets/tmux.d.ts +36 -0
- package/dist/src/profiles/presets/tmux.js +30 -0
- package/dist/src/profiles/presets/tmux.js.map +1 -0
- package/dist/src/profiles/presets/types.d.ts +11 -0
- package/dist/src/profiles/presets/types.js +2 -0
- package/dist/src/profiles/presets/types.js.map +1 -0
- package/dist/src/profiles/presets/vscode.d.ts +35 -0
- package/dist/src/profiles/presets/vscode.js +30 -0
- package/dist/src/profiles/presets/vscode.js.map +1 -0
- package/dist/src/profiles/presets/wezterm.d.ts +36 -0
- package/dist/src/profiles/presets/wezterm.js +30 -0
- package/dist/src/profiles/presets/wezterm.js.map +1 -0
- package/dist/src/profiles/presets/windows-terminal.d.ts +35 -0
- package/dist/src/profiles/presets/windows-terminal.js +30 -0
- package/dist/src/profiles/presets/windows-terminal.js.map +1 -0
- package/dist/src/profiles/presets/xterm.d.ts +35 -0
- package/dist/src/profiles/presets/xterm.js +30 -0
- package/dist/src/profiles/presets/xterm.js.map +1 -0
- package/dist/src/profiles/registry.d.ts +9 -0
- package/dist/src/profiles/registry.js +20 -0
- package/dist/src/profiles/registry.js.map +1 -0
- package/dist/src/profiles/resolver.d.ts +57 -0
- package/dist/src/profiles/resolver.js +280 -0
- package/dist/src/profiles/resolver.js.map +1 -0
- package/dist/src/recording/replay.d.ts +25 -0
- package/dist/src/recording/replay.js +256 -0
- package/dist/src/recording/replay.js.map +1 -0
- package/dist/src/recording/writer.d.ts +46 -0
- package/dist/src/recording/writer.js +96 -0
- package/dist/src/recording/writer.js.map +1 -0
- package/dist/src/reporting/bundle.d.ts +97 -0
- package/dist/src/reporting/bundle.js +365 -0
- package/dist/src/reporting/bundle.js.map +1 -0
- package/dist/src/reporting/html-report.d.ts +25 -0
- package/dist/src/reporting/html-report.js +643 -0
- package/dist/src/reporting/html-report.js.map +1 -0
- package/dist/src/scenario/runner.d.ts +31 -0
- package/dist/src/scenario/runner.js +194 -0
- package/dist/src/scenario/runner.js.map +1 -0
- package/dist/src/scenario/schema.d.ts +297 -0
- package/dist/src/scenario/schema.js +58 -0
- package/dist/src/scenario/schema.js.map +1 -0
- package/dist/src/session/manager.d.ts +75 -0
- package/dist/src/session/manager.js +694 -0
- package/dist/src/session/manager.js.map +1 -0
- package/dist/src/session/protocol-replies.d.ts +30 -0
- package/dist/src/session/protocol-replies.js +118 -0
- package/dist/src/session/protocol-replies.js.map +1 -0
- package/dist/src/session/pty-runtime.d.ts +31 -0
- package/dist/src/session/pty-runtime.js +102 -0
- package/dist/src/session/pty-runtime.js.map +1 -0
- package/dist/src/session/pty-worker-client.d.ts +7 -0
- package/dist/src/session/pty-worker-client.js +215 -0
- package/dist/src/session/pty-worker-client.js.map +1 -0
- package/dist/src/session/pty-worker-protocol.d.ts +44 -0
- package/dist/src/session/pty-worker-protocol.js +2 -0
- package/dist/src/session/pty-worker-protocol.js.map +1 -0
- package/dist/src/session/pty-worker.d.ts +1 -0
- package/dist/src/session/pty-worker.js +81 -0
- package/dist/src/session/pty-worker.js.map +1 -0
- package/dist/src/session/session.d.ts +122 -0
- package/dist/src/session/session.js +808 -0
- package/dist/src/session/session.js.map +1 -0
- package/dist/src/testing/assertions.d.ts +95 -0
- package/dist/src/testing/assertions.js +224 -0
- package/dist/src/testing/assertions.js.map +1 -0
- package/dist/src/testing/junit.d.ts +45 -0
- package/dist/src/testing/junit.js +91 -0
- package/dist/src/testing/junit.js.map +1 -0
- package/dist/src/transport/client.d.ts +47 -0
- package/dist/src/transport/client.js +787 -0
- package/dist/src/transport/client.js.map +1 -0
- package/dist/src/transport/dispatcher.d.ts +3 -0
- package/dist/src/transport/dispatcher.js +136 -0
- package/dist/src/transport/dispatcher.js.map +1 -0
- package/dist/src/transport/paths.d.ts +9 -0
- package/dist/src/transport/paths.js +22 -0
- package/dist/src/transport/paths.js.map +1 -0
- package/dist/src/transport/protocol.d.ts +108 -0
- package/dist/src/transport/protocol.js +76 -0
- package/dist/src/transport/protocol.js.map +1 -0
- package/dist/src/transport/server.d.ts +5 -0
- package/dist/src/transport/server.js +390 -0
- package/dist/src/transport/server.js.map +1 -0
- package/dist/src/version.d.ts +1 -0
- package/dist/src/version.js +3 -0
- package/dist/src/version.js.map +1 -0
- package/dist/src/visual/artifacts.d.ts +22 -0
- package/dist/src/visual/artifacts.js +21 -0
- package/dist/src/visual/artifacts.js.map +1 -0
- package/dist/src/visual/compare.d.ts +21 -0
- package/dist/src/visual/compare.js +197 -0
- package/dist/src/visual/compare.js.map +1 -0
- package/docs/ARCHITECTURE.md +129 -0
- package/docs/IMAGES.md +93 -0
- package/docs/MCP-SETUP.md +266 -0
- package/docs/PERFORMANCE.md +130 -0
- package/docs/PROFILES.md +165 -0
- package/docs/PROTOCOL.md +262 -0
- package/docs/RECORDING.md +43 -0
- package/docs/RELEASING.md +57 -0
- package/docs/REPORTING.md +99 -0
- package/docs/ROADMAP.md +147 -0
- package/docs/VALIDATION.md +35 -0
- package/docs/VISUAL.md +50 -0
- package/docs/assets/evidence-report.png +0 -0
- package/docs/assets/osc1337.png +0 -0
- package/docs/assets/playground.png +0 -0
- package/docs/assets/tuilens-agent-banner.en.png +0 -0
- package/docs/assets/tuilens-agent-banner.png +0 -0
- package/docs/assets/tuilens-agent-banner.zh-CN.png +0 -0
- package/docs/zh-CN/ARCHITECTURE.md +97 -0
- package/docs/zh-CN/CONTRIBUTING.md +20 -0
- package/docs/zh-CN/IMAGES.md +116 -0
- package/docs/zh-CN/MCP-SETUP.md +258 -0
- package/docs/zh-CN/PERFORMANCE.md +126 -0
- package/docs/zh-CN/PROFILES.md +157 -0
- package/docs/zh-CN/PROTOCOL.md +233 -0
- package/docs/zh-CN/RECORDING.md +35 -0
- package/docs/zh-CN/RELEASING.md +53 -0
- package/docs/zh-CN/REPORTING.md +92 -0
- package/docs/zh-CN/ROADMAP.md +130 -0
- package/docs/zh-CN/VALIDATION.md +50 -0
- package/docs/zh-CN/VISUAL.md +65 -0
- package/package.json +78 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Scenario, performance and recording outputs now share a versioned Evidence Bundle with explicit
|
|
7
|
+
artifact roles for screenshots, failure evidence, compare images, baselines and recordings.
|
|
8
|
+
- `scenario --html` and `perf --html` render zero-dependency single-file HTML reports with timelines,
|
|
9
|
+
compare sliders, SVG charts, matrix tabs and bounded image inlining. `tuilens report` renders an
|
|
10
|
+
existing JSON result or JSONL recording offline.
|
|
11
|
+
- HTML reports escape dynamic text and script JSON, inline at most 8 MiB per image and 24 MiB total,
|
|
12
|
+
bound recording replay text to 2 MiB, and expose the Evidence Manifest as embedded JSON.
|
|
13
|
+
- SDK exports the three HTML renderers, Evidence Bundle types/builders, image budgets and the bounded
|
|
14
|
+
recording parser.
|
|
15
|
+
- MCP v2 exposes bounded `tuilens://` resources for sessions, compact screens, PNG screenshots,
|
|
16
|
+
metrics and artifacts, plus `tui_reproduce_bug` and `tui_visual_regression` prompts.
|
|
17
|
+
- `tuilens mcp-config` generates JSON, Codex TOML and Claude Code commands for global, npx and
|
|
18
|
+
absolute executable modes.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Text sessions now use a browser-free `@xterm/headless` terminal core by default.
|
|
22
|
+
Chromium and the xterm.js DOM/WebGL surface load lazily for explicit renderers, image protocols,
|
|
23
|
+
screenshots and visual comparisons.
|
|
24
|
+
- `renderer` now reports `headless`, `dom` or `webgl` from live session state; `visualSyncDegraded`
|
|
25
|
+
marks a truncated 4 MiB visual replay when the browser layer attaches late.
|
|
26
|
+
- `benchmark:overhead` accepts `--renderers headless,dom,webgl` for startup and RSS comparisons.
|
|
27
|
+
- Recording headers move to version 2 with the renderer captured at recording start; the legacy
|
|
28
|
+
image-mode field and its replay mapping are gone.
|
|
29
|
+
- Local IPC now uses persistent v2 NDJSON connections with one-time authentication, multiplexed
|
|
30
|
+
requests, per-id cancellation, bounded in-flight requests and server-pushed `watch` frames.
|
|
31
|
+
- `scenario` and `perf` emit real progress events, and the CLI `watch` consumes daemon events instead
|
|
32
|
+
of polling `observe`.
|
|
33
|
+
- MCP forwards real daemon progress for `wait`, `inputAndWait`, `replay`, `scenario` and `perf`;
|
|
34
|
+
timed heartbeats are removed.
|
|
35
|
+
- MCP instructions and tool descriptions document the compact -> inputAndWait -> diff observation
|
|
36
|
+
loop and keep screenshots explicit.
|
|
37
|
+
- `observe` now uses `view: "compact" | "full" | "cells" | "diff"`. `diff` requires `fromFrameId`,
|
|
38
|
+
returns changed lines plus a wide-character-aware bounding region, and falls back to compact text
|
|
39
|
+
after the 16-frame lightweight history is exhausted.
|
|
40
|
+
- Screenshots are opt-in with `screenshot:true` for every observation view.
|
|
41
|
+
- Performance results retain a bounded RSS timeline for reporting; scenario steps record a human-readable
|
|
42
|
+
action/condition detail plus grid dimensions.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
- Visual replay now rebases its initial grid when evicted resize events are no longer available, and
|
|
46
|
+
releases the replay buffer after the visual renderer attaches.
|
|
47
|
+
- `watch` retries after `FRAME_PENDING` instead of waiting for an unrelated frame notification.
|
|
48
|
+
- IPC preserves real socket errors such as `EACCES` instead of masking them as an unavailable daemon.
|
|
49
|
+
- `shutdown` flushes its response before stopping the daemon, with a bounded fallback timeout.
|
|
50
|
+
- Diff regions now extend through a shared suffix when a per-line insertion or deletion changes the
|
|
51
|
+
display width, so callers can crop or compare every shifted cell.
|
|
52
|
+
- `observe` with `view:"diff"` keeps explicitly requested scrollback on a cache hit while still
|
|
53
|
+
omitting viewport text and cells.
|
|
54
|
+
- `mcp-config` invalid client/mode errors now expose the specific English message instead of placing it
|
|
55
|
+
in `details`.
|
|
56
|
+
|
|
57
|
+
### Removed
|
|
58
|
+
- Removed the per-request short IPC connection protocol.
|
|
59
|
+
- Removed `observe.compact`, `includeCells`, CLI `--compact`, `--cells` and `--no-screenshot`.
|
|
60
|
+
- Removed `launch.images`, CLI `--images`, `ImageProfile` and `imageProfileGraphics`.
|
|
61
|
+
Use `terminalProfile` capabilities or orthogonal `graphics` options.
|
|
62
|
+
- Removed MCP progress heartbeats.
|
|
63
|
+
|
|
64
|
+
## 0.5.5
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
- macOS performance runs now sample the real process tree through `ps`; `peakRssBytes` and
|
|
68
|
+
`peakProcesses` no longer collapse to zero.
|
|
69
|
+
- Multi-condition waits retry `FRAME_PENDING`, advance backoff once per poll, and perform a final
|
|
70
|
+
check after a deadline-truncated sleep.
|
|
71
|
+
- `Terminal.expectNoText()` now honors region column bounds and style filters; assertion failure
|
|
72
|
+
screenshots use the same 5 second lower bound as other evidence captures.
|
|
73
|
+
- Concurrent `launch()` calls prepare engines in parallel while pending launches retain their slot;
|
|
74
|
+
the admission lock is released after the pending launch is registered.
|
|
75
|
+
- `watch --control` serializes forwarded input so fast keystrokes cannot overtake each other, and
|
|
76
|
+
`watch` exits after the monitored session has exited.
|
|
77
|
+
- Performance reports retain process-tree sampling `errors`, `lastError` and `peakRootRssBytes`
|
|
78
|
+
instead of silently reducing failures to zero.
|
|
79
|
+
- Scenario observation and failure evidence skip character grids and use a 5 second evidence timeout.
|
|
80
|
+
- IPC treats `SHUTTING_DOWN` as recoverable during auto-start, and startup-lock rollback verifies the
|
|
81
|
+
created file identity before unlinking.
|
|
82
|
+
- Browser host disposal waits for an in-flight launch before deciding whether to close the browser.
|
|
83
|
+
- Local IPC removes the per-request preflight ping, uses an owner-token autostart lock, cleans stale
|
|
84
|
+
macOS sockets after an inode-checked bind failure, and uses constant-time token comparison.
|
|
85
|
+
- Replay participates in the same admission and exited-session reclamation path as launch.
|
|
86
|
+
|
|
87
|
+
### Changed
|
|
88
|
+
- Replaced the full `playwright` package with `playwright-core`; Chromium remains an explicit runtime
|
|
89
|
+
prerequisite installed with `npx playwright-core install chromium`.
|
|
90
|
+
- Stable dependencies use SemVer ranges. `node-pty` moves to `1.2.0-beta.18` and remains the only exact
|
|
91
|
+
prerelease pin until a stable compatibility release can replace it.
|
|
92
|
+
- `src/version.ts` is generated from `package.json`; mismatch checks run in the quality gate.
|
|
93
|
+
- Timeout evidence screenshots now use the same 5 second lower bound as confirmed-input screenshots.
|
|
94
|
+
- Dispatcher params are validated once; process-tree lookup uses pid/parent maps.
|
|
95
|
+
- Clean-install smoke now runs `doctor` and verifies browser/PTY/storage module loading, not only
|
|
96
|
+
package version and CLI entry.
|
|
97
|
+
|
|
98
|
+
### Added
|
|
99
|
+
- Tag-driven npm publish/provenance, GitHub Release, version/tag validation and clean-install smoke
|
|
100
|
+
workflows.
|
|
101
|
+
- Biome lint and formatting gates, coverage thresholds, scheduled soak runs, dependency drift artifacts
|
|
102
|
+
and Dependabot updates.
|
|
103
|
+
- Release documentation and explicit renderer/image-protocol boundaries with replacement criteria.
|
|
104
|
+
|
|
105
|
+
## 0.5.0
|
|
106
|
+
|
|
107
|
+
### Performance
|
|
108
|
+
- **Snapshot transport rewritten.** Character grids are packed into two strings inside the browser and unpacked in Node. A 160×50 `observe` dropped from ~770 ms to ~4 ms; `find` from ~940 ms to ~5 ms.
|
|
109
|
+
- `observe`/`snapshot` accept `cells:false`; `find`, `wait`, `compare`, `inputAndWait` and `timeoutEvidence` skip the grid when they do not need it. `observe` over CLI/MCP now builds the grid only when `includeCells` is requested.
|
|
110
|
+
- Wait polling uses adaptive backoff (2 ms → 50 ms) instead of a fixed 50 ms tick, so `wait` and `perf` measurements are no longer quantized by the poll interval. Timeouts are now honored (~1.1 s for a 1 s timeout, previously ~2 s).
|
|
111
|
+
|
|
112
|
+
### Added
|
|
113
|
+
- `doctor` command for local runtime, browser, `node-pty`, storage and daemon diagnostics without starting the daemon.
|
|
114
|
+
- `ping` now reports daemon uptime plus live session, launch and replay counts; `shutdown` is idempotent when no daemon is running.
|
|
115
|
+
- `observe --compact` trims line ends, omits cells and defaults to no screenshot; `watch` streams changed frames as JSONL and supports explicit `--control` TTY handoff.
|
|
116
|
+
- Engine-side `probeText` evaluates regional text/style matches without transferring the full character grid before a match.
|
|
117
|
+
- MCP long-running calls emit progress heartbeats when requested; cancellation aborts the matching daemon operation.
|
|
118
|
+
- Optional `TUILENS_PTY_WORKER=1` / `ManagerOptions.ptyWorker` isolates `node-pty` in a per-session child process.
|
|
119
|
+
- `probe` reports fixed-glyph widths plus renderer/font/grid metadata and a stable fingerprint; snapshots expose `render`.
|
|
120
|
+
- Screenshot font pinning via `TUILENS_FONT_FILE`/`ManagerOptions.fontFile`, with a font hash in `render`;
|
|
121
|
+
the default renderer injects circled-numeral-only local fallbacks, and `probe --strict-font` detects
|
|
122
|
+
inconsistent circled-numeral glyph scale.
|
|
123
|
+
- `paint()` and `snapshot.render.paintMs` expose frame-level paint timing; `npm run soak` provides a bounded soak check.
|
|
124
|
+
- The macOS runner joins the CI matrix as an experimental platform.
|
|
125
|
+
- Optional WebGL renderer (`launch --renderer webgl`) on top of xterm.js, with DOM as the default.
|
|
126
|
+
The actual renderer is returned in sessions and recorded in recording headers, scenario/perf environments,
|
|
127
|
+
observation metadata and visual comparison JSON. WebGL failure falls back to DOM and reports the actual value.
|
|
128
|
+
- Regression coverage for 120 block glyphs: WebGL must not reintroduce periodic 9/10px dark columns.
|
|
129
|
+
- English-default localization for CLI help, MCP tool descriptions, errors and assertion messages;
|
|
130
|
+
set `TUILENS_LANG=zh-CN` for Simplified Chinese. Structured errors retain both `messageEn` and `messageZh`.
|
|
131
|
+
- Terminal capability profiles: built-in `kitty`, `wezterm`, `iterm2`, `windows-terminal`, `alacritty`, `vscode`, `tmux`, `xterm-256color` and `linux` presets; JSON `extends` derivatives; `--terminal-profile`; orthogonal `graphics`; profile-driven environment, replies, image protocols, keyboard capability query and scrollback.
|
|
132
|
+
- Scenario and performance `profiles: [...]` matrices, with per-profile reports and a perf comparison table. The default remains `xterm-256color`.
|
|
133
|
+
- `perf` command/MCP tool/SDK API: declarative performance scenarios with warmup rounds, per-round process restarts, `{{seq}}` evidence templates, setup history growth, process-tree RSS sampling, baseline files and threshold-based regression gating.
|
|
134
|
+
- Testing assertion layer (`terminal()`, `Terminal#expectText/expectNoText/expectCursor/expectSize`) with expected/actual/screenshot on failure.
|
|
135
|
+
- JUnit XML output (`--junit`) for scenarios and performance runs; CI uploads evidence artifacts and runs a report-only perf smoke on pull requests.
|
|
136
|
+
- `observe.scrollback` reads viewport-above history lines (text only) so scrolled-away content can be asserted.
|
|
137
|
+
- Kitty keyboard protocol (`CSI u`) and xterm `modifyOtherKeys` detection and encoding: `Shift+Enter`, `Ctrl+Enter`, `Ctrl+Space`, `Shift+Tab` and modified function keys are now expressible. Ctrl+letter keeps its traditional C0 byte under `modifyOtherKeys`.
|
|
138
|
+
- `TerminalModes.keyboard` exposes negotiated keyboard protocol state.
|
|
139
|
+
- `ManagerOptions.maxSessions` and `TUILENS_MAX_SESSIONS`; sessions now share one Chromium process via a reference-counted host.
|
|
140
|
+
- `errorRecord` returns `messageEn` from a stable error-code catalog.
|
|
141
|
+
- `LICENSE` (MIT) and `package.json` `files`/`license`/`repository` metadata.
|
|
142
|
+
|
|
143
|
+
### Changed
|
|
144
|
+
- Daemon shutdown handles `SIGBREAK` on Windows and `SIGHUP` on POSIX in addition to `SIGINT`/`SIGTERM`.
|
|
145
|
+
- CI now covers Node.js 22 and 24 on Windows, Linux and macOS.
|
|
146
|
+
- Pinned `node-pty@1.2.0-beta.14`: 1.1.0 ships a non-executable macOS `spawn-helper` and leaks file descriptors across repeated PTY spawns, which prevents the macOS CI job from launching any PTY.
|
|
147
|
+
- `images` is deprecated and internally maps to `capabilities.graphics`. DA1 feature `4` follows the resolved SIXEL capability.
|
|
148
|
+
- Windows sessions that explicitly select a profile use the bundled node-pty ConPTY DLL so DA1/DA2 queries reach the emulator, with a bounded conout worker cleanup and a final profile-aware reply rewrite. The default fast path keeps system ConPTY.
|
|
149
|
+
- Silenced node-pty's Windows console-list helper when `AttachConsole` fails during cleanup and made it fall back immediately instead of printing a stack trace and waiting for the 5 s timeout.
|
|
150
|
+
- Wheel `to:"top"/"bottom"` is written to the PTY in 20 batches of 100 events with event-loop yields, so long scrolls are cancellable and do not burst the application.
|
|
151
|
+
- `createBrowserEngine` still owns an isolated browser; `SessionManager` uses a shared host by default.
|
|
152
|
+
- Launch admission reclaims the oldest exited sessions when the session budget is full; running sessions still return `SESSION_LIMIT`.
|
|
153
|
+
|
|
154
|
+
- Added explicit pending-frame `clickText` targeting with unchanged region guards.
|
|
155
|
+
- Added page-unit wheel scrolling and bounded top/bottom navigation across SDK, CLI and MCP.
|
|
156
|
+
- Preserved unrelated input under `protocolReplies:"suppress"` and improved invalid `colorMode` diagnostics.
|
|
157
|
+
- Added real PTY pending-click and MCP `colorMode:"truecolor"` regression coverage.
|
|
158
|
+
|
|
159
|
+
## 0.4.0
|
|
160
|
+
|
|
161
|
+
- Added delayed terminal-reply filtering, `protocolReplies` launch policy and protocol reply metrics.
|
|
162
|
+
- Added `clickText` hitbox/point/offset targeting and mouse button/modifier support.
|
|
163
|
+
- Added `inputAndWait` across SDK, CLI and MCP with text, size, stable, exit and cursor conditions.
|
|
164
|
+
- Added cursor visibility/style/blink metadata and default hidden cursors in screenshots.
|
|
165
|
+
- Added forced repaint and grid-geometry validation before capture to reduce stale resize PNGs.
|
|
166
|
+
- Added Windows `PATH`/`PATHEXT` executable resolution for bare commands such as `ssh`.
|
|
167
|
+
- Fixed `click-text --json` and `input-wait --json` method aliases.
|
|
168
|
+
|
|
169
|
+
## 0.3.0
|
|
170
|
+
|
|
171
|
+
- Added the `iterm` image profile and OSC 1337 inline images in `all`.
|
|
172
|
+
- Added optional-size normalization, multipart transfers, aspect-ratio fitting, and bounded image validation.
|
|
173
|
+
- Added image capture, malformed-input recovery, PTY and replay regressions for the new profile.
|
|
174
|
+
|
|
175
|
+
## 0.2.0
|
|
176
|
+
|
|
177
|
+
- Added opt-in SIXEL and bounded inline Kitty graphics, including Unicode virtual placements.
|
|
178
|
+
- Added region captures, PNG comparisons, masks, diff files and read-only baselines.
|
|
179
|
+
- Added mouse down/up, drag and modifiers.
|
|
180
|
+
- Added output recording, bounded offline replay, and declarative scenario reports.
|
|
181
|
+
- Added style/unique/nth targeting, frame/region input guards and fresh-frame waits.
|
|
182
|
+
- Added cancellation, recording-integrity, bounded-file and image-resource regression coverage.
|
|
183
|
+
- Added English-first documentation with Simplified Chinese translations.
|
|
184
|
+
|
|
185
|
+
## 0.1.0
|
|
186
|
+
|
|
187
|
+
- Initial PTY, browser engine, CLI, MCP, SDK, observation and input support.
|
|
188
|
+
|
|
189
|
+
## 简体中文
|
|
190
|
+
|
|
191
|
+
0.6.0:完成 TerminalCore/VisualRenderer 分层、持久化 IPC v2、声明式观察与增量 diff、
|
|
192
|
+
Agent 原生 MCP v2 与统一 Evidence Bundle。新增零外部依赖单文件 HTML 报告、`scenario/perf --html`、
|
|
193
|
+
`tuilens report`、三类报告 SDK 导出与 CI 证据归档;单图内联上限 8 MiB、总计 24 MiB,
|
|
194
|
+
动态文本与内嵌 JSON 均安全转义。版本升级至 0.6.0,npm 发布保持手动安排。
|
|
195
|
+
|
|
196
|
+
0.5.5:修复 macOS 进程树采样、组合等待 `FRAME_PENDING`/退避/末次检查、浏览器宿主 dispose 竞态、
|
|
197
|
+
本机 IPC 自动启动竞态、macOS 残留 socket 和回放槽位回收;`playwright` 替换为 `playwright-core`,
|
|
198
|
+
稳定依赖改用 SemVer 范围,`node-pty` 更新至 `1.2.0-beta.18`。版本号从 `package.json` 生成,
|
|
199
|
+
新增 Biome/格式/覆盖率门禁、定时 soak、依赖漂移归档、tag 驱动的 npm publish/GitHub Release、
|
|
200
|
+
干净安装烟测和发布文档,并记录浏览器引擎与图片协议边界。
|
|
201
|
+
|
|
202
|
+
0.5.0:新增 `doctor` 本地诊断命令,检查运行时、浏览器、`node-pty`、存储和 daemon 状态但不启动 daemon;
|
|
203
|
+
`ping` 返回 daemon 运行时长和会话/启动/回放计数,未运行 daemon 时 `shutdown` 可幂等成功。
|
|
204
|
+
新增 compact 观察、watch/control、引擎侧区域 probeText、MCP 进度与取消、可选 PTY worker、
|
|
205
|
+
固定字形 probe、render/paint 元数据、soak 脚本;CI 覆盖 Windows/Linux/macOS 上的 Node.js 22 与 24。
|
|
206
|
+
截图字体可用 `TUILENS_FONT_FILE`/`ManagerOptions.fontFile` 固定,并在 `render` 中记录字体哈希;
|
|
207
|
+
默认渲染注入只覆盖圈码的本地 fallback,`probe --strict-font` 会检查圈码字阶。
|
|
208
|
+
新增可选 WebGL renderer(默认 DOM),session、录制、scenario/perf、观察和视觉比较元数据
|
|
209
|
+
记录实际 renderer;WebGL 不可用时回退并回传 DOM。增加 120 个块字符的周期暗列回归测试。
|
|
210
|
+
新增终端能力画像与 9 个内置 preset,支持 JSON `extends` 派生、`--terminal-profile`、
|
|
211
|
+
正交 `graphics` 和 profile 驱动的环境/应答/图片/键盘查询/回滚缓冲;场景与性能测试支持
|
|
212
|
+
`profiles: [...]` 矩阵并输出 profile 维度对比表。`images` 标记为弃用并映射到 `capabilities.graphics`。
|
|
213
|
+
Windows 显式选择 profile 时使用随包 ConPTY DLL,并在应答进入 PTY 前按 profile 做最终改写;
|
|
214
|
+
未显式选择 profile 的默认路径继续使用系统 ConPTY。另新增未提交帧的显式 clickText 定位
|
|
215
|
+
(保留区域指纹)、按页和首尾滚动导航;
|
|
216
|
+
suppress 不再吞掉无关输入,非法 colorMode 诊断包含收到的值,并补充真实 PTY 与 MCP 回归。
|
|
217
|
+
Windows 清理阶段的 node-pty 辅助进程在 `AttachConsole` 失败时不再输出告警,并立即回退,
|
|
218
|
+
不再空等 5 秒超时。node-pty 固定到 `1.2.0-beta.14`:1.1.0 的 macOS npm 包缺少
|
|
219
|
+
`spawn-helper` 执行位,并在反复启动 PTY 时泄漏文件描述符。
|
|
220
|
+
会话额度满时,新启动会先回收最旧的已退出会话,运行中的会话不会被自动关闭。
|
|
221
|
+
|
|
222
|
+
0.4.0:新增迟到终端应答过滤与策略、clickText 命中区、inputAndWait、光标元数据与截图默认隐藏光标、
|
|
223
|
+
截图强制重绘和 resize 网格校验、Windows 裸命令 PATH/PATHEXT 解析,并修复 JSON 命令别名。
|
|
224
|
+
|
|
225
|
+
0.3.0:新增 iterm 图片档与 OSC 1337 内联图片,支持分段传输、可选尺寸字段、
|
|
226
|
+
宽高比例适配和有界校验;补充截图、异常恢复、PTY 和回放回归。
|
|
227
|
+
|
|
228
|
+
0.2.0:新增原生图片子集、区域截图与视觉比较、拖拽和修饰键、录制回放与场景、样式定位与过期保护;
|
|
229
|
+
补充取消/完整性/容量回归,以及默认英文和中文对应文档。
|
|
230
|
+
|
|
231
|
+
0.1.0:初始 PTY、浏览器引擎、CLI、MCP、SDK、观察与输入支持。
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
[English](CONTRIBUTING.md) · [简体中文](docs/zh-CN/CONTRIBUTING.md)
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
Use Node.js 22+, run `npm ci`, then `npm run build`. Install a compatible browser if needed with
|
|
8
|
+
`npx playwright-core install chromium`. Read [architecture](docs/ARCHITECTURE.md) before changing layer boundaries.
|
|
9
|
+
|
|
10
|
+
## Changes
|
|
11
|
+
|
|
12
|
+
- Keep protocol, engine, session and interface responsibilities separate.
|
|
13
|
+
- Add independent minimal fixtures for behavior changes; avoid external services and environment-specific assumptions.
|
|
14
|
+
- Preserve cancellation, output order, capacity bounds and cleanup behavior.
|
|
15
|
+
- Use SemVer ranges for stable dependencies, keep the prerelease `node-pty` pin exact, and include the lockfile.
|
|
16
|
+
- Keep generated output, credentials and machine-specific configuration out of commits.
|
|
17
|
+
- Document support boundaries, especially for terminal/image protocols.
|
|
18
|
+
|
|
19
|
+
## Validation
|
|
20
|
+
|
|
21
|
+
Run focused tests while developing, then `npm run check` and `npm test` for the final state.
|
|
22
|
+
For visual changes inspect the generated PNG as well as structured assertions.
|
|
23
|
+
Describe the trigger, observable change, checks performed and remaining limitations in the pull request.
|
|
24
|
+
Do not equate text presence with visual correctness or a short benchmark with long-run stability.
|
|
25
|
+
|
|
26
|
+
TuiLens is released under the [MIT License](LICENSE). Unless explicitly stated otherwise,
|
|
27
|
+
contributions are licensed under the same license.
|
|
28
|
+
Third-party components retain their own licenses; see [THIRD_PARTY.md](THIRD_PARTY.md).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Blackn-L
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|