@crediolabs/policy-builder-mcp 0.1.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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ // apps/policy-builder-mcp/bin/server.ts - CLI entry point selecting the transport.
3
+ //
4
+ // Usage:
5
+ // policy-builder-mcp (stdio - default; Claude Desktop / local agents)
6
+ // policy-builder-mcp --http (Streamable HTTP transport; localhost:PORT)
7
+ // policy-builder-mcp --http-port N (override the HTTP port; default 3001)
8
+ import { startHttpServer } from "../src/transports/http.js";
9
+ import { startStdioServer } from "../src/transports/stdio.js";
10
+ const args = process.argv.slice(2);
11
+ const wantsHttp = args.includes('--http');
12
+ let port = 3001;
13
+ const portIdx = args.indexOf('--http-port');
14
+ if (portIdx >= 0 && args[portIdx + 1]) {
15
+ const n = Number(args[portIdx + 1]);
16
+ if (Number.isInteger(n) && n > 0 && n < 65536)
17
+ port = n;
18
+ }
19
+ if (wantsHttp) {
20
+ await startHttpServer({ port });
21
+ }
22
+ else {
23
+ await startStdioServer();
24
+ }
@@ -0,0 +1,7 @@
1
+ export { RecordTransactionInputSchema, RecordTransactionToolShape, SynthesizePolicyInputSchema, SynthesizePolicyMandateInputSchema, SynthesizePolicyRecordingInputSchema, SynthesizePolicyToolShape, } from './schemas.ts';
2
+ export { createMcpServer, registerTools } from './server.ts';
3
+ export type { McpToolError, McpToolResult } from './tools/result.ts';
4
+ export { mcpErrorFromCore, mcpResultFromCore } from './tools/result.ts';
5
+ export { type RunRecordTransactionInput, type RunSynthesizePolicyInput, runRecordTransaction, runSynthesizePolicy, } from './tools/run.ts';
6
+ export { startHttpServer } from './transports/http.ts';
7
+ export { startStdioServer } from './transports/stdio.ts';
@@ -0,0 +1,7 @@
1
+ // apps/policy-builder-mcp/src/index.ts - public re-exports for the MCP server package.
2
+ export { RecordTransactionInputSchema, RecordTransactionToolShape, SynthesizePolicyInputSchema, SynthesizePolicyMandateInputSchema, SynthesizePolicyRecordingInputSchema, SynthesizePolicyToolShape, } from "./schemas.js";
3
+ export { createMcpServer, registerTools } from "./server.js";
4
+ export { mcpErrorFromCore, mcpResultFromCore } from "./tools/result.js";
5
+ export { runRecordTransaction, runSynthesizePolicy, } from "./tools/run.js";
6
+ export { startHttpServer } from "./transports/http.js";
7
+ export { startStdioServer } from "./transports/stdio.js";