BLOCKODILE
Modules

The blockodile SDK

window.blockodile, injected into every web module.

blockodile injects a small script into your page before your own code runs. No import needed:

const { cwd, paneId, agentStatus } = await blockodile.call("ctx"); // folder + pane + agent state
const { items } = await blockodile.call("fs.list", { path: "." }); // [{ name, dir, size }], folders first
const text = await blockodile.call("fs.read", { path: "README.md" });
const r = await blockodile.call("shell.run", { command: "git status --short" }); // { code, stdout, stderr }

blockodile.onContext(({ cwd, agentStatus }) => refresh()); // pane switched or agent state changed
blockodile.theme.accent; // "#b6ff3b" and friends
MethodParamsReturns
ctx{ cwd, home, paneId, agentStatus } (agentStatus: working / idle / blocked / done / unknown)
fs.list{ path } relative to cwd or absolute{ path, items: [{ name, dir, size }] }
fs.read{ path }file contents as a string
fs.write{ path, content }overwrites the file
shell.run{ command } run with zsh -lc in cwd{ code, stdout, stderr }

Every call returns a promise; errors reject with a message. shell.run waits for the command to finish, so it is for short commands (git diff, ls), not servers: use a command module for long-running programs.