Documentation
¶
Index ¶
- Constants
- func ForTask(taskName string) (string, error)
- func ResolveModel(cfg *Config, t *task.Task, override string) string
- func ResolveReasoning(cfg *Config, t *task.Task, override string) string
- func ValidateReasoningFlag(harnessName, reasoning string) error
- func ValidateReasoningLevel(reasoning string) error
- type Acquisition
- type Config
- type Entry
- type Pool
Constants ¶
const DefaultMaxWorkspaces = 20
Variables ¶
This section is empty.
Functions ¶
func ValidateReasoningFlag ¶
func ValidateReasoningLevel ¶
Types ¶
type Acquisition ¶
type Acquisition struct {
Entry *Entry
// contains filtered or unexported fields
}
Acquisition holds a workspace and its lock. Call Release() when done.
func (*Acquisition) Release ¶
func (a *Acquisition) Release()
Release releases the workspace lock. Must be called after state is saved.
type Config ¶
type Config struct {
Harness string `json:"harness"`
MaxWorkspaces int `json:"max_workspaces"`
Options map[string]any `json:"options,omitempty"`
}
Config is the project configuration (.subtask/config.json).
func LoadConfig ¶
LoadConfig loads the project config from .subtask/config.json.
type Entry ¶
type Entry struct {
Name string // e.g., "workspace-1"
Path string // e.g., "~/.subtask/workspaces/-Users-foo-code-project--1"
ID int // e.g., 1
}
Entry defines a workspace.
func ListWorkspaces ¶
ListWorkspaces discovers workspaces for the current project by globbing.
type Pool ¶
type Pool struct{}
Pool manages workspace allocation.
func (*Pool) Acquire ¶
func (p *Pool) Acquire() (*Acquisition, error)
Acquire finds an available workspace with file locking to prevent races. The caller MUST call Release() on the returned Acquisition after saving state.
func (*Pool) AcquireExcluding ¶
func (p *Pool) AcquireExcluding(excludePaths ...string) (*Acquisition, error)
AcquireExcluding finds an available workspace, excluding any paths provided. The caller MUST call Release() on the returned Acquisition after saving state.