conductor-node-mcp 14.23.7 → 14.24.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/README.md +10 -7
- package/bridge.d.mts +11 -0
- package/bridge.d.mts.map +1 -0
- package/bridge.d.ts +11 -0
- package/bridge.d.ts.map +1 -0
- package/bridge.js +92 -0
- package/bridge.js.map +1 -0
- package/bridge.mjs +89 -0
- package/bridge.mjs.map +1 -0
- package/code-tool-paths.cjs +6 -0
- package/code-tool-paths.cjs.map +1 -1
- package/code-tool-paths.d.cts +1 -0
- package/code-tool-paths.d.cts.map +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +4 -3
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +3 -2
- package/code-tool.mjs.map +1 -1
- package/deno-bootstrap/index.ts +72 -0
- package/deno-http-worker/DenoHTTPWorker.d.mts +96 -0
- package/deno-http-worker/DenoHTTPWorker.d.mts.map +1 -0
- package/deno-http-worker/DenoHTTPWorker.d.ts +96 -0
- package/deno-http-worker/DenoHTTPWorker.d.ts.map +1 -0
- package/deno-http-worker/DenoHTTPWorker.js +310 -0
- package/deno-http-worker/DenoHTTPWorker.js.map +1 -0
- package/deno-http-worker/DenoHTTPWorker.mjs +302 -0
- package/deno-http-worker/DenoHTTPWorker.mjs.map +1 -0
- package/deno-http-worker/index.d.mts +2 -0
- package/deno-http-worker/index.d.mts.map +1 -0
- package/deno-http-worker/index.d.ts +2 -0
- package/deno-http-worker/index.d.ts.map +1 -0
- package/deno-http-worker/index.js +8 -0
- package/deno-http-worker/index.js.map +1 -0
- package/deno-http-worker/index.mjs +3 -0
- package/deno-http-worker/index.mjs.map +1 -0
- package/index.js +4 -3
- package/index.js.map +1 -1
- package/index.mjs +4 -3
- package/index.mjs.map +1 -1
- package/package.json +32 -3
- package/server.d.mts +1 -0
- package/server.d.mts.map +1 -1
- package/server.d.ts +1 -0
- package/server.d.ts.map +1 -1
- package/server.js +3 -2
- package/server.js.map +1 -1
- package/server.mjs +2 -1
- package/server.mjs.map +1 -1
- package/src/bridge.ts +113 -0
- package/src/code-tool-paths.cts +6 -0
- package/src/code-tool.ts +3 -2
- package/src/deno-http-worker/DenoHTTPWorker.ts +404 -0
- package/src/deno-http-worker/index.ts +8 -0
- package/src/index.ts +9 -8
- package/src/server.ts +3 -1
- package/src/stdio.ts +51 -12
- package/stdio.d.mts +3 -2
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +3 -2
- package/stdio.d.ts.map +1 -1
- package/stdio.js +43 -11
- package/stdio.js.map +1 -1
- package/stdio.mjs +42 -10
- package/stdio.mjs.map +1 -1
package/stdio.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,sBAAkB;AAGvC,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAQhE,eAAO,MAAM,iBAAiB,GAAU,YAAY,UAAU,kBAW7D,CAAC"}
|
package/stdio.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
1
|
+
import { CLIOptions } from "./options.js";
|
|
2
|
+
export declare const DEFAULT_UPSTREAM_URL = "https://mcp.conductor.is/";
|
|
3
|
+
export declare const launchStdioServer: (mcpOptions: CLIOptions) => Promise<void>;
|
|
3
4
|
//# sourceMappingURL=stdio.d.ts.map
|
package/stdio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,qBAAkB;AAGvC,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAQhE,eAAO,MAAM,iBAAiB,GAAU,YAAY,UAAU,kBAW7D,CAAC"}
|
package/stdio.js
CHANGED
|
@@ -1,18 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.launchStdioServer = void 0;
|
|
4
|
-
const
|
|
5
|
-
const server_1 = require("./server.js");
|
|
3
|
+
exports.launchStdioServer = exports.DEFAULT_UPSTREAM_URL = void 0;
|
|
4
|
+
const bridge_1 = require("./bridge.js");
|
|
6
5
|
const logger_1 = require("./logger.js");
|
|
6
|
+
const util_1 = require("./util.js");
|
|
7
|
+
exports.DEFAULT_UPSTREAM_URL = 'https://mcp.conductor.is/';
|
|
8
|
+
// The literal from the docs config blocks; pasted wholesale it is the most
|
|
9
|
+
// common setup mistake, so refuse it before the client sees a confusing error.
|
|
10
|
+
const PLACEHOLDER_KEY = 'sk_conductor_...';
|
|
11
|
+
// Over stdio the package is a bridge to the hosted Conductor MCP server:
|
|
12
|
+
// nothing executes locally, and the only configuration is the secret key.
|
|
7
13
|
const launchStdioServer = async (mcpOptions) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
rejectHttpOnlyOptionsOrExit(mcpOptions);
|
|
15
|
+
const apiKey = readSecretKeyOrExit();
|
|
16
|
+
const upstreamUrl = (0, util_1.readEnv)('CONDUCTOR_MCP_URL') ?? exports.DEFAULT_UPSTREAM_URL;
|
|
17
|
+
const permissions = {
|
|
18
|
+
...(mcpOptions.codeAllowHttpGets !== undefined && { allow_http_gets: mcpOptions.codeAllowHttpGets }),
|
|
19
|
+
...(mcpOptions.codeAllowedMethods && { allowed_methods: mcpOptions.codeAllowedMethods }),
|
|
20
|
+
...(mcpOptions.codeBlockedMethods && { blocked_methods: mcpOptions.codeBlockedMethods }),
|
|
21
|
+
};
|
|
22
|
+
(0, logger_1.getLogger)().info({ upstreamUrl, permissions }, 'MCP bridge running on stdio');
|
|
23
|
+
await (0, bridge_1.runBridge)({ upstreamUrl, apiKey, permissions });
|
|
16
24
|
};
|
|
17
25
|
exports.launchStdioServer = launchStdioServer;
|
|
26
|
+
// The hosted server chooses its own tools, docs and instructions; refuse the
|
|
27
|
+
// flags that would silently do nothing over stdio.
|
|
28
|
+
function rejectHttpOnlyOptionsOrExit(options) {
|
|
29
|
+
const flag = options.includeCodeTool === false || options.includeDocsTools === false ? '--no-tools'
|
|
30
|
+
: options.includeCodeTool !== undefined || options.includeDocsTools !== undefined ? '--tools'
|
|
31
|
+
: options.docsDir !== undefined ? '--docs-dir'
|
|
32
|
+
: options.customInstructionsPath !== undefined ? '--custom-instructions-path'
|
|
33
|
+
: options.socket !== undefined ? '--socket'
|
|
34
|
+
: undefined;
|
|
35
|
+
if (flag !== undefined) {
|
|
36
|
+
console.error(`${flag} only applies to --transport=http. Over stdio this package bridges to the hosted Conductor MCP server, which serves its own tools and instructions.`);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function readSecretKeyOrExit() {
|
|
41
|
+
// Tolerate an accidental "Bearer " prefix; do not enforce an sk_conductor_
|
|
42
|
+
// prefix, legacy keys without it are still active.
|
|
43
|
+
const apiKey = ((0, util_1.readEnv)('CONDUCTOR_SECRET_KEY') ?? '').replace(/^Bearer\s+/i, '').trim();
|
|
44
|
+
if (apiKey === '' || apiKey.includes(PLACEHOLDER_KEY)) {
|
|
45
|
+
console.error('CONDUCTOR_SECRET_KEY is not set or is still the sk_conductor_... placeholder. Create a secret key at https://dashboard.conductor.is/ and put it in the "env" block of your MCP config (https://docs.conductor.is/usage/mcp).');
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
return apiKey;
|
|
49
|
+
}
|
|
18
50
|
//# sourceMappingURL=stdio.js.map
|
package/stdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wCAA6D;AAC7D,wCAAqC;AAErC,oCAAiC;AAEpB,QAAA,oBAAoB,GAAG,2BAA2B,CAAC;AAEhE,2EAA2E;AAC3E,+EAA+E;AAC/E,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C,yEAAyE;AACzE,0EAA0E;AACnE,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,2BAA2B,CAAC,UAAU,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;IACrC,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,mBAAmB,CAAC,IAAI,4BAAoB,CAAC;IACzE,MAAM,WAAW,GAAsB;QACrC,GAAG,CAAC,UAAU,CAAC,iBAAiB,KAAK,SAAS,IAAI,EAAE,eAAe,EAAE,UAAU,CAAC,iBAAiB,EAAE,CAAC;QACpG,GAAG,CAAC,UAAU,CAAC,kBAAkB,IAAI,EAAE,eAAe,EAAE,UAAU,CAAC,kBAAkB,EAAE,CAAC;QACxF,GAAG,CAAC,UAAU,CAAC,kBAAkB,IAAI,EAAE,eAAe,EAAE,UAAU,CAAC,kBAAkB,EAAE,CAAC;KACzF,CAAC;IACF,IAAA,kBAAS,GAAE,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,6BAA6B,CAAC,CAAC;IAC9E,MAAM,IAAA,kBAAS,EAAC,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B;AAEF,6EAA6E;AAC7E,mDAAmD;AACnD,SAAS,2BAA2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"./bridge.mjs";
|
|
3
2
|
import { getLogger } from "./logger.mjs";
|
|
3
|
+
import { readEnv } from "./util.mjs";
|
|
4
|
+
export const DEFAULT_UPSTREAM_URL = 'https://mcp.conductor.is/';
|
|
5
|
+
// The literal from the docs config blocks; pasted wholesale it is the most
|
|
6
|
+
// common setup mistake, so refuse it before the client sees a confusing error.
|
|
7
|
+
const PLACEHOLDER_KEY = 'sk_conductor_...';
|
|
8
|
+
// Over stdio the package is a bridge to the hosted Conductor MCP server:
|
|
9
|
+
// nothing executes locally, and the only configuration is the secret key.
|
|
4
10
|
export const launchStdioServer = async (mcpOptions) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
rejectHttpOnlyOptionsOrExit(mcpOptions);
|
|
12
|
+
const apiKey = readSecretKeyOrExit();
|
|
13
|
+
const upstreamUrl = readEnv('CONDUCTOR_MCP_URL') ?? DEFAULT_UPSTREAM_URL;
|
|
14
|
+
const permissions = {
|
|
15
|
+
...(mcpOptions.codeAllowHttpGets !== undefined && { allow_http_gets: mcpOptions.codeAllowHttpGets }),
|
|
16
|
+
...(mcpOptions.codeAllowedMethods && { allowed_methods: mcpOptions.codeAllowedMethods }),
|
|
17
|
+
...(mcpOptions.codeBlockedMethods && { blocked_methods: mcpOptions.codeBlockedMethods }),
|
|
18
|
+
};
|
|
19
|
+
getLogger().info({ upstreamUrl, permissions }, 'MCP bridge running on stdio');
|
|
20
|
+
await runBridge({ upstreamUrl, apiKey, permissions });
|
|
13
21
|
};
|
|
22
|
+
// The hosted server chooses its own tools, docs and instructions; refuse the
|
|
23
|
+
// flags that would silently do nothing over stdio.
|
|
24
|
+
function rejectHttpOnlyOptionsOrExit(options) {
|
|
25
|
+
const flag = options.includeCodeTool === false || options.includeDocsTools === false ? '--no-tools'
|
|
26
|
+
: options.includeCodeTool !== undefined || options.includeDocsTools !== undefined ? '--tools'
|
|
27
|
+
: options.docsDir !== undefined ? '--docs-dir'
|
|
28
|
+
: options.customInstructionsPath !== undefined ? '--custom-instructions-path'
|
|
29
|
+
: options.socket !== undefined ? '--socket'
|
|
30
|
+
: undefined;
|
|
31
|
+
if (flag !== undefined) {
|
|
32
|
+
console.error(`${flag} only applies to --transport=http. Over stdio this package bridges to the hosted Conductor MCP server, which serves its own tools and instructions.`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function readSecretKeyOrExit() {
|
|
37
|
+
// Tolerate an accidental "Bearer " prefix; do not enforce an sk_conductor_
|
|
38
|
+
// prefix, legacy keys without it are still active.
|
|
39
|
+
const apiKey = (readEnv('CONDUCTOR_SECRET_KEY') ?? '').replace(/^Bearer\s+/i, '').trim();
|
|
40
|
+
if (apiKey === '' || apiKey.includes(PLACEHOLDER_KEY)) {
|
|
41
|
+
console.error('CONDUCTOR_SECRET_KEY is not set or is still the sk_conductor_... placeholder. Create a secret key at https://dashboard.conductor.is/ and put it in the "env" block of your MCP config (https://docs.conductor.is/usage/mcp).');
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
return apiKey;
|
|
45
|
+
}
|
|
14
46
|
//# sourceMappingURL=stdio.mjs.map
|
package/stdio.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.mjs","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"stdio.mjs","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,qBAAiB;AAC7D,OAAO,EAAE,SAAS,EAAE,qBAAiB;AAErC,OAAO,EAAE,OAAO,EAAE,mBAAe;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAEhE,2EAA2E;AAC3E,+EAA+E;AAC/E,MAAM,eAAe,GAAG,kBAAkB,CAA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