poe-code 3.0.214 → 3.0.215
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/index.js +39 -13
- package/dist/index.js.map +3 -3
- package/dist/prompts/github-issue-opened.md +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50392,6 +50392,29 @@ function buildPerItemTemplateContext(item, sharedContext) {
|
|
|
50392
50392
|
function renderPrompt(template2, view) {
|
|
50393
50393
|
return Mustache3.render(template2, view);
|
|
50394
50394
|
}
|
|
50395
|
+
function requireSuccessfulRuns(name, items) {
|
|
50396
|
+
const succeeded = items.filter((item) => item.result.exitCode === 0).length;
|
|
50397
|
+
if (succeeded === items.length) {
|
|
50398
|
+
return;
|
|
50399
|
+
}
|
|
50400
|
+
const firstFailure = items.find((item) => item.result.exitCode !== 0);
|
|
50401
|
+
const details = [
|
|
50402
|
+
`Automation "${name}" failed: ${succeeded}/${items.length} spawned agent runs exited successfully.`
|
|
50403
|
+
];
|
|
50404
|
+
if (firstFailure !== void 0) {
|
|
50405
|
+
details.push(`First failure exited with code ${firstFailure.result.exitCode}.`);
|
|
50406
|
+
appendCommandOutput(details, "stderr", firstFailure.result.stderr);
|
|
50407
|
+
appendCommandOutput(details, "stdout", firstFailure.result.stdout);
|
|
50408
|
+
}
|
|
50409
|
+
throw new UserError(details.join("\n"));
|
|
50410
|
+
}
|
|
50411
|
+
function appendCommandOutput(details, label, output) {
|
|
50412
|
+
const trimmed = output.trim();
|
|
50413
|
+
if (trimmed.length === 0) {
|
|
50414
|
+
return;
|
|
50415
|
+
}
|
|
50416
|
+
details.push(`${label}:`, trimmed);
|
|
50417
|
+
}
|
|
50395
50418
|
function resolveSourceCommand(source, env) {
|
|
50396
50419
|
const repo = env.get("GITHUB_REPOSITORY");
|
|
50397
50420
|
if (repo === void 0) {
|
|
@@ -50588,21 +50611,23 @@ var init_commands2 = __esm({
|
|
|
50588
50611
|
const sharedTemplateContext = { ...variables, ...buildTemplateContext5(env) };
|
|
50589
50612
|
if (automation.source === void 0) {
|
|
50590
50613
|
const prompt = renderPrompt(automation.prompt, sharedTemplateContext);
|
|
50614
|
+
const items2 = [
|
|
50615
|
+
{
|
|
50616
|
+
prompt,
|
|
50617
|
+
result: await spawn4(agent2, {
|
|
50618
|
+
prompt,
|
|
50619
|
+
cwd,
|
|
50620
|
+
...params.model === void 0 ? {} : { model: params.model },
|
|
50621
|
+
...params.mode === void 0 ? {} : { mode: params.mode },
|
|
50622
|
+
...automation.mcp === void 0 ? {} : { mcpServers: resolveMcpConfig(automation.mcp, env) }
|
|
50623
|
+
})
|
|
50624
|
+
}
|
|
50625
|
+
];
|
|
50626
|
+
requireSuccessfulRuns(automation.name, items2);
|
|
50591
50627
|
return {
|
|
50592
50628
|
automation: automation.name,
|
|
50593
50629
|
agent: agent2,
|
|
50594
|
-
items:
|
|
50595
|
-
{
|
|
50596
|
-
prompt,
|
|
50597
|
-
result: await spawn4(agent2, {
|
|
50598
|
-
prompt,
|
|
50599
|
-
cwd,
|
|
50600
|
-
...params.model === void 0 ? {} : { model: params.model },
|
|
50601
|
-
...params.mode === void 0 ? {} : { mode: params.mode },
|
|
50602
|
-
...automation.mcp === void 0 ? {} : { mcpServers: resolveMcpConfig(automation.mcp, env) }
|
|
50603
|
-
})
|
|
50604
|
-
}
|
|
50605
|
-
]
|
|
50630
|
+
items: items2
|
|
50606
50631
|
};
|
|
50607
50632
|
}
|
|
50608
50633
|
const sourceResult = await runCommand("sh", ["-c", resolveSourceCommand(automation.source, env)], {
|
|
@@ -50629,6 +50654,7 @@ var init_commands2 = __esm({
|
|
|
50629
50654
|
})
|
|
50630
50655
|
});
|
|
50631
50656
|
}
|
|
50657
|
+
requireSuccessfulRuns(automation.name, results);
|
|
50632
50658
|
return {
|
|
50633
50659
|
automation: automation.name,
|
|
50634
50660
|
agent: agent2,
|
|
@@ -81683,7 +81709,7 @@ var init_package2 = __esm({
|
|
|
81683
81709
|
"package.json"() {
|
|
81684
81710
|
package_default2 = {
|
|
81685
81711
|
name: "poe-code",
|
|
81686
|
-
version: "3.0.
|
|
81712
|
+
version: "3.0.215",
|
|
81687
81713
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
81688
81714
|
type: "module",
|
|
81689
81715
|
main: "./dist/index.js",
|