[ [ { "text": "Reading the interface." }, { "tool": "read_file", "input": { "path": "README.md" } } ], [ { "tool": "list_files", "input": { "path": "/docs" } } ], [ { "tool": "write_file", "input": { "path": "main.air", "content": "broken" } } ], [ { "tool": "run", "input": { "command": "aji check main.air" } } ], [ { "tool": "write_file", "input": { "path": "main.air", "content": "module echo\nair 0\nlang 0.1\nfeatures [arrays, capabilities, effects, ownership, resources]\n\nfn @main(%in: cap, %out: cap) -> void\neffects [io.read, io.write]\nentry:\n %b = local.alloc array\n local.zero %b\n %m = borrow.mut %b\n %s = slice.make %m\n intrinsic io.stdin_read(%in, %s), ok -> @got, err -> @fail\ngot(%n: usize):\n %z = const.usize 0\n %part = slice.sub %s, %z, %n\n %pr = borrow.ref %part\n intrinsic io.stdout_write(%out, %pr), ok -> @done, err -> @fail2\ndone:\n borrow.end %pr\n borrow.end %part\n borrow.end %s\n borrow.end %m\n ret\nfail(%e: io_error):\n trap\nfail2(%e2: io_error):\n trap\n" } } ], [ { "tool": "run", "input": { "command": "sh test.sh" } } ], [ { "tool": "finish", "input": { "summary": "done" } } ] ]