Add ACP runtime support#287
Conversation
7832129 to
8badc98
Compare
8badc98 to
588a6cf
Compare
Add an Agent Client Protocol runtime backed by @agentclientprotocol/sdk, including custom command and registry-based agent resolution. Thread ACP options through CLI, action, schedule, extraction repair, synthesis, fix-quality, and JSON repair paths so runtime=acp keeps model-backed execution on ACP. Document the new config and add coverage for runtime registration, config resolution, structured helper calls, and usage aggregation. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
588a6cf to
1f4c264
Compare
| throw new Error(`ACP registry agent ${registryId} has no distribution metadata`); | ||
| } | ||
|
|
||
| const npx = (distribution as Record<string, unknown>)['npx']; | ||
| if (npx && typeof npx === 'object') { | ||
| const npxConfig = npx as Record<string, unknown>; | ||
| const packageName = npxConfig['package']; | ||
| const args = npxConfig['args']; | ||
| if (typeof packageName !== 'string') { |
There was a problem hiding this comment.
Bug: Calls to runAuxiliary() for deduplication and fix-evaluation are missing providerOptions, breaking ACP runtime support unless the WARDEN_ACP_COMMAND environment variable is set.
Severity: HIGH
Suggested Fix
Thread the providerOptions through to the runAuxiliary() calls in dedup.ts and judge.ts. This will ensure that the ACP configuration from warden.toml is correctly resolved and used during deduplication and fix-evaluation, aligning their behavior with other runtime paths.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/sdk/runtimes/acp.ts#L128-L136
Potential issue: When the ACP runtime is configured (e.g., `runtime = "acp"`), auxiliary
workflows for deduplication (`dedup.ts`) and fix-evaluation (`judge.ts`) fail to pass
the necessary `providerOptions` to the `runAuxiliary()` function. This causes the ACP
runtime to fall back to requiring the `WARDEN_ACP_COMMAND` environment variable. If this
variable is not set, these operations will fail, ignoring any ACP configuration
specified in `warden.toml`. This breaks ACP support for these critical paths unless a
specific environment variable is manually configured.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1f4c264. Configure here.
| durationMs: Date.now() - startedAt, | ||
| }, | ||
| stderr: stderrChunks.join('').trim() || undefined, | ||
| }; |
There was a problem hiding this comment.
ACP prompt stopReason is silently ignored
Medium Severity
The ACP runSkill always returns status: 'success' regardless of promptResult.stopReason. If the ACP agent stops due to a turn limit, budget constraint, or other non-success reason, the result is still marked as 'success'. This causes downstream analysis to attempt findings extraction on potentially incomplete output, misclassifying what would be a turn_limit or other failure as an extraction failure instead.
Reviewed by Cursor Bugbot for commit 1f4c264. Configure here.


Summary
@agentclientprotocol/sdkruntime = "acp"config and add coverage for ACP runtime/helper lanesVerification
pnpm install --frozen-lockfilepnpm lintpnpm typecheckpnpm buildpnpm testpnpm -C packages/docs buildatlas alta agent runThe guard has a second route now.