Files
marqdo/examples/agent-sandbox-okf/index.mq.md
T
cflmyandCursor 0f72173d08 feat(ext/ai): land Agent/LLM optimize waves O1–O5
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>
2026-10-16 11:47:28 +08:00

1.3 KiB


main

Short demo: write via agent.trial, prove the host is clean until commit.

had = fs.exists path="_example_sbx"

  1. 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

  1. dry_ok
  2. not dry_committed > print text=dry-ok
> print text=dry-bad-commit

print text=dry-fail

leaked = fs.exists path="_example_sbx/note.txt"

  1. 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

  1. wet_ok
  2. wet_committed > print text=wet-ok
> print text=wet-no-commit

print text=wet-fail

body = fs.read_text path="_example_sbx/note.txt"

  1. body == "sandbox-okf"

print text=proof-visible

print text=proof-missing

pname = name

  1. pname == "default"

print text=profile-default

print text=profile-other