@jonandev/longbeard 0.2.0 → 0.3.0
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/CHANGELOG.md +4 -0
- package/bin/long-beard.js +15 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.3.0 — 2026-10-20
|
|
6
|
+
|
|
7
|
+
- `init` waits for a key on the agent picker. Node 24 leaves the terminal non-blocking, so the first read was throwing `EAGAIN` and aborting the install. Install this version and run `npx longbeard init` again. Anyone who already finished `init` can leave it.
|
|
8
|
+
|
|
5
9
|
## 0.2.0 — 2026-10-20
|
|
6
10
|
|
|
7
11
|
- Install from npm: `@jonandev/longbeard`. The command prints that version with `--version`.
|
package/bin/long-beard.js
CHANGED
|
@@ -248,9 +248,22 @@ function agentsFromLock(lock) {
|
|
|
248
248
|
return [...new Set(Object.values(lock?.skills ?? {}).flatMap((entry) => entry.agents ?? []))];
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
const stdinPause = new Int32Array(new SharedArrayBuffer(4));
|
|
252
|
+
|
|
253
|
+
function readStdin(buf) {
|
|
254
|
+
for (;;) {
|
|
255
|
+
try {
|
|
256
|
+
return readSync(0, buf, 0, buf.length, null);
|
|
257
|
+
} catch (error) {
|
|
258
|
+
if (error?.code !== "EAGAIN" && error?.code !== "EWOULDBLOCK") throw error;
|
|
259
|
+
Atomics.wait(stdinPause, 0, 0, 50);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
251
264
|
function readKey() {
|
|
252
265
|
const buf = Buffer.alloc(8);
|
|
253
|
-
const n =
|
|
266
|
+
const n = readStdin(buf);
|
|
254
267
|
if (n <= 0) return "enter";
|
|
255
268
|
const code = buf[0];
|
|
256
269
|
if (code === 3) return "ctrl-c";
|
|
@@ -489,7 +502,7 @@ function confirmWrite(flags, writes) {
|
|
|
489
502
|
if (writes.length === 0 || flags.yes || !process.stdin.isTTY) return;
|
|
490
503
|
say(dim("Proceed? [Y/n]"));
|
|
491
504
|
const buf = Buffer.alloc(80);
|
|
492
|
-
const n =
|
|
505
|
+
const n = readStdin(buf);
|
|
493
506
|
const line = buf.toString("utf8", 0, n).trim().toLowerCase();
|
|
494
507
|
if (line && line !== "y" && line !== "yes") fail("Aborted.");
|
|
495
508
|
}
|