Why
registry.ts:331-337 为 workflow 工具生成的 "Available workflow worker_type values" 动态列表用 mode !== "primary" 过滤(:281),把 build 与 plan 排除在外;但两个运行时权威恰恰依赖它们:
- blocks 编译器默认映射 coding/prototype →
build、plan 块 → plan(packages/opencode/src/dag/blocks.ts:403-407)
NodeSchema.worker_type 描述写明 "Agent type (explore, build, general, plan, or custom)"(packages/opencode/src/dag/validation.ts:191)
三方矛盾:模型按列表无法得知可显式指定 build/plan,而 blocks.md 的 "Omit worker_type unless the exact configured agent name is already known" 让模型更不敢使用列表外名字——显式覆盖 coding 块 worker 的合法路径被文档堵死。
与 #499 划界:#499 修的是 acceptance checklist 白名单与 runtime-compat catalog 对账(验收 harness);本 issue 修运行时工具描述生成(registry.ts)。不同 WHY、不同文件,互不重叠。
Scope
packages/opencode/src/tool/registry.ts 的 describeAgents(:280-291)与 WorkflowTool 分支(:331-337)
Approach
describeAgents 增加显式选项(如 includePrimary),仅 WorkflowTool 分支启用;hidden 过滤保留(compaction/title/summary 仍被排除,primary+hidden 双重身份不泄漏);task 工具的列表行为不变。
Acceptance
- 单测:workflow 工具描述的 worker_type 列表包含
build、plan、explore、general(hidden 的 primary 不出现)
- task 工具描述列表不含
build/plan(行为不变)
bun typecheck(packages/opencode)与相关测试全绿
Why
registry.ts:331-337为 workflow 工具生成的 "Available workflow worker_type values" 动态列表用mode !== "primary"过滤(:281),把build与plan排除在外;但两个运行时权威恰恰依赖它们:build、plan 块 →plan(packages/opencode/src/dag/blocks.ts:403-407)NodeSchema.worker_type描述写明 "Agent type (explore, build, general, plan, or custom)"(packages/opencode/src/dag/validation.ts:191)三方矛盾:模型按列表无法得知可显式指定
build/plan,而 blocks.md 的 "Omit worker_type unless the exact configured agent name is already known" 让模型更不敢使用列表外名字——显式覆盖 coding 块 worker 的合法路径被文档堵死。与 #499 划界:#499 修的是 acceptance checklist 白名单与 runtime-compat catalog 对账(验收 harness);本 issue 修运行时工具描述生成(registry.ts)。不同 WHY、不同文件,互不重叠。
Scope
packages/opencode/src/tool/registry.ts的describeAgents(:280-291)与 WorkflowTool 分支(:331-337)Approach
describeAgents增加显式选项(如includePrimary),仅 WorkflowTool 分支启用;hidden过滤保留(compaction/title/summary 仍被排除,primary+hidden 双重身份不泄漏);task 工具的列表行为不变。Acceptance
build、plan、explore、general(hidden 的 primary 不出现)build/plan(行为不变)bun typecheck(packages/opencode)与相关测试全绿