From 52dacaf5a931a650f7fde41711bffb214edda1d6 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Mon, 8 Jun 2026 13:38:55 +0200 Subject: [PATCH 1/2] feat(cli): add `d` alias for the dashboard command `agent-tty d` now resolves to `agent-tty dashboard`. It is an explicit Commander alias (not prefix matching), so it maps unambiguously to the dashboard and never collides with the other `d`-prefixed commands (`destroy`, `doctor`). Change-Id: I05b496720ea9e6b1543f0fad35006b4c626d539f Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Thomas Kosiewski --- CHANGELOG.md | 1 + src/cli/main.ts | 1 + test/integration/cli.test.ts | 13 +++++++++++++ 3 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 134216ff..3fa92be1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - `agent-tty batch `: run an ordered sequence of input-and-`wait` steps against one session in a single invocation, supplied as a positional JSON array or `--file`. Each step is one verb (`type`, `paste`, `sendKeys`, `run`, or `wait`); every `wait` is anchored to a Wait Baseline (the Event Log sequence after the preceding input step) so it cannot match a stale screen the way a hand-written `run`/`wait`/`send-keys` loop can (ADR 0007). Fail-fast by default with a non-zero exit and a per-step `--json` envelope; `--keep-going` attempts every step. SIGINT/SIGTERM flushes a partial envelope (in-flight step `interrupted`, later steps `not-run`). Adds a new `WAIT_TIMEOUT` error and exit code `11` for timed-out wait steps inside a batch ([#126](https://github.com/coder/agent-tty/pull/126), closes [#123](https://github.com/coder/agent-tty/issues/123)). - Optional `screenHash` on `snapshot` and render-`wait` results (also on matched `batch` wait steps): a lowercase 64-char SHA-256 of the canonical visible-screen text (`visibleLines[].text` joined by `\n`, no scrollback, cursor, or styles). Gives automation a stable token to tell whether the rendered screen actually changed between two observations without diffing full text, and unlike the Event Log sequence it does not advance on cursor moves or no-op repaints. Present on every result that observed a snapshot (live matches, captures, and the offline `matched:false` fallback); absent only when no screen was observed (live timeout, consecutive-failure giveup, replay-error throw). Standalone `wait` adds an `--after-seq` flag, and `type` / `paste` results now return their Event Log `seq` so callers can anchor a following wait themselves ([#127](https://github.com/coder/agent-tty/pull/127), closes [#125](https://github.com/coder/agent-tty/issues/125)). +- `agent-tty d` is now a short alias for `agent-tty dashboard`. It is an explicit alias (not prefix matching), so it resolves unambiguously to the dashboard and never collides with the other `d`-prefixed commands (`destroy`, `doctor`). ### Changed diff --git a/src/cli/main.ts b/src/cli/main.ts index adbc67c6..7bca08d4 100644 --- a/src/cli/main.ts +++ b/src/cli/main.ts @@ -707,6 +707,7 @@ async function main(): Promise { program .command('dashboard') + .alias('d') .description( 'Watch what your agents are doing in their shells: a read-only, live dashboard of your sessions', ) diff --git a/test/integration/cli.test.ts b/test/integration/cli.test.ts index 0d60b84f..0e62b70c 100644 --- a/test/integration/cli.test.ts +++ b/test/integration/cli.test.ts @@ -184,6 +184,19 @@ describe('CLI integration', () => { expect(result.stderr).toContain('(Did you mean skills?)'); }); + it('resolves the `d` alias to the dashboard command', () => { + // `--help` exits before the action runs, so this exercises alias + // resolution without needing an interactive TTY or the libghostty-vt + // renderer that the dashboard otherwise requires. + const result = runCli(['d', '--help'], testEnv()); + + expect(result.status).toBe(0); + expect(result.stderr).toBe(''); + expect(result.stdout).toContain( + 'Watch what your agents are doing in their shells', + ); + }); + it('accepts --append-newline for type', () => { const result = runCli( ['type', 'session-01', 'hello', '--append-newline', '--json'], From 680cbed3797ee16298e5605b70cc1742677eef54 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Mon, 8 Jun 2026 13:39:39 +0200 Subject: [PATCH 2/2] docs(CHANGELOG.md): link the `d` alias entry to #129 Change-Id: If5ca4ed27080d8f7cca085c3b433801ff13e89d9 Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Thomas Kosiewski --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fa92be1..731b4217 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - `agent-tty batch `: run an ordered sequence of input-and-`wait` steps against one session in a single invocation, supplied as a positional JSON array or `--file`. Each step is one verb (`type`, `paste`, `sendKeys`, `run`, or `wait`); every `wait` is anchored to a Wait Baseline (the Event Log sequence after the preceding input step) so it cannot match a stale screen the way a hand-written `run`/`wait`/`send-keys` loop can (ADR 0007). Fail-fast by default with a non-zero exit and a per-step `--json` envelope; `--keep-going` attempts every step. SIGINT/SIGTERM flushes a partial envelope (in-flight step `interrupted`, later steps `not-run`). Adds a new `WAIT_TIMEOUT` error and exit code `11` for timed-out wait steps inside a batch ([#126](https://github.com/coder/agent-tty/pull/126), closes [#123](https://github.com/coder/agent-tty/issues/123)). - Optional `screenHash` on `snapshot` and render-`wait` results (also on matched `batch` wait steps): a lowercase 64-char SHA-256 of the canonical visible-screen text (`visibleLines[].text` joined by `\n`, no scrollback, cursor, or styles). Gives automation a stable token to tell whether the rendered screen actually changed between two observations without diffing full text, and unlike the Event Log sequence it does not advance on cursor moves or no-op repaints. Present on every result that observed a snapshot (live matches, captures, and the offline `matched:false` fallback); absent only when no screen was observed (live timeout, consecutive-failure giveup, replay-error throw). Standalone `wait` adds an `--after-seq` flag, and `type` / `paste` results now return their Event Log `seq` so callers can anchor a following wait themselves ([#127](https://github.com/coder/agent-tty/pull/127), closes [#125](https://github.com/coder/agent-tty/issues/125)). -- `agent-tty d` is now a short alias for `agent-tty dashboard`. It is an explicit alias (not prefix matching), so it resolves unambiguously to the dashboard and never collides with the other `d`-prefixed commands (`destroy`, `doctor`). +- `agent-tty d` is now a short alias for `agent-tty dashboard`. It is an explicit alias (not prefix matching), so it resolves unambiguously to the dashboard and never collides with the other `d`-prefixed commands (`destroy`, `doctor`) ([#129](https://github.com/coder/agent-tty/pull/129)). ### Changed