Documentation
¶
Overview ¶
Package mountmeta owns the mount-metadata sidecar files: which mache mounts/servers exist on this machine, written beside each mount point as <mount>.meta.json. Re-homed from cmd/agent.go (R4, mache-96c378): the MCP serve path registers its sidecar here too, and serve reaching upward into cmd for it was the scored cmd↔mcpserve import cycle. Process/sidecar state, not project config — deliberately NOT part of internal/projcfg, and it imports neither cmd nor projcfg.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentMountsDir ¶
AgentMountsDir returns (creating if needed) the shared mounts directory.
func IsProcessRunning ¶
IsProcessRunning checks if a process with the given PID is running.
func SaveMountMetadata ¶
func SaveMountMetadata(mountPoint string, meta *MountMetadata) error
SaveMountMetadata writes mount metadata to a sidecar file beside the mount point.
func SidecarPath ¶
SidecarPath returns the metadata sidecar path for a mount point. Stored beside the mount dir (not inside it) to avoid NFS conflicts.
Types ¶
type MountMetadata ¶
type MountMetadata struct {
PID int `json:"pid"`
Source string `json:"source"`
MountPoint string `json:"mount_point"`
Type string `json:"type,omitempty"` // "nfs", "fuse", "mcp-http", "mcp-stdio"
GitRepo string `json:"git_repo,omitempty"` // org/repo
GitBranch string `json:"git_branch,omitempty"` // branch name
GitRemote string `json:"git_remote,omitempty"` // full remote URL
Timestamp time.Time `json:"timestamp"`
Writable bool `json:"writable"`
Addr string `json:"addr,omitempty"` // listen address for MCP HTTP servers
}
MountMetadata stores information about an agent-mode mount.
func ListActiveMounts ¶
func ListActiveMounts() ([]*MountMetadata, error)
ListActiveMounts returns metadata for every sidecar in the mounts dir. Unreadable or unparseable sidecars are skipped, not fatal — a stale or half-written file must not hide the healthy mounts.
func LoadMountMetadata ¶
func LoadMountMetadata(mountPoint string) (*MountMetadata, error)
LoadMountMetadata reads mount metadata from the sidecar file.