@aliou/pi-processes 0.4.6 → 0.4.7
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/README.md +30 -23
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -20,8 +20,8 @@ pi install git:github.com/aliou/pi-processes
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
-
- **Tool**: `
|
|
24
|
-
- **
|
|
23
|
+
- **Tool**: `process` with actions: `start`, `list`, `output`, `logs`, `kill`, `clear`
|
|
24
|
+
- **Commands**: `/process:list` (interactive panel), `/process:stream` (stream logs), `/process:logs` (log paths), `/process:kill` (kill process), `/process:clear` (clear finished)
|
|
25
25
|
- Auto-cleanup on session exit
|
|
26
26
|
- File-based logging (logs written to temp files, not memory)
|
|
27
27
|
- Friendly process names (auto-inferred or custom)
|
|
@@ -31,48 +31,55 @@ pi install git:github.com/aliou/pi-processes
|
|
|
31
31
|
### Tool (for agent)
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
process start "pnpm dev" name="backend-dev"
|
|
35
|
+
process start "pnpm build" name="build" alertOnSuccess=true
|
|
36
|
+
process start "pnpm test" alertOnFailure=true
|
|
37
|
+
process list
|
|
38
|
+
process output id="backend"
|
|
39
|
+
process logs id="proc_1"
|
|
40
|
+
process kill id="backend"
|
|
41
|
+
process clear
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
**
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
44
|
+
**Alert parameters** (for `start` action):
|
|
45
|
+
- `alertOnSuccess` (default: false) - Get a turn to react when process completes successfully. Use for builds/tests where you need confirmation.
|
|
46
|
+
- `alertOnFailure` (default: true) - Get a turn to react when process fails/crashes. Use to be alerted of unexpected failures.
|
|
47
|
+
- `alertOnKill` (default: false) - Get a turn to react if killed by external signal. Note: killing via tool never triggers a turn.
|
|
48
48
|
|
|
49
49
|
**Important:** You don't need to poll or wait for processes. Notifications arrive automatically based on your preferences. Start processes and continue with other work - you'll be informed if something requires attention.
|
|
50
50
|
|
|
51
|
-
Note: User always sees
|
|
51
|
+
Note: User always sees process updates in the UI. The alert flags control whether the agent gets a turn to react (e.g. check results, fix code, restart).
|
|
52
52
|
|
|
53
|
-
###
|
|
53
|
+
### Commands (interactive)
|
|
54
54
|
|
|
55
|
-
Run `/
|
|
55
|
+
Run `/process:list` to open the panel:
|
|
56
56
|
- `j/k` - select process
|
|
57
57
|
- `J/K` - scroll logs
|
|
58
|
+
- `enter` - stream logs for selected process
|
|
58
59
|
- `x` - kill selected process
|
|
59
60
|
- `c` - clear finished processes
|
|
60
61
|
- `q` - quit
|
|
61
62
|
|
|
63
|
+
Other commands:
|
|
64
|
+
- `/process:stream [id|name]` - stream logs from a running process
|
|
65
|
+
- `/process:logs [id|name]` - show log file paths
|
|
66
|
+
- `/process:kill [id|name]` - kill a running process
|
|
67
|
+
- `/process:clear` - clear finished processes
|
|
68
|
+
|
|
62
69
|
## Test Scripts
|
|
63
70
|
|
|
64
|
-
Test scripts in `test/` directory:
|
|
71
|
+
Test scripts in `src/test/` directory:
|
|
65
72
|
|
|
66
73
|
```bash
|
|
67
|
-
./test/test-output.sh # Continuous output (80 chars/sec)
|
|
68
|
-
./test/test-exit-success.sh 5 # Exits successfully after 5s
|
|
69
|
-
./test/test-exit-failure.sh 5 # Exits with code 1 after 5s
|
|
70
|
-
./test/test-exit-crash.sh 5 # Exits with code 137 after 5s
|
|
74
|
+
./src/test/test-output.sh # Continuous output (80 chars/sec)
|
|
75
|
+
./src/test/test-exit-success.sh 5 # Exits successfully after 5s
|
|
76
|
+
./src/test/test-exit-failure.sh 5 # Exits with code 1 after 5s
|
|
77
|
+
./src/test/test-exit-crash.sh 5 # Exits with code 137 after 5s
|
|
71
78
|
```
|
|
72
79
|
|
|
73
80
|
## Future Improvements
|
|
74
81
|
|
|
75
|
-
- [ ] **Expandable log view**: Allow toggling between collapsed (current fixed height) and expanded (full height) log view in the `/
|
|
82
|
+
- [ ] **Expandable log view**: Allow toggling between collapsed (current fixed height) and expanded (full height) log view in the `/process:list` panel.
|
|
76
83
|
|
|
77
84
|
- [ ] **Copy log file path**: Add keyboard shortcut to copy the stdout/stderr log file path to clipboard for easy access.
|
|
78
85
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aliou/pi-processes",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
"typescript": "^5.9.3",
|
|
48
48
|
"vitest": "^4.0.18"
|
|
49
49
|
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"@mariozechner/pi-coding-agent": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
50
55
|
"scripts": {
|
|
51
56
|
"typecheck": "tsc --noEmit",
|
|
52
57
|
"lint": "biome check",
|