open-plan-annotator 0.1.9 → 0.1.11
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.
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"name": "open-plan-annotator",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Interactive plan annotation UI: review, strikethrough, and comment on Claude's plans before approving. Fully local, no external services.",
|
|
15
|
-
"version": "0.1.
|
|
15
|
+
"version": "0.1.11",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "ndom91"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-plan-annotator",
|
|
3
3
|
"description": "Interactive plan annotation UI: review, strikethrough, and comment on Claude's plans before approving. Fully local, no external services.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.11",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ndom91"
|
|
7
7
|
},
|
|
@@ -7,11 +7,21 @@ const fs = require("fs");
|
|
|
7
7
|
const binaryPath = path.join(__dirname, "open-plan-annotator-binary");
|
|
8
8
|
const installScript = path.join(__dirname, "..", "install.cjs");
|
|
9
9
|
|
|
10
|
+
// Buffer stdin immediately so it's not lost if we need to download first
|
|
11
|
+
let stdinBuffer;
|
|
12
|
+
try {
|
|
13
|
+
stdinBuffer = fs.readFileSync(0);
|
|
14
|
+
} catch {
|
|
15
|
+
stdinBuffer = Buffer.alloc(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
if (!fs.existsSync(binaryPath)) {
|
|
11
19
|
// Auto-download the binary (handles pnpm blocking postinstall)
|
|
12
20
|
console.error("open-plan-annotator: binary not found, downloading...");
|
|
13
21
|
try {
|
|
14
|
-
execFileSync(process.execPath, [installScript], {
|
|
22
|
+
execFileSync(process.execPath, [installScript], {
|
|
23
|
+
stdio: ["ignore", "inherit", "inherit"],
|
|
24
|
+
});
|
|
15
25
|
} catch (e) {
|
|
16
26
|
console.error(
|
|
17
27
|
"\nopen-plan-annotator: failed to download binary.\n" +
|
|
@@ -30,7 +40,10 @@ if (!fs.existsSync(binaryPath)) {
|
|
|
30
40
|
}
|
|
31
41
|
|
|
32
42
|
try {
|
|
33
|
-
execFileSync(binaryPath, process.argv.slice(2), {
|
|
43
|
+
execFileSync(binaryPath, process.argv.slice(2), {
|
|
44
|
+
stdio: ["pipe", "inherit", "inherit"],
|
|
45
|
+
input: stdinBuffer,
|
|
46
|
+
});
|
|
34
47
|
} catch (e) {
|
|
35
48
|
process.exit(e.status || 1);
|
|
36
49
|
}
|