Skip to content

Implement Agent Machine local mount profiles for dev and document output roots #10

@mdheller

Description

@mdheller

Context

Agent Machine needs first-class local mount management for Mac/Windows/Linux Podman workspaces.

Immediate convention:

  • ~/dev is the shared code/repository root.
  • ~/Documents/SourceOS/agent-output is the default writeable document/report output root.

This must align with future TopoLVM-backed cluster-local persistent volume semantics without pretending TopoLVM is a cross-node shared filesystem.

Scope

Add CLI support under sourceosctl agent-machine:

sourceosctl agent-machine mounts plan --profile macos-podman
sourceosctl agent-machine mounts init --dev-root ~/dev --docs-root ~/Documents/SourceOS/agent-output --dry-run
sourceosctl agent-machine mounts inspect
sourceosctl agent-machine mounts evidence inspect <path>

Required behavior v0

  • Render a mount plan from AgentMachineLocalDataPlane and AgentMachineMountPolicy once schemas land.
  • Default to ~/dev as code root and ~/Documents/SourceOS/agent-output as document output root.
  • Create the docs output root only when explicitly requested; support --dry-run.
  • Mount code root into the agent container as /workspace/dev or declared equivalent.
  • Mount document output root into the agent container as /workspace/output or declared equivalent.
  • Deny host $HOME wholesale mounts.
  • Deny known sensitive directories by default: .ssh, .gnupg, browser profiles, keychains, cloud credentials, token stores, password stores.
  • Emit mount evidence containing host path, container path, access mode, git ref where applicable, policy hash, and denial summary.

Mac-specific posture

  • Do not attempt to manage APFS with TopoLVM.
  • For Mac/Podman, treat the Podman VM/container mount as the local workspace boundary.
  • Mac Notes/Reminders/Photos/Voice Memos/TextEdit-style integrations are future app doors, not default raw mounts.

Acceptance criteria

  • CLI help and tests added.
  • make validate passes.
  • Example profile uses placeholder paths, not user-specific secrets.
  • Deny-by-default tests cover sensitive paths.

Non-goals

  • Do not implement Kubernetes/TopoLVM controllers here.
  • Do not mount Photos, Notes, Reminders, Voice Memos, or app databases directly.
  • Do not store real local paths, tokens, credentials, or private keys in examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions