specpilot 2.12.0 → 2.13.0

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.
Files changed (39) hide show
  1. package/README.md +39 -5
  2. package/dist/cli.js +1 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/serve.d.ts +5 -0
  5. package/dist/commands/serve.d.ts.map +1 -1
  6. package/dist/commands/serve.js +19 -2
  7. package/dist/commands/serve.js.map +1 -1
  8. package/dist/core/ideConfig.d.ts.map +1 -1
  9. package/dist/core/ideConfig.js +2 -1
  10. package/dist/core/ideConfig.js.map +1 -1
  11. package/dist/utils/gitClone.d.ts +4 -1
  12. package/dist/utils/gitClone.d.ts.map +1 -1
  13. package/dist/utils/gitClone.js +35 -4
  14. package/dist/utils/gitClone.js.map +1 -1
  15. package/dist/utils/mcpLocal.d.ts +46 -0
  16. package/dist/utils/mcpLocal.d.ts.map +1 -0
  17. package/dist/utils/mcpLocal.js +220 -0
  18. package/dist/utils/mcpLocal.js.map +1 -0
  19. package/dist/utils/projectDetector.d.ts +4 -0
  20. package/dist/utils/projectDetector.d.ts.map +1 -1
  21. package/dist/utils/projectDetector.js +19 -4
  22. package/dist/utils/projectDetector.js.map +1 -1
  23. package/dist/utils/specPaths.d.ts +3 -2
  24. package/dist/utils/specPaths.d.ts.map +1 -1
  25. package/dist/utils/specPaths.js +6 -4
  26. package/dist/utils/specPaths.js.map +1 -1
  27. package/dist/utils/specServer.d.ts +7 -0
  28. package/dist/utils/specServer.d.ts.map +1 -1
  29. package/dist/utils/specServer.js +144 -12
  30. package/dist/utils/specServer.js.map +1 -1
  31. package/dist/utils/specSetup.d.ts +11 -0
  32. package/dist/utils/specSetup.d.ts.map +1 -1
  33. package/dist/utils/specSetup.js +9 -1
  34. package/dist/utils/specSetup.js.map +1 -1
  35. package/package.json +5 -2
  36. package/ui/app.css +19 -17
  37. package/ui/app.js +114 -65
  38. package/ui/index.html +6 -6
  39. package/ui/route.js +56 -31
package/README.md CHANGED
@@ -35,6 +35,8 @@ For Cursor, VS Code and other clients, add it as an HTTP (streamable) server:
35
35
 
36
36
  No install, no API key. Full setup notes: <https://specpilot.dev/mcp-setup>
37
37
 
38
+ To let your AI IDE read this machine's specs and add or move tasks, start `specpilot serve --mcp`: see [Local MCP endpoint](#local-mcp-endpoint-specpilot-serve---mcp) below.
39
+
38
40
  ## Quick Start
39
41
 
40
42
  ```bash
@@ -94,7 +96,7 @@ This AI-assisted approach ensures comprehensive, high-quality specifications tai
94
96
  | `archive` | `--dry-run` · `--force` |
95
97
  | `add-specs` | `--no-analysis` · `--deep-analysis` · `--no-prompts` |
96
98
  | `backfill` | `--dir` · `--specs-name` · `--dry-run` · `--no-prompts` |
97
- | `serve` | `--port` · `--poll` · `--read-only` · `--open` |
99
+ | `serve` | `--port` · `--poll` · `--read-only` · `--open` · `--mcp` |
98
100
 
99
101
  > Run `specpilot <command> --help` for full flag descriptions and default values.
100
102
 
@@ -131,22 +133,43 @@ specpilot serve ../new-project # no .specs/ there yet: the page sets it up (or
131
133
  | `--poll <ms>` | `1000` | Change-detection interval in ms (minimum 250); polling runs only while a page is open |
132
134
  | `--read-only` | | No task moves, no new tasks, no guided setup, no opening folders and no registry: the UI only reads, with no drag handles, no New Task button and no write routes |
133
135
  | `--open` | | Open the UI in the default browser |
136
+ | `--mcp` | | Also serve a local MCP endpoint at `/mcp` for your AI IDE, and show the Connect Your AI IDE card on Home (below) |
134
137
 
135
138
  - **Several projects**: name any folders; one without `.specs/` is served too and offers guided setup (below). They are numbered in command-line order from 0 (`../api` is project 0, `../web` is project 1), and that number is the `?project=<n>` on the server's `/api/` routes and the `#1/...` at the start of a page link for any project after the first (no number means project 0). Each project keeps its own tasks, files and live reload; a move changes only that project's `tasks.md`. Folders opened from the page (below) get the next numbers; a number never changes while the server runs, and one server holds at most 20 projects.
136
139
  - **Task moves**: drag a row, or use `Alt+Up/Down` to reorder and `Alt+Left/Right` to move between Backlog and Current Sprint. A move changes exactly one line of `.specs/planning/tasks.md` and nothing else, and offers Undo; Completed rows do not move. If the file changed on disk since the page loaded, the move is refused and the page redraws. Start with `--read-only` to turn moves off.
137
140
  - **Commands and Skills**: each view lists its files in two groups. Under From SpecPilot are the `specpilot-*` commands whose bytes match a version SpecPilot released (in `.claude/commands/` and `.github/prompts/`) and the `specpilot-project` skill; everything else is under Yours, including a `specpilot-*` command you edited. Regenerate All, in the From SpecPilot header of Commands, runs what `specpilot backfill` runs for command files, and nothing else: for each IDE whose instruction file is in the project it adds the missing `specpilot-*` commands and updates the unedited ones to the current version, in every IDE's command folder, also the ones the page does not list (`.cursor/commands/`, `.windsurf/workflows/`, `.agent/workflows/`, `.codex/prompts/`). Edited files, links, files under a linked folder, your own commands, skills, instruction files and `.specs/` are never written. What it did is shown above the groups as it happened: updated, added, kept with the reason, and the folders the page does not list.
138
141
  - **New Task**: the New Task button on the Tasks view opens a small form: a description and a section (Backlog by default, or Current Sprint). SpecPilot adds one row, `| <ID> | <description> |`, at the end of that section's table in `.specs/planning/tasks.md` and changes nothing else in the file. The ID is the next free one: `BL-###` for Backlog, `CS-###` for Current Sprint, one past the highest in use in `tasks.md` and `tasks-archive.md` (only IDs in ID columns and leading tags count, not IDs mentioned in a description; gaps are never filled). The description is written exactly as you typed it, markdown included, with no label or date added; one with a line break, a control character, a `|` or a trailing `\`, or over 4000 characters, is refused with the reason, and what you typed stays in the form. The new row is selected and opened in the details panel. If the file changed on disk since the page loaded, nothing is added and the page redraws. Protected like a task move; off with `--read-only`.
139
- - **Guided setup**: a folder you name that has no `.specs/` shows, instead of the views, a Start Guided Setup button. It starts a chat that asks the questions `specpilot add-specs` asks (project type, language and framework when they are not detected, API paradigm, handle, IDE) one at a time: a friendly line per question with the CLI's own question under it, chips or a field with Continue and Skip, step dividers and a progress bar, then a recap of your answers by step with the files that will be written folded inside, before anything is created. Tap any answer, in the thread or the recap, to change it; you come straight back. It then creates exactly what `add-specs` creates for those answers. A handle that would be refused is caught where you type it. Your answers stay in the page while it is open; they are not saved anywhere. Files outside `.specs/` that already exist (your own `.gitattributes`, `CLAUDE.md`, `.vscode/settings.json`, a command file) are never changed: the recap's file list marks them (`Already here, will be kept`) and the page lists them again afterwards, and `specpilot backfill` adds missing SpecPilot sections to kept instruction and command files (a kept `.gitattributes` does not get the `merge=union` lines). Setup is offered only for folders named on the command line, not for the current-directory default, which still needs `.specs/` (`specpilot serve .` names it). The request is protected like a task move. While it runs, the files are generated into a `.specpilot-setup-<id>/` folder inside the project, which is removed when done; if a run is interrupted, the next `specpilot serve` removes that folder (and only that folder, recognised by its marker file).
142
+ - **Guided setup**: a folder you name that has no `.specs/` shows, instead of the views, a Start Guided Setup button. It starts a chat that asks the questions `specpilot add-specs` asks (project type, language and framework when they are not detected, API paradigm, handle, IDE) one at a time: a friendly line per question with the CLI's own question under it, chips or a field with Continue and Skip, step dividers and a progress bar, then a recap of your answers by step with the files that will be written folded inside, before anything is created. What SpecPilot detected in the folder is already answered and marked `detected`: the language, the framework and the project name, which `add-specs` takes from your files without asking, so they cannot be changed here, and a platform it can see directly (React Native, Next.js, React or Vue / Nuxt from `package.json`, iOS Native from an Xcode project, also a macOS one), which you can change; the chat starts at the first question it still needs. Tap any other answer, in the thread or the recap, to change it; you come straight back. It then creates exactly what `add-specs` creates for those answers. A handle that would be refused is caught where you type it. Your answers stay in the page while it is open; they are not saved anywhere. Files outside `.specs/` that already exist (your own `.gitattributes`, `CLAUDE.md`, `.vscode/settings.json`, a command file) are never changed: the recap's file list marks them (`Already here, will be kept`) and the page lists them again afterwards, and `specpilot backfill` adds missing SpecPilot sections to kept instruction and command files (a kept `.gitattributes` does not get the `merge=union` lines). Setup is offered only for folders named on the command line, not for the current-directory default, which still needs `.specs/` (`specpilot serve .` names it). The request is protected like a task move. While it runs, the files are generated into a `.specpilot-setup-<id>/` folder inside the project, which is removed when done; if a run is interrupted, the next `specpilot serve` removes that folder (and only that folder, recognised by its marker file).
140
143
  - **Home**: the logo at the top of the left rail, the `+` tile below the projects (or the `h` key, or `#home`) shows "Your specs, as a board.", an Open a Project Folder button and your Recent projects (path, last-opened time and, for projects already open, the git branch); click one to open it, or Remove from list to forget it (the folder is not touched). `specpilot serve` still starts on the first project's Tasks view, and `--read-only` has no Home.
141
144
  - **Open a project from the page**: Open a Project Folder on Home opens a sheet (Clone a Repository opens it on its Clone tab); type a folder path (`/Users/you/project` or `~/project`) and Open, and the folder is served alongside the others, with guided setup if it has no `.specs/`. Folders you open this way are listed under Recent projects next time, remembered in `~/.specpilot/projects.json` (path, last-opened time and a pinned flag, at most 50; the file is created the first time you open a folder from the page, and folders named on the command line are added to it only once it exists). Remove from list forgets a folder without touching it. The home folder, the root of a drive and folders already open are refused; a `projects.json` that cannot be read is left exactly as it is, and the page and the terminal say so. The request is protected like a task move.
142
145
  - **Start a new project from the page**: Start a New Project on Home opens the same chat: name the project to start, then it asks for the parent folder (`/Users/you/dev` or `~/dev`) and the questions `specpilot init` asks, one at a time, then shows your answers and the files that will be written, and creates `<parent>/<name>`, writes the files `init` writes there and opens it on its onboarding prompt. An existing folder is used only if it is empty; one with content is refused (open it from the Folder tab to add `.specs/` to it). The parent must already exist and cannot be your home folder itself, the root of a drive, or a `.specs/` folder or anything under one. A project name that would be refused is caught where you type it. For a Brownfield project the four project-context questions are not asked, because `init` writes those answers only for Greenfield. Nothing that exists is changed, a run that fails removes what it created, and no `git init` is run. Not offered here: `--specs-name` and `--dry-run`.
143
- - **Clone a repository from the page**: Clone a Repository on Home (or the Clone tab of the same sheet) asks for a repository URL, a parent folder and a folder name (leave it empty for the repository's name), runs your installed `git clone` and opens the result: on Tasks when the repository has `.specs/`, in guided setup when it has none. Accepted URLs: `https://host/path`, `git@host:path` and `ssh://host/path`; an https URL must not contain a user name or password (git uses your credential helper and ssh keys, as in a terminal), so for Azure DevOps drop the `org@` part. Submodules are not cloned, and there is no branch or depth option. The target folder must not exist or must be empty; the parent follows the rules of Start a New Project. As you type or paste the URL, Folder name is filled with the repository's name until you type one yourself. While the clone runs the sheet shows a moving bar and the elapsed time (no percentage yet). git is never asked a question it would wait on: a repository that needs a login it cannot get fails with git's own message, its last `fatal:` line with the line before it, for example `Host key verification failed. fatal: Could not read from remote repository.`, and a clone is stopped after 10 minutes. The page cannot accept an ssh host key for you: for a host you have never connected to, run `ssh -T git@host` once in a terminal, then clone again. Your ssh setup is used as it is; SpecPilot sets no ssh option on macOS and Linux. One clone runs at a time. A clone that fails, is stopped, or is cancelled (Cancel, Escape, closing the tab, Ctrl+C) removes what it downloaded; on Ctrl+C the server waits at most 5 seconds for that. Needs `git` on your `PATH`. This is the only time SpecPilot starts another program for the page and the only time it uses the network. On Windows ssh is put in batch mode (unless you have set `GIT_SSH_COMMAND`, `GIT_SSH` or `core.sshCommand`), and a stopped clone can leave git's helper process running until it ends by itself, and the clean-up can then fail on a file that helper still holds; the message says so.
144
- - **Open in VS Code**: the icon at the top right of every project view (and beside each Recent project on Home whose folder still exists) is a `vscode://file/` link to that project's folder. Your browser hands it to VS Code, which asks before opening it; SpecPilot starts nothing itself. Nothing happens if VS Code is not installed. A task's details panel has Open tasks.md in VS Code, which opens `.specs/planning/tasks.md` at that task's line; VS Code puts a file in the window it picks (by default the last one you used), which may not be this project's. It opens VS Code only, not Insiders or another editor.
146
+ - **Clone a repository from the page**: Clone a Repository on Home (or the Clone tab of the same sheet) asks for a repository URL, a parent folder and a folder name (leave it empty for the repository's name), runs your installed `git clone` and opens the result: on Tasks when the repository has `.specs/`, in guided setup when it has none. Accepted URLs: `https://host/path`, `git@host:path` and `ssh://host/path`; an https URL must not contain a user name or password (git uses your credential helper and ssh keys, as in a terminal), so for Azure DevOps drop the `org@` part. Submodules are not cloned, and there is no branch or depth option. The target folder must not exist or must be empty; the parent follows the rules of Start a New Project. As you type or paste the URL, Folder name is filled with the repository's name until you type one yourself. While the clone runs the sheet shows the elapsed time and, once git reports it, git's stage and percentage (`Receiving objects 42% · 0:13`, then `Resolving deltas` and `Updating files`); until then, or when git reports none, a moving bar. git is never asked a question it would wait on: a repository that needs a login it cannot get fails with git's own message, its last `fatal:` line with the line before it, for example `Host key verification failed. fatal: Could not read from remote repository.`, and a clone is stopped after 10 minutes. The page cannot accept an ssh host key for you: for a host you have never connected to, run `ssh -T git@host` once in a terminal, then clone again. Your ssh setup is used as it is; SpecPilot sets no ssh option on macOS and Linux. One clone runs at a time. A clone that fails, is stopped, or is cancelled (Cancel, Escape, closing the tab, Ctrl+C) removes what it downloaded; on Ctrl+C the server waits at most 5 seconds for that. Needs `git` on your `PATH`. This is the only time SpecPilot starts another program for the page and the only time it uses the network. On Windows ssh is put in batch mode (unless you have set `GIT_SSH_COMMAND`, `GIT_SSH` or `core.sshCommand`), and a stopped clone can leave git's helper process running until it ends by itself, and the clean-up can then fail on a file that helper still holds; the message says so.
147
+ - **Open in VS Code**: the icon at the top right of every project view (and beside each Recent project on Home whose folder still exists) is a `vscode://file/` link to that project's folder. Your browser hands it to VS Code, which asks before opening it; SpecPilot starts nothing itself. Nothing happens if VS Code is not installed. A task's details panel has Open tasks.md in VS Code, which opens `.specs/planning/tasks.md` at that task's line; VS Code puts a file in the window it picks (by default the last one you used), which may not be this project's. It opens VS Code only, not Insiders or another editor. The file view of every `.specs/` file and the details panel of every Instructions, Commands and Skills file also have Open in VS Code, which opens that file.
148
+ - **Open in AI IDE**: the sparkle icon beside Open in VS Code shows a short menu when it has something to offer. Open in Cursor (`cursor://file/`) appears when the project has `.cursor/rules/specpilot.mdc`, the file SpecPilot writes for Cursor. While `.specs/development/onboarding.md` exists, Send onboarding prompt to Cursor puts the prompt into Cursor's chat through Cursor's own link (it stays on this machine; Cursor waits for you to confirm, and uses the window it has in front, so open the project in Cursor first), and Copy onboarding prompt copies it for Claude Code, which has no link to open, or any other IDE. A prompt too long for a Cursor link (10,000 characters) is copied instead. It is on project views only, not on Home's rows.
145
149
  - **Nothing else is written**: in a project with `.specs/`, its `.specs/planning/tasks.md` and, through Regenerate All, its `specpilot-*` command files are the only files the server can change; in a named folder without `.specs/`, setup creates new files and changes none; a new project is one new folder (or an empty one) with new files; a clone is one new folder (or an empty one) filled by `git clone`; `~/.specpilot/projects.json` is the one file written outside your projects; everything else is read on every request.
146
150
  - **Loopback only**: binds 127.0.0.1 only; rejects any Host header other than `127.0.0.1:<port>` or `localhost:<port>` (403).
147
151
  - **Live reload**: polls allowlisted files with `stat()` every `--poll` ms while a page is open, and pushes changed paths on `/api/events`; open pages update in place.
148
152
  - **What it shows**: `.specs/`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.claude/commands/`, `.claude/skills/` and `.github/prompts/`, as the files' own text.
149
- - **Limits**: paths through symlinked folders, hidden files and `node_modules` are not shown. Task moves and new tasks are refused, not approximated, when they cannot change exactly one line: a section with no table yet (a fresh project's `[TODO]`), a move involving the file's last line when it has no trailing newline, and a `tasks.md` that is not valid UTF-8. If an editor saves `tasks.md` in the same instant the server writes it, that save can be overwritten; git keeps it recoverable. VS Code reads a path ending in `:<number>` as a line number, so a project folder whose name ends that way (`notes:12`) may not open as a folder from Open in VS Code. Windows paths (`C:\…`) in that link are untested.
153
+ - **Limits**: paths through symlinked folders, hidden files and `node_modules` are not shown. Task moves and new tasks are refused, not approximated, when they cannot change exactly one line: a section with no table yet (a fresh project's `[TODO]`), a move involving the file's last line when it has no trailing newline, and a `tasks.md` that is not valid UTF-8. If an editor saves `tasks.md` in the same instant the server writes it, that save can be overwritten; git keeps it recoverable. VS Code reads a path ending in `:<number>` as a line number, so a project folder whose name ends that way (`notes:12`) may not open as a folder from Open in VS Code. Windows paths (`C:\…`) in that link are untested. The Cursor links are untested on a machine with Cursor installed, and Windsurf has none yet. Adding or removing `.cursor/rules/specpilot.mdc` shows on the page at its next refresh, not at once, since that file is not watched.
154
+
155
+ ### Local MCP endpoint (`specpilot serve --mcp`)
156
+
157
+ With `--mcp`, the server also answers MCP at `http://127.0.0.1:<port>/mcp`, so Claude Code, Cursor and other AI IDEs on this machine can read the specs and add or move tasks through the same checks as the page. It is off by default; without the flag nothing changes.
158
+
159
+ ```bash
160
+ specpilot serve --mcp
161
+ # MCP endpoint: http://127.0.0.1:4321/mcp
162
+ # Add to your IDE's MCP settings: {"mcpServers":{"specpilot-local":{"type":"http","url":"http://127.0.0.1:4321/mcp","headers":{"X-SpecPilot-Token":"<token>"}}}}
163
+ ```
164
+
165
+ Copy that line from the terminal or from the **Connect Your AI IDE** card on Home (Copy button) into your IDE's MCP settings, or into `.mcp.json` in your project and add `.mcp.json` to `.gitignore`.
166
+
167
+ - **Tools**: `specpilot_list_projects`, `specpilot_read_spec`, `specpilot_list_tasks`, `specpilot_new_task`, `specpilot_move_task`, `specpilot_validate_specs` (no `--fix`, writes nothing) and `specpilot_regenerate_commands`. Each takes an optional `project` index. The two task writes need the `sha256` that `specpilot_list_tasks` returned; if `tasks.md` changed since, the write is refused ("since you last read it") and nothing is written. Open pages show the change through live reload.
168
+ - **Same guards as the page**: loopback only, the Host check, the token (a wrong or missing `X-SpecPilot-Token` gets 403), JSON only, 16 KB, the page's read allowlist, the page's write allowlist and one write lock for page and IDE. A request from a web page (any other `Origin`) is refused with 403; IDEs send none. Setup, new projects, clones and the project list are not tools.
169
+ - **Protocol revisions**: MCP `2026-07-28` (no handshake; the version, `Mcp-Method` and `Mcp-Name` headers must match the request body), and `2025-11-25` and `2025-06-18` (with `initialize`), on the same URL. A client that speaks both picks one; the config line is the same. Streamable HTTP, POST only, no sessions; answers are JSON, never a stream, and no change notifications are sent.
170
+ - **Token**: a new one each time `serve` starts, so the line needs copying again after a restart. To keep one line, set `SPECPILOT_MCP_TOKEN` (at least 32 characters, no spaces) in the environment of `serve` and of your IDE; the line then says `${SPECPILOT_MCP_TOKEN}`, which Claude Code fills in from the environment (other IDEs: put the token in its place). SpecPilot never writes the token anywhere.
171
+ - **`--read-only --mcp`**: only the four read tools; the endpoint gets its own token and the page stays read-only.
172
+ - **Instruction files**: files generated by `init`, `add-specs` and the page's setup carry one more process mandate: use the SpecPilot MCP tools for tasks when they are connected, otherwise edit `.specs/planning/tasks.md` and keep its table format. `specpilot backfill` does not add it to existing files yet.
150
173
 
151
174
  ## Supported Languages & Frameworks
152
175
 
@@ -350,6 +373,17 @@ npm run build
350
373
  npm link # For local testing
351
374
  ```
352
375
 
376
+ #### Browser tests for `specpilot serve`
377
+
378
+ The page's clicks, keys, focus and live reload are tested in headless Chromium, separately from `npm test`:
379
+
380
+ ```bash
381
+ npx playwright-core install chromium-headless-shell # once, if Playwright's Chromium is not on this machine yet
382
+ npm run test:browser # builds, then runs src/__browser__/ (about 10 s)
383
+ ```
384
+
385
+ The suite starts the built server on scratch copies of `.specs/` under a temporary `HOME`, so it writes nothing in the repo or in `~/.specpilot/`. A failing test prints the paths of its error message and stack, a screenshot and the page's HTML, kept in a temp folder.
386
+
353
387
  ### Quick Contribution Guide
354
388
 
355
389
  1. Review [`.specs/project/requirements.md`](.specs/project/requirements.md)
package/dist/cli.js CHANGED
@@ -111,6 +111,7 @@ commander_1.program
111
111
  .option('--poll <ms>', 'How often to check spec files for changes, in ms (minimum 250)', '1000')
112
112
  .option('--read-only', 'Turn off task moves and guided setup: the page only reads')
113
113
  .option('--open', 'Open the UI in your default browser')
114
+ .option('--mcp', 'Also serve a local MCP endpoint at /mcp for your AI IDE (SPECPILOT_MCP_TOKEN sets its token)')
114
115
  .action(serve_1.serveCommand);
115
116
  commander_1.program.addHelpText('after', `
116
117
  Aliases:
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,0CAA8C;AAC9C,kDAAsD;AACtD,gDAAoD;AACpD,0CAA8C;AAC9C,8CAAkD;AAClD,oDAAuD;AACvD,gDAAoD;AACpD,kDAAsD;AACtD,uDAAgF;AAChF,4CAAgD;AAChD,2CAAwC;AAExC,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,mBAAO;KACJ,IAAI,CAAC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AAC;KACpG,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,CAAC;KAC1D,MAAM,CAAC,aAAa,EAAE,gEAAgE,EAAE,MAAM,CAAC;KAC/F,MAAM,CAAC,aAAa,EAAE,2DAA2D,CAAC;KAClF,MAAM,CAAC,QAAQ,EAAE,qCAAqC,CAAC;KACvD,MAAM,CAAC,OAAO,EAAE,8FAA8F,CAAC;KAC/G,MAAM,CAAC,oBAAY,CAAC,CAAC;AAExB,mBAAO,CAAC,WAAW,CAAC,OAAO,EAAE;;;;;;CAM5B,CAAC,CAAC;AAEH,+BAA+B;AAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,iDAAiD;AACjD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;IACtB,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAC5B,MAAM,CAAC,cAAc,EAAE,CAAC;IACxB,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,eAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,CAAC;IAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,mBAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -3,9 +3,14 @@ export interface ServeOptions {
3
3
  poll?: string;
4
4
  readOnly?: boolean;
5
5
  open?: boolean;
6
+ mcp?: boolean;
6
7
  }
7
8
  /** Longest a stop signal waits for a running clone to be killed and cleaned up. */
8
9
  export declare const STOP_CLONE_MS = 5000;
10
+ /** `SPECPILOT_MCP_TOKEN` (BL-PM-007): at least 32 visible ASCII characters, so it is hard to guess and fits in a header. */
11
+ export declare const MCP_TOKEN_PATTERN: RegExp;
12
+ /** The one line an IDE's MCP settings take (the page's card builds the same line, ui/route.js). */
13
+ export declare function mcpConfigLine(host: string, token: string): string;
9
14
  /**
10
15
  * Runs until Ctrl+C; exits the process with 1 on any startup error. `folders` empty = the current
11
16
  * directory (BL-054), which must contain `.specs/`; a named folder without one is served for guided
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID,mFAAmF;AACnF,eAAO,MAAM,aAAa,OAAO,CAAC;AAclC;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAsH1F"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAID,mFAAmF;AACnF,eAAO,MAAM,aAAa,OAAO,CAAC;AAGlC,4HAA4H;AAC5H,eAAO,MAAM,iBAAiB,QAAuB,CAAC;AAEtD,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE;AAaD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAiI1F"}
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.STOP_CLONE_MS = void 0;
6
+ exports.MCP_TOKEN_PATTERN = exports.STOP_CLONE_MS = void 0;
7
+ exports.mcpConfigLine = mcpConfigLine;
7
8
  exports.serveCommand = serveCommand;
8
9
  const chalk_1 = __importDefault(require("chalk"));
9
10
  const child_process_1 = require("child_process");
@@ -19,6 +20,12 @@ const DEFAULT_POLL_MS = 1000;
19
20
  /** Longest a stop signal waits for a running clone to be killed and cleaned up. */
20
21
  exports.STOP_CLONE_MS = 5000;
21
22
  const MIN_POLL_MS = 250;
23
+ /** `SPECPILOT_MCP_TOKEN` (BL-PM-007): at least 32 visible ASCII characters, so it is hard to guess and fits in a header. */
24
+ exports.MCP_TOKEN_PATTERN = /^[\x21-\x7e]{32,}$/;
25
+ /** The one line an IDE's MCP settings take (the page's card builds the same line, ui/route.js). */
26
+ function mcpConfigLine(host, token) {
27
+ return JSON.stringify({ mcpServers: { 'specpilot-local': { type: 'http', url: `http://${host}/mcp`, headers: { 'X-SpecPilot-Token': token } } } });
28
+ }
22
29
  /** Open `url` in the default browser. The URL is built here, never taken from input. */
23
30
  function openBrowser(url, logger) {
24
31
  const [cmd, args] = process.platform === 'darwin' ? ['open', [url]]
@@ -71,6 +78,12 @@ async function serveCommand(folders, options) {
71
78
  logger.error(`Invalid --poll "${options.poll}". Use a whole number of milliseconds, ${MIN_POLL_MS} or more.`);
72
79
  return process.exit(1);
73
80
  }
81
+ // Read here, never written anywhere: with it the IDE's config line survives restarts (BL-PM-007).
82
+ const envToken = options.mcp ? process.env.SPECPILOT_MCP_TOKEN : undefined;
83
+ if (envToken !== undefined && !exports.MCP_TOKEN_PATTERN.test(envToken)) {
84
+ logger.error('SPECPILOT_MCP_TOKEN must be at least 32 characters, with no spaces or other invisible characters. Set a longer one, or unset it to get a new token each run.');
85
+ return process.exit(1);
86
+ }
74
87
  // What an interrupted setup left behind (marked staging folders only); a delete, so never with --read-only.
75
88
  if (!options.readOnly) {
76
89
  for (const root of roots)
@@ -97,7 +110,7 @@ async function serveCommand(folders, options) {
97
110
  }
98
111
  let handle;
99
112
  try {
100
- handle = await (0, specServer_1.startSpecServer)(roots, port, packageJson.version, { pollMs, readOnly: !!options.readOnly, named, registry, log: m => logger.warn(m) });
113
+ handle = await (0, specServer_1.startSpecServer)(roots, port, packageJson.version, { pollMs, readOnly: !!options.readOnly, named, registry, mcp: !!options.mcp, mcpToken: envToken, log: m => logger.warn(m) });
101
114
  }
102
115
  catch (err) {
103
116
  if (err.code === 'EADDRINUSE') {
@@ -127,6 +140,10 @@ async function serveCommand(folders, options) {
127
140
  console.log(chalk_1.default.gray(`Folders opened in the page are remembered in ${(0, specServer_1.displayRoot)(registry, home)}.`));
128
141
  if (registryNote)
129
142
  console.log(registryNote);
143
+ if (options.mcp) {
144
+ console.log(`MCP endpoint: ${url}/mcp${options.readOnly ? ' (read tools only)' : ''}`);
145
+ console.log(`Add to your IDE's MCP settings: ${mcpConfigLine(`127.0.0.1:${port}`, envToken !== undefined ? '${SPECPILOT_MCP_TOKEN}' : handle.mcpToken)}`);
146
+ }
130
147
  if (options.open)
131
148
  openBrowser(url, logger);
132
149
  // Ctrl+C, `kill` and a closed terminal end the same way. A clone runs in its own session and would
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":";;;;;;AAwCA,oCAsHC;AA9JD,kDAA0B;AAC1B,iDAAsC;AACtC,2BAAwD;AACxD,+BAAqC;AACrC,oDAA+E;AAC/E,kDAAsE;AACtE,8DAA2G;AAC3G,4CAAyC;AAEzC,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AASlD,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,mFAAmF;AACtE,QAAA,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,wFAAwF;AACxF,SAAS,WAAW,CAAC,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AAG,EAAE,MAAM,EACX,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,MAAM,CAsDR"}
@@ -209,7 +209,8 @@ function buildContextRoutingTable() {
209
209
  function buildProcessMandatesMarkdown() {
210
210
  return `- **Spec-First:** Update \`.specs/\` before writing code.
211
211
  - **Log all AI interactions** in \`.specs/development/prompts.md\` with timestamps.
212
- - **Document decisions** in \`.specs/development/context.md\`.`;
212
+ - **Document decisions** in \`.specs/development/context.md\`.
213
+ - **Tasks:** When the SpecPilot MCP tools are connected, use them to add and move tasks. Otherwise edit \`.specs/planning/tasks.md\` directly and keep its table format.`;
213
214
  }
214
215
  function buildCodePhilosophyMarkdown() {
215
216
  return `## Code Philosophy — Write Only What Needed
@@ -1 +1 @@
1
- {"version":3,"file":"ideConfig.js","sourceRoot":"","sources":["../../src/core/ideConfig.ts"],"names":[],"mappings":";;;AA0DA,0CAGC;AAGD,0CAEC;AAUD,sCASC;AAGD,sCAiBC;AAGD,oDAEC;AAED,sCAiCG;AAEH,4DA+BG;AAEH,sEAeG;AAEH,4DAWG;AAEH,oEAIG;AAEH,kEAoBG;AAEH,8CA0DG;AAtSH,kGAAkG;AAClG,oFAAoF;AACpF,4FAA4F;AAE5F;;;;;GAKG;AACH,MAAM,aAAa,GAA4C;IAC7D,MAAM,EAAE;QACN,6CAA6C;QAC7C,iBAAiB,EAAE,IAAI;QACvB,wBAAwB,EAAE,IAAI;KAC/B;IACD,QAAQ,EAAE;QACR,+CAA+C;QAC/C,4BAA4B,EAAE,IAAI;QAClC,4BAA4B,EAAE,IAAI;QAClC,sCAAsC,EAAE,IAAI;KAC7C;IACD,WAAW,EAAE;QACX,kDAAkD;QAClD,wBAAwB,EAAE,IAAI;QAC9B,wBAAwB,EAAE,IAAI;QAC9B,+BAA+B,EAAE,IAAI;KACtC;CACF,CAAC;AAEF,mDAAmD;AACnD,MAAM,QAAQ,GAA2B;IACvC,MAAM,EAAE,S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,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO;qCAC0B,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;4BACtD,WAAW;;;;;IAKnC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BV,aAAa;EAChB,CAAC;AACD,CAAC"}
@@ -3,6 +3,7 @@ export declare const MAX_URL_LENGTH = 2048;
3
3
  export declare const CLONE_TIMEOUT_MS: number;
4
4
  /** Longest git message returned to the page. */
5
5
  export declare const MAX_GIT_LINE = 300;
6
+ export type CloneStage = 'receiving' | 'resolving' | 'updating';
6
7
  /** What is wrong with a repository URL, or null. Pure string checks: the URL is never parsed or rewritten. */
7
8
  export declare function cloneUrlError(url: string): string | null;
8
9
  /**
@@ -37,6 +38,8 @@ export interface CloneOptions {
37
38
  timeoutMs?: number;
38
39
  /** Aborting kills the clone: the page went away, or the server is closing. */
39
40
  signal?: AbortSignal;
41
+ /** Called each time git's progress changes stage or whole percentage (BL-PM-009). */
42
+ onProgress?: (stage: CloneStage, percent: number) => void;
40
43
  /** Tests only (a local bare repository needs `file`). The server never passes it and no request field maps to it. */
41
44
  allowProtocols?: string;
42
45
  }
@@ -48,7 +51,7 @@ export type CloneResult = {
48
51
  error: string;
49
52
  };
50
53
  /**
51
- * `git clone --no-recurse-submodules -- <url> <target>` in the target's parent, without a shell, with
54
+ * `git clone --progress --no-recurse-submodules -- <url> <target>` in the target's parent, without a shell, with
52
55
  * stdin closed and, on POSIX, in its own session (no controlling terminal; one process group to kill).
53
56
  * `spawn` and not `execFile`, which cannot start a detached child; both take an argument array.
54
57
  */
@@ -1 +1 @@
1
- {"version":3,"file":"gitClone.d.ts","sourceRoot":"","sources":["../../src/utils/gitClone.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,QAAiB,CAAC;AAC/C,gDAAgD;AAChD,e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AA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAmE1G;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAW1F"}
@@ -34,6 +34,13 @@ const URL_FORMS = [
34
34
  const SPACE_OR_CONTROL = /[\s\u0000-\u0020\u007f-\u00a0\u2028\u2029]/;
35
35
  // eslint-disable-next-line no-control-regex
36
36
  const ANSI_AND_CONTROL = /\u001b\[[0-9;?]*[ -/]*[@-~]|[\u0000-\u001f\u007f-\u009f\u2028\u2029]/g;
37
+ /** The stages of git's progress the page shows (BL-PM-009), by git's own words under `LC_MESSAGES=C`. */
38
+ const STAGES = { 'Receiving objects': 'receiving', 'Resolving deltas': 'resolving', 'Updating files': 'updating' };
39
+ const STAGE_LINE = /^(Receiving objects|Resolving deltas|Updating files): +([0-9]{1,3})% \(/;
40
+ /** Any progress line of git's: never shown as its error. */
41
+ const PROGRESS_LINE = /^[A-Z][A-Za-z ]+: +[0-9]{1,3}% \(/;
42
+ /** Longest run of stderr without a line break kept for the next read; a longer one is not progress. */
43
+ const MAX_CARRY = 300;
37
44
  /** What is wrong with a repository URL, or null. Pure string checks: the URL is never parsed or rewritten. */
38
45
  function cloneUrlError(url) {
39
46
  if (!url.length || url.length > exports.MAX_URL_LENGTH)
@@ -127,7 +134,7 @@ function probeGit(home, platform = process.platform) {
127
134
  * the last line left.
128
135
  */
129
136
  function gitErrorLine(stderr) {
130
- const lines = stderr.split(/\r?\n|\r/).map(line => line.replace(ANSI_AND_CONTROL, '').trim()).filter(l => l && !l.startsWith('remote:') && !l.startsWith('Cloning into '));
137
+ const lines = stderr.split(/\r?\n|\r/).map(line => line.replace(ANSI_AND_CONTROL, '').trim()).filter(l => l && !l.startsWith('remote:') && !l.startsWith('Cloning into ') && !PROGRESS_LINE.test(l));
131
138
  if (!lines.length)
132
139
  return null;
133
140
  const fatal = lines.map(l => l.startsWith('fatal:')).lastIndexOf(true);
@@ -138,7 +145,7 @@ function gitErrorLine(stderr) {
138
145
  return room > 0 ? `${lines[fatal - 1].slice(0, room)} ${last}` : last;
139
146
  }
140
147
  /**
141
- * `git clone --no-recurse-submodules -- <url> <target>` in the target's parent, without a shell, with
148
+ * `git clone --progress --no-recurse-submodules -- <url> <target>` in the target's parent, without a shell, with
142
149
  * stdin closed and, on POSIX, in its own session (no controlling terminal; one process group to kill).
143
150
  * `spawn` and not `execFile`, which cannot start a detached child; both take an argument array.
144
151
  */
@@ -150,7 +157,7 @@ function cloneRepository(url, target, opts = {}) {
150
157
  const env = gitEnv(opts.allowProtocols ?? 'https:ssh');
151
158
  if (opts.batchSsh)
152
159
  env.GIT_SSH_COMMAND = 'ssh -oBatchMode=yes';
153
- const child = (0, child_process_1.spawn)('git', ['clone', '--no-recurse-submodules', '--', url, target], {
160
+ const child = (0, child_process_1.spawn)('git', ['clone', '--progress', '--no-recurse-submodules', '--', url, target], {
154
161
  cwd: (0, path_1.dirname)(target), env, stdio: ['ignore', 'ignore', 'pipe'], detached: posix, windowsHide: true,
155
162
  });
156
163
  let stderr = '';
@@ -179,8 +186,32 @@ function cloneRepository(url, target, opts = {}) {
179
186
  opts.signal?.removeEventListener('abort', onAbort);
180
187
  done(result);
181
188
  };
189
+ // git rewrites a progress line with `\r` and ends it with `\n`; a line cut between two reads is
190
+ // joined first. null: inside a run longer than MAX_CARRY, dropped up to the next line break.
191
+ let carry = '';
192
+ let last = '';
193
+ const readProgress = (text) => {
194
+ const lines = text.split(/\r|\n/);
195
+ const tail = lines.pop();
196
+ if (lines.length) {
197
+ lines[0] = carry === null ? '' : carry + lines[0];
198
+ carry = '';
199
+ }
200
+ if (carry !== null)
201
+ carry = carry.length + tail.length > MAX_CARRY ? null : carry + tail;
202
+ for (const line of lines) {
203
+ const m = STAGE_LINE.exec(line.replace(ANSI_AND_CONTROL, ''));
204
+ if (!m || +m[2] > 100 || `${m[1]} ${+m[2]}` === last)
205
+ continue;
206
+ last = `${m[1]} ${+m[2]}`;
207
+ opts.onProgress(STAGES[m[1]], +m[2]);
208
+ }
209
+ };
182
210
  child.stderr.on('data', (chunk) => {
183
- stderr = (stderr + chunk.toString('utf-8')).slice(-65536);
211
+ const text = chunk.toString('utf-8');
212
+ stderr = (stderr + text).slice(-65536);
213
+ if (opts.onProgress && !finished && !stopped)
214
+ readProgress(text); // nothing once git is being stopped or has ended
184
215
  });
185
216
  child.on('error', err => {
186
217
  const code = err.code;
@@ -1 +1 @@
1
- {"version":3,"file":"gitClone.js","sourceRoot":"","sources":["../../src/utils/gitClone.ts"],"names":[],"mappings":";;;AAgCA,sCAMC;AAYD,0CAkBC;AA2BD,4BAUC;AAQD,oCAQC;AAmBD,0CA8CC;AAOD,kCAWC;AA5MD,iDAAgD;AAChD,2BAAoC;AACpC,+BAA4C;AAC5C,mDAAmD;AACnD,uDAAmD;AAEnD,qGAAqG;AACrG,sGAAsG;AACtG,gGAAgG;AAEnF,QAAA,cAAc,GAAG,IAAI,CAAC;AACnC,4DAA4D;AAC/C,QAAA,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAC/C,gDAAgD;AACnC,QAAA,YAAY,GAAG,GAAG,CAAC;AAEhC,MAAM,IAAI,GAAG,2CAA2C,CAAC;AACzD,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAC3C,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAChC,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAC7C,iHAAiH;AACjH,MAAM,SAAS,GAAG;IAChB,IAAI,MAAM,CAAC,YAAY,IAAI,GAAG,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CAAC;QACvI,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,OAAgB;IAChE,IAAI,CAAC;QACH,IAAI,CAAC,CAAC,MAAM,aAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE;YAAE,OAAO,IAAI,CAAC;QACzD,4FAA4F;QAC5F,KAAK,MAAM,KAAK,IAAI,MAAM,aAAE,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM,aAAE,CAAC,EAAE,CAAC,IAAA,WAAI,EAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACjH,IAAI,OAAO;YAAE,MAAM,aAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAI,GAA6B,CAAC,IAAI,CAAC;QACjD,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC;IACtD,CAAC;AACH,CAAC"}
@@ -0,0 +1,46 @@
1
+ /** Protocol revisions served, newest first: the initialize-based ones without JSON-RPC batches. */
2
+ export declare const MCP_VERSIONS: string[];
3
+ /** The handshake-free revision: version, client and capabilities in every request's `_meta`. */
4
+ export declare const MCP_MODERN = "2026-07-28";
5
+ /** Every revision served, newest first, as `server/discover` and -32022 list them. */
6
+ export declare const MCP_ALL_VERSIONS: string[];
7
+ /** The request headers 2026-07-28 mirrors from the body, every value sent (Node joins repeats in `req.headers`). */
8
+ export type McpHeaders = Record<'mcp-protocol-version' | 'mcp-method' | 'mcp-name', string[]>;
9
+ export declare function mirroredHeaders(rawHeaders: string[]): McpHeaders;
10
+ /** A refused tool call: shown to the agent as a tool result with `isError: true`. */
11
+ export declare class ToolRefusal extends Error {
12
+ }
13
+ export interface McpTool {
14
+ name: string;
15
+ title: string;
16
+ description: string;
17
+ inputSchema: Record<string, unknown>;
18
+ annotations: Record<string, boolean>;
19
+ /** Writes a file: absent with `--read-only`. */
20
+ writes: boolean;
21
+ }
22
+ export declare const MCP_TOOLS: McpTool[];
23
+ export interface McpReply {
24
+ /** HTTP status; 202 has no body. */
25
+ status: number;
26
+ body?: unknown;
27
+ }
28
+ export declare const rpcError: (id: unknown, code: number, message: string) => {
29
+ jsonrpc: string;
30
+ id: {} | null;
31
+ error: {
32
+ code: number;
33
+ message: string;
34
+ };
35
+ };
36
+ type Call = (name: string, args: Record<string, unknown>) => Promise<{
37
+ text: string;
38
+ data?: Record<string, unknown>;
39
+ }>;
40
+ /**
41
+ * Answer one parsed JSON-RPC message. `headers` are the mirrored request headers, every value sent;
42
+ * `call` runs a tool and returns what it found, or throws ToolRefusal with the reason.
43
+ */
44
+ export declare function answerMcp(msg: unknown, headers: McpHeaders, tools: McpTool[], version: string, call: Call): Promise<McpReply>;
45
+ export {};
46
+ //# sourceMappingURL=mcpLocal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcpLocal.d.ts","sourceRoot":"","sources":["../../src/utils/mcpLocal.ts"],"names":[],"mappings":"AAMA,mGAAmG;AACnG,eAAO,MAAM,YAAY,UAA+B,CAAC;AACzD,gGAAgG;AAChG,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,sFAAsF;AACtF,eAAO,MAAM,gBAAgB,UAAgC,CAAC;AAG9D,oHAAoH;AACpH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,sBAAsB,GAAG,YAAY,GAAG,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;AAE9F,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,UAAU,CAOhE;AAwBD,qFAAqF;AACrF,qBAAa,WAAY,SAAQ,KAAK;CAAG;A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