feat(agent): M8 — Beyond platform tools + full gateway e2e#10
Merged
Conversation
Beyond tools (crates/agent/src/tools/beyond.rs), the "Beyond twist" from PLATFORM.md — fork (branch an app's real data into an agent sandbox), sync (push the working tree to a running instance), logs (query/search instance logs). Each shells out to the `beyond` CLI through the shared CommandRunner seam; argv is unit-tested with a mock runner. default_registry() now serves all 10 tools (7 coding + 3 Beyond). Full-stack e2e (tests/gateway_e2e.rs) — the decisive proof: the real beyond-ai-agent binary drives the real beyond-ai GATEWAY binary, which verifies the bai_v1 virtual key, swaps in the pool key, routes to a (mock) provider, and relays the streamed tool round-trip back. Asserts the pool key reached the upstream and the virtual key did NOT (key-swap), and the tool result was fed back through the gateway. No NATS (gateway fails open), no real provider, plaintext upstream — but every byte flows through the gateway. Uses the deterministic dev signing key as fixed constants (no gateway crate dep). Docs: README reframed as the gateway + agent workspace; agent-core ARCHITECTURE marked complete. Scope boundary: the `beyond` CLI lives in the beyond repo; fork/sync/logs are argv-verified here, not against a live control plane. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What — M8: the finale
Beyond platform tools (the "Beyond twist" from PLATFORM.md)
crates/agent/src/tools/beyond.rs— each anagent_core::Toolover the sharedCommandRunnerseam:fork— branch a Beyond app into an isolated copy of its real data (the agent task sandbox).sync— push the working tree to a running instance (the tight edit→run loop).logs— read/search instance logs (optional Lucene query).default_registry()now serves all 10 tools (7 coding + 3 Beyond). Argv is unit-tested with a mock runner.Full-stack e2e — proven through the real gateway
tests/gateway_e2e.rsruns the realbeyond-ai-agentbinary → the realbeyond-aigateway binary → a scripted mock upstream. It asserts:sk-pool-secretreached the upstream),bai_v1virtual key did NOT reach the upstream (key-swap verified),No NATS (the gateway fails open), no real provider, plaintext upstream — but every byte flows through the gateway. The dev signing key is used as fixed constants, so the agent crate keeps zero gateway dependency.
Scope boundary
The
beyondCLI lives in thebeyondrepo.fork/sync/logsare argv-verified here, not against a live control plane.Verification (whole workspace)
clippy
-D warnings·cargo fmt --all --check· agent-core 21 unit + 2 socket · agent 25 unit + 3 e2e (run,serve, gateway) · gateway 99 unit + 21 integration unchanged.This completes the M-series: pi replicated feature-by-feature in Rust (unified API via dialects, tool-calling loop, the 7 coding tools, CLI
run, headlessserve/rpc), proven by e2e tests running the actual binaries, with a headless serve architecture working end-to-end through a locally-hosted gateway.Series: M1 #5 · M2 #6 · M3+M4 #7 · M5+M6 #8 · M7 #9 merged.
🤖 Generated with Claude Code