修复 queue dry-run 与默认摘要输出
This commit is contained in:
@@ -59,15 +59,15 @@ CLI 官方 TypeScript 入口固定为 `scripts/agentrun-cli.ts`。在 G14 非交
|
||||
./scripts/agentrun server status [--port <port>]
|
||||
./scripts/agentrun server logs [--port <port>] [--tail-bytes <bytes>] [--log-file <path>]
|
||||
./scripts/agentrun server stop [--port <port>]
|
||||
./scripts/agentrun queue submit --json-file <task.json>
|
||||
./scripts/agentrun queue list [--queue <queue>] [--state <state>] [--cursor <cursor>] [--limit <limit>]
|
||||
./scripts/agentrun queue show <taskId>
|
||||
./scripts/agentrun queue submit --json-file <task.json> [--dry-run]
|
||||
./scripts/agentrun queue list [--queue <queue>] [--state <state>] [--cursor <cursor>] [--limit <limit>] [--full|--raw]
|
||||
./scripts/agentrun queue show <taskId> [--full|--raw]
|
||||
./scripts/agentrun queue stats [--queue <queue>]
|
||||
./scripts/agentrun queue commander [--queue <queue>]
|
||||
./scripts/agentrun queue read <taskId>
|
||||
./scripts/agentrun queue cancel <taskId> [--reason <text>]
|
||||
./scripts/agentrun queue dispatch <taskId> [--json-file <dispatch.json>]
|
||||
./scripts/agentrun queue refresh <taskId>
|
||||
./scripts/agentrun queue commander [--queue <queue>] [--reader-id <reader>] [--limit <display-limit>] [--full|--raw]
|
||||
./scripts/agentrun queue read <taskId> [--reader-id <reader>] [--dry-run] [--full|--raw]
|
||||
./scripts/agentrun queue cancel <taskId> [--reason <text>] [--dry-run] [--full|--raw]
|
||||
./scripts/agentrun queue dispatch <taskId> [--json-file <dispatch.json>] [--dry-run] [--full|--raw]
|
||||
./scripts/agentrun queue refresh <taskId> [--dry-run] [--full|--raw]
|
||||
./scripts/agentrun sessions ps [--state default|running|unread|terminal|idle|all] [--profile codex|deepseek|minimax-m3|dsflash-go|M3] [--reader-id <reader>]
|
||||
./scripts/agentrun sessions show <sessionId> [--reader-id <reader>]
|
||||
./scripts/agentrun sessions turn [sessionId] --json-file <run-base.json> --prompt-file <file> [--profile codex|deepseek|minimax-m3|dsflash-go|M3] [--runner-json-file <job.json>] [--no-runner-job]
|
||||
@@ -95,9 +95,11 @@ CLI 官方 TypeScript 入口固定为 `scripts/agentrun-cli.ts`。在 G14 非交
|
||||
- `secrets codex render --dry-run` 返回 Codex stdio profile Secret 创建计划、输入文件 bytes/hash、SecretRef、manifest 摘要和 apply 命令形状;`--profile codex` 默认 Secret name 为 `agentrun-v01-provider-codex`,`--profile deepseek` 默认 Secret name 为 `agentrun-v01-provider-deepseek`,`--profile minimax-m3` 默认 Secret name 为 `agentrun-v01-provider-minimax-m3`,`--profile dsflash-go` 默认 Secret name 为 `agentrun-v01-provider-dsflash-go` 并包含 `model-catalog.json`;它不得输出 Secret value 或执行 Kubernetes 写操作。
|
||||
- `provider-profiles` 命令族调用 manager REST 管理 API,覆盖 profile status、删除、API Key 写入和 canary 验证。`set-key --key-stdin` 从 stdin 读取 API Key,响应只显示 SecretRef、resourceVersion、hash 后缀和 failureKind;不得输出 key、Codex auth/config 或 Secret data。
|
||||
- `backends list` 必须显示 `codex`、`deepseek`、`minimax-m3` 与 `dsflash-go` profile 的 backendKind、protocol、transport、command、requiredSecretKeys 和状态;`dsflash-go` 的 `requiredSecretKeys` 必须包含 `model-catalog.json`;已配置的动态 provider profile(例如 `hy`)必须同样可见,并带动态 discovery 状态;不得因为某个 provider Secret 尚未配置就隐藏 capability。
|
||||
- `queue dispatch` 是 Q2 的受控手动调度入口,只对单个 task 显式创建 attempt 和 Core run/command/runner job;不得伪装成自动 scheduler。
|
||||
- `queue refresh` 只根据 Queue task 中保存的 Core run/command 引用回写 Queue attempt 状态,不读取 Core trace 反推 commander 或统计。
|
||||
- `queue show` 必须返回 task/attempt summary、state、read cursor、stats 相关字段和 `sessionPath`;不得返回或代理完整 output/trace。
|
||||
- `queue submit/read/cancel/dispatch/refresh --dry-run` 必须只返回 non-mutating plan,固定 `dryRun=true`、`mutation=false`,不得创建 task、mark read、cancel、dispatch、refresh 或启动 runner job。
|
||||
- `queue dispatch` 是 Q2 的受控手动调度入口,只对单个 task 显式创建 attempt 和 Core run/command/runner job;不得伪装成自动 scheduler;带 `--dry-run` 时只读取 task 并展示将要 POST 的路径和有界 request 摘要。
|
||||
- `queue refresh` 只根据 Queue task 中保存的 Core run/command 引用回写 Queue attempt 状态,不读取 Core trace 反推 commander 或统计;带 `--dry-run` 时不得写回状态。
|
||||
- `queue list/show/commander` 默认返回低噪声 summary,只显示 task/attempt/session ids、state、read cursor、stats 相关字段和 drill-down 命令;需要完整 task payload、resource bundle 或 metadata 时显式使用 `--full|--raw`。
|
||||
- `queue show` 不得返回或代理完整 output/trace;输出和 trace 只能通过返回的 `sessionPath` 对应 `sessions ...` 命令查询。
|
||||
- `sessions ps` 默认只显示 running 和 unread session;`--state all` 才显示历史 read session,避免旧 session 噪声淹没当前进度。
|
||||
- `sessions turn` 是异步 subagent 的受控 CLI 入口:短返回 run、command、runnerJob 和后续 poll/read/steer/cancel 命令,不等待模型完成。`--profile M3` 是 `minimax-m3` 的 CLI alias;profile 仍写入 canonical `backendProfile`,不得 fallback。
|
||||
- `sessions steer` 对当前 active run 创建 `type=steer` command;`sessions cancel` 通过 Session control 取消 active command 或 run;`sessions read` 写入 reader cursor,使 terminal session 从默认 ps 中消失。
|
||||
|
||||
@@ -77,15 +77,15 @@ Queue task 详情必须返回 session 引用,而不是代理输出或 trace:
|
||||
AgentRun CLI 必须提供 Queue 和 Session 两组命令。Queue 命令只操作队列资源:
|
||||
|
||||
```bash
|
||||
./scripts/agentrun queue submit --json-file <task.json>
|
||||
./scripts/agentrun queue list [--queue <queue>] [--state <state>] [--cursor <cursor>] [--limit <limit>]
|
||||
./scripts/agentrun queue show <taskId>
|
||||
./scripts/agentrun queue submit --json-file <task.json> [--dry-run]
|
||||
./scripts/agentrun queue list [--queue <queue>] [--state <state>] [--cursor <cursor>] [--limit <limit>] [--full|--raw]
|
||||
./scripts/agentrun queue show <taskId> [--full|--raw]
|
||||
./scripts/agentrun queue stats [--queue <queue>]
|
||||
./scripts/agentrun queue commander [--queue <queue>]
|
||||
./scripts/agentrun queue read <taskId>
|
||||
./scripts/agentrun queue cancel <taskId> [--reason <text>]
|
||||
./scripts/agentrun queue dispatch <taskId> [--json-file <dispatch.json>]
|
||||
./scripts/agentrun queue refresh <taskId>
|
||||
./scripts/agentrun queue commander [--queue <queue>] [--reader-id <reader>] [--limit <display-limit>] [--full|--raw]
|
||||
./scripts/agentrun queue read <taskId> [--reader-id <reader>] [--dry-run] [--full|--raw]
|
||||
./scripts/agentrun queue cancel <taskId> [--reason <text>] [--dry-run] [--full|--raw]
|
||||
./scripts/agentrun queue dispatch <taskId> [--json-file <dispatch.json>] [--dry-run] [--full|--raw]
|
||||
./scripts/agentrun queue refresh <taskId> [--dry-run] [--full|--raw]
|
||||
```
|
||||
|
||||
Session 命令负责输出、trace 和会话控制:
|
||||
@@ -101,7 +101,7 @@ Session 命令负责输出、trace 和会话控制:
|
||||
./scripts/agentrun sessions read <sessionId> [--reader-id <reader>]
|
||||
```
|
||||
|
||||
不得新增 `queue output`、`queue trace` 或 `queue session/*` 这类子路径代理。`queue show` 最多打印 `sessionPath` 和下一步 `sessions ...` 命令。
|
||||
不得新增 `queue output`、`queue trace` 或 `queue session/*` 这类子路径代理。`queue list/show/commander` 默认输出低噪声 summary,最多打印 task/attempt/session ids、状态、统计、`sessionPath` 和下一步 `sessions ...` 命令;完整 payload/resource bundle/metadata 只能通过显式 `--full|--raw` 展开。Queue mutation 命令带 `--dry-run` 时必须只返回 `mutation=false` 的计划,不得写 Queue、Core run/command 或 runner job。
|
||||
|
||||
## 数据模型方向
|
||||
|
||||
@@ -160,7 +160,8 @@ Queue Q2 的真实手动验收必须覆盖以下稳定边界:
|
||||
- `queue submit` 只创建 Queue task,不触发自动 scheduler。
|
||||
- `queue dispatch` 是受控手动调度入口,必须创建 Core run、command 和 runner job,并把 attempt 引用写回 Queue task。
|
||||
- `queue refresh` 只读取 Queue task 保存的 run/command 引用,将 Core 终态回写到 Queue task 和 latestAttempt;不得读取 Core trace、Session trace 或 events 来反推 Queue stats/commander。
|
||||
- `queue show/list/stats/commander` 的统计口径必须来自 Queue 模型;输出、trace 和会话控制继续由 Session API/CLI 承接。
|
||||
- `queue submit/read/cancel/dispatch/refresh --dry-run` 必须只返回计划,不得改变 task state、read cursor、attempt、run、command 或 runner job。
|
||||
- `queue show/list/stats/commander` 的统计口径必须来自 Queue 模型;默认输出必须有界,输出、trace 和会话控制继续由 Session API/CLI 承接。
|
||||
- 综合联调里的 `workspaceRef` 必须是 runner 实际可访问且能启动 backend command 的工作区。`opaque` workspace 可用于不依赖 Git checkout 的最小 Queue dispatch 验收;`host-path` 只有在该 path 在 runner 容器/进程内可访问且不破坏 Codex command resolution 时才能作为通过证据。
|
||||
- 因 workspace 形态导致的 backend command spawn 失败,应归类为 runtime workspace/command 一致性问题,不能误判为 Queue dispatch 或 Queue refresh 失败。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user