poe-code 3.0.130 → 3.0.132

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.
Files changed (49) hide show
  1. package/README.md +15 -1
  2. package/dist/cli/commands/spawn.js +175 -130
  3. package/dist/cli/commands/spawn.js.map +1 -1
  4. package/dist/cli/poe-agent-main.js +10 -9
  5. package/dist/cli/poe-agent-main.js.map +1 -1
  6. package/dist/cli/program.js +0 -2
  7. package/dist/cli/program.js.map +1 -1
  8. package/dist/codegen/agent-spawn-py-types.d.ts +19 -0
  9. package/dist/codegen/agent-spawn-py-types.js +330 -0
  10. package/dist/codegen/agent-spawn-py-types.js.map +1 -0
  11. package/dist/index.js +10217 -9564
  12. package/dist/index.js.map +4 -4
  13. package/dist/providers/claude-code.js +67 -33
  14. package/dist/providers/claude-code.js.map +4 -4
  15. package/dist/providers/codex.js +67 -33
  16. package/dist/providers/codex.js.map +4 -4
  17. package/dist/providers/create-provider.js +3 -3
  18. package/dist/providers/create-provider.js.map +1 -1
  19. package/dist/providers/kimi.js +76 -33
  20. package/dist/providers/kimi.js.map +4 -4
  21. package/dist/providers/opencode.js +67 -33
  22. package/dist/providers/opencode.js.map +4 -4
  23. package/dist/providers/poe-agent.js +13 -10
  24. package/dist/providers/poe-agent.js.map +3 -3
  25. package/dist/providers/spawn-options.d.ts +2 -0
  26. package/dist/sdk/experiment.js +23 -10
  27. package/dist/sdk/experiment.js.map +1 -1
  28. package/dist/sdk/launch.js +17 -1
  29. package/dist/sdk/launch.js.map +1 -1
  30. package/dist/sdk/pipeline.js +25 -11
  31. package/dist/sdk/pipeline.js.map +1 -1
  32. package/dist/sdk/ralph.js +23 -10
  33. package/dist/sdk/ralph.js.map +1 -1
  34. package/dist/sdk/spawn-core.d.ts +1 -1
  35. package/dist/sdk/spawn-core.js +54 -57
  36. package/dist/sdk/spawn-core.js.map +1 -1
  37. package/dist/sdk/spawn.js +95 -12
  38. package/dist/sdk/spawn.js.map +1 -1
  39. package/dist/sdk/types.d.ts +9 -1
  40. package/dist/workspace/resolve-spawn-workspace.d.ts +15 -0
  41. package/dist/workspace/resolve-spawn-workspace.js +28 -0
  42. package/dist/workspace/resolve-spawn-workspace.js.map +1 -0
  43. package/package.json +21 -3
  44. package/dist/cli/commands/research.d.ts +0 -13
  45. package/dist/cli/commands/research.js +0 -158
  46. package/dist/cli/commands/research.js.map +0 -1
  47. package/dist/sdk/research.d.ts +0 -62
  48. package/dist/sdk/research.js +0 -343
  49. package/dist/sdk/research.js.map +0 -1
@@ -32,16 +32,16 @@ var require_src = __commonJS({
32
32
  var CSI = `${ESC}[`;
33
33
  var beep = "\x07";
34
34
  var cursor = {
35
- to(x, y) {
36
- if (!y) return `${CSI}${x + 1}G`;
37
- return `${CSI}${y + 1};${x + 1}H`;
35
+ to(x, y2) {
36
+ if (!y2) return `${CSI}${x + 1}G`;
37
+ return `${CSI}${y2 + 1};${x + 1}H`;
38
38
  },
39
- move(x, y) {
39
+ move(x, y2) {
40
40
  let ret = "";
41
41
  if (x < 0) ret += `${CSI}${-x}D`;
42
42
  else if (x > 0) ret += `${CSI}${x}C`;
43
- if (y < 0) ret += `${CSI}${-y}A`;
44
- else if (y > 0) ret += `${CSI}${y}B`;
43
+ if (y2 < 0) ret += `${CSI}${-y2}A`;
44
+ else if (y2 > 0) ret += `${CSI}${y2}B`;
45
45
  return ret;
46
46
  },
47
47
  up: (count = 1) => `${CSI}${count}A`,
@@ -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
  });
@@ -283,7 +283,7 @@ function toTomlInlineTable(values) {
283
283
  return `{${parts.join(", ")}}`;
284
284
  }
285
285
  function serializeJsonMcpArgs(servers) {
286
- return ["--mcp-config", JSON.stringify({ mcpServers: toJsonMcpServers(servers) })];
286
+ return ["--mcp-servers", JSON.stringify({ mcpServers: toJsonMcpServers(servers) })];
287
287
  }
288
288
  function serializeOpenCodeMcpEnv(servers) {
289
289
  const mcp = {};
@@ -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) {
@@ -932,24 +947,30 @@ import * as clack from "@clack/prompts";
932
947
  // packages/design-system/src/prompts/primitives/cancel.ts
933
948
  import chalk8 from "chalk";
934
949
 
950
+ // node_modules/@clack/core/dist/index.mjs
951
+ import { styleText as y } from "node:util";
952
+ import { stdout as S, stdin as $ } from "node:process";
953
+ import * as _ from "node:readline";
954
+ import P from "node:readline";
955
+
956
+ // node_modules/fast-string-truncated-width/dist/index.js
957
+ var EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
958
+ var MODIFIER_RE = new RegExp("\\p{M}+", "gu");
959
+
960
+ // node_modules/fast-wrap-ansi/lib/main.js
961
+ var ANSI_ESCAPE_BELL = "\x07";
962
+ var ANSI_CSI = "[";
963
+ var ANSI_OSC = "]";
964
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
965
+ var GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
966
+
935
967
  // node_modules/@clack/core/dist/index.mjs
936
968
  var import_sisteransi = __toESM(require_src(), 1);
937
- import { stdout as R, stdin as q } from "node:process";
938
- import * as k from "node:readline";
939
- import ot from "node:readline";
940
- import { ReadStream as J } from "node:tty";
941
- var P = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
942
- var ct = new RegExp("\\p{M}+", "gu");
943
- var pt = { limit: 1 / 0, ellipsis: "" };
944
- var ft = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
945
- var j = "\x07";
946
- var Q = "[";
947
- var dt = "]";
948
- var U = `${dt}8;;`;
949
- var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
950
- var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
951
- var _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true };
952
- var bt = globalThis.process.platform.startsWith("win");
969
+ import { ReadStream as D } from "node:tty";
970
+ var E = ["up", "down", "left", "right", "space", "enter", "cancel"];
971
+ var G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
972
+ var u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
973
+ var Y = globalThis.process.platform.startsWith("win");
953
974
 
954
975
  // packages/design-system/src/prompts/primitives/intro.ts
955
976
  import chalk9 from "chalk";
@@ -972,9 +993,22 @@ import chalk15 from "chalk";
972
993
  // packages/agent-spawn/src/acp/spawn.ts
973
994
  import { spawn as spawnChildProcess3 } from "node:child_process";
974
995
 
996
+ // packages/poe-acp-client/src/acp-client.ts
997
+ import { isAbsolute } from "node:path";
998
+
999
+ // packages/poe-acp-client/src/acp-transport.ts
1000
+ import {
1001
+ spawn as spawnChildProcess4
1002
+ } from "node:child_process";
1003
+
1004
+ // packages/poe-acp-client/src/run-report.ts
1005
+ import * as fsPromises from "node:fs/promises";
1006
+ import { homedir } from "node:os";
1007
+ import { join } from "node:path";
1008
+
975
1009
  // packages/agent-spawn/src/acp/middlewares/spawn-log.ts
976
1010
  import path from "node:path";
977
- import { homedir } from "node:os";
1011
+ import { homedir as homedir2 } from "node:os";
978
1012
  import { mkdir, open } from "node:fs/promises";
979
1013
 
980
1014
  // src/utils/command-checks.ts
@@ -2067,9 +2101,9 @@ async function runInstallStep(step, context) {
2067
2101
 
2068
2102
  // src/providers/create-provider.ts
2069
2103
  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)),
2104
+ "py-poe-spawn/env.hbs": () => Promise.resolve().then(() => __toESM(require_env(), 1)),
2105
+ "py-poe-spawn/main.py.hbs": () => Promise.resolve().then(() => __toESM(require_main_py(), 1)),
2106
+ "py-poe-spawn/requirements.txt.hbs": () => Promise.resolve().then(() => __toESM(require_requirements_txt(), 1)),
2073
2107
  "codex/config.toml.hbs": () => Promise.resolve().then(() => __toESM(require_config_toml(), 1))
2074
2108
  };
2075
2109
  async function loadTemplate(templateId) {