Documentation
¶
Overview ¶
Package plugins contains orb's default-off first-party extensions.
Index ¶
- func Catalog(option ...Options) map[string]extensions.Factory
- func Control(cwd, agentDir string, settings *config.SettingsManager) extensions.Factory
- func Description(name string) string
- func MemoryWithStore(store memorysdk.Store) extensions.Factory
- func Names() []string
- func SandboxMode(settings *config.SettingsManager) (sandbox.Mode, error)
- type Action
- type Decision
- type Options
- type Policy
- type Rule
- type ToolCallInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Catalog ¶
func Catalog(option ...Options) map[string]extensions.Factory
Catalog returns fresh extension factories for embedders to select per instance.
func Control ¶
func Control(cwd, agentDir string, settings *config.SettingsManager) extensions.Factory
Control registers /plugins independently of the default-off plugin catalog. cwd and agentDir feed the in-window package installer; empty values disable it (SDK embedders composing their own assemblies).
func Description ¶
Description returns the one-line description used by the CLI and TUI.
func MemoryWithStore ¶
func MemoryWithStore(store memorysdk.Store) extensions.Factory
MemoryWithStore returns the dormant memory plugin with a caller-supplied, tenant-scoped Store.
func SandboxMode ¶
func SandboxMode(settings *config.SettingsManager) (sandbox.Mode, error)
SandboxMode returns the filesystem sandbox selected by the enabled permissions plugin.
Types ¶
type Decision ¶
type Decision struct {
Time int64 `json:"time"`
Tool string `json:"tool"`
Action Action `json:"action"`
Resolved Action `json:"resolved"`
Mode string `json:"mode"`
Rule int `json:"rule,omitempty"`
Matcher string `json:"matcher,omitempty"`
Input string `json:"input,omitempty"`
Resolution string `json:"resolution,omitempty"`
}
Decision records the matched policy and its runtime resolution.
type Options ¶
type Options struct {
StreamFn engine.StreamFn
HTTPClient *http.Client
Settings *config.SettingsManager
Policy *Policy
AgentDir string
}
Options supplies explicit runtime seams so bundled plugins remain instance-scoped.
type Policy ¶
type Policy struct {
// Sandbox is consumed by cmd/orb through SandboxMode (settings-driven);
// embedders wire sandbox.Wrap into their own bash tool themselves.
Sandbox sandbox.Mode `json:"sandbox,omitempty"`
Mode string `json:"mode,omitempty"`
AskFallback Action `json:"askFallback,omitempty"`
Rules []Rule `json:"rules,omitempty"`
Authorizer func(context.Context, ToolCallInfo) (Action, error) `json:"-"`
// Guards are hard deny-only constraints: any non-empty reason denies,
// even in log mode.
Guards []func(context.Context, ToolCallInfo) string `json:"-"`
// contains filtered or unexported fields
}
Policy is constructible by SDK embedders and shared with in-process children.