Skip to content

BuiltInToolConfig

Defined in: core/dist/config/shell-policy.d.ts:36

CFG-18 — the per-tool config object carried as a value in the GthConfig.builtInTools registry (the object form’s values, alongside a bare boolean that enables/force-disables a tool). Heterogeneous by tool, modelled as one permissive object (all fields optional) rather than a discriminated union so the registry can carry every tool’s shape:

  • the fixed dev-command tools (run_tests/run_lint/run_build/run_single_test) read command — the shell command to run; its presence enables the tool;
  • run_shell_command reads the EXT-9/12 execution knobs (enabled/timeout/ maxOutputBytes);
  • gth_grep reads fileSet (GS2-51) — which corpus to search;
  • a plain built-in tool (gth_checklist, gth_web_fetch, …) reads enabled (or is toggled with a bare boolean in the registry).

CFG-26 — the APPROVAL knobs (allowlist, persistAllowlist, judge, yolo) are gone from here and live in the top-level ApprovalsConfig. They were fields of the object shared by EVERY built-in tool, so gth_grep: { yolo: true } used to validate; approvals are a property of the session, not of one tool’s registry entry.

optional command?: string

Defined in: core/dist/config/shell-policy.d.ts:45

The shell command for a fixed dev-command tool (run_tests/run_lint/run_build/run_single_test).


optional enabled?: boolean

Defined in: core/dist/config/shell-policy.d.ts:43

Enable / force-disable this tool. For run_shell_command the resolution is enabled ?? default (EXT-12: default ON in code mode, OFF elsewhere), so an object entry WITHOUT enabled still defaults ON in code; enabled: false is the hard escape hatch that disables it even in code. For a plain built-in tool, enabled: false removes it from the loaded set.


optional fileSet?: "all" | "gitignore"

Defined in: core/dist/config/shell-policy.d.ts:65

gth_grep (GS2-51): which corpus the content-search tool scans, applied consistently to BOTH execution engines (native ripgrep and the in-process JS fallback):

  • gitignore (DEFAULT) — respect .gitignore/.ignore and skip hidden dot-files. This is the best code-search UX and is already ripgrep’s own default, so rg-present machines see NO behaviour change; only the corpus selection becomes explicit.
  • all — scan everything except the noise dirs (node_modules/dist/.git/.idea); for rg this passes --no-ignore --hidden.

Example: { "builtInTools": { "gth_grep": { "fileSet": "all" } } }.

NOTE: under gitignore the JS fallback is a best-effort approximation (skip noise dirs + hidden dot-files); it does NOT parse arbitrary .gitignore rules the way rg does. See the residual rg-vs-JS divergence note in gthGrepTool.ts.


optional maxOutputBytes?: number

Defined in: core/dist/config/shell-policy.d.ts:49

run_shell_command: captured-output byte budget. See SHELL_DEFAULT_MAX_OUTPUT_BYTES.


optional timeout?: number

Defined in: core/dist/config/shell-policy.d.ts:47

run_shell_command: per-command wall-clock timeout (ms). See SHELL_DEFAULT_TIMEOUT_MS.