Documentation
¶
Index ¶
- func Run(version string) error
- type AgentContextPreview
- type AgentDoc
- type AgentForm
- type AgentInfo
- type App
- func (a *App) ActivateLicense(key string) (EntitlementInfo, error)
- func (a *App) BuiltinToolNames() []string
- func (a *App) CheckForUpdate() UpdateInfo
- func (a *App) CloseSession(sessionID string)
- func (a *App) ComposeAgentForm(form AgentForm) (string, error)
- func (a *App) ComposeMCPForm(form MCPForm) (string, error)
- func (a *App) ComposeSkillForm(form SkillForm) (string, error)
- func (a *App) ComposeToolForm(form ToolForm) (string, error)
- func (a *App) ConfigPaths() []ConfigPath
- func (a *App) CreateSession(agentName string) (*SessionInfo, error)
- func (a *App) DeleteAgent(name string) error
- func (a *App) DeleteMCP(name string) error
- func (a *App) DeleteSavedSession(savedID string) error
- func (a *App) DeleteSkill(name string) error
- func (a *App) DeleteTool(name string) error
- func (a *App) DownloadUpdate() (*UpdateDownloadResult, error)
- func (a *App) ExpandAtFiles(input string) (string, []string)
- func (a *App) ExportSessionMarkdown(sessionID string) (string, error)
- func (a *App) GetAuditConfig() (AuditConfigView, error)
- func (a *App) GetConfig() *userconfig.Config
- func (a *App) GetCost(sessionID string) *CostInfo
- func (a *App) GetEntitlement() EntitlementInfo
- func (a *App) GetHealth() HealthReport
- func (a *App) GetMCPDashboard(sessionID string, probe bool) []MCPDashboardEntry
- func (a *App) GetMCPStatus() []MCPStatus
- func (a *App) GetPersona(agent string) Persona
- func (a *App) GetPolicyRules() ([]PolicyRuleView, error)
- func (a *App) GetSessionMCP(sessionID string) []string
- func (a *App) GetSessions() []SessionInfo
- func (a *App) GetThemes() []ThemeInfo
- func (a *App) InstallPackage(name string) error
- func (a *App) KMGraph() (*KMGraphData, error)
- func (a *App) KMHealth() KMHealth
- func (a *App) KMIndex(path, typ string) error
- func (a *App) KMPickDirectory() (string, error)
- func (a *App) KMSearch(query string, topK int) (string, error)
- func (a *App) KMStatus() (*KMStats, error)
- func (a *App) KnownModels() map[string][]ModelOption
- func (a *App) ListAgentDocs() []AgentDoc
- func (a *App) ListAgents() []AgentInfo
- func (a *App) ListAuditEvents(limit int) ([]AuditEventView, error)
- func (a *App) ListMCP() []MCPDoc
- func (a *App) ListPackageOffers() []PackageOffer
- func (a *App) ListSavedSessions() ([]SavedSessionSummary, error)
- func (a *App) ListSkills() []SkillDoc
- func (a *App) ListTools() []ToolDoc
- func (a *App) NewAgentTemplate() string
- func (a *App) NewMCPTemplate() string
- func (a *App) NewSkillTemplate() string
- func (a *App) NewToolTemplate() string
- func (a *App) OpenFile() (*FileResult, error)
- func (a *App) OpenPath(path string) error
- func (a *App) ParseAgentForm(content string) (AgentForm, error)
- func (a *App) ParseMCPForm(content string) (MCPForm, error)
- func (a *App) ParseSkillForm(content string) (SkillForm, error)
- func (a *App) ParseToolForm(content string) (ToolForm, error)
- func (a *App) PreviewContext(agentName string) (*AgentContextPreview, error)
- func (a *App) ResetSession(sessionID string) error
- func (a *App) RespondToolApproval(requestID string, approved bool)
- func (a *App) ResumeSavedSession(savedID, agentName string) (*ResumeResult, error)
- func (a *App) RetryLastMessage(sessionID string) error
- func (a *App) SaveAPIKey(provider, key string) error
- func (a *App) SaveAgent(oldName, content string) error
- func (a *App) SaveConfig(provider, model, baseURL string) error
- func (a *App) SaveMCP(oldName, content string) error
- func (a *App) SavePersona(agent string, p Persona) error
- func (a *App) SaveSkill(oldName, content string) error
- func (a *App) SaveTool(oldName, content string) error
- func (a *App) SearchAtFiles(query string) []FileCandidate
- func (a *App) SearchSavedSessions(query string) ([]SavedSessionSummary, error)
- func (a *App) SendMessage(sessionID, message string, images []ImageAttachment) error
- func (a *App) SetProductVersion(v string)
- func (a *App) SetSessionLabel(savedID, label string) error
- func (a *App) Startup(ctx context.Context)
- func (a *App) StopGeneration(sessionID string)
- func (a *App) SwitchAgent(sessionID, agentName string) error
- func (a *App) SwitchSessionModel(sessionID, model string) error
- func (a *App) TestMCP(name string) MCPTestResult
- func (a *App) TestTool(name, inputJSON string) TestResult
- type AuditConfigView
- type AuditEventView
- type ConfigPath
- type CostInfo
- type EntitlementInfo
- type FileCandidate
- type FileResult
- type HealthCheck
- type HealthReport
- type ImageAttachment
- type KMGraphData
- type KMHealth
- type KMLink
- type KMNode
- type KMStats
- type MCPDashboardEntry
- type MCPDoc
- type MCPForm
- type MCPStatus
- type MCPTestResult
- type Message
- type ModelOption
- type PackageOffer
- type Persona
- type PolicyRuleView
- type ResumeResult
- type SavedSessionSummary
- type Session
- type SessionInfo
- type SkillDoc
- type SkillForm
- type TestResult
- type ThemeInfo
- type ToolCall
- type ToolDoc
- type ToolForm
- type UpdateDownloadResult
- type UpdateInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*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
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 (*App) ComposeAgentForm ¶ added in v0.3.1
ComposeAgentForm builds agent MD from form fields (does not preserve MoE routing blocks).
func (*App) ComposeMCPForm ¶ added in v0.3.0
ComposeMCPForm builds MCP server MD from form fields.
func (*App) ComposeSkillForm ¶ added in v0.3.0
ComposeSkillForm builds skill MD from form fields.
func (*App) ComposeToolForm ¶ added in v0.3.0
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
DeleteAgent removes a user-authored agent (builtins cannot be deleted).
func (*App) DeleteSavedSession ¶ added in v0.3.1
DeleteSavedSession removes a persisted session file.
func (*App) DeleteSkill ¶ added in v0.2.0
DeleteSkill removes a user-authored skill MD file by name.
func (*App) DeleteTool ¶ added in v0.2.0
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
ExpandAtFiles inlines @file references in a message (same as CLI chat).
func (*App) ExportSessionMarkdown ¶ added in v0.3.1
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) 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 ¶
GetMCPStatus lists configured MCP servers (legacy API; use GetMCPDashboard).
func (*App) GetPersona ¶ added in v0.2.0
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
GetSessionMCP returns MCP server names active in a session.
func (*App) GetSessions ¶
func (a *App) GetSessions() []SessionInfo
func (*App) InstallPackage ¶ added in v0.6.0
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) KMIndex ¶ added in v0.2.0
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
KMPickDirectory opens a native folder picker for choosing what to index.
func (*App) KMSearch ¶ added in v0.3.0
KMSearch runs semantic search against the knowledge graph for the UI panel.
func (*App) KMStatus ¶ added in v0.2.0
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
ListAgentDocs returns bundled and user agents with full MD content.
func (*App) ListAgents ¶
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) 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
ListSkills returns all user-authored skill MD files in ~/.config/m/skills.
func (*App) ListTools ¶ added in v0.2.0
ListTools returns all user-authored tool MD files in ~/.config/m/tools.
func (*App) NewAgentTemplate ¶ added in v0.3.1
NewAgentTemplate returns starter MD for a custom agent.
func (*App) NewMCPTemplate ¶ added in v0.2.0
NewMCPTemplate returns starter MD for a new MCP server.
func (*App) NewSkillTemplate ¶ added in v0.2.0
NewSkillTemplate returns starter MD for a new skill.
func (*App) NewToolTemplate ¶ added in v0.2.0
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) ParseAgentForm ¶ added in v0.3.1
ParseAgentForm extracts editable fields from agent MD content.
func (*App) ParseMCPForm ¶ added in v0.3.0
ParseMCPForm extracts editable fields from MCP server MD content.
func (*App) ParseSkillForm ¶ added in v0.3.0
ParseSkillForm extracts editable fields from skill MD content.
func (*App) ParseToolForm ¶ added in v0.3.0
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
ResetSession clears in-memory chat history for a session.
func (*App) RespondToolApproval ¶ added in v0.2.0
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
RetryLastMessage re-runs the engine step with the last user message.
func (*App) SaveAPIKey ¶
func (*App) SaveConfig ¶
func (*App) SaveMCP ¶ added in v0.2.0
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
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
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
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
SetProductVersion sets the build version (from main.Version ldflags).
func (*App) SetSessionLabel ¶ added in v0.5.0
SetSessionLabel assigns a human-readable name to a saved session.
func (*App) StopGeneration ¶
func (*App) SwitchAgent ¶
func (*App) SwitchSessionModel ¶ added in v0.5.0
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
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
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 ¶ added in v0.2.0
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
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.
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.
Source Files
¶
- agents.go
- app.go
- atfile.go
- audit_view.go
- chat_cmds.go
- context.go
- customskills.go
- customtools.go
- deps.go
- entitlement.go
- health.go
- knowledge.go
- main.go
- mcp_dashboard.go
- mcpservers.go
- models.go
- open.go
- packages_install.go
- paths.go
- persona.go
- runtime.go
- sessions.go
- studio.go
- testbench.go
- upgrade.go
- upgrade_download.go
- upgrade_state.go
- version_platform.go