Skip to main content
Toolchains | HarnessToolchains in the source-owned Harness documentation.Harnessreferenceharnessreferenceadopterdeveloperoperatorreference

Toolchains

Toolchain providers are discovered without executing probe commands. Dedicated tools run inside the declared substrate confinement and remain available when the generic run tool is not published. Custom specifications must be named explicitly with --toolchain-spec FILE.

go

Go through the installed GOROOT, with mutable caches in the workspace.

Project markers: go.mod, go.work.

Model context: go.version.

ToolParametersGeneric roleEffectsDescription
go_buildpackage: stringbuildprocess, filesystem, workspace write; high riskBuild Go packages with network and checksum lookup disabled.
go_testpackage: stringtestprocess, filesystem, workspace write; high riskRun Go tests with network and checksum lookup disabled.
go_vetpackage: stringcheckprocess, filesystem, workspace write; high riskRun go vet with network and checksum lookup disabled.
go_fmt_checkpaths: workspace-path-list (required)fmt_checkprocess, filesystem; high riskList explicitly named Go files that are not gofmt formatted.
go_fmtpaths: workspace-path-list (required)process, filesystem, workspace write; high riskFormat only the explicitly named Go source files.
go_benchpackage: stringprocess, filesystem, workspace write; high riskRun Go benchmarks with network and checksum lookup disabled.
go_runargs: string-list, package: stringprocess, filesystem, workspace write; high riskBuild and run one Go package with network lookup disabled.
go_fetchprocess, filesystem, workspace write; high riskResolve Go modules from already-present local data only.

npm

Root package.json scripts run with npm.

Project markers: package.json.

ToolParametersGeneric roleEffectsDescription
npm_runargs: string-list, script: enum (required)process, filesystem, workspace write; high riskRun one statically discovered package.json script with npm.

rust

Rust through the installed rustup stable toolchain, locked and offline.

Project markers: Cargo.toml.

Model context: rust.version.

ToolParametersGeneric roleEffectsDescription
rust_checkpackage: string, release: booleancheckprocess, filesystem, workspace write; high riskType-check the Rust workspace with the locked dependency graph, offline.
rust_buildpackage: string, release: booleanbuildprocess, filesystem, workspace write; high riskBuild the Rust workspace with the locked dependency graph, offline.
rust_testpackage: string, release: booleantestprocess, filesystem, workspace write; high riskRun Rust tests with the locked dependency graph, offline.
rust_clippypackage: string, release: booleanprocess, filesystem, workspace write; high riskRun Clippy offline and deny warnings.
rust_fmt_checkfmt_checkprocess, filesystem; high riskCheck Rust formatting without changing source files.
rust_fmtpaths: workspace-path-list (required)process, filesystem, workspace write; high riskFormat only the explicitly named Rust source files.
rust_benchpackage: string, release: booleanprocess, filesystem, workspace write; high riskRun Rust benchmarks offline.
rust_runargs: string-list, bin: string (required), package: string, release: booleanprocess, filesystem, workspace write; high riskBuild and run one named Rust binary offline.
rust_fetchprocess, filesystem, workspace write; high riskResolve the locked Rust dependency graph from the local cache only.

taskfile

Statically discovered public Taskfile tasks.

Project markers: Taskfile.yml, Taskfile.yaml, taskfile.yml, taskfile.yaml.

ToolParametersGeneric roleEffectsDescription
taskfile_runargs: string-list, task: enum (required)process, filesystem, workspace write; high riskRun one statically discovered public Taskfile task.

yarn

Root package.json scripts run with Yarn classic.

Project markers: package.json, yarn.lock.

ToolParametersGeneric roleEffectsDescription
yarn_runargs: string-list, script: enum (required)process, filesystem, workspace write; high riskRun one statically discovered package.json script with Yarn.

Custom specifications

Use toolchains validate FILE, then pass the same file with --toolchain-spec FILE. Custom providers are additive: provider, tool, mount, and context key collisions refuse the entire file. Specifications use typed argv segments and cannot contain shell strings or executable discovery probes.

version: 1
toolchains:
- name: example
description: Example checker
project:
all: [example.lock]
sandbox:
programs: [example]
env:
HOME: "{workspace}"
PATH: /usr/local/bin:/usr/bin:/bin
tools:
- name: example_test
description: Run the example tests.
role: test
workspace-writes: true
parameters:
package: { kind: string }
commands:
- argv: [example, test, { option: { name: --package, arg: package } }]

Project markers and JSON/YAML values are read beneath the canonical workspace. Installation roots may come from a named environment directory, a home-relative directory, or a program found on PATH; each root declares required files and is mounted read-only beneath /toolchain. Context facts are bounded scalar reads and enter the prompt only with expose-to-model: true.