Documentation
¶
Index ¶
- Constants
- func CodexDefaultModel(role SessionRole) string
- func UsesCodexFilter(name string) bool
- func UsesHookActivityState(name string) bool
- func UsesSidecarState(name string) bool
- func ValidateOpenCodeReasoningVersion(binary string) error
- func ValidateReasoningEffort(provider, model, effort string) error
- type Agent
- type AgentConfig
- type Claude
- func (b Claude) Binary() string
- func (b Claude) BinaryEnvVar() string
- func (c *Claude) BuildCmd(opts CmdOpts) string
- func (b Claude) Description() string
- func (b Claude) DisplayName() string
- func (b Claude) EnvVar() string
- func (b Claude) FallbackPath() string
- func (b Claude) FilterPaneLines(raw string, max int) []string
- func (b Claude) MasterPrompt() string
- func (b Claude) Name() string
- func (c *Claude) PreLaunchSetup(ctx context.Context, client TmuxClient, session string) error
- func (b Claude) ResumeFileName() string
- func (b Claude) ResumeKey() string
- func (b Claude) StandalonePrompt() string
- func (b Claude) WorkerPrompt() string
- type CmdOpts
- type Codex
- func (b Codex) Binary() string
- func (b Codex) BinaryEnvVar() string
- func (c *Codex) BuildCmd(opts CmdOpts) string
- func (b Codex) Description() string
- func (b Codex) DisplayName() string
- func (b Codex) EnvVar() string
- func (b Codex) FallbackPath() string
- func (b Codex) FilterPaneLines(raw string, max int) []string
- func (b Codex) MasterPrompt() string
- func (b Codex) Name() string
- func (b Codex) PreLaunchSetup(context.Context, TmuxClient, string) error
- func (b Codex) ResumeFileName() string
- func (b Codex) ResumeKey() string
- func (b Codex) StandalonePrompt() string
- func (b Codex) WorkerPrompt() string
- type Config
- type ConfigOverrides
- type OpenCode
- func (b OpenCode) Binary() string
- func (b OpenCode) BinaryEnvVar() string
- func (o *OpenCode) BuildCmd(opts CmdOpts) string
- func (b OpenCode) Description() string
- func (b OpenCode) DisplayName() string
- func (b OpenCode) EnvVar() string
- func (b OpenCode) FallbackPath() string
- func (b OpenCode) FilterPaneLines(raw string, max int) []string
- func (b OpenCode) MasterPrompt() string
- func (b OpenCode) Name() string
- func (b OpenCode) PreLaunchSetup(context.Context, TmuxClient, string) error
- func (b OpenCode) ResumeFileName() string
- func (b OpenCode) ResumeKey() string
- func (b OpenCode) StandalonePrompt() string
- func (b OpenCode) WorkerPrompt() string
- type Pi
- func (b Pi) Binary() string
- func (b Pi) BinaryEnvVar() string
- func (p *Pi) BuildCmd(opts CmdOpts) string
- func (b Pi) Description() string
- func (b Pi) DisplayName() string
- func (b Pi) EnvVar() string
- func (b Pi) FallbackPath() string
- func (b Pi) FilterPaneLines(raw string, max int) []string
- func (b Pi) MasterPrompt() string
- func (b Pi) Name() string
- func (b Pi) PreLaunchSetup(context.Context, TmuxClient, string) error
- func (b Pi) ResumeFileName() string
- func (b Pi) ResumeKey() string
- func (b Pi) StandalonePrompt() string
- func (b Pi) WorkerPrompt() string
- type Registry
- type Role
- type RoleBinding
- type RoleConfig
- type RolesConfig
- type SessionRole
- type Spec
- type StateMode
- type Stub
- func (s *Stub) Binary() string
- func (s *Stub) BinaryEnvVar() string
- func (s *Stub) BuildCmd(CmdOpts) string
- func (s *Stub) Description() string
- func (s *Stub) DisplayName() string
- func (s *Stub) EnvVar() string
- func (s *Stub) FallbackPath() string
- func (s *Stub) FilterPaneLines(raw string, max int) []string
- func (s *Stub) MasterPrompt() string
- func (s *Stub) Name() string
- func (s *Stub) PreLaunchSetup(context.Context, TmuxClient, string) error
- func (s *Stub) ResumeFileName() string
- func (s *Stub) ResumeKey() string
- func (s *Stub) StandalonePrompt() string
- func (s *Stub) WorkerPrompt() string
- type TmuxClient
Constants ¶
const ( // OpenCode role agent names installed by the hooks.OpenCodeInstaller and // selected by OpenCode.BuildCmd. OpenCodeMasterAgentName = "questmaster-master" OpenCodeStandaloneAgentName = "questmaster-standalone" OpenCodeWorkerAgentName = "questmaster-worker" )
Variables ¶
This section is empty.
Functions ¶
func CodexDefaultModel ¶ added in v0.3.49
func CodexDefaultModel(role SessionRole) string
CodexDefaultModel returns the role's built-in Codex model.
func UsesCodexFilter ¶ added in v0.3.36
UsesCodexFilter reports whether the named agent's pane should be read with the Codex-specific line filter.
func UsesHookActivityState ¶ added in v0.3.36
UsesHookActivityState reports whether the named agent's activity state is driven by a hook/sidecar/plugin event stream that callers consume (Pi, OpenCode) rather than by reading the pane directly.
func UsesSidecarState ¶ added in v0.3.36
UsesSidecarState reports whether the named agent emits the activity-sidecar event stream (Pi) and shares the rich read path.
func ValidateOpenCodeReasoningVersion ¶ added in v0.3.47
ValidateOpenCodeReasoningVersion ensures the per-launch variant surface is available before Questmaster creates the tmux session.
func ValidateReasoningEffort ¶ added in v0.3.47
ValidateReasoningEffort rejects values that the selected harness cannot launch. Model-specific validation remains with the native harness.
Types ¶
type Agent ¶
type Agent interface {
Name() string
DisplayName() string
// Description is a one-line blurb of what the harness is good for, used to
// assemble the master prompt's harness guide. Each agent owns its own copy
// in its provider source file; return "" to omit it from the guide.
Description() string
Binary() string
BuildCmd(opts CmdOpts) string
ResumeKey() string
ResumeFileName() string
EnvVar() string
MasterPrompt() string
StandalonePrompt() string
WorkerPrompt() string
FilterPaneLines(raw string, max int) []string
PreLaunchSetup(ctx context.Context, client TmuxClient, session string) error
BinaryEnvVar() string
FallbackPath() string
}
Agent represents any CLI coding agent that can run in a tmux pane.
type AgentConfig ¶
type AgentConfig struct {
CLI string `toml:"cli"`
Model string `toml:"model"`
OpenCodeAgent string `toml:"opencode_agent"`
}
AgentConfig describes one configured agent provider.
type Claude ¶
type Claude struct {
// contains filtered or unexported fields
}
Claude implements the built-in Claude provider.
func NewClaude ¶
func NewClaude(cfg AgentConfig) *Claude
NewClaude constructs a Claude provider from config.
func (Claude) BinaryEnvVar ¶
func (b Claude) BinaryEnvVar() string
func (Claude) Description ¶ added in v0.3.12
func (b Claude) Description() string
func (Claude) DisplayName ¶
func (b Claude) DisplayName() string
func (Claude) FallbackPath ¶
func (b Claude) FallbackPath() string
func (Claude) FilterPaneLines ¶
func (Claude) MasterPrompt ¶
func (b Claude) MasterPrompt() string
func (*Claude) PreLaunchSetup ¶
PreLaunchSetup clears CLAUDECODE so a nested Claude launch starts clean. It overrides the no-op base behaviour.
func (Claude) ResumeFileName ¶
func (b Claude) ResumeFileName() string
func (Claude) StandalonePrompt ¶
func (b Claude) StandalonePrompt() string
func (Claude) WorkerPrompt ¶
func (b Claude) WorkerPrompt() string
type CmdOpts ¶
type CmdOpts struct {
Binary string
AgentPath string
ResumeID string
Prompt string
SystemBrief string
Title string
Role SessionRole
// Model is an explicit per-spawn model override. When empty, providers apply
// their role default through resolveModel.
Model string
// ReasoningEffort is an explicit per-spawn reasoning override. When empty,
// providers retain their hardcoded role default.
ReasoningEffort string
}
CmdOpts controls agent launch command construction.
Prompt is an initial user-turn message injected after launch (what the user would type first). SystemBrief is appended after the standalone or worker system prompt so rare session-specific overrides still load as persistent identity rather than conversational input.
type Codex ¶
type Codex struct {
// contains filtered or unexported fields
}
Codex implements the built-in Codex provider.
func NewCodex ¶
func NewCodex(cfg AgentConfig) *Codex
NewCodex constructs a Codex provider from config.
func (Codex) BinaryEnvVar ¶
func (b Codex) BinaryEnvVar() string
func (Codex) Description ¶ added in v0.3.12
func (b Codex) Description() string
func (Codex) DisplayName ¶
func (b Codex) DisplayName() string
func (Codex) FallbackPath ¶
func (b Codex) FallbackPath() string
func (Codex) FilterPaneLines ¶
func (Codex) MasterPrompt ¶
func (b Codex) MasterPrompt() string
func (Codex) PreLaunchSetup ¶
func (b Codex) PreLaunchSetup(context.Context, TmuxClient, string) error
func (Codex) ResumeFileName ¶
func (b Codex) ResumeFileName() string
func (Codex) StandalonePrompt ¶
func (b Codex) StandalonePrompt() string
func (Codex) WorkerPrompt ¶
func (b Codex) WorkerPrompt() string
type Config ¶
type Config struct {
Agents map[string]AgentConfig `toml:"agents"`
Roles RolesConfig `toml:"roles"`
}
Config is the resolved questmaster agent configuration.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the built-in Claude primary layout. The agent set is derived from providerDefs so a new built-in harness is picked up here automatically.
func LoadConfig ¶
func LoadConfig(overrides *ConfigOverrides) (*Config, error)
LoadConfig returns the built-in config with optional per-session role overrides applied.
type ConfigOverrides ¶
type ConfigOverrides struct {
Primary string
}
ConfigOverrides are per-session role overrides.
type OpenCode ¶ added in v0.3.36
type OpenCode struct {
// contains filtered or unexported fields
}
OpenCode implements the built-in OpenCode provider.
OpenCode 1.17.11 has proven TUI support for --agent, --prompt, --model, and --session. It does not expose a proven role/system prompt CLI flag, so Questmaster role prompts are represented by role-specific OpenCode agent names installed by hooks.OpenCodeInstaller.
func NewOpenCode ¶ added in v0.3.36
func NewOpenCode(cfg AgentConfig) *OpenCode
NewOpenCode constructs an OpenCode provider from config.
func (OpenCode) BinaryEnvVar ¶ added in v0.3.36
func (b OpenCode) BinaryEnvVar() string
func (OpenCode) Description ¶ added in v0.3.36
func (b OpenCode) Description() string
func (OpenCode) DisplayName ¶ added in v0.3.36
func (b OpenCode) DisplayName() string
func (OpenCode) FallbackPath ¶ added in v0.3.36
func (b OpenCode) FallbackPath() string
func (OpenCode) FilterPaneLines ¶ added in v0.3.36
func (OpenCode) MasterPrompt ¶ added in v0.3.36
func (b OpenCode) MasterPrompt() string
func (OpenCode) PreLaunchSetup ¶ added in v0.3.36
func (b OpenCode) PreLaunchSetup(context.Context, TmuxClient, string) error
func (OpenCode) ResumeFileName ¶ added in v0.3.36
func (b OpenCode) ResumeFileName() string
func (OpenCode) StandalonePrompt ¶ added in v0.3.36
func (b OpenCode) StandalonePrompt() string
func (OpenCode) WorkerPrompt ¶ added in v0.3.36
func (b OpenCode) WorkerPrompt() string
type Pi ¶
type Pi struct {
// contains filtered or unexported fields
}
Pi implements the built-in Pi provider.
Structured Pi read output is handled by internal/message via hook state; FilterPaneLines remains the generic fallback for other callers.
func (Pi) BinaryEnvVar ¶
func (b Pi) BinaryEnvVar() string
func (Pi) Description ¶ added in v0.3.12
func (b Pi) Description() string
func (Pi) DisplayName ¶
func (b Pi) DisplayName() string
func (Pi) FallbackPath ¶
func (b Pi) FallbackPath() string
func (Pi) FilterPaneLines ¶
func (Pi) MasterPrompt ¶
func (b Pi) MasterPrompt() string
func (Pi) PreLaunchSetup ¶
func (b Pi) PreLaunchSetup(context.Context, TmuxClient, string) error
func (Pi) ResumeFileName ¶
func (b Pi) ResumeFileName() string
func (Pi) StandalonePrompt ¶
func (b Pi) StandalonePrompt() string
func (Pi) WorkerPrompt ¶
func (b Pi) WorkerPrompt() string
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry resolves configured role bindings to built-in agent providers.
func NewRegistry ¶
NewRegistry builds a registry from a loaded config.
func (*Registry) Bindings ¶
func (r *Registry) Bindings() []*RoleBinding
Bindings returns configured role bindings in primary-first order.
func (*Registry) ForRole ¶
func (r *Registry) ForRole(role Role) (*RoleBinding, error)
ForRole returns the binding for a configured role.
type Role ¶
type Role string
Role identifies a logical agent slot in a session.
const (
RolePrimary Role = "primary"
)
type RoleBinding ¶
RoleBinding maps a role to an agent.
type RoleConfig ¶
RoleConfig configures a single role binding.
type RolesConfig ¶
type RolesConfig struct {
Primary *RoleConfig `toml:"primary"`
}
RolesConfig maps abstract roles to concrete agents.
type SessionRole ¶
type SessionRole int
SessionRole identifies the session type that determines the system prompt.
const ( RoleStandalone SessionRole = iota RoleMaster RoleWorker )
type Spec ¶ added in v0.3.36
type Spec struct {
Name string
DisplayName string
Description string
DefaultCLI string
ResumeKey string
ResumeFileName string
EnvVar string
BinaryEnvVar string
FallbackPath string
Filter paneFilter
State StateMode
}
Spec is the static, per-agent metadata that does not vary between sessions: identity, the resume/env key naming, the binary discovery hints, and the pane-filter choice. It is the single place a new harness declares the rote half of the Agent interface; the behavioural half (BuildCmd, and any PreLaunchSetup) stays in the provider source file.
type StateMode ¶ added in v0.3.36
type StateMode int
StateMode describes how a harness reports activity/state to questmaster. It is the single declared source for the runtime distinctions that callers (e.g. internal/message) previously hardcoded as agent-name checks.
const ( // StateNative covers harnesses whose pane is read directly and which do // not drive a hook/sidecar activity stream that callers consume for // structured reads or relay gating (Claude, Codex). StateNative StateMode = iota // StateSidecar covers Pi-style harnesses that emit the activity-sidecar // event stream (Pi) and share the rich read path. StateSidecar // StatePlugin covers harnesses whose activity state is driven by an // installed plugin event stream (OpenCode). StatePlugin )
func StateModeOf ¶ added in v0.3.36
StateModeOf reports how the named agent reports activity/state. Unknown agents are treated as StateNative.
type Stub ¶
type Stub struct {
// contains filtered or unexported fields
}
Stub is a minimal reference provider for future agent adapters.