@panproto/mcp-server 0.5.0 → 0.7.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/server.js CHANGED
@@ -9,12 +9,13 @@ import { registerParseTools } from "./tools/parse.js";
9
9
  import { registerExprTools } from "./tools/expr.js";
10
10
  import { registerVcsTools } from "./tools/vcs.js";
11
11
  import { registerEnrichTools } from "./tools/enrich.js";
12
+ import { registerTheoryTools } from "./tools/theory.js";
12
13
  import { registerResources } from "./resources/protocols.js";
13
14
  import { registerPrompts } from "./prompts/migration-plan.js";
14
15
  export async function createServer() {
15
16
  const server = new McpServer({
16
17
  name: "panproto",
17
- version: "0.4.0",
18
+ version: "0.7.0",
18
19
  });
19
20
  // Register all tool groups
20
21
  registerSchemaTools(server);
@@ -26,6 +27,7 @@ export async function createServer() {
26
27
  registerExprTools(server);
27
28
  registerVcsTools(server);
28
29
  registerEnrichTools(server);
30
+ registerTheoryTools(server);
29
31
  // Register resources and prompts
30
32
  registerResources(server);
31
33
  registerPrompts(server);
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,g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M,EAAE,KAAK,IAAI,EAAE;YACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;YAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAClC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerTheoryTools(server: McpServer): void;
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ import { execCli, textContent, withErrorBoundary } from "../cli.js";
3
+ export function registerTheoryTools(server) {
4
+ server.tool("panproto_theory_validate", "Validate a theory document (load + typecheck)", {
5
+ file: z.string().describe("Path to the theory document (.ncl, .json, .yaml)"),
6
+ }, withErrorBoundary(async ({ file }) => {
7
+ const result = await execCli("theory", "validate", file);
8
+ return textContent(result);
9
+ }));
10
+ server.tool("panproto_theory_compile", "Compile a theory document and return resulting theories, morphisms, and protocols", {
11
+ file: z.string().describe("Path to the theory document"),
12
+ json: z.boolean().optional().describe("Output as JSON"),
13
+ }, withErrorBoundary(async ({ file, json }) => {
14
+ const args = ["theory", "compile"];
15
+ if (json)
16
+ args.push("--json");
17
+ args.push(file);
18
+ const result = await execCli(...args);
19
+ return textContent(result);
20
+ }));
21
+ server.tool("panproto_theory_compile_dir", "Compile all theory documents in a directory", {
22
+ dir: z.string().describe("Path to the directory of theory files"),
23
+ }, withErrorBoundary(async ({ dir }) => {
24
+ const result = await execCli("theory", "compile-dir", dir);
25
+ return textContent(result);
26
+ }));
27
+ server.tool("panproto_theory_check_morphism", "Validate a theory morphism document", {
28
+ file: z.string().describe("Path to the morphism document"),
29
+ }, withErrorBoundary(async ({ file }) => {
30
+ const result = await execCli("theory", "check-morphism", file);
31
+ return textContent(result);
32
+ }));
33
+ server.tool("panproto_theory_recompose", "Replay a composition and print the resulting theory", {
34
+ file: z.string().describe("Path to the composition document"),
35
+ }, withErrorBoundary(async ({ file }) => {
36
+ const result = await execCli("theory", "recompose", file);
37
+ return textContent(result);
38
+ }));
39
+ }
40
+ //# sourceMappingURL=theory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theory.js","sourceRoot":"","sources":["../../src/tools/theory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEpE,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACT,0BAA0B,EAC1B,+CAA+C,EAC/C;QACE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;KAC9E,EACD,iBAAiB,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACnC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QACzD,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,yBAAyB,EACzB,mFAAmF,EACnF;QACE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QACxD,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;KACxD,EACD,iBAAiB,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;QACzC,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QACnC,IAAI,IAAI;YAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;QACtC,OAAO,W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0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "MCP server exposing panproto schema migration operations",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@modelcontextprotocol/sdk": "^1.0.0",
23
- "@panproto/core": "^0.26.0"
23
+ "@panproto/core": "^0.29.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "typescript": "^5.7.0",