Skip to content

feat(acp): add remote ACP prototype - #1559

Merged
gricha merged 6 commits into
mainfrom
feat/remote-acp-prototype
Aug 14, 2026
Merged

feat(acp): add remote ACP prototype#1559
gricha merged 6 commits into
mainfrom
feat/remote-acp-prototype

Conversation

@gricha

@gricha gricha commented Aug 14, 2026

Copy link
Copy Markdown
Member

Add an opt-in ACP v1 Streamable HTTP endpoint so external ACP clients can use
Junior through a URL and personal token. The prototype supports initialization,
private session creation, text prompts through the existing API Turn mailbox,
durable assistant updates, and reconnect/load replay.

This stays remote-only. It adds no stdio mode, agent registry, client workspace
bridge, or separate runtime path. ACP reuses Junior's personal-token auth,
Actor and Conversation access, mailbox, worker, event store, and visible Message
projection. The experimental endpoint is off by default and currently supports
one Node process.

The official SDK loopback smoke and integration coverage exercise auth,
ownership, idempotency, failure mapping, disconnect recovery, and replay. A
named Cloudflare tunnel run and direct T3 Code or Zed acceptance remain
promotion gates rather than claimed support in this prototype.

Refs #1525

@gricha
gricha marked this pull request as ready for review August 14, 2026 12:28
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 14, 2026 5:07pm

Request Review

@github-actions

Copy link
Copy Markdown

Dashboard visual evidence

No matching dashboard scenarios for this diff.

Comment thread packages/junior/src/api/acp/route.ts

@sentry-junior sentry-junior Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge and iterate on. This delivers the issue's core vertical slice behind an explicit opt-in: authenticated remote HTTP, private Conversation ownership, shared mailbox/worker execution, durable completion, and reconnect/load replay. The integration coverage exercises the important auth, isolation, idempotency, failure, and disconnect paths.

The remaining #1525 items—active Turn cancellation, a real external-client acceptance run, richer updates, and multi-process transport—are clearly documented as promotion gates rather than implied support, so I would not block this prototype on them.

Comment thread packages/junior/src/chat/api-turns/work.ts
Comment thread packages/junior/src/chat/api-turns/work.ts Outdated

@sentry-junior sentry-junior Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cancellation gap from #1525 is addressed now. session/cancel reaches the active agent run, records a durable cancelled Turn, returns the ACP cancelled stop reason, and releases the session for a later prompt. The follow-up also closes the auth-pause/disconnect and late-cancel race windows, with integration coverage for cancellation plus continued use of the session. Looks good to merge and iterate on.

Comment thread packages/junior/scripts/acp-local-server.ts
Comment thread packages/junior/src/chat/api-turns/cancellation.ts Outdated
Comment thread packages/junior/src/chat/api-turns/work.ts Outdated
Comment thread scripts/acp-local.mjs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8280e21. Configure here.

} finally {
if (args.signal) {
args.cancellation?.finish(args.conversationId, args.signal);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cancel lost-lease releases live slot

Medium Severity

completeCancelledApiTurn now always finishes the cancellation slot in a finally block, including when persist or lifecycle finalization fails, and the worker maps a later ack TurnInputCommitLostError to lost_lease. That drops the in-process abort slot while mailbox work is still unacked, so a follow-up session/prompt or the lease-owning retry can begin and run the agent on a Turn that was already closed as cancelled.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8280e21. Configure here.

@gricha
gricha merged commit 117fc9d into main Aug 14, 2026
36 checks passed
@gricha
gricha deleted the feat/remote-acp-prototype branch August 14, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants