docs: Queue 输入优先使用 stdin heredoc

This commit is contained in:
Codex
2026-06-10 13:07:10 +08:00
parent 85c5e319f4
commit 45df61bd02
3 changed files with 38 additions and 14 deletions
+4 -2
View File
@@ -15,6 +15,8 @@ scripts/src/*.ts
CLI 默认输出 JSON。空 stdout 是失败,不是成功。每个命令都必须返回足够继续排障的结构化信息,包括 id、status、log path 或后续命令。
一次性 JSON body 优先通过 `--json-stdin` 和 quoted heredoc 输入;不要为了把 heredoc/stdin 内容传给 CLI 而先落临时 JSON dump 文件。`--json-file` 只用于可复用、已受控的输入文件。
长操作必须是 fire-and-forget 或短异步资源操作。CLI 调用应在 60 秒内返回。创建 run 或启动 runner 的命令返回创建出的资源和轮询命令,不等待模型 turn 完成。
## 常用命令
@@ -22,12 +24,12 @@ CLI 默认输出 JSON。空 stdout 是失败,不是成功。每个命令都必
`v0.1` 常用命令族:
```bash
./scripts/agentrun runs create --json-file <run.json>
./scripts/agentrun runs create --json-stdin|--json-file <run.json>
./scripts/agentrun runs show <runId>
./scripts/agentrun runs events <runId> --after-seq <n> --limit <n>
./scripts/agentrun runs result <runId> [--command-id <commandId>]
./scripts/agentrun runs cancel <runId> [--reason <text>]
./scripts/agentrun commands create <runId> --type turn|steer|interrupt --json-file <payload.json>
./scripts/agentrun commands create <runId> --type turn|steer|interrupt --json-stdin|--json-file <payload.json>
./scripts/agentrun commands show <commandId> --run-id <runId>
./scripts/agentrun commands result <commandId> --run-id <runId>
./scripts/agentrun commands cancel <commandId> [--reason <text>]