desktop

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 42 Imported by: 0

README

AgentCTL Desktop (v0.5.x)

The desktop app is a Wails-based GUI for AgentCTL — same config, agents, tools, and sessions as the CLI, with a full control-plane UI.

Install

macOS
# Download AgentCTL_*_macos.zip from GitHub Releases, unzip, drag to Applications
# Or Homebrew (when available):
brew install --cask agentctl
Linux
# Download AgentCTL_*_linux_amd64.tar.gz from Releases
tar -xzf AgentCTL_*_linux_amd64.tar.gz
./m
Windows

Download AgentCTL_*_windows_amd64.zip, unzip, and run the app.

Launch

  • macOS / Windows: open AgentCTL.app or the installed shortcut
  • CLI flag: m --gui or m gui (same binary)

Features (v0.5)

Chat
  • Visual chat with markdown, tool-call cards, and streaming
  • Slash commands: /reset, /retry, /model, /export, /help
  • @file.go mentions inline file content (same as CLI)
  • Session persistence — resume from Home or sidebar
  • Context inspector, MoE routing history, activity timeline
Control plane
  • Home — setup checklist, health, quick nav
  • Extensions — Tools, Skills, MCP servers, Agent Studio (form editors + test bench)
  • Knowledge — live graph when km serve is running
  • Personality — per-agent tone, verbosity, instructions
  • Security (Pro) — audit log tail and policy rules
MCP
  • Define servers in ~/.config/m/mcp/*.md
  • Live dashboard in Extensions → MCP and from the chat MCP pill
  • Per-server connectivity test (“Test all”)
Updates
  • Top bar shows ↑ v{latest} when a GitHub release is newer
  • In-app download to ~/Downloads/AgentCTL-updates/ with install notes
  • Also available under Settings → General

Config paths

All desktop and CLI data lives under ~/.config/m/:

Path Purpose
config.yaml Provider, model, base URL
tools/ Custom shell tools
skills/ Skill bodies (system prompt)
mcp/ MCP server definitions
agents/ Custom agent specs
personas/ Per-agent personality overlays
sessions/ Encrypted saved chats

Development

Prerequisites
go install github.com/wailsapp/wails/v2/cmd/wails@latest
cd frontend && npm install
Run / build
make desktop-dev      # hot reload
make desktop-build    # production binary / .app
wails generate module # refresh JS bindings after Go API changes
Layout
desktop/           # Go bridge (sessions, MCP, updates, audit)
  app.go           # Core session + agent APIs
  chat_cmds.go     # /reset, /retry, engine steps
  mcp_dashboard.go # Live MCP status
  upgrade*.go      # Check + download updates
frontend/src/
  App.svelte       # Shell: rail, tabs, routing
  components/
    ChatView.svelte      # Chat UI (extracted)
    MCPDashboard.svelte  # MCP live status
    UpdatePanel.svelte   # In-app updater

Build tags

  • Default CLI build: no GUI (go build ./cmd/m)
  • Desktop: Wails embeds the Svelte frontend into AgentCTL.app

FAQ

Do GUI and CLI share state?
Yes — same ~/.config/m tree and saved sessions.

When do tool/skill/MCP changes apply?
Start a New Chat (Apply bar reminds you when config is dirty).

Does the UI need network?
Only for LLM APIs and optional update checks. The UI is bundled offline.

License

Same as the main project — see LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(version string) error

Run starts the Wails desktop application. Called from cmd/m/gui_launch.go when GUI mode is selected. Note: For standalone desktop builds, use the root main.go instead.

Types

type AgentContextPreview added in v0.3.0

type AgentContextPreview struct {
	Agent      string   `json:"agent"`
	Model      string   `json:"model"`
	System     string   `json:"system"`
	CharCount  int      `json:"charCount"`
	Skills     []string `json:"skills"`
	Persona    Persona  `json:"persona"`
	ToolCount  int      `json:"toolCount"`
	MCPServers []string `json:"mcpServers"`
}

AgentContextPreview is what the Context Inspector shows: the composed system prompt and metadata about overlays (skills, persona, MCP) for an agent.

type AgentDoc added in v0.3.1

type AgentDoc struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Model       string `json:"model"`
	Path        string `json:"path"`
	Content     string `json:"content"`
	Builtin     bool   `json:"builtin"`
	Error       string `json:"error,omitempty"`
}

AgentDoc is an agent MD file for the Studio UI.

type AgentForm added in v0.3.1

type AgentForm struct {
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	Model         string   `json:"model"`
	FallbackLines string   `json:"fallbackLines"` // one model per line
	Tools         []string `json:"tools"`
	Skills        []string `json:"skills"`
	MCP           []string `json:"mcp"`
	Temperature   *float64 `json:"temperature"`
	Body          string   `json:"body"`
	HasRouting    bool     `json:"hasRouting"` // true when MoE routing block exists — edit in Advanced MD
}

AgentForm is a form-friendly view of an agent MD document (routing stays in Advanced MD).

type AgentInfo

type AgentInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Model       string `json:"model"`
	Path        string `json:"path"`
	Builtin     bool   `json:"builtin"`
	Category    string `json:"category"` // "hub", "spoke", "standalone"
}

AgentInfo describes an available agent.

type App

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

App manages the desktop application state.

func NewApp

func NewApp() *App

func (*App) ActivateLicense added in v0.6.0

func (a *App) ActivateLicense(key string) (EntitlementInfo, error)

ActivateLicense activates a license key (dev keys or control plane JWT).

func (*App) BuiltinToolNames added in v0.3.1

func (a *App) BuiltinToolNames() []string

BuiltinToolNames lists built-in tools available for agent Studio pickers.

func (*App) CheckForUpdate added in v0.5.0

func (a *App) CheckForUpdate() UpdateInfo

CheckForUpdate queries GitHub for the latest release tag.

func (*App) CloseSession

func (a *App) CloseSession(sessionID string)

func (*App) ComposeAgentForm added in v0.3.1

func (a *App) ComposeAgentForm(form AgentForm) (string, error)

ComposeAgentForm builds agent MD from form fields (does not preserve MoE routing blocks).

func (*App) ComposeMCPForm added in v0.3.0

func (a *App) ComposeMCPForm(form MCPForm) (string, error)

ComposeMCPForm builds MCP server MD from form fields.

func (*App) ComposeSkillForm added in v0.3.0

func (a *App) ComposeSkillForm(form SkillForm) (string, error)

ComposeSkillForm builds skill MD from form fields.

func (*App) ComposeToolForm added in v0.3.0

func (a *App) ComposeToolForm(form ToolForm) (string, error)

ComposeToolForm builds tool MD from form fields.

func (*App) ConfigPaths added in v0.3.1

func (a *App) ConfigPaths() []ConfigPath

ConfigPaths returns well-known AgentCTL config directories.

func (*App) CreateSession

func (a *App) CreateSession(agentName string) (*SessionInfo, error)

func (*App) DeleteAgent added in v0.3.1

func (a *App) DeleteAgent(name string) error

DeleteAgent removes a user-authored agent (builtins cannot be deleted).

func (*App) DeleteMCP added in v0.2.0

func (a *App) DeleteMCP(name string) error

DeleteMCP removes an MCP server MD file by name.

func (*App) DeleteSavedSession added in v0.3.1

func (a *App) DeleteSavedSession(savedID string) error

DeleteSavedSession removes a persisted session file.

func (*App) DeleteSkill added in v0.2.0

func (a *App) DeleteSkill(name string) error

DeleteSkill removes a user-authored skill MD file by name.

func (*App) DeleteTool added in v0.2.0

func (a *App) DeleteTool(name string) error

DeleteTool removes a user-authored tool MD file by name.

func (*App) DownloadUpdate added in v0.5.1

func (a *App) DownloadUpdate() (*UpdateDownloadResult, error)

DownloadUpdate fetches the platform release asset for the latest version.

func (*App) ExpandAtFiles added in v0.5.1

func (a *App) ExpandAtFiles(input string) (string, []string)

ExpandAtFiles inlines @file references in a message (same as CLI chat).

func (*App) ExportSessionMarkdown added in v0.3.1

func (a *App) ExportSessionMarkdown(sessionID string) (string, error)

ExportSessionMarkdown renders the current session as a Markdown transcript.

func (*App) GetAuditConfig added in v0.5.0

func (a *App) GetAuditConfig() (AuditConfigView, error)

GetAuditConfig returns the effective audit backend configuration.

func (*App) GetConfig

func (a *App) GetConfig() *userconfig.Config

func (*App) GetCost

func (a *App) GetCost(sessionID string) *CostInfo

func (*App) GetEntitlement added in v0.6.0

func (a *App) GetEntitlement() EntitlementInfo

GetEntitlement returns the current license/plan state.

func (*App) GetHealth added in v0.3.0

func (a *App) GetHealth() HealthReport

GetHealth runs lightweight doctor-style checks for the desktop UI.

func (*App) GetMCPDashboard added in v0.5.1

func (a *App) GetMCPDashboard(sessionID string, probe bool) []MCPDashboardEntry

GetMCPDashboard returns configured MCP servers with session + probe status. probe=true runs a connectivity check per server (slower).

func (*App) GetMCPStatus

func (a *App) GetMCPStatus() []MCPStatus

GetMCPStatus lists configured MCP servers (legacy API; use GetMCPDashboard).

func (*App) GetPersona added in v0.2.0

func (a *App) GetPersona(agent string) Persona

GetPersona returns the stored persona for an agent (zero value if unset).

func (*App) GetPolicyRules added in v0.5.0

func (a *App) GetPolicyRules() ([]PolicyRuleView, error)

GetPolicyRules returns merged policy rules from home and project config.

func (*App) GetSessionMCP added in v0.5.1

func (a *App) GetSessionMCP(sessionID string) []string

GetSessionMCP returns MCP server names active in a session.

func (*App) GetSessions

func (a *App) GetSessions() []SessionInfo

func (*App) GetThemes

func (a *App) GetThemes() []ThemeInfo

func (*App) InstallPackage added in v0.6.0

func (a *App) InstallPackage(name string) error

InstallPackage installs a curated package if entitled.

func (*App) KMGraph added in v0.2.0

func (a *App) KMGraph() (*KMGraphData, error)

KMGraph returns the graph nodes and links for visualization.

func (*App) KMHealth added in v0.2.0

func (a *App) KMHealth() KMHealth

KMHealth pings the status endpoint with a short timeout.

func (*App) KMIndex added in v0.2.0

func (a *App) KMIndex(path, typ string) error

KMIndex kicks off indexing of path in the background. type is "auto" (repo if a .git exists, else docs), "repo", or "docs". Progress is reported to the frontend via events: "kmIndexProgress" {current,total,file}, "kmIndexDone" {message}, and "kmIndexError" {error}.

func (*App) KMPickDirectory added in v0.2.0

func (a *App) KMPickDirectory() (string, error)

KMPickDirectory opens a native folder picker for choosing what to index.

func (*App) KMSearch added in v0.3.0

func (a *App) KMSearch(query string, topK int) (string, error)

KMSearch runs semantic search against the knowledge graph for the UI panel.

func (*App) KMStatus added in v0.2.0

func (a *App) KMStatus() (*KMStats, error)

KMStatus returns knowledge base stats (chunks/documents/repos).

func (*App) KnownModels added in v0.5.0

func (a *App) KnownModels() map[string][]ModelOption

KnownModels returns suggested models per provider for the settings picker.

func (*App) ListAgentDocs added in v0.3.1

func (a *App) ListAgentDocs() []AgentDoc

ListAgentDocs returns bundled and user agents with full MD content.

func (*App) ListAgents

func (a *App) ListAgents() []AgentInfo

func (*App) ListAuditEvents added in v0.5.0

func (a *App) ListAuditEvents(limit int) ([]AuditEventView, error)

ListAuditEvents reads the tail of the audit JSONL file.

func (*App) ListMCP added in v0.2.0

func (a *App) ListMCP() []MCPDoc

ListMCP returns all MCP server MD files in ~/.config/m/mcp.

func (*App) ListPackageOffers added in v0.6.0

func (a *App) ListPackageOffers() []PackageOffer

ListPackageOffers returns bundled packages with lock/install state.

func (*App) ListSavedSessions added in v0.3.1

func (a *App) ListSavedSessions() ([]SavedSessionSummary, error)

ListSavedSessions reads encrypted session files from ~/.config/m/sessions.

func (*App) ListSkills added in v0.2.0

func (a *App) ListSkills() []SkillDoc

ListSkills returns all user-authored skill MD files in ~/.config/m/skills.

func (*App) ListTools added in v0.2.0

func (a *App) ListTools() []ToolDoc

ListTools returns all user-authored tool MD files in ~/.config/m/tools.

func (*App) NewAgentTemplate added in v0.3.1

func (a *App) NewAgentTemplate() string

NewAgentTemplate returns starter MD for a custom agent.

func (*App) NewMCPTemplate added in v0.2.0

func (a *App) NewMCPTemplate() string

NewMCPTemplate returns starter MD for a new MCP server.

func (*App) NewSkillTemplate added in v0.2.0

func (a *App) NewSkillTemplate() string

NewSkillTemplate returns starter MD for a new skill.

func (*App) NewToolTemplate added in v0.2.0

func (a *App) NewToolTemplate() string

NewToolTemplate returns starter MD for a new shell tool.

func (*App) OpenFile

func (a *App) OpenFile() (*FileResult, error)

OpenFile opens a native file picker and returns text or image content.

func (*App) OpenPath added in v0.5.0

func (a *App) OpenPath(path string) error

OpenPath reveals a path in the system file manager.

func (*App) ParseAgentForm added in v0.3.1

func (a *App) ParseAgentForm(content string) (AgentForm, error)

ParseAgentForm extracts editable fields from agent MD content.

func (*App) ParseMCPForm added in v0.3.0

func (a *App) ParseMCPForm(content string) (MCPForm, error)

ParseMCPForm extracts editable fields from MCP server MD content.

func (*App) ParseSkillForm added in v0.3.0

func (a *App) ParseSkillForm(content string) (SkillForm, error)

ParseSkillForm extracts editable fields from skill MD content.

func (*App) ParseToolForm added in v0.3.0

func (a *App) ParseToolForm(content string) (ToolForm, error)

ParseToolForm extracts editable fields from tool MD content.

func (*App) PreviewContext added in v0.3.0

func (a *App) PreviewContext(agentName string) (*AgentContextPreview, error)

PreviewContext returns the system prompt that would be used on the next New Chat with this agent (agent body + skills + persona).

func (*App) ResetSession added in v0.5.0

func (a *App) ResetSession(sessionID string) error

ResetSession clears in-memory chat history for a session.

func (*App) RespondToolApproval added in v0.2.0

func (a *App) RespondToolApproval(requestID string, approved bool)

RespondToolApproval is called from the frontend to answer a pending tool-approval request. Unknown or already-answered ids are ignored.

func (*App) ResumeSavedSession added in v0.3.1

func (a *App) ResumeSavedSession(savedID, agentName string) (*ResumeResult, error)

ResumeSavedSession loads a disk session into a new in-memory chat.

func (*App) RetryLastMessage added in v0.5.0

func (a *App) RetryLastMessage(sessionID string) error

RetryLastMessage re-runs the engine step with the last user message.

func (*App) SaveAPIKey

func (a *App) SaveAPIKey(provider, key string) error

func (*App) SaveAgent added in v0.3.1

func (a *App) SaveAgent(oldName, content string) error

SaveAgent validates and writes a user agent MD file.

func (*App) SaveConfig

func (a *App) SaveConfig(provider, model, baseURL string) error

func (*App) SaveMCP added in v0.2.0

func (a *App) SaveMCP(oldName, content string) error

SaveMCP validates and writes an MCP server MD file. oldName is the file's previous name (empty for new servers); a rename removes the old file.

func (*App) SavePersona added in v0.2.0

func (a *App) SavePersona(agent string, p Persona) error

SavePersona persists the persona for an agent. An empty persona deletes the stored file so the agent reverts to its default behaviour.

func (*App) SaveSkill added in v0.2.0

func (a *App) SaveSkill(oldName, content string) error

SaveSkill validates and writes a skill MD file. oldName is the file's previous name (empty for new skills); a rename removes the old file.

func (*App) SaveTool added in v0.2.0

func (a *App) SaveTool(oldName, content string) error

SaveTool validates and writes a tool MD file. oldName is the file's previous name (empty for new tools); if the tool was renamed, the old file is removed. Returns a descriptive error when the content doesn't parse or validate.

func (*App) SearchAtFiles added in v0.5.1

func (a *App) SearchAtFiles(query string) []FileCandidate

SearchAtFiles finds files under the working directory matching query.

func (*App) SearchSavedSessions added in v0.5.0

func (a *App) SearchSavedSessions(query string) ([]SavedSessionSummary, error)

SearchSavedSessions filters saved sessions by label or preview text.

func (*App) SendMessage

func (a *App) SendMessage(sessionID, message string, images []ImageAttachment) error

func (*App) SetProductVersion added in v0.5.0

func (a *App) SetProductVersion(v string)

SetProductVersion sets the build version (from main.Version ldflags).

func (*App) SetSessionLabel added in v0.5.0

func (a *App) SetSessionLabel(savedID, label string) error

SetSessionLabel assigns a human-readable name to a saved session.

func (*App) Startup

func (a *App) Startup(ctx context.Context)

func (*App) StopGeneration

func (a *App) StopGeneration(sessionID string)

func (*App) SwitchAgent

func (a *App) SwitchAgent(sessionID, agentName string) error

func (*App) SwitchSessionModel added in v0.5.0

func (a *App) SwitchSessionModel(sessionID, model string) error

SwitchSessionModel changes the model for an active session.

func (*App) TestMCP added in v0.3.0

func (a *App) TestMCP(name string) MCPTestResult

TestMCP tries to start a configured MCP server and list its tools.

func (*App) TestTool added in v0.3.0

func (a *App) TestTool(name, inputJSON string) TestResult

TestTool executes a user-authored shell tool with the given JSON stdin input. name must match a saved tool in ~/.config/m/tools.

type AuditConfigView added in v0.5.0

type AuditConfigView struct {
	Backend string `json:"backend"`
	Path    string `json:"path"`
	Active  bool   `json:"active"`
}

AuditConfigView describes where audit logs are written.

type AuditEventView added in v0.5.0

type AuditEventView struct {
	Type       string `json:"type"`
	SessionID  string `json:"sessionId,omitempty"`
	TS         string `json:"ts,omitempty"`
	Tool       string `json:"tool,omitempty"`
	Outcome    string `json:"outcome,omitempty"`
	Error      string `json:"error,omitempty"`
	DurationMS int64  `json:"durationMs,omitempty"`
	Agent      string `json:"agent,omitempty"`
	Model      string `json:"model,omitempty"`
}

AuditEventView is a trimmed audit row for the UI.

type ConfigPath added in v0.3.1

type ConfigPath struct {
	ID    string `json:"id"`
	Label string `json:"label"`
	Path  string `json:"path"`
}

ConfigPath describes one on-disk config location for the Settings panel.

type CostInfo

type CostInfo struct {
	InputTokens  int     `json:"inputTokens"`
	OutputTokens int     `json:"outputTokens"`
	Cost         float64 `json:"cost"`
	Model        string  `json:"model"`
}

CostInfo shows token usage and cost.

type EntitlementInfo added in v0.6.0

type EntitlementInfo struct {
	Plan         string   `json:"plan"`
	Entitlements []string `json:"entitlements"`
	Packages     []string `json:"packages"`
	LicenseHint  string   `json:"licenseHint"`
	IsPro        bool     `json:"isPro"`
}

EntitlementInfo is the user's plan state for the desktop UI.

type FileCandidate added in v0.5.1

type FileCandidate = atfile.Candidate

FileCandidate is a workspace file for @-mention autocomplete.

type FileResult

type FileResult struct {
	Path     string `json:"path"`
	Name     string `json:"name"`
	Kind     string `json:"kind"` // text | image
	Content  string `json:"content"`
	MimeType string `json:"mimeType,omitempty"`
	DataB64  string `json:"dataB64,omitempty"`
}

FileResult is returned by OpenFile.

type HealthCheck added in v0.3.0

type HealthCheck struct {
	ID     string `json:"id"`
	Label  string `json:"label"`
	Status string `json:"status"` // ok, warn, error
	Detail string `json:"detail"`
	FixTab string `json:"fixTab,omitempty"` // rail tab to open: settings, knowledge, mcp, tools
}

HealthCheck is one row in the desktop health panel (m doctor for the GUI).

type HealthReport added in v0.3.0

type HealthReport struct {
	OK     bool          `json:"ok"`
	Checks []HealthCheck `json:"checks"`
}

HealthReport aggregates setup checks for the Command Center.

type ImageAttachment added in v0.7.1

type ImageAttachment struct {
	Name     string `json:"name"`
	MimeType string `json:"mimeType"`
	DataB64  string `json:"dataB64"`
}

ImageAttachment is a vision input from the chat UI.

type KMGraphData added in v0.2.0

type KMGraphData struct {
	Nodes []KMNode `json:"nodes"`
	Links []KMLink `json:"links"`
}

KMGraphData is the node/edge payload from GET /api/graph.

type KMHealth added in v0.2.0

type KMHealth struct {
	Available bool   `json:"available"`
	BaseURL   string `json:"baseUrl"`
	Error     string `json:"error,omitempty"`
}

KMHealth reports whether the knowledge-master HTTP server is reachable.

type KMLink struct {
	Source string `json:"source"`
	Target string `json:"target"`
	Type   string `json:"type"`
}

KMLink is one graph edge from GET /api/graph.

type KMNode added in v0.2.0

type KMNode struct {
	ID       string `json:"id"`
	Type     string `json:"type"`
	Label    string `json:"label"`
	Category string `json:"category,omitempty"`
	Source   string `json:"source,omitempty"`
}

KMNode is one graph vertex from GET /api/graph.

type KMStats added in v0.2.0

type KMStats struct {
	Chunks    int `json:"chunks"`
	Documents int `json:"documents"`
	Repos     int `json:"repos"`
}

KMStats mirrors GET /api/v1/status.

type MCPDashboardEntry added in v0.5.1

type MCPDashboardEntry struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Transport   string   `json:"transport"`
	InSession   bool     `json:"inSession"`
	Reachable   bool     `json:"reachable"`
	ToolCount   int      `json:"toolCount"`
	Tools       []string `json:"tools,omitempty"`
	Error       string   `json:"error,omitempty"`
	ConfigError string   `json:"configError,omitempty"`
	CheckedAt   int64    `json:"checkedAt"`
}

MCPDashboardEntry is live status for one configured MCP server.

type MCPDoc added in v0.2.0

type MCPDoc struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Transport   string `json:"transport"`
	Path        string `json:"path"`
	Content     string `json:"content"`
	Error       string `json:"error,omitempty"`
}

MCPDoc is a user-authored MCP server MD file surfaced to the MCP tab.

type MCPForm added in v0.3.0

type MCPForm struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Transport   string   `json:"transport"`
	Command     []string `json:"command"`
	URL         string   `json:"url"`
	ToolPrefix  string   `json:"toolPrefix"`
	Body        string   `json:"body"`
}

MCPForm is a form-friendly view of an MCP server MD document.

type MCPStatus

type MCPStatus struct {
	Name      string `json:"name"`
	Transport string `json:"transport"`
	Installed bool   `json:"installed"`
}

MCPStatus describes an MCP server's state.

type MCPTestResult added in v0.3.0

type MCPTestResult struct {
	OK    bool     `json:"ok"`
	Tools []string `json:"tools"`
	Log   string   `json:"log"`
	Error string   `json:"error,omitempty"`
}

MCPTestResult reports whether an MCP server starts and which tools it exposes.

type Message

type Message struct {
	ID        string     `json:"id"`
	Role      string     `json:"role"`
	Content   string     `json:"content"`
	Timestamp int64      `json:"timestamp"`
	ToolCalls []ToolCall `json:"toolCalls,omitempty"`
}

Message represents a chat message for the frontend.

type ModelOption added in v0.5.0

type ModelOption struct {
	ID    string `json:"id"`
	Label string `json:"label"`
}

ModelOption is one selectable model for a provider.

type PackageOffer added in v0.6.0

type PackageOffer struct {
	Name         string   `json:"name"`
	Description  string   `json:"description"`
	Entitlements []string `json:"entitlements"`
	Locked       bool     `json:"locked"`
	Installed    bool     `json:"installed"`
}

PackageOffer describes a sellable bundle and lock state.

type Persona added in v0.2.0

type Persona struct {
	Instructions string   `json:"instructions"`          // free-form custom guidance
	Tone         string   `json:"tone"`                  // "", concise, friendly, formal, playful, direct
	Verbosity    string   `json:"verbosity"`             // "", terse, balanced, detailed
	Temperature  *float64 `json:"temperature,omitempty"` // nil = use the agent's default
}

Persona is a per-agent behaviour overlay. It is stored in user config keyed by agent name and composed into the system prompt at session start, so users can tweak how any agent behaves — including bundled ones like "m" — without editing the agent's MD file.

func (Persona) IsEmpty added in v0.2.0

func (p Persona) IsEmpty() bool

IsEmpty reports whether the persona has no effect on a session.

type PolicyRuleView added in v0.5.0

type PolicyRuleView struct {
	Name            string   `json:"name"`
	Tool            string   `json:"tool,omitempty"`
	DenyPattern     string   `json:"denyPattern,omitempty"`
	AllowPathPrefix []string `json:"allowPathPrefix,omitempty"`
	Message         string   `json:"message,omitempty"`
}

PolicyRuleView is one policy rule for the desktop Security panel.

type ResumeResult added in v0.3.1

type ResumeResult struct {
	Session  SessionInfo `json:"session"`
	Messages []Message   `json:"messages"`
}

ResumeResult is returned when a saved session is loaded into a new chat.

type SavedSessionSummary added in v0.3.1

type SavedSessionSummary struct {
	ID           string `json:"id"`
	Label        string `json:"label"`
	Provider     string `json:"provider"`
	Model        string `json:"model"`
	Messages     int    `json:"messages"`
	Preview      string `json:"preview"`
	InputTokens  int    `json:"inputTokens"`
	OutputTokens int    `json:"outputTokens"`
	SavedAt      int64  `json:"savedAt"`
}

SavedSessionSummary is a persisted chat session on disk.

type Session

type Session struct {
	ID        string    `json:"id"`
	Agent     string    `json:"agent"`
	Model     string    `json:"model"`
	CreatedAt int64     `json:"createdAt"`
	Messages  []Message `json:"messages"`
	MCPNames  []string  `json:"mcpNames"`
	// contains filtered or unexported fields
}

Session wraps an engine.Session with desktop-specific state.

type SessionInfo

type SessionInfo struct {
	ID        string `json:"id"`
	Agent     string `json:"agent"`
	Model     string `json:"model"`
	Messages  int    `json:"messages"`
	CreatedAt int64  `json:"createdAt"`
	Preview   string `json:"preview"` // first user message
}

SessionInfo is a summary for the session list.

type SkillDoc added in v0.2.0

type SkillDoc struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Tools       []string `json:"tools"`
	Path        string   `json:"path"`
	Content     string   `json:"content"`
	Error       string   `json:"error,omitempty"`
}

SkillDoc is a user-authored skill MD file surfaced to the Skills tab.

type SkillForm added in v0.3.0

type SkillForm struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Body        string `json:"body"`
}

SkillForm is a form-friendly view of a skill MD document.

type TestResult added in v0.3.0

type TestResult struct {
	OK         bool   `json:"ok"`
	Output     string `json:"output"`
	Error      string `json:"error,omitempty"`
	DurationMs int64  `json:"durationMs"`
}

TestResult is the outcome of running a custom shell tool from the test bench.

type ThemeInfo

type ThemeInfo struct {
	Name      string `json:"name"`
	BG        string `json:"bg"`
	BGPanel   string `json:"bgPanel"`
	BGInput   string `json:"bgInput"`
	Border    string `json:"border"`
	User      string `json:"user"`
	Assistant string `json:"assistant"`
	Tool      string `json:"tool"`
	Error     string `json:"error"`
	Accent    string `json:"accent"`
	Text      string `json:"text"`
	Muted     string `json:"muted"`
}

ThemeInfo describes a desktop theme.

type ToolCall

type ToolCall struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Input    string `json:"input"`
	Output   string `json:"output,omitempty"`
	Error    string `json:"error,omitempty"`
	Duration int64  `json:"duration"` // milliseconds
	Status   string `json:"status"`   // "running", "done", "error", "declined"
}

ToolCall represents a tool execution.

type ToolDoc added in v0.2.0

type ToolDoc struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Runtime     string `json:"runtime"`
	Path        string `json:"path"`
	Content     string `json:"content"`
	Error       string `json:"error,omitempty"` // parse error, if any
}

ToolDoc is a user-authored tool MD file surfaced to the Tools tab.

type ToolForm added in v0.3.0

type ToolForm struct {
	Name           string   `json:"name"`
	Description    string   `json:"description"`
	Command        []string `json:"command"`
	TimeoutSec     int      `json:"timeoutSec"`
	ParametersJSON string   `json:"parametersJson"` // JSON Schema object as string
	Body           string   `json:"body"`
}

ToolForm is a form-friendly view of a shell tool MD document.

type UpdateDownloadResult added in v0.5.1

type UpdateDownloadResult struct {
	Path       string `json:"path"`
	Filename   string `json:"filename"`
	ReleaseURL string `json:"releaseUrl"`
	Notes      string `json:"notes"`
}

UpdateDownloadResult is returned when an update package is downloaded.

type UpdateInfo added in v0.5.0

type UpdateInfo struct {
	Current         string `json:"current"`
	Latest          string `json:"latest"`
	UpdateAvailable bool   `json:"updateAvailable"`
	PendingInstall  bool   `json:"pendingInstall"`
	PendingPath     string `json:"pendingPath,omitempty"`
	ReleaseURL      string `json:"releaseUrl"`
	DesktopURL      string `json:"desktopUrl"`
	DownloadNotes   string `json:"downloadNotes"`
}

UpdateInfo describes an available AgentCTL release.

Jump to

Keyboard shortcuts

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