@paretools/ruby 0.11.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 (58) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +11 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/formatters.d.ts +90 -0
  7. package/dist/lib/formatters.d.ts.map +1 -0
  8. package/dist/lib/formatters.js +206 -0
  9. package/dist/lib/formatters.js.map +1 -0
  10. package/dist/lib/parsers.d.ts +37 -0
  11. package/dist/lib/parsers.d.ts.map +1 -0
  12. package/dist/lib/parsers.js +134 -0
  13. package/dist/lib/parsers.js.map +1 -0
  14. package/dist/lib/ruby-runner.d.ts +8 -0
  15. package/dist/lib/ruby-runner.d.ts.map +1 -0
  16. package/dist/lib/ruby-runner.js +14 -0
  17. package/dist/lib/ruby-runner.js.map +1 -0
  18. package/dist/schemas/index.d.ts +88 -0
  19. package/dist/schemas/index.d.ts.map +1 -0
  20. package/dist/schemas/index.js +81 -0
  21. package/dist/schemas/index.js.map +1 -0
  22. package/dist/tools/bundle-check.d.ts +4 -0
  23. package/dist/tools/bundle-check.d.ts.map +1 -0
  24. package/dist/tools/bundle-check.js +24 -0
  25. package/dist/tools/bundle-check.js.map +1 -0
  26. package/dist/tools/bundle-exec.d.ts +4 -0
  27. package/dist/tools/bundle-exec.d.ts.map +1 -0
  28. package/dist/tools/bundle-exec.js +56 -0
  29. package/dist/tools/bundle-exec.js.map +1 -0
  30. package/dist/tools/bundle-install.d.ts +4 -0
  31. package/dist/tools/bundle-install.d.ts.map +1 -0
  32. package/dist/tools/bundle-install.js +26 -0
  33. package/dist/tools/bundle-install.js.map +1 -0
  34. package/dist/tools/check.d.ts +4 -0
  35. package/dist/tools/check.d.ts.map +1 -0
  36. package/dist/tools/check.js +30 -0
  37. package/dist/tools/check.js.map +1 -0
  38. package/dist/tools/gem-install.d.ts +4 -0
  39. package/dist/tools/gem-install.d.ts.map +1 -0
  40. package/dist/tools/gem-install.js +39 -0
  41. package/dist/tools/gem-install.js.map +1 -0
  42. package/dist/tools/gem-list.d.ts +4 -0
  43. package/dist/tools/gem-list.d.ts.map +1 -0
  44. package/dist/tools/gem-list.js +41 -0
  45. package/dist/tools/gem-list.js.map +1 -0
  46. package/dist/tools/gem-outdated.d.ts +4 -0
  47. package/dist/tools/gem-outdated.d.ts.map +1 -0
  48. package/dist/tools/gem-outdated.js +24 -0
  49. package/dist/tools/gem-outdated.js.map +1 -0
  50. package/dist/tools/index.d.ts +4 -0
  51. package/dist/tools/index.d.ts.map +1 -0
  52. package/dist/tools/index.js +30 -0
  53. package/dist/tools/index.js.map +1 -0
  54. package/dist/tools/run.d.ts +4 -0
  55. package/dist/tools/run.d.ts.map +1 -0
  56. package/dist/tools/run.js +50 -0
  57. package/dist/tools/run.js.map +1 -0
  58. package/package.json +71 -0
@@ -0,0 +1,88 @@
1
+ import { z } from "zod";
2
+ /** Zod schema for `ruby <file>` execution result. */
3
+ export declare const RubyRunResultSchema: z.ZodObject<{
4
+ file: z.ZodString;
5
+ success: z.ZodBoolean;
6
+ exitCode: z.ZodNumber;
7
+ stdout: z.ZodOptional<z.ZodString>;
8
+ stderr: z.ZodOptional<z.ZodString>;
9
+ duration: z.ZodNumber;
10
+ timedOut: z.ZodBoolean;
11
+ }, z.core.$strip>;
12
+ export type RubyRunResult = z.infer<typeof RubyRunResultSchema>;
13
+ /** Zod schema for `ruby -c <file>` syntax check result. */
14
+ export declare const RubyCheckResultSchema: z.ZodObject<{
15
+ file: z.ZodString;
16
+ valid: z.ZodBoolean;
17
+ exitCode: z.ZodNumber;
18
+ message: z.ZodOptional<z.ZodString>;
19
+ errors: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>;
21
+ export type RubyCheckResult = z.infer<typeof RubyCheckResultSchema>;
22
+ export declare const GemEntrySchema: z.ZodObject<{
23
+ name: z.ZodString;
24
+ versions: z.ZodArray<z.ZodString>;
25
+ }, z.core.$strip>;
26
+ /** Zod schema for `gem list --local` result. */
27
+ export declare const GemListResultSchema: z.ZodObject<{
28
+ gems: z.ZodArray<z.ZodObject<{
29
+ name: z.ZodString;
30
+ versions: z.ZodArray<z.ZodString>;
31
+ }, z.core.$strip>>;
32
+ total: z.ZodNumber;
33
+ }, z.core.$strip>;
34
+ export type GemListResult = z.infer<typeof GemListResultSchema>;
35
+ /** Zod schema for `gem install <name>` result. */
36
+ export declare const GemInstallResultSchema: z.ZodObject<{
37
+ gem: z.ZodString;
38
+ success: z.ZodBoolean;
39
+ exitCode: z.ZodNumber;
40
+ stdout: z.ZodOptional<z.ZodString>;
41
+ stderr: z.ZodOptional<z.ZodString>;
42
+ duration: z.ZodNumber;
43
+ }, z.core.$strip>;
44
+ export type GemInstallResult = z.infer<typeof GemInstallResultSchema>;
45
+ export declare const OutdatedGemSchema: z.ZodObject<{
46
+ name: z.ZodString;
47
+ current: z.ZodString;
48
+ latest: z.ZodString;
49
+ }, z.core.$strip>;
50
+ /** Zod schema for `gem outdated` result. */
51
+ export declare const GemOutdatedResultSchema: z.ZodObject<{
52
+ gems: z.ZodArray<z.ZodObject<{
53
+ name: z.ZodString;
54
+ current: z.ZodString;
55
+ latest: z.ZodString;
56
+ }, z.core.$strip>>;
57
+ total: z.ZodNumber;
58
+ }, z.core.$strip>;
59
+ export type GemOutdatedResult = z.infer<typeof GemOutdatedResultSchema>;
60
+ /** Zod schema for `bundle install` result. */
61
+ export declare const BundleInstallResultSchema: z.ZodObject<{
62
+ success: z.ZodBoolean;
63
+ exitCode: z.ZodNumber;
64
+ stdout: z.ZodOptional<z.ZodString>;
65
+ stderr: z.ZodOptional<z.ZodString>;
66
+ duration: z.ZodNumber;
67
+ }, z.core.$strip>;
68
+ export type BundleInstallResult = z.infer<typeof BundleInstallResultSchema>;
69
+ /** Zod schema for `bundle exec <cmd>` result. */
70
+ export declare const BundleExecResultSchema: z.ZodObject<{
71
+ command: z.ZodString;
72
+ success: z.ZodBoolean;
73
+ exitCode: z.ZodNumber;
74
+ stdout: z.ZodOptional<z.ZodString>;
75
+ stderr: z.ZodOptional<z.ZodString>;
76
+ duration: z.ZodNumber;
77
+ timedOut: z.ZodBoolean;
78
+ }, z.core.$strip>;
79
+ export type BundleExecResult = z.infer<typeof BundleExecResultSchema>;
80
+ /** Zod schema for `bundle check` result. */
81
+ export declare const BundleCheckResultSchema: z.ZodObject<{
82
+ satisfied: z.ZodBoolean;
83
+ exitCode: z.ZodNumber;
84
+ message: z.ZodOptional<z.ZodString>;
85
+ errors: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$strip>;
87
+ export type BundleCheckResult = z.infer<typeof BundleCheckResultSchema>;
88
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,qDAAqD;AACrD,eAAO,MAAM,mBAAmB;;;;;;;;iBAQ9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB;;;;;;iBAMhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,eAAO,MAAM,cAAc;;;iBAGzB,CAAC;AAEH,gDAAgD;AAChD,eAAO,MAAM,mBAAmB;;;;;;iBAG9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE,kDAAkD;AAClD,eAAO,MAAM,sBAAsB;;;;;;;iBAOjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAItE,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,4CAA4C;AAC5C,eAAO,MAAM,uBAAuB;;;;;;;iBAGlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAIxE,8CAA8C;AAC9C,eAAO,MAAM,yBAAyB;;;;;;iBAMpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E,iDAAiD;AACjD,eAAO,MAAM,sBAAsB;;;;;;;;iBAQjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAItE,4CAA4C;AAC5C,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { z } from "zod";
2
+ // ── Run ─────────────────────────────────────────────────────────────────
3
+ /** Zod schema for `ruby <file>` execution result. */
4
+ export const RubyRunResultSchema = z.object({
5
+ file: z.string(),
6
+ success: z.boolean(),
7
+ exitCode: z.number(),
8
+ stdout: z.string().optional(),
9
+ stderr: z.string().optional(),
10
+ duration: z.number(),
11
+ timedOut: z.boolean(),
12
+ });
13
+ // ── Check ───────────────────────────────────────────────────────────────
14
+ /** Zod schema for `ruby -c <file>` syntax check result. */
15
+ export const RubyCheckResultSchema = z.object({
16
+ file: z.string(),
17
+ valid: z.boolean(),
18
+ exitCode: z.number(),
19
+ message: z.string().optional(),
20
+ errors: z.string().optional(),
21
+ });
22
+ // ── Gem List ────────────────────────────────────────────────────────────
23
+ export const GemEntrySchema = z.object({
24
+ name: z.string(),
25
+ versions: z.array(z.string()),
26
+ });
27
+ /** Zod schema for `gem list --local` result. */
28
+ export const GemListResultSchema = z.object({
29
+ gems: z.array(GemEntrySchema),
30
+ total: z.number(),
31
+ });
32
+ // ── Gem Install ─────────────────────────────────────────────────────────
33
+ /** Zod schema for `gem install <name>` result. */
34
+ export const GemInstallResultSchema = z.object({
35
+ gem: z.string(),
36
+ success: z.boolean(),
37
+ exitCode: z.number(),
38
+ stdout: z.string().optional(),
39
+ stderr: z.string().optional(),
40
+ duration: z.number(),
41
+ });
42
+ // ── Gem Outdated ────────────────────────────────────────────────────────
43
+ export const OutdatedGemSchema = z.object({
44
+ name: z.string(),
45
+ current: z.string(),
46
+ latest: z.string(),
47
+ });
48
+ /** Zod schema for `gem outdated` result. */
49
+ export const GemOutdatedResultSchema = z.object({
50
+ gems: z.array(OutdatedGemSchema),
51
+ total: z.number(),
52
+ });
53
+ // ── Bundle Install ──────────────────────────────────────────────────────
54
+ /** Zod schema for `bundle install` result. */
55
+ export const BundleInstallResultSchema = z.object({
56
+ success: z.boolean(),
57
+ exitCode: z.number(),
58
+ stdout: z.string().optional(),
59
+ stderr: z.string().optional(),
60
+ duration: z.number(),
61
+ });
62
+ // ── Bundle Exec ─────────────────────────────────────────────────────────
63
+ /** Zod schema for `bundle exec <cmd>` result. */
64
+ export const BundleExecResultSchema = z.object({
65
+ command: z.string(),
66
+ success: z.boolean(),
67
+ exitCode: z.number(),
68
+ stdout: z.string().optional(),
69
+ stderr: z.string().optional(),
70
+ duration: z.number(),
71
+ timedOut: z.boolean(),
72
+ });
73
+ // ── Bundle Check ────────────────────────────────────────────────────────
74
+ /** Zod schema for `bundle check` result. */
75
+ export const BundleCheckResultSchema = z.object({
76
+ satisfied: z.boolean(),
77
+ exitCode: z.number(),
78
+ message: z.string().optional(),
79
+ errors: z.string().optional(),
80
+ });
81
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,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AsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC;AAIH,2EAA2E;AAE3E,4CAA4C;AAC5C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers the `bundle-check` tool on the given MCP server. */
3
+ export declare function registerBundleCheckTool(server: McpServer): void;
4
+ //# sourceMappingURL=bundle-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-check.d.ts","sourceRoot":"","sources":["../../src/tools/bundle-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWzE,iEAAiE;AACjE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,QA6BxD"}
@@ -0,0 +1,24 @@
1
+ import { compactDualOutput, compactInput, projectPathInput } from "@paretools/shared";
2
+ import { bundleCmd } from "../lib/ruby-runner.js";
3
+ import { parseBundleCheckOutput } from "../lib/parsers.js";
4
+ import { formatBundleCheck, compactBundleCheckMap, formatBundleCheckCompact, } from "../lib/formatters.js";
5
+ import { BundleCheckResultSchema } from "../schemas/index.js";
6
+ /** Registers the `bundle-check` tool on the given MCP server. */
7
+ export function registerBundleCheckTool(server) {
8
+ server.registerTool("bundle-check", {
9
+ title: "Bundle Check",
10
+ description: "Verifies that the Gemfile's dependencies are satisfied without installing them.",
11
+ inputSchema: {
12
+ path: projectPathInput,
13
+ compact: compactInput,
14
+ },
15
+ outputSchema: BundleCheckResultSchema,
16
+ }, async ({ path, compact }) => {
17
+ const cwd = path || process.cwd();
18
+ const result = await bundleCmd(["check"], cwd);
19
+ const data = parseBundleCheckOutput(result.stdout, result.stderr, result.exitCode);
20
+ const rawOutput = (result.stdout + "\n" + result.stderr).trim();
21
+ return compactDualOutput(data, rawOutput, formatBundleCheck, compactBundleCheckMap, formatBundleCheckCompact, compact === false);
22
+ });
23
+ }
24
+ //# sourceMappingURL=bundle-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-check.js","sourceRoot":"","sources":["../../src/tools/bundle-check.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,iEAAiE;AACjE,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,YAAY,CACjB,cAAc,EACd;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,iFAAiF;QACnF,WAAW,EAAE;YACX,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,YAAY;SACtB;QACD,YAAY,EAAE,uBAAuB;KACtC,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1B,MAAM,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;QAE/C,MAAM,IAAI,GAAG,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnF,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,OAAO,iBAAiB,CACtB,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,OAAO,KAAK,KAAK,CAClB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers the `bundle-exec` tool on the given MCP server. */
3
+ export declare function registerBundleExecTool(server: McpServer): void;
4
+ //# sourceMappingURL=bundle-exec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-exec.d.ts","sourceRoot":"","sources":["../../src/tools/bundle-exec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiBzE,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QAoEvD"}
@@ -0,0 +1,56 @@
1
+ import { z } from "zod";
2
+ import { compactDualOutput, assertNoFlagInjection, INPUT_LIMITS, compactInput, projectPathInput, } from "@paretools/shared";
3
+ import { bundleCmd } from "../lib/ruby-runner.js";
4
+ import { parseBundleExecOutput } from "../lib/parsers.js";
5
+ import { formatBundleExec, compactBundleExecMap, formatBundleExecCompact, } from "../lib/formatters.js";
6
+ import { BundleExecResultSchema } from "../schemas/index.js";
7
+ /** Registers the `bundle-exec` tool on the given MCP server. */
8
+ export function registerBundleExecTool(server) {
9
+ server.registerTool("bundle-exec", {
10
+ title: "Bundle Exec",
11
+ description: "Executes a command in the context of the Gemfile bundle using `bundle exec` and returns structured output.",
12
+ inputSchema: {
13
+ command: z
14
+ .string()
15
+ .max(INPUT_LIMITS.SHORT_STRING_MAX)
16
+ .describe("Command to execute in the bundle context (e.g., 'rake', 'rspec', 'rubocop')"),
17
+ args: z
18
+ .array(z.string().max(INPUT_LIMITS.STRING_MAX))
19
+ .max(INPUT_LIMITS.ARRAY_MAX)
20
+ .optional()
21
+ .default([])
22
+ .describe("Arguments to pass to the command"),
23
+ path: projectPathInput,
24
+ compact: compactInput,
25
+ },
26
+ outputSchema: BundleExecResultSchema,
27
+ }, async ({ command, args, path, compact }) => {
28
+ assertNoFlagInjection(command, "command");
29
+ for (const arg of args || []) {
30
+ assertNoFlagInjection(arg, "args");
31
+ }
32
+ const cwd = path || process.cwd();
33
+ const cmdArgs = ["exec", command, ...(args || [])];
34
+ const start = Date.now();
35
+ let timedOut = false;
36
+ let result;
37
+ try {
38
+ result = await bundleCmd(cmdArgs, cwd);
39
+ }
40
+ catch (err) {
41
+ const errMsg = err instanceof Error ? err.message : String(err);
42
+ if (errMsg.includes("timed out")) {
43
+ timedOut = true;
44
+ result = { exitCode: 124, stdout: "", stderr: errMsg };
45
+ }
46
+ else {
47
+ throw err;
48
+ }
49
+ }
50
+ const duration = Date.now() - start;
51
+ const data = parseBundleExecOutput(command, result.stdout, result.stderr, result.exitCode, duration, timedOut);
52
+ const rawOutput = (result.stdout + "\n" + result.stderr).trim();
53
+ return compactDualOutput(data, rawOutput, formatBundleExec, compactBundleExecMap, formatBundleExecCompact, compact === false);
54
+ });
55
+ }
56
+ //# sourceMappingURL=bundle-exec.js.map
@@ -0,0 +1 @@
1
+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,IAAI,EAAE,CAAC;QAChE,OAAO,iBAAiB,CACtB,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,KAAK,KAAK,CAClB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers the `bundle-install` tool on the given MCP server. */
3
+ export declare function registerBundleInstallTool(server: McpServer): void;
4
+ //# sourceMappingURL=bundle-install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-install.d.ts","sourceRoot":"","sources":["../../src/tools/bundle-install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWzE,mEAAmE;AACnE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,QAqC1D"}
@@ -0,0 +1,26 @@
1
+ import { compactDualOutput, compactInput, projectPathInput } from "@paretools/shared";
2
+ import { bundleCmd } from "../lib/ruby-runner.js";
3
+ import { parseBundleInstallOutput } from "../lib/parsers.js";
4
+ import { formatBundleInstall, compactBundleInstallMap, formatBundleInstallCompact, } from "../lib/formatters.js";
5
+ import { BundleInstallResultSchema } from "../schemas/index.js";
6
+ /** Registers the `bundle-install` tool on the given MCP server. */
7
+ export function registerBundleInstallTool(server) {
8
+ server.registerTool("bundle-install", {
9
+ title: "Bundle Install",
10
+ description: "Installs Gemfile dependencies using `bundle install` and returns structured output with success status and duration.",
11
+ inputSchema: {
12
+ path: projectPathInput,
13
+ compact: compactInput,
14
+ },
15
+ outputSchema: BundleInstallResultSchema,
16
+ }, async ({ path, compact }) => {
17
+ const cwd = path || process.cwd();
18
+ const start = Date.now();
19
+ const result = await bundleCmd(["install"], cwd);
20
+ const duration = Date.now() - start;
21
+ const data = parseBundleInstallOutput(result.stdout, result.stderr, result.exitCode, duration);
22
+ const rawOutput = (result.stdout + "\n" + result.stderr).trim();
23
+ return compactDualOutput(data, rawOutput, formatBundleInstall, compactBundleInstallMap, formatBundleInstallCompact, compact === false);
24
+ });
25
+ }
26
+ //# sourceMappingURL=bundle-install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-install.js","sourceRoot":"","sources":["../../src/tools/bundle-install.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,mEAAmE;AACnE,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,sHAAsH;QACxH,WAAW,EAAE;YACX,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,YAAY;SACtB;QACD,YAAY,EAAE,yBAAyB;KACxC,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1B,MAAM,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAElC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;QACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;QAEpC,MAAM,IAAI,GAAG,wBAAwB,CACnC,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,QAAQ,EACf,QAAQ,CACT,CAAC;QACF,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,OAAO,iBAAiB,CACtB,IAAI,EACJ,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,EAC1B,OAAO,KAAK,KAAK,CAClB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers the `check` tool on the given MCP server. */
3
+ export declare function registerCheckTool(server: McpServer): void;
4
+ //# sourceMappingURL=check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/tools/check.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAazE,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,QAmClD"}
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ import { compactDualOutput, assertNoFlagInjection, INPUT_LIMITS, compactInput, projectPathInput, } from "@paretools/shared";
3
+ import { rubyCmd } from "../lib/ruby-runner.js";
4
+ import { parseCheckOutput } from "../lib/parsers.js";
5
+ import { formatCheck, compactCheckMap, formatCheckCompact } from "../lib/formatters.js";
6
+ import { RubyCheckResultSchema } from "../schemas/index.js";
7
+ /** Registers the `check` tool on the given MCP server. */
8
+ export function registerCheckTool(server) {
9
+ server.registerTool("check", {
10
+ title: "Ruby Syntax Check",
11
+ description: "Checks a Ruby file for syntax errors using `ruby -c` and returns structured validation results.",
12
+ inputSchema: {
13
+ file: z
14
+ .string()
15
+ .max(INPUT_LIMITS.PATH_MAX)
16
+ .describe("Path to the Ruby file to syntax-check"),
17
+ path: projectPathInput,
18
+ compact: compactInput,
19
+ },
20
+ outputSchema: RubyCheckResultSchema,
21
+ }, async ({ file, path, compact }) => {
22
+ assertNoFlagInjection(file, "file");
23
+ const cwd = path || process.cwd();
24
+ const result = await rubyCmd(["-c", file], cwd);
25
+ const data = parseCheckOutput(file, result.stdout, result.stderr, result.exitCode);
26
+ const rawOutput = (result.stdout + "\n" + result.stderr).trim();
27
+ return compactDualOutput(data, rawOutput, formatCheck, compactCheckMap, formatCheckCompact, compact === false);
28
+ });
29
+ }
30
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/tools/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,0DAA0D;AAC1D,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,MAAM,CAAC,YAAY,CACjB,OAAO,EACP;QACE,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,iGAAiG;QACnG,WAAW,EAAE;YACX,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC;iBAC1B,QAAQ,CAAC,uCAAuC,CAAC;YACpD,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,YAAY;SACtB;QACD,YAAY,EAAE,qBAAqB;KACpC,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEpC,MAAM,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAEhD,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnF,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,OAAO,iBAAiB,CACtB,IAAI,EACJ,SAAS,EACT,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,OAAO,KAAK,KAAK,CAClB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers the `gem-install` tool on the given MCP server. */
3
+ export declare function registerGemInstallTool(server: McpServer): void;
4
+ //# sourceMappingURL=gem-install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gem-install.d.ts","sourceRoot":"","sources":["../../src/tools/gem-install.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiBzE,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QAiDvD"}
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ import { compactDualOutput, assertNoFlagInjection, INPUT_LIMITS, compactInput, projectPathInput, } from "@paretools/shared";
3
+ import { gemCmd } from "../lib/ruby-runner.js";
4
+ import { parseGemInstallOutput } from "../lib/parsers.js";
5
+ import { formatGemInstall, compactGemInstallMap, formatGemInstallCompact, } from "../lib/formatters.js";
6
+ import { GemInstallResultSchema } from "../schemas/index.js";
7
+ /** Registers the `gem-install` tool on the given MCP server. */
8
+ export function registerGemInstallTool(server) {
9
+ server.registerTool("gem-install", {
10
+ title: "Gem Install",
11
+ description: "Installs a Ruby gem using `gem install` and returns structured output with success status and duration.",
12
+ inputSchema: {
13
+ gem: z.string().max(INPUT_LIMITS.SHORT_STRING_MAX).describe("Name of the gem to install"),
14
+ version: z
15
+ .string()
16
+ .max(INPUT_LIMITS.SHORT_STRING_MAX)
17
+ .optional()
18
+ .describe("Specific version to install (e.g., '1.2.3')"),
19
+ path: projectPathInput,
20
+ compact: compactInput,
21
+ },
22
+ outputSchema: GemInstallResultSchema,
23
+ }, async ({ gem, version, path, compact }) => {
24
+ assertNoFlagInjection(gem, "gem");
25
+ if (version)
26
+ assertNoFlagInjection(version, "version");
27
+ const cwd = path || process.cwd();
28
+ const cmdArgs = ["install", gem];
29
+ if (version)
30
+ cmdArgs.push("--version", version);
31
+ const start = Date.now();
32
+ const result = await gemCmd(cmdArgs, cwd);
33
+ const duration = Date.now() - start;
34
+ const data = parseGemInstallOutput(gem, result.stdout, result.stderr, result.exitCode, duration);
35
+ const rawOutput = (result.stdout + "\n" + result.stderr).trim();
36
+ return compactDualOutput(data, rawOutput, formatGemInstall, compactGemInstallMap, formatGemInstallCompact, compact === false);
37
+ });
38
+ }
39
+ //# sourceMappingURL=gem-install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gem-install.js","sourceRoot":"","sources":["../../src/tools/gem-install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,oBAA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I,GAAG,qBAAqB,CAChC,GAAG,EACH,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,QAAQ,EACf,QAAQ,CACT,CAAC;QACF,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,OAAO,iBAAiB,CACtB,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,KAAK,KAAK,CAClB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers the `gem-list` tool on the given MCP server. */
3
+ export declare function registerGemListTool(server: McpServer): void;
4
+ //# sourceMappingURL=gem-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gem-list.d.ts","sourceRoot":"","sources":["../../src/tools/gem-list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAazE,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,QA+CpD"}
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ import { compactDualOutput, assertNoFlagInjection, INPUT_LIMITS, compactInput, projectPathInput, } from "@paretools/shared";
3
+ import { gemCmd } from "../lib/ruby-runner.js";
4
+ import { parseGemList } from "../lib/parsers.js";
5
+ import { formatGemList, compactGemListMap, formatGemListCompact } from "../lib/formatters.js";
6
+ import { GemListResultSchema } from "../schemas/index.js";
7
+ /** Registers the `gem-list` tool on the given MCP server. */
8
+ export function registerGemListTool(server) {
9
+ server.registerTool("gem-list", {
10
+ title: "Gem List",
11
+ description: "Lists installed Ruby gems with version information. Returns structured JSON with gem names and versions.",
12
+ inputSchema: {
13
+ filter: z
14
+ .string()
15
+ .max(INPUT_LIMITS.SHORT_STRING_MAX)
16
+ .optional()
17
+ .describe("Regex filter on gem names (client-side)"),
18
+ path: projectPathInput,
19
+ compact: compactInput,
20
+ },
21
+ outputSchema: GemListResultSchema,
22
+ }, async ({ filter, path, compact }) => {
23
+ if (filter)
24
+ assertNoFlagInjection(filter, "filter");
25
+ const cwd = path || process.cwd();
26
+ const result = await gemCmd(["list", "--local"], cwd);
27
+ let data = parseGemList(result.stdout);
28
+ // Apply client-side filter if provided
29
+ if (filter) {
30
+ const re = new RegExp(filter);
31
+ data = {
32
+ gems: data.gems.filter((g) => re.test(g.name)),
33
+ total: 0,
34
+ };
35
+ data.total = data.gems.length;
36
+ }
37
+ const rawOutput = result.stdout.trim();
38
+ return compactDualOutput(data, rawOutput, formatGemList, compactGemListMap, formatGemListCompact, compact === false);
39
+ });
40
+ }
41
+ //# sourceMappingURL=gem-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gem-list.js","sourceRoot":"","sources":["../../src/tools/gem-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,6DAA6D;AAC7D,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,YAAY,CACjB,UAAU,EACV;QACE,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,0GAA0G;QAC5G,WAAW,EAAE;YACX,MAAM,EAAE,CAAC;iBACN,MAAM,EAAE;iBACR,GA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ated` tool on the given MCP server. */
3
+ export declare function registerGemOutdatedTool(server: McpServer): void;
4
+ //# sourceMappingURL=gem-outdated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gem-outdated.d.ts","sourceRoot":"","sources":["../../src/tools/gem-outdated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWzE,iEAAiE;AACjE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,QA4BxD"}
@@ -0,0 +1,24 @@
1
+ import { compactDualOutput, compactInput, projectPathInput } from "@paretools/shared";
2
+ import { gemCmd } from "../lib/ruby-runner.js";
3
+ import { parseGemOutdated } from "../lib/parsers.js";
4
+ import { formatGemOutdated, compactGemOutdatedMap, formatGemOutdatedCompact, } from "../lib/formatters.js";
5
+ import { GemOutdatedResultSchema } from "../schemas/index.js";
6
+ /** Registers the `gem-outdated` tool on the given MCP server. */
7
+ export function registerGemOutdatedTool(server) {
8
+ server.registerTool("gem-outdated", {
9
+ title: "Gem Outdated",
10
+ description: "Lists outdated Ruby gems showing current and latest available versions.",
11
+ inputSchema: {
12
+ path: projectPathInput,
13
+ compact: compactInput,
14
+ },
15
+ outputSchema: GemOutdatedResultSchema,
16
+ }, async ({ path, compact }) => {
17
+ const cwd = path || process.cwd();
18
+ const result = await gemCmd(["outdated"], cwd);
19
+ const data = parseGemOutdated(result.stdout);
20
+ const rawOutput = result.stdout.trim();
21
+ return compactDualOutput(data, rawOutput, formatGemOutdated, compactGemOutdatedMap, formatGemOutdatedCompact, compact === false);
22
+ });
23
+ }
24
+ //# sourceMappingURL=gem-outdated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gem-outdated.js","sourceRoot":"","sources":["../../src/tools/gem-outdated.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,iEAAiE;AACjE,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,YAAY,CACjB,cAAc,EACd;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,yEAAyE;QACtF,WAAW,EAAE;YACX,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,YAAY;SACtB;QACD,YAAY,EAAE,uBAAuB;KACtC,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1B,MAAM,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,CAAC;QAE/C,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACvC,OAAO,iBAAiB,CACtB,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,OAAO,KAAK,KAAK,CAClB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers all Ruby tools on the given MCP server, filtered by policy. */
3
+ export declare function registerAllTools(server: McpServer): void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAWzE,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,QAUjD"}
@@ -0,0 +1,30 @@
1
+ import { shouldRegisterTool } from "@paretools/shared";
2
+ import { registerRunTool } from "./run.js";
3
+ import { registerCheckTool } from "./check.js";
4
+ import { registerGemListTool } from "./gem-list.js";
5
+ import { registerGemInstallTool } from "./gem-install.js";
6
+ import { registerGemOutdatedTool } from "./gem-outdated.js";
7
+ import { registerBundleInstallTool } from "./bundle-install.js";
8
+ import { registerBundleExecTool } from "./bundle-exec.js";
9
+ import { registerBundleCheckTool } from "./bundle-check.js";
10
+ /** Registers all Ruby tools on the given MCP server, filtered by policy. */
11
+ export function registerAllTools(server) {
12
+ const s = (name) => shouldRegisterTool("ruby", name);
13
+ if (s("run"))
14
+ registerRunTool(server);
15
+ if (s("check"))
16
+ registerCheckTool(server);
17
+ if (s("gem-list"))
18
+ registerGemListTool(server);
19
+ if (s("gem-install"))
20
+ registerGemInstallTool(server);
21
+ if (s("gem-outdated"))
22
+ registerGemOutdatedTool(server);
23
+ if (s("bundle-install"))
24
+ registerBundleInstallTool(server);
25
+ if (s("bundle-exec"))
26
+ registerBundleExecTool(server);
27
+ if (s("bundle-check"))
28
+ registerBundleCheckTool(server);
29
+ }
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7D,IAAI,CAAC,CAAC,KAAK,CAAC;QAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,CAAC,OAAO,CAAC;QAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,CAAC,UAAU,CAAC;QAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC/C,IAAI,CAAC,CAAC,aAAa,CAAC;QAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrD,IAAI,CAAC,CAAC,cAAc,CAAC;QAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACvD,IAAI,CAAC,CAAC,gBAAgB,CAAC;QAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,CAAC,CAAC,aAAa,CAAC;QAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrD,IAAI,CAAC,CAAC,cAAc,CAAC;QAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ /** Registers the `run` tool on the given MCP server. */
3
+ export declare function registerRunTool(server: McpServer): void;
4
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAazE,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,QA8DhD"}