pi-quiver 6.13.0 → 6.13.1

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 CHANGED
@@ -8,6 +8,10 @@ Published to npm as `pi-quiver` (`pi install npm:pi-quiver`). Pushing a
8
8
  via OIDC trusted publishing. The release helper at
9
9
  `.agents/skills/release/scripts/release.sh` cuts the tag; CI publishes.
10
10
 
11
+ ## v6.13.1 - 2026-10-08
12
+
13
+ - `pi-quiver` CLI: SIGTERM/SIGINT/SIGHUP now kill the detached doc-to-md converter group (python, raster worker, soffice) before exiting with 128+signo; before, a signal-killed CLI orphaned the converter because the `exit` hook does not run on signal death. Library behavior inside pi is unchanged.
14
+
11
15
  ## v6.13.0 - 2026-10-06
12
16
 
13
17
  - `doc_to_md` / `pi-quiver doc-to-md`: `quiver.docToMd.ocrMaxPages` (default 10, settings-only) caps the pages one call OCRs. `ocrMode: "all"` rejects a larger distinct-page selection before any work (CLI exit 2), counting merged ranges without expanding them; textless mode OCRs the first `ocrMaxPages` textless pages and lists the rest as `ceilingStopped` with the `pages` to rerun. Integer settings now require safe integers. (#29)
@@ -1290,6 +1290,11 @@ function killTree(child) {
1290
1290
  process.on("exit", () => {
1291
1291
  for (const c of LIVE) killTree(c);
1292
1292
  });
1293
+ var SIGNAL_EXIT_CODES = { SIGHUP: 1, SIGINT: 2, SIGTERM: 15 };
1294
+ function exitOnSignalKillingChildren() {
1295
+ if (process.platform === "win32") return;
1296
+ for (const [sig, num] of Object.entries(SIGNAL_EXIT_CODES)) process.on(sig, () => process.exit(128 + num));
1297
+ }
1293
1298
  async function runCapped(cmd, args, opts) {
1294
1299
  return new Promise((resolveP) => {
1295
1300
  let settled = false;
@@ -2252,9 +2257,12 @@ function isMainEntry() {
2252
2257
  return false;
2253
2258
  }
2254
2259
  }
2255
- if (isMainEntry()) main().then((code) => {
2256
- process.exitCode = code;
2257
- });
2260
+ if (isMainEntry()) {
2261
+ exitOnSignalKillingChildren();
2262
+ main().then((code) => {
2263
+ process.exitCode = code;
2264
+ });
2265
+ }
2258
2266
  export {
2259
2267
  cliAgentDir,
2260
2268
  parseCliArgs,
@@ -81,6 +81,16 @@ function killTree(child: ChildProcess): void {
81
81
 
82
82
  process.on("exit", () => { for (const c of LIVE) killTree(c); });
83
83
 
84
+ // Children run detached (own process group) so killTree can take out python + raster
85
+ // worker + soffice at once; the flip side is that a signal that kills this process never
86
+ // reaches them, and the "exit" hook does not run on a signal death. The CLI opts in to
87
+ // turning TERM/INT/HUP into a normal exit so the hook fires; pi's own host keeps its handlers.
88
+ const SIGNAL_EXIT_CODES = { SIGHUP: 1, SIGINT: 2, SIGTERM: 15 } as const;
89
+ export function exitOnSignalKillingChildren(): void {
90
+ if (process.platform === "win32") return;
91
+ for (const [sig, num] of Object.entries(SIGNAL_EXIT_CODES)) process.on(sig as NodeJS.Signals, () => process.exit(128 + num));
92
+ }
93
+
84
94
  export async function runCapped(
85
95
  cmd: string,
86
96
  args: string[],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-quiver",
3
- "version": "6.13.0",
3
+ "version": "6.13.1",
4
4
  "description": "Personal pack of Pi coding-agent extensions: context-safe fetch, doc_to_md PDF/DOCX/PPTX-to-Markdown conversion, session naming, a themed ASCII startup header, Opus 4.8 fast mode, and a provider-stall watchdog.",
5
5
  "author": "Jacek Juraszek",
6
6
  "license": "MIT",