@getripple/mcp 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +84 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +33 -0
- package/dist/server.js +312 -0
- package/dist/server.js.map +1 -0
- package/dist/tools.d.ts +62 -0
- package/dist/tools.js +706 -0
- package/dist/tools.js.map +1 -0
- package/examples/local-dev.config.json +12 -0
- package/examples/published.config.json +13 -0
- package/package.json +54 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# @getripple/mcp Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.4] - 2026-06-03
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Executable entry point for the `ripple-mcp` binary.
|
|
7
|
+
- Publishable package identity under `@getripple/mcp`.
|
|
8
|
+
- Release readiness checks for packed MCP installs and stdio gate behavior.
|
|
9
|
+
- Package-specific README and changelog included in the npm tarball.
|
|
10
|
+
|
|
11
|
+
## [1.0.3] - 2026-06-03
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Initial release of Ripple's MCP stdio server.
|
|
15
|
+
- Agent tools for workflow handshake, context planning, staged/changed checks, audit, gate, approval status, repair, focus, blast radius, policy explanation, and recent changes.
|
|
16
|
+
- Structured continue/stop gate responses for MCP-compatible AI coding agents.
|
|
17
|
+
|
|
18
|
+
### Notes
|
|
19
|
+
- Public alpha. Agents should treat Ripple's output as local workflow evidence, not as a replacement for tests or human review.
|
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# @getripple/mcp
|
|
2
|
+
|
|
3
|
+
MCP stdio server for AI agents that need Ripple's architectural context before
|
|
4
|
+
editing code.
|
|
5
|
+
|
|
6
|
+
Paste this into an MCP-compatible client:
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"mcpServers": {
|
|
11
|
+
"ripple": {
|
|
12
|
+
"command": "npx",
|
|
13
|
+
"args": [
|
|
14
|
+
"-y",
|
|
15
|
+
"@getripple/mcp",
|
|
16
|
+
"--workspace",
|
|
17
|
+
"/absolute/path/to/your/repo"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The server lets agents call Ripple directly instead of scraping markdown files.
|
|
25
|
+
It does not sandbox file writes by itself; MCP clients, CLI checks, CI gates, or
|
|
26
|
+
human review must obey Ripple's continue/stop decisions.
|
|
27
|
+
|
|
28
|
+
## Tools
|
|
29
|
+
|
|
30
|
+
```txt
|
|
31
|
+
ripple_get_agent_workflow
|
|
32
|
+
ripple_doctor
|
|
33
|
+
ripple_plan_context
|
|
34
|
+
ripple_check_staged
|
|
35
|
+
ripple_check_changed
|
|
36
|
+
ripple_audit_change
|
|
37
|
+
ripple_gate
|
|
38
|
+
ripple_get_approval_status
|
|
39
|
+
ripple_repair_intent_drift
|
|
40
|
+
ripple_get_focus
|
|
41
|
+
ripple_get_blast_radius
|
|
42
|
+
ripple_explain_policy
|
|
43
|
+
ripple_get_recent_changes
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use `ripple_plan_context` before editing to save task intent and control
|
|
47
|
+
boundary. Use `ripple_check_staged` or `ripple_audit_change` after editing to
|
|
48
|
+
detect intent drift, boundary drift, policy drift, and readiness drift. Use
|
|
49
|
+
`ripple_gate` when the agent only needs the compact continue/stop decision.
|
|
50
|
+
|
|
51
|
+
## Local Run
|
|
52
|
+
|
|
53
|
+
After install:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ripple-mcp --workspace /absolute/path/to/your/repo
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Without installing:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx -y @getripple/mcp --workspace /absolute/path/to/your/repo
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For local monorepo development:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm run build:mcp
|
|
69
|
+
node packages/mcp/dist/server.js --workspace /absolute/path/to/your/repo
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Protocol Notes
|
|
73
|
+
|
|
74
|
+
The server speaks newline-delimited JSON-RPC over stdio. Only JSON-RPC messages
|
|
75
|
+
are written to stdout; scan logs are redirected to stderr so MCP clients can
|
|
76
|
+
parse responses safely.
|
|
77
|
+
|
|
78
|
+
## Status
|
|
79
|
+
|
|
80
|
+
Public alpha. The strongest current experience is JavaScript and TypeScript.
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { RippleMcpToolHost, createRippleMcpToolHost, RIPPLE_MCP_TOOLS, } from "./tools";
|
|
2
|
+
export type { RippleMcpToolName, RippleMcpToolDefinition, RippleMcpToolCallArgs, RippleMcpToolResult, RippleMcpToolHostOptions, } from "./tools";
|
|
3
|
+
export { MCP_PROTOCOL_VERSION, RippleMcpJsonRpcServer, runStdioServer, } from "./server";
|
|
4
|
+
export type { JsonRpcResponse, } from "./server";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runStdioServer = exports.RippleMcpJsonRpcServer = exports.MCP_PROTOCOL_VERSION = exports.RIPPLE_MCP_TOOLS = exports.createRippleMcpToolHost = exports.RippleMcpToolHost = void 0;
|
|
4
|
+
var tools_1 = require("./tools");
|
|
5
|
+
Object.defineProperty(exports, "RippleMcpToolHost", { enumerable: true, get: function () { return tools_1.RippleMcpToolHost; } });
|
|
6
|
+
Object.defineProperty(exports, "createRippleMcpToolHost", { enumerable: true, get: function () { return tools_1.createRippleMcpToolHost; } });
|
|
7
|
+
Object.defineProperty(exports, "RIPPLE_MCP_TOOLS", { enumerable: true, get: function () { return tools_1.RIPPLE_MCP_TOOLS; } });
|
|
8
|
+
var server_1 = require("./server");
|
|
9
|
+
Object.defineProperty(exports, "MCP_PROTOCOL_VERSION", { enumerable: true, get: function () { return server_1.MCP_PROTOCOL_VERSION; } });
|
|
10
|
+
Object.defineProperty(exports, "RippleMcpJsonRpcServer", { enumerable: true, get: function () { return server_1.RippleMcpJsonRpcServer; } });
|
|
11
|
+
Object.defineProperty(exports, "runStdioServer", { enumerable: true, get: function () { return server_1.runStdioServer; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iCAIiB;AAHf,0GAAA,iBAAiB,OAAA;AACjB,gHAAA,uBAAuB,OAAA;AACvB,yGAAA,gBAAgB,OAAA;AAWlB,mCAIkB;AAHhB,8GAAA,oBAAoB,OAAA;AACpB,gHAAA,sBAAsB,OAAA;AACtB,wGAAA,cAAc,OAAA"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { RippleMcpToolHost } from "./tools";
|
|
3
|
+
export declare const MCP_PROTOCOL_VERSION = "2025-06-18";
|
|
4
|
+
type JsonRpcId = string | number | null;
|
|
5
|
+
type JsonRpcSuccessResponse = {
|
|
6
|
+
jsonrpc: "2.0";
|
|
7
|
+
id: JsonRpcId;
|
|
8
|
+
result: unknown;
|
|
9
|
+
};
|
|
10
|
+
type JsonRpcErrorResponse = {
|
|
11
|
+
jsonrpc: "2.0";
|
|
12
|
+
id: JsonRpcId;
|
|
13
|
+
error: {
|
|
14
|
+
code: number;
|
|
15
|
+
message: string;
|
|
16
|
+
data?: unknown;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type JsonRpcResponse = JsonRpcSuccessResponse | JsonRpcErrorResponse;
|
|
20
|
+
export declare class RippleMcpJsonRpcServer {
|
|
21
|
+
private readonly host;
|
|
22
|
+
private readonly version;
|
|
23
|
+
constructor(host: RippleMcpToolHost, version?: string);
|
|
24
|
+
handleLine(line: string): Promise<JsonRpcResponse | null>;
|
|
25
|
+
handleMessage(message: unknown): Promise<JsonRpcResponse | null>;
|
|
26
|
+
dispose(): void;
|
|
27
|
+
private initializeResult;
|
|
28
|
+
private callToolResult;
|
|
29
|
+
private success;
|
|
30
|
+
private error;
|
|
31
|
+
}
|
|
32
|
+
export declare function runStdioServer(workspaceRoot: string): Promise<void>;
|
|
33
|
+
export {};
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.runStdioServer = exports.RippleMcpJsonRpcServer = exports.MCP_PROTOCOL_VERSION = void 0;
|
|
28
|
+
const fs = __importStar(require("fs"));
|
|
29
|
+
const path = __importStar(require("path"));
|
|
30
|
+
const readline = __importStar(require("readline"));
|
|
31
|
+
const tools_1 = require("./tools");
|
|
32
|
+
exports.MCP_PROTOCOL_VERSION = "2025-06-18";
|
|
33
|
+
const JSON_RPC_VERSION = "2.0";
|
|
34
|
+
const SERVER_NAME = "ripple-mcp";
|
|
35
|
+
const JSON_RPC_ERRORS = {
|
|
36
|
+
parseError: -32700,
|
|
37
|
+
invalidRequest: -32600,
|
|
38
|
+
methodNotFound: -32601,
|
|
39
|
+
invalidParams: -32602,
|
|
40
|
+
internalError: -32603,
|
|
41
|
+
};
|
|
42
|
+
class RippleMcpJsonRpcServer {
|
|
43
|
+
constructor(host, version = readPackageVersion()) {
|
|
44
|
+
this.host = host;
|
|
45
|
+
this.version = version;
|
|
46
|
+
}
|
|
47
|
+
async handleLine(line) {
|
|
48
|
+
let message;
|
|
49
|
+
try {
|
|
50
|
+
message = JSON.parse(line);
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
return this.error(null, JSON_RPC_ERRORS.parseError, "Parse error", errorMessage(err));
|
|
54
|
+
}
|
|
55
|
+
return this.handleMessage(message);
|
|
56
|
+
}
|
|
57
|
+
async handleMessage(message) {
|
|
58
|
+
if (!isJsonRpcRequest(message)) {
|
|
59
|
+
return this.error(null, JSON_RPC_ERRORS.invalidRequest, "Invalid Request");
|
|
60
|
+
}
|
|
61
|
+
const id = message.id ?? null;
|
|
62
|
+
const isNotification = message.id === undefined;
|
|
63
|
+
if (message.method === "notifications/initialized") {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
if (!message.method) {
|
|
67
|
+
return isNotification
|
|
68
|
+
? null
|
|
69
|
+
: this.error(id, JSON_RPC_ERRORS.invalidRequest, "Request method is required.");
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
if (message.method === "initialize") {
|
|
73
|
+
return isNotification ? null : this.success(id, this.initializeResult());
|
|
74
|
+
}
|
|
75
|
+
if (message.method === "ping") {
|
|
76
|
+
return isNotification ? null : this.success(id, {});
|
|
77
|
+
}
|
|
78
|
+
if (message.method === "tools/list") {
|
|
79
|
+
return isNotification
|
|
80
|
+
? null
|
|
81
|
+
: this.success(id, { tools: this.host.listTools() });
|
|
82
|
+
}
|
|
83
|
+
if (message.method === "tools/call") {
|
|
84
|
+
return isNotification
|
|
85
|
+
? null
|
|
86
|
+
: this.success(id, await this.callToolResult(message.params));
|
|
87
|
+
}
|
|
88
|
+
return isNotification
|
|
89
|
+
? null
|
|
90
|
+
: this.error(id, JSON_RPC_ERRORS.methodNotFound, `Method not found: ${message.method}`);
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
return this.error(id, JSON_RPC_ERRORS.internalError, errorMessage(err));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
dispose() {
|
|
97
|
+
this.host.dispose();
|
|
98
|
+
}
|
|
99
|
+
initializeResult() {
|
|
100
|
+
return {
|
|
101
|
+
protocolVersion: exports.MCP_PROTOCOL_VERSION,
|
|
102
|
+
capabilities: {
|
|
103
|
+
tools: {
|
|
104
|
+
listChanged: false,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
serverInfo: {
|
|
108
|
+
name: SERVER_NAME,
|
|
109
|
+
title: "Ripple MCP",
|
|
110
|
+
version: this.version,
|
|
111
|
+
},
|
|
112
|
+
instructions: "Use Ripple before editing code to get focused architectural context, blast radius, recent changes, and token-budgeted read plans.",
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
async callToolResult(params) {
|
|
116
|
+
const parsed = parseToolCallParams(params);
|
|
117
|
+
if (!isRippleMcpToolName(parsed.name)) {
|
|
118
|
+
throw new Error(`Unknown Ripple MCP tool: ${String(parsed.name)}`);
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
const result = await this.host.callTool(parsed.name, parsed.arguments);
|
|
122
|
+
const text = JSON.stringify(result.data, null, 2);
|
|
123
|
+
return {
|
|
124
|
+
content: [
|
|
125
|
+
{
|
|
126
|
+
type: "text",
|
|
127
|
+
text,
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
structuredContent: result.data,
|
|
131
|
+
isError: false,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
return {
|
|
136
|
+
content: [
|
|
137
|
+
{
|
|
138
|
+
type: "text",
|
|
139
|
+
text: errorMessage(err),
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
isError: true,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
success(id, result) {
|
|
147
|
+
return {
|
|
148
|
+
jsonrpc: JSON_RPC_VERSION,
|
|
149
|
+
id,
|
|
150
|
+
result,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
error(id, code, message, data) {
|
|
154
|
+
return {
|
|
155
|
+
jsonrpc: JSON_RPC_VERSION,
|
|
156
|
+
id,
|
|
157
|
+
error: {
|
|
158
|
+
code,
|
|
159
|
+
message,
|
|
160
|
+
...(data === undefined ? {} : { data }),
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.RippleMcpJsonRpcServer = RippleMcpJsonRpcServer;
|
|
166
|
+
async function runStdioServer(workspaceRoot) {
|
|
167
|
+
const originalLog = console.log;
|
|
168
|
+
console.log = (...args) => {
|
|
169
|
+
console.error(...args);
|
|
170
|
+
};
|
|
171
|
+
const host = (0, tools_1.createRippleMcpToolHost)({ workspaceRoot });
|
|
172
|
+
const server = new RippleMcpJsonRpcServer(host);
|
|
173
|
+
const lines = readline.createInterface({
|
|
174
|
+
input: process.stdin,
|
|
175
|
+
crlfDelay: Infinity,
|
|
176
|
+
});
|
|
177
|
+
const writeResponse = (response) => {
|
|
178
|
+
if (!response) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
process.stdout.write(`${JSON.stringify(response)}\n`);
|
|
182
|
+
};
|
|
183
|
+
let queue = Promise.resolve();
|
|
184
|
+
const handleInputLine = async (line) => {
|
|
185
|
+
try {
|
|
186
|
+
writeResponse(await server.handleLine(line));
|
|
187
|
+
}
|
|
188
|
+
catch (err) {
|
|
189
|
+
writeResponse({
|
|
190
|
+
jsonrpc: JSON_RPC_VERSION,
|
|
191
|
+
id: null,
|
|
192
|
+
error: {
|
|
193
|
+
code: JSON_RPC_ERRORS.internalError,
|
|
194
|
+
message: errorMessage(err),
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
lines.on("line", (line) => {
|
|
200
|
+
const trimmed = line.trim();
|
|
201
|
+
if (!trimmed) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
queue = queue.then(() => handleInputLine(trimmed));
|
|
205
|
+
});
|
|
206
|
+
lines.on("close", () => {
|
|
207
|
+
void queue.finally(() => {
|
|
208
|
+
server.dispose();
|
|
209
|
+
console.log = originalLog;
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
exports.runStdioServer = runStdioServer;
|
|
214
|
+
function parseToolCallParams(params) {
|
|
215
|
+
if (!isRecord(params)) {
|
|
216
|
+
throw new Error("tools/call params must be an object.");
|
|
217
|
+
}
|
|
218
|
+
const toolParams = params;
|
|
219
|
+
if (!isRecord(toolParams.arguments)) {
|
|
220
|
+
throw new Error("tools/call arguments must be an object.");
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
name: toolParams.name,
|
|
224
|
+
arguments: toolParams.arguments,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function isRippleMcpToolName(name) {
|
|
228
|
+
return (name === "ripple_doctor" ||
|
|
229
|
+
name === "ripple_check_changed" ||
|
|
230
|
+
name === "ripple_check_staged" ||
|
|
231
|
+
name === "ripple_audit_change" ||
|
|
232
|
+
name === "ripple_gate" ||
|
|
233
|
+
name === "ripple_get_approval_status" ||
|
|
234
|
+
name === "ripple_get_agent_workflow" ||
|
|
235
|
+
name === "ripple_repair_intent_drift" ||
|
|
236
|
+
name === "ripple_get_focus" ||
|
|
237
|
+
name === "ripple_get_blast_radius" ||
|
|
238
|
+
name === "ripple_explain_policy" ||
|
|
239
|
+
name === "ripple_plan_context" ||
|
|
240
|
+
name === "ripple_get_recent_changes");
|
|
241
|
+
}
|
|
242
|
+
function isJsonRpcRequest(value) {
|
|
243
|
+
if (!isRecord(value)) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
const request = value;
|
|
247
|
+
const id = request.id;
|
|
248
|
+
return (request.jsonrpc === JSON_RPC_VERSION &&
|
|
249
|
+
(id === undefined || typeof id === "string" || typeof id === "number" || id === null) &&
|
|
250
|
+
(request.method === undefined || typeof request.method === "string"));
|
|
251
|
+
}
|
|
252
|
+
function isRecord(value) {
|
|
253
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
254
|
+
}
|
|
255
|
+
function errorMessage(err) {
|
|
256
|
+
return err instanceof Error ? err.message : String(err);
|
|
257
|
+
}
|
|
258
|
+
function readPackageVersion() {
|
|
259
|
+
try {
|
|
260
|
+
const pkgPath = path.resolve(__dirname, "..", "package.json");
|
|
261
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
262
|
+
return pkg.version ?? "0.0.0";
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
return "0.0.0";
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function resolveWorkspaceRoot(argv) {
|
|
269
|
+
const envRoot = process.env.RIPPLE_WORKSPACE_ROOT;
|
|
270
|
+
let root = envRoot && envRoot.trim().length > 0 ? envRoot : process.cwd();
|
|
271
|
+
for (let i = 0; i < argv.length; i++) {
|
|
272
|
+
const token = argv[i];
|
|
273
|
+
if (token === "--help" || token === "-h") {
|
|
274
|
+
process.stdout.write([
|
|
275
|
+
"Ripple MCP stdio server",
|
|
276
|
+
"",
|
|
277
|
+
"Usage:",
|
|
278
|
+
" ripple-mcp [--workspace <path>]",
|
|
279
|
+
"",
|
|
280
|
+
"Environment:",
|
|
281
|
+
" RIPPLE_WORKSPACE_ROOT Workspace root used when --workspace is not provided",
|
|
282
|
+
"",
|
|
283
|
+
].join("\n"));
|
|
284
|
+
process.exit(0);
|
|
285
|
+
}
|
|
286
|
+
if (token === "--workspace") {
|
|
287
|
+
const value = argv[i + 1];
|
|
288
|
+
if (!value || value.startsWith("-")) {
|
|
289
|
+
throw new Error("Missing value for --workspace");
|
|
290
|
+
}
|
|
291
|
+
root = value;
|
|
292
|
+
i++;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
if (token.startsWith("--workspace=")) {
|
|
296
|
+
root = token.slice("--workspace=".length);
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
throw new Error(`Unknown argument: ${token}`);
|
|
300
|
+
}
|
|
301
|
+
return path.resolve(root);
|
|
302
|
+
}
|
|
303
|
+
if (require.main === module) {
|
|
304
|
+
try {
|
|
305
|
+
void runStdioServer(resolveWorkspaceRoot(process.argv.slice(2)));
|
|
306
|
+
}
|
|
307
|
+
catch (err) {
|
|
308
|
+
console.error(`Ripple MCP error: ${errorMessage(err)}`);
|
|
309
|
+
process.exitCode = 1;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAC7B,mDAAqC;AACrC,mCAKiB;AAE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lanSummary, FileBlastRadiusSummary, FileFocusSummary, IntentDriftRepairPlan, RippleApprovalStatus, RippleAuditSummary, RippleGateSummary, RipplePolicyExplanation, RecentHistorySummary, RippleReadinessSummary, StagedCheckSummary, StagedCheckWithIntentSummary } from "@getripple/core";
|
|
2
|
+
export type RippleMcpToolName = "ripple_doctor" | "ripple_check_changed" | "ripple_check_staged" | "ripple_audit_change" | "ripple_gate" | "ripple_get_approval_status" | "ripple_get_agent_workflow" | "ripple_repair_intent_drift" | "ripple_get_focus" | "ripple_get_blast_radius" | "ripple_explain_policy" | "ripple_plan_context" | "ripple_get_recent_changes";
|
|
3
|
+
export type RippleMcpToolDefinition = {
|
|
4
|
+
name: RippleMcpToolName;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object";
|
|
8
|
+
properties: Record<string, unknown>;
|
|
9
|
+
required?: string[];
|
|
10
|
+
additionalProperties: false;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type RippleMcpToolHostOptions = {
|
|
14
|
+
workspaceRoot: string;
|
|
15
|
+
};
|
|
16
|
+
export type RippleMcpToolCallArgs = Record<string, unknown>;
|
|
17
|
+
export type RippleMcpToolData = AgentWorkflowSummary | RippleReadinessSummary | FileFocusSummary | FileBlastRadiusSummary | ContextPlanSummary | ContextPlanWithIntentSummary | RipplePolicyExplanation | ApprovalStatusWithIntentSummary | RippleAuditSummary | RippleGateSummary | IntentDriftRepairPlan | RecentHistorySummary | StagedCheckSummary | StagedCheckWithIntentSummary;
|
|
18
|
+
export type RippleMcpToolResult<T = RippleMcpToolData> = {
|
|
19
|
+
tool: RippleMcpToolName;
|
|
20
|
+
data: T;
|
|
21
|
+
};
|
|
22
|
+
export type ContextPlanWithIntentSummary = ContextPlanSummary & {
|
|
23
|
+
policyExplanation: RipplePolicyExplanation;
|
|
24
|
+
changeIntent?: ChangeIntent;
|
|
25
|
+
changeIntentPath?: string;
|
|
26
|
+
};
|
|
27
|
+
export type ApprovalStatusWithIntentSummary = RippleApprovalStatus & {
|
|
28
|
+
intent: {
|
|
29
|
+
id: string;
|
|
30
|
+
task: string;
|
|
31
|
+
targetFile: string;
|
|
32
|
+
controlMode: ChangeIntent["controlMode"];
|
|
33
|
+
humanGate: ChangeIntent["humanGate"];
|
|
34
|
+
boundaryRisk: ChangeIntent["boundaryRisk"];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const RIPPLE_MCP_TOOLS: RippleMcpToolDefinition[];
|
|
38
|
+
export declare class RippleMcpToolHost {
|
|
39
|
+
private readonly workspaceRoot;
|
|
40
|
+
private readonly engine;
|
|
41
|
+
private scanned;
|
|
42
|
+
constructor(options: RippleMcpToolHostOptions);
|
|
43
|
+
listTools(): RippleMcpToolDefinition[];
|
|
44
|
+
initialize(): Promise<void>;
|
|
45
|
+
dispose(): void;
|
|
46
|
+
callTool(name: RippleMcpToolName, args?: RippleMcpToolCallArgs): Promise<RippleMcpToolResult>;
|
|
47
|
+
private getFocus;
|
|
48
|
+
private getReadiness;
|
|
49
|
+
private getBlastRadius;
|
|
50
|
+
private explainPolicy;
|
|
51
|
+
private planContext;
|
|
52
|
+
private getRecentChanges;
|
|
53
|
+
private getApprovalStatus;
|
|
54
|
+
private checkStaged;
|
|
55
|
+
private checkChanged;
|
|
56
|
+
private auditChange;
|
|
57
|
+
private gateChange;
|
|
58
|
+
private repairIntentDrift;
|
|
59
|
+
private currentPolicyExplanationForIntent;
|
|
60
|
+
private currentReadinessSnapshot;
|
|
61
|
+
}
|
|
62
|
+
export declare function createRippleMcpToolHost(options: RippleMcpToolHostOptions): RippleMcpToolHost;
|