Documentation
¶
Overview ¶
Package remote holds hopsesh's remote-behaviour scenarios: hopsesh here working with another machine over real SSH as it is, with no hopsesh, with hopsesh set up but nobody logged in, with hopsesh in the login session, with an older hopsesh, and unreachable. The other machine is a throwaway user of the same machine (scripts/remote-scenarios.sh sets it up); the scenarios run only when HOPSESH_REMOTE_SCENARIOS=1, so `go test ./...` stays hermetic. This file has the helpers, which are tested without SSH.
Index ¶
- func ClaudeSession(id, cwd, title string) []byte
- func ClaudeSlug(dir string) string
- func Crashed(out string) bool
- func KeptEndpointPath(stateDir, machine string) string
- func Lookup(doc []byte, path string) (any, bool)
- func ShQuote(s string) string
- func ValidEndpoint(s string) bool
- type Check
- type Machine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaudeSession ¶
ClaudeSession is a small Claude Code transcript (the fixtures' version) for id in cwd.
func ClaudeSlug ¶
ClaudeSlug is the folder Claude Code keeps a working folder's transcripts in.
func Crashed ¶
Crashed reports whether a command's output shows a Go panic or a fatal runtime error.
func KeptEndpointPath ¶
KeptEndpointPath is where hopsesh here keeps the identity of a machine without hopsesh (internal/app/endpoint_keeper.go): one file per configured machine name.
func Lookup ¶
Lookup follows a dotted path ("plan.unprotected") through a JSON document; ok is false when a step is missing.
func ValidEndpoint ¶
ValidEndpoint reports whether s is a persistent endpoint identity (32 bytes in hex).
Types ¶
type Machine ¶
type Machine struct {
Name string `json:"name"`
Local bool `json:"local"`
Status string `json:"status"`
Error string `json:"error"`
Hint string `json:"hint"`
Hopsesh string `json:"hopsesh"`
Presence string `json:"presence"`
PresenceWhy string `json:"presenceWhy"`
}
Machine is a machine of `hopsesh ls --json` (the fields the scenarios check).