Documentation
¶
Overview ¶
Package activation defines the versioned native-activation contract that binds each generated component (harness/extension identity plus its published artifact bundle and runtime contract) to exactly one closed activation strategy.
Installer mechanics live here, separate from the protocol-semantic runtime IR. Values are opaque and validated: an ExhaustiveComponentActivations can be built only with exactly one skills, one agents, and one hooks component, and LookupComponentActivation accepts only an opaque ComponentDescriptor, never a raw string or extension literal. Wrong-harness, missing, and incompatible lookups return explicit six-part errors rather than a silent zero value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationContract ¶
type ActivationContract struct {
// contains filtered or unexported fields
}
ActivationContract binds one harness's exhaustive component activations under a versioned id, host version constraint, and version probe schema.
func NewActivationContract ¶
func NewActivationContract( id ActivationContractID, harness ir.HarnessID, hostVersions runtime.VersionConstraint, versionProbe CommandSchema, components ExhaustiveComponentActivations, ) (ActivationContract, error)
NewActivationContract validates and assembles an activation contract.
func (ActivationContract) Harness ¶
func (c ActivationContract) Harness() ir.HarnessID
Harness returns the contract harness.
func (ActivationContract) HostVersions ¶
func (c ActivationContract) HostVersions() runtime.VersionConstraint
HostVersions returns the accepted host version constraint.
func (ActivationContract) ID ¶
func (c ActivationContract) ID() ActivationContractID
ID returns the contract id.
func (ActivationContract) IsValid ¶
func (c ActivationContract) IsValid() bool
IsValid reports whether the contract was validly constructed.
func (ActivationContract) VersionProbe ¶
func (c ActivationContract) VersionProbe() CommandSchema
VersionProbe returns the schema used to probe the live host version.
type ActivationContractID ¶
type ActivationContractID string
ActivationContractID identifies a versioned activation contract. It is a distinct string type so it cannot be confused with a RuntimeContractID or a bare identifier; construct it with NewActivationContractID.
func NewActivationContractID ¶
func NewActivationContractID(value string) (ActivationContractID, error)
NewActivationContractID validates a non-empty activation contract id.
func (ActivationContractID) String ¶
func (id ActivationContractID) String() string
String returns the raw id.
type ActivationStrategy ¶
type ActivationStrategy interface {
// Kind returns a stable discriminator for goldens and diagnostics.
Kind() StrategyKind
// contains filtered or unexported methods
}
ActivationStrategy is the sealed set of ways one component is activated. The sealing method is unexported so only this package can define variants: NativePlugin, DirectFile, and NativePluginPendingTrust. A component holds exactly one strategy, which prevents invalid nullable manager/config combinations.
type CommandSchema ¶
type CommandSchema struct {
// contains filtered or unexported fields
}
CommandSchema is a validated, literal command line: an executable and its exact argument vector. It carries no placeholder or shell metacharacter, so a native manager or version probe argv is fixture-frozen and never assembled by string interpolation at call time.
func NewCommandSchema ¶
func NewCommandSchema(program string, args ...string) (CommandSchema, error)
NewCommandSchema validates and owns a literal argv. The program must be non-empty and no argument may be empty.
func (CommandSchema) Args ¶
func (c CommandSchema) Args() []string
Args returns a copy of the literal argument vector.
func (CommandSchema) IsValid ¶
func (c CommandSchema) IsValid() bool
IsValid reports whether the schema was validly constructed.
func (CommandSchema) Program ¶
func (c CommandSchema) Program() string
Program returns the executable name.
func (CommandSchema) String ¶
func (c CommandSchema) String() string
String renders the argv for diagnostics.
type ComponentActivation ¶
type ComponentActivation struct {
// contains filtered or unexported fields
}
ComponentActivation binds one cell to its closed activation strategy.
func LookupComponentActivation ¶
func LookupComponentActivation(contract ActivationContract, component ComponentDescriptor) (ComponentActivation, error)
LookupComponentActivation resolves a descriptor against a contract. It returns an explicit error for an invalid contract, an invalid descriptor, or a wrong-harness component; it never returns a zero activation as a success.
func NewComponentActivation ¶
func NewComponentActivation(c cell.Cell, strategy ActivationStrategy) (ComponentActivation, error)
NewComponentActivation validates a cell/strategy binding. A nil strategy is rejected so a zero activation can never be a public lookup result.
func (ComponentActivation) Cell ¶
func (a ComponentActivation) Cell() cell.Cell
Cell returns the bound cell.
func (ComponentActivation) IsValid ¶
func (a ComponentActivation) IsValid() bool
IsValid reports whether the activation was validly constructed.
func (ComponentActivation) Strategy ¶
func (a ComponentActivation) Strategy() ActivationStrategy
Strategy returns the closed activation strategy.
type ComponentDescriptor ¶
type ComponentDescriptor struct {
// contains filtered or unexported fields
}
ComponentDescriptor is an opaque, validated component identity accepted by LookupComponentActivation. It can be built only from a valid cell, so raw extension literals and strings are not public lookup states.
func NewComponentDescriptor ¶
func NewComponentDescriptor(c cell.Cell) (ComponentDescriptor, error)
NewComponentDescriptor validates and owns a component identity.
func (ComponentDescriptor) Cell ¶
func (d ComponentDescriptor) Cell() cell.Cell
Cell exposes the descriptor's coordinate.
type DirectFile ¶
type DirectFile struct {
// contains filtered or unexported fields
}
DirectFile activates a component by materializing a published artifact bundle under a destination root, adding only the destination to the bundle the target already published. It owns no native manager argv.
func NewDirectFile ¶
func NewDirectFile(bundle artifact.Bundle, destinationRoot string) (DirectFile, error)
NewDirectFile validates a direct-file strategy: a valid bundle and a non-empty destination root (a caller-supplied absolute or relative directory, resolved by the apply engine).
func (DirectFile) Bundle ¶
func (s DirectFile) Bundle() artifact.Bundle
func (DirectFile) DestinationRoot ¶
func (s DirectFile) DestinationRoot() string
func (DirectFile) IsValid ¶
func (s DirectFile) IsValid() bool
func (DirectFile) Kind ¶
func (DirectFile) Kind() StrategyKind
type ExhaustiveComponentActivations ¶
type ExhaustiveComponentActivations struct {
// contains filtered or unexported fields
}
ExhaustiveComponentActivations holds exactly one skills, one agents, and one hooks activation for a single harness. It has no public map, so no caller can inject an extra, missing, or duplicate axis.
func NewExhaustiveComponentActivations ¶
func NewExhaustiveComponentActivations(skills, agents, hooks ComponentActivation) (ExhaustiveComponentActivations, error)
NewExhaustiveComponentActivations validates that exactly one activation is supplied per axis, that all three share one harness, and that each activation sits on its own axis.
func (ExhaustiveComponentActivations) Harness ¶
func (e ExhaustiveComponentActivations) Harness() ir.HarnessID
Harness returns the harness these activations belong to.
type NativePlugin ¶
type NativePlugin struct {
// contains filtered or unexported fields
}
NativePlugin activates a component through a harness's documented native plugin/marketplace manager. It carries an exact package identity and the literal manager argv schemas; it owns no filesystem destination.
func NewNativePlugin ¶
func NewNativePlugin(pkg string, managers ...CommandSchema) (NativePlugin, error)
NewNativePlugin validates a native-plugin strategy: a non-empty package identity and at least one manager command schema.
func (NativePlugin) IsValid ¶
func (s NativePlugin) IsValid() bool
func (NativePlugin) Kind ¶
func (NativePlugin) Kind() StrategyKind
func (NativePlugin) Managers ¶
func (s NativePlugin) Managers() []CommandSchema
func (NativePlugin) Package ¶
func (s NativePlugin) Package() string
type NativePluginPendingTrust ¶
type NativePluginPendingTrust struct {
// contains filtered or unexported fields
}
NativePluginPendingTrust is a native-plugin activation whose completion is installed-pending-trust: the native host still requires an out-of-band review (e.g. Codex hooks). It never claims the component is active before approval and writes no private trust state.
func NewNativePluginPendingTrust ¶
func NewNativePluginPendingTrust(plugin NativePlugin) (NativePluginPendingTrust, error)
NewNativePluginPendingTrust wraps a validated native-plugin strategy as pending-trust.
func (NativePluginPendingTrust) Kind ¶
func (NativePluginPendingTrust) Kind() StrategyKind
func (NativePluginPendingTrust) Plugin ¶
func (s NativePluginPendingTrust) Plugin() NativePlugin
type StrategyKind ¶
type StrategyKind struct {
// contains filtered or unexported fields
}
StrategyKind is a typed discriminator over the closed strategy set.
func DirectFileKindValue ¶
func DirectFileKindValue() StrategyKind
func NativePluginKindValue ¶
func NativePluginKindValue() StrategyKind
NativePluginKindValue, DirectFileKindValue, and NativePluginPendingTrustKindValue expose the discriminators for switch comparisons.
func NativePluginPendingTrustKindValue ¶
func NativePluginPendingTrustKindValue() StrategyKind
func ParseStrategyKind ¶
func ParseStrategyKind(value string) (StrategyKind, error)
ParseStrategyKind resolves a canonical strategy discriminator name.
func (StrategyKind) IsValid ¶
func (k StrategyKind) IsValid() bool
IsValid reports whether k is one of the closed strategy discriminators.
func (StrategyKind) String ¶
func (k StrategyKind) String() string
String returns the stable discriminator name.