Documentation
¶
Overview ¶
Package browserinstance manages persistent Chromium browser profiles for web-mode panes. Profiles live in the project-local <workDir>/.rysh/browser-instances/ directory (sibling to rysh.config.yaml), alongside .rysh/mcp.json and .rysh/forge/. Unlike the rest of .rysh, this directory is exempt from session-delete cleanup so logged-in browser sessions survive workspace/session deletion.
rysh-cli does not render a browser; it only owns the on-disk profile directory and a small registry. The desktop app (rysh-cli-app) points its Chromium session storage at <workDir>/.rysh/browser-instances/ and uses the profile name as a persistent partition.
Index ¶
Constants ¶
const DefaultProfile = "default"
DefaultProfile is the profile name used when none is given to ##mode new web.
Variables ¶
This section is empty.
Functions ¶
func EnsureProfile ¶
EnsureProfile creates <workDir>/.rysh/browser-instances/<profile>/ (if absent) and records it in the registry. It returns the absolute profile directory.
func ProfileDir ¶
ProfileDir returns the on-disk directory for a single (sanitized) profile.
func RootDir ¶
RootDir returns the browser-instances root for a project rooted at workDir: <workDir>/.rysh/browser-instances.
func SanitizeProfile ¶
SanitizeProfile reduces a user-supplied profile name to a single safe path segment: path separators, "..", and surrounding dots/spaces are stripped so a profile can never escape RootDir. An empty result falls back to DefaultProfile.
Types ¶
type Profile ¶
Profile is a persisted browser-profile record (the on-disk session data lives in the sibling directory of the same name).
func LoadRegistry ¶
LoadRegistry reads the known-profiles registry. A missing file yields an empty slice with no error.