instar 1.2.32 → 1.2.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +72 -2
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/config/ConfigDefaults.d.ts.map +1 -1
  5. package/dist/config/ConfigDefaults.js +6 -0
  6. package/dist/config/ConfigDefaults.js.map +1 -1
  7. package/dist/core/MessagingToneGate.d.ts.map +1 -1
  8. package/dist/core/MessagingToneGate.js +30 -1
  9. package/dist/core/MessagingToneGate.js.map +1 -1
  10. package/dist/core/SessionManager.d.ts +7 -0
  11. package/dist/core/SessionManager.d.ts.map +1 -1
  12. package/dist/core/SessionManager.js +23 -0
  13. package/dist/core/SessionManager.js.map +1 -1
  14. package/dist/core/types.d.ts +30 -0
  15. package/dist/core/types.d.ts.map +1 -1
  16. package/dist/core/types.js.map +1 -1
  17. package/dist/monitoring/CompactionSentinel.d.ts +9 -0
  18. package/dist/monitoring/CompactionSentinel.d.ts.map +1 -1
  19. package/dist/monitoring/CompactionSentinel.js +9 -0
  20. package/dist/monitoring/CompactionSentinel.js.map +1 -1
  21. package/dist/monitoring/PresenceProxy.d.ts +9 -0
  22. package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
  23. package/dist/monitoring/PresenceProxy.js +9 -0
  24. package/dist/monitoring/PresenceProxy.js.map +1 -1
  25. package/dist/monitoring/RateLimitSentinel.d.ts +140 -0
  26. package/dist/monitoring/RateLimitSentinel.d.ts.map +1 -0
  27. package/dist/monitoring/RateLimitSentinel.js +308 -0
  28. package/dist/monitoring/RateLimitSentinel.js.map +1 -0
  29. package/dist/monitoring/SessionWatchdog.d.ts +11 -0
  30. package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
  31. package/dist/monitoring/SessionWatchdog.js +47 -0
  32. package/dist/monitoring/SessionWatchdog.js.map +1 -1
  33. package/dist/monitoring/rateLimitDetection.d.ts +45 -0
  34. package/dist/monitoring/rateLimitDetection.d.ts.map +1 -0
  35. package/dist/monitoring/rateLimitDetection.js +71 -0
  36. package/dist/monitoring/rateLimitDetection.js.map +1 -0
  37. package/dist/server/AgentServer.d.ts +1 -0
  38. package/dist/server/AgentServer.d.ts.map +1 -1
  39. package/dist/server/AgentServer.js +1 -0
  40. package/dist/server/AgentServer.js.map +1 -1
  41. package/dist/server/CapabilityIndex.d.ts.map +1 -1
  42. package/dist/server/CapabilityIndex.js +1 -0
  43. package/dist/server/CapabilityIndex.js.map +1 -1
  44. package/dist/server/routes.d.ts +1 -0
  45. package/dist/server/routes.d.ts.map +1 -1
  46. package/dist/server/routes.js +24 -0
  47. package/dist/server/routes.js.map +1 -1
  48. package/package.json +1 -1
  49. package/src/data/builtin-manifest.json +48 -48
  50. package/upgrades/1.2.33.md +57 -0
  51. package/upgrades/1.2.34.md +84 -0
  52. package/upgrades/side-effects/context-death-stop-hook.md +100 -0
  53. package/upgrades/side-effects/rate-limit-internal-prefix.md +41 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.2.32",
3
+ "version": "1.2.34",
4
4
  "description": "Persistent autonomy infrastructure for AI agents",
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-22T18:52:11.369Z",
5
- "instarVersion": "1.2.32",
4
+ "generatedAt": "2026-05-22T21:51:00.191Z",
5
+ "instarVersion": "1.2.34",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
395
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
403
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
411
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
419
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
427
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
435
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
443
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
451
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
459
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
467
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
475
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
483
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
491
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
499
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
507
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
515
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
523
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
531
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
539
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
547
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
555
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
563
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
571
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
579
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
587
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
595
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
603
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
611
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
619
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
627
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
635
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
643
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
651
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
659
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
667
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
675
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
683
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
691
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
699
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
707
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
715
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
723
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
731
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
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": "41bcd0a33fc72e73398acb708c966936a63afad1c9430dae8b11a7c50a38dbac",
747
+ "contentHash": "8e2047a994d15f6e332d09d2e67d83c39f88541312674b50a4976d28d54e04b8",
748
748
  "since": "2025-01-01"
749
749
  },
750
750
  "cli:init": {
@@ -1440,7 +1440,7 @@
1440
1440
  "type": "subsystem",
1441
1441
  "domain": "server",
1442
1442
  "sourcePath": "src/server/AgentServer.ts",
1443
- "contentHash": "6e996e6ea45338ffe019e539eaa738af05d5ad9a1ca35c9d93a8ba198599f759",
1443
+ "contentHash": "d8d019cc9691191bca75fabd916fa5a4400bb614abcd48b49afa4f650d533fdd",
1444
1444
  "since": "2025-01-01"
1445
1445
  },
1446
1446
  "subsystem:session-manager": {
@@ -1448,7 +1448,7 @@
1448
1448
  "type": "subsystem",
1449
1449
  "domain": "sessions",
1450
1450
  "sourcePath": "src/core/SessionManager.ts",
1451
- "contentHash": "c8a43e38d2707bf0f1e7f3bfc958b5f6f885a4cfc383cb99135100caad6fc901",
1451
+ "contentHash": "7241736a08f63b09d8b1abda0965dadb37127c95aa6e4ac11bafee05661dbe9f",
1452
1452
  "since": "2025-01-01"
1453
1453
  },
1454
1454
  "subsystem:auto-updater": {
@@ -0,0 +1,57 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- bump: minor -->
4
+ <!-- minor = new agent-facing capability (RateLimitSentinel — server-throttle survival) without breaking changes. Default-on; off-switch is one config flag. -->
5
+
6
+ ## What Changed
7
+
8
+ **feat(monitoring): RateLimitSentinel — ride out Anthropic's server-side throttle instead of dropping the session.**
9
+
10
+ Anthropic recently started surfacing a new Claude Code error: *"Server is temporarily limiting requests (not your usage limit) · Rate limited"* (and the related *"Repeated 529 Overloaded errors"*). This is a short-lived, shared-capacity throttle on Anthropic's side — **not** your account's usage cap. Claude Code already auto-retries it ~10 times with its own exponential backoff before it ever shows the message, so by the time you see it on screen, those built-in retries are exhausted and the session sits idle with no reply ever relayed to the user.
11
+
12
+ Instar's prior behavior made this worse, not better. SessionManager's idle-error path fired a single *immediate* nudge the moment it saw an "API Error:" — which slams straight back into the live throttle, burns quota for nothing, and then goes silent until the zombie-killer reaps the session. There was no user-facing signal that the agent was throttled-but-alive.
13
+
14
+ This release adds a dedicated **`RateLimitSentinel`** (same own-the-lifecycle shape as `CompactionSentinel`) that owns recovery end to end:
15
+
16
+ 1. **Detect** — a pure predicate (`src/monitoring/rateLimitDetection.ts`) distinguishes the server throttle from the user's plan/usage quota (PresenceProxy's domain — wait-for-reset, not retry) and from Claude's own in-progress retry spinner (the framework still owns it). Strings are taken from the user's live screenshot and the Claude Code error reference, not invented.
17
+ 2. **Notice immediately** — a fixed-template message tells the user they're throttled, backing off, and *not* dropped. No LLM call.
18
+ 3. **Back off BEFORE re-engaging** — escalating schedule (30s → 1m → 2m → 5m, last value repeats). This is the core quota-burn mitigation: we sit on top of Claude's already-exhausted retries instead of hammering.
19
+ 4. **Re-engage neutrally** — a plain "continue where you left off" nudge, *not* the compaction-resume payload (which would falsely tell the agent its memory was reset).
20
+ 5. **Verify** — JSONL size/mtime growth means Claude processed the nudge and the throttle cleared.
21
+ 6. **Check in** — periodic user updates at verify-fail transitions, minimum-spacing gated so it never spams.
22
+ 7. **Escalate** — after a capped attempts/window envelope (6 attempts or 30 min), a final "this is on Anthropic's side, status.claude.com has live notices, message me to retry" message.
23
+
24
+ **Two signal triggers, one authority.** Per `feedback_signal_vs_authority`: both `SessionWatchdog` (periodic poll) and `SessionManager` (idle-error path) emit signals; the sentinel holds sole recovery authority and dedupes the two. SessionManager skips its single-nudge for the throttle case and hands ownership over — *without* consuming the nudge token, so a later generic API error still gets its one nudge.
25
+
26
+ **Coexistence with the other recovery engines:**
27
+ - **Zombie-kill veto** — `setActiveRecoveryChecker` now ORs both sentinels (the predicate is *edited*, not a second call — a second `setActiveRecoveryChecker` would silently drop the compaction veto). The reaper won't kill a session mid-throttle-recovery.
28
+ - **Bidirectional deferral** — `RateLimitSentinel` and `CompactionSentinel` each defer to the other via `deferIf`, so the two never inject into one pane concurrently.
29
+ - **PresenceProxy suppression** — while a throttle recovery owns a topic's session, PresenceProxy stays silent across *every* tier (including Tier 1), so the user hears one voice. It re-checks after a delay and resumes only if the agent is still silent post-recovery.
30
+
31
+ **Opt-in retry-count raise.** A new `claudeCodeMaxRetries` config field, when set, injects `CLAUDE_CODE_MAX_RETRIES` at session spawn so Claude rides out transient throttle/overload longer before surfacing to the sentinel. Unset by default (Claude's default of 10 stands) so genuine outages aren't masked.
32
+
33
+ Spec: `docs/specs/rate-limit-sentinel.md` (ELI16 overview up top, full technical spec below). The spec folded in an adversarial side-effects review (over/under-block, race conditions, quota-burn safety, signal-vs-authority, interactions with the other sentinels) before build.
34
+
35
+ ## What to Tell Your User
36
+
37
+ Sometimes Anthropic's servers get briefly overloaded and slow everyone down for a minute or two. This is different from running out of your usage — it's a temporary "the servers are busy right now" speed bump on their end. Before this release, when that happened your agent could go quiet with no explanation, and the way it tried to recover actually wasted your usage hours by knocking on the door over and over.
38
+
39
+ Now your agent handles it gracefully. The moment it hits one of these server slowdowns it sends you a quick note — *"heads up, Anthropic's servers are briefly throttling, I'm backing off, you haven't been dropped"* — then waits a bit, tries again, waits a little longer, tries again, and keeps you posted while it's stuck. When the servers free up, it picks right back up where it left off and tells you it's back. If it's still stuck after about half an hour, it lets you know it's an Anthropic-side issue and that you can just message it to retry.
40
+
41
+ You don't have to do anything — it's on by default for every agent. If you ever want the old behavior back, it's a single config switch.
42
+
43
+ ## Summary of New Capabilities
44
+
45
+ - **`RateLimitSentinel`** — new monitoring module that owns the full detect → notice → backoff → resume → verify → check-in → escalate lifecycle for Anthropic's server-side throttle.
46
+ - **`GET /rate-limit/status`** — read-only observability route (Bearer-gated): active recoveries with `sessionName`, `status`, `attempts`, `nextBackoffMs`. Returns `{ enabled: false, active: [] }` (never 503) when the sentinel is absent.
47
+ - **`monitoring.rateLimitSentinel` config** — `{ enabled: true }` by default; `enabled: false` restores pre-feature behavior. Backoff schedule, max attempts, window, verify window, check-in spacing, and dedupe window are all overridable.
48
+ - **`claudeCodeMaxRetries` config** — opt-in `CLAUDE_CODE_MAX_RETRIES` raise at session spawn.
49
+ - **Migration parity** — `rateLimitSentinel` default flows to existing agents automatically via the canonical `ConfigDefaults` registry applied by `PostUpdateMigrator` on update. No agent ships dead.
50
+
51
+ ## Evidence
52
+
53
+ - **Tier 1 unit tests:** `tests/unit/RateLimitSentinel.test.ts` (14 tests) covers the lifecycle, dedupe across both triggers, escalation on attempt/window exhaustion, escalation when resume declines, check-in min-spacing, independent per-session recovery, and `listActive` shape. `tests/unit/rate-limit-detection.test.ts` (12 tests) covers throttle-vs-usage-limit-vs-retry-spinner discrimination with real fixture strings. All 26 passing.
54
+ - **Tier 2 integration tests:** `tests/integration/rate-limit-status-routes.test.ts` (4 tests) — `GET /rate-limit/status` through the real `createRoutes` pipeline (active + disabled cases), plus wiring-integrity tests guarding the zombie-veto composition (EITHER sentinel owning a session holds the veto — the S1 regression where a second `setActiveRecoveryChecker` drops the compaction veto) and the bidirectional `deferIf`. All passing.
55
+ - **Tier 3 E2E lifecycle:** `tests/e2e/rate-limit-sentinel-lifecycle.test.ts` (4 tests) boots the real `AgentServer` with the sentinel passed through exactly as `server.ts` wires it, and asserts `GET /rate-limit/status` returns **200 with `enabled: true`** — the "feature is alive" check that catches the case where `AgentServer`'s `?? null` plumbing drops the sentinel. Also verifies a reported throttle surfaces on the wire with the documented shape and that `isRecoveryActive` (the production zombie-veto predicate) tracks correctly. All passing.
56
+ - **Type-check:** `npx tsc --noEmit` clean.
57
+ - The full test suite must remain green before merge per the Zero-Failure Standard.
@@ -0,0 +1,84 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- bump: patch -->
4
+ <!-- patch = behavior fix, no new capability, no breaking change -->
5
+
6
+ ## What Changed
7
+
8
+ **feat(tone-gate): add B15_CONTEXT_DEATH_STOP — block outbound "fresh-
9
+ session / hand-off" framing on in-flight work.**
10
+
11
+ instar's `MessagingToneGate` already runs on every outbound user
12
+ message and blocks fourteen classes of leakage (B1–B14 — CLI commands,
13
+ file paths, jargon dumps, health-alert internals, style mismatch,
14
+ etc.). This adds a fifteenth rule, **B15_CONTEXT_DEATH_STOP**, that
15
+ catches a specific failure mode of the agent: proposing to pause, stop,
16
+ or hand off the current in-flight work for a context-window /
17
+ fresh-session / end-of-session reason rather than a legitimate stop
18
+ reason.
19
+
20
+ The pattern is documented in the CLAUDE.md "Context-Death Self-Stop"
21
+ anti-pattern section, and reinforced by multiple memory entries
22
+ (`feedback_scope_hook_is_grounding_not_termination`,
23
+ `feedback_no_deferrals`, `feedback_finish_means_merge`, etc.). Despite
24
+ the documentation, the slip kept recurring. Per instar's foundational
25
+ "Structure beats willpower" principle, this needs a structural guard
26
+ that catches the language at send-time.
27
+
28
+ B15 is an LLM-gate rule (the existing tone-gate authority). It lists
29
+ literal pattern markers ("fresh session," "next session," "tail of
30
+ this session," "hand off cleanly," "pick this up later," etc.) AND
31
+ legitimate-stop carve-outs that pass unblocked (real design question
32
+ only the operator can answer, real blocker, real error, completion
33
+ report on user-requested scope). The LLM combines the markers with
34
+ conversational context and the carve-outs to make the block/pass call.
35
+
36
+ When B15 fires, the standard tone-gate UX applies: the candidate is
37
+ rejected with rule id B15, an issue summary, and a suggestion. The
38
+ agent has to either delete the handoff framing and continue working
39
+ or supply an explicit legitimate-stop reason.
40
+
41
+ ## Evidence
42
+
43
+ The change is one entry added to `VALID_RULES`, one new section in
44
+ the gate's prompt, and one line updated in the response-format note
45
+ listing valid rule ids. Nine unit tests in
46
+ `tests/unit/messaging-tone-gate-b15.test.ts` verify:
47
+
48
+ 1. The prompt always carries the B15 rule definition for every review.
49
+ 2. The prompt carries the literal pattern markers (fresh session, next
50
+ session, tail of this session, hand off cleanly, pick this up later).
51
+ 3. The prompt documents the legitimate-stop carve-outs (completion
52
+ report, genuine error / blocker).
53
+ 4. The response-format rule list includes B15.
54
+ 5. An LLM response citing B15 is accepted as a valid block (not
55
+ fail-opened as `invalidRule`).
56
+ 6. A completion-report message passes through unchanged when the LLM
57
+ returns pass.
58
+ 7. A genuine-blocker message passes through unchanged.
59
+ 8. A topic-split / continuation message passes through unchanged.
60
+ 9. The drift-detection still rejects unknown rule ids (no widening
61
+ of the gate to arbitrary ids).
62
+
63
+ All 27 existing `MessagingToneGate.test.ts` tests still pass; all 8
64
+ existing `messaging-tone-gate-health-alerts.test.ts` tests still pass.
65
+ The TypeScript build is clean; lint is clean.
66
+
67
+ ## What to Tell Your User
68
+
69
+ Your agent now has one more safety net on the messages it sends you.
70
+ The new check looks for moments where the agent is about to write some
71
+ version of "let me pick this up in a fresh session" or "I'll hand this
72
+ off cleanly" while the work you asked for isn't actually done yet — and
73
+ quietly blocks that message before it reaches you. The agent has to
74
+ either delete the bail-out framing and keep working, or cite a real
75
+ reason for stopping. You should notice the agent doing less of that
76
+ pattern. Nothing changes about messages where the agent has a real
77
+ question, a real blocker, a real error, or actually finished the work.
78
+
79
+ ## Summary of New Capabilities
80
+
81
+ | Capability | How to Use |
82
+ |-----------|-----------|
83
+ | B15 tone-gate rule catches outbound context-death stop framing | Automatic — runs on every outbound user message via MessagingToneGate |
84
+ | B15 has explicit legitimate-stop carve-outs | Automatic — real question / real blocker / real error / completion report pass unblocked |