task-summary-extractor 9.2.1 → 9.2.2
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/package.json +1 -1
- package/src/logger.js +6 -3
- package/src/utils/json-parser.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "task-summary-extractor",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.2",
|
|
4
4
|
"description": "AI-powered meeting analysis & document generation CLI — video + document processing, deep dive docs, dynamic mode, interactive CLI with model selection, confidence scoring, learning loop, git progress tracking",
|
|
5
5
|
"main": "process_and_upload.js",
|
|
6
6
|
"bin": {
|
package/src/logger.js
CHANGED
|
@@ -321,16 +321,17 @@ class Logger {
|
|
|
321
321
|
/** Flush buffers and close the logger. Safe to call multiple times. */
|
|
322
322
|
close() {
|
|
323
323
|
if (this.closed) return;
|
|
324
|
-
this.closed = true;
|
|
325
324
|
clearInterval(this._flushInterval);
|
|
326
325
|
this.unpatchConsole();
|
|
327
326
|
|
|
328
|
-
// End active phase if any
|
|
327
|
+
// End active phase if any (must happen BEFORE setting closed flag
|
|
328
|
+
// so _writeStructured inside phaseEnd is not blocked)
|
|
329
329
|
if (this._activePhase) {
|
|
330
330
|
this.phaseEnd();
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
// Write footer
|
|
333
|
+
// Write footer and session_end BEFORE setting closed flag
|
|
334
|
+
// so _writeStructured is not blocked by the guard
|
|
334
335
|
const elapsed = ((Date.now() - this.startTime) / 1000).toFixed(1);
|
|
335
336
|
const footer = `\n=== CLOSED | elapsed: ${elapsed}s | ${new Date().toISOString()} ===\n`;
|
|
336
337
|
this._detailedBuffer.push(footer);
|
|
@@ -342,6 +343,8 @@ class Logger {
|
|
|
342
343
|
timestamp: new Date().toISOString(),
|
|
343
344
|
level: 'info',
|
|
344
345
|
});
|
|
346
|
+
|
|
347
|
+
this.closed = true;
|
|
345
348
|
this._flush(true); // sync flush on close to ensure data is written before process exits
|
|
346
349
|
}
|
|
347
350
|
|
package/src/utils/json-parser.js
CHANGED
|
@@ -195,6 +195,9 @@ function repairDoubledClosers(text) {
|
|
|
195
195
|
* Returns parsed object or null.
|
|
196
196
|
*/
|
|
197
197
|
function extractJson(rawText) {
|
|
198
|
+
// Guard: null/undefined input (e.g. Gemini returns no text)
|
|
199
|
+
if (!rawText || typeof rawText !== 'string') return null;
|
|
200
|
+
|
|
198
201
|
// Strategy 1: Strip all markdown fences and try to parse
|
|
199
202
|
const cleaned = rawText.replace(/```json\s*/gi, '').replace(/```\s*/g, '').trim();
|
|
200
203
|
let parsed = tryParseWithSanitize(cleaned);
|