fix: bound AgentRun AipodSpec describe output

This commit is contained in:
Codex
2026-07-12 07:12:31 +02:00
parent be9050df55
commit 9b185634de
5 changed files with 454 additions and 2 deletions
@@ -13,6 +13,7 @@ description: UniDesk AgentRun-backed Code Queue CLI — Skill(cli-spec)。legacy
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 describe aipodspec/<name>
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>
@@ -34,6 +35,14 @@ AipodSpec/Artificer、task manifest 和 queue 渐进披露见 [references/resour
- 该入口只投影 task create 字段、AipodSpec identity、资源引用和脱敏 provenance
- 不打印 Secret value
- `--input``--full``--raw` 互斥,非法组合必须在请求服务端前返回 `validation-failed`
- 读取 AipodSpec
- 默认 `describe aipodspec/<name>` 的 human、JSON 和 YAML 使用同一有界摘要;
- 摘要至少包含:
- identity/hash 与 runtime
- workspace 与主 resource bundle source identity
- 引用计数和脱敏 provenance
- credential 只显示 SecretRef 并固定 `valuesPrinted=false`
- 完整服务端对象只通过显式 `--full -o json``--raw` 下钻。
- 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 来模拟重试。
@@ -5,6 +5,7 @@
- `agentrun create|apply`:创建 task 或应用 AipodSpec manifest
- `agentrun get|describe`:有界读取列表和详情;
- `agentrun describe task/<taskId> --input -o json`:读取可重建 task 输入、AipodSpec identity、资源引用和脱敏 provenance
- `agentrun describe aipodspec/<name>`:读取同构、有界且 SecretRef-only 的 AipodSpec 摘要;
- `agentrun events|logs|result`:渐进披露运行证据;
- `agentrun get attempts --task <taskId>`:读取同一 task 的不可变 attempt 历史;
- `agentrun retry task/<taskId> --idempotency-key <key> --reason <text> [--dry-run]`:对终态失败 task 创建下一次 attempt
@@ -18,6 +19,18 @@
- 完整事件使用显式 `--full``--raw`,或按 `item.identity``afterSeq=item.seq-1 --limit 1 --full` 下钻;
- 该 CLI 只渲染 AgentRun durable facts,不删除事件、不按正文去重,也不改变 Kafka/SSE 事件链。
AipodSpec describe 必须遵守以下边界:
- 默认 human、`-o json``-o yaml` 从同一摘要投影渲染;
- 摘要至少包含:
- identity/hash 与 lane/profile/provider
- workspaceRef 与主 resource bundle source identity
- bundle/required skill/credential 引用计数;
- 脱敏 provenance
- credential 只保留 SecretRef 名称、namespace、keys 和安全 projection 字段,固定 `valuesPrinted=false`
- 默认输出必须保留 `--full -o json``--raw` 语义化下钻,禁止读取临时 dump 再二次裁剪;
- 显式完整路径继续返回服务端完整对象,禁止提高全局 stdout 阈值掩盖默认输出缺陷。
task 输入下钻必须遵守以下边界:
- 默认 `describe task/<taskId>``Next` 必须给出 `--input -o json` 语义化命令;