|
12 | 12 | fingerprint, |
13 | 13 | ai, |
14 | 14 | agents, |
| 15 | + agent_machine, |
15 | 16 | ) |
16 | 17 |
|
17 | 18 |
|
@@ -132,6 +133,67 @@ def build_parser() -> argparse.ArgumentParser: |
132 | 133 | ) |
133 | 134 | agents_sandbox_plan_p.set_defaults(func=agents.sandbox_plan) |
134 | 135 |
|
| 136 | + # --- agent-machine --- |
| 137 | + agent_machine_p = sub.add_parser("agent-machine", help="Agent Machine helpers") |
| 138 | + agent_machine_sub = agent_machine_p.add_subparsers( |
| 139 | + dest="agent_machine_command", metavar="<subcommand>" |
| 140 | + ) |
| 141 | + agent_machine_sub.required = True |
| 142 | + |
| 143 | + mounts_p = agent_machine_sub.add_parser("mounts", help="Agent Machine mount helpers") |
| 144 | + mounts_sub = mounts_p.add_subparsers(dest="agent_machine_mounts_command", metavar="<subcommand>") |
| 145 | + mounts_sub.required = True |
| 146 | + |
| 147 | + def add_mount_common(p): |
| 148 | + p.add_argument("--profile", default="macos-podman", help="Agent Machine profile name") |
| 149 | + p.add_argument("--dev-root", default="~/dev", help="Host code/repository root") |
| 150 | + p.add_argument( |
| 151 | + "--docs-root", |
| 152 | + default="~/Documents/SourceOS/agent-output", |
| 153 | + help="Host generated document/report output root", |
| 154 | + ) |
| 155 | + p.add_argument( |
| 156 | + "--downloads-root", |
| 157 | + default="~/Downloads/SourceOS/agent-downloads", |
| 158 | + help="Host scoped browser downloads root", |
| 159 | + ) |
| 160 | + |
| 161 | + mounts_plan_p = mounts_sub.add_parser("plan", help="Render mount plan (dry-run)") |
| 162 | + add_mount_common(mounts_plan_p) |
| 163 | + mounts_plan_p.set_defaults(func=agent_machine.mounts_plan) |
| 164 | + |
| 165 | + mounts_init_p = mounts_sub.add_parser("init", help="Render mount initialization plan (dry-run only)") |
| 166 | + add_mount_common(mounts_init_p) |
| 167 | + mounts_init_p.add_argument( |
| 168 | + "--dry-run", |
| 169 | + action="store_true", |
| 170 | + default=True, |
| 171 | + dest="dry_run", |
| 172 | + help="Print plan without creating directories or mounts (default: True)", |
| 173 | + ) |
| 174 | + mounts_init_p.set_defaults(func=agent_machine.mounts_init) |
| 175 | + |
| 176 | + mounts_inspect_p = mounts_sub.add_parser("inspect", help="Inspect default/local mount posture") |
| 177 | + add_mount_common(mounts_inspect_p) |
| 178 | + mounts_inspect_p.add_argument( |
| 179 | + "--include-downloads", |
| 180 | + action="store_true", |
| 181 | + default=False, |
| 182 | + help="Include scoped browser downloads mount in output", |
| 183 | + ) |
| 184 | + mounts_inspect_p.set_defaults(func=agent_machine.mounts_inspect) |
| 185 | + |
| 186 | + mounts_evidence_p = mounts_sub.add_parser("evidence", help="Mount evidence helpers") |
| 187 | + mounts_evidence_sub = mounts_evidence_p.add_subparsers( |
| 188 | + dest="agent_machine_mounts_evidence_command", metavar="<subcommand>" |
| 189 | + ) |
| 190 | + mounts_evidence_sub.required = True |
| 191 | + mounts_evidence_inspect_p = mounts_evidence_sub.add_parser( |
| 192 | + "inspect", help="Inspect an Agent Machine mount evidence JSON file" |
| 193 | + ) |
| 194 | + mounts_evidence_inspect_p.add_argument("path", help="Path to mount evidence JSON file") |
| 195 | + mounts_evidence_inspect_p.set_defaults(func=agent_machine.mounts_evidence_inspect) |
| 196 | + |
135 | 197 | return parser |
136 | 198 |
|
137 | 199 |
|
|
0 commit comments