opencode-swarm 7.67.0 → 7.68.0

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.
@@ -27,6 +27,7 @@ export { handleFullAutoCommand } from './full-auto';
27
27
  export { handleHandoffCommand } from './handoff';
28
28
  export { handleHistoryCommand } from './history';
29
29
  export { handleKnowledgeListCommand, handleKnowledgeMigrateCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, } from './knowledge';
30
+ export { handleLearningCommand } from './learning';
30
31
  export { handleMemoryCommand, handleMemoryExportCommand, handleMemoryImportCommand, handleMemoryMigrateCommand, handleMemoryStatusCommand, } from './memory';
31
32
  export { handlePlanCommand } from './plan';
32
33
  export { handlePreflightCommand } from './preflight';
@@ -0,0 +1 @@
1
+ export declare function handleLearningCommand(directory: string, args: string[]): Promise<string>;
@@ -146,6 +146,13 @@ export declare const COMMAND_REGISTRY: {
146
146
  readonly args: "--cumulative, --ci-gate";
147
147
  readonly category: "diagnostics";
148
148
  };
149
+ readonly learning: {
150
+ readonly handler: (ctx: CommandContext) => Promise<string>;
151
+ readonly description: "Show learning metrics and violation trends";
152
+ readonly args: "--json, --phase <N>";
153
+ readonly details: "Computes aggregate learning metrics from knowledge events: violation-rate trends, directive application rates, escalation frequency, per-entry ROI, and never-applied entries. Surfaces a learning summary for the curator digest.";
154
+ readonly category: "diagnostics";
155
+ };
149
156
  readonly export: {
150
157
  readonly handler: (ctx: CommandContext) => Promise<string>;
151
158
  readonly description: "Export plan and context as JSON";
@@ -16,9 +16,14 @@ export declare const EvidenceTypeSchema: z.ZodEnum<{
16
16
  syntax: "syntax";
17
17
  sast: "sast";
18
18
  sbom: "sbom";
19
+ "mutation-gate": "mutation-gate";
20
+ "drift-verification": "drift-verification";
21
+ "hallucination-verification": "hallucination-verification";
19
22
  }>;
20
23
  export type EvidenceType = z.infer<typeof EvidenceTypeSchema>;
21
24
  export declare const EvidenceVerdictSchema: z.ZodEnum<{
25
+ warn: "warn";
26
+ skip: "skip";
22
27
  rejected: "rejected";
23
28
  pass: "pass";
24
29
  fail: "fail";
@@ -42,10 +47,15 @@ export declare const BaseEvidenceSchema: z.ZodObject<{
42
47
  syntax: "syntax";
43
48
  sast: "sast";
44
49
  sbom: "sbom";
50
+ "mutation-gate": "mutation-gate";
51
+ "drift-verification": "drift-verification";
52
+ "hallucination-verification": "hallucination-verification";
45
53
  }>;
46
54
  timestamp: z.ZodString;
47
55
  agent: z.ZodString;
48
56
  verdict: z.ZodEnum<{
57
+ warn: "warn";
58
+ skip: "skip";
49
59
  rejected: "rejected";
50
60
  pass: "pass";
51
61
  fail: "fail";
@@ -61,6 +71,8 @@ export declare const ReviewEvidenceSchema: z.ZodObject<{
61
71
  timestamp: z.ZodString;
62
72
  agent: z.ZodString;
63
73
  verdict: z.ZodEnum<{
74
+ warn: "warn";
75
+ skip: "skip";
64
76
  rejected: "rejected";
65
77
  pass: "pass";
66
78
  fail: "fail";
@@ -93,6 +105,8 @@ export declare const TestEvidenceSchema: z.ZodObject<{
93
105
  timestamp: z.ZodString;
94
106
  agent: z.ZodString;
95
107
  verdict: z.ZodEnum<{
108
+ warn: "warn";
109
+ skip: "skip";
96
110
  rejected: "rejected";
97
111
  pass: "pass";
98
112
  fail: "fail";
@@ -116,6 +130,8 @@ export declare const DiffEvidenceSchema: z.ZodObject<{
116
130
  timestamp: z.ZodString;
117
131
  agent: z.ZodString;
118
132
  verdict: z.ZodEnum<{
133
+ warn: "warn";
134
+ skip: "skip";
119
135
  rejected: "rejected";
120
136
  pass: "pass";
121
137
  fail: "fail";
@@ -136,6 +152,8 @@ export declare const ApprovalEvidenceSchema: z.ZodObject<{
136
152
  timestamp: z.ZodString;
137
153
  agent: z.ZodString;
138
154
  verdict: z.ZodEnum<{
155
+ warn: "warn";
156
+ skip: "skip";
139
157
  rejected: "rejected";
140
158
  pass: "pass";
141
159
  fail: "fail";
@@ -152,6 +170,8 @@ export declare const NoteEvidenceSchema: z.ZodObject<{
152
170
  timestamp: z.ZodString;
153
171
  agent: z.ZodString;
154
172
  verdict: z.ZodEnum<{
173
+ warn: "warn";
174
+ skip: "skip";
155
175
  rejected: "rejected";
156
176
  pass: "pass";
157
177
  fail: "fail";
@@ -168,6 +188,8 @@ export declare const RetrospectiveEvidenceSchema: z.ZodObject<{
168
188
  timestamp: z.ZodString;
169
189
  agent: z.ZodString;
170
190
  verdict: z.ZodEnum<{
191
+ warn: "warn";
192
+ skip: "skip";
171
193
  rejected: "rejected";
172
194
  pass: "pass";
173
195
  fail: "fail";
@@ -233,6 +255,8 @@ export declare const SyntaxEvidenceSchema: z.ZodObject<{
233
255
  timestamp: z.ZodString;
234
256
  agent: z.ZodString;
235
257
  verdict: z.ZodEnum<{
258
+ warn: "warn";
259
+ skip: "skip";
236
260
  rejected: "rejected";
237
261
  pass: "pass";
238
262
  fail: "fail";
@@ -263,6 +287,8 @@ export declare const PlaceholderEvidenceSchema: z.ZodObject<{
263
287
  timestamp: z.ZodString;
264
288
  agent: z.ZodString;
265
289
  verdict: z.ZodEnum<{
290
+ warn: "warn";
291
+ skip: "skip";
266
292
  rejected: "rejected";
267
293
  pass: "pass";
268
294
  fail: "fail";
@@ -310,6 +336,8 @@ export declare const SastEvidenceSchema: z.ZodObject<{
310
336
  timestamp: z.ZodString;
311
337
  agent: z.ZodString;
312
338
  verdict: z.ZodEnum<{
339
+ warn: "warn";
340
+ skip: "skip";
313
341
  rejected: "rejected";
314
342
  pass: "pass";
315
343
  fail: "fail";
@@ -387,6 +415,8 @@ export declare const SbomEvidenceSchema: z.ZodObject<{
387
415
  timestamp: z.ZodString;
388
416
  agent: z.ZodString;
389
417
  verdict: z.ZodEnum<{
418
+ warn: "warn";
419
+ skip: "skip";
390
420
  rejected: "rejected";
391
421
  pass: "pass";
392
422
  fail: "fail";
@@ -421,6 +451,8 @@ export declare const BuildEvidenceSchema: z.ZodObject<{
421
451
  timestamp: z.ZodString;
422
452
  agent: z.ZodString;
423
453
  verdict: z.ZodEnum<{
454
+ warn: "warn";
455
+ skip: "skip";
424
456
  rejected: "rejected";
425
457
  pass: "pass";
426
458
  fail: "fail";
@@ -454,6 +486,8 @@ export declare const QualityBudgetEvidenceSchema: z.ZodObject<{
454
486
  timestamp: z.ZodString;
455
487
  agent: z.ZodString;
456
488
  verdict: z.ZodEnum<{
489
+ warn: "warn";
490
+ skip: "skip";
457
491
  rejected: "rejected";
458
492
  pass: "pass";
459
493
  fail: "fail";
@@ -497,6 +531,8 @@ export declare const SecretscanEvidenceSchema: z.ZodObject<{
497
531
  timestamp: z.ZodString;
498
532
  agent: z.ZodString;
499
533
  verdict: z.ZodEnum<{
534
+ warn: "warn";
535
+ skip: "skip";
500
536
  rejected: "rejected";
501
537
  pass: "pass";
502
538
  fail: "fail";
@@ -512,11 +548,59 @@ export declare const SecretscanEvidenceSchema: z.ZodObject<{
512
548
  skipped_files: z.ZodDefault<z.ZodNumber>;
513
549
  }, z.core.$strip>;
514
550
  export type SecretscanEvidence = z.infer<typeof SecretscanEvidenceSchema>;
551
+ export declare const MutationGateEvidenceSchema: z.ZodObject<{
552
+ task_id: z.ZodOptional<z.ZodString>;
553
+ agent: z.ZodOptional<z.ZodString>;
554
+ timestamp: z.ZodString;
555
+ summary: z.ZodString;
556
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
557
+ type: z.ZodLiteral<"mutation-gate">;
558
+ verdict: z.ZodEnum<{
559
+ warn: "warn";
560
+ skip: "skip";
561
+ pass: "pass";
562
+ fail: "fail";
563
+ }>;
564
+ killRate: z.ZodOptional<z.ZodNumber>;
565
+ adjustedKillRate: z.ZodOptional<z.ZodNumber>;
566
+ survivedMutants: z.ZodOptional<z.ZodString>;
567
+ }, z.core.$strip>;
568
+ export type MutationGateEvidence = z.infer<typeof MutationGateEvidenceSchema>;
569
+ export declare const DriftVerificationEvidenceSchema: z.ZodObject<{
570
+ task_id: z.ZodOptional<z.ZodString>;
571
+ agent: z.ZodOptional<z.ZodString>;
572
+ timestamp: z.ZodString;
573
+ summary: z.ZodString;
574
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
575
+ type: z.ZodLiteral<"drift-verification">;
576
+ verdict: z.ZodEnum<{
577
+ rejected: "rejected";
578
+ approved: "approved";
579
+ }>;
580
+ requirementCoverage: z.ZodOptional<z.ZodString>;
581
+ }, z.core.$strip>;
582
+ export type DriftVerificationEvidence = z.infer<typeof DriftVerificationEvidenceSchema>;
583
+ export declare const HallucinationVerificationEvidenceSchema: z.ZodObject<{
584
+ task_id: z.ZodOptional<z.ZodString>;
585
+ agent: z.ZodOptional<z.ZodString>;
586
+ timestamp: z.ZodString;
587
+ summary: z.ZodString;
588
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
589
+ type: z.ZodLiteral<"hallucination-verification">;
590
+ verdict: z.ZodEnum<{
591
+ rejected: "rejected";
592
+ approved: "approved";
593
+ }>;
594
+ findings: z.ZodOptional<z.ZodString>;
595
+ }, z.core.$strip>;
596
+ export type HallucinationVerificationEvidence = z.infer<typeof HallucinationVerificationEvidenceSchema>;
515
597
  export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
516
598
  task_id: z.ZodString;
517
599
  timestamp: z.ZodString;
518
600
  agent: z.ZodString;
519
601
  verdict: z.ZodEnum<{
602
+ warn: "warn";
603
+ skip: "skip";
520
604
  rejected: "rejected";
521
605
  pass: "pass";
522
606
  fail: "fail";
@@ -547,6 +631,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
547
631
  timestamp: z.ZodString;
548
632
  agent: z.ZodString;
549
633
  verdict: z.ZodEnum<{
634
+ warn: "warn";
635
+ skip: "skip";
550
636
  rejected: "rejected";
551
637
  pass: "pass";
552
638
  fail: "fail";
@@ -568,6 +654,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
568
654
  timestamp: z.ZodString;
569
655
  agent: z.ZodString;
570
656
  verdict: z.ZodEnum<{
657
+ warn: "warn";
658
+ skip: "skip";
571
659
  rejected: "rejected";
572
660
  pass: "pass";
573
661
  fail: "fail";
@@ -586,6 +674,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
586
674
  timestamp: z.ZodString;
587
675
  agent: z.ZodString;
588
676
  verdict: z.ZodEnum<{
677
+ warn: "warn";
678
+ skip: "skip";
589
679
  rejected: "rejected";
590
680
  pass: "pass";
591
681
  fail: "fail";
@@ -600,6 +690,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
600
690
  timestamp: z.ZodString;
601
691
  agent: z.ZodString;
602
692
  verdict: z.ZodEnum<{
693
+ warn: "warn";
694
+ skip: "skip";
603
695
  rejected: "rejected";
604
696
  pass: "pass";
605
697
  fail: "fail";
@@ -614,6 +706,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
614
706
  timestamp: z.ZodString;
615
707
  agent: z.ZodString;
616
708
  verdict: z.ZodEnum<{
709
+ warn: "warn";
710
+ skip: "skip";
617
711
  rejected: "rejected";
618
712
  pass: "pass";
619
713
  fail: "fail";
@@ -677,6 +771,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
677
771
  timestamp: z.ZodString;
678
772
  agent: z.ZodString;
679
773
  verdict: z.ZodEnum<{
774
+ warn: "warn";
775
+ skip: "skip";
680
776
  rejected: "rejected";
681
777
  pass: "pass";
682
778
  fail: "fail";
@@ -705,6 +801,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
705
801
  timestamp: z.ZodString;
706
802
  agent: z.ZodString;
707
803
  verdict: z.ZodEnum<{
804
+ warn: "warn";
805
+ skip: "skip";
708
806
  rejected: "rejected";
709
807
  pass: "pass";
710
808
  fail: "fail";
@@ -734,6 +832,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
734
832
  timestamp: z.ZodString;
735
833
  agent: z.ZodString;
736
834
  verdict: z.ZodEnum<{
835
+ warn: "warn";
836
+ skip: "skip";
737
837
  rejected: "rejected";
738
838
  pass: "pass";
739
839
  fail: "fail";
@@ -809,6 +909,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
809
909
  timestamp: z.ZodString;
810
910
  agent: z.ZodString;
811
911
  verdict: z.ZodEnum<{
912
+ warn: "warn";
913
+ skip: "skip";
812
914
  rejected: "rejected";
813
915
  pass: "pass";
814
916
  fail: "fail";
@@ -841,6 +943,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
841
943
  timestamp: z.ZodString;
842
944
  agent: z.ZodString;
843
945
  verdict: z.ZodEnum<{
946
+ warn: "warn";
947
+ skip: "skip";
844
948
  rejected: "rejected";
845
949
  pass: "pass";
846
950
  fail: "fail";
@@ -872,6 +976,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
872
976
  timestamp: z.ZodString;
873
977
  agent: z.ZodString;
874
978
  verdict: z.ZodEnum<{
979
+ warn: "warn";
980
+ skip: "skip";
875
981
  rejected: "rejected";
876
982
  pass: "pass";
877
983
  fail: "fail";
@@ -913,6 +1019,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
913
1019
  timestamp: z.ZodString;
914
1020
  agent: z.ZodString;
915
1021
  verdict: z.ZodEnum<{
1022
+ warn: "warn";
1023
+ skip: "skip";
916
1024
  rejected: "rejected";
917
1025
  pass: "pass";
918
1026
  fail: "fail";
@@ -926,6 +1034,46 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
926
1034
  scan_directory: z.ZodOptional<z.ZodString>;
927
1035
  files_scanned: z.ZodDefault<z.ZodNumber>;
928
1036
  skipped_files: z.ZodDefault<z.ZodNumber>;
1037
+ }, z.core.$strip>, z.ZodObject<{
1038
+ task_id: z.ZodOptional<z.ZodString>;
1039
+ agent: z.ZodOptional<z.ZodString>;
1040
+ timestamp: z.ZodString;
1041
+ summary: z.ZodString;
1042
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1043
+ type: z.ZodLiteral<"mutation-gate">;
1044
+ verdict: z.ZodEnum<{
1045
+ warn: "warn";
1046
+ skip: "skip";
1047
+ pass: "pass";
1048
+ fail: "fail";
1049
+ }>;
1050
+ killRate: z.ZodOptional<z.ZodNumber>;
1051
+ adjustedKillRate: z.ZodOptional<z.ZodNumber>;
1052
+ survivedMutants: z.ZodOptional<z.ZodString>;
1053
+ }, z.core.$strip>, z.ZodObject<{
1054
+ task_id: z.ZodOptional<z.ZodString>;
1055
+ agent: z.ZodOptional<z.ZodString>;
1056
+ timestamp: z.ZodString;
1057
+ summary: z.ZodString;
1058
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1059
+ type: z.ZodLiteral<"drift-verification">;
1060
+ verdict: z.ZodEnum<{
1061
+ rejected: "rejected";
1062
+ approved: "approved";
1063
+ }>;
1064
+ requirementCoverage: z.ZodOptional<z.ZodString>;
1065
+ }, z.core.$strip>, z.ZodObject<{
1066
+ task_id: z.ZodOptional<z.ZodString>;
1067
+ agent: z.ZodOptional<z.ZodString>;
1068
+ timestamp: z.ZodString;
1069
+ summary: z.ZodString;
1070
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1071
+ type: z.ZodLiteral<"hallucination-verification">;
1072
+ verdict: z.ZodEnum<{
1073
+ rejected: "rejected";
1074
+ approved: "approved";
1075
+ }>;
1076
+ findings: z.ZodOptional<z.ZodString>;
929
1077
  }, z.core.$strip>], "type">;
930
1078
  export type Evidence = z.infer<typeof EvidenceSchema>;
931
1079
  export declare const EvidenceBundleSchema: z.ZodObject<{
@@ -936,6 +1084,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
936
1084
  timestamp: z.ZodString;
937
1085
  agent: z.ZodString;
938
1086
  verdict: z.ZodEnum<{
1087
+ warn: "warn";
1088
+ skip: "skip";
939
1089
  rejected: "rejected";
940
1090
  pass: "pass";
941
1091
  fail: "fail";
@@ -966,6 +1116,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
966
1116
  timestamp: z.ZodString;
967
1117
  agent: z.ZodString;
968
1118
  verdict: z.ZodEnum<{
1119
+ warn: "warn";
1120
+ skip: "skip";
969
1121
  rejected: "rejected";
970
1122
  pass: "pass";
971
1123
  fail: "fail";
@@ -987,6 +1139,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
987
1139
  timestamp: z.ZodString;
988
1140
  agent: z.ZodString;
989
1141
  verdict: z.ZodEnum<{
1142
+ warn: "warn";
1143
+ skip: "skip";
990
1144
  rejected: "rejected";
991
1145
  pass: "pass";
992
1146
  fail: "fail";
@@ -1005,6 +1159,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1005
1159
  timestamp: z.ZodString;
1006
1160
  agent: z.ZodString;
1007
1161
  verdict: z.ZodEnum<{
1162
+ warn: "warn";
1163
+ skip: "skip";
1008
1164
  rejected: "rejected";
1009
1165
  pass: "pass";
1010
1166
  fail: "fail";
@@ -1019,6 +1175,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1019
1175
  timestamp: z.ZodString;
1020
1176
  agent: z.ZodString;
1021
1177
  verdict: z.ZodEnum<{
1178
+ warn: "warn";
1179
+ skip: "skip";
1022
1180
  rejected: "rejected";
1023
1181
  pass: "pass";
1024
1182
  fail: "fail";
@@ -1033,6 +1191,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1033
1191
  timestamp: z.ZodString;
1034
1192
  agent: z.ZodString;
1035
1193
  verdict: z.ZodEnum<{
1194
+ warn: "warn";
1195
+ skip: "skip";
1036
1196
  rejected: "rejected";
1037
1197
  pass: "pass";
1038
1198
  fail: "fail";
@@ -1096,6 +1256,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1096
1256
  timestamp: z.ZodString;
1097
1257
  agent: z.ZodString;
1098
1258
  verdict: z.ZodEnum<{
1259
+ warn: "warn";
1260
+ skip: "skip";
1099
1261
  rejected: "rejected";
1100
1262
  pass: "pass";
1101
1263
  fail: "fail";
@@ -1124,6 +1286,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1124
1286
  timestamp: z.ZodString;
1125
1287
  agent: z.ZodString;
1126
1288
  verdict: z.ZodEnum<{
1289
+ warn: "warn";
1290
+ skip: "skip";
1127
1291
  rejected: "rejected";
1128
1292
  pass: "pass";
1129
1293
  fail: "fail";
@@ -1153,6 +1317,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1153
1317
  timestamp: z.ZodString;
1154
1318
  agent: z.ZodString;
1155
1319
  verdict: z.ZodEnum<{
1320
+ warn: "warn";
1321
+ skip: "skip";
1156
1322
  rejected: "rejected";
1157
1323
  pass: "pass";
1158
1324
  fail: "fail";
@@ -1228,6 +1394,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1228
1394
  timestamp: z.ZodString;
1229
1395
  agent: z.ZodString;
1230
1396
  verdict: z.ZodEnum<{
1397
+ warn: "warn";
1398
+ skip: "skip";
1231
1399
  rejected: "rejected";
1232
1400
  pass: "pass";
1233
1401
  fail: "fail";
@@ -1260,6 +1428,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1260
1428
  timestamp: z.ZodString;
1261
1429
  agent: z.ZodString;
1262
1430
  verdict: z.ZodEnum<{
1431
+ warn: "warn";
1432
+ skip: "skip";
1263
1433
  rejected: "rejected";
1264
1434
  pass: "pass";
1265
1435
  fail: "fail";
@@ -1291,6 +1461,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1291
1461
  timestamp: z.ZodString;
1292
1462
  agent: z.ZodString;
1293
1463
  verdict: z.ZodEnum<{
1464
+ warn: "warn";
1465
+ skip: "skip";
1294
1466
  rejected: "rejected";
1295
1467
  pass: "pass";
1296
1468
  fail: "fail";
@@ -1332,6 +1504,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1332
1504
  timestamp: z.ZodString;
1333
1505
  agent: z.ZodString;
1334
1506
  verdict: z.ZodEnum<{
1507
+ warn: "warn";
1508
+ skip: "skip";
1335
1509
  rejected: "rejected";
1336
1510
  pass: "pass";
1337
1511
  fail: "fail";
@@ -1345,6 +1519,46 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1345
1519
  scan_directory: z.ZodOptional<z.ZodString>;
1346
1520
  files_scanned: z.ZodDefault<z.ZodNumber>;
1347
1521
  skipped_files: z.ZodDefault<z.ZodNumber>;
1522
+ }, z.core.$strip>, z.ZodObject<{
1523
+ task_id: z.ZodOptional<z.ZodString>;
1524
+ agent: z.ZodOptional<z.ZodString>;
1525
+ timestamp: z.ZodString;
1526
+ summary: z.ZodString;
1527
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1528
+ type: z.ZodLiteral<"mutation-gate">;
1529
+ verdict: z.ZodEnum<{
1530
+ warn: "warn";
1531
+ skip: "skip";
1532
+ pass: "pass";
1533
+ fail: "fail";
1534
+ }>;
1535
+ killRate: z.ZodOptional<z.ZodNumber>;
1536
+ adjustedKillRate: z.ZodOptional<z.ZodNumber>;
1537
+ survivedMutants: z.ZodOptional<z.ZodString>;
1538
+ }, z.core.$strip>, z.ZodObject<{
1539
+ task_id: z.ZodOptional<z.ZodString>;
1540
+ agent: z.ZodOptional<z.ZodString>;
1541
+ timestamp: z.ZodString;
1542
+ summary: z.ZodString;
1543
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1544
+ type: z.ZodLiteral<"drift-verification">;
1545
+ verdict: z.ZodEnum<{
1546
+ rejected: "rejected";
1547
+ approved: "approved";
1548
+ }>;
1549
+ requirementCoverage: z.ZodOptional<z.ZodString>;
1550
+ }, z.core.$strip>, z.ZodObject<{
1551
+ task_id: z.ZodOptional<z.ZodString>;
1552
+ agent: z.ZodOptional<z.ZodString>;
1553
+ timestamp: z.ZodString;
1554
+ summary: z.ZodString;
1555
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1556
+ type: z.ZodLiteral<"hallucination-verification">;
1557
+ verdict: z.ZodEnum<{
1558
+ rejected: "rejected";
1559
+ approved: "approved";
1560
+ }>;
1561
+ findings: z.ZodOptional<z.ZodString>;
1348
1562
  }, z.core.$strip>], "type">>>;
1349
1563
  created_at: z.ZodString;
1350
1564
  updated_at: z.ZodString;
@@ -25,6 +25,7 @@
25
25
  * curators but omit hook-dispatched ones. This is by design for hook-internal operations.
26
26
  */
27
27
  import { listSkills, parseDraftFrontmatter, retireSkill } from '../services/skill-generator.js';
28
+ import { getSkillVersion, reviseSkill } from '../services/skill-reviser.js';
28
29
  import type { ComplianceObservation, CuratorConfig, CuratorInitResult, CuratorPhaseResult, CuratorSummary, KnowledgeRecommendation } from './curator-types.js';
29
30
  import { readKnowledge } from './knowledge-store.js';
30
31
  import type { KnowledgeConfig } from './knowledge-types.js';
@@ -49,6 +50,8 @@ export declare const _internals: {
49
50
  retireSkill: typeof retireSkill;
50
51
  readFileAsync: (filePath: string, encoding: string) => Promise<string>;
51
52
  readKnowledge: typeof readKnowledge;
53
+ reviseSkill: typeof reviseSkill;
54
+ getSkillVersion: typeof getSkillVersion;
52
55
  };
53
56
  /**
54
57
  * Auto-retire generated skills whose violation rate exceeds 30% or
@@ -57,7 +60,7 @@ export declare const _internals: {
57
60
  * Non-blocking: errors are caught and logged but never propagated.
58
61
  * Returns an array of observation strings to include in the phase digest.
59
62
  */
60
- declare function autoRetireSkills(directory: string, curatorKnowledgePath: string): Promise<string[]>;
63
+ declare function autoRetireSkills(directory: string, curatorKnowledgePath: string, excludeSlugs?: ReadonlySet<string>): Promise<string[]>;
61
64
  /**
62
65
  * Parse OBSERVATIONS section from curator LLM output.
63
66
  * Expected format per line: "- entry <uuid> (<observable>): [text]"
@@ -23,6 +23,8 @@ export interface SkillUsageEntry {
23
23
  reviewerNotes?: string;
24
24
  /** Session identifier. */
25
25
  sessionID: string;
26
+ /** Skill version at the time of this usage event (omitted for pre-versioning entries). */
27
+ skillVersion?: number;
26
28
  }
27
29
  /** Filter options for reading skill-usage entries. */
28
30
  export interface SkillUsageFilterOptions {
@@ -70,6 +72,7 @@ export declare const _internals: {
70
72
  resolveSourceKnowledgeIds: typeof resolveSourceKnowledgeIds;
71
73
  applySkillUsageFeedback: typeof applySkillUsageFeedback;
72
74
  parseGeneratedFromKnowledge: typeof parseGeneratedFromKnowledge;
75
+ computeComplianceByVersion: typeof computeComplianceByVersion;
73
76
  };
74
77
  /**
75
78
  * Validate and append a single skill-usage entry to the JSONL log.
@@ -102,6 +105,13 @@ export declare const MAX_TAIL_BYTES: number;
102
105
  export declare function readSkillUsageEntriesTail(directory: string, filters: {
103
106
  sessionID?: string;
104
107
  }, maxBytes?: number): SkillUsageEntry[];
108
+ export interface VersionComplianceStats {
109
+ compliant: number;
110
+ violation: number;
111
+ total: number;
112
+ rate: number;
113
+ }
114
+ export declare function computeComplianceByVersion(entries: SkillUsageEntry[], skillPath: string): Map<number | undefined, VersionComplianceStats>;
105
115
  /**
106
116
  * Prune the skill-usage log, keeping at most `maxEntriesPerSkill` entries
107
117
  * per unique skillPath. Oldest entries beyond the limit are removed.