SeaWolf-AI commited on
Commit
4aabc98
·
verified ·
1 Parent(s): 584d0d9

vik status: show audit segment and link

Browse files
Files changed (1) hide show
  1. terminal.js +8 -1
terminal.js CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  /* ViKernel Desktop: Terminal app.
2
  * Browser-only shell over an in-memory virtual filesystem. Nothing here runs on a real server.
3
  * Live calls go only to api/ag/* through h.api. Security-sensitive commands are sent to the real gate.
@@ -401,7 +408,7 @@
401
  halted = String(s.kernel_state || '').toUpperCase() === 'HALTED'; online = true;
402
  const st = halted ? C.y(s.kernel_state) : C.g(s.kernel_state);
403
  return 'kernel_state ' + st + '\naudit_n ' + s.audit_n + '\naudit_head ' + String(s.audit_head || '').slice(0, 16) +
404
- '\nverified ' + (s.verified ? C.g('true') : C.r(String(s.verified)));
405
  }
406
  if (sub === 'kill') {
407
  const r = await api('kill', {}); await refreshState();
 
1
+ function segLine(a) {
2
+ if (!a || !a.enabled || a.segment == null) return '';
3
+ const link = a.prev_head ? 'linked to previous head ' + String(a.prev_head).slice(0, 16) : 'first segment';
4
+ return '\nsegment ' + a.segment + ' (' + link + ')' +
5
+ '\narchived ' + a.archived_records + ' records, ' + a.segments_verified + ' earlier segments re-verified' +
6
+ (a.segments_failed && a.segments_failed.length ? ', FAILED: ' + a.segments_failed.join(',') : '');
7
+ }
8
  /* ViKernel Desktop: Terminal app.
9
  * Browser-only shell over an in-memory virtual filesystem. Nothing here runs on a real server.
10
  * Live calls go only to api/ag/* through h.api. Security-sensitive commands are sent to the real gate.
 
408
  halted = String(s.kernel_state || '').toUpperCase() === 'HALTED'; online = true;
409
  const st = halted ? C.y(s.kernel_state) : C.g(s.kernel_state);
410
  return 'kernel_state ' + st + '\naudit_n ' + s.audit_n + '\naudit_head ' + String(s.audit_head || '').slice(0, 16) +
411
+ '\nverified ' + (s.verified ? C.g('true') : C.r(String(s.verified))) + segLine(s.archive);
412
  }
413
  if (sub === 'kill') {
414
  const r = await api('kill', {}); await refreshState();