Documentation
¶
Index ¶
- func APIChatFromSessionForTest(projectID string, session *chatstore.Session) apiChat
- func AllowNetworkRequest(w http.ResponseWriter, r *http.Request) bool
- func ClearState() error
- func ConsumeChatGPTResetForTest(ctx context.Context, bearer, accountID, key string, client *http.Client) (string, error)
- func DesktopFrontend() http.Handler
- func DesktopProxy() http.Handler
- func ExportGUISourcesForTest() (string, error)
- func ForceStop(state State)
- func ForceStopPID(pid int)
- func GlobalAgentsHandlerForTest() http.HandlerFunc
- func HandleNetworkInterfaces(w http.ResponseWriter, r *http.Request)
- func LogPath() (string, error)
- func MessageToolWallSecondsForTest(message chatstore.Message, source []chatstore.Message, index int) float64
- func NotificationsHandlerForTest() http.HandlerFunc
- func PrepareGUIDependencies(ctx context.Context, directory string) error
- func PrepareGUIWorkspace(raw string) (string, error)
- func QuotaErrorFromBodyForTest(status string, body []byte) string
- func ReportHandlerForTest() http.HandlerFunc
- func Run(ctx context.Context, options Options) error
- func RunningVersion() string
- func SaveState(state State) error
- func SetReportDestinationForTest(destination string) func()
- func SlashChatOutputForTest(output string) string
- func StartViteForTest(directory string) (*url.URL, *exec.Cmd, error)
- func StatePath() (string, error)
- func StopViteForTest(command *exec.Cmd)
- func ViteCommandForTest(directory string, port int) *exec.Cmd
- func WaitForShutdown(ctx context.Context) error
- type BackgroundAPIForTest
- type ChatMessageSnapshotForTest
- type DevelopmentFrontendForTest
- type Health
- type Options
- type QuotaBarForTest
- type ReachableAddress
- type State
- type UpdateAPIForTest
- func (a *UpdateAPIForTest) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (a *UpdateAPIForTest) SetCheck(check func(context.Context) updater.CheckResult)
- func (a *UpdateAPIForTest) SetLaunch(launch func(string, string, string) error)
- func (a *UpdateAPIForTest) SetPrepare(prepare func(context.Context, string, io.Writer) (string, string, error))
- func (a *UpdateAPIForTest) SetStatus(phase, latest, staged string)
- func (a *UpdateAPIForTest) Status() (phase, message string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIChatFromSessionForTest ¶ added in v2026.1023.0
func AllowNetworkRequest ¶ added in v2026.1030.0
func AllowNetworkRequest(w http.ResponseWriter, r *http.Request) bool
func ClearState ¶ added in v2026.909.0
func ClearState() error
func ConsumeChatGPTResetForTest ¶ added in v2026.1017.1
func DesktopFrontend ¶ added in v2026.1009.0
DesktopFrontend makes the daemon the source of the native client's UI assets. Reloading a client after an update loads the daemon's matching frontend.
func DesktopProxy ¶ added in v2026.1003.0
DesktopProxy connects the native WebView to the shared daemon. It adapts the native origin to the desktop HTTP origin understood by older running daemons, so installing a new GUI does not require interrupting their active sessions. The caller must serve this handler exclusively on a loopback listener.
func ExportGUISourcesForTest ¶ added in v2026.1017.2
func ForceStop ¶ added in v2026.909.0
func ForceStop(state State)
ForceStop terminates the server and, when present, its separately managed Vite process group. Detached Solomon and Vite commands are process-group leaders, while a foreground "server run" may share its terminal's group; forceStopProcess handles both cases without killing an unrelated shell.
func ForceStopPID ¶ added in v2026.909.0
func ForceStopPID(pid int)
func GlobalAgentsHandlerForTest ¶ added in v2026.1010.0
func GlobalAgentsHandlerForTest() http.HandlerFunc
GlobalAgentsHandlerForTest exposes the handler to tests in test/.
func HandleNetworkInterfaces ¶ added in v2026.1030.0
func HandleNetworkInterfaces(w http.ResponseWriter, r *http.Request)
func MessageToolWallSecondsForTest ¶ added in v2026.1021.0
func NotificationsHandlerForTest ¶ added in v2026.1011.0
func NotificationsHandlerForTest() http.HandlerFunc
func PrepareGUIDependencies ¶ added in v2026.1017.2
PrepareGUIDependencies installs the frontend toolchain before activation.
func PrepareGUIWorkspace ¶ added in v2026.1017.2
PrepareGUIWorkspace reuses GUI sources or initializes an empty chosen folder.
func QuotaErrorFromBodyForTest ¶ added in v2026.924.0
func ReportHandlerForTest ¶ added in v2026.1020.0
func ReportHandlerForTest() http.HandlerFunc
func RunningVersion ¶ added in v2026.1009.0
func RunningVersion() string
func SetReportDestinationForTest ¶ added in v2026.1020.0
func SetReportDestinationForTest(destination string) func()
func SlashChatOutputForTest ¶ added in v2026.1011.0
func StartViteForTest ¶ added in v2026.1017.2
func StopViteForTest ¶ added in v2026.1017.2
func ViteCommandForTest ¶ added in v2026.1015.0
ViteCommandForTest exposes the dev launcher without starting the daemon.
func WaitForShutdown ¶ added in v2026.1023.0
WaitForShutdown waits until cleanup has released the daemon lock. HTTP shutdown and removal of state alone do not mean a replacement can start.
Types ¶
type BackgroundAPIForTest ¶ added in v2026.1015.0
type BackgroundAPIForTest struct {
// contains filtered or unexported fields
}
BackgroundAPIForTest allows power-management tests to use fake inhibitors.
func NewBackgroundAPIForTest ¶ added in v2026.1015.0
func NewBackgroundAPIForTest(acquire func() (func(), error), save func(bool) error) *BackgroundAPIForTest
func (*BackgroundAPIForTest) Close ¶ added in v2026.1015.0
func (a *BackgroundAPIForTest) Close()
func (*BackgroundAPIForTest) Enabled ¶ added in v2026.1015.0
func (a *BackgroundAPIForTest) Enabled() bool
func (*BackgroundAPIForTest) ServeHTTP ¶ added in v2026.1015.0
func (a *BackgroundAPIForTest) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ChatMessageSnapshotForTest ¶ added in v2026.1021.0
type DevelopmentFrontendForTest ¶ added in v2026.1017.2
type DevelopmentFrontendForTest struct {
// contains filtered or unexported fields
}
func NewDevelopmentFrontendForTest ¶ added in v2026.1017.2
func NewDevelopmentFrontendForTest(state State, handler http.Handler) *DevelopmentFrontendForTest
func (*DevelopmentFrontendForTest) Close ¶ added in v2026.1017.2
func (d *DevelopmentFrontendForTest) Close()
func (*DevelopmentFrontendForTest) ServeHTTP ¶ added in v2026.1017.2
func (d *DevelopmentFrontendForTest) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*DevelopmentFrontendForTest) Snapshot ¶ added in v2026.1017.2
func (d *DevelopmentFrontendForTest) Snapshot() State
type Health ¶ added in v2026.909.0
type QuotaBarForTest ¶ added in v2026.924.0
QuotaBarForTest is a narrow test view of a provider quota bar.
func QuotaBarsForTest ¶ added in v2026.924.0
func QuotaBarsForTest(payload any, kind string) []QuotaBarForTest
QuotaBarsForTest exposes the pure parser to external package tests.
type ReachableAddress ¶ added in v2026.909.0
type ReachableAddress struct {
Kind string `json:"kind"`
Interface string `json:"interface,omitempty"`
URL string `json:"url"`
}
func TailscaleMagicDNSAddressForTest ¶ added in v2026.1011.0
func TailscaleMagicDNSAddressForTest(addresses []ReachableAddress, port int, data []byte) (ReachableAddress, bool)
TailscaleMagicDNSAddressForTest exposes status parsing to tests in test/.
type State ¶ added in v2026.909.0
type State struct {
PIDIdentity string `json:"pid_identity,omitempty"`
ViteIdentity string `json:"vite_identity,omitempty"`
Home string `json:"home,omitempty"`
PID int `json:"pid"`
URL string `json:"url"`
LocalURL string `json:"localhost_url"`
Addresses []ReachableAddress `json:"addresses,omitempty"`
StartedAt time.Time `json:"started_at"`
Version string `json:"version"`
Commit string `json:"commit,omitempty"`
CommitTime time.Time `json:"commit_time,omitempty"`
SourceTree string `json:"source_tree,omitempty"`
Mode string `json:"mode"`
Vite string `json:"vite"`
ViteURL string `json:"vite_url,omitempty"`
VitePID int `json:"vite_pid,omitempty"`
DevDir string `json:"dev_directory,omitempty"`
GOOS string `json:"goos"`
GoVersion string `json:"go_version"`
}
func EnsureRunning ¶ added in v2026.1003.0
EnsureRunning reuses a healthy local daemon or starts it through the CLI. cliPath must point to solomon, since the daemon also launches CLI PTY children.
func LoadRunningState ¶ added in v2026.1009.3
LoadRunningState recovers lost startup metadata from the configured local daemon. A home match prevents one installation from adopting another's daemon.
type UpdateAPIForTest ¶ added in v2026.1010.0
type UpdateAPIForTest struct {
// contains filtered or unexported fields
}
UpdateAPIForTest provides controlled dependencies and synchronized state access for the external update API tests.
func NewUpdateAPIForTest ¶ added in v2026.1010.0
func NewUpdateAPIForTest(ctx context.Context, build State) *UpdateAPIForTest
func (*UpdateAPIForTest) ServeHTTP ¶ added in v2026.1010.0
func (a *UpdateAPIForTest) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*UpdateAPIForTest) SetCheck ¶ added in v2026.1010.0
func (a *UpdateAPIForTest) SetCheck(check func(context.Context) updater.CheckResult)
func (*UpdateAPIForTest) SetLaunch ¶ added in v2026.1010.0
func (a *UpdateAPIForTest) SetLaunch(launch func(string, string, string) error)
func (*UpdateAPIForTest) SetPrepare ¶ added in v2026.1010.0
func (*UpdateAPIForTest) SetStatus ¶ added in v2026.1010.0
func (a *UpdateAPIForTest) SetStatus(phase, latest, staged string)
func (*UpdateAPIForTest) Status ¶ added in v2026.1010.0
func (a *UpdateAPIForTest) Status() (phase, message string)
Source Files
¶
- active_agents_api.go
- addresses.go
- api_test_support.go
- attachments.go
- background_api.go
- browser.go
- chat_api.go
- client.go
- customization_api.go
- customization_mcp.go
- customization_prompt_templates.go
- customization_roles.go
- customization_rules.go
- customization_subagents.go
- desktop_proxy.go
- development.go
- disconnect.go
- events.go
- file_changes_testexport.go
- frontend.go
- gui_settings_api.go
- listener_unix.go
- messages.go
- model_api.go
- models.go
- mutations.go
- network_api.go
- notifications_api.go
- process_unix.go
- project_api.go
- project_command_api.go
- project_commit.go
- project_file_operations.go
- prompting.go
- provider_quota.go
- provider_quota_parse.go
- provider_quota_reset.go
- report_api.go
- routing.go
- service.go
- shutdown.go
- slash_api.go
- sleep_inhibitor_linux.go
- source_format_api.go
- tailscale_addresses.go
- terminal.go
- terminal_api.go
- terminal_process.go
- terminal_process_unix.go
- toolcalls.go
- update_api.go
- vite_containment_unix.go
- vite_supervisor.go