Help us shape the future of Go! Take the 2026 Go Developer Survey

bundle

package
v2.219.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(dir, output string) error

Export writes a verified bundle as a deterministic gzip-compressed tarball.

func Fingerprint

func Fingerprint(m Manifest) string

Fingerprint names a composition and does not attest to one, since verify never recomputes digests. See docs/manifest-schema.md. agent-compose#350

Types

type ContentDigest

type ContentDigest struct {
	ID     string `json:"id"`
	Digest string `json:"digest"`
}

type Delivery

type Delivery struct {
	Mode            string `json:"mode"`
	Instructions    string `json:"instructions"`
	SkillsRoot      string `json:"skills_root,omitempty"`
	CompiledContext string `json:"compiled_context,omitempty"`
	// VoiceProfile is the linter profile this seat lints itself against, absent
	// when the seat has no avoid bank and carries no hand-written profile.
	VoiceProfile string `json:"voice_profile,omitempty"`
	// BodyBytes is what a consumer pays for on every turn. Sources are bounded
	// by their own hooks; this is the composed output. See docs/bundle-protocol.md.
	BodyBytes int `json:"body_bytes"`
}

type Identity

type Identity struct {
	Source string
	Skill  string
}

type IdentityPersonality

type IdentityPersonality struct {
	Name   string        `json:"name"`
	Color  string        `json:"color"`
	Emblem person.Emblem `json:"emblem"`
}

type Manifest

type Manifest struct {
	Format          string                       `json:"format"`
	Role            string                       `json:"role"`
	RoleSkill       string                       `json:"role_skill"`
	RoleSkillSource string                       `json:"role_skill_source"`
	RoleSkillDigest string                       `json:"role_skill_digest"`
	ModelTier       string                       `json:"model_tier"`
	Personalities   []string                     `json:"personalities"`
	Boundaries      []string                     `json:"boundaries,omitempty"`
	Guardrail       string                       `json:"guardrail,omitempty"`
	Color           string                       `json:"color"`
	Identity        RoleIdentity                 `json:"identity,omitempty"`
	Sources         []string                     `json:"sources"`
	Repositories    []schema.RepositorySelection `json:"repositories,omitempty"`
	Content         []ContentDigest              `json:"content"`
	Delivery        Delivery                     `json:"delivery"`
}

func ReadManifest

func ReadManifest(dir string) (*Manifest, error)

ReadManifest is the consumer entry point: bundles are opaque except for manifest.json.

type Result

type Result struct {
	Dir    string
	Key    string
	Reused bool
}

func Materialize

func Materialize(res *resolver.Resolution, outDir string) (*Result, error)

Materialize writes the resolved bundle beneath outDir, atomically and at most once per input key. Identical inputs reuse the existing tree.

type RoleIdentity

type RoleIdentity struct {
	Person string `json:"person"`
	// DisplayName lets a consumer label the seat without loading a roster,
	// which a delivered bundle no longer ships beside. #409.
	DisplayName   string                `json:"display_name"`
	Purpose       string                `json:"purpose"`
	Seats         []person.Seat         `json:"seats"`
	Personalities []IdentityPersonality `json:"personalities"`
}

RoleIdentity keeps renderer metadata in the immutable bundle so consumers never reload a mutable person source after composition.

type Trace

type Trace struct {
	Format    string                    `json:"format"`
	Decisions []resolver.Decision       `json:"decisions"`
	Providers []resolver.ProviderReport `json:"providers,omitempty"`
}

func ReadTrace

func ReadTrace(dir string) (*Trace, error)

ReadTrace loads the retained decision evidence; it is also the stable machine-readable explanation surface - there is no second format.

type Verification

type Verification struct {
	Manifest   *Manifest
	Files      int
	Identities []Identity
}

Verification is the stable, read-only result of checking a bundle.

func Verify

func Verify(dir string) (*Verification, error)

Verify checks the consumer contract, rejecting unsafe or incomplete trees and identity content that disagrees with the retained selection trace.

Jump to

Keyboard shortcuts

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