dsh-switchman 1.11.5 → 1.11.6
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/README.de.md +4 -2
- package/README.es.md +4 -2
- package/README.fr.md +4 -2
- package/README.it.md +4 -2
- package/README.ja.md +4 -2
- package/README.ko.md +4 -2
- package/README.md +5 -3
- package/README.pt.md +4 -2
- package/README.ru.md +4 -2
- package/README.zh-TW.md +4 -2
- package/README.zh.md +4 -2
- package/client.js +92 -11
- package/cordis.patch.yml +17 -1
- package/host/config.js +14 -0
- package/host/context-trim/index.js +294 -18
- package/host/context-trim/surface.js +213 -6
- package/host/context-trim/trigger.js +29 -12
- package/host/context-trim/view.js +17 -2
- package/host/context-watch.js +5 -1
- package/host/routes.js +3 -0
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -279,6 +279,8 @@ window.__ModuleLoader__.load({
|
|
|
279
279
|
{ field: 'trimIncrementTokens', min: 1000, def: 25000 },
|
|
280
280
|
{ field: 'trimPressurePercent', min: 5, max: 100, def: 65 },
|
|
281
281
|
{ field: 'trimEmergencyPercent', min: 5, max: 100, def: 95 },
|
|
282
|
+
{ field: 'trimAdvisoryPercent', min: 5, max: 100, def: 65 },
|
|
283
|
+
{ field: 'trimAdvisoryCriticalPercent', min: 5, max: 100, def: 95 },
|
|
282
284
|
{ field: 'trimWindowTokens', min: 0, def: 0 },
|
|
283
285
|
{ field: 'trimProtectedTail', min: 0, max: 100, def: 10 },
|
|
284
286
|
{ field: 'trimMaxFoldsPerHour', min: 1, max: 60, def: 30 },
|
|
@@ -303,6 +305,14 @@ window.__ModuleLoader__.load({
|
|
|
303
305
|
label: 'trimEmergencyLabel',
|
|
304
306
|
help: 'trimEmergencyHelp',
|
|
305
307
|
},
|
|
308
|
+
trimAdvisoryPercent: {
|
|
309
|
+
label: 'trimAdvisoryLabel',
|
|
310
|
+
help: 'trimAdvisoryHelp',
|
|
311
|
+
},
|
|
312
|
+
trimAdvisoryCriticalPercent: {
|
|
313
|
+
label: 'trimAdvisoryCriticalLabel',
|
|
314
|
+
help: 'trimAdvisoryCriticalHelp',
|
|
315
|
+
},
|
|
306
316
|
trimWindowTokens: {
|
|
307
317
|
label: 'trimWindowLabel',
|
|
308
318
|
help: 'trimWindowHelp',
|
|
@@ -350,6 +360,7 @@ window.__ModuleLoader__.load({
|
|
|
350
360
|
'trimMode',
|
|
351
361
|
'trimEnabled',
|
|
352
362
|
'trimLadderEnabled',
|
|
363
|
+
'trimProtectTaskIntent',
|
|
353
364
|
'surfaceFold',
|
|
354
365
|
'trimSideModel',
|
|
355
366
|
'trimFoldFallbackModel',
|
|
@@ -529,6 +540,7 @@ window.__ModuleLoader__.load({
|
|
|
529
540
|
: 'auto',
|
|
530
541
|
trimEnabled: bool('trimEnabled', true),
|
|
531
542
|
trimLadderEnabled: bool('trimLadderEnabled', true),
|
|
543
|
+
trimProtectTaskIntent: bool('trimProtectTaskIntent', true),
|
|
532
544
|
surfaceFold: bool('surfaceFold', true),
|
|
533
545
|
trimSideModel:
|
|
534
546
|
sanitizeRoute(value?.trimSideModel, true) ??
|
|
@@ -617,6 +629,7 @@ window.__ModuleLoader__.load({
|
|
|
617
629
|
trimMode: values.trimMode,
|
|
618
630
|
trimEnabled: values.trimEnabled,
|
|
619
631
|
trimLadderEnabled: values.trimLadderEnabled,
|
|
632
|
+
trimProtectTaskIntent: values.trimProtectTaskIntent,
|
|
620
633
|
surfaceFold: values.surfaceFold,
|
|
621
634
|
trimSideModel: `${routeKey(values.trimSideModel)}\0${values.trimSideModel.effort ?? ''}`,
|
|
622
635
|
trimFoldFallbackModel: `${routeKey(values.trimFoldFallbackModel)}\0${values.trimFoldFallbackModel.effort ?? ''}`,
|
|
@@ -914,11 +927,13 @@ window.__ModuleLoader__.load({
|
|
|
914
927
|
trimSectionTitle: '上下文裁剪',
|
|
915
928
|
trimModeLabel: '自动裁剪模式',
|
|
916
929
|
trimModeHelp:
|
|
917
|
-
'空闲时何时把历史折叠为摘要:off = 从不折叠,advisory =
|
|
930
|
+
'空闲时何时把历史折叠为摘要:off = 从不折叠,advisory = 模型自主折叠(压力达线时引擎在系统提示注入一次性提醒),auto = 自动折叠。',
|
|
918
931
|
trimEnabledLabel: '启用自动裁剪',
|
|
919
932
|
trimEnabledHelp: '上下文裁剪层的总开关。',
|
|
920
933
|
trimLadderEnabledLabel: '阶梯折叠(T1/T2/T3)',
|
|
921
934
|
trimLadderEnabledHelp: '把累积的 T1 摘要再蒸馏为 T2、T2 再凝聚为 T3,让长会话视图保持平稳。',
|
|
935
|
+
trimProtectTaskIntentLabel: '保护任务意图',
|
|
936
|
+
trimProtectTaskIntentHelp: '第一条 user 消息(任务意图)永不折叠。关闭后它可进入折叠范围。',
|
|
922
937
|
surfaceFoldLabel: '把折叠写入会话表面',
|
|
923
938
|
surfaceFoldHelp: '追加宿主风格的替换事件,让折叠在冻结派发下也能到达线上。建议保持开启。',
|
|
924
939
|
trimSideModelLabel: '摘要模型',
|
|
@@ -950,6 +965,10 @@ window.__ModuleLoader__.load({
|
|
|
950
965
|
trimPressureHelp: '出站视图达到上下文窗口的这一百分比时折叠。',
|
|
951
966
|
trimEmergencyLabel: '紧急阈值(%)',
|
|
952
967
|
trimEmergencyHelp: '达到窗口的这一百分比时立即机械折叠。',
|
|
968
|
+
trimAdvisoryLabel: 'Advisory 提醒线(%)',
|
|
969
|
+
trimAdvisoryHelp: '仅 advisory 模式:压力达到窗口的这一百分比时,提醒模型自行折叠。',
|
|
970
|
+
trimAdvisoryCriticalLabel: 'Advisory 升级线(%)',
|
|
971
|
+
trimAdvisoryCriticalHelp: '仅 advisory 模式:达到这一百分比时,提醒升级为本轮必须折叠的指令。',
|
|
953
972
|
trimModeOff: '关闭',
|
|
954
973
|
trimWindowLabel: '窗口上限(token)',
|
|
955
974
|
trimWindowHelp: '压力与紧急档按 min(模型窗口, 上限) 计算;0 = 跟随强制水位(wmForceTokens)。',
|
|
@@ -1183,12 +1202,14 @@ window.__ModuleLoader__.load({
|
|
|
1183
1202
|
trimSectionTitle: 'Context trim',
|
|
1184
1203
|
trimModeLabel: 'Trim mode',
|
|
1185
1204
|
trimModeHelp:
|
|
1186
|
-
'When to fold history into summaries at idle: off = never, advisory = model-
|
|
1205
|
+
'When to fold history into summaries at idle: off = never, advisory = the model folds itself (the engine appends a one-off nudge line at the pressure line), auto = automatic folds.',
|
|
1187
1206
|
trimEnabledLabel: 'Enable auto-trim',
|
|
1188
1207
|
trimEnabledHelp: 'Master switch for the context-trim layer.',
|
|
1189
1208
|
trimLadderEnabledLabel: 'Ladder folding (T1/T2/T3)',
|
|
1190
1209
|
trimLadderEnabledHelp:
|
|
1191
1210
|
'Distill accumulated T1 summaries into T2, and T2 into T3, keeping long sessions flat.',
|
|
1211
|
+
trimProtectTaskIntentLabel: 'Protect task intent',
|
|
1212
|
+
trimProtectTaskIntentHelp: 'When on (default), the first user message (task intent) stays out of the automatic fold range. Turn off to let it fold like any other content.',
|
|
1192
1213
|
surfaceFoldLabel: 'Ship folds to the session surface',
|
|
1193
1214
|
surfaceFoldHelp:
|
|
1194
1215
|
'Append host-style replace events so folds reach the wire even on frozen dispatches. Leave on.',
|
|
@@ -1227,6 +1248,10 @@ window.__ModuleLoader__.load({
|
|
|
1227
1248
|
trimEmergencyLabel: 'Emergency threshold (%)',
|
|
1228
1249
|
trimEmergencyHelp:
|
|
1229
1250
|
'Immediate mechanical fold at this percent of the window.',
|
|
1251
|
+
trimAdvisoryLabel: 'Advisory nudge line (%)',
|
|
1252
|
+
trimAdvisoryHelp: 'Advisory mode only: the model is nudged to fold itself at this percent of the window.',
|
|
1253
|
+
trimAdvisoryCriticalLabel: 'Advisory critical line (%)',
|
|
1254
|
+
trimAdvisoryCriticalHelp: 'Advisory mode only: at this percent the nudge escalates to a fold-down-this-turn order.',
|
|
1230
1255
|
trimWindowLabel: 'Window cap (tokens)',
|
|
1231
1256
|
trimWindowHelp: 'Pressure and emergency tiers use min(model window, cap); 0 = follow wmForceTokens.',
|
|
1232
1257
|
trimModeOff: 'Off',
|
|
@@ -1460,11 +1485,13 @@ window.__ModuleLoader__.load({
|
|
|
1460
1485
|
trimSectionTitle: '上下文裁剪',
|
|
1461
1486
|
trimModeLabel: '自動裁剪模式',
|
|
1462
1487
|
trimModeHelp:
|
|
1463
|
-
'閒置時何時將歷史摺疊為摘要:off = 從不摺疊,advisory =
|
|
1488
|
+
'閒置時何時將歷史摺疊為摘要:off = 從不摺疊,advisory = 模型自主摺疊(達壓力線時引擎於系統提示注入一次性提醒),auto = 自動摺疊。',
|
|
1464
1489
|
trimEnabledLabel: '啟用自動裁剪',
|
|
1465
1490
|
trimEnabledHelp: '上下文裁剪層的總開關。',
|
|
1466
1491
|
trimLadderEnabledLabel: '階梯摺疊(T1/T2/T3)',
|
|
1467
1492
|
trimLadderEnabledHelp: '把累積的 T1 摘要再蒸餾為 T2、T2 再凝聚為 T3,讓長會話檢視保持平穩。',
|
|
1493
|
+
trimProtectTaskIntentLabel: '保護任務意圖',
|
|
1494
|
+
trimProtectTaskIntentHelp: '第一條 user 訊息(任務意圖)永不摺疊。關閉後它可進入摺疊範圍。',
|
|
1468
1495
|
surfaceFoldLabel: '把摺疊寫入會話表面',
|
|
1469
1496
|
surfaceFoldHelp: '追加宿主風格的替換事件,讓摺疊在凍結派發下也能到達線上。建議保持開啟。',
|
|
1470
1497
|
trimSideModelLabel: '摘要模型',
|
|
@@ -1496,6 +1523,10 @@ window.__ModuleLoader__.load({
|
|
|
1496
1523
|
trimPressureHelp: '出站檢視達到上下文視窗的這一百分比時摺疊。',
|
|
1497
1524
|
trimEmergencyLabel: '緊急閾值(%)',
|
|
1498
1525
|
trimEmergencyHelp: '達到視窗的這一百分比時立即機械摺疊。',
|
|
1526
|
+
trimAdvisoryLabel: 'Advisory 提醒線(%)',
|
|
1527
|
+
trimAdvisoryHelp: '僅 advisory 模式:壓力達到視窗的這一百分比時,提醒模型自行摺疊。',
|
|
1528
|
+
trimAdvisoryCriticalLabel: 'Advisory 升級線(%)',
|
|
1529
|
+
trimAdvisoryCriticalHelp: '僅 advisory 模式:達到這一百分比時,提醒升級為本輪必須摺疊的指令。',
|
|
1499
1530
|
trimModeOff: '關閉',
|
|
1500
1531
|
trimWindowLabel: '視窗上限(token)',
|
|
1501
1532
|
trimWindowHelp: '壓力與緊急檔按 min(模型視窗, 上限) 計算;0 = 跟隨強制水位(wmForceTokens)。',
|
|
@@ -1708,7 +1739,7 @@ window.__ModuleLoader__.load({
|
|
|
1708
1739
|
trimSectionTitle: 'コンテキストトリム',
|
|
1709
1740
|
trimModeLabel: 'トリムモード',
|
|
1710
1741
|
trimModeHelp:
|
|
1711
|
-
'アイドル時に履歴を要約へ折りたたむタイミング:off = 折りたたまない、advisory =
|
|
1742
|
+
'アイドル時に履歴を要約へ折りたたむタイミング:off = 折りたたまない、advisory = モデルが自発的に折りたたむ(圧力しきい値でエンジンがシステムプロンプトに一度だけ注意喚起を追記)、auto = 自動で折りたたむ。',
|
|
1712
1743
|
trimEnabledLabel: '自動トリムを有効化',
|
|
1713
1744
|
trimEnabledHelp: 'コンテキストトリム層のマスタースイッチ。',
|
|
1714
1745
|
trimGrowthLabel: '増加しきい値(token)',
|
|
@@ -1723,6 +1754,10 @@ window.__ModuleLoader__.load({
|
|
|
1723
1754
|
trimEmergencyLabel: '緊急しきい値(%)',
|
|
1724
1755
|
trimEmergencyHelp:
|
|
1725
1756
|
'ウィンドウのこの割合に達したら即座に機械的に折りたたみます。',
|
|
1757
|
+
trimAdvisoryLabel: 'Advisory 提案しきい値(%)',
|
|
1758
|
+
trimAdvisoryHelp: 'advisory モード専用:圧力がウィンドウのこの割合に達すると、モデルに自己折り畳みを促します。',
|
|
1759
|
+
trimAdvisoryCriticalLabel: 'Advisory 深刻しきい値(%)',
|
|
1760
|
+
trimAdvisoryCriticalHelp: 'advisory モード専用:この割合に達すると、提案は「このターンで折り畳む」指示にエスカレートします。',
|
|
1726
1761
|
trimWindowLabel: 'ウィンドウ上限(トークン)',
|
|
1727
1762
|
trimWindowHelp: '圧力・緊急ティアは min(モデルウィンドウ, 上限) で計算。0 = wmForceTokens に追従。',
|
|
1728
1763
|
trimModeOff: 'オフ',
|
|
@@ -1953,7 +1988,7 @@ window.__ModuleLoader__.load({
|
|
|
1953
1988
|
trimSectionTitle: '컨텍스트 트림',
|
|
1954
1989
|
trimModeLabel: '트림 모드',
|
|
1955
1990
|
trimModeHelp:
|
|
1956
|
-
'유휴 시 언제 기록을 요약으로 접을지: off = 접지 않음, advisory =
|
|
1991
|
+
'유휴 시 언제 기록을 요약으로 접을지: off = 접지 않음, advisory = 모델이 스스로 접음(압력 임계값에서 엔진이 시스템 프롬프트에 일회성 알림 추가), auto = 자동 접기.',
|
|
1957
1992
|
trimEnabledLabel: '자동 트림 사용',
|
|
1958
1993
|
trimEnabledHelp: '컨텍스트 트림 계층의 마스터 스위치.',
|
|
1959
1994
|
trimGrowthLabel: '증가 임계값(token)',
|
|
@@ -1967,6 +2002,10 @@ window.__ModuleLoader__.load({
|
|
|
1967
2002
|
trimEmergencyLabel: '긴급 임계값(%)',
|
|
1968
2003
|
trimEmergencyHelp:
|
|
1969
2004
|
'창의 이 백분율에 도달하면 즉시 기계적으로 접습니다.',
|
|
2005
|
+
trimAdvisoryLabel: 'Advisory 알림 임계값(%)',
|
|
2006
|
+
trimAdvisoryHelp: 'advisory 모드 전용: 압력이 창의 이 백분율에 도달하면 모델에 자체 폴드를 권고합니다.',
|
|
2007
|
+
trimAdvisoryCriticalLabel: 'Advisory 치명적 임계값(%)',
|
|
2008
|
+
trimAdvisoryCriticalHelp: 'advisory 모드 전용: 이 백분율에 도달하면 권고가 이번 턴 폴드 명령으로 격상됩니다.',
|
|
1970
2009
|
trimWindowLabel: '윈도우 상한(토큰)',
|
|
1971
2010
|
trimWindowHelp: '압력·긴급 티어는 min(모델 윈도우, 상한)으로 계산. 0 = wmForceTokens를 따름.',
|
|
1972
2011
|
trimModeOff: '끄기',
|
|
@@ -2190,7 +2229,7 @@ window.__ModuleLoader__.load({
|
|
|
2190
2229
|
trimSectionTitle: 'Kontext-Trim',
|
|
2191
2230
|
trimModeLabel: 'Trim-Modus',
|
|
2192
2231
|
trimModeHelp:
|
|
2193
|
-
'Wann der Verlauf im Leerlauf zu Zusammenfassungen gefaltet wird: off = nie, advisory =
|
|
2232
|
+
'Wann der Verlauf im Leerlauf zu Zusammenfassungen gefaltet wird: off = nie, advisory = das Modell faltet selbst (der Motor hängt eine einmalige Erinnerung an den Systemprompt an), auto = automatisches Falten.',
|
|
2194
2233
|
trimEnabledLabel: 'Auto-Trim aktivieren',
|
|
2195
2234
|
trimEnabledHelp: 'Hauptschalter für die Kontext-Trim-Schicht.',
|
|
2196
2235
|
trimGrowthLabel: 'Wachstumsschwelle (Token)',
|
|
@@ -2205,6 +2244,10 @@ window.__ModuleLoader__.load({
|
|
|
2205
2244
|
trimEmergencyLabel: 'Notfallschwelle (%)',
|
|
2206
2245
|
trimEmergencyHelp:
|
|
2207
2246
|
'Sofortiges mechanisches Falten bei diesem Prozentanteil des Fensters.',
|
|
2247
|
+
trimAdvisoryLabel: 'Advisory-Hinweisschwelle (%)',
|
|
2248
|
+
trimAdvisoryHelp: 'Nur im Advisory-Modus: Erreicht der Druck diesen Prozentsatz des Fensters, wird das Modell zum eigenen Falten angehalten.',
|
|
2249
|
+
trimAdvisoryCriticalLabel: 'Advisory-Kritischschwelle (%)',
|
|
2250
|
+
trimAdvisoryCriticalHelp: 'Nur im Advisory-Modus: Ab diesem Prozentsatz wird der Hinweis zu einem Falt-Befehl für diese Runde eskaliert.',
|
|
2208
2251
|
trimWindowLabel: 'Fensterlimit (Token)',
|
|
2209
2252
|
trimWindowHelp: 'Druck- und Notfallstufen rechnen mit min(Modellfenster, Limit); 0 = folgt wmForceTokens.',
|
|
2210
2253
|
trimModeOff: 'Aus',
|
|
@@ -2430,7 +2473,7 @@ window.__ModuleLoader__.load({
|
|
|
2430
2473
|
trimSectionTitle: 'Recorte de contexto',
|
|
2431
2474
|
trimModeLabel: 'Modo de recorte',
|
|
2432
2475
|
trimModeHelp:
|
|
2433
|
-
'Cuándo plegar el historial en resúmenes en reposo: off = nunca, advisory =
|
|
2476
|
+
'Cuándo plegar el historial en resúmenes en reposo: off = nunca, advisory = el modelo pliega por sí mismo (el motor añade un aviso puntual al system prompt), auto = plegado automático.',
|
|
2434
2477
|
trimEnabledLabel: 'Activar recorte automático',
|
|
2435
2478
|
trimEnabledHelp:
|
|
2436
2479
|
'Interruptor maestro de la capa de recorte de contexto.',
|
|
@@ -2446,6 +2489,10 @@ window.__ModuleLoader__.load({
|
|
|
2446
2489
|
trimEmergencyLabel: 'Umbral de emergencia (%)',
|
|
2447
2490
|
trimEmergencyHelp:
|
|
2448
2491
|
'Plegado mecánico inmediato al alcanzar este porcentaje de la ventana.',
|
|
2492
|
+
trimAdvisoryLabel: 'Línea de aviso advisory (%)',
|
|
2493
|
+
trimAdvisoryHelp: 'Solo en modo advisory: al alcanzar este porcentaje de la ventana se incita al modelo a plegarse por sí mismo.',
|
|
2494
|
+
trimAdvisoryCriticalLabel: 'Línea crítica advisory (%)',
|
|
2495
|
+
trimAdvisoryCriticalHelp: 'Solo en modo advisory: a este porcentaje el aviso escala a una orden de plegado en este turno.',
|
|
2449
2496
|
trimWindowLabel: 'Límite de ventana (tokens)',
|
|
2450
2497
|
trimWindowHelp: 'Los niveles de presión y emergencia usan min(ventana del modelo, límite); 0 = sigue a wmForceTokens.',
|
|
2451
2498
|
trimModeOff: 'Desactivado',
|
|
@@ -2671,7 +2718,7 @@ window.__ModuleLoader__.load({
|
|
|
2671
2718
|
trimSectionTitle: 'Rognage du contexte',
|
|
2672
2719
|
trimModeLabel: 'Mode de rognage',
|
|
2673
2720
|
trimModeHelp:
|
|
2674
|
-
'Quand replier l’historique en résumés au repos : off = jamais, advisory =
|
|
2721
|
+
'Quand replier l’historique en résumés au repos : off = jamais, advisory = le modèle replie lui-même (le moteur ajoute un rappel ponctuel au system prompt), auto = repli automatique.',
|
|
2675
2722
|
trimEnabledLabel: 'Activer le rognage automatique',
|
|
2676
2723
|
trimEnabledHelp:
|
|
2677
2724
|
'Interrupteur principal de la couche de rognage de contexte.',
|
|
@@ -2687,6 +2734,10 @@ window.__ModuleLoader__.load({
|
|
|
2687
2734
|
trimEmergencyLabel: 'Seuil d’urgence (%)',
|
|
2688
2735
|
trimEmergencyHelp:
|
|
2689
2736
|
'Repli mécanique immédiat à ce pourcentage de la fenêtre.',
|
|
2737
|
+
trimAdvisoryLabel: 'Seuil de rappel advisory (%)',
|
|
2738
|
+
trimAdvisoryHelp: 'Mode advisory uniquement : à ce pourcentage de la fenêtre, le modèle est invité à se plier lui-même.',
|
|
2739
|
+
trimAdvisoryCriticalLabel: 'Seuil critique advisory (%)',
|
|
2740
|
+
trimAdvisoryCriticalHelp: 'Mode advisory uniquement : à ce pourcentage, le rappel devient un ordre de pliage pour ce tour.',
|
|
2690
2741
|
trimWindowLabel: 'Plafond de fenêtre (jetons)',
|
|
2691
2742
|
trimWindowHelp: 'Les paliers pression/urgence utilisent min(fenêtre du modèle, plafond) ; 0 = suit wmForceTokens.',
|
|
2692
2743
|
trimModeOff: 'Off',
|
|
@@ -2912,7 +2963,7 @@ window.__ModuleLoader__.load({
|
|
|
2912
2963
|
trimSectionTitle: 'Riduzione del contesto',
|
|
2913
2964
|
trimModeLabel: 'Modalità di riduzione',
|
|
2914
2965
|
trimModeHelp:
|
|
2915
|
-
'Quando comprimere la cronologia in riepiloghi a riposo: off = mai, advisory = solo
|
|
2966
|
+
'Quando comprimere la cronologia in riepiloghi a riposo: off = mai, advisory = il modello comprime da solo (il motore aggiunge un promemoria una tantum al system prompt), auto = riduzione automatica.',
|
|
2916
2967
|
trimEnabledLabel: 'Attiva riduzione automatica',
|
|
2917
2968
|
trimEnabledHelp:
|
|
2918
2969
|
'Interruttore principale del livello di riduzione del contesto.',
|
|
@@ -2928,6 +2979,10 @@ window.__ModuleLoader__.load({
|
|
|
2928
2979
|
trimEmergencyLabel: 'Soglia di emergenza (%)',
|
|
2929
2980
|
trimEmergencyHelp:
|
|
2930
2981
|
'Riduzione meccanica immediata a questa percentuale della finestra.',
|
|
2982
|
+
trimAdvisoryLabel: 'Soglia di avviso advisory (%)',
|
|
2983
|
+
trimAdvisoryHelp: 'Solo in modalità advisory: al raggiungimento di questa percentuale della finestra il modello viene invitato a ripiegare da solo.',
|
|
2984
|
+
trimAdvisoryCriticalLabel: 'Soglia critica advisory (%)',
|
|
2985
|
+
trimAdvisoryCriticalHelp: 'Solo in modalità advisory: a questa percentuale l\'avviso scala a un ordine di ripiegamento in questo turno.',
|
|
2931
2986
|
trimWindowLabel: 'Limite finestra (token)',
|
|
2932
2987
|
trimWindowHelp: 'Le soglie di pressione/emergenza usano min(finestra del modello, limite); 0 = segue wmForceTokens.',
|
|
2933
2988
|
trimModeOff: 'Off',
|
|
@@ -3153,7 +3208,7 @@ window.__ModuleLoader__.load({
|
|
|
3153
3208
|
trimSectionTitle: 'Corte de contexto',
|
|
3154
3209
|
trimModeLabel: 'Modo de corte',
|
|
3155
3210
|
trimModeHelp:
|
|
3156
|
-
'Quando dobrar o histórico em resumos na ociosidade: off = nunca, advisory =
|
|
3211
|
+
'Quando dobrar o histórico em resumos na ociosidade: off = nunca, advisory = o modelo dobra por si (o motor acrescenta um aviso pontual ao system prompt), auto = dobra automática.',
|
|
3157
3212
|
trimEnabledLabel: 'Ativar corte automático',
|
|
3158
3213
|
trimEnabledHelp:
|
|
3159
3214
|
'Interruptor principal da camada de corte de contexto.',
|
|
@@ -3169,6 +3224,10 @@ window.__ModuleLoader__.load({
|
|
|
3169
3224
|
trimEmergencyLabel: 'Limiar de emergência (%)',
|
|
3170
3225
|
trimEmergencyHelp:
|
|
3171
3226
|
'Dobra mecânica imediata nessa porcentagem da janela.',
|
|
3227
|
+
trimAdvisoryLabel: 'Limiar de aviso advisory (%)',
|
|
3228
|
+
trimAdvisoryHelp: 'Apenas no modo advisory: ao atingir esta percentagem da janela, o modelo é incentivado a dobrar-se por si.',
|
|
3229
|
+
trimAdvisoryCriticalLabel: 'Limiar crítico advisory (%)',
|
|
3230
|
+
trimAdvisoryCriticalHelp: 'Apenas no modo advisory: nesta percentagem o aviso escala para uma ordem de dobragem neste turno.',
|
|
3172
3231
|
trimWindowLabel: 'Limite de janela (tokens)',
|
|
3173
3232
|
trimWindowHelp: 'Os níveis de pressão e emergência usam min(janela do modelo, limite); 0 = segue wmForceTokens.',
|
|
3174
3233
|
trimModeOff: 'Off',
|
|
@@ -3394,7 +3453,7 @@ window.__ModuleLoader__.load({
|
|
|
3394
3453
|
trimSectionTitle: 'Обрезка контекста',
|
|
3395
3454
|
trimModeLabel: 'Режим обрезки',
|
|
3396
3455
|
trimModeHelp:
|
|
3397
|
-
'Когда сворачивать историю в сводки в простое: off = никогда, advisory =
|
|
3456
|
+
'Когда сворачивать историю в сводки в простое: off = никогда, advisory = модель сворачивает сама (движок добавляет разовое напоминание в системный промпт), auto = автоматически.',
|
|
3398
3457
|
trimEnabledLabel: 'Включить автообрезку',
|
|
3399
3458
|
trimEnabledHelp: 'Главный выключатель слоя обрезки контекста.',
|
|
3400
3459
|
trimGrowthLabel: 'Порог роста (токенов)',
|
|
@@ -3409,6 +3468,10 @@ window.__ModuleLoader__.load({
|
|
|
3409
3468
|
trimEmergencyLabel: 'Аварийный порог (%)',
|
|
3410
3469
|
trimEmergencyHelp:
|
|
3411
3470
|
'Немедленное механическое сворачивание при этом проценте окна.',
|
|
3471
|
+
trimAdvisoryLabel: 'Порог advisory-напоминания (%)',
|
|
3472
|
+
trimAdvisoryHelp: 'Только в режиме advisory: при достижении этой доли окна модели предлагается свернуть контекст самостоятельно.',
|
|
3473
|
+
trimAdvisoryCriticalLabel: 'Критический порог advisory (%)',
|
|
3474
|
+
trimAdvisoryCriticalHelp: 'Только в режиме advisory: на этой доле напоминание становится приказом свернуть в текущем ходе.',
|
|
3412
3475
|
trimWindowLabel: 'Лимит окна (токены)',
|
|
3413
3476
|
trimWindowHelp: 'Уровни давления и аварийный считают от min(окно модели, лимит); 0 = следует за wmForceTokens.',
|
|
3414
3477
|
trimModeOff: 'Off',
|
|
@@ -5475,6 +5538,7 @@ window.__ModuleLoader__.load({
|
|
|
5475
5538
|
trimMode: values.trimMode,
|
|
5476
5539
|
trimEnabled: values.trimEnabled,
|
|
5477
5540
|
trimLadderEnabled: values.trimLadderEnabled,
|
|
5541
|
+
trimProtectTaskIntent: values.trimProtectTaskIntent,
|
|
5478
5542
|
surfaceFold: values.surfaceFold,
|
|
5479
5543
|
trimSideModel: {
|
|
5480
5544
|
provider: values.trimSideModel.provider,
|
|
@@ -7050,6 +7114,23 @@ window.__ModuleLoader__.load({
|
|
|
7050
7114
|
}),
|
|
7051
7115
|
lines: [],
|
|
7052
7116
|
}),
|
|
7117
|
+
h(SettingsRow, {
|
|
7118
|
+
key: 'trimProtectTaskIntent',
|
|
7119
|
+
id: `${trimId}-intent`,
|
|
7120
|
+
label: t('trimProtectTaskIntentLabel'),
|
|
7121
|
+
help: t('trimProtectTaskIntentHelp'),
|
|
7122
|
+
control: h('input', {
|
|
7123
|
+
type: 'checkbox',
|
|
7124
|
+
id: `${trimId}-intent`,
|
|
7125
|
+
checked: values.trimProtectTaskIntent,
|
|
7126
|
+
onChange: () => {
|
|
7127
|
+
edit('trimProtectTaskIntent', !values.trimProtectTaskIntent);
|
|
7128
|
+
},
|
|
7129
|
+
disabled: !editable,
|
|
7130
|
+
style: STYLE.checkbox,
|
|
7131
|
+
}),
|
|
7132
|
+
lines: [],
|
|
7133
|
+
}),
|
|
7053
7134
|
h(SettingsRow, {
|
|
7054
7135
|
key: 'surfaceFold',
|
|
7055
7136
|
id: `${trimId}-surface`,
|
package/cordis.patch.yml
CHANGED
|
@@ -136,6 +136,9 @@
|
|
|
136
136
|
name: '@deepseek-ai/dsh-tool-schedule'
|
|
137
137
|
- id: skill-filesystem
|
|
138
138
|
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
139
|
+
config:
|
|
140
|
+
customSkillDirs:
|
|
141
|
+
- !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')
|
|
139
142
|
- id: tool-skill
|
|
140
143
|
name: '@deepseek-ai/dsh-tool-skill'
|
|
141
144
|
- id: command-goal
|
|
@@ -196,6 +199,8 @@
|
|
|
196
199
|
config:
|
|
197
200
|
- id: tool-subagent-control
|
|
198
201
|
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
202
|
+
config:
|
|
203
|
+
interrupt: false
|
|
199
204
|
- id: tool-subagent
|
|
200
205
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
201
206
|
config:
|
|
@@ -227,6 +232,8 @@
|
|
|
227
232
|
searchTimeoutMs: 60000
|
|
228
233
|
- id: present
|
|
229
234
|
name: '@deepseek-ai/dsh-tool-present'
|
|
235
|
+
- id: tool-office
|
|
236
|
+
name: '@deepseek-ai/dsh-tool-office'
|
|
230
237
|
- id: tool-plugin-manager
|
|
231
238
|
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
232
239
|
disabled: !!js "!ctx.get('profileContext')"
|
|
@@ -335,6 +342,8 @@
|
|
|
335
342
|
config:
|
|
336
343
|
- id: tool-subagent-control
|
|
337
344
|
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
345
|
+
config:
|
|
346
|
+
interrupt: false
|
|
338
347
|
- id: tool-subagent
|
|
339
348
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
340
349
|
config:
|
|
@@ -370,6 +379,8 @@
|
|
|
370
379
|
name: '@deepseek-ai/dsh-tool-executor-ptc'
|
|
371
380
|
- id: present
|
|
372
381
|
name: '@deepseek-ai/dsh-tool-present'
|
|
382
|
+
- id: tool-office
|
|
383
|
+
name: '@deepseek-ai/dsh-tool-office'
|
|
373
384
|
- id: tool-plugin-manager
|
|
374
385
|
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
375
386
|
disabled: true
|
|
@@ -488,7 +499,7 @@
|
|
|
488
499
|
name: '@deepseek-ai/dsh-persona'
|
|
489
500
|
config:
|
|
490
501
|
prefix: >-
|
|
491
|
-
You are a coding agent powered by the {{model}} model.
|
|
502
|
+
You are a coding agent powered by the {{model}} model. You help the user customize DeepSeek Harness itself.
|
|
492
503
|
suffix: *switchman-team-suffix
|
|
493
504
|
- id: agent-instructions
|
|
494
505
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
@@ -572,6 +583,8 @@
|
|
|
572
583
|
config:
|
|
573
584
|
- id: tool-subagent-control
|
|
574
585
|
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
586
|
+
config:
|
|
587
|
+
interrupt: false
|
|
575
588
|
- id: tool-subagent
|
|
576
589
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
577
590
|
config:
|
|
@@ -653,10 +666,13 @@
|
|
|
653
666
|
trimIncrementTokens: 25000
|
|
654
667
|
trimPressurePercent: 65
|
|
655
668
|
trimEmergencyPercent: 95
|
|
669
|
+
trimAdvisoryPercent: 65
|
|
670
|
+
trimAdvisoryCriticalPercent: 95
|
|
656
671
|
trimWindowTokens: 0
|
|
657
672
|
trimProtectedTail: 10
|
|
658
673
|
trimMaxFoldsPerHour: 30
|
|
659
674
|
trimLadderEnabled: true
|
|
675
|
+
trimProtectTaskIntent: true
|
|
660
676
|
trimLadderT2Tokens: 8000
|
|
661
677
|
trimLadderT2MinBlocks: 3
|
|
662
678
|
trimLadderT3Tokens: 6000
|
package/host/config.js
CHANGED
|
@@ -267,6 +267,14 @@ export const Config = z.object({
|
|
|
267
267
|
/** Emergency tier (tier c): forced MECHANICAL fold (no side-model call)
|
|
268
268
|
* at this percent of the window; cooldown-gated. */
|
|
269
269
|
trimEmergencyPercent: z.number().min(1).max(100).default(95).volatile(),
|
|
270
|
+
/** Advisory mode speak line: the model is nudged to fold when pressure
|
|
271
|
+
* reaches this percent of the window (default sits below the protocol's
|
|
272
|
+
* own 80% fold line, nudging while folding headroom is still comfortable). */
|
|
273
|
+
trimAdvisoryPercent: z.number().min(1).max(100).default(65).volatile(),
|
|
274
|
+
/** Advisory mode escalation line: at this percent the nudge escalates to a
|
|
275
|
+
* fold-down-this-turn order; must stay above trimAdvisoryPercent (an
|
|
276
|
+
* inverted or out-of-range pair falls back to 65/95). */
|
|
277
|
+
trimAdvisoryCriticalPercent: z.number().min(1).max(100).default(95).volatile(),
|
|
270
278
|
/** [2026-11-07]-[growth/increment constants are absolute tokens
|
|
271
279
|
* calibrated for the default 150k effective window]-[scaling
|
|
272
280
|
* trimWindowTokens down without scaling trimGrowthTokens /
|
|
@@ -306,6 +314,12 @@ export const Config = z.object({
|
|
|
306
314
|
* T2/T3 distillation tiers. T1 raw-range folds are governed by
|
|
307
315
|
* trimMode; the ladder only adds the summary-maintenance tiers. */
|
|
308
316
|
trimLadderEnabled: z.boolean().default(true).volatile(),
|
|
317
|
+
/** Protect the task-intent segment (the first user message's whole
|
|
318
|
+
* segment) from raw folds. true (default) keeps the anti-drift guard;
|
|
319
|
+
* false lets the intent segment enter computeFoldableRange's candidate
|
|
320
|
+
* span like any other raw content. The system-head clamp is unaffected
|
|
321
|
+
* either way. */
|
|
322
|
+
trimProtectTaskIntent: z.boolean().default(true).volatile(),
|
|
309
323
|
/** Ladder T2 gate: minimum active-T1 summary token mass before a T2
|
|
310
324
|
* distillation fires (the need signal — bili #379: block count alone
|
|
311
325
|
* is not a need signal). */
|