Skip to content

feat: add ACP proxy and workspace MCP tools - #15

Merged
fffonion merged 14 commits into
masterfrom
feat/acp-harness-tool-provider
Nov 29, 2026
Merged

fffonion merged 14 commits into
masterfrom
feat/acp-harness-tool-provider

Conversation

@fffonion

@fffonion fffonion commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add an ACP v1 stdio proxy that forwards prompts to an external harness and appends one workspace-scoped RustScript MCP declaration without replacing client-supplied declarations.
  • Expose six existing RSS tools through tools serve --stdio. The harness owns model calls and credentials; RustScript enforces workspace and profile boundaries for its tools.
  • Preserve the Agent's byte contracts for provider payloads and receipts after SDK feature unification, and retain process ownership when a closed process table refuses a spawn result.
  • Keep the original locked RustScript Core revision, 11c9ee908a29365bd02573311f56e9308eb7dbe6. The Agent auth fixture now compares the complete decoded JSON value without treating object key order as part of its contract. The test still exercises the typed encoder and verifies denial of an unrelated builtin import. Core PR #46 is closed without merging and is not a dependency of this PR.

Commit scopes

  1. 331c795 — SDK dependencies and JSON byte contracts.
  2. 20ea55a — provider-free MCP stdio, workspace capabilities, and effect settlement.
  3. 3e48b26 — ACP proxy, MCP injection, and end-to-end coverage.
  4. 67a81c2 — ACP documentation and release-package checks.
  5. 52e5e44 — compare the auth fixture's public JSON structurally.
  6. 1eae2cc — compare logout reports structurally and keep single-line LF framing.
  7. 7e3b255 — compare complete plugin schema property inventories independent of key order.
  8. 101e4ad — keep canonical bytes for persisted plugin state documents.
  9. a8b49a9 — emit valid signed state receipts and commit a staged write only after its reread matches.
  10. eb153b5 — observe managed process-group exit within the existing cleanup cutoff (test fixture only).
  11. 08c0d38 — explicitly exercise standalone MCP process retention after a failed receipt write, with no second OS spawn on reentry (test fixture only).
  12. f44f83f — wait for the VM epoch to advance before releasing the MCP write fixture, then check zero guest commits and read back the durable receipt (test fixture only).
  13. 9eaf9d4 — exercise standalone MCP artifact retention in the RSS fixture and check exact artifact identity, bytes, ownership, and absence of a durable result (test fixture only).
  14. 681ea5a — compare the complete RunLimits JSON object without requiring a particular key order (test fixture only).

Verification

  • On 52e5e44, the public JSON fixture and the full auth_bundle_tests target passed (18/18); the docs contract target passed (36/36). Its full CI also passed formatting, strict Clippy, and 870 library tests, then failed one logout subprocess assertion solely on JSON object key order.
  • On 1eae2cc, the logout fixture still checks the complete object, a single LF-terminated stdout line, redaction, and the existing home and configuration isolation. On the clean committed head, the original failing case and all 17 subprocess tests passed. Formatting and diff checks passed. Grok accepted both fixture updates.
  • 7e3b255 passed all 61 plugin contract tests. 101e4ad passed the targeted canonical state regression. For the signed state fixture, three exact controls passed on the reviewed tree. In a temporary signed RSS mismatch probe, the corrected fixture kept the durable revision and object unchanged. Grok accepted those changes; a8b49a9 has the same complete tree as the reviewed candidate.
  • CI for a8b49a9 passed formatting and strict Clippy, then stopped after one managed process-group fixture assertion failed (869 library tests passed, 6 ignored; no integration targets ran). A controlled exit observation reproduced that assertion on the old fixture and passed with the new fixture. The clean eb153b5 exact case passed; Grok accepted the test-only fix. Root reap and ownership assertions remain immediate, and the cleanup still has the original five-second cutoff.
  • CI for eb153b5 passed formatting, strict Clippy, and 870 library tests (6 ignored). Plugin state migration passed 46 tests (2 ignored). Cargo stopped after the RSS process retention fixture failed its child-liveness assertion (40 passed, 1 failed in that target).
  • The original failure reproduced locally. The fixture used the default Abort policy while testing standalone MCP retention. 08c0d38 selects RetainForSettlement only for this fixture and checks that unresolved reentry never reaches another OS spawn attempt. The clean exact case passed (1 passed, 40 filtered). The affected rss_process_tool_tests target then passed all 41 cases at default concurrency on the same clean commit. Grok accepted the fixture-only change.
  • Agent CI for 08c0d38 passed formatting, strict Clippy, and 870 library tests (6 ignored). The workspace suite stopped at one MCP lifecycle fixture failure (60 passed, 1 failed in that target): published_write_receipt_survives_a_vm_stop_before_tool_commit returned published but did not satisfy the nonempty hash assertion. That target passed on the preceding head. The affected RSS process target did not launch in this CI; its 41/41 result was local.
  • The a8b49a9 Linux x86_64 GNU candidate passed the locked offline release build and archive verification (101 files; both packaged executables match the fresh build). From the extracted archive, OpenCode 1.19.6 with a scripted loopback model completed MCP write, exact read-back, and direct printf. The bundled anonymous gateway returned HTTP 200 and shut down cleanly. Grok accepted the package evidence. No live provider was used.
  • The eb153b5 Linux x86_64 GNU candidate passed a fresh locked offline release build, the archive verifier, and deterministic repeat packaging. All 101 packaged file payloads, including both executables, are byte-identical to the exercised a8b49a9 package. The OpenCode 1.19.6 scripted loopback and bundled gateway results were executed on a8b49a9; Grok independently accepted reusing that evidence for the identical packaged files. The archive timestamp changes to the new commit epoch.
  • The 08c0d38 Linux x86_64 GNU candidate passed the Rust 1.99.1 locked offline release build with unchanged release outputs reused from eb153b5. The archive verifier passed, two packages at the current epoch are byte-identical, and all 101 files (including both executables) match the exercised a8b49a9 package and eb153b5. Grok independently accepted the archive and the transfer of the existing runtime evidence. OpenCode and the gateway were not rerun.
  • On f44f83f, the exact write-publication and neighboring artifact-publication tests each passed (1/1). Grok accepted the fixture-only change. Current CI has passed formatting and strict Clippy; workspace tests are in progress.
  • The f44f83f Linux x86_64 GNU candidate (30,241,465 bytes) passed both archive-verifier invocations and deterministic repeat packaging. Cargo reused the existing release binaries. All 101 file payloads match the 08c0d38 candidate and the a8b49a9 archive originally exercised with OpenCode and a scripted model. Grok independently accepted the package; no new runtime smoke test was needed for the identical payloads.
  • CI for f44f83f passed formatting, strict Clippy, 870 library tests (6 ignored), MCP lifecycle (61/61) and RSS processes (41/41). It stopped at one failure in rss_tools_contract_tests (115 passed, 1 failed): the artifact-retention fixture observed 0 when it expected 1 after a commit-storage failure.
  • The original failure reproduced locally. The paired controls confirmed publication of the same 960-byte artifact before the injected error; default Abort retracted it and the existing standalone MCP policy retained it without storing a durable result. 9eaf9d4 selects the retention policy only for this test. The exact retention and managed-retraction controls passed and the affected target passed 116/116. Grok accepted the fixture-only change. That CI run passed the RSS target (116/116) and failed later at the RunLimits JSON ordering assertion in service_tests.
  • 681ea5a reproduces and fixes the previous CI failure in the RunLimits fixture. The limits and workspace validation assertions remain intact. The clean-commit exact fixture, formatting, and diff checks passed; Grok accepted the test-only change. Exact-head CI passed on attempt 1: formatting, strict Clippy, all-target/all-feature workspace tests, whitespace, and clean worktree. The tested merge snapshot has the same tree as 681ea5a.
  • The 9eaf9d4 Linux x86_64 GNU candidate (30,241,460 bytes) passed both archive-verifier runs, deterministic repeat packaging, and direct ELF checks. Cargo reused the existing release binaries. All 101 file payloads match the f44f83f candidate and the a8b49a9 archive previously exercised with OpenCode and a scripted model. Grok independently accepted those comparisons; the runtime checks were not repeated.
  • The 681ea5a Linux x86_64 GNU candidate (30,241,446 bytes) passed archive verification and deterministic repeat packaging at epoch 1795972600. Grok independently accepted the archive. All 101 payloads match the 9eaf9d4 candidate and the a8b49a9 archive used for the OpenCode/scripted-model and gateway smoke tests. Cargo reused the existing release executables; no new runtime checks were run.

Introduce the shared protocol SDK pins alongside the provider and gateway
serialization changes required by their serde_json feature set. Preserve
persisted request fingerprints and opaque payload bytes; pin them with
provider wire, replay, and gateway regression tests.
Add the provider-free executor, shared workspace capabilities, and stdio
server with durable settlement, cancellation, and process ownership. Keep
the server and its capability contracts together because admission and
shutdown exercise the same lifecycle and ownership boundaries.
Forward ACP v1 over stdio and inject the workspace tool server without
taking ownership of harness inference. Include SDK contract, lifecycle,
and end-to-end coverage for the proxy and injection boundary.
Document launch, configuration, workspace tool access, and harness
ownership. Keep guide consistency and packaged command checks with the
documented interface.
@fffonion
fffonion force-pushed the feat/acp-harness-tool-provider branch from a52fe5e to 52e5e44 Compare November 28, 2026 22:29
Group SIGKILL may finish asynchronously after the owned root is reaped. Poll the real stopped-drain fixture group within its original cleanup cutoff, keeping the root reap and ownership assertions at cleanup return.
Use the standalone MCP settlement policy in the RSS commit-failure fixture. Keep the default abort policy in the other cases, and assert that replay of the unresolved call never reaches a second OS spawn.
Hold the publication gate until cancellation reaches the VM epoch watcher. Confirm that the guest never commits and compare the returned receipt with the durable settlement.
Use the standalone MCP publication policy only in the RSS read-file retention fixture. Check that the failed commit never persists a result and that its exact artifact remains with the original bytes and bound owner metadata.
@fffonion
fffonion marked this pull request as ready for review November 29, 2026 20:29
@fffonion
fffonion merged commit ee3bdd5 into master Nov 29, 2026
1 check passed
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.

1 participant