Expand description
§deputy-core
Domain types, the dependency-artifact state machine, and the trait contracts every
other Deputy crate depends on. This crate performs no I/O — it is the stable
interface layer described in docs/ARCHITECTURE.md §5, so implementations and tests
depend on contracts rather than on each other.
Structs§
- Artifact
Ref - A handle to a stored artifact: its ecosystem plus its content address.
- Content
Hash - The content address of an artifact: the hash of its canonical bytes. An artifact’s
identity is this value — see
docs/STORAGE.md§1. Renders assha256:<lower-hex>. - DepName
- A dependency’s package name within its ecosystem.
- DepRef
- A reference to a specific dependency at a specific version within an ecosystem.
- Finding
- A single issue raised by a scanner against an artifact.
- Pin
- A
DepRefbound to the exact content hash we expect to download — the pin that makes acquisition tamper-evident (docs/PIPELINE.md§2). - RepoId
- A repository within a connected source.
- Source
Id - A connected source-provider account (e.g. a linked GitHub account).
- Version
- A resolved, exact dependency version (not a range).
Enums§
- Artifact
State - The lifecycle state of a single dependency artifact as it moves through the pipeline.
The allowed transitions encode
docs/PIPELINE.md§7 and are enforced byArtifactState::transition. Every edge is, additionally, mID-gated at the API layer. - Ecosystem
Id - A supported dependency ecosystem. Cargo is the first beachhead
(
docs/ARCHITECTURE.md§7); npm/PyPI/Go follow via theDepEcosystemtrait. - Error
- The error surface shared across Deputy. Kept small and
#[non_exhaustive]so new variants can be added without a breaking change. - Hash
Algo - Hash algorithm used for content addressing. SHA-256 today; the enum exists so the
on-disk address format (
<algo>:<hex>) can evolve without ambiguity. - Scan
Verdict - The outcome of scanning an artifact. Only
ScanVerdict::Cleanis promotable (docs/PIPELINE.md§5). - Severity
- Severity of a scanner finding.
- Store
Kind - Which store a content-addressed artifact lives in. The dirty store is staging; the
prod store is the trusted, append-only golden set (
docs/ARCHITECTURE.md§4).
Traits§
- Artifact
Store - Content-addressed artifact storage. The address is the hash of the bytes (ecosystem is a
higher-level annotation, not part of storage). Implementations seal every artifact at rest
with AES-256-GCM under a per-artifact subkey (
docs/STORAGE.md§2). - DepEcosystem
- An acquirable dependency ecosystem. Cargo is the first implementor; npm/PyPI/Go follow
without pipeline-core changes (
docs/PIPELINE.md§0). - Metadata
Store - Encrypted metadata: scan verdicts, promotion receipts, and graph annotations
(
docs/STORAGE.md§4).
Type Aliases§
- Result
- Convenience alias for fallible Deputy operations.