feat(coding-agent): add --no-tools flag to disable built-in tools

Add --no-tools flag that allows starting pi without any built-in tools,
enabling extension-only tool setups (e.g., pi-ssh-remote).

- Add --no-tools flag to CLI args parsing
- Handle --tools '' (empty string) as equivalent to no tools
- Fix system prompt to not show READ-ONLY mode when no tools (extensions may provide write capabilities)
- Add tests for new flag and system prompt behavior

fixes #555
This commit is contained in:
Carlos Villela 2026-01-07 23:10:58 -08:00
parent cfa63c255d
commit 8f5523ed56
No known key found for this signature in database
6 changed files with 123 additions and 15 deletions

View file

@ -170,6 +170,24 @@ describe("parseArgs", () => {
});
});
describe("--no-tools flag", () => {
test("parses --no-tools flag", () => {
const result = parseArgs(["--no-tools"]);
expect(result.noTools).toBe(true);
});
test("parses --no-tools with explicit --tools flags", () => {
const result = parseArgs(["--no-tools", "--tools", "read,bash"]);
expect(result.noTools).toBe(true);
expect(result.tools).toEqual(["read", "bash"]);
});
test("parses --tools with empty string", () => {
const result = parseArgs(["--tools", ""]);
expect(result.tools).toEqual([]);
});
});
describe("messages and file args", () => {
test("parses plain text messages", () => {
const result = parseArgs(["hello", "world"]);