Wire opt-in sandbox trial into agent, require sandbox proof before OKF promote, add step_route/EFI/cost surfaces, style lint + quarantine, and offline policy optimize script—keeping GFM tables over json glue. Co-authored-by: Cursor <cursoragent@cursor.com>
1.3 KiB
1.3 KiB
title: agent-sandbox-okf — trial then commit description: > O1 example: opt-in sandbox trial with GFM-table returns and link-index reads. import agent:ext/ai/agent.mq.md import fs:lib/fs.mq.md
main
Short demo: write via agent.trial, prove the host is clean until commit.
had = fs.exists path="_example_sbx"
had
fs.remove path="_example_sbx"
_ = 0
fs.make_dir path="_example_sbx"
dry = agent.trial root="_example_sbx" write_path="note.txt" text=sandbox-okf commit=False dry_ok = ok dry_committed = committed
dry_ok- not
dry_committed> print text=dry-ok -
> print text=dry-bad-commit
print text=dry-fail
leaked = fs.exists path="_example_sbx/note.txt"
leaked
print text=host-leaked
print text=host-clean
wet = agent.trial root="_example_sbx" write_path="note.txt" text=sandbox-okf commit=True wet_ok = ok wet_committed = committed
wet_okwet_committed> print text=wet-ok-
> print text=wet-no-commit
print text=wet-fail
body = fs.read_text path="_example_sbx/note.txt"
body== "sandbox-okf"
print text=proof-visible
print text=proof-missing
pname = name
pname== "default"
print text=profile-default
print text=profile-other