Versions in this module Expand all Collapse all v0 v0.7.3 Apr 12, 2026 Changes in this version type Command + ResultLastLine bool v0.7.1 Mar 29, 2026 v0.7.0 Mar 24, 2026 v0.6.8 Mar 17, 2026 v0.6.6 Mar 15, 2026 Changes in this version + const MaxCallDepth + const MaxLoopIterations + const MaxRecommendedStages + func SplitOnError(line string) (string, string, bool) + func StripShebang(content string) string + type ArrayLitStmt struct + Items []string + type BuiltinStmt struct + Args []string + Command string + type Command struct + Agent string + Intent string + Model string + Type string + type Condition struct + Operator string + Property string + Value string + VarName string + type Environment struct + func NewEnvironment() *Environment + func NewEnvironmentFromOS() *Environment + func (e *Environment) All() map[string]string + func (e *Environment) Delete(key string) + func (e *Environment) Expand(input string) string + func (e *Environment) ExpandStrict(input string) (string, error) + func (e *Environment) Get(key string) (string, bool) + func (e *Environment) GetArray(key string) ([]string, bool) + func (e *Environment) GetMap(key string) (map[string]string, bool) + func (e *Environment) GetValueKind(key string) string + func (e *Environment) LenOf(name string) (int, error) + func (e *Environment) Set(key, value string) + func (e *Environment) SetArray(key string, arr []string) + func (e *Environment) SetMap(key string, m map[string]string) + type ErrFnReturn struct + Value string + func (e *ErrFnReturn) Error() string + type ErrScriptExit struct + Code int + func (e *ErrScriptExit) Error() string + type ExportStmt struct + Key string + Value string + type FileReader interface + ReadFile func(path string) (string, error) + type FnCallStmt struct + Args []string + Name string + type FnDef struct + Body []Statement + Name string + Params []string + type ForBlock struct + Body []Statement + List []string + VarName string + type IfBlock struct + Condition Condition + Else []Statement + Then []Statement + type IndexAssign struct + Index string + Value string + VarName string + type KernelSpawner interface + SpawnAndWait func(ctx context.Context, intent, agent, model string) (result string, exitCode int, tokensUsed int, err error) + Wait func(ctx context.Context, pid int) (exitCode int, err error) + type MapEntry struct + Key string + Value string + type MapLitStmt struct + Entries []MapEntry + type OSFileReader struct + func (r *OSFileReader) ReadFile(path string) (string, error) + type ParallelBlock struct + Body []Statement + type Pipeline struct + Commands []Command + func ParsePipeline(input string) (*Pipeline, error) + type PipelineExecutor struct + OnStageStart StageCallback + func NewPipelineExecutor(spawner KernelSpawner) *PipelineExecutor + func (e *PipelineExecutor) Execute(ctx context.Context, pipeline *Pipeline) (*PipelineResult, error) + type PipelineResult struct + Elapsed time.Duration + Stages []StageResult + TotalTokens int + type PropAssign struct + Property string + Value string + VarName string + type ReturnStmt struct + Value string + type Script struct + Functions map[string]*FnDef + Statements []Statement + func ParseScript(input string) (*Script, error) + type ScriptExecutor struct + OnStageStart StageCallback + func NewScriptExecutor(spawner KernelSpawner, env *Environment) *ScriptExecutor + func NewScriptExecutorWithReader(spawner KernelSpawner, env *Environment, reader FileReader) *ScriptExecutor + func (e *ScriptExecutor) Execute(ctx context.Context, script *Script) (*ScriptResult, error) + func (e *ScriptExecutor) SetFileReader(r FileReader) + func (e *ScriptExecutor) SetScriptDir(dir string) + type ScriptResult struct + Elapsed time.Duration + LastExitCode int + LastResult string + TotalTokens int + type SourceStmt struct + Path string + type SpawnResult struct + ExitCode int + Result string + Tokens int + type StageCallback func(stage, total int, intent string) + type StageResult struct + Elapsed time.Duration + ExitCode int + Intent string + PID int + Result string + TokensUsed int + type Statement struct + ArrayLit *ArrayLitStmt + Assign string + Builtin *BuiltinStmt + Export *ExportStmt + FnCall *FnCallStmt + FnDef *FnDef + For *ForBlock + If *IfBlock + IndexAssign *IndexAssign + Kind StatementKind + Line int + MapLit *MapLitStmt + OnError *Command + Parallel *ParallelBlock + Pipeline *Pipeline + PropAssign *PropAssign + Raw string + Return *ReturnStmt + Source *SourceStmt + Spawn *Command + While *WhileBlock + type StatementKind string + const StmtArrayLit + const StmtAssignIndex + const StmtAssignProp + const StmtBuiltin + const StmtExport + const StmtFnCall + const StmtFnDef + const StmtFor + const StmtIf + const StmtMapLit + const StmtParallel + const StmtPipeline + const StmtReturn + const StmtSource + const StmtSpawn + const StmtWhile + type WhileBlock struct + Body []Statement + Condition Condition