instar 1.3.72 → 1.3.73

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.
@@ -1 +1 @@
1
- {"version":3,"file":"usherRoutes.d.ts","sourceRoot":"","sources":["../../src/server/usherRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAIpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CA2BxF"}
1
+ {"version":3,"file":"usherRoutes.d.ts","sourceRoot":"","sources":["../../src/server/usherRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAIpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CAiCxF"}
@@ -32,8 +32,14 @@ export function createUsherRoutes(deps) {
32
32
  const m = store.getMetrics(parsed.data);
33
33
  // Precision = acted / fired (the read that gates rung 5; paired externally
34
34
  // with the human-as-detector miss-map for the "what it missed" half).
35
+ // acted_by_use / acted_by_miss split the numerator by which correlation path
36
+ // confirmed usefulness (agent used it vs user had to correct on it); defaulted
37
+ // so legacy topic files (pre-split) report 0 rather than undefined.
35
38
  const precision = m.fired > 0 ? m.acted / m.fired : null;
36
- res.json({ topicId: parsed.data, metrics: { ...m, precision } });
39
+ res.json({
40
+ topicId: parsed.data,
41
+ metrics: { ...m, acted_by_use: m.acted_by_use ?? 0, acted_by_miss: m.acted_by_miss ?? 0, precision },
42
+ });
37
43
  });
38
44
  return router;
39
45
  }
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C,CAAC;QACzD,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC,CAAC;QAC5F,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxC,2EAA2E;QAC3E,sEAAsE;QACtE,6EAA6E;QAC7E,+EAA+E;QAC/E,oEAAoE;QACpE,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACzD,GAAG,CAAC,IAAI,CAAC;YACP,OAAO,EAAE,MAAM,CAAC,IAAI;YACpB,OAAO,EAAE,EAAE,GAAG,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,aAAa,IAAI,CAAC,EAAE,SAAS,EAAE;SACrG,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.72",
3
+ "version": "1.3.73",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-05-29T01:04:44.834Z",
5
- "instarVersion": "1.3.72",
4
+ "generatedAt": "2026-05-29T01:32:22.569Z",
5
+ "instarVersion": "1.3.73",
6
6
  "entryCount": 193,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -409,7 +409,7 @@
409
409
  "type": "route-group",
410
410
  "domain": "monitoring",
411
411
  "sourcePath": "src/server/routes.ts",
412
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
412
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
413
413
  "since": "2025-01-01"
414
414
  },
415
415
  "route-group:agents": {
@@ -417,7 +417,7 @@
417
417
  "type": "route-group",
418
418
  "domain": "sessions",
419
419
  "sourcePath": "src/server/routes.ts",
420
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
420
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
421
421
  "since": "2025-01-01"
422
422
  },
423
423
  "route-group:backups": {
@@ -425,7 +425,7 @@
425
425
  "type": "route-group",
426
426
  "domain": "operations",
427
427
  "sourcePath": "src/server/routes.ts",
428
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
428
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
429
429
  "since": "2025-01-01"
430
430
  },
431
431
  "route-group:git": {
@@ -433,7 +433,7 @@
433
433
  "type": "route-group",
434
434
  "domain": "coordination",
435
435
  "sourcePath": "src/server/routes.ts",
436
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
436
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
437
437
  "since": "2025-01-01"
438
438
  },
439
439
  "route-group:memory": {
@@ -441,7 +441,7 @@
441
441
  "type": "route-group",
442
442
  "domain": "memory",
443
443
  "sourcePath": "src/server/routes.ts",
444
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
444
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
445
445
  "since": "2025-01-01"
446
446
  },
447
447
  "route-group:semantic": {
@@ -449,7 +449,7 @@
449
449
  "type": "route-group",
450
450
  "domain": "memory",
451
451
  "sourcePath": "src/server/routes.ts",
452
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
452
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
453
453
  "since": "2025-01-01"
454
454
  },
455
455
  "route-group:status": {
@@ -457,7 +457,7 @@
457
457
  "type": "route-group",
458
458
  "domain": "monitoring",
459
459
  "sourcePath": "src/server/routes.ts",
460
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
460
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
461
461
  "since": "2025-01-01"
462
462
  },
463
463
  "route-group:capabilities": {
@@ -465,7 +465,7 @@
465
465
  "type": "route-group",
466
466
  "domain": "mapping",
467
467
  "sourcePath": "src/server/routes.ts",
468
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
468
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
469
469
  "since": "2025-01-01"
470
470
  },
471
471
  "route-group:project-map": {
@@ -473,7 +473,7 @@
473
473
  "type": "route-group",
474
474
  "domain": "mapping",
475
475
  "sourcePath": "src/server/routes.ts",
476
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
476
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
477
477
  "since": "2025-01-01"
478
478
  },
479
479
  "route-group:coherence": {
@@ -481,7 +481,7 @@
481
481
  "type": "route-group",
482
482
  "domain": "coherence",
483
483
  "sourcePath": "src/server/routes.ts",
484
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
484
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
485
485
  "since": "2025-01-01"
486
486
  },
487
487
  "route-group:topic-bindings": {
@@ -489,7 +489,7 @@
489
489
  "type": "route-group",
490
490
  "domain": "sessions",
491
491
  "sourcePath": "src/server/routes.ts",
492
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
492
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
493
493
  "since": "2025-01-01"
494
494
  },
495
495
  "route-group:context": {
@@ -497,7 +497,7 @@
497
497
  "type": "route-group",
498
498
  "domain": "context",
499
499
  "sourcePath": "src/server/routes.ts",
500
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
500
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
501
501
  "since": "2025-01-01"
502
502
  },
503
503
  "route-group:scope-coherence": {
@@ -505,7 +505,7 @@
505
505
  "type": "route-group",
506
506
  "domain": "coherence",
507
507
  "sourcePath": "src/server/routes.ts",
508
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
508
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
509
509
  "since": "2025-01-01"
510
510
  },
511
511
  "route-group:canonical-state": {
@@ -513,7 +513,7 @@
513
513
  "type": "route-group",
514
514
  "domain": "state",
515
515
  "sourcePath": "src/server/routes.ts",
516
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
516
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
517
517
  "since": "2025-01-01"
518
518
  },
519
519
  "route-group:ci": {
@@ -521,7 +521,7 @@
521
521
  "type": "route-group",
522
522
  "domain": "monitoring",
523
523
  "sourcePath": "src/server/routes.ts",
524
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
524
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
525
525
  "since": "2025-01-01"
526
526
  },
527
527
  "route-group:sessions": {
@@ -529,7 +529,7 @@
529
529
  "type": "route-group",
530
530
  "domain": "sessions",
531
531
  "sourcePath": "src/server/routes.ts",
532
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
532
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
533
533
  "since": "2025-01-01"
534
534
  },
535
535
  "route-group:jobs": {
@@ -537,7 +537,7 @@
537
537
  "type": "route-group",
538
538
  "domain": "scheduling",
539
539
  "sourcePath": "src/server/routes.ts",
540
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
540
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
541
541
  "since": "2025-01-01"
542
542
  },
543
543
  "route-group:skip-ledger": {
@@ -545,7 +545,7 @@
545
545
  "type": "route-group",
546
546
  "domain": "scheduling",
547
547
  "sourcePath": "src/server/routes.ts",
548
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
548
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
549
549
  "since": "2025-01-01"
550
550
  },
551
551
  "route-group:telegram": {
@@ -553,7 +553,7 @@
553
553
  "type": "route-group",
554
554
  "domain": "communication",
555
555
  "sourcePath": "src/server/routes.ts",
556
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
556
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
557
557
  "since": "2025-01-01"
558
558
  },
559
559
  "route-group:attention": {
@@ -561,7 +561,7 @@
561
561
  "type": "route-group",
562
562
  "domain": "communication",
563
563
  "sourcePath": "src/server/routes.ts",
564
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
564
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
565
565
  "since": "2025-01-01"
566
566
  },
567
567
  "route-group:relationships": {
@@ -569,7 +569,7 @@
569
569
  "type": "route-group",
570
570
  "domain": "relationships",
571
571
  "sourcePath": "src/server/routes.ts",
572
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
572
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
573
573
  "since": "2025-01-01"
574
574
  },
575
575
  "route-group:feedback": {
@@ -577,7 +577,7 @@
577
577
  "type": "route-group",
578
578
  "domain": "feedback",
579
579
  "sourcePath": "src/server/routes.ts",
580
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
580
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
581
581
  "since": "2025-01-01"
582
582
  },
583
583
  "route-group:updates": {
@@ -585,7 +585,7 @@
585
585
  "type": "route-group",
586
586
  "domain": "updates",
587
587
  "sourcePath": "src/server/routes.ts",
588
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
588
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
589
589
  "since": "2025-01-01"
590
590
  },
591
591
  "route-group:dispatches": {
@@ -593,7 +593,7 @@
593
593
  "type": "route-group",
594
594
  "domain": "dispatches",
595
595
  "sourcePath": "src/server/routes.ts",
596
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
596
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
597
597
  "since": "2025-01-01"
598
598
  },
599
599
  "route-group:quota": {
@@ -601,7 +601,7 @@
601
601
  "type": "route-group",
602
602
  "domain": "monitoring",
603
603
  "sourcePath": "src/server/routes.ts",
604
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
604
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
605
605
  "since": "2025-01-01"
606
606
  },
607
607
  "route-group:publishing": {
@@ -609,7 +609,7 @@
609
609
  "type": "route-group",
610
610
  "domain": "publishing",
611
611
  "sourcePath": "src/server/routes.ts",
612
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
612
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
613
613
  "since": "2025-01-01"
614
614
  },
615
615
  "route-group:private-views": {
@@ -617,7 +617,7 @@
617
617
  "type": "route-group",
618
618
  "domain": "publishing",
619
619
  "sourcePath": "src/server/routes.ts",
620
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
620
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
621
621
  "since": "2025-01-01"
622
622
  },
623
623
  "route-group:tunnel": {
@@ -625,7 +625,7 @@
625
625
  "type": "route-group",
626
626
  "domain": "networking",
627
627
  "sourcePath": "src/server/routes.ts",
628
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
628
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
629
629
  "since": "2025-01-01"
630
630
  },
631
631
  "route-group:events": {
@@ -633,7 +633,7 @@
633
633
  "type": "route-group",
634
634
  "domain": "networking",
635
635
  "sourcePath": "src/server/routes.ts",
636
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
636
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
637
637
  "since": "2025-01-01"
638
638
  },
639
639
  "route-group:evolution": {
@@ -641,7 +641,7 @@
641
641
  "type": "route-group",
642
642
  "domain": "evolution",
643
643
  "sourcePath": "src/server/routes.ts",
644
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
644
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
645
645
  "since": "2025-01-01"
646
646
  },
647
647
  "route-group:watchdog": {
@@ -649,7 +649,7 @@
649
649
  "type": "route-group",
650
650
  "domain": "monitoring",
651
651
  "sourcePath": "src/server/routes.ts",
652
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
652
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
653
653
  "since": "2025-01-01"
654
654
  },
655
655
  "route-group:topic-memory": {
@@ -657,7 +657,7 @@
657
657
  "type": "route-group",
658
658
  "domain": "memory",
659
659
  "sourcePath": "src/server/routes.ts",
660
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
660
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
661
661
  "since": "2025-01-01"
662
662
  },
663
663
  "route-group:state-sync": {
@@ -665,7 +665,7 @@
665
665
  "type": "route-group",
666
666
  "domain": "coordination",
667
667
  "sourcePath": "src/server/routes.ts",
668
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
668
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
669
669
  "since": "2025-01-01"
670
670
  },
671
671
  "route-group:intent": {
@@ -673,7 +673,7 @@
673
673
  "type": "route-group",
674
674
  "domain": "intent",
675
675
  "sourcePath": "src/server/routes.ts",
676
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
676
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
677
677
  "since": "2025-01-01"
678
678
  },
679
679
  "route-group:triage": {
@@ -681,7 +681,7 @@
681
681
  "type": "route-group",
682
682
  "domain": "safety",
683
683
  "sourcePath": "src/server/routes.ts",
684
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
684
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
685
685
  "since": "2025-01-01"
686
686
  },
687
687
  "route-group:operations": {
@@ -689,7 +689,7 @@
689
689
  "type": "route-group",
690
690
  "domain": "safety",
691
691
  "sourcePath": "src/server/routes.ts",
692
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
692
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
693
693
  "since": "2025-01-01"
694
694
  },
695
695
  "route-group:sentinel": {
@@ -697,7 +697,7 @@
697
697
  "type": "route-group",
698
698
  "domain": "safety",
699
699
  "sourcePath": "src/server/routes.ts",
700
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
700
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
701
701
  "since": "2025-01-01"
702
702
  },
703
703
  "route-group:trust": {
@@ -705,7 +705,7 @@
705
705
  "type": "route-group",
706
706
  "domain": "safety",
707
707
  "sourcePath": "src/server/routes.ts",
708
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
708
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
709
709
  "since": "2025-01-01"
710
710
  },
711
711
  "route-group:monitoring": {
@@ -713,7 +713,7 @@
713
713
  "type": "route-group",
714
714
  "domain": "monitoring",
715
715
  "sourcePath": "src/server/routes.ts",
716
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
716
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
717
717
  "since": "2025-01-01"
718
718
  },
719
719
  "route-group:commitments": {
@@ -721,7 +721,7 @@
721
721
  "type": "route-group",
722
722
  "domain": "commitments",
723
723
  "sourcePath": "src/server/routes.ts",
724
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
724
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
725
725
  "since": "2025-01-01"
726
726
  },
727
727
  "route-group:episodes": {
@@ -729,7 +729,7 @@
729
729
  "type": "route-group",
730
730
  "domain": "memory",
731
731
  "sourcePath": "src/server/routes.ts",
732
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
732
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
733
733
  "since": "2025-01-01"
734
734
  },
735
735
  "route-group:messages": {
@@ -737,7 +737,7 @@
737
737
  "type": "route-group",
738
738
  "domain": "coordination",
739
739
  "sourcePath": "src/server/routes.ts",
740
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
740
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
741
741
  "since": "2025-01-01"
742
742
  },
743
743
  "route-group:system-reviews": {
@@ -745,7 +745,7 @@
745
745
  "type": "route-group",
746
746
  "domain": "monitoring",
747
747
  "sourcePath": "src/server/routes.ts",
748
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
748
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
749
749
  "since": "2025-01-01"
750
750
  },
751
751
  "route-group:machine-mesh": {
@@ -761,7 +761,7 @@
761
761
  "type": "route-group",
762
762
  "domain": "security",
763
763
  "sourcePath": "src/server/routes.ts",
764
- "contentHash": "e639885e32fe2f7e34d4969bf4e1fd0e8945cda76ed398baa69e1b900b67a7f9",
764
+ "contentHash": "5c238f63374ee42f2cfcae05b9642af8a23b50a7fd19d13a5043a2818ba97419",
765
765
  "since": "2025-01-01"
766
766
  },
767
767
  "cli:init": {
@@ -1457,7 +1457,7 @@
1457
1457
  "type": "subsystem",
1458
1458
  "domain": "server",
1459
1459
  "sourcePath": "src/server/AgentServer.ts",
1460
- "contentHash": "88cfc6c3397a04f59444a78fe95cd23a3d1805a64476f175123fbb59373c1a07",
1460
+ "contentHash": "5e5b05a51602b7e5e5d863fffc3071af5eb5eaf1c8cc5ba5efa8d8e0a22458b1",
1461
1461
  "since": "2025-01-01"
1462
1462
  },
1463
1463
  "subsystem:session-manager": {
@@ -0,0 +1,73 @@
1
+ # Instar Upgrade Guide — NEXT
2
+
3
+ <!-- bump: patch -->
4
+
5
+ ## What Changed
6
+
7
+ **The Usher's precision loop is now wired — `acted` can finally move off zero.**
8
+
9
+ The Usher (rung 4 of continuous-working-awareness) fires "re-surface" signals
10
+ when a faded context becomes relevant again, and exposes a precision read
11
+ (`acted / fired`) that is the hard precondition for ever letting it interrupt
12
+ mid-task (rung 5). But `UsherSignalStore.markActed` — the precision *numerator* —
13
+ had **no caller anywhere**. So `acted` stayed 0 on every topic and precision was
14
+ structurally pinned at 0: the gate could never be satisfied by data. The Usher's
15
+ accuracy half had shipped asleep — the exact "shipped but asleep" trap the rest
16
+ of this project exists to kill, hiding inside our own accuracy meter.
17
+
18
+ This closes the loop with two correlation paths, both reducing to "does some
19
+ probe text COVER a fired signal's proposition?":
20
+
21
+ 1. **Auto-use (path a).** When the agent's genuine reply goes out on a topic and
22
+ it actually *uses* a re-surfaced context the Usher flagged, that signal is
23
+ marked acted (`via: 'use'`). Wired on the outbound `/telegram/reply` path.
24
+ 2. **Miss-map (path b).** When the user has to *correct* the agent (a
25
+ HumanAsDetector signal) on a context a recent nudge had already flagged, that
26
+ nudge was a genuine catch the agent ignored — still a true positive. It's
27
+ marked acted (`via: 'miss'`). Wired right after the inbound human-detector
28
+ observe seam.
29
+
30
+ Matching is deliberately precision-over-recall (≥2 shared salient terms AND ≥50%
31
+ coverage, within a recency window): a falsely-*high* precision is the dangerous
32
+ direction since it gates interruption, so under-crediting a fast reply is
33
+ acceptable, inflating the gate is not. Everything is best-effort and never throws
34
+ into the message/delivery path.
35
+
36
+ `GET /usher/metrics` now also reports `acted_by_use` and `acted_by_miss` so the
37
+ precision numerator is visible split by which path confirmed usefulness.
38
+
39
+ ## What to Tell Your User
40
+
41
+ The Usher now measures whether its mid-task reminders were actually useful — on
42
+ its own, two ways: when my next reply uses a reminder, and when you later have to
43
+ correct me on something a reminder had already flagged. That useful rate is the
44
+ number that has to look good before the Usher ever earns the right to interrupt me
45
+ (the final rung), so instead of sitting stuck at zero it can now gather real
46
+ numbers as we work. Nothing for you to set up — it just runs, and I can show you
47
+ the per-conversation numbers whenever you want them.
48
+
49
+ ## Summary of New Capabilities
50
+
51
+ | Capability | How to Use |
52
+ |-----------|-----------|
53
+ | Usher precision numerator wired | Automatic — `markActed` is now called from the outbound-reply path (agent used the nudge) and the inbound human-detector seam (user corrected on it). |
54
+ | `acted_by_use` / `acted_by_miss` split | `GET /usher/metrics?topicId=N` returns the precision numerator broken down by which correlation path confirmed usefulness. |
55
+ | `UsherActedCorrelator` | Pure, exported coverage matcher (`salientTerms`, `contextCoveredBy`, `findCoveredSignalIds`, `markActedByCoverage`) + two thin wiring wrappers (`creditUsherOnOutbound`, `creditUsherOnMiss`). Unit-tested both-sides-of-the-boundary. |
56
+
57
+ ## Evidence
58
+
59
+ - Unit: `tests/unit/UsherActedCorrelator.test.ts` — 20 cases covering salient-term
60
+ extraction, coverage thresholds (covers vs single-coincidental-word vs
61
+ low-coverage vs empty), recency-window filtering, the via-split + backward-compat
62
+ on `markActed`, and the two wrappers' guards.
63
+ - Integration: `tests/integration/usher-routes.test.ts` — `GET /usher/metrics`
64
+ exposes the `acted_by_use`/`acted_by_miss` split + precision; legacy topics
65
+ report the split as 0; source-guards prove `routes.ts` calls
66
+ `creditUsherOnOutbound` and `server.ts` calls `creditUsherOnMiss` after the
67
+ human-detector observe (anti-shipped-but-asleep).
68
+ - E2E: `tests/e2e/usher-precision-lifecycle.test.ts` — boots the real route tree
69
+ on a live HTTP server, proves the pre-fix state (precision pinned at 0 with a
70
+ fired-but-unacted nudge), then drives BOTH paths: a reply that uses the context
71
+ flips precision 0 → 1.0 (`acted_by_use`), an off-topic reply does not, and an
72
+ inbound correction credits a prior ignored nudge (`acted_by_miss`) — all visible
73
+ over real HTTP at `GET /usher/metrics`.
@@ -0,0 +1,131 @@
1
+ # Side-Effects Review — Usher precision numerator wiring (rung 4)
2
+
3
+ **Version / slug:** `usher-precision-loop`
4
+ **Date:** `2026-05-28`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required` (signal-only observability change, no blocking surface)
7
+ **Spec:** `docs/specs/cwa-usher.md` (approved:true by justin; review-note explicitly names "the usher_acted precision definition that gates rung 5" as the in-scope follow-up this change implements)
8
+
9
+ ## Summary of the change
10
+
11
+ The Usher fires re-surface signals (`UsherSignalStore.recordSignal`) and exposes a
12
+ precision read (`acted / fired`) that the spec designates as the hard precondition
13
+ for rung 5 (mid-task injection). But `UsherSignalStore.markActed` — the precision
14
+ *numerator* — had no caller anywhere, so `acted` was pinned at 0 on every topic
15
+ and precision could never move. This wires the numerator via two correlation paths
16
+ in a new pure helper `src/core/UsherActedCorrelator.ts`: (a) **auto-use** — when the
17
+ agent's outbound reply on a topic uses a re-surfaced context, mark that signal
18
+ `acted(via:'use')`, called from the `POST /telegram/reply` handler in
19
+ `src/server/routes.ts` after a genuine (non-proxy, non-system) reply sends; (b)
20
+ **miss-map** — when the user has to correct the agent (a `HumanAsDetector` signal)
21
+ on a context a recent nudge flagged, mark it `acted(via:'miss')`, called right after
22
+ the inbound `observeInboundMessage` seam in `src/commands/server.ts`. `markActed` now
23
+ also stamps `actedVia`/`actedAt`, and `GET /usher/metrics` reports
24
+ `acted_by_use`/`acted_by_miss`. Files: `UsherSignalStore.ts`, `UsherActedCorrelator.ts`
25
+ (new), `usherRoutes.ts`, `routes.ts` (+`RouteContext.usherSignalStore`),
26
+ `AgentServer.ts` (route ctx wiring), `server.ts` (path-b seam).
27
+
28
+ ## Decision-point inventory
29
+
30
+ The only "decision" this change makes is whether to increment an observability
31
+ counter (`acted`). It gates nothing — no message is blocked, delayed, or altered.
32
+
33
+ - `UsherActedCorrelator.contextCoveredBy` — **add** — pure text-coverage match deciding whether a probe references a fired signal's proposition. Output feeds `markActed` only; no authority over delivery.
34
+ - `routes.ts POST /telegram/reply` (path a) — **pass-through** — the existing send decision is untouched; crediting runs *after* the reply has already gone out.
35
+ - `server.ts` inbound human-detector seam (path b) — **pass-through** — crediting runs after `observeInboundMessage`, which itself is signal-only.
36
+
37
+ ---
38
+
39
+ ## 1. Over-block
40
+
41
+ **What legitimate inputs does this change reject that it shouldn't?**
42
+
43
+ No block/allow surface — over-block not applicable. `markActed` only increments a
44
+ metric; it cannot reject, delay, or modify any inbound or outbound message. Both
45
+ call sites run strictly *after* the message has been processed/sent, and both are
46
+ wrapped best-effort (never throw into the message path).
47
+
48
+ ## 2. Under-block
49
+
50
+ **What failure modes does this still miss?**
51
+
52
+ By design (precision-over-recall — a falsely-HIGH precision is the dangerous
53
+ direction since precision gates rung 5), the correlator deliberately UNDER-credits:
54
+
55
+ - **Path (a) timing race:** the Usher's signal is recorded by an async, LLM-backed
56
+ fire-and-forget loop (~8–10s). A very fast agent reply can land before the signal
57
+ is persisted, so that use goes uncredited. Acceptable: the full reply (after the
58
+ agent's work) usually lands well after the signal persists, and under-crediting
59
+ never inflates the gate.
60
+ - **Short contexts:** a context with fewer than 2 salient terms can never reach the
61
+ `MIN_SHARED=2` threshold, so single-word propositions are never auto-credited.
62
+ - **Recency window:** uses/corrections outside `USE_WINDOW_MS` (6h) / `MISS_WINDOW_MS`
63
+ (24h) are not credited.
64
+
65
+ These are recall gaps, not correctness bugs — the precision number will be a *floor*
66
+ on true usefulness, which is the conservative posture the rung-5 gate wants.
67
+
68
+ ## 3. Level-of-abstraction fit
69
+
70
+ **Is this at the right layer?**
71
+
72
+ Yes. `markActed` already existed on `UsherSignalStore` (the spec's numerator); this
73
+ change only supplies its missing callers. The matching logic lives in a pure,
74
+ unit-tested helper (`UsherActedCorrelator`) rather than inline at the call sites,
75
+ and the two call sites are the two existing seams where the relevant text is already
76
+ in hand (outbound reply text; inbound correction text + its `HumanAsDetector`
77
+ verdict). No higher layer owns "was this nudge used" — this is the layer that has
78
+ both the fired signals and the probe text. No smarter gate exists that should own
79
+ it instead.
80
+
81
+ ## 4. Signal vs authority compliance
82
+
83
+ **Does this hold blocking authority with brittle logic, or produce a signal?**
84
+
85
+ Compliant (`docs/signal-vs-authority.md`). The coverage matcher is intentionally
86
+ brittle (keyword overlap, no LLM) — and that is acceptable *precisely because it has
87
+ zero authority*. It produces a signal (the precision numerator) and nothing else. It
88
+ never blocks, never gates delivery, and feeds only the operator-facing
89
+ `GET /usher/metrics`. A brittle detector with no blocking power is the correct
90
+ pattern; the anti-pattern (brittle check WITH blocking authority) is not present.
91
+
92
+ ## 5. Interactions
93
+
94
+ **Does it shadow another check, get shadowed, double-fire, or race?**
95
+
96
+ - **Idempotency:** `markActed` guards `if (sig.acted) return false`, so paths (a) and
97
+ (b) marking the same signal, or repeated calls, increment `acted` at most once per
98
+ signal. The split counters (`acted_by_use`/`acted_by_miss`) only increment on the
99
+ successful (first) mark.
100
+ - **Ordering on the inbound seam:** path (b) runs in the human-detector callback,
101
+ which is chained *before* the Usher loop callback on the same `onMessageLogged`.
102
+ It correlates the correction against signals fired on PRIOR turns (already
103
+ persisted) — it does not race the current turn's not-yet-fired signal.
104
+ - **No shadowing:** the outbound tone-gate / dedup / ArcCheck path is unchanged;
105
+ crediting runs after the gate passed and the send succeeded, so it cannot affect
106
+ any block/allow outcome.
107
+
108
+ ## 6. External surfaces
109
+
110
+ **Does it change anything visible to other agents, users, or systems?**
111
+
112
+ - `GET /usher/metrics` gains two additive fields (`acted_by_use`, `acted_by_miss`)
113
+ and `acted`/`precision` now actually move. This endpoint is operator-only
114
+ (`INTERNAL_PREFIXES`), not surfaced to end users or other agents.
115
+ - The per-topic `usher/<topicId>.json` store files gain optional `actedVia`/`actedAt`
116
+ on signals — additive; `load()` already tolerates unknown/missing fields and old
117
+ readers ignore them.
118
+ - No change to any message content, no new outbound traffic, nothing visible to
119
+ peer agents. Behavior depends on conversation/topic state but is fully best-effort.
120
+
121
+ ## 7. Rollback cost
122
+
123
+ **If this turns out wrong in production, what's the back-out?**
124
+
125
+ Cheap and clean: revert the commit (a normal patch release). No data migration — the
126
+ new optional fields are tolerated by existing `load()` and ignored by older binaries;
127
+ a topic file written by the new code is readable by the old code and vice-versa.
128
+ Worst case after revert: `precision` returns to its prior pinned-at-0 state (the bug
129
+ this fixes). No agent-state repair, no hot-data fix. Because the change is
130
+ observability-only, a wrong precision number cannot itself cause an outage — at most
131
+ it would mislead the rung-5 decision, which is human-gated and not part of this change.