fix: add bounded AgentRun task input drill-down

This commit is contained in:
Codex
2026-07-12 05:34:05 +02:00
parent 3b9dc4c3ef
commit 2680ef6462
8 changed files with 308 additions and 6 deletions
@@ -12,6 +12,7 @@ description: UniDesk AgentRun-backed Code Queue CLI — Skill(cli-spec)。legacy
```bash
bun scripts/cli.ts agentrun get task --limit 20
bun scripts/cli.ts agentrun describe task/<taskId>
bun scripts/cli.ts agentrun describe task/<taskId> --input -o json
bun scripts/cli.ts agentrun events run/<runId> --limit 20
bun scripts/cli.ts agentrun logs session/<sessionId> --tail 120
bun scripts/cli.ts agentrun result command/<commandId> --run <runId>
@@ -28,6 +29,7 @@ AipodSpec/Artificer、task manifest 和 queue 渐进披露见 [references/resour
- 新写入口不要用 `codex submit/steer/resume`;这些 legacy mutation 已冻结。
- 默认输出保持低噪声表格/摘要;机器消费显式 `-o json|yaml``--raw`
- 读取 task 的可重建输入使用 `agentrun describe task/<taskId> --input -o json`;该入口只投影 task create 字段、AipodSpec identity、资源引用和脱敏 provenance,不打印 Secret value。
- Session follow-up 使用 `agentrun send`,由服务端决定内部 steer vs turn。
- 终态失败重试只使用 `agentrun retry task/<taskId>`:保持同一 task,新增不可变 attempt;先用 `--dry-run` 完成服务端全校验,再以同一幂等键执行真实重试。
- retry 只接受 Queue 已处于 `failed``blocked``completed``cancelled` 和其他状态必须 fail closed。不得复制 task、重置 task、引入本地 scheduler/backoff/judge 或直接创建 runner Job 来模拟重试。
@@ -4,6 +4,7 @@
- `agentrun create|apply`:创建 task 或应用 AipodSpec manifest
- `agentrun get|describe`:有界读取列表和详情;
- `agentrun describe task/<taskId> --input -o json`:读取可重建 task 输入、AipodSpec identity、资源引用和脱敏 provenance
- `agentrun events|logs|result`:渐进披露运行证据;
- `agentrun get attempts --task <taskId>`:读取同一 task 的不可变 attempt 历史;
- `agentrun retry task/<taskId> --idempotency-key <key> --reason <text> [--dry-run]`:对终态失败 task 创建下一次 attempt
@@ -17,6 +18,13 @@
- 完整事件使用显式 `--full``--raw`,或按 `item.identity``afterSeq=item.seq-1 --limit 1 --full` 下钻;
- 该 CLI 只渲染 AgentRun durable facts,不删除事件、不按正文去重,也不改变 Kafka/SSE 事件链。
task 输入下钻必须遵守以下边界:
- 默认 `describe task/<taskId>``Next` 必须给出 `--input -o json` 语义化命令;
- `--input` 只读取现有 task durable fact,不创建、复制、retry 或 dispatch task
- 输出固定为 task create 字段、AipodSpec identity、bundle/SecretRef 和脱敏 provenancecredential 只保留 SecretRef 并声明 `valuesPrinted=false`
- 完整服务端资源继续使用显式 `--full -o json``--raw`,禁止提高全局 stdout 阈值来掩盖大输出。
retry 必须遵守以下边界:
- task identity 不变,每次执行使用新的 attempt、run、command 和 runner Job identity