controlplane

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 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

View Source
const (
	CommandNewSession  = commandcatalog.CommandNewSession
	CommandSessions    = commandcatalog.CommandSessions
	CommandSession     = commandcatalog.CommandSession
	CommandProvider    = commandcatalog.CommandProvider
	CommandPermissions = commandcatalog.CommandPermissions
	CommandContext     = commandcatalog.CommandContext
	CommandUsage       = commandcatalog.CommandUsage
	CommandPlan        = commandcatalog.CommandPlan
	CommandSearch      = commandcatalog.CommandSearch
	CommandSkills      = commandcatalog.CommandSkills
	CommandModules     = commandcatalog.CommandModules
	CommandRemind      = commandcatalog.CommandRemind
	CommandTasks       = commandcatalog.CommandTasks
	CommandServer      = commandcatalog.CommandServer
	CommandStatus      = commandcatalog.CommandStatus
	CommandRestart     = commandcatalog.CommandRestart
	CommandStop        = commandcatalog.CommandStop
	CommandHelp        = commandcatalog.CommandHelp
)

Variables

This section is empty.

Functions

func CommandName

func CommandName(command string) string

func ConfirmPresentationText

func ConfirmPresentationText(confirm ConfirmData) string

func FormPresentationText

func FormPresentationText(form FormData) string

func FormatServerStatus

func FormatServerStatus(status core.ServerStatus) string

func HelpText

func HelpText() string

func InfoPresentationText

func InfoPresentationText(info InfoData) string

func PickerCloseCommand

func PickerCloseCommand(picker PickerData) string

func PickerCommandFor

func PickerCommandFor(kind PickerKind, contextID string, itemID string) string

func PickerCommandLabel

func PickerCommandLabel(picker PickerData) string

func PickerItemCommand

func PickerItemCommand(picker PickerData, item PickerItem) string

func PickerItemDisplayInfo

func PickerItemDisplayInfo(kind PickerKind, item PickerItem) string

func PickerItemDisplayTitle

func PickerItemDisplayTitle(item PickerItem) string

func PickerLegend

func PickerLegend(picker PickerData) string

func PickerPresentationText

func PickerPresentationText(picker PickerData) string

func PickerPresentationTitle

func PickerPresentationTitle(picker PickerData) string

func PickerSelectedPage

func PickerSelectedPage(items []PickerItem, pageSize int) int

Types

type AutomationRuntime

type AutomationRuntime interface {
	ClientRuntime
	CreateAutomationJob(ctx context.Context, input automation.CreateJobInput) (automation.Job, error)
	ListAutomationJobs(ctx context.Context) ([]automation.Job, error)
	PauseAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
	ResumeAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
	CompleteAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
	DeleteAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
	RunAutomationJobNow(ctx context.Context, jobID string) (automation.Fire, error)
}

type ClientRuntime

type ClientRuntime interface {
	ClientName() string
}

type CommandID

type CommandID = commandcatalog.CommandID

type CommandSpec

type CommandSpec = commandcatalog.CommandSpec

func Catalog

func Catalog() []CommandSpec

func Parse

func Parse(text string) (CommandSpec, string, bool)

type CommandView

type CommandView struct {
	ID       string
	Command  string
	Title    string
	Status   string
	Group    MenuItemGroup
	Public   bool
	Menu     bool
	Disabled bool
}

func BuildCommandView

func BuildCommandView(state MenuState) []CommandView

func PublicCommandView

func PublicCommandView() []CommandView

type ConfirmData

type ConfirmData struct {
	Title          string
	Message        string
	ConfirmLabel   string
	CancelLabel    string
	ConfirmCommand string
	CancelCommand  string
	ConfirmDanger  bool
	CancelDanger   bool
}

type ContextRuntime

type ContextRuntime interface {
	SessionContext(ctx context.Context, sessionID string) (core.ContextReport, error)
	CompactSession(ctx context.Context, sessionID string) (core.CompactSessionResult, error)
}

type Dispatcher

type Dispatcher struct {
	// contains filtered or unexported fields
}

func New

func New(runtime any, workingDir string) *Dispatcher

func (*Dispatcher) Handle

func (d *Dispatcher) Handle(ctx context.Context, externalKey string, text string) (Result, error)

type ExternalAgentRuntime added in v0.1.6

type ExternalAgentRuntime interface {
	ListExternalAgents(ctx context.Context) ([]core.ExternalAgentDescriptor, error)
	UpdateExternalAgent(ctx context.Context, agentID string, update core.UpdateExternalAgentRequest) ([]core.ExternalAgentDescriptor, error)
}

type FormData

type FormData struct {
	Title         string
	Fields        []FormField
	SubmitLabel   string
	CancelLabel   string
	SubmitCommand string
	CancelCommand string
	Error         string
}

type FormField

type FormField struct {
	ID          string
	Label       string
	Value       string
	EditCommand string
	Disabled    bool
}

type InfoData

type InfoData struct {
	Title        string
	Text         string
	Rows         []InfoRow
	CloseCommand string
}

func (InfoData) Ptr added in v0.1.7

func (data InfoData) Ptr() *InfoData

type InfoRow

type InfoRow struct {
	Label string
	Value string
}

func FormatServerStatusRows

func FormatServerStatusRows(status core.ServerStatus) []InfoRow

type MCPRuntime added in v0.1.11

type MCPRuntime interface {
	MCPConfig(ctx context.Context) (setup.MCPConfigResponse, error)
	UpdateMCPConfig(ctx context.Context, update setup.MCPConfigUpdate) (setup.MCPConfigResponse, error)
	UpdateMCPServer(ctx context.Context, serverID string, update setup.MCPServerUpdate) (setup.MCPConfigResponse, error)
}
type MenuItemGroup string
const (
	MenuItemGroupPrimary   MenuItemGroup = ""
	MenuItemGroupSecondary MenuItemGroup = "secondary"
)
type MenuState struct {
	SessionTitle   string
	ProviderID     string
	ModelID        string
	PermissionMode core.PermissionMode
	Capabilities   core.SessionCapabilities
}

type PermissionRuntime

type PermissionRuntime interface {
	UpdateSessionPermissionMode(ctx context.Context, sessionID string, mode core.PermissionMode) (core.Session, error)
}

type PickerBuilder

type PickerBuilder struct {
	// contains filtered or unexported fields
}

func NewPickerData

func NewPickerData(kind PickerKind, title string) *PickerBuilder

func (*PickerBuilder) Action

func (b *PickerBuilder) Action(id string, title string, info string, command ...string) *PickerBuilder

func (*PickerBuilder) Back

func (b *PickerBuilder) Back(command string) *PickerBuilder

func (*PickerBuilder) Build

func (b *PickerBuilder) Build() PickerData

func (*PickerBuilder) Close

func (b *PickerBuilder) Close(command string) *PickerBuilder

func (*PickerBuilder) Context

func (b *PickerBuilder) Context(id string) *PickerBuilder

func (*PickerBuilder) Danger

func (b *PickerBuilder) Danger(id string, title string, info string, command ...string) *PickerBuilder

func (*PickerBuilder) Item

func (b *PickerBuilder) Item(item PickerItem) *PickerBuilder

func (*PickerBuilder) Items

func (b *PickerBuilder) Items(items ...PickerItem) *PickerBuilder

func (*PickerBuilder) Meta added in v0.1.8

func (b *PickerBuilder) Meta(meta string) *PickerBuilder

func (*PickerBuilder) Popup added in v0.1.11

func (b *PickerBuilder) Popup() *PickerBuilder

func (*PickerBuilder) Ptr

func (b *PickerBuilder) Ptr() *PickerData

func (*PickerBuilder) Row

func (b *PickerBuilder) Row(id string, title string, info string, command ...string) *PickerBuilder

type PickerData

type PickerData struct {
	Kind         PickerKind
	ContextID    string
	Title        string
	Meta         string
	BackCommand  string
	CloseCommand string
	HasBack      bool
	HasClose     bool
	Popup        bool
	Items        []PickerItem
}

type PickerItem

type PickerItem struct {
	ID       string
	Title    string
	Info     string
	Search   string
	Command  string
	Selected bool
	Focused  bool
	Disabled bool
	Role     PickerItemRole
}

func ProviderPickerItems

func ProviderPickerItems(items []setup.ProviderSetupItem, session *core.Session) []PickerItem

func (PickerItem) IsAction

func (item PickerItem) IsAction() bool

func (PickerItem) IsDanger

func (item PickerItem) IsDanger() bool

func (PickerItem) NeedsSeparator

func (item PickerItem) NeedsSeparator() bool

type PickerItemRole

type PickerItemRole string
const (
	PickerItemRoleNormal PickerItemRole = ""
	PickerItemRoleDanger PickerItemRole = "danger"
	PickerItemRoleAction PickerItemRole = "action"
)

type PickerKind

type PickerKind string
const (
	PickerSessions          PickerKind = "sessions"
	PickerSessionRuntime    PickerKind = "session_runtime"
	PickerSessionActions    PickerKind = "session_actions"
	PickerProvider          PickerKind = "provider"
	PickerProviderCustom    PickerKind = "provider_custom"
	PickerProviderActions   PickerKind = "provider_actions"
	PickerPermissions       PickerKind = "permissions"
	PickerContext           PickerKind = "context"
	PickerPlan              PickerKind = "plan"
	PickerModules           PickerKind = "modules"
	PickerTextToSpeech      PickerKind = "text_to_speech"
	PickerSpeechToText      PickerKind = "speech_to_text"
	PickerVoiceProvider     PickerKind = "voice_provider"
	PickerExternalAgents    PickerKind = "external_agents"
	PickerExternalAgent     PickerKind = "external_agent"
	PickerStorage           PickerKind = "storage"
	PickerStorageFiles      PickerKind = "storage_files"
	PickerStorageFile       PickerKind = "storage_file"
	PickerStorageTemp       PickerKind = "storage_temp"
	PickerStorageCleanup    PickerKind = "storage_cleanup"
	PickerStorageTempFile   PickerKind = "storage_temp_file"
	PickerSessionSkills     PickerKind = "session_skills"
	PickerSessionSkill      PickerKind = "session_skill"
	PickerSkills            PickerKind = "skills"
	PickerSkillsSection     PickerKind = "skills_section"
	PickerSkill             PickerKind = "skill"
	PickerMCP               PickerKind = "mcp"
	PickerMCPServer         PickerKind = "mcp_server"
	PickerTasks             PickerKind = "tasks"
	PickerTaskActions       PickerKind = "task_actions"
	PickerTaskArchive       PickerKind = "task_archive"
	PickerServer            PickerKind = "server"
	PickerWebSearch         PickerKind = "web_search"
	PickerWebSearchProvider PickerKind = "web_search_provider"
)

type PickerPage

type PickerPage struct {
	Items    []PickerItem
	Trailing []PickerItem
	Page     int
	Pages    int
}

func PaginatePicker

func PaginatePicker(picker PickerData, page int, pageSize int) PickerPage

type PickerPresentationItem

type PickerPresentationItem struct {
	Item            PickerItem
	Command         string
	Title           string
	Info            string
	Status          string
	Search          string
	CompactLabel    string
	Selected        bool
	Disabled        bool
	SeparatorBefore bool
}

func PresentPickerItem

func PresentPickerItem(picker PickerData, item PickerItem) PickerPresentationItem

func PresentPickerItems

func PresentPickerItems(picker PickerData) []PickerPresentationItem

type PickerViewItem

type PickerViewItem struct {
	Item            PickerItem
	Command         string
	SeparatorBefore bool
}

func PickerViewItems

func PickerViewItems(picker PickerData) []PickerViewItem

type PlanRuntime added in v0.1.7

type PlanRuntime interface {
	SessionPlan(ctx context.Context, sessionID string) (core.SessionPlan, error)
	SetSessionGoal(ctx context.Context, sessionID string, goal string) (core.SessionPlan, error)
	ClearSessionPlan(ctx context.Context, sessionID string) (core.SessionPlan, error)
	AddPlanItem(ctx context.Context, sessionID string, text string, parentID string) (core.SessionPlan, error)
	UpdatePlanItem(ctx context.Context, sessionID string, itemID string, status core.PlanItemStatus, text string) (core.SessionPlan, error)
}

type PromptData

type PromptData struct {
	Title               string
	Placeholder         string
	Value               string
	SubmitCommandPrefix string
	CancelCommand       string
	Sensitive           bool
}

type ProviderRuntime

type ProviderRuntime interface {
	ListSetupProviders(ctx context.Context) ([]setup.ProviderSetupItem, error)
	ConfigureSetupProvider(ctx context.Context, providerID string, update setup.ProviderSetupUpdate) (setup.ProviderSetupItem, error)
	ProviderModels(ctx context.Context, providerID string, update setup.ProviderSetupUpdate) ([]string, error)
	ProviderModelCatalog(ctx context.Context, providerID string, update setup.ProviderSetupUpdate) (setup.ProviderModelsResponse, error)
	DeleteSetupProvider(ctx context.Context, providerID string) error
	UpdateSessionProvider(ctx context.Context, sessionID string, providerID string) (core.Session, error)
}

type Result

type Result struct {
	Handled        bool
	Text           string
	ReloadSnapshot bool
	Picker         *PickerData
	Form           *FormData
	Prompt         *PromptData
	TextEdit       *TextEditData
	Confirm        *ConfirmData
	Info           *InfoData
}

type SearchRuntime added in v0.1.7

type SearchRuntime interface {
	Search(ctx context.Context, filter core.SearchFilter) (core.SearchReport, error)
}

type ServerRuntime

type ServerRuntime interface {
	ServerStatus(ctx context.Context) (core.ServerStatus, error)
	RestartDaemon(ctx context.Context) error
	StopDaemon(ctx context.Context) error
}

type SessionMessageRuntime

type SessionMessageRuntime interface {
	CreateSystemMessage(ctx context.Context, sessionID string, content string) (core.Message, error)
}

type SessionRuntime

type SessionRuntime interface {
	CurrentBinding(ctx context.Context, externalKey string) (core.ClientBinding, error)
	ListSessions(ctx context.Context) ([]core.Session, error)
	CreateSession(ctx context.Context, externalKey string, title string, workingDir string) (core.Session, error)
	UseSession(ctx context.Context, externalKey string, sessionID string) (core.ClientBinding, error)
	RenameSession(ctx context.Context, sessionID string, title string) (core.Session, error)
	DeleteSession(ctx context.Context, sessionID string) error
}

type SessionRuntimeOptions added in v0.1.4

type SessionRuntimeOptions interface {
	CreateSessionWithOptions(ctx context.Context, externalKey string, input core.CreateSessionRequest) (core.Session, error)
}

type SessionSendRuntime added in v0.1.11

type SessionSendRuntime interface {
	SendMessage(ctx context.Context, sessionID string, content string) (core.AcceptRunResult, error)
}

type SkillsRuntime added in v0.1.11

type SkillsRuntime interface {
	ListSkills(ctx context.Context, opts skills.SearchOptions) ([]skills.Skill, error)
	SearchSkills(ctx context.Context, query string, opts skills.SearchOptions) ([]skills.Skill, error)
	GetSkill(ctx context.Context, id string) (skills.SkillDetail, error)
	InstallSkill(ctx context.Context, path string) ([]skills.Skill, error)
	SkillAction(ctx context.Context, id string, action string) error
	SessionSkills(ctx context.Context, sessionID string) ([]skills.Skill, error)
	UseSkill(ctx context.Context, sessionID string, skillID string) (skills.SkillDetail, error)
	UnloadSkill(ctx context.Context, sessionID string, skillID string) error
	CreateSkillDraft(ctx context.Context, name string, description string, tags []string, body string) (skills.Skill, error)
	UpdateSkillMetadata(ctx context.Context, id string, update skills.MetadataUpdate) (skills.Skill, error)
	UpdateSkillBody(ctx context.Context, id string, body string) error
	SetSkillEnabled(ctx context.Context, id string, enabled bool) error
}

type StorageRuntime

type StorageRuntime interface {
	ListTemporaryStorageFiles(ctx context.Context, limit int) (localstorage.TempListResult, error)
	PromoteTemporaryStorageFile(ctx context.Context, tempPath string, destPath string) (localstorage.Entry, error)
	DeleteTemporaryStorageFile(ctx context.Context, tempPath string) (localstorage.TempEntry, error)
	CleanupTemporaryStorageFiles(ctx context.Context) (localstorage.CleanupResult, error)
	UpdateTemporaryStorageSettings(ctx context.Context, autoCleanup *bool, ttlDays int64, maxGB float64) (localstorage.TempSettings, error)
	ListStorageFiles(ctx context.Context, filter localstorage.ListFilter) (localstorage.ListResult, error)
	ReadStorageFile(ctx context.Context, storagePath string) (localstorage.ReadResult, error)
	DeleteStorageFile(ctx context.Context, storagePath string) (localstorage.Entry, error)
}

type TextEditData added in v0.1.11

type TextEditData struct {
	Title               string
	Placeholder         string
	Value               string
	SubmitCommandPrefix string
	CancelCommand       string
}

type UsageRuntime added in v0.1.7

type UsageRuntime interface {
	SessionUsage(ctx context.Context, sessionID string) (core.UsageReport, error)
}

type VoiceModuleRuntime added in v0.1.9

type VoiceModuleRuntime interface {
	VoiceModules(ctx context.Context) ([]setup.VoiceModuleDescriptor, error)
	UpdateVoiceModule(ctx context.Context, moduleID string, update setup.VoiceModuleUpdate) ([]setup.VoiceModuleDescriptor, error)
	VoiceProviderAction(ctx context.Context, moduleID string, providerID string, request setup.VoiceProviderActionRequest) (setup.VoiceProviderOption, error)
}

type WebSearchRuntime added in v0.1.11

type WebSearchRuntime interface {
	GetWebSearchConfig(ctx context.Context) (setup.WebSearchConfigResponse, error)
	UpdateWebSearchConfig(ctx context.Context, update setup.WebSearchConfig) (setup.WebSearchConfigResponse, error)
}

Jump to

Keyboard shortcuts

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