subagent

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 23 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ParseTimeoutDuration added in v0.0.23

func ParseTimeoutDuration(s string) (time.Duration, error)

ParseTimeoutDuration parses a duration string for the --timeout flag.

  • Empty input defaults to 1 hour.
  • Bare numbers (no suffix) are treated as seconds.
  • Otherwise, parsed with time.ParseDuration.
  • Whitespace is trimmed before parsing.
  • Duration < 1 minute returns an error.
  • 1m ≤ duration < 10m prints a warning to stderr.

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_formatEventLine added in v0.0.22

func TestExported_formatEventLine(line string) string

TestExported_formatEventLine wraps the unexported formatEventLine for doctest access.

func TestExported_parseTimeoutDuration added in v0.0.23

func TestExported_parseTimeoutDuration(s string) (time.Duration, error)

TestExported_parseTimeoutDuration wraps ParseTimeoutDuration 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.

func TestExported_showStatus added in v0.0.22

func TestExported_showStatus(c Config, opts Options) error

TestExported_showStatus wraps the unexported showStatus for doctest access.

func TestExported_traceSession added in v0.0.22

func TestExported_traceSession(c Config, opts Options) error

TestExported_traceSession wraps the unexported traceSession 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
	Timeout      time.Duration
}

Jump to

Keyboard shortcuts

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