feat(ui): configure maxParallelToolCalls for factory-created agents

The acp and stdio-agent plugins only forwarded `model` into their created
agents, so every factory/ACP deployment was pinned to the agent-loop default
parallel cap with no cordis.yml override. Add a `maxParallelToolCalls` config
field (positive-integer validated) to both, threaded through the existing
per-agent options path — symmetric with `model`.
This commit is contained in:
Dudu-0223
2026-07-14 11:55:39 +08:00
parent 8c8e5fdd24
commit eae8b8ce2e
7 changed files with 50 additions and 3 deletions

View File

@@ -18,6 +18,12 @@ Requires: `agents` · `sessions` · `sessionPersistence` · `tools` · `userInte
export interface AcpConfig {
/** Model name for created agents (must have a registered adapter). */
model?: string
/**
* Maximum tool calls each created agent runs concurrently within one assistant
* step (a positive integer; the agent loop defaults it when omitted). `1`
* preserves fully serial execution.
*/
maxParallelToolCalls?: number
/**
* Transport stream override. Production omits this (the plugin wires
* `process.stdin`/`process.stdout` via `ndJsonStream`). Tests inject an
@@ -591,6 +597,12 @@ Source: [`packages/skill/skill-local/src/index.ts:39`](../packages/skill/skill-l
export interface Config {
/** Model name for the `main` agent (must have a registered adapter). */
model: string
/**
* Maximum tool calls the `main` agent runs concurrently within one assistant
* step (a positive integer; the agent loop defaults it when omitted). `1`
* preserves fully serial execution.
*/
maxParallelToolCalls?: number
/** Deployment persona (the system-prompt plugin's `persona` config). */
persona?: string
/** Explicit model-facing tool order (the system-prompt plugin's `toolOrder` config; see dsh-system-prompt). */