pi-quiver 6.15.0 → 6.15.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 +4 -0
- package/package.json +1 -1
- package/scripts/doc_to_md.py +17 -3
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.15.1 - 2026-11-03
|
|
12
|
+
|
|
13
|
+
- `doc_to_md`: keep the pages that carry pictures when the bundle and the child's temp directory sit on different volumes. `os.replace()` cannot cross volumes (Windows `WinError 17`), which failed the whole page and reported it as both failed and empty; the move now falls back to copy-and-unlink. The image-link rewrite also registers the cwd-relative form pymupdf4llm emits, so a temp dir under the cwd no longer fails the call with "unexpected image reference in output". (#34)
|
|
14
|
+
|
|
11
15
|
## v6.15.0 - 2026-10-30
|
|
12
16
|
|
|
13
17
|
- Add the pi `/elevator` prompt and user-invoked Claude Code `/quiver:elevator` skill for outcome-first explanations and frank judgment, with optional free-text input that defaults to the prior discussion when omitted. (#32)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-quiver",
|
|
3
|
-
"version": "6.15.
|
|
3
|
+
"version": "6.15.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",
|
package/scripts/doc_to_md.py
CHANGED
|
@@ -31,8 +31,20 @@ HTML_IMAGE_RE = re.compile(
|
|
|
31
31
|
|
|
32
32
|
def image_source_map(source, target, filename):
|
|
33
33
|
real = os.path.realpath(source)
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
m = {source: target, source.replace("\\", "/"): target,
|
|
35
|
+
real: target, real.replace("\\", "/"): target, filename: target}
|
|
36
|
+
# pymupdf4llm's md_path() resolves image_path and emits it relative to the
|
|
37
|
+
# cwd whenever the resolved directory sits under the cwd; otherwise it emits
|
|
38
|
+
# the absolute POSIX path, which the "real" key above already covers. Key the
|
|
39
|
+
# relative form on the resolved path as well, so a temp dir reached through a
|
|
40
|
+
# symlink (macOS /var -> /private/var, Windows 8.3 RUNNER~1) still matches.
|
|
41
|
+
try:
|
|
42
|
+
rel = os.path.relpath(real, os.getcwd())
|
|
43
|
+
except ValueError: # different drive on Windows
|
|
44
|
+
return m
|
|
45
|
+
m[rel] = target
|
|
46
|
+
m[rel.replace("\\", "/")] = target
|
|
47
|
+
return m
|
|
36
48
|
|
|
37
49
|
|
|
38
50
|
def rewrite_image_destinations(md, sources):
|
|
@@ -506,7 +518,9 @@ def primary_page_markdown(doc, n, d, o, kw, write_images):
|
|
|
506
518
|
dest = f"img{i}{os.path.splitext(f)[1].lower()}"
|
|
507
519
|
source = os.path.join(tmp, f)
|
|
508
520
|
sources.update(image_source_map(source, f"p{n}/{dest}", f))
|
|
509
|
-
|
|
521
|
+
# shutil.move: rename, falling back to copy+unlink across volumes
|
|
522
|
+
# (os.replace alone raises WinError 17 there and costs the whole page).
|
|
523
|
+
shutil.move(source, os.path.join(d, dest))
|
|
510
524
|
return rewrite_image_destinations(md, sources)
|
|
511
525
|
|
|
512
526
|
|