Documentation
¶
Overview ¶
Package extensions owns the host-side extension boundary. Discovery does not execute code; approved sources are connected only explicitly or after a tool gate.
Index ¶
- func ConfigPath() string
- func DisplayText(s string, limit int) string
- func ModelName(ref SourceRef, name string) string
- func WriteSource(path string, ref SourceRef, c *SourceConfig) error
- type Catalog
- type Config
- type Item
- type Manager
- func (m *Manager) Approve(ref SourceRef) error
- func (m *Manager) ApproveSession(ref SourceRef) error
- func (m *Manager) Close() error
- func (m *Manager) Config(ref SourceRef) (SourceConfig, error)
- func (m *Manager) Connect(ctx context.Context, ref SourceRef) error
- func (m *Manager) Cwd() string
- func (m *Manager) Disable(ref SourceRef) error
- func (m *Manager) Disconnect(ref SourceRef) error
- func (m *Manager) Enable(ref SourceRef) error
- func (m *Manager) KnownTools() []agentcore.AgentTool
- func (m *Manager) List() []Snapshot
- func (m *Manager) Logs(ref SourceRef) (string, error)
- func (m *Manager) Observe(ev agentcore.AgentEvent)
- func (m *Manager) PackageSkills() map[string]string
- func (m *Manager) Prompt(ctx context.Context, ref SourceRef, name string, args map[string]string) (string, error)
- func (m *Manager) Refresh(ctx context.Context, ref SourceRef) error
- func (m *Manager) RefreshDirty(ctx context.Context)
- func (m *Manager) Reset(ref SourceRef) error
- func (m *Manager) Resource(ctx context.Context, ref SourceRef, uri string) (string, error)
- func (m *Manager) Revision() uint64
- func (m *Manager) SetSkillEnabled(name string, enabled bool) bool
- func (m *Manager) SetSkills(skills []*runtime.Skill, off bool)
- func (m *Manager) Setup(ctx context.Context, ref SourceRef, show func(setupevent.Event) error) error
- func (m *Manager) SetupVariant(ctx context.Context, ref SourceRef, variant string, ...) error
- func (m *Manager) Skill(name string) *runtime.Skill
- func (m *Manager) SkillRoots() []string
- func (m *Manager) SkillViews() []SkillView
- func (m *Manager) Skills() []*runtime.Skill
- func (m *Manager) Tools() []agentcore.AgentTool
- type Options
- type SkillView
- type Snapshot
- type SourceConfig
- type SourceRef
- type ToolView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
func ConfigPath() string
func DisplayText ¶
DisplayText is for terminal-facing data, not for rewriting executable input.
func WriteSource ¶
func WriteSource(path string, ref SourceRef, c *SourceConfig) error
WriteSource edits just one canonical source table, preserving unrelated tables/comments. Noncanonical dotted/inline representations fail closed.
Types ¶
type Catalog ¶
type Catalog struct {
Protocol string `json:"protocol,omitempty"`
Version string `json:"version,omitempty"`
Tools []extension.ToolSpec `json:"tools"`
Commands []Item `json:"commands,omitempty"`
Events []string `json:"events,omitempty"`
Prompts []Item `json:"prompts,omitempty"`
Resources []Item `json:"resources,omitempty"`
}
type Config ¶
type Config struct {
Plugins map[string]SourceConfig `toml:"plugins"`
MCP struct {
Servers map[string]SourceConfig `toml:"servers"`
} `toml:"mcp"`
}
func LoadConfig ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) ApproveSession ¶
ApproveSession must not become persistent when a later probe saves its catalog. Session admission and remembered trust are separate state.
func (*Manager) Disconnect ¶
func (*Manager) KnownTools ¶
KnownTools is used for validating explicit operator tool names before the allow/deny filter. It is never registered directly for execution.
func (*Manager) Observe ¶
func (m *Manager) Observe(ev agentcore.AgentEvent)
Observe only queues host-owned metadata. Message bodies, tool arguments and result text are never copied into an extension event subscription.
func (*Manager) PackageSkills ¶
PackageSkills returns only approved enabled package roots. Independent skills retain their existing discovery order and win same-name collisions upstream.
func (*Manager) RefreshDirty ¶
RefreshDirty only uses already-established sessions. No new process or connection can be introduced by a list_changed notification.
func (*Manager) Reset ¶ added in v1.5.16
Reset clears only this source HOME, with its persistent parent lock retained. The caller must obtain a separate explicit operator confirmation.
func (*Manager) Setup ¶ added in v1.5.16
func (m *Manager) Setup(ctx context.Context, ref SourceRef, show func(setupevent.Event) error) error
Setup is an explicit operator action, never a model tool or handshake side effect. Its callback runs as events arrive, while the child keeps polling.
func (*Manager) SetupVariant ¶ added in v1.5.16
func (*Manager) SkillRoots ¶
func (*Manager) SkillViews ¶
type Snapshot ¶
type Snapshot struct {
Ref SourceRef `json:"source"`
Type string `json:"type"`
Enabled bool `json:"enabled"`
Trust string `json:"trust"`
State string `json:"state"`
Authentication string `json:"authentication"`
Endpoint string `json:"endpoint,omitempty"`
Version string `json:"version,omitempty"`
Protocol string `json:"protocol,omitempty"`
LastError string `json:"last_error,omitempty"`
Tools []ToolView `json:"tools"`
Commands []Item `json:"commands,omitempty"`
Events []string `json:"events,omitempty"`
Prompts []Item `json:"prompts,omitempty"`
Resources []Item `json:"resources,omitempty"`
Revision uint64 `json:"revision"`
Capabilities map[string]any `json:"capabilities,omitempty"`
}
type SourceConfig ¶
type SourceConfig struct {
Enabled bool `toml:"enabled" json:"enabled"`
Runtime string `toml:"runtime,omitempty" json:"runtime,omitempty"`
Manifest string `toml:"manifest,omitempty" json:"manifest,omitempty"`
Transport string `toml:"transport,omitempty" json:"transport,omitempty"`
Command string `toml:"command,omitempty" json:"command,omitempty"`
Args []string `toml:"args,omitempty" json:"args,omitempty"`
URL string `toml:"url,omitempty" json:"url,omitempty"`
Dir string `toml:"dir,omitempty" json:"dir,omitempty"`
Env map[string]string `toml:"env,omitempty" json:"env,omitempty"`
EnvPassthrough []string `toml:"env_passthrough,omitempty" json:"env_passthrough,omitempty"`
Headers map[string]string `toml:"headers,omitempty" json:"headers,omitempty"`
AllowedTools []string `toml:"allowed_tools,omitempty" json:"allowed_tools,omitempty"`
DisallowedTools []string `toml:"disallowed_tools,omitempty" json:"disallowed_tools,omitempty"`
StartupTimeout string `toml:"startup_timeout,omitempty" json:"startup_timeout,omitempty"`
CallTimeout string `toml:"call_timeout,omitempty" json:"call_timeout,omitempty"`
Network bool `toml:"network,omitempty" json:"network,omitempty"`
StateDir bool `toml:"state_dir,omitempty" json:"state_dir,omitempty"`
Setup []string `toml:"setup,omitempty" json:"setup,omitempty"`
SetupVariants map[string][]string `toml:"setup_variants,omitempty" json:"setup_variants,omitempty"`
SetupOrigins []string `toml:"setup_origins,omitempty" json:"setup_origins,omitempty"`
Executables []string `toml:"executables,omitempty" json:"executables,omitempty"`
Skills string `toml:"skills,omitempty" json:"skills,omitempty"`
ConfirmTools []string `toml:"confirm_tools,omitempty" json:"confirm_tools,omitempty"`
AggregateTools []string `toml:"aggregate_tools,omitempty" json:"aggregate_tools,omitempty"`
// contains filtered or unexported fields
}
SourceConfig is an operator declaration, never a model argument. Network is the immutable launch ceiling of a local process, not a per-call grant.