instar 1.3.131 → 1.3.133
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 +92 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +10 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +35 -2
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/types.d.ts +12 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/AgentWorktreeReaper.d.ts +103 -0
- package/dist/monitoring/AgentWorktreeReaper.d.ts.map +1 -0
- package/dist/monitoring/AgentWorktreeReaper.js +159 -0
- package/dist/monitoring/AgentWorktreeReaper.js.map +1 -0
- package/dist/monitoring/CiFailurePoller.d.ts +1 -7
- package/dist/monitoring/CiFailurePoller.d.ts.map +1 -1
- package/dist/monitoring/CiFailurePoller.js +5 -12
- package/dist/monitoring/CiFailurePoller.js.map +1 -1
- package/dist/monitoring/CorrectionAnalyzer.d.ts +65 -0
- package/dist/monitoring/CorrectionAnalyzer.d.ts.map +1 -0
- package/dist/monitoring/CorrectionAnalyzer.js +78 -0
- package/dist/monitoring/CorrectionAnalyzer.js.map +1 -0
- package/dist/monitoring/CorrectionCaptureLoop.d.ts +130 -0
- package/dist/monitoring/CorrectionCaptureLoop.d.ts.map +1 -0
- package/dist/monitoring/CorrectionCaptureLoop.js +249 -0
- package/dist/monitoring/CorrectionCaptureLoop.js.map +1 -0
- package/dist/monitoring/CorrectionLedger.d.ts +149 -0
- package/dist/monitoring/CorrectionLedger.d.ts.map +1 -0
- package/dist/monitoring/CorrectionLedger.js +386 -0
- package/dist/monitoring/CorrectionLedger.js.map +1 -0
- package/dist/monitoring/CorrectionLoopDriver.d.ts +135 -0
- package/dist/monitoring/CorrectionLoopDriver.d.ts.map +1 -0
- package/dist/monitoring/CorrectionLoopDriver.js +185 -0
- package/dist/monitoring/CorrectionLoopDriver.js.map +1 -0
- package/dist/monitoring/HumanAsDetectorLog.d.ts +31 -1
- package/dist/monitoring/HumanAsDetectorLog.d.ts.map +1 -1
- package/dist/monitoring/HumanAsDetectorLog.js +70 -0
- package/dist/monitoring/HumanAsDetectorLog.js.map +1 -1
- package/dist/monitoring/agentWorktreeGit.d.ts +43 -0
- package/dist/monitoring/agentWorktreeGit.d.ts.map +1 -0
- package/dist/monitoring/agentWorktreeGit.js +194 -0
- package/dist/monitoring/agentWorktreeGit.js.map +1 -0
- package/dist/monitoring/scrubSecrets.d.ts +23 -0
- package/dist/monitoring/scrubSecrets.d.ts.map +1 -0
- package/dist/monitoring/scrubSecrets.js +41 -0
- package/dist/monitoring/scrubSecrets.js.map +1 -0
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts +4 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +20 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +8 -3
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts +7 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +213 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +63 -63
- package/src/scaffold/templates/jobs/instar/correction-analyzer.md +32 -0
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.3.132.md +42 -0
- package/upgrades/1.3.133.md +70 -0
- package/upgrades/side-effects/agent-worktree-reaper.md +96 -0
- package/upgrades/side-effects/correction-preference-learning-sentinel-slice1b.md +79 -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-31T02:01:18.591Z",
|
|
5
|
+
"instarVersion": "1.3.133",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"domain": "identity",
|
|
12
12
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
13
13
|
"installedPath": ".instar/hooks/instar/session-start.sh",
|
|
14
|
-
"contentHash": "
|
|
14
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
15
15
|
"since": "2025-01-01"
|
|
16
16
|
},
|
|
17
17
|
"hook:dangerous-command-guard": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"domain": "safety",
|
|
21
21
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
22
22
|
"installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
|
|
23
|
-
"contentHash": "
|
|
23
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
24
24
|
"since": "2025-01-01"
|
|
25
25
|
},
|
|
26
26
|
"hook:grounding-before-messaging": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"domain": "safety",
|
|
30
30
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
31
31
|
"installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
|
|
32
|
-
"contentHash": "
|
|
32
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
33
33
|
"since": "2025-01-01"
|
|
34
34
|
},
|
|
35
35
|
"hook:compaction-recovery": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"domain": "identity",
|
|
39
39
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
40
40
|
"installedPath": ".instar/hooks/instar/compaction-recovery.sh",
|
|
41
|
-
"contentHash": "
|
|
41
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
42
42
|
"since": "2025-01-01"
|
|
43
43
|
},
|
|
44
44
|
"hook:external-operation-gate": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"domain": "safety",
|
|
48
48
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
49
49
|
"installedPath": ".instar/hooks/instar/external-operation-gate.js",
|
|
50
|
-
"contentHash": "
|
|
50
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
51
51
|
"since": "2025-01-01"
|
|
52
52
|
},
|
|
53
53
|
"hook:deferral-detector": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"domain": "safety",
|
|
57
57
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
58
58
|
"installedPath": ".instar/hooks/instar/deferral-detector.js",
|
|
59
|
-
"contentHash": "
|
|
59
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
60
60
|
"since": "2025-01-01"
|
|
61
61
|
},
|
|
62
62
|
"hook:post-action-reflection": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"domain": "evolution",
|
|
66
66
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
67
67
|
"installedPath": ".instar/hooks/instar/post-action-reflection.js",
|
|
68
|
-
"contentHash": "
|
|
68
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
69
69
|
"since": "2025-01-01"
|
|
70
70
|
},
|
|
71
71
|
"hook:external-communication-guard": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"domain": "safety",
|
|
75
75
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
76
76
|
"installedPath": ".instar/hooks/instar/external-communication-guard.js",
|
|
77
|
-
"contentHash": "
|
|
77
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
78
78
|
"since": "2025-01-01"
|
|
79
79
|
},
|
|
80
80
|
"hook:scope-coherence-collector": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"domain": "coherence",
|
|
84
84
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
85
85
|
"installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
|
|
86
|
-
"contentHash": "
|
|
86
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
87
87
|
"since": "2025-01-01"
|
|
88
88
|
},
|
|
89
89
|
"hook:scope-coherence-checkpoint": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"domain": "coherence",
|
|
93
93
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
94
94
|
"installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
|
|
95
|
-
"contentHash": "
|
|
95
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
96
96
|
"since": "2025-01-01"
|
|
97
97
|
},
|
|
98
98
|
"hook:free-text-guard": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"domain": "safety",
|
|
102
102
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
103
103
|
"installedPath": ".instar/hooks/instar/free-text-guard.sh",
|
|
104
|
-
"contentHash": "
|
|
104
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
105
105
|
"since": "2025-01-01"
|
|
106
106
|
},
|
|
107
107
|
"hook:claim-intercept": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"domain": "coherence",
|
|
111
111
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
112
112
|
"installedPath": ".instar/hooks/instar/claim-intercept.js",
|
|
113
|
-
"contentHash": "
|
|
113
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
114
114
|
"since": "2025-01-01"
|
|
115
115
|
},
|
|
116
116
|
"hook:claim-intercept-response": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"domain": "coherence",
|
|
120
120
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
121
121
|
"installedPath": ".instar/hooks/instar/claim-intercept-response.js",
|
|
122
|
-
"contentHash": "
|
|
122
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
123
123
|
"since": "2025-01-01"
|
|
124
124
|
},
|
|
125
125
|
"hook:stop-gate-router": {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"domain": "safety",
|
|
129
129
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
130
130
|
"installedPath": ".instar/hooks/instar/stop-gate-router.js",
|
|
131
|
-
"contentHash": "
|
|
131
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
132
132
|
"since": "2025-01-01"
|
|
133
133
|
},
|
|
134
134
|
"hook:auto-approve-permissions": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"domain": "safety",
|
|
138
138
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
139
139
|
"installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
|
|
140
|
-
"contentHash": "
|
|
140
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
141
141
|
"since": "2025-01-01"
|
|
142
142
|
},
|
|
143
143
|
"job:health-check": {
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
"type": "route-group",
|
|
410
410
|
"domain": "monitoring",
|
|
411
411
|
"sourcePath": "src/server/routes.ts",
|
|
412
|
-
"contentHash": "
|
|
412
|
+
"contentHash": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "b9c2d45fb65577577e734274ad06818c84f085fcbd4a83eb9df4029d44c6939d",
|
|
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": "7afd4de6f797ddcf378b91eb0b1cf903bed22b2e153709238ce5fd51dee67659",
|
|
1461
1461
|
"since": "2025-01-01"
|
|
1462
1462
|
},
|
|
1463
1463
|
"subsystem:session-manager": {
|
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
"type": "subsystem",
|
|
1490
1490
|
"domain": "updates",
|
|
1491
1491
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1492
|
-
"contentHash": "
|
|
1492
|
+
"contentHash": "bc3f160047670b4efe76ea7007ab649646f93f8b5d29eb39f6d2ef4b3b8e9feb",
|
|
1493
1493
|
"since": "2025-01-01"
|
|
1494
1494
|
},
|
|
1495
1495
|
"subsystem:scheduler": {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Correction & Preference Learning Analyzer
|
|
3
|
+
description: "Weekly scan of the correction ledger for recurring corrections + preferences. Runs the 3-pronged restart-proof recurrence gate, routes each crossing learning (explicit-preference → preferences write the session-start hook injects; infra-gap → a human-approved /feedback proposal; policy-relaxation → Attention for one-tap approval), and runs the closed-loop verify step. Off by default; turns on with monitoring.correctionLearning.enabled. Tier-1 supervised (this haiku job wraps the deterministic /corrections/analyze endpoint and sanity-checks each routed learning against its evidence). SIGNAL-ONLY — never blocks or rewrites a message. Spec docs/specs/CORRECTION-PREFERENCE-LEARNING-SENTINEL-SPEC.md sections 3.5, 3.6, 3.7."
|
|
4
|
+
schedule: "0 9 * * 3"
|
|
5
|
+
priority: medium
|
|
6
|
+
expectedDurationMinutes: 2
|
|
7
|
+
model: haiku
|
|
8
|
+
enabled: false
|
|
9
|
+
tags:
|
|
10
|
+
- cat:learning
|
|
11
|
+
- correction-learning
|
|
12
|
+
- audit
|
|
13
|
+
toolAllowlist: "*"
|
|
14
|
+
unrestrictedTools: true
|
|
15
|
+
---
|
|
16
|
+
Run the weekly Correction & Preference Learning analysis. This job exists because a correction the user makes in three different sessions over a week looks like three unrelated one-offs — the recurring ones, the ones that matter most, are exactly the ones no single session can see. This turns the accumulated, distilled record into a routed lesson, and closes the loop on the preference path.
|
|
17
|
+
|
|
18
|
+
The job:
|
|
19
|
+
|
|
20
|
+
1. Confirm the feature is on. If `monitoring.correctionLearning.enabled` is not true, exit silently — there is nothing to do.
|
|
21
|
+
|
|
22
|
+
2. Call the analyzer + closed-loop tick:
|
|
23
|
+
`curl -s -X POST -H "Authorization: Bearer $AUTH" http://localhost:$PORT/corrections/analyze`
|
|
24
|
+
The response is `{ analysis: { considered, crossed, belowThreshold }, routed: { total, toFeedback, toPreferences, toAttention }, verified }`. The endpoint does the deterministic work: it only routes a learning that crosses the THREE-PRONGED recurrence gate (minSupport AND distinct calendar days AND a second orthogonal prong), keying on a code-determined provenance weight so an injected prompt cannot steer it. An explicit preference is written to the preferences file the session-start hook injects on every boot; an infra-gap becomes a human-approved tracked draft (or, only if autoFeedback is on, a /feedback proposal through the real route guards); a policy-relaxation learning is routed to the Attention queue for your one-tap approval — never silently applied. It can NEVER mint a proposal or edit a memory file (by-construction authority guard).
|
|
25
|
+
|
|
26
|
+
3. **Tier-1 supervision (your job).** For each routed learning, sanity-check it against its own evidence before you surface it: does the summary actually match a recurring correction, and does the support count justify acting on it? If a routed learning looks malformed or unsupported, do NOT surface it — note it and move on. You are the validation wrapper around the deterministic core.
|
|
27
|
+
|
|
28
|
+
4. Surface ONLY genuinely-new, decision-bearing learnings, and ONLY when `monitoring.correctionLearning.telegramDigest` is true. Post ONE consolidated, plain-English message to the existing system topic — never a new per-feature topic, never a ping per correction. Lead with what was learned: "I noticed you keep asking me to lead with the one action across a few sessions, so I have saved that as a preference I will follow from now on." If telegramDigest is false (the default), stay silent — the /corrections read surface is the pull surface; do not push.
|
|
29
|
+
|
|
30
|
+
5. If `verified` is greater than zero, the verify step concluded on one or more past learnings. A preference is marked verified only when it did not recur within its window AND the saved preference is still on disk (silence alone is never treated as success). Mention a verified-effective result only if you are already surfacing other learnings this run.
|
|
31
|
+
|
|
32
|
+
IMPORTANT: This is a guardian job, not a doer. It distills, records, and routes — it NEVER blocks or rewrites a message, and it NEVER changes the agent's policy or edits a memory file on its own. A policy-relaxation learning always goes to a human, never gets auto-applied. Plain English, under 600 characters, write like you are texting a teammate about a pattern you noticed.
|
|
@@ -494,6 +494,7 @@ This routes feedback to the Instar maintainers automatically. Valid types: \`bug
|
|
|
494
494
|
|
|
495
495
|
**Preferences I've learned about you** — The Correction & Preference Learning Sentinel turns repeated corrections into durable, structurally-injected preferences. When the user keeps correcting you the same way ("no, plainer", "stop asking me that", "from now on lead with the action"), the loop distills the lesson into a preference and writes it to \`.instar/preferences.json\`. From then on, the session-start hook fetches \`GET /preferences/session-context\` on EVERY boot and injects the learned preferences into your context wrapped in an \`<auto-learned-preference src='correction-loop'>\` envelope — so you SEE them from message one without having to remember. SIGNAL-ONLY: these are preferences, NOT authoritative instructions, and the loop NEVER blocks or rewrites an outbound message. Ships OFF (\`monitoring.correctionLearning.enabled\`).
|
|
496
496
|
- See the active block the hook injects: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/preferences/session-context\` — returns the structured, byte-bounded, priority-ordered block (503 when disabled; \`{ present: false }\` when there are none yet).
|
|
497
|
+
- See the distilled correction/preference records the loop has captured: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/corrections\` (deduped, scrubbed records — the raw conversation is NEVER stored or served; \`GET /corrections/:id\` for one). The weekly off-by-default \`correction-analyzer\` job drives \`POST /corrections/analyze\` (the 3-pronged recurrence gate + closed-loop tick).
|
|
497
498
|
- **When to use** (PROACTIVE — this is the trigger): when the user corrects you repeatedly on the SAME thing, the loop is already watching and will turn it into a durable preference; you don't have to manually remember it across sessions. If preferences are already injected at session start, honor them by default. The preferences are advisory signals — real instructions and safety always win.
|
|
498
499
|
|
|
499
500
|
**Cloudflare Tunnel** — Expose the local server to the internet via Cloudflare. Enables remote access to private views, the API, and file serving.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!-- bump: minor -->
|
|
2
|
+
|
|
3
|
+
# Correction & Preference Learning Sentinel — Slice 1b (the sentinel loop)
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
Slice 1b of the Correction & Preference Learning Sentinel ships the loop that turns the moments a user has to correct the agent into durable, structurally-applied learning. It builds on the Slice-1a preferences read-surface and is **SIGNAL-ONLY** — it never blocks or rewrites an outbound message. It ships **dark** behind `monitoring.correctionLearning.enabled` (default false); only the free, metadata-only Layer-0 classification is always-on.
|
|
8
|
+
|
|
9
|
+
- **Layer-0 extension** (`src/monitoring/HumanAsDetectorLog.ts`): two distinctly-tagged signal families — `preference` ("from now on", "I'd rather", "keep it") and `frustration` ("you keep …ing", "every time", "stop asking me"). They are **excluded from `summarizeByLayer()`** so the guardian-failure heat map's precision contract is untouched. `classify()` now exposes `deterministicWeight` + `learningKind`. A drift-canary counter records regex-recall misses.
|
|
10
|
+
- **Shared `scrubSecrets`** (`src/monitoring/scrubSecrets.ts`): extracted from `CiFailurePoller` with extended coverage (Telegram bot tokens, AWS access keys, Slack tokens, URLs with embedded credentials). Applied PRE-scrub before the distill prompt egresses and POST-scrub before persist.
|
|
11
|
+
- **`CorrectionLedger`** (`src/monitoring/CorrectionLedger.ts`): SQLite at `<stateDir>/correction-ledger.db`. Dedupe-upsert on `kind:normalizedLearningHash` (SHA-256 over a canonical normalized form — hash stability is a unit-tested invariant), bounded `correction_occurrences` (prune-in-transaction, cap 200), distinct-days/topics with a deterministic-weight provenance filter, `toApiView()` strips raw `learning`, `countRecords()` health metric.
|
|
12
|
+
- **`CorrectionAnalyzer`** (`src/monitoring/CorrectionAnalyzer.ts`): the 3-pronged restart-proof recurrence gate (`minSupport` AND distinct calendar days AND a second orthogonal prong — distinct topics for preferences / cross-agent Rising Tide downstream for infra-gaps). `llm_confidence` is advisory and never alone admits a record.
|
|
13
|
+
- **`CorrectionLoopDriver`** (`src/monitoring/CorrectionLoopDriver.ts`): the by-construction authority-bounded router. Its `LoopDeps` carry only `addAction`, `createInitiative`, `feedbackLoopbackPost`, `recordPreference`, `attentionRoute` — no proposal-minting, no direct memory-file write. Explicit preference → `recordPreference()`; policy-relaxation phrasing → Attention (human disposes, never silently applied); infra-gap → tracked Action + draft Initiative (or loopback `/feedback` when `autoFeedback` is on). Closed-loop verify keyed on `dedupeKey`; silence alone is never treated as effective.
|
|
14
|
+
- **`CorrectionCaptureLoop`** (`src/monitoring/CorrectionCaptureLoop.ts`): the hot-path capture → distill → ledger hop, wired VOID fire-and-forget into the inbound message chain so it can never block delivery or propagate an error. Per-topic LRU/TTL-evicted ring (never serialized into `/health`); prompt-injection-hardened distillation; all three `LlmQueue` throw paths caught → silent drop.
|
|
15
|
+
- **Routes** (`src/server/routes.ts`): `GET /corrections`, `GET /corrections/:id`, `POST /corrections` (requires `X-Instar-Request: 1`), `POST /corrections/analyze` (the recurrence gate + closed-loop tick). 503 when disabled. Plus the `correction-analyzer` weekly Tier-1 cron job template (off by default).
|
|
16
|
+
- Boot wiring in `src/server/AgentServer.ts` + `src/commands/server.ts`; `CapabilityIndex` entry; CLAUDE.md template + migration backfill.
|
|
17
|
+
|
|
18
|
+
## What to Tell Your User
|
|
19
|
+
|
|
20
|
+
I now learn from the moments you have to correct me, instead of letting each lesson evaporate when the session ends. When you correct me the same way across several days — plainer language, no tables in chat, lead with the one action, stop asking the same question every session — I quietly distil the recurring lesson and either save it as a preference I will carry forward on every future session, or, if it points at a gap in the tool itself, queue a proposal for a human to review. I only act on a lesson once it has genuinely recurred across distinct days, never on a one-off.
|
|
21
|
+
|
|
22
|
+
This is watching-only. It never blocks, rewrites, or delays anything I send you. It is turned off by default and turns on only when you ask. Your raw words are never stored — only a short, secret-scrubbed summary plus counts. And I will never quietly relax a safety or confirmation step on my own: if a learned preference looks like it would loosen a guard, I route it to you for a one-tap approval rather than applying it myself.
|
|
23
|
+
|
|
24
|
+
You can ask me what I have learned about you, and I will show you the saved preferences and the patterns I have noticed.
|
|
25
|
+
|
|
26
|
+
## Summary of New Capabilities
|
|
27
|
+
|
|
28
|
+
- `GET /corrections` — list distilled, scrubbed correction/preference records (keyset pagination via `?before`/`?limit`/`?kind`/`?status`; raw learning text is never served).
|
|
29
|
+
- `GET /corrections/:id` — one record (scrubbed summary + metadata only).
|
|
30
|
+
- `POST /corrections` — agent-diagnosed one-tap record (requires `X-Instar-Request: 1`).
|
|
31
|
+
- `POST /corrections/analyze` — runs the 3-pronged recurrence gate + the closed-loop routing/verify tick (driven by the off-by-default `correction-analyzer` weekly job).
|
|
32
|
+
- All routes 503 when `monitoring.correctionLearning.enabled` is false (the default).
|
|
33
|
+
|
|
34
|
+
## Evidence
|
|
35
|
+
|
|
36
|
+
- **Build**: `npm run build` green (tsc + manifest regen + lockfile sign).
|
|
37
|
+
- **Lint**: `npm run lint` green.
|
|
38
|
+
- **Unit** (5 files, classifier/ledger/analyzer/router/capture): both-sides classification + lone-weak-never + `summarizeByLayer()` unchanged + drift canary; ledger dedupe/prune/distinct-days/hash-stability/toApiView; analyzer 3-pronged below-vs-at + provenance filter + llm-confidence-alone-never; routing split + policy-keyword→Attention + by-construction authority + silence≠effective; capture both-sided scrub + prompt-injection-not-followed + over-apology + all-three-LlmQueue-throws.
|
|
39
|
+
- **Wiring-integrity** (`tests/unit/correction-learning-wiring-integrity.test.ts`): ledger constructed iff enabled (200/503 + db-created on the production AgentServer boot path); LoopDeps surface is exactly the five bounded deps; `captureAndDistill` resolves and never throws into the delivery seam; loopback `/feedback` refuses (returns false) without crashing or double-routing.
|
|
40
|
+
- **Integration** (`tests/integration/corrections-routes.test.ts`): 401 without bearer; 503 when disabled; `X-Instar-Request` required on POST; `toApiView` strips raw learning + sessionId; pagination; `/health` never serializes the capture ring.
|
|
41
|
+
- **E2E** (`tests/e2e/correction-learning-lifecycle.test.ts`): feature-alive 200/503 on the production boot path; the §8 acceptance fixtures — a recurring explicit preference written to `.instar/preferences.json` with `provenance: correction-loop`, and the force-push nag routed as an infra-gap; raw learning never served.
|
|
42
|
+
- **Parity guards** green: `feature-delivery-completeness`, `capabilities-discoverability`, `builtin-manifest`, `ConfigDefaults`.
|