Skip to content

fix(acp): include commands in permission requests#912

Open
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/acp-approval-command-display
Open

fix(acp): include commands in permission requests#912
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/acp-approval-command-display

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Jun 19, 2026

Copy link
Copy Markdown

Related Issue

Resolve #800

Problem

ACP permission requests for shell approvals only exposed generic tool/action text such as Bash or Requesting approval to run command. That leaves ACP clients without the concrete command they need to display the approval or match it against allow/deny policies.

What changed

  • Include the concrete shell command as the first text content block in command approval payloads.
  • Mark command permission tool calls as kind: "execute" and include structured rawInput for command, cwd, description, and language when present.
  • Keep diff/file_io/plan_review approval payloads on their existing displayBlockToAcpContent path.
  • Add a patch changeset for @moonshot-ai/kimi-code.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Added .changeset/acp-approval-command-display.md for @moonshot-ai/kimi-code.
  • No docs update needed; this keeps the existing ACP permission flow and fixes the payload detail.

Test Plan

  • pnpm --filter @moonshot-ai/acp-adapter test -- approval.test.ts approval-display.test.ts
  • pnpm --filter @moonshot-ai/acp-adapter typecheck
  • pnpm exec oxlint --type-aware packages/acp-adapter/src/approval.ts packages/acp-adapter/test/approval.test.ts packages/acp-adapter/test/approval-display.test.ts
  • pnpm --filter @moonshot-ai/acp-adapter build
  • pnpm run build:packages
  • Subagent review: no blocking findings.

AI Assistance Disclosure

I used Codex to review the changes, sanity-check the implementation against existing patterns, and help spot potential edge cases.

@changeset-bot

changeset-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c43f150

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tt-a1i tt-a1i marked this pull request as ready for review June 19, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACP authorization responses return only "bash" — makes automatic authorization impossible

1 participant