The single git tool — a thin, honest proxy to the host git binary.
ONE built-in Python function, git, runs git <args…> in the active
workspace root and returns a TOTAL, string-keyed result the model reads
directly: {"cmd", "args", "stdout", "stderr", "exit", "duration_ms", "timed_out", "timeout_secs"} — every key ALWAYS present (stderr "" when
empty, exit None only when the run timed out), so no field ever KeyErrors.
A non-zero exit is DATA, not a tool failure — the model reads it like it
would in a terminal.
This REPLACES the old JGit-backed git_* surface (foundation-git): no
embedded git implementation, no SSH/BouncyCastle stack — the only git is
the one already on the user's PATH, so behaviour matches their shell
exactly. Read-only workspace facts (branch/dirty/ahead-behind for the
footer, env block, file picker) still flow through
com.blockether.vis.internal.git; this namespace is purely the model-
facing command tool.
Built-in (bare git in the sandbox, next to cat/rg), gated to
activate only when the workspace sits inside a repository.
The single `git` tool — a thin, honest proxy to the host `git` binary.
ONE built-in Python function, `git`, runs `git <args…>` in the active
workspace root and returns a TOTAL, string-keyed result the model reads
directly: `{"cmd", "args", "stdout", "stderr", "exit", "duration_ms",
"timed_out", "timeout_secs"}` — every key ALWAYS present (`stderr` "" when
empty, `exit` None only when the run timed out), so no field ever KeyErrors.
A non-zero exit is DATA, not a tool failure — the model reads it like it
would in a terminal.
This REPLACES the old JGit-backed `git_*` surface (foundation-git): no
embedded git implementation, no SSH/BouncyCastle stack — the only git is
the one already on the user's PATH, so behaviour matches their shell
exactly. Read-only workspace facts (branch/dirty/ahead-behind for the
footer, env block, file picker) still flow through
`com.blockether.vis.internal.git`; this namespace is purely the model-
facing command tool.
Built-in (bare `git` in the sandbox, next to `cat`/`rg`), gated to
activate only when the workspace sits inside a repository.(git args)await git(["status", "--short"]) await git(["commit", "-m", "wip: message with spaces"])
Run the host git binary in the workspace root with the given args and return
its result. args is a LIST of literal tokens (each element is one git argument
— safe for commit messages / paths with spaces); a bare string is quote-aware
split for convenience.
Returns {"cmd", "args", "stdout", "stderr", "exit", "duration_ms", "timed_out", "timeout_secs"} — EVERY key is ALWAYS present, so index them directly ("stderr" is "" when empty, "exit" is None only when the run timed out).
Gotcha: a non-zero "exit" is DATA to read (like in a terminal), not a tool failure.
await git(["status", "--short"])
await git(["commit", "-m", "wip: message with spaces"])
Run the host `git` binary in the workspace root with the given args and return
its result. `args` is a LIST of literal tokens (each element is one git argument
— safe for commit messages / paths with spaces); a bare string is quote-aware
split for convenience.
Returns {"cmd", "args", "stdout", "stderr", "exit", "duration_ms", "timed_out", "timeout_secs"} — EVERY key is ALWAYS present, so index them directly ("stderr" is "" when empty, "exit" is None only when the run timed out).
Gotcha: a non-zero "exit" is DATA to read (like in a terminal), not a tool failure.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |