Documentation
¶
Overview ¶
Cross-platform helpers for (Windows support). All branching on operating system goes through the `goos` package variable so tests can exercise both Unix and Windows code paths from any host (we develop on macOS but the CLI ships to Windows too). Things that genuinely cannot be exercised cross-platform (e.g. syscall.SysProcAttr.CreationFlags is only defined on Windows) live in `_windows.go` files behind `//go:build windows` and have build-tagged tests that run only on Windows CI. Everything else uses the `goos` indirection.
Package tool provides built-in tools as []goai.Tool values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultTools ¶
DefaultTools returns all built-in tools without filesystem containment. Use DefaultToolsIn to confine read/write/bash to a workdir.
func DefaultToolsIn ¶
DefaultToolsIn returns the built-in tool set with optional workdir containment. When workdir is non-empty (must be absolute), read and write reject paths that resolve outside it, and bash always runs with cmd.Dir = workdir regardless of any LLM-supplied working_directory. When workdir is empty, no containment is applied - equivalent to the pre-containment behavior. Callers wanting a sandbox should pass an absolute path. Note: bash containment is best-effort. The shell can still escape via `cd ..` mid-command, absolute pipes, or output redirection. True isolation requires an OS-level mechanism (bwrap/firejail/chroot) and is out of scope for this tool layer.
Types ¶
This section is empty.