bundle

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package bundle implements the portable proof-bundle format (schema v2; v1 bundles still verify).

A bundle proves the integrity of the artifacts it contains and records the harness's evidence and attestations. It does not prove that the configured verifier fully captures task correctness.

Index

Constants

View Source
const Limit = "" /* 141-byte string literal not displayed */
View Source
const SchemaVersion = 2

Variables

This section is empty.

Functions

func ParsePrivateKey

func ParsePrivateKey(s string) (ed25519.PrivateKey, error)

Types

type Attestations

type Attestations struct {
	ChangedFiles      []string `json:"changed_files,omitempty"`
	WorkspaceEffect   string   `json:"workspace_effect"`
	DiffStatus        string   `json:"diff_status"`
	ScopeStatus       string   `json:"scope_status"`
	TestFenceStatus   string   `json:"test_fence_status"`
	Isolation         string   `json:"isolation"`
	ObservedIsolation string   `json:"observed_isolation"`
	ObservedNetwork   *bool    `json:"observed_network"`
	TrustPosture      string   `json:"trust_posture"`
}

type Component

type Component struct {
	Name   string `json:"name"`
	Path   string `json:"path"`
	SHA256 string `json:"sha256"`
	Kind   string `json:"kind"` // reproducible_evidence
}

type Cost

type Cost struct {
	Usage    any      `json:"usage"`
	TotalUSD *float64 `json:"total_usd"`
	State    string   `json:"state"`
	Source   *string  `json:"source"`
}

type Identity

type Identity struct {
	ExecutionProfile      string `json:"execution_profile,omitempty"`
	ExecutionProfileHash  string `json:"execution_profile_hash,omitempty"`
	EffectiveConfigSHA256 string `json:"effective_config_sha256"`
	// ResolutionTraceSHA256 / RuntimeResolutionSHA256 extend bundle identity
	// with the resolution trace and the runtime-derivation event sequence
	// (PROFILES.md §7.3): two runs sharing the policy hash cannot execute
	// different derived verify commands invisibly.
	ResolutionTraceSHA256   string `json:"resolution_trace_sha256,omitempty"`
	RuntimeResolutionSHA256 string `json:"runtime_resolution_sha256,omitempty"`
	PromptSHA256            string `json:"prompt_sha256"`
	ToolSchemaSHA256        string `json:"tool_schema_sha256"`
	Solver                  string `json:"solver,omitempty"`
	Reviewer                string `json:"reviewer,omitempty"`
	Planner                 string `json:"planner,omitempty"`
	HarnessCommit           string `json:"harness_commit,omitempty"`
	HarnessDirty            bool   `json:"harness_dirty"`
	BuildIdentity           string `json:"build_identity,omitempty"`
}

type Input

type Input struct {
	Manifest                  Manifest
	TranscriptPath, PatchPath string
	VerifierOutput            []byte
	ClosingVerifierOutput     []byte
	SigningKey                ed25519.PrivateKey
}

type Manifest

type Manifest struct {
	SchemaVersion int          `json:"schema_version"`
	RunID         string       `json:"run_id"`
	Limit         string       `json:"limit"`
	Components    []Component  `json:"reproducible_evidence"`
	Attestations  Attestations `json:"producer_attestations"`
	Verification  any          `json:"verification_evidence"`
	Review        any          `json:"review_evidence"`
	Degradations  any          `json:"degradations"`
	Uncertainty   []string     `json:"uncertainty,omitempty"`
	Identity      Identity     `json:"identity"`
	Cost          Cost         `json:"cost"`
	Signature     Signature    `json:"signature"`
}

type Result

type Result struct{ Path, ManifestSHA256 string }

func Create

func Create(parent string, in Input) (Result, error)

type Signature

type Signature struct {
	Status               string `json:"signature_status"`
	PublicKey            string `json:"public_key,omitempty"`
	PublicKeyFingerprint string `json:"public_key_fingerprint,omitempty"`
	Value                string `json:"value,omitempty"`
}

type VerificationResult

type VerificationResult struct {
	ManifestSHA256       string
	ReproducibleEvidence []string
	Attestations         Attestations
	SignatureStatus      string
}

func Verify

func Verify(path string) (VerificationResult, error)

Verify checks a bundle offline: manifest hash, per-component digests, and the embedded signature if present. It never executes anything recorded in the bundle.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL