docs: prefer stdin AgentRun queue handoff

This commit is contained in:
Codex
2026-06-10 05:32:59 +00:00
parent 0a8a8396d8
commit 9710a1a6f6
3 changed files with 16 additions and 6 deletions
+12 -2
View File
@@ -18,7 +18,17 @@ description: UniDesk legacy Code Queue archive CLI — `codex` 子命令只保
bun scripts/cli.ts agentrun v01 queue commander --reader-id <id>
# 提交 AgentRun Queue payload
bun scripts/cli.ts agentrun v01 queue submit --json-file /tmp/task.json
bun scripts/cli.ts agentrun v01 queue submit --json-stdin <<'JSON'
{
"tenantId": "unidesk",
"projectId": "example",
"queue": "commander",
"title": "任务标题",
"payload": {
"prompt": "任务说明"
}
}
JSON
# 查看/控制 AgentRun session
bun scripts/cli.ts agentrun v01 sessions trace <sessionId>
@@ -28,7 +38,7 @@ bun scripts/cli.ts agentrun v01 sessions steer <sessionId> --prompt-stdin
bun scripts/cli.ts agentrun v01 sessions cancel <sessionId>
```
UniDesk bridge 会把本地 `--json-file``--prompt-file``--runner-json-file``--prompt-stdin` materialize 到 G14 `/root/agentrun-v01` 临时文件,然后调用官方 `./scripts/agentrun --manager-url auto`。它不是旧 Code Queue adapter,不双写,也不迁移旧历史。
日常一次性 JSON、prompt 和 runner JSON 输入优先使用 quoted heredoc/stdin`--json-stdin``--prompt-stdin``--runner-json-stdin``--*-file -`。UniDesk bridge 会把 stdin 直通 G14 `/root/agentrun-v01` 官方 `./scripts/agentrun --manager-url auto` CLI,不先落 dump 文件;`--json-file``--prompt-file``--runner-json-file` 只用于已审阅且可复用的受控文件。它不是旧 Code Queue adapter,不双写,也不迁移旧历史。
AgentRun Queue payload 需要 runner 内使用 UniDesk SSH 透传时,只通过 `executionPolicy.secretScope.toolCredentials[].tool=unidesk-ssh` 请求 `agentrun-v01-tool-unidesk-ssh/UNIDESK_SSH_CLIENT_TOKEN` SecretRef;不要把 token 写入 prompt、payload 或 `transientEnv`。非敏感 endpoint 使用 `UNIDESK_MAIN_SERVER_IP``UNIDESK_MAIN_SERVER_HOST``UNIDESK_FRONTEND_URL`,可由 runner-job `transientEnv` 显式提供;G14 `agentrun-v01` manager 也会在缺省时按受控默认值自动补齐,并在 trace 中只显示 env name/count/hash 与 `valuesPrinted=false`