Skip to content

feat(agent): M8 — Beyond platform tools + full gateway e2e#10

Merged
jaredLunde merged 1 commit into
mainfrom
agent-beyond
Jun 30, 2026
Merged

feat(agent): M8 — Beyond platform tools + full gateway e2e#10
jaredLunde merged 1 commit into
mainfrom
agent-beyond

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

What — M8: the finale

Beyond platform tools (the "Beyond twist" from PLATFORM.md)

crates/agent/src/tools/beyond.rs — each an agent_core::Tool over the shared CommandRunner seam:

  • 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.rs runs the real beyond-ai-agent binary → the real beyond-ai gateway binary → a scripted mock upstream. It asserts:

  • the agent did the tool round-trip and printed the final turn,
  • the gateway swapped in the pool key (sk-pool-secret reached the upstream),
  • the bai_v1 virtual key did NOT reach the upstream (key-swap verified),
  • the tool result was fed back to the model through the gateway.

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 beyond CLI lives in the beyond repo. fork/sync/logs are 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, headless serve/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

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>
@jaredLunde jaredLunde merged commit 3e43923 into main Jun 30, 2026
1 check passed
@jaredLunde jaredLunde deleted the agent-beyond branch June 30, 2026 07:24
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