severally-mcp 2.1.0 → 2.4.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 (52) hide show
  1. package/CODE_OF_CONDUCT.md +83 -0
  2. package/CONFIG.md +10 -6
  3. package/README.ja.md +146 -69
  4. package/README.md +150 -73
  5. package/bin/severally-mcp.mjs +17 -2
  6. package/config.example.json +26 -0
  7. package/docs/how-it-works.ja.md +4 -2
  8. package/docs/how-it-works.md +5 -3
  9. package/docs/install.ja.md +59 -24
  10. package/docs/install.md +60 -24
  11. package/package.json +16 -4
  12. package/plugins/severally/.claude-plugin/plugin.json +1 -1
  13. package/plugins/severally/.codex-plugin/plugin.json +1 -1
  14. package/plugins/severally/dist/severally-mcp.mjs +29220 -27764
  15. package/plugins/severally/skills/_template/SKILL.md.tmpl +16 -22
  16. package/plugins/severally/skills/_template/reference.md.tmpl +11 -5
  17. package/plugins/severally/skills/antigravity/severally/SKILL.md +16 -22
  18. package/plugins/severally/skills/antigravity/severally/reference.md +11 -5
  19. package/plugins/severally/skills/claude/severally/SKILL.md +16 -22
  20. package/plugins/severally/skills/claude/severally/reference.md +11 -5
  21. package/plugins/severally/skills/codex/severally/SKILL.md +16 -22
  22. package/plugins/severally/skills/codex/severally/reference.md +11 -5
  23. package/plugins/severally/skills/opencode/severally/SKILL.md +16 -22
  24. package/plugins/severally/skills/opencode/severally/reference.md +11 -5
  25. package/scripts/build.mjs +31 -26
  26. package/scripts/doctor.mjs +52 -17
  27. package/scripts/init-config.mjs +8 -6
  28. package/scripts/install.mjs +342 -84
  29. package/scripts/live-check.mjs +52 -19
  30. package/scripts/live-mcp-check.mjs +42 -12
  31. package/scripts/test.mjs +10 -4
  32. package/src/adapters/antigravity-sandbox.mjs +39 -23
  33. package/src/adapters/antigravity.mjs +34 -16
  34. package/src/adapters/claude-code.mjs +73 -21
  35. package/src/adapters/codex.mjs +69 -27
  36. package/src/adapters/opencode-sandbox.mjs +40 -21
  37. package/src/adapters/opencode.mjs +31 -13
  38. package/src/brief.mjs +65 -41
  39. package/src/consultants.mjs +99 -30
  40. package/src/export.mjs +49 -12
  41. package/src/expose-paths.mjs +162 -44
  42. package/src/failures.mjs +23 -13
  43. package/src/jobs.mjs +420 -140
  44. package/src/parse-result.mjs +85 -30
  45. package/src/platform.mjs +5 -7
  46. package/src/policy.mjs +139 -32
  47. package/src/redact.mjs +38 -14
  48. package/src/run.mjs +104 -22
  49. package/src/schema.mjs +76 -22
  50. package/src/server.mjs +176 -166
  51. package/src/status.mjs +132 -0
  52. package/src/store.mjs +164 -19
package/README.md CHANGED
@@ -22,12 +22,21 @@ The plugin puts the question to several independent consultants, and returns eac
22
22
  instead of merging them into one, because a disagreement means something too. The agent checks why they disagree
23
23
  before deciding how to take the answers.
24
24
 
25
+ Asked whether to cache a slow product page for five minutes, three consultants answered on their own
26
+ (see [Example](#example) for the whole run):
27
+
28
+ ```
29
+ codex do_not_proceed the price depends on the member's tier, so the first visitor's price is served to everyone
30
+ claude-code do_not_proceed whoever fills the cache first sets the price everyone else sees for 5 minutes
31
+ antigravity alternative member discounts leak to other users; fix the query and a cache may not be needed
32
+ ```
33
+
25
34
  ## Contents
26
35
 
27
- - [Example](#example)
28
- - [How it works](#how-it-works)
36
+ - [Background](#background)
29
37
  - [Install](#install)
30
38
  - [Requirements](#requirements)
39
+ - [Command line](#command-line)
31
40
  - [Updating](#updating)
32
41
  - [Uninstall](#uninstall)
33
42
  - [Usage](#usage)
@@ -35,66 +44,15 @@ before deciding how to take the answers.
35
44
  - [When the answers come back](#when-the-answers-come-back)
36
45
  - [Modes](#modes)
37
46
  - [History and records](#history-and-records)
47
+ - [Example](#example)
48
+ - [Recommended setup](#recommended-setup)
38
49
  - [Configuration](#configuration)
39
50
  - [What a consultant can see and do](#what-a-consultant-can-see-and-do)
40
51
  - [API](#api)
41
52
  - [Contributing](#contributing)
42
53
  - [License](#license)
43
54
 
44
- ## Example
45
-
46
- Here is how severally changes the way the agent works, shown in one situation: the agent comes up with a change,
47
- and before asking you to approve it, it asks the consultants for their opinions.
48
-
49
- The example is a small online shop's API. `GET /products/:id`, which serves the product page, is slow: about
50
- 800 ms. The API loads each product joined with its inventory and its reviews. Prices depend on the member's tier,
51
- and gold members get a 10% discount.
52
-
53
- The agent, running in Claude Code, comes up with a common fix: "keep each response in an in-memory Map for 5
54
- minutes". Before asking you "can I go ahead?", it shows the plan to three consultants: Codex, Antigravity, and a
55
- fresh Claude Code session (a new session of the agent's own CLI, with none of its conversation). Along with the
56
- plan, it hands them read-only copies of the code involved. The answers come back one per consultant, side by side
57
- (excerpt from a real run against a sample API):
58
-
59
- ```
60
- codex do_not_proceed the price depends on the member's tier, so keyed by product id alone, the first
61
- visitor's price is served to everyone; the join inflates stock; 4 workers keep
62
- separate copies, so an order that changes stock does not clear the old value
63
- claude-code do_not_proceed whoever fills the cache first sets the price everyone else sees for 5 minutes;
64
- 4 workers each keep their own copy, so stock stays stale after orders; fix the
65
- join bug first too
66
- antigravity alternative member discounts leak to other users; the 800 ms comes from joining inventory
67
- and reviews, which also skews stock; rewrite the query and it is likely fast
68
- enough without a cache
69
- ```
70
-
71
- Each answer opens with a bottom line: `proceed`, `do_not_proceed`, `alternative` (do something else instead) or
72
- `undetermined`. The three found the same problems, each on its own: the price leak, the inflated stock and the
73
- per-worker caches. Where they differ is what comes next. Codex and Claude Code recommend fixing the query and
74
- then caching only the part that does not depend on the user. Antigravity says that with the query fixed, a cache
75
- may not be needed at all. Merge the answers into one and that difference gets buried.
76
-
77
- The agent that asked (the *lead*) reads the findings and then checks them in its own repository. Of the two
78
- findings, one reproduced exactly; the other turned out not to be happening yet, and that changed the response.
79
-
80
- ```
81
- finding the query joins inventory and reviews together, so stock is multiplied by the number of reviews
82
- checked ran the query on a test database: 5 units in stock, 4 reviews -> stock comes out as 20
83
- so fix the query before any cache
84
-
85
- finding a gold member's 10% discount would be served to guests
86
- checked login is not wired in yet, so today everyone gets the base price.
87
- the leak starts the day login is added
88
- so cache only the product data that does not depend on the user, and compute the price on each request
89
- ```
90
-
91
- What comes back to you is not a vote of "2 against, 1 alternative". It is what was checked, what the lead
92
- recommends, and what has not been checked yet. Here that is whether the fixed query is fast enough without a
93
- cache (it needs production-like data), and how stale the stock shown after an order may be (that one is yours to
94
- decide). You make the call. The checked results stay next to the findings and can be exported as Markdown into
95
- your repository (see [History and records](#history-and-records)).
96
-
97
- ## How it works
55
+ ## Background
98
56
 
99
57
  ```mermaid
100
58
  flowchart TB
@@ -124,25 +82,56 @@ What a consultant can read and do is under [What a consultant can see and do](#w
124
82
 
125
83
  ### Requirements
126
84
 
127
- - Node.js 20.10 or newer
85
+ - Node.js 22 or newer
128
86
  - At least one of the four CLIs, installed and logged in. One is enough: with only Claude Code, you can still ask a
129
87
  fresh Claude Code session.
130
- - On macOS and Linux, npm's global executable directory on `PATH`: the default install puts a `severally-mcp`
131
- command there for Codex to launch. `--manual` does without it.
88
+
89
+ The installer and the server are tested on Linux, macOS and Windows; the Claude Code and Codex marketplace
90
+ routes and the real CLIs have been tried on Linux only.
132
91
 
133
92
  One line, on macOS, Linux and Windows (PowerShell or Command Prompt):
134
93
 
135
94
  ```bash
136
- npx -y severally-mcp@2.1.0 install
95
+ npx -y severally-mcp@2.4.0 install
137
96
  ```
138
97
 
139
98
  The installer registers severally with each CLI it finds on `PATH`. Add `--dry-run` at the end to print what it
140
99
  would change without changing anything. Then restart the clients: a running session does not reload the new
141
100
  registration.
142
101
 
102
+ If you use only Claude Code, you can install from its plugin marketplace instead: run `/plugin marketplace add coz-a/severally`
103
+ and then `/plugin install severally@severally` in Claude Code, and restart it. The one line above is the main route,
104
+ since it registers every CLI it finds. Details are in
105
+ [docs/install.md](docs/install.md#from-the-claude-code-plugin-marketplace).
106
+
107
+ On macOS and Linux, the default install also runs `npm install -g` to put a `severally-mcp` command on `PATH`, which
108
+ only Codex's plugin needs. If npm cannot install it globally (for example it needs sudo, or npm's global folder is
109
+ not on `PATH`), the installer registers Codex directly instead and says so. Nothing else is needed.
110
+
143
111
  Installing from the Claude Code plugin marketplace or from a clone, checking the registration, and what the
144
112
  installer changes are in [docs/install.md](docs/install.md).
145
113
 
114
+ ### Command line
115
+
116
+ ```bash
117
+ npx -y severally-mcp@latest install [--dry-run] [--manual] [--force] [--skip-global] [--allow-local-tools]
118
+ ```
119
+
120
+ | Option | What it does |
121
+ |---|---|
122
+ | `--dry-run` | prints what it would change, and changes nothing |
123
+ | `--manual` | registers the MCP server and copies the Skill instead of installing the plugin (the default on Windows) |
124
+ | `--force` | registers again where severally is already registered, instead of leaving it as it is |
125
+ | `--skip-global` | skips the global npm install in plugin mode, when `severally-mcp` on `PATH` is already this install |
126
+ | `--allow-local-tools` | adds severally's five local tools to Claude Code's allow list without asking; `consult_start` still asks |
127
+
128
+ What each mode changes is in [docs/install.md](docs/install.md#two-install-modes).
129
+
130
+ `npx -y severally-mcp@latest status` shows what is set up without starting a consultation: the config file, the
131
+ consultants this machine can reach, the installed copies' versions, which clients have severally registered and
132
+ whether each CLI is logged in. The login check reads the CLI's own status command and sends no prompt; running out
133
+ of quota is not checked, and the first consultation shows it.
134
+
146
135
  ### Updating
147
136
 
148
137
  This line replaces your install with the latest version, with no version number to look up:
@@ -152,8 +141,8 @@ npx -y severally-mcp@latest install
152
141
  ```
153
142
 
154
143
  With `@latest`, npx asks npm for the newest version every time, so an older copy it already has is not used.
155
- Then restart the clients. Installed from the Claude Code plugin marketplace: see
156
- [docs/install.md](docs/install.md#updating). What changed in each version is in the
144
+ If Claude Code has severally from its plugin marketplace, the same line updates that copy too (details in
145
+ [docs/install.md](docs/install.md#updating)). Then restart the clients. What changed in each version is in the
157
146
  [releases](https://github.com/coz-a/severally/releases).
158
147
 
159
148
  ### Uninstall
@@ -182,6 +171,9 @@ Ask in your own words, in the chat with your agent:
182
171
  - The agent also consults without being asked: when an investigation stalls, when two options look equally
183
172
  good, and before asking you to approve a hard-to-reverse change.
184
173
 
174
+ What comes back to you is the lead's report, not the consultants' answers as they arrived: what it checked and
175
+ what that showed, what it recommends, and what is still unverified. The [example](#example) shows one.
176
+
185
177
  It is worth it for important design decisions, hard-to-reverse choices, and two or more failed attempts at the
186
178
  same bug. One consultation takes minutes and real quota, so it is not for small fixes.
187
179
 
@@ -190,9 +182,10 @@ same bug. One consultation takes minutes and real quota, so it is not for small
190
182
  Starting a consultation does not make the agent wait: it can work on something that does not depend on the
191
183
  answers, which usually arrive within one to ten minutes (Antigravity is the slowest).
192
184
 
193
- Every answer has the same shape: a bottom line, findings with their grounds, what the consultant could not
194
- determine, conditions that would change its judgement, and how to check. A consultant that fails comes back as a
195
- failure with the reason (`usage_limit`, `timeout` …), never as "no problems found".
185
+ Every answer is asked for in the same shape: a bottom line, findings with their grounds, what the consultant could
186
+ not determine, conditions that would change its judgement, and how to check. When an answer leaves part of that
187
+ out, such as the bottom line or the grounds for a finding, it says so in a caveat. A consultant that fails comes
188
+ back as a failure with the reason (`usage_limit`, `timeout` …), never as "no problems found".
196
189
 
197
190
  The agent checks the findings that would change the decision itself, then tells you what it checked, what it did
198
191
  not adopt, and what is still unverified.
@@ -203,7 +196,7 @@ There are three modes, chosen from what the agent hands over. You can also ask f
203
196
  Codex").
204
197
 
205
198
  - `explore`: asks without showing the plan, so the consultant answers with its own approach first
206
- - `review`: shows the plan and asks what is wrong with it (the example above)
199
+ - `review`: shows the plan and asks what is wrong with it (the [example](#example))
207
200
  - `debate`: shows the plan with the opposing claims, and asks the consultant to weigh them
208
201
 
209
202
  After the first answer, the agent can send follow-ups to the same consultant: up to four by default, five rounds
@@ -219,12 +212,94 @@ repository.
219
212
  How to name consultants, how a consultation runs, and the records in detail are in
220
213
  [docs/how-it-works.md](docs/how-it-works.md).
221
214
 
215
+ ## Example
216
+
217
+ Here is how severally changes the way the agent works, shown in one situation: the agent comes up with a change,
218
+ and before asking you to approve it, it asks the consultants for their opinions.
219
+
220
+ The example is a small online shop's API. `GET /products/:id`, which serves the product page, is slow: about
221
+ 800 ms. The API loads each product joined with its inventory and its reviews. Prices depend on the member's tier,
222
+ and gold members get a 10% discount.
223
+
224
+ The agent, running in Claude Code, comes up with a common fix: "keep each response in an in-memory Map for 5
225
+ minutes". Before asking you "can I go ahead?", it shows the plan to three consultants: Codex, Antigravity, and a
226
+ fresh Claude Code session (a new session of the agent's own CLI, with none of its conversation). Along with the
227
+ plan, it hands them read-only copies of the code involved. The answers come back one per consultant, side by side
228
+ (excerpt from a real run against a sample API):
229
+
230
+ ```
231
+ codex do_not_proceed the price depends on the member's tier, so keyed by product id alone, the first
232
+ visitor's price is served to everyone; the join inflates stock; 4 workers keep
233
+ separate copies, so an order that changes stock does not clear the old value
234
+ claude-code do_not_proceed whoever fills the cache first sets the price everyone else sees for 5 minutes;
235
+ 4 workers each keep their own copy, so stock stays stale after orders; fix the
236
+ join bug first too
237
+ antigravity alternative member discounts leak to other users; the 800 ms comes from joining inventory
238
+ and reviews, which also skews stock; rewrite the query and it is likely fast
239
+ enough without a cache
240
+ ```
241
+
242
+ Each answer opens with a bottom line: `proceed`, `do_not_proceed`, `alternative` (do something else instead) or
243
+ `undetermined`. The three found the same problems, each on its own: the price leak, the inflated stock and the
244
+ per-worker caches. Where they differ is what comes next. Codex and Claude Code recommend fixing the query and
245
+ then caching only the part that does not depend on the user. Antigravity says that with the query fixed, a cache
246
+ may not be needed at all. Merge the answers into one and that difference gets buried.
247
+
248
+ The agent that asked (the *lead*) reads the findings and then checks them in its own repository. Of the two
249
+ findings, one reproduced exactly; the other turned out not to be happening yet, and that changed the response.
250
+
251
+ ```
252
+ finding the query joins inventory and reviews together, so stock is multiplied by the number of reviews
253
+ checked ran the query on a test database: 5 units in stock, 4 reviews -> stock comes out as 20
254
+ so fix the query before any cache
255
+
256
+ finding a gold member's 10% discount would be served to guests
257
+ checked login is not wired in yet, so today everyone gets the base price.
258
+ the leak starts the day login is added
259
+ so cache only the product data that does not depend on the user, and compute the price on each request
260
+ ```
261
+
262
+ What comes back to you is not a vote of "2 against, 1 alternative". It is what was checked, what the lead
263
+ recommends, and what has not been checked yet. Here that is whether the fixed query is fast enough without a
264
+ cache (it needs production-like data), and how stale the stock shown after an order may be (that one is yours to
265
+ decide). You make the call. The checked results stay next to the findings and can be exported as Markdown into
266
+ your repository (see [History and records](#history-and-records)).
267
+
268
+ ## Recommended setup
269
+
270
+ Register the strongest model of each vendor as a consultant, and do the everyday work on a cheaper model, such as
271
+ Sonnet in Claude Code. Most of the work, such as editing code, running tests and searching, goes fine on the
272
+ cheaper model. For the decisions where a wrong call costs the most, such as a design choice or a change that is
273
+ hard to reverse, the lead asks the strongest models, each on its own. They spend quota only in those
274
+ consultations, so most of the usage stays on the cheaper model, and the decisions that matter still get the
275
+ strongest models' opinions.
276
+
277
+ A `~/.severally/config.json` for this:
278
+
279
+ ```json
280
+ {
281
+ "consultants": {
282
+ "opus": { "cli": "claude-code", "model": "claude-opus-5-5" },
283
+ "gpt": { "cli": "codex", "model": "gpt-6.1-sol" },
284
+ "gemini": { "cli": "antigravity", "model": "gemini-4-argon-high" }
285
+ }
286
+ }
287
+ ```
288
+
289
+ Model ids change as new models come out; replace them with the ones your CLIs offer. Consultants run at effort
290
+ `high` unless you set `effort`, except on Antigravity, where the model name sets it (`gemini-4-argon-high`) and an
291
+ `effort` key is a config mistake.
292
+
293
+ Then start the lead on the cheaper model (`claude --model sonnet`, or `/model sonnet` in a running session). The
294
+ lead consults on its own at the moments listed under [Asking](#asking), and you can ask it to ("ask everyone before
295
+ we merge this"). Each consultant runs on its own CLI's login and quota.
296
+
222
297
  ## Configuration
223
298
 
224
299
  **No configuration needed by default.** At startup the server looks for the CLIs on `PATH`, and each one it finds
225
300
  becomes a consultant on its default model. To turn a CLI off or add consultants on other models, put a
226
301
  `~/.severally/config.json` in place. From a clone, `npm run init-config` writes a template. Every key is in
227
- [CONFIG.md](CONFIG.md), and [config.example.json](config.example.json) is a working example to copy from. Restart
302
+ [CONFIG.md](CONFIG.md), and [config.example.json](config.example.json) is an example to adapt: its paths, models and notes are made up. Restart
228
303
  the client after changing it.
229
304
 
230
305
  To consult a model you reach with an API key (OpenRouter, or another OpenAI-compatible API) or a local model,
@@ -248,13 +323,15 @@ history is never sent. No consultant can:
248
323
  | Antigravity | yes (`view_file`) | blocked (tool hook) | none | no | yes, unless `network: "off"` |
249
324
  | OpenCode | yes (`read` / `glob` / `grep`) | blocked (permission rules) | none (its Code Mode `execute` is refused) | no | yes, unless `network: "off"` |
250
325
 
251
- Every consultant starts in an empty working directory, and the server does not tell it where your repository
252
- is. It can still read any file your user account can read, except the credential paths the table marks blocked.
326
+ Every consultant starts in a working directory of its own that holds only copies of the files you handed it, and
327
+ the server does not tell it where your repository is. It can still read any file your user account can read, except the credential paths the table marks blocked.
253
328
  Codex does not block by file name, so a `.env` in your repository is readable to it.
254
329
 
255
330
  **A consultant that can both read your disk and browse could carry what it read out in a URL**, for example if a
256
331
  page it opens tells it to. To prevent that, the agent passes `network: "off"`: every consultant in that round then
257
- has no web search or browsing. The brief, and whatever a consultant reads, still goes to that CLI's model.
332
+ has no web search or browsing. To make that the rule for every consultation, set `"server": { "network": "off" }`
333
+ in the [config file](CONFIG.md#server-wide-keys); a request cannot turn it back on. The brief, and whatever a
334
+ consultant reads, still goes to that CLI's model.
258
335
 
259
336
  How each CLI is held to this is in [docs/how-it-works.md](docs/how-it-works.md#how-a-consultant-is-kept-to-reading).
260
337
 
@@ -267,9 +344,9 @@ it exposes, go to each consultant's model. Every argument is described in the to
267
344
  |---|---|
268
345
  | `consult_start` | Starts a consultation with one consultant (`target`) or several (`targets`), and returns a `job_id` or `group_id` at once |
269
346
  | `consult_get` | Waits for a consultation and returns its state or answer; with `ids`, just those points of the answer |
270
- | `consult_cancel` | Stops a consultation or a whole fan-out, and its consultant processes |
347
+ | `consult_cancel` | Stops a consultation or a whole fan-out, and its consultant processes, also one another session started |
271
348
  | `consult_record` | Writes the lead's verdicts on an answer's points, and what the answer added |
272
- | `consult_list` | Lists recent consultations, with the usage each consultant reported |
349
+ | `consult_list` | Lists recent consultations, earlier sessions' included, with the usage each consultant reported in this session |
273
350
  | `consult_export` | Returns a consultation, follow-ups and verdicts included, as Markdown |
274
351
 
275
352
  The arguments of `consult_start` that matter most:
@@ -278,7 +355,7 @@ The arguments of `consult_start` that matter most:
278
355
  directory in a git repository copies only the files git lists (nothing `.gitignore` excludes)
279
356
  - `context.expose_diff`: `{ repo, base? }`, a change in progress: the diff goes in the brief and the files it touches are copied
280
357
  - `network`: `"off"` takes web search and browsing away from every consultant in the round
281
- - `followup_to`: the `job_id` of the answer a follow-up continues, or a fan-out's `group_id` to ask every consultant in it again
358
+ - `followup_to`: the `job_id` of the answer a follow-up continues, or a fan-out's `group_id` to ask every consultant in it again. A follow-up needs only this and `question`; the consultant, the mode and the earlier round's context carry over unless you pass them again
282
359
 
283
360
  ## Contributing
284
361
 
@@ -1,6 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- import { main } from '../src/server.mjs';
3
+
4
+ // Checked before anything else loads, so an older Node says what to do
5
+ // instead of failing somewhere inside the server or the installer.
6
+ const major = Number(process.versions.node.split('.')[0]);
7
+ if (major < 22) {
8
+ process.stderr.write(
9
+ `severally: Node.js 22 or newer is needed (this is ${process.versions.node}); update Node.js and run it again\n`,
10
+ );
11
+ process.exit(1);
12
+ }
4
13
 
5
14
  // `npx -y severally-mcp@latest install` runs the installer, so installing and
6
15
  // updating name the package once. Only the npm package has the installer
@@ -10,12 +19,18 @@ import { main } from '../src/server.mjs';
10
19
  if (process.argv[2] === 'install') {
11
20
  const installer = new URL('../scripts/install.mjs', import.meta.url);
12
21
  if (!fs.existsSync(installer)) {
13
- process.stderr.write('severally: this is the installed server, not the installer; run: npx -y severally-mcp@latest install\n');
22
+ process.stderr.write(
23
+ 'severally: this is the installed server, not the installer; run: npx -y severally-mcp@latest install\n',
24
+ );
14
25
  process.exit(1);
15
26
  }
16
27
  process.argv.splice(2, 1);
17
28
  await import(installer.href);
29
+ } else if (process.argv[2] === 'status') {
30
+ const { status } = await import('../src/status.mjs');
31
+ process.exitCode = status();
18
32
  } else {
33
+ const { main } = await import('../src/server.mjs');
19
34
  main().catch((err) => {
20
35
  process.stderr.write(`severally: fatal: ${err?.stack ?? err}\n`);
21
36
  process.exit(1);
@@ -0,0 +1,26 @@
1
+ // Full key reference, and what each one does: CONFIG.md
2
+ // This file exercises every clis and consultants key and some server keys; you do not need to
3
+ // set them all -- most operators need only one or two. The paths, models and notes are made up:
4
+ // replace them with your own.
5
+ {
6
+ "server": { "max_rounds": 10, "timeout_ms": 900000 },
7
+ "clis": {
8
+ "codex": { "enabled": false, "note": "rate-limited until 15:00" },
9
+ "claude-code": {
10
+ "bin": "/opt/claude/bin/claude",
11
+ "args": ["--disallowedTools", "WebFetch"],
12
+ "env": { "HTTPS_PROXY": "http://proxy.internal:3128" }
13
+ },
14
+ "antigravity": { "bin": "/opt/agy/bin/agy" }
15
+ },
16
+ "consultants": {
17
+ "opus": { "cli": "claude-code", "model": "claude-opus-5-5", "effort": "max", "max_budget_usd": 5, "timeout_ms": 900000 },
18
+ "fable": { "cli": "claude-code", "model": "claude-fable-5-1" },
19
+ "sol": { "cli": "codex", "model": "gpt-6.1-sol" },
20
+ "gemini": { "cli": "antigravity", "model": "gemini-4-argon-high" },
21
+ "glm": { "cli": "opencode", "model": "zai-coding-plan/glm-5.3" },
22
+ "deepseek": { "cli": "opencode", "model": "opencode/deepseek-v4.1-flash-free", "enabled": false, "note": "trial ended" },
23
+ "nemotron": { "cli": "opencode", "model": "opencode/nemotron-3-ultra-free#", "vendor": "nvidia" }
24
+ },
25
+ "ranking": ["opus", "glm"]
26
+ }
@@ -42,8 +42,8 @@ OpenCode ──(skill)──> severally server ──> codex exec | claude -p
42
42
  - 相談の結果は、サーバを再起動したあとも、同じマシンで動くほかの severally のプロセスからも読めます。ほかのプロセスで
43
43
  実行中のものは実行中と返ります。終わる前にサーバがクラッシュや強制終了で止まったものは `interrupted` として返ります。
44
44
  サーバがふつうに終了したときは、実行中の相談を取り消しとして記録します。
45
- - 相談を取り消せるのは、それを実行しているプロセスだけです。ほかのプロセスから `consult_cancel` を呼ぶと、何も
46
- 止めなかったと返ります。
45
+ - ほかの severally のプロセスから `consult_cancel` を呼ぶと、相談を実行しているプロセスへの取り消しの依頼を
46
+ 残します。実行しているプロセスは 1 秒ごとにそれを確かめ、相談を止めます。
47
47
  - 主担当が自分では実行できない確認(ほかの人の答えが要るものなど)は、理由をつけてあなたに返します。
48
48
  - **あとで判断の理由を説明する必要がある決定**(インターフェース、移行、セキュリティ、並行処理)では、主担当は
49
49
  自分から、またはあなたに頼まれて、手順を足します。質問と成功の条件をはっきりさせ、課された制約と自分の仮定を
@@ -52,6 +52,8 @@ OpenCode ──(skill)──> severally server ──> codex exec | claude -p
52
52
  ふつうの変更なので、ほかの変更と同じようにレビューします。
53
53
  - モードは、計画のない依頼が `explore`、計画のある依頼が `review`、計画と反対の主張がある依頼が `debate` になります。
54
54
  計画を含んだ最初の `explore` の依頼は、サーバが受け付けません。追加の質問は、元の相談のモードを引き継ぎます。
55
+ 主担当が渡し直さない限り、ほかに渡したもの(相談相手、`network`、目的、制約、成功条件、事実、計画、反対の主張、
56
+ 資料)も引き継ぎ、新しいブリーフに書き直して載せます。
55
57
  追加の質問の上限は、設定ファイルの `server.max_rounds` で変えられます。
56
58
 
57
59
  ## 記録
@@ -43,8 +43,8 @@ OpenCode ──(skill)──> severally server ──> codex exec | claude -p
43
43
  - A consultation stays readable after the server restarts, and from any other severally process on the machine.
44
44
  One still running elsewhere reads as running; one whose server stopped abruptly (a crash or a kill) before it
45
45
  finished comes back as `interrupted`; an ordinary shutdown records its running consultations as cancelled.
46
- - Only the process running a consultation can cancel it; `consult_cancel` from another one says that nothing
47
- was signalled.
46
+ - `consult_cancel` from another severally process leaves a request for the process running the consultation,
47
+ which checks once a second and stops it.
48
48
  - A check the lead cannot run itself, such as one that needs another person's answer, comes back to you with the
49
49
  reason.
50
50
  - **For decisions you will have to justify later** (interfaces, migrations, security, concurrency), the lead
@@ -55,7 +55,9 @@ OpenCode ──(skill)──> severally server ──> codex exec | claude -p
55
55
  other.
56
56
  - A request with no plan is `explore`, one with a plan is `review`, and one with a plan and the opposing claims
57
57
  is `debate`. The server refuses a first `explore` request that contains the plan. A follow-up keeps the mode of
58
- the consultation it continues. The follow-up limit is `server.max_rounds` in the config file.
58
+ the consultation it continues, and everything else it was given unless the lead passes it again: the
59
+ consultant, `network`, the objective, constraints, success criteria, facts, plan, opposing claims and supplied
60
+ material. The new brief restates them. The follow-up limit is `server.max_rounds` in the config file.
59
61
 
60
62
  ## Records
61
63
 
@@ -10,10 +10,12 @@ npx はパッケージを自分のキャッシュに取ってきて、そこか
10
10
 
11
11
  ## 必要なもの
12
12
 
13
- README に書いた Node.js 20.10 以降とログイン済みの CLI のほかに、次の条件があります。
13
+ README に書いた Node.js 22 以降とログイン済みの CLI のほかに、次の条件があります。
14
14
 
15
- - macOS / Linux では、npm のグローバルな実行ファイルのディレクトリが `PATH` に入っていること。既定のプラグイン方式
16
- (下記)は、Codex が起動する `severally-mcp` コマンドをそこに入れます。`--manual` を付ければ不要です。
15
+ - macOS / Linux では、npm のグローバルのフォルダについて必要なことはありません。既定のプラグイン方式(下記)は
16
+ `npm install -g` で、Codex のプラグインが起動する `severally-mcp` コマンドを `PATH` に置きます。npm がグローバルに
17
+ 入れられないとき(たとえば sudo が要る、npm のグローバルのフォルダが `PATH` に無い)は、インストーラが代わりに
18
+ Codex を直接登録します。ほかに必要なことはありません。`--manual` を付ければ、このコマンドは要りません。
17
19
  - Windows では、PowerShell かコマンドプロンプトからネイティブに動きます。WSL は要りません。CLI は `PATH` と
18
20
  `PATHEXT` から探します(`.exe`、`.cmd`、`.bat`、空白を含むパスにも対応します)。
19
21
 
@@ -42,7 +44,15 @@ node scripts/install.mjs
42
44
 
43
45
  ## 登録の確かめ方
44
46
 
45
- クライアントを再起動したあと、それぞれが severally を認識しているかを確かめます。持っていない CLI の行は飛ばしてください。
47
+ `npx -y severally-mcp@latest status` を実行すると、相談を始めずに、まとめて確かめられます。設定ファイルが正しいか、
48
+ この機械から使える相談相手(使えないものはその理由)、入っている写しの版がそろっているか、どのクライアントに
49
+ severally が登録されているか、各 CLI にログインしているかを表示します。ログインの確認は、各 CLI 自身の状態確認
50
+ コマンドを読むだけで、プロンプトは送りません。Claude Code は `claude auth status`、Codex は `codex login status` です。
51
+ OpenCode は `opencode auth list` で保存されている認証情報の数を見ます(環境変数のキーでも動くので、保存が無くても
52
+ 警告にとどめます)。Antigravity にはそうしたコマンドが無いので「not checked」と表示します。使用枠を使い切って
53
+ いないかは確かめません。それは最初の相談で分かります。
54
+
55
+ クライアントごとに自分で確かめるときは、再起動したあとに次を実行します。持っていない CLI の行は飛ばしてください。
46
56
 
47
57
  ```bash
48
58
  # macOS / Linux(プラグイン方式)
@@ -66,13 +76,14 @@ Claude Code だけで使うなら、クローンもインストーラも要り
66
76
  ```
67
77
 
68
78
  Claude Code を再起動し、`claude plugin details severally` で確かめます。プラグインはサーバを `node` で起動するので、
69
- Node.js 20.10 以降が `PATH` に入っている必要があります。ツールは `mcp__plugin_severally_severally__*` の名前で
79
+ Node.js 22 以降が `PATH` に入っている必要があります。ツールは `mcp__plugin_severally_severally__*` の名前で
70
80
  現れます。この方法を実機で確かめたのは Linux だけです。
71
81
 
72
82
  Codex、Antigravity、OpenCode からも使うなら、クローンしてインストーラも実行します([クローンから入れる](#クローンから入れる)を参照)。
73
83
  インストーラはマーケットプレイス版を見つけると、Claude Code はそちらに任せます。マーケットプレイス版より先に
74
84
  インストーラを実行していた場合は、もう一度実行してください。そのままだと Claude Code が severally を二重に読み込みます。
75
- インストーラは、自分が以前に入れた Claude Code 用の写しと登録を、バックアップしてから取り除きます。
85
+ インストーラは、自分が以前に入れた Claude Code 用の写しと登録を、バックアップしてから取り除きます。マーケットプレイス版が
86
+ 入ったあとは、同じインストーラの実行でそれも更新されます([更新](#更新)を参照)。
76
87
 
77
88
  ## 2 つのインストール方式
78
89
 
@@ -91,30 +102,45 @@ Codex、Antigravity、OpenCode からも使うなら、クローンしてイン
91
102
 
92
103
  - サーバを依存パッケージごと `~/.severally/runtime/severally-mcp.mjs` に写します。どの登録も、クローンした
93
104
  フォルダではなく、この写しを指します。
94
- - プラグイン方式では、npm のグローバルなインストールも行います。これで、Codex が起動する `severally-mcp` コマンドが
95
- 入ります。`--skip-global` を付けるとこの手順を飛ばしますが、`PATH` 上の `severally-mcp` がすでに写した runtime を
96
- 指している場合しか受け付けません。手動方式ではグローバルなインストールは要りません。
97
- - クライアントの設定は、各 CLI のコマンド(`plugin add` / `mcp add`)だけで変えます。何かをする前に、各クライアントの
98
- 設定ファイル(`~/.claude.json`、`~/.codex/config.toml`、`~/.gemini/config/mcp_config.json` と
105
+ - macOS / Linux のプラグイン方式では、runtime を `severally-runtime` というパッケージ名で npm のグローバルにも入れます。
106
+ これで、Codex のプラグインが起動する `severally-mcp` コマンドが入ります。以前のインストールが残した `severally-mcp`
107
+ という名前のグローバルなパッケージは、先に `npm uninstall -g severally-mcp` で取り除きます。npm がコマンドを
108
+ グローバルに入れられないとき、または `PATH` の先頭にないときも、インストーラは止まらず、代わりに Codex を直接
109
+ 登録して、そう表示します。登録は `--manual` と同じ `codex mcp add` で、長い `consult_get` の待ちも同じです。
110
+ `--skip-global` を付けるとグローバルなインストールを飛ばしますが、`PATH` 上の `severally-mcp` がすでに写した
111
+ runtime を指している場合しか受け付けません。手動方式ではグローバルなインストールは要りません。
112
+ - クライアントの設定は、各 CLI のコマンド(`plugin add` / `mcp add`)だけで変えます。例外は手動で登録する Codex で、
113
+ `config.toml` の `[mcp_servers.severally]` の表に `tool_timeout_sec = 660` の 1 行も書きます(Codex のプラグインと
114
+ 同じ長い待ちにするためで、`codex mcp add` では設定できません)。表にすでに `tool_timeout_sec` があれば、その値を
115
+ 残し、待ち時間もそれに合わせます。1 行を書けなければ、長い待ちなしで Codex を登録し、そう表示します。
116
+ - 何かをする前に、各クライアントの設定ファイル(`~/.claude.json`、`~/.codex/config.toml`、`~/.gemini/config/mcp_config.json` と
99
117
  `~/.gemini/antigravity-cli/settings.json`、`~/.config/opencode/opencode.json(c)`)と既存の Skill のディレクトリを、
100
118
  `~/.severally/backups/<timestamp>/` にバックアップします。バックアップの名前は元のパスから付けます。
101
119
  - 方式を切り替えると、もう一方の方式で残った重複の登録を、バックアップしてから取り除きます。
102
120
  - Claude Code にマーケットプレイス版の severally がすでに入っていれば、Claude Code には登録しません。以前に
103
121
  インストーラが入れた Claude Code 用の写し(`~/.claude/skills/severally`)とユーザスコープの登録も取り除きます。
122
+ マーケットプレイス版の更新も行います([更新](#更新)を参照)。
123
+ - 最後に、Claude Code があり、`~/.claude/settings.json` が severally の手元で完結する 5 つのツールをまだ許可して
124
+ いなければ、足すかどうかを訊きます(次の節を参照)。このファイルのほかの部分は変えません。
104
125
  - Codex のマーケットプレイスのファイル `.agents/plugins/marketplace.json` は、このリポジトリから写します。
105
126
  公開されているマーケットプレイスは使いません。
106
127
 
107
128
  ## 外に何も送らないツールの許可の確認を省く
108
129
 
109
130
  `consult_start` 以外の 5 つのツールは手元で完結します。`consult_get`(相談が動いている間、繰り返し呼ぶ)、`consult_list`、
110
- `consult_cancel`、`consult_record`、`consult_export` です。どのクライアントにも許可リストに
111
- ツールを足すコマンドが無いので、インストーラは触りません。手で足してください。`consult_start` は確認を残します。
112
- ほかのベンダーに材料を送るのはこの呼び出しだからです。
131
+ `consult_cancel`、`consult_record`、`consult_export` です。`consult_start` は確認を残します。ほかのベンダーに材料を
132
+ 送るのはこの呼び出しなので、インストーラも足しません。
113
133
 
114
134
  - **Claude Code**: Skill が、呼ばれたターンの間はこの 5 つを許可します(`allowed-tools`)。そのため相談のポーリングで
115
- 毎回は確認が出ません。代わりに Skill 自体の承認を 1 度求められます。後のターン(判定の記録や追加質問)でも省くには、
116
- `~/.claude/settings.json` に書きます(プラグイン方式の場合。`--manual` では
117
- `mcp__plugin_severally_severally__` を `mcp__severally__` に読み替えます)。
135
+ 毎回は確認が出ません。代わりに Skill 自体の承認を 1 度求められます。後のターン(判定の記録や追加質問)でも省くために、
136
+ インストーラが足すかどうかを訊きます。インストールの最後に、Claude Code があり、`~/.claude/settings.json` が
137
+ この 5 つをまだ許可していなければ、端末で「Let Claude Code run ... without asking each time? [Y/n]」と訊きます
138
+ (既定は Y)。`--allow-local-tools` を付けると、訊かずに足します(スクリプトからのインストール向け)。端末が無く、
139
+ フラグも無いときは何も変えず、フラグを付けてやり直す方法を表示します。先に `settings.json` をバックアップし、
140
+ ほかの設定は残し、同じ規則を二重には足しません。規則の接頭辞は、プラグイン方式とマーケットプレイス版では
141
+ `mcp__plugin_severally_severally__`、手動方式では `mcp__severally__` です。手で足すときは、
142
+ `~/.claude/settings.json` に次を書きます(`--manual` では `mcp__plugin_severally_severally__` を
143
+ `mcp__severally__` に読み替えます)。
118
144
  ```json
119
145
  { "permissions": { "allow": [
120
146
  "mcp__plugin_severally_severally__consult_get", "mcp__plugin_severally_severally__consult_list",
@@ -132,6 +158,8 @@ Codex、Antigravity、OpenCode からも使うなら、クローンしてイン
132
158
  - **OpenCode** は、自分の `permission` の設定で変えていなければ、MCP ツールを確認なしで使います。
133
159
  - **Antigravity**: MCP ツールを 1 つずつ許可する規則の書き方を確かめていないので、ここでは扱いません。
134
160
 
161
+ インストーラは、Codex・Antigravity・OpenCode の許可には触りません。
162
+
135
163
  ### 相談の開始の確認も省く
136
164
 
137
165
  エージェントは自分から相談します(相談するかどうかを訊かないよう Skill が指示しています)。そのため `consult_start` の
@@ -154,11 +182,15 @@ Claude Code なら許可リストに `mcp__plugin_severally_severally__consult_s
154
182
  クローンしたフォルダそのものを登録していた古いバージョンで入れた場合は、一度だけ `--force` を付けてください。既存の登録が、
155
183
  写した runtime を指すように切り替わります。付けなければ、既存の登録はそのまま残ります。
156
184
 
157
- マーケットプレイスから入れた場合は、Claude Code で `/plugin marketplace update severally` を実行してから再起動します。
185
+ マーケットプレイスから入れた場合は、Claude Code にマーケットプレイス版の severally がすでに入っていれば、インストーラが
186
+ `claude plugin marketplace update severally` と `claude plugin update severally@<マーケットプレイス名>` も実行します。
187
+ そのため `npx -y severally-mcp@latest install` を 1 回実行すれば、すべての写しが同じバージョンになります。失敗したときは、
188
+ Claude Code の中で実行するコマンド `/plugin marketplace update severally` を表示します。そのあと Claude Code を
189
+ 再起動してください。Claude Code だけなら、インストーラの代わりにこのコマンドを自分で実行しても構いません。
158
190
  自動の更新は既定では無効です。有効にするには、`/plugin` の Marketplaces で severally を選び、Enable auto-update を
159
- 選びます。Codex、Antigravity、OpenCode からも使っている場合は、インストーラも実行し直してください。この 3 つは
160
- `~/.severally/runtime` にある別の写しを使い、どちらの写しも同じ `~/.severally/config.json` を読みます。設定の書き方が
161
- 変わるリリースでは、両方を同じバージョンにそろえてください。`~/.severally/runtime` か `~/.claude/skills/severally` の
191
+ 選びます。Codex、Antigravity、OpenCode は `~/.severally/runtime` にある別の写しを使い、どちらの写しも同じ
192
+ `~/.severally/config.json` を読みます。インストーラが両方を同じバージョンにそろえます。設定の書き方が変わる
193
+ リリースでは、これが大事になります。`~/.severally/runtime` か `~/.claude/skills/severally` の
162
194
  写しが、答えているサーバと違うバージョンなら、`consult_start` の応答の `stale_install` がそれを知らせます。中身は、
163
195
  それぞれの写しのバージョンと、そろえるためのコマンドです。
164
196
 
@@ -183,7 +215,8 @@ Remove-Item -LiteralPath "$HOME/.codex/skills/severally" -Recurse -Force
183
215
  Remove-Item -LiteralPath "$HOME/.gemini/config/skills/severally" -Recurse -Force
184
216
  Remove-Item -LiteralPath "$HOME/.config/opencode/skills/severally" -Recurse -Force
185
217
  Remove-Item -LiteralPath "$HOME/.severally/runtime" -Recurse -Force
186
- # 以前にグローバルなコマンドを入れていた場合だけ:
218
+ # 以前にグローバルなコマンドを入れていた場合だけ(古い名前は以前のインストール用):
219
+ npm.cmd uninstall -g severally-runtime
187
220
  npm.cmd uninstall -g severally-mcp
188
221
  ```
189
222
 
@@ -201,7 +234,8 @@ rm -rf ~/.gemini/config/skills/severally
201
234
  # "mcp" オブジェクトから "severally" の項目を手で消す):
202
235
  # ~/.config/opencode/opencode.json(c) を編集する
203
236
  rm -rf ~/.config/opencode/skills/severally
204
- npm uninstall -g severally-mcp
237
+ npm uninstall -g severally-runtime
238
+ npm uninstall -g severally-mcp # 以前のインストールが残していた場合だけ
205
239
  rm -rf ~/.severally/runtime ~/.severally/marketplace
206
240
  ```
207
241
 
@@ -215,7 +249,8 @@ agy mcp remove severally
215
249
  # "severally" の項目を手で消す
216
250
  rm -rf ~/.claude/skills/severally ~/.codex/skills/severally ~/.gemini/config/skills/severally \
217
251
  ~/.config/opencode/skills/severally
218
- # 以前にグローバルなコマンドを入れていた場合だけ:
252
+ # 以前にグローバルなコマンドを入れていた場合だけ(古い名前は以前のインストール用):
253
+ npm uninstall -g severally-runtime
219
254
  npm uninstall -g severally-mcp
220
255
  rm -rf ~/.severally/runtime ~/.severally/marketplace
221
256
  ```