@accio-ai/cli 0.1.44 → 0.1.46
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/bin/workctl.js +17 -5
- package/package.json +7 -7
package/bin/workctl.js
CHANGED
|
@@ -56,13 +56,10 @@ delete env.WORKCTL_MCP_URL;
|
|
|
56
56
|
delete env.WORKCTL_CATALOG_FIXTURE;
|
|
57
57
|
delete env.WORKCTL_RUNTIME_CONFIG;
|
|
58
58
|
|
|
59
|
-
const child = childProcess.spawn(binaryPath, process.argv.slice(2), {
|
|
60
|
-
env,
|
|
61
|
-
stdio: "inherit",
|
|
62
|
-
});
|
|
63
|
-
|
|
64
59
|
let spawnFailed = false;
|
|
65
60
|
let forwardedSignal = null;
|
|
61
|
+
let pendingSignal = null;
|
|
62
|
+
let child = null;
|
|
66
63
|
const signals =
|
|
67
64
|
process.platform === "win32"
|
|
68
65
|
? ["SIGINT", "SIGTERM", "SIGBREAK"]
|
|
@@ -76,6 +73,10 @@ const signalExitCodes = {
|
|
|
76
73
|
|
|
77
74
|
function forwardSignal(signal) {
|
|
78
75
|
forwardedSignal = signal;
|
|
76
|
+
if (child === null) {
|
|
77
|
+
pendingSignal = signal;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
79
80
|
if (child.exitCode !== null || child.signalCode !== null) {
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
@@ -86,10 +87,21 @@ function forwardSignal(signal) {
|
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
// Register before spawn so termination cannot be lost during child startup.
|
|
89
91
|
for (const signal of signals) {
|
|
90
92
|
process.on(signal, () => forwardSignal(signal));
|
|
91
93
|
}
|
|
92
94
|
|
|
95
|
+
child = childProcess.spawn(binaryPath, process.argv.slice(2), {
|
|
96
|
+
env,
|
|
97
|
+
stdio: "inherit",
|
|
98
|
+
});
|
|
99
|
+
if (pendingSignal !== null) {
|
|
100
|
+
const signal = pendingSignal;
|
|
101
|
+
pendingSignal = null;
|
|
102
|
+
forwardSignal(signal);
|
|
103
|
+
}
|
|
104
|
+
|
|
93
105
|
child.on("error", (error) => {
|
|
94
106
|
spawnFailed = true;
|
|
95
107
|
console.error(`workctl: failed to start binary: ${error.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accio-ai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
4
4
|
"description": "Work Agent CLI - AI-native command line interface",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"postinstall": "node install.js"
|
|
19
19
|
},
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"@accio-ai/cli-darwin-arm64": "0.1.
|
|
22
|
-
"@accio-ai/cli-darwin-x64": "0.1.
|
|
23
|
-
"@accio-ai/cli-linux-arm64": "0.1.
|
|
24
|
-
"@accio-ai/cli-linux-x64": "0.1.
|
|
25
|
-
"@accio-ai/cli-win32-arm64": "0.1.
|
|
26
|
-
"@accio-ai/cli-win32-x64": "0.1.
|
|
21
|
+
"@accio-ai/cli-darwin-arm64": "0.1.46",
|
|
22
|
+
"@accio-ai/cli-darwin-x64": "0.1.46",
|
|
23
|
+
"@accio-ai/cli-linux-arm64": "0.1.46",
|
|
24
|
+
"@accio-ai/cli-linux-x64": "0.1.46",
|
|
25
|
+
"@accio-ai/cli-win32-arm64": "0.1.46",
|
|
26
|
+
"@accio-ai/cli-win32-x64": "0.1.46"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"registry": "https://registry.npmjs.org"
|