Documentation
¶
Overview ¶
Package provider is the abstraction the workflow engine talks to for classify + agent nodes. Concrete impls (Claude Code, Codex, Gemini) satisfy Provider and register at boot via Registry. The interface keeps the engine decoupled from CLI spawn details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentRequest ¶
type AgentRequest struct {
Prompt string
Preset string
Workspace string
Skills []string
Tools []string
MaxTurns int
SessionID string
}
AgentRequest is the call shape for an agent node.
type AgentResult ¶
AgentResult is what the provider returns for an agent call.
type Capabilities ¶
Capabilities flags what the provider supports natively.
type Info ¶
type Info struct {
Name string `json:"name"`
Capabilities Capabilities `json:"capabilities"`
IsDefault bool `json:"is_default,omitempty"`
}
Info is one introspection row.
type Provider ¶
type Provider interface {
Name() string
Capabilities() Capabilities
StructuredCall(ctx context.Context, req StructuredRequest) (StructuredResult, error)
AgentCall(ctx context.Context, req AgentRequest) (AgentResult, error)
ListSkills(ctx context.Context) ([]Skill, error)
}
Provider implementations spawn the underlying CLI/API.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds named providers for the engine.
func (*Registry) Describe ¶
Describe returns introspection metadata for `workflow_providers` MCP op.
func (*Registry) SetDefault ¶
SetDefault picks which provider classify/agent nodes use when they don't specify `provider:`.
type Skill ¶
type Skill struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema map[string]any `json:"input_schema,omitempty"`
Source string `json:"source"`
}
Skill is one provider-specific capability bundle. Surfaced via `workflow_skills` MCP introspection.
type StructuredRequest ¶
type StructuredRequest struct {
Prompt string
SystemPrompt string
Schema map[string]any
Preset string
SessionID string
}
StructuredRequest is the call shape for a classify node.
type StructuredResult ¶
StructuredResult is what the provider returns.