poe-code 3.0.202 → 3.0.204
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/commands/braintrust.d.ts +3 -0
- package/dist/cli/commands/braintrust.js +77 -0
- package/dist/cli/commands/braintrust.js.map +1 -0
- package/dist/cli/commands/configure.d.ts +1 -0
- package/dist/cli/commands/configure.js +197 -0
- package/dist/cli/commands/configure.js.map +1 -1
- package/dist/cli/commands/experiment.js +51 -7
- package/dist/cli/commands/experiment.js.map +1 -1
- package/dist/cli/commands/harness.d.ts +3 -0
- package/dist/cli/commands/harness.js +260 -0
- package/dist/cli/commands/harness.js.map +1 -0
- package/dist/cli/commands/pipeline.js +58 -24
- package/dist/cli/commands/pipeline.js.map +1 -1
- package/dist/cli/commands/ralph.js +19 -7
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/runtime/build.d.ts +7 -0
- package/dist/cli/commands/runtime/build.js +128 -0
- package/dist/cli/commands/runtime/build.js.map +1 -0
- package/dist/cli/commands/runtime/index.d.ts +3 -0
- package/dist/cli/commands/runtime/index.js +14 -0
- package/dist/cli/commands/runtime/index.js.map +1 -0
- package/dist/cli/commands/runtime/init.d.ts +7 -0
- package/dist/cli/commands/runtime/init.js +39 -0
- package/dist/cli/commands/runtime/init.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/attach.d.ts +3 -0
- package/dist/cli/commands/runtime/jobs/attach.js +35 -0
- package/dist/cli/commands/runtime/jobs/attach.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/index.d.ts +3 -0
- package/dist/cli/commands/runtime/jobs/index.js +16 -0
- package/dist/cli/commands/runtime/jobs/index.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/logs.d.ts +3 -0
- package/dist/cli/commands/runtime/jobs/logs.js +27 -0
- package/dist/cli/commands/runtime/jobs/logs.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/ls.d.ts +3 -0
- package/dist/cli/commands/runtime/jobs/ls.js +60 -0
- package/dist/cli/commands/runtime/jobs/ls.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/sandbox.d.ts +3 -0
- package/dist/cli/commands/runtime/jobs/sandbox.js +15 -0
- package/dist/cli/commands/runtime/jobs/sandbox.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/shared.d.ts +22 -0
- package/dist/cli/commands/runtime/jobs/shared.js +124 -0
- package/dist/cli/commands/runtime/jobs/shared.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/stop.d.ts +3 -0
- package/dist/cli/commands/runtime/jobs/stop.js +31 -0
- package/dist/cli/commands/runtime/jobs/stop.js.map +1 -0
- package/dist/cli/commands/runtime/jobs/sync.d.ts +3 -0
- package/dist/cli/commands/runtime/jobs/sync.js +25 -0
- package/dist/cli/commands/runtime/jobs/sync.js.map +1 -0
- package/dist/cli/commands/runtime/shared.d.ts +20 -0
- package/dist/cli/commands/runtime/shared.js +69 -0
- package/dist/cli/commands/runtime/shared.js.map +1 -0
- package/dist/cli/commands/runtime/templates/clear.d.ts +3 -0
- package/dist/cli/commands/runtime/templates/clear.js +53 -0
- package/dist/cli/commands/runtime/templates/clear.js.map +1 -0
- package/dist/cli/commands/runtime/templates/index.d.ts +3 -0
- package/dist/cli/commands/runtime/templates/index.js +10 -0
- package/dist/cli/commands/runtime/templates/index.js.map +1 -0
- package/dist/cli/commands/runtime/templates/ls.d.ts +3 -0
- package/dist/cli/commands/runtime/templates/ls.js +52 -0
- package/dist/cli/commands/runtime/templates/ls.js.map +1 -0
- package/dist/cli/commands/runtime-options.d.ts +11 -0
- package/dist/cli/commands/runtime-options.js +26 -0
- package/dist/cli/commands/runtime-options.js.map +1 -0
- package/dist/cli/commands/spawn.js +36 -7
- package/dist/cli/commands/spawn.js.map +1 -1
- package/dist/cli/program.js +17 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/index.js +70879 -47381
- package/dist/index.js.map +4 -4
- package/dist/providers/claude-code.js +3486 -852
- package/dist/providers/claude-code.js.map +4 -4
- package/dist/providers/codex.js +3486 -852
- package/dist/providers/codex.js.map +4 -4
- package/dist/providers/goose.js +3432 -798
- package/dist/providers/goose.js.map +4 -4
- package/dist/providers/kimi.js +3486 -852
- package/dist/providers/kimi.js.map +4 -4
- package/dist/providers/opencode.js +3486 -852
- package/dist/providers/opencode.js.map +4 -4
- package/dist/providers/poe-agent.js +20641 -17147
- package/dist/providers/poe-agent.js.map +4 -4
- package/dist/providers/spawn-options.d.ts +10 -1
- package/dist/sdk/experiment.js +6 -0
- package/dist/sdk/experiment.js.map +1 -1
- package/dist/sdk/ralph.js +108 -11
- package/dist/sdk/ralph.js.map +1 -1
- package/dist/sdk/spawn.js +27 -4
- package/dist/sdk/spawn.js.map +1 -1
- package/dist/sdk/types.d.ts +23 -1
- package/dist/utils/command-checks.js +2 -29
- package/dist/utils/command-checks.js.map +1 -1
- package/package.json +12 -7
- package/packages/design-system/dist/components/help-formatter-plain.d.ts +4 -0
- package/packages/design-system/dist/components/help-formatter-plain.js +132 -0
- package/packages/design-system/dist/components/help-formatter.d.ts +13 -0
- package/packages/design-system/dist/components/help-formatter.js +116 -7
- package/packages/design-system/dist/components/index.d.ts +2 -2
- package/packages/design-system/dist/components/index.js +1 -1
- package/packages/design-system/dist/components/text.d.ts +1 -0
- package/packages/design-system/dist/components/text.js +8 -0
- package/packages/design-system/dist/index.d.ts +3 -2
- package/packages/design-system/dist/index.js +2 -1
- package/packages/memory/dist/index.js +3406 -387
- package/packages/memory/dist/index.js.map +4 -4
- package/packages/superintendent/dist/commands/run.d.ts +45 -0
- package/packages/superintendent/dist/commands/run.js +133 -38
- package/packages/superintendent/dist/commands/superintendent-group.d.ts +36 -0
- package/packages/superintendent/dist/runtime/agent-runner.d.ts +31 -0
- package/packages/superintendent/dist/runtime/agent-runner.js +121 -0
- package/packages/superintendent/dist/runtime/loop.d.ts +7 -1
- package/packages/superintendent/dist/runtime/loop.js +3 -11
- package/packages/superintendent/dist/runtime/run-builder.d.ts +1 -0
- package/packages/superintendent/dist/runtime/run-builder.js +3 -25
- package/packages/superintendent/dist/runtime/run-inspector.d.ts +1 -0
- package/packages/superintendent/dist/runtime/run-inspector.js +3 -25
- package/packages/superintendent/dist/runtime/run-owner-review.d.ts +1 -0
- package/packages/superintendent/dist/runtime/run-owner-review.js +3 -25
- package/packages/superintendent/dist/runtime/run-superintendent.d.ts +1 -0
- package/packages/superintendent/dist/runtime/run-superintendent.js +3 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type McpSpawnConfig } from "@poe-code/agent-spawn";
|
|
2
1
|
import { type LoopState } from "../state/machine.js";
|
|
2
|
+
import { type McpSpawnConfig } from "./agent-runner.js";
|
|
3
3
|
import { runBuilder, type BuilderResult } from "./run-builder.js";
|
|
4
4
|
import { runInspector, type InspectorResult } from "./run-inspector.js";
|
|
5
5
|
import { runOwnerReview, type OwnerResult } from "./run-owner-review.js";
|
|
@@ -32,6 +32,12 @@ export interface AgentRunInput {
|
|
|
32
32
|
cwd: string;
|
|
33
33
|
mode?: string;
|
|
34
34
|
mcpServers?: McpSpawnConfig;
|
|
35
|
+
runtime?: "host" | "docker" | "e2b";
|
|
36
|
+
runtimeImage?: string;
|
|
37
|
+
runtimeTemplate?: string;
|
|
38
|
+
detach?: boolean;
|
|
39
|
+
mountPoeCode?: boolean;
|
|
40
|
+
runnerSync?: "both" | "upload" | "none";
|
|
35
41
|
signal?: AbortSignal;
|
|
36
42
|
logPath?: string;
|
|
37
43
|
onStdout?: (chunk: string) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import * as fsPromises from "node:fs/promises";
|
|
3
3
|
import { lockWorkflow, makeRunLogFileName, resolveWorkflowPath } from "@poe-code/agent-harness-tools";
|
|
4
|
-
import { spawn } from "@poe-code/agent-spawn";
|
|
5
4
|
import { parseSuperintendentDoc } from "../document/parse.js";
|
|
6
5
|
import { parseTaskBoard } from "../document/tasks.js";
|
|
7
6
|
import { updateStatus } from "../document/write.js";
|
|
8
7
|
import { createLoopState } from "../state/machine.js";
|
|
8
|
+
import { withAutonomousAgentRunner } from "./agent-runner.js";
|
|
9
9
|
import { runBuilder } from "./run-builder.js";
|
|
10
10
|
import { runInspector } from "./run-inspector.js";
|
|
11
11
|
import { runOwnerReview } from "./run-owner-review.js";
|
|
@@ -417,9 +417,7 @@ async function withInjectedAgentRunner(options, operation) {
|
|
|
417
417
|
if (!options.runAgent) {
|
|
418
418
|
return operation();
|
|
419
419
|
}
|
|
420
|
-
|
|
421
|
-
const originalAutonomous = spawnApi.autonomous;
|
|
422
|
-
spawnApi.autonomous = async (agent, input) => {
|
|
420
|
+
return withAutonomousAgentRunner(async (agent, input) => {
|
|
423
421
|
const result = await options.runAgent?.({
|
|
424
422
|
agent,
|
|
425
423
|
prompt: input.prompt,
|
|
@@ -436,11 +434,5 @@ async function withInjectedAgentRunner(options, operation) {
|
|
|
436
434
|
throw new Error(result.stderr || result.stdout || `Agent \`${agent}\` failed with exit code ${result.exitCode}`);
|
|
437
435
|
}
|
|
438
436
|
return result;
|
|
439
|
-
};
|
|
440
|
-
try {
|
|
441
|
-
return await operation();
|
|
442
|
-
}
|
|
443
|
-
finally {
|
|
444
|
-
spawnApi.autonomous = originalAutonomous;
|
|
445
|
-
}
|
|
437
|
+
}, operation);
|
|
446
438
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@poe-code/agent-spawn/register-factories";
|
|
2
|
+
import { runAutonomousAgent } from "./agent-runner.js";
|
|
2
3
|
import { resolveRoleCwd } from "./resolve-cwd.js";
|
|
3
4
|
import { resolveTemplate } from "./templates.js";
|
|
4
5
|
export async function runBuilder(doc, context, options) {
|
|
5
6
|
const prompt = options.promptOverride ??
|
|
6
7
|
resolveTemplate(doc.frontmatter.builder.prompt, buildTemplateContext(doc, context));
|
|
7
|
-
const result = await
|
|
8
|
+
const result = await runAutonomousAgent({
|
|
8
9
|
agent: doc.frontmatter.builder.agent,
|
|
9
10
|
mode: doc.frontmatter.builder.mode,
|
|
10
11
|
prompt,
|
|
@@ -46,29 +47,6 @@ function buildTemplateContext(doc, context) {
|
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
async function runAutonomous(input) {
|
|
50
|
-
const spawnApi = spawn;
|
|
51
|
-
if (typeof spawnApi.autonomous === "function") {
|
|
52
|
-
return spawnApi.autonomous(input.agent, {
|
|
53
|
-
cwd: input.cwd,
|
|
54
|
-
prompt: input.prompt,
|
|
55
|
-
mode: input.mode,
|
|
56
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
57
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
const result = await spawn(input.agent, {
|
|
61
|
-
cwd: input.cwd,
|
|
62
|
-
prompt: input.prompt,
|
|
63
|
-
mode: input.mode,
|
|
64
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
65
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
66
|
-
});
|
|
67
|
-
return {
|
|
68
|
-
stdout: result.stdout,
|
|
69
|
-
...(result.logFile ? { logFile: result.logFile } : {})
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
50
|
function extractLog(result) {
|
|
73
51
|
if (typeof result === "string") {
|
|
74
52
|
return result;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@poe-code/agent-spawn/register-factories";
|
|
2
|
+
import { runAutonomousAgent } from "./agent-runner.js";
|
|
2
3
|
import { resolveRoleCwd } from "./resolve-cwd.js";
|
|
3
4
|
import { buildInspectorSystemPrompt, prependSystemPrompt } from "./system-prompt.js";
|
|
4
5
|
import { resolveTemplate } from "./templates.js";
|
|
@@ -17,7 +18,7 @@ export async function runInspector(name, config, doc, context, options) {
|
|
|
17
18
|
: {})
|
|
18
19
|
});
|
|
19
20
|
const prompt = prependSystemPrompt(systemPrompt, userPrompt);
|
|
20
|
-
const output = await
|
|
21
|
+
const output = await runAutonomousAgent({
|
|
21
22
|
agent: config.agent,
|
|
22
23
|
mode: config.mode,
|
|
23
24
|
prompt,
|
|
@@ -76,29 +77,6 @@ function buildTemplateContext(doc, context) {
|
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
|
-
async function runAutonomous(input) {
|
|
80
|
-
const spawnApi = spawn;
|
|
81
|
-
if (typeof spawnApi.autonomous === "function") {
|
|
82
|
-
return spawnApi.autonomous(input.agent, {
|
|
83
|
-
cwd: input.cwd,
|
|
84
|
-
prompt: input.prompt,
|
|
85
|
-
mode: input.mode,
|
|
86
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
87
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
const result = await spawn(input.agent, {
|
|
91
|
-
cwd: input.cwd,
|
|
92
|
-
prompt: input.prompt,
|
|
93
|
-
mode: input.mode,
|
|
94
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
95
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
96
|
-
});
|
|
97
|
-
return {
|
|
98
|
-
stdout: result.stdout,
|
|
99
|
-
...(result.logFile ? { logFile: result.logFile } : {})
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
80
|
function extractLogPath(result) {
|
|
103
81
|
if (typeof result === "string")
|
|
104
82
|
return undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@poe-code/agent-spawn/register-factories";
|
|
2
|
+
import { runAutonomousAgent } from "./agent-runner.js";
|
|
2
3
|
import { resolveRoleCwd } from "./resolve-cwd.js";
|
|
3
4
|
import { buildOwnerSystemPrompt, prependSystemPrompt } from "./system-prompt.js";
|
|
4
5
|
import { resolveTemplate } from "./templates.js";
|
|
@@ -10,7 +11,7 @@ const WORKFLOW_SERVER_TIMEOUT_SECONDS = 7200;
|
|
|
10
11
|
export async function runOwnerReview(doc, context, options) {
|
|
11
12
|
const userPrompt = resolveTemplate(doc.frontmatter.owner.prompt, buildTemplateContext(doc, context));
|
|
12
13
|
const prompt = prependSystemPrompt(buildOwnerSystemPrompt(), userPrompt);
|
|
13
|
-
const result = await
|
|
14
|
+
const result = await runAutonomousAgent({
|
|
14
15
|
agent: doc.frontmatter.owner.agent,
|
|
15
16
|
mode: doc.frontmatter.owner.mode,
|
|
16
17
|
prompt,
|
|
@@ -55,29 +56,6 @@ function toSpawnMcpServer(config) {
|
|
|
55
56
|
...(config.timeout !== undefined ? { timeout: config.timeout } : {})
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
|
-
async function runAutonomous(input) {
|
|
59
|
-
const spawnApi = spawn;
|
|
60
|
-
if (typeof spawnApi.autonomous === "function") {
|
|
61
|
-
return spawnApi.autonomous(input.agent, {
|
|
62
|
-
cwd: input.cwd,
|
|
63
|
-
prompt: input.prompt,
|
|
64
|
-
mode: input.mode,
|
|
65
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
66
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
const result = await spawn(input.agent, {
|
|
70
|
-
cwd: input.cwd,
|
|
71
|
-
prompt: input.prompt,
|
|
72
|
-
mode: input.mode,
|
|
73
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
74
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
75
|
-
});
|
|
76
|
-
return {
|
|
77
|
-
stdout: result.stdout,
|
|
78
|
-
...(result.logFile ? { logFile: result.logFile } : {})
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
59
|
function extractLogPath(result) {
|
|
82
60
|
if (typeof result === "string")
|
|
83
61
|
return undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@poe-code/agent-spawn/register-factories";
|
|
2
|
+
import { runAutonomousAgent } from "./agent-runner.js";
|
|
2
3
|
import { resolveRoleCwd } from "./resolve-cwd.js";
|
|
3
4
|
import { buildSuperintendentSystemPrompt, prependSystemPrompt } from "./system-prompt.js";
|
|
4
5
|
import { resolveTemplate } from "./templates.js";
|
|
@@ -14,7 +15,7 @@ export async function runSuperintendent(doc, context, options) {
|
|
|
14
15
|
inspectorNames: Object.keys(doc.frontmatter.inspectors ?? {})
|
|
15
16
|
});
|
|
16
17
|
const prompt = prependSystemPrompt(systemPrompt, userPrompt);
|
|
17
|
-
const result = await
|
|
18
|
+
const result = await runAutonomousAgent({
|
|
18
19
|
agent: doc.frontmatter.superintendent.agent,
|
|
19
20
|
mode: doc.frontmatter.superintendent.mode,
|
|
20
21
|
prompt,
|
|
@@ -71,29 +72,6 @@ function toSpawnMcpServer(config) {
|
|
|
71
72
|
...(config.timeout !== undefined ? { timeout: config.timeout } : {})
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
|
-
async function runAutonomous(input) {
|
|
75
|
-
const spawnApi = spawn;
|
|
76
|
-
if (typeof spawnApi.autonomous === "function") {
|
|
77
|
-
return spawnApi.autonomous(input.agent, {
|
|
78
|
-
cwd: input.cwd,
|
|
79
|
-
prompt: input.prompt,
|
|
80
|
-
mode: input.mode,
|
|
81
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
82
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
const result = await spawn(input.agent, {
|
|
86
|
-
cwd: input.cwd,
|
|
87
|
-
prompt: input.prompt,
|
|
88
|
-
mode: input.mode,
|
|
89
|
-
...(input.mcpServers ? { mcpServers: input.mcpServers } : {}),
|
|
90
|
-
...(input.logPath ? { logPath: input.logPath } : {})
|
|
91
|
-
});
|
|
92
|
-
return {
|
|
93
|
-
stdout: result.stdout,
|
|
94
|
-
...(result.logFile ? { logFile: result.logFile } : {})
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
75
|
function extractLogPath(result) {
|
|
98
76
|
if (typeof result === "string")
|
|
99
77
|
return undefined;
|