artifactregistry

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package artifactregistry owns awf's canonical managed-artifact declarations.

Index

Constants

View Source
const (
	TargetBridgeKind       = "target-bridge"
	ClaudeBridgeTemplateID = "claude/CLAUDE.md.tmpl"
	TopicTemplateID        = "topics/topic.md.tmpl"
	TopicIndexTemplateID   = "topics/index.md.tmpl"
	PitfallEntryTemplateID = "pitfalls/entry.md.tmpl"
	LocalDocTemplateID     = "docs/local.md.tmpl"
)

Canonical template identities for registry-owned dynamic artifact families.

Variables

This section is empty.

Functions

func CatalogNames

func CatalogNames(cat *catalog.Catalog, plural string) ([]string, bool)

CatalogNames is the named-catalog inventory projection.

func HookTemplateID

func HookTemplateID(name string) string

HookTemplateID returns the canonical template identity for a hook.

func Hooks

func Hooks() []string

Hooks returns the canonical hook names in stable order.

func KnownTargets

func KnownTargets() []string

KnownTargets returns the built-in target names in stable order.

func LocalDocOutputPath

func LocalDocOutputPath(name string) string

LocalDocOutputPath returns the managed output path for a local document.

func Names

func Names(cat *catalog.Catalog, plural string) ([]string, bool)

Names returns a kind's sorted catalog inventory. Freeform kinds have no pool.

func OutputPath

func OutputPath(cat *catalog.Catalog, target Target, _ string, plural, name string) string

OutputPath returns one catalog artifact's canonical managed output path.

func PitfallOutputPath

func PitfallOutputPath(slug string) string

PitfallOutputPath returns the managed output path for a pitfall entry.

func Policy

func Policy(kind string, regenerate bool) outputplan.Policy

Policy returns the canonical detailed check participation for a producer family.

func ResidentOutputPath

func ResidentOutputPath(name string) string

ResidentOutputPath returns the managed marker path for a resident root.

func ResidentTemplateID

func ResidentTemplateID(name string) string

ResidentTemplateID returns the canonical template identity for a resident marker.

func Sections

func Sections(cat *catalog.Catalog, plural, name string) ([]string, bool)

Sections returns one artifact's declared sections and catalog presence.

func TargetDescriptorProjection

func TargetDescriptorProjection(target Target) string

TargetDescriptorProjection returns the stable output-affecting target identity.

func TemplateID

func TemplateID(cat *catalog.Catalog, plural, name string) string

TemplateID returns the canonical template source for one artifact.

func TopicIndexOutputPath

func TopicIndexOutputPath(domain string) string

TopicIndexOutputPath returns the managed output path for a domain topic index.

func TopicOutputPath

func TopicOutputPath(id string) string

TopicOutputPath returns the managed output path for a current-state topic.

func ValidateTarget

func ValidateTarget(target Target) error

ValidateTarget verifies the fixed target declaration.

Types

type Cardinality

type Cardinality string

Cardinality describes how a managed artifact family is selected.

const (
	// CardinalityCatalog selects artifacts from a named catalog.
	CardinalityCatalog Cardinality = "catalog"
	// CardinalityFreeform selects artifacts by caller-provided name.
	CardinalityFreeform Cardinality = "freeform"
	// CardinalitySingleton selects exactly one artifact.
	CardinalitySingleton Cardinality = "singleton"
)

type Hook

type Hook struct {
	Name, TemplateID, OutputPath, Owner string
	Checked                             bool
}

Hook is the stable hook-specific projection of a managed unit.

func HookArtifacts

func HookArtifacts() []Hook

HookArtifacts returns the registry-owned hook declarations in stable order.

type Kind

type Kind struct {
	Plural          string
	Singular        string
	Cardinality     Cardinality
	Targeting       Targeting
	Owner           Owner
	TemplatePattern string
	OwnsParts       bool
}

Kind declares one CLI-addressable managed-artifact family.

func KindByPlural

func KindByPlural(plural string) (Kind, bool)

KindByPlural returns the artifact kind with the given plural name.

func KindBySingular

func KindBySingular(singular string) (Kind, bool)

KindBySingular returns the artifact kind with the given singular name.

func Kinds

func Kinds() []Kind

Kinds returns the canonical artifact families in stable CLI display order.

type Owner

type Owner string

Owner identifies the subsystem responsible for an artifact declaration.

const (
	// OwnerCatalog identifies catalog-owned artifact declarations.
	OwnerCatalog Owner = "catalog"
	// OwnerCore identifies core artifact declarations.
	OwnerCore Owner = "core"
	// OwnerHooks identifies hook artifact declarations.
	OwnerHooks Owner = "hooks"
	// OwnerResident identifies resident-root artifact declarations.
	OwnerResident Owner = "resident"
)

type Participation

type Participation struct {
	Hook  bool
	Check bool
}

Participation declares whether an artifact participates in hook publication and in managed-output checks. Output policy supplies the detailed check lanes.

type ResidentArtifact

type ResidentArtifact struct {
	Name          string
	TemplateID    string
	OutputPath    string
	Participation Participation
	Owner         Owner
}

ResidentArtifact is one registry-owned resident-root marker declaration.

func Resident

func Resident(name string) ResidentArtifact

Resident returns the canonical marker declaration for one resident root.

type Singleton

type Singleton struct {
	Kind          string
	TemplateID    string
	OutputPath    string
	Sections      []string
	Generated     bool
	Participation Participation
	Owner         Owner
}

Singleton is a catalog-derived structural singleton artifact.

func PlainSingletons

func PlainSingletons(cat *catalog.Catalog) []Singleton

PlainSingletons excludes the root guide and computed generated outputs.

func Singletons

func Singletons(cat *catalog.Catalog) []Singleton

Singletons returns structural catalog artifacts in stable kind order.

type Target

type Target struct {
	Name           string
	SkillDir       string
	BridgeFile     string
	BridgeTemplate string
}

Target places fixed AWF skills and an optional guide bridge for one harness.

func BuiltinTarget

func BuiltinTarget(name string) Target

BuiltinTarget returns an isolated copy of the named built-in target.

func ResolveTargets

func ResolveTargets(names []string) ([]Target, error)

ResolveTargets validates and returns isolated copies of the named targets.

func Targets

func Targets() []Target

Targets returns all built-in targets in stable name order.

func (Target) SkillPath

func (t Target) SkillPath(name string) string

SkillPath returns the target-native path for a fixed-name managed skill.

type Targeting

type Targeting string

Targeting describes whether one artifact is neutral or emitted per target.

const (
	// TargetNeutral identifies an artifact emitted independently of targets.
	TargetNeutral Targeting = "neutral"
	// TargetAdapter identifies an artifact emitted for each selected target.
	TargetAdapter Targeting = "target"
)

type Unit

type Unit struct {
	ID            string
	Kind          string
	Path          string
	TemplateID    string
	Sections      []string
	Enabled       func(*config.Config) bool
	Policy        outputplan.Policy
	Participation Participation
	Owner         Owner
}

Unit declares one core singleton or hook artifact.

func ConditionalUnits

func ConditionalUnits() []Unit

ConditionalUnits returns stable core singleton and hook declarations.

Jump to

Keyboard shortcuts

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