minimal-workflow 0.2.0 → 0.2.1
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/package.json +2 -2
- package/scripts/cli.ts +10 -10
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minimal-workflow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Visual editor for minimal-agent workflow YAML files",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"workflow
|
|
7
|
+
"minimal-workflow": "./scripts/cli.ts"
|
|
8
8
|
},
|
|
9
9
|
"engines": {
|
|
10
10
|
"bun": ">=1.1"
|
package/scripts/cli.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* minimal-workflw CLI 入口
|
|
4
4
|
*
|
|
5
|
-
* 用法:
|
|
5
|
+
* 用法: minimal-workflw [project-dir] [options]
|
|
6
6
|
*
|
|
7
7
|
* 负责:参数解析、manifest 新鲜度检查、spawn IO 服务 + Vite dev server。
|
|
8
8
|
*/
|
|
@@ -28,7 +28,7 @@ interface CliOptions {
|
|
|
28
28
|
|
|
29
29
|
function printHelp(): void {
|
|
30
30
|
console.log(`USAGE
|
|
31
|
-
|
|
31
|
+
minimal-workflw [project-dir] [options]
|
|
32
32
|
|
|
33
33
|
ARGUMENTS
|
|
34
34
|
project-dir Path to a minimal-agent project (must contain workflows/).
|
|
@@ -44,10 +44,10 @@ OPTIONS
|
|
|
44
44
|
-v, --version Print version and exit
|
|
45
45
|
|
|
46
46
|
EXAMPLES
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
minimal-workflw # use cwd as project
|
|
48
|
+
minimal-workflw ./my-project # use ./my-project
|
|
49
|
+
minimal-workflw . --port 5180 # custom editor port
|
|
50
|
+
minimal-workflw . --refresh-manifest # force manifest rebuild
|
|
51
51
|
`);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -228,7 +228,7 @@ async function main(): Promise<void> {
|
|
|
228
228
|
const workflowsDir = path.join(projectDirAbs, 'workflows');
|
|
229
229
|
if (!existsSync(workflowsDir)) {
|
|
230
230
|
console.error(`✗ workflows/ subdir not found in ${projectDirAbs}`);
|
|
231
|
-
console.error(' (
|
|
231
|
+
console.error(' (minimal-workflw needs a minimal-agent project with workflows/*.yaml)');
|
|
232
232
|
process.exit(1);
|
|
233
233
|
}
|
|
234
234
|
|
|
@@ -260,7 +260,7 @@ async function main(): Promise<void> {
|
|
|
260
260
|
});
|
|
261
261
|
|
|
262
262
|
const editorUrl = `http://127.0.0.1:${opts.port}`;
|
|
263
|
-
console.log(`>
|
|
263
|
+
console.log(`> minimal-workflw ready at ${editorUrl}`);
|
|
264
264
|
|
|
265
265
|
if (!opts.noOpen) {
|
|
266
266
|
setTimeout(() => openBrowser(editorUrl), 1500);
|
|
@@ -313,6 +313,6 @@ function openBrowser(url: string): void {
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
main().catch((e) => {
|
|
316
|
-
console.error('✗
|
|
316
|
+
console.error('✗ minimal-workflw failed:', e);
|
|
317
317
|
process.exit(1);
|
|
318
318
|
});
|