task-summary-extractor 9.0.1 → 9.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "task-summary-extractor",
3
- "version": "9.0.1",
3
+ "version": "9.1.0",
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": {
@@ -86,11 +86,19 @@ async function phaseInit() {
86
86
  opts.minConfidence = check.normalised.toLowerCase();
87
87
  }
88
88
 
89
- // --- Validate --format flag ---
89
+ // --- Validate --format flag (supports comma-separated: md,html,pdf) ---
90
90
  const VALID_FORMATS = new Set(['md', 'html', 'json', 'pdf', 'docx', 'all']);
91
- if (!VALID_FORMATS.has(opts.format)) {
92
- throw new Error(`Invalid --format "${opts.format}". Must be: md, html, json, pdf, docx, or all`);
91
+ const requestedFormats = opts.format.split(',').map(f => f.trim()).filter(Boolean);
92
+ const invalidFormats = requestedFormats.filter(f => !VALID_FORMATS.has(f));
93
+ if (invalidFormats.length > 0) {
94
+ throw new Error(`Invalid --format "${invalidFormats.join(', ')}". Valid: md, html, json, pdf, docx, all`);
93
95
  }
96
+ // Normalise: "all" or set of specific formats
97
+ opts.formats = requestedFormats.includes('all')
98
+ ? new Set(['md', 'html', 'json', 'pdf', 'docx'])
99
+ : new Set(requestedFormats);
100
+ // Keep opts.format as the original string for backwards compatibility
101
+ opts.format = requestedFormats.includes('all') ? 'all' : requestedFormats.join(',');
94
102
 
95
103
  // --- Resolve folder: positional arg or interactive selection ---
96
104
  let folderArg = positional[0];
@@ -25,6 +25,8 @@ const { getLog, phaseTimer, PROJECT_ROOT } = require('./_shared');
25
25
 
26
26
  /** Check whether a given output type should be rendered. */
27
27
  function shouldRender(opts, type) {
28
+ if (opts.formats) return opts.formats.has(type);
29
+ // Fallback for legacy callers
28
30
  if (opts.format === 'all') return true;
29
31
  return opts.format === type;
30
32
  }
@@ -59,14 +61,11 @@ async function phaseOutput(ctx, results, compiledAnalysis, compilationRun, compi
59
61
  // Attach cost summary to results
60
62
  results.costSummary = costTracker.getSummary();
61
63
 
62
- // Write results JSON (always written unless --format excludes it)
64
+ // Write results JSON (always written; logged only when JSON format is requested)
63
65
  const jsonPath = path.join(runDir, 'results.json');
64
- if (shouldRender(opts, 'json') || opts.format === 'all') {
65
- fs.writeFileSync(jsonPath, JSON.stringify(results, null, 2), 'utf8');
66
+ fs.writeFileSync(jsonPath, JSON.stringify(results, null, 2), 'utf8');
67
+ if (shouldRender(opts, 'json')) {
66
68
  log.step(`Results JSON saved → ${jsonPath}`);
67
- } else {
68
- // Still write JSON internally (needed for uploads/diffs) but don't advertise
69
- fs.writeFileSync(jsonPath, JSON.stringify(results, null, 2), 'utf8');
70
69
  }
71
70
 
72
71
  // Generate Markdown
package/src/pipeline.js CHANGED
@@ -370,7 +370,7 @@ async function runDocOnly(ctx) {
370
370
  const jsonPath = path.join(runDir, 'results.json');
371
371
  fs.writeFileSync(jsonPath, JSON.stringify(results, null, 2), 'utf8');
372
372
 
373
- const shouldRender = (type) => opts.format === 'all' || opts.format === type;
373
+ const shouldRender = (type) => opts.formats ? opts.formats.has(type) : (opts.format === 'all' || opts.format === type);
374
374
 
375
375
  if (compiledAnalysis) {
376
376
  const mdMeta = {
package/src/utils/cli.js CHANGED
@@ -370,7 +370,7 @@ ${f('--deep-dive', 'Generate explanatory docs per topic')}
370
370
  ${h('CORE OPTIONS')}
371
371
  ${f('--name <name>', 'Your name (skip interactive prompt)')}
372
372
  ${f('--model <id>', 'Gemini model (skip interactive selector)')}
373
- ${f('--format <type>', 'Output formats: md, html, json, pdf, docx, all (default: all)')}
373
+ ${f('--format <type>', 'Output: md, html, json, pdf, docx, all — comma-separated (default: all)')}
374
374
  ${f('--min-confidence <level>', 'Filter: high, medium, low (default: all)')}
375
375
  ${f('--output <dir>', 'Custom output directory for results')}
376
376
  ${f('--skip-upload', 'Skip Firebase Storage uploads')}
@@ -424,6 +424,7 @@ ${f('--version, -v', 'Show version')}
424
424
  ${c.dim('$')} taskex --dynamic --request "Plan API migration" "specs"
425
425
  ${c.dim('$')} taskex --min-confidence medium "call 1" ${c.dim('# Filter low-confidence')}
426
426
  ${c.dim('$')} taskex --format md "call 1" ${c.dim('# Markdown only')}
427
+ ${c.dim('$')} taskex --format md,html,pdf "call 1" ${c.dim('# Multiple formats')}
427
428
  ${c.dim('$')} taskex --format pdf "call 1" ${c.dim('# PDF report')}
428
429
  ${c.dim('$')} taskex --format docx "call 1" ${c.dim('# Word document')}
429
430
  ${c.dim('$')} taskex --resume "call 1" ${c.dim('# Resume interrupted run')}