quilltap 4.7.0-dev.129 → 4.7.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.
@@ -28,11 +28,18 @@ const READ_CHUNK_BYTES = 8 * 1024 * 1024;
28
28
 
29
29
  // ---------- detection (platform seam) ----------
30
30
 
31
- // macOS dataless heuristic: a real file (size > 0) with no allocated blocks has
32
- // not been materialized locally (mirrors the SF_DATALESS flag). Zero-byte files
33
- // are never flagged. Other platforms fall through as a no-op for now.
31
+ const STAT_BLOCK_BYTES = 512;
32
+
33
+ // macOS not-fully-materialized heuristic: a real file (size > 0) whose locally
34
+ // allocated blocks hold fewer bytes than its size has not finished downloading.
35
+ // Covers both the fully-evicted placeholder (blocks === 0, mirrors SF_DATALESS)
36
+ // and the partially-materialized file (blocks > 0 but blocks*512 < size) — the
37
+ // latter still fails SQLite open with "file is not a database". A fully-resident
38
+ // file always reports blocks*512 >= size (allocation rounds up), so this never
39
+ // flags a healthy file. Zero-byte files are never flagged. Other platforms fall
40
+ // through as a no-op for now.
34
41
  function isDatalessStat(stat) {
35
- return stat.size > 0 && stat.blocks === 0;
42
+ return stat.size > 0 && stat.blocks * STAT_BLOCK_BYTES < stat.size;
36
43
  }
37
44
 
38
45
  function listTopLevelFiles(dataDir) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quilltap",
3
- "version": "4.7.0-dev.129",
3
+ "version": "4.7.0",
4
4
  "description": "Self-hosted AI workspace for writers, worldbuilders, and roleplayers. Run with npx quilltap.",
5
5
  "author": {
6
6
  "name": "Charles Sebold",