Versions in this module Expand all Collapse all v0 v0.1.0 Nov 4, 2026 Changes in this version + const AuthNeeded + const AuthSignedIn + const AuthUnknown + const ConfigFile + const EventApprovalRequested + const EventApprovalResolved + const EventFlow + const EventQuestionRequested + const EventQuestionResolved + const EventReviewRequested + const EventReviewResolved + const EventToken + const EventToolEnd + const EventToolStart + const EventTurnEnd + const EventTurnStart + const FailedNote + const FlowDone + const FlowFailed + const FlowRunBroken + const FlowRunCancelled + const FlowRunFailed + const FlowRunOK + const FlowRunRunning + const FlowRunning + const FlowWaiting + const FlowsDir + const FromAgent + const FromCommand + const FromHook + const KindQuestion + const MCPServerName + const NoCLIs + const PluginManifest + const ProviderAnthropic + const StoppedCancelled + var CheckImages = api.CheckImages + var ErrAnswered = api.ErrAnswered + var ErrBadImage = api.ErrBadImage + var ErrClosing = api.ErrClosing + var ErrForkWhileRunning = api.ErrForkWhileRunning + var ErrNoCommand = api.ErrNoCommand + var ErrNoFlow = api.ErrNoFlow + var ErrNoFlowName = api.ErrNoFlowName + var ErrNoFlowRequest = api.ErrNoFlowRequest + var ErrNoFlowRun = api.ErrNoFlowRun + var ErrNoForkPoint = api.ErrNoForkPoint + var ErrNoProvider = api.ErrNoProvider + var ErrNoSnapshot = api.ErrNoSnapshot + var ErrNoTurnToCancel = api.ErrNoTurnToCancel + var ErrNoUndo = api.ErrNoUndo + var ErrNotAFlow = api.ErrNotAFlow + var ErrNotInstalled = api.ErrNotInstalled + var ErrQuestion = api.ErrQuestion + var ErrSessionFailed = api.ErrSessionFailed + var ErrTrying = api.ErrTrying + var ErrUnavailable = api.ErrUnavailable + var FlowHelp = flowfile.FlowHelp + var Modes = api.Modes + var PluginsText = plugins.PluginsText + func DBIn(dir string) string + func DefaultDB() string + func DefaultDataDir() string + func FlowFrom(from map[string]int) string + func FlowName(name string) bool + func PluginOAuth(ctx context.Context, dir, name string, open func(url string) error) error + func PluginSecretKey(p opencode.Plugin, name string) string + func RunJob(folder string) error + func Secrets() secrets.Store + func SessionID(id string) string + type AuthInfo = api.AuthInfo + type AuthMethod = api.AuthMethod + type Config struct + AgentRegistry string + AgentsDir string + ClaudePath string + CodexPath string + CopilotHome string + CopilotPath string + DB string + Engine string + ExtraTools []tools.Def + JobRunner []string + Lease time.Duration + Logger *slog.Logger + MaxSteps int + Model string + Now func() time.Time + Observe func(kairo.Observation) + Owner string + Provider provider.Provider + type Event = api.Event + type FlowInfo = api.FlowInfo + type FlowRun = api.FlowRun + type FlowStat = api.FlowStat + type Image = api.Image + type LogEntry = api.LogEntry + type MCPInfo = api.MCPInfo + type MCPToolInfo = api.MCPToolInfo + type Pending = api.Pending + type PluginInfo = api.PluginInfo + type PreviewSection = api.PreviewSection + type ProviderInfo = api.ProviderInfo + type Runtime struct + K *kairo.Kairo + Store *store.Store + func Open(ctx context.Context, cfg Config) (*Runtime, error) + func (r *Runtime) Answer(ctx context.Context, key, option string) error + func (r *Runtime) Approve(ctx context.Context, key string, ok bool, reason string) error + func (r *Runtime) Auth(ctx context.Context, id string) AuthInfo + func (r *Runtime) Awaiting(ctx context.Context) bool + func (r *Runtime) Cancel(ctx context.Context, session string) (int, error) + func (r *Runtime) Close() error + func (r *Runtime) CloseSession(ctx context.Context, session string) error + func (r *Runtime) Commands(ctx context.Context, session string) ([]opencode.Command, error) + func (r *Runtime) Compact(ctx context.Context, session string) (int, error) + func (r *Runtime) CreateSession(ctx context.Context, id string, in workflows.SessionInput) (string, error) + func (r *Runtime) Drain(ctx context.Context) error + func (r *Runtime) Efforts(ctx context.Context, id string) ([]string, error) + func (r *Runtime) Events(ctx context.Context, session string) (<-chan Event, error) + func (r *Runtime) FlowRunByID(ctx context.Context, id string) (FlowRun, error) + func (r *Runtime) FlowRuns(ctx context.Context, dir, name, only string, limit int) ([]FlowRun, error) + func (r *Runtime) FlowStats(ctx context.Context, dir string) ([]FlowStat, error) + func (r *Runtime) FlowView(ctx context.Context, flow kairo.RunInfo, chart *flowchart.Chart) (*flowchart.View, error) + func (r *Runtime) Flows(ctx context.Context, session string) ([]FlowInfo, error) + func (r *Runtime) Fork(ctx context.Context, id, from string, n int, files bool) (string, int, error) + func (r *Runtime) History(ctx context.Context, session string) ([]msg.Message, error) + func (r *Runtime) HistoryLive(ctx context.Context, session string) ([]msg.Message, error) + func (r *Runtime) ImageData(ctx context.Context, ref string) ([]byte, error) + func (r *Runtime) InstallProvider(ctx context.Context, id, version string) (ProviderInfo, error) + func (r *Runtime) JobDone(id string) error + func (r *Runtime) LastFlow(ctx context.Context, session string) (*flowchart.View, error) + func (r *Runtime) LastTurn(ctx context.Context, session string) (int, bool, error) + func (r *Runtime) Log(ctx context.Context, session string) (SessionLog, error) + func (r *Runtime) LoggedIn(id string) + func (r *Runtime) Login(ctx context.Context, id, method string) error + func (r *Runtime) LoginMethods(ctx context.Context, id string) ([]AuthMethod, error) + func (r *Runtime) MCP(ctx context.Context, session string) ([]MCPInfo, error) + func (r *Runtime) Models(ctx context.Context, id string) ([]string, error) + func (r *Runtime) NewFlow(ctx context.Context, session, request string) (int, error) + func (r *Runtime) Pending(ctx context.Context, session string) ([]Pending, error) + func (r *Runtime) PluginConnected(plugin string) + func (r *Runtime) Plugins(ctx context.Context, session string) ([]PluginInfo, error) + func (r *Runtime) PluginsIn(ctx context.Context, dir string) ([]PluginInfo, error) + func (r *Runtime) Providers(ctx context.Context) []ProviderInfo + func (r *Runtime) Redo(ctx context.Context, session string) (int, error) + func (r *Runtime) Reply(ctx context.Context, hash string) (string, error) + func (r *Runtime) RunCommand(ctx context.Context, session, name, args string) (int, error) + func (r *Runtime) RunFlow(ctx context.Context, session, name, args string) (int, error) + func (r *Runtime) Send(ctx context.Context, session, text string) (int, error) + func (r *Runtime) SendImages(ctx context.Context, session, text string, images []Image) (int, error) + func (r *Runtime) Sessions(ctx context.Context, dir string, limit int) ([]SessionInfo, error) + func (r *Runtime) SetMode(ctx context.Context, session, mode string) (Settings, error) + func (r *Runtime) Settings(ctx context.Context, session string) (Settings, error) + func (r *Runtime) Skills(ctx context.Context, session string) (SkillsInfo, error) + func (r *Runtime) Switch(ctx context.Context, session, id, model, effort string) (Settings, error) + func (r *Runtime) TryFlow(ctx context.Context, key, args string) error + func (r *Runtime) TurnRun(ctx context.Context, session string, n int) (kairo.RunInfo, bool, error) + func (r *Runtime) Undo(ctx context.Context, session string) (int, error) + func (r *Runtime) Usage(ctx context.Context, session string) (SessionUsage, error) + func (r *Runtime) WaitTurn(ctx context.Context, session string, n int) (workflows.TurnOutput, error) + type SessionInfo = api.SessionInfo + type SessionLog = api.SessionLog + type SessionUsage = api.SessionUsage + type Settings = api.Settings + type SkillsInfo = api.SkillsInfo + type TryTarget = api.TryTarget + type TurnUsage = api.TurnUsage