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.
- package/README.md +15 -1
- package/dist/cli/commands/spawn.js +175 -130
- package/dist/cli/commands/spawn.js.map +1 -1
- package/dist/cli/poe-agent-main.js +10 -9
- package/dist/cli/poe-agent-main.js.map +1 -1
- package/dist/cli/program.js +0 -2
- package/dist/cli/program.js.map +1 -1
- package/dist/codegen/agent-spawn-py-types.d.ts +19 -0
- package/dist/codegen/agent-spawn-py-types.js +330 -0
- package/dist/codegen/agent-spawn-py-types.js.map +1 -0
- package/dist/index.js +10217 -9564
- package/dist/index.js.map +4 -4
- package/dist/providers/claude-code.js +67 -33
- package/dist/providers/claude-code.js.map +4 -4
- package/dist/providers/codex.js +67 -33
- package/dist/providers/codex.js.map +4 -4
- package/dist/providers/create-provider.js +3 -3
- package/dist/providers/create-provider.js.map +1 -1
- package/dist/providers/kimi.js +76 -33
- package/dist/providers/kimi.js.map +4 -4
- package/dist/providers/opencode.js +67 -33
- package/dist/providers/opencode.js.map +4 -4
- package/dist/providers/poe-agent.js +13 -10
- package/dist/providers/poe-agent.js.map +3 -3
- package/dist/providers/spawn-options.d.ts +2 -0
- package/dist/sdk/experiment.js +23 -10
- package/dist/sdk/experiment.js.map +1 -1
- package/dist/sdk/launch.js +17 -1
- package/dist/sdk/launch.js.map +1 -1
- package/dist/sdk/pipeline.js +25 -11
- package/dist/sdk/pipeline.js.map +1 -1
- package/dist/sdk/ralph.js +23 -10
- package/dist/sdk/ralph.js.map +1 -1
- package/dist/sdk/spawn-core.d.ts +1 -1
- package/dist/sdk/spawn-core.js +54 -57
- package/dist/sdk/spawn-core.js.map +1 -1
- package/dist/sdk/spawn.js +95 -12
- package/dist/sdk/spawn.js.map +1 -1
- package/dist/sdk/types.d.ts +9 -1
- package/dist/workspace/resolve-spawn-workspace.d.ts +15 -0
- package/dist/workspace/resolve-spawn-workspace.js +28 -0
- package/dist/workspace/resolve-spawn-workspace.js.map +1 -0
- package/package.json +21 -3
- package/dist/cli/commands/research.d.ts +0 -13
- package/dist/cli/commands/research.js +0 -158
- package/dist/cli/commands/research.js.map +0 -1
- package/dist/sdk/research.d.ts +0 -62
- package/dist/sdk/research.js +0 -343
- 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,
|
|
36
|
-
if (!
|
|
37
|
-
return `${CSI}${
|
|
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,
|
|
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 (
|
|
44
|
-
else if (
|
|
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/
|
|
83
|
+
// src/templates/py-poe-spawn/env.hbs
|
|
84
84
|
var require_env = __commonJS({
|
|
85
|
-
"src/templates/
|
|
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/
|
|
90
|
+
// src/templates/py-poe-spawn/main.py.hbs
|
|
91
91
|
var require_main_py = __commonJS({
|
|
92
|
-
"src/templates/
|
|
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/
|
|
97
|
+
// src/templates/py-poe-spawn/requirements.txt.hbs
|
|
98
98
|
var require_requirements_txt = __commonJS({
|
|
99
|
-
"src/templates/
|
|
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-
|
|
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 {
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
var
|
|
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
|
-
"
|
|
2067
|
-
"
|
|
2068
|
-
"
|
|
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) {
|