pi-baton 0.2.3 → 0.4.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 +20 -0
- package/extensions/index.ts +22 -16
- package/lib/status.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ 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.4.0] - 2026-06-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `/baton:start` creates an idle run from workflow selection and a task brief without starting execution.
|
|
12
|
+
- `/baton:status` reports workflow name, task brief, last/current step, run state, iteration count, and run directory.
|
|
13
|
+
- Single active run guard blocks a second `/baton:start` and points users to `/baton:status` or `/baton:run`.
|
|
14
|
+
- Run manifests persist under `.pi/baton/runs/` with an active-run pointer.
|
|
15
|
+
|
|
16
|
+
## [0.3.0] - 2026-06-18
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `/baton:new` re-prompts for a workflow name when the derived filename collides with an existing scaffold.
|
|
21
|
+
- Tests for lazy `.pi/baton/workflows/` creation and kebab-case filename derivation.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Workflow discovery keeps user-defined `.pi/baton/workflows/*.yaml` entries ahead of builtin package workflows in selection order.
|
|
26
|
+
|
|
7
27
|
## [0.2.3] - 2026-06-13
|
|
8
28
|
|
|
9
29
|
### Added
|
package/extensions/index.ts
CHANGED
|
@@ -35,24 +35,30 @@ export default function (pi: ExtensionAPI) {
|
|
|
35
35
|
try {
|
|
36
36
|
await ensureBatonScaffolding(ctx.cwd);
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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/lib/status.ts
CHANGED
|
@@ -4,6 +4,7 @@ export function formatStatusSummary(manifest: RunManifest): string {
|
|
|
4
4
|
return [
|
|
5
5
|
`workflow: ${manifest.workflowName}`,
|
|
6
6
|
`task brief: ${manifest.taskBrief}`,
|
|
7
|
+
`last step: ${manifest.lastStep ?? "(none)"}`,
|
|
7
8
|
`current step: ${manifest.currentStep ?? "(none)"}`,
|
|
8
9
|
`run state: ${manifest.state}`,
|
|
9
10
|
`iteration count: ${manifest.iteration}`,
|