Expand description
Command registry abstraction for command server
The CommandRegistry is the source of truth for all command metadata. It tracks command state, timestamps, sizes, and errors.
Implementations:
InMemoryCommandRegistry: In-memory implementation for tests and local dev (in this crate)PlatformCommandRegistry: Platform API integration (in alien-manager)
The command KV store holds only operational data: params/response blobs, pending indices, leases.
Structs§
- Command
Envelope Data - Data needed to build an envelope during lease acquisition
- Command
Metadata - Metadata returned when creating a command
- Command
Status - Full status for GET /commands/{id}
- InMemory
Command Registry - In-memory implementation for tests and local development.
- Resolved
Command Target - A command target resolved by the registry, plus how commands reach it.
Traits§
- Command
Registry - Abstraction for command metadata storage and lifecycle tracking.
Functions§
- delivery_
mode_ for - Pinned per-type delivery rule — the single implementation both registries
route through. Container and Daemon targets are always Pull; a Worker target
follows
worker_mode, the caller’s derived worker context (production: Push only when the platform has a push path ANDstack_settings.deployment_modelis Push). - select_
command_ target - Target-selection rules shared by both the in-memory and SQLite registries route through.
- validate_
command_ name - Reject a command name that would break the same
:-delimited idempotency key grammar ({dep}:{rid}:{command}:{key}). - validate_
command_ target_ id - Reject a command-target resource id that would break the
:-delimited key grammar used by the pending index (target:{dep}:{rid}:pending:…) and the idempotency key ({dep}:{rid}:{command}:{key}).