Expand description
Manager-neutral service registration, ownership, and lifecycle model plus Unix manager mechanics and a native Windows SCM adapter.
Destructive manager operations are authorized only for Owned
registrations. Foreign and Unknown fail closed. Manager state and
application health are separate. No privilege escalation, no updater or
transport policy, and no shell interpolation live in this crate.
Structs§
- Commit
Engine Policy - The two named, separately testable inputs that distinguish the unified engine’s behaviour.
- Cron
Manager - Cron manager: a managed block inside the user’s crontab.
- Direct
Observation - Caller-supplied selected direct-runtime observation.
- Disposition
Baseline - Baseline authority/state observed after preparation.
- Fake
Call - One observed call for
FakeExecutor. - Fake
Executor - Deterministic test executor with scripted responses.
- Host
Facts - Observed host facts (separate from selection policy).
- Launchd
Install - Caller-owned launchd install material.
- Launchd
Manager - launchd manager implementing the neutral contract.
- Lifecycle
Failure - Bounded service-specific failure evidence, separate from Core artifact evidence.
- Lifecycle
Snapshot - A point-in-time lifecycle observation plus desired restoration intent.
- Lifecycle
Update Policy - Mechanism-level choices and bounds for one service-aware transaction.
- Lifecycle
Update Receipt - Composite result that retains the exact Core transaction evidence.
- Manager
Command Output - Bounded output of one manager command invocation.
- NoPost
Install Check - No-op check for consumers that require lifecycle restoration only.
- NoProbe
- Null probe: health is always unknown.
- Post
Install Check Error - Bounded caller-owned post-install check failure.
- Registration
Snapshot - A manager-neutral registration observation.
- Service
Id - A validated opaque service identity (unit name, launchd label, SCM name).
- Service
Spec - Consumer-supplied desired registration.
- System
Executor - Production bounded command runner (literal argv, no shell).
- Systemd
Install - Caller-owned systemd install material (mechanics only, no product policy).
- Systemd
Manager - systemd manager implementing the neutral contract.
- Test
Double Manager - Deterministic in-memory manager for contract tests.
- Transition
Result - Bounded transition outcome with conflict diagnostics.
- Unix
Planner Input - Unix-like planner inputs.
- Windows
Planner Input - Windows-like planner inputs.
- Windows
ScmInstall - Caller-owned settings used when creating or refreshing an SCM registration.
- Windows
ScmManager - Native Windows SCM adapter implementing the manager-neutral contract.
Enums§
- Candidate
Manager - Candidate manager families for auto-selection (policy helper output).
- Direct
State - Selected direct-runtime state.
- Health
State - Application health, distinct from manager state.
- Known
Config - Known vs unknown registered config identity for Unix-like planning.
- Launchd
Domain - launchd domain without automatic EUID-based choice.
- Lifecycle
Restoration Status - Terminal service restoration status for a composite update.
- Lifecycle
State - Manager-neutral lifecycle state. Health is separate.
- Lifecycle
Update Error - Failure before a composite terminal transaction receipt could be returned.
- Lifecycle
Update Phase - Phase that produced lifecycle-specific update evidence.
- Manager
Failure Kind - Machine-readable classification of a manager failure.
- Ownership
- Canonical ownership classification, re-exported from
eggup-core. - Ownership
Loss Tolerance - Whether ownership loss during a transition is tolerated.
- Post
Transition Verification - Whether the engine re-inspects the manager after a transition.
- Restore
Intent - Desired post-update restoration.
- Service
Error - Typed service errors. Destructive attempts on
Foreign/Unknownfail here. Error strings produced by crate helpers are capped atMAX_DIAGNOSTIC_BYTESUTF-8-safe bytes. - Service
Operation - Manager operations. Destructive variants require
Owned. - Systemd
Scope - systemd scope without privilege guessing.
- Update
Runtime Disposition - Product-neutral update runtime disposition.
- Windows
Error Control - Caller-selected SCM error-control setting.
- Windows
Service Dependency - A caller-selected SCM dependency by service key or load-order group.
- Windows
Service State - Windows SCM state classes.
- Windows
Start Type - Caller-selected Windows service startup mode.
Constants§
- MAX_
COMMAND_ OUTPUT_ BYTES - Maximum captured bytes per stdout/stderr stream for one manager call.
- MAX_
CRONTAB_ BYTES - Maximum crontab content accepted for list/install (fail closed above).
- MAX_
DEFINITION_ BYTES - Maximum service definition bytes accepted for atomic writes.
- MAX_
DIAGNOSTIC_ BYTES - The one byte ceiling for diagnostic text produced by this crate.
- MAX_
TRANSITION_ TIMEOUT - Upper bound for transition polling (callers supply smaller values).
Traits§
- Command
Executor - Injectable manager-command executor (literal argv, no shell).
- Direct
Runtime Control - Minimum caller-owned direct-runtime control seam.
- Health
Probe - Consumer-supplied health probe. Read-only: never mutates manager state.
- Post
Install Check - Caller-controlled post-install check. Implementations must honor
remaining. - Service
Manager - Manager-neutral service operations. Platform adapters implement this in
later milestones;
TestDoubleManagerimplements it for tests.
Functions§
- atomic_
write_ definition - Atomically writes a manager definition file.
- candidate_
managers - Small explicit auto-selection policy over
HostFacts. - commit_
with_ disposition - Disposition-aware orchestration over an existing
ValidatedTransaction. - commit_
with_ disposition_ with_ engine_ policy - Disposition-aware orchestration under an explicitly selected commit-engine policy.
- commit_
with_ lifecycle - Quiesce an owned service, compose Core M007, and restore lifecycle state based on the artifact result.
- commit_
with_ lifecycle_ with_ engine_ policy - Quiesce an owned service under an explicitly selected commit-engine policy.
- cron_
classify - Classifies a crontab against one desired block.
- cron_
merge - Merges one managed block idempotently, preserving unrelated bytes.
- cron_
remove - Removes the owned managed block, preserving unrelated bytes.
- inspect_
host - Inspects host manager facts without choosing policy.
- plan_
unix - Pure Unix-like manager/direct decision logic.
- plan_
windows - Pure Windows SCM/executable decision logic including pending states.
- require_
owned - Ownership guard shared by all destructive operations.
Type Aliases§
- Command
Output - Compatibility alias for the former
CommandOutputname. - Cron
Ownership - How a crontab relates to one managed block.