rulesync 0.67.0 → 0.69.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 +75 -152
- package/dist/index.cjs +4364 -6731
- package/dist/index.js +4389 -5437
- package/package.json +7 -3
- package/dist/amazonqcli-PWXCSRAN.js +0 -9
- package/dist/augmentcode-4AFYW4BU.js +0 -9
- package/dist/chunk-35VMCHXQ.js +0 -17
- package/dist/chunk-3QGD3CH5.js +0 -86
- package/dist/chunk-5GKH5TQ4.js +0 -17
- package/dist/chunk-7BIZ5Y6F.js +0 -81
- package/dist/chunk-7QVQO6MQ.js +0 -17
- package/dist/chunk-B2HD24KC.js +0 -145
- package/dist/chunk-CS7AV6JT.js +0 -55
- package/dist/chunk-KONQNQY3.js +0 -17
- package/dist/chunk-OARJESSZ.js +0 -12
- package/dist/chunk-V36ICGOY.js +0 -392
- package/dist/chunk-WCON5BAI.js +0 -12
- package/dist/chunk-WFOWHPBC.js +0 -210
- package/dist/chunk-WYYQXVHC.js +0 -17
- package/dist/chunk-YZUDL4GW.js +0 -117
- package/dist/chunk-ZMGXHLYP.js +0 -17
- package/dist/claudecode-OC7VHCF6.js +0 -10
- package/dist/cline-A4KFSAQE.js +0 -10
- package/dist/codexcli-YP3X7FWB.js +0 -10
- package/dist/copilot-3LIMXQ7O.js +0 -9
- package/dist/cursor-QV72CDJC.js +0 -10
- package/dist/geminicli-XPSJJS65.js +0 -10
- package/dist/junie-265XIW43.js +0 -10
- package/dist/kiro-6OHFHN5X.js +0 -9
- package/dist/opencode-C5QAYVJ5.js +0 -17
- package/dist/qwencode-5RR24UW6.js +0 -10
- package/dist/roo-5IXVBUHD.js +0 -10
- package/dist/windsurf-DVQUJJJ5.js +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rulesync",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.0",
|
|
4
4
|
"description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"chokidar": "4.0.3",
|
|
41
41
|
"commander": "14.0.0",
|
|
42
42
|
"consola": "3.4.2",
|
|
43
|
+
"es-toolkit": "1.39.10",
|
|
43
44
|
"fast-xml-parser": "5.2.5",
|
|
44
45
|
"gray-matter": "4.0.3",
|
|
45
46
|
"js-yaml": "4.1.0",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"zod": "4.0.17"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
52
|
+
"@anthropic-ai/claude-code": "1.0.93",
|
|
51
53
|
"@biomejs/biome": "2.1.4",
|
|
52
54
|
"@eslint/js": "9.33.0",
|
|
53
55
|
"@secretlint/secretlint-rule-preset-recommend": "11.0.2",
|
|
@@ -59,8 +61,10 @@
|
|
|
59
61
|
"@vitest/coverage-v8": "3.2.4",
|
|
60
62
|
"cspell": "9.2.0",
|
|
61
63
|
"eslint": "9.33.0",
|
|
64
|
+
"eslint-plugin-import": "2.32.0",
|
|
62
65
|
"eslint-plugin-no-type-assertion": "1.3.0",
|
|
63
66
|
"eslint-plugin-oxlint": "1.11.2",
|
|
67
|
+
"eslint-plugin-strict-dependencies": "1.3.22",
|
|
64
68
|
"eslint-plugin-zod-import": "0.3.0",
|
|
65
69
|
"knip": "5.62.0",
|
|
66
70
|
"lint-staged": "16.1.5",
|
|
@@ -82,8 +86,8 @@
|
|
|
82
86
|
"access": "public"
|
|
83
87
|
},
|
|
84
88
|
"scripts": {
|
|
85
|
-
"bcheck": "biome check
|
|
86
|
-
"bcheck:fix": "biome check --write
|
|
89
|
+
"bcheck": "biome check .",
|
|
90
|
+
"bcheck:fix": "biome check --write .",
|
|
87
91
|
"build": "tsup src/cli/index.ts --format cjs,esm --dts --clean",
|
|
88
92
|
"check": "pnpm run bcheck && pnpm run oxlint && pnpm run eslint && pnpm run typecheck",
|
|
89
93
|
"cspell": "cspell \"**/*\"",
|
package/dist/chunk-35VMCHXQ.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generateMcpConfigurationFilesFromRegistry,
|
|
3
|
-
generateMcpFromRegistry
|
|
4
|
-
} from "./chunk-V36ICGOY.js";
|
|
5
|
-
|
|
6
|
-
// src/generators/mcp/claudecode.ts
|
|
7
|
-
function generateClaudeMcp(config) {
|
|
8
|
-
return generateMcpFromRegistry("claudecode", config);
|
|
9
|
-
}
|
|
10
|
-
function generateClaudeMcpConfiguration(mcpServers, baseDir = "") {
|
|
11
|
-
return generateMcpConfigurationFilesFromRegistry("claudecode", mcpServers, baseDir);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
generateClaudeMcp,
|
|
16
|
-
generateClaudeMcpConfiguration
|
|
17
|
-
};
|
package/dist/chunk-3QGD3CH5.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
shouldIncludeServer
|
|
3
|
-
} from "./chunk-CS7AV6JT.js";
|
|
4
|
-
|
|
5
|
-
// src/generators/mcp/kiro.ts
|
|
6
|
-
function generateKiroMcp(config) {
|
|
7
|
-
const kiroConfig = {
|
|
8
|
-
mcpServers: {}
|
|
9
|
-
};
|
|
10
|
-
for (const [serverName, server] of Object.entries(config.mcpServers)) {
|
|
11
|
-
if (!shouldIncludeServer(server, "kiro")) continue;
|
|
12
|
-
const kiroServer = {};
|
|
13
|
-
if (server.command) {
|
|
14
|
-
kiroServer.command = server.command;
|
|
15
|
-
if (server.args) kiroServer.args = server.args;
|
|
16
|
-
} else if (server.url || server.httpUrl) {
|
|
17
|
-
const url = server.httpUrl || server.url;
|
|
18
|
-
if (url) {
|
|
19
|
-
kiroServer.url = url;
|
|
20
|
-
}
|
|
21
|
-
if (server.httpUrl || server.transport === "http") {
|
|
22
|
-
kiroServer.transport = "streamable-http";
|
|
23
|
-
} else if (server.transport === "sse" || server.type === "sse") {
|
|
24
|
-
kiroServer.transport = "sse";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
if (server.env) {
|
|
28
|
-
kiroServer.env = server.env;
|
|
29
|
-
}
|
|
30
|
-
if (server.timeout) {
|
|
31
|
-
kiroServer.timeout = server.timeout;
|
|
32
|
-
}
|
|
33
|
-
if (server.disabled !== void 0) {
|
|
34
|
-
kiroServer.disabled = server.disabled;
|
|
35
|
-
}
|
|
36
|
-
if (server.transport) {
|
|
37
|
-
kiroServer.transport = server.transport;
|
|
38
|
-
}
|
|
39
|
-
if (server.kiroAutoApprove) {
|
|
40
|
-
kiroServer.autoApprove = server.kiroAutoApprove;
|
|
41
|
-
}
|
|
42
|
-
if (server.kiroAutoBlock) {
|
|
43
|
-
kiroServer.autoBlock = server.kiroAutoBlock;
|
|
44
|
-
}
|
|
45
|
-
kiroConfig.mcpServers[serverName] = kiroServer;
|
|
46
|
-
}
|
|
47
|
-
return JSON.stringify(kiroConfig, null, 2);
|
|
48
|
-
}
|
|
49
|
-
function generateKiroMcpConfiguration(mcpServers, baseDir = "") {
|
|
50
|
-
const filepath = baseDir ? `${baseDir}/.kiro/mcp.json` : ".kiro/mcp.json";
|
|
51
|
-
const config = {
|
|
52
|
-
mcpServers: {}
|
|
53
|
-
};
|
|
54
|
-
for (const [serverName, server] of Object.entries(mcpServers)) {
|
|
55
|
-
if (!shouldIncludeServer(server, "kiro")) {
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
const { targets: _targets, ...serverConfig } = server;
|
|
59
|
-
const kiroServer = { ...serverConfig };
|
|
60
|
-
if (serverConfig.httpUrl !== void 0) {
|
|
61
|
-
kiroServer.url = serverConfig.httpUrl;
|
|
62
|
-
delete kiroServer.httpUrl;
|
|
63
|
-
}
|
|
64
|
-
if (serverConfig.kiroAutoApprove !== void 0) {
|
|
65
|
-
kiroServer.autoApprove = serverConfig.kiroAutoApprove;
|
|
66
|
-
delete kiroServer.kiroAutoApprove;
|
|
67
|
-
}
|
|
68
|
-
if (serverConfig.kiroAutoBlock !== void 0) {
|
|
69
|
-
kiroServer.autoBlock = serverConfig.kiroAutoBlock;
|
|
70
|
-
delete kiroServer.kiroAutoBlock;
|
|
71
|
-
}
|
|
72
|
-
config.mcpServers[serverName] = kiroServer;
|
|
73
|
-
}
|
|
74
|
-
return [
|
|
75
|
-
{
|
|
76
|
-
filepath,
|
|
77
|
-
content: `${JSON.stringify(config, null, 2)}
|
|
78
|
-
`
|
|
79
|
-
}
|
|
80
|
-
];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export {
|
|
84
|
-
generateKiroMcp,
|
|
85
|
-
generateKiroMcpConfiguration
|
|
86
|
-
};
|
package/dist/chunk-5GKH5TQ4.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generateMcpConfigurationFilesFromRegistry,
|
|
3
|
-
generateMcpFromRegistry
|
|
4
|
-
} from "./chunk-V36ICGOY.js";
|
|
5
|
-
|
|
6
|
-
// src/generators/mcp/roo.ts
|
|
7
|
-
function generateRooMcp(config) {
|
|
8
|
-
return generateMcpFromRegistry("roo", config);
|
|
9
|
-
}
|
|
10
|
-
function generateRooMcpConfiguration(mcpServers, baseDir = "") {
|
|
11
|
-
return generateMcpConfigurationFilesFromRegistry("roo", mcpServers, baseDir);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
generateRooMcp,
|
|
16
|
-
generateRooMcpConfiguration
|
|
17
|
-
};
|
package/dist/chunk-7BIZ5Y6F.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
shouldIncludeServer
|
|
3
|
-
} from "./chunk-CS7AV6JT.js";
|
|
4
|
-
|
|
5
|
-
// src/generators/mcp/copilot.ts
|
|
6
|
-
function generateCopilotMcp(config, target) {
|
|
7
|
-
const servers = {};
|
|
8
|
-
const inputs = [];
|
|
9
|
-
const inputMap = /* @__PURE__ */ new Map();
|
|
10
|
-
for (const [serverName, server] of Object.entries(config.mcpServers)) {
|
|
11
|
-
if (!shouldIncludeServer(server, "copilot")) continue;
|
|
12
|
-
const copilotServer = {};
|
|
13
|
-
if (server.command) {
|
|
14
|
-
const command = Array.isArray(server.command) ? server.command[0] : server.command;
|
|
15
|
-
if (command) {
|
|
16
|
-
copilotServer.command = command;
|
|
17
|
-
}
|
|
18
|
-
if (server.args) copilotServer.args = server.args;
|
|
19
|
-
} else if (server.url || server.httpUrl) {
|
|
20
|
-
const url = server.httpUrl || server.url;
|
|
21
|
-
if (url) {
|
|
22
|
-
copilotServer.url = url;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (server.env) {
|
|
26
|
-
copilotServer.env = {};
|
|
27
|
-
for (const [key, value] of Object.entries(server.env)) {
|
|
28
|
-
if (target === "editor" && value.includes("SECRET")) {
|
|
29
|
-
const inputId = `${serverName}_${key}`;
|
|
30
|
-
inputMap.set(inputId, value);
|
|
31
|
-
copilotServer.env[key] = `\${input:${inputId}}`;
|
|
32
|
-
inputs.push({
|
|
33
|
-
id: inputId,
|
|
34
|
-
type: "password",
|
|
35
|
-
description: `${key} for ${serverName}`
|
|
36
|
-
});
|
|
37
|
-
} else {
|
|
38
|
-
copilotServer.env[key] = value;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (server.tools) {
|
|
43
|
-
copilotServer.tools = server.tools;
|
|
44
|
-
} else if (server.alwaysAllow) {
|
|
45
|
-
copilotServer.tools = server.alwaysAllow;
|
|
46
|
-
}
|
|
47
|
-
servers[serverName] = copilotServer;
|
|
48
|
-
}
|
|
49
|
-
if (target === "codingAgent") {
|
|
50
|
-
const config2 = { mcpServers: servers };
|
|
51
|
-
return JSON.stringify(config2, null, 2);
|
|
52
|
-
} else {
|
|
53
|
-
const config2 = { servers };
|
|
54
|
-
if (inputs.length > 0) {
|
|
55
|
-
config2.inputs = inputs;
|
|
56
|
-
}
|
|
57
|
-
return JSON.stringify(config2, null, 2);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function generateCopilotMcpConfiguration(mcpServers, baseDir = "") {
|
|
61
|
-
const configs = [];
|
|
62
|
-
const rulesyncConfig = { mcpServers };
|
|
63
|
-
const editorContent = generateCopilotMcp(rulesyncConfig, "editor");
|
|
64
|
-
configs.push({
|
|
65
|
-
filepath: baseDir ? `${baseDir}/.vscode/mcp.json` : ".vscode/mcp.json",
|
|
66
|
-
content: `${editorContent}
|
|
67
|
-
`
|
|
68
|
-
});
|
|
69
|
-
const codingAgentContent = generateCopilotMcp(rulesyncConfig, "codingAgent");
|
|
70
|
-
configs.push({
|
|
71
|
-
filepath: baseDir ? `${baseDir}/.copilot/mcp.json` : ".copilot/mcp.json",
|
|
72
|
-
content: `${codingAgentContent}
|
|
73
|
-
`
|
|
74
|
-
});
|
|
75
|
-
return configs;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export {
|
|
79
|
-
generateCopilotMcp,
|
|
80
|
-
generateCopilotMcpConfiguration
|
|
81
|
-
};
|
package/dist/chunk-7QVQO6MQ.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generateMcpConfigurationFilesFromRegistry,
|
|
3
|
-
generateMcpFromRegistry
|
|
4
|
-
} from "./chunk-V36ICGOY.js";
|
|
5
|
-
|
|
6
|
-
// src/generators/mcp/windsurf.ts
|
|
7
|
-
function generateWindsurfMcp(config) {
|
|
8
|
-
return generateMcpFromRegistry("windsurf", config);
|
|
9
|
-
}
|
|
10
|
-
function generateWindsurfMcpConfiguration(mcpServers, baseDir = "") {
|
|
11
|
-
return generateMcpConfigurationFilesFromRegistry("windsurf", mcpServers, baseDir);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
generateWindsurfMcp,
|
|
16
|
-
generateWindsurfMcpConfiguration
|
|
17
|
-
};
|
package/dist/chunk-B2HD24KC.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generateMcpConfig,
|
|
3
|
-
generateMcpConfigurationFiles
|
|
4
|
-
} from "./chunk-V36ICGOY.js";
|
|
5
|
-
|
|
6
|
-
// src/generators/mcp/codexcli.ts
|
|
7
|
-
function generateCodexMcp(config) {
|
|
8
|
-
return generateMcpConfig(config, {
|
|
9
|
-
target: "codexcli",
|
|
10
|
-
configPaths: [".codex/mcp-config.json"],
|
|
11
|
-
serverTransform: (server) => {
|
|
12
|
-
const codexServer = {};
|
|
13
|
-
if (server.command) {
|
|
14
|
-
codexServer.command = server.command;
|
|
15
|
-
if (server.args) codexServer.args = server.args;
|
|
16
|
-
codexServer.transport = server.transport || "stdio";
|
|
17
|
-
} else if (server.url || server.httpUrl) {
|
|
18
|
-
const url = server.httpUrl || server.url;
|
|
19
|
-
if (url) {
|
|
20
|
-
codexServer.url = url;
|
|
21
|
-
}
|
|
22
|
-
if (server.httpUrl) {
|
|
23
|
-
codexServer.transport = "http";
|
|
24
|
-
} else if (server.transport === "sse") {
|
|
25
|
-
codexServer.transport = "sse";
|
|
26
|
-
} else if (server.transport === "http") {
|
|
27
|
-
codexServer.transport = "http";
|
|
28
|
-
} else {
|
|
29
|
-
codexServer.transport = "stdio";
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
codexServer.transport = "stdio";
|
|
33
|
-
}
|
|
34
|
-
if (server.env) {
|
|
35
|
-
codexServer.env = { ...server.env };
|
|
36
|
-
if (!codexServer.env.CODEX_DEFAULT_MODEL) {
|
|
37
|
-
codexServer.env.CODEX_DEFAULT_MODEL = "gpt-4o-mini";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (server.cwd) {
|
|
41
|
-
codexServer.cwd = server.cwd;
|
|
42
|
-
codexServer.workingDirectory = server.cwd;
|
|
43
|
-
}
|
|
44
|
-
if (server.timeout) {
|
|
45
|
-
codexServer.timeout = server.timeout;
|
|
46
|
-
}
|
|
47
|
-
if (server.headers) {
|
|
48
|
-
codexServer.headers = server.headers;
|
|
49
|
-
}
|
|
50
|
-
return codexServer;
|
|
51
|
-
},
|
|
52
|
-
configWrapper: (servers) => ({
|
|
53
|
-
// Configuration format for MCP wrapper servers that expose Codex CLI functionality
|
|
54
|
-
servers,
|
|
55
|
-
_comment: "Configuration for MCP wrapper servers like openai-codex-mcp that integrate with Codex CLI",
|
|
56
|
-
_usage: "This file is intended for use with third-party MCP servers that wrap Codex CLI functionality",
|
|
57
|
-
_examples: {
|
|
58
|
-
python_server: "python -m mcp_server or uvicorn codex_server:app",
|
|
59
|
-
nodejs_server: "node dist/server.js or npm start",
|
|
60
|
-
docker_server: "docker run -i --rm custom/codex-mcp:latest"
|
|
61
|
-
},
|
|
62
|
-
_security_note: "Store API keys in environment variables, not in this configuration file"
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function generateCodexMcpConfiguration(mcpServers, baseDir = "") {
|
|
67
|
-
return generateMcpConfigurationFiles(
|
|
68
|
-
mcpServers,
|
|
69
|
-
{
|
|
70
|
-
target: "codexcli",
|
|
71
|
-
configPaths: [".codex/mcp-config.json"],
|
|
72
|
-
serverTransform: (server) => {
|
|
73
|
-
const { targets: _, transport, ...serverConfig } = server;
|
|
74
|
-
const codexServer = {};
|
|
75
|
-
if (serverConfig.command !== void 0) codexServer.command = serverConfig.command;
|
|
76
|
-
if (serverConfig.args !== void 0) codexServer.args = serverConfig.args;
|
|
77
|
-
if (serverConfig.url !== void 0) codexServer.url = serverConfig.url;
|
|
78
|
-
if (serverConfig.httpUrl !== void 0) codexServer.httpUrl = serverConfig.httpUrl;
|
|
79
|
-
if (serverConfig.env !== void 0) codexServer.env = serverConfig.env;
|
|
80
|
-
if (serverConfig.disabled !== void 0) codexServer.disabled = serverConfig.disabled;
|
|
81
|
-
if (serverConfig.networkTimeout !== void 0)
|
|
82
|
-
codexServer.networkTimeout = serverConfig.networkTimeout;
|
|
83
|
-
if (serverConfig.timeout !== void 0) codexServer.timeout = serverConfig.timeout;
|
|
84
|
-
if (serverConfig.trust !== void 0) codexServer.trust = serverConfig.trust;
|
|
85
|
-
if (serverConfig.cwd !== void 0) codexServer.cwd = serverConfig.cwd;
|
|
86
|
-
if (serverConfig.type !== void 0) codexServer.type = serverConfig.type;
|
|
87
|
-
if (serverConfig.alwaysAllow !== void 0)
|
|
88
|
-
codexServer.alwaysAllow = serverConfig.alwaysAllow;
|
|
89
|
-
if (serverConfig.tools !== void 0) codexServer.tools = serverConfig.tools;
|
|
90
|
-
if (serverConfig.kiroAutoApprove !== void 0)
|
|
91
|
-
codexServer.autoApprove = serverConfig.kiroAutoApprove;
|
|
92
|
-
if (serverConfig.kiroAutoBlock !== void 0)
|
|
93
|
-
codexServer.autoBlock = serverConfig.kiroAutoBlock;
|
|
94
|
-
if (serverConfig.headers !== void 0) codexServer.headers = serverConfig.headers;
|
|
95
|
-
if (serverConfig.httpUrl !== void 0) {
|
|
96
|
-
codexServer.url = serverConfig.httpUrl;
|
|
97
|
-
delete codexServer.httpUrl;
|
|
98
|
-
}
|
|
99
|
-
if (transport) {
|
|
100
|
-
codexServer.transport = transport;
|
|
101
|
-
} else if (serverConfig.url && !serverConfig.httpUrl) {
|
|
102
|
-
codexServer.transport = "sse";
|
|
103
|
-
} else {
|
|
104
|
-
codexServer.transport = "stdio";
|
|
105
|
-
}
|
|
106
|
-
if (serverConfig.env) {
|
|
107
|
-
codexServer.env = { ...serverConfig.env };
|
|
108
|
-
if (!codexServer.env.CODEX_DEFAULT_MODEL) {
|
|
109
|
-
codexServer.env.CODEX_DEFAULT_MODEL = "gpt-4o-mini";
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (serverConfig.cwd) {
|
|
113
|
-
codexServer.cwd = serverConfig.cwd;
|
|
114
|
-
codexServer.workingDirectory = serverConfig.cwd;
|
|
115
|
-
}
|
|
116
|
-
if (serverConfig.timeout) {
|
|
117
|
-
codexServer.timeout = serverConfig.timeout;
|
|
118
|
-
}
|
|
119
|
-
if (serverConfig.headers) {
|
|
120
|
-
codexServer.headers = serverConfig.headers;
|
|
121
|
-
}
|
|
122
|
-
return codexServer;
|
|
123
|
-
},
|
|
124
|
-
configWrapper: (servers) => ({
|
|
125
|
-
// Configuration format for MCP wrapper servers that integrate with Codex CLI
|
|
126
|
-
servers,
|
|
127
|
-
_comment: "Configuration for MCP wrapper servers like openai-codex-mcp that integrate with Codex CLI",
|
|
128
|
-
_usage: "Use with third-party MCP servers that expose Codex CLI functionality to other MCP clients",
|
|
129
|
-
_examples: {
|
|
130
|
-
python_server: "python -m mcp_server or uvicorn codex_server:app",
|
|
131
|
-
nodejs_server: "node dist/server.js or npm start",
|
|
132
|
-
docker_server: "docker run -i --rm custom/codex-mcp:latest"
|
|
133
|
-
},
|
|
134
|
-
_security_note: "Store API keys in environment variables, not in this configuration file",
|
|
135
|
-
_supported_transports: ["stdio", "sse", "http"]
|
|
136
|
-
})
|
|
137
|
-
},
|
|
138
|
-
baseDir
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export {
|
|
143
|
-
generateCodexMcp,
|
|
144
|
-
generateCodexMcpConfiguration
|
|
145
|
-
};
|
package/dist/chunk-CS7AV6JT.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// src/types/tool-targets.ts
|
|
2
|
-
import { z } from "zod/mini";
|
|
3
|
-
var ALL_TOOL_TARGETS = [
|
|
4
|
-
"agentsmd",
|
|
5
|
-
"amazonqcli",
|
|
6
|
-
"augmentcode",
|
|
7
|
-
"augmentcode-legacy",
|
|
8
|
-
"copilot",
|
|
9
|
-
"cursor",
|
|
10
|
-
"cline",
|
|
11
|
-
"claudecode",
|
|
12
|
-
"codexcli",
|
|
13
|
-
"opencode",
|
|
14
|
-
"qwencode",
|
|
15
|
-
"roo",
|
|
16
|
-
"geminicli",
|
|
17
|
-
"kiro",
|
|
18
|
-
"junie",
|
|
19
|
-
"windsurf"
|
|
20
|
-
];
|
|
21
|
-
var ToolTargetSchema = z.enum(ALL_TOOL_TARGETS);
|
|
22
|
-
var ToolTargetsSchema = z.array(ToolTargetSchema);
|
|
23
|
-
var WildcardTargetSchema = z.tuple([z.literal("*")]);
|
|
24
|
-
var RulesyncTargetsSchema = z.union([ToolTargetsSchema, WildcardTargetSchema]);
|
|
25
|
-
function isToolTarget(target) {
|
|
26
|
-
if (!target) return false;
|
|
27
|
-
return ALL_TOOL_TARGETS.some((validTarget) => validTarget === target);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// src/utils/mcp-helpers.ts
|
|
31
|
-
function shouldIncludeServer(server, targetTool) {
|
|
32
|
-
if (!server.targets || server.targets.length === 0) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
const parsedTargets = RulesyncTargetsSchema.parse(server.targets);
|
|
36
|
-
if (parsedTargets.length === 1 && parsedTargets[0] === "*") {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
const validatedTool = ToolTargetSchema.parse(targetTool);
|
|
40
|
-
for (const target of parsedTargets) {
|
|
41
|
-
if (target === validatedTool) {
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
ALL_TOOL_TARGETS,
|
|
50
|
-
ToolTargetSchema,
|
|
51
|
-
ToolTargetsSchema,
|
|
52
|
-
RulesyncTargetsSchema,
|
|
53
|
-
isToolTarget,
|
|
54
|
-
shouldIncludeServer
|
|
55
|
-
};
|
package/dist/chunk-KONQNQY3.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
generateMcpConfigurationFilesFromRegistry,
|
|
3
|
-
generateMcpFromRegistry
|
|
4
|
-
} from "./chunk-V36ICGOY.js";
|
|
5
|
-
|
|
6
|
-
// src/generators/mcp/geminicli.ts
|
|
7
|
-
function generateGeminiCliMcp(config) {
|
|
8
|
-
return generateMcpFromRegistry("geminicli", config);
|
|
9
|
-
}
|
|
10
|
-
function generateGeminiCliMcpConfiguration(mcpServers, baseDir = "") {
|
|
11
|
-
return generateMcpConfigurationFilesFromRegistry("geminicli", mcpServers, baseDir);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
generateGeminiCliMcp,
|
|
16
|
-
generateGeminiCliMcpConfiguration
|
|
17
|
-
};
|
package/dist/chunk-OARJESSZ.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clineMcpGenerator
|
|
3
|
-
} from "./chunk-V36ICGOY.js";
|
|
4
|
-
|
|
5
|
-
// src/generators/mcp/cline.ts
|
|
6
|
-
var generateClineMcp = clineMcpGenerator.generateMcp;
|
|
7
|
-
var generateClineMcpConfiguration = clineMcpGenerator.generateMcpConfiguration;
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
generateClineMcp,
|
|
11
|
-
generateClineMcpConfiguration
|
|
12
|
-
};
|