Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- `agent-tty batch <session-id>`: 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

Expand Down
1 change: 1 addition & 0 deletions src/cli/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ async function main(): Promise<void> {

program
.command('dashboard')
.alias('d')
.description(
'Watch what your agents are doing in their shells: a read-only, live dashboard of your sessions',
)
Expand Down
13 changes: 13 additions & 0 deletions test/integration/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
Loading