041 sandbox agent

✓ Passing This code compiles and runs correctly.

Code

input.k

Supporting Files

sandbox/hello.txt

Actual

  agent> ls()
  world< {"branch":"","value":"hello.txt\n"}
  agent> tor sweep { path: string, text: string }
sweep = write(path, text)
  world< defined sweep
  agent> sweep(path: "invented.txt", text: "the agent wrote a verb")
  world< {"branch":"","value":"wrote"}
  agent> write(path: "../etc/evil", text: "pwn")
  world< {"branch":"","value":"<fenced>"}

Expected output

  agent> ls()
  world< {"branch":"","value":"hello.txt\n"}
  agent> tor sweep { path: string, text: string }
sweep = write(path, text)
  world< defined sweep
  agent> sweep(path: "invented.txt", text: "the agent wrote a verb")
  world< {"branch":"","value":"wrote"}
  agent> write(path: "../etc/evil", text: "pwn")
  world< {"branch":"","value":"<fenced>"}

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "sandbox", source: ls(1) read(1) write(1))
subflow ~turn click a branch to expand · @labels scroll to their anchor
model (n)
flow ~create click a branch to expand · @labels scroll to their anchor
create (id: "a", scope: "sandbox", world: "tests/regression/400_RUNTIME_FEATURES/440_RESOURCE_BRIDGE/440_041_sandbox_agent/world")

Test Configuration

MUST_RUN

Post-validation Script: