SpawnDev.Hive
0.2.0
Prefix Reserved
See the version list below for details.
dotnet add package SpawnDev.Hive --version 0.2.0
NuGet\Install-Package SpawnDev.Hive -Version 0.2.0
<PackageReference Include="SpawnDev.Hive" Version="0.2.0" />
<PackageVersion Include="SpawnDev.Hive" Version="0.2.0" />
<PackageReference Include="SpawnDev.Hive" />
paket add SpawnDev.Hive --version 0.2.0
#r "nuget: SpawnDev.Hive, 0.2.0"
#:package SpawnDev.Hive@0.2.0
#addin nuget:?package=SpawnDev.Hive&version=0.2.0
#tool nuget:?package=SpawnDev.Hive&version=0.2.0
SpawnDev.Hive
A hive of trusted devices - browser tabs and desktop apps joined over WebRTC - where each device loads the models the hive needs and serves them to the others. As devices come and go, or as demand shifts, the hive re-plans which device holds which model.
Status: early (M2). The placement planner, the Hive wire and HiveNode work over real SpawnDev.Swarm sessions on desktop and in the browser; the real-model gates with SpawnDev.AI and SpawnGen are next. Design and status: Plans/PLAN-Hive.md.
How it fits
- SpawnDev.Swarm gives each device an identity in an owner-signed registry, authenticated sessions, and a term-and-lease coordinator.
- SpawnDev.Hive (this) runs on top: every member advertises what it can hold, the member holding the Swarm lease plans where each skill (a set of models) lives, and each member's router picks the peer for a request.
- Requests never pass through Hive. The router hands back a Swarm session; the consumer sends on its own message types (SpawnDev.AI 0x100, SpawnGen 0x200).
Use
// Per member, alongside its SwarmCoordinator:
var node = new HiveNode(swarmCoordinator, deviceKey.PublicKey, myHost); // myHost : IHiveSkillHost; null for a member that only sends requests
// For every session, before session.Start():
swarmCoordinator.Attach(session);
node.Attach(session);
session.Start();
swarmCoordinator.Start();
node.Start();
// Route one request:
var skill = new HiveSkill("chat-qwen3-8b", new[] { new HiveModel("qwen3-8b", 5_000_000_000) });
using var route = await node.PickAsync(skill, expectedSecondsPerRequest: 2.0, requestId: Guid.NewGuid());
// route.Session: send the request on your own message type; null means serve it on this device.
// A "not loaded here" answer: node.ReportStale(route.PeerId, skill.Key) and pick again.
A skill is a set of models that must be on one peer: HiveFitMode.Sum (resident together, as SpawnDev.AI) or HiveFitMode.Turns (each model fits alone, as SpawnGen), with an optional required backend for byte-identical results.
Built on SpawnDev.Swarm and SpawnDev.RTC. First consumers: SpawnDev.AI and SpawnGen.
License
MIT. See LICENSE.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- SpawnDev.Swarm (>= 0.2.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.5 | 54 | 12/2/2026 |
| 0.3.4 | 57 | 12/2/2026 |
| 0.3.3 | 57 | 12/1/2026 |
| 0.3.2 | 62 | 12/1/2026 |
| 0.3.1 | 61 | 12/1/2026 |
| 0.3.0 | 59 | 12/1/2026 |
| 0.2.11 | 60 | 12/1/2026 |
| 0.2.10 | 63 | 12/1/2026 |
| 0.2.9 | 55 | 12/1/2026 |
| 0.2.8 | 55 | 12/1/2026 |
| 0.2.7 | 55 | 12/1/2026 |
| 0.2.6 | 67 | 12/1/2026 |
| 0.2.5 | 66 | 11/30/2026 |
| 0.2.4 | 60 | 11/30/2026 |
| 0.2.3 | 66 | 11/30/2026 |
| 0.2.2 | 63 | 11/30/2026 |
| 0.2.1 | 65 | 11/30/2026 |
| 0.2.0 | 61 | 11/30/2026 |
| 0.1.2 | 60 | 11/30/2026 |
| 0.1.1 | 64 | 11/30/2026 |
v0.2.0 - BREAKING (whole hive upgrades together): Hive wire version 2, forward-compatible from now on. Every message ends with a Swarm extension list (unknown tags skipped); unknown directive kinds are refused, unknown ack statuses count as failed, unknown model states as loading, unknown fit modes as unplaceable; the advert carries the wire version and a feature list; HiveNode reserves 0x400-0x4FF so an unknown Hive message type is ignored. On SpawnDev.Swarm 0.2.5. v0.1.2 - Placements from a different coordinator in the same term win (two members can coordinate one term before the lease converges). Wire-compatible. v0.1.1 - A HiveNode may have no host (a member that only sends requests): it is never placed on, but it routes and can coordinate. v0.1.0 - First release (early, M2): HivePlanner (pure, deterministic placement of model sets by estimated completion time over each peer's whole queue, budgets with named evictions, stability, hot-skill redundancy, required backends); the Hive wire 0x400-0x4FF; HiveNode (advertise, carry out directives, route requests, and plan on the Swarm lease holder). Desktop and browser.