Documentation
¶
Overview ¶
Package gui is the backend of the hopsesh desktop app (Wails v3). The frontend in assets/ calls these methods; every use case is the app layer's, as for the command line.
Index ¶
- Constants
- Variables
- func CLIReady(st integrate.CLIStatus) bool
- func LimitMemory()
- func LinkArg(args []string) string
- func SetAppHook(f func(name string, command agent.Command) error)
- func SetLinkHook(f func(url string))
- func SetListMenu(f func(groupBy, sortBy string, compact bool))
- func SetRevealHook(f func(path string) error)
- func SetStepProgram(path string)
- func SetTerminal(f func(line string) error)
- func SetViewMenu(f func(sidebar, inspector bool))
- type AbilityDTO
- type AccountDTO
- type AccountsViewDTO
- type ActivityDTO
- type ActivityListDTO
- type AgentCloudDTO
- type AgentDTO
- type AgentKindDTO
- type AgentOpt
- type App
- func (a *App) AccountDestinations(machine, id string) []agent.RuntimeProfile
- func (a *App) Accounts() ([]AccountDTO, error)
- func (a *App) AccountsView() (*AccountsViewDTO, error)
- func (a *App) Activity() (*ActivityListDTO, error)
- func (a *App) AddAccountFolder(machine, id, name string, tags []string, command bool) (agent.RuntimeProfile, error)
- func (a *App) AddCLIToPath() (string, error)
- func (a *App) AddHost(name, destination string, password, remember bool) error
- func (a *App) AdoptStatus(journal string) (*BroughtDTO, error)
- func (a *App) AlignHere() (*app.MachineSetup, error)
- func (a *App) Appearance() string
- func (a *App) Apply() (*DoneDTO, error)
- func (a *App) ApplyHandoff() (*HandedOffDTO, error)
- func (a *App) ApplyHop() (*HopDoneDTO, error)
- func (a *App) ArchiveLineage(machine, key string) error
- func (a *App) AssociateShell(id, machine, key string) error
- func (a *App) AttachAppearance()
- func (a *App) AttachDesktop(main *application.WebviewWindow)
- func (a *App) Bootstrap() Info
- func (a *App) CachedScan() *ScanDTO
- func (a *App) CancelChangeDir()
- func (a *App) CancelPassword(id string)
- func (a *App) CancelScan()
- func (a *App) ChangeDir() (string, error)
- func (a *App) CheckUpdate() (*UpdateDTO, error)
- func (a *App) Checkouts() []CheckoutDTO
- func (a *App) ChooseFolder(title string) (string, error)
- func (a *App) CleanupBranches() []app.BranchCandidate
- func (a *App) ClosePlan()
- func (a *App) Companion() app.Companion
- func (a *App) ContinueHop(journal string) (*HopDoneDTO, error)
- func (a *App) ContinueOnMachine(machine, key string) (*OpenedDTO, error)
- func (a *App) ContinueOriginalAnyway(machine, key string) (*OpenedDTO, error)
- func (a *App) CopyText(text string) bool
- func (a *App) DeleteBranches(ids []string) (*app.CleanupResult, error)
- func (a *App) DesktopSettings() desktop.State
- func (a *App) DirSuggestions(machine, key string) []string
- func (a *App) DismissCLIOffer() error
- func (a *App) DismissMachineNotice(fingerprint string) error
- func (a *App) DismissProtection(fingerprint string) error
- func (a *App) DismissSetup() error
- func (a *App) DismissSkillOffer() error
- func (a *App) EditAccount(id, name string, tags []string, generation int) error
- func (a *App) EndReturnDestination(token string) error
- func (a *App) EntryTab(machine, key string) (*TabDTO, error)
- func (a *App) ExternalExits() []ExternalExitDTO
- func (a *App) FollowOnPhone(machine, key string) error
- func (a *App) FollowUp(cloud, id, text string) (*agent.CloudSession, error)
- func (a *App) ForgetAccount(id string, generation int) error
- func (a *App) ForgetPassword(name string) error
- func (a *App) ForgetReopen()
- func (a *App) HandoffDefaults(cloud string) HandoffDefaultsDTO
- func (a *App) HandoffPasteLink(link string) error
- func (a *App) HandoffStep() *HandoffStepDTO
- func (a *App) HandoffStopWaiting()
- func (a *App) HistorySettings() HistorySettingsDTO
- func (a *App) HookHealth(force bool) (HookHealthDTO, error)
- func (a *App) Info() Info
- func (a *App) InitialScan() (*ScanDTO, error)
- func (a *App) InstallCLI(force bool) (integrate.CLIStatus, error)
- func (a *App) InstallNoticeHooks(id, profile string) ([]app.MovementHookStatus, error)
- func (a *App) InstallSkill(force, addRules bool) (app.SkillReport, error)
- func (a *App) InstallUpdate() error
- func (a *App) KeepPartial(journal string) error
- func (a *App) LatestRelease() (*UpdateDTO, error)
- func (a *App) LoginAccount(id string) (*OpenedDTO, error)
- func (a *App) MachineNotices() []MachineNoticeDTO
- func (a *App) MachineScans() map[string]MachineScan
- func (a *App) MachineStatuses(refresh bool) []app.MachineStatus
- func (a *App) Machines() MachinesDTO
- func (a *App) MainClosing() (cancel, hide bool)
- func (a *App) MoveAccountFolders() ([]app.FolderMove, error)
- func (a *App) MoveTargets(machine, key string) ([]TargetDTO, error)
- func (a *App) NewSessionOn(machine string, id agent.ID, profile, dir string) (*OpenedDTO, error)
- func (a *App) NoticeHooks() ([]app.MovementHookStatus, error)
- func (a *App) OpenAgentApp(id string) (string, error)
- func (a *App) OpenBrought(journal, where string) (*OpenedDTO, error)
- func (a *App) OpenCompanionPage() error
- func (a *App) OpenConversationLink(raw string) error
- func (a *App) OpenHop(journal string) error
- func (a *App) OpenLink(raw string) error
- func (a *App) OpenLocalNetworkSettings() error
- func (a *App) OpenOnMachine(machine, key string) (*OpenedDTO, error)
- func (a *App) OpenResult(where string) (*OpenedDTO, error)
- func (a *App) OpenShell(machine, key string) (*OpenedDTO, error)
- func (a *App) OpenURL(url string) error
- func (a *App) PasteCloud(link, checkout string) (*PastedDTO, error)
- func (a *App) PendingPasswords() []PasswordRequest
- func (a *App) Plan(machine, key, target string, o OptsDTO) (*PlanDTO, error)
- func (a *App) PlanChangeDir(machine, key, dir string, otherRepo, stopLocal bool) (*DirPlanDTO, error)
- func (a *App) PlanHandoff(machine, key, cloud string, o HandoffOptsDTO) (*HandoffPlanDTO, error)
- func (a *App) PlanHop(machine, key, cloud string, o HandoffOptsDTO) (*HopPlanDTO, error)
- func (a *App) PlanPicked(cloud, id, checkout, target string, o OptsDTO) (*PlanDTO, error)
- func (a *App) PlanUpdate(name string) (*app.UpdatePlan, error)
- func (a *App) Presence() (*PresenceDTO, error)
- func (a *App) Preview(machine, key string, n int) (*PreviewDTO, error)
- func (a *App) ProtectionAll() []ProtectionRowDTO
- func (a *App) ProvidePassword(id, password string, remember bool) error
- func (a *App) PushApply() (*DoneDTO, error)
- func (a *App) PushPlan(key, machine, target string, o OptsDTO) (*PlanDTO, error)
- func (a *App) QuickClose()
- func (a *App) QuickOpen(screen, machine, key string) error
- func (a *App) QuickPreview(machine, key string) (*PreviewDTO, error)
- func (a *App) QuickQuit()
- func (a *App) QuickRefresh()
- func (a *App) QuickShow() error
- func (a *App) QuickSnapshot() QuickDTO
- func (a *App) QuitAndEnd()
- func (a *App) RecheckDesktop() desktop.State
- func (a *App) RefreshAccount(id string) (agent.RuntimeProfile, error)
- func (a *App) RefreshHere() (*ScanDTO, error)
- func (a *App) RegisterAccount(machine, id, name, root string, tags []string) (agent.RuntimeProfile, error)
- func (a *App) ReleaseOriginal(machine, key string) error
- func (a *App) RemoteDefaults(machine string) (*app.RemoteDefaults, error)
- func (a *App) RemoveHost(name string) error
- func (a *App) RemoveNoticeHooks(id, profile string) ([]app.MovementHookStatus, error)
- func (a *App) RemoveSkill(force bool) (app.SkillReport, error)
- func (a *App) Rename(machine, key, title string) error
- func (a *App) RenameFamily(id, name string) error
- func (a *App) Reopen() (*ReopenedDTO, error)
- func (a *App) ReopenOffer() *ReopenDTO
- func (a *App) ResolveEntry(machine, key string) (*EntryDTO, error)
- func (a *App) RestoreBlock(machine, key string) error
- func (a *App) ResumeCommand(machine, key string) (string, error)
- func (a *App) ResumeEntry(machine, key string, inApp bool) error
- func (a *App) ResumeSession(machine, key, where string) (*OpenedDTO, error)
- func (a *App) RetryLocalNetwork()
- func (a *App) RetryReceipts(id string) error
- func (a *App) Reveal(path string) error
- func (a *App) RevealEntry(machine, key string) error
- func (a *App) SaveDesktop(in DesktopInput) error
- func (a *App) SaveLayout(l LayoutDTO) error
- func (a *App) SaveList(d ListDTO) error
- func (a *App) SaveSettings(in SettingsInput) error
- func (a *App) Scan() (*ScanDTO, error)
- func (a *App) ScanAccounts() (*ScanDTO, error)
- func (a *App) ScanKeys(name string) (*KeysDTO, error)
- func (a *App) ScanMachine(name string) error
- func (a *App) ScanSnapshot() *ScanDTO
- func (a *App) SessionLink(machine, key string) (string, error)
- func (a *App) SetAgent(id string, enabled, remoteControl, imp bool) error
- func (a *App) SetAgentKind(id, kind string, show bool) error
- func (a *App) SetAllowed(name, destination string, allowed bool) error
- func (a *App) SetAuth(name, auth string, remember bool) error
- func (a *App) SetCloudAllowed(name string, allowed bool) error
- func (a *App) SetCloudEnvironment(name, repo, env string) error
- func (a *App) SetHistorySettings(in config.History) error
- func (a *App) SetPlace(agentID, place string) error
- func (a *App) SetPreviews(on bool) error
- func (a *App) SetReceive(on bool) error
- func (a *App) SetRemoteDefault(machine string, on bool) (*app.RemoteDefaults, error)
- func (a *App) SetReposDir(dir string) error
- func (a *App) SetTerminalApps(appID, resume string) error
- func (a *App) SetTerminalSettings(in TerminalSettingsInput) error
- func (a *App) SetUpMachine(name string) (*app.MachineSetup, error)
- func (a *App) SetUpProtection(machine string, rules bool) (*app.Protection, error)
- func (a *App) SetUpdateCheck(on bool) error
- func (a *App) Settings() SettingsDTO
- func (a *App) SetupKeyLogin(name string, createKey bool) (*KeyLoginDTO, error)
- func (a *App) ShouldQuit() bool
- func (a *App) ShowApp(machine, key string) (string, error)
- func (a *App) ShowEntry(machine, key string) (string, error)
- func (a *App) ShowPlace(name string) error
- func (a *App) Shutdown()
- func (a *App) SignIn(cloud, where string) (*OpenedDTO, error)
- func (a *App) SignInOn(machine string, id agent.ID, profile string, atScreen bool) (*OpenedDTO, error)
- func (a *App) SkillPreview() (string, error)
- func (a *App) StartAtLogin() error
- func (a *App) StartFresh(newer bool) (string, error)
- func (a *App) TakeQuickRoute() *QuickRoute
- func (a *App) TerminalApps() TerminalAppsDTO
- func (a *App) TerminalCloseTab(id string) error
- func (a *App) TerminalFocus(id string) error
- func (a *App) TerminalOpenElsewhere(id string) error
- func (a *App) TerminalPlacement(placement string) error
- func (a *App) TerminalRunning() int
- func (a *App) TerminalSettings() TerminalSettingsDTO
- func (a *App) TerminalShow()
- func (a *App) TerminalTabs() []TermTab
- func (a *App) TerminalWorkspace() (TerminalWorkspaceDTO, error)
- func (a *App) TerminalWorkspaceVisible(visible bool)
- func (a *App) TestCloud(name string) (*CloudTestDTO, error)
- func (a *App) TrustHost(name string) error
- func (a *App) TurnOnRemoteControl(machine, key string) error
- func (a *App) Undo(journal string, force bool) error
- func (a *App) UndoLast() (string, error)
- func (a *App) UninstallCLI() (integrate.CLIStatus, error)
- func (a *App) ViewState(sidebar, inspector bool)
- func (a *App) WaitChangedDir(seconds int) error
- type BroughtDTO
- type CanDTO
- type CellDTO
- type CheckoutDTO
- type CloudDTO
- type CloudEntryDTO
- type CloudTestDTO
- type ContinueDTO
- type CopyDTO
- type CountDTO
- type DesktopInput
- type DesktopShell
- type DirPlanDTO
- type DoneDTO
- type EntryDTO
- type ExternalExitDTO
- type FilterDTO
- type FolderDTO
- type FoundRow
- type GroupDTO
- type GuardDTO
- type HandedOffDTO
- type HandoffActivityDTO
- type HandoffDefaultsDTO
- type HandoffOptsDTO
- type HandoffPlanDTO
- type HandoffStepDTO
- type HereDTO
- type HistorySettingsDTO
- type HookHealthDTO
- type HookProblem
- type HopDTO
- type HopDoneDTO
- type HopPlanDTO
- type Info
- type KeyLoginDTO
- type KeysDTO
- type LayoutDTO
- type ListDTO
- type LiveDTO
- type MachineDTO
- type MachineNoticeDTO
- type MachineRow
- type MachineScan
- type MachineSetupStep
- type MachinesDTO
- type MirrorDTO
- type NoteDTO
- type OpenedDTO
- type Option
- type OptsDTO
- type PasswordRequest
- type PastedDTO
- type PersonDTO
- type PlaceDTO
- type PlanDTO
- type PresenceDTO
- type PreviewDTO
- type PreviewItemDTO
- type ProtectionRowDTO
- type QuickDTO
- type QuickRoute
- type ReopenDTO
- type ReopenTab
- type ReopenedDTO
- type ScanDTO
- type SettingsDTO
- type SettingsInput
- type SignInDTO
- type SignedInDTO
- type TabDTO
- type TabMeta
- type TabSetup
- type TargetDTO
- type TermPrefs
- type TermTab
- type TerminalAppNotice
- type TerminalAppsDTO
- type TerminalSettingsDTO
- type TerminalSettingsInput
- type TerminalWorkspaceDTO
- type Terminals
- func (t *Terminals) Attach(app *application.App)
- func (t *Terminals) CloseAll()
- func (t *Terminals) Focus(id string)
- func (t *Terminals) Gate(next http.Handler) http.Handler
- func (t *Terminals) Manager() *pty.Manager
- func (t *Terminals) Open(spec pty.Spec, setup TabSetup) (pty.Info, error)
- func (t *Terminals) Privileged(w *application.WebviewWindow)
- func (t *Terminals) Refresh()
- func (t *Terminals) ServeList(c pty.Conn)
- func (t *Terminals) ServeTab(c pty.Conn)
- func (t *Terminals) Show()
- func (t *Terminals) ShowMain()
- func (t *Terminals) Tabs() []TermTab
- func (t *Terminals) Toggle()
- func (t *Terminals) WindowOpen() bool
- type ToolRowDTO
- type UpdateDTO
Constants ¶
const ( ToolClaudeTerminal = "claude-terminal" ToolClaudeDesktop = "claude-desktop" ToolCodexTerminal = "codex-terminal" ToolCodexApp = "codex-app" )
Tools (CellDTO.Tool), the grid's columns.
const ( WhereHere = config.ResumeHere // a tab in the hopsesh Terminal window WhereTerminal = config.ResumeTerminal // the user's terminal app // WhereShown: the session runs in a tab already, which is now in front. WhereShown = "shown" )
Where an entry point opens.
const ( TerminalStream = "hopsesh.terminal" TerminalTabsStream = "hopsesh.terminal.tabs" // TerminalEvent carries a tab's TermTab (State "" once it is gone) to the app's window, // for its chips and counts. TerminalEvent = "hopsesh:terminal" // QuitEvent asks the app's window to confirm quitting while programs run in tabs. QuitEvent = "hopsesh:quit" // SignedInEvent: a sign-in tab ended with code 0, and hopsesh checked the login again // (a SignedInDTO). SignedInEvent = "hopsesh:signed-in" // TerminalPage is where the terminal window's page is. TerminalPage = "/terminal/" // TerminalTitle is the terminal window's title. TerminalTitle = "hopsesh Terminal" )
Stream and event names, and where the terminal page is.
const ( TabSession = "session" // a session resumed here TabStep = "step" // a hand-off's driver step (claude --cloud) TabBring = "bring" // a bring-back's teleport (claude --teleport) TabSignIn = "signin" // a vendor's sign-in: nothing recorded TabShell = "shell" // the user's login shell: nothing recorded // TabRemote shows a terminal hopsesh runs on another machine (Machine): a session // continued there (Key), a new one, or a sign-in there. Closing the tab here leaves it // running there. TabRemote = "remote" )
What a tab is for (TabMeta.Kind).
const AccountEvent = "hopsesh:accounts"
const AppearanceEvent = "hopsesh:appearance"
const DiscoveryEvent = "hopsesh:discovery"
const ErrCLIRequired = "cli-required: "
ErrCLIRequired starts the error the window shows as "install the command first": the skill tells agents to run hopsesh, and the protection hooks run it, so both need it.
const ExternalExitEvent = "hopsesh:external-exit"
ExternalExitEvent carries an ExternalExitDTO to the window.
const MachineSetupEvent = "hopsesh:machine-setup"
MachineSetupEvent tells the window each step of setting hopsesh up on a machine.
const MemoryLimit = 384 << 20
MemoryLimit keeps the desktop app's resident memory near what it uses: Go's collector otherwise lets the heap grow to twice the live data before collecting, so one large session read left hundreds of megabytes resident. It costs nothing while idle.
const MenuEvent = "hopsesh:menu"
MenuEvent carries a menu-bar command to the window ("palette", "refresh", "sessions", "activity", "machines", "settings", "undo-last").
const PasswordEvent = "hopsesh:password"
PasswordEvent is the event the window gets when ssh asks for a machine's password.
const ProgressEvent = "hopsesh:progress"
ProgressEvent carries the steps of a move or continuation to the window.
const QuickEvent = "hopsesh:quick"
const QuickRouteEvent = "hopsesh:quick-route"
const TerminalAppEvent = "hopsesh:terminal-app"
TerminalAppEvent tells the window that a launch opened in another terminal than the chosen one (TerminalAppNotice), so it can say so.
const TerminalCSP = "" /* 210-byte string literal not displayed */
TerminalCSP keeps the terminal page to its own scripts, and its requests to the app's asset server (the streams): no inline script, no other origin, no frames, no forms, no plugins. Styles may be inline because xterm.js writes its scrollbar's and its DOM renderer's rules into <style> elements it makes; the page's own markup never carries a program's text as anything but text.
const TerminalPreferencesEvent = "hopsesh:terminal-preferences"
TerminalPreferencesEvent synchronizes Settings with the terminal menu.
const TerminalWorkspaceEvent = "hopsesh:terminal-workspace"
Variables ¶
var Assets embed.FS
Assets is the frontend (plain HTML, CSS and JS; no build step).
Functions ¶
func CLIReady ¶ added in v0.4.2
CLIReady reports whether the hopsesh command is installed where the skill and hooks can run it (a link to this or another copy of the app, or a separate install).
func LimitMemory ¶ added in v0.4.4
func LimitMemory()
LimitMemory applies MemoryLimit unless GOMEMLIMIT sets one.
func LinkArg ¶ added in v0.8.0
LinkArg is a hopsesh:// link among a program's arguments (Windows passes the link a second launch was opened with), "" when there is none.
func SetAppHook ¶ added in v0.4.0
SetAppHook sends every desktop app ShowApp would bring forward to f instead (tests: the machine running them may have the real app).
func SetLinkHook ¶ added in v0.4.0
func SetLinkHook(f func(url string))
SetLinkHook sends every link a tab asks to open to f instead of the dialog (tests).
func SetListMenu ¶ added in v0.4.0
SetListMenu is how the app's View menu learns the list's grouping, sorting and rows.
func SetRevealHook ¶ added in v0.4.0
SetRevealHook sends every path RevealEntry would show to f instead (tests).
func SetStepProgram ¶ added in v0.4.0
func SetStepProgram(path string)
SetStepProgram sets the program the terminal runs for a step (the browser tests: their own, which carries the command line).
func SetTerminal ¶ added in v0.4.0
SetTerminal replaces the user's terminal app with one that runs each launch's line (hopsesh's verb on a ticket, in the launch's folder) with f: the browser tests run it in the background, as a terminal would.
func SetViewMenu ¶ added in v0.4.0
func SetViewMenu(f func(sidebar, inspector bool))
SetViewMenu is how the app's View menu learns what the window shows.
Types ¶
type AbilityDTO ¶ added in v0.5.0
AbilityDTO is one thing hopsesh can (or cannot) do on a machine.
type AccountDTO ¶ added in v0.4.0
type AccountDTO struct {
agent.RuntimeProfile
Machine string `json:"machine"`
Local bool `json:"local"`
Stale bool `json:"stale"`
}
type AccountsViewDTO ¶ added in v0.5.0
type AccountsViewDTO struct {
People []PersonDTO `json:"people"`
Machines []ToolRowDTO `json:"machines"`
Folders []FolderDTO `json:"folders"`
Notes []NoteDTO `json:"notes"`
Move []app.FolderMove `json:"move"`
Profiles []AccountDTO `json:"profiles"`
}
AccountsViewDTO is the Accounts screen: the accounts you use, who each tool is signed in as on every machine, and the folders sessions are kept in.
type ActivityDTO ¶
type ActivityDTO struct {
PendingReceipt bool `json:"pendingReceipt"`
ID string `json:"id"`
Kind string `json:"kind"` // move | continue | push | fetch | handoff | hop | …
Title string `json:"title"`
When string `json:"when"` // RFC 3339
Changes int `json:"changes"`
Remote []string `json:"remote"` // other machines whose part it undoes too
CanUndo bool `json:"canUndo"`
Undone bool `json:"undone"`
Why string `json:"why,omitempty"` // why it cannot be undone now
// Left are the clones its undo left in place, with why (journal.Journal.Left).
Left []string `json:"left,omitempty"`
// Fetch is what a fetch from a cloud brought (kind fetch).
Fetch *BroughtDTO `json:"fetch,omitempty"`
// Handoff is where a hand-off went (kind handoff).
Handoff *HandoffActivityDTO `json:"handoff,omitempty"`
// Part: a leg of a hop, undone with it (PartOf); Parts, a hop's legs.
Part bool `json:"part,omitempty"`
PartOf string `json:"partOf,omitempty"`
Parts []string `json:"parts,omitempty"`
// Hop is a hop from one cloud to another (kind hop).
Hop *move.HopResult `json:"hop,omitempty"`
}
ActivityDTO is one operation in the Activity list.
type ActivityListDTO ¶
type ActivityListDTO struct {
Items []ActivityDTO `json:"items"`
// Waiting are fetches whose copy the agent's own command has not written yet.
Waiting []BroughtDTO `json:"waiting"`
}
ActivityListDTO is the Activity screen.
type AgentCloudDTO ¶ added in v0.4.0
type AgentCloudDTO struct {
Name string `json:"name"`
Title string `json:"title"`
Capabilities []agent.Capability `json:"capabilities"`
Partial bool `json:"partial"`
Fidelity string `json:"fidelity"` // what comes back of a conversation
}
AgentCloudDTO is one of an agent's clouds in Settings: the cloud capabilities its module has (cloud-list, cloud-fetch, …), and whether its listing is partial.
type AgentDTO ¶
type AgentDTO struct {
ID agent.ID `json:"id"`
Name string `json:"name"`
Stability agent.Stability `json:"stability"`
Enabled bool `json:"enabled"`
RemoteControl bool `json:"remoteControl"`
Import bool `json:"import"` // continued sessions go through its own importer
Version string `json:"version"` // installed here ("" when not)
Folder string `json:"folder"` // its data folder here
Tested []string `json:"tested"`
Capabilities []agent.Capability `json:"capabilities"`
Icon string `json:"icon,omitempty"` // a data URL: the installed app's icon or the module's mark ("": initials)
// Clouds are the vendor clouds the agent reaches, with what hopsesh can do there.
Clouds []AgentCloudDTO `json:"clouds"`
// Runtime is "app" when the agent runs from its desktop app's bundled runtime here.
Runtime string `json:"runtime,omitempty"`
// Kinds are sessions hidden unless shown (voice conversations, Work threads).
Kinds []AgentKindDTO `json:"kinds"`
}
AgentDTO is one agent module.
type AgentKindDTO ¶ added in v0.5.0
type AgentKindDTO struct {
ID string `json:"id"`
Name string `json:"name"`
Note string `json:"note"`
Shown bool `json:"shown"`
}
AgentKindDTO is a kind of session hidden by default, and whether the user shows it.
type AgentOpt ¶
type AgentOpt struct {
ID agent.ID `json:"id"`
Name string `json:"name"`
Experimental bool `json:"experimental,omitempty"`
}
AgentOpt is an agent a session can continue in here.
type App ¶
type App struct {
Desktop DesktopShell `json:"-"`
// Wails is the running application (events, clipboard, dialogs).
Wails *application.App `json:"-"`
// Terms are the terminal's tabs and window (not bound to the window: see terminal.go).
Terms *Terminals `json:"-"`
// Emitter takes the window's events when there is no Wails app (the browser tests).
Emitter func(name string, data any) `json:"-"`
// contains filtered or unexported fields
}
App is the service bound to the frontend.
func NewApp ¶
NewApp loads the configuration for the modules in reg. A configuration an older hopsesh wrote is reported by Info, not returned: the window offers to start fresh.
func (*App) AccountDestinations ¶ added in v0.4.0
func (a *App) AccountDestinations(machine, id string) []agent.RuntimeProfile
AccountDestinations returns only present profiles on a scanned destination.
func (*App) Accounts ¶ added in v0.4.0
func (a *App) Accounts() ([]AccountDTO, error)
func (*App) AccountsView ¶ added in v0.5.0
func (a *App) AccountsView() (*AccountsViewDTO, error)
AccountsView builds the Accounts screen from the last scan and the account registry.
func (*App) Activity ¶
func (a *App) Activity() (*ActivityListDTO, error)
Activity lists what hopsesh did, newest first.
func (*App) AddAccountFolder ¶ added in v0.5.0
func (a *App) AddAccountFolder(machine, id, name string, tags []string, command bool) (agent.RuntimeProfile, error)
AddAccountFolder makes a new account folder on a machine, ready to sign in.
func (*App) AddCLIToPath ¶
AddCLIToPath adds ~/.local/bin to the login shell's PATH (only on the user's click).
func (*App) AddHost ¶
AddHost adds and allows a machine by ssh destination. password: it logs in with a password (asked for when hopsesh connects; remember keeps it in the Keychain).
func (*App) AdoptStatus ¶ added in v0.4.0
func (a *App) AdoptStatus(journal string) (*BroughtDTO, error)
AdoptStatus looks for the copy the agent's own command wrote for a fetch, adopts it once it is there, and says where it stands (the done screen's wait).
func (*App) AlignHere ¶ added in v0.7.0
func (a *App) AlignHere() (*app.MachineSetup, error)
AlignHere brings this machine's other copies of hopsesh to this version, after the user asked; each step is told as it happens (as the machine's own setup).
func (*App) Appearance ¶ added in v0.4.0
Appearance is a cheap startup read, independent of agent/integration discovery.
func (*App) ApplyHandoff ¶ added in v0.4.0
func (a *App) ApplyHandoff() (*HandedOffDTO, error)
ApplyHandoff carries out the last hand-off plan, sending each step to the window. A step that fails is reported in the result (with what had happened by then), not as an error.
func (*App) ApplyHop ¶ added in v0.4.0
func (a *App) ApplyHop() (*HopDoneDTO, error)
ApplyHop carries out the last hop plan. When its first leg needs the user's terminal, it opens it there and returns waiting: the window then asks ContinueHop until the copy is here and handed on.
func (*App) ArchiveLineage ¶ added in v0.4.0
func (*App) AssociateShell ¶ added in v0.4.0
AssociateShell organizes a shell with a selected conversation. It does not claim that the shell runs the agent or write a historical lineage edge.
func (*App) AttachAppearance ¶ added in v0.4.0
func (a *App) AttachAppearance()
AttachAppearance applies the saved native preference once AppKit is running. System removes the override; subsequent OS changes need no saved config writes.
func (*App) AttachDesktop ¶ added in v0.4.0
func (a *App) AttachDesktop(main *application.WebviewWindow)
AttachDesktop installs the native shell. The popup uses the same trusted asset and service boundary as the main window; terminal windows remain isolated.
func (*App) Bootstrap ¶ added in v0.4.1
Bootstrap is configuration-only: integration checks cannot hold first paint.
func (*App) CachedScan ¶ added in v0.4.1
CachedScan has no agent, SSH, git, or presence probes. A cache failure falls back to an empty usable screen; the normal scan repairs its read model.
func (*App) CancelChangeDir ¶ added in v0.6.3
func (a *App) CancelChangeDir()
CancelChangeDir stops waiting and forgets the planned change.
func (*App) CancelPassword ¶
CancelPassword declines a password question; that machine is skipped this time.
func (*App) CancelScan ¶ added in v0.4.1
func (a *App) CancelScan()
func (*App) ChangeDir ¶ added in v0.6.3
ChangeDir makes the planned change and returns the journal (Activity undoes it).
func (*App) CheckUpdate ¶
CheckUpdate looks for a newer release, at most once a day, and only when allowed.
func (*App) Checkouts ¶ added in v0.4.0
func (a *App) Checkouts() []CheckoutDTO
Checkouts resolves local folders on demand, including sessions published before repository enrichment completes. It neither borrows transports nor starts a scan.
func (*App) ChooseFolder ¶
ChooseFolder asks for a directory.
func (*App) CleanupBranches ¶ added in v0.4.0
func (a *App) CleanupBranches() []app.BranchCandidate
CleanupBranches lists the branches hand-offs left on their remotes and whether hopsesh offers to delete each (it asks the remotes, read-only).
func (*App) ClosePlan ¶
func (a *App) ClosePlan()
ClosePlan drops the plan the window closed, and ends a send's connection.
func (*App) Companion ¶ added in v0.8.0
Companion is MyCNC Host on this machine, for the window's recommendation and its "Follow on your phone" action.
func (*App) ContinueHop ¶ added in v0.4.0
func (a *App) ContinueHop(journal string) (*HopDoneDTO, error)
ContinueHop takes a waiting hop on, once its copy is here (the window asks it while it waits).
func (*App) ContinueOnMachine ¶ added in v0.5.0
ContinueOnMachine continues a session where it is, on another machine: hopsesh in the login session there runs it (its sign-in works there), and a tab here shows it.
func (*App) ContinueOriginalAnyway ¶ added in v0.7.0
ContinueOriginalAnyway continues on its machine a copy a move left there, which the user confirmed: hopsesh there releases that copy (its hook stops refusing prompts) and runs it, and the release is kept here too, so the copy shows as released and its tab opens again after a restart. The copies then differ: moving back needs a comparison.
func (*App) DeleteBranches ¶ added in v0.4.0
func (a *App) DeleteBranches(ids []string) (*app.CleanupResult, error)
DeleteBranches deletes the merged branches the user picked, each with a lease; undo pushes them back.
func (*App) DesktopSettings ¶ added in v0.4.0
func (*App) DirSuggestions ¶ added in v0.6.3
DirSuggestions are the other checkouts of a session's repository on its machine (its worktrees and the folders of its other sessions there), for Change folder….
func (*App) DismissCLIOffer ¶
DismissCLIOffer stops the app from offering to link the command-line tool.
func (*App) DismissMachineNotice ¶ added in v0.5.0
DismissMachineNotice remembers "Not now" for a machine notice.
func (*App) DismissProtection ¶ added in v0.5.0
DismissProtection remembers "Not now" for this set of protection problems: the card comes back when the set changes (a new agent, a hook that stopped working).
func (*App) DismissSetup ¶ added in v0.4.0
DismissSetup stops the app from showing its "Finish setting up" line; each step stays in Machines and Settings.
func (*App) DismissSkillOffer ¶
DismissSkillOffer stops the app from offering the skill (it stays in Settings).
func (*App) EditAccount ¶ added in v0.4.0
func (*App) EndReturnDestination ¶ added in v0.4.2
EndReturnDestination consumes a review's one-use token. Invalidate the old plan before stopping, even on failure: an agent may save work as it exits. The window must request a fresh plan; this action cannot apply a transfer.
func (*App) EntryTab ¶ added in v0.4.0
EntryTab finds the tab a session on this machine runs in (nil: none hopsesh can show): one of the hopsesh Terminal window's, or one in the user's terminal app.
func (*App) ExternalExits ¶ added in v0.4.0
func (a *App) ExternalExits() []ExternalExitDTO
ExternalExits are the launches in the user's terminal app that ended since the app started (where that terminal could say).
func (*App) FollowOnPhone ¶ added in v0.8.0
FollowOnPhone opens a session in MyCNC on this machine, which shows it on the phone.
func (*App) FollowUp ¶ added in v0.4.0
func (a *App) FollowUp(cloud, id, text string) (*agent.CloudSession, error)
FollowUp sends a cloud session one message (it starts a turn there, on the user's plan).
func (*App) ForgetAccount ¶ added in v0.4.0
func (*App) ForgetPassword ¶
ForgetPassword removes a machine's remembered password (it is asked for again).
func (*App) ForgetReopen ¶ added in v0.7.0
func (a *App) ForgetReopen()
ForgetReopen drops the list (the user said not now).
func (*App) HandoffDefaults ¶ added in v0.4.0
func (a *App) HandoffDefaults(cloud string) HandoffDefaultsDTO
HandoffDefaults are a cloud's hand-off defaults.
func (*App) HandoffPasteLink ¶ added in v0.4.0
HandoffPasteLink gives the waiting hand-off the session's link the user pasted (the one Claude Code printed in the terminal).
func (*App) HandoffStep ¶ added in v0.4.0
func (a *App) HandoffStep() *HandoffStepDTO
HandoffStep is the terminal step the hand-off being applied waits for (nil: none).
func (*App) HandoffStopWaiting ¶ added in v0.4.0
func (a *App) HandoffStopWaiting()
HandoffStopWaiting ends the wait: the hand-off stops at its start step, and Undo removes what it did.
func (*App) HistorySettings ¶ added in v0.4.2
func (a *App) HistorySettings() HistorySettingsDTO
HistorySettings are Settings → History.
func (*App) HookHealth ¶ added in v0.4.2
func (a *App) HookHealth(force bool) (HookHealthDTO, error)
HookHealth checks the hopsesh command and every local protection hook, asking agents that review hooks (Codex) whether they trust them. force rechecks now; otherwise a check from the last five minutes is reused.
func (*App) InitialScan ¶ added in v0.4.0
InitialScan does not contact remote machines during a quiet login launch.
func (*App) InstallCLI ¶
InstallCLI links the hopsesh command into ~/.local/bin.
func (*App) InstallNoticeHooks ¶ added in v0.4.0
func (a *App) InstallNoticeHooks(id, profile string) ([]app.MovementHookStatus, error)
func (*App) InstallSkill ¶
func (a *App) InstallSkill(force, addRules bool) (app.SkillReport, error)
InstallSkill installs or updates the hopsesh skill in every installed agent, the same files in each; addRules also adds each agent's approval rules (read-only commands run without asking, moves always ask).
func (*App) InstallUpdate ¶
InstallUpdate downloads the newest release, verifies it (release signature and checksum; on macOS also the same Apple developer and notarization), installs it over this app, opens the new version and quits this one.
func (*App) KeepPartial ¶ added in v0.4.0
KeepPartial keeps a partial copy as it is.
func (*App) LatestRelease ¶ added in v0.4.0
LatestRelease is a user-requested check: always fetch now, regardless of the daily check's opt-in or cached result, and report failures to the window.
func (*App) LoginAccount ¶ added in v0.4.0
func (*App) MachineNotices ¶ added in v0.5.0
func (a *App) MachineNotices() []MachineNoticeDTO
MachineNotices are what another machine needs from the user, found by the last scan and the last check of its protection (rechecked in the background now and then). Notices the user answered "Not now" to stay hidden until their findings change.
func (*App) MachineScans ¶ added in v0.4.0
func (a *App) MachineScans() map[string]MachineScan
MachineScans is cheap to poll: unlike Machines it does no network discovery.
func (*App) MachineStatuses ¶ added in v0.6.2
func (a *App) MachineStatuses(refresh bool) []app.MachineStatus
MachineStatuses is what hopsesh can do on each scanned machine (app.MachineStatus): version against the newest, login session and receiving, command, hooks and skill. Hooks, skill and command are read again when older than ten minutes, or with refresh.
func (*App) Machines ¶
func (a *App) Machines() MachinesDTO
Machines lists this machine, the machines you added (with the last scan's findings) and the ones discovery found (connecting to none).
func (*App) MainClosing ¶ added in v0.4.0
MainClosing applies desktop close behavior, then the terminal-aware quit guard. The installed desktop shell keeps running by default, independently of icon placement.
func (*App) MoveAccountFolders ¶ added in v0.5.0
func (a *App) MoveAccountFolders() ([]app.FolderMove, error)
MoveAccountFolders moves account folders out of hopsesh's state folder (after asking).
func (*App) MoveTargets ¶ added in v0.5.0
MoveTargets lists where a session can continue: this machine and every machine with hopsesh, in each of the agent's folders there, in a terminal or the desktop app.
func (*App) NewSessionOn ¶ added in v0.5.0
NewSessionOn starts a new session of an agent on a machine, in a folder there, as the account of one of its folders ("" its default), and shows it in a tab here.
func (*App) NoticeHooks ¶ added in v0.4.0
func (a *App) NoticeHooks() ([]app.MovementHookStatus, error)
NoticeHooks reports local installation only. Vendor trust and actual delivery remain separate from an installed configuration file.
func (*App) OpenAgentApp ¶ added in v0.5.0
OpenAgentApp brings an agent's desktop app forward (to approve its hooks there).
func (*App) OpenBrought ¶ added in v0.4.0
OpenBrought opens a fetch's next command: the agent's own command while it waits (in a tab, unless the user chose their terminal app), the command that resumes the copy once it is here (as ResumeSession). where is as for ResumeSession.
func (*App) OpenCompanionPage ¶ added in v0.8.0
OpenCompanionPage opens MyCNC's page.
func (*App) OpenConversationLink ¶ added in v0.4.0
OpenConversationLink opens a clicked and confirmed transcript link. Keep this separate from OpenURL's allowlist for app-generated links.
func (*App) OpenHop ¶ added in v0.4.0
OpenHop opens a waiting hop's first-leg command in a terminal again.
func (*App) OpenLink ¶ added in v0.8.0
OpenLink shows the session a hopsesh:// link names (another app opened it). A link to a session hopsesh doesn't list yet opens the window on the sessions.
func (*App) OpenLocalNetworkSettings ¶
OpenLocalNetworkSettings opens System Settings at Privacy & Security, where the Local Network list is (macOS offers no link to the list itself).
func (*App) OpenOnMachine ¶ added in v0.5.0
OpenOnMachine continues a session on another machine that is not a row yet (one just sent there), by its key there, in a tab here. A copy a move left there is refused, as ContinueOnMachine refuses it.
func (*App) OpenResult ¶
OpenResult starts the session that was just moved or continued: in the agent's desktop app when that was chosen, otherwise in a tab of the hopsesh Terminal window or the user's terminal app (where as for ResumeSession). A bring-back still waiting for the agent's own command (claude --teleport) runs that command, in a tab unless the user chose their terminal app.
func (*App) OpenShell ¶ added in v0.4.0
OpenShell opens the user's login shell in a tab, in a session's folder on this machine (key "" or a folder that is gone: the home folder). Nothing in a shell tab is recorded.
func (*App) OpenURL ¶
OpenURL opens a web page in the default browser: hopsesh's release pages, Tailscale's sign-in check for a machine, a cloud session's page, and an upstream problem a cloud points to.
func (*App) PasteCloud ¶ added in v0.4.0
PasteCloud remembers a cloud session by its link or id, with the checkout here it works on (chosen from Checkouts, "" when not known yet); the next scan lists it.
func (*App) PendingPasswords ¶
func (a *App) PendingPasswords() []PasswordRequest
PendingPasswords lists unanswered password questions (for a window that missed the event).
func (*App) Plan ¶
Plan works out how a session comes here: in its own agent (target "") or continued in another. Nothing changes.
func (*App) PlanChangeDir ¶ added in v0.6.3
func (a *App) PlanChangeDir(machine, key, dir string, otherRepo, stopLocal bool) (*DirPlanDTO, error)
PlanChangeDir plans moving a session to dir (a folder on its machine). Nothing changes.
func (*App) PlanHandoff ¶ added in v0.4.0
func (a *App) PlanHandoff(machine, key, cloud string, o HandoffOptsDTO) (*HandoffPlanDTO, error)
PlanHandoff works out handing a session off to a cloud and keeps the plan for ApplyHandoff. Nothing changes.
func (*App) PlanHop ¶ added in v0.4.0
func (a *App) PlanHop(machine, key, cloud string, o HandoffOptsDTO) (*HopPlanDTO, error)
PlanHop works out handing a cloud session on to another cloud through this machine, and keeps the plan for ApplyHop. Nothing changes.
func (*App) PlanPicked ¶ added in v0.4.0
PlanPicked plans bringing a cloud session that is not a row: id "" leaves the choice to the vendor's own picker (Find in Claude Code…), into the checkout chosen here.
func (*App) PlanUpdate ¶ added in v0.7.0
func (a *App) PlanUpdate(name string) (*app.UpdatePlan, error)
PlanUpdate says what setting hopsesh up or updating it on a machine would do there: each copy of hopsesh found and what happens to it, for the dialog that asks.
func (*App) Presence ¶ added in v0.4.0
func (a *App) Presence() (*PresenceDTO, error)
Presence reads where this machine's sessions are open now: the agents' own registries and locks, and one snapshot of the process table (each process's first known ancestor: iTerm2, Terminal, an editor, tmux, ssh). It never talks to a terminal app (that happens only when the user asks to show a session).
func (*App) Preview ¶ added in v0.4.0
func (a *App) Preview(machine, key string, n int) (*PreviewDTO, error)
Preview returns the end of a session's conversation: its last n messages (4 when n is 0), with a line for each turn's tool calls. A machine that is slow to answer gets a note and Failed, not an error.
func (*App) ProtectionAll ¶ added in v0.5.0
func (a *App) ProtectionAll() []ProtectionRowDTO
ProtectionAll checks every machine's protection: this one here, the others through hopsesh in their login session (in parallel); the rest say why they can't be checked.
func (*App) ProvidePassword ¶
ProvidePassword answers a password question. remember stores it in the Keychain and sets the machine to remember it; false forgets any remembered one.
func (*App) PushPlan ¶
PushPlan asks hopsesh on another machine to plan receiving a session from this one, in its own agent (target "") or another. The connection stays open for PushApply.
func (*App) QuickClose ¶ added in v0.4.0
func (a *App) QuickClose()
func (*App) QuickPreview ¶ added in v0.4.0
func (a *App) QuickPreview(machine, key string) (*PreviewDTO, error)
func (*App) QuickRefresh ¶ added in v0.4.0
func (a *App) QuickRefresh()
QuickRefresh is local-only, including the first scan. Background operation must never trigger an SSH/password dialog or erase a transfer under review.
func (*App) QuickSnapshot ¶ added in v0.4.0
func (*App) QuitAndEnd ¶ added in v0.4.0
func (a *App) QuitAndEnd()
QuitAndEnd quits the app and ends the programs in its tabs (the user confirmed).
func (*App) RecheckDesktop ¶ added in v0.4.0
func (*App) RefreshAccount ¶ added in v0.4.1
func (a *App) RefreshAccount(id string) (agent.RuntimeProfile, error)
RefreshAccount updates public profile metadata in existing rows without rescanning peers.
func (*App) RefreshHere ¶ added in v0.4.0
RefreshHere reads this machine again and keeps what the last scan found on the other machines and in the clouds (reading those takes SSH and the vendors' commands, so the window does it less often). It leaves a plan in progress alone. Before any scan it is local-only discovery, with no remote authentication.
func (*App) RegisterAccount ¶ added in v0.4.0
func (*App) ReleaseOriginal ¶ added in v0.4.2
ReleaseOriginal removes the block (or advice) from one original on this machine, for its current movement. The window confirms first: continuing there makes the copies diverge, and moving back then needs a comparison instead of a clean return.
func (*App) RemoteDefaults ¶ added in v0.7.0
func (a *App) RemoteDefaults(machine string) (*app.RemoteDefaults, error)
RemoteDefaults reads a machine's "start Remote Control for every session" setting in each of its agent folders ("" or this machine's name: here; another machine through hopsesh in its login session there).
func (*App) RemoveHost ¶
RemoveHost forgets a machine: hopsesh stops connecting to it and drops its remembered password (discovery may still list it).
func (*App) RemoveNoticeHooks ¶ added in v0.4.0
func (a *App) RemoveNoticeHooks(id, profile string) ([]app.MovementHookStatus, error)
func (*App) RemoveSkill ¶
func (a *App) RemoveSkill(force bool) (app.SkillReport, error)
RemoveSkill removes every copy of the skill and the approval rules.
func (*App) Rename ¶ added in v0.4.0
Rename gives a session a new title in its agent's own data (Claude Code's custom title, Codex's thread name), as their own rename does; Activity undoes it.
func (*App) RenameFamily ¶ added in v0.4.0
RenameFamily changes a presentation label only, never the native session title or history. An empty label restores the title derived from the original branch.
func (*App) Reopen ¶ added in v0.7.0
func (a *App) Reopen() (*ReopenedDTO, error)
Reopen resumes each session the last quit left, in a tab: one here with its agent's resume command, one on another machine shown again (still running there, or continued there again). The list is gone afterwards, whatever opened.
func (*App) ReopenOffer ¶ added in v0.7.0
ReopenOffer is what the last quit left to reopen (nil: nothing). The window asks once its first scan is in, and answers with Reopen or ForgetReopen.
func (*App) ResolveEntry ¶ added in v0.4.0
ResolveEntry resolves a raw scanned replica even when grouping shows a different copy of its branch. It never scans or guesses a destination from timestamps.
func (*App) RestoreBlock ¶ added in v0.4.2
RestoreBlock puts a removed block back on an original on this machine.
func (*App) ResumeCommand ¶ added in v0.4.0
ResumeCommand is the command that resumes a session on this machine, for the user's shell (copied from the ⋯ menu).
func (*App) ResumeEntry ¶
ResumeEntry continues a session that is already on this machine, in a terminal or (inApp) the agent's desktop app.
func (*App) ResumeSession ¶ added in v0.4.0
ResumeSession continues a session that is on this machine: in a tab of the hopsesh Terminal window or in the user's terminal app (where: "here", "terminal", or "" for the setting). A session that runs in a tab already is shown instead.
func (*App) RetryLocalNetwork ¶
func (a *App) RetryLocalNetwork()
RetryLocalNetwork makes the next scan wait for the macOS prompt again, for someone who just changed the setting or wants to answer a prompt they dismissed.
func (*App) RetryReceipts ¶ added in v0.4.0
RetryReceipts repairs pending metadata without relaunching a native or cloud agent.
func (*App) RevealEntry ¶ added in v0.4.0
RevealEntry shows a session's file in Finder (Explorer on Windows).
func (*App) SaveDesktop ¶ added in v0.4.0
func (a *App) SaveDesktop(in DesktopInput) error
func (*App) SaveLayout ¶ added in v0.4.0
SaveLayout stores the panes' layout (what the user chose: never a pane the window hid for being narrow) and the inspector's sections.
func (*App) SaveList ¶ added in v0.4.0
SaveList stores the list's display. Values the app does not know are refused; the collapsed and expanded groups keep the newest ListKeysMax.
func (*App) SaveSettings ¶
func (a *App) SaveSettings(in SettingsInput) error
SaveSettings stores the user's choices.
func (*App) ScanAccounts ¶ added in v0.4.0
func (*App) ScanMachine ¶ added in v0.4.0
ScanMachine reads just one allowed machine, merges its result into the inventory, and leaves all other connections and cloud results in place.
func (*App) ScanSnapshot ¶ added in v0.4.1
ScanSnapshot returns the current browsing model after a source-only retry.
func (*App) SessionLink ¶ added in v0.8.0
SessionLink is hopsesh's link to a session, which opens it in hopsesh (Copy link).
func (*App) SetAgent ¶
SetAgent turns an agent on or off (an agent that is off is not scanned and cannot be moved into), and sets whether sessions continued in it turn its remote control on and go through its own importer.
func (*App) SetAgentKind ¶ added in v0.5.0
SetAgentKind shows or hides one kind of an agent's sessions (Codex voice conversations, Work threads); the next scan lists them or leaves them out.
func (*App) SetAllowed ¶
SetAllowed records consent for a machine.
func (*App) SetAuth ¶
SetAuth switches a machine between key login ("key") and password login ("password").
func (*App) SetCloudAllowed ¶ added in v0.4.0
SetCloudAllowed records consent for a cloud: hopsesh runs its agent's cloud commands only once it is allowed.
func (*App) SetCloudEnvironment ¶ added in v0.4.0
SetCloudEnvironment sets the environment a repository's hand-offs to a cloud run in ("" forgets it): the Machines page's table.
func (*App) SetHistorySettings ¶ added in v0.4.2
SetHistorySettings stores Settings → History. Values equal to the default are stored as the default (left out of the file), so a later default change still applies.
func (*App) SetPlace ¶ added in v0.4.0
SetPlace remembers where an agent's sessions resume: here (the hopsesh Terminal window), terminal (the user's terminal app) or app (the agent's desktop app).
func (*App) SetPreviews ¶ added in v0.4.0
SetPreviews turns the inspector's conversation previews on or off.
func (*App) SetReceive ¶
SetReceive lets (or stops letting) hopsesh on your other machines send sessions here.
func (*App) SetRemoteDefault ¶ added in v0.7.0
SetRemoteDefault turns Remote Control for every session on or off in each of a machine's agent folders that has the setting.
func (*App) SetReposDir ¶
SetReposDir changes the clone folder.
func (*App) SetTerminalApps ¶ added in v0.4.0
SetTerminalApps stores the chosen terminal app ("" automatic) and where sessions resume.
func (*App) SetTerminalSettings ¶ added in v0.4.0
func (a *App) SetTerminalSettings(in TerminalSettingsInput) error
SetTerminalSettings stores Settings → Terminal, and gives the terminal window its new look.
func (*App) SetUpMachine ¶ added in v0.5.0
func (a *App) SetUpMachine(name string) (*app.MachineSetup, error)
SetUpMachine installs (or updates) hopsesh on a machine you added and starts it in the login session there, after the user asked; each step is told as it happens. The machine is scanned again after.
func (*App) SetUpProtection ¶ added in v0.5.0
SetUpProtection installs the protection hooks and the skill on a machine (this one, or one with hopsesh running in its login session). rules also lets agents run hopsesh's read-only commands without asking.
What it changed shows at once: the notices check every machine again, and that machine's hooks are read again for the copies left there (which the window is shown).
func (*App) SetUpdateCheck ¶
SetUpdateCheck records whether the app may look for new releases once a day.
func (*App) Settings ¶
func (a *App) Settings() SettingsDTO
Settings returns the current settings and integration state.
func (*App) SetupKeyLogin ¶
func (a *App) SetupKeyLogin(name string, createKey bool) (*KeyLoginDTO, error)
SetupKeyLogin adds this Mac's public key to a password machine, checks that key login works and switches the machine to it. Without createKey it fails with "no-key" when this Mac has no key ssh would use (the window then asks before one is made).
func (*App) ShouldQuit ¶ added in v0.4.0
ShouldQuit is the app's quit check: with programs running in tabs, the app's window asks first (QuitEvent), and quitting waits for QuitAndEnd.
func (*App) ShowApp ¶ added in v0.4.0
ShowApp brings forward the agent's own desktop app, which runs a session on this machine, and returns its name. Modules with exact chat links navigate to that chat; other modules can only bring their app forward.
func (*App) ShowEntry ¶ added in v0.4.0
ShowEntry brings forward the tab a session on this machine runs in, and returns the terminal's name.
func (*App) ShowPlace ¶ added in v0.4.0
ShowPlace brings forward an editor a session runs in (VS Code, Cursor): hopsesh can't pick the terminal inside it, so the app comes to the front as it is.
func (*App) Shutdown ¶
func (a *App) Shutdown()
Shutdown closes connections and ends the terminal's tabs.
func (*App) SignIn ¶ added in v0.4.0
SignIn runs a cloud's own sign-in command (claude auth login, codex login --device-auth, gh auth login --web): in a sign-in tab, whose output hopsesh never reads or keeps, or in the user's terminal app (where as for ResumeSession). When the tab ends with code 0, hopsesh checks the login again and tells the window (SignedInEvent).
func (*App) SignInOn ¶ added in v0.5.0
func (a *App) SignInOn(machine string, id agent.ID, profile string, atScreen bool) (*OpenedDTO, error)
SignInOn runs an account folder's sign-in on another machine (atScreen: in the browser on that machine's screen; otherwise it prints a link and a code for this one's), in a tab here whose output hopsesh never reads.
func (*App) SkillPreview ¶
SkillPreview returns the SKILL.md this build installs.
func (*App) StartAtLogin ¶ added in v0.6.4
StartAtLogin has this machine start hopsesh serve at each login, and now (hopsesh serve install, run by the app's own command), so it receives sessions while the app is closed. Only on the user's click.
func (*App) StartFresh ¶
StartFresh sets aside a configuration file an older hopsesh wrote and starts with defaults (machines are added again). It returns where the old file went. A file a newer hopsesh wrote is set aside only when the user chose that over updating (newer).
func (*App) TakeQuickRoute ¶ added in v0.4.0
func (a *App) TakeQuickRoute() *QuickRoute
TakeQuickRoute also runs at main-window readiness, so a cold-start click isn't lost before its frontend event listener exists.
func (*App) TerminalApps ¶ added in v0.4.0
func (a *App) TerminalApps() TerminalAppsDTO
TerminalApps returns the terminal settings.
func (*App) TerminalCloseTab ¶ added in v0.4.0
TerminalCloseTab closes a tab, ending its program.
func (*App) TerminalFocus ¶ added in v0.4.0
TerminalFocus shows the terminal window with one of its tabs in front.
func (*App) TerminalOpenElsewhere ¶ added in v0.4.0
TerminalOpenElsewhere ends a tab and runs its command in the user's terminal app ("Move to Terminal…", which the window confirmed with the user).
func (*App) TerminalPlacement ¶ added in v0.4.0
TerminalPlacement asks the existing renderer to checkpoint before rehosting. Changing bottom/right never changes the renderer, stream or process.
func (*App) TerminalRunning ¶ added in v0.4.0
TerminalRunning is how many tabs' programs still run (the window asks before quitting).
func (*App) TerminalSettings ¶ added in v0.4.0
func (a *App) TerminalSettings() TerminalSettingsDTO
TerminalSettings are Settings → Terminal.
func (*App) TerminalShow ¶ added in v0.4.0
func (a *App) TerminalShow()
TerminalShow brings the terminal window to the front.
func (*App) TerminalTabs ¶ added in v0.4.0
TerminalTabs are the terminal's open tabs (state, title, exit code, what each is for).
func (*App) TerminalWorkspace ¶ added in v0.4.0
func (a *App) TerminalWorkspace() (TerminalWorkspaceDTO, error)
func (*App) TerminalWorkspaceVisible ¶ added in v0.4.0
TerminalWorkspaceVisible reports presentation only; it grants no PTY authority.
func (*App) TestCloud ¶ added in v0.4.0
func (a *App) TestCloud(name string) (*CloudTestDTO, error)
TestCloud probes a cloud through its agent's command, read-only (the Test button).
func (*App) TrustHost ¶
TrustHost re-scans and records the machine's host keys (after the user confirmed).
func (*App) TurnOnRemoteControl ¶ added in v0.7.0
TurnOnRemoteControl connects a session running in a hopsesh Terminal tab here to its agent's Remote Control (reachable from the agent's website and phone app) by typing the agent's own command into the tab, while the agent waits for input. A session running elsewhere (the desktop app, another terminal) is turned on there.
func (*App) Undo ¶
Undo reverses a move or continuation by its journal id; force undoes it even when the session was used since.
func (*App) UndoLast ¶
UndoLast undoes the newest operation that can still be undone and returns its title.
func (*App) UninstallCLI ¶
UninstallCLI removes the link the app made (and its PATH block).
func (*App) ViewState ¶ added in v0.4.0
ViewState tells the View menu what the window shows now (sidebar, inspector), so its items say Show or Hide; a pane hidden for a narrow window counts as hidden.
func (*App) WaitChangedDir ¶ added in v0.6.3
WaitChangedDir waits, at most seconds, for the open session's agent to move it (the user typed the plan's InSession in it). CancelChangeDir stops waiting.
type BroughtDTO ¶ added in v0.4.0
BroughtDTO is a fetch from a cloud: waiting for the user's terminal, or what came back (app.Brought, the command line's shape too).
type CanDTO ¶
type CanDTO struct {
AppWhy string `json:"appWhy,omitempty"`
Fork bool `json:"fork"`
RemoteControl bool `json:"remoteControl"`
App bool `json:"app"`
Native bool `json:"native"`
Import bool `json:"import"`
}
CanDTO is what the receiving agent can do, for the options shown.
type CellDTO ¶ added in v0.5.0
type CellDTO struct {
Tool string `json:"tool"`
Installed bool `json:"installed"`
Version string `json:"version,omitempty"` // "Claude desktop 2.31226.1, running its own Claude Code 2.1.295"
Note string `json:"note,omitempty"`
SignIns []SignInDTO `json:"signIns"`
}
CellDTO is a tool on a machine: its version, then who it is signed in as in each folder.
type CheckoutDTO ¶ added in v0.4.0
type CheckoutDTO struct {
Name string `json:"name"`
Identity string `json:"identity"`
Path string `json:"path"`
}
CheckoutDTO is a repository checked out here, for choosing where a cloud session comes.
type CloudDTO ¶ added in v0.4.0
type CloudDTO struct {
Name string `json:"name"`
Title string `json:"title"`
Agent string `json:"agent"`
AgentName string `json:"agentName"`
Driver string `json:"driver"`
Version string `json:"version"`
Tested bool `json:"tested"`
TestedOn string `json:"testedOn"` // the driver versions hopsesh tested ("2.1")
Status string `json:"status"` // app.Cloud* statuses
Hint string `json:"hint"`
Error string `json:"error"`
Allowed bool `json:"allowed"`
Sessions int `json:"sessions"`
Mirrors int `json:"mirrors"`
Partial bool `json:"partial"`
Listable bool `json:"listable"`
Fetchable bool `json:"fetchable"`
// Experimental: its module is experimental (its drivers' output is partly unverified).
Experimental bool `json:"experimental"`
// Rename: the cloud's own branches come home under hopsesh/from/<cloud>/.
Rename bool `json:"rename"`
// VendorPrefix starts the cloud's own branches ("claude/").
VendorPrefix string `json:"vendorPrefix"`
// Fidelity is what comes back of a conversation (native, code, text).
Fidelity string `json:"fidelity"`
// CodeOnly: hopsesh brings only the code of this cloud's sessions (the cloud gives no
// words back to write here as a session).
CodeOnly bool `json:"codeOnly"`
// Test is the last read-only probe of it, when there was one.
Test *CloudTestDTO `json:"test,omitempty"`
// SignIn is the driver's own sign-in command, for people ("codex login --device-auth";
// "": the card offers no Sign in).
SignIn string `json:"signIn,omitempty"`
// Noun is what the cloud calls its sessions ("task"); Limits, what hopsesh cannot reach
// there; CodeUp and CodeDown, how code travels each way; Hosts, the repository hosts it
// takes.
Noun string `json:"noun"`
Limits []string `json:"limits"`
CodeUp []string `json:"codeUp"`
CodeDown []string `json:"codeDown"`
Hosts []string `json:"hosts"`
// NeedsEnv: a hand-off runs in an environment (Codex cloud); Repos are the repositories
// hopsesh knows with the environment set for each, Envs the environments to choose from,
// EnvHint how to make one.
NeedsEnv bool `json:"needsEnv"`
Repos []app.RepoEnv `json:"repos"`
Envs []move.EnvChoice `json:"envs"`
EnvHint string `json:"envHint,omitempty"`
}
CloudDTO is one cloud as the window shows it (only clouds hopsesh can do something with).
type CloudEntryDTO ¶ added in v0.4.0
type CloudEntryDTO struct {
Name string `json:"name"` // the cloud
Title string `json:"title"` // "Claude Code cloud"
ID string `json:"id"`
URL string `json:"url"`
State string `json:"state"`
PR string `json:"pr,omitempty"`
Branch string `json:"branch,omitempty"`
Base string `json:"base,omitempty"`
Repo string `json:"repo,omitempty"`
Checkout string `json:"checkout,omitempty"`
// EnvLabel is the environment it runs in; Changes sums up its code; Noun, what its
// cloud calls it ("task").
EnvLabel string `json:"envLabel,omitempty"`
Changes string `json:"changes,omitempty"`
Noun string `json:"noun"`
}
CloudEntryDTO is what a cloud row adds to a session row.
type CloudTestDTO ¶ added in v0.4.0
type CloudTestDTO struct {
OK bool `json:"ok"`
Account string `json:"account,omitempty"`
Checks []agent.CloudCheck `json:"checks"`
Error string `json:"error,omitempty"`
At string `json:"at"` // RFC 3339
}
CloudTestDTO is a read-only probe of a cloud.
type ContinueDTO ¶
type ContinueDTO struct {
Comparison *move.Comparison `json:"comparison,omitempty"`
Instructions []move.InstructionSource `json:"instructions"`
From string `json:"from"`
Fidelity string `json:"fidelity"`
Relation string `json:"relation"`
AppendTo string `json:"appendTo,omitempty"` // the title of the copy here that gets the new work
Report convert.Report `json:"report"`
Briefing string `json:"briefing"`
Via string `json:"via,omitempty"`
}
ContinueDTO is the conversion part of a plan.
type CopyDTO ¶
type CopyDTO struct {
Profile *agent.RuntimeProfile `json:"profile,omitempty"`
Machine string `json:"machine"`
Agent agent.ID `json:"agent"`
AgentName string `json:"agentName"`
Key string `json:"key"` // agent/session, as EntryDTO.Key
Local bool `json:"local"`
LeftBehind bool `json:"leftBehind,omitempty"` // moved on since
Newest bool `json:"newest"`
}
CopyDTO is one copy of a session, on some machine and in some agent.
type DesktopInput ¶ added in v0.4.0
type DesktopShell ¶ added in v0.4.0
type DesktopShell interface {
Snapshot() desktop.State
Apply(config.Desktop, bool) error
Recheck()
KeepOnClose() bool
OpenMain()
CloseQuick()
SetAttention(int, int)
Stop()
}
DesktopShell lets browser tests exercise the same lifecycle without modifying the host's login items or hiding real application windows.
type DirPlanDTO ¶ added in v0.6.3
type DirPlanDTO struct {
Machine string `json:"machine"`
Local bool `json:"local"`
Change app.DirChange `json:"change"`
}
DirPlanDTO is a planned folder change for the window.
type DoneDTO ¶
type DoneDTO struct {
NoWork bool `json:"noWork"`
Kind string `json:"kind"`
Title string `json:"title"`
Agent string `json:"agent"`
Command string `json:"command"`
Files int `json:"files"`
Bytes string `json:"bytes"`
Paths int `json:"paths"`
Secrets int `json:"secrets"`
Redacted bool `json:"redacted"`
Cloned bool `json:"cloned"`
Worktree string `json:"worktree"`
Journal string `json:"journal"`
SourceHost string `json:"sourceHost"`
Stopped bool `json:"stopped"`
Pushed string `json:"pushed"`
PushError string `json:"pushError"`
SyncNote string `json:"syncNote"`
SyncState string `json:"syncState"`
Notice string `json:"notice"`
Warnings []string `json:"warnings"`
InApp bool `json:"inApp"` // it opens in the agent's desktop app
// RemoteControlInApp: Remote Control was asked for, and the desktop app can't start
// it; Key is the session the window then checks.
RemoteControlInApp bool `json:"remoteControlInApp,omitempty"`
Key string `json:"key,omitempty"`
ContinuationHint string `json:"continuationHint,omitempty"`
Machine string `json:"machine,omitempty"` // a push: where it went (start it there)
// RemoteKey is the pushed copy's session there (to open it there, in a tab here).
RemoteKey string `json:"remoteKey,omitempty"`
// RemoteLogin: hopsesh runs in the login session there, so it can run it.
RemoteLogin bool `json:"remoteLogin,omitempty"`
AuditDir string `json:"auditDir"`
// Fetch is a session brought from a cloud: waiting for the user's terminal, or the
// code only.
Fetch *BroughtDTO `json:"fetch,omitempty"`
}
DoneDTO reports a finished move or continuation.
type EntryDTO ¶
type EntryDTO struct {
Cached bool `json:"cached,omitempty"`
Relationship app.Relationship `json:"relationship"`
ObservedAt time.Time `json:"observedAt,omitempty"`
Returns []app.ReturnCandidate `json:"returns,omitempty"`
Movement *app.MovementNotice `json:"movement,omitempty"`
// Departure: this copy moved on (to where, and what is known there). Arrival: how it
// came here. Guard: how this original is protected until the session moves back.
Departure *app.MovementNotice `json:"departure,omitempty"`
Arrival *app.Arrival `json:"arrival,omitempty"`
Guard *GuardDTO `json:"guard,omitempty"`
ContextOverflow bool `json:"contextOverflow,omitempty"`
CanApp bool `json:"canApp"`
AppWhy string `json:"appWhy,omitempty"`
Profile *agent.RuntimeProfile `json:"profile,omitempty"`
// Owner is the account that ran it, as the agent recorded it (Profile's sign-in is
// only who is signed in to its root now).
Owner app.SessionOwner `json:"owner"`
Machine string `json:"machine"`
Agent agent.ID `json:"agent"`
AgentName string `json:"agentName"`
Key string `json:"key"` // agent/session
Title string `json:"title"`
// TitleSource is where the title comes from: custom (renamed), live (the running
// agent's name for it), generated (the agent's own title), prompt (the first prompt),
// reply (the first reply) or none ("Untitled · folder").
TitleSource string `json:"titleSource"`
// Session is the agent's session id; Path its file on its machine; AgentVersion the
// agent version that last wrote it.
Session string `json:"session"`
Path string `json:"path"`
AgentVersion string `json:"agentVersion"`
// CanRename: its agent's own title can be changed (Rename); CanPreview: the end of its
// conversation can be shown (Preview).
CanRename bool `json:"canRename"`
// CanChangeDir: it can continue in another folder on its machine (Change folder…).
CanChangeDir bool `json:"canChangeDir"`
CanPreview bool `json:"canPreview"`
Places []PlaceDTO `json:"places"` // where it is open on this machine, besides hopsesh's tabs
Status string `json:"status"`
Live bool `json:"live"`
LastActive string `json:"lastActive"`
LastPrompt string `json:"lastPrompt"`
CWD string `json:"cwd"`
Branch string `json:"branch"`
Worktree string `json:"worktree"`
MainBranch string `json:"mainBranch"`
Unpushed int `json:"unpushed"`
Dirty int `json:"dirty"`
SizeKB int64 `json:"sizeKB"`
Copies []CopyDTO `json:"copies,omitempty"` // every copy, across machines and agents
HereNewest bool `json:"hereNewest"` // the newest copy is on this machine
StaleHere bool `json:"staleHere"` // an older copy is on this machine
ContinueIn []AgentOpt `json:"continueIn"` // other agents here it can continue in
Needs bool `json:"needs"` // the agent waits for the person (an approval)
// App names the agent's desktop app ("Claude") when that app, not a terminal, runs the
// open session.
App string `json:"app,omitempty"`
// RemoteControl is "on" or "off" when the open session says whether Remote Control
// reaches it ("" when it doesn't say or isn't open); RemoteURL is its page then.
RemoteControl string `json:"remoteControl,omitempty"`
RemoteURL string `json:"remoteUrl,omitempty"`
Journey *lineage.Journey `json:"journey,omitempty"`
CanArchiveLineage bool `json:"canArchiveLineage"`
LineageError string `json:"lineageError,omitempty"`
History []HopDTO `json:"history"` // where it has been, oldest first
// BringIn is the agent here a cloud-only module's session (Copilot's log, Amp's thread)
// is written into by default: the one it was handed off from, else Claude Code;
// ContinueIn then lists the others.
BringIn *AgentOpt `json:"bringIn,omitempty"`
// Location is "machine" or "cloud"; a cloud session's row has Cloud (Machine is the
// cloud's name), and a session the vendor mirrors (Remote Control) has Mirror.
Location string `json:"location"`
Cloud *CloudEntryDTO `json:"cloud,omitempty"`
Mirror *MirrorDTO `json:"mirror,omitempty"`
// Handoff are the clouds it can be handed off to (every cloud; a disabled one with its
// reason); Hop, for a cloud session, the other clouds it can be handed on to through
// this machine.
Handoff []app.HandoffTarget `json:"handoff"`
Hop []app.HandoffTarget `json:"hop"`
}
EntryDTO is one session row.
type ExternalExitDTO ¶ added in v0.4.0
type ExternalExitDTO struct {
Kind string `json:"kind"` // session, step, sign-in
Machine string `json:"machine,omitempty"` // a session's row
Key string `json:"key,omitempty"`
Title string `json:"title"`
Terminal string `json:"terminal"` // "iTerm2"
Code int `json:"code"` // the exit code; -1 when the tab was closed first
Closed bool `json:"closed"`
At string `json:"at"` // RFC 3339
}
ExternalExitDTO is a launch in the user's terminal app that ended.
type FilterDTO ¶ added in v0.4.0
type FilterDTO struct {
Account []string `json:"account"`
AccountNot bool `json:"accountNot"`
Tag []string `json:"tag"`
TagNot bool `json:"tagNot"`
Status []string `json:"status"`
StatusNot bool `json:"statusNot"`
Location []string `json:"location"`
LocationNot bool `json:"locationNot"`
Agent []string `json:"agent"`
AgentNot bool `json:"agentNot"`
Repository []string `json:"repository"`
RepositoryNot bool `json:"repositoryNot"`
LastActive string `json:"lastActive"`
Has []string `json:"has"`
HasNot bool `json:"hasNot"`
}
FilterDTO is the list's saved filters (config.ListFilter).
type FolderDTO ¶ added in v0.5.0
type FolderDTO struct {
Machine string `json:"machine"`
Local bool `json:"local"`
Profile string `json:"profile"`
Generation int `json:"generation"`
Agent agent.ID `json:"agent"`
AgentName string `json:"agentName"`
Name string `json:"name"` // "default" or its own
Path string `json:"path"`
Default bool `json:"default"`
Tools string `json:"tools"`
Command string `json:"command,omitempty"`
Counts []CountDTO `json:"counts"`
Unrecorded int `json:"unrecorded"`
Error string `json:"error,omitempty"`
SignedIn bool `json:"signedIn"`
CanRun bool `json:"canRun"` // a new session can start in it (here, or through hopsesh there)
Tags []string `json:"tags"`
}
FolderDTO is a folder a tool keeps sessions in, on one machine.
type FoundRow ¶
type FoundRow struct {
Name string `json:"name"`
Destination string `json:"destination"`
Via []string `json:"via"`
OS string `json:"os"`
Online *bool `json:"online"`
Owner string `json:"owner"` // shared by someone else
}
FoundRow is a machine discovery found that is not added.
type GroupDTO ¶
type GroupDTO struct {
Name string `json:"name"`
Remote string `json:"remote"`
Local string `json:"local"`
NoRepo bool `json:"noRepo"` // not in a git checkout
NoRemote bool `json:"noRemote"` // a checkout without a remote (matched by path only)
RepoPending bool `json:"repoPending,omitempty"` // repository discovery has not established availability
Entries []EntryDTO `json:"entries"`
}
GroupDTO is one repository.
type GuardDTO ¶ added in v0.4.2
type GuardDTO struct {
Mode string `json:"mode"` // block | advise | off | released
// State is whether the hook on Machine keeps this copy from going on now: protected,
// unprotected, unknown, off or released. Effective is State "protected".
State string `json:"state"`
Effective bool `json:"effective"`
// Checking: the answer is being read now (a saved row, or that machine's hooks). It
// ends in a definite State, or in unknown with Problem saying why.
Checking bool `json:"checking,omitempty"`
// Problem is a full sentence whenever State is unprotected or unknown; Fix says what
// puts it right, and Action which button the window offers for it: setup (install the
// hooks on Machine now), update (hopsesh there), approve (the hook, in the agent there),
// machines (open Machines) or settings (Settings › General).
Problem string `json:"problem,omitempty"`
Fix string `json:"fix,omitempty"`
Action string `json:"action,omitempty"`
// Machine is the machine whose hook decides (the copy's own), and CheckedAt when its
// hooks were last read (zero: never).
Machine string `json:"machine,omitempty"`
CheckedAt time.Time `json:"checkedAt,omitzero"`
Operation string `json:"operation,omitempty"`
// NoHopsesh: the original is on a machine without hopsesh, where nothing can protect it.
NoHopsesh bool `json:"noHopsesh,omitempty"`
}
GuardDTO is how the copy left behind by a move is protected, as the app shows it. Effective is false when hopsesh cannot make the agent honor the choice there: the hook is not installed, the agent has not trusted it (Codex), or it cannot be verified.
type HandedOffDTO ¶ added in v0.4.0
type HandedOffDTO struct {
Journal string `json:"journal"`
Title string `json:"title"`
Agent string `json:"agent"`
Warnings []string `json:"warnings"`
Error string `json:"error,omitempty"`
Handoff *move.HandoffResult `json:"handoff"`
}
HandedOffDTO is a hand-off as the done screen shows it: what happened, or the step that failed and what had happened by then.
type HandoffActivityDTO ¶ added in v0.4.0
type HandoffActivityDTO struct {
Cloud string `json:"cloud"`
CloudTitle string `json:"cloudTitle"`
Machine string `json:"machine"`
Session string `json:"session"`
URL string `json:"url"`
Branch string `json:"branch"`
Pushed bool `json:"pushed"`
Noun string `json:"noun"` // what the cloud calls its sessions ("task")
}
HandoffActivityDTO is a hand-off in the Activity list.
type HandoffDefaultsDTO ¶ added in v0.4.0
type HandoffDefaultsDTO struct {
HistoryFile bool `json:"historyFile"`
Bundle bool `json:"bundle"`
Cleanup string `json:"cleanup"`
}
HandoffDefaultsDTO are the sheet's first choices for a cloud, from the configuration.
type HandoffOptsDTO ¶ added in v0.4.0
type HandoffOptsDTO struct {
Untracked []string `json:"untracked"` // untracked files to carry (paths)
HistoryFile bool `json:"historyFile"` // also commit the conversation on the branch
Bundle bool `json:"bundle"` // the agent uploads the repository instead
Cleanup string `json:"cleanup"`
Brief string `json:"brief"` // the user's edit of the briefing ("" : hopsesh's)
Note string `json:"note"`
CarryRules bool `json:"carryRules"`
// Env is the cloud environment picked ("": the repository's); StartingDiff sends the
// changes with the cloud session instead of on a branch.
Env string `json:"env"`
StartingDiff bool `json:"startingDiff"`
}
HandoffOptsDTO are the hand-off sheet's choices.
type HandoffPlanDTO ¶ added in v0.4.0
type HandoffPlanDTO struct {
Kind string `json:"kind"` // "handoff"
Title string `json:"title"`
Agent string `json:"agent"` // the session's agent
AgentID agent.ID `json:"agentId"`
SourceHost string `json:"sourceHost"`
Local bool `json:"local"`
Warnings []string `json:"warnings"`
Blockers []string `json:"blockers"`
Handoff *move.HandoffPlan `json:"handoff"`
}
HandoffPlanDTO is a hand-off plan as the sheet shows it.
type HandoffStepDTO ¶ added in v0.4.0
type HandoffStepDTO struct {
// State: waiting (for the terminal), no-link (it ended without a session hopsesh saw),
// no-terminal (the window could not open one).
State string `json:"state"`
// Where it runs: "here" (a tab of the hopsesh Terminal window, Tab) or "terminal" (the
// user's terminal app).
Where string `json:"where"`
Tab string `json:"tab,omitempty"`
// Exit is how the step's tab in the user's terminal app ended, when that terminal can
// say: its exit code, -1 when the tab was closed first.
Exit *int `json:"exit,omitempty"`
CloudTitle string `json:"cloudTitle"`
Driver string `json:"driver"` // "claude"
Folder string `json:"folder"`
Message string `json:"message,omitempty"`
}
HandoffStepDTO is the terminal step a hand-off waits for, as the window shows it.
type HereDTO ¶
type HereDTO struct {
Name string `json:"name"`
Agents []string `json:"agents"`
Hopsesh string `json:"hopsesh"`
Receive bool `json:"receive"`
// Storage is what each agent's sessions take here.
Storage []app.AgentUsage `json:"storage"`
}
HereDTO is this machine on the Machines screen.
type HistorySettingsDTO ¶ added in v0.4.2
type HistorySettingsDTO struct {
config.History
ContextBudgets []int `json:"contextBudgets"`
ReadMemoryMBs []int `json:"readMemoryMBs"`
RecordMBs []int `json:"recordMBs"`
ArchiveMBs []int `json:"archiveMBs"`
LineageMBs []int `json:"lineageMBs"`
NativeFileMBs []int `json:"nativeFileMBs"`
// Effective values after defaults, shown next to "Default".
Effective ir.Limits `json:"effective"`
Defaults ir.Limits `json:"defaults"`
}
HistorySettingsDTO is Settings → History: how much history a transfer carries, and the resources it may use. Zero values are automatic/defaults.
type HookHealthDTO ¶ added in v0.4.2
type HookHealthDTO struct {
CLI integrate.CLIStatus `json:"cli"`
CLIReady bool `json:"cliReady"` // the hopsesh command is installed and works
Hooks []app.MovementHookStatus `json:"hooks"`
Problems []HookProblem `json:"problems"`
Mode string `json:"mode"` // config original
Checked time.Time `json:"checked"`
// Fingerprint names this set of problems; Dismissed: the user said "Not now" to it.
Fingerprint string `json:"fingerprint"`
Dismissed bool `json:"dismissed"`
}
HookHealthDTO is what keeps movement protection and the skill working on this machine.
type HookProblem ¶ added in v0.4.2
type HookProblem struct {
Agent agent.ID `json:"agent"`
Profile string `json:"profile"`
Label string `json:"label"`
State string `json:"state"` // not-installed | unsupported | needs-review | disabled | missing | unknown | settings
Message string `json:"message"`
Fix string `json:"fix,omitempty"`
}
HookProblem is one agent profile whose protection hook cannot protect originals.
type HopDTO ¶
type HopDTO struct {
Operation string `json:"operation,omitempty"`
Branch string `json:"branch,omitempty"`
Loss []string `json:"loss,omitempty"`
When string `json:"when"` // RFC 3339
What string `json:"what"`
}
HopDTO is one step of a session's history.
type HopDoneDTO ¶ added in v0.4.0
type HopDoneDTO struct {
Journal string `json:"journal"`
Title string `json:"title"`
Hop *move.HopResult `json:"hop"`
Fetch string `json:"fetch,omitempty"` // the first leg's journal
Handoff *HandedOffDTO `json:"handoff,omitempty"`
Brought *BroughtDTO `json:"brought,omitempty"`
Error string `json:"error,omitempty"`
Warnings []string `json:"warnings"`
}
HopDoneDTO is where a hop stands: waiting for the user's terminal (its first leg), or done (Handoff is the hand-off as its done screen shows it), or failed.
type HopPlanDTO ¶ added in v0.4.0
type HopPlanDTO struct {
Kind string `json:"kind"` // "hop"
Title string `json:"title"`
Agent string `json:"agent"`
Warnings []string `json:"warnings"`
Blockers []string `json:"blockers"`
Hop *move.HopPlan `json:"hop"`
}
HopPlanDTO is a hop's plan as the sheet shows it.
type Info ¶
type Info struct {
// Companion is MyCNC Host here, which the window recommends and links to.
Companion app.Companion `json:"companion"`
DesktopManaged bool `json:"desktopManaged"`
Version string `json:"version"`
OS string `json:"os"` // runtime.GOOS: the window words things for its system
Host string `json:"host"`
ReposDir string `json:"reposDir"`
AuditDir string `json:"auditDir"`
HasHosts bool `json:"hasHosts"`
ConfigError string `json:"configError,omitempty"`
// ConfigNewer: a newer hopsesh wrote the configuration; the window offers to update
// hopsesh first, and setting the file aside only as a second, confirmed choice.
ConfigNewer bool `json:"configNewer,omitempty"`
Agents []AgentDTO `json:"agents"`
// LocalNetwork describes macOS local network privacy: gated (macOS 15+) and firstRun
// (the prompt has probably not been answered yet).
LocalNetwork struct {
Gated bool `json:"gated"`
FirstRun bool `json:"firstRun"`
} `json:"localNetwork"`
UpdateCheck string `json:"updateCheck"` // "", "on" or "off"
// Terminal is the terminal app sessions open in, by name ("iTerm2"): the window says
// "Open in iTerm2".
Terminal string `json:"terminal"`
// Where is where sessions resume and steps run: here (the hopsesh Terminal window),
// terminal (the user's terminal app) or ask.
Where string `json:"where"`
SkillState string `json:"skillState"` // across every agent: absent | current | stale | modified | foreign | broken
SkillPrompt string `json:"skillPrompt"` // "declined" once the user said not now
CLIOffer bool `json:"cliOffer"` // offer to link the command-line tool
// SetupDismissed: the user closed the "Finish setting up" line.
SetupDismissed bool `json:"setupDismissed"`
// Layout is the window's pane layout, restored before the first paint.
Layout LayoutDTO `json:"layout"`
// List is how the session list shows sessions.
List ListDTO `json:"list"`
// Places is where each agent's sessions resume, as last chosen (by agent id: here,
// terminal or app); an agent not listed follows Where.
Places map[string]string `json:"places"`
// Previews: the inspector shows the end of a session's conversation.
Previews bool `json:"previews"`
Receive bool `json:"receive"` // other machines' hopsesh may send sessions here
// SetUpIntegrations: setting hopsesh up on a machine adds its hooks and skill too.
SetUpIntegrations bool `json:"setUpIntegrations"`
Defaults struct {
MovementNotices bool `json:"movementNotices"`
Original string `json:"original"`
SyncCode bool `json:"syncCode"`
PushSource bool `json:"pushSource"`
} `json:"defaults"`
}
Info is static information for the window.
type KeyLoginDTO ¶
type KeyLoginDTO struct {
PublicKey string `json:"publicKey"`
Created bool `json:"created"`
Added bool `json:"added"`
}
KeyLoginDTO is what SetupKeyLogin did.
type KeysDTO ¶
type KeysDTO struct {
Host string `json:"host"`
Address string `json:"address"`
Fingerprints []string `json:"fingerprints"`
Verified string `json:"verified"` // how it was verified, "" if not
}
KeysDTO describes host keys awaiting confirmation.
type LayoutDTO ¶ added in v0.4.0
type LayoutDTO struct {
SidebarWidth int `json:"sidebarWidth"`
SidebarHidden bool `json:"sidebarHidden"`
InspectorWidth int `json:"inspectorWidth"`
InspectorHidden bool `json:"inspectorHidden"`
StatusWidth int `json:"statusWidth"` // the session list's status column (0: its default)
SectionsOpen []string `json:"sectionsOpen"`
SectionsClosed []string `json:"sectionsClosed"`
}
LayoutDTO is the panes' widths (CSS pixels; the inspector's 0 is its default, which follows the window's width) and whether the user hid them, and the inspector's sections the user opened or closed.
type ListDTO ¶ added in v0.4.0
type ListDTO struct {
Decided bool `json:"decided"`
GroupBy string `json:"groupBy"`
SortBy string `json:"sortBy"`
SortReverse bool `json:"sortReverse"`
Density string `json:"density"`
CollapseInactive bool `json:"collapseInactive"`
Collapsed []string `json:"collapsed"`
Expanded []string `json:"expanded"`
Filter FilterDTO `json:"filter"`
}
ListDTO is the list's display. Decided is false until the app (on the first scan) or the user chose: the window then picks rows by how many sessions there are.
type LiveDTO ¶ added in v0.4.0
type LiveDTO struct {
Live bool `json:"live"`
Status string `json:"status"` // the entry's state words, as in a scan
Needs bool `json:"needs"`
App string `json:"app,omitempty"`
Name string `json:"name,omitempty"` // the name the running agent gives it
Places []PlaceDTO `json:"places"`
// RemoteControl and RemoteURL are as in EntryDTO.
RemoteControl string `json:"remoteControl,omitempty"`
RemoteURL string `json:"remoteUrl,omitempty"`
}
LiveDTO is how a session on this machine runs now.
type MachineDTO ¶
type MachineDTO struct {
Phase string `json:"phase,omitempty"`
CheckedAt time.Time `json:"checkedAt,omitempty"`
AccountSetupRequired bool `json:"accountSetupRequired"` // reachable remote without a persistent endpoint identity
Name string `json:"name"`
Status string `json:"status"`
Hint string `json:"hint"`
Error string `json:"error"`
OS string `json:"os"`
Sessions int `json:"sessions"`
Local bool `json:"local"`
Agents []string `json:"agents"` // "Claude Code 2.1.284"
AgentNames []string `json:"agentNames"` // detected agents, without versions or duplicate profiles
Hopsesh string `json:"hopsesh"` // hopsesh's version there ("" when not installed)
// Presence is how hopsesh works with the machine (app.Presence*; "" for this one).
Presence string `json:"presence,omitempty"`
// Receiving: hopsesh there runs in the login session and accepts sessions (the
// sidebar's green mark); Newest is the newest hopsesh on your machines when this one
// is older ("" otherwise).
Receiving bool `json:"receiving"`
Newest string `json:"newest,omitempty"`
}
MachineDTO summarises one scanned machine.
type MachineNoticeDTO ¶ added in v0.5.0
type MachineNoticeDTO struct {
Machine string `json:"machine"`
Kind string `json:"kind"` // no-hopsesh | older | protection
Title string `json:"title"`
Text string `json:"text"`
Action string `json:"action"`
Fingerprint string `json:"fingerprint"`
}
MachineNoticeDTO is one notice about another machine on the Sessions screen.
type MachineRow ¶
type MachineRow struct {
Name string `json:"name"`
Destination string `json:"destination"`
OS string `json:"os"`
Auth string `json:"auth"` // key | password
Keychain bool `json:"keychain"` // the password is remembered
CanRemember bool `json:"canRemember"`
Scanned bool `json:"scanned"` // the last scan reached for it
Scan MachineScan `json:"scan"`
Status string `json:"status"` // the last scan's (app.Status*)
Hint string `json:"hint"`
Error string `json:"error"`
Agents []string `json:"agents"`
Hopsesh string `json:"hopsesh"`
Sessions int `json:"sessions"`
// Storage is what each agent's sessions take there.
Storage []app.AgentUsage `json:"storage"`
// Presence is how hopsesh works with it (app.Presence*; "" before a scan reached it),
// and Can what that lets you do there.
Presence string `json:"presence,omitempty"`
PresenceWhy string `json:"presenceWhy,omitempty"`
Can []AbilityDTO `json:"can"`
}
MachineRow is a machine you added: how hopsesh logs in, and what the last scan found.
type MachineScan ¶ added in v0.4.0
type MachineScan struct {
Phase string `json:"phase"` // queued, scanning, done
Started string `json:"started,omitempty"`
Finished string `json:"finished,omitempty"`
Error string `json:"error,omitempty"`
}
MachineScan is separate from the last result: refreshing never erases what was previously found. Times are for presentation and scheduling, not transfer ordering.
type MachineSetupStep ¶ added in v0.5.0
MachineSetupStep is one such step.
type MachinesDTO ¶
type MachinesDTO struct {
DiscoveryError string `json:"discoveryError,omitempty"`
Here HereDTO `json:"here"`
Machines []MachineRow `json:"machines"`
Found []FoundRow `json:"found"`
// Clouds are the agents' clouds hopsesh can do something with, as the last scan found
// them (nil before a scan).
Clouds []CloudDTO `json:"clouds"`
}
MachinesDTO is the Machines screen.
type MirrorDTO ¶ added in v0.4.0
type MirrorDTO struct {
Cloud string `json:"cloud"`
URL string `json:"url"`
Host string `json:"host"` // "claude.ai"
}
MirrorDTO is a local session's copy on the vendor's site (Remote Control).
type NoteDTO ¶ added in v0.5.0
type NoteDTO struct {
Machine string `json:"machine"`
Title string `json:"title"`
Text string `json:"text"`
}
NoteDTO is something to know about a machine's sign-ins.
type OpenedDTO ¶ added in v0.4.0
type OpenedDTO struct {
// Where: here, terminal or shown.
Where string `json:"where"`
// Tab is the tab it runs in (here, shown).
Tab string `json:"tab,omitempty"`
// Notice says why it opened elsewhere than chosen ("Opened in Terminal instead: …").
Notice string `json:"notice,omitempty"`
}
OpenedDTO says where an entry point opened.
type Option ¶ added in v0.4.1
type Option func(*App)
Option configures service behavior before any discovery starts.
func WithoutSessionWatching ¶ added in v0.4.1
func WithoutSessionWatching() Option
WithoutSessionWatching lets headless fixture services publish changes explicitly. Desktop applications watch local session files by default.
type OptsDTO ¶
type OptsDTO struct {
Bounded bool `json:"bounded"`
NewReplica bool `json:"newReplica"`
TargetProfile string `json:"targetProfile"`
OperationID string `json:"operationId"`
TargetSession string `json:"targetSession"`
TargetDir string `json:"targetDir"`
Clone bool `json:"clone"`
ReposDir string `json:"reposDir"`
Worktree string `json:"worktree"`
Fork bool `json:"fork"`
RemoteControl bool `json:"remoteControl"`
Notify bool `json:"notify"`
Redact bool `json:"redact"`
SyncCode bool `json:"syncCode"`
Push bool `json:"push"`
StopLocal bool `json:"stopLocal"`
Conflict string `json:"conflict"` // "", "replace" or "keep-both"
App bool `json:"app"`
// Continuing in another agent.
Fidelity string `json:"fidelity"` // history | note
Native bool `json:"native"`
Note string `json:"note"`
Go bool `json:"go"`
CarryRules bool `json:"carryRules"`
RuleFiles []string `json:"ruleFiles"`
Via string `json:"via"` // "" or "import"
// This transfer only: a lower context budget (0: the setting) and how older history
// is carried ("": the setting).
ContextBudget int `json:"contextBudget"`
Older string `json:"older"`
// Bringing a session from a cloud: the branch only; add its work to the session it was
// handed off from.
CodeOnly bool `json:"codeOnly"`
Append bool `json:"append"`
}
OptsDTO are the choices on the plan screen.
type PasswordRequest ¶
type PasswordRequest struct {
ID string `json:"id"`
Machine string `json:"machine"`
Destination string `json:"destination"`
Retry bool `json:"retry"` // the last password was refused
CanRemember bool `json:"canRemember"` // the Keychain is available
Remember bool `json:"remember"` // the machine is set to remember it
}
PasswordRequest asks the window for a machine's password.
type PastedDTO ¶ added in v0.4.0
PastedDTO is a pasted cloud link, now a row (machine and key as the row's).
type PersonDTO ¶ added in v0.5.0
type PersonDTO struct {
ID string `json:"id"`
Email string `json:"email,omitempty"`
Initials string `json:"initials"`
Hue int `json:"hue"`
Labels []string `json:"labels"`
Where []string `json:"where"` // "This Mac: Claude desktop, Codex (terminal and app)"
Sessions int `json:"sessions"`
Machines int `json:"machines"`
RanOn []string `json:"ranOn"` // the machines its sessions are on ("This machine" first)
// Unknown: no tool hopsesh checks is signed in to it; Agent is whose account it is.
// Number tells unknown accounts of one agent apart (1, 2 ...); it is also its initials.
Unknown bool `json:"unknown,omitempty"`
Agent agent.ID `json:"agent,omitempty"`
Number int `json:"number,omitempty"`
}
PersonDTO is one account: an email, or one only seen in sessions' records.
type PlaceDTO ¶ added in v0.4.0
type PlaceDTO struct {
Kind string `json:"kind"` // presence.Kind
App string `json:"app,omitempty"` // its name for people ("VS Code")
Count int `json:"count"`
Waiting bool `json:"waiting,omitempty"`
}
PlaceDTO is one place a session on this machine is open in, besides the hopsesh Terminal window's tabs (the window knows those): a terminal app, the agent's desktop app, an editor, tmux or ssh.
type PlanDTO ¶
type PlanDTO struct {
EndDestinationToken string `json:"endDestinationToken,omitempty"`
ReviewNewSession bool `json:"reviewNewSession,omitempty"`
SourceEntry *EntryDTO `json:"sourceEntry,omitempty"`
SourceProfile string `json:"sourceProfile,omitempty"`
TargetProfile string `json:"targetProfile,omitempty"`
ResumeHere bool `json:"resumeHere,omitempty"` // already here: continue it where it is
NoWork bool `json:"noWork"`
Destinations []agent.Summary `json:"destinations,omitempty"`
Kind string `json:"kind"` // move | continue
Title string `json:"title"`
Agent string `json:"agent"` // the agent it lands in
FromAgent string `json:"fromAgent"` // the agent it comes from
SourceHost string `json:"sourceHost"`
SourceOS string `json:"sourceOs"`
SourceCWD string `json:"sourceCwd"`
TargetCWD string `json:"targetCwd"`
Live bool `json:"live"`
Repo move.RepoPlan `json:"repo"`
Mappings []agent.Mapping `json:"mappings"`
Files int `json:"files"`
Bytes int64 `json:"bytes"`
Sync string `json:"sync"`
FromSource bool `json:"syncFromSource"`
Push bool `json:"push"`
StopHere bool `json:"stopHere"`
Conflict string `json:"conflict"`
// HistoryChanged: the session's own history no longer matches what hopsesh recorded
// (the reason); the sheet offers to continue it as a separate conversation.
HistoryChanged string `json:"historyChanged,omitempty"`
Warnings []string `json:"warnings"`
Blockers []string `json:"blockers"`
// CannotProtect says why the original can't be blocked or warned on its machine: the
// sheet shows that option off, with these reasons and the fixes.
CannotProtect []string `json:"cannotProtect,omitempty"`
NewName string `json:"newName"`
OtherAcct bool `json:"otherAccount"`
Continue *ContinueDTO `json:"continue,omitempty"`
NativeCopy *move.NativeCopy `json:"nativeCopy,omitempty"`
Can CanDTO `json:"can"`
SetAside int `json:"setAside"`
Options move.Options `json:"-"`
SessionKey agent.SessionKey `json:"-"`
SourceAgent agent.ID `json:"sourceAgent"`
Machine string `json:"machine,omitempty"` // a push: the machine it goes to
Fetch *move.FetchPlan `json:"fetch,omitempty"` // bringing it from a cloud
}
PlanDTO is a plan as the window shows it.
type PresenceDTO ¶ added in v0.4.0
PresenceDTO is where this machine's sessions are open now, by machine + "\x00" + key. Other machines' sessions are read with their scans.
type PreviewDTO ¶ added in v0.4.0
type PreviewDTO struct {
Items []PreviewItemDTO `json:"items"`
More bool `json:"more"` // earlier messages exist
First *PreviewItemDTO `json:"first,omitempty"` // the first real prompt
// Note says why there is no preview ("Preview not available: laptop is slow to
// answer"); "" when there is one.
Note string `json:"note,omitempty"`
// Failed says the read did not finish (a slow or unreachable machine), so the window
// offers Try again.
Failed bool `json:"failed,omitempty"`
}
PreviewDTO is the end of a session's conversation for the inspector. Text is the agents' own words: the window shows it as text only.
type PreviewItemDTO ¶ added in v0.4.0
type PreviewItemDTO struct {
Role string `json:"role"` // user | agent | tools | compacted
Text string `json:"text"`
Time string `json:"time,omitempty"` // RFC 3339
}
PreviewItemDTO is one message, one turn's tool calls in words, or a compaction.
type ProtectionRowDTO ¶ added in v0.5.0
type ProtectionRowDTO struct {
Machine string `json:"machine"`
Local bool `json:"local"`
OS string `json:"os,omitempty"`
Presence string `json:"presence,omitempty"`
Hopsesh string `json:"hopsesh,omitempty"`
Protection *app.Protection `json:"protection,omitempty"`
Error string `json:"error,omitempty"`
}
ProtectionRowDTO is one machine in Settings › Machines: how hopsesh works with it, and, where hopsesh can check, its command, hooks and skill.
type QuickRoute ¶ added in v0.4.0
type ReopenDTO ¶ added in v0.7.0
type ReopenDTO struct {
At time.Time `json:"at"`
// Update: an update restarted the app, and the window reopens the tabs without asking.
Update bool `json:"update"`
Tabs []ReopenTab `json:"tabs"`
}
ReopenDTO is what the last quit left to reopen.
type ReopenTab ¶ added in v0.7.0
type ReopenTab struct {
Kind string `json:"kind"` // TabSession, or TabRemote: a terminal hopsesh runs on Machine
Machine string `json:"machine"`
Key string `json:"key,omitempty"`
Remote string `json:"remote,omitempty"` // TabRemote: the terminal there, which may still run
Agent string `json:"agent,omitempty"`
Title string `json:"title"`
Dir string `json:"dir,omitempty"`
// Working: its program was busy (a turn in progress, which the agent did not keep).
Working bool `json:"working,omitempty"`
}
ReopenTab is a session a tab ran when the app quit.
type ReopenedDTO ¶ added in v0.7.0
ReopenedDTO is what reopening did: the tabs it opened, and why the others did not.
type ScanDTO ¶
type ScanDTO struct {
Revision uint64 `json:"revision"`
Cached bool `json:"cached,omitempty"`
Discovering bool `json:"discovering,omitempty"`
Machines []MachineDTO `json:"machines"`
Groups []GroupDTO `json:"groups"`
ProfileCopies []GroupDTO `json:"profileCopies,omitempty"` // other native copies when grouped by account
Total int `json:"total"`
Peers []string `json:"peers"` // reached machines with hopsesh, a session here can be sent to
Updated string `json:"updated"` // when the scan finished (RFC 3339)
// Elsewhere is when the other machines and the clouds were last read (RFC 3339): the
// same as Updated, unless only this machine was read since (RefreshHere).
Elsewhere string `json:"elsewhere"`
Clouds []CloudDTO `json:"clouds"` // the clouds hopsesh can do something with
// Adopted are copies brought from a cloud that this scan picked up.
Adopted []BroughtDTO `json:"adopted"`
}
ScanDTO is the result of a scan.
type SettingsDTO ¶
type SettingsDTO struct {
Appearance string `json:"appearance"`
NoticeHooks []app.MovementHookStatus `json:"noticeHooks"`
NoticeHooksError string `json:"noticeHooksError,omitempty"`
MovementNotices bool `json:"movementNotices"` // the original is protected (block or advise)
Original string `json:"original"` // block | advise | off
Version string `json:"version"`
ReposDir string `json:"reposDir"`
Layout string `json:"layout"` // flat | ghq
SyncCode bool `json:"syncCode"`
PushSource bool `json:"pushSource"`
UpdateChk string `json:"updateCheck"`
AppIcons bool `json:"appIcons"` // installed desktop apps' icons picture the agents
Previews bool `json:"previews"` // the inspector shows the end of a conversation
Agents []AgentDTO `json:"agents"`
CLI integrate.CLIStatus `json:"cli"`
CLIReady bool `json:"cliReady"` // the skill and hooks can run hopsesh
Skill app.SkillReport `json:"skill"`
SkillBin string `json:"skillBin"`
SkillPrompt string `json:"skillPrompt"`
// SetUpIntegrations: setting hopsesh up on a machine also adds its hooks and skill.
SetUpIntegrations bool `json:"setUpIntegrations"`
LocalNetworkGated bool `json:"localNetworkGated"`
ConfigDir string `json:"configDir"`
StateDir string `json:"stateDir"`
}
SettingsDTO is everything the Settings screen shows.
type SettingsInput ¶
type SettingsInput struct {
// Nil preserves the current choice for callers changing unrelated settings.
Appearance *string `json:"appearance,omitempty"`
Original string `json:"original"` // block | advise | off ("" keeps the current choice)
Layout string `json:"layout"`
SyncCode bool `json:"syncCode"`
PushSource bool `json:"pushSource"`
UpdateChk string `json:"updateCheck"`
AppIcons bool `json:"appIcons"`
Previews bool `json:"previews"`
// SetUpIntegrations: nil keeps the current choice.
SetUpIntegrations *bool `json:"setUpIntegrations,omitempty"`
}
SettingsInput are the settings the user can change.
type SignInDTO ¶ added in v0.5.0
type SignInDTO struct {
Person string `json:"person,omitempty"` // PersonDTO.ID ("" unknown)
Email string `json:"email,omitempty"`
Folder string `json:"folder"` // "default" or the folder's name
Path string `json:"path"`
Profile string `json:"profile,omitempty"`
Status string `json:"status"` // signed-in, signed-out, unknown, failed
Detail string `json:"detail,omitempty"`
}
SignInDTO is who a tool is signed in as in one folder.
type SignedInDTO ¶ added in v0.4.0
type SignedInDTO struct {
Cloud string `json:"cloud"`
Title string `json:"title"`
Driver string `json:"driver"`
Test *CloudTestDTO `json:"test"`
}
SignedInDTO is a sign-in tab's end: the login checked again (the card's Test).
type TabDTO ¶ added in v0.4.0
type TabDTO struct {
Terminal string `json:"terminal"` // its name: "iTerm2"
}
TabDTO is where a running session's tab is: the terminal that has it.
type TabMeta ¶ added in v0.4.0
type TabMeta struct {
LaunchedKey string `json:"launchedKey,omitempty"`
Relationship *app.Relationship `json:"relationship,omitempty"`
Account string `json:"account,omitempty"`
Association string `json:"association,omitempty"`
Kind string `json:"kind"`
// Command is the program and its arguments, for people.
Command string `json:"command"`
// Agent names whose program it is ("Claude Code"; "" for a shell).
Agent string `json:"agent,omitempty"`
// Machine and Key are a session tab's row (or a bring-back's copy, once known).
Machine string `json:"machine,omitempty"`
Key string `json:"key,omitempty"`
// Cloud and CloudTitle are a step's, a bring-back's or a sign-in's cloud.
Cloud string `json:"cloud,omitempty"`
CloudTitle string `json:"cloudTitle,omitempty"`
// Journal is a bring-back's journal id (its done screen asks AdoptStatus by it).
Journal string `json:"journal,omitempty"`
// Saved is the title of the copy a bring-back saved here while its tab still runs it
// (Machine and Key are then that copy's: the tab is the session's).
Saved string `json:"saved,omitempty"`
// Link is a step's session link, once the module's reader found it after the step
// ended.
Link string `json:"link,omitempty"`
// External: the tab offers "Open in my terminal" (end it here and run the same command
// in the user's terminal app).
External bool `json:"external"`
// Rerun: the tab offers "Run again" once its program ended.
Rerun bool `json:"rerun"`
// Remote is the id of the terminal hopsesh runs on Machine (a TabRemote).
Remote string `json:"remote,omitempty"`
}
TabMeta is what the app knows about a tab besides its program's state.
type TabSetup ¶ added in v0.4.0
type TabSetup struct {
Meta TabMeta
// External ends tab id and runs its command in the user's terminal app (nil: the tab
// does not offer it); Exited is told once that its program ended.
External func(id string) error
Exited func(pty.Info)
// Background opens the tab without bringing the window forward: it comes forward when
// it waits for the user or fails (a hand-off's step, which may need nobody).
Background bool
}
TabSetup is what an entry point opens a tab with, besides the program.
type TargetDTO ¶ added in v0.5.0
type TargetDTO struct {
Machine string `json:"machine"`
Local bool `json:"local"`
Profile string `json:"profile"`
Folder string `json:"folder"` // "default" or its name
Path string `json:"path"`
Tool string `json:"tool"` // terminal | app
OpensIn string `json:"opensIn"`
OpensNote string `json:"opensNote,omitempty"`
RunsAs string `json:"runsAs,omitempty"` // an email, or "" unknown
Person string `json:"person,omitempty"`
Carries string `json:"carries"` // everything | conversation | unknown
CarriesWhy string `json:"carriesWhy,omitempty"`
Left string `json:"left"` // blocked | advised | unprotected | kept
LeftWhy string `json:"leftWhy,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Why string `json:"why,omitempty"`
Here bool `json:"here,omitempty"` // the session's own place: it continues where it is
}
TargetDTO is one place a session can continue: a machine, a folder there and a tool, who it runs as there, what of it carries over, and what becomes of the copy left behind.
type TermPrefs ¶ added in v0.4.0
type TermPrefs struct {
Collapsed []string `json:"collapsed"`
Placement string `json:"placement"`
Grouping string `json:"grouping"`
Appearance string `json:"appearance"`
Font string `json:"font"`
FontSize int `json:"fontSize"`
Scrollback int `json:"scrollback"`
ScreenReader bool `json:"screenReader"`
OS string `json:"os"`
// Home is the home folder (the window shortens paths under it to ~); TerminalName is
// the user's terminal app ("iTerm2"), for "Open in my terminal".
Home string `json:"home"`
TerminalName string `json:"terminalName"`
}
TermPrefs are the terminal window's settings, sent with the list of tabs.
type TermTab ¶ added in v0.4.0
type TermTab struct {
pty.Info
TabMeta
Revision uint64 `json:"revision"` // orders full metadata snapshots and removals
// Attention: the tab waits for the user (a bell or a notification from its program, a
// step that asks or stays quiet, a bring-back until it ends); it counts in "Needs you".
Attention bool `json:"attention"`
}
TermTab is a tab as the windows show it.
type TerminalAppNotice ¶ added in v0.4.0
TerminalAppNotice is a TerminalAppEvent: where it opened, and why not in the chosen one.
type TerminalAppsDTO ¶ added in v0.4.0
type TerminalAppsDTO struct {
Apps []termapp.Info `json:"apps"`
App string `json:"app"` // configured ("" automatic)
Using string `json:"using"` // the id launches open in now
Name string `json:"name"` // its name: "iTerm2"
Resume string `json:"resume"` // here | terminal | ask
}
TerminalAppsDTO is the terminal settings: the apps hopsesh can open launches in, the chosen one (and the one used, when that is not installed), and where sessions resume.
type TerminalSettingsDTO ¶ added in v0.4.0
type TerminalSettingsDTO struct {
Placement string `json:"placement"`
Grouping string `json:"grouping"`
TerminalAppsDTO
// Where is where sessions resume and steps run: here or terminal (the setting, or its
// default; the command line's "ask" is the default here).
Where string `json:"where"`
Default string `json:"default"` // config.AppResumeDefault
Font string `json:"font"`
FontSize int `json:"fontSize"`
Scrollback int `json:"scrollback"`
Scrollbacks []int `json:"scrollbacks"`
KeepTabs bool `json:"keepTabs"`
Notify bool `json:"notify"`
CloseEnded bool `json:"closeEnded"` // a tab closes once its program ended well
ScreenReader string `json:"screenReader"` // "" automatic, on, off
// SystemConsole (Windows): tabs use the system's pseudoconsole.
SystemConsole bool `json:"systemConsole"`
// Bundled: this app carries Microsoft's newer console host (Windows).
Bundled bool `json:"bundled"`
}
TerminalSettingsDTO is Settings → Terminal: where steps and resumes open, the user's terminal app, and the hopsesh Terminal window's look and behaviour.
type TerminalSettingsInput ¶ added in v0.4.0
type TerminalSettingsInput struct {
Grouping string `json:"grouping"`
App string `json:"app"`
Where string `json:"where"`
Font string `json:"font"`
FontSize int `json:"fontSize"`
Scrollback int `json:"scrollback"`
KeepTabs bool `json:"keepTabs"`
Notify bool `json:"notify"`
CloseEnded bool `json:"closeEnded"`
ScreenReader string `json:"screenReader"`
SystemConsole bool `json:"systemConsole"`
}
TerminalSettingsInput are the settings the user can change in Settings → Terminal.
type TerminalWorkspaceDTO ¶ added in v0.4.0
type Terminals ¶ added in v0.4.0
type Terminals struct {
SavePlacement func(string) error
SaveGrouping func(string, string, *bool) error
// Prefs are the window's settings (nil: defaults); SavePrefs stores what the window
// changed (a font size, the screen reader mode; nil: unchanged); Shell opens a shell
// tab in a folder ("" home) for the window's "+"; NotifyOn says whether desktop
// notifications are on. The App sets them.
Prefs func() TermPrefs
SavePrefs func(fontSize int, reader *bool)
Shell func(dir string) error
NotifyOn func() bool
// RaiseMain uses the desktop shell's readiness guard when it is attached.
RaiseMain func()
// AutoClose says whether a tab closes once its program ended well (Settings →
// Terminal; nil: on).
AutoClose func() bool
// Emit sends the app's window an event (the App's emit).
Emit func(name string, data any)
// contains filtered or unexported fields
}
Terminals holds the app's terminal tabs and their window.
func NewTerminals ¶ added in v0.4.0
NewTerminals is the app's tabs; version is hopsesh's.
func (*Terminals) Attach ¶ added in v0.4.0
func (t *Terminals) Attach(app *application.App)
Attach connects the tabs to the running app: its streams, and its window events.
func (*Terminals) CloseAll ¶ added in v0.4.0
func (t *Terminals) CloseAll()
CloseAll ends every tab (the app is quitting).
func (*Terminals) Gate ¶ added in v0.4.0
Gate is the asset middleware that isolates terminal windows (see the top of this file): requests from the app's own windows pass; any other window gets only what the terminal page needs, and its page a strict content security policy.
func (*Terminals) Open ¶ added in v0.4.0
Open opens a tab running spec's program, for what setup says, and shows it in the terminal window. Only hopsesh's own Go code calls it, with a program it chose, never with one a window sent: Terminals is not bound to the window.
func (*Terminals) Privileged ¶ added in v0.4.0
func (t *Terminals) Privileged(w *application.WebviewWindow)
Privileged marks a window as the app's own (its requests pass Gate); the first is the main window, which notifications and the terminal window's "back to sessions" raise.
func (*Terminals) Refresh ¶ added in v0.4.0
func (t *Terminals) Refresh()
Refresh sends both views their committed terminal preferences.
func (*Terminals) ServeList ¶ added in v0.4.0
ServeList serves one TerminalTabsStream connection known to come from the terminal window: the tabs and settings now and on every change, and the window's requests.
func (*Terminals) ServeTab ¶ added in v0.4.0
ServeTab serves one TerminalStream connection that is known to come from the terminal window (the app checks the window first; the browser tests have only that page).
func (*Terminals) Show ¶ added in v0.4.0
func (t *Terminals) Show()
Show opens the terminal window, or brings it to the front.
func (*Terminals) ShowMain ¶ added in v0.4.0
func (t *Terminals) ShowMain()
ShowMain brings the app's window to the front.
func (*Terminals) Toggle ¶ added in v0.4.0
func (t *Terminals) Toggle()
Toggle is Ctrl+`: from the terminal window back to the app's window, from anywhere else to the terminal window.
func (*Terminals) WindowOpen ¶ added in v0.4.0
WindowOpen reports whether the terminal window is open.
type ToolRowDTO ¶ added in v0.5.0
type ToolRowDTO struct {
Machine string `json:"machine"`
Local bool `json:"local"`
OS string `json:"os,omitempty"`
Presence string `json:"presence,omitempty"`
PresenceWhy string `json:"presenceWhy,omitempty"`
Hopsesh string `json:"hopsesh,omitempty"`
Checked time.Time `json:"checked,omitempty"`
Scanned bool `json:"scanned"`
Status string `json:"status,omitempty"`
Cells []CellDTO `json:"cells"`
}
ToolRowDTO is one machine's tools and who each is signed in as.
type UpdateDTO ¶
type UpdateDTO struct {
Latest string `json:"latest"`
Newer bool `json:"newer"`
URL string `json:"url"`
// CanInstall: this app can install the update itself (a release build, not managed by
// a package manager); otherwise the window offers the release page.
CanInstall bool `json:"canInstall"`
}
UpdateDTO is the result of an update check.
Source Files
¶
- accounts.go
- accounts_view.go
- activity.go
- appearance.go
- appearance_other.go
- assets.go
- cd.go
- clouds.go
- companion.go
- desktop.go
- discovery.go
- external.go
- families.go
- guard.go
- handoff.go
- history.go
- hop.go
- inspect.go
- layout.go
- list.go
- machine_scan.go
- machine_status.go
- machines.go
- move_targets.go
- movement.go
- notify.go
- notify_other.go
- password.go
- protection.go
- push.go
- remote_default.go
- remote_tabs.go
- reopen.go
- reviews.go
- service.go
- sessions.go
- settings.go
- shell_unix.go
- step.go
- tabs.go
- termapps.go
- terminal.go
- terminal_binding.go
- terminal_host.go
- termwindow.go