@paretools/process 0.8.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dave London
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { registerAllTools } from "./tools/index.js";
5
+ const server = new McpServer({ name: "@paretools/process", version: "0.8.1" }, {
6
+ instructions: "Structured process execution (run). Runs commands with timeout, environment, and signal support. Returns typed JSON with exit code, stdout, stderr, duration, and timeout status. Use instead of running arbitrary commands in the terminal.",
7
+ });
8
+ registerAllTools(server);
9
+ const transport = new StdioServerTransport();
10
+ await server.connect(transport);
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,EAAE,EAChD;IACE,YAAY,EACV,8OAA8O;CACjP,CACF,CAAC;AAEF,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEzB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ProcessRunResult } from "../schemas/index.js";
2
+ /** Formats structured run results into a human-readable output summary. */
3
+ export declare function formatRun(data: ProcessRunResult): string;
4
+ /** Compact run: command, exitCode, success, duration, timedOut, signal. Drop stdout/stderr. */
5
+ export interface ProcessRunCompact {
6
+ [key: string]: unknown;
7
+ command: string;
8
+ success: boolean;
9
+ exitCode: number;
10
+ duration: number;
11
+ timedOut: boolean;
12
+ signal?: string;
13
+ }
14
+ export declare function compactRunMap(data: ProcessRunResult): ProcessRunCompact;
15
+ export declare function formatRunCompact(data: ProcessRunCompact): string;
16
+ //# sourceMappingURL=formatters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAgBxD;AAID,+FAA+F;AAC/F,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,CASvE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAMhE"}
@@ -0,0 +1,38 @@
1
+ // ── Full formatters ──────────────────────────────────────────────────
2
+ /** Formats structured run results into a human-readable output summary. */
3
+ export function formatRun(data) {
4
+ const lines = [];
5
+ if (data.timedOut) {
6
+ lines.push(`${data.command}: timed out after ${data.duration}ms${data.signal ? ` (${data.signal})` : ""}.`);
7
+ }
8
+ else if (data.success) {
9
+ lines.push(`${data.command}: success (${data.duration}ms).`);
10
+ }
11
+ else {
12
+ lines.push(`${data.command}: exit code ${data.exitCode} (${data.duration}ms).`);
13
+ }
14
+ if (data.stdout)
15
+ lines.push(data.stdout);
16
+ if (data.stderr)
17
+ lines.push(data.stderr);
18
+ return lines.join("\n");
19
+ }
20
+ export function compactRunMap(data) {
21
+ return {
22
+ command: data.command,
23
+ success: data.success,
24
+ exitCode: data.exitCode,
25
+ duration: data.duration,
26
+ timedOut: data.timedOut,
27
+ signal: data.signal,
28
+ };
29
+ }
30
+ export function formatRunCompact(data) {
31
+ if (data.timedOut) {
32
+ return `${data.command}: timed out after ${data.duration}ms${data.signal ? ` (${data.signal})` : ""}.`;
33
+ }
34
+ if (data.success)
35
+ return `${data.command}: success (${data.duration}ms).`;
36
+ return `${data.command}: exit code ${data.exitCode} (${data.duration}ms).`;
37
+ }
38
+ //# sourceMappingURL=formatters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAEA,wEAAwE;AAExE,2EAA2E;AAC3E,MAAM,UAAU,SAAS,CAAC,IAAsB;IAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClB,KAAK,CAAC,IAAI,CACR,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAChG,CAAC;IACJ,CAAC;SAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,cAAc,IAAI,CAAC,QAAQ,MAAM,CAAC,CAAC;IAC/D,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,eAAe,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,MAAM,CAAC,CAAC;IAClF,CAAC;IAED,IAAI,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAeD,MAAM,UAAU,aAAa,CAAC,IAAsB;IAClD,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAuB;IACtD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClB,OAAO,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IACzG,CAAC;IACD,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,GAAG,IAAI,CAAC,OAAO,cAAc,IAAI,CAAC,QAAQ,MAAM,CAAC;IAC1E,OAAO,GAAG,IAAI,CAAC,OAAO,eAAe,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,MAAM,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ProcessRunResult } from "../schemas/index.js";
2
+ /**
3
+ * Parses the output of a process run into structured result data.
4
+ */
5
+ export declare function parseRunOutput(command: string, stdout: string, stderr: string, exitCode: number, duration: number, timedOut: boolean, signal?: string): ProcessRunResult;
6
+ //# sourceMappingURL=parsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../src/lib/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,gBAAgB,CAWlB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Parses the output of a process run into structured result data.
3
+ */
4
+ export function parseRunOutput(command, stdout, stderr, exitCode, duration, timedOut, signal) {
5
+ return {
6
+ command,
7
+ success: exitCode === 0 && !timedOut,
8
+ exitCode,
9
+ stdout: stdout.trimEnd() || undefined,
10
+ stderr: stderr.trimEnd() || undefined,
11
+ duration,
12
+ timedOut,
13
+ signal: signal || undefined,
14
+ };
15
+ }
16
+ //# sourceMappingURL=parsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../src/lib/parsers.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAe,EACf,MAAc,EACd,MAAc,EACd,QAAgB,EAChB,QAAgB,EAChB,QAAiB,EACjB,MAAe;IAEf,OAAO;QACL,OAAO;QACP,OAAO,EAAE,QAAQ,KAAK,CAAC,IAAI,CAAC,QAAQ;QACpC,QAAQ;QACR,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI,SAAS;QACrC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI,SAAS;QACrC,QAAQ;QACR,QAAQ;QACR,MAAM,EAAE,MAAM,IAAI,SAAS;KAC5B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ /** Zod schema for structured process run output with stdout, stderr, exit code, duration, and timeout/signal info. */
3
+ export declare const ProcessRunResultSchema: z.ZodObject<{
4
+ command: z.ZodString;
5
+ exitCode: z.ZodNumber;
6
+ success: z.ZodBoolean;
7
+ stdout: z.ZodOptional<z.ZodString>;
8
+ stderr: z.ZodOptional<z.ZodString>;
9
+ duration: z.ZodNumber;
10
+ timedOut: z.ZodBoolean;
11
+ signal: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ export type ProcessRunResult = z.infer<typeof ProcessRunResultSchema>;
14
+ //# 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;AAExB,sHAAsH;AACtH,eAAO,MAAM,sBAAsB;;;;;;;;;iBASjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ /** Zod schema for structured process run output with stdout, stderr, exit code, duration, and timeout/signal info. */
3
+ export const ProcessRunResultSchema = z.object({
4
+ command: z.string(),
5
+ exitCode: z.number(),
6
+ success: z.boolean(),
7
+ stdout: z.string().optional(),
8
+ stderr: z.string().optional(),
9
+ duration: z.number(),
10
+ timedOut: z.boolean(),
11
+ signal: z.string().optional(),
12
+ });
13
+ //# 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,sHAAsH;AACtH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,OAAO,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;IACrB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerAllTools(server: McpServer): void;
3
+ //# 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;AAIzE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,QAGjD"}
@@ -0,0 +1,8 @@
1
+ import { shouldRegisterTool } from "@paretools/shared";
2
+ import { registerRunTool } from "./run.js";
3
+ export function registerAllTools(server) {
4
+ const s = (name) => shouldRegisterTool("process", name);
5
+ if (s("run"))
6
+ registerRunTool(server);
7
+ }
8
+ //# 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;AAE3C,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAChE,IAAI,CAAC,CAAC,KAAK,CAAC;QAAE,eAAe,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerRunTool(server: McpServer): void;
3
+ //# 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;AAMzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,QAqGhD"}
@@ -0,0 +1,84 @@
1
+ import { z } from "zod";
2
+ import { compactDualOutput, INPUT_LIMITS, run } from "@paretools/shared";
3
+ import { parseRunOutput } from "../lib/parsers.js";
4
+ import { formatRun, compactRunMap, formatRunCompact } from "../lib/formatters.js";
5
+ import { ProcessRunResultSchema } from "../schemas/index.js";
6
+ export function registerRunTool(server) {
7
+ server.registerTool("run", {
8
+ title: "Process Run",
9
+ description: "Runs a command and returns structured output (stdout, stderr, exit code, duration, timeout status). Use instead of running commands directly in the terminal.",
10
+ inputSchema: {
11
+ command: z
12
+ .string()
13
+ .max(INPUT_LIMITS.SHORT_STRING_MAX)
14
+ .describe("Command to run (e.g., 'node', 'python', 'echo')"),
15
+ args: z
16
+ .array(z.string().max(INPUT_LIMITS.STRING_MAX))
17
+ .max(INPUT_LIMITS.ARRAY_MAX)
18
+ .optional()
19
+ .default([])
20
+ .describe("Arguments to pass to the command"),
21
+ cwd: z
22
+ .string()
23
+ .max(INPUT_LIMITS.PATH_MAX)
24
+ .optional()
25
+ .describe("Working directory (default: cwd)"),
26
+ timeout: z
27
+ .number()
28
+ .int()
29
+ .min(1)
30
+ .max(600_000)
31
+ .optional()
32
+ .default(60_000)
33
+ .describe("Timeout in milliseconds (default: 60000, max: 600000)"),
34
+ env: z
35
+ .record(z.string(), z.string().max(INPUT_LIMITS.STRING_MAX))
36
+ .optional()
37
+ .describe("Additional environment variables as key-value pairs"),
38
+ compact: z
39
+ .boolean()
40
+ .optional()
41
+ .default(true)
42
+ .describe("Auto-compact when structured output exceeds raw CLI tokens. Set false to always get full schema."),
43
+ },
44
+ outputSchema: ProcessRunResultSchema,
45
+ }, async ({ command, args, cwd, timeout, env, compact }) => {
46
+ const workDir = cwd || process.cwd();
47
+ const timeoutMs = timeout ?? 60_000;
48
+ const start = Date.now();
49
+ let timedOut = false;
50
+ let signal;
51
+ let result;
52
+ try {
53
+ result = await run(command, args ?? [], {
54
+ cwd: workDir,
55
+ timeout: timeoutMs,
56
+ env: env ? { ...process.env, ...env } : undefined,
57
+ });
58
+ }
59
+ catch (err) {
60
+ const errMsg = err instanceof Error ? err.message : String(err);
61
+ // Detect timeout errors from the shared runner
62
+ if (errMsg.includes("timed out")) {
63
+ timedOut = true;
64
+ // Extract signal from message like "...was killed (SIGTERM)."
65
+ const sigMatch = errMsg.match(/\((\w+)\)/);
66
+ signal = sigMatch?.[1];
67
+ result = {
68
+ exitCode: 124, // Standard timeout exit code
69
+ stdout: "",
70
+ stderr: errMsg,
71
+ };
72
+ }
73
+ else {
74
+ // Re-throw non-timeout errors (command not found, permission denied, etc.)
75
+ throw err;
76
+ }
77
+ }
78
+ const duration = Date.now() - start;
79
+ const data = parseRunOutput(command, result.stdout, result.stderr, result.exitCode, duration, timedOut, signal);
80
+ const rawOutput = (result.stdout + "\n" + result.stderr).trim();
81
+ return compactDualOutput(data, rawOutput, formatRun, compactRunMap, formatRunCompact, compact === false);
82
+ });
83
+ }
84
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/tools/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,UAAU,eAAe,CAAC,MAAiB;IAC/C,MAAM,CAAC,YAAY,CACjB,KAAK,EACL;QACE,KAAK,EAAE,aAAa;QACpB,WAAW,EACT,+JAA+J;QACjK,WAAW,EAAE;YACX,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,GAAG,CAAC,YAAY,CAAC,gBAAgB,CAAC;iBAClC,QAAQ,CAAC,iDA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,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,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,OAAO,KAAK,KAAK,CAClB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@paretools/process",
3
+ "version": "0.8.1",
4
+ "mcpName": "io.github.Dave-London/pare-process",
5
+ "description": "MCP server for running commands with structured output, timeout, and signal support",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "mcp",
9
+ "mcp-server",
10
+ "model-context-protocol",
11
+ "structured-output",
12
+ "ai",
13
+ "ai-agent",
14
+ "claude",
15
+ "cursor",
16
+ "copilot",
17
+ "token-efficient",
18
+ "devtools",
19
+ "cli",
20
+ "process",
21
+ "command",
22
+ "exec",
23
+ "spawn",
24
+ "shell"
25
+ ],
26
+ "homepage": "https://github.com/Dave-London/Pare/tree/main/packages/server-process",
27
+ "engines": {
28
+ "node": ">=20"
29
+ },
30
+ "type": "module",
31
+ "bin": {
32
+ "pare-process": "./dist/index.js"
33
+ },
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "default": "./dist/index.js"
38
+ }
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/Dave-London/Pare.git",
46
+ "directory": "packages/server-process"
47
+ },
48
+ "files": [
49
+ "dist"
50
+ ],
51
+ "dependencies": {
52
+ "@modelcontextprotocol/sdk": "^1.26.0",
53
+ "zod": "^4.3.6",
54
+ "@paretools/shared": "0.8.1"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^25.2.3",
58
+ "typescript": "^5.7.0",
59
+ "vitest": "^4.0.18",
60
+ "@paretools/tsconfig": "0.0.0"
61
+ },
62
+ "scripts": {
63
+ "build": "tsc",
64
+ "test": "vitest run",
65
+ "test:watch": "vitest",
66
+ "lint": "eslint src/"
67
+ }
68
+ }