claude-codex-wechat 0.1.30 → 0.1.31
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/mcp/mediaServer.js +1 -1
- package/dist/server/cli.js +17 -4
- package/package.json +1 -1
package/dist/mcp/mediaServer.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createRequire as __cjsCreateRequire } from 'node:module'; const require
|
|
|
4
4
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
var BRIDGE_API_URL = process.env.BRIDGE_API_URL || "http://localhost:
|
|
7
|
+
var BRIDGE_API_URL = process.env.BRIDGE_API_URL || "http://localhost:8787";
|
|
8
8
|
var server = new McpServer({
|
|
9
9
|
name: "wechat-media",
|
|
10
10
|
version: "1.0.0"
|
package/dist/server/cli.js
CHANGED
|
@@ -3231,7 +3231,7 @@ var CodexAppServerClient = class {
|
|
|
3231
3231
|
buffer = "";
|
|
3232
3232
|
constructor(input) {
|
|
3233
3233
|
const command = input.command ?? "codex";
|
|
3234
|
-
this.child = spawn4(command, ["app-server", "--listen", "stdio://"], {
|
|
3234
|
+
this.child = spawn4(command, ["app-server", "--listen", "stdio://", ...input.mcpServerConfigs ?? []], {
|
|
3235
3235
|
cwd: input.cwd,
|
|
3236
3236
|
stdio: ["pipe", "pipe", "pipe"],
|
|
3237
3237
|
shell: useShellForCli()
|
|
@@ -3402,8 +3402,10 @@ var CodexInteractiveRunner = class {
|
|
|
3402
3402
|
sessions = /* @__PURE__ */ new Map();
|
|
3403
3403
|
command;
|
|
3404
3404
|
syncThreadForResume;
|
|
3405
|
+
mcpServerConfigs;
|
|
3405
3406
|
constructor(input = {}) {
|
|
3406
3407
|
this.command = input.command;
|
|
3408
|
+
this.mcpServerConfigs = input.mcpServerConfigs;
|
|
3407
3409
|
this.syncThreadForResume = input.syncThreadForResume ?? syncCodexThreadForResume;
|
|
3408
3410
|
}
|
|
3409
3411
|
async startSession(input) {
|
|
@@ -3526,7 +3528,8 @@ var CodexInteractiveRunner = class {
|
|
|
3526
3528
|
if (session.client) return session.client;
|
|
3527
3529
|
const client = new CodexAppServerClient({
|
|
3528
3530
|
command: this.command,
|
|
3529
|
-
cwd: session.cwd
|
|
3531
|
+
cwd: session.cwd,
|
|
3532
|
+
...this.mcpServerConfigs?.length ? { mcpServerConfigs: this.mcpServerConfigs } : {}
|
|
3530
3533
|
});
|
|
3531
3534
|
await client.initialize();
|
|
3532
3535
|
client.onNotification("item/agentMessage/delta", (params) => {
|
|
@@ -3633,7 +3636,7 @@ var CodexProvider = class {
|
|
|
3633
3636
|
function createDefaultProviders(input = {}) {
|
|
3634
3637
|
return [
|
|
3635
3638
|
new ClaudeCodeProvider({ runner: new ClaudeStreamingRunner({ command: input.claudeCommand, mcpConfigPath: input.mcpConfigPath }) }),
|
|
3636
|
-
new CodexProvider({ runner: new CodexInteractiveRunner({ command: input.codexCommand }) })
|
|
3639
|
+
new CodexProvider({ runner: new CodexInteractiveRunner({ command: input.codexCommand, mcpServerConfigs: input.codexMcpServerConfigs }) })
|
|
3637
3640
|
];
|
|
3638
3641
|
}
|
|
3639
3642
|
|
|
@@ -4956,10 +4959,20 @@ function createDaemonServer(options = {}) {
|
|
|
4956
4959
|
}
|
|
4957
4960
|
}
|
|
4958
4961
|
}, null, 2) + "\n");
|
|
4962
|
+
const codexMcpScript = useTs ? mcpMediaServerTs : mcpMediaServerJs;
|
|
4963
|
+
const codexMcpServerConfigs = [
|
|
4964
|
+
"-c",
|
|
4965
|
+
`mcp_servers.wechat-media.command="${mcpCommand}"`,
|
|
4966
|
+
"-c",
|
|
4967
|
+
`mcp_servers.wechat-media.args=["${codexMcpScript}"]`,
|
|
4968
|
+
"-c",
|
|
4969
|
+
`mcp_servers.wechat-media.env.BRIDGE_API_URL="http://localhost:${bridgePort}"`
|
|
4970
|
+
];
|
|
4959
4971
|
const providerAdapters = options.providers ?? createDefaultProviders({
|
|
4960
4972
|
claudeCommand: options.providerCommands?.claude?.command,
|
|
4961
4973
|
codexCommand: options.providerCommands?.codex?.command,
|
|
4962
|
-
mcpConfigPath
|
|
4974
|
+
mcpConfigPath,
|
|
4975
|
+
codexMcpServerConfigs
|
|
4963
4976
|
});
|
|
4964
4977
|
let currentConversation = conversation.getCurrent();
|
|
4965
4978
|
if (currentConversation) {
|