@paretools/python 0.3.0 → 0.5.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 (39) hide show
  1. package/README.md +43 -10
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/lib/formatters.d.ts +13 -1
  5. package/dist/lib/formatters.d.ts.map +1 -1
  6. package/dist/lib/formatters.js +66 -0
  7. package/dist/lib/formatters.js.map +1 -1
  8. package/dist/lib/parsers.d.ts +13 -1
  9. package/dist/lib/parsers.d.ts.map +1 -1
  10. package/dist/lib/parsers.js +175 -4
  11. package/dist/lib/parsers.js.map +1 -1
  12. package/dist/lib/python-runner.d.ts +3 -0
  13. package/dist/lib/python-runner.d.ts.map +1 -1
  14. package/dist/lib/python-runner.js +9 -0
  15. package/dist/lib/python-runner.js.map +1 -1
  16. package/dist/schemas/index.d.ts +79 -195
  17. package/dist/schemas/index.d.ts.map +1 -1
  18. package/dist/schemas/index.js +49 -4
  19. package/dist/schemas/index.js.map +1 -1
  20. package/dist/tools/black.d.ts +3 -0
  21. package/dist/tools/black.d.ts.map +1 -0
  22. package/dist/tools/black.js +35 -0
  23. package/dist/tools/black.js.map +1 -0
  24. package/dist/tools/index.d.ts.map +1 -1
  25. package/dist/tools/index.js +8 -0
  26. package/dist/tools/index.js.map +1 -1
  27. package/dist/tools/pytest.d.ts +3 -0
  28. package/dist/tools/pytest.d.ts.map +1 -0
  29. package/dist/tools/pytest.js +38 -0
  30. package/dist/tools/pytest.js.map +1 -0
  31. package/dist/tools/uv-install.d.ts +3 -0
  32. package/dist/tools/uv-install.d.ts.map +1 -0
  33. package/dist/tools/uv-install.js +34 -0
  34. package/dist/tools/uv-install.js.map +1 -0
  35. package/dist/tools/uv-run.d.ts +3 -0
  36. package/dist/tools/uv-run.d.ts.map +1 -0
  37. package/dist/tools/uv-run.js +29 -0
  38. package/dist/tools/uv-run.js.map +1 -0
  39. package/package.json +19 -7
@@ -1,113 +1,49 @@
1
1
  import { z } from "zod";
2
+ /** Zod schema for structured pip install output with installed packages and satisfaction status. */
2
3
  export declare const PipInstallSchema: z.ZodObject<{
3
4
  success: z.ZodBoolean;
4
5
  installed: z.ZodArray<z.ZodObject<{
5
6
  name: z.ZodString;
6
7
  version: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- name: string;
9
- version: string;
10
- }, {
11
- name: string;
12
- version: string;
13
- }>, "many">;
8
+ }, z.core.$strip>>;
14
9
  alreadySatisfied: z.ZodBoolean;
15
10
  total: z.ZodNumber;
16
- }, "strip", z.ZodTypeAny, {
17
- success: boolean;
18
- installed: {
19
- name: string;
20
- version: string;
21
- }[];
22
- alreadySatisfied: boolean;
23
- total: number;
24
- }, {
25
- success: boolean;
26
- installed: {
27
- name: string;
28
- version: string;
29
- }[];
30
- alreadySatisfied: boolean;
31
- total: number;
32
- }>;
11
+ }, z.core.$strip>;
33
12
  export type PipInstall = z.infer<typeof PipInstallSchema>;
13
+ /** Zod schema for a single mypy diagnostic with file location, severity, message, and error code. */
34
14
  export declare const MypyDiagnosticSchema: z.ZodObject<{
35
15
  file: z.ZodString;
36
16
  line: z.ZodNumber;
37
17
  column: z.ZodOptional<z.ZodNumber>;
38
- severity: z.ZodEnum<["error", "warning", "note"]>;
18
+ severity: z.ZodEnum<{
19
+ error: "error";
20
+ warning: "warning";
21
+ note: "note";
22
+ }>;
39
23
  message: z.ZodString;
40
24
  code: z.ZodOptional<z.ZodString>;
41
- }, "strip", z.ZodTypeAny, {
42
- message: string;
43
- file: string;
44
- line: number;
45
- severity: "error" | "warning" | "note";
46
- code?: string | undefined;
47
- column?: number | undefined;
48
- }, {
49
- message: string;
50
- file: string;
51
- line: number;
52
- severity: "error" | "warning" | "note";
53
- code?: string | undefined;
54
- column?: number | undefined;
55
- }>;
25
+ }, z.core.$strip>;
26
+ /** Zod schema for structured mypy output including success status, diagnostics, and error/warning counts. */
56
27
  export declare const MypyResultSchema: z.ZodObject<{
57
28
  success: z.ZodBoolean;
58
29
  diagnostics: z.ZodArray<z.ZodObject<{
59
30
  file: z.ZodString;
60
31
  line: z.ZodNumber;
61
32
  column: z.ZodOptional<z.ZodNumber>;
62
- severity: z.ZodEnum<["error", "warning", "note"]>;
33
+ severity: z.ZodEnum<{
34
+ error: "error";
35
+ warning: "warning";
36
+ note: "note";
37
+ }>;
63
38
  message: z.ZodString;
64
39
  code: z.ZodOptional<z.ZodString>;
65
- }, "strip", z.ZodTypeAny, {
66
- message: string;
67
- file: string;
68
- line: number;
69
- severity: "error" | "warning" | "note";
70
- code?: string | undefined;
71
- column?: number | undefined;
72
- }, {
73
- message: string;
74
- file: string;
75
- line: number;
76
- severity: "error" | "warning" | "note";
77
- code?: string | undefined;
78
- column?: number | undefined;
79
- }>, "many">;
40
+ }, z.core.$strip>>;
80
41
  total: z.ZodNumber;
81
42
  errors: z.ZodNumber;
82
43
  warnings: z.ZodNumber;
83
- }, "strip", z.ZodTypeAny, {
84
- success: boolean;
85
- total: number;
86
- diagnostics: {
87
- message: string;
88
- file: string;
89
- line: number;
90
- severity: "error" | "warning" | "note";
91
- code?: string | undefined;
92
- column?: number | undefined;
93
- }[];
94
- errors: number;
95
- warnings: number;
96
- }, {
97
- success: boolean;
98
- total: number;
99
- diagnostics: {
100
- message: string;
101
- file: string;
102
- line: number;
103
- severity: "error" | "warning" | "note";
104
- code?: string | undefined;
105
- column?: number | undefined;
106
- }[];
107
- errors: number;
108
- warnings: number;
109
- }>;
44
+ }, z.core.$strip>;
110
45
  export type MypyResult = z.infer<typeof MypyResultSchema>;
46
+ /** Zod schema for a single ruff diagnostic with file location, rule code, message, and fixability. */
111
47
  export declare const RuffDiagnosticSchema: z.ZodObject<{
112
48
  file: z.ZodString;
113
49
  line: z.ZodNumber;
@@ -117,25 +53,8 @@ export declare const RuffDiagnosticSchema: z.ZodObject<{
117
53
  code: z.ZodString;
118
54
  message: z.ZodString;
119
55
  fixable: z.ZodBoolean;
120
- }, "strip", z.ZodTypeAny, {
121
- code: string;
122
- message: string;
123
- file: string;
124
- line: number;
125
- column: number;
126
- fixable: boolean;
127
- endLine?: number | undefined;
128
- endColumn?: number | undefined;
129
- }, {
130
- code: string;
131
- message: string;
132
- file: string;
133
- line: number;
134
- column: number;
135
- fixable: boolean;
136
- endLine?: number | undefined;
137
- endColumn?: number | undefined;
138
- }>;
56
+ }, z.core.$strip>;
57
+ /** Zod schema for structured ruff check output with diagnostics, total count, and fixable count. */
139
58
  export declare const RuffResultSchema: z.ZodObject<{
140
59
  diagnostics: z.ZodArray<z.ZodObject<{
141
60
  file: z.ZodString;
@@ -146,113 +65,78 @@ export declare const RuffResultSchema: z.ZodObject<{
146
65
  code: z.ZodString;
147
66
  message: z.ZodString;
148
67
  fixable: z.ZodBoolean;
149
- }, "strip", z.ZodTypeAny, {
150
- code: string;
151
- message: string;
152
- file: string;
153
- line: number;
154
- column: number;
155
- fixable: boolean;
156
- endLine?: number | undefined;
157
- endColumn?: number | undefined;
158
- }, {
159
- code: string;
160
- message: string;
161
- file: string;
162
- line: number;
163
- column: number;
164
- fixable: boolean;
165
- endLine?: number | undefined;
166
- endColumn?: number | undefined;
167
- }>, "many">;
68
+ }, z.core.$strip>>;
168
69
  total: z.ZodNumber;
169
70
  fixable: z.ZodNumber;
170
- }, "strip", z.ZodTypeAny, {
171
- total: number;
172
- diagnostics: {
173
- code: string;
174
- message: string;
175
- file: string;
176
- line: number;
177
- column: number;
178
- fixable: boolean;
179
- endLine?: number | undefined;
180
- endColumn?: number | undefined;
181
- }[];
182
- fixable: number;
183
- }, {
184
- total: number;
185
- diagnostics: {
186
- code: string;
187
- message: string;
188
- file: string;
189
- line: number;
190
- column: number;
191
- fixable: boolean;
192
- endLine?: number | undefined;
193
- endColumn?: number | undefined;
194
- }[];
195
- fixable: number;
196
- }>;
71
+ }, z.core.$strip>;
197
72
  export type RuffResult = z.infer<typeof RuffResultSchema>;
73
+ /** Zod schema for a single pip-audit vulnerability with package name, version, ID, and fix versions. */
198
74
  export declare const PipAuditVulnSchema: z.ZodObject<{
199
75
  name: z.ZodString;
200
76
  version: z.ZodString;
201
77
  id: z.ZodString;
202
78
  description: z.ZodString;
203
- fixVersions: z.ZodArray<z.ZodString, "many">;
204
- }, "strip", z.ZodTypeAny, {
205
- name: string;
206
- version: string;
207
- id: string;
208
- description: string;
209
- fixVersions: string[];
210
- }, {
211
- name: string;
212
- version: string;
213
- id: string;
214
- description: string;
215
- fixVersions: string[];
216
- }>;
79
+ fixVersions: z.ZodArray<z.ZodString>;
80
+ }, z.core.$strip>;
81
+ /** Zod schema for structured pip-audit output with vulnerability list and total count. */
217
82
  export declare const PipAuditResultSchema: z.ZodObject<{
218
83
  vulnerabilities: z.ZodArray<z.ZodObject<{
219
84
  name: z.ZodString;
220
85
  version: z.ZodString;
221
86
  id: z.ZodString;
222
87
  description: z.ZodString;
223
- fixVersions: z.ZodArray<z.ZodString, "many">;
224
- }, "strip", z.ZodTypeAny, {
225
- name: string;
226
- version: string;
227
- id: string;
228
- description: string;
229
- fixVersions: string[];
230
- }, {
231
- name: string;
232
- version: string;
233
- id: string;
234
- description: string;
235
- fixVersions: string[];
236
- }>, "many">;
88
+ fixVersions: z.ZodArray<z.ZodString>;
89
+ }, z.core.$strip>>;
237
90
  total: z.ZodNumber;
238
- }, "strip", z.ZodTypeAny, {
239
- total: number;
240
- vulnerabilities: {
241
- name: string;
242
- version: string;
243
- id: string;
244
- description: string;
245
- fixVersions: string[];
246
- }[];
247
- }, {
248
- total: number;
249
- vulnerabilities: {
250
- name: string;
251
- version: string;
252
- id: string;
253
- description: string;
254
- fixVersions: string[];
255
- }[];
256
- }>;
91
+ }, z.core.$strip>;
257
92
  export type PipAuditResult = z.infer<typeof PipAuditResultSchema>;
93
+ /** Zod schema for a single pytest failure with test name and failure message. */
94
+ export declare const PytestFailureSchema: z.ZodObject<{
95
+ test: z.ZodString;
96
+ message: z.ZodString;
97
+ }, z.core.$strip>;
98
+ /** Zod schema for structured pytest output with pass/fail/error/skip counts and failure details. */
99
+ export declare const PytestResultSchema: z.ZodObject<{
100
+ success: z.ZodBoolean;
101
+ passed: z.ZodNumber;
102
+ failed: z.ZodNumber;
103
+ errors: z.ZodNumber;
104
+ skipped: z.ZodNumber;
105
+ total: z.ZodNumber;
106
+ duration: z.ZodNumber;
107
+ failures: z.ZodArray<z.ZodObject<{
108
+ test: z.ZodString;
109
+ message: z.ZodString;
110
+ }, z.core.$strip>>;
111
+ }, z.core.$strip>;
112
+ export type PytestResult = z.infer<typeof PytestResultSchema>;
113
+ /** Zod schema for structured uv install output with installed packages and count. */
114
+ export declare const UvInstallSchema: z.ZodObject<{
115
+ success: z.ZodBoolean;
116
+ installed: z.ZodArray<z.ZodObject<{
117
+ name: z.ZodString;
118
+ version: z.ZodString;
119
+ }, z.core.$strip>>;
120
+ total: z.ZodNumber;
121
+ duration: z.ZodNumber;
122
+ }, z.core.$strip>;
123
+ export type UvInstall = z.infer<typeof UvInstallSchema>;
124
+ /** Zod schema for structured uv run output with exit code and stdout/stderr. */
125
+ export declare const UvRunSchema: z.ZodObject<{
126
+ exitCode: z.ZodNumber;
127
+ stdout: z.ZodString;
128
+ stderr: z.ZodString;
129
+ success: z.ZodBoolean;
130
+ duration: z.ZodNumber;
131
+ }, z.core.$strip>;
132
+ export type UvRun = z.infer<typeof UvRunSchema>;
133
+ /** Zod schema for structured Black formatter output with file counts and reformat list. */
134
+ export declare const BlackResultSchema: z.ZodObject<{
135
+ filesChanged: z.ZodNumber;
136
+ filesUnchanged: z.ZodNumber;
137
+ filesChecked: z.ZodNumber;
138
+ success: z.ZodBoolean;
139
+ wouldReformat: z.ZodArray<z.ZodString>;
140
+ }, z.core.$strip>;
141
+ export type BlackResult = z.infer<typeof BlackResultSchema>;
258
142
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAA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1
  import { z } from "zod";
2
- // pip install
2
+ /** Zod schema for structured pip install output with installed packages and satisfaction status. */
3
3
  export const PipInstallSchema = z.object({
4
4
  success: z.boolean(),
5
5
  installed: z.array(z.object({
@@ -9,7 +9,7 @@ export const PipInstallSchema = z.object({
9
9
  alreadySatisfied: z.boolean(),
10
10
  total: z.number(),
11
11
  });
12
- // mypy
12
+ /** Zod schema for a single mypy diagnostic with file location, severity, message, and error code. */
13
13
  export const MypyDiagnosticSchema = z.object({
14
14
  file: z.string(),
15
15
  line: z.number(),
@@ -18,6 +18,7 @@ export const MypyDiagnosticSchema = z.object({
18
18
  message: z.string(),
19
19
  code: z.string().optional(),
20
20
  });
21
+ /** Zod schema for structured mypy output including success status, diagnostics, and error/warning counts. */
21
22
  export const MypyResultSchema = z.object({
22
23
  success: z.boolean(),
23
24
  diagnostics: z.array(MypyDiagnosticSchema),
@@ -25,7 +26,7 @@ export const MypyResultSchema = z.object({
25
26
  errors: z.number(),
26
27
  warnings: z.number(),
27
28
  });
28
- // ruff check
29
+ /** Zod schema for a single ruff diagnostic with file location, rule code, message, and fixability. */
29
30
  export const RuffDiagnosticSchema = z.object({
30
31
  file: z.string(),
31
32
  line: z.number(),
@@ -36,12 +37,13 @@ export const RuffDiagnosticSchema = z.object({
36
37
  message: z.string(),
37
38
  fixable: z.boolean(),
38
39
  });
40
+ /** Zod schema for structured ruff check output with diagnostics, total count, and fixable count. */
39
41
  export const RuffResultSchema = z.object({
40
42
  diagnostics: z.array(RuffDiagnosticSchema),
41
43
  total: z.number(),
42
44
  fixable: z.number(),
43
45
  });
44
- // pip audit
46
+ /** Zod schema for a single pip-audit vulnerability with package name, version, ID, and fix versions. */
45
47
  export const PipAuditVulnSchema = z.object({
46
48
  name: z.string(),
47
49
  version: z.string(),
@@ -49,8 +51,51 @@ export const PipAuditVulnSchema = z.object({
49
51
  description: z.string(),
50
52
  fixVersions: z.array(z.string()),
51
53
  });
54
+ /** Zod schema for structured pip-audit output with vulnerability list and total count. */
52
55
  export const PipAuditResultSchema = z.object({
53
56
  vulnerabilities: z.array(PipAuditVulnSchema),
54
57
  total: z.number(),
55
58
  });
59
+ /** Zod schema for a single pytest failure with test name and failure message. */
60
+ export const PytestFailureSchema = z.object({
61
+ test: z.string(),
62
+ message: z.string(),
63
+ });
64
+ /** Zod schema for structured pytest output with pass/fail/error/skip counts and failure details. */
65
+ export const PytestResultSchema = z.object({
66
+ success: z.boolean(),
67
+ passed: z.number(),
68
+ failed: z.number(),
69
+ errors: z.number(),
70
+ skipped: z.number(),
71
+ total: z.number(),
72
+ duration: z.number(),
73
+ failures: z.array(PytestFailureSchema),
74
+ });
75
+ /** Zod schema for structured uv install output with installed packages and count. */
76
+ export const UvInstallSchema = z.object({
77
+ success: z.boolean(),
78
+ installed: z.array(z.object({
79
+ name: z.string(),
80
+ version: z.string(),
81
+ })),
82
+ total: z.number(),
83
+ duration: z.number(),
84
+ });
85
+ /** Zod schema for structured uv run output with exit code and stdout/stderr. */
86
+ export const UvRunSchema = z.object({
87
+ exitCode: z.number(),
88
+ stdout: z.string(),
89
+ stderr: z.string(),
90
+ success: z.boolean(),
91
+ duration: z.number(),
92
+ });
93
+ /** Zod schema for structured Black formatter output with file counts and reformat list. */
94
+ export const BlackResultSchema = z.object({
95
+ filesChanged: z.number(),
96
+ filesUnchanged: z.number(),
97
+ filesChecked: z.number(),
98
+ success: z.boolean(),
99
+ wouldReformat: z.array(z.string()),
100
+ });
56
101
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,cAAc;AACd,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,SAAS,EAAE,CAAC,CAAC,KAAK,CAChB,CAAC,CAAC,MAAM,CAAC;QACP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EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerBlackTool(server: McpServer): void;
3
+ //# sourceMappingURL=black.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"black.d.ts","sourceRoot":"","sources":["../../src/tools/black.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOzE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,QAgClD"}
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+ import { dualOutput } from "@paretools/shared";
3
+ import { black } from "../lib/python-runner.js";
4
+ import { parseBlackOutput } from "../lib/parsers.js";
5
+ import { formatBlack } from "../lib/formatters.js";
6
+ import { BlackResultSchema } from "../schemas/index.js";
7
+ export function registerBlackTool(server) {
8
+ server.registerTool("black", {
9
+ title: "Black Formatter",
10
+ description: "Runs Black code formatter and returns structured results (files changed, unchanged, would reformat). Use instead of running `black` in the terminal.",
11
+ inputSchema: {
12
+ path: z.string().optional().describe("Project root path (default: cwd)"),
13
+ targets: z
14
+ .array(z.string())
15
+ .optional()
16
+ .default(["."])
17
+ .describe('Files or directories to format (default: ["."])'),
18
+ check: z
19
+ .boolean()
20
+ .optional()
21
+ .default(false)
22
+ .describe("Check mode (report without modifying files)"),
23
+ },
24
+ outputSchema: BlackResultSchema,
25
+ }, async ({ path, targets, check }) => {
26
+ const cwd = path || process.cwd();
27
+ const args = [...(targets || ["."])];
28
+ if (check)
29
+ args.push("--check");
30
+ const result = await black(args, cwd);
31
+ const data = parseBlackOutput(result.stdout, result.stderr, result.exitCode);
32
+ return dualOutput(data, formatBlack);
33
+ });
34
+ }
35
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AAK;YAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEhC,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7E,OAAO,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACvC,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -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;AAMzE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,QAKjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUzE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,QASjD"}
@@ -2,10 +2,18 @@ import { registerPipInstallTool } from "./pip-install.js";
2
2
  import { registerMypyTool } from "./mypy.js";
3
3
  import { registerRuffTool } from "./ruff.js";
4
4
  import { registerPipAuditTool } from "./pip-audit.js";
5
+ import { registerPytestTool } from "./pytest.js";
6
+ import { registerUvInstallTool } from "./uv-install.js";
7
+ import { registerUvRunTool } from "./uv-run.js";
8
+ import { registerBlackTool } from "./black.js";
5
9
  export function registerAllTools(server) {
6
10
  registerPipInstallTool(server);
7
11
  registerMypyTool(server);
8
12
  registerRuffTool(server);
9
13
  registerPipAuditTool(server);
14
+ registerPytestTool(server);
15
+ registerUvInstallTool(server);
16
+ registerUvRunTool(server);
17
+ registerBlackTool(server);
10
18
  }
11
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/B,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/B,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC3B,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerPytestTool(server: McpServer): void;
3
+ //# sourceMappingURL=pytest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pytest.d.ts","sourceRoot":"","sources":["../../src/tools/pytest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOzE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,QAiCnD"}
@@ -0,0 +1,38 @@
1
+ import { z } from "zod";
2
+ import { dualOutput } from "@paretools/shared";
3
+ import { pytest } from "../lib/python-runner.js";
4
+ import { parsePytestOutput } from "../lib/parsers.js";
5
+ import { formatPytest } from "../lib/formatters.js";
6
+ import { PytestResultSchema } from "../schemas/index.js";
7
+ export function registerPytestTool(server) {
8
+ server.registerTool("pytest", {
9
+ title: "pytest",
10
+ description: "Runs pytest and returns structured test results (passed, failed, errors, skipped, failures). Use instead of running `pytest` in the terminal.",
11
+ inputSchema: {
12
+ path: z.string().optional().describe("Project root path (default: cwd)"),
13
+ targets: z
14
+ .array(z.string())
15
+ .optional()
16
+ .describe("Test files or directories to run (default: auto-discover)"),
17
+ markers: z.string().optional().describe('Pytest marker expression (e.g. "not slow")'),
18
+ verbose: z.boolean().optional().default(false).describe("Enable verbose output"),
19
+ exitFirst: z.boolean().optional().default(false).describe("Stop on first failure (-x)"),
20
+ },
21
+ outputSchema: PytestResultSchema,
22
+ }, async ({ path, targets, markers, verbose, exitFirst }) => {
23
+ const cwd = path || process.cwd();
24
+ const args = ["--tb=short", "-q"];
25
+ if (verbose)
26
+ args.splice(args.indexOf("-q"), 1, "-v");
27
+ if (exitFirst)
28
+ args.push("-x");
29
+ if (markers)
30
+ args.push("-m", markers);
31
+ if (targets && targets.length > 0)
32
+ args.push(...targets);
33
+ const result = await pytest(args, cwd);
34
+ const data = parsePytestOutput(result.stdout, result.stderr, result.exitCode);
35
+ return dualOutput(data, formatPytest);
36
+ });
37
+ }
38
+ //# sourceMappingURL=pytest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pytest.js","sourceRoot":"","sources":["../../src/tools/pytest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,MAAM,CAAC,YAAY,CACjB,QAAQ,EACR;QACE,KAAK,EAAE,QAAQ;QACf,WAAW,EACT,+IAA+I;QACjJ,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;YACxE,OAAO,EAAE,CAAC;iBACP,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;iBACjB,QAAQ,EAAE;iBACV,QAAQ,CAAC,2DAA2D,CAAC;YACxE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;YACrF,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;YAChF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;SACxF;QACD,YAAY,EAAE,kBAAkB;KACjC,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;QACvD,MAAM,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QAElC,IAAI,OAAO;YAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QACtD,IAAI,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,OAAO;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtC,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;QAEzD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC9E,OAAO,UAAU,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerUvInstallTool(server: McpServer): void;
3
+ //# sourceMappingURL=uv-install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uv-install.d.ts","sourceRoot":"","sources":["../../src/tools/uv-install.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,QA+BtD"}
@@ -0,0 +1,34 @@
1
+ import { z } from "zod";
2
+ import { dualOutput } from "@paretools/shared";
3
+ import { uv } from "../lib/python-runner.js";
4
+ import { parseUvInstall } from "../lib/parsers.js";
5
+ import { formatUvInstall } from "../lib/formatters.js";
6
+ import { UvInstallSchema } from "../schemas/index.js";
7
+ export function registerUvInstallTool(server) {
8
+ server.registerTool("uv-install", {
9
+ title: "uv Install",
10
+ description: "Runs uv pip install and returns a structured summary of installed packages. Use instead of running `uv pip install` in the terminal.",
11
+ inputSchema: {
12
+ path: z.string().optional().describe("Working directory (default: cwd)"),
13
+ packages: z.array(z.string()).optional().describe("Packages to install"),
14
+ requirements: z.string().optional().describe("Path to requirements file"),
15
+ },
16
+ outputSchema: UvInstallSchema,
17
+ }, async ({ path, packages, requirements }) => {
18
+ const cwd = path || process.cwd();
19
+ const args = ["pip", "install"];
20
+ if (requirements) {
21
+ args.push("-r", requirements);
22
+ }
23
+ else if (packages && packages.length > 0) {
24
+ args.push(...packages);
25
+ }
26
+ else {
27
+ args.push("-r", "requirements.txt");
28
+ }
29
+ const result = await uv(args, cwd);
30
+ const data = parseUvInstall(result.stdout, result.stderr, result.exitCode);
31
+ return dualOutput(data, formatUvInstall);
32
+ });
33
+ }
34
+ //# sourceMappingURL=uv-install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uv-install.js","sourceRoot":"","sources":["../../src/tools/uv-install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,yBAAyB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;A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AAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAC3C,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerUvRunTool(server: McpServer): void;
3
+ //# sourceMappingURL=uv-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uv-run.d.ts","sourceRoot":"","sources":["../../src/tools/uv-run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOzE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,QA4BlD"}