Documentation
¶
Index ¶
- Constants
- Variables
- func ClassifyHTTPStatusForTest(status int, body []byte) string
- func DomainBlockedForTest(host string, rules []string) (bool, string)
- func ResetSharedClientForTest()
- func RetryableFetchErrorForTest(err error) bool
- type Attempt
- type ExaFetcher
- type Fetcher
- type MCPAdapterServer
- type MCPToolCaller
- type Metadata
- type NativeCloakFetcher
- type ParallelFetcher
- type Request
- type Result
- type Router
- type RouterError
- type RouterOptions
Constants ¶
const ( ExaAdapterName = "exa" ExaFetchToolName = "web_fetch_exa" )
const ( MaxBodyBytes = 5 * 1024 * 1024 DefaultTimeoutS = 30 MaxTimeoutSecs = 120 UserAgent = defaultUserAgent )
const ( ParallelAdapterName = "parallel" ParallelFetchToolName = "web_fetch" )
const CloakAdapterName = "cloak"
Variables ¶
var ErrNoContent = errors.New("fetch returned no content")
Functions ¶
func ResetSharedClientForTest ¶
func ResetSharedClientForTest()
Types ¶
type ExaFetcher ¶ added in v2026.909.0
type ExaFetcher struct {
// contains filtered or unexported fields
}
func NewExaFetcher ¶ added in v2026.909.0
func NewExaFetcher(caller MCPToolCaller, serverName string) (*ExaFetcher, error)
type Fetcher ¶ added in v2026.909.0
Fetcher is the runtime-owned web content fetch surface. FetchURL remains available as the legacy direct HTTP implementation during migration.
type MCPAdapterServer ¶ added in v2026.909.0
type MCPToolCaller ¶ added in v2026.909.0
type MCPToolCaller interface {
CallInternalTool(ctx context.Context, serverName, toolName, intent string, args map[string]any) (any, error)
}
MCPToolCaller is the narrow host-side surface needed by MCP-backed fetch adapters. The concrete MCP manager stays outside this package so adapters remain unit-testable without a live remote server.
type NativeCloakFetcher ¶ added in v2026.909.0
type NativeCloakFetcher struct {
// contains filtered or unexported fields
}
NativeCloakFetcher is the local browser fallback. CloakBrowser is used only to render the page; content extraction and Markdown conversion remain in Go alongside the legacy fetch implementation.
func NewNativeCloakFetcher ¶ added in v2026.909.0
func NewNativeCloakFetcher(browser cloak.Browser) (*NativeCloakFetcher, error)
type ParallelFetcher ¶ added in v2026.909.0
type ParallelFetcher struct {
// contains filtered or unexported fields
}
func NewParallelFetcher ¶ added in v2026.909.0
func NewParallelFetcher(caller MCPToolCaller, serverName string) (*ParallelFetcher, error)
type Request ¶ added in v2026.909.0
Request is the provider-neutral fetch request used by native web adapters. Intent is kept separate from Extras so every MCP call can use Solomon's standard intent-aware logging path.
type Result ¶
type Router ¶ added in v2026.909.0
type Router struct {
// contains filtered or unexported fields
}
func NewMCPRouter ¶ added in v2026.909.0
func NewMCPRouter(caller MCPToolCaller, servers []MCPAdapterServer, options RouterOptions) (*Router, error)
type RouterError ¶ added in v2026.909.0
func (*RouterError) Error ¶ added in v2026.909.0
func (e *RouterError) Error() string
func (*RouterError) Unwrap ¶ added in v2026.909.0
func (e *RouterError) Unwrap() error
type RouterOptions ¶ added in v2026.909.0
type RouterOptions struct {
Store search.BalanceStore
Now func() time.Time
Fallback Fetcher
}