poe-code 3.0.137 → 3.0.138

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 CHANGED
@@ -14650,8 +14650,8 @@ async function runPoeCodeCommand(args, cwd, runner) {
14650
14650
  }
14651
14651
  async function setupWorkflowAgent(automation, cwd, runner = runCommand) {
14652
14652
  const agent2 = resolveWorkflowAgent(automation);
14653
- await runPoeCodeCommand(["install", agent2, "--yes", "--verbose"], cwd, runner);
14654
- await runPoeCodeCommand(["configure", agent2, "--yes", "--verbose"], cwd, runner);
14653
+ await runPoeCodeCommand(["install", agent2, "--yes"], cwd, runner);
14654
+ await runPoeCodeCommand(["configure", agent2, "--yes"], cwd, runner);
14655
14655
  return agent2;
14656
14656
  }
14657
14657
  var init_setup_agent = __esm({
@@ -14898,7 +14898,7 @@ async function selectAutomationName(message2, automations) {
14898
14898
  }
14899
14899
  return selected;
14900
14900
  }
14901
- var UPSTREAM_REPO, builtInPromptsDirCandidates, builtInWorkflowTemplatesDirCandidates, originalMustacheEscape, installableAutomations, runCommandDef, listCommand, installCommand, uninstallCommand, checkUserAllowCommand, requireCommentPrefixCommand, setupAgentCommand, promptPreviewCommand, execGroup, ghGroup;
14901
+ var UPSTREAM_REPO, builtInPromptsDirCandidates, builtInWorkflowTemplatesDirCandidates, originalMustacheEscape, installableAutomations, runCommandDef, listCommand, installCommand, uninstallCommand, requireUserAllowCommand, requireCommentPrefixCommand, prepareCommand, promptPreviewCommand, ghGroup;
14902
14902
  var init_commands = __esm({
14903
14903
  "packages/github-workflows/src/commands.ts"() {
14904
14904
  "use strict";
@@ -15053,14 +15053,12 @@ var init_commands = __esm({
15053
15053
  const automations = await discoverAutomations(await resolveBuiltInPromptsDir());
15054
15054
  return automations.map((a) => ({ label: a.label ?? formatLabel(a.name), value: a.name }));
15055
15055
  }
15056
- }),
15057
- eject: S2.Optional(S2.Boolean())
15056
+ })
15058
15057
  }),
15059
15058
  scope: ["cli"],
15060
15059
  handler: async ({ params }) => {
15061
15060
  const name = params.name;
15062
- const isEject = params.eject === true;
15063
- const variant = isEject ? "ejected" : "caller";
15061
+ const variant = "ejected";
15064
15062
  const [workflowTemplate, rawPrompt] = await Promise.all([
15065
15063
  readBuiltInWorkflowTemplate(name, variant),
15066
15064
  readBuiltInPromptFile(name)
@@ -15069,30 +15067,21 @@ var init_commands = __esm({
15069
15067
  const workflowPath = path28.join(cwd, ".github", "workflows", `poe-code-${name}.yml`);
15070
15068
  await mkdir10(path28.dirname(workflowPath), { recursive: true });
15071
15069
  await writeFile6(workflowPath, workflowTemplate, "utf8");
15072
- let promptPath;
15073
- if (isEject) {
15074
- promptPath = path28.join(projectPromptsDir(cwd), `poe-code-${name}.md`);
15075
- await mkdir10(path28.dirname(promptPath), { recursive: true });
15076
- await writeFile6(promptPath, addPromptHeader(rawPrompt, name), "utf8");
15077
- }
15070
+ const promptPath = path28.join(projectPromptsDir(cwd), `poe-code-${name}.md`);
15071
+ await mkdir10(path28.dirname(promptPath), { recursive: true });
15072
+ await writeFile6(promptPath, addPromptHeader(rawPrompt, name), "utf8");
15078
15073
  return {
15079
15074
  name,
15080
15075
  workflowPath,
15081
15076
  promptPath,
15082
- ejected: isEject,
15083
15077
  promptContent: rawPrompt
15084
15078
  };
15085
15079
  },
15086
15080
  render: {
15087
15081
  rich: (result, { logger: logger2, note: note2 }) => {
15088
15082
  logger2.success(`Installed workflow at ${result.workflowPath}`);
15089
- if (result.promptPath !== void 0) {
15090
- logger2.message(`Prompt copied to ${result.promptPath}`);
15091
- }
15083
+ logger2.message(`Prompt copied to ${result.promptPath}`);
15092
15084
  note2(result.promptContent, "Default prompt");
15093
- if (!result.ejected) {
15094
- logger2.message(`To customize the prompt, run: poe-code github-workflows install ${result.name} --eject`);
15095
- }
15096
15085
  },
15097
15086
  json: (result) => result
15098
15087
  }
@@ -15132,8 +15121,8 @@ var init_commands = __esm({
15132
15121
  json: (result) => result
15133
15122
  }
15134
15123
  });
15135
- checkUserAllowCommand = defineCommand({
15136
- name: "check-user-allow",
15124
+ requireUserAllowCommand = defineCommand({
15125
+ name: "require-user-allow",
15137
15126
  description: "Fail when COMMENT_AUTHOR_ASSOCIATION is not allowed by the automation frontmatter.",
15138
15127
  positional: ["name"],
15139
15128
  params: S2.Object({
@@ -15160,8 +15149,8 @@ var init_commands = __esm({
15160
15149
  return null;
15161
15150
  }
15162
15151
  });
15163
- setupAgentCommand = defineCommand({
15164
- name: "setup-agent",
15152
+ prepareCommand = defineCommand({
15153
+ name: "prepare",
15165
15154
  description: "Install and configure the agent required by a workflow automation.",
15166
15155
  positional: ["name"],
15167
15156
  params: S2.Object({
@@ -15200,17 +15189,20 @@ var init_commands = __esm({
15200
15189
  json: (result) => result
15201
15190
  }
15202
15191
  });
15203
- execGroup = defineGroup({
15204
- name: "exec",
15205
- description: "Workflow step helpers.",
15206
- scope: ["cli"],
15207
- children: [checkUserAllowCommand, requireCommentPrefixCommand, setupAgentCommand]
15208
- });
15209
15192
  ghGroup = defineGroup({
15210
15193
  name: "github-workflows",
15211
15194
  aliases: ["gh"],
15212
15195
  description: "GitHub workflow automations.",
15213
- children: [runCommandDef, listCommand, installCommand, uninstallCommand, promptPreviewCommand, execGroup],
15196
+ children: [
15197
+ runCommandDef,
15198
+ prepareCommand,
15199
+ requireUserAllowCommand,
15200
+ requireCommentPrefixCommand,
15201
+ listCommand,
15202
+ installCommand,
15203
+ uninstallCommand,
15204
+ promptPreviewCommand
15205
+ ],
15214
15206
  default: runCommandDef
15215
15207
  });
15216
15208
  }
@@ -28080,7 +28072,7 @@ var init_package = __esm({
28080
28072
  "package.json"() {
28081
28073
  package_default = {
28082
28074
  name: "poe-code",
28083
- version: "3.0.137",
28075
+ version: "3.0.138",
28084
28076
  description: "CLI tool to configure Poe API for developer workflows.",
28085
28077
  type: "module",
28086
28078
  main: "./dist/index.js",