pi-baton 0.2.3 → 0.3.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project follows semantic versioning.
6
6
 
7
+ ## [0.3.0] - 2026-06-18
8
+
9
+ ### Added
10
+
11
+ - `/baton:new` re-prompts for a workflow name when the derived filename collides with an existing scaffold.
12
+ - Tests for lazy `.pi/baton/workflows/` creation and kebab-case filename derivation.
13
+
14
+ ### Changed
15
+
16
+ - Workflow discovery keeps user-defined `.pi/baton/workflows/*.yaml` entries ahead of builtin package workflows in selection order.
17
+
7
18
  ## [0.2.3] - 2026-06-13
8
19
 
9
20
  ### Added
@@ -35,24 +35,30 @@ export default function (pi: ExtensionAPI) {
35
35
  try {
36
36
  await ensureBatonScaffolding(ctx.cwd);
37
37
 
38
- const displayName = await ctx.ui.input("Workflow name:", "My Review Loop");
39
- if (displayName === undefined) return;
40
-
41
- const trimmed = displayName.trim();
42
- if (!trimmed) {
43
- ctx.ui.notify("Workflow name is required.", "warning");
44
- return;
38
+ while (true) {
39
+ const displayName = await ctx.ui.input("Workflow name:", "My Review Loop");
40
+ if (displayName === undefined) return;
41
+
42
+ const trimmed = displayName.trim();
43
+ if (!trimmed) {
44
+ ctx.ui.notify("Workflow name is required.", "warning");
45
+ continue;
46
+ }
47
+
48
+ try {
49
+ const { filePath } = await createWorkflowScaffold(ctx.cwd, trimmed);
50
+ await openWorkflowEditor(ctx, filePath);
51
+ ctx.ui.notify(`Created workflow scaffold: ${filePath}`, "info");
52
+ return;
53
+ } catch (error) {
54
+ if (error instanceof WorkflowNameCollisionError) {
55
+ ctx.ui.notify(`${error.message}. Choose a different name.`, "warning");
56
+ continue;
57
+ }
58
+ throw error;
59
+ }
45
60
  }
46
-
47
- const { filePath } = await createWorkflowScaffold(ctx.cwd, trimmed);
48
- await openWorkflowEditor(ctx, filePath);
49
- ctx.ui.notify(`Created workflow scaffold: ${filePath}`, "info");
50
61
  } catch (error) {
51
- if (error instanceof WorkflowNameCollisionError) {
52
- ctx.ui.notify(`${error.message}. Choose a different name.`, "warning");
53
- return;
54
- }
55
-
56
62
  const message = error instanceof Error ? error.message : String(error);
57
63
  ctx.ui.notify(`Failed to create workflow scaffold: ${message}`, "error");
58
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-baton",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "Pi-native workflow baton runner with per-step model switching and isolated step context.",
5
5
  "type": "module",
6
6
  "license": "MIT",