Skip to content

Commit bcb4bac

Browse files
committed
Wire guarded execution flags into sourceosctl CLI
1 parent 981bb72 commit bcb4bac

1 file changed

Lines changed: 60 additions & 3 deletions

File tree

sourceosctl/cli.py

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ def add_mount_common(p):
163163
add_mount_common(mounts_plan_p)
164164
mounts_plan_p.set_defaults(func=agent_machine.mounts_plan)
165165

166-
mounts_init_p = mounts_sub.add_parser("init", help="Render mount initialization plan (dry-run only)")
166+
mounts_init_p = mounts_sub.add_parser(
167+
"init", help="Render or execute guarded local directory materialization"
168+
)
167169
add_mount_common(mounts_init_p)
168170
mounts_init_p.add_argument(
169171
"--dry-run",
@@ -172,6 +174,23 @@ def add_mount_common(p):
172174
dest="dry_run",
173175
help="Print plan without creating directories or mounts (default: True)",
174176
)
177+
mounts_init_p.add_argument(
178+
"--execute",
179+
action="store_true",
180+
default=False,
181+
help="Create only explicitly-scoped output/download directories; does not create Podman mounts",
182+
)
183+
mounts_init_p.add_argument(
184+
"--policy-ok",
185+
action="store_true",
186+
default=False,
187+
help="Confirm Policy Fabric/operator approval for guarded local materialization",
188+
)
189+
mounts_init_p.add_argument(
190+
"--evidence-out",
191+
default=None,
192+
help="Optional path to write AgentMachineMountEvidence JSON",
193+
)
175194
mounts_init_p.set_defaults(func=agent_machine.mounts_init)
176195

177196
mounts_inspect_p = mounts_sub.add_parser("inspect", help="Inspect default/local mount posture")
@@ -236,7 +255,9 @@ def add_office_common(p):
236255
add_office_common(office_plan_p)
237256
office_plan_p.set_defaults(func=office.plan)
238257

239-
office_generate_p = office_sub.add_parser("generate", help="Render Office generation plan (dry-run only)")
258+
office_generate_p = office_sub.add_parser(
259+
"generate", help="Render or execute guarded Office text/Markdown/JSON generation"
260+
)
240261
add_office_common(office_generate_p)
241262
office_generate_p.add_argument("--template", default=None, help="Optional template reference")
242263
office_generate_p.add_argument("--prompt-ref", default=None, help="Optional prompt/context reference")
@@ -248,9 +269,28 @@ def add_office_common(p):
248269
dest="dry_run",
249270
help="Print generation plan without writing files (default: True)",
250271
)
272+
office_generate_p.add_argument(
273+
"--execute",
274+
action="store_true",
275+
default=False,
276+
help="Write txt/md/json artifacts only; Office binary generation remains disabled",
277+
)
278+
office_generate_p.add_argument(
279+
"--policy-ok",
280+
action="store_true",
281+
default=False,
282+
help="Confirm Policy Fabric/operator approval for guarded Office generation",
283+
)
284+
office_generate_p.add_argument(
285+
"--evidence-out",
286+
default=None,
287+
help="Optional path to write OfficeArtifactEvidence JSON",
288+
)
251289
office_generate_p.set_defaults(func=office.generate)
252290

253-
office_convert_p = office_sub.add_parser("convert", help="Render Office conversion plan (dry-run only)")
291+
office_convert_p = office_sub.add_parser(
292+
"convert", help="Render or execute guarded LibreOffice conversion"
293+
)
254294
office_convert_p.add_argument("input", help="Input Office artifact path")
255295
office_convert_p.add_argument("--to", required=True, help="Target format, e.g. pdf, docx, pptx")
256296
add_office_common(office_convert_p)
@@ -261,6 +301,23 @@ def add_office_common(p):
261301
dest="dry_run",
262302
help="Print conversion plan without writing files (default: True)",
263303
)
304+
office_convert_p.add_argument(
305+
"--execute",
306+
action="store_true",
307+
default=False,
308+
help="Run LibreOffice conversion under guarded local execution",
309+
)
310+
office_convert_p.add_argument(
311+
"--policy-ok",
312+
action="store_true",
313+
default=False,
314+
help="Confirm Policy Fabric/operator approval for guarded Office conversion",
315+
)
316+
office_convert_p.add_argument(
317+
"--evidence-out",
318+
default=None,
319+
help="Optional path to write OfficeArtifactEvidence JSON",
320+
)
264321
office_convert_p.set_defaults(func=office.convert)
265322

266323
office_inspect_p = office_sub.add_parser("inspect", help="Inspect an Office artifact file")

0 commit comments

Comments
 (0)