pyre-cli 10.1.0 → 10.2.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.
Files changed (46) hide show
  1. package/README.md +195 -494
  2. package/dist/{checkCmd-RKW6QGDR.js → checkCmd-WQAHAUWO.js} +1 -1
  3. package/dist/{chunk-GHRDW646.js → chunk-23YWCI3O.js} +375 -135
  4. package/dist/{service-Q74BBILO.js → chunk-KFPTD266.js} +43 -3
  5. package/dist/{doctor-GYHFTNZQ.js → chunk-KVUMOA6C.js} +7 -6
  6. package/dist/{chunk-53O2RGSL.js → chunk-QM5L43EK.js} +19 -2
  7. package/dist/{chunk-6UHZP4QP.js → chunk-XTOOEKLM.js} +24 -12
  8. package/dist/{collectors-H43PN4PS.js → collectors-JDN5Y7EV.js} +1 -1
  9. package/dist/{completions-JKYEJNGR.js → completions-ZVTNE52B.js} +15 -11
  10. package/dist/{config-GYGJXU2Q.js → config-J4YMADEF.js} +3 -1
  11. package/dist/doctor-LHFW4UJP.js +10 -0
  12. package/dist/firebaseSync-ON3RZ6KX.js +91 -0
  13. package/dist/index.js +4243 -735
  14. package/dist/monitors/platform/windows-ui.ps1 +42 -0
  15. package/dist/{netUsageCmd-WKBTW2YG.js → netUsageCmd-67IBZZYN.js} +2 -2
  16. package/dist/{pipeCmd-7REDBLBU.js → pipeCmd-2N4JPKYE.js} +1 -1
  17. package/dist/{prometheusCmd-PL64BLN5.js → prometheusCmd-LEUM5WCZ.js} +1 -1
  18. package/dist/serveCmd-L7LVJOZN.js +353 -0
  19. package/dist/service-7GIX3YNC.js +16 -0
  20. package/dist/syncCmd-42IRF633.js +246 -0
  21. package/dist/{topoCmd-DU2HHZNH.js → topoCmd-DZ3YS5IL.js} +1 -1
  22. package/dist/{watchdogCmd-UF53JPZB.js → watchdogCmd-6GR4UN6B.js} +7 -7
  23. package/dist/{wizard-TD7BGX6O.js → wizard-JQMQWFAW.js} +1 -1
  24. package/package.json +4 -3
  25. package/parity.md +2 -0
  26. package/src/completions.ts +15 -11
  27. package/src/easy_features.test.ts +149 -0
  28. package/src/firebaseSync.ts +157 -0
  29. package/src/formatters/html_template.ts +3086 -598
  30. package/src/formatters/render.ts +25 -12
  31. package/src/index.ts +516 -23
  32. package/src/live/input.ts +501 -148
  33. package/src/live/render.ts +163 -18
  34. package/src/live/state.ts +52 -2
  35. package/src/live/types.ts +1 -1
  36. package/src/monitors/collectors.ts +3 -10
  37. package/src/monitors/platform/windows-ui.ps1 +42 -0
  38. package/src/monitors/platform/windows.ts +442 -147
  39. package/src/monitors/types.ts +8 -0
  40. package/src/serveCmd.ts +17 -2
  41. package/src/service.ts +49 -0
  42. package/src/state/config.ts +48 -0
  43. package/src/syncCmd.ts +159 -11
  44. package/src/web/dashboard.ts +205 -0
  45. package/dist/serveCmd-2H5VLF3P.js +0 -153
  46. package/dist/syncCmd-A2W3QB3S.js +0 -126
@@ -505,10 +505,11 @@ export const TAB_DEFS: { id: string; label: string; key: string }[] = [
505
505
  { id: 'power', label: 'Power', key: '4' },
506
506
  { id: 'battery', label: 'Battery', key: '5' },
507
507
  { id: 'thermal', label: 'Thermal', key: '6' },
508
- { id: 'packets', label: 'Conns', key: '7' },
509
- { id: 'tasks', label: 'Tasks', key: '8' },
510
- { id: 'disk', label: 'Disk', key: '9' },
511
- { id: 'process', label: 'Process', key: '0' },
508
+ { id: 'network', label: 'Network', key: '7' },
509
+ { id: 'packets', label: 'Conns', key: '8' },
510
+ { id: 'tasks', label: 'Tasks', key: '9' },
511
+ { id: 'disk', label: 'Disk', key: '0' },
512
+ { id: 'process', label: 'Process', key: 'P' },
512
513
  { id: 'p2p', label: 'P2P', key: 'R' },
513
514
  { id: 'anomalies', label: 'Anomalies', key: 'A' },
514
515
  { id: 'containers', label: 'Containers', key: 'C' },
@@ -528,16 +529,17 @@ const TAB_SEPARATOR_WIDTH = 3;
528
529
  * then the tab bar — i.e. row 4 in a 1-indexed terminal, row index 3 if
529
530
  * 0-indexed from the top of the dashboard).
530
531
  */
531
- export function getTabHitboxes(): { id: string; start: number; end: number }[] {
532
+ export function getTabHitboxes(visible?: VisibleItems): { id: string; start: number; end: number }[] {
533
+ const tabs = visible ? TAB_DEFS.filter(t => visible[t.id as keyof VisibleItems] !== false) : TAB_DEFS;
532
534
  const boxes: { id: string; start: number; end: number }[] = [];
533
535
  let col = TAB_BAR_INDENT;
534
- TAB_DEFS.forEach((t, i) => {
536
+ tabs.forEach((t, i) => {
535
537
  const text = `[${t.key}]${t.label}`;
536
538
  const start = col;
537
539
  const end = col + text.length;
538
540
  boxes.push({ id: t.id, start, end });
539
541
  col = end;
540
- if (i < TAB_DEFS.length - 1) col += TAB_SEPARATOR_WIDTH;
542
+ if (i < tabs.length - 1) col += TAB_SEPARATOR_WIDTH;
541
543
  });
542
544
  return boxes;
543
545
  }
@@ -545,8 +547,9 @@ export function getTabHitboxes(): { id: string; start: number; end: number }[] {
545
547
  /** Row (1-indexed, matching terminal mouse-report coordinates) the tab bar renders on. */
546
548
  export const TAB_BAR_ROW = 4;
547
549
 
548
- function tabBar(activePanel: string, width: number, theme: ThemeColors): string {
549
- const rendered = TAB_DEFS.map(t => {
550
+ function tabBar(activePanel: string, width: number, theme: ThemeColors, visible?: VisibleItems): string {
551
+ const visibleTabs = visible ? TAB_DEFS.filter(t => visible[t.id as keyof VisibleItems] !== false) : TAB_DEFS;
552
+ const rendered = visibleTabs.map(t => {
550
553
  const isActive = activePanel === t.id;
551
554
  const label = isActive ? chalk.bold(t.label) : chalk.dim(t.label);
552
555
  const keyHint = chalk.dim(`[${t.key}]`);
@@ -1085,7 +1088,12 @@ function btopCpuBox(data: StatsData, width: number, theme: ThemeColors, opts: Ta
1085
1088
  function btopLeftColumn(data: StatsData, width: number, theme: ThemeColors, opts: TableOptions): string[] {
1086
1089
  const contentWidth = width - 4;
1087
1090
  const out: string[] = [];
1088
- const layout = opts.panelLayout || ['mem', 'disk', 'net'];
1091
+ const rawLayout = opts.panelLayout || ['mem', 'disk', 'net'];
1092
+ const visible = opts.visible || {};
1093
+ const layout = rawLayout.filter(name => {
1094
+ const key = name === 'net' ? 'network' : name;
1095
+ return visible[key as keyof VisibleItems] !== false;
1096
+ });
1089
1097
 
1090
1098
  for (const panelName of layout) {
1091
1099
  if (panelName === 'mem') {
@@ -1243,7 +1251,12 @@ function btopProcBox(data: StatsData, width: number, targetHeight: number, theme
1243
1251
 
1244
1252
  export function formatTable(data: StatsData, opts: TableOptions = {}): string {
1245
1253
  const width = clampWidth(opts.width);
1246
- const activePanel = opts.activePanel || 'grid';
1254
+ let activePanel = opts.activePanel || 'grid';
1255
+ const visible = opts.visible || {};
1256
+
1257
+ if (activePanel !== 'grid' && visible[activePanel as keyof VisibleItems] === false) {
1258
+ activePanel = 'grid';
1259
+ }
1247
1260
 
1248
1261
  const themeName = opts.theme || 'default';
1249
1262
  const theme = THEMES[themeName] || THEMES.default;
@@ -1258,7 +1271,7 @@ export function formatTable(data: StatsData, opts: TableOptions = {}): string {
1258
1271
  out.push('');
1259
1272
  }
1260
1273
 
1261
- out.push(tabBar(activePanel, width, theme));
1274
+ out.push(tabBar(activePanel, width, theme, opts.visible));
1262
1275
  out.push('');
1263
1276
 
1264
1277
  if (opts.minimal) {