feat: MetaHub distributed agent cluster + execution mode refactoring#62
Merged
yishuiliunian merged 10 commits intomainfrom Apr 2, 2026
Merged
feat: MetaHub distributed agent cluster + execution mode refactoring#62yishuiliunian merged 10 commits intomainfrom
yishuiliunian merged 10 commits intomainfrom
Conversation
Introduces MetaHub — a coordination layer enabling multiple Loopal Hub instances to form a distributed agent cluster with cross-hub communication. MetaHub architecture: - New crate `loopal-meta-hub` with HubRegistry, GlobalRouter, EventAggregator - Hub-to-MetaHub TCP uplink with bidirectional communication - Cross-hub message routing (meta/route), agent spawning (meta/spawn), agent discovery (meta/resolve), and permission relay - Shadow entries for tracking remote agents locally (wait_agent support) - 8 new meta/* IPC protocol methods - CLI: `--meta-hub <addr>` to start MetaHub, `--join-hub <addr>` to connect Execution mode refactoring (3 orthogonal dimensions): - Frontend: `--server` replaces `--headless` (UI form only) - Lifecycle: `--ephemeral` for one-shot tasks (default: persistent) - Cluster: `--join-hub` / `--meta-hub` (independent of above) - LifecycleMode::Interactive→Persistent, ::Task→Ephemeral - Lifecycle passed explicitly via IPC, not inferred from prompt presence Agent tools for cluster awareness: - `ListHubs` tool: discover other hubs in the cluster - `Agent` tool: `target_hub` parameter for cross-hub spawn - Hub dispatch forwards meta/* methods to MetaHub via uplink Testing: 34 unit/integration tests + 3 real-binary e2e cluster tests
- Add Distributed Cluster section with setup instructions - Update CLI reference: --server/--ephemeral replace --headless, add --meta-hub/--join-hub/--hub-name - Add cluster architecture diagram - Update tool list with ListHubs - Add three-dimension execution model table
b2d580f to
2f5fa46
Compare
…ed fn, redundant match)
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.
Summary
--server), lifecycle (--ephemeral), and cluster (--join-hub)ListHubs,Agentwithtarget_hub) for cluster-aware operationsArchitecture
loopal-meta-hub(11 source files, ~1200 lines)meta/*IPC protocol methodsChanges
crates/loopal-meta-hub/— HubRegistry, GlobalRouter, EventAggregator, server, dispatch--meta-hub,--join-hub,--hub-name,--server,--ephemeral(replaces--headless)Test plan
bazel build //... --config=clippy— zero warningsbazel build //... --config=rustfmt— clean