artifactregistry

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: AGPL-3.0 Imports: 10 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 AnyTargetHasCapability

func AnyTargetHasCapability(targets []Target, capability Capability) bool

AnyTargetHasCapability reports whether any selected target declares capability.

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

func Hooks

func Hooks() []string

func KnownTargets

func KnownTargets() []string

func LocalDocOutputPath

func LocalDocOutputPath(name string) string

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, prefix, plural, name string) string

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

func PitfallOutputPath

func PitfallOutputPath(slug string) string

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

func ResidentTemplateID

func ResidentTemplateID(name string) string

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 TargetTemplateData

func TargetTemplateData(target Target) map[string]any

TargetTemplateData projects the closed capability set into template inputs.

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

func TopicOutputPath

func TopicOutputPath(id string) string

func ValidateTarget

func ValidateTarget(target Target) error

func ValidateTargetRequirements

func ValidateTargetRequirements(target Target, cat *catalog.Catalog) error

ValidateTargetRequirements rejects outputs that name an absent catalog skill.

Types

type AgentDialect

type AgentDialect string

AgentDialect names the target-native output representation.

const (
	MarkdownAgentDialect AgentDialect = "markdown"
	PlainAgentDialect    AgentDialect = "plain"
)

type Capability

type Capability string

Capability is one closed target capability.

const (
	CapabilitySubagentTools  Capability = "subagent-tools"
	CapabilitySessionHandoff Capability = "session-handoff"
)

type Cardinality

type Cardinality string

Cardinality describes how a managed artifact family is selected.

const (
	CardinalityCatalog   Cardinality = "catalog"
	CardinalityFreeform  Cardinality = "freeform"
	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

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)

func KindBySingular

func KindBySingular(singular string) (Kind, bool)

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  Owner = "catalog"
	OwnerTarget   Owner = "target"
	OwnerCore     Owner = "core"
	OwnerHooks    Owner = "hooks"
	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
	AgentDir       string
	AgentSuffix    string
	AgentDialect   AgentDialect
	BridgeFile     string
	BridgeTemplate string
	Capabilities   []Capability
	Outputs        []TargetOutput
}

Target places adapter artifacts for one runtime.

func BuiltinTarget

func BuiltinTarget(name string) Target

func ResolveTargets

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

func Targets

func Targets() []Target

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

func (Target) AgentPath

func (t Target) AgentPath(name string) string

func (Target) SkillPath

func (t Target) SkillPath(prefix, name string) string

type TargetArtifact

type TargetArtifact struct {
	Output        TargetOutput
	Participation Participation
	Owner         Owner
}

TargetArtifact attaches registry governance metadata to one target output.

func ResolveTargetArtifacts

func ResolveTargetArtifacts(target Target, prefix string, selected []string) []TargetArtifact

ResolveTargetArtifacts applies required-skill selection and skill-path translation while retaining the registry's ownership and check-participation metadata.

type TargetOutput

type TargetOutput struct {
	Path           string
	SkillName      string
	RequiresSkill  string
	TemplateID     string
	Producer       TargetOutputProducer
	Inputs         []TargetOutputInput
	Encoder        AgentDialect
	Provenance     render.CommentStyle
	Policy         outputplan.Policy
	PolicyDeclared bool
}

TargetOutput is one target-owned non-catalog managed artifact.

type TargetOutputInput

type TargetOutputInput struct {
	Path string
	Role outputplan.ArtifactRole
}

TargetOutputInput declares one semantic input to a target-owned output.

type TargetOutputProducer

type TargetOutputProducer string

TargetOutputProducer identifies how a target-owned output is produced.

const TargetOutputTemplate TargetOutputProducer = "template"

type Targeting

type Targeting string

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

const (
	TargetNeutral Targeting = "neutral"
	TargetAdapter Targeting = "target"
)

type Unit

type Unit struct {
	ID            string
	Kind          string
	Path          string
	TemplateID    string
	Sections      []string
	Enabled       func(*config.Config) bool
	Encoder       AgentDialect
	Provenance    render.CommentStyle
	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