pi-baton 0.8.5 → 0.8.6
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 +6 -0
- package/README.md +1 -1
- package/lib/workflow-discovery.ts +20 -18
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,12 @@ All notable changes to this project will be documented in this file.
|
|
|
24
24
|
|
|
25
25
|
This project follows semantic versioning.
|
|
26
26
|
|
|
27
|
+
## [0.8.6] - 2026-09-30
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Update `@earendil-works/pi-*` dependencies to `0.99.1`.
|
|
32
|
+
|
|
27
33
|
## [Unreleased]
|
|
28
34
|
|
|
29
35
|
### Added
|
package/README.md
CHANGED
|
@@ -52,6 +52,14 @@ function isMissingFileError(error: unknown): boolean {
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
async function loadWorkflowFile(
|
|
56
|
+
filePath: string,
|
|
57
|
+
options: { id: string; source: "user" | "builtin" },
|
|
58
|
+
): Promise<WorkflowDefinition> {
|
|
59
|
+
const yamlText = await readFile(filePath, "utf8");
|
|
60
|
+
return parseWorkflowDocument(yamlText, { ...options, path: filePath });
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
const UNSAFE_WORKFLOW_ID_PATTERN = /[\\/\0]/;
|
|
56
64
|
|
|
57
65
|
function isSafeWorkflowId(workflowId: string): boolean {
|
|
@@ -70,23 +78,18 @@ export async function loadWorkflowById(cwd: string, workflowId: string): Promise
|
|
|
70
78
|
throw new Error(`Unknown workflow: ${workflowId}`);
|
|
71
79
|
}
|
|
72
80
|
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} catch (error) {
|
|
78
|
-
if (!isMissingFileError(error)) {
|
|
79
|
-
throw error;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
81
|
+
const candidates = [
|
|
82
|
+
{ path: join(getWorkflowsDir(cwd), `${workflowId}.yaml`), source: "user" as const },
|
|
83
|
+
{ path: join(getPackageWorkflowsDir(), `${workflowId}.yaml`), source: "builtin" as const },
|
|
84
|
+
];
|
|
82
85
|
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
for (const candidate of candidates) {
|
|
87
|
+
try {
|
|
88
|
+
return await loadWorkflowFile(candidate.path, { id: workflowId, source: candidate.source });
|
|
89
|
+
} catch (error) {
|
|
90
|
+
if (!isMissingFileError(error)) {
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
|
|
@@ -97,6 +100,5 @@ export async function loadWorkflowFromPath(
|
|
|
97
100
|
filePath: string,
|
|
98
101
|
options: { id: string; source: "user" | "builtin" },
|
|
99
102
|
): Promise<WorkflowDefinition> {
|
|
100
|
-
|
|
101
|
-
return parseWorkflowDocument(yamlText, { ...options, path: filePath });
|
|
103
|
+
return loadWorkflowFile(filePath, options);
|
|
102
104
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-baton",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Pi-native workflow baton runner with per-step model switching and isolated step context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"typebox": "*"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@earendil-works/pi-ai": "^0.
|
|
62
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
61
|
+
"@earendil-works/pi-ai": "^0.99.1",
|
|
62
|
+
"@earendil-works/pi-coding-agent": "^0.99.1",
|
|
63
63
|
"typebox": "latest",
|
|
64
64
|
"@types/node": "^26.0.1",
|
|
65
65
|
"typescript": "^7.0.2"
|