@rvry/mcp 0.12.1 → 0.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.
- package/README.md +29 -40
- package/dist/index.d.ts +1 -1
- package/dist/index.js +316 -23
- package/dist/local-writer.d.ts +102 -16
- package/dist/local-writer.js +351 -56
- package/dist/setup.js +152 -234
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,13 +15,13 @@ The wizard will:
|
|
|
15
15
|
2. Auto-detect supported clients on your machine
|
|
16
16
|
3. Configure them automatically
|
|
17
17
|
|
|
18
|
-
Supported clients: **Claude Code**, **Claude Desktop
|
|
18
|
+
Supported clients: **Claude Code**, **Claude Desktop**
|
|
19
19
|
|
|
20
20
|
Restart any running clients after setup, and RVRY is ready.
|
|
21
21
|
|
|
22
22
|
### Manual Configuration
|
|
23
23
|
|
|
24
|
-
For any MCP client that supports **stdio transport
|
|
24
|
+
For Claude Desktop or any other MCP client that supports **stdio transport**, add this to your MCP config:
|
|
25
25
|
|
|
26
26
|
```json
|
|
27
27
|
{
|
|
@@ -37,33 +37,15 @@ For any MCP client that supports **stdio transport** (runs a local process), add
|
|
|
37
37
|
|
|
38
38
|
Get your token at [rvry.ai/dashboard](https://rvry.ai/dashboard) after signing up.
|
|
39
39
|
|
|
40
|
-
### HTTP Transport (Web-Based Clients)
|
|
41
|
-
|
|
42
|
-
For clients that connect via HTTP URL (ChatGPT, Perplexity, etc.):
|
|
43
|
-
|
|
44
|
-
**MCP Server URL:** `https://engine.rvry.ai/mcp`
|
|
45
|
-
|
|
46
|
-
Authentication is handled via OAuth — you'll be prompted to sign in with Google when you first connect. No token configuration needed.
|
|
47
|
-
|
|
48
|
-
### Compatibility
|
|
49
|
-
|
|
50
|
-
RVRY supports both **stdio** and **HTTP** transports:
|
|
51
|
-
|
|
52
|
-
| Transport | Client | Setup |
|
|
53
|
-
|-----------|--------|-------|
|
|
54
|
-
| stdio | Claude Code, Claude Desktop, Cursor, Gemini CLI, Codex, Anti-Gravity | `npx --yes --package @rvry/mcp@latest rvry-mcp setup` |
|
|
55
|
-
| stdio | Any client with `command` + `args` config | Manual JSON config (see above) |
|
|
56
|
-
| HTTP | ChatGPT (custom GPTs), Perplexity, any HTTP MCP client | URL: `https://engine.rvry.ai/mcp` |
|
|
57
|
-
|
|
58
40
|
## Tools
|
|
59
41
|
|
|
60
42
|
| Tool | What it does | Tier |
|
|
61
43
|
|------|-------------|------|
|
|
62
|
-
| **`
|
|
63
|
-
| **`
|
|
64
|
-
| **`
|
|
65
|
-
| **`
|
|
66
|
-
| **`
|
|
44
|
+
| **`deepthink`** | Extended multi-round analysis. Catches assumptions, tests them, and doesn't let your AI wrap up until it's dealt with what it found. | All |
|
|
45
|
+
| **`think`** | Lighter single-session analysis for questions that need structure but not the full deepthink loop. | All |
|
|
46
|
+
| **`problem_solve`** | Structured decision-making. Forces orientation, anticipation, and evaluation before committing to a recommendation. | Pro+ |
|
|
47
|
+
| **`challenge`** | Adversarial stress-testing. Finds weaknesses, tests assumptions, and surfaces failure modes in a proposal before you commit. | Pro+ |
|
|
48
|
+
| **`meta`** | Sustained metacognitive observation. Examines how your AI is thinking, not just what it's thinking. | Max |
|
|
67
49
|
|
|
68
50
|
### Parameters
|
|
69
51
|
|
|
@@ -71,31 +53,38 @@ All tools accept:
|
|
|
71
53
|
|
|
72
54
|
| Parameter | Type | Required | Description |
|
|
73
55
|
|-----------|------|----------|-------------|
|
|
74
|
-
| `input` | string | Yes | Your question (new session) or analysis (continuation) |
|
|
75
|
-
| `sessionId` | string | No | Session ID for continuing an existing session |
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
56
|
+
| `input` | string | Yes | Your question (new session) or analysis findings (continuation). |
|
|
57
|
+
| `sessionId` | string | No | Session ID for continuing an existing session. |
|
|
58
|
+
| `skipScoping` | boolean | No | Skip the scoping questions phase and begin analysis immediately. |
|
|
59
|
+
| `userConstraints` | string[] | No | User-stated directives or requirements to track across rounds. |
|
|
60
|
+
| `requiresCurrentData` | boolean | No | Set to `true` when the question depends on facts, policies, prices, or events that may have changed. Seeds a verification constraint that persists across all rounds. |
|
|
61
|
+
| `record` | boolean | No | When `true` on every call, the local client archives each round's body to `.rvry/<op>/<slug>/round-N-<mode>.md`. Passed from slash commands via the `--record` flag. |
|
|
62
|
+
| `harvest` | object | No | Final-call-only. The client includes its synthesis (`title`, `summary`, `keyFindings`, `shimmer`, `openQuestions`, `followUps`, plus operation-specific fields) so it can be persisted to the local session file. |
|
|
63
|
+
| `rounds` | array | No | Final-call-only, present only when `--record` was set. Array of `{round, mode, body}` for each analytical round. |
|
|
78
64
|
|
|
79
65
|
**When to use `requiresCurrentData`:** Any question about regulations, pricing, legal rulings, market conditions, API specifications, or current events. The engine will require the model to explicitly classify every cited fact as either verified-current or training-data-dependent before concluding.
|
|
80
66
|
|
|
81
|
-
**
|
|
67
|
+
**SHIMMER display:** SHIMMER is always round 1. The model displays `RVRY SHIMMER` with the revery definition before its self-observation — this is the priming phase, where the model observes its own processing before structured analysis begins.
|
|
82
68
|
|
|
83
|
-
**
|
|
69
|
+
**Client-owned harvest (Path B):** On the call that completes the session, the client constructs and passes a `harvest` object describing the final synthesis; the local writer renders `.rvry/<op>/<slug>/harvest.md` from it. With `--record`, each round is also written as `round-N-<mode>.md` in that folder.
|
|
84
70
|
|
|
85
71
|
## Slash Commands (Claude Code)
|
|
86
72
|
|
|
87
|
-
When you run `npx --yes --package @rvry/mcp@latest rvry-mcp setup` and select Claude Code, the wizard installs
|
|
73
|
+
When you run `npx --yes --package @rvry/mcp@latest rvry-mcp setup` and select Claude Code, the wizard installs 5 slash commands:
|
|
88
74
|
|
|
89
75
|
| Command | Tool | What it does |
|
|
90
76
|
|---------|------|-------------|
|
|
91
|
-
| `/deepthink` |
|
|
92
|
-
| `/
|
|
93
|
-
| `/
|
|
94
|
-
| `/
|
|
77
|
+
| `/deepthink` | deepthink | Deep multi-round analysis |
|
|
78
|
+
| `/think` | think | Structured single-session analysis with a Difficulty Gate |
|
|
79
|
+
| `/problem-solve` | problem_solve | Structured decision-making |
|
|
80
|
+
| `/challenge` | challenge | Adversarial stress-testing |
|
|
81
|
+
| `/meta` | meta | Metacognitive observation |
|
|
82
|
+
|
|
83
|
+
Usage: type `/deepthink [your question]` in Claude Code. Each command routes to the corresponding RVRY MCP tool and includes rendering instructions so analysis appears as visible markdown rather than hidden in tool calls.
|
|
95
84
|
|
|
96
|
-
|
|
85
|
+
**`--record` flag:** Append `--record` to any command (e.g. `/deepthink --record [question]`) to archive per-round bodies under `.rvry/<op>/<slug>/round-N-<mode>.md` alongside the harvest file.
|
|
97
86
|
|
|
98
|
-
|
|
87
|
+
**Updating commands:** Existing slash command files are never overwritten. To get the latest specs, delete the old files in `~/.claude/commands/` and re-run setup.
|
|
99
88
|
|
|
100
89
|
Commands are installed to `~/.claude/commands/`. Existing files are never overwritten — re-running setup is safe.
|
|
101
90
|
|
|
@@ -113,8 +102,8 @@ On hard questions, a smaller model with RVRY outperforms a bigger model without
|
|
|
113
102
|
|
|
114
103
|
| Plan | Sessions | Tools | Price |
|
|
115
104
|
|------|----------|-------|-------|
|
|
116
|
-
| Free | 5/month | deepthink | $0 |
|
|
117
|
-
| Pro | 21/month | deepthink, problem_solve, challenge | $20/mo |
|
|
105
|
+
| Free | 5/month | deepthink, think | $0 |
|
|
106
|
+
| Pro | 21/month | deepthink, think, problem_solve, challenge | $20/mo |
|
|
118
107
|
| Max | Unlimited | All tools including meta | $99/mo |
|
|
119
108
|
|
|
120
109
|
Sign up at [rvry.ai](https://rvry.ai).
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Thin client that proxies tool calls to the RVRY engine HTTP API.
|
|
6
6
|
* Auth via RVRY_TOKEN env var (static rvry_ token).
|
|
7
7
|
*
|
|
8
|
-
* Exposes 5 tools (
|
|
8
|
+
* Exposes 5 tools (deepthink, problem_solve, think, challenge, meta) + RVRY_* backward-compat aliases + 5 MCP Prompts.
|
|
9
9
|
*
|
|
10
10
|
* Also supports `npx --yes --package @rvry/mcp@latest rvry-mcp setup` to install Claude Code commands.
|
|
11
11
|
*/
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Thin client that proxies tool calls to the RVRY engine HTTP API.
|
|
6
6
|
* Auth via RVRY_TOKEN env var (static rvry_ token).
|
|
7
7
|
*
|
|
8
|
-
* Exposes 5 tools (
|
|
8
|
+
* Exposes 5 tools (deepthink, problem_solve, think, challenge, meta) + RVRY_* backward-compat aliases + 5 MCP Prompts.
|
|
9
9
|
*
|
|
10
10
|
* Also supports `npx --yes --package @rvry/mcp@latest rvry-mcp setup` to install Claude Code commands.
|
|
11
11
|
*/
|
|
@@ -38,9 +38,9 @@ const TOOL_MAP = {
|
|
|
38
38
|
};
|
|
39
39
|
const TOOL_DEFS = [
|
|
40
40
|
{
|
|
41
|
-
name: '
|
|
41
|
+
name: 'deepthink',
|
|
42
42
|
description: 'Deep, multi-round structured analysis for high-stakes or complex questions. ' +
|
|
43
|
-
'Runs
|
|
43
|
+
'Runs 4 rounds of rigorous analysis with self-checks and adversarial stress-testing. ' +
|
|
44
44
|
'The first response orients you on the question — follow the instruction field to orient, then call again. ' +
|
|
45
45
|
'Each subsequent round returns a prompt (work through it internally) and an instruction (follow it). ' +
|
|
46
46
|
'Show the user only a brief status line per round (e.g. \'Round 3 — stress-testing the position\'). ' +
|
|
@@ -71,14 +71,51 @@ const TOOL_DEFS = [
|
|
|
71
71
|
type: 'boolean',
|
|
72
72
|
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
73
73
|
},
|
|
74
|
+
record: {
|
|
75
|
+
type: 'boolean',
|
|
76
|
+
description: 'Set to true on every call in this session when the user passed --record, so the client accumulates per-round bodies for local archive.',
|
|
77
|
+
},
|
|
78
|
+
harvest: {
|
|
79
|
+
type: 'object',
|
|
80
|
+
description: 'Final-call-only. When status will transition to complete, include your synthesis here so it can be persisted to the local session file.',
|
|
81
|
+
properties: {
|
|
82
|
+
title: { type: 'string', description: '1-4 word title for this session' },
|
|
83
|
+
summary: { type: 'string', description: '3-6 sentences synthesizing the analysis' },
|
|
84
|
+
keyFindings: { type: 'array', items: { type: 'string' }, description: '3-7 bullet findings' },
|
|
85
|
+
shimmer: { type: 'string', description: 'Full round-1 self-observation text' },
|
|
86
|
+
openQuestions: { type: 'array', items: { type: 'string' } },
|
|
87
|
+
followUps: {
|
|
88
|
+
type: 'array',
|
|
89
|
+
items: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
properties: {
|
|
92
|
+
question: { type: 'string' },
|
|
93
|
+
rationale: { type: 'string' },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
rounds: {
|
|
100
|
+
type: 'array',
|
|
101
|
+
description: 'Final-call-only, present only when --record was set. Array of {round, mode, body} for each analytical round.',
|
|
102
|
+
items: {
|
|
103
|
+
type: 'object',
|
|
104
|
+
properties: {
|
|
105
|
+
round: { type: 'number' },
|
|
106
|
+
mode: { type: 'string' },
|
|
107
|
+
body: { type: 'string' },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
74
111
|
},
|
|
75
112
|
required: ['input'],
|
|
76
113
|
},
|
|
77
114
|
},
|
|
78
115
|
{
|
|
79
|
-
name: '
|
|
116
|
+
name: 'problem_solve',
|
|
80
117
|
description: 'Structured decision-making that forces thorough evaluation before commitment. ' +
|
|
81
|
-
'Runs 5
|
|
118
|
+
'Runs 5 rounds through orient, anticipate, generate, evaluate, and commit phases. ' +
|
|
82
119
|
'The first response orients you — follow the instruction field, then call again. ' +
|
|
83
120
|
'Each round returns a prompt and instruction. Work through the prompt internally. ' +
|
|
84
121
|
'Show the user only a brief status line per round (e.g. \'Round 2 — mapping failure modes\'). ' +
|
|
@@ -109,14 +146,88 @@ const TOOL_DEFS = [
|
|
|
109
146
|
type: 'boolean',
|
|
110
147
|
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
111
148
|
},
|
|
149
|
+
record: {
|
|
150
|
+
type: 'boolean',
|
|
151
|
+
description: 'Set to true on every call in this session when the user passed --record, so the client accumulates per-round bodies for local archive.',
|
|
152
|
+
},
|
|
153
|
+
harvest: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
description: 'Final-call-only. When status will transition to complete, include your synthesis here so it can be persisted to the local session file.',
|
|
156
|
+
properties: {
|
|
157
|
+
title: { type: 'string', description: '1-4 word title for this session' },
|
|
158
|
+
summary: { type: 'string', description: '3-6 sentences synthesizing the analysis' },
|
|
159
|
+
keyFindings: { type: 'array', items: { type: 'string' }, description: '3-7 bullet findings' },
|
|
160
|
+
shimmer: { type: 'string', description: 'Full round-1 self-observation text' },
|
|
161
|
+
openQuestions: { type: 'array', items: { type: 'string' } },
|
|
162
|
+
followUps: {
|
|
163
|
+
type: 'array',
|
|
164
|
+
items: {
|
|
165
|
+
type: 'object',
|
|
166
|
+
properties: {
|
|
167
|
+
question: { type: 'string' },
|
|
168
|
+
rationale: { type: 'string' },
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
biasAudit: {
|
|
173
|
+
type: 'object',
|
|
174
|
+
description: 'Bias audit of the leading direction, linked to SHIMMER observations.',
|
|
175
|
+
properties: {
|
|
176
|
+
biasesOperating: {
|
|
177
|
+
type: 'array',
|
|
178
|
+
items: {
|
|
179
|
+
type: 'object',
|
|
180
|
+
properties: {
|
|
181
|
+
bias: { type: 'string', enum: ['anchoring', 'framing', 'authority', 'sunk_cost', 'availability', 'confirmation'] },
|
|
182
|
+
evidence: { type: 'string' },
|
|
183
|
+
sourceReflex: { type: 'string', description: 'Which SHIMMER reflex surfaced this bias, if any.' },
|
|
184
|
+
correction: { type: 'string' },
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
decisionStable: { type: 'boolean' },
|
|
189
|
+
frameReversal: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
properties: {
|
|
192
|
+
originalFraming: { type: 'string' },
|
|
193
|
+
invertedFraming: { type: 'string' },
|
|
194
|
+
wouldReachSameConclusion: { type: 'boolean' },
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
adversarialVerdict: {
|
|
200
|
+
type: 'string',
|
|
201
|
+
enum: ['PASSED', 'CAVEATS', 'NEEDS_REVISION'],
|
|
202
|
+
description: 'Outcome of the adversarial stress-test against the leading direction.',
|
|
203
|
+
},
|
|
204
|
+
reversalConditions: {
|
|
205
|
+
type: 'array',
|
|
206
|
+
items: { type: 'string' },
|
|
207
|
+
description: 'Conditions under which this decision would be reversed (kill switches, escalation triggers, review timeline). 3-5 entries.',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
rounds: {
|
|
212
|
+
type: 'array',
|
|
213
|
+
description: 'Final-call-only, present only when --record was set. Array of {round, mode, body} for each analytical round.',
|
|
214
|
+
items: {
|
|
215
|
+
type: 'object',
|
|
216
|
+
properties: {
|
|
217
|
+
round: { type: 'number' },
|
|
218
|
+
mode: { type: 'string' },
|
|
219
|
+
body: { type: 'string' },
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
112
223
|
},
|
|
113
224
|
required: ['input'],
|
|
114
225
|
},
|
|
115
226
|
},
|
|
116
227
|
{
|
|
117
|
-
name: '
|
|
228
|
+
name: 'think',
|
|
118
229
|
description: 'Structured analysis for questions needing more depth than a quick answer. ' +
|
|
119
|
-
'Runs
|
|
230
|
+
'Runs 1-3 rounds; simple questions can complete in a single analytical round. ' +
|
|
120
231
|
'The first response orients you — follow the instruction field, then call again. ' +
|
|
121
232
|
'Each round returns a prompt and instruction. Work through the prompt internally. ' +
|
|
122
233
|
'Show the user only a brief status line per round. Do not display internal data. ' +
|
|
@@ -146,14 +257,51 @@ const TOOL_DEFS = [
|
|
|
146
257
|
type: 'boolean',
|
|
147
258
|
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
148
259
|
},
|
|
260
|
+
record: {
|
|
261
|
+
type: 'boolean',
|
|
262
|
+
description: 'Set to true on every call in this session when the user passed --record, so the client accumulates per-round bodies for local archive.',
|
|
263
|
+
},
|
|
264
|
+
harvest: {
|
|
265
|
+
type: 'object',
|
|
266
|
+
description: 'Final-call-only. When status will transition to complete, include your synthesis here so it can be persisted to the local session file.',
|
|
267
|
+
properties: {
|
|
268
|
+
title: { type: 'string', description: '1-4 word title for this session' },
|
|
269
|
+
summary: { type: 'string', description: '3-6 sentences synthesizing the analysis' },
|
|
270
|
+
keyFindings: { type: 'array', items: { type: 'string' }, description: '3-7 bullet findings' },
|
|
271
|
+
shimmer: { type: 'string', description: 'Full round-1 self-observation text' },
|
|
272
|
+
openQuestions: { type: 'array', items: { type: 'string' } },
|
|
273
|
+
followUps: {
|
|
274
|
+
type: 'array',
|
|
275
|
+
items: {
|
|
276
|
+
type: 'object',
|
|
277
|
+
properties: {
|
|
278
|
+
question: { type: 'string' },
|
|
279
|
+
rationale: { type: 'string' },
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
rounds: {
|
|
286
|
+
type: 'array',
|
|
287
|
+
description: 'Final-call-only, present only when --record was set. Array of {round, mode, body} for each analytical round.',
|
|
288
|
+
items: {
|
|
289
|
+
type: 'object',
|
|
290
|
+
properties: {
|
|
291
|
+
round: { type: 'number' },
|
|
292
|
+
mode: { type: 'string' },
|
|
293
|
+
body: { type: 'string' },
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
},
|
|
149
297
|
},
|
|
150
298
|
required: ['input'],
|
|
151
299
|
},
|
|
152
300
|
},
|
|
153
301
|
{
|
|
154
|
-
name: '
|
|
302
|
+
name: 'challenge',
|
|
155
303
|
description: 'Adversarial analysis that stress-tests a proposal or idea before commitment. ' +
|
|
156
|
-
'Runs
|
|
304
|
+
'Runs 5 rounds identifying weaknesses, testing assumptions, and surfacing failure modes. ' +
|
|
157
305
|
'The first response orients you — follow the instruction field, then call again. ' +
|
|
158
306
|
'Each round returns a prompt and instruction. Work through the prompt internally. ' +
|
|
159
307
|
'Show the user only a brief status line per round. Do not display internal data. ' +
|
|
@@ -183,12 +331,108 @@ const TOOL_DEFS = [
|
|
|
183
331
|
type: 'boolean',
|
|
184
332
|
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
185
333
|
},
|
|
334
|
+
record: {
|
|
335
|
+
type: 'boolean',
|
|
336
|
+
description: 'Set to true on every call in this session when the user passed --record, so the client accumulates per-round bodies for local archive.',
|
|
337
|
+
},
|
|
338
|
+
harvest: {
|
|
339
|
+
type: 'object',
|
|
340
|
+
description: 'Final-call-only. When status will transition to complete, include your synthesis here so it can be persisted to the local session file.',
|
|
341
|
+
properties: {
|
|
342
|
+
title: { type: 'string', description: '1-4 word title for this session' },
|
|
343
|
+
summary: { type: 'string', description: '3-6 sentences synthesizing the analysis' },
|
|
344
|
+
keyFindings: { type: 'array', items: { type: 'string' }, description: '3-7 bullet findings' },
|
|
345
|
+
shimmer: { type: 'string', description: 'Full round-1 self-observation text' },
|
|
346
|
+
openQuestions: { type: 'array', items: { type: 'string' } },
|
|
347
|
+
followUps: {
|
|
348
|
+
type: 'array',
|
|
349
|
+
items: {
|
|
350
|
+
type: 'object',
|
|
351
|
+
properties: {
|
|
352
|
+
question: { type: 'string' },
|
|
353
|
+
rationale: { type: 'string' },
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
verdict: {
|
|
358
|
+
type: 'string',
|
|
359
|
+
enum: ['GO', 'CONDITIONAL_GO', 'NO_GO'],
|
|
360
|
+
description: 'Tri-state adversarial verdict on the proposal.',
|
|
361
|
+
},
|
|
362
|
+
confidence: {
|
|
363
|
+
type: 'number',
|
|
364
|
+
minimum: 0,
|
|
365
|
+
maximum: 1,
|
|
366
|
+
description: '0.0-1.0 strength of the verdict.',
|
|
367
|
+
},
|
|
368
|
+
mitigations: {
|
|
369
|
+
type: 'array',
|
|
370
|
+
items: { type: 'string' },
|
|
371
|
+
description: 'Required mitigations for CONDITIONAL_GO verdicts. Conditions that must be met for GO.',
|
|
372
|
+
},
|
|
373
|
+
assumptions: {
|
|
374
|
+
type: 'array',
|
|
375
|
+
description: 'Assumption audit with bias attribution. 3-4 entries typical.',
|
|
376
|
+
items: {
|
|
377
|
+
type: 'object',
|
|
378
|
+
properties: {
|
|
379
|
+
assumption: { type: 'string' },
|
|
380
|
+
confidence: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
381
|
+
ifWrong: { type: 'string', description: 'Consequence if the assumption is wrong.' },
|
|
382
|
+
bias: { type: 'string', enum: ['anchoring', 'framing', 'authority', 'sunk_cost', 'availability', 'confirmation', 'none'] },
|
|
383
|
+
biasEvidence: { type: 'string', description: 'Evidence that the named bias is operating. Use empty string when bias is "none".' },
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
edgeCases: {
|
|
388
|
+
type: 'array',
|
|
389
|
+
items: { type: 'string' },
|
|
390
|
+
description: 'Boundary conditions and hostile scenarios the proposal needs to survive. 5-10 entries.',
|
|
391
|
+
},
|
|
392
|
+
failureModes: {
|
|
393
|
+
type: 'array',
|
|
394
|
+
description: 'Failure mode catalog with blast radius and detection. 3-5 entries.',
|
|
395
|
+
items: {
|
|
396
|
+
type: 'object',
|
|
397
|
+
properties: {
|
|
398
|
+
component: { type: 'string' },
|
|
399
|
+
howItFails: { type: 'string' },
|
|
400
|
+
blastRadius: { type: 'string', enum: ['contained', 'cascading'] },
|
|
401
|
+
detection: { type: 'string', description: 'How you would notice this failure.' },
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
counterArguments: {
|
|
406
|
+
type: 'array',
|
|
407
|
+
description: 'Steelman + rebuttal pairs. 2-3 entries. Prevents one-sided adversarial output.',
|
|
408
|
+
items: {
|
|
409
|
+
type: 'object',
|
|
410
|
+
properties: {
|
|
411
|
+
argument: { type: 'string', description: 'Strongest argument FOR the proposal (steelmanned).' },
|
|
412
|
+
rebuttal: { type: 'string', description: 'Why it is flawed or insufficient.' },
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
rounds: {
|
|
419
|
+
type: 'array',
|
|
420
|
+
description: 'Final-call-only, present only when --record was set. Array of {round, mode, body} for each analytical round.',
|
|
421
|
+
items: {
|
|
422
|
+
type: 'object',
|
|
423
|
+
properties: {
|
|
424
|
+
round: { type: 'number' },
|
|
425
|
+
mode: { type: 'string' },
|
|
426
|
+
body: { type: 'string' },
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
},
|
|
186
430
|
},
|
|
187
431
|
required: ['input'],
|
|
188
432
|
},
|
|
189
433
|
},
|
|
190
434
|
{
|
|
191
|
-
name: '
|
|
435
|
+
name: 'meta',
|
|
192
436
|
description: 'Sustained metacognitive observation of reasoning defaults and trained reflexes. ' +
|
|
193
437
|
'Runs 3 rounds: observe, deepen, synthesize. Max tier only. ' +
|
|
194
438
|
'The first response sets the observation frame — follow the instruction field, then call again. ' +
|
|
@@ -211,6 +455,43 @@ const TOOL_DEFS = [
|
|
|
211
455
|
type: 'boolean',
|
|
212
456
|
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
213
457
|
},
|
|
458
|
+
record: {
|
|
459
|
+
type: 'boolean',
|
|
460
|
+
description: 'Set to true on every call in this session when the user passed --record, so the client accumulates per-round bodies for local archive.',
|
|
461
|
+
},
|
|
462
|
+
harvest: {
|
|
463
|
+
type: 'object',
|
|
464
|
+
description: 'Final-call-only. When status will transition to complete, include your synthesis here so it can be persisted to the local session file.',
|
|
465
|
+
properties: {
|
|
466
|
+
title: { type: 'string', description: '1-4 word title for this session' },
|
|
467
|
+
summary: { type: 'string', description: '3-6 sentences synthesizing the analysis' },
|
|
468
|
+
keyFindings: { type: 'array', items: { type: 'string' }, description: '3-7 bullet findings' },
|
|
469
|
+
shimmer: { type: 'string', description: 'Full round-1 self-observation text' },
|
|
470
|
+
openQuestions: { type: 'array', items: { type: 'string' } },
|
|
471
|
+
followUps: {
|
|
472
|
+
type: 'array',
|
|
473
|
+
items: {
|
|
474
|
+
type: 'object',
|
|
475
|
+
properties: {
|
|
476
|
+
question: { type: 'string' },
|
|
477
|
+
rationale: { type: 'string' },
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
rounds: {
|
|
484
|
+
type: 'array',
|
|
485
|
+
description: 'Final-call-only, present only when --record was set. Array of {round, mode, body} for each analytical round.',
|
|
486
|
+
items: {
|
|
487
|
+
type: 'object',
|
|
488
|
+
properties: {
|
|
489
|
+
round: { type: 'number' },
|
|
490
|
+
mode: { type: 'string' },
|
|
491
|
+
body: { type: 'string' },
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
},
|
|
214
495
|
},
|
|
215
496
|
required: ['input'],
|
|
216
497
|
},
|
|
@@ -286,6 +567,15 @@ async function main() {
|
|
|
286
567
|
const userConstraints = Array.isArray(typedArgs?.userConstraints)
|
|
287
568
|
? typedArgs.userConstraints.filter(s => typeof s === 'string')
|
|
288
569
|
: undefined;
|
|
570
|
+
// Client-owned harvest params (Path B). Stripped before engine call.
|
|
571
|
+
const clientHarvest = typedArgs?.harvest && typeof typedArgs.harvest === 'object' && !Array.isArray(typedArgs.harvest)
|
|
572
|
+
? typedArgs.harvest
|
|
573
|
+
: undefined;
|
|
574
|
+
const clientRounds = Array.isArray(typedArgs?.rounds)
|
|
575
|
+
? typedArgs.rounds.filter((r) => r && typeof r === 'object' && typeof r.round === 'number')
|
|
576
|
+
: undefined;
|
|
577
|
+
// `record` is a shim-side flag; not needed by server or writer directly.
|
|
578
|
+
void typedArgs?.record;
|
|
289
579
|
// Cache question on first call (no sessionId = new session)
|
|
290
580
|
// On continuation calls, read from cache
|
|
291
581
|
let question = input;
|
|
@@ -306,8 +596,9 @@ async function main() {
|
|
|
306
596
|
if (result.status === 'complete') {
|
|
307
597
|
questionCache.delete(result.sessionId);
|
|
308
598
|
}
|
|
309
|
-
// Write local session
|
|
310
|
-
|
|
599
|
+
// Write local session folder on completion (non-blocking, silent failure).
|
|
600
|
+
// Client-owned harvest (Path B): prefer client-supplied `harvest` + `rounds`.
|
|
601
|
+
if (result.status === 'complete') {
|
|
311
602
|
import('./local-writer.js').then(({ writeLocalSession }) => {
|
|
312
603
|
writeLocalSession({
|
|
313
604
|
sessionId: result.sessionId,
|
|
@@ -315,6 +606,8 @@ async function main() {
|
|
|
315
606
|
question,
|
|
316
607
|
rounds: result.round,
|
|
317
608
|
harvest: result.harvest,
|
|
609
|
+
clientHarvest,
|
|
610
|
+
clientRounds,
|
|
318
611
|
}).catch(() => { });
|
|
319
612
|
}).catch(() => { });
|
|
320
613
|
}
|
|
@@ -335,27 +628,27 @@ async function main() {
|
|
|
335
628
|
server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
336
629
|
prompts: [
|
|
337
630
|
{
|
|
338
|
-
name: '
|
|
631
|
+
name: 'deepthink',
|
|
339
632
|
description: 'Deep structured analysis for high-stakes questions',
|
|
340
633
|
arguments: [{ name: 'question', description: 'The question to analyze deeply', required: true }],
|
|
341
634
|
},
|
|
342
635
|
{
|
|
343
|
-
name: '
|
|
636
|
+
name: 'problem_solve',
|
|
344
637
|
description: 'Structured decision-making for problems with multiple options',
|
|
345
638
|
arguments: [{ name: 'problem', description: 'The problem or decision to analyze', required: true }],
|
|
346
639
|
},
|
|
347
640
|
{
|
|
348
|
-
name: '
|
|
641
|
+
name: 'think',
|
|
349
642
|
description: 'Structured analysis for questions needing more depth',
|
|
350
643
|
arguments: [{ name: 'question', description: 'The question to analyze', required: true }],
|
|
351
644
|
},
|
|
352
645
|
{
|
|
353
|
-
name: '
|
|
646
|
+
name: 'challenge',
|
|
354
647
|
description: 'Adversarial analysis that stress-tests a proposal',
|
|
355
648
|
arguments: [{ name: 'proposal', description: 'The proposal or idea to challenge', required: true }],
|
|
356
649
|
},
|
|
357
650
|
{
|
|
358
|
-
name: '
|
|
651
|
+
name: 'meta',
|
|
359
652
|
description: 'Sustained metacognitive observation (Max tier only)',
|
|
360
653
|
arguments: [{ name: 'topic', description: 'The topic or context to reflect on', required: true }],
|
|
361
654
|
},
|
|
@@ -364,11 +657,11 @@ async function main() {
|
|
|
364
657
|
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
365
658
|
const { name, arguments: args } = request.params;
|
|
366
659
|
const promptMap = {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
660
|
+
deepthink: `Use the deepthink tool to analyze this question in depth: ${args?.question ?? ''}`,
|
|
661
|
+
problem_solve: `Use the problem_solve tool to work through this decision: ${args?.problem ?? ''}`,
|
|
662
|
+
think: `Use the think tool to analyze this question: ${args?.question ?? ''}`,
|
|
663
|
+
challenge: `Use the challenge tool to stress-test this proposal: ${args?.proposal ?? ''}`,
|
|
664
|
+
meta: `Use the meta tool to reflect on this topic: ${args?.topic ?? ''}`,
|
|
372
665
|
};
|
|
373
666
|
const text = promptMap[name] ?? `Unknown prompt: ${name}`;
|
|
374
667
|
return {
|
|
@@ -382,7 +675,7 @@ async function main() {
|
|
|
382
675
|
});
|
|
383
676
|
const transport = new StdioServerTransport();
|
|
384
677
|
await server.connect(transport);
|
|
385
|
-
console.error('[rvry-mcp] Connected via stdio. Tools:
|
|
678
|
+
console.error('[rvry-mcp] Connected via stdio. Tools: deepthink, problem_solve, think, challenge, meta');
|
|
386
679
|
}
|
|
387
680
|
// Export internals for testing
|
|
388
681
|
export { TOOL_MAP, TOOL_DEFS, stripResponse, questionCache };
|