@aliou/pi-processes 0.9.3 → 0.9.4
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aliou/pi-processes",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -35,12 +35,13 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@aliou/pi-utils-settings": "^0.15.1",
|
|
37
37
|
"@aliou/pi-utils-ui": "^0.4.1",
|
|
38
|
-
"@aliou/sh": "^0.1.0"
|
|
39
|
-
"typebox": "^1.1.38"
|
|
38
|
+
"@aliou/sh": "^0.1.0"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
|
-
"@earendil-works/pi-
|
|
43
|
-
"@earendil-works/pi-
|
|
41
|
+
"@earendil-works/pi-ai": "*",
|
|
42
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
43
|
+
"@earendil-works/pi-tui": "*",
|
|
44
|
+
"typebox": "*"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@aliou/biome-plugins": "^0.8.1",
|
|
@@ -49,17 +50,20 @@
|
|
|
49
50
|
"@types/node": "^25.9.1",
|
|
50
51
|
"husky": "^9.1.7",
|
|
51
52
|
"typescript": "^6.0.3",
|
|
52
|
-
"vitest": "^4.1.7"
|
|
53
|
-
"@earendil-works/pi-ai": "^0.75.3",
|
|
54
|
-
"@earendil-works/pi-coding-agent": "^0.75.3",
|
|
55
|
-
"@earendil-works/pi-tui": "^0.75.3"
|
|
53
|
+
"vitest": "^4.1.7"
|
|
56
54
|
},
|
|
57
55
|
"peerDependenciesMeta": {
|
|
56
|
+
"@earendil-works/pi-ai": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
58
59
|
"@earendil-works/pi-coding-agent": {
|
|
59
60
|
"optional": true
|
|
60
61
|
},
|
|
61
62
|
"@earendil-works/pi-tui": {
|
|
62
63
|
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"typebox": {
|
|
66
|
+
"optional": true
|
|
63
67
|
}
|
|
64
68
|
},
|
|
65
69
|
"scripts": {
|
|
@@ -20,6 +20,7 @@ interface StartLogWatch {
|
|
|
20
20
|
interface StartParams {
|
|
21
21
|
name?: string;
|
|
22
22
|
command?: string;
|
|
23
|
+
cwd?: string;
|
|
23
24
|
alertOnSuccess?: boolean;
|
|
24
25
|
alertOnFailure?: boolean;
|
|
25
26
|
alertOnKill?: boolean;
|
|
@@ -160,7 +161,7 @@ export function executeStart(
|
|
|
160
161
|
|
|
161
162
|
let proc: ReturnType<ProcessManager["start"]>;
|
|
162
163
|
try {
|
|
163
|
-
proc = manager.start(params.name, params.command, ctx.cwd, {
|
|
164
|
+
proc = manager.start(params.name, params.command, params.cwd ?? ctx.cwd, {
|
|
164
165
|
alertOnSuccess: params.alertOnSuccess,
|
|
165
166
|
alertOnFailure: params.alertOnFailure,
|
|
166
167
|
alertOnKill: params.alertOnKill,
|
package/src/tools/index.ts
CHANGED
|
@@ -81,6 +81,12 @@ const ProcessesParams = Type.Object({
|
|
|
81
81
|
"For action=debug_preview only: which rendered result variant to preview (default: start)",
|
|
82
82
|
}),
|
|
83
83
|
),
|
|
84
|
+
cwd: Type.Optional(
|
|
85
|
+
Type.String({
|
|
86
|
+
description:
|
|
87
|
+
"Working directory for the command (for start action). Defaults to the session working directory. Prefer this over 'cd dir && command' shell wrappers.",
|
|
88
|
+
}),
|
|
89
|
+
),
|
|
84
90
|
logWatches: Type.Optional(
|
|
85
91
|
Type.Array(
|
|
86
92
|
Type.Object(
|
|
@@ -116,6 +122,7 @@ export function setupProcessesTools(pi: ExtensionAPI, manager: ProcessManager) {
|
|
|
116
122
|
label: "Process",
|
|
117
123
|
description: `Manage background processes. Actions:
|
|
118
124
|
- start: Run command in background (requires 'name' and 'command')
|
|
125
|
+
- cwd (optional): Working directory for the command. Defaults to the session working directory. Use the cwd parameter instead of 'cd dir && command' shell wrappers.
|
|
119
126
|
- alertOnSuccess (default: false): Get a turn to react when process completes successfully
|
|
120
127
|
- alertOnFailure (default: true): Get a turn to react when process crashes/fails
|
|
121
128
|
- alertOnKill (default: false): Get a turn to react if killed by external signal (killing via tool never triggers a turn)
|