subagent

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestProcessNameFunc func(pid int) string

TestProcessNameFunc is a test hook that, when non-nil, overrides the PID → process-name lookup used by autoDetectAgentRunner during Priority 4 (parent-process) detection. Tests set this to inject a fake process tree. The production getProcessName delegates to this hook before falling back to OS calls (ps on darwin, /proc on linux).

Functions

func HandleReportProgress

func HandleReportProgress(args []string) error

func HandleYieldPendingQuestions

func HandleYieldPendingQuestions(args []string) error

func Logf

func Logf(fmtStr string, args ...interface{})

func PromptContent

func PromptContent(c Config) string

func Run

func Run(ctx context.Context, c Config, opts Options) error

func TestExported_NewSessionLogWriter added in v0.0.20

func TestExported_NewSessionLogWriter() *sessionLogWriter

TestExported_NewSessionLogWriter creates a sessionLogWriter for testing.

func TestExported_autoDetectAgentRunner added in v0.0.21

func TestExported_autoDetectAgentRunner(c Config) (string, bool)

TestExported_autoDetectAgentRunner wraps the unexported autoDetectAgentRunner for doctest access.

func TestExported_runAgent added in v0.0.20

func TestExported_runAgent(ctx context.Context, agentRunner, model, prompt, sessionID string, rawLog *sessionLogWriter) (string, error)

TestExported_runAgent wraps the unexported runAgent for doctest access.

Types

type Config

type Config struct {
	RoleName         string
	Cmd              string
	PromptContent    string
	SessionEnvVar    string
	SessionMetaField string
	DebugSessionEnv  string
	AgentRunnerEnv   string
	ModelEnv         string
}

type Options

type Options struct {
	Prompt       string
	AgentRunner  string
	MockConfig   string
	SessionID    string
	Requirement  string
	CatchUp      bool
	Status       bool
	ListSessions bool
	SessionBase  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL