Skip to main content

ArtifactTrustStore

Trait ArtifactTrustStore 

Source
pub trait ArtifactTrustStore {
    // Required methods
    fn get_artifact(&self, id: &str) -> Option<ArtifactRow>;
    fn get_artifact_by_path(
        &self,
        session_id: &str,
        path: &str,
    ) -> Option<ArtifactRow>;
    fn attach_verdict(
        &mut self,
        artifact_id: &str,
        verdict: ArtifactVerdict,
    ) -> Option<ArtifactRow>;
    fn record_approval(
        &mut self,
        artifact_id: &str,
        approval: ArtifactApproval,
    ) -> Option<ArtifactRow>;
    fn finalize_artifact(&mut self, artifact_id: &str) -> Option<ArtifactRow>;
}
Expand description

The persistence contract the gated artifact_trust tools (P2 A3) write through — the only path that stamps an artifact’s trust-bearing fields (verdict, approvals, shippable).

Ported from IArtifactTrustStore. The C# interface uses nullable return types for “not found”; we use Option<ArtifactRow> here.

Required Methods§

Source

fn get_artifact(&self, id: &str) -> Option<ArtifactRow>

Resolve an artifact by its id (across any session).

Source

fn get_artifact_by_path( &self, session_id: &str, path: &str, ) -> Option<ArtifactRow>

Resolve an artifact by (session, path) — the convenience lookup for an agent’s own output.

Source

fn attach_verdict( &mut self, artifact_id: &str, verdict: ArtifactVerdict, ) -> Option<ArtifactRow>

Stamp verdict onto the artifact (A3). The caller has already enforced juror≠producer; the verdict’s bound_hash is the artifact’s current content_hash at call time.

Source

fn record_approval( &mut self, artifact_id: &str, approval: ArtifactApproval, ) -> Option<ArtifactRow>

Append a human-gate approval to the artifact. Runtime-only — never reached through agent tool dispatch; this is the runtime’s direct path.

Source

fn finalize_artifact(&mut self, artifact_id: &str) -> Option<ArtifactRow>

Mark the artifact shippable (A3) — the finalize / shippable-intent signal later gates hang on.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§