diff --git a/CHANGELOG.md b/CHANGELOG.md index 134216ff..731b4217 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`) ([#129](https://github.com/coder/agent-tty/pull/129)). ### 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'],