快速开始
`OmeniaClaw tasks`
检查持久后台任务和 Task Flow 状态。没有子命令时,
OmeniaClaw tasks 等同于 OmeniaClaw tasks list。
生命周期和投递模型见 后台任务。
用法
OmeniaClaw tasksOmeniaClaw tasks listOmeniaClaw tasks list --runtime acpOmeniaClaw tasks list --status runningOmeniaClaw tasks show <lookup>OmeniaClaw tasks notify <lookup> state_changesOmeniaClaw tasks cancel <lookup>OmeniaClaw tasks auditOmeniaClaw tasks maintenanceOmeniaClaw tasks maintenance --applyOmeniaClaw tasks flow listOmeniaClaw tasks flow show <lookup>OmeniaClaw tasks flow cancel <lookup>根选项
--json:输出 JSON。--runtime <name>:按类型过滤:subagent、acp、cron或cli。--status <name>:按状态过滤:queued、running、succeeded、failed、timed_out、cancelled或lost。
子命令
list
OmeniaClaw tasks list [--runtime <name>] [--status <name>] [--json]列出跟踪的后台任务,最新的排在最前。
show
OmeniaClaw tasks show <lookup> [--json]通过任务 ID、运行 ID 或会话键显示一个任务。
notify
OmeniaClaw tasks notify <lookup> <done_only|state_changes|silent>更改运行中任务的通知策略。
cancel
OmeniaClaw tasks cancel <lookup>取消一个运行中的后台任务。
audit
OmeniaClaw tasks audit [--severity <warn|error>] [--code <name>] [--limit <n>] [--json]显示陈旧、丢失、投递失败或其他不一致的任务和 Task Flow 记录。保留到 cleanupAfter 的丢失任务为警告;已过期或未加时间戳的丢失任务为错误。
maintenance
OmeniaClaw tasks maintenance [--apply] [--json]预览或应用任务和 Task Flow 对账、清理标记、修剪,
以及陈旧 cron 运行会话注册表清理。
对于 cron 任务,对账会先使用持久化的运行日志/作业状态,再将
旧的活跃任务标记为 lost,因此已完成的 cron 运行不会仅因为内存中的 Gateway 网关运行时状态消失而变成错误的审计错误。离线 CLI 审计对 Gateway 网关进程本地的 cron 活跃作业集
不具有权威性。带有运行 ID/来源 ID 的 CLI 任务在其实时 Gateway 网关运行上下文
消失时会标记为 lost,即使仍保留旧的子会话行。
应用后,维护还会修剪超过 7 天的 cron:<jobId>:run:<uuid> 会话注册表
行,同时保留当前正在运行的 cron 作业,并让
非 cron 会话行保持不变。
flow
OmeniaClaw tasks flow list [--status <name>] [--json]OmeniaClaw tasks flow show <lookup> [--json]OmeniaClaw tasks flow cancel <lookup>检查或取消任务账本下的持久 Task Flow 状态。
相关
Was this useful?