Skip to content

Commit ef15054

Browse files
committed
feat(config, cli, lifecycle, host-pipe, tools): update configuration structure to use clientWorkspace and host config files
1 parent 8da8146 commit ef15054

11 files changed

Lines changed: 173 additions & 248 deletions

File tree

docs/mcp-vs-lm-tools.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ These tools are under active development and may change significantly:
8787

8888
The active workspace for MCP tools is configured via:
8989

90-
1. CLI: `--test-workspace /path/to/workspace`
91-
2. Config: `.devtools/devtools.jsonc``"testWorkspace": "relative/or/absolute/path"`
90+
1. Config: `.devtools/host.config.jsonc``"clientWorkspace": "relative/or/absolute/path"`
9291

93-
The sidebar **Workspace Root** panel shows all Git repositories discovered by VS Code's Git extension. Selecting a repository writes its relative path to `.devtools/devtools.jsonc`.
92+
The sidebar **Workspace Root** panel shows all Git repositories discovered by VS Code's Git extension. Selecting a repository writes its relative path to `.devtools/host.config.jsonc`.
9493

9594
### LM Tool Toggles
9695

src/cli.ts

Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,9 @@ import type {YargsOptions} from './third_party/index.js';
88
import {yargs, hideBin} from './third_party/index.js';
99

1010
export const cliOptions = {
11-
// Primary arg: target workspace folder (the extension dev host opens this).
12-
// Also used as the base path for loading .devtools/devtools.jsonc.
13-
'test-workspace': {
14-
type: 'string',
15-
description:
16-
'Path to the target workspace folder. Configuration is loaded from .devtools/devtools.jsonc within this folder.',
17-
alias: 'w',
18-
},
19-
20-
// Path to the dev extension folder.
21-
// This is forwarded to the spawned VS Code instance as --extensionDevelopmentPath.
22-
extension: {
23-
type: 'string',
24-
description:
25-
'Path to the VS Code extension folder to load under development (vscode-devtools bridge). Overrides extensionPath in .devtools/devtools.jsonc.',
26-
alias: 'e',
27-
},
28-
29-
// Backwards-compatibility aliases (hidden from help)
30-
workspace: {
31-
type: 'string',
32-
description: '[LEGACY] Use --test-workspace instead.',
33-
hidden: true,
34-
},
35-
extensionDevelopmentPath: {
36-
type: 'string',
37-
description: '[LEGACY] Use --extension instead.',
38-
hidden: true,
39-
},
40-
41-
// Legacy args (kept for backwards compatibility, hidden from help)
42-
folder: {
43-
type: 'string',
44-
description: '[LEGACY] Use --test-workspace instead.',
45-
alias: 'f',
46-
hidden: true,
47-
},
48-
extensionBridgePath: {
49-
type: 'string',
50-
description:
51-
'[LEGACY] Override vscode-devtools extension path. Prefer setting extensionPath in .vscode/devtools.json.',
52-
alias: 'b',
53-
hidden: true,
54-
},
55-
targetFolder: {
56-
type: 'string',
57-
description:
58-
'[LEGACY] Use --test-workspace to point to the target folder directly.',
59-
alias: 't',
60-
hidden: true,
61-
},
6211
headless: {
6312
type: 'boolean',
64-
description: '[LEGACY] Set headless in .vscode/devtools.json instead.',
13+
description: 'Run VS Code headless (Linux only). Overrides client config.',
6514
default: false,
6615
hidden: true,
6716
},
@@ -77,7 +26,7 @@ export const cliOptions = {
7726
},
7827
devDiagnostic: {
7928
type: 'boolean',
80-
describe: '[LEGACY] Set devDiagnostic in .vscode/devtools.json instead.',
29+
describe: 'Enable extra diagnostic tools.',
8130
default: false,
8231
hidden: true,
8332
},
@@ -89,12 +38,8 @@ export function parseArguments(version: string, argv = process.argv) {
8938
.options(cliOptions)
9039
.example([
9140
[
92-
'$0 --test-workspace /path/to/project',
93-
'Start MCP server for a workspace (config from .devtools/devtools.jsonc)',
94-
],
95-
[
96-
'$0 -w /path/to/project',
97-
'Short form of --test-workspace',
41+
'$0',
42+
'Start MCP server (reads config from .devtools/host.config.jsonc)',
9843
],
9944
]);
10045

0 commit comments

Comments
 (0)