@threadbase-sh/streamer 1.24.3 → 1.24.4
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/dist/cli.cjs +14 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -141710,6 +141710,19 @@ var ConversationWatcher = class {
|
|
|
141710
141710
|
void entry.watcher.close();
|
|
141711
141711
|
this.files.delete(filePath);
|
|
141712
141712
|
}
|
|
141713
|
+
/**
|
|
141714
|
+
* Re-drive the tail read for a file that's already being tailed. A per-file
|
|
141715
|
+
* chokidar handle can die silently (fs.watch stops firing after inode churn)
|
|
141716
|
+
* while the coarser directory watcher keeps reporting changes — calling this
|
|
141717
|
+
* from the directory-event path makes the tail self-healing. Reads are
|
|
141718
|
+
* offset-based and coalesced, so a redundant poke after a normal change
|
|
141719
|
+
* event is a cheap stat + no-op. Returns false for untailed paths.
|
|
141720
|
+
*/
|
|
141721
|
+
poke(filePath) {
|
|
141722
|
+
if (!this.files.has(filePath)) return false;
|
|
141723
|
+
void this.readNewLines(filePath);
|
|
141724
|
+
return true;
|
|
141725
|
+
}
|
|
141713
141726
|
/**
|
|
141714
141727
|
* Watch a directory of conversation JSONL files. Fires
|
|
141715
141728
|
* onConversationChanged for any add/change/unlink event so the caller
|
|
@@ -142784,6 +142797,7 @@ var StreamerServer = class {
|
|
|
142784
142797
|
}
|
|
142785
142798
|
},
|
|
142786
142799
|
onConversationChanged: (filePath) => {
|
|
142800
|
+
this.fileWatcher.poke(filePath);
|
|
142787
142801
|
this.cache?.invalidateByFilePath(filePath, { skipIfTailed: true });
|
|
142788
142802
|
this.markScannerStaleDebounced();
|
|
142789
142803
|
this.log.debug?.(`Scanner invalidated by directory event: ${filePath}`, {
|