Documentation
¶
Overview ¶
Package web registers the user-facing web_search and web_fetch tools. The plugin itself does no searching — it emits search.request on the bus and relies on a capability-resolved search provider (Brave, Tavily, native Anthropic/OpenAI, etc.) to populate results. Fetching is done locally with net/http + go-readability for article extraction.
Index ¶
- func New() engine.Plugin
- type Plugin
- func (p *Plugin) Capabilities() []engine.Capability
- func (p *Plugin) ConfigSchema() []byte
- func (p *Plugin) Dependencies() []string
- func (p *Plugin) Emissions() []string
- func (p *Plugin) ID() string
- func (p *Plugin) Init(ctx engine.PluginContext) error
- func (p *Plugin) LiveCalls() uint64
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() error
- func (p *Plugin) Requires() []engine.Requirement
- func (p *Plugin) Shutdown(_ context.Context) error
- func (p *Plugin) Subscriptions() []engine.EventSubscription
- func (p *Plugin) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements the web_search and web_fetch tools.
func (*Plugin) Capabilities ¶
func (p *Plugin) Capabilities() []engine.Capability
func (*Plugin) ConfigSchema ¶
ConfigSchema implements engine.ConfigSchemaProvider.
func (*Plugin) Dependencies ¶
func (*Plugin) LiveCalls ¶
LiveCalls returns the count of web_search/web_fetch invocations that survived the replay short-circuit. Tests assert zero during replay.
func (*Plugin) Requires ¶
func (p *Plugin) Requires() []engine.Requirement
Requires declares the search.provider capability. The lifecycle manager will fail boot if neither a pin nor an advertising plugin is available, which is the right default for a tool that cannot function without a search backend. Embedders that want only web_fetch can deactivate this plugin and activate a lower-level fetcher instead.
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription