feat: add live executor observability

This commit is contained in:
liujing
2026-07-17 00:48:52 +08:00
parent 3566a73a03
commit c9d76d8f58
13 changed files with 1546 additions and 28 deletions
+32
View File
@@ -119,6 +119,38 @@ Display current workflow status.
agent-workflow status --run <run-id> [--json]
```
When the workflow is executing, additional live fields are shown:
- **Executor PID** — process ID of the running executor
- **Elapsed** — running time
- **Activity** — current operation being performed
- **Last activity** — timestamp of most recent output
- **Log bytes** — bytes written to the attempt log so far
- **Live log** — path to the streaming log file
### `agent-workflow logs`
Tail and follow live executor output for a running workflow.
```bash
agent-workflow logs --run <run-id> [--follow] [--tail <lines>]
```
- **`--follow` / `-f`** — continuously follow new output. Automatically switches to new retry attempt logs when a retry begins.
- **`--tail <lines>`** — number of lines to show from the end of the current log (default: 50).
Examples:
```bash
# Show the last 50 lines of the current attempt log
agent-workflow logs --run <run-id>
# Follow new output (like tail -f)
agent-workflow logs --run <run-id> --follow
# Show the last 200 lines
agent-workflow logs --run <run-id> --tail 200
```
### `agent-workflow abort`
Terminate an active workflow.