poe-code 3.0.130 → 3.0.131

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.
@@ -80,23 +80,23 @@ var require_src = __commonJS({
80
80
  }
81
81
  });
82
82
 
83
- // src/templates/python/env.hbs
83
+ // src/templates/py-poe-spawn/env.hbs
84
84
  var require_env = __commonJS({
85
- "src/templates/python/env.hbs"(exports, module) {
85
+ "src/templates/py-poe-spawn/env.hbs"(exports, module) {
86
86
  module.exports = "POE_API_KEY={{apiKey}}\nPOE_BASE_URL=https://api.poe.com/v1\nMODEL={{model}}\n";
87
87
  }
88
88
  });
89
89
 
90
- // src/templates/python/main.py.hbs
90
+ // src/templates/py-poe-spawn/main.py.hbs
91
91
  var require_main_py = __commonJS({
92
- "src/templates/python/main.py.hbs"(exports, module) {
92
+ "src/templates/py-poe-spawn/main.py.hbs"(exports, module) {
93
93
  module.exports = 'import os\nfrom openai import OpenAI\nfrom dotenv import load_dotenv\n\nload_dotenv()\n\nclient = OpenAI(\n api_key=os.getenv("POE_API_KEY"),\n base_url=os.getenv("POE_BASE_URL")\n)\n\nresponse = client.chat.completions.create(\n model=os.getenv("MODEL", "{{model}}"),\n messages=[{"role": "user", "content": "Tell me a joke"}]\n)\n\nprint(response.choices[0].message.content)\n';
94
94
  }
95
95
  });
96
96
 
97
- // src/templates/python/requirements.txt.hbs
97
+ // src/templates/py-poe-spawn/requirements.txt.hbs
98
98
  var require_requirements_txt = __commonJS({
99
- "src/templates/python/requirements.txt.hbs"(exports, module) {
99
+ "src/templates/py-poe-spawn/requirements.txt.hbs"(exports, module) {
100
100
  module.exports = "openai>=1.0.0\npython-dotenv>=1.0.0\n";
101
101
  }
102
102
  });
@@ -396,6 +396,13 @@ var openCodeSpawnConfig = {
396
396
  resumeCommand: (threadId, cwd) => [cwd, "--session", threadId],
397
397
  mcpEnv: serializeOpenCodeMcpEnv
398
398
  };
399
+ var openCodeAcpSpawnConfig = {
400
+ kind: "acp",
401
+ agentId: "opencode",
402
+ acpArgs: ["acp"],
403
+ skipAuth: true,
404
+ mcpEnv: serializeOpenCodeMcpEnv
405
+ };
399
406
 
400
407
  // packages/agent-spawn/src/configs/kimi.ts
401
408
  var kimiSpawnConfig = {
@@ -424,6 +431,11 @@ var kimiSpawnConfig = {
424
431
  },
425
432
  resumeCommand: (threadId, cwd) => ["--session", threadId, "--work-dir", cwd]
426
433
  };
434
+ var kimiAcpSpawnConfig = {
435
+ kind: "acp",
436
+ agentId: "kimi",
437
+ acpArgs: ["acp"]
438
+ };
427
439
 
428
440
  // packages/agent-spawn/src/configs/index.ts
429
441
  var allSpawnConfigs = [
@@ -436,6 +448,9 @@ var lookup2 = /* @__PURE__ */ new Map();
436
448
  for (const config of allSpawnConfigs) {
437
449
  lookup2.set(config.agentId, config);
438
450
  }
451
+ var acpLookup = /* @__PURE__ */ new Map();
452
+ acpLookup.set(openCodeAcpSpawnConfig.agentId, openCodeAcpSpawnConfig);
453
+ acpLookup.set(kimiAcpSpawnConfig.agentId, kimiAcpSpawnConfig);
439
454
  function getSpawnConfig(input) {
440
455
  const resolvedId = resolveAgentId(input);
441
456
  if (!resolvedId) {
@@ -972,9 +987,22 @@ import chalk15 from "chalk";
972
987
  // packages/agent-spawn/src/acp/spawn.ts
973
988
  import { spawn as spawnChildProcess3 } from "node:child_process";
974
989
 
990
+ // packages/poe-acp-client/src/acp-client.ts
991
+ import { isAbsolute } from "node:path";
992
+
993
+ // packages/poe-acp-client/src/acp-transport.ts
994
+ import {
995
+ spawn as spawnChildProcess4
996
+ } from "node:child_process";
997
+
998
+ // packages/poe-acp-client/src/run-report.ts
999
+ import * as fsPromises from "node:fs/promises";
1000
+ import { homedir } from "node:os";
1001
+ import { join } from "node:path";
1002
+
975
1003
  // packages/agent-spawn/src/acp/middlewares/spawn-log.ts
976
1004
  import path from "node:path";
977
- import { homedir } from "node:os";
1005
+ import { homedir as homedir2 } from "node:os";
978
1006
  import { mkdir, open } from "node:fs/promises";
979
1007
 
980
1008
  // src/utils/command-checks.ts
@@ -2067,9 +2095,9 @@ async function runInstallStep(step, context) {
2067
2095
 
2068
2096
  // src/providers/create-provider.ts
2069
2097
  var templateImports = {
2070
- "python/env.hbs": () => Promise.resolve().then(() => __toESM(require_env(), 1)),
2071
- "python/main.py.hbs": () => Promise.resolve().then(() => __toESM(require_main_py(), 1)),
2072
- "python/requirements.txt.hbs": () => Promise.resolve().then(() => __toESM(require_requirements_txt(), 1)),
2098
+ "py-poe-spawn/env.hbs": () => Promise.resolve().then(() => __toESM(require_env(), 1)),
2099
+ "py-poe-spawn/main.py.hbs": () => Promise.resolve().then(() => __toESM(require_main_py(), 1)),
2100
+ "py-poe-spawn/requirements.txt.hbs": () => Promise.resolve().then(() => __toESM(require_requirements_txt(), 1)),
2073
2101
  "codex/config.toml.hbs": () => Promise.resolve().then(() => __toESM(require_config_toml(), 1))
2074
2102
  };
2075
2103
  async function loadTemplate(templateId) {