devworkspace 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +105 -26
- package/dist/cli/args.d.ts +10 -0
- package/dist/cli/args.js +3 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/help.js +15 -5
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/render.d.ts +2 -1
- package/dist/cli/render.js +71 -4
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/run.js +54 -36
- package/dist/cli/run.js.map +1 -1
- package/dist/core/artifacts.d.ts +32 -0
- package/dist/core/artifacts.js +46 -0
- package/dist/core/artifacts.js.map +1 -0
- package/dist/core/version.js +3 -0
- package/dist/core/version.js.map +1 -1
- package/dist/core/workspace.js +1 -0
- package/dist/core/workspace.js.map +1 -1
- package/dist/integrations/adapters/graphify.js +2 -1
- package/dist/integrations/adapters/graphify.js.map +1 -1
- package/dist/integrations/adapters/pluginSkill.js +15 -1
- package/dist/integrations/adapters/pluginSkill.js.map +1 -1
- package/dist/mcp/setup.d.ts +98 -5
- package/dist/mcp/setup.js +332 -82
- package/dist/mcp/setup.js.map +1 -1
- package/dist/mcp/tools.d.ts +6 -0
- package/dist/mcp/tools.js +67 -13
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/verify.d.ts +41 -0
- package/dist/mcp/verify.js +264 -0
- package/dist/mcp/verify.js.map +1 -0
- package/dist/services/doctor.js +64 -1
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/graph.d.ts +92 -4
- package/dist/services/graph.js +552 -191
- package/dist/services/graph.js.map +1 -1
- package/dist/services/setup.js +3 -0
- package/dist/services/setup.js.map +1 -1
- package/dist/services/taskContext.d.ts +20 -2
- package/dist/services/taskContext.js +29 -15
- package/dist/services/taskContext.js.map +1 -1
- package/dist/utils/proc.js +19 -3
- package/dist/utils/proc.js.map +1 -1
- package/docs/agents.md +2 -2
- package/docs/claude.md +13 -0
- package/docs/getting-started.md +40 -1
- package/docs/integrations.md +16 -1
- package/docs/mcp.md +46 -10
- package/docs/troubleshooting.md +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,59 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes are documented here. This project follows [Semantic Versioning](https://semver.org/). Workspace schema changes are called out under **Breaking**.
|
|
4
4
|
|
|
5
|
+
## [0.4.5] - 2026-11-19
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Google Antigravity User-Level MCP Automation (`--user`)**:
|
|
9
|
+
- Implemented automated user-level MCP configuration for Google Antigravity via `devworkspace setup --agent antigravity --user` (and `devworkspace mcp setup --agent antigravity --user`).
|
|
10
|
+
- Added robust directory discovery (`detectAntigravityUserConfigPath`) across Windows, Linux, and macOS (`~/.gemini/antigravity/mcp_config.json`, `~/.gemini/config/mcp_config.json`, or custom `ANTIGRAVITY_CONFIG_PATH`).
|
|
11
|
+
- Automatically appends `--cwd <projectRoot>` to the user-level server arguments so tools discover the workspace regardless of launch directory.
|
|
12
|
+
- Generates automatic timestamped backups (`.bak-<timestamp>`) before modifying existing user configurations, with atomic writes and automatic rollback on failure.
|
|
13
|
+
- Full dry-run support via `--check` / `--dry-run` to preview user configuration changes without writing to disk.
|
|
14
|
+
- **Graphify Offline Generation Fallback (`devworkspace graph generate`)**:
|
|
15
|
+
- Implemented offline code structure extraction creating Graphify-compatible `graphify-out/graph.json` without requiring Claude Code or network access.
|
|
16
|
+
- Extracts functions, classes (with `extends` and `implements`), interfaces, types, and imports from TypeScript (`.ts`, `.tsx`), JavaScript (`.js`, `.jsx`), and Python (`.py`).
|
|
17
|
+
- Generates deterministic node IDs and line-accurate references (`L...`), seamlessly verified on disk by `devworkspace graph trace <symbol>` and context ranking.
|
|
18
|
+
- Guards against overwriting native Graphify graphs unless `--force` is specified.
|
|
19
|
+
- Supports `--dry-run` preview and custom output locations with `--out <file>`.
|
|
20
|
+
- **Cross-Platform Hardening & Process Safety**:
|
|
21
|
+
- Enhanced `which()` in `src/utils/proc.ts` to directly resolve absolute and path-qualified binaries across all operating systems.
|
|
22
|
+
- Eliminated Node.js `DEP0190` deprecation warnings on Windows by avoiding unsafe shell invocations with array arguments and using shell-less `ComSpec` wrappers (`cmd.exe /d /s /c` with `windowsVerbatimArguments: true, shell: false`).
|
|
23
|
+
- **Integration Recovery & Diagnostic Advice**:
|
|
24
|
+
- Detected and diagnosed disabled native plugins (`claude plugin enable <id>`) and missing marketplaces (`claude plugin marketplace add <url> --scope project`).
|
|
25
|
+
- Enhanced graph absence notices across CLI and MCP tools to recommend running `devworkspace graph generate` for instant offline fallback.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- Replaced `child_process.exec` calls with safe runner execution without `shell: true`, ensuring clean exit code propagation and argument safety across Windows, Linux, and macOS.
|
|
29
|
+
- Hardened smoke tests and live MCP integration checks to avoid shell deprecation warnings.
|
|
30
|
+
|
|
31
|
+
## [0.4.4] - 2026-11-04
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- `setup --agent <name|auto>` is now a one-command onboarding: initializes a missing workspace, merges MCP config, re-validates it, and starts the configured server to check `initialize`, `tools/list` and real tool calls (`--no-verify` to skip). The report separates what was verified from what only the agent can confirm (approval, reload).
|
|
35
|
+
- Launcher policy: a `devworkspace` on PATH is used only when its version matches the running CLI; Windows `npx` is written as `cmd /c npx`. The chosen launcher and reason are reported.
|
|
36
|
+
- Graph edges carry Graphify `confidence` (EXTRACTED / INFERRED / unknown); only extracted edges between verified endpoints are `verified`.
|
|
37
|
+
- Graphify location is resolved centrally (`src/core/artifacts.ts`): root `graphify-out/` (tool-owned) or `.devworkspace/graph/graphify/graphify-out/` (from `graphify extract --out`); doctor reports the layout and warns on duplicates. `.devworkspace/.gitignore` gains `graph/`.
|
|
38
|
+
- Extracted edges are checked against their own source line (`sourceCheck`); a line that no longer mentions the endpoints demotes the edge to unverified.
|
|
39
|
+
- The npx launcher pins published copies to their own version, rejects unsafe `--package-version` values, and ignores a PATH entry that is only the project's `node_modules/.bin`. `setup --agent` on a bare repository also analyzes it.
|
|
40
|
+
- `get_file_context` suggests confirmed package manifests when a root manifest is missing in a multi-package repo.
|
|
41
|
+
|
|
42
|
+
### Security
|
|
43
|
+
|
|
44
|
+
- The live MCP check starts the server with an explicit environment allowlist instead of the full parent environment; unrelated credentials are no longer inherited (`DEVWORKSPACE_VERIFY_ENV` opts extra variables in).
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
- **Codex** now gets `.codex/config.toml` (`[mcp_servers.devworkspace]`, the documented project-scoped format) instead of a root `mcp.json` that Codex does not read. **Antigravity** MCP config is user-level, so setup writes no project files for it and prints the exact entry to add. `doctor` flags the old files; nothing is deleted.
|
|
48
|
+
- Live check now also calls `check_mcp_health`, runs with the environment an agent would provide (npm-injected variables such as `npm_config_package` are dropped), and, when the Claude Code CLI is installed, reports what it sees (`pending-approval` / `connected` / `failed`).
|
|
49
|
+
- `setup --agent` prints a plan (files and launcher) before writing; the report shows which CLI ran (version, path, how installed).
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
- Live check cleanup: an early-exiting server no longer risks an unhandled EPIPE, and on POSIX the whole process group (npx and the server) is ended. Setup now reports when the started server's version differs from the CLI's, and warns that a Windows `cmd /c` launcher in a shared file is not portable.
|
|
53
|
+
- An installed `node_modules/devworkspace` copy was classified as a source checkout, so its launcher was never version-pinned.
|
|
54
|
+
- Graphify nodes using `source_file` / `label` / `source_location` now resolve to their source file and line (unsafe paths are rejected).
|
|
55
|
+
- `trace_symbol_dependencies` / `graph trace` enforce `maxNodes` during neighbour expansion and report truncation.
|
|
56
|
+
- Task-context graph matching uses deterministic token-based scoring instead of first-hit substring matching (no more `erp` -> `PageHeaderProps`); `get_task_context` graph nodes report `nodeType` separately from source `status`.
|
|
57
|
+
|
|
5
58
|
## [0.4.3] - 2026-11-04
|
|
6
59
|
|
|
7
60
|
### Added
|
package/README.md
CHANGED
|
@@ -4,10 +4,15 @@ DevWorkspace is a **local-first engineering memory and verification layer** for
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
cd my-project
|
|
7
|
-
npx devworkspace
|
|
8
|
-
npx devworkspace analyze
|
|
7
|
+
npx devworkspace setup --agent auto # detects your agent; or name it: claude-code | codex | antigravity | all
|
|
9
8
|
```
|
|
10
9
|
|
|
10
|
+
One command initializes and analyzes the workspace if needed, writes the agent's MCP configuration, starts the MCP server and calls its tools to prove it works, and tells you exactly what is left (usually: reload the agent and approve the server). Requires Node.js 20.11+; see [Quick Start](#quick-start) for details, optional integrations and recovery.
|
|
11
|
+
|
|
12
|
+
This is the same on Windows PowerShell, `cmd.exe`, macOS and Linux. It runs the **published** package; to try a local checkout instead, build it (`npm run build`) and run `node <checkout>/dist/cli/main.js setup --agent claude-code` inside the target project (an unpublished build is left unpinned in `.mcp.json`, so the agent will still start the latest *published* release unless you pass `--package-version`).
|
|
13
|
+
|
|
14
|
+
`setup --agent … --no-verify` is configuration-only (for CI/offline) and says plainly that the server was not started.
|
|
15
|
+
|
|
11
16
|
---
|
|
12
17
|
|
|
13
18
|
## What Problem Does It Solve?
|
|
@@ -55,7 +60,7 @@ Before setting up DevWorkspace, verify the following system requirements:
|
|
|
55
60
|
- **AI Coding Agent**: A supported coding agent, such as **Claude Code**, **Cursor**, **GitHub Copilot**, **OpenAI Codex**, or **Google Antigravity**.
|
|
56
61
|
- **Optional Integrations Prerequisites**: If you choose to install optional helper tools such as **Graphify**, you will need **Python 3.10+** (or `uv` / `pipx`). Python is **not** required for DevWorkspace core functionality, CLI commands, or MCP tools.
|
|
57
62
|
|
|
58
|
-
### Step 2:
|
|
63
|
+
### Step 2: Core Initialization & Repository Analysis
|
|
59
64
|
|
|
60
65
|
Navigate to your project root and run:
|
|
61
66
|
|
|
@@ -72,7 +77,7 @@ What these commands do:
|
|
|
72
77
|
- `.devworkspace/context/facts.json`: Detected repository facts (ecosystems, package manager, frameworks).
|
|
73
78
|
- `.devworkspace/analysis/onboarding-prompt.md`: An optional onboarding prompt you can paste into Claude Code to review findings and record baseline knowledge.
|
|
74
79
|
|
|
75
|
-
### Step 3: Configure Your Coding Agent
|
|
80
|
+
### Step 3: Configure Your Coding Agent (MCP and/or Instructions)
|
|
76
81
|
|
|
77
82
|
DevWorkspace provides two distinct ways to equip coding agents with repository context. You can use either or both:
|
|
78
83
|
|
|
@@ -82,25 +87,25 @@ DevWorkspace provides two distinct ways to equip coding agents with repository c
|
|
|
82
87
|
> [!NOTE]
|
|
83
88
|
> Installing file-based agent instructions and configuring MCP are separate operations. Both can be configured in the same repository and coexist seamlessly without conflict.
|
|
84
89
|
|
|
85
|
-
#### Option A: Configure MCP (Claude Code, Codex, Antigravity)
|
|
90
|
+
#### Option A: Configure MCP Server (Claude Code, Codex, Antigravity)
|
|
86
91
|
|
|
87
|
-
Generate the agent's MCP configuration and rule references:
|
|
92
|
+
Generate the agent's MCP configuration and rule references. DevWorkspace automatically detects whether to use direct execution or `npx` without requiring manual JSON edits:
|
|
88
93
|
|
|
89
94
|
```bash
|
|
90
95
|
# For Claude Code (writes .mcp.json and managed section in CLAUDE.md)
|
|
91
96
|
npx devworkspace setup --agent claude-code
|
|
92
97
|
|
|
93
|
-
# For OpenAI Codex (writes
|
|
98
|
+
# For OpenAI Codex (writes .codex/config.toml and a managed section in AGENTS.md)
|
|
94
99
|
npx devworkspace setup --agent codex
|
|
95
100
|
|
|
96
|
-
# For Google Antigravity (
|
|
97
|
-
npx devworkspace setup --agent antigravity
|
|
101
|
+
# For Google Antigravity (user-level config: ~/.gemini/.../mcp_config.json)
|
|
102
|
+
npx devworkspace setup --agent antigravity --user
|
|
98
103
|
|
|
99
104
|
# Or configure all supported MCP agents at once:
|
|
100
105
|
npx devworkspace setup --agent all
|
|
101
106
|
```
|
|
102
107
|
|
|
103
|
-
*(Pass `--check` to preview planned file edits without modifying disk: `npx devworkspace setup --agent claude-code --check`.)
|
|
108
|
+
*(Pass `--check` to preview planned file edits without modifying disk: `npx devworkspace setup --agent claude-code --check`. Override launcher mode if desired with `--launcher auto|direct|npx`).*
|
|
104
109
|
|
|
105
110
|
#### Option B: Install File-Based Agent Instructions (Cursor, Copilot, Codex, Claude)
|
|
106
111
|
|
|
@@ -125,7 +130,7 @@ npx devworkspace agent install --agent all
|
|
|
125
130
|
|
|
126
131
|
*(Pass `--dry-run` to preview changes: `npx devworkspace agent install --agent all --dry-run`.)*
|
|
127
132
|
|
|
128
|
-
### Step 4: Install Optional Integrations (Optional)
|
|
133
|
+
### Step 4: Install Optional Helper Integrations (Optional)
|
|
129
134
|
|
|
130
135
|
DevWorkspace can orchestrate external developer tools to expand your agent's capabilities:
|
|
131
136
|
- **[Graphify](https://github.com/Graphify-Labs/graphify)**: Structural code knowledge graphs for call hierarchies, imports, and symbol dependencies.
|
|
@@ -147,7 +152,7 @@ npx devworkspace setup --integrations --yes
|
|
|
147
152
|
|
|
148
153
|
*(You can limit installation to specific tools using `--only graphify` or `--only graphify,agent-skills`.)*
|
|
149
154
|
|
|
150
|
-
### Step 5:
|
|
155
|
+
### Step 5: Agent Reload & Restart Requirements
|
|
151
156
|
|
|
152
157
|
When DevWorkspace installs native plugins or skills for Claude Code (such as Graphify or Agent Skills), the agent's running process must load them into memory:
|
|
153
158
|
|
|
@@ -175,6 +180,20 @@ Installing the Graphify CLI and its project skill does **not** automatically bui
|
|
|
175
180
|
/graphify .
|
|
176
181
|
```
|
|
177
182
|
*Generating the graph uses the model to analyze ASTs, symbols, and relationships. It may take several minutes depending on repository size.*
|
|
183
|
+
|
|
184
|
+
> [!IMPORTANT]
|
|
185
|
+
> **If Claude Code reports `"/graphify" isn't installed in this session`:**
|
|
186
|
+
> Claude Code indexes skills (`.claude/skills/`) and slash commands only when the session starts.
|
|
187
|
+
> 1. **Ensure the project skill exists on disk:** If `npx devworkspace doctor` reports `X Claude skill: missing` or `DEGRADED (cli without project skill)`, run:
|
|
188
|
+
> ```bash
|
|
189
|
+
> npx devworkspace setup --integrations --yes
|
|
190
|
+
> ```
|
|
191
|
+
> *(This executes `graphify install --project` to generate `.claude/skills/graphify/SKILL.md` and configure hooks).*
|
|
192
|
+
> 2. **Reload the session:** If your Claude Code session was already open when the skill was installed, reload it so the agent detects the new skill:
|
|
193
|
+
> - In Claude Code, run: `/reload-plugins`
|
|
194
|
+
> - Or restart your Claude Code session / restart VS Code.
|
|
195
|
+
> 3. **Run `/graphify .` again** to generate the graph.
|
|
196
|
+
|
|
178
197
|
3. **Verify the Graph**: Exit back to your terminal and check graph status:
|
|
179
198
|
```bash
|
|
180
199
|
npx devworkspace graph status
|
|
@@ -187,7 +206,7 @@ Installing the Graphify CLI and its project skill does **not** automatically bui
|
|
|
187
206
|
**Fallback Guidance When Graphify is Not Used:**
|
|
188
207
|
If Graphify is not installed or `graphify-out/graph.json` has not been built, DevWorkspace continues to operate normally. MCP tools like `trace_symbol_dependencies` gracefully detect the absence of the graph, notify the agent that the knowledge graph is unavailable, and provide direct file paths to inspect instead.
|
|
189
208
|
|
|
190
|
-
### Step 7: Verify
|
|
209
|
+
### Step 7: Verify Health and MCP Connectivity
|
|
191
210
|
|
|
192
211
|
Run the comprehensive health check to verify your setup:
|
|
193
212
|
|
|
@@ -201,8 +220,16 @@ And if you installed optional integrations:
|
|
|
201
220
|
npx devworkspace integrations status
|
|
202
221
|
```
|
|
203
222
|
|
|
223
|
+
**Verifying MCP Connectivity & Launcher Status:**
|
|
224
|
+
- When an MCP agent is configured, `devworkspace doctor` automatically inspects `.mcp.json`, `mcp.json`, or `.antigravity/mcp.json` and verifies that the configured launcher executable (`devworkspace` or `npx`) can be resolved in your current environment:
|
|
225
|
+
`✓ PASS Configured MCP launcher is resolvable (command)`
|
|
226
|
+
- Inside your interactive coding agent session, verify end-to-end tool connectivity by invoking the built-in diagnostic tool:
|
|
227
|
+
`check_mcp_health`
|
|
228
|
+
- Or prompt your agent to inspect project architecture using:
|
|
229
|
+
`"Use get_project_overview to inspect this project."`
|
|
230
|
+
|
|
204
231
|
**Understanding the Output Terminology:**
|
|
205
|
-
- **`Core workspace: READY`** (or `HEALTHY`): All core checks pass—`.devworkspace/` is valid, verification commands match manifests,
|
|
232
|
+
- **`Core workspace: READY`** (or `HEALTHY`): All core checks pass—`.devworkspace/` is valid, verification commands match manifests, agent instruction files are intact, and MCP launchers resolve.
|
|
206
233
|
- **Integrations Statuses (reported independently from core)**:
|
|
207
234
|
- **`VERIFIED`**: The tool was executed and all documented capabilities checked out.
|
|
208
235
|
- **`NOT_INSTALLED`**: Optional integration is absent. This is normal if you did not install it.
|
|
@@ -248,14 +275,37 @@ npx devworkspace integrations status
|
|
|
248
275
|
npx devworkspace integrations status --restarted
|
|
249
276
|
```
|
|
250
277
|
|
|
251
|
-
### macOS & Linux
|
|
278
|
+
### macOS & Linux Setup Example
|
|
252
279
|
|
|
253
280
|
```bash
|
|
281
|
+
# 1. Navigate to your project folder
|
|
254
282
|
cd ~/projects/sample-app
|
|
283
|
+
|
|
284
|
+
# 2. Initialize and discover repository structure
|
|
255
285
|
npx devworkspace init && npx devworkspace analyze
|
|
286
|
+
|
|
287
|
+
# 3. Configure your agent (choose MCP, file-based instructions, or both)
|
|
288
|
+
# Option A: Configure MCP for Claude Code
|
|
256
289
|
npx devworkspace setup --agent claude-code
|
|
290
|
+
|
|
291
|
+
# Option B: Install instructions for Cursor, Copilot, Codex, or Claude
|
|
257
292
|
npx devworkspace agent install --agent all
|
|
293
|
+
|
|
294
|
+
# 4. Optional: Install Graphify, Agent Skills & Ponytail (requires Python 3.10+ / uv)
|
|
295
|
+
npx devworkspace setup --integrations --yes
|
|
296
|
+
|
|
297
|
+
# 5. Verify core health, MCP launcher, and integration status
|
|
258
298
|
npx devworkspace doctor
|
|
299
|
+
npx devworkspace integrations status
|
|
300
|
+
|
|
301
|
+
# 6. If Graphify was installed, build the knowledge graph inside Claude Code:
|
|
302
|
+
# NOTE: Run this inside an interactive Claude Code session, not your terminal!
|
|
303
|
+
# (If Claude Code was already open, run /reload-plugins first)
|
|
304
|
+
# claude
|
|
305
|
+
# > /graphify .
|
|
306
|
+
|
|
307
|
+
# 7. Acknowledge agent restart after reloading Claude Code
|
|
308
|
+
npx devworkspace integrations status --restarted
|
|
259
309
|
```
|
|
260
310
|
|
|
261
311
|
---
|
|
@@ -291,11 +341,11 @@ DevWorkspace includes a local-first Model Context Protocol (MCP 2024-11-05) serv
|
|
|
291
341
|
# Configure Claude Code (.mcp.json and CLAUDE.md)
|
|
292
342
|
npx devworkspace setup --agent claude-code
|
|
293
343
|
|
|
294
|
-
# Configure OpenAI Codex (
|
|
344
|
+
# Configure OpenAI Codex (.codex/config.toml and AGENTS.md)
|
|
295
345
|
npx devworkspace setup --agent codex
|
|
296
346
|
|
|
297
|
-
#
|
|
298
|
-
npx devworkspace setup --agent antigravity
|
|
347
|
+
# Antigravity: user-level mcp_config.json with explicit --user opt-in (creates backup)
|
|
348
|
+
npx devworkspace setup --agent antigravity --user
|
|
299
349
|
|
|
300
350
|
# Configure all supported MCP agents at once
|
|
301
351
|
npx devworkspace setup --agent all
|
|
@@ -307,6 +357,30 @@ npx devworkspace setup --agent claude-code --check
|
|
|
307
357
|
devworkspace mcp serve
|
|
308
358
|
```
|
|
309
359
|
|
|
360
|
+
### What `setup --agent` does, and what it cannot verify
|
|
361
|
+
|
|
362
|
+
`npx devworkspace setup --agent <claude-code|codex|antigravity|all|auto>` runs, in order: workspace initialization (only if missing) → launcher selection → config merge (other MCP servers and your own instructions are preserved; re-running is a no-op) → re-validation of the written JSON → a live start of the configured server (`initialize`, `tools/list`, `get_project_overview`, `get_task_context`). Each stage is reported separately. Use `--check` to preview without writing and `--no-verify` to skip the live start.
|
|
363
|
+
|
|
364
|
+
That live check exercises the server **on its own**. Registration, approval and connection **inside your agent** cannot be verified from outside: Claude Code asks you to approve project-scoped servers (check with `/mcp`), and Codex/Antigravity need a restart to reload their configuration. If a stage fails, the report names it (launch, initialize, tools list, tool call, context) with the fix; setup is safe to re-run.
|
|
365
|
+
|
|
366
|
+
### Automatic Launcher Selection & CLI Flags
|
|
367
|
+
|
|
368
|
+
When you configure an MCP agent via `npx devworkspace setup --agent <name>` (or `devworkspace mcp setup --agent <name>`), DevWorkspace automatically inspects your environment and selects the appropriate launcher strategy:
|
|
369
|
+
|
|
370
|
+
- **Direct Global Binary (`command: "devworkspace"`, `args: ["mcp", "serve"]`):** Used when `devworkspace` is on `PATH`, is not running from a temporary npx cache, **and** reports the same version as the CLI you are running. A different installed version is not trusted; setup falls back to `npx`.
|
|
371
|
+
- **npx Launcher (`command: "npx"`, `args: ["-y", "devworkspace", "mcp", "serve"]`):** Used when no matching executable is found. On Windows the entry is written as `cmd /c npx ...`, because clients cannot spawn `npx.cmd` directly.
|
|
372
|
+
- The chosen launcher and the reason are printed by setup. No source-checkout paths are ever written to config.
|
|
373
|
+
|
|
374
|
+
Supported CLI options for MCP configuration:
|
|
375
|
+
- `--launcher auto`: Default automatic environment detection.
|
|
376
|
+
- `--launcher direct`: Force direct executable launcher (`"command": "devworkspace"`).
|
|
377
|
+
- `--launcher npx`: Force `npx` launcher (`"command": "npx"`).
|
|
378
|
+
- `--package-version <version>`: Explicitly pin an npm package version in npx mode (e.g. `--package-version 0.4.3` produces `devworkspace@0.4.3`).
|
|
379
|
+
- `--agent auto`: Configure agents detected from project files (`.claude/`, `CLAUDE.md`, `.mcp.json` → Claude Code; `.codex/`, `AGENTS.md` → Codex; `.antigravity/` → Antigravity guidance); defaults to Claude Code when nothing is detected.
|
|
380
|
+
- `--user`: Explicitly authorize modifying user-level configuration (e.g. for Google Antigravity in `~/.gemini/antigravity/mcp_config.json`). Creates backups and validates JSON before writing.
|
|
381
|
+
- `--no-verify`: Skip the live server start/handshake check.
|
|
382
|
+
- `--check` (or `--dry-run`): Preview planned file changes without modifying disk.
|
|
383
|
+
|
|
310
384
|
### Available MCP Tools
|
|
311
385
|
|
|
312
386
|
Once configured, the following tools are available to the agent:
|
|
@@ -320,11 +394,16 @@ Once configured, the following tools are available to the agent:
|
|
|
320
394
|
|
|
321
395
|
### Important Notes on MCP Usage
|
|
322
396
|
|
|
323
|
-
- **
|
|
324
|
-
- **
|
|
325
|
-
- **
|
|
397
|
+
- **Automatic Configuration:** Run `npx devworkspace setup --agent claude-code` to generate the Claude Code MCP configuration. DevWorkspace selects the appropriate launcher based on the available installation and runtime environment. Users should not need to edit `.mcp.json` manually for a standard supported setup.
|
|
398
|
+
- **Verify Connectivity:** After configuration, restart or reload the coding agent if required. Confirm that the DevWorkspace MCP tools are available and call `check_mcp_health` to verify the connection.
|
|
399
|
+
- **Tool Invocation:** Registering an MCP server makes its tools available; it does not guarantee that the AI agent will invoke them for every request. Ask the agent to use `get_project_overview` or `get_task_context` when you want to verify context retrieval.
|
|
400
|
+
- **Client Compatibility:** Automated tests verify the MCP server and stdio protocol, but live tool invocation depends on the specific coding agent and its environment.
|
|
401
|
+
|
|
402
|
+
For launcher troubleshooting and supported options, see [docs/mcp.md](docs/mcp.md).
|
|
403
|
+
|
|
404
|
+
### Where files are written
|
|
326
405
|
|
|
327
|
-
|
|
406
|
+
DevWorkspace's own data lives in `.devworkspace/`. Agent files (`.mcp.json`, `CLAUDE.md`, `AGENTS.md`, `.claude/`) stay where agents look for them, and Graphify's `graphify-out/` stays at the project root because Graphify's own commands require it. Existing workspaces need no migration. Details: [docs/integrations.md](docs/integrations.md#where-generated-files-live).
|
|
328
407
|
|
|
329
408
|
---
|
|
330
409
|
|
|
@@ -372,7 +451,7 @@ devworkspace refresh # Re-check repository evidence after pullin
|
|
|
372
451
|
| `integrations` | Inspect and repair optional helper tools (Graphify, Skills, Ponytail) | [Integrations](docs/integrations.md) |
|
|
373
452
|
| `fact` | Record, verify, list, or remove project facts with provenance | [Knowledge Model](docs/knowledge.md) |
|
|
374
453
|
| `feature` | End-to-end feature map tracing across routes, services, and tests | [Getting Started](docs/getting-started.md) |
|
|
375
|
-
| `graph` | Inspect and
|
|
454
|
+
| `graph` | Inspect, trace, and generate Graphify-compatible knowledge graphs | [Integrations](docs/integrations.md) |
|
|
376
455
|
| `decision` | Append-only architectural decision records (ADRs) | [Architecture](docs/architecture.md) |
|
|
377
456
|
| `session` | Record concise session summaries (never transcripts) | [Getting Started](docs/getting-started.md) |
|
|
378
457
|
| `testenv` | Declare local test environment for database-touching checks | [Testing Contract](docs/testing.md) |
|
|
@@ -425,11 +504,11 @@ Details on scopes, prerequisites, and integration health checks: [docs/integrati
|
|
|
425
504
|
| Symptom | Documented Resolution | Relevant Guide |
|
|
426
505
|
| --- | --- | --- |
|
|
427
506
|
| **Agent instructions missing** | Run `npx devworkspace agent install --agent <name>` (or `--agent all`) to generate managed instruction blocks (`CLAUDE.md`, `AGENTS.md`, `.cursor/rules/`, or Copilot rules). | [Agent Integrations](docs/agents.md) |
|
|
428
|
-
| **MCP server or configuration missing** | Run `npx devworkspace setup --agent <name>` (or `npx devworkspace mcp setup --agent <name>`) to configure `.mcp.json`, `mcp.json`, or `.antigravity/mcp.json`.
|
|
507
|
+
| **MCP server or configuration missing** | Run `npx devworkspace setup --agent <name>` (or `npx devworkspace mcp setup --agent <name>`) to configure `.mcp.json`, `mcp.json`, or `.antigravity/mcp.json`. DevWorkspace automatically selects the direct binary or npx launcher without manual configuration. | [MCP Guide](docs/mcp.md) |
|
|
429
508
|
| **`RESTART_REQUIRED` status** | Newly installed Claude Code plugins or skills must be loaded into memory. In Claude Code, run `/reload-plugins` or restart your CLI session. In IDEs, reload the window. Then acknowledge the restart with `npx devworkspace integrations status --restarted`. | [Integrations](docs/integrations.md) |
|
|
430
509
|
| **Graphify CLI missing** | Install Python 3.10+ (or `uv` / `pipx`), then run `npx devworkspace setup --integrations --yes`. Alternatively, install Graphify directly via `uv tool install graphifyy` or `pipx install graphifyy`. | [Integrations](docs/integrations.md) |
|
|
431
|
-
| **Graphify skill missing
|
|
432
|
-
| **No graph built yet** |
|
|
510
|
+
| **Graphify skill missing / `"/graphify" isn't installed in this session`** | If `doctor` reports `Claude skill: missing` or `DEGRADED (cli without project skill)`, run `npx devworkspace setup --integrations --yes` (or `npx devworkspace integrations repair --yes`) to install `.claude/skills/graphify/SKILL.md`. If Claude Code was already open, run `/reload-plugins` in Claude Code or restart the session before running `/graphify .`. | [Integrations](docs/integrations.md) |
|
|
511
|
+
| **No graph built yet** | Run `npx devworkspace graph generate` for an instant offline fallback graph, or launch Claude Code (`claude`) and run `/graphify .` in the session. Verify the generated graph with `npx devworkspace graph status`. | [Integrations](docs/integrations.md) |
|
|
433
512
|
| **Core workspace healthy but integrations incomplete** | Core workspace health (`Core workspace: READY`) and optional integration readiness are independent. Missing optional integrations (status `NOT_INSTALLED`) do not affect core DevWorkspace context, testing contracts, or MCP tools. | [Troubleshooting](docs/troubleshooting.md) |
|
|
434
513
|
|
|
435
514
|
---
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -83,12 +83,22 @@ export declare const OPTIONS: {
|
|
|
83
83
|
readonly agent: {
|
|
84
84
|
readonly type: "string";
|
|
85
85
|
};
|
|
86
|
+
readonly user: {
|
|
87
|
+
readonly type: "boolean";
|
|
88
|
+
};
|
|
89
|
+
readonly force: {
|
|
90
|
+
readonly type: "boolean";
|
|
91
|
+
readonly short: "f";
|
|
92
|
+
};
|
|
86
93
|
readonly launcher: {
|
|
87
94
|
readonly type: "string";
|
|
88
95
|
};
|
|
89
96
|
readonly 'package-version': {
|
|
90
97
|
readonly type: "string";
|
|
91
98
|
};
|
|
99
|
+
readonly 'no-verify': {
|
|
100
|
+
readonly type: "boolean";
|
|
101
|
+
};
|
|
92
102
|
readonly type: {
|
|
93
103
|
readonly type: "string";
|
|
94
104
|
};
|
package/dist/cli/args.js
CHANGED
|
@@ -28,8 +28,11 @@ export const OPTIONS = {
|
|
|
28
28
|
full: { type: 'boolean' },
|
|
29
29
|
all: { type: 'boolean' },
|
|
30
30
|
agent: { type: 'string' },
|
|
31
|
+
user: { type: 'boolean' },
|
|
32
|
+
force: { type: 'boolean', short: 'f' },
|
|
31
33
|
launcher: { type: 'string' },
|
|
32
34
|
'package-version': { type: 'string' },
|
|
35
|
+
'no-verify': { type: 'boolean' },
|
|
33
36
|
type: { type: 'string' },
|
|
34
37
|
title: { type: 'string' },
|
|
35
38
|
key: { type: 'string' },
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAIvD,qGAAqG;AACrG,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACrC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACxC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACzB,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACpC,qBAAqB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1C,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACjC,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACxC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,CAAuB,EAAE,CAAS;IACrD,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAuB;IACrD,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,CAAuB,EAAE,CAAS;IACrD,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,CAAuB,EAAE,CAAS;IACpD,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAC1G,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["import { parseArgs } from 'node:util';\nimport { DevWorkspaceError } from '../errors/index.js';\n\ntype OptionSpec = { type: 'boolean' | 'string'; short?: string; multiple?: boolean };\n\n/** Every flag the CLI understands. Unknown flags are rejected so typos never silently do nothing. */\nexport const OPTIONS = {\n help: { type: 'boolean', short: 'h' },\n version: { type: 'boolean', short: 'v' },\n json: { type: 'boolean' },\n debug: { type: 'boolean' },\n 'no-color': { type: 'boolean' },\n ascii: { type: 'boolean' },\n 'dry-run': { type: 'boolean' },\n yes: { type: 'boolean', short: 'y' },\n 'include-agent-files': { type: 'boolean' },\n integrations: { type: 'boolean' },\n 'with-integrations': { type: 'boolean' },\n only: { type: 'string', multiple: true },\n scope: { type: 'string' },\n restarted: { type: 'boolean' },\n quick: { type: 'boolean' },\n cwd: { type: 'string' },\n root: { type: 'string' },\n fix: { type: 'boolean' },\n strict: { type: 'boolean' },\n out: { type: 'string', short: 'o' },\n overwrite: { type: 'boolean' },\n 'allow-different-project': { type: 'boolean' },\n topic: { type: 'string' },\n full: { type: 'boolean' },\n all: { type: 'boolean' },\n agent: { type: 'string' },\n launcher: { type: 'string' },\n 'package-version': { type: 'string' },\n type: { type: 'string' },\n title: { type: 'string' },\n key: { type: 'string' },\n value: { type: 'string' },\n source: { type: 'string' },\n 'source-type': { type: 'string' },\n file: { type: 'string', multiple: true },\n confidence: { type: 'string' },\n status: { type: 'string' },\n reason: { type: 'string' },\n detail: { type: 'string' },\n note: { type: 'string' },\n phase: { type: 'string' },\n passed: { type: 'string' },\n failed: { type: 'string' },\n criteria: { type: 'string', multiple: true },\n plan: { type: 'string', multiple: true },\n area: { type: 'string', multiple: true },\n 'decision-note': { type: 'string', multiple: true },\n summary: { type: 'string' },\n blocker: { type: 'string', multiple: true },\n 'clear-blockers': { type: 'boolean' },\n require: { type: 'string', multiple: true },\n 'user-work-intact': { type: 'boolean' },\n 'knowledge-reviewed': { type: 'boolean' },\n 'final-state-inspected': { type: 'boolean' },\n context: { type: 'string' },\n for: { type: 'string' },\n role: { type: 'string' },\n decision: { type: 'string' },\n consequences: { type: 'string' },\n supersedes: { type: 'string' },\n goal: { type: 'string' },\n done: { type: 'string', multiple: true },\n 'tests-run': { type: 'string', multiple: true },\n remaining: { type: 'string', multiple: true },\n next: { type: 'string' },\n task: { type: 'string' },\n limit: { type: 'string' },\n package: { type: 'string' },\n check: { type: 'string', multiple: true },\n target: { type: 'string' },\n timeout: { type: 'string' },\n deep: { type: 'boolean' },\n id: { type: 'string' },\n name: { type: 'string' },\n description: { type: 'string' },\n symbol: { type: 'string' },\n entry: { type: 'string', multiple: true },\n route: { type: 'string', multiple: true },\n service: { type: 'string', multiple: true },\n model: { type: 'string', multiple: true },\n test: { type: 'string', multiple: true },\n tag: { type: 'string', multiple: true },\n from: { type: 'string' },\n depth: { type: 'string' },\n} as const satisfies Record<string, OptionSpec>;\n\nexport interface ParsedArgs {\n positionals: string[];\n values: Record<string, string | boolean | string[] | undefined>;\n}\n\nexport function parseCli(argv: string[]): ParsedArgs {\n try {\n const normalizedArgv = argv.map((arg, idx) => {\n if (arg === '--check') {\n const next = argv[idx + 1];\n if (!next || next.startsWith('-')) {\n return '--check=true';\n }\n }\n return arg;\n });\n const { values, positionals } = parseArgs({ args: normalizedArgv, options: OPTIONS, allowPositionals: true, strict: true });\n return { positionals, values: values as ParsedArgs['values'] };\n } catch (e) {\n throw new DevWorkspaceError('USAGE', (e as Error).message.replace(/^Unknown option/, 'Unknown option'), {\n hint: 'Run \"devworkspace --help\" or \"devworkspace <command> --help\".',\n });\n }\n}\n\nexport function str(v: ParsedArgs['values'], k: string): string | undefined {\n const x = v[k];\n return typeof x === 'string' ? x : undefined;\n}\n\nexport function bool(v: ParsedArgs['values'], k: string): boolean {\n return v[k] === true;\n}\n\nexport function isCheckOrDryRun(v: ParsedArgs['values']): boolean {\n if (bool(v, 'dry-run')) return true;\n const checks = list(v, 'check');\n return checks.includes('true');\n}\n\nexport function list(v: ParsedArgs['values'], k: string): string[] {\n const x = v[k];\n return Array.isArray(x) ? x : [];\n}\n\nexport function int(v: ParsedArgs['values'], k: string): number | undefined {\n const s = str(v, k);\n if (s === undefined) return undefined;\n const n = Number(s);\n if (!Number.isInteger(n)) throw new DevWorkspaceError('USAGE', `--${k} must be an integer (got \"${s}\").`);\n return n;\n}\n"]}
|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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,CAAuB,EAAE,CAAS;IACrD,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAuB;IACrD,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,CAAuB,EAAE,CAAS;IACrD,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,CAAuB,EAAE,CAAS;IACpD,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAC1G,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["import { parseArgs } from 'node:util';\nimport { DevWorkspaceError } from '../errors/index.js';\n\ntype OptionSpec = { type: 'boolean' | 'string'; short?: string; multiple?: boolean };\n\n/** Every flag the CLI understands. Unknown flags are rejected so typos never silently do nothing. */\nexport const OPTIONS = {\n help: { type: 'boolean', short: 'h' },\n version: { type: 'boolean', short: 'v' },\n json: { type: 'boolean' },\n debug: { type: 'boolean' },\n 'no-color': { type: 'boolean' },\n ascii: { type: 'boolean' },\n 'dry-run': { type: 'boolean' },\n yes: { type: 'boolean', short: 'y' },\n 'include-agent-files': { type: 'boolean' },\n integrations: { type: 'boolean' },\n 'with-integrations': { type: 'boolean' },\n only: { type: 'string', multiple: true },\n scope: { type: 'string' },\n restarted: { type: 'boolean' },\n quick: { type: 'boolean' },\n cwd: { type: 'string' },\n root: { type: 'string' },\n fix: { type: 'boolean' },\n strict: { type: 'boolean' },\n out: { type: 'string', short: 'o' },\n overwrite: { type: 'boolean' },\n 'allow-different-project': { type: 'boolean' },\n topic: { type: 'string' },\n full: { type: 'boolean' },\n all: { type: 'boolean' },\n agent: { type: 'string' },\n user: { type: 'boolean' },\n force: { type: 'boolean', short: 'f' },\n launcher: { type: 'string' },\n 'package-version': { type: 'string' },\n 'no-verify': { type: 'boolean' },\n type: { type: 'string' },\n title: { type: 'string' },\n key: { type: 'string' },\n value: { type: 'string' },\n source: { type: 'string' },\n 'source-type': { type: 'string' },\n file: { type: 'string', multiple: true },\n confidence: { type: 'string' },\n status: { type: 'string' },\n reason: { type: 'string' },\n detail: { type: 'string' },\n note: { type: 'string' },\n phase: { type: 'string' },\n passed: { type: 'string' },\n failed: { type: 'string' },\n criteria: { type: 'string', multiple: true },\n plan: { type: 'string', multiple: true },\n area: { type: 'string', multiple: true },\n 'decision-note': { type: 'string', multiple: true },\n summary: { type: 'string' },\n blocker: { type: 'string', multiple: true },\n 'clear-blockers': { type: 'boolean' },\n require: { type: 'string', multiple: true },\n 'user-work-intact': { type: 'boolean' },\n 'knowledge-reviewed': { type: 'boolean' },\n 'final-state-inspected': { type: 'boolean' },\n context: { type: 'string' },\n for: { type: 'string' },\n role: { type: 'string' },\n decision: { type: 'string' },\n consequences: { type: 'string' },\n supersedes: { type: 'string' },\n goal: { type: 'string' },\n done: { type: 'string', multiple: true },\n 'tests-run': { type: 'string', multiple: true },\n remaining: { type: 'string', multiple: true },\n next: { type: 'string' },\n task: { type: 'string' },\n limit: { type: 'string' },\n package: { type: 'string' },\n check: { type: 'string', multiple: true },\n target: { type: 'string' },\n timeout: { type: 'string' },\n deep: { type: 'boolean' },\n id: { type: 'string' },\n name: { type: 'string' },\n description: { type: 'string' },\n symbol: { type: 'string' },\n entry: { type: 'string', multiple: true },\n route: { type: 'string', multiple: true },\n service: { type: 'string', multiple: true },\n model: { type: 'string', multiple: true },\n test: { type: 'string', multiple: true },\n tag: { type: 'string', multiple: true },\n from: { type: 'string' },\n depth: { type: 'string' },\n} as const satisfies Record<string, OptionSpec>;\n\nexport interface ParsedArgs {\n positionals: string[];\n values: Record<string, string | boolean | string[] | undefined>;\n}\n\nexport function parseCli(argv: string[]): ParsedArgs {\n try {\n const normalizedArgv = argv.map((arg, idx) => {\n if (arg === '--check') {\n const next = argv[idx + 1];\n if (!next || next.startsWith('-')) {\n return '--check=true';\n }\n }\n return arg;\n });\n const { values, positionals } = parseArgs({ args: normalizedArgv, options: OPTIONS, allowPositionals: true, strict: true });\n return { positionals, values: values as ParsedArgs['values'] };\n } catch (e) {\n throw new DevWorkspaceError('USAGE', (e as Error).message.replace(/^Unknown option/, 'Unknown option'), {\n hint: 'Run \"devworkspace --help\" or \"devworkspace <command> --help\".',\n });\n }\n}\n\nexport function str(v: ParsedArgs['values'], k: string): string | undefined {\n const x = v[k];\n return typeof x === 'string' ? x : undefined;\n}\n\nexport function bool(v: ParsedArgs['values'], k: string): boolean {\n return v[k] === true;\n}\n\nexport function isCheckOrDryRun(v: ParsedArgs['values']): boolean {\n if (bool(v, 'dry-run')) return true;\n const checks = list(v, 'check');\n return checks.includes('true');\n}\n\nexport function list(v: ParsedArgs['values'], k: string): string[] {\n const x = v[k];\n return Array.isArray(x) ? x : [];\n}\n\nexport function int(v: ParsedArgs['values'], k: string): number | undefined {\n const s = str(v, k);\n if (s === undefined) return undefined;\n const n = Number(s);\n if (!Number.isInteger(n)) throw new DevWorkspaceError('USAGE', `--${k} must be an integer (got \"${s}\").`);\n return n;\n}\n"]}
|
package/dist/cli/help.js
CHANGED
|
@@ -22,12 +22,15 @@ export const COMMANDS = [
|
|
|
22
22
|
summary: 'Single-command repository setup (inspect, initialize, discover contract & validate)',
|
|
23
23
|
usage: [
|
|
24
24
|
'devworkspace setup',
|
|
25
|
-
'devworkspace setup --agent claude-code|codex|antigravity|all [--check]',
|
|
25
|
+
'devworkspace setup --agent claude-code|codex|antigravity|all|auto [--check] [--no-verify] [--launcher auto|direct|npx] [--package-version <v>]',
|
|
26
26
|
'devworkspace setup --integrations [--yes] [--dry-run] [--scope project|user] [--only graphify,agent-skills,ponytail]',
|
|
27
27
|
],
|
|
28
28
|
options: [
|
|
29
|
-
['--agent <name>', 'configure MCP
|
|
29
|
+
['--agent <name>', 'initialize if needed, configure MCP for agent (claude-code, codex, antigravity, all, auto = detect) and verify the server starts'],
|
|
30
30
|
['--check', 'with --agent: validate and plan without writing files'],
|
|
31
|
+
['--no-verify', 'with --agent: skip starting the MCP server to verify it'],
|
|
32
|
+
['--launcher auto|direct|npx', 'how agents start the server (default auto: PATH binary if version-matched, else npx)'],
|
|
33
|
+
['--package-version <v>', 'pin the npx launcher to devworkspace@<v>'],
|
|
31
34
|
['--integrations', 'set up external integrations (Graphify, Agent Skills, Ponytail)'],
|
|
32
35
|
['--dry-run', 'show exactly what would run; changes nothing'],
|
|
33
36
|
['--yes', 'with --integrations: approve machine-level and third-party installs'],
|
|
@@ -151,19 +154,25 @@ export const COMMANDS = [
|
|
|
151
154
|
},
|
|
152
155
|
{
|
|
153
156
|
name: 'graph',
|
|
154
|
-
summary: 'Inspect and
|
|
157
|
+
summary: 'Inspect, trace, and generate Graphify-compatible knowledge graphs',
|
|
155
158
|
usage: [
|
|
156
159
|
'devworkspace graph status',
|
|
157
160
|
'devworkspace graph trace [--from <path|query>] [--depth <n>]',
|
|
161
|
+
'devworkspace graph generate [--force] [--dry-run] [--out <file>]',
|
|
158
162
|
],
|
|
159
163
|
options: [
|
|
160
164
|
['--from <path|query>', 'starting node file path or symbol name to trace from'],
|
|
161
165
|
['--depth <n>', 'maximum traversal depth (1-10, default 2)'],
|
|
166
|
+
['--force', 'overwrite an existing native Graphify graph with the offline fallback graph'],
|
|
167
|
+
['--dry-run', 'preview nodes, edges and files without writing to disk'],
|
|
168
|
+
['--out <file>', 'custom output file path (defaults to graphify-out/graph.json)'],
|
|
162
169
|
...COMMON,
|
|
163
170
|
],
|
|
164
171
|
examples: [
|
|
165
172
|
'devworkspace graph status',
|
|
166
173
|
'devworkspace graph trace --from src/api.ts --depth 3',
|
|
174
|
+
'devworkspace graph generate',
|
|
175
|
+
'devworkspace graph generate --force',
|
|
167
176
|
],
|
|
168
177
|
},
|
|
169
178
|
{
|
|
@@ -278,11 +287,12 @@ export const COMMANDS = [
|
|
|
278
287
|
summary: 'Local-first Model Context Protocol (MCP) server and agent configuration',
|
|
279
288
|
usage: [
|
|
280
289
|
'devworkspace mcp serve [--debug]',
|
|
281
|
-
'devworkspace mcp setup [--agent claude-code|codex|antigravity|all] [--check]',
|
|
290
|
+
'devworkspace mcp setup [--agent claude-code|codex|antigravity|all|auto] [--check] [--no-verify]',
|
|
282
291
|
],
|
|
283
292
|
options: [
|
|
284
|
-
['--agent <name>', 'agent to configure (claude-code, codex, antigravity, all)'],
|
|
293
|
+
['--agent <name>', 'agent to configure (claude-code, codex, antigravity, all, auto)'],
|
|
285
294
|
['--check', 'validate and plan configuration without modifying files'],
|
|
295
|
+
['--no-verify', 'skip the live server start/handshake check'],
|
|
286
296
|
...COMMON,
|
|
287
297
|
],
|
|
288
298
|
examples: [
|