Skip to main content

Crate sysknife_core

Crate sysknife_core 

Source
Expand description

Shared defaults, low-level constants, and configuration loading for the SysKnife workspace.

Modules§

action_family
Canonical mapping of action names to the distro family they require.
config
~/.config/sysknife/config.toml — optional user configuration file.
distro
Distro detection — Phase 2a.

Enums§

AuditStoreChoice
Which audit store a CLI-side reader (sysknife audit verify, MCP doctor) should open.

Constants§

PRODUCTION_DATABASE_PATH
Production SQLite path written by the systemd unit (sysknife-daemon.service).

Functions§

choose_audit_store
Pure selection rule behind resolve_audit_store, split out so the precedence is testable without touching the filesystem or the environment.
choose_audit_store_with_paths
Apply the audit-store precedence when the system store path is supplied by the caller. The production resolver uses PRODUCTION_DATABASE_PATH; the explicit path parameter also lets tests model that fallback without writing under /var/lib.
default_database_path
Resolve the daemon SQLite database path for the current process.
default_listen_uri
Resolve the daemon listen URI for the current process.
path_is_present
Whether an audit-store path should count as present for selection.
resolve_audit_store
Resolve the audit store for this process against the real environment and filesystem.
resolve_audit_store_from
Resolve the audit store with an explicit system path. The production entry point supplies PRODUCTION_DATABASE_PATH; tests can supply a temporary file to exercise the packaged-install fallback without writing under /var/lib.