@gamaze/hicortex 0.26.1 → 0.26.2
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/assets/dashboard.html +163 -190
- package/package.json +1 -1
- package/server.json +2 -2
package/assets/dashboard.html
CHANGED
|
@@ -450,47 +450,43 @@
|
|
|
450
450
|
.rec-band{ position:absolute; inset:0; border-radius:4px; }
|
|
451
451
|
.rec-dot{ position:absolute; top:50%; transform:translate(-50%,-50%); width:11px; height:11px; border-radius:50%; background:var(--text); border:2px solid var(--panel); box-shadow:0 0 0 1px color-mix(in srgb, var(--text) 40%, transparent), 0 0 8px color-mix(in srgb, var(--text) 30%, transparent); }
|
|
452
452
|
.rec-foot{ display:flex; align-items:center; gap:7px; }
|
|
453
|
-
/* Memory Precision
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
.rec-l1
|
|
463
|
-
.rec-l1
|
|
464
|
-
.rec-l1 .
|
|
465
|
-
.rec-l1
|
|
466
|
-
.rec-l1 .
|
|
467
|
-
.rec-l1 .
|
|
468
|
-
.rec-l1
|
|
469
|
-
.rec-l1.
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
453
|
+
/* Memory Precision stat rows (#593 round 2, Option B): ONE stat per row in
|
|
454
|
+
a FIXED three-column grid — value / label / trend chip — so a row can
|
|
455
|
+
never wrap: the label ellipsizes inside its column, the fixed value
|
|
456
|
+
column right-aligns every hero number on one edge, the chip sits flush
|
|
457
|
+
right. The value is the hero (≥2x the label size — tests pin the
|
|
458
|
+
ratio), neutral --text; the chips are the ONLY colored element on the
|
|
459
|
+
face (green improving / red worsening / gray flat or no baseline).
|
|
460
|
+
Rows breathe — the card may grow taller (owner 2026-11-10). Theme
|
|
461
|
+
tokens only, both themes. */
|
|
462
|
+
.rec-l1{ display:flex; flex-direction:column; gap:8px; min-width:0; }
|
|
463
|
+
.rec-l1[hidden]{ display:none; } /* author display beats the UA's [hidden] — the #billing-banner idiom; without it the flex rule un-hides the container */
|
|
464
|
+
.rec-l1 .l1stat{ display:grid; grid-template-columns:72px minmax(0,1fr) auto; column-gap:10px; align-items:baseline; min-width:0; white-space:nowrap; }
|
|
465
|
+
.rec-l1 .l1v{ font-size:22px; font-weight:640; color:var(--text); text-align:right; font-variant-numeric:tabular-nums; line-height:1.05; min-width:0; }
|
|
466
|
+
.rec-l1 .l1v .l1u{ font-style:normal; font-size:10.5px; font-weight:520; color:var(--dim); margin-left:2px; }
|
|
467
|
+
.rec-l1 .l1l{ font-size:10.5px; color:var(--dim); overflow:hidden; text-overflow:ellipsis; min-width:0; }
|
|
468
|
+
.rec-l1 .l1chip{ justify-self:end; font-size:10.5px; font-weight:620; line-height:1; padding:2.5px 8px; border-radius:999px; white-space:nowrap; color:var(--green-mid); background:color-mix(in srgb, var(--green-mid) 13%, transparent); }
|
|
469
|
+
.rec-l1 .l1chip.bad{ color:var(--red); background:color-mix(in srgb, var(--red) 13%, transparent); }
|
|
470
|
+
.rec-l1 .l1chip.flat{ color:var(--faint); background:color-mix(in srgb, var(--faint) 12%, transparent); }
|
|
471
|
+
.rec-l1 .l1vol{ font-size:10.5px; color:var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
|
472
|
+
/* #578 quality drawers (corpus + contested — the divergence drawer left
|
|
473
|
+
the card in #593): native details/summary in the card's .csub scale —
|
|
474
|
+
collapsed they are one dim line, open they stack their rows inside the
|
|
475
|
+
card (no page modal for ~5 rows/week). Theme tokens only; the thumbs
|
|
476
|
+
are small ghost buttons. */
|
|
474
477
|
.rec-det{ font-size:10.5px; color:var(--dim); }
|
|
475
478
|
.rec-det summary{ cursor:pointer; color:var(--dim); letter-spacing:-.01em; user-select:none; }
|
|
476
479
|
.rec-det summary:hover{ color:var(--text); }
|
|
477
480
|
.rec-det[open] summary{ color:var(--text); }
|
|
478
481
|
.rec-det-body{ margin:4px 0 2px; display:flex; flex-direction:column; gap:4px; }
|
|
479
482
|
.rec-det-body .rec-line{ font-size:10.5px; color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
480
|
-
.rec-contest-empty{ font-style:italic; }
|
|
481
483
|
.rec-thumb{ border:1px solid color-mix(in srgb, var(--text) 22%, transparent); background:none; color:var(--dim); border-radius:5px; font-size:11px; line-height:1; padding:2px 6px; cursor:pointer; }
|
|
482
484
|
.rec-thumb:hover{ color:var(--text); border-color:color-mix(in srgb, var(--text) 45%, transparent); }
|
|
483
485
|
.rec-thumb.ok:hover{ color:var(--green); border-color:var(--green); }
|
|
484
486
|
.rec-thumb.no:hover{ color:var(--red); border-color:var(--red); }
|
|
485
|
-
/* #
|
|
486
|
-
|
|
487
|
-
.rec-plain
|
|
488
|
-
.rec-plain .dir-bad{ color:var(--red); font-weight:600; }
|
|
489
|
-
.rec-plain .dir-mixed{ color:var(--amber); font-weight:600; }
|
|
490
|
-
/* #591 valence tags on the Tier-1 rows — green = improving regardless of sign */
|
|
491
|
-
.rec-l1 .l1tag.good{ color:var(--green-mid); }
|
|
492
|
-
.rec-l1 .l1tag.bad{ color:var(--red); }
|
|
493
|
-
.rec-l1 .l1tag.flat{ color:var(--faint); }
|
|
487
|
+
/* #593: the headline is ONE line — direction word + window caveat, never
|
|
488
|
+
wrapping; neutral text (the trend chips are the only colored element). */
|
|
489
|
+
.rec-plain{ font-size:11px; color:var(--dim); line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
|
494
490
|
.rec-item{ display:flex; align-items:center; gap:6px; min-width:0; }
|
|
495
491
|
.rec-item .rec-item-line{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10.5px; color:var(--dim); }
|
|
496
492
|
.b-health{ display:flex; align-items:center; gap:7px; font-size:11px; color:var(--dim); white-space:nowrap; }
|
|
@@ -1290,58 +1286,57 @@
|
|
|
1290
1286
|
<div id="tok-nights" aria-label="LLM tokens per nightly run this billing period"></div>
|
|
1291
1287
|
</div>
|
|
1292
1288
|
<!-- Memory Precision (#476, owner retitle; #578 quality audit; #591
|
|
1293
|
-
presentation pass) — ONE card, two
|
|
1294
|
-
instrument. Level 2 (recall depth)
|
|
1295
|
-
word + provisional-hover semantics;
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
quality improving": uses-per-showing (the big word),
|
|
1303
|
-
volume, and the Tier-1 rows with per-change deltas
|
|
1304
|
-
server's change-registry entries while the raw window
|
|
1305
|
-
them. The #591 pass (owner product feedback: the card must
|
|
1306
|
-
SELF-INTERPRET)
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
(
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1289
|
+
presentation pass; #593 stat-table round 2) — ONE card, two
|
|
1290
|
+
context levels + the quality instrument. Level 2 (recall depth)
|
|
1291
|
+
keeps the #426 U-band + zone word + provisional-hover semantics;
|
|
1292
|
+
the marker/tooltip read the WINDOW ratio off
|
|
1293
|
+
D.memory_precision.level2 (a pre-#476 server has no block → the
|
|
1294
|
+
headline ratio — today's rendering exactly). The #578 audit
|
|
1295
|
+
(owner: "do the numbers earn their place"): mean similarity and
|
|
1296
|
+
redundant share are TOOLTIP-ONLY (high cosine was the noise's
|
|
1297
|
+
camouflage — not actionable), and the FACE carries what answers
|
|
1298
|
+
"is recall quality improving": uses-per-showing (the big word),
|
|
1299
|
+
pushes/lines volume, and the Tier-1 rows with per-change deltas
|
|
1300
|
+
off the server's change-registry entries while the raw window
|
|
1301
|
+
covers them. The #591 pass (owner product feedback: the card must
|
|
1302
|
+
SELF-INTERPRET) made every row read in plain words (MP_NAME) with
|
|
1303
|
+
deltas valenced by the explicit per-metric map (MP_GOOD) and the
|
|
1304
|
+
technical layer demoted behind per-row tooltips. The #593 round 2
|
|
1305
|
+
(owner amendment 2026-11-10: the card reads as a STAT TABLE)
|
|
1306
|
+
reshapes that face: EXACTLY 4 stat rows (clutter / foreign
|
|
1307
|
+
content / weak matches / churn), ONE stat per row in a fixed
|
|
1308
|
+
value/label/chip grid that can never wrap — the value is the
|
|
1309
|
+
hero (≥2x the label, right-aligned, neutral), the trend chips are
|
|
1310
|
+
the only colored element, labels stay 2-4 words with meanings in
|
|
1311
|
+
tooltips, the headline is ONE neutral line (direction · caveat)
|
|
1312
|
+
and the zone word's tooltip carries the plain meaning +
|
|
1313
|
+
uses-per-showing. The divergence drawer is GONE from the card
|
|
1314
|
+
(owner: the row double-counted the gauge's own reason; the data
|
|
1315
|
+
still flows into the nightly snapshots — the page just never
|
|
1316
|
+
renders it), and the contested row is presence-gated: hidden
|
|
1317
|
+
unless the grading lane ran AND something is contested (no
|
|
1318
|
+
zero-state strings; the count loads eagerly at band render). The
|
|
1319
|
+
window rides the #452 selector via the echoed window_days —
|
|
1320
|
+
never hardcoded, never a second range control. -->
|
|
1322
1321
|
<div class="bseg" id="lim-rec">
|
|
1323
1322
|
<div class="gh"><span class="t">Memory Precision</span><span class="sub" id="rec-sub">uses per showing</span></div>
|
|
1324
1323
|
<div class="big"><b class="n rec-word" id="rec-zone">—</b></div>
|
|
1325
1324
|
<div class="rec-bandrow" id="rec-bandrow"><div class="rec-band" id="rec-band"></div><i class="rec-dot" id="rec-dot" hidden></i></div>
|
|
1326
1325
|
<div class="rec-plain" id="rec-plain" hidden></div>
|
|
1327
|
-
<div class="rec-l1" id="rec-l1" hidden
|
|
1328
|
-
<div class="
|
|
1329
|
-
<div class="
|
|
1330
|
-
<div class="
|
|
1331
|
-
<div class="
|
|
1332
|
-
<div class="
|
|
1326
|
+
<div class="rec-l1" id="rec-l1" hidden>
|
|
1327
|
+
<div class="l1stat" id="l1-blk"> </div>
|
|
1328
|
+
<div class="l1stat" id="l1-cross"> </div>
|
|
1329
|
+
<div class="l1stat" id="l1-sub"> </div>
|
|
1330
|
+
<div class="l1stat" id="l1-recy"> </div>
|
|
1331
|
+
<div class="l1vol" id="l1-vol"> </div>
|
|
1333
1332
|
</div>
|
|
1334
|
-
<details id="rec-divdet" class="rec-det" hidden>
|
|
1335
|
-
<summary>divergence · <span id="rec-divn">0</span> never read</summary>
|
|
1336
|
-
<div id="rec-div-lines" class="rec-det-body"></div>
|
|
1337
|
-
</details>
|
|
1338
1333
|
<details id="rec-series" class="rec-det" hidden>
|
|
1339
1334
|
<summary>corpus & graded · last nightly</summary>
|
|
1340
1335
|
<div id="rec-series-body" class="rec-det-body"></div>
|
|
1341
1336
|
</details>
|
|
1342
|
-
<details id="rec-contest" class="rec-det">
|
|
1337
|
+
<details id="rec-contest" class="rec-det" hidden>
|
|
1343
1338
|
<summary>contested lines · <span id="rec-contest-n">—</span></summary>
|
|
1344
|
-
<div id="rec-contest-rows" class="rec-det-body
|
|
1339
|
+
<div id="rec-contest-rows" class="rec-det-body"></div>
|
|
1345
1340
|
</details>
|
|
1346
1341
|
</div>
|
|
1347
1342
|
</div>
|
|
@@ -3338,6 +3333,7 @@ function renderBand(){
|
|
|
3338
3333
|
// Recall level — the designed U-band (#426 final ruling 2026-09-13; see
|
|
3339
3334
|
// renderRecBand).
|
|
3340
3335
|
renderRecBand(h?h.uses_per_showing:null);
|
|
3336
|
+
loadContested(); /* #593: presence needs the count — one guarded GET at render */
|
|
3341
3337
|
|
|
3342
3338
|
// Model — the detected label from /health/detail (configure lands in phase 2)
|
|
3343
3339
|
renderModelCard();
|
|
@@ -3410,24 +3406,31 @@ const RECALL_ZONE_PLAIN={low:'shown memories are rarely picked up',normal:'shown
|
|
|
3410
3406
|
improving for each Tier-1 metric. ONE constant owns every sign
|
|
3411
3407
|
assumption on the card; a metric whose good direction flips changes
|
|
3412
3408
|
here and nowhere else. Plain names beside it: the reader-facing
|
|
3413
|
-
vocabulary (the internal metric keys stay in the payload
|
|
3409
|
+
vocabulary (the internal metric keys stay in the payload; #593 renamed
|
|
3410
|
+
cross_share's face label to the amendment's "Foreign content"). */
|
|
3414
3411
|
const MP_GOOD={block_size:'down',cross_share:'down',sub_bar_share:'down',recycling:'down'};
|
|
3415
|
-
const MP_NAME={block_size:'Clutter per prompt',cross_share:'Foreign
|
|
3416
|
-
/* #
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3412
|
+
const MP_NAME={block_size:'Clutter per prompt',cross_share:'Foreign content',sub_bar_share:'Weak matches',recycling:'Memory churn'};
|
|
3413
|
+
/* #593 plain headline — pure composer (the recallUsesZone convention):
|
|
3414
|
+
ONE neutral line, direction word · window caveat. The direction word
|
|
3415
|
+
derives off the covered tier1 deltas × MP_GOOD (plain text — the trend
|
|
3416
|
+
chips are the card's only colored element); the caveat fires while the
|
|
3417
|
+
window still covers a registry change date (the trend then reads
|
|
3418
|
+
pre-change days too), with the exact dates demoted to the line's own
|
|
3419
|
+
tooltip. Returns {html,title} or null when there is no zone / nothing
|
|
3420
|
+
to say. */
|
|
3420
3421
|
function mpPlainHeadline(zk,mp,todayStr){
|
|
3421
3422
|
if(!zk) return null;
|
|
3422
3423
|
if(typeof todayStr!=='string') todayStr=new Date().toISOString().slice(0,10);
|
|
3423
|
-
const parts=[RECALL_ZONE_PLAIN[zk]];
|
|
3424
3424
|
const wd=mp&&typeof mp.window_days==='number'?mp.window_days:30;
|
|
3425
3425
|
const changes=mp&&Array.isArray(mp.changes)?mp.changes:[];
|
|
3426
|
+
let caveat=null,title='';
|
|
3426
3427
|
if(changes.length){
|
|
3427
3428
|
const from=new Date(Date.parse(todayStr)-wd*86400000).toISOString().slice(0,10);
|
|
3428
3429
|
const newest=changes.slice().sort((x,y)=>(x.date<y.date?1:-1))[0];
|
|
3429
|
-
if(typeof newest.date==='string'&&newest.date>=from)
|
|
3430
|
-
|
|
3430
|
+
if(typeof newest.date==='string'&&newest.date>=from){
|
|
3431
|
+
caveat='window still holds old data';
|
|
3432
|
+
title='the '+wd+'-day window still covers pre-change days ('+newest.date+')';
|
|
3433
|
+
}
|
|
3431
3434
|
}
|
|
3432
3435
|
let imp=0,wor=0;
|
|
3433
3436
|
for(const ch of changes){
|
|
@@ -3439,12 +3442,11 @@ function mpPlainHeadline(zk,mp,todayStr){
|
|
|
3439
3442
|
}
|
|
3440
3443
|
}
|
|
3441
3444
|
let dir=null;
|
|
3442
|
-
if(imp>0&&wor===0) dir=
|
|
3443
|
-
else if(wor>0&&imp===0) dir=
|
|
3444
|
-
else if(imp>0&&wor>0) dir=
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
return {html};
|
|
3445
|
+
if(imp>0&&wor===0) dir='improving';
|
|
3446
|
+
else if(wor>0&&imp===0) dir='worsening';
|
|
3447
|
+
else if(imp>0&&wor>0) dir='mixed';
|
|
3448
|
+
const html=[dir,caveat].filter(Boolean).join(' · ');
|
|
3449
|
+
return html?{html,title}:null;
|
|
3448
3450
|
}
|
|
3449
3451
|
/* ONE stop table drives the band fill AND the big word's sampled color —
|
|
3450
3452
|
mirrors the --red/--amber/--green theme tokens (tests pin the lockstep),
|
|
@@ -3513,10 +3515,13 @@ function renderRecBand(ups){
|
|
|
3513
3515
|
const rgb=recallGradAt(clamp(ups/axis,0,1),z,theme);
|
|
3514
3516
|
word.style.color='rgb('+rgb+')';
|
|
3515
3517
|
word.style.textShadow=theme==='dark'?'0 0 12px rgba('+rgb+',.32)':'none';
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3518
|
+
/* #593: the verdict tooltip = the zone's plain meaning + the gauge's own
|
|
3519
|
+
metric (the numeric detail stays on the dot's tooltip) */
|
|
3520
|
+
word.title=RECALL_ZONE_PLAIN[zk]+' — uses-per-showing';
|
|
3521
|
+
/* #593: the headline beneath is ONE neutral line — direction word ·
|
|
3522
|
+
window caveat (the trend chips are the card's only colored element) */
|
|
3523
|
+
const pl=el('rec-plain'); const ph=mpPlainHeadline(zk,mp);
|
|
3524
|
+
pl.hidden=!ph; pl.innerHTML=ph?ph.html:''; pl.title=ph?ph.title:'';
|
|
3520
3525
|
}else{
|
|
3521
3526
|
dot.hidden=true; dot.title='';
|
|
3522
3527
|
const pl1=el('rec-plain'); pl1.hidden=true; pl1.innerHTML='';
|
|
@@ -3533,28 +3538,24 @@ function renderRecBand(ups){
|
|
|
3533
3538
|
|
|
3534
3539
|
/* ---------- Memory Precision — Level 1, the pushed index (#476) + the #578
|
|
3535
3540
|
quality audit (owner: "do the numbers earn their place") + the #591
|
|
3536
|
-
presentation pass
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
stay card-level TOOLTIP-ONLY (the #578 ruling — high cosine was the
|
|
3549
|
-
noise's camouflage); divergence lives in the #rec-divdet drawer below.
|
|
3550
|
-
Absent tier1 (a pre-#578 server) → the quality rows hide and the card
|
|
3541
|
+
presentation pass + the #593 stat-table reshape. The FACE is EXACTLY 4
|
|
3542
|
+
stat rows (MP_NAME labels) + the denominators foot line (.l1vol): ONE
|
|
3543
|
+
stat per row in the fixed value/label/chip grid — the hero value
|
|
3544
|
+
right-aligned and neutral, the trend chip the row's ONLY colored
|
|
3545
|
+
element. ONE chip per metric: the NET move across the window's covered
|
|
3546
|
+
registry entries (oldest before → newest after — successive changes
|
|
3547
|
+
read as one line, never a chip per entry), arrow = sign, color =
|
|
3548
|
+
MP_GOOD valence, no covered entry → the gray no-baseline dash. Row
|
|
3549
|
+
meanings ("fewer is better", attribution coverage, the bar value) live
|
|
3550
|
+
in PER-ROW titles; mean similarity + repeated-known stay card-level
|
|
3551
|
+
TOOLTIP-ONLY (the #578 ruling — high cosine was the noise's camouflage).
|
|
3552
|
+
Absent tier1 (a pre-#578 server) → the stat rows hide and the card
|
|
3551
3553
|
keeps the #476 shape; absent block entirely → the whole row hides and
|
|
3552
3554
|
the sub keeps the old label (the capture card's block-absence guard). */
|
|
3553
3555
|
function renderRecL1(mp){
|
|
3554
3556
|
const row=el('rec-l1'), sub=el('rec-sub');
|
|
3555
3557
|
if(!mp||!mp.level1||!mp.level2){
|
|
3556
3558
|
row.hidden=true;
|
|
3557
|
-
const dd0=el('rec-divdet'); if(dd0) dd0.hidden=true;
|
|
3558
3559
|
if(sub) sub.textContent='uses per showing';
|
|
3559
3560
|
return;
|
|
3560
3561
|
}
|
|
@@ -3571,40 +3572,36 @@ function renderRecL1(mp){
|
|
|
3571
3572
|
(sim!==null?sim.toFixed(2):'—')+
|
|
3572
3573
|
(floor!==null?' (recall floor '+floor.toFixed(2)+')':'')+
|
|
3573
3574
|
(red!==null&&ra!==null?'; repeated-known '+Math.round(clamp(red,0,1)*100)+'% (≥'+ra.toFixed(2)+' cosine vs the session\'s standing context — lessons + identity)':'');
|
|
3574
|
-
renderRecDivDet(mp);
|
|
3575
3575
|
const t=mp.tier1;
|
|
3576
3576
|
if(!t){
|
|
3577
|
-
/* pre-#578 server: no quality rows exist — the
|
|
3578
|
-
markup is #578's), the tooltip above still carries the #476 numbers
|
|
3579
|
-
and the divergence drawer still renders from mp.divergence. */
|
|
3577
|
+
/* pre-#578 server: no quality rows exist — the stat rows hide (their
|
|
3578
|
+
markup is #578's), the tooltip above still carries the #476 numbers. */
|
|
3580
3579
|
row.hidden=true;
|
|
3581
3580
|
return;
|
|
3582
3581
|
}
|
|
3583
3582
|
row.hidden=false;
|
|
3584
|
-
row.classList.remove('below');
|
|
3585
3583
|
/* the good-direction word derives off the map — 'fewer is better' for a
|
|
3586
3584
|
down-good metric — never written inline per row */
|
|
3587
3585
|
const better=k=>MP_GOOD[k]==='down'?'fewer is better':'more is better';
|
|
3588
|
-
/* per
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
return parts.length?' ('+parts.join(', ')+')':'';
|
|
3586
|
+
/* ONE trend chip per row (#593): the window's covered registry entries for
|
|
3587
|
+
the metric aggregate into a single NET move — oldest before → newest
|
|
3588
|
+
after, so successive changes read as one line. The ARROW is the sign of
|
|
3589
|
+
the move (↓ a<b, ↑ a>b); the COLOR says whether that direction is good
|
|
3590
|
+
for the metric (MP_GOOD) — green = improving regardless of sign. pct
|
|
3591
|
+
when the oldest before is nonzero, the raw pair otherwise (a 0→x move
|
|
3592
|
+
has no honest percentage); a flat pair is ±0%; no covered entry → the
|
|
3593
|
+
gray no-baseline dash. */
|
|
3594
|
+
const chip=(k)=>{
|
|
3595
|
+
const es=(Array.isArray(mp.changes)?mp.changes:[])
|
|
3596
|
+
.filter(ch=>ch&&ch.before&&typeof ch.before[k]==='number'&&ch.after&&typeof ch.after[k]==='number')
|
|
3597
|
+
.sort((x,y)=>(x.date<y.date?-1:x.date>y.date?1:0));
|
|
3598
|
+
if(!es.length) return '<span class="l1chip flat">—</span>';
|
|
3599
|
+
const b=es[0].before[k], a=es[es.length-1].after[k];
|
|
3600
|
+
if(a===b) return '<span class="l1chip flat">±0%</span>';
|
|
3601
|
+
const text=b!==0?Math.abs(Math.round((a-b)/b*100))+'%':b+'→'+a;
|
|
3602
|
+
const arrow=a<b?'↓':'↑';
|
|
3603
|
+
const cls=(MP_GOOD[k]==='down'?a<b:a>b)?'good':'bad';
|
|
3604
|
+
return '<span class="l1chip '+cls+'">'+arrow+text+'</span>';
|
|
3608
3605
|
};
|
|
3609
3606
|
const bs=(typeof t.block_size==='number'&&isFinite(t.block_size))?t.block_size.toFixed(1):'—';
|
|
3610
3607
|
const cs=(typeof t.cross_share==='number'&&isFinite(t.cross_share))?Math.round(t.cross_share*100)+'%':'—';
|
|
@@ -3612,38 +3609,18 @@ function renderRecL1(mp){
|
|
|
3612
3609
|
const sb=(typeof t.sub_bar_share==='number'&&isFinite(t.sub_bar_share))?Math.round(t.sub_bar_share*100)+'%':'—';
|
|
3613
3610
|
const rc=(typeof t.recycling==='number'&&isFinite(t.recycling))?Math.round(t.recycling).toString():'—';
|
|
3614
3611
|
const bar=(typeof t.cross_project_bar==='number'&&isFinite(t.cross_project_bar))?t.cross_project_bar.toFixed(2):'—';
|
|
3615
|
-
el('l1-blk').innerHTML='<
|
|
3616
|
-
el('l1-blk').title='average memories shown per prompt (
|
|
3617
|
-
el('l1-cross').innerHTML=
|
|
3618
|
-
el('l1-cross').title='share of attributable pushed lines
|
|
3619
|
-
el('l1-sub').innerHTML=
|
|
3620
|
-
el('l1-sub').title='foreign-project lines
|
|
3621
|
-
el('l1-recy').innerHTML=
|
|
3622
|
-
el('l1-recy').title='average distinct memories shown per day';
|
|
3623
|
-
el('l1-vol').innerHTML=fmt(t.pushes)+' prompts
|
|
3612
|
+
el('l1-blk').innerHTML='<span class="l1v">'+bs+'</span><span class="l1l">'+MP_NAME.block_size+'</span>'+chip('block_size');
|
|
3613
|
+
el('l1-blk').title='average memories shown per prompt — '+better('block_size');
|
|
3614
|
+
el('l1-cross').innerHTML='<span class="l1v">'+cs+'</span><span class="l1l">'+MP_NAME.cross_share+'</span>'+chip('cross_share');
|
|
3615
|
+
el('l1-cross').title='share of attributable pushed lines from a different project ('+better('cross_share')+') · attribution coverage '+cv;
|
|
3616
|
+
el('l1-sub').innerHTML='<span class="l1v">'+sb+'</span><span class="l1l">'+MP_NAME.sub_bar_share+'</span>'+chip('sub_bar_share');
|
|
3617
|
+
el('l1-sub').title='foreign-project lines below the cross-project bar ('+bar+') — '+better('sub_bar_share');
|
|
3618
|
+
el('l1-recy').innerHTML='<span class="l1v">'+rc+'<i class="l1u">/day</i></span><span class="l1l">'+MP_NAME.recycling+'</span>'+chip('recycling');
|
|
3619
|
+
el('l1-recy').title='average distinct memories shown per day — '+better('recycling');
|
|
3620
|
+
el('l1-vol').innerHTML=fmt(t.pushes)+' prompts · '+fmt(t.lines)+' memories shown';
|
|
3624
3621
|
el('l1-vol').title='denominators: recall pushes · pushed index lines';
|
|
3625
3622
|
}
|
|
3626
3623
|
|
|
3627
|
-
/* divergence drawer (#578 audit: off the face, into the details element).
|
|
3628
|
-
The count rides the summary; the ≤3 lines ride the drawer body — no memory
|
|
3629
|
-
lists on the card FACE (the 2026-09-12 ruling stands; a drawer is not a
|
|
3630
|
-
face row). */
|
|
3631
|
-
function renderRecDivDet(mp){
|
|
3632
|
-
const dd=el('rec-divdet'), dn=el('rec-divn'), dl=el('rec-div-lines');
|
|
3633
|
-
if(!dd||!dn||!dl) return;
|
|
3634
|
-
const dv=mp&&mp.divergence, n=(dv&&typeof dv.count==='number')?dv.count:0;
|
|
3635
|
-
if(!dv||!n){ dd.hidden=true; return; }
|
|
3636
|
-
dd.hidden=false;
|
|
3637
|
-
dn.textContent=n;
|
|
3638
|
-
dl.innerHTML='';
|
|
3639
|
-
for(const it of (dv.top||[])){
|
|
3640
|
-
const d=document.createElement('div');
|
|
3641
|
-
d.className='rec-line';
|
|
3642
|
-
d.textContent=it.line+' ('+it.shown+'×)';
|
|
3643
|
-
dl.appendChild(d);
|
|
3644
|
-
}
|
|
3645
|
-
}
|
|
3646
|
-
|
|
3647
3624
|
/* ---------- corpus & graded drawer (#578): the snapshot-stamped half.
|
|
3648
3625
|
The corpus-health trio (near-dup clusters, scope-anchor rate, canonical
|
|
3649
3626
|
label drift) and the graded aggregates are computed by the NIGHTLY
|
|
@@ -3677,18 +3654,17 @@ function renderRecSeries(){
|
|
|
3677
3654
|
row('graded useful',(typeof g.useful_share==='number'?Math.round(g.useful_share*100)+'%':'—')+' of '+(typeof g.graded==='number'?g.graded:0)+' verdicts');
|
|
3678
3655
|
}
|
|
3679
3656
|
|
|
3680
|
-
/* ---------- contested drawer (#578 judgment layer).
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
and the drawer must never claim grader confidence over zero verdicts. */
|
|
3657
|
+
/* ---------- contested drawer (#578 judgment layer). Graded data NEVER
|
|
3658
|
+
rides the memory_precision block (≤ 2 KB discipline); the list comes
|
|
3659
|
+
from the paginated endpoint. #593 makes the row PRESENCE-GATED: hidden
|
|
3660
|
+
in markup, the count loads EAGERLY at band render (one guarded GET) and
|
|
3661
|
+
the row appears only when the opt-in weekly lane ran AND something is
|
|
3662
|
+
contested — a hidden row claims nothing, so the zero-state strings are
|
|
3663
|
+
gone. Thumbs PUT /dashboard/quality/verdict {id, verdict:1|-1}
|
|
3664
|
+
(numeric — the server's strict body), a thumbed item leaves the list
|
|
3665
|
+
(the server clears owner-answered rows), and thumbing away the last row
|
|
3666
|
+
re-hides it. Fail-soft: a fetch error keeps the row hidden — an unknown
|
|
3667
|
+
count never earns a place on the face. */
|
|
3692
3668
|
function newestGradedCount(){
|
|
3693
3669
|
if(!D||!Array.isArray(D.series)) return null;
|
|
3694
3670
|
for(let i=D.series.length-1;i>=0;i--){
|
|
@@ -3699,22 +3675,20 @@ function newestGradedCount(){
|
|
|
3699
3675
|
}
|
|
3700
3676
|
let CONTESTED_LOADED=false;
|
|
3701
3677
|
async function loadContested(force){
|
|
3702
|
-
const box=el('rec-contest-rows'), num=el('rec-contest-n');
|
|
3678
|
+
const box=el('rec-contest-rows'), num=el('rec-contest-n'), det=el('rec-contest');
|
|
3703
3679
|
if(!box) return;
|
|
3704
3680
|
if(CONTESTED_LOADED&&!force) return;
|
|
3705
3681
|
try{
|
|
3706
3682
|
const r=await api('/dashboard/quality/contested?limit=20');
|
|
3707
3683
|
CONTESTED_LOADED=true;
|
|
3684
|
+
const items=r.items||[];
|
|
3685
|
+
const graded=newestGradedCount();
|
|
3686
|
+
const show=items.length>0&&graded!==0;
|
|
3687
|
+
if(det) det.hidden=!show;
|
|
3688
|
+
if(!show){ box.innerHTML=''; return; }
|
|
3708
3689
|
if(num) num.textContent=String(r.total);
|
|
3709
3690
|
box.innerHTML='';
|
|
3710
|
-
|
|
3711
|
-
if(!r.items||!r.items.length){
|
|
3712
|
-
box.classList.add('rec-contest-empty');
|
|
3713
|
-
const graded=newestGradedCount();
|
|
3714
|
-
box.textContent=typeof graded==='number'&&graded>0?'nothing contested — the grader is confident this week':'nothing graded yet — weekly grading is off or has not run';
|
|
3715
|
-
return;
|
|
3716
|
-
}
|
|
3717
|
-
for(const it of r.items){
|
|
3691
|
+
for(const it of items){
|
|
3718
3692
|
const row=document.createElement('div');
|
|
3719
3693
|
row.className='rec-item';
|
|
3720
3694
|
const line=document.createElement('span');
|
|
@@ -3731,8 +3705,12 @@ async function loadContested(force){
|
|
|
3731
3705
|
try{
|
|
3732
3706
|
await api('/dashboard/quality/verdict',{method:'PUT',body:JSON.stringify({id:it.id,verdict:v})});
|
|
3733
3707
|
row.remove();
|
|
3734
|
-
if(num)
|
|
3735
|
-
|
|
3708
|
+
if(num){
|
|
3709
|
+
const left=Math.max(0,(parseInt(num.textContent,10)||1)-1);
|
|
3710
|
+
num.textContent=String(left);
|
|
3711
|
+
if(left===0&&det) det.hidden=true; /* thumbing away the last row re-hides */
|
|
3712
|
+
}
|
|
3713
|
+
}catch(e){ /* fail-soft: the row stays, the next load retries */ }
|
|
3736
3714
|
};
|
|
3737
3715
|
up.addEventListener('click',()=>send(1));
|
|
3738
3716
|
down.addEventListener('click',()=>send(-1));
|
|
@@ -3740,14 +3718,9 @@ async function loadContested(force){
|
|
|
3740
3718
|
box.appendChild(row);
|
|
3741
3719
|
}
|
|
3742
3720
|
}catch(e){
|
|
3743
|
-
|
|
3744
|
-
box.textContent='contested list unavailable ('+(e&&e.message?e.message:'load failed')+')';
|
|
3721
|
+
if(det) det.hidden=true; /* fail-soft: an unknown count stays off the face */
|
|
3745
3722
|
}
|
|
3746
3723
|
}
|
|
3747
|
-
(function(){
|
|
3748
|
-
const det=el('rec-contest');
|
|
3749
|
-
if(det) det.addEventListener('toggle',()=>{ if(det.open) loadContested(); });
|
|
3750
|
-
})();
|
|
3751
3724
|
|
|
3752
3725
|
let MODEL_LABEL='';
|
|
3753
3726
|
/* #409 fix round 5 — owner ruling 2026-09-14 (verbatim): "I do NOT want to
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamaze/hicortex",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "Persistent agent identity for AI agents \u2014 a hand-edited identity layer, nightly-distilled experience, and lessons injected every session, shared across your whole fleet. Works with Hermes, OpenClaw, Claude Code, Pi, and opencode.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
package/server.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"name": "io.github.gamaze-labs/hicortex",
|
|
4
4
|
"title": "Hicortex \u2014 AI Fleet Memory",
|
|
5
5
|
"description": "Shared fleet memory for AI agents: nightly self-correction, recall every prompt (supported agents).",
|
|
6
|
-
"version": "0.26.
|
|
6
|
+
"version": "0.26.2",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "@gamaze/hicortex",
|
|
11
|
-
"version": "0.26.
|
|
11
|
+
"version": "0.26.2",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio",
|
|
14
14
|
"command": "npx",
|