Documentation
¶
Overview ¶
Package onboarding derives bootstrap progress from authoritative artifacts and implements exact-plan configuration changes. It never persists an optimistic completion flag.
Index ¶
- func ApplyAuthority(plan AuthorityPlan) error
- func CleanupAuthority(plan AuthorityPlan)
- func CleanupHostAuthority(plan AuthorityPlan)
- func InitializeConfiguredSystemdAuthority(ctx context.Context, configPath string) error
- func InitializeHostAuthority(ctx context.Context, plan AuthorityPlan) error
- func InitializePassphraseAuthority(ctx context.Context, plan AuthorityPlan, passphrase []byte) error
- func StatOwned0600(path string) bool
- type AuthorityPlan
- type Check
- type Inspector
- type RuntimeDiscovery
- type Snapshot
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAuthority ¶
func ApplyAuthority(plan AuthorityPlan) error
func CleanupAuthority ¶ added in v0.1.13
func CleanupAuthority(plan AuthorityPlan)
func CleanupHostAuthority ¶
func CleanupHostAuthority(plan AuthorityPlan)
CleanupHostAuthority removes only the two artifacts created by a confirmed host-file onboarding plan. It is used to roll back a failed pre-publication transaction; callers must never use it for a configured authority.
func InitializeConfiguredSystemdAuthority ¶ added in v0.1.12
InitializeConfiguredSystemdAuthority creates and verifies only the database for a previously confirmed systemd-custody configuration. The KEK remains an externally delivered systemd credential and is never copied by Aegis.
func InitializeHostAuthority ¶
func InitializeHostAuthority(ctx context.Context, plan AuthorityPlan) error
func InitializePassphraseAuthority ¶ added in v0.1.13
func InitializePassphraseAuthority(ctx context.Context, plan AuthorityPlan, passphrase []byte) error
func StatOwned0600 ¶
StatOwned0600 is exposed for truthful previews without leaking platform ownership structures into terminal rendering.
Types ¶
type AuthorityPlan ¶
type AuthorityPlan struct {
ConfigPath string `json:"config_path"`
StatePath string `json:"state_path"`
Custody string `json:"custody"`
Database string `json:"database"`
DeploymentID string `json:"deployment_id"`
KEKFile string `json:"kek_file,omitempty"`
KEKCredential string `json:"kek_credential,omitempty"`
OriginalDigest string `json:"original_config_digest"`
ResultDigest string `json:"result_config_digest"`
Confirmation string `json:"confirmation"`
// contains filtered or unexported fields
}
func PreviewAuthority ¶
func PreviewAuthority(configPath, custody string) (AuthorityPlan, error)
func (AuthorityPlan) String ¶
func (p AuthorityPlan) String() string
type Inspector ¶
type Inspector struct {
Runtime RuntimeDiscovery
Current func() (*user.User, error)
LookupID func(string) (*user.User, error)
AuthorityPassphrase []byte
}
func NewInspector ¶
func NewInspector(runtime RuntimeDiscovery) *Inspector
func (*Inspector) Inspect ¶
Inspect is read-only. It does not open the normal Aegis store, start Ollama, load a model, or update credential-authority shutdown metadata.
func (*Inspector) WithAuthorityPassphrase ¶ added in v0.1.13
type RuntimeDiscovery ¶
type RuntimeDiscovery interface {
Discover(context.Context) (core.RuntimeDescriptor, error)
}
type Snapshot ¶
type Snapshot struct {
State State `json:"state"`
Reason string `json:"reason"`
NextCommand string `json:"next_command"`
ConfigPath string `json:"config_path"`
StatePath string `json:"state_path,omitempty"`
Principal string `json:"principal,omitempty"`
HermesPath string `json:"hermes_path,omitempty"`
HermesVersion string `json:"hermes_version,omitempty"`
OllamaRoute string `json:"ollama_route,omitempty"`
Model string `json:"model,omitempty"`
ModelDigest string `json:"model_digest,omitempty"`
Checks []Check `json:"checks"`
}
type State ¶
type State string
const ( Uninitialized State = "uninitialized" PrincipalConfigured State = "principal-configured" AuthorityConfigured State = "authority-configured" RuntimeConfigured State = "runtime-configured" ModelPresent State = "model-present" ModelCertified State = "model-certified" Ready State = "ready" RepairRequired State = "repair-required" )