proofscan 0.10.26 → 0.10.28

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.
Files changed (96) hide show
  1. package/dist/cli.js +4 -2
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/catalog.d.ts.map +1 -1
  4. package/dist/commands/catalog.js +22 -0
  5. package/dist/commands/catalog.js.map +1 -1
  6. package/dist/commands/connectors.d.ts.map +1 -1
  7. package/dist/commands/connectors.js +10 -3
  8. package/dist/commands/connectors.js.map +1 -1
  9. package/dist/commands/index.d.ts +1 -0
  10. package/dist/commands/index.d.ts.map +1 -1
  11. package/dist/commands/index.js +2 -0
  12. package/dist/commands/index.js.map +1 -1
  13. package/dist/commands/monitor.d.ts +6 -0
  14. package/dist/commands/monitor.d.ts.map +1 -0
  15. package/dist/commands/monitor.js +59 -0
  16. package/dist/commands/monitor.js.map +1 -0
  17. package/dist/html/analytics.d.ts +58 -0
  18. package/dist/html/analytics.d.ts.map +1 -0
  19. package/dist/html/analytics.js +337 -0
  20. package/dist/html/analytics.js.map +1 -0
  21. package/dist/html/index.d.ts +5 -2
  22. package/dist/html/index.d.ts.map +1 -1
  23. package/dist/html/index.js +5 -1
  24. package/dist/html/index.js.map +1 -1
  25. package/dist/html/rpc-inspector.d.ts +43 -0
  26. package/dist/html/rpc-inspector.d.ts.map +1 -0
  27. package/dist/html/rpc-inspector.js +922 -0
  28. package/dist/html/rpc-inspector.js.map +1 -0
  29. package/dist/html/templates.d.ts +9 -1
  30. package/dist/html/templates.d.ts.map +1 -1
  31. package/dist/html/templates.js +701 -78
  32. package/dist/html/templates.js.map +1 -1
  33. package/dist/html/types.d.ts +129 -0
  34. package/dist/html/types.d.ts.map +1 -1
  35. package/dist/html/types.js.map +1 -1
  36. package/dist/monitor/data/aggregator.d.ts +13 -0
  37. package/dist/monitor/data/aggregator.d.ts.map +1 -0
  38. package/dist/monitor/data/aggregator.js +101 -0
  39. package/dist/monitor/data/aggregator.js.map +1 -0
  40. package/dist/monitor/data/connectors.d.ts +13 -0
  41. package/dist/monitor/data/connectors.d.ts.map +1 -0
  42. package/dist/monitor/data/connectors.js +326 -0
  43. package/dist/monitor/data/connectors.js.map +1 -0
  44. package/dist/monitor/data/popl.d.ts +30 -0
  45. package/dist/monitor/data/popl.d.ts.map +1 -0
  46. package/dist/monitor/data/popl.js +310 -0
  47. package/dist/monitor/data/popl.js.map +1 -0
  48. package/dist/monitor/index.d.ts +6 -0
  49. package/dist/monitor/index.d.ts.map +1 -0
  50. package/dist/monitor/index.js +6 -0
  51. package/dist/monitor/index.js.map +1 -0
  52. package/dist/monitor/routes/api.d.ts +7 -0
  53. package/dist/monitor/routes/api.d.ts.map +1 -0
  54. package/dist/monitor/routes/api.js +63 -0
  55. package/dist/monitor/routes/api.js.map +1 -0
  56. package/dist/monitor/routes/connectors.d.ts +7 -0
  57. package/dist/monitor/routes/connectors.d.ts.map +1 -0
  58. package/dist/monitor/routes/connectors.js +417 -0
  59. package/dist/monitor/routes/connectors.js.map +1 -0
  60. package/dist/monitor/routes/home.d.ts +7 -0
  61. package/dist/monitor/routes/home.d.ts.map +1 -0
  62. package/dist/monitor/routes/home.js +15 -0
  63. package/dist/monitor/routes/home.js.map +1 -0
  64. package/dist/monitor/routes/index.d.ts +10 -0
  65. package/dist/monitor/routes/index.d.ts.map +1 -0
  66. package/dist/monitor/routes/index.js +19 -0
  67. package/dist/monitor/routes/index.js.map +1 -0
  68. package/dist/monitor/routes/popl.d.ts +7 -0
  69. package/dist/monitor/routes/popl.d.ts.map +1 -0
  70. package/dist/monitor/routes/popl.js +84 -0
  71. package/dist/monitor/routes/popl.js.map +1 -0
  72. package/dist/monitor/server.d.ts +24 -0
  73. package/dist/monitor/server.d.ts.map +1 -0
  74. package/dist/monitor/server.js +52 -0
  75. package/dist/monitor/server.js.map +1 -0
  76. package/dist/monitor/templates/components.d.ts +21 -0
  77. package/dist/monitor/templates/components.d.ts.map +1 -0
  78. package/dist/monitor/templates/components.js +405 -0
  79. package/dist/monitor/templates/components.js.map +1 -0
  80. package/dist/monitor/templates/home.d.ts +9 -0
  81. package/dist/monitor/templates/home.d.ts.map +1 -0
  82. package/dist/monitor/templates/home.js +322 -0
  83. package/dist/monitor/templates/home.js.map +1 -0
  84. package/dist/monitor/templates/layout.d.ts +26 -0
  85. package/dist/monitor/templates/layout.d.ts.map +1 -0
  86. package/dist/monitor/templates/layout.js +186 -0
  87. package/dist/monitor/templates/layout.js.map +1 -0
  88. package/dist/monitor/templates/popl.d.ts +33 -0
  89. package/dist/monitor/templates/popl.d.ts.map +1 -0
  90. package/dist/monitor/templates/popl.js +654 -0
  91. package/dist/monitor/templates/popl.js.map +1 -0
  92. package/dist/monitor/types.d.ts +121 -0
  93. package/dist/monitor/types.d.ts.map +1 -0
  94. package/dist/monitor/types.js +5 -0
  95. package/dist/monitor/types.js.map +1 -0
  96. package/package.json +3 -1
@@ -0,0 +1,322 @@
1
+ /**
2
+ * ProofScan Web Monitor - Home page template
3
+ */
4
+ import { renderLayout } from './layout.js';
5
+ import { renderPoplPanel, getPoplPanelStyles, renderConnectorCard, getConnectorCardStyles, } from './components.js';
6
+ import { renderHeatmap, renderMethodDistribution } from '../../html/index.js';
7
+ /**
8
+ * Render home page HTML
9
+ */
10
+ export function renderHomePage(data) {
11
+ const poplPanel = renderPoplPanel(data.popl);
12
+ // Render aggregated analytics charts
13
+ const heatmapHtml = renderHeatmap(data.aggregated_analytics.heatmap);
14
+ const methodsHtml = renderMethodDistribution(data.aggregated_analytics.method_distribution);
15
+ const connectorCards = data.connectors.length > 0
16
+ ? data.connectors.map(renderConnectorCard).join('')
17
+ : '<div class="empty-state">No connectors configured</div>';
18
+ const content = `
19
+ <section class="section">
20
+ <div class="overview-row">
21
+ <div class="overview-panel popl-summary">
22
+ <div class="section-title">POPL Summary</div>
23
+ ${poplPanel}
24
+ </div>
25
+ <div class="overview-panel activity-overview">
26
+ <div class="section-title">Activity Overview</div>
27
+ <div class="analytics-row">
28
+ <div class="analytics-card heatmap-container">
29
+ ${heatmapHtml}
30
+ </div>
31
+ <div class="analytics-card method-distribution">
32
+ ${methodsHtml}
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </section>
38
+
39
+ <section class="section">
40
+ <div class="section-header">
41
+ <div class="section-title">Connectors</div>
42
+ <div class="filter-bar">
43
+ <input type="text" class="filter-search" placeholder="Search connectors..." id="searchInput">
44
+ <div class="filter-badges">
45
+ <button class="filter-badge" data-filter="tools">tools</button>
46
+ <button class="filter-badge" data-filter="resources">resources</button>
47
+ <button class="filter-badge" data-filter="prompts">prompts</button>
48
+ <button class="filter-badge" data-filter="subscriptions">subscriptions</button>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <div class="connector-cards" id="connectorCards">
53
+ ${connectorCards}
54
+ </div>
55
+ </section>
56
+ `;
57
+ return renderLayout({
58
+ title: 'ProofScan Monitor',
59
+ generatedAt: data.generated_at,
60
+ content,
61
+ extraStyles: getHomeStyles(),
62
+ scripts: getFilterScript(),
63
+ });
64
+ }
65
+ /**
66
+ * Get home page styles
67
+ */
68
+ function getHomeStyles() {
69
+ return `
70
+ ${getPoplPanelStyles()}
71
+ ${getConnectorCardStyles()}
72
+ ${getAnalyticsStyles()}
73
+ ${getOverviewRowStyles()}
74
+
75
+ .section-header {
76
+ display: flex;
77
+ justify-content: space-between;
78
+ align-items: center;
79
+ margin-bottom: 16px;
80
+ }
81
+
82
+ .section-header .section-title {
83
+ margin-bottom: 0;
84
+ }
85
+
86
+ .filter-bar {
87
+ display: flex;
88
+ align-items: center;
89
+ gap: 12px;
90
+ }
91
+
92
+ .filter-search {
93
+ background: var(--bg-tertiary);
94
+ border: 1px solid var(--border-color);
95
+ border-radius: 6px;
96
+ padding: 6px 12px;
97
+ color: var(--text-primary);
98
+ font-size: 13px;
99
+ width: 200px;
100
+ }
101
+
102
+ .filter-search:focus {
103
+ outline: none;
104
+ border-color: var(--accent-blue);
105
+ }
106
+
107
+ .filter-search::placeholder {
108
+ color: var(--text-secondary);
109
+ }
110
+
111
+ .filter-badges {
112
+ display: flex;
113
+ gap: 6px;
114
+ }
115
+
116
+ .filter-badge {
117
+ background: var(--bg-tertiary);
118
+ border: 1px solid var(--border-color);
119
+ border-radius: 12px;
120
+ padding: 4px 10px;
121
+ color: var(--text-secondary);
122
+ font-size: 11px;
123
+ cursor: pointer;
124
+ transition: all 0.15s;
125
+ }
126
+
127
+ .filter-badge:hover {
128
+ border-color: var(--accent-blue);
129
+ color: var(--accent-blue);
130
+ }
131
+
132
+ .filter-badge.active {
133
+ background: rgba(0, 212, 255, 0.1);
134
+ border-color: var(--accent-blue);
135
+ color: var(--accent-blue);
136
+ }
137
+
138
+ .empty-state {
139
+ text-align: center;
140
+ padding: 48px;
141
+ color: var(--text-secondary);
142
+ background: var(--bg-secondary);
143
+ border: 1px solid var(--border-color);
144
+ border-radius: 8px;
145
+ }
146
+
147
+ .connector-card.hidden {
148
+ display: none;
149
+ }
150
+ `;
151
+ }
152
+ /**
153
+ * Get analytics chart styles (matching existing HTML export)
154
+ */
155
+ function getAnalyticsStyles() {
156
+ return `
157
+ .analytics-row {
158
+ display: flex;
159
+ gap: 16px;
160
+ }
161
+
162
+ .analytics-card {
163
+ flex: 1;
164
+ background: var(--bg-secondary);
165
+ border: 1px solid var(--border-color);
166
+ border-radius: 8px;
167
+ padding: 16px;
168
+ }
169
+
170
+ .analytics-card .chart-title {
171
+ font-size: 12px;
172
+ font-weight: 600;
173
+ color: var(--text-secondary);
174
+ text-transform: uppercase;
175
+ margin-bottom: 12px;
176
+ }
177
+
178
+ /* Heatmap styles */
179
+ .heatmap-container { flex: 0.8; overflow-x: auto; }
180
+ .heatmap-svg { display: block; }
181
+ .heatmap-level-0 { fill: var(--bg-tertiary); }
182
+ .heatmap-level-1 { fill: #0a3d4d; }
183
+ .heatmap-level-2 { fill: #0d5c73; }
184
+ .heatmap-level-3 { fill: #0097b2; }
185
+ .heatmap-level-4 { fill: #00d4ff; }
186
+
187
+ /* Method distribution styles */
188
+ .method-distribution { flex: 1; }
189
+ .method-distribution .chart-title {
190
+ font-size: 12px;
191
+ font-weight: 600;
192
+ color: var(--text-secondary);
193
+ text-transform: uppercase;
194
+ margin-bottom: 12px;
195
+ }
196
+ .donut-container {
197
+ display: flex;
198
+ align-items: center;
199
+ gap: 16px;
200
+ }
201
+ .donut-container svg { flex-shrink: 0; }
202
+ .donut-legend { flex: 1; }
203
+ .donut-legend-item {
204
+ display: flex;
205
+ align-items: center;
206
+ gap: 8px;
207
+ margin-bottom: 4px;
208
+ font-size: 12px;
209
+ }
210
+ .donut-legend-color { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
211
+ .donut-legend-label { color: var(--text-primary); flex: 1; }
212
+ .donut-legend-pct { color: var(--text-secondary); font-family: 'SF Mono', Consolas, monospace; }
213
+ .no-data-message { color: var(--text-secondary); font-size: 12px; text-align: center; padding: 20px; }
214
+ `;
215
+ }
216
+ /**
217
+ * Get overview row styles (POPL + Activity side by side)
218
+ */
219
+ function getOverviewRowStyles() {
220
+ return `
221
+ .overview-row {
222
+ display: flex;
223
+ gap: 16px;
224
+ align-items: stretch;
225
+ }
226
+
227
+ .overview-panel {
228
+ background: var(--bg-secondary);
229
+ border: 1px solid var(--border-color);
230
+ border-radius: 8px;
231
+ padding: 16px;
232
+ }
233
+
234
+ .overview-panel .section-title {
235
+ margin-bottom: 12px;
236
+ }
237
+
238
+ .overview-panel.popl-summary {
239
+ flex: 0 0 auto;
240
+ min-width: 200px;
241
+ }
242
+
243
+ .overview-panel.popl-summary .popl-panel {
244
+ background: transparent;
245
+ border: none;
246
+ padding: 0;
247
+ }
248
+
249
+ .overview-panel.activity-overview {
250
+ flex: 1;
251
+ }
252
+
253
+ .overview-panel.activity-overview .analytics-row {
254
+ margin: 0;
255
+ }
256
+
257
+ .overview-panel.activity-overview .analytics-card {
258
+ background: var(--bg-tertiary);
259
+ }
260
+
261
+ @media (max-width: 900px) {
262
+ .overview-row {
263
+ flex-direction: column;
264
+ }
265
+ .overview-panel.popl-summary {
266
+ min-width: auto;
267
+ }
268
+ }
269
+ `;
270
+ }
271
+ /**
272
+ * Get filter script
273
+ */
274
+ function getFilterScript() {
275
+ return `
276
+ (function() {
277
+ const searchInput = document.getElementById('searchInput');
278
+ const cards = document.querySelectorAll('.connector-card');
279
+ const filterBadges = document.querySelectorAll('.filter-badge');
280
+ let activeFilters = new Set();
281
+
282
+ function applyFilters() {
283
+ const searchTerm = searchInput.value.toLowerCase();
284
+
285
+ cards.forEach(card => {
286
+ const id = card.dataset.id.toLowerCase();
287
+ const capabilities = (card.dataset.capabilities || '').split(',');
288
+
289
+ // Search filter
290
+ const matchesSearch = !searchTerm || id.includes(searchTerm);
291
+
292
+ // Capability filter (AND logic - must have all selected)
293
+ const matchesCapabilities = activeFilters.size === 0 ||
294
+ [...activeFilters].every(f => capabilities.includes(f));
295
+
296
+ if (matchesSearch && matchesCapabilities) {
297
+ card.classList.remove('hidden');
298
+ } else {
299
+ card.classList.add('hidden');
300
+ }
301
+ });
302
+ }
303
+
304
+ searchInput.addEventListener('input', applyFilters);
305
+
306
+ filterBadges.forEach(badge => {
307
+ badge.addEventListener('click', () => {
308
+ const filter = badge.dataset.filter;
309
+ if (activeFilters.has(filter)) {
310
+ activeFilters.delete(filter);
311
+ badge.classList.remove('active');
312
+ } else {
313
+ activeFilters.add(filter);
314
+ badge.classList.add('active');
315
+ }
316
+ applyFilters();
317
+ });
318
+ });
319
+ })();
320
+ `;
321
+ }
322
+ //# sourceMappingURL=home.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/monitor/templates/home.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE9E;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,IAAqB;IAClD,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE7C,qCAAqC;IACrC,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACrE,MAAM,WAAW,GAAG,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;IAE5F,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;QAC/C,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,CAAC,CAAC,yDAAyD,CAAC;IAE9D,MAAM,OAAO,GAAG;;;;;YAKN,SAAS;;;;;;gBAML,WAAW;;;gBAGX,WAAW;;;;;;;;;;;;;;;;;;;;;UAqBjB,cAAc;;;GAGrB,CAAC;IAEF,OAAO,YAAY,CAAC;QAClB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,IAAI,CAAC,YAAY;QAC9B,OAAO;QACP,WAAW,EAAE,aAAa,EAAE;QAC5B,OAAO,EAAE,eAAe,EAAE;KAC3B,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,SAAS,aAAa;IACpB,OAAO;EACP,kBAAkB,EAAE;EACpB,sBAAsB,EAAE;EACxB,kBAAkB,EAAE;EACpB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ErB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB;IACzB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DN,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB;IAC3B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDN,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,eAAe;IACtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * ProofScan Web Monitor - Base HTML layout
3
+ */
4
+ /**
5
+ * Get base CSS styles (dark theme matching existing HTML export)
6
+ */
7
+ export declare function getBaseStyles(): string;
8
+ /**
9
+ * Render base HTML layout
10
+ */
11
+ export declare function renderLayout(options: {
12
+ title: string;
13
+ generatedAt: string;
14
+ content: string;
15
+ extraStyles?: string;
16
+ scripts?: string;
17
+ }): string;
18
+ /**
19
+ * Escape HTML special characters
20
+ */
21
+ export declare function escapeHtml(str: string): string;
22
+ /**
23
+ * Format timestamp for display
24
+ */
25
+ export declare function formatTimestamp(iso: string): string;
26
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/monitor/templates/layout.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CA6HtC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CA0BT;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOnD"}
@@ -0,0 +1,186 @@
1
+ /**
2
+ * ProofScan Web Monitor - Base HTML layout
3
+ */
4
+ /**
5
+ * Get base CSS styles (dark theme matching existing HTML export)
6
+ */
7
+ export function getBaseStyles() {
8
+ return `
9
+ :root {
10
+ --bg-primary: #0d1117;
11
+ --bg-secondary: #161b22;
12
+ --bg-tertiary: #21262d;
13
+ --border-color: #30363d;
14
+ --text-primary: #e6edf3;
15
+ --text-secondary: #8b949e;
16
+ --accent-blue: #00d4ff;
17
+ --accent-green: #3fb950;
18
+ --accent-yellow: #d29922;
19
+ --accent-red: #f85149;
20
+ --accent-gray: #6e7681;
21
+ }
22
+
23
+ * {
24
+ box-sizing: border-box;
25
+ margin: 0;
26
+ padding: 0;
27
+ }
28
+
29
+ body {
30
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
31
+ font-size: 14px;
32
+ line-height: 1.5;
33
+ color: var(--text-primary);
34
+ background: var(--bg-primary);
35
+ min-height: 100vh;
36
+ }
37
+
38
+ a {
39
+ color: var(--accent-blue);
40
+ text-decoration: none;
41
+ }
42
+
43
+ a:hover {
44
+ text-decoration: underline;
45
+ }
46
+
47
+ /* Header */
48
+ .header {
49
+ display: flex;
50
+ justify-content: space-between;
51
+ align-items: center;
52
+ padding: 16px 24px;
53
+ background: var(--bg-secondary);
54
+ border-bottom: 1px solid var(--border-color);
55
+ }
56
+
57
+ .header-title {
58
+ font-size: 18px;
59
+ font-weight: 600;
60
+ color: var(--text-primary);
61
+ }
62
+
63
+ .header-meta {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 12px;
67
+ font-size: 12px;
68
+ color: var(--text-secondary);
69
+ }
70
+
71
+ .offline-badge {
72
+ display: inline-flex;
73
+ align-items: center;
74
+ gap: 4px;
75
+ padding: 2px 8px;
76
+ background: var(--bg-tertiary);
77
+ border: 1px solid var(--border-color);
78
+ border-radius: 12px;
79
+ font-size: 11px;
80
+ color: var(--text-secondary);
81
+ }
82
+
83
+ .offline-badge::before {
84
+ content: '';
85
+ width: 6px;
86
+ height: 6px;
87
+ background: var(--accent-gray);
88
+ border-radius: 50%;
89
+ }
90
+
91
+ /* Main container */
92
+ .main {
93
+ max-width: 1400px;
94
+ margin: 0 auto;
95
+ padding: 24px;
96
+ }
97
+
98
+ /* Section */
99
+ .section {
100
+ margin-bottom: 24px;
101
+ }
102
+
103
+ .section-title {
104
+ font-size: 14px;
105
+ font-weight: 600;
106
+ color: var(--text-secondary);
107
+ text-transform: uppercase;
108
+ letter-spacing: 0.5px;
109
+ margin-bottom: 12px;
110
+ }
111
+
112
+ /* Badge styles */
113
+ .badge {
114
+ display: inline-flex;
115
+ align-items: center;
116
+ padding: 2px 8px;
117
+ border-radius: 12px;
118
+ font-size: 11px;
119
+ font-weight: 500;
120
+ text-transform: uppercase;
121
+ }
122
+
123
+ .badge-ok { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); border: 1px solid rgba(63, 185, 80, 0.3); }
124
+ .badge-warn { background: rgba(210, 153, 34, 0.15); color: var(--accent-yellow); border: 1px solid rgba(210, 153, 34, 0.3); }
125
+ .badge-err { background: rgba(248, 81, 73, 0.15); color: var(--accent-red); border: 1px solid rgba(248, 81, 73, 0.3); }
126
+ .badge-offline { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); }
127
+ .badge-enabled { background: rgba(63, 185, 80, 0.1); color: var(--accent-green); border: 1px solid rgba(63, 185, 80, 0.2); }
128
+ .badge-disabled { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); }
129
+ .badge-capability { background: rgba(0, 212, 255, 0.1); color: var(--accent-blue); border: 1px solid rgba(0, 212, 255, 0.2); }
130
+ .badge-transport { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); }
131
+ `;
132
+ }
133
+ /**
134
+ * Render base HTML layout
135
+ */
136
+ export function renderLayout(options) {
137
+ return `<!DOCTYPE html>
138
+ <html lang="en">
139
+ <head>
140
+ <meta charset="UTF-8">
141
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
142
+ <title>${escapeHtml(options.title)}</title>
143
+ <style>
144
+ ${getBaseStyles()}
145
+ ${options.extraStyles ?? ''}
146
+ </style>
147
+ </head>
148
+ <body>
149
+ <header class="header">
150
+ <div class="header-title">ProofScan Monitor</div>
151
+ <div class="header-meta">
152
+ <span class="offline-badge">Offline</span>
153
+ <span>Generated: ${formatTimestamp(options.generatedAt)}</span>
154
+ </div>
155
+ </header>
156
+ <main class="main">
157
+ ${options.content}
158
+ </main>
159
+ ${options.scripts ? `<script>${options.scripts}</script>` : ''}
160
+ </body>
161
+ </html>`;
162
+ }
163
+ /**
164
+ * Escape HTML special characters
165
+ */
166
+ export function escapeHtml(str) {
167
+ return str
168
+ .replace(/&/g, '&amp;')
169
+ .replace(/</g, '&lt;')
170
+ .replace(/>/g, '&gt;')
171
+ .replace(/"/g, '&quot;')
172
+ .replace(/'/g, '&#039;');
173
+ }
174
+ /**
175
+ * Format timestamp for display
176
+ */
177
+ export function formatTimestamp(iso) {
178
+ try {
179
+ const date = new Date(iso);
180
+ return date.toLocaleString();
181
+ }
182
+ catch {
183
+ return iso;
184
+ }
185
+ }
186
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/monitor/templates/layout.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2HN,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,OAM5B;IACC,OAAO;;;;;WAKE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC;;EAElC,aAAa,EAAE;EACf,OAAO,CAAC,WAAW,IAAI,EAAE;;;;;;;;yBAQF,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC;;;;EAI3D,OAAO,CAAC,OAAO;;EAEf,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,EAAE;;QAEtD,CAAC;AACT,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG;SACP,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * ProofScan Web Monitor - POPL detail page template
3
+ */
4
+ import type { MonitorPoplEntry } from '../types.js';
5
+ /**
6
+ * Render POPL entry detail page
7
+ */
8
+ export declare function renderPoplDetailPage(entry: MonitorPoplEntry): string;
9
+ /**
10
+ * Render 404 page for POPL entry not found
11
+ */
12
+ export declare function renderPopl404Page(proofId: string): string;
13
+ /**
14
+ * Artifact page options
15
+ */
16
+ interface ArtifactPageOptions {
17
+ proofId: string;
18
+ artifactName: string;
19
+ artifact?: {
20
+ name: string;
21
+ path: string;
22
+ sha256: string;
23
+ };
24
+ content?: string;
25
+ isJson?: boolean;
26
+ error?: string;
27
+ }
28
+ /**
29
+ * Render artifact content page
30
+ */
31
+ export declare function renderArtifactPage(options: ArtifactPageOptions): string;
32
+ export {};
33
+ //# sourceMappingURL=popl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popl.d.ts","sourceRoot":"","sources":["../../../src/monitor/templates/popl.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CA6BpE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAsBzD;AAycD;;GAEG;AACH,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAkDvE"}