You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MCP `step` tool is the agent-friendly default entrypoint. It can autostart `termdeckd`, create a missing session when `cwd` is supplied, and returns stable JSON fields such as `status`, `reason`, `prompt`, `exitCode`, `timedOut`, `outputTruncated`, `lastSeq`, `transcriptPath`, and `cwd`. `project_step` goes one level higher by deriving a stable session id from `cwd` and an optional label.
190
192
191
-
`summary` returns a compact inspection object with a screen tail, output tail, recent events, and likely error lines. Use it when an agent needs state without replaying a large transcript.
193
+
`summary` returns a compact inspection object with a screen tail, output tail, recent events, and likely error lines. `last_command` returns structured command id, command text, seq bounds, duration, exit code, timeout flag, and output tail. Use these when an agent needs state without replaying a large transcript.
192
194
193
-
Task helpers report stale metadata, expired TTLs, exited backing processes, restart counts, readiness diagnostics, and orphan `task-*` sessions. The web UI surfaces the same dashboard data with filters for active and attention-needed work.
195
+
Sensitive mode redacts returned text, log/events views, summaries, and web output while hiding web snapshots. Raw transcripts remain local artifacts and should still be treated as sensitive.
196
+
197
+
Task helpers report stale metadata, expired TTLs, exited backing processes, restart counts, readiness diagnostics, and orphan `task-*` sessions. Optional restart policies can restart exited tasks on any exit or only non-zero exit. The web UI surfaces the same dashboard data with filters for active and attention-needed work plus safe task stop/recover/prune controls.
Copy file name to clipboardExpand all lines: docs/usage.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,20 @@ termdeck run main 'echo ok' --json
103
103
104
104
`run` wraps the command with shell markers so the response can separate command output from terminal echo and report `exitCode` when the command completes. The persistent shell still executes the command itself, so stateful operations such as `cd`, exported variables, and shell functions remain in the session.
105
105
106
+
Read the last structured command record:
107
+
108
+
```bash
109
+
termdeck last-command main --json
110
+
```
111
+
112
+
Enable sensitive mode when returned views may contain secrets:
113
+
114
+
```bash
115
+
termdeck sensitive main --on
116
+
```
117
+
118
+
Sensitive mode redacts returned command output, screen/log/events/summary views, and web output. It also hides the web snapshot for that session. The raw local transcript remains an artifact on disk, so keep `TERMDECK_HOME` permissions tight and avoid entering secrets unless necessary.
119
+
106
120
Use `--raw` when a command path needs the original PTY bytes, including ANSI color/control sequences:
107
121
108
122
```bash
@@ -299,7 +313,7 @@ termdeck transcript main
299
313
Task helpers are named TermDeck sessions with small readiness metadata. They do not bypass the daemon or create a separate terminal runner.
300
314
301
315
```bash
302
-
termdeck task start web 'pnpm dev --host 127.0.0.1' --cwd "$PWD" --labels dev,web --ttl-ms 7200000 --ready-port 5173 --autostart
Readiness can be detected with `--ready-url`, `--ready-port`, or `--expect`. When more than one readiness check is supplied, all checks must pass and `task status` reports per-check diagnostics plus a short log tail on failure. Task metadata can include `--owner`, `--labels`, and `--ttl-ms`. Status distinguishes stale metadata, expired TTLs, exited backing processes, and restart counts. If task metadata exists but the backing session is gone, status reports a stale task; `task recover` recreates the session from metadata and reruns the task command. `task dashboard` also reports orphan `task-*` sessions that have no task metadata.
325
+
Readiness can be detected with `--ready-url`, `--ready-port`, or `--expect`. When more than one readiness check is supplied, all checks must pass and `task status` reports per-check diagnostics plus a short log tail on failure. Task metadata can include `--owner`, `--labels`, `--ttl-ms`, and restart policy fields. Status distinguishes stale metadata, expired TTLs, exited backing processes, and restart counts. If task metadata exists but the backing session is gone, status reports a stale task; `task recover` recreates the session from metadata and reruns the task command. `task dashboard` also reports orphan `task-*` sessions that have no task metadata.
326
+
327
+
Restart policies are `never`, `on-exit`, and `on-failure`. Automatic restarts honor `--max-restarts` and `--backoff-ms`.
312
328
313
329
## MCP
314
330
@@ -356,7 +372,7 @@ The browser uses:
356
372
- JSON REST for serialized xterm snapshots
357
373
- binary protobuf WebSocket events for live output after the snapshot sequence
358
374
359
-
The browser loads a serialized xterm snapshot first, then subscribes with `afterSeq=lastSeq`. Reconnects use `afterSeq` to replay events missed during a disconnect while the daemon retains them. The sidebar supports active and attention filters for sessions and tasks; the top dashboard summarizes session count, task count, ready tasks, and attention-needed items.
375
+
The browser loads a serialized xterm snapshot first, then subscribes with `afterSeq=lastSeq`. Reconnects use `afterSeq` to replay events missed during a disconnect while the daemon retains them. The sidebar supports active and attention filters for sessions and tasks; the top dashboard summarizes session count, task count, ready tasks, and attention-needed items. Web task controls can stop, recover, and prune stale/expired tasks, but the browser remains observe-only for PTY input.
0 commit comments