feat(coding-agent): added opt-in task prewalk and tightened --tools and xdev behavior
- Added a `task.prewalk` option (default `false`), removed default task `prewalk` flags, and updated prewalk resolution so bunded generic task execution only prewalks when explicitly enabled. - Enforced strict `--tools` validation in CLI parsing, making unknown tool names fail fast with `CliUsageError` instead of being silently filtered. - Migrated legacy discovery settings (`tools.discoveryMode`, `tools.essentialOverride`, MCP discovery keys) into updated `tools.xdev` handling with preserved explicit override behavior. - Hardened xdev/ACP execution flow by capping `docsAll` payloads with overflow listing and remapping `xd://` dispatches/approval gating for correct execute/read behavior and reduced duplicate prompts.
This commit is contained in:
@@ -2309,12 +2309,15 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
||||
// Per-agent prewalk: the agent definition's `prewalk` frontmatter or the
|
||||
// `task.agentPrewalk` settings override hands the subagent off to a
|
||||
// fast/cheap target at its first edit/write — the same mechanism as the
|
||||
// session-level --prewalk. Resolution failures skip prewalk instead of
|
||||
// failing the spawn.
|
||||
// session-level --prewalk. The bundled generic `task` agent has no
|
||||
// frontmatter default; the `task.prewalk` toggle (default off) arms it.
|
||||
// Resolution failures skip prewalk instead of failing the spawn.
|
||||
let prewalk: Prewalk | undefined;
|
||||
const genericTaskPrewalk =
|
||||
agent.source === "bundled" && agent.name === "task" && settings.get("task.prewalk") ? true : undefined;
|
||||
const prewalkPattern = resolveAgentPrewalkPattern({
|
||||
settingsOverride: settings.get("task.agentPrewalk")[agent.name],
|
||||
agentPrewalk: agent.prewalk,
|
||||
agentPrewalk: agent.prewalk ?? genericTaskPrewalk,
|
||||
});
|
||||
if (prewalkPattern) {
|
||||
const resolvedPrewalk = resolveModelOverride([prewalkPattern], modelRegistry, settings);
|
||||
|
||||
Reference in New Issue
Block a user