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
  });
@@ -247,7 +247,7 @@ function toTomlInlineTable(values) {
247
247
  return `{${parts.join(", ")}}`;
248
248
  }
249
249
  function serializeJsonMcpArgs(servers) {
250
- return ["--mcp-config", JSON.stringify({ mcpServers: toJsonMcpServers(servers) })];
250
+ return ["--mcp-servers", JSON.stringify({ mcpServers: toJsonMcpServers(servers) })];
251
251
  }
252
252
  function serializeOpenCodeMcpEnv(servers) {
253
253
  const mcp = {};
@@ -360,6 +360,13 @@ var openCodeSpawnConfig = {
360
360
  resumeCommand: (threadId, cwd) => [cwd, "--session", threadId],
361
361
  mcpEnv: serializeOpenCodeMcpEnv
362
362
  };
363
+ var openCodeAcpSpawnConfig = {
364
+ kind: "acp",
365
+ agentId: "opencode",
366
+ acpArgs: ["acp"],
367
+ skipAuth: true,
368
+ mcpEnv: serializeOpenCodeMcpEnv
369
+ };
363
370
 
364
371
  // packages/agent-spawn/src/configs/kimi.ts
365
372
  var kimiSpawnConfig = {
@@ -388,6 +395,11 @@ var kimiSpawnConfig = {
388
395
  },
389
396
  resumeCommand: (threadId, cwd) => ["--session", threadId, "--work-dir", cwd]
390
397
  };
398
+ var kimiAcpSpawnConfig = {
399
+ kind: "acp",
400
+ agentId: "kimi",
401
+ acpArgs: ["acp"]
402
+ };
391
403
 
392
404
  // packages/agent-spawn/src/configs/index.ts
393
405
  var allSpawnConfigs = [
@@ -400,6 +412,9 @@ var lookup2 = /* @__PURE__ */ new Map();
400
412
  for (const config of allSpawnConfigs) {
401
413
  lookup2.set(config.agentId, config);
402
414
  }
415
+ var acpLookup = /* @__PURE__ */ new Map();
416
+ acpLookup.set(openCodeAcpSpawnConfig.agentId, openCodeAcpSpawnConfig);
417
+ acpLookup.set(kimiAcpSpawnConfig.agentId, kimiAcpSpawnConfig);
403
418
  function getSpawnConfig(input) {
404
419
  const resolvedId = resolveAgentId(input);
405
420
  if (!resolvedId) {
@@ -896,24 +911,30 @@ import * as clack from "@clack/prompts";
896
911
  // packages/design-system/src/prompts/primitives/cancel.ts
897
912
  import chalk8 from "chalk";
898
913
 
914
+ // node_modules/@clack/core/dist/index.mjs
915
+ import { styleText as y } from "node:util";
916
+ import { stdout as S, stdin as $ } from "node:process";
917
+ import * as _ from "node:readline";
918
+ import P from "node:readline";
919
+
920
+ // node_modules/fast-string-truncated-width/dist/index.js
921
+ 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");
922
+ var MODIFIER_RE = new RegExp("\\p{M}+", "gu");
923
+
924
+ // node_modules/fast-wrap-ansi/lib/main.js
925
+ var ANSI_ESCAPE_BELL = "\x07";
926
+ var ANSI_CSI = "[";
927
+ var ANSI_OSC = "]";
928
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
929
+ var GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
930
+
899
931
  // node_modules/@clack/core/dist/index.mjs
900
932
  var import_sisteransi = __toESM(require_src(), 1);
901
- import { stdout as R, stdin as q } from "node:process";
902
- import * as k from "node:readline";
903
- import ot from "node:readline";
904
- import { ReadStream as J } from "node:tty";
905
- 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");
906
- var ct = new RegExp("\\p{M}+", "gu");
907
- var pt = { limit: 1 / 0, ellipsis: "" };
908
- var ft = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
909
- var j = "\x07";
910
- var Q = "[";
911
- var dt = "]";
912
- var U = `${dt}8;;`;
913
- var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
914
- var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
915
- 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 };
916
- var bt = globalThis.process.platform.startsWith("win");
933
+ import { ReadStream as D } from "node:tty";
934
+ var E = ["up", "down", "left", "right", "space", "enter", "cancel"];
935
+ var G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
936
+ 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)}` } } };
937
+ var Y = globalThis.process.platform.startsWith("win");
917
938
 
918
939
  // packages/design-system/src/prompts/primitives/intro.ts
919
940
  import chalk9 from "chalk";
@@ -936,9 +957,22 @@ import chalk15 from "chalk";
936
957
  // packages/agent-spawn/src/acp/spawn.ts
937
958
  import { spawn as spawnChildProcess3 } from "node:child_process";
938
959
 
960
+ // packages/poe-acp-client/src/acp-client.ts
961
+ import { isAbsolute } from "node:path";
962
+
963
+ // packages/poe-acp-client/src/acp-transport.ts
964
+ import {
965
+ spawn as spawnChildProcess4
966
+ } from "node:child_process";
967
+
968
+ // packages/poe-acp-client/src/run-report.ts
969
+ import * as fsPromises from "node:fs/promises";
970
+ import { homedir } from "node:os";
971
+ import { join } from "node:path";
972
+
939
973
  // packages/agent-spawn/src/acp/middlewares/spawn-log.ts
940
974
  import path from "node:path";
941
- import { homedir } from "node:os";
975
+ import { homedir as homedir2 } from "node:os";
942
976
  import { mkdir, open } from "node:fs/promises";
943
977
 
944
978
  // src/utils/command-checks.ts
@@ -2063,9 +2097,9 @@ async function runInstallStep(step, context) {
2063
2097
 
2064
2098
  // src/providers/create-provider.ts
2065
2099
  var templateImports = {
2066
- "python/env.hbs": () => Promise.resolve().then(() => __toESM(require_env(), 1)),
2067
- "python/main.py.hbs": () => Promise.resolve().then(() => __toESM(require_main_py(), 1)),
2068
- "python/requirements.txt.hbs": () => Promise.resolve().then(() => __toESM(require_requirements_txt(), 1)),
2100
+ "py-poe-spawn/env.hbs": () => Promise.resolve().then(() => __toESM(require_env(), 1)),
2101
+ "py-poe-spawn/main.py.hbs": () => Promise.resolve().then(() => __toESM(require_main_py(), 1)),
2102
+ "py-poe-spawn/requirements.txt.hbs": () => Promise.resolve().then(() => __toESM(require_requirements_txt(), 1)),
2069
2103
  "codex/config.toml.hbs": () => Promise.resolve().then(() => __toESM(require_config_toml(), 1))
2070
2104
  };
2071
2105
  async function loadTemplate(templateId) {