feat: make Astrid local admin standalone - #1473
Draft
joshuajbouw wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Joshua J. Bouw <jjb@unicity-labs.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Makes Astrid’s local administrative transport runtime-owned, removing the boot dependency on distribution uplink capsules.
Changes:
- Adds an authenticated native uplink server with routing and lifecycle handling.
- Starts it during daemon boot and updates CLI/runtime documentation.
- Adds capsule-free lifecycle smoke coverage.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/e2e/runtime-harness.sh |
Runs standalone admin smoke coverage. |
scripts/e2e/runtime-cli-smoke.sh |
Tests capsule-free start/status/stop/restart. |
docs/astrid-native-uplink.md |
Documents the native transport boundary. |
crates/astrid-uplink/src/socket_client.rs |
Exposes handshake helper for crate tests. |
crates/astrid-uplink/src/native/routing.rs |
Adds topic policy and response demultiplexing. |
crates/astrid-uplink/src/native/mod.rs |
Implements the native socket server. |
crates/astrid-uplink/src/native/handshake.rs |
Implements server-side authentication. |
crates/astrid-uplink/src/lib.rs |
Exports and documents native uplink support. |
crates/astrid-uplink/Cargo.toml |
Adds native server dependencies. |
crates/astrid-kernel/src/lib.rs |
Assigns canonical listener ownership. |
crates/astrid-integration-tests/tests/gateway_e2e.rs |
Updates gateway test scope documentation. |
crates/astrid-integration-tests/tests/daemon_wedge_e2e.rs |
Removes obsolete capsule dependency note. |
crates/astrid-daemon/src/lib.rs |
Starts and shuts down the native uplink. |
crates/astrid-daemon/README.md |
Documents the revised boot sequence. |
crates/astrid-daemon/Cargo.toml |
Adds the uplink dependency. |
crates/astrid-cli/src/principal.rs |
Documents handshake-bound identity. |
crates/astrid-cli/src/main.rs |
Updates principal-resolution commentary. |
crates/astrid-cli/src/commands/mcp/watch.rs |
Updates watcher identity documentation. |
crates/astrid-cli/src/cli.rs |
Updates principal option documentation. |
crates/astrid-cli/src/admin_client.rs |
Updates admin identity documentation. |
crates/astrid-capsule/src/readiness.rs |
Documents capsule-free boot behavior. |
CHANGELOG.md |
Records standalone administration support. |
Cargo.lock |
Locks new dependency relationships. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+24
to
+40
| const ALLOWED_EGRESS_EXACT: &[&str] = &[ | ||
| CHAT_DELTA_TOPIC, | ||
| CHAT_RESPONSE_TOPIC, | ||
| "astrid.v1.onboarding.required", | ||
| "astrid.v1.approval", | ||
| "astrid.v1.capsules_loaded", | ||
| "registry.v1.active_model_changed", | ||
| ]; | ||
| const ALLOWED_EGRESS_PREFIXES: &[&str] = &[ | ||
| "astrid.v1.elicit.", | ||
| "astrid.v1.response.", | ||
| "astrid.v1.admin.response.", | ||
| "registry.v1.response.", | ||
| "registry.v1.selection.", | ||
| "session.v1.response.", | ||
| "cli.v1.command.result.", | ||
| ]; |
Comment on lines
+90
to
+93
| match outbound_session(message) { | ||
| Some(target) => session == Some(target), | ||
| None => true, | ||
| } |
Comment on lines
+88
to
+93
| let identity = match handshake::authenticate( | ||
| &mut stream, | ||
| &self.session_token, | ||
| &self.home, | ||
| ) | ||
| .await |
Comment on lines
+293
to
+295
| writer.write_all(&len.to_be_bytes()).await?; | ||
| writer.write_all(&bytes).await?; | ||
| writer.flush().await |
Comment on lines
+103
to
+106
| connections.spawn(async move { | ||
| let _permit = permit; | ||
| serve_connection(stream, identity, event_bus, shutdown).await; | ||
| }); |
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.
Linked Issue
Closes #1471
Summary
Makes Astrid's baseline local administrative transport part of Astrid itself, so a clean runtime can start and be managed without installing an AOS or other distribution-provided uplink capsule.
The kernel remains tool- and business-logic-blind: the new native uplink is a typed, authenticated transport boundary owned by the Astrid runtime. Distribution frontends remain optional compositions and cannot compete for the canonical listener or become boot dependencies.
Changes
CHANGELOG.md[Unreleased].Verification
cargo test -p astrid-daemon— 8 tests passed.cargo test -p astrid-kernel— 296 tests passed.cargo test -p astrid-uplink— 21 tests passed.cargo clippy --workspace --all-features -- -D warningspassed.AI / Tool Assistance
Assisted-by: Codex:GPT-5.6
Codex assisted with repository analysis, implementation across the daemon, uplink, kernel, and CLI boundaries, regression tests, documentation, and local validation. Joshua reviewed the complete change, its architecture, risks, and validation before publication.
Checklist
[Unreleased]— or[Unreleased]rolled into a version section for a release PR; not applicable to docs/CI-only changes)Signed-off-bytrailer.