Town CLIAgent

town agent status

查看指定 agent 状态

town agent status

查看指定 agent 的进程状态。

这页保留为命令入口。更完整的说明见 CLI / statusAgent 显示 stale

用法

town agent status [path]

行为说明

  • path 默认当前目录 .
  • 目标 agent 需要已登记在受管 agent registry。
  • 输出包含运行状态、进程信息和关键路径。
  • 当状态为 stale 时,会额外输出 stale_reason,说明判定为僵尸状态的具体原因。

相关命令

示例输出(基于当前实现)

以下示例直接对齐 cli/town/src 当前命令实现(含默认输出模式与字段结构),示例值使用占位符表示。

$ town agent status .
town v1.0.0
┌─────────────────────────────────────────────────────────┐
│ OK town agent status                                    │
│   project    : <projectRoot>                           │
│   log        : <daemonLogPath>                         │
│   state      : running                                 │
│   pid        : <pid>                                   │
│   started_at : <isoTimestamp>                          │
└─────────────────────────────────────────────────────────┘
$ town agent status .
town v1.0.0
┌─────────────────────────────────────────────────────────┐
│ WARN town agent status                                  │
│   project      : <projectRoot>                         │
│   log          : <daemonLogPath>                       │
│   state        : stale                                 │
│   stale_pid    : <pid>                                 │
│   stale_reason : <reason>                              │
│   fix          : town agent doctor <projectRoot> --fix  │
└─────────────────────────────────────────────────────────┘