Documentation
¶
Overview ¶
Package agent invokes the user's own coding-agent CLI for one-shot prompted tasks — the inference seam behind features like lesson distillation. Seamark never holds credentials and never speaks a model API: it shells out to a CLI the user already has and has already authenticated, the same trust boundary as `gh` for review mining. An absent or failing CLI degrades to an error the caller surfaces as a note, never a broken feature.
The adapter layer keeps every caller agnostic: nothing outside this package knows which agent is configured. "claude" is the first preset; other agent CLIs arrive either as presets here or, today, through the custom argv escape hatch in the config.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Agent struct {
// CLI names a preset ("claude"). Ignored when Argv is set.
CLI string `yaml:"cli"`
// Argv is the escape hatch for any other agent: the exact
// command to run, prompt delivered on stdin.
Argv []string `yaml:"argv"`
} `yaml:"agent"`
}
Config selects the agent CLI (`agent:` in .seamark/config.yaml — committed, like every seamark overlay, so a team shares one choice). An absent section means the claude preset.
func LoadConfig ¶
LoadConfig reads the agent section of <root>/.seamark/config.yaml. The file is shared with the indexing options; each package reads its own section. A missing file yields defaults; a malformed one is an error (the same contract as everywhere else: a typo'd config must not be silently ignored).
type Invoker ¶
type Invoker interface {
// Invoke sends prompt on the agent's stdin and returns its text
// reply. The context bounds the run: a distillation batch is worth
// minutes, not hours.
Invoke(ctx context.Context, prompt string) (string, error)
// Name identifies the adapter for provenance ("distilled by …").
Name() string
}
Invoker runs one prompted task against the configured agent CLI.