Commit Graph
668 Commits
Author SHA1 Message Date
arkonandClaude Opus 4.6 d14ac9de65 feat: add xterm-zerolag-input standalone library
Extract Claudeman's local echo overlay into a reusable xterm.js addon
at packages/xterm-zerolag-input/. Provides instant keystroke feedback
via a DOM overlay, eliminating perceived input latency over high-RTT
connections (SSH, mobile, cloud IDEs).

- Zero dependencies, compatible with xterm v5.x and @xterm/xterm v5.4+
- Configurable prompt detection (character, regex, or custom function)
- Flushed text tracking for tab-switch / deferred echo scenarios
- Per-character grid-aligned rendering matching xterm's canvas output
- 56 tests passing (prompt finder, overlay renderer, full addon lifecycle)
- Dual CJS/ESM build with full TypeScript declarations

Claudeman source is unchanged — migration to consume this lib is a
separate follow-up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-22 10:14:37 +01:00
arkon 4aa38c1bbb chore: bump version to 0.1599 2026-02-22 09:23:26 +01:00
arkon c78bb53968 chore: bump version to 0.1598 2026-02-22 07:34:33 +01:00
arkon 90b293ab3d chore: bump version to 0.1597 2026-02-22 06:04:37 +01:00
arkon 84c454cf40 chore: bump version to 0.1596 2026-02-22 05:52:25 +01:00
arkon 1a36ae15b8 chore: bump version to 0.1595 2026-02-22 05:46:56 +01:00
arkon 3a5ab330b7 chore: bump version to 0.1594 2026-02-22 05:45:04 +01:00
arkon 67b5c71019 chore: bump version to 0.1593 2026-02-22 05:34:52 +01:00
arkon ce49cd8c46 chore: bump version to 0.1592 2026-02-22 02:49:19 +01:00
arkonandClaude Opus 4.6 c060b72757 fix: local echo overlay — 5 bugs fixed, 39-test suite, wrapping text survives tab switch
Root cause bugs fixed in local echo overlay:
1. Stored flushed text as string (_flushedText, _flushedTexts Map) to avoid reading stale terminal buffer
2. Overlay stays visible when pendingText empties but flushed > 0
3. Backspace into flushed text has immediate visual feedback
4. _flushedTexts.delete() added alongside _flushedOffsets.delete() in Enter/Ctrl+C/cleanup
5. OSC terminal responses (xterm color queries) no longer clear flushed text state —
   was triggered by _handleColorEvent → triggerDataEvent during buffer load after tab switch

Added comprehensive test suite (test/local-echo-user-test.mjs): 39 tests across 9 groups
including line wrapping, tab switch round-trips, backspace into flushed text, and more.
All 6 test suites pass (133 total assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 02:05:49 +01:00
arkon c820acc96e fix: make localEchoEnabled per-platform so desktop/mobile settings don't overwrite each other
Strip localEchoEnabled from server PUT payload (stays in device-specific
localStorage only). Add to displayKeys as safety net for stale server values.

chore: bump version to 0.1588
2026-02-21 23:37:29 +01:00
arkonandClaude Opus 4.6 6c75432d74 chore: bump version to 0.1587
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 14:35:43 +01:00
arkonandClaude Opus 4.6 7fbc60db9b chore: bump version to 0.1586
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 14:00:16 +01:00
arkon 0fe6251424 chore: bump version to 0.1585 2026-02-21 07:12:57 +01:00
arkonandClaude Opus 4.6 85ee601b5b chore: bump version to 0.1584
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:26:11 +01:00
arkonandClaude Opus 4.6 2de3c46f66 chore: bump version to 0.1583
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:18:43 +01:00
arkon c561c41146 chore: bump version to 0.1582 2026-02-20 15:58:28 +01:00
arkon bad074756d chore: bump version to 0.1581 2026-02-20 15:41:43 +01:00
arkonandClaude Opus 4.6 a34b1cf4ce fix: make brotli optional in build, update dist for perf changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:07:54 +01:00
arkonandClaude Opus 4.6 819b1771c3 chore: bump version to 0.1580
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:04:45 +01:00
arkon 3f9632c8c7 chore: bump version to 0.1579 2026-02-20 14:33:06 +01:00
arkonandClaude Opus 4.6 663070f3f1 chore: bump version to 0.1578
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:04:16 +01:00
arkonandClaude Opus 4.6 ee5e070776 chore: bump version to 0.1576
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:06:45 +01:00
arkonandClaude Opus 4.6 06c4e3933b chore: bump version to 0.1575
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:53:02 +01:00
arkon 2528d98dce chore: bump version to 0.1574 2026-02-20 12:03:51 +01:00
arkon a720408ea5 chore: bump version to 0.1573 2026-02-20 09:46:09 +01:00
arkonandClaude Opus 4.6 b2a39a6745 fix: harden install.sh — Homebrew bootstrap, dnf/yum fallback, Alpine sudo, PATH cleanup
- Extract ensure_homebrew() called from all macOS install functions (prevents crash if Git checked before Node)
- Add dnf/yum fallback in Fedora install functions (fixes Amazon Linux 2 which only has yum)
- Add ensure_sudo to Alpine install functions (consistent with all other distros)
- Update Fedora/SUSE NodeSource setup to use GPG keyring method (replaces deprecated setup_XX.x script)
- Remove dist/ directory from PATH (only use ~/.local/bin symlink)
- Collapse identical fish/non-fish branches in setup_sc_alias

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:36:47 +01:00
arkonandClaude Opus 4.6 868d4f1196 perf: fix memory leaks — strip task outputs from SSE broadcasts, use light state everywhere
- TaskTracker.getTaskTreeLight(): strips large `output` strings from tasks
  in SSE broadcasts (was serializing 5-10MB every 500ms with many subagents)
- session:created broadcasts now use toLightDetailedState() (consistent with
  session:updated which already did)
- GET /api/sessions/:id returns light state (no 2-3MB terminal+text buffers)
- Ralph wizard polls /terminal?tail=2048 instead of full session endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 06:50:59 +01:00
Ark0N 51e45ed317 Update images in README for Claudeman demo 2026-02-20 06:19:43 +01:00
arkon 5b882c448e chore: bump version to 0.1570 2026-02-20 06:09:28 +01:00
arkon 99ad44e907 perf: speed up session creation by ~500ms — remove redundant sleep, reduce tmux wait, fire-and-forget config 2026-02-20 04:30:02 +01:00
arkonandClaude Opus 4.6 544ef67aeb chore: bump version to 0.1567
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 04:11:49 +01:00
arkonandClaude Opus 4.6 33dadf7bf3 feat: background keystroke forwarding makes local echo dramatically more powerful
Local echo now sends every keystroke to the PTY in the background (50ms
debounce) while the overlay continues providing instant visual feedback.
This unlocks Tab completion, preserves PTY state across tab switches,
and protects against input loss on session crashes — making the mobile
typing experience feel as responsive and capable as a native terminal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 03:18:53 +01:00
arkonandClaude Opus 4.6 c8a055d564 chore: bump version to 0.1565
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 23:21:28 +01:00
arkon 6a3ced5c06 chore: bump version to 0.1564 2026-02-19 23:08:59 +01:00
arkon 48e71254b8 chore: bump version to 0.1563 2026-02-19 23:03:21 +01:00
arkonandClaude Opus 4.6 db3893d608 fix: tmux remain-on-exit prevents session loss when Claude exits
Previously, when Claude exited inside tmux (exitCode=0 or crash), tmux
destroyed the entire session — losing buffer, history, and causing crash
loops on restart attempts. Now:

- Set remain-on-exit on for all tmux sessions
- Detect dead panes via #{pane_dead} instead of assuming session is gone
- Respawn dead panes with tmux respawn-pane -k (preserves session)
- Applied to both startInteractive and startShell paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 22:37:45 +01:00
arkon 1b21e1b8d8 fix: server shutdown no longer kills tmux sessions — detach instead of cleanup
Previously, server.stop() called cleanupSession(killMux=false) for all sessions,
which still tore down session state, removed listeners, killed PTY processes via
node-pty SIGHUP, and broadcast session:deleted. This caused Claude sessions
running inside tmux to be disrupted during COM deploys.

Now server shutdown just persists state, removes listeners, and lets the Node.js
process exit naturally. The tmux sessions survive independently, and
restoreMuxSessions() finds them alive on restart.

Also adds defense-in-depth in session.stop(): when killMux=false, skip PTY kill
entirely (just null the reference). And adds 'detached' lifecycle event type for
accurate audit logging.
2026-02-19 22:15:36 +01:00
arkon c748aedcd2 chore: bump version to 0.1560 2026-02-19 22:01:43 +01:00
arkon 3e8aae8c8d chore: bump version to 0.1559 2026-02-19 21:56:16 +01:00
arkon 00ad670441 chore: bump version to 0.1558 2026-02-19 21:44:03 +01:00
arkonandClaude Opus 4.6 dc6c65fd8b fix: detect stale tmux sessions on startInteractive/startShell
When Claude exits inside a tmux session, tmux destroys the session
(remain-on-exit is off), but the _muxSession reference persists.
On restart, startInteractive() treats it as a "restored session" and
tries to attach to the dead tmux — causing instant exit code 1.

Now checks tmux has-session before attaching. If the session is gone,
clears the stale reference and creates a fresh tmux session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:38:01 +01:00
arkonandClaude Opus 4.6 cf0d9e7d83 chore: bump version to 0.1557
Lifecycle log window: draggable, resizable, wider (900px), hidden on mobile.
Fixed display toggle (block vs empty string).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 19:55:04 +01:00
arkonandClaude Opus 4.6 383ed5e5a0 feat: session lifecycle audit log — append-only JSONL at ~/.claudeman/session-lifecycle.jsonl
Records every session create, start, exit, delete, recover, stale-clean,
mux-died, and server start/stop with timestamps, names, reasons, and exit
codes. Survives server restarts (unlike in-memory RunSummary).

- New SessionLifecycleLog singleton (src/session-lifecycle-log.ts)
- LifecycleEventType + LifecycleEntry types in types.ts
- GET /api/session-lifecycle endpoint with sessionId/event/since/limit filters
- cleanupSession() now takes reason parameter for audit trail
- state-store cleanupStaleSessions returns cleaned session IDs+names
- UI: lifecycle log modal accessible from header clipboard icon
- Auto-trims to 8k entries when exceeding 10k on server start

chore: bump version to 0.1556

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 18:30:14 +01:00
arkonandClaude Opus 4.6 342a2add10 fix: local echo overlay — move box-shadow from zero-height container to first line div
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:07:21 +01:00
arkon 219f06001e chore: bump version to 0.1554 2026-02-19 15:01:52 +01:00
arkonandClaude Opus 4.6 e1cec2a405 feat: local echo multi-line wrapping — long input wraps to next rows matching terminal character-wrap behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:00:44 +01:00
arkonandClaude Opus 4.6 8b96470cce fix: local echo overlay lost on mobile redraws — preserve pending text across SSE reconnect, terminal resets, and Ink redraws
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:52:39 +01:00
arkonandClaude Opus 4.6 fe1f665531 fix: ralph tracker — 3 bugs: first-occurrence completion, double-counting, TodoWrite pattern
Bug 1 (CRITICAL): canonicalCount >= 1 always fired on first <promise> tag
(prompt echo). Changed to >= 2 so only 2nd+ occurrence triggers completion.

Bug 2: checkMultiLinePatterns() re-detected complete tags already handled
by processLine(), double-counting. Now only tries completion when partial
buffer is non-empty (cross-chunk scenario).

Bug 3: TodoWrite ✔ patterns required "Task #N" but real Claude Code output
is plain "✔ content". Added TODO_PLAIN_CHECKMARK_PATTERN fallback.

Includes 71 new deep tests + real-life verification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:00:10 +01:00
arkon 926e77b1c2 chore: bump version to 0.1550 2026-02-19 08:49:36 +01:00