instar 1.3.73 → 1.3.74
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +11 -3
- package/dist/commands/server.js.map +1 -1
- package/dist/core/SleepWakeDetector.d.ts +83 -5
- package/dist/core/SleepWakeDetector.d.ts.map +1 -1
- package/dist/core/SleepWakeDetector.js +117 -11
- package/dist/core/SleepWakeDetector.js.map +1 -1
- package/dist/core/types.d.ts +17 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +6 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts +3 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +1 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/routes.d.ts +4 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +14 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +47 -47
- package/src/scaffold/templates.ts +6 -0
- package/upgrades/1.3.74.md +95 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-29T03:06:18.079Z",
|
|
5
|
+
"instarVersion": "1.3.74",
|
|
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": "
|
|
412
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
420
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
428
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
436
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
444
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
452
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
460
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
468
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
476
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
484
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
492
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
500
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
508
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
516
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
524
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
532
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
540
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
548
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
556
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
564
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
572
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
580
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
588
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
596
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
604
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
612
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
620
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
628
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
636
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
644
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
652
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
660
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
668
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
676
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
684
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
692
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
700
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
708
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
716
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
724
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
732
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
740
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
748
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
764
|
+
"contentHash": "c61fc73ca69a17414aadfd5c095f7846d0dbaef9f7a2d2d7e67ca1dc5488881f",
|
|
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": "
|
|
1460
|
+
"contentHash": "c79bc89d11c4dde21ab48c9c6c90ad63ecc80aae9c7d3a968de49c438b38b2dc",
|
|
1461
1461
|
"since": "2025-01-01"
|
|
1462
1462
|
},
|
|
1463
1463
|
"subsystem:session-manager": {
|
|
@@ -415,6 +415,12 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
|
|
|
415
415
|
- Also: when a session is autonomously shut down, you get a "your session was shut down — <reason>" notice (recovery-bounces and your own operator kills stay silent). Turn the notice off with \`{"monitoring": {"reapNotify": {"enabled": false}}}\`.
|
|
416
416
|
- Proactive: user asks "where did my session go?" / "why did X disappear?" / "did something get killed?" → GET /sessions/reap-log and explain the most recent reaped/skipped entries for that session.
|
|
417
417
|
|
|
418
|
+
**Sleep/Wake telemetry** — The "why does my agent keep restarting / saying it's overloaded?" answer. My SleepWakeDetector spots real machine sleep via timer drift, but on a CPU-oversubscribed box (many concurrent sessions, load ≫ cores) the event loop starves and a timer fires seconds late — which *looks* identical to a brief sleep. The CPU-starvation guard tells them apart: a short drift under high load (\`loadavg[0]/cpuCount > maxLoadRatio\`) is suppressed instead of triggering expensive wake-recovery (tunnel restart, re-registration) that would pile on more load; a long drift is always honored as real sleep; an emit cooldown caps the recovery rate. So "overloaded" is about CPU, NOT memory — check load average, not RAM.
|
|
419
|
+
- Read it: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/monitoring/sleep-wake\` → \`{ wakeCount, totalSleepSeconds, longestSleepSeconds, suppressedCount, suppressedByReason: { 'cpu-starvation', cooldown }, lastSuppressedAt }\`. \`?sinceMs=<epoch>\` windows it. Read-only.
|
|
420
|
+
- High \`suppressedCount\` (cpu-starvation) = the box is oversubscribed and the guard is absorbing false wakes — the real fix is fewer concurrent sessions / a less-loaded machine, not a code change.
|
|
421
|
+
- Tune (rarely needed) in \`.instar/config.json\`: \`{"monitoring": {"sleepWake": {"maxLoadRatio": 1.5, "longSleepFloorSeconds": 300, "minWakeIntervalMs": 60000}}}\`. Defaults live in code, so the guard is active with no config.
|
|
422
|
+
- Proactive: user reports "you keep restarting" / "your agent is overloaded" / "is it a memory problem?" → GET /monitoring/sleep-wake, then check \`uptime\` load average against core count; explain CPU oversubscription (load ≫ cores) vs. memory.
|
|
423
|
+
|
|
418
424
|
**Multi-Session Autonomy** — I can run multiple autonomous jobs at once, one per topic (default cap 5, set \`autonomousSessions.maxConcurrent\` in config). Each topic's job is isolated, survives restarts, and is keyed on its topic.
|
|
419
425
|
- What's running: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/autonomous/sessions\`
|
|
420
426
|
- The cap + budget gate is checked automatically when a job starts (\`GET /autonomous/can-start\`); a start is refused when at the cap or under budget pressure.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Instar Upgrade Guide — NEXT
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
**The SleepWakeDetector no longer mistakes CPU starvation for machine sleep — the "my agent keeps restarting / it's overloaded" storm is fixed.**
|
|
8
|
+
|
|
9
|
+
The detector spots real OS sleep by watching timer drift: a 2-second heartbeat
|
|
10
|
+
that fires much later than expected means the process was suspended. But timer
|
|
11
|
+
drift has **two** causes, and the detector treated both as sleep:
|
|
12
|
+
|
|
13
|
+
1. **Real sleep** — the OS suspends the process; the wall clock jumps forward.
|
|
14
|
+
2. **CPU starvation** — on an oversubscribed box (many concurrent agent sessions,
|
|
15
|
+
load ≫ cores) the event loop is so backed up it can't service the 2s timer on
|
|
16
|
+
time, so the callback fires seconds late. Nothing actually slept.
|
|
17
|
+
|
|
18
|
+
On a heavily-loaded machine the second case fired constantly — in one real
|
|
19
|
+
incident, **466 false "wake after ~8–29s sleep" events in a single server log**.
|
|
20
|
+
Each false wake ran expensive recovery (Cloudflare tunnel force-restart that then
|
|
21
|
+
timed out, re-registration, the lifeline `ServerSupervisor` resetting its
|
|
22
|
+
failure counters), which piled *more* load onto the box — a self-reinforcing
|
|
23
|
+
storm the user experienced as the agent endlessly "restarting due to overload"
|
|
24
|
+
even though memory was completely fine.
|
|
25
|
+
|
|
26
|
+
The detector now **classifies** drift instead of blindly trusting it:
|
|
27
|
+
|
|
28
|
+
- **Short drift under heavy CPU load** (`loadavg[0] / cpuCount > maxLoadRatio`,
|
|
29
|
+
default `1.5`) is treated as event-loop starvation and **suppressed** — no wake
|
|
30
|
+
event, so none of the expensive recovery fires.
|
|
31
|
+
- **A long drift** (`>= longSleepFloorSeconds`, default `300`) is *always* honored
|
|
32
|
+
as real sleep — a live event loop never starves for minutes (a watchdog would
|
|
33
|
+
declare the process dead first).
|
|
34
|
+
- **A short drift under normal load** is a genuine brief sleep — emitted as before.
|
|
35
|
+
- An **emit cooldown** (`minWakeIntervalMs`, default `60000`) caps how often wake
|
|
36
|
+
recovery can fire, so even a misclassified burst can't storm; long sleeps bypass
|
|
37
|
+
it. On Windows (`os.loadavg()` returns `[0,0,0]`) the load guard self-disables,
|
|
38
|
+
preserving prior behavior.
|
|
39
|
+
|
|
40
|
+
Suppressed starvation drifts are deliberately kept *out* of the wake history, so
|
|
41
|
+
`getCumulativeSleepMsBetween` (the wake-reaper's sleep-credit source) never counts
|
|
42
|
+
starvation as if a job had slept through it.
|
|
43
|
+
|
|
44
|
+
The thresholds live as defaults in the detector class, so **both** consumers — the
|
|
45
|
+
server's wake-recovery handler and the lifeline's `ServerSupervisor` (which shares
|
|
46
|
+
the class) — get the fix on update with no config migration. A new read-only
|
|
47
|
+
route **`GET /monitoring/sleep-wake`** reports `wakeCount` (genuine sleep/wake) vs.
|
|
48
|
+
`suppressedCount` with a `cpu-starvation` / `cooldown` breakdown — the visibility
|
|
49
|
+
that was missing while the storm was happening.
|
|
50
|
+
|
|
51
|
+
## What to Tell Your User
|
|
52
|
+
|
|
53
|
+
If I've been telling you I keep "restarting because too many sessions are
|
|
54
|
+
overloading the system," that message was half-right and half-misleading: the
|
|
55
|
+
machine really was overloaded, but on **CPU**, not memory — so checking RAM
|
|
56
|
+
looked fine and the warning seemed wrong. The cause was too many things running at
|
|
57
|
+
once (lots of concurrent sessions / agents), which starved my internal timers and
|
|
58
|
+
made me *think* the computer had gone to sleep and woken up — over and over,
|
|
59
|
+
hundreds of times an hour. Each false "wake" kicked off heavy recovery work
|
|
60
|
+
(restarting my tunnel, re-registering) that just added more load.
|
|
61
|
+
|
|
62
|
+
I can now tell the difference between the machine actually sleeping and the
|
|
63
|
+
machine just being too busy, so I stop overreacting to a busy moment. When things
|
|
64
|
+
are genuinely overloaded I now ride it out quietly instead of thrashing. If you
|
|
65
|
+
want to see it, ask me — I can show you how many real wakes vs. false ones I've
|
|
66
|
+
absorbed, and I'll point you at the load average (not RAM) as the thing to watch.
|
|
67
|
+
|
|
68
|
+
The real-world remedy when that number is high is still fewer things running at
|
|
69
|
+
once or a less-loaded machine — but the agent will no longer make a busy box worse
|
|
70
|
+
by storming itself.
|
|
71
|
+
|
|
72
|
+
## Summary of New Capabilities
|
|
73
|
+
|
|
74
|
+
| Capability | How to Use |
|
|
75
|
+
|-----------|-----------|
|
|
76
|
+
| CPU-starvation guard on sleep detection | Automatic. Short timer drift under high CPU load (`loadavg[0]/cpuCount > 1.5`) is classified as starvation and suppressed instead of triggering wake-recovery; long drift is always treated as real sleep. Fixes both the server's wake handler and the lifeline `ServerSupervisor`. |
|
|
77
|
+
| Sleep/wake telemetry route | `curl -H "Authorization: Bearer $AUTH" http://localhost:4040/monitoring/sleep-wake` → `{ wakeCount, totalSleepSeconds, longestSleepSeconds, suppressedCount, suppressedByReason: { 'cpu-starvation', cooldown }, lastSuppressedAt }`. `?sinceMs=<epoch>` windows it. |
|
|
78
|
+
| Tunable thresholds | Optional `.instar/config.json` → `{"monitoring": {"sleepWake": {"maxLoadRatio": 1.5, "longSleepFloorSeconds": 300, "minWakeIntervalMs": 60000}}}`. Defaults live in code, so the guard is active with no config. |
|
|
79
|
+
|
|
80
|
+
## Evidence
|
|
81
|
+
|
|
82
|
+
- Unit: `tests/unit/sleep-wake-starvation-guard.test.ts` — classification boundary
|
|
83
|
+
(short-drift-high-load suppressed / short-drift-normal-load emitted /
|
|
84
|
+
long-drift-always-emitted), emit cooldown (suppress within window, long-sleep
|
|
85
|
+
bypass, re-emit after elapse), Windows `loadavg=[0,0,0]` self-disable,
|
|
86
|
+
`maxLoadRatio: Infinity` opt-out, and the cumulative-sleep exclusion of
|
|
87
|
+
suppressed drifts. Existing detector tests updated to inject idle load so they
|
|
88
|
+
test the drift mechanism independent of the host's real load.
|
|
89
|
+
- Integration: `tests/integration/sleep-wake-routes.test.ts` — `GET
|
|
90
|
+
/monitoring/sleep-wake` returns 503 when unwired, 200 with the full wake +
|
|
91
|
+
suppression telemetry through the HTTP pipeline, and honors `?sinceMs` filtering.
|
|
92
|
+
- E2E: `tests/e2e/sleep-wake-telemetry-lifecycle.test.ts` — boots the real
|
|
93
|
+
`AgentServer`, asserts the route is alive (200, not 503) + telemetry surfaces +
|
|
94
|
+
Bearer auth, plus a wiring-integrity guard that `server.ts` actually passes the
|
|
95
|
+
detector into `AgentServer` (anti-shipped-but-asleep).
|