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 lean, string-keyed result the model reads
directly: {"cmd", "args", "stdout", "duration_ms"} plus "exit"
(when the process finished), "stderr" (when non-empty), and
"timed_out" (when it blew the timeout). 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 lean, string-keyed result the model reads
directly: `{"cmd", "args", "stdout", "duration_ms"}` plus `"exit"`
(when the process finished), `"stderr"` (when non-empty), and
`"timed_out"` (when it blew the timeout). 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", "duration_ms"} plus, only when meaningful (use .get): "exit", "stderr", "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", "duration_ms"} plus, only when meaningful (use .get): "exit", "stderr", "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 |