specweave 0.28.67 → 0.29.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/CLAUDE.md +3 -2
- package/README.md +19 -2
- package/dist/src/cli/commands/discrepancies.d.ts +89 -0
- package/dist/src/cli/commands/discrepancies.d.ts.map +1 -0
- package/dist/src/cli/commands/discrepancies.js +385 -0
- package/dist/src/cli/commands/discrepancies.js.map +1 -0
- package/dist/src/cli/commands/notifications.d.ts +70 -0
- package/dist/src/cli/commands/notifications.d.ts.map +1 -0
- package/dist/src/cli/commands/notifications.js +236 -0
- package/dist/src/cli/commands/notifications.js.map +1 -0
- package/dist/src/cli/commands/sync-logs.d.ts +54 -0
- package/dist/src/cli/commands/sync-logs.d.ts.map +1 -0
- package/dist/src/cli/commands/sync-logs.js +240 -0
- package/dist/src/cli/commands/sync-logs.js.map +1 -0
- package/dist/src/cli/commands/sync-monitor.d.ts +42 -0
- package/dist/src/cli/commands/sync-monitor.d.ts.map +1 -0
- package/dist/src/cli/commands/sync-monitor.js +191 -0
- package/dist/src/cli/commands/sync-monitor.js.map +1 -0
- package/dist/src/cli/helpers/init/brownfield-analysis.d.ts +45 -0
- package/dist/src/cli/helpers/init/brownfield-analysis.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/brownfield-analysis.js +431 -0
- package/dist/src/cli/helpers/init/brownfield-analysis.js.map +1 -0
- package/dist/src/cli/helpers/init/index.d.ts +1 -0
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/index.js +2 -0
- package/dist/src/cli/helpers/init/index.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.js +14 -5
- package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
- package/dist/src/cli/workers/brownfield-worker.d.ts +66 -0
- package/dist/src/cli/workers/brownfield-worker.d.ts.map +1 -0
- package/dist/src/cli/workers/brownfield-worker.js +417 -0
- package/dist/src/cli/workers/brownfield-worker.js.map +1 -0
- package/dist/src/core/background/brownfield-launcher.d.ts +86 -0
- package/dist/src/core/background/brownfield-launcher.d.ts.map +1 -0
- package/dist/src/core/background/brownfield-launcher.js +295 -0
- package/dist/src/core/background/brownfield-launcher.js.map +1 -0
- package/dist/src/core/background/index.d.ts +2 -0
- package/dist/src/core/background/index.d.ts.map +1 -1
- package/dist/src/core/background/index.js +2 -0
- package/dist/src/core/background/index.js.map +1 -1
- package/dist/src/core/background/types.d.ts +23 -2
- package/dist/src/core/background/types.d.ts.map +1 -1
- package/dist/src/core/config/index.d.ts +1 -0
- package/dist/src/core/config/index.d.ts.map +1 -1
- package/dist/src/core/config/index.js +1 -0
- package/dist/src/core/config/index.js.map +1 -1
- package/dist/src/core/config/types.d.ts +6 -0
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/dashboard/dashboard-data.d.ts +156 -0
- package/dist/src/core/dashboard/dashboard-data.d.ts.map +1 -0
- package/dist/src/core/dashboard/dashboard-data.js +191 -0
- package/dist/src/core/dashboard/dashboard-data.js.map +1 -0
- package/dist/src/core/dashboard/index.d.ts +9 -0
- package/dist/src/core/dashboard/index.d.ts.map +1 -0
- package/dist/src/core/dashboard/index.js +9 -0
- package/dist/src/core/dashboard/index.js.map +1 -0
- package/dist/src/core/discrepancy/analyzers/api-route-analyzer.d.ts +77 -0
- package/dist/src/core/discrepancy/analyzers/api-route-analyzer.d.ts.map +1 -0
- package/dist/src/core/discrepancy/analyzers/api-route-analyzer.js +286 -0
- package/dist/src/core/discrepancy/analyzers/api-route-analyzer.js.map +1 -0
- package/dist/src/core/discrepancy/analyzers/index.d.ts +8 -0
- package/dist/src/core/discrepancy/analyzers/index.d.ts.map +1 -0
- package/dist/src/core/discrepancy/analyzers/index.js +8 -0
- package/dist/src/core/discrepancy/analyzers/index.js.map +1 -0
- package/dist/src/core/discrepancy/analyzers/typescript-analyzer.d.ts +96 -0
- package/dist/src/core/discrepancy/analyzers/typescript-analyzer.d.ts.map +1 -0
- package/dist/src/core/discrepancy/analyzers/typescript-analyzer.js +247 -0
- package/dist/src/core/discrepancy/analyzers/typescript-analyzer.js.map +1 -0
- package/dist/src/core/discrepancy/brownfield-manager.d.ts +88 -0
- package/dist/src/core/discrepancy/brownfield-manager.d.ts.map +1 -0
- package/dist/src/core/discrepancy/brownfield-manager.js +520 -0
- package/dist/src/core/discrepancy/brownfield-manager.js.map +1 -0
- package/dist/src/core/discrepancy/brownfield-types.d.ts +174 -0
- package/dist/src/core/discrepancy/brownfield-types.d.ts.map +1 -0
- package/dist/src/core/discrepancy/brownfield-types.js +11 -0
- package/dist/src/core/discrepancy/brownfield-types.js.map +1 -0
- package/dist/src/core/discrepancy/detector.d.ts +92 -0
- package/dist/src/core/discrepancy/detector.d.ts.map +1 -0
- package/dist/src/core/discrepancy/detector.js +346 -0
- package/dist/src/core/discrepancy/detector.js.map +1 -0
- package/dist/src/core/discrepancy/increment-generator.d.ts +51 -0
- package/dist/src/core/discrepancy/increment-generator.d.ts.map +1 -0
- package/dist/src/core/discrepancy/increment-generator.js +234 -0
- package/dist/src/core/discrepancy/increment-generator.js.map +1 -0
- package/dist/src/core/discrepancy/index.d.ts +18 -0
- package/dist/src/core/discrepancy/index.d.ts.map +1 -0
- package/dist/src/core/discrepancy/index.js +24 -0
- package/dist/src/core/discrepancy/index.js.map +1 -0
- package/dist/src/core/discrepancy/severity-classifier.d.ts +81 -0
- package/dist/src/core/discrepancy/severity-classifier.d.ts.map +1 -0
- package/dist/src/core/discrepancy/severity-classifier.js +289 -0
- package/dist/src/core/discrepancy/severity-classifier.js.map +1 -0
- package/dist/src/core/discrepancy/spec-parser.d.ts +74 -0
- package/dist/src/core/discrepancy/spec-parser.d.ts.map +1 -0
- package/dist/src/core/discrepancy/spec-parser.js +213 -0
- package/dist/src/core/discrepancy/spec-parser.js.map +1 -0
- package/dist/src/core/discrepancy/update-recommender.d.ts +77 -0
- package/dist/src/core/discrepancy/update-recommender.d.ts.map +1 -0
- package/dist/src/core/discrepancy/update-recommender.js +323 -0
- package/dist/src/core/discrepancy/update-recommender.js.map +1 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts +13 -16
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +31 -112
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/logs/index.d.ts +10 -0
- package/dist/src/core/logs/index.d.ts.map +1 -0
- package/dist/src/core/logs/index.js +10 -0
- package/dist/src/core/logs/index.js.map +1 -0
- package/dist/src/core/logs/log-aggregator.d.ts +130 -0
- package/dist/src/core/logs/log-aggregator.d.ts.map +1 -0
- package/dist/src/core/logs/log-aggregator.js +206 -0
- package/dist/src/core/logs/log-aggregator.js.map +1 -0
- package/dist/src/core/logs/log-exporter.d.ts +81 -0
- package/dist/src/core/logs/log-exporter.d.ts.map +1 -0
- package/dist/src/core/logs/log-exporter.js +141 -0
- package/dist/src/core/logs/log-exporter.js.map +1 -0
- package/dist/src/core/notifications/command-integration.d.ts +82 -0
- package/dist/src/core/notifications/command-integration.d.ts.map +1 -0
- package/dist/src/core/notifications/command-integration.js +80 -0
- package/dist/src/core/notifications/command-integration.js.map +1 -0
- package/dist/src/core/notifications/index.d.ts +12 -0
- package/dist/src/core/notifications/index.d.ts.map +1 -0
- package/dist/src/core/notifications/index.js +12 -0
- package/dist/src/core/notifications/index.js.map +1 -0
- package/dist/src/core/notifications/notification-display.d.ts +70 -0
- package/dist/src/core/notifications/notification-display.d.ts.map +1 -0
- package/dist/src/core/notifications/notification-display.js +177 -0
- package/dist/src/core/notifications/notification-display.js.map +1 -0
- package/dist/src/core/notifications/notification-manager.d.ts +126 -0
- package/dist/src/core/notifications/notification-manager.d.ts.map +1 -0
- package/dist/src/core/notifications/notification-manager.js +287 -0
- package/dist/src/core/notifications/notification-manager.js.map +1 -0
- package/dist/src/core/notifications/notification-types.d.ts +159 -0
- package/dist/src/core/notifications/notification-types.d.ts.map +1 -0
- package/dist/src/core/notifications/notification-types.js +93 -0
- package/dist/src/core/notifications/notification-types.js.map +1 -0
- package/dist/src/core/scheduler/index.d.ts +11 -0
- package/dist/src/core/scheduler/index.d.ts.map +1 -0
- package/dist/src/core/scheduler/index.js +11 -0
- package/dist/src/core/scheduler/index.js.map +1 -0
- package/dist/src/core/scheduler/job-scheduler.d.ts +179 -0
- package/dist/src/core/scheduler/job-scheduler.d.ts.map +1 -0
- package/dist/src/core/scheduler/job-scheduler.js +282 -0
- package/dist/src/core/scheduler/job-scheduler.js.map +1 -0
- package/dist/src/core/scheduler/schedule-persistence.d.ts +83 -0
- package/dist/src/core/scheduler/schedule-persistence.d.ts.map +1 -0
- package/dist/src/core/scheduler/schedule-persistence.js +180 -0
- package/dist/src/core/scheduler/schedule-persistence.js.map +1 -0
- package/dist/src/core/scheduler/scheduled-job.d.ts +188 -0
- package/dist/src/core/scheduler/scheduled-job.d.ts.map +1 -0
- package/dist/src/core/scheduler/scheduled-job.js +182 -0
- package/dist/src/core/scheduler/scheduled-job.js.map +1 -0
- package/dist/src/core/sync/permission-enforcer.d.ts +206 -0
- package/dist/src/core/sync/permission-enforcer.d.ts.map +1 -0
- package/dist/src/core/sync/permission-enforcer.js +268 -0
- package/dist/src/core/sync/permission-enforcer.js.map +1 -0
- package/dist/src/core/sync/sync-audit-logger.d.ts +217 -0
- package/dist/src/core/sync/sync-audit-logger.d.ts.map +1 -0
- package/dist/src/core/sync/sync-audit-logger.js +327 -0
- package/dist/src/core/sync/sync-audit-logger.js.map +1 -0
- package/dist/src/core/sync/sync-interceptor.d.ts +190 -0
- package/dist/src/core/sync/sync-interceptor.d.ts.map +1 -0
- package/dist/src/core/sync/sync-interceptor.js +224 -0
- package/dist/src/core/sync/sync-interceptor.js.map +1 -0
- package/dist/src/core/types/increment-metadata.d.ts +5 -2
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/sync-config.d.ts +267 -0
- package/dist/src/core/types/sync-config.d.ts.map +1 -0
- package/dist/src/core/types/sync-config.js +304 -0
- package/dist/src/core/types/sync-config.js.map +1 -0
- package/dist/src/hooks/index.d.ts +11 -0
- package/dist/src/hooks/index.d.ts.map +1 -0
- package/dist/src/hooks/index.js +11 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/hooks/platform.d.ts +125 -0
- package/dist/src/hooks/platform.d.ts.map +1 -0
- package/dist/src/hooks/platform.js +325 -0
- package/dist/src/hooks/platform.js.map +1 -0
- package/dist/src/hooks/processor.d.ts +20 -0
- package/dist/src/hooks/processor.d.ts.map +1 -0
- package/dist/src/hooks/processor.js +317 -0
- package/dist/src/hooks/processor.js.map +1 -0
- package/dist/src/hooks/scheduler-startup.d.ts +19 -0
- package/dist/src/hooks/scheduler-startup.d.ts.map +1 -0
- package/dist/src/hooks/scheduler-startup.js +92 -0
- package/dist/src/hooks/scheduler-startup.js.map +1 -0
- package/dist/src/hooks/session-start.d.ts +16 -0
- package/dist/src/hooks/session-start.d.ts.map +1 -0
- package/dist/src/hooks/session-start.js +92 -0
- package/dist/src/hooks/session-start.js.map +1 -0
- package/dist/src/importers/duplicate-detector.d.ts +13 -2
- package/dist/src/importers/duplicate-detector.d.ts.map +1 -1
- package/dist/src/importers/duplicate-detector.js +21 -2
- package/dist/src/importers/duplicate-detector.js.map +1 -1
- package/dist/src/importers/item-converter.d.ts +41 -2
- package/dist/src/importers/item-converter.d.ts.map +1 -1
- package/dist/src/importers/item-converter.js +231 -45
- package/dist/src/importers/item-converter.js.map +1 -1
- package/dist/src/living-docs/fs-id-allocator.d.ts +7 -0
- package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
- package/dist/src/living-docs/fs-id-allocator.js +30 -4
- package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
- package/dist/src/sync/ado-sync-wrapper.d.ts +137 -0
- package/dist/src/sync/ado-sync-wrapper.d.ts.map +1 -0
- package/dist/src/sync/ado-sync-wrapper.js +148 -0
- package/dist/src/sync/ado-sync-wrapper.js.map +1 -0
- package/dist/src/sync/github-sync-wrapper.d.ts +195 -0
- package/dist/src/sync/github-sync-wrapper.d.ts.map +1 -0
- package/dist/src/sync/github-sync-wrapper.js +220 -0
- package/dist/src/sync/github-sync-wrapper.js.map +1 -0
- package/dist/src/sync/jira-sync-wrapper.d.ts +155 -0
- package/dist/src/sync/jira-sync-wrapper.d.ts.map +1 -0
- package/dist/src/sync/jira-sync-wrapper.js +175 -0
- package/dist/src/sync/jira-sync-wrapper.js.map +1 -0
- package/dist/src/utils/feature-id-derivation.d.ts +58 -0
- package/dist/src/utils/feature-id-derivation.d.ts.map +1 -0
- package/dist/src/utils/feature-id-derivation.js +77 -0
- package/dist/src/utils/feature-id-derivation.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/commands/specweave-discrepancies.md +141 -0
- package/plugins/specweave/commands/specweave-discrepancy-to-increment.md +160 -0
- package/plugins/specweave/commands/specweave-jobs.md +45 -2
- package/plugins/specweave/commands/specweave-notifications.md +92 -0
- package/plugins/specweave/commands/specweave-sync-logs.md +131 -0
- package/plugins/specweave/commands/specweave-sync-monitor.md +57 -0
- package/plugins/specweave/hooks/hooks.json +3 -3
- package/plugins/specweave/hooks/lib/scheduler-startup.sh +72 -0
- package/plugins/specweave/hooks/universal/dispatcher.mjs +246 -0
- package/plugins/specweave/hooks/universal/session-start.cmd +16 -0
- package/plugins/specweave/hooks/universal/session-start.ps1 +16 -0
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +14 -5
- package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +5 -2
- package/plugins/specweave/skills/discrepancy-viewer.md +154 -0
- package/plugins/specweave-ado/lib/ado-project-detector.js +11 -5
- package/plugins/specweave-ado/lib/ado-project-detector.ts +16 -5
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +34 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +51 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log Exporter
|
|
3
|
+
*
|
|
4
|
+
* Exports log query results to various formats.
|
|
5
|
+
*
|
|
6
|
+
* @module core/logs/log-exporter
|
|
7
|
+
*/
|
|
8
|
+
import { promises as fs } from 'fs';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
import { consoleLogger } from '../../utils/logger.js';
|
|
11
|
+
/**
|
|
12
|
+
* LogExporter - Export log entries to files
|
|
13
|
+
*
|
|
14
|
+
* Supports:
|
|
15
|
+
* - JSON (single object with entries array)
|
|
16
|
+
* - JSONL (one entry per line)
|
|
17
|
+
* - CSV (for spreadsheet import)
|
|
18
|
+
*/
|
|
19
|
+
export class LogExporter {
|
|
20
|
+
constructor(options = {}) {
|
|
21
|
+
this.logger = options.logger ?? consoleLogger;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Export query results to a file
|
|
25
|
+
*/
|
|
26
|
+
async export(result, outputPath, options = {}) {
|
|
27
|
+
const format = options.format ?? this.detectFormat(outputPath);
|
|
28
|
+
const content = this.formatContent(result, format, options);
|
|
29
|
+
// Ensure directory exists
|
|
30
|
+
await fs.mkdir(path.dirname(outputPath), { recursive: true });
|
|
31
|
+
// Write file
|
|
32
|
+
await fs.writeFile(outputPath, content, 'utf-8');
|
|
33
|
+
this.logger.debug(`Exported ${result.entries.length} entries to ${outputPath}`);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Export entries to a string
|
|
37
|
+
*/
|
|
38
|
+
exportToString(entries, format, options = {}) {
|
|
39
|
+
const result = {
|
|
40
|
+
entries,
|
|
41
|
+
total: entries.length,
|
|
42
|
+
hasMore: false,
|
|
43
|
+
query: {},
|
|
44
|
+
executionTimeMs: 0,
|
|
45
|
+
};
|
|
46
|
+
return this.formatContent(result, format, options);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Format content based on format type
|
|
50
|
+
*/
|
|
51
|
+
formatContent(result, format, options) {
|
|
52
|
+
switch (format) {
|
|
53
|
+
case 'json':
|
|
54
|
+
return this.formatJson(result, options);
|
|
55
|
+
case 'jsonl':
|
|
56
|
+
return this.formatJsonl(result);
|
|
57
|
+
case 'csv':
|
|
58
|
+
return this.formatCsv(result);
|
|
59
|
+
default:
|
|
60
|
+
return this.formatJson(result, options);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Format as JSON
|
|
65
|
+
*/
|
|
66
|
+
formatJson(result, options) {
|
|
67
|
+
const pretty = options.pretty ?? true;
|
|
68
|
+
const includeMetadata = options.includeMetadata ?? true;
|
|
69
|
+
const output = includeMetadata
|
|
70
|
+
? {
|
|
71
|
+
metadata: {
|
|
72
|
+
exportedAt: new Date().toISOString(),
|
|
73
|
+
total: result.total,
|
|
74
|
+
hasMore: result.hasMore,
|
|
75
|
+
query: result.query,
|
|
76
|
+
executionTimeMs: result.executionTimeMs,
|
|
77
|
+
},
|
|
78
|
+
entries: result.entries,
|
|
79
|
+
}
|
|
80
|
+
: result.entries;
|
|
81
|
+
return pretty ? JSON.stringify(output, null, 2) : JSON.stringify(output);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Format as JSONL (one JSON object per line)
|
|
85
|
+
*/
|
|
86
|
+
formatJsonl(result) {
|
|
87
|
+
return result.entries.map(e => JSON.stringify(e)).join('\n') + '\n';
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Format as CSV
|
|
91
|
+
*/
|
|
92
|
+
formatCsv(result) {
|
|
93
|
+
const headers = [
|
|
94
|
+
'timestamp',
|
|
95
|
+
'platform',
|
|
96
|
+
'operation',
|
|
97
|
+
'itemId',
|
|
98
|
+
'result',
|
|
99
|
+
'reason',
|
|
100
|
+
'error',
|
|
101
|
+
'durationMs',
|
|
102
|
+
];
|
|
103
|
+
const rows = result.entries.map(entry => [
|
|
104
|
+
entry.timestamp,
|
|
105
|
+
entry.platform,
|
|
106
|
+
entry.operation,
|
|
107
|
+
entry.itemId,
|
|
108
|
+
entry.result,
|
|
109
|
+
entry.reason ?? '',
|
|
110
|
+
entry.error ?? '',
|
|
111
|
+
entry.durationMs?.toString() ?? '',
|
|
112
|
+
]);
|
|
113
|
+
const escape = (value) => {
|
|
114
|
+
if (value.includes(',') || value.includes('"') || value.includes('\n')) {
|
|
115
|
+
return `"${value.replace(/"/g, '""')}"`;
|
|
116
|
+
}
|
|
117
|
+
return value;
|
|
118
|
+
};
|
|
119
|
+
const csvLines = [
|
|
120
|
+
headers.join(','),
|
|
121
|
+
...rows.map(row => row.map(escape).join(',')),
|
|
122
|
+
];
|
|
123
|
+
return csvLines.join('\n') + '\n';
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Detect format from file extension
|
|
127
|
+
*/
|
|
128
|
+
detectFormat(filePath) {
|
|
129
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
130
|
+
switch (ext) {
|
|
131
|
+
case '.jsonl':
|
|
132
|
+
return 'jsonl';
|
|
133
|
+
case '.csv':
|
|
134
|
+
return 'csv';
|
|
135
|
+
case '.json':
|
|
136
|
+
default:
|
|
137
|
+
return 'json';
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=log-exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-exporter.js","sourceRoot":"","sources":["../../../../src/core/logs/log-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAU,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAqC9D;;;;;;;GAOG;AACH,MAAM,OAAO,WAAW;IAGtB,YAAY,UAA8B,EAAE;QAC1C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC;IAChD,CA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ACH,CAAC;CACF"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Command Integration
|
|
3
|
+
*
|
|
4
|
+
* Helper for injecting notification summaries into command output.
|
|
5
|
+
* Used by SpecWeave commands like /progress, /status, /done to show
|
|
6
|
+
* pending notifications after their main output.
|
|
7
|
+
*
|
|
8
|
+
* @module core/notifications/command-integration
|
|
9
|
+
*/
|
|
10
|
+
import { Notification } from './notification-types.js';
|
|
11
|
+
import { Logger } from '../../utils/logger.js';
|
|
12
|
+
/**
|
|
13
|
+
* Options for command notification display
|
|
14
|
+
*/
|
|
15
|
+
export interface CommandNotificationOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Path to .specweave directory
|
|
18
|
+
*/
|
|
19
|
+
specweavePath?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Logger instance
|
|
22
|
+
*/
|
|
23
|
+
logger?: Logger;
|
|
24
|
+
/**
|
|
25
|
+
* Display style
|
|
26
|
+
* @default 'summary'
|
|
27
|
+
*/
|
|
28
|
+
style?: 'compact' | 'summary' | 'box';
|
|
29
|
+
/**
|
|
30
|
+
* Minimum severity to show
|
|
31
|
+
* If 'critical', only show if critical notifications exist
|
|
32
|
+
*/
|
|
33
|
+
minSeverity?: 'info' | 'warning' | 'critical';
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Result of notification check
|
|
37
|
+
*/
|
|
38
|
+
export interface NotificationCheckResult {
|
|
39
|
+
/**
|
|
40
|
+
* Number of pending notifications
|
|
41
|
+
*/
|
|
42
|
+
count: number;
|
|
43
|
+
/**
|
|
44
|
+
* Whether any critical notifications exist
|
|
45
|
+
*/
|
|
46
|
+
hasCritical: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether any warning notifications exist
|
|
49
|
+
*/
|
|
50
|
+
hasWarning: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Formatted output string (empty if no notifications to show)
|
|
53
|
+
*/
|
|
54
|
+
output: string;
|
|
55
|
+
/**
|
|
56
|
+
* The pending notifications
|
|
57
|
+
*/
|
|
58
|
+
notifications: Notification[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Check for pending notifications and format for command output
|
|
62
|
+
*
|
|
63
|
+
* @param options - Configuration options
|
|
64
|
+
* @returns Check result with formatted output
|
|
65
|
+
*/
|
|
66
|
+
export declare function checkAndFormatNotifications(options?: CommandNotificationOptions): Promise<NotificationCheckResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Print notification summary to console if there are pending notifications
|
|
69
|
+
*
|
|
70
|
+
* @param options - Configuration options
|
|
71
|
+
* @returns true if notifications were printed
|
|
72
|
+
*/
|
|
73
|
+
export declare function printNotificationSummary(options?: CommandNotificationOptions): Promise<boolean>;
|
|
74
|
+
/**
|
|
75
|
+
* Wrapper to add notification summary to a command function
|
|
76
|
+
*
|
|
77
|
+
* @param commandFn - The command function to wrap
|
|
78
|
+
* @param options - Notification display options
|
|
79
|
+
* @returns Wrapped function that shows notifications after command
|
|
80
|
+
*/
|
|
81
|
+
export declare function withNotifications<T extends (...args: unknown[]) => Promise<void>>(commandFn: T, options?: CommandNotificationOptions): T;
|
|
82
|
+
//# sourceMappingURL=command-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-integration.d.ts","sourceRoot":"","sources":["../../../../src/core/notifications/command-integration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAiB,MAAM,uBAAuB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;IAEtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,uBAAuB,CAAC,CAmClC;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,EAC/E,SAAS,EAAE,CAAC,EACZ,OAAO,GAAE,0BAA+B,GACvC,CAAC,CAKH"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Command Integration
|
|
3
|
+
*
|
|
4
|
+
* Helper for injecting notification summaries into command output.
|
|
5
|
+
* Used by SpecWeave commands like /progress, /status, /done to show
|
|
6
|
+
* pending notifications after their main output.
|
|
7
|
+
*
|
|
8
|
+
* @module core/notifications/command-integration
|
|
9
|
+
*/
|
|
10
|
+
import path from 'path';
|
|
11
|
+
import { NotificationManager } from './notification-manager.js';
|
|
12
|
+
import { formatNotificationsForOutput } from './notification-display.js';
|
|
13
|
+
import { consoleLogger } from '../../utils/logger.js';
|
|
14
|
+
/**
|
|
15
|
+
* Check for pending notifications and format for command output
|
|
16
|
+
*
|
|
17
|
+
* @param options - Configuration options
|
|
18
|
+
* @returns Check result with formatted output
|
|
19
|
+
*/
|
|
20
|
+
export async function checkAndFormatNotifications(options = {}) {
|
|
21
|
+
const logger = options.logger ?? consoleLogger;
|
|
22
|
+
const specweavePath = options.specweavePath ?? path.join(process.cwd(), '.specweave');
|
|
23
|
+
const style = options.style ?? 'summary';
|
|
24
|
+
const manager = new NotificationManager({ specweavePath, logger });
|
|
25
|
+
let notifications;
|
|
26
|
+
try {
|
|
27
|
+
notifications = await manager.getPending();
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
logger.debug(`Failed to load notifications: ${error}`);
|
|
31
|
+
notifications = [];
|
|
32
|
+
}
|
|
33
|
+
const hasCritical = notifications.some(n => n.severity === 'critical');
|
|
34
|
+
const hasWarning = notifications.some(n => n.severity === 'warning');
|
|
35
|
+
// Filter by minimum severity if specified
|
|
36
|
+
let filteredNotifications = notifications;
|
|
37
|
+
if (options.minSeverity === 'critical') {
|
|
38
|
+
filteredNotifications = hasCritical ? notifications : [];
|
|
39
|
+
}
|
|
40
|
+
else if (options.minSeverity === 'warning') {
|
|
41
|
+
filteredNotifications = (hasCritical || hasWarning) ? notifications : [];
|
|
42
|
+
}
|
|
43
|
+
const output = formatNotificationsForOutput(filteredNotifications, { style });
|
|
44
|
+
return {
|
|
45
|
+
count: notifications.length,
|
|
46
|
+
hasCritical,
|
|
47
|
+
hasWarning,
|
|
48
|
+
output,
|
|
49
|
+
notifications: filteredNotifications,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Print notification summary to console if there are pending notifications
|
|
54
|
+
*
|
|
55
|
+
* @param options - Configuration options
|
|
56
|
+
* @returns true if notifications were printed
|
|
57
|
+
*/
|
|
58
|
+
export async function printNotificationSummary(options = {}) {
|
|
59
|
+
const result = await checkAndFormatNotifications(options);
|
|
60
|
+
if (result.output) {
|
|
61
|
+
console.log(result.output);
|
|
62
|
+
console.log("Run '/specweave:notifications' to view");
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Wrapper to add notification summary to a command function
|
|
69
|
+
*
|
|
70
|
+
* @param commandFn - The command function to wrap
|
|
71
|
+
* @param options - Notification display options
|
|
72
|
+
* @returns Wrapped function that shows notifications after command
|
|
73
|
+
*/
|
|
74
|
+
export function withNotifications(commandFn, options = {}) {
|
|
75
|
+
return (async (...args) => {
|
|
76
|
+
await commandFn(...args);
|
|
77
|
+
await printNotificationSummary(options);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=command-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-integration.js","sourceRoot":"","sources":["../../../../src/core/notifications/command-integration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAU,aAAa,EAAE,MAAM,uBAAuB,CAAC;AA2D9D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,UAAsC,EAAE;IAExC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC;IAC/C,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;IACtF,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,SAAS,CAAC;IAEzC,MAAM,OAAO,GAAG,IAAI,mBAAmB,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC;IAEnE,IAAI,aAA6B,CAAC;IAClC,IAAI,CAAC;QACH,aAAa,GAAG,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,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,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,SAAY,EACZ,UAAsC,EAAE;IAExC,OAAO,CAAC,KAAK,EAAE,GAAG,IAAe,EAAE,EAAE;QACnC,MAAM,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;QACzB,MAAM,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAM,CAAC;AACV,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notifications Module
|
|
3
|
+
*
|
|
4
|
+
* Exports notification functionality for the sync orchestration system.
|
|
5
|
+
*
|
|
6
|
+
* @module core/notifications
|
|
7
|
+
*/
|
|
8
|
+
export * from './notification-types.js';
|
|
9
|
+
export * from './notification-manager.js';
|
|
10
|
+
export * from './notification-display.js';
|
|
11
|
+
export * from './command-integration.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/notifications/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notifications Module
|
|
3
|
+
*
|
|
4
|
+
* Exports notification functionality for the sync orchestration system.
|
|
5
|
+
*
|
|
6
|
+
* @module core/notifications
|
|
7
|
+
*/
|
|
8
|
+
export * from './notification-types.js';
|
|
9
|
+
export * from './notification-manager.js';
|
|
10
|
+
export * from './notification-display.js';
|
|
11
|
+
export * from './command-integration.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/notifications/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Display
|
|
3
|
+
*
|
|
4
|
+
* Formatting utilities for displaying notifications in CLI output.
|
|
5
|
+
*
|
|
6
|
+
* @module core/notifications/notification-display
|
|
7
|
+
*/
|
|
8
|
+
import { Notification } from './notification-types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Format a single notification for display
|
|
11
|
+
*
|
|
12
|
+
* @param notification - Notification to format
|
|
13
|
+
* @returns Formatted string
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatNotification(notification: Notification): string;
|
|
16
|
+
/**
|
|
17
|
+
* Format a detailed notification for display
|
|
18
|
+
*
|
|
19
|
+
* @param notification - Notification to format
|
|
20
|
+
* @returns Formatted string with message
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatNotificationDetailed(notification: Notification): string;
|
|
23
|
+
/**
|
|
24
|
+
* Format a notification summary line
|
|
25
|
+
*
|
|
26
|
+
* @param notifications - Array of pending notifications
|
|
27
|
+
* @returns Summary string (e.g., "3 notifications: 1 critical, 2 warnings")
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatNotificationSummary(notifications: Notification[]): string;
|
|
30
|
+
/**
|
|
31
|
+
* Format a notification list for CLI display
|
|
32
|
+
*
|
|
33
|
+
* @param notifications - Array of notifications
|
|
34
|
+
* @param options - Display options
|
|
35
|
+
* @returns Formatted string
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatNotificationList(notifications: Notification[], options?: {
|
|
38
|
+
maxItems?: number;
|
|
39
|
+
showDetails?: boolean;
|
|
40
|
+
}): string;
|
|
41
|
+
/**
|
|
42
|
+
* Format notifications in a box for prominent display
|
|
43
|
+
*
|
|
44
|
+
* @param notifications - Array of notifications
|
|
45
|
+
* @returns Formatted box string
|
|
46
|
+
*/
|
|
47
|
+
export declare function formatNotificationBox(notifications: Notification[]): string;
|
|
48
|
+
/**
|
|
49
|
+
* Get a compact notification indicator for status line
|
|
50
|
+
*
|
|
51
|
+
* @param count - Number of pending notifications
|
|
52
|
+
* @param hasCritical - Whether any are critical
|
|
53
|
+
* @returns Compact indicator string
|
|
54
|
+
*/
|
|
55
|
+
export declare function getNotificationIndicator(count: number, hasCritical: boolean): string;
|
|
56
|
+
/**
|
|
57
|
+
* Format notifications for injection into command output
|
|
58
|
+
*
|
|
59
|
+
* This is the main function used by hooks to display notifications
|
|
60
|
+
* after command execution.
|
|
61
|
+
*
|
|
62
|
+
* @param notifications - Pending notifications
|
|
63
|
+
* @param options - Display options
|
|
64
|
+
* @returns Formatted string to append to output
|
|
65
|
+
*/
|
|
66
|
+
export declare function formatNotificationsForOutput(notifications: Notification[], options?: {
|
|
67
|
+
style?: 'compact' | 'summary' | 'box';
|
|
68
|
+
separator?: string;
|
|
69
|
+
}): string;
|
|
70
|
+
//# sourceMappingURL=notification-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-display.d.ts","sourceRoot":"","sources":["../../../../src/core/notifications/notification-display.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EAIb,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAGrE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAI7E;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,MAAM,CA8B/E;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,YAAY,EAAE,EAC7B,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GACzD,MAAM,CAyBR;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,MAAM,CA0C3E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,OAAO,GACnB,MAAM,CAOR;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,YAAY,EAAE,EAC7B,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,MAAM,CA6BR"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Display
|
|
3
|
+
*
|
|
4
|
+
* Formatting utilities for displaying notifications in CLI output.
|
|
5
|
+
*
|
|
6
|
+
* @module core/notifications/notification-display
|
|
7
|
+
*/
|
|
8
|
+
import { getSeverityEmoji, getNotificationTypeLabel, } from './notification-types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Format a single notification for display
|
|
11
|
+
*
|
|
12
|
+
* @param notification - Notification to format
|
|
13
|
+
* @returns Formatted string
|
|
14
|
+
*/
|
|
15
|
+
export function formatNotification(notification) {
|
|
16
|
+
const emoji = getSeverityEmoji(notification.severity);
|
|
17
|
+
return `${emoji} ${notification.title}`;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Format a detailed notification for display
|
|
21
|
+
*
|
|
22
|
+
* @param notification - Notification to format
|
|
23
|
+
* @returns Formatted string with message
|
|
24
|
+
*/
|
|
25
|
+
export function formatNotificationDetailed(notification) {
|
|
26
|
+
const emoji = getSeverityEmoji(notification.severity);
|
|
27
|
+
const type = getNotificationTypeLabel(notification.type);
|
|
28
|
+
return `${emoji} [${type}] ${notification.title}\n ${notification.message}`;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Format a notification summary line
|
|
32
|
+
*
|
|
33
|
+
* @param notifications - Array of pending notifications
|
|
34
|
+
* @returns Summary string (e.g., "3 notifications: 1 critical, 2 warnings")
|
|
35
|
+
*/
|
|
36
|
+
export function formatNotificationSummary(notifications) {
|
|
37
|
+
if (notifications.length === 0) {
|
|
38
|
+
return '';
|
|
39
|
+
}
|
|
40
|
+
const bySeverity = {
|
|
41
|
+
critical: 0,
|
|
42
|
+
warning: 0,
|
|
43
|
+
info: 0,
|
|
44
|
+
};
|
|
45
|
+
for (const n of notifications) {
|
|
46
|
+
bySeverity[n.severity]++;
|
|
47
|
+
}
|
|
48
|
+
const parts = [];
|
|
49
|
+
if (bySeverity.critical > 0) {
|
|
50
|
+
parts.push(`${bySeverity.critical} critical`);
|
|
51
|
+
}
|
|
52
|
+
if (bySeverity.warning > 0) {
|
|
53
|
+
parts.push(`${bySeverity.warning} warning${bySeverity.warning > 1 ? 's' : ''}`);
|
|
54
|
+
}
|
|
55
|
+
if (bySeverity.info > 0) {
|
|
56
|
+
parts.push(`${bySeverity.info} info`);
|
|
57
|
+
}
|
|
58
|
+
const count = notifications.length;
|
|
59
|
+
const countLabel = count === 1 ? 'notification' : 'notifications';
|
|
60
|
+
return `📬 ${count} ${countLabel}${parts.length > 0 ? ': ' + parts.join(', ') : ''}`;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Format a notification list for CLI display
|
|
64
|
+
*
|
|
65
|
+
* @param notifications - Array of notifications
|
|
66
|
+
* @param options - Display options
|
|
67
|
+
* @returns Formatted string
|
|
68
|
+
*/
|
|
69
|
+
export function formatNotificationList(notifications, options = {}) {
|
|
70
|
+
const { maxItems = 5, showDetails = false } = options;
|
|
71
|
+
if (notifications.length === 0) {
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
const items = notifications.slice(0, maxItems);
|
|
75
|
+
const remaining = notifications.length - items.length;
|
|
76
|
+
const lines = [];
|
|
77
|
+
for (const notification of items) {
|
|
78
|
+
if (showDetails) {
|
|
79
|
+
lines.push(formatNotificationDetailed(notification));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
lines.push(formatNotification(notification));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (remaining > 0) {
|
|
86
|
+
lines.push(` ... and ${remaining} more`);
|
|
87
|
+
}
|
|
88
|
+
return lines.join('\n');
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Format notifications in a box for prominent display
|
|
92
|
+
*
|
|
93
|
+
* @param notifications - Array of notifications
|
|
94
|
+
* @returns Formatted box string
|
|
95
|
+
*/
|
|
96
|
+
export function formatNotificationBox(notifications) {
|
|
97
|
+
if (notifications.length === 0) {
|
|
98
|
+
return '';
|
|
99
|
+
}
|
|
100
|
+
const width = 50;
|
|
101
|
+
const horizontalLine = '─'.repeat(width - 2);
|
|
102
|
+
const lines = [];
|
|
103
|
+
// Top border
|
|
104
|
+
lines.push(`╭${horizontalLine}╮`);
|
|
105
|
+
// Header
|
|
106
|
+
const header = `📬 ${notifications.length} pending notification${notifications.length > 1 ? 's' : ''}`;
|
|
107
|
+
lines.push(`│ ${header.padEnd(width - 3)} │`);
|
|
108
|
+
// Separator
|
|
109
|
+
lines.push(`├${horizontalLine}┤`);
|
|
110
|
+
// Notifications (max 5)
|
|
111
|
+
const maxItems = 5;
|
|
112
|
+
const items = notifications.slice(0, maxItems);
|
|
113
|
+
for (const notification of items) {
|
|
114
|
+
const emoji = getSeverityEmoji(notification.severity);
|
|
115
|
+
const text = `${emoji} ${notification.severity.toUpperCase()}: ${notification.title}`;
|
|
116
|
+
const truncated = text.length > width - 4 ? text.substring(0, width - 7) + '...' : text;
|
|
117
|
+
lines.push(`│ ${truncated.padEnd(width - 3)} │`);
|
|
118
|
+
}
|
|
119
|
+
// Remaining count
|
|
120
|
+
const remaining = notifications.length - items.length;
|
|
121
|
+
if (remaining > 0) {
|
|
122
|
+
const moreText = ` ... and ${remaining} more`;
|
|
123
|
+
lines.push(`│ ${moreText.padEnd(width - 3)} │`);
|
|
124
|
+
}
|
|
125
|
+
// Bottom border
|
|
126
|
+
lines.push(`╰${horizontalLine}╯`);
|
|
127
|
+
return lines.join('\n');
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get a compact notification indicator for status line
|
|
131
|
+
*
|
|
132
|
+
* @param count - Number of pending notifications
|
|
133
|
+
* @param hasCritical - Whether any are critical
|
|
134
|
+
* @returns Compact indicator string
|
|
135
|
+
*/
|
|
136
|
+
export function getNotificationIndicator(count, hasCritical) {
|
|
137
|
+
if (count === 0) {
|
|
138
|
+
return '';
|
|
139
|
+
}
|
|
140
|
+
const emoji = hasCritical ? '🔔' : '📬';
|
|
141
|
+
return `${emoji} ${count}`;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Format notifications for injection into command output
|
|
145
|
+
*
|
|
146
|
+
* This is the main function used by hooks to display notifications
|
|
147
|
+
* after command execution.
|
|
148
|
+
*
|
|
149
|
+
* @param notifications - Pending notifications
|
|
150
|
+
* @param options - Display options
|
|
151
|
+
* @returns Formatted string to append to output
|
|
152
|
+
*/
|
|
153
|
+
export function formatNotificationsForOutput(notifications, options = {}) {
|
|
154
|
+
const { style = 'summary', separator = '\n\n' } = options;
|
|
155
|
+
if (notifications.length === 0) {
|
|
156
|
+
return '';
|
|
157
|
+
}
|
|
158
|
+
let output;
|
|
159
|
+
switch (style) {
|
|
160
|
+
case 'compact':
|
|
161
|
+
const hasCritical = notifications.some((n) => n.severity === 'critical');
|
|
162
|
+
output = getNotificationIndicator(notifications.length, hasCritical);
|
|
163
|
+
break;
|
|
164
|
+
case 'box':
|
|
165
|
+
output = formatNotificationBox(notifications);
|
|
166
|
+
break;
|
|
167
|
+
case 'summary':
|
|
168
|
+
default:
|
|
169
|
+
output = [
|
|
170
|
+
formatNotificationSummary(notifications),
|
|
171
|
+
formatNotificationList(notifications, { maxItems: 3 }),
|
|
172
|
+
].filter(Boolean).join('\n');
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
return output ? separator + output : '';
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=notification-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-display.js","sourceRoot":"","sources":["../../../../src/core/notifications/notification-display.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAGL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,YAA0B;IAC3D,MAAM,KAAK,GAAG,gBAAgB,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACtD,OAAO,GAAG,KAAK,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,YAA0B;IACnE,MAAM,KAAK,GAAG,gBAAgB,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,wBAAwB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,GAAG,KAAK,KAAK,IAAI,KAAK,YAAY,CAAC,KAAK,QAAQ,YAAY,CAAC,OAAO,EAAE,CAAC;AAChF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,aAA6B;IACrE,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,UAAU,GAAyC;QACvD,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,CAAC;KACR,CAAC;IAEF,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;QAC9B,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,I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