poe-code 3.0.126 → 3.0.128
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/cli/constants.d.ts +1 -1
- package/dist/cli/constants.js +1 -0
- package/dist/cli/constants.js.map +1 -1
- package/dist/index.js +33 -7
- package/dist/index.js.map +2 -2
- package/dist/providers/claude-code.js +20 -4
- package/dist/providers/claude-code.js.map +2 -2
- package/dist/providers/codex.js +20 -4
- package/dist/providers/codex.js.map +2 -2
- package/dist/providers/kimi.js +20 -4
- package/dist/providers/kimi.js.map +2 -2
- package/dist/providers/opencode.js +27 -9
- package/dist/providers/opencode.js.map +2 -2
- package/dist/providers/poe-agent.js +2 -1
- package/dist/providers/poe-agent.js.map +2 -2
- package/package.json +1 -1
|
@@ -193,6 +193,17 @@ function toTomlInlineTable(values) {
|
|
|
193
193
|
function serializeJsonMcpArgs(servers) {
|
|
194
194
|
return ["--mcp-config", JSON.stringify({ mcpServers: toJsonMcpServers(servers) })];
|
|
195
195
|
}
|
|
196
|
+
function serializeOpenCodeMcpEnv(servers) {
|
|
197
|
+
const mcp = {};
|
|
198
|
+
for (const [name, server] of Object.entries(servers)) {
|
|
199
|
+
const entry = { type: "local", command: [server.command, ...server.args ?? []] };
|
|
200
|
+
if (server.env && Object.keys(server.env).length > 0) {
|
|
201
|
+
entry.environment = server.env;
|
|
202
|
+
}
|
|
203
|
+
mcp[name] = entry;
|
|
204
|
+
}
|
|
205
|
+
return { OPENCODE_CONFIG_CONTENT: JSON.stringify({ mcp }) };
|
|
206
|
+
}
|
|
196
207
|
function serializeCodexMcpArgs(servers) {
|
|
197
208
|
const args = [];
|
|
198
209
|
for (const [name, server] of Object.entries(servers)) {
|
|
@@ -290,7 +301,8 @@ var openCodeSpawnConfig = {
|
|
|
290
301
|
defaultArgs: [],
|
|
291
302
|
promptFlag: "--prompt"
|
|
292
303
|
},
|
|
293
|
-
resumeCommand: (threadId, cwd) => [cwd, "--session", threadId]
|
|
304
|
+
resumeCommand: (threadId, cwd) => [cwd, "--session", threadId],
|
|
305
|
+
mcpEnv: serializeOpenCodeMcpEnv
|
|
294
306
|
};
|
|
295
307
|
|
|
296
308
|
// packages/agent-spawn/src/configs/kimi.ts
|
|
@@ -342,7 +354,7 @@ function getSpawnConfig(input) {
|
|
|
342
354
|
function listMcpSupportedAgents() {
|
|
343
355
|
const supported = [];
|
|
344
356
|
for (const config of allSpawnConfigs) {
|
|
345
|
-
if (config.kind !== "cli" || typeof config.mcpArgs !== "function") {
|
|
357
|
+
if (config.kind !== "cli" || typeof config.mcpArgs !== "function" && typeof config.mcpEnv !== "function") {
|
|
346
358
|
continue;
|
|
347
359
|
}
|
|
348
360
|
supported.push(config.agentId);
|
|
@@ -379,9 +391,12 @@ function getMcpArgs(config, servers) {
|
|
|
379
391
|
if (!hasMcpServers(servers)) {
|
|
380
392
|
return [];
|
|
381
393
|
}
|
|
382
|
-
if (!config.mcpArgs) {
|
|
394
|
+
if (!config.mcpArgs && !config.mcpEnv) {
|
|
383
395
|
throw new Error(formatUnsupportedMcpSpawnMessage(config.agentId));
|
|
384
396
|
}
|
|
397
|
+
if (!config.mcpArgs) {
|
|
398
|
+
return [];
|
|
399
|
+
}
|
|
385
400
|
return config.mcpArgs(servers);
|
|
386
401
|
}
|
|
387
402
|
function formatUnsupportedMcpSpawnMessage(agentId) {
|
|
@@ -1712,7 +1727,8 @@ var CODEX_MODELS = [
|
|
|
1712
1727
|
var DEFAULT_CODEX_MODEL = CODEX_MODELS[0];
|
|
1713
1728
|
var KIMI_MODELS = [
|
|
1714
1729
|
"novitaai/kimi-k2.5",
|
|
1715
|
-
"novitaai/kimi-k2-thinking"
|
|
1730
|
+
"novitaai/kimi-k2-thinking",
|
|
1731
|
+
"novitaai/kimi-k2.5-fw"
|
|
1716
1732
|
];
|
|
1717
1733
|
var DEFAULT_KIMI_MODEL = KIMI_MODELS[0];
|
|
1718
1734
|
|