From b70bbc616f5cba343c7e0a53e0f35b9dd8250321 Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 14 Jul 2026 04:01:10 +0200 Subject: [PATCH] fix: default Artificer to direct dispatch --- .agents/skills/unidesk-code-queue/SKILL.md | 3 +-- .../skills/unidesk-code-queue/references/resources.md | 9 ++++----- docs/reference/agentrun.md | 8 ++++---- scripts/src/agentrun/rest-bridge.ts | 1 - 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.agents/skills/unidesk-code-queue/SKILL.md b/.agents/skills/unidesk-code-queue/SKILL.md index a344f422..fcf551fb 100644 --- a/.agents/skills/unidesk-code-queue/SKILL.md +++ b/.agents/skills/unidesk-code-queue/SKILL.md @@ -28,8 +28,7 @@ bun scripts/cli.ts agentrun create task \ --repo \ --ref \ --mdtodo-id \ - --prompt-stdin \ - --dry-run + --prompt-stdin ``` 资源命令的 Target 规则: diff --git a/.agents/skills/unidesk-code-queue/references/resources.md b/.agents/skills/unidesk-code-queue/references/resources.md index b55604f2..514937ea 100644 --- a/.agents/skills/unidesk-code-queue/references/resources.md +++ b/.agents/skills/unidesk-code-queue/references/resources.md @@ -23,12 +23,11 @@ bun scripts/cli.ts agentrun create task \ --repo \ --ref \ --mdtodo-id \ - --prompt-stdin \ - --dry-run + --prompt-stdin ``` -- 先用同一命令保留 `--dry-run` 查看完整计划; -- dry-run 与 live 都必须先经 owning YAML 选中的 Target `trans` 重入; +- 默认直接执行 live 单命令;不要把 `--dry-run` 作为派单前置步骤; +- live 必须先经 owning YAML 选中的 Target `trans` 重入并完成只读 preflight; - preflight 必须验证: - task worktree 是 Git 根目录且 clean; - origin 与 `--repo` 一致; @@ -41,7 +40,7 @@ bun scripts/cli.ts agentrun create task \ - session identity; - provider/tool SecretRef 的对象、key 与 presence; - preflight 失败固定 `mutation=false`,不得创建 task; -- live 在 submit 成功后自动 dispatch,不要求用户再运行第二条命令; +- preflight 通过后在同一命令内 submit 并自动 dispatch,不要求用户再运行第二条命令; - 未显式传 `--idempotency-key` 时,由 Target/repo/ref/MDTODO/verified commit 派生稳定键; - 幂等重试遇到已有 running 或 terminal task 时,返回既有 attempt/run/session,不重复 dispatch; - 最终输出必须包含 task、attempt、run、command、runner 和 session identity。 diff --git a/docs/reference/agentrun.md b/docs/reference/agentrun.md index d32467b5..c3b2e50d 100644 --- a/docs/reference/agentrun.md +++ b/docs/reference/agentrun.md @@ -244,12 +244,12 @@ bun scripts/cli.ts agentrun create task \ --repo \ --ref \ --mdtodo-id \ - --prompt-stdin \ - --dry-run + --prompt-stdin ``` -- dry-run 与 live 都先经 Target `trans` 重入并执行 source/worktree/Aipod/SecretRef 预检; -- live 的 submit 成功后自动 dispatch; +- 默认直接执行 live 单命令,不把 `--dry-run` 作为派单前置步骤; +- live 先经 Target `trans` 重入并执行 source/worktree/Aipod/SecretRef 只读预检; +- 预检通过后在同一命令内 submit 并自动 dispatch; - 幂等重试不得重复创建 attempt 或重复 dispatch; - UniDesk 不实现 AgentRun queue 协议,也不把 task double-write 回旧 Code Queue。 diff --git a/scripts/src/agentrun/rest-bridge.ts b/scripts/src/agentrun/rest-bridge.ts index 596202ab..cc260486 100644 --- a/scripts/src/agentrun/rest-bridge.ts +++ b/scripts/src/agentrun/rest-bridge.ts @@ -667,7 +667,6 @@ function targetTaskPreflightFromArgs(args: string[], aipod: string): AgentRunTar mutation: false, recoveryActions: [ "修复错误后用同一条 create task 命令重新执行;失败预检不会创建 task。", - "先保留 --dry-run 查看 Target、source、workspaceRef、resourceBundleRef、session 与 SecretRef 摘要。", ], valuesPrinted: false, },