Skip to content

Add dormant ACP interaction foundation - #2182

Merged
simple-agent-manager[bot] merged 18 commits into
mainfrom
sam/implement-ship-slice-dormant-bdptty
Sep 29, 2026
Merged

simple-agent-manager[bot] merged 18 commits into
mainfrom
sam/implement-ship-slice-dormant-bdptty

Conversation

@simple-agent-manager

@simple-agent-manager simple-agent-manager Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements slice A of the durable ACP interactions foundation as a dormant Cloudflare path. The feature remains disabled by default through ACP_INTERACTIONS_ENABLED=false and does not activate permission/form/URL UI or runtime emission.

This adds:

  • Shared Valibot ACP interaction contracts, protocol defaults, and VM-agent fixture coverage.
  • A per-chat InteractionStore SQLite Durable Object with encrypted request detail and encrypted answer/decision storage, answer idempotency/body-hash binding, delivery state separation, alarm-driven projection/delivery/purge/compaction, and session cleanup hooks.
  • Worker runtime callback create/settle routes using workspace callback JWT identity and server-resolved project/chat/session binding.
  • Browser snapshot/detail/answer routes with project capability checks, session-creator gated detail/mutation, exact Origin guard, no-store decrypted detail responses, and generic noncreator snapshots.
  • A dedicated no-wake answer delivery service that uses nodeAgentRequest(..., recoverContainerOnTimeout: false) and does not import prompt-delivery recovery code.
  • Source-safe acp_interaction attention projection and legacy attention resolve/expiry guards so ACP interaction markers cannot be answered through prompt forwarding.
  • VM-agent dormant answer endpoint/capability fixture for low-level answer receipt without activating interaction creation.
  • v21 Durable Object migration and generated config compatibility updates.

Agent Preflight

  • Preflight completed before code changes

Classifications:

  • external-api-change
  • cross-component-change
  • business-logic-change
  • public-surface-change
  • docs-sync-change
  • security-sensitive-change
  • ui-change
  • infra-change

External References

N/A: This slice uses existing repository Cloudflare Worker, Durable Object, Valibot, auth, and vm-agent patterns; no external API contract changed.

Codebase Impact Analysis

Touches apps/api Worker routes/services/Durable Objects, packages/shared contracts/defaults, packages/vm-agent dormant receipt endpoint/capability fixture, scripts/quality migration expectations, tests/fixtures, .env.example, and .claude/skills/env-reference/SKILL.md. The feature is dormant by default and does not change current UI or runtime permission creation behavior.

Documentation & Specs

Updated apps/api/.env.example and .claude/skills/env-reference/SKILL.md for the new optional ACP interaction controls. The task state in tasks/active/2026-09-29-dormant-acp-interactions-foundation.md records scope, evidence, and local validation limits. No public user-facing capability documentation was added because slice A does not activate ACP permission/form/URL UI.

Constitution & Risk Check

Checked Principle XI and security-sensitive paths: ACP limits/timeouts have shared defaults with typed env overrides; only the dormant feature flag is in wrangler to avoid Worker text-binding overflow. Request detail and answer decisions are encrypted at rest with the existing generated Worker encryption key path; browser answer writes require auth, task:write, session creator, and exact Origin checks; runtime answer delivery explicitly disables container recovery/wake.

Validation

  • pnpm typecheck
  • pnpm lint (passes with pre-existing warnings in packages/acp-client and apps/web)
  • pnpm --filter @simple-agent-manager/api typecheck
  • pnpm --filter @simple-agent-manager/api lint
  • pnpm --filter @simple-agent-manager/api test -- tests/acp-interaction-delivery.test.ts
  • pnpm --filter @simple-agent-manager/shared typecheck
  • pnpm vitest run scripts/quality/do-migration-compatibility.test.ts scripts/quality/go-toolchain-floor.test.ts scripts/quality/check-runtime-boundary-semantics.test.ts

Local limitations to confirm in CI/staging:

  • The current container has no Go toolchain or gofmt, so VM-agent Go compilation/formatting needs CI/toolchain confirmation.
  • @cloudflare/vitest-pool-workers tests stall at startup in this container, including an existing attention-markers test; the new acp-interaction-store worker test is included for CI/staging confirmation.

Specialist review notes

  • Cloudflare: v21 appends InteractionStore only; generated migration compatibility passes and wrangler keeps only the dormant feature flag to stay below Worker text-binding guard.
  • Security: arbitrary request/answer detail is AES-GCM encrypted with existing Worker credential key path; logs/attention metadata use structural IDs/kind/state/time only; browser writes require exact Origin plus session auth/capability/session creator.
  • Constitution/env/doc sync: ACP tuning limits/timeouts have shared defaults, Env overrides, .env.example, and env reference documentation. No new manual secret prerequisite.
  • Test engineering: node-level no-wake delivery and VM contract tests are added; worker DO vertical test is present but needs CI/staging runtime confirmation because local worker tests stall.

UI Screenshot Evidence

N/A: This PR does not change UI surfaces; it adds dormant backend foundation routes/storage/contracts only.

Scope guard

This PR intentionally does not implement B/C/D: no production permission UI, no runtime permission/form/URL producers, no remote URL elicitation UI, and no native-auth diagnostics/hardening changes.


Final shipping evidence (Slice A)

  • Final head: d29fe1e0ba0c78f5f55fd44550cf59f49c34879f.
  • PR checks on final head: CI, E2E Smoke, and CodSpeed passed, including Durable Object Workers, Secret Scan, Type Check, Test, Build, VM Agent Test/E2E/Integration, and deploy-script validation.
  • Staging: deploy-staging.yml run 36570587320 passed. It ran migration safety gates, deployed the Cloudflare API Worker with the dormant InteractionStore binding/migration, uploaded VM agent and CLI artifacts, and passed staging smoke tests.
  • CodeRabbit: requested through the trusted label/workflow path earlier in the PR; CodeRabbit reported review skipped because auto reviews are disabled, so there is no actual CodeRabbit review to claim.
  • Scope guard: ACP_INTERACTIONS_ENABLED=false; Slice A remains dormant and does not activate the permissions/forms/URL UI or runtime behavior reserved for B/C/D.

@simple-agent-manager simple-agent-manager Bot added the coderabbit-review Trigger CodeRabbit review for opt-in PRs label Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: raphaeltm/simple-agent-manager/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5f23dcbb-09ef-44d7-8e7f-2d21e306aeec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@raphaeltm

Copy link
Copy Markdown
Owner

@coderabbitai review

@codspeed

codspeed Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing sam/implement-ship-slice-dormant-bdptty (d29fe1e) with main (9640355)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (96b87cc) during the generation of this report, so 9640355 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@sonarqubecloud

Copy link
Copy Markdown

@simple-agent-manager
simple-agent-manager Bot merged commit eaa0178 into main Sep 29, 2026
33 checks passed
@simple-agent-manager
simple-agent-manager Bot deleted the sam/implement-ship-slice-dormant-bdptty branch September 29, 2026 13:07

This branch was successfully deployed

1 active deployment
staging — d29fe1e0 Deployed Sep 29, 2026 by simple-agent-manager[bot] via smoke-tests #2181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coderabbit-review Trigger CodeRabbit review for opt-in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant