Documentation
¶
Overview ¶
Package factory wires concrete dependencies for the agent-pi binary.
Index ¶
- Constants
- func CreateAgent(runner pilib.Runner, envContext map[string]string) *agentlib.Agent
- func CreateAgentProvider(runner pilib.Runner, envContext map[string]string) agentlib.AgentProvider
- func CreateFileResultDeliverer(filePath string) agentlib.ResultDeliverer
- func CreateKafkaResultDeliverer(syncProducer libkafka.SyncProducer, topicPrefix base.TopicPrefix, ...) agentlib.ResultDeliverer
- func CreatePiRunner(agentDir string, allowedTools string, model string, env map[string]string, ...) pilib.Runner
Constants ¶
const AgentTypeService = "service"
AgentTypeService is the AGENT_TYPE value the executor stamps for a Config whose spec.type is service. The executor owns this value — it comes from AgentTypeService in agent-task-executor/k8s/apis/agent.benjamin-borbe.de/v1 — and this side only reads it. The coupling is silent when it breaks: a mismatch means sessions simply stop persisting, with nothing logged.
const ServiceName = "agent-pi"
ServiceName is the canonical service name for the agent-pi binary.
Variables ¶
This section is empty.
Functions ¶
func CreateAgent ¶
CreateAgent assembles the 3-phase pi agent from a pre-constructed Runner.
func CreateAgentProvider ¶
func CreateAgentProvider( runner pilib.Runner, envContext map[string]string, ) agentlib.AgentProvider
CreateAgentProvider wires the per-task-type dispatch table from a pre-constructed Runner so callers control Runner lifecycle.
func CreateFileResultDeliverer ¶
func CreateFileResultDeliverer(filePath string) agentlib.ResultDeliverer
CreateFileResultDeliverer creates a ResultDeliverer that writes the agent's output back to a markdown file.
func CreateKafkaResultDeliverer ¶
func CreateKafkaResultDeliverer( syncProducer libkafka.SyncProducer, topicPrefix base.TopicPrefix, taskID agentlib.TaskIdentifier, originalContent string, currentDateTime libtime.CurrentDateTimeGetter, ) agentlib.ResultDeliverer
CreateKafkaResultDeliverer creates a ResultDeliverer that publishes task updates to Kafka.
func CreatePiRunner ¶
func CreatePiRunner( agentDir string, allowedTools string, model string, env map[string]string, persistSession bool, ) pilib.Runner
CreatePiRunner constructs a Pi Runner pre-configured with tools, model, and env.
persistSession keeps pi's session storage across runs. It is true only for a long-running identity agent and must stay false for a task-routed one, whose runs are unrelated tasks sharing one volume — see PiRunnerConfig.PersistSession.
Types ¶
This section is empty.