-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdcp.schema.json
More file actions
840 lines (840 loc) · 44.7 KB
/
Copy pathdcp.schema.json
File metadata and controls
840 lines (840 loc) · 44.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/ranxianglei/opencode-acp/master/dcp.schema.json",
"title": "ACP Plugin Configuration",
"description": "Configuration schema for the OpenCode Agent Context Pruning plugin",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference for IDE autocomplete"
},
"enabled": {
"type": "boolean",
"default": true,
"description": "Enable or disable the DCP plugin"
},
"autoUpdate": {
"type": "boolean",
"default": true,
"description": "Automatically update npm-installed DCP when a newer npm latest version is available. Version-locked plugin specs are not updated."
},
"debug": {
"type": "boolean",
"default": false,
"description": "Enable full debug logging (overrides logLevel)"
},
"logLevel": {
"type": "string",
"enum": ["debug", "info", "warn", "error", "silent"],
"default": "info",
"description": "Log verbosity: decision-level events (info) are written by default. debug adds per-message detail; warn/error/silent reduce output."
},
"storagePath": {
"type": "string",
"description": "Directory where per-session state files are persisted. Absolute paths are used as-is; ~/... expands against the home directory; relative paths resolve against the project directory. Unset: $XDG_DATA_HOME/opencode/storage/plugin/acp (default)."
},
"pruneNotification": {
"type": "string",
"enum": [
"off",
"minimal",
"detailed"
],
"default": "off",
"description": "Level of notification shown when context management occurs"
},
"pruneNotificationType": {
"type": "string",
"enum": [
"chat",
"toast"
],
"default": "toast",
"description": "Where to display notifications (chat deprecated, falls back to toast)"
},
"commands": {
"type": "object",
"description": "Configuration for DCP slash commands (/dcp)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Enable DCP slash commands (/dcp)"
},
"protectedTools": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional tool names or wildcard patterns to protect from pruning via commands. Supports glob wildcards: * matches any characters, ? matches a single character (e.g., \"mcp_*\", \"my_tool_?\")"
}
},
"default": {
"enabled": true,
"protectedTools": []
}
},
"allowSubAgents": {
"type": "boolean",
"default": true,
"description": "Allow ACP processing in subagent sessions. When true, subagent sessions get full compression/nudge capabilities. (Moved from experimental in v1.14.13; old experimental.allowSubAgents still read for backward compat.)"
},
"experimental": {
"type": "object",
"description": "Experimental settings that may change in future releases",
"additionalProperties": false,
"properties": {
"allowSubAgents": {
"type": "boolean",
"default": false,
"description": "[DEPRECATED — use top-level allowSubAgents] Allow ACP processing in subagent sessions. Kept for backward compat; top-level takes priority."
},
"customPrompts": {
"type": "boolean",
"default": false,
"description": "Enable user-editable prompt overrides under dcp-prompts directories"
}
},
"default": {
"customPrompts": false
}
},
"protectedFilePatterns": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Glob patterns for files that should be protected from pruning (e.g., '**/*.config.ts')"
},
"compress": {
"type": "object",
"description": "Configuration for the unified compress tool",
"additionalProperties": false,
"properties": {
"permission": {
"type": "string",
"enum": [
"ask",
"allow",
"deny"
],
"default": "allow",
"description": "Permission mode (deny disables the tool)"
},
"showCompression": {
"type": "boolean",
"default": false,
"description": "Show compression summaries in notifications"
},
"summaryBuffer": {
"type": "boolean",
"default": true,
"description": "When enabled, active summary tokens extend the effective maxContextLimit used for context-limit nudges."
},
"maxContextLimit": {
"description": "Soft upper threshold. Above this, DCP keeps sending strong compression nudges (based on nudgeFrequency), so the model is pushed to compress. Accepts number or \"X%\" of the model context window.",
"default": 100000,
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
},
"minContextLimit": {
"description": "[DEPRECATED — scheduled for removal; growth nudges (minNudgeContextPercent) are the maintained floor] Soft lower threshold for reminder nudges. Below this, turn/iteration reminders are off (compression is less likely). At or above this, reminders are on. Still honored until removed. Accepts number or \"X%\" of the model context window.",
"default": 50000,
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
},
"modelMaxLimits": {
"description": "Per-model override for maxContextLimit by exact provider/model key. If set, this takes priority over the global maxContextLimit.",
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
}
},
"modelMinLimits": {
"description": "[DEPRECATED — overrides the deprecated minContextLimit; will be removed alongside it] Per-model override for minContextLimit by exact provider/model key. If set, this takes priority over the global minContextLimit.",
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
}
},
"nudgeFrequency": {
"type": "number",
"default": 5,
"minimum": 1,
"description": "How often the context-limit nudge fires when above maxContextLimit (1 = every fetch, 5 = every 5th fetch)"
},
"iterationNudgeThreshold": {
"type": "number",
"default": 15,
"minimum": 1,
"description": "How many messages to wait after a user message before adding compression reminders."
},
"nudgeForce": {
"type": "string",
"enum": [
"strong",
"soft"
],
"default": "soft",
"description": "Controls how likely compression is after user messages. 'strong' is more likely, 'soft' is less likely."
},
"protectedTools": {
"type": "array",
"items": {
"type": "string"
},
"default": ["skill", "compress"],
"description": "Tool names or wildcard patterns to hard-exclude from compression ranges. The root default is [\"skill\", \"compress\"]; an explicit array replaces the inherited policy. Use [] to allow all tool outputs to compress. Supports glob wildcards: * matches any characters, ? matches a single character (e.g., \"mcp_*\", \"my_tool_?\")"
},
"protectTags": {
"type": "boolean",
"default": false,
"description": "Preserve text wrapped in <protect>...</protect> when compressed"
},
"protectUserMessages": {
"type": "boolean",
"default": false,
"description": "When enabled, your messages are never lost during compression"
},
"minNudgeContextPercent": {
"type": "number",
"default": 5,
"minimum": 0,
"description": "Minimum context usage percent for growth-triggered nudges; growth nudges below this floor are suppressed (0 disables the floor)"
},
"providers": {
"type": "object",
"description": "Nested per-provider / per-model overrides for every tunable compress field (issue #344). Field-wise cascade: providers[p].models[m] > providers[p] > the global compress value. Unset fields never clear shallower values; 0 is an explicit value (e.g. disable a floor). Unknown provider/model ids fall back to the global value. Not overridable here: permission (session-level), minContextLimit/modelMinLimits (deprecated), modelMaxLimits (flat map), and this providers map itself. maxContextLimit set here takes precedence over modelMaxLimits.",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxContextLimit": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
],
"description": "Override for the soft upper threshold. Precedence when set here: nested override > modelMaxLimits flat map > global value."
},
"emergencyThresholdPercent": {
"type": [
"number",
"string"
],
"description": "Override for the emergency threshold (absolute tokens or percentage string)."
},
"minNudgeContextPercent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Growth-nudge floor percent, resolved against the active model's context window (0 disables the floor)."
},
"nudgeFrequency": {
"type": "number",
"minimum": 1,
"description": "Override for the context-limit nudge frequency."
},
"iterationNudgeThreshold": {
"type": "number",
"minimum": 1,
"description": "Override for the iteration nudge threshold."
},
"toolOutputNudgeThreshold": {
"type": "number",
"minimum": 0,
"description": "Override for the tool-output nudge threshold (absolute tokens)."
},
"nudgeGrowthTokens": {
"type": "number",
"minimum": 0,
"description": "Override for the per-message nudge growth threshold (absolute tokens)."
},
"minNudgeGrowthRatio": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Override for the growth ratio (× nudgeGrowthTokens)."
},
"minNudgeGrowthFloor": {
"type": "number",
"minimum": 0,
"description": "Override for the absolute growth floor (tokens)."
},
"nudgeForce": {
"type": "string",
"enum": [
"strong",
"soft"
],
"description": "Override for the nudge force mode."
},
"protectedTools": {
"type": "array",
"items": {
"type": "string"
},
"description": "Override for protected tool patterns (replaces the inherited list)."
},
"showCompression": {
"type": "boolean",
"description": "Override for showing compression summaries in notifications."
},
"summaryBuffer": {
"type": "boolean",
"description": "Override for counting active summary tokens toward the effective maxContextLimit."
},
"protectTags": {
"type": "boolean",
"description": "Override for <protect> tag preservation."
},
"protectUserMessages": {
"type": "boolean",
"description": "Override for user-message protection."
},
"maxSummaryLengthHard": {
"type": "number",
"minimum": 1,
"description": "Override for the hard summary length limit (chars)."
},
"minCompressRange": {
"type": "number",
"minimum": 0,
"description": "Override for the minimum compressible range (chars)."
},
"maxVisibleSegments": {
"type": "number",
"minimum": 1,
"description": "Override for the max disjoint visible segments shown."
},
"keepEmbedMaxChars": {
"type": "number",
"minimum": 0,
"description": "Override for the max embedded-content chars kept in summaries."
},
"lastSegmentSoftBlock": {
"type": "boolean",
"description": "Override for the recent-message protection master switch."
},
"preserveRecentMessages": {
"type": "number",
"minimum": 0,
"description": "Override for the protected recent-message count."
},
"preserveRecentTokens": {
"type": "number",
"minimum": 0,
"description": "Override for the protected recent-token window."
},
"preserveLastUserMessage": {
"type": "boolean",
"description": "Override for protecting the most recent user message."
},
"reasoning": {
"type": "object",
"description": "Field-wise override of the nested compress.reasoning config (#368). Only set fields override; unset fields inherit the global value.",
"properties": {
"drop": {
"type": "boolean",
"description": "Override for the master switch."
},
"threshold": {
"type": "integer",
"minimum": 0,
"description": "Override for the single-thinking size gate (chars)."
}
}
},
"models": {
"type": "object",
"description": "Per-model overrides by model id (highest precedence)",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxContextLimit": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
],
"description": "Override for the soft upper threshold. Precedence when set here: nested override > modelMaxLimits flat map > global value."
},
"emergencyThresholdPercent": {
"type": [
"number",
"string"
],
"description": "Override for the emergency threshold (absolute tokens or percentage string)."
},
"minNudgeContextPercent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Growth-nudge floor percent, resolved against the active model's context window (0 disables the floor)."
},
"nudgeFrequency": {
"type": "number",
"minimum": 1,
"description": "Override for the context-limit nudge frequency."
},
"iterationNudgeThreshold": {
"type": "number",
"minimum": 1,
"description": "Override for the iteration nudge threshold."
},
"toolOutputNudgeThreshold": {
"type": "number",
"minimum": 0,
"description": "Override for the tool-output nudge threshold (absolute tokens)."
},
"nudgeGrowthTokens": {
"type": "number",
"minimum": 0,
"description": "Override for the per-message nudge growth threshold (absolute tokens)."
},
"minNudgeGrowthRatio": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Override for the growth ratio (× nudgeGrowthTokens)."
},
"minNudgeGrowthFloor": {
"type": "number",
"minimum": 0,
"description": "Override for the absolute growth floor (tokens)."
},
"nudgeForce": {
"type": "string",
"enum": [
"strong",
"soft"
],
"description": "Override for the nudge force mode."
},
"protectedTools": {
"type": "array",
"items": {
"type": "string"
},
"description": "Override for protected tool patterns (replaces the inherited list)."
},
"showCompression": {
"type": "boolean",
"description": "Override for showing compression summaries in notifications."
},
"summaryBuffer": {
"type": "boolean",
"description": "Override for counting active summary tokens toward the effective maxContextLimit."
},
"protectTags": {
"type": "boolean",
"description": "Override for <protect> tag preservation."
},
"protectUserMessages": {
"type": "boolean",
"description": "Override for user-message protection."
},
"maxSummaryLengthHard": {
"type": "number",
"minimum": 1,
"description": "Override for the hard summary length limit (chars)."
},
"minCompressRange": {
"type": "number",
"minimum": 0,
"description": "Override for the minimum compressible range (chars)."
},
"maxVisibleSegments": {
"type": "number",
"minimum": 1,
"description": "Override for the max disjoint visible segments shown."
},
"keepEmbedMaxChars": {
"type": "number",
"minimum": 0,
"description": "Override for the max embedded-content chars kept in summaries."
},
"lastSegmentSoftBlock": {
"type": "boolean",
"description": "Override for the recent-message protection master switch."
},
"preserveRecentMessages": {
"type": "number",
"minimum": 0,
"description": "Override for the protected recent-message count."
},
"preserveRecentTokens": {
"type": "number",
"minimum": 0,
"description": "Override for the protected recent-token window."
},
"preserveLastUserMessage": {
"type": "boolean",
"description": "Override for protecting the most recent user message."
},
"reasoning": {
"type": "object",
"description": "Field-wise override of the nested compress.reasoning config (#368); model-level wins over provider-level, field by field.",
"properties": {
"drop": {
"type": "boolean",
"description": "Override for the master switch."
},
"threshold": {
"type": "integer",
"minimum": 0,
"description": "Override for the single-thinking size gate (chars)."
}
}
}
}
}
}
}
}
},
"maxSummaryLengthHard": {
"type": "number",
"default": 20000,
"minimum": 1,
"description": "Hard limit for summary length in characters"
},
"maxVisibleSegments": {
"type": "number",
"default": 50,
"minimum": 1,
"description": "Maximum number of disjoint visible-id segments to show the model. When visible messages span more segments (due to compression holes), only the largest tool-bearing/high-token segments are shown, with a '+N omitted' note. Prevents the model from picking compressed-away refs."
},
"nudgeGrowthTokens": {
"type": "number",
"description": "Token growth required between per-message nudges (absolute, not percentage). Shows Tips only after context grows by this many tokens. If unset, fixed default 50000 (uniform for all models). Also drives T2/T3 tier triggers and the growthFloor anti-thrash gate (0.45 × this value)."
},
"toolOutputNudgeThreshold": {
"type": "number",
"description": "Tool-output token growth required before the tool-output accumulation reminder fires (absolute, not percentage). If unset, default follows nudgeGrowthTokens (fixed default 50000). Was hardcoded to 5000 — fired ~10x too often on large-context models (issue #18)."
},
"minCompressRange": {
"type": "number",
"default": 5000,
"minimum": 0,
"description": "Minimum compressible content (in characters) required for a compression to proceed. Below this threshold, the compress tool rejects the request to avoid overhead exceeding savings. Count excludes protected content."
},
"minNudgeGrowthRatio": {
"type": "number",
"default": 0.45,
"minimum": 0,
"maximum": 1,
"description": "Fraction of nudgeGrowthTokens that must accumulate before a compress nudge fires. Combined with minNudgeGrowthFloor: growthFloor = max(minNudgeGrowthFloor, minNudgeGrowthRatio × nudgeGrowthTokens). Only bypassed when context usage >= emergencyThresholdPercent."
},
"minNudgeGrowthFloor": {
"type": "number",
"default": 5000,
"minimum": 0,
"description": "Absolute floor for nudge growth threshold (in tokens). Prevents small-context models from having an excessively low growth floor. See minNudgeGrowthRatio."
},
"emergencyThresholdPercent": {
"type": ["number", "string"],
"default": "98%",
"description": "Context usage threshold at which the growth floor is bypassed and nudges fire unconditionally (emergency override). Accepts absolute token count or percentage string (e.g. \"98%\")."
},
"lastSegmentSoftBlock": {
"type": "boolean",
"default": true,
"description": "Master switch for recent-message protection. When false, all protection (preserveRecentMessages, preserveRecentTokens, preserveLastUserMessage) is disabled."
},
"preserveRecentMessages": {
"type": "number",
"default": 20,
"minimum": 0,
"description": "Minimum number of recent messages always protected from compression, regardless of nudge recommendation."
},
"preserveRecentTokens": {
"type": "number",
"default": 20000,
"minimum": 0,
"description": "Minimum token window of recent messages always protected from compression. The protection zone is the union of preserveRecentMessages count and preserveRecentTokens window."
},
"preserveLastUserMessage": {
"type": "boolean",
"default": true,
"description": "Always protect the most recent user message from compression."
},
"reasoning": {
"type": "object",
"description": "[#368] Config for dropping oversized reasoning from closed-turn compress tool calls. compress calls are hard-exempt from compression (Bug 39), so their thinking rides along every request as an unreclaimable floor. Only messages strictly BEFORE the last genuine user message are touched; only messages whose total reasoning length EXCEEDS threshold are dropped. Merged field-wise across config layers and the provider/model cascade.",
"properties": {
"drop": {
"type": "boolean",
"default": true,
"description": "Master switch for the drop pass."
},
"threshold": {
"type": "integer",
"default": 2048,
"minimum": 0,
"description": "Single-thinking size gate (chars): a closed-turn compress message's total reasoning length must exceed this to be dropped. Small thinkings are kept (not accumulated across messages). 0 drops any non-empty reasoning."
}
}
}
},
"default": {
"permission": "allow",
"showCompression": false,
"summaryBuffer": true,
"maxContextLimit": 100000,
"minContextLimit": 50000,
"nudgeFrequency": 5,
"iterationNudgeThreshold": 15,
"nudgeForce": "soft",
"protectedTools": ["skill", "compress"],
"protectTags": false,
"protectUserMessages": false,
"minNudgeContextPercent": 5,
"maxSummaryLengthHard": 20000,
"maxVisibleSegments": 50,
"minCompressRange": 5000,
"minNudgeGrowthRatio": 0.45,
"minNudgeGrowthFloor": 5000,
"emergencyThresholdPercent": "98%",
"lastSegmentSoftBlock": true,
"preserveRecentMessages": 20,
"preserveRecentTokens": 20000,
"preserveLastUserMessage": true,
"reasoning": {
"drop": true,
"threshold": 2048
}
}
},
"gc": {
"type": "object",
"description": "Garbage collection and batch cleanup configuration",
"additionalProperties": false,
"properties": {
"algorithm": {
"type": "string",
"enum": [
"truncate"
],
"default": "truncate"
},
"promotionThreshold": {
"type": "number",
"default": 5
},
"maxBlockAge": {
"type": "number",
"default": 15
},
"maxOldGenSummaryLength": {
"type": "number",
"default": 3000
},
"majorGcThresholdPercent": {
"default": "100%",
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
},
"batchCleanup": {
"type": "object",
"description": "Three-tier batch merge-cleanup thresholds for blocks marked via mark_block. Accepts number or \"X%\" of model context window.",
"additionalProperties": false,
"properties": {
"lowThreshold": {
"default": "60%",
"description": "Nudge tier: at/above this usage, a reminder to merge marked blocks is injected.",
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
},
"highThreshold": {
"default": "75%",
"description": "Auto merge tier: at/above this usage, all marked blocks are merge-compressed into one.",
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
},
"forceThreshold": {
"default": "90%",
"description": "Force merge tier: at/above this usage, all old-gen blocks are merged regardless of marks.",
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^\\d+(?:\\.\\d+)?%$"
}
]
}
}
}
}
},
"qualityGate": {
"type": "object",
"description": "Post-compression quality evaluation. Non-blocking: failures only emit logger.warn; the compression result is already committed. Pluggable via the QualityGate interface — future algorithms (including external API judges) can be added without changing pipeline wiring.",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "Enable post-compression quality gate evaluation. Off by default for one release of burn-in."
},
"algorithm": {
"type": "string",
"default": "rouge-recall-v1",
"description": "Name of the registered QualityGate algorithm to run."
},
"algorithms": {
"type": "object",
"description": "Per-algorithm config map. Keyed by algorithm name. Unknown algorithms ignored.",
"additionalProperties": true,
"properties": {
"rouge-recall-v1": {
"type": "object",
"description": "Two-layer gate: L1 length/retention floor, L2 ROUGE-1 F1 AND top-20 keyword recall.",
"additionalProperties": false,
"properties": {
"layer1MinChars": {
"type": "number",
"default": 200,
"minimum": 1,
"description": "Hard floor on summary length. Below this, L1 fails regardless of other metrics."
},
"layer1MinRetentionPct": {
"type": "number",
"default": 1.0,
"minimum": 0,
"description": "Minimum retention = (summaryLen / (compressedTokens * 4)) * 100. Catches catastrophic retention failures (<1%) with 0% FPR."
},
"layer2MaxRougeF1": {
"type": "number",
"default": 0.05,
"minimum": 0,
"description": "L2 fails (combined with top20Recall via AND) when ROUGE-1 F1 is below this threshold."
},
"layer2MaxTop20Recall": {
"type": "number",
"default": 0.20,
"minimum": 0,
"description": "L2 fails (combined with rougeF1 via AND) when top-20 keyword recall is below this threshold."
}
}
}
}
}
},
"default": {
"enabled": false,
"algorithm": "rouge-recall-v1",
"algorithms": {
"rouge-recall-v1": {
"layer1MinChars": 200,
"layer1MinRetentionPct": 1.0,
"layer2MaxRougeF1": 0.05,
"layer2MaxTop20Recall": 0.20
}
}
}
},
"messageFilters": {
"type": "object",
"description": "Pluggable message filter system for cleaning up third-party (e.g. OMO) injected messages that accumulate duplicates.",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Master switch for all message filters."
},
"filters": {
"type": "object",
"description": "Per-filter config map. Keyed by filter name. Each filter can be individually enabled/disabled.",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Enable or disable this specific filter."
},
"keepLast": {
"type": "integer",
"minimum": 1,
"description": "Override how many of the most recent matches to keep for keepLastOnly filters."
}
}
}
}
},
"default": {
"enabled": true
}
}
}
}