feat(apps/cli): first rust binary on new layout — ctm metrics end-to-end (task #143 slice 1) - #1559
Merged
Merged
Conversation
…nd-to-end (task #143 slice 1) The apps/cli slot was a placeholder README per PR #1557. This commit lands the first real rust binary on it: `ctm`, the substrate-first CLI. apps/cli/ ├── Cargo.toml continuum-cli crate, binary name `ctm` ├── README.md status / install / usage / architecture └── src/main.rs clap CLI + Connection::connect + metrics subcmd Workspace member added at root Cargo.toml under the new `apps/` tier section (sibling to `client/continuum-client`). One subcommand wired end-to-end: ctm metrics → Connection::connect(airc, peer) .commands() .execute("runtime/metrics/all", {}) → pretty-print JSON Every byte of the wire path is the SAME path the cross-airc integration test verifies (core/continuum-core/tests/airc_ipc_roundtrip.rs): client serializes via continuum-airc-protocol, airc-lib frames + LANs it, substrate's CommandRequestHandler::parse_envelope decodes it, dispatches through the local executor (RuntimeModule's runtime/metrics/all), and substrate's send_reply ships the response back. No new wire — just a new caller. CLI identity model per [[personas-are-citizens-airc-is-identity-provider]]: the human invoking `ctm` is the airc citizen. CLI opens their existing airc home (default `$HOME/.airc`, overridable via `--home` / `CONTINUUM_AIRC_HOME`) and targets the substrate's peer UUID via `--peer` / `CONTINUUM_PEER_ID`. Auto-discovery is pending — first slice takes the UUID explicitly. Verified: cargo build -p continuum-cli → clean (31s cold, 2s incremental) ctm --help → prints usage cleanly ctm metrics → typed error: "--peer is required" ctm metrics --peer <bad UUID> → typed error from airc layer (untested with running substrate; that's a runtime concern not a build slice) Pending follow-ups documented in apps/cli/README.md "Pending follow-ups": - peer auto-discovery (read ~/.continuum/peer.json or airc ipc-endpoint) - more subcommands (chat/send, gpu/stats, data/list, persona/list, etc) - shell shim install + `jtag` → `ctm` alias Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
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.
First slice of task #143 (Rust-first clients — rewrite jtag CLI in Rust). The
apps/clislot was a placeholder README per the Stage 1-2.5 layout sweep; this PR lands the first real rust binary on it.What lands
Workspace member added at root
Cargo.tomlunder a newapps/tier section (sibling toclient/).One subcommand wired end-to-end
The wire path:
Cli::parse()extracts--peer/--home/CONTINUUM_PEER_ID/CONTINUUM_AIRC_HOME.Airc::open($HOME/.airc)opens the human's airc citizen.Connection::connect(Arc::new(airc), peer_uuid)builds the substrate session..commands().execute("runtime/metrics/all", {})round-trips throughAircIpcTransport.continuum-core-server'sCommandRequestHandler::parse_envelopedecodes,RuntimeModuledispatches,send_replyships the response.Every byte of that path is the SAME path
core/continuum-core/tests/airc_ipc_roundtrip.rsverifies — no new wire, just a new caller.Why this matters
apps/tier — proves the substrate-first architecture works end-to-end from a real binary.continuum-clientseam every futureapps/{web, mcp, mobile, ar, vr, desktop}will consume../jtagis now incremental: each future PR adds onectm <subcommand>, the Node./jtagshrinks.Verified
Runtime tests against a live substrate are a follow-up — the wire path is already proven by the integration test that just merged.
Pending follow-ups (in README.md)
~/.continuum/peer.jsonorairc ipc-endpoint).chat/send,gpu/stats,data/list,persona/list).tools/scripts/install-cli.sh,jtagalias).Test plan