@paretools/ruby 0.11.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/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +58 -18
- package/dist/tools/index.js.map +1 -1
- package/package.json +4 -4
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { type LazyToolManager } from "@paretools/shared";
|
|
2
3
|
/** Registers all Ruby tools on the given MCP server, filtered by policy. */
|
|
3
|
-
export declare function registerAllTools(server: McpServer): void;
|
|
4
|
+
export declare function registerAllTools(server: McpServer, lazyManager?: LazyToolManager): void;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AA8D3B,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,eAAe,QAiBhF"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shouldRegisterTool } from "@paretools/shared";
|
|
1
|
+
import { shouldRegisterTool, isCoreToolForServer, registerDiscoverTool, } from "@paretools/shared";
|
|
2
2
|
import { registerRunTool } from "./run.js";
|
|
3
3
|
import { registerCheckTool } from "./check.js";
|
|
4
4
|
import { registerGemListTool } from "./gem-list.js";
|
|
@@ -7,24 +7,64 @@ import { registerGemOutdatedTool } from "./gem-outdated.js";
|
|
|
7
7
|
import { registerBundleInstallTool } from "./bundle-install.js";
|
|
8
8
|
import { registerBundleExecTool } from "./bundle-exec.js";
|
|
9
9
|
import { registerBundleCheckTool } from "./bundle-check.js";
|
|
10
|
+
const TOOL_DEFS = [
|
|
11
|
+
{
|
|
12
|
+
name: "run",
|
|
13
|
+
description: "Executes a Ruby script file and returns structured output (stdout, stderr, exit code, duration).",
|
|
14
|
+
register: registerRunTool,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "check",
|
|
18
|
+
description: "Checks a Ruby file for syntax errors using `ruby -c` and returns structured validation results.",
|
|
19
|
+
register: registerCheckTool,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "gem-list",
|
|
23
|
+
description: "Lists installed Ruby gems with version information. Returns structured JSON with gem names and versions.",
|
|
24
|
+
register: registerGemListTool,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "gem-install",
|
|
28
|
+
description: "Installs a Ruby gem using `gem install` and returns structured output with success status and duration.",
|
|
29
|
+
register: registerGemInstallTool,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "gem-outdated",
|
|
33
|
+
description: "Lists outdated Ruby gems showing current and latest available versions.",
|
|
34
|
+
register: registerGemOutdatedTool,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "bundle-install",
|
|
38
|
+
description: "Installs Gemfile dependencies using `bundle install` and returns structured output.",
|
|
39
|
+
register: registerBundleInstallTool,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "bundle-exec",
|
|
43
|
+
description: "Executes a command in the context of the Gemfile bundle using `bundle exec`.",
|
|
44
|
+
register: registerBundleExecTool,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "bundle-check",
|
|
48
|
+
description: "Verifies that the Gemfile's dependencies are satisfied without installing them.",
|
|
49
|
+
register: registerBundleCheckTool,
|
|
50
|
+
},
|
|
51
|
+
];
|
|
10
52
|
/** Registers all Ruby tools on the given MCP server, filtered by policy. */
|
|
11
|
-
export function registerAllTools(server) {
|
|
53
|
+
export function registerAllTools(server, lazyManager) {
|
|
12
54
|
const s = (name) => shouldRegisterTool("ruby", name);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (s("bundle-check"))
|
|
28
|
-
registerBundleCheckTool(server);
|
|
55
|
+
const isCore = (name) => isCoreToolForServer("ruby", name);
|
|
56
|
+
for (const def of TOOL_DEFS) {
|
|
57
|
+
if (!s(def.name))
|
|
58
|
+
continue;
|
|
59
|
+
if (lazyManager && !isCore(def.name)) {
|
|
60
|
+
lazyManager.registerLazy(def);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
def.register(server);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (lazyManager && lazyManager.hasDeferredTools()) {
|
|
67
|
+
registerDiscoverTool(server, lazyManager, "ruby");
|
|
68
|
+
}
|
|
29
69
|
}
|
|
30
70
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C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M,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAEnE,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;QAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAE3B,IAAI,WAAW,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACrC,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,IAAI,WAAW,IAAI,WAAW,CAAC,gBAAgB,EAAE,EAAE,CAAC;QAClD,oBAAoB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paretools/ruby",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"mcpName": "io.github.Dave-London/pare-ruby",
|
|
5
5
|
"description": "MCP server for Ruby and Bundler operations with structured, token-efficient output",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"dist"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
54
|
+
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
55
55
|
"zod": "^4.3.6",
|
|
56
|
-
"@paretools/shared": "0.
|
|
56
|
+
"@paretools/shared": "0.13.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@types/node": "^25.
|
|
59
|
+
"@types/node": "^25.3.0",
|
|
60
60
|
"typescript": "^5.7.0",
|
|
61
61
|
"vitest": "^4.0.18",
|
|
62
62
|
"@paretools/tsconfig": "0.0.0"
|