instar 1.2.71 → 1.2.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.2.71",
3
+ "version": "1.2.72",
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-25T06:38:58.237Z",
5
- "instarVersion": "1.2.71",
4
+ "generatedAt": "2026-05-25T07:03:59.683Z",
5
+ "instarVersion": "1.2.72",
6
6
  "entryCount": 191,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -392,7 +392,7 @@
392
392
  "type": "route-group",
393
393
  "domain": "monitoring",
394
394
  "sourcePath": "src/server/routes.ts",
395
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
395
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
396
396
  "since": "2025-01-01"
397
397
  },
398
398
  "route-group:agents": {
@@ -400,7 +400,7 @@
400
400
  "type": "route-group",
401
401
  "domain": "sessions",
402
402
  "sourcePath": "src/server/routes.ts",
403
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
403
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
404
404
  "since": "2025-01-01"
405
405
  },
406
406
  "route-group:backups": {
@@ -408,7 +408,7 @@
408
408
  "type": "route-group",
409
409
  "domain": "operations",
410
410
  "sourcePath": "src/server/routes.ts",
411
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
411
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
412
412
  "since": "2025-01-01"
413
413
  },
414
414
  "route-group:git": {
@@ -416,7 +416,7 @@
416
416
  "type": "route-group",
417
417
  "domain": "coordination",
418
418
  "sourcePath": "src/server/routes.ts",
419
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
419
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
420
420
  "since": "2025-01-01"
421
421
  },
422
422
  "route-group:memory": {
@@ -424,7 +424,7 @@
424
424
  "type": "route-group",
425
425
  "domain": "memory",
426
426
  "sourcePath": "src/server/routes.ts",
427
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
427
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
428
428
  "since": "2025-01-01"
429
429
  },
430
430
  "route-group:semantic": {
@@ -432,7 +432,7 @@
432
432
  "type": "route-group",
433
433
  "domain": "memory",
434
434
  "sourcePath": "src/server/routes.ts",
435
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
435
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
436
436
  "since": "2025-01-01"
437
437
  },
438
438
  "route-group:status": {
@@ -440,7 +440,7 @@
440
440
  "type": "route-group",
441
441
  "domain": "monitoring",
442
442
  "sourcePath": "src/server/routes.ts",
443
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
443
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
444
444
  "since": "2025-01-01"
445
445
  },
446
446
  "route-group:capabilities": {
@@ -448,7 +448,7 @@
448
448
  "type": "route-group",
449
449
  "domain": "mapping",
450
450
  "sourcePath": "src/server/routes.ts",
451
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
451
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
452
452
  "since": "2025-01-01"
453
453
  },
454
454
  "route-group:project-map": {
@@ -456,7 +456,7 @@
456
456
  "type": "route-group",
457
457
  "domain": "mapping",
458
458
  "sourcePath": "src/server/routes.ts",
459
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
459
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
460
460
  "since": "2025-01-01"
461
461
  },
462
462
  "route-group:coherence": {
@@ -464,7 +464,7 @@
464
464
  "type": "route-group",
465
465
  "domain": "coherence",
466
466
  "sourcePath": "src/server/routes.ts",
467
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
467
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
468
468
  "since": "2025-01-01"
469
469
  },
470
470
  "route-group:topic-bindings": {
@@ -472,7 +472,7 @@
472
472
  "type": "route-group",
473
473
  "domain": "sessions",
474
474
  "sourcePath": "src/server/routes.ts",
475
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
475
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
476
476
  "since": "2025-01-01"
477
477
  },
478
478
  "route-group:context": {
@@ -480,7 +480,7 @@
480
480
  "type": "route-group",
481
481
  "domain": "context",
482
482
  "sourcePath": "src/server/routes.ts",
483
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
483
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
484
484
  "since": "2025-01-01"
485
485
  },
486
486
  "route-group:scope-coherence": {
@@ -488,7 +488,7 @@
488
488
  "type": "route-group",
489
489
  "domain": "coherence",
490
490
  "sourcePath": "src/server/routes.ts",
491
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
491
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
492
492
  "since": "2025-01-01"
493
493
  },
494
494
  "route-group:canonical-state": {
@@ -496,7 +496,7 @@
496
496
  "type": "route-group",
497
497
  "domain": "state",
498
498
  "sourcePath": "src/server/routes.ts",
499
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
499
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
500
500
  "since": "2025-01-01"
501
501
  },
502
502
  "route-group:ci": {
@@ -504,7 +504,7 @@
504
504
  "type": "route-group",
505
505
  "domain": "monitoring",
506
506
  "sourcePath": "src/server/routes.ts",
507
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
507
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
508
508
  "since": "2025-01-01"
509
509
  },
510
510
  "route-group:sessions": {
@@ -512,7 +512,7 @@
512
512
  "type": "route-group",
513
513
  "domain": "sessions",
514
514
  "sourcePath": "src/server/routes.ts",
515
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
515
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
516
516
  "since": "2025-01-01"
517
517
  },
518
518
  "route-group:jobs": {
@@ -520,7 +520,7 @@
520
520
  "type": "route-group",
521
521
  "domain": "scheduling",
522
522
  "sourcePath": "src/server/routes.ts",
523
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
523
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
524
524
  "since": "2025-01-01"
525
525
  },
526
526
  "route-group:skip-ledger": {
@@ -528,7 +528,7 @@
528
528
  "type": "route-group",
529
529
  "domain": "scheduling",
530
530
  "sourcePath": "src/server/routes.ts",
531
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
531
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
532
532
  "since": "2025-01-01"
533
533
  },
534
534
  "route-group:telegram": {
@@ -536,7 +536,7 @@
536
536
  "type": "route-group",
537
537
  "domain": "communication",
538
538
  "sourcePath": "src/server/routes.ts",
539
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
539
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
540
540
  "since": "2025-01-01"
541
541
  },
542
542
  "route-group:attention": {
@@ -544,7 +544,7 @@
544
544
  "type": "route-group",
545
545
  "domain": "communication",
546
546
  "sourcePath": "src/server/routes.ts",
547
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
547
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
548
548
  "since": "2025-01-01"
549
549
  },
550
550
  "route-group:relationships": {
@@ -552,7 +552,7 @@
552
552
  "type": "route-group",
553
553
  "domain": "relationships",
554
554
  "sourcePath": "src/server/routes.ts",
555
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
555
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
556
556
  "since": "2025-01-01"
557
557
  },
558
558
  "route-group:feedback": {
@@ -560,7 +560,7 @@
560
560
  "type": "route-group",
561
561
  "domain": "feedback",
562
562
  "sourcePath": "src/server/routes.ts",
563
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
563
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
564
564
  "since": "2025-01-01"
565
565
  },
566
566
  "route-group:updates": {
@@ -568,7 +568,7 @@
568
568
  "type": "route-group",
569
569
  "domain": "updates",
570
570
  "sourcePath": "src/server/routes.ts",
571
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
571
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
572
572
  "since": "2025-01-01"
573
573
  },
574
574
  "route-group:dispatches": {
@@ -576,7 +576,7 @@
576
576
  "type": "route-group",
577
577
  "domain": "dispatches",
578
578
  "sourcePath": "src/server/routes.ts",
579
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
579
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
580
580
  "since": "2025-01-01"
581
581
  },
582
582
  "route-group:quota": {
@@ -584,7 +584,7 @@
584
584
  "type": "route-group",
585
585
  "domain": "monitoring",
586
586
  "sourcePath": "src/server/routes.ts",
587
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
587
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
588
588
  "since": "2025-01-01"
589
589
  },
590
590
  "route-group:publishing": {
@@ -592,7 +592,7 @@
592
592
  "type": "route-group",
593
593
  "domain": "publishing",
594
594
  "sourcePath": "src/server/routes.ts",
595
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
595
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
596
596
  "since": "2025-01-01"
597
597
  },
598
598
  "route-group:private-views": {
@@ -600,7 +600,7 @@
600
600
  "type": "route-group",
601
601
  "domain": "publishing",
602
602
  "sourcePath": "src/server/routes.ts",
603
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
603
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
604
604
  "since": "2025-01-01"
605
605
  },
606
606
  "route-group:tunnel": {
@@ -608,7 +608,7 @@
608
608
  "type": "route-group",
609
609
  "domain": "networking",
610
610
  "sourcePath": "src/server/routes.ts",
611
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
611
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
612
612
  "since": "2025-01-01"
613
613
  },
614
614
  "route-group:events": {
@@ -616,7 +616,7 @@
616
616
  "type": "route-group",
617
617
  "domain": "networking",
618
618
  "sourcePath": "src/server/routes.ts",
619
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
619
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
620
620
  "since": "2025-01-01"
621
621
  },
622
622
  "route-group:evolution": {
@@ -624,7 +624,7 @@
624
624
  "type": "route-group",
625
625
  "domain": "evolution",
626
626
  "sourcePath": "src/server/routes.ts",
627
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
627
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
628
628
  "since": "2025-01-01"
629
629
  },
630
630
  "route-group:watchdog": {
@@ -632,7 +632,7 @@
632
632
  "type": "route-group",
633
633
  "domain": "monitoring",
634
634
  "sourcePath": "src/server/routes.ts",
635
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
635
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
636
636
  "since": "2025-01-01"
637
637
  },
638
638
  "route-group:topic-memory": {
@@ -640,7 +640,7 @@
640
640
  "type": "route-group",
641
641
  "domain": "memory",
642
642
  "sourcePath": "src/server/routes.ts",
643
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
643
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
644
644
  "since": "2025-01-01"
645
645
  },
646
646
  "route-group:state-sync": {
@@ -648,7 +648,7 @@
648
648
  "type": "route-group",
649
649
  "domain": "coordination",
650
650
  "sourcePath": "src/server/routes.ts",
651
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
651
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
652
652
  "since": "2025-01-01"
653
653
  },
654
654
  "route-group:intent": {
@@ -656,7 +656,7 @@
656
656
  "type": "route-group",
657
657
  "domain": "intent",
658
658
  "sourcePath": "src/server/routes.ts",
659
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
659
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
660
660
  "since": "2025-01-01"
661
661
  },
662
662
  "route-group:triage": {
@@ -664,7 +664,7 @@
664
664
  "type": "route-group",
665
665
  "domain": "safety",
666
666
  "sourcePath": "src/server/routes.ts",
667
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
667
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
668
668
  "since": "2025-01-01"
669
669
  },
670
670
  "route-group:operations": {
@@ -672,7 +672,7 @@
672
672
  "type": "route-group",
673
673
  "domain": "safety",
674
674
  "sourcePath": "src/server/routes.ts",
675
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
675
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
676
676
  "since": "2025-01-01"
677
677
  },
678
678
  "route-group:sentinel": {
@@ -680,7 +680,7 @@
680
680
  "type": "route-group",
681
681
  "domain": "safety",
682
682
  "sourcePath": "src/server/routes.ts",
683
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
683
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
684
684
  "since": "2025-01-01"
685
685
  },
686
686
  "route-group:trust": {
@@ -688,7 +688,7 @@
688
688
  "type": "route-group",
689
689
  "domain": "safety",
690
690
  "sourcePath": "src/server/routes.ts",
691
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
691
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
692
692
  "since": "2025-01-01"
693
693
  },
694
694
  "route-group:monitoring": {
@@ -696,7 +696,7 @@
696
696
  "type": "route-group",
697
697
  "domain": "monitoring",
698
698
  "sourcePath": "src/server/routes.ts",
699
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
699
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
700
700
  "since": "2025-01-01"
701
701
  },
702
702
  "route-group:commitments": {
@@ -704,7 +704,7 @@
704
704
  "type": "route-group",
705
705
  "domain": "commitments",
706
706
  "sourcePath": "src/server/routes.ts",
707
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
707
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
708
708
  "since": "2025-01-01"
709
709
  },
710
710
  "route-group:episodes": {
@@ -712,7 +712,7 @@
712
712
  "type": "route-group",
713
713
  "domain": "memory",
714
714
  "sourcePath": "src/server/routes.ts",
715
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
715
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
716
716
  "since": "2025-01-01"
717
717
  },
718
718
  "route-group:messages": {
@@ -720,7 +720,7 @@
720
720
  "type": "route-group",
721
721
  "domain": "coordination",
722
722
  "sourcePath": "src/server/routes.ts",
723
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
723
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
724
724
  "since": "2025-01-01"
725
725
  },
726
726
  "route-group:system-reviews": {
@@ -728,7 +728,7 @@
728
728
  "type": "route-group",
729
729
  "domain": "monitoring",
730
730
  "sourcePath": "src/server/routes.ts",
731
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
731
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
732
732
  "since": "2025-01-01"
733
733
  },
734
734
  "route-group:machine-mesh": {
@@ -744,7 +744,7 @@
744
744
  "type": "route-group",
745
745
  "domain": "security",
746
746
  "sourcePath": "src/server/routes.ts",
747
- "contentHash": "6a31120bfd57e5d3ee971467e04df141698c7706d1f827900d79bb10abe364f1",
747
+ "contentHash": "5dc56bb977d66452b6a563412f2ea396d6e684c52b233add8771a15288c6c208",
748
748
  "since": "2025-01-01"
749
749
  },
750
750
  "cli:init": {
@@ -0,0 +1,23 @@
1
+ # Upgrade Notes — NEXT
2
+
3
+ ## What Changed
4
+
5
+ Fixed a P0 safety gap: the **emergency-stop** ("stop everything" / "cancel" / "halt") detector was not honored for agents that run in lifeline-owned polling mode. The MessageSentinel intercept lived only in the Telegram adapter's own poll loop (`processUpdate`), which lifeline-owned agents never run — their messages arrive through the server's `/internal/telegram-forward` route, which had no sentinel check. As a result, an emergency-stop message was delivered to the session as ordinary text and never structurally halted a running (or wedged, mid-tool-call) session.
6
+
7
+ The same emergency-stop/pause intercept is now wired into the lifeline forward path, reusing the existing kill/pause/autonomous-clear logic. It is **fail-open**: if the detector ever errors, the message is delivered normally — the safety check can never block message delivery. A wiring-integrity test now asserts that the forward route classifies before routing, so this drift cannot silently recur.
8
+
9
+ ## What to Tell Your User
10
+
11
+ Saying "stop everything" now reliably halts your agent, no matter how its messages reach it. Before this fix, agents running in the more crash-resistant background mode could miss that command and keep working. Nothing changes for normal messages — only genuine stop and pause signals are intercepted, and if the safety check ever has a hiccup your messages still get through untouched.
12
+
13
+ ## Summary of New Capabilities
14
+
15
+ - Emergency-stop and pause now fire on the lifeline message-forwarding path, not just the direct-polling path — closing a gap for the most robust class of agents.
16
+ - A regression guard (wiring-integrity test) keeps the stop-switch connected to every inbound path going forward.
17
+
18
+ ## Evidence
19
+
20
+ - **Reproduction (pre-fix):** live classify call returned `emergency-stop` for "stop everything"; a code-path trace confirmed `/internal/telegram-forward` (the live ingress for lifeline-owned agents) contained zero sentinel references, so the message was routed to the session as normal text.
21
+ - **Post-fix proof:** new integration suite `tests/integration/telegram-forward-sentinel-intercept.test.ts` — 6/6 green, covering both sides of every boundary: emergency-stop kills the session and is not routed; pause pauses and is not routed; normal messages route untouched; a throwing detector still delivers the message (fail-open); and a no-active-session emergency-stop acknowledges without routing. Plus a wiring-integrity assertion that classification precedes routing.
22
+ - **Regression:** forward-route suite green (10/10 on the rebased branch; 23/23 including the full handshake/drift/error set) — no regression. Typecheck clean.
23
+ - **Side-effects review:** `upgrades/side-effects/emergency-stop-forward-path-wiring.md`.
@@ -0,0 +1,94 @@
1
+ # Side-Effects Review — Emergency-stop on the lifeline forward path
2
+
3
+ **Version / slug:** `emergency-stop-forward-path-wiring`
4
+ **Date:** `2026-05-24`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required (single localized, fail-open route addition; spec-driven)`
7
+
8
+ ## Summary of the change
9
+
10
+ Wires the existing `MessageSentinel` emergency-stop/pause intercept into `POST /internal/telegram-forward` (the lifeline ingress path) so that lifeline-owned-polling agents — which never run `TelegramAdapter.processUpdate()`, where the intercept currently lives — actually honor "stop everything". Before this, those agents (e.g. echo) delivered emergency-stop messages to the session as normal text and nothing halted a running/wedged session. One file touched: `src/server/routes.ts` (a ~50-line block inserted after request validation, before message logging/routing). Reuses the existing `ctx.telegram.onSentinelKillSession`/`onSentinelPauseSession` callbacks and `stopAutonomousTopic`; adds no new kill logic. Spec: `docs/specs/emergency-stop-forward-path-wiring.md`.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `MessageSentinel.classify` (existing authority) — **pass-through** — its verdict is unchanged; this change only routes the verdict to an action on a path that previously ignored it.
15
+ - `/internal/telegram-forward` routing decision — **modify** — adds an emergency-stop/pause short-circuit before the existing `onTopicMessage`/registry-inject routing. Normal messages are unaffected.
16
+ - Session kill / pause / autonomous-clear — **pass-through** — reuses `onSentinelKillSession`, `onSentinelPauseSession`, `stopAutonomousTopic` exactly as the `processUpdate` path does.
17
+
18
+ ---
19
+
20
+ ## 1. Over-block
21
+
22
+ **What legitimate inputs does this change reject that it shouldn't?**
23
+
24
+ Only messages the sentinel classifies as `emergency-stop` or `pause` are intercepted (not routed to the session). That is the intended behavior and matches the already-live `processUpdate` path. The classifier's own over-block surface is unchanged (live-tested: a long sentence merely containing "stop" → `normal`, routed normally). A false-positive emergency-stop would terminate the session — but (a) the classifier already gates this with word-count + exact/regex/LLM disambiguation, and (b) the user can simply send a new message to respawn; no data loss (resume UUID is saved by `onSentinelKillSession`). No new over-block beyond what `processUpdate` already exhibits.
25
+
26
+ ---
27
+
28
+ ## 2. Under-block
29
+
30
+ **What failure modes does this still miss?**
31
+
32
+ - A genuinely-wedged classifier (LLM provider down) → fail-open → the emergency-stop is NOT honored (message routes normally). This is the deliberate trade: never block delivery. The deterministic exact/regex patterns ("stop", "cancel", "halt") do not require the LLM, so the most common emergency phrasings still classify without a provider.
33
+ - Non-Telegram lifeline paths (none currently) would need the same treatment.
34
+ - This change does not address the still-dark `processUpdate`-only assumption for any *other* per-message safety hook; scope is the sentinel only.
35
+
36
+ ---
37
+
38
+ ## 3. Level-of-abstraction fit
39
+
40
+ **Is this at the right layer?**
41
+
42
+ Yes. The smart authority (`MessageSentinel`, LLM + deterministic patterns) already exists and already owns the decision. This change is pure routing: it ensures the authority's verdict reaches the action on the server-side ingress path that lifeline-owned agents use. It does not re-implement classification (would be the wrong layer); it consumes the existing authority's output. It places the intercept at the server route layer — the correct single choke-point for the lifeline path, mirroring where `processUpdate` sits for the adapter-poll path.
43
+
44
+ ---
45
+
46
+ ## 4. Signal vs authority compliance
47
+
48
+ **Required reference:** docs/signal-vs-authority.md
49
+
50
+ - [x] No — this change produces no new block/allow logic; it routes an existing smart-gate (`MessageSentinel`, LLM-backed with deterministic patterns) verdict to its action.
51
+
52
+ The sentinel remains the sole authority. The forward route is a consumer of its verdict, not a new detector. No brittle logic gains blocking authority. (And the action is fail-open: a classifier error degrades to normal delivery, never to a wrong block.)
53
+
54
+ ---
55
+
56
+ ## 5. Interactions
57
+
58
+ - **Shadowing:** The new block runs AFTER the version-handshake (426/400 still short-circuit first) and BEFORE message logging + `onTopicMessage` routing. It does not shadow the handshake. It intentionally shadows routing for emergency-stop/pause (that's the point) — confirmed `logInboundMessage` is skipped for intercepted messages, which is acceptable (an emergency-stop need not be logged as a conversational turn; the kill is logged to the server log).
59
+ - **Double-fire:** For lifeline-owned agents, `processUpdate` does not run, so there is no double-intercept. For adapter-poll agents, the forward route is not used, so again no double-fire. The two paths are mutually exclusive per deployment mode. No agent runs both for the same message.
60
+ - **Races:** `onSentinelKillSession` already encapsulates resume-UUID save + kill (its existing concurrency behavior is unchanged). `stopAutonomousTopic` is idempotent (best-effort, try/catch). Session resolution reads the registry file read-only.
61
+ - **Feedback loops:** None. The intercept terminates routing; it does not feed back into the sentinel.
62
+
63
+ ---
64
+
65
+ ## 6. External surfaces
66
+
67
+ - **Other agents on same machine:** none — server-local route logic.
68
+ - **Install base:** ships to every agent via the normal server build. Adapter-poll agents are unaffected (path unused); lifeline-owned agents gain the (intended) emergency-stop. No agent-installed file (hook/config/template) changes → no `PostUpdateMigrator` work.
69
+ - **External systems:** on emergency-stop/pause the route now sends one Telegram message ("Session terminated." / "Session paused." / "No active session to stop."), matching the `processUpdate` user-facing copy. No new external endpoints.
70
+ - **Persistent state:** none added. Reads `topic-session-registry.json` read-only; `onSentinelKillSession` writes the resume-UUID map exactly as today.
71
+ - **Response shape:** the route now may return `{ ok:true, sentinel:'emergency-stop'|'pause', killed|paused }` instead of `{ ok:true, forwarded:true }` for intercepted messages. The lifeline treats any 200 as delivered; the new fields are additive and ignored by existing callers.
72
+
73
+ ---
74
+
75
+ ## 7. Rollback cost
76
+
77
+ Pure code change in one route, fail-open by design. Back-out = revert the block; behavior returns to current (sentinel dark on the forward path). No persistent state, no schema, no migration, no agent-state repair. The fail-open guarantee means even a bug in the block degrades to "behaves like today" (message routes), never to blocked delivery — so the rollback urgency is low even if a defect ships.
78
+
79
+ ## Conclusion
80
+
81
+ The review produced no design changes — the fix is a faithful port of the already-tested `processUpdate` intercept to the lifeline ingress path, consuming the existing sentinel authority, fail-open. The only behavioral change is that emergency-stop/pause now fire for lifeline-owned agents, which is the intended P0 safety fix. Integration tests cover both sides of every boundary (kill/pause/normal/fail-open/no-session) plus a wiring-integrity assertion that classification precedes routing (the guard whose absence caused the original drift). Clear to ship. Live end-to-end verification (real Telegram "stop everything" terminating a real session) occurs post-deploy, since it requires the merged build running; pre-merge proof is the integration suite exercising the real route handler.
82
+
83
+ ---
84
+
85
+ ## Second-pass review (if required)
86
+
87
+ Not required — single localized, fail-open route addition with full test coverage and no new decision logic.
88
+
89
+ ---
90
+
91
+ ## Evidence pointers
92
+
93
+ - Reproduction (pre-fix): live `POST /sentinel/classify` returns `emergency-stop` for "stop everything"; code trace shows `/internal/telegram-forward` (the live path for lifeline-owned echo) had zero sentinel references → message routed as normal.
94
+ - Post-fix proof: `tests/integration/telegram-forward-sentinel-intercept.test.ts` — 6/6 green (emergency-stop kills + not-routed; pause; normal-routes; fail-open-routes; no-session; wiring-integrity classify-before-route).