Documentation
¶
Overview ¶
Package extensions owns immutable, framework-free extension catalog snapshots.
Index ¶
- Variables
- type Catalog
- func (c Catalog) AllSkills() []Skill
- func (c Catalog) AllowedMCPNames() []string
- func (c Catalog) CompiledPlugins() []CompiledPlugin
- func (c Catalog) Instructions() []Instruction
- func (c Catalog) LoadSkill(ctx context.Context, name string, model bool) (LoadedSkill, error)
- func (c Catalog) LoadSkillResource(ctx context.Context, name, resource string, model bool) (string, error)
- func (c Catalog) LoadTemplate(ctx context.Context, name string, model bool) (LoadedTemplate, error)
- func (c Catalog) MCPServers() []MCPServer
- func (c Catalog) ResolveMCP(name string) (config.MCPServer, error)
- func (c Catalog) Skills() []Skill
- func (c Catalog) Templates() []Template
- func (c Catalog) Warnings() []warning.Warning
- type CompiledPlugin
- type Instruction
- type LoadedSkill
- type LoadedTemplate
- type MCPServer
- type Metadata
- type Options
- type Provenance
- type Skill
- type Store
- func (s *Store) Close()
- func (s *Store) DropSession(sessionID string)
- func (*Store) Format(state fmt.State, _ rune)
- func (*Store) LogValue() slog.Value
- func (s *Store) ObserveTouch(_ context.Context, touch workspace.Touch)
- func (s *Store) Snapshot(sessionID string) (Catalog, bool)
- func (s *Store) StartSession(ctx context.Context, sessionID string) error
- func (s *Store) StartSessionWithInstructions(ctx context.Context, sessionID string, instructions []Instruction) error
- type Template
- type ToolPattern
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("extension not found") ErrAmbiguous = errors.New("extension name is ambiguous") ErrUntrusted = errors.New("extension is not trusted for invocation") ErrInactive = errors.New("extension is not active for the current session") ErrChanged = errors.New("extension source changed after snapshot") ErrResource = errors.New("invalid skill resource") ErrClosed = errors.New("extension store is closed") )
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is immutable after publication by Store.StartSession.
func (Catalog) AllowedMCPNames ¶
AllowedMCPNames returns exact qualified activation names in stable order.
func (Catalog) CompiledPlugins ¶
func (c Catalog) CompiledPlugins() []CompiledPlugin
func (Catalog) Instructions ¶
func (c Catalog) Instructions() []Instruction
func (Catalog) LoadSkill ¶
LoadSkill bounded-reads and digest-verifies the selected snapshot source.
func (Catalog) LoadSkillResource ¶
func (c Catalog) LoadSkillResource(ctx context.Context, name, resource string, model bool) (string, error)
LoadSkillResource reads one confined regular UTF-8 resource on demand.
func (Catalog) LoadTemplate ¶
LoadTemplate bounded-reads and digest-verifies the selected template source.
func (Catalog) MCPServers ¶
func (Catalog) ResolveMCP ¶
ResolveMCP returns one consent-gated runtime descriptor. Secrets remain out of list records and warnings.
type CompiledPlugin ¶
type CompiledPlugin struct {
Name string `json:"name"`
Provenance []Provenance `json:"provenance"`
}
type Instruction ¶
type Instruction struct {
Name string `json:"name"`
Provenance []Provenance `json:"provenance"`
}
Instruction and CompiledPlugin complete the normalized catalog kinds.
type LoadedSkill ¶
type LoadedSkill struct {
Skill Skill
SelectedName string
SelectedProvenance Provenance
Root string
PluginRoot string
PluginData string
Body string
Arguments []string
Globs []string
AllowedTools []ToolPattern
DeniedTools []ToolPattern
Restricted bool
Warnings []warning.Warning
}
LoadedSkill is one digest-verified lazy body and invocation policy.
type LoadedTemplate ¶
type LoadedTemplate struct {
Template Template
SelectedName string
SelectedProvenance Provenance
Root string
PluginRoot string
PluginData string
Body string
Arguments []string
AllowedTools []ToolPattern
DeniedTools []ToolPattern
Restricted bool
Warnings []warning.Warning
}
LoadedTemplate is one digest-verified lazy template and invocation policy.
type MCPServer ¶
type MCPServer struct {
Name string `json:"name"`
QualifiedNames []string `json:"qualified_names"`
Transport string `json:"transport"`
Foreign bool `json:"foreign"`
Allowed bool `json:"allowed"`
Provenance []Provenance `json:"provenance"`
}
MCPServer is a secret-free activation descriptor.
type Options ¶
type Options struct {
WorkingDir string
HomeDir string
SkillRoots []string
Foreign foreign.Options
Claude bool
Codex bool
Copilot bool
MCP config.MCP
Instructions []Instruction
CompiledPlugins []CompiledPlugin
MaxResourceBytes int64
MaxEntries int
WarningSink warning.Warner
}
Options configures stable per-session extension snapshots.
type Provenance ¶
type Provenance struct {
Host string `json:"host"`
Scope string `json:"scope"`
SourcePath string `json:"source_path"`
PluginID string `json:"plugin_id"`
PluginVersion string `json:"plugin_version"`
Enabled bool `json:"enabled"`
Trusted bool `json:"trusted"`
Classification string `json:"classification"`
}
Provenance identifies one retained source without activation secrets.
type Skill ¶
type Skill struct {
Name string `json:"name"`
QualifiedNames []string `json:"qualified_names"`
Description string `json:"description"`
License string `json:"license"`
Compatibility string `json:"compatibility"`
Metadata []Metadata `json:"metadata"`
Globs []string `json:"globs"`
Provenance []Provenance `json:"provenance"`
ModelInvocable bool `json:"model_invocable"`
UserInvocable bool `json:"user_invocable"`
}
Skill is safe list metadata. Bodies and resources are never retained here.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store owns immutable catalog snapshots keyed by session.
func (*Store) DropSession ¶
func (*Store) Format ¶
Format prevents secret-bearing activation configuration from appearing in diagnostic formatting.
func (*Store) ObserveTouch ¶
ObserveTouch activates path-scoped skills in the touched session. Catalog records remain stable; only model exposure changes monotonically.
func (*Store) StartSession ¶
func (*Store) StartSessionWithInstructions ¶
func (s *Store) StartSessionWithInstructions(ctx context.Context, sessionID string, instructions []Instruction) error
StartSessionWithInstructions captures one snapshot and appends instruction metadata discovered by the Harness-owned context resolver.
type Template ¶
type Template struct {
Name string `json:"name"`
QualifiedNames []string `json:"qualified_names"`
Provenance []Provenance `json:"provenance"`
ModelInvocable bool `json:"model_invocable"`
UserInvocable bool `json:"user_invocable"`
}
Template is safe template list metadata.
type ToolPattern ¶
ToolPattern is the framework-free public projection of a tool policy row.