docs: prefer stdin AgentRun queue handoff
This commit is contained in:
@@ -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`。
|
||||
|
||||
|
||||
@@ -4308,7 +4308,7 @@ export function CodeQueuePage({ microservices, onRaw, apiBaseUrl = "/api", initi
|
||||
h("p", null, "新任务请使用 AgentRun Queue;本页保留历史任务、Trace 和排障查看。"),
|
||||
h("div", { className: "codex-freeze-command-grid" },
|
||||
h("code", null, "bun scripts/cli.ts agentrun v01 queue commander --reader-id cli"),
|
||||
h("code", null, "bun scripts/cli.ts agentrun v01 queue submit --json-file <task.json>"),
|
||||
h("code", null, "bun scripts/cli.ts agentrun v01 queue submit --json-stdin <<'JSON'"),
|
||||
h("code", null, "bun scripts/cli.ts agentrun v01 sessions trace <sessionId> --after-seq 0 --limit 100"),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -4872,11 +4872,11 @@ function legacyQueueFrozenResponse(method: string, targetPath: string, action: s
|
||||
action,
|
||||
replacement: {
|
||||
queueCommander: "bun scripts/cli.ts agentrun v01 queue commander --reader-id cli",
|
||||
queueSubmit: "bun scripts/cli.ts agentrun v01 queue submit --json-file <task.json>",
|
||||
queueDispatch: "bun scripts/cli.ts agentrun v01 queue dispatch <taskId> --json-file <dispatch.json>",
|
||||
queueSubmit: "bun scripts/cli.ts agentrun v01 queue submit --json-stdin <<'JSON'",
|
||||
queueDispatch: "bun scripts/cli.ts agentrun v01 queue dispatch <taskId> --json-stdin <<'JSON'",
|
||||
sessionsTrace: "bun scripts/cli.ts agentrun v01 sessions trace <sessionId> --after-seq 0 --limit 100",
|
||||
sessionsOutput: "bun scripts/cli.ts agentrun v01 sessions output <sessionId> --after-seq 0 --limit 100",
|
||||
sessionsSteer: "bun scripts/cli.ts agentrun v01 sessions steer <sessionId> --prompt-file <path>",
|
||||
sessionsSteer: "bun scripts/cli.ts agentrun v01 sessions steer <sessionId> --prompt-stdin <<'EOF'",
|
||||
sessionsRead: "bun scripts/cli.ts agentrun v01 sessions read <sessionId> --reader-id cli",
|
||||
queueCancel: "bun scripts/cli.ts agentrun v01 queue cancel <taskId> --reason <text>",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user