log-llm-config 1.4.11 → 1.4.12

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.
@@ -101,7 +101,15 @@ function collectDirectoryMetadata(t) {
101
101
  try {
102
102
  const dirStat = statSync(t.path);
103
103
  const glob = t.dir_glob ?? '*';
104
- const newest = findNewestMatchingFile(t.path, glob, 0, METADATA_DIR_SCAN_MAX_DEPTH);
104
+ // A "|"-delimited dir_glob is an ordered priority list: use the newest match of the FIRST
105
+ // glob that matches anything, so e.g. "**/*.jsonl|**/*" prefers a session transcript
106
+ // (events.jsonl) over any other session-state file — even when a non-jsonl file is newer.
107
+ let newest = null;
108
+ for (const g of glob.split('|')) {
109
+ newest = findNewestMatchingFile(t.path, g, 0, METADATA_DIR_SCAN_MAX_DEPTH);
110
+ if (newest)
111
+ break;
112
+ }
105
113
  const bestPath = newest?.path ?? t.path;
106
114
  const bestMtime = newest?.mtime ?? dirStat.mtime;
107
115
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {