@polygraphso/litmus 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/mcp.js +10 -62
  2. package/package.json +2 -2
package/dist/mcp.js CHANGED
@@ -17,14 +17,12 @@ import {
17
17
 
18
18
  // src/mcp.ts
19
19
  import { realpathSync } from "fs";
20
- import { fileURLToPath as fileURLToPath2 } from "url";
20
+ import { fileURLToPath } from "url";
21
21
  import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
22
- import { StdioServerTransport as StdioServerTransport2 } from "@modelcontextprotocol/sdk/server/stdio.js";
22
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
23
23
 
24
24
  // ../mcp/src/index.ts
25
- import { fileURLToPath } from "url";
26
25
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
27
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
28
26
 
29
27
  // ../mcp/src/tools/verify-attestation.ts
30
28
  import { z } from "zod";
@@ -100,58 +98,8 @@ async function resolveUid(serverRef) {
100
98
  }
101
99
  }
102
100
 
103
- // ../mcp/src/index.ts
104
- function buildServer() {
105
- const server = new McpServer(
106
- { name: "polygraph", version: "0.0.0" },
107
- {
108
- instructions: [
109
- "polygraph issues behavioral litmus grades for MCP servers, published",
110
- "onchain. Use `verify_attestation` to read a server's grade before",
111
- "recommending, installing, or paying it. A server with no attestation is",
112
- "unevaluated \u2014 neither safe nor unsafe; say so."
113
- ].join("\n")
114
- }
115
- );
116
- server.registerTool(
117
- VERIFY_TOOL_NAME,
118
- {
119
- title: VERIFY_TOOL_TITLE,
120
- description: VERIFY_TOOL_DESCRIPTION,
121
- inputSchema: verifyInputShape,
122
- annotations: {
123
- title: VERIFY_TOOL_TITLE,
124
- readOnlyHint: true,
125
- destructiveHint: false,
126
- idempotentHint: true,
127
- openWorldHint: true
128
- }
129
- },
130
- handleVerify
131
- );
132
- return server;
133
- }
134
- async function main() {
135
- const server = buildServer();
136
- await server.connect(new StdioServerTransport());
137
- }
138
- var invokedDirectly = (() => {
139
- try {
140
- return process.argv[1] === fileURLToPath(import.meta.url);
141
- } catch {
142
- return false;
143
- }
144
- })();
145
- if (invokedDirectly) {
146
- main().catch((err) => {
147
- process.stderr.write(`polygraph-mcp: fatal: ${err instanceof Error ? err.message : String(err)}
148
- `);
149
- process.exit(1);
150
- });
151
- }
152
-
153
101
  // src/mcp.ts
154
- function buildServer2() {
102
+ function buildServer() {
155
103
  const server = new McpServer2(
156
104
  { name: "polygraph-litmus", version: "0.1.0" },
157
105
  {
@@ -208,23 +156,23 @@ function buildServer2() {
208
156
  );
209
157
  return server;
210
158
  }
211
- async function main2() {
212
- await buildServer2().connect(new StdioServerTransport2());
159
+ async function main() {
160
+ await buildServer().connect(new StdioServerTransport());
213
161
  }
214
- var invokedDirectly2 = (() => {
162
+ var invokedDirectly = (() => {
215
163
  try {
216
- return realpathSync(process.argv[1] ?? "") === fileURLToPath2(import.meta.url);
164
+ return realpathSync(process.argv[1] ?? "") === fileURLToPath(import.meta.url);
217
165
  } catch {
218
166
  return false;
219
167
  }
220
168
  })();
221
- if (invokedDirectly2) {
222
- main2().catch((err) => {
169
+ if (invokedDirectly) {
170
+ main().catch((err) => {
223
171
  process.stderr.write(`polygraphso-litmus-mcp: fatal: ${err instanceof Error ? err.message : String(err)}
224
172
  `);
225
173
  process.exit(1);
226
174
  });
227
175
  }
228
176
  export {
229
- buildServer2 as buildServer
177
+ buildServer
230
178
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polygraphso/litmus",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Behavioral litmus harness for MCP servers — grade a server A–F (tool-output injection, egress, sensitive-data), then hand off to mint an onchain attestation. Ships a CLI and an MCP server with a run_litmus tool for AI agents.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://polygraph.so",
@@ -59,8 +59,8 @@
59
59
  "vitest": "^2.1.0",
60
60
  "@polygraph/core": "0.0.0",
61
61
  "@polygraph/probes": "0.0.0",
62
- "@polygraph/onchain": "0.0.0",
63
62
  "@polygraph/agent": "0.0.0",
63
+ "@polygraph/onchain": "0.0.0",
64
64
  "@polygraph/mcp": "0.0.0",
65
65
  "@polygraph/cli": "0.0.0"
66
66
  },