jackin-instance
Role instance lifecycle: the instance index, the per-role state directory, auth provisioning, and container naming. An "instance" is the on-disk + in-Docker state for a single running (or restorable) role session.
What this crate owns
- The instance index and lifecycle (
lib,tests), role-state directory management, and container naming (naming). - Auth provisioning for an instance (
auth) and the instance's view of its manifest (manifest).
Architecture tier and allowed dependencies
L1 application. Allowed workspace dependencies: jackin-core, jackin-config, jackin-manifest, jackin-diagnostics. No presentation or runtime dependencies — instance lifecycle stays a domain/app concern above the leaf and below orchestration.
Structure
| Module | Owns | Tests |
|---|---|---|
| instance index + lifecycle | — |
· | auth provisioning | |
· | instance manifest view | |
· | container/instance naming | |
| integration tests | — |
Public API
Instance identity, the role-state directory contract, and naming used by jackin-runtime, jackin-isolation, and the host CLI. Naming is shared with the capsule side via jackin-protocol.
Typed errors: (index/auth join/manifest agent) and
InstanceError (sync-source folder checks).SyncSourceValidationError
How to verify
cargo nextest run -p jackin-instance
cargo clippy -p jackin-instance --all-targets -- -D warnings