@ouro.bot/cli 0.1.0-alpha.161 → 0.1.0-alpha.163
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.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.163",
|
|
6
|
+
"changes": [
|
|
7
|
+
"fix(daemon): redirect detached spawn stdio to /dev/null \u2014 fixes ouro up daemon crash"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.162",
|
|
12
|
+
"changes": [
|
|
13
|
+
"fix(daemon): handle EPIPE in detached daemon \u2014 suppress pipe errors when parent exits after ouro up"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.161",
|
|
6
18
|
"changes": [
|
|
@@ -1193,11 +1193,15 @@ function parseOuroCommand(args) {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
function defaultStartDaemonProcess(socketPath) {
|
|
1195
1195
|
const entry = path.join((0, identity_1.getRepoRoot)(), "dist", "heart", "daemon", "daemon-entry.js");
|
|
1196
|
+
// Redirect stdio to /dev/null via file descriptors — using 'ignore' causes EPIPE
|
|
1197
|
+
// when the daemon's logging system writes to stderr after the parent exits.
|
|
1198
|
+
const devNull = fs.openSync(os.devNull, "w");
|
|
1196
1199
|
const child = (0, child_process_1.spawn)("node", [entry, "--socket", socketPath], {
|
|
1197
1200
|
detached: true,
|
|
1198
|
-
stdio: "ignore",
|
|
1201
|
+
stdio: ["ignore", devNull, devNull],
|
|
1199
1202
|
});
|
|
1200
1203
|
child.unref();
|
|
1204
|
+
fs.closeSync(devNull);
|
|
1201
1205
|
return Promise.resolve({ pid: child.pid ?? null });
|
|
1202
1206
|
}
|
|
1203
1207
|
function defaultWriteStdout(text) {
|
|
@@ -183,8 +183,16 @@ process.on("SIGTERM", () => {
|
|
|
183
183
|
}
|
|
184
184
|
void daemon.stop().then(() => process.exit(0));
|
|
185
185
|
});
|
|
186
|
+
// Suppress EPIPE on stdout/stderr — normal when detached daemon's parent exits
|
|
187
|
+
/* v8 ignore start -- EPIPE suppression: only fires when parent process exits @preserve */
|
|
188
|
+
process.stdout?.on?.("error", () => { });
|
|
189
|
+
process.stderr?.on?.("error", () => { });
|
|
190
|
+
/* v8 ignore stop */
|
|
186
191
|
/* v8 ignore start -- global exception handlers: genuinely untestable in vitest; exercised by real daemon crashes @preserve */
|
|
187
192
|
process.on("uncaughtException", (error) => {
|
|
193
|
+
// EPIPE is normal for detached daemon processes — parent closed the pipe
|
|
194
|
+
if (error.code === "EPIPE")
|
|
195
|
+
return;
|
|
188
196
|
(0, daemon_tombstone_1.writeDaemonTombstone)("uncaughtException", error);
|
|
189
197
|
(0, runtime_1.emitNervesEvent)({
|
|
190
198
|
level: "error",
|
|
@@ -207,3 +215,4 @@ process.on("unhandledRejection", (reason) => {
|
|
|
207
215
|
});
|
|
208
216
|
});
|
|
209
217
|
/* v8 ignore stop */
|
|
218
|
+
// daemon stdio fix
|