From f83e409218df082b9544e1c6db9c5c4c755de643 Mon Sep 17 00:00:00 2001 From: can1357 Date: Mon, 13 Jul 2026 04:20:15 +0200 Subject: [PATCH] feat(coding-agent): added toggle for launch tool - Added a configuration setting `launch.enabled` to control the availability of the project-scoped launch tool. - Integrated the setting into the bash tool and tool registry to conditionally enable or disable the launch functionality. - Updated documentation and settings schema to include the new toggle. --- docs/settings.md | 3 ++- packages/coding-agent/CHANGELOG.md | 2 +- packages/coding-agent/src/config/settings-schema.ts | 11 +++++++++++ packages/coding-agent/src/tools/bash.ts | 2 +- packages/coding-agent/src/tools/index.ts | 1 + packages/coding-agent/test/tools/index.test.ts | 2 ++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index e385b1c8d..e56b620de 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -451,7 +451,7 @@ tools: | `tools.artifactTailBytes` | number | `20` | KB of tail kept inline on spill. | | `tools.artifactTailLines` | number | `500` | Max tail lines kept inline on spill. | -Individual built-in tools are toggled by their own keys, e.g. `bash.enabled`, `eval.py`, `eval.js`, `glob.enabled`, `grep.enabled`, `fetch.enabled`, `browser.enabled`, `astEdit.enabled`, `astGrep.enabled`, `web_search.enabled`, `inspect_image.enabled`. +Individual built-in tools are toggled by their own keys, e.g. `bash.enabled`, `launch.enabled`, `eval.py`, `eval.js`, `glob.enabled`, `grep.enabled`, `fetch.enabled`, `browser.enabled`, `astEdit.enabled`, `astGrep.enabled`, `web_search.enabled`, `inspect_image.enabled`. ### Shell, eval, and LSP @@ -481,6 +481,7 @@ lsp: | Key | Type | Default | Notes | |---|---|---|---| | `bash.enabled` | boolean | `true` | Enable the bash tool. | +| `launch.enabled` | boolean | `true` | Enable the launch tool for shared long-running project processes. | | `bash.autoBackground.enabled` | boolean | `false` | Auto-background long-running commands. | | `bash.autoBackground.thresholdMs` | number | `60000` | Threshold before auto-backgrounding. | | `eval.py` | boolean | `true` | Python eval backend. `PI_PY=0` disables for the process. | diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index cbd09bbd4..70087c4e8 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -8,7 +8,7 @@ - Added a compact session-only model picker (Alt+P) for quick model switching without changing roles - Added `@` search to the Alt+P / `/switch` picker: it lists configured Ctrl+P quick roles in matching segment colors and applies the selected role's model and thinking for the current session. - Redesigned Agent Hub entries as two-line cards: identity (status glyph, name, agent type, parent when nested) on the left, active model + reasoning level and age right-aligned, with the task description on its own line; dropped the redundant `sub ยท of Main` noise -- Added a project-scoped `launch` tool for shared long-running services and debuggers, with readiness probes, bounded logs, PTY input, restart policies, and automatic teardown after the last omp instance exits. +- Added a project-scoped `launch` tool for shared long-running services and debuggers, with readiness probes, bounded logs, PTY input, restart policies, and automatic teardown after the last omp instance exits. Gated behind the `launch.enabled` setting (default on); when disabled the tool is withdrawn and the bash prompt drops its "use launch" guidance. - Added `detached` `launch` starts for standalone services that survive every omp instance and broker shutdown, then reconnect to the next broker for logs and explicit stop. ### Changed diff --git a/packages/coding-agent/src/config/settings-schema.ts b/packages/coding-agent/src/config/settings-schema.ts index 9d73e3a96..dc1b419de 100644 --- a/packages/coding-agent/src/config/settings-schema.ts +++ b/packages/coding-agent/src/config/settings-schema.ts @@ -3549,6 +3549,17 @@ export const SETTINGS_SCHEMA = { }, }, + "launch.enabled": { + type: "boolean", + default: true, + ui: { + tab: "tools", + group: "Available Tools", + label: "Launch", + description: "Enable the launch tool for supervising shared long-running project processes", + }, + }, + "speechgen.enabled": { type: "boolean", default: false, diff --git a/packages/coding-agent/src/tools/bash.ts b/packages/coding-agent/src/tools/bash.ts index dfd150cf0..e272c230c 100644 --- a/packages/coding-agent/src/tools/bash.ts +++ b/packages/coding-agent/src/tools/bash.ts @@ -397,7 +397,7 @@ export class BashTool implements AgentTool { "astGrep.enabled": false, "astEdit.enabled": false, "bash.enabled": false, + "launch.enabled": false, "web_search.enabled": false, "browser.enabled": false, "inspect_image.enabled": false, @@ -246,6 +247,7 @@ describe("createTools", () => { const names = tools.map(t => t.name); expect(names).not.toContain("bash"); + expect(names).not.toContain("launch"); expect(names).not.toContain("glob"); expect(names).not.toContain("grep"); expect(names).not.toContain("ast_grep");