pi-quiver 3.4.1 → 4.0.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 CHANGED
@@ -8,6 +8,12 @@ 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
+ ## v4.0.0 - 2026-08-04
12
+
13
+ - **BREAKING: extension sources moved out of the package root** into `extensions/`; the shared config helper moved to `lib/extension-config.ts` (#4). If you disabled an extension through `pi config`, the stored filter (e.g. `-fast-mode.ts`) no longer matches any path and the extension will load again - re-disable it, or update the entry to `extensions/fast-mode.ts`. Hand-written `!fast-mode.ts` entries in `settings.json` are unaffected.
14
+ - **Local-checkout invocation changed:** `pi -e <path>/fetch.ts` is now `pi -e <path>/extensions/fetch.ts`.
15
+ - No behaviour change in any extension; `pi.extensions` is now a single directory entry and typecheck flags moved into `tsconfig.json`.
16
+
11
17
  ## v3.4.1 - 2026-08-04
12
18
 
13
19
  - **`fast-mode` now corrects reported `usage.cost` to true 2x fast pricing for Opus 4.8/5** (statusline, persisted cost, and pi-cohort `Σ$` per load order) (#6).
package/README.md CHANGED
@@ -62,12 +62,12 @@ A 300 KB changelog page never touches your context window - you get a preview an
62
62
 
63
63
  | Extension | Tool | What it does |
64
64
  | --- | --- | --- |
65
- | `fetch.ts` | `fetch` | Retrieve URLs over HTTP(S). HTML -> Markdown (Readability extraction, Turndown conversion). Binary saved untouched to a temp file. GitHub issue/PR/repo/actions-run URLs auto-route through `gh` (falls back to HTTP). Same size gate as `doc_to_md`. |
66
- | `doc_to_md.ts` | `doc_to_md` | Convert a local PDF/DOCX/PPTX to Markdown. High-fidelity via `pymupdf4llm` (run through `uv`); degraded pure-JS fallback (`unpdf`) when `uv`/Python is unavailable or conversion times out. DOCX/PPTX convert via LibreOffice first. |
67
- | `session-name.ts` | `/session-name` | Manual + opt-in automatic session naming, with Ghostty tab rename. OFF by default. |
68
- | `sword-header.ts` | `/builtin-header` | Themed ASCII startup header replacing pi's default logo. OFF by default. |
69
- | `fast-mode.ts` | `/fast` | Inject Anthropic fast-mode (`speed: "fast"` + `anthropic-beta: fast-mode-2026-02-01`) into every Claude Opus 4.8 / Opus 5 request, any thinking level. `--fast` flag + `/fast [on\|off\|status]`. OFF by default. |
70
- | `provider-stall-watchdog.ts` | - | Opt-in provider-stall recovery, in two tiers: a pre-first-event deadline (`firstEventMs`, 20s) on every provider request in every mode, and the mid-stream pair (warn at 2 min, recover at 4 min) in TUI runs only. Policy D offers each stall to Pi's retry loop until the stall retry budget (`maxStallRetries`, default = `retry.maxRetries`) is exhausted. OFF by default. |
65
+ | `extensions/fetch.ts` | `fetch` | Retrieve URLs over HTTP(S). HTML -> Markdown (Readability extraction, Turndown conversion). Binary saved untouched to a temp file. GitHub issue/PR/repo/actions-run URLs auto-route through `gh` (falls back to HTTP). Same size gate as `doc_to_md`. |
66
+ | `extensions/doc_to_md.ts` | `doc_to_md` | Convert a local PDF/DOCX/PPTX to Markdown. High-fidelity via `pymupdf4llm` (run through `uv`); degraded pure-JS fallback (`unpdf`) when `uv`/Python is unavailable or conversion times out. DOCX/PPTX convert via LibreOffice first. |
67
+ | `extensions/session-name.ts` | `/session-name` | Manual + opt-in automatic session naming, with Ghostty tab rename. OFF by default. |
68
+ | `extensions/sword-header.ts` | `/builtin-header` | Themed ASCII startup header replacing pi's default logo. OFF by default. |
69
+ | `extensions/fast-mode.ts` | `/fast` | Inject Anthropic fast-mode (`speed: "fast"` + `anthropic-beta: fast-mode-2026-02-01`) into every Claude Opus 4.8 / Opus 5 request, any thinking level. `--fast` flag + `/fast [on\|off\|status]`. OFF by default. |
70
+ | `extensions/provider-stall-watchdog.ts` | - | Opt-in provider-stall recovery, in two tiers: a pre-first-event deadline (`firstEventMs`, 20s) on every provider request in every mode, and the mid-stream pair (warn at 2 min, recover at 4 min) in TUI runs only. Policy D offers each stall to Pi's retry loop until the stall retry budget (`maxStallRetries`, default = `retry.maxRetries`) is exhausted. OFF by default. |
71
71
 
72
72
  Full routing rules, size-gate mechanics, and config: [doc/fetch.md](doc/fetch.md), [doc/doc-to-md.md](doc/doc-to-md.md).
73
73
 
@@ -120,7 +120,7 @@ pi -e npm:pi-quiver
120
120
 
121
121
  ```bash
122
122
  git clone git@github.com:jjuraszek/pi-quiver.git ~/repos/pi-quiver
123
- pi -e ~/repos/pi-quiver/fetch.ts
123
+ pi -e ~/repos/pi-quiver/extensions/fetch.ts
124
124
  ```
125
125
 
126
126
  ## Prerequisites
@@ -203,7 +203,7 @@ runtime deps; install them transiently and run the full check:
203
203
 
204
204
  ```bash
205
205
  npm install
206
- npm run test:all # node --test *.test.ts + tsc --noEmit typecheck
206
+ npm run test:all # node --test test/*.test.ts + tsc --noEmit typecheck
207
207
  ```
208
208
 
209
209
  `npm test` runs the unit tests alone; `npm run typecheck` runs the type pass.
@@ -250,7 +250,7 @@ let warmPromise: Promise<"warm" | "unavailable"> | null = null;
250
250
  let uvAvailable: boolean | null = null;
251
251
 
252
252
  function scriptPath(): string {
253
- return fileURLToPath(new URL("./scripts/pdf_to_md.py", import.meta.url));
253
+ return fileURLToPath(new URL("../scripts/pdf_to_md.py", import.meta.url));
254
254
  }
255
255
 
256
256
  async function onPath(cmd: string): Promise<boolean> {
@@ -23,7 +23,7 @@
23
23
 
24
24
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
25
25
  import type { Usage } from "@earendil-works/pi-ai";
26
- import { resolveConfig } from "./extension-config.ts";
26
+ import { resolveConfig } from "../lib/extension-config.ts";
27
27
 
28
28
  export const FAST_MODE_BETA = "fast-mode-2026-02-01";
29
29
  export const FAST_SPEED = "fast";
@@ -1,5 +1,5 @@
1
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
- import { readSettings, resolveConfig, settingsPaths } from "./extension-config.ts";
2
+ import { readSettings, resolveConfig, settingsPaths } from "../lib/extension-config.ts";
3
3
 
4
4
  export const MAX_TIMER_MS = 2_147_483_647;
5
5
  export const DEFAULT_CONFIG = {
@@ -18,7 +18,7 @@
18
18
  */
19
19
 
20
20
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
21
- import { resolveConfig } from "./extension-config.ts";
21
+ import { resolveConfig } from "../lib/extension-config.ts";
22
22
 
23
23
  // `complete` moved between pi-ai layouts: older builds re-export it from the
24
24
  // package index, newer ones expose it only via the `/compat` subpath. A static
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import type { ExtensionAPI, Theme, ThemeColor } from "@earendil-works/pi-coding-agent";
17
- import { resolveConfig } from "./extension-config.ts";
17
+ import { resolveConfig } from "../lib/extension-config.ts";
18
18
 
19
19
  type Config = { enabled: boolean };
20
20
  const DEFAULT_CONFIG: Config = { enabled: false };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-quiver",
3
- "version": "3.4.1",
3
+ "version": "4.0.0",
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",
@@ -28,13 +28,8 @@
28
28
  "node": ">=20"
29
29
  },
30
30
  "files": [
31
- "fetch.ts",
32
- "doc_to_md.ts",
33
- "session-name.ts",
34
- "sword-header.ts",
35
- "fast-mode.ts",
36
- "provider-stall-watchdog.ts",
37
- "extension-config.ts",
31
+ "extensions",
32
+ "lib",
38
33
  "scripts/pdf_to_md.py",
39
34
  "types/**/*.d.ts",
40
35
  "README.md",
@@ -42,18 +37,13 @@
42
37
  ],
43
38
  "scripts": {
44
39
  "check:agents-core": "node scripts/check-agents-core.mjs",
45
- "test": "node --test \"*.test.ts\"",
46
- "typecheck": "npx -y tsc --noEmit --allowImportingTsExtensions --target es2022 --module nodenext --moduleResolution nodenext --strict --skipLibCheck --esModuleInterop --resolveJsonModule --lib es2022 --types node fetch.ts fetch.test.ts doc_to_md.ts doc_to_md.test.ts session-name.ts session-name.test.ts sword-header.ts sword-header.test.ts fast-mode.ts fast-mode.test.ts provider-stall-watchdog.ts provider-stall-watchdog.test.ts extension-config.ts types/turndown-plugin-gfm.d.ts",
40
+ "test": "node --test \"test/*.test.ts\"",
41
+ "typecheck": "npx -y tsc --noEmit",
47
42
  "test:all": "npm run check:agents-core && npm run test && npm run typecheck"
48
43
  },
49
44
  "pi": {
50
45
  "extensions": [
51
- "./fetch.ts",
52
- "./doc_to_md.ts",
53
- "./session-name.ts",
54
- "./sword-header.ts",
55
- "./fast-mode.ts",
56
- "./provider-stall-watchdog.ts"
46
+ "./extensions"
57
47
  ],
58
48
  "image": "https://raw.githubusercontent.com/jjuraszek/pi-quiver/main/pi-quiver.png"
59
49
  },
File without changes