Documentation
¶
Overview ¶
Package artifactregistry owns awf's canonical managed-artifact declarations.
Index ¶
- Constants
- func AnyTargetHasCapability(targets []Target, capability Capability) bool
- func CatalogNames(cat *catalog.Catalog, plural string) ([]string, bool)
- func HookTemplateID(name string) string
- func Hooks() []string
- func KnownTargets() []string
- func LocalDocOutputPath(name string) string
- func Names(cat *catalog.Catalog, plural string) ([]string, bool)
- func OutputPath(cat *catalog.Catalog, target Target, prefix, plural, name string) string
- func PitfallOutputPath(slug string) string
- func Policy(kind string, regenerate bool) outputplan.Policy
- func ResidentOutputPath(name string) string
- func ResidentTemplateID(name string) string
- func Sections(cat *catalog.Catalog, plural, name string) ([]string, bool)
- func TargetDescriptorProjection(target Target) string
- func TargetTemplateData(target Target) map[string]any
- func TemplateID(cat *catalog.Catalog, plural, name string) string
- func TopicIndexOutputPath(domain string) string
- func TopicOutputPath(id string) string
- func ValidateTarget(target Target) error
- func ValidateTargetRequirements(target Target, cat *catalog.Catalog) error
- type AgentDialect
- type Capability
- type Cardinality
- type Hook
- type Kind
- type Owner
- type Participation
- type ResidentArtifact
- type Singleton
- type Target
- type TargetArtifact
- type TargetOutput
- type TargetOutputInput
- type TargetOutputProducer
- type Targeting
- type Unit
Constants ¶
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 ¶
CatalogNames is the named-catalog inventory projection.
func HookTemplateID ¶
HookTemplateID returns the canonical template identity for a hook.
func KnownTargets ¶
func KnownTargets() []string
KnownTargets returns the built-in target names in stable order.
func LocalDocOutputPath ¶
LocalDocOutputPath returns the managed output path for a local document.
func OutputPath ¶
OutputPath returns one catalog artifact's canonical managed output path.
func PitfallOutputPath ¶
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 ¶
ResidentOutputPath returns the managed marker path for a resident root.
func ResidentTemplateID ¶
ResidentTemplateID returns the canonical template identity for a resident marker.
func TargetDescriptorProjection ¶
TargetDescriptorProjection returns the stable output-affecting target identity.
func TargetTemplateData ¶
TargetTemplateData projects the closed capability set into template inputs.
func TemplateID ¶
TemplateID returns the canonical template source for one artifact.
func TopicIndexOutputPath ¶
TopicIndexOutputPath returns the managed output path for a domain topic index.
func TopicOutputPath ¶
TopicOutputPath returns the managed output path for a current-state topic.
func ValidateTarget ¶
ValidateTarget verifies a target declaration's closed registry contract.
Types ¶
type AgentDialect ¶
type AgentDialect string
AgentDialect names the target-native output representation.
const ( // MarkdownAgentDialect identifies Markdown target output. MarkdownAgentDialect AgentDialect = "markdown" // PlainAgentDialect identifies non-Markdown target output. PlainAgentDialect AgentDialect = "plain" )
type Capability ¶
type Capability string
Capability is one closed target capability.
const ( // CapabilitySubagentTools permits target-native subagent tooling. CapabilitySubagentTools Capability = "subagent-tools" // CapabilitySessionHandoff permits target-native session handoff. CapabilitySessionHandoff Capability = "session-handoff" )
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 ¶
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 ¶
KindByPlural returns the artifact kind with the given plural name.
func KindBySingular ¶
KindBySingular returns the artifact kind with the given singular name.
type Owner ¶
type Owner string
Owner identifies the subsystem responsible for an artifact declaration.
const ( // OwnerCatalog identifies catalog-owned artifact declarations. OwnerCatalog Owner = "catalog" // OwnerTarget identifies target-owned artifact declarations. OwnerTarget Owner = "target" // 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 ¶
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 ¶
PlainSingletons excludes the root guide and computed generated outputs.
func Singletons ¶
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 ¶
BuiltinTarget returns an isolated copy of the named built-in target.
func ResolveTargets ¶
ResolveTargets validates and returns isolated copies of the named targets.
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"
TargetOutputTemplate identifies template-produced target output.
type Targeting ¶
type Targeting string
Targeting describes whether one artifact is neutral or emitted per 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.