runner

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package runner invokes local CLIs for CapGateway jobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	Binary string
	// APIKey is CURSOR_API_KEY for the upstream Cursor CLI.
	APIKey string
	// FlowbotURL is injected for flowbot-agent as FLOWBOT_URL.
	FlowbotURL string
	// AgentAccessToken is injected for flowbot-agent as FLOWBOT_AGENT_TOKEN (agent:headless).
	AgentAccessToken string
	Timeout          time.Duration
}

Cursor runs a headless coding CLI binary with Cursor-compatible flags. It may invoke Cursor's `agent` (CURSOR_API_KEY) or flowbot-agent (FLOWBOT_URL + FLOWBOT_AGENT_TOKEN) depending on Binary and child env.

func NewCursor

func NewCursor(binary, apiKey string, timeout time.Duration) *Cursor

NewCursor builds a Cursor/flowbot-agent runner.

func (*Cursor) Run

func (c *Cursor) Run(ctx context.Context, job *types.GatewayJob, workspace string) Result

Run implements Runner.

func (*Cursor) WithFlowbotAgent

func (c *Cursor) WithFlowbotAgent(flowbotURL, agentToken string) *Cursor

WithFlowbotAgent injects Flowbot URL and agent:headless token for flowbot-agent.

type Result

type Result struct {
	Output   string
	ExitCode int
	Err      error
}

Result is the outcome of one local CLI invocation.

type Runner

type Runner interface {
	Run(ctx context.Context, job *types.GatewayJob, workspace string) Result
}

Runner executes a gateway job against a local CLI.

type Unsupported

type Unsupported struct {
	Name string
}

Unsupported is a Runner that always fails (OpenCode placeholder).

func (Unsupported) Run

Run implements Runner.

Jump to

Keyboard shortcuts

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