dsh-context-compression-improved 0.5.6 → 0.5.7

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.
Files changed (162) hide show
  1. package/.gitattributes +2 -2
  2. package/.githooks/pre-push +37 -37
  3. package/.github/workflows/ci.yml +39 -39
  4. package/CHANGELOG.ja.md +169 -169
  5. package/CHANGELOG.ko.md +167 -167
  6. package/CHANGELOG.md +314 -304
  7. package/CHANGELOG.zh.md +152 -152
  8. package/CONTRIBUTING.md +22 -22
  9. package/LICENSE +21 -21
  10. package/README.ja.md +85 -85
  11. package/README.ko.md +85 -85
  12. package/README.md +94 -94
  13. package/README.zh.md +85 -85
  14. package/SECURITY.md +18 -18
  15. package/THIRD_PARTY_NOTICES.md +14 -14
  16. package/docs/compat-0.1.5-report.md +77 -77
  17. package/docs/installation.ja.md +78 -78
  18. package/docs/installation.ko.md +78 -78
  19. package/docs/installation.md +103 -103
  20. package/docs/installation.zh.md +100 -100
  21. package/docs/repair-log.md +657 -657
  22. package/eslint.config.js +30 -30
  23. package/package.json +164 -164
  24. package/packages/selector/LICENSE +21 -21
  25. package/packages/selector/README.md +26 -26
  26. package/packages/selector/README.zh.md +24 -24
  27. package/packages/selector/THIRD_PARTY_NOTICES.md +32 -32
  28. package/packages/selector/cordis.patch.yml +27 -27
  29. package/packages/selector/docs/history-tool-call-working-set-spec.md +112 -112
  30. package/packages/selector/docs/native-tool-result-selector-spec.md +34 -34
  31. package/packages/selector/docs/subagent-cache-reuse-spec.md +46 -46
  32. package/packages/selector/dsh.plugin.json +16 -16
  33. package/packages/selector/lib/client.js +733 -0
  34. package/packages/selector/lib/style.css +46 -46
  35. package/packages/selector/package.json +114 -114
  36. package/packages/selector/screenshots.json +3 -3
  37. package/packages/selector/src/client/CompressionProfileControls.tsx +226 -226
  38. package/packages/selector/src/client/CompressionProfileSelector.module.css +170 -170
  39. package/packages/selector/src/client/CompressionProfileSelector.tsx +83 -83
  40. package/packages/selector/src/client/CustomPolicyEditor.tsx +216 -216
  41. package/packages/selector/src/client/EstimatorControls.tsx +277 -277
  42. package/packages/selector/src/client/decode.ts +49 -49
  43. package/packages/selector/src/client/index.ts +178 -149
  44. package/packages/selector/src/client/locales/de.ts +98 -0
  45. package/packages/selector/src/client/locales/es.ts +98 -0
  46. package/packages/selector/src/client/locales/fr.ts +98 -0
  47. package/packages/selector/src/client/locales/it.ts +98 -0
  48. package/packages/selector/src/client/locales/ja.ts +98 -0
  49. package/packages/selector/src/client/locales/ko.ts +98 -0
  50. package/packages/selector/src/client/locales/ru.ts +98 -0
  51. package/packages/selector/src/client/locales.ts +196 -196
  52. package/packages/selector/src/client/preset-options.ts +88 -88
  53. package/packages/selector/src/client/settings-section.tsx +124 -124
  54. package/packages/selector/src/css-modules.d.ts +6 -6
  55. package/packages/selector/src/deepseek-v4-tokenizer.ts +205 -205
  56. package/packages/selector/src/estimator-catalog.ts +104 -104
  57. package/packages/selector/src/index.ts +463 -463
  58. package/packages/selector/src/invariant.ts +113 -113
  59. package/packages/selector/src/preset-overlay.ts +626 -626
  60. package/packages/selector/src/profiles.ts +394 -394
  61. package/packages/selector/src/pruner/content.ts +201 -201
  62. package/packages/selector/src/pruner/session.ts +94 -94
  63. package/packages/selector/src/pruner/state.ts +50 -50
  64. package/packages/selector/src/pruner/tuning.ts +23 -23
  65. package/packages/selector/src/pruner/types.ts +78 -78
  66. package/packages/selector/src/pruner.ts +2402 -2402
  67. package/packages/selector/src/runtime/adaptive-cost.ts +205 -205
  68. package/packages/selector/src/runtime/audit.ts +286 -286
  69. package/packages/selector/src/runtime/config.ts +706 -706
  70. package/packages/selector/src/runtime/custom-policy.ts +278 -278
  71. package/packages/selector/src/runtime/deepseek-official-pricing.ts +298 -298
  72. package/packages/selector/src/runtime/deepseek-v4-vision-tokens.ts +254 -254
  73. package/packages/selector/src/runtime/measurement.ts +436 -436
  74. package/packages/selector/src/runtime/reducers.ts +1674 -1674
  75. package/packages/selector/src/runtime/retrieve.ts +457 -457
  76. package/packages/selector/src/runtime/session-events.ts +30 -30
  77. package/packages/selector/src/runtime/tail-trim.ts +166 -166
  78. package/packages/selector/src/runtime/token-count.ts +72 -72
  79. package/packages/selector/src/runtime/tokenpilot/advisor-prompt.ts +188 -188
  80. package/packages/selector/src/runtime/tokenpilot/advisor-state.ts +149 -149
  81. package/packages/selector/src/runtime/tokenpilot/advisor.ts +419 -419
  82. package/packages/selector/src/runtime/tokenpilot/benefit.ts +200 -200
  83. package/packages/selector/src/runtime/tokenpilot/dedup.ts +81 -81
  84. package/packages/selector/src/runtime/tokenpilot/estimator.ts +151 -151
  85. package/packages/selector/src/runtime/tokenpilot/locator.ts +128 -128
  86. package/packages/selector/src/runtime/tokenpilot/read-state.ts +98 -98
  87. package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +303 -303
  88. package/packages/selector/src/runtime/toolclass.ts +103 -103
  89. package/packages/selector/src/runtime/types.ts +346 -346
  90. package/packages/selector/src/runtime/value.ts +48 -48
  91. package/packages/selector/tests/advisor-report.host.spec.ts +223 -223
  92. package/packages/selector/tests/auto-compact.client.spec.tsx +213 -213
  93. package/packages/selector/tests/built/client-artifact.spec.ts +59 -59
  94. package/packages/selector/tests/cache-prefix-audit.spec.ts +123 -123
  95. package/packages/selector/tests/code-skeleton.client.spec.ts +90 -90
  96. package/packages/selector/tests/custom-contract.client.spec.ts +204 -204
  97. package/packages/selector/tests/estimator-catalog.spec.ts +70 -70
  98. package/packages/selector/tests/estimator-channel.client.spec.tsx +252 -252
  99. package/packages/selector/tests/estimator-route-registration.host.spec.ts +188 -188
  100. package/packages/selector/tests/host-preset-overlay.host.spec.ts +206 -206
  101. package/packages/selector/tests/preset-options-write.client.spec.ts +206 -206
  102. package/packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts +201 -201
  103. package/packages/selector/tests/preset-overlay.host.spec.ts +246 -246
  104. package/packages/selector/tests/profiles.client.spec.tsx +434 -434
  105. package/packages/selector/tests/public/package-contract.client.spec.ts +78 -78
  106. package/packages/selector/tests/runtime/adaptive-cost.spec.ts +167 -167
  107. package/packages/selector/tests/runtime/advice-never-withholds.host.spec.ts +232 -232
  108. package/packages/selector/tests/runtime/advisor-invariant.spec.ts +272 -272
  109. package/packages/selector/tests/runtime/advisor.spec.ts +226 -226
  110. package/packages/selector/tests/runtime/audit.spec.ts +274 -274
  111. package/packages/selector/tests/runtime/auto-compact-config.spec.ts +523 -523
  112. package/packages/selector/tests/runtime/char-basis.spec.ts +30 -30
  113. package/packages/selector/tests/runtime/code-skeleton.spec.ts +152 -152
  114. package/packages/selector/tests/runtime/deepseek-official-pricing.spec.ts +186 -186
  115. package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +122 -122
  116. package/packages/selector/tests/runtime/deepseek-v4-vision-tokens.spec.ts +122 -122
  117. package/packages/selector/tests/runtime/deprecated-preset-options.spec.ts +96 -96
  118. package/packages/selector/tests/runtime/fixtures/profile-baseline.json +273 -273
  119. package/packages/selector/tests/runtime/fixtures/tokenizer-golden.json +106 -106
  120. package/packages/selector/tests/runtime/fixtures/vision-golden.json +459 -459
  121. package/packages/selector/tests/runtime/frequency-longstrings.spec.ts +74 -74
  122. package/packages/selector/tests/runtime/html-reducer.spec.ts +212 -212
  123. package/packages/selector/tests/runtime/line-mapping.spec.ts +153 -153
  124. package/packages/selector/tests/runtime/prose-reducers.spec.ts +133 -133
  125. package/packages/selector/tests/runtime/public/public-runtime.spec.ts +2724 -2724
  126. package/packages/selector/tests/runtime/read-input-cap.spec.ts +33 -33
  127. package/packages/selector/tests/runtime/search-reducer.spec.ts +110 -110
  128. package/packages/selector/tests/runtime/session-events.spec.ts +27 -27
  129. package/packages/selector/tests/runtime/sidechannel.spec.ts +241 -241
  130. package/packages/selector/tests/runtime/toc-and-bundled.spec.ts +159 -159
  131. package/packages/selector/tests/runtime/tokenizer-golden.spec.ts +53 -53
  132. package/packages/selector/tests/runtime/tokenpilot/benefit.spec.ts +217 -217
  133. package/packages/selector/tests/runtime/tokenpilot/dedup.spec.ts +52 -52
  134. package/packages/selector/tests/runtime/tokenpilot/estimator.spec.ts +79 -79
  135. package/packages/selector/tests/runtime/tokenpilot/locator.spec.ts +76 -76
  136. package/packages/selector/tests/runtime/tokenpilot/profile-baseline.spec.ts +116 -116
  137. package/packages/selector/tests/runtime/tokenpilot/read-state.spec.ts +82 -82
  138. package/packages/selector/tests/runtime/toolclass.spec.ts +156 -156
  139. package/packages/selector/tests/runtime/value.spec.ts +23 -23
  140. package/packages/selector/tests/settings-seat.client.spec.ts +118 -118
  141. package/packages/selector/tests/standing-generation.host.spec.ts +697 -697
  142. package/packages/selector/tests/subagent-cache-reuse.host.spec.ts +253 -253
  143. package/packages/selector/tests/support/cache-prefix-audit.ts +105 -105
  144. package/packages/selector/tests/support/mock-adapter.ts +37 -37
  145. package/packages/selector/tests/support/ui-primitives.tsx +34 -34
  146. package/packages/selector/tsconfig.json +11 -11
  147. package/packages/selector/tsdown.client.config.ts +102 -102
  148. package/packages/selector/tsdown.config.ts +20 -20
  149. package/pnpm-workspace.yaml +66 -66
  150. package/scripts/capture-profile-baseline.mjs +42 -42
  151. package/scripts/generate-tokenizer-fixtures.py +81 -81
  152. package/scripts/generate-vision-fixtures.py +208 -208
  153. package/scripts/packed-components-smoke.mjs +732 -732
  154. package/scripts/packed-install-e2e.mjs +1273 -1273
  155. package/scripts/toolclass-corpus-replay.mjs +281 -281
  156. package/scripts/verify-release.mjs +317 -317
  157. package/tests/TEST_INVENTORY.md +41 -41
  158. package/tsconfig.base.json +18 -18
  159. package/tsconfig.json +7 -7
  160. package/tsconfig.tests.json +15 -15
  161. package/vitest.built.config.ts +9 -9
  162. package/vitest.config.ts +43 -43
@@ -0,0 +1,98 @@
1
+ import type { ContextCompressionLocaleKey } from '../locales.ts'
2
+
3
+ /** Russian copy matching every simplified Chinese selector key. */
4
+ export const ru = {
5
+ 'nav': 'Выбор сжатия контекста',
6
+ 'settings.title': 'Выбор сжатия контекста',
7
+ 'settings.description': 'Выберите профиль сжатия для текущей сессии и настройте его параметры.',
8
+ 'label': 'Сжатие контекста',
9
+ 'status.loading': 'Загрузка',
10
+ 'status.unavailable': 'Недоступно',
11
+ 'status.presetUnavailable': 'Пресет этой сессии не предоставляет сжатие контекста, либо доступность пока не подтверждена.',
12
+ 'status.minimalUnavailable': 'Минимальный режим не загружает сжатие контекста для этой сессии: селектор фактически выключен, действует нативное поведение Harness. Переключитесь на Standard, PTC / Coding, Creative или на поддерживающий её пользовательский пресет, чтобы настроить сжатие.',
13
+ 'status.saveFailed': 'Не удалось сохранить. Повторите попытку.',
14
+ 'pricing.disclosure': 'Официальные цены DeepSeek проверены 2026-08-25. Пиковые часы пн–пт 09:00–12:00 и 14:00–18:00 (Asia/Shanghai), остальное — непиковые. Для запросов на границе интервалов используется диапазон стоимости.',
15
+ 'profile.balanced': 'Сбалансированный',
16
+ 'profile.cache-strict': 'Cache Strict (защита префикса)',
17
+ 'profile.savings': 'Экономия',
18
+ 'profile.adaptive': 'Адаптивный (консервативная цена)',
19
+ 'profile.tokenpilot-inspired': 'По мотивам TokenPilot',
20
+ 'estimator.title': 'Оценщик (опционально)',
21
+ 'estimator.description': 'Небольшая вспомогательная модель без примеров оценивает, вероятно ли старое чтение файла всё ещё востребовано; только рекомендация для старения истории. Без настройки или при сбое — режим только правил.',
22
+ 'estimator.mode': 'Канал',
23
+ 'estimator.mode.off': 'Выключен (только правила)',
24
+ 'estimator.mode.host': 'Модель хоста (повторно использует настроенных провайдеров)',
25
+ 'estimator.mode.direct': 'Прямой OpenAI-совместимый эндпоинт',
26
+ 'estimator.inactive': 'Оценщик есть только у профиля «По мотивам TokenPilot»: пресет-опции этого профиля (указатели дедупликации, якоря резюме, семантика состояния чтения и канал оценщика) никогда не переносятся в другой профиль, поэтому у текущего профиля «{profile}» нет канала оценщика. Выберите «По мотивам TokenPilot» — в этом разделе появится выбор канала: настроенные провайдеры (модель хоста) или прямой OpenAI-совместимый эндпоинт.',
27
+ 'estimator.provider': 'Провайдер',
28
+ 'estimator.provider.placeholder': 'Пусто — следует модели по умолчанию сессии; выберите из списка или введите свой id',
29
+ 'estimator.model.placeholder': 'Пусто — следует модели по умолчанию сессии; выберите из списка или введите свой id',
30
+ 'estimator.hostReuse': 'Канал хоста повторно использует провайдеров и учётные данные, уже настроенные в DSH: ключ API не нужен — и здесь он не принимается.',
31
+ 'estimator.hostRoute': 'Действующий маршрут: {route}.',
32
+ 'estimator.hostUnresolved': 'пока не определено (выберите модель по умолчанию в настройках DSH или укажите здесь провайдера и модель)',
33
+ 'estimator.baseUrl': 'Базовый URL эндпоинта (/v1)',
34
+ 'estimator.model': 'Модель',
35
+ 'estimator.apiKey': 'Ключ API (только запись, никогда не показывается)',
36
+ 'estimator.apiKey.placeholder': 'Введите ключ эндпоинта; сохранение при выходе из поля',
37
+ 'estimator.apiKey.set': 'Задан · введите новое значение, чтобы перезаписать',
38
+ 'estimator.apiKey.clear': 'Очистить',
39
+ 'estimator.apiKey.overwrite': 'Секрет сохранён; введите новое значение и выйдите из поля, чтобы перезаписать его.',
40
+ 'detail.tokenpilot-inspired': 'Поверх «Сбалансированного»: указатели дедупликации, освобождение от восстановления, якоря резюме, стабилизация префикса и семантика состояния чтения; оценщику нужен отдельно настроенный эндпоинт',
41
+ 'profile.custom': 'Пользовательский / Экспериментальный',
42
+ 'profile.native': 'Нативная база',
43
+ 'profile.off': 'Плагин выключен',
44
+ 'profile.current': 'Текущий профиль',
45
+ 'detail.balanced': 'Детерминированно сокращает свежие результаты инструментов; старые устаревают при высоком уровне заполнения',
46
+ 'detail.cache-strict': 'Устаревание отправленной истории только при подтверждённой нехватке ёмкости; попадания в кэш провайдера остаются best-effort',
47
+ 'detail.savings': 'Меньшие целевые значения и более раннее устаревание старых результатов инструментов; более дешёвый запрос не гарантирован',
48
+ 'detail.adaptive': 'Использует Fresh/Aggregate «Сбалансированного»; история устаревает, только если соседний официальный usage и текущие официальные цены доказывают явную экономию',
49
+ 'detail.custom': 'Выберите реализованные этапы и измеренные пороги для новых сессий',
50
+ 'detail.native': 'Только нативная обрезка начала/конца Harness',
51
+ 'detail.off': 'Отключает детерминированный селектор; нативный auto-compact настраивается отдельно',
52
+ 'autoCompact.title': 'Уровень срабатывания Auto Compact',
53
+ 'autoCompact.description': 'Управляемый моделью Auto Compact срабатывает, когда занятость запроса превышает этот уровень. Пороги History стандартного профиля, минимальное освобождение и недавний хвост следуют за уровнем; изменения касаются только новых сессий.',
54
+ 'autoCompact.inputLabel': 'Порог Auto Compact (%)',
55
+ 'autoCompact.sliderLabel': 'Ползунок порога Auto Compact',
56
+ 'autoCompact.quick': 'Быстрые значения',
57
+ 'autoCompact.riskLow': 'Ниже рекомендуемого диапазона: раннее срабатывание увеличивает вызовы резюмирования и перестройки префикса.',
58
+ 'autoCompact.riskHigh': 'Выше рекомендуемого диапазона: ёмкость контекста делится между запросами и выводом, позднее срабатывание сокращает запас для одиночных больших выводов, рассуждений и схем инструментов.',
59
+ 'autoCompact.invalid': 'Порог Auto Compact должен быть целым числом от 50 до 90.',
60
+ 'autoCompact.save': 'Сохранить порог Auto Compact',
61
+ 'autoCompact.summaryHint': 'Порог Auto Compact: {percent}%. Можно изменить в настройках.',
62
+ 'codeSkeleton.title': 'Скелетное сжатие кода (по включению)',
63
+ 'codeSkeleton.description': 'Отдельный переключатель, независимый от профилей выше. Когда включено, слишком большой свежий результат инструмента с исходным кодом сначала пробует скелет, сохраняющий импорты и объявления (тела опущены, строки ошибок сохранены), а при неудаче возвращается к исходной обрезке головы. Нужен точный токенизатор; касается только новых сессий.',
64
+ 'codeSkeleton.enabled': 'Скелетное сжатие кода',
65
+ 'codeSkeleton.enabled.on': 'Вкл',
66
+ 'codeSkeleton.enabled.off': 'Выкл (по умолчанию)',
67
+ 'custom.title': 'Пользовательская стратегия',
68
+ 'custom.settingsHint': 'Подробные параметры — в «Настройки > Выбор сжатия контекста».',
69
+ 'custom.sessionScope': 'Сохранённые изменения применяются, когда текущий runtime сжатия впервые наблюдает Session. Session, уже наблюдаемая этим runtime, сохраняет свою замороженную стратегию.',
70
+ 'custom.measurement': 'Сначала точный токенизатор DeepSeek; иначе оценка токенизатором с калибровкой как запасной вариант. Никогда chars/4. Атрибуция кэша остаётся неизвестной.',
71
+ 'custom.unit': 'Каноническая единица',
72
+ 'custom.unit.tokens': 'Токены',
73
+ 'custom.unit.contextPercent': 'Проценты контекста',
74
+ 'custom.enabled': 'Включено',
75
+ 'custom.enabled.on': 'Вкл',
76
+ 'custom.enabled.off': 'Выкл',
77
+ 'custom.fresh.enabled': 'Включить Fresh',
78
+ 'custom.fresh.trigger': 'Порог Fresh',
79
+ 'custom.fresh.target': 'Цель Fresh',
80
+ 'custom.aggregate.enabled': 'Включить Aggregate',
81
+ 'custom.aggregate.trigger': 'Порог Aggregate',
82
+ 'custom.aggregate.target': 'Цель Aggregate',
83
+ 'custom.history.enabled': 'Включить History',
84
+ 'custom.history.trigger': 'Порог History',
85
+ 'custom.history.keepRecentToolCalls': 'Защищённые недавние вызовы инструментов',
86
+ 'custom.history.keepRecentTokens': 'Защищённый недавний хвост результатов инструментов',
87
+ 'custom.history.minReclaim': 'Минимальное освобождение',
88
+ 'custom.prefixPolicy': 'Политика отправленного префикса',
89
+ 'custom.prefixPolicy.preserve': 'Сохранять до нехватки ёмкости',
90
+ 'custom.prefixPolicy.pressureBreak': 'Разрешить обычное старение истории',
91
+ 'custom.experimental': 'Экспериментально: эти настройки только для пользовательского профиля и никогда не добавляются в стандартные.',
92
+ 'custom.tailTrim.enabled': 'Включить TailTrim (экспериментально)',
93
+ 'custom.tailTrim.trigger': 'Порог TailTrim',
94
+ 'custom.tailTrim.warning': 'TailTrim требует точный токенизатор и заменяет максимум одну полную, завершённую, без ошибок группу только из инструментов на восстанавливаемую ссылку. Он использует общие с History защищённые недавние вызовы инструментов, защищённый недавний хвост результатов инструментов и минимальное освобождение. Он переписывает отправленный префикс и может снизить попадания в кэш.',
95
+ 'custom.save': 'Сохранить пользовательскую стратегию',
96
+ 'custom.reset': 'Сбросить пользовательскую стратегию',
97
+ 'custom.invalid': 'Значения пользовательской стратегии недопустимы.',
98
+ } satisfies Record<ContextCompressionLocaleKey, string>
@@ -1,196 +1,196 @@
1
- /** Simplified Chinese copy for the context-compression selector. */
2
- export const zh = {
3
- 'nav': '上下文压缩选择器',
4
- 'settings.title': '上下文压缩选择器',
5
- 'settings.description': '为当前会话选择压缩 Profile,并配置该 Profile 提供的参数。',
6
- 'label': '上下文压缩',
7
- 'status.loading': '加载中',
8
- 'status.unavailable': '不可用',
9
- 'status.presetUnavailable': '此会话的 preset 未提供上下文压缩,或能力尚未确认。',
10
- 'status.minimalUnavailable': '极简模式不会为此会话加载上下文压缩能力,因此选择器在本会话中等效为关闭,仅保留 Harness 原生行为。切换到标准、PTC/Coding、创造模式,或支持该能力的自定义 preset 后即可配置。',
11
- 'status.saveFailed': '保存失败,请重试',
12
- 'pricing.disclosure': 'DeepSeek 官方价格目录复核于 2026-08-25。Asia/Shanghai 周一至周五 09:00–12:00、14:00–18:00 为峰时,其余为谷时;跨边界请求按成本区间处理。',
13
- 'profile.balanced': '平衡模式',
14
- 'profile.cache-strict': 'Cache Strict(前缀保护)',
15
- 'profile.savings': '节省模式',
16
- 'profile.adaptive': 'Adaptive(保守成本)',
17
- 'profile.tokenpilot-inspired': 'TokenPilot 启发模式',
18
- 'estimator.title': '估计器(可选)',
19
- 'estimator.description': '辅助小模型零样本判断旧文件读取是否仍有引用价值,仅建议性加速历史清理;未配置或失败时自动退回纯规则通道,不影响主流程。',
20
- 'estimator.mode': '通道',
21
- 'estimator.mode.off': '关闭(纯规则)',
22
- 'estimator.mode.host': '宿主模型(复用已配置供应商)',
23
- 'estimator.mode.direct': '直连 OpenAI 兼容端点',
24
- 'estimator.inactive': '估计器只随「TokenPilot 启发模式」提供:该模式的预设选项(去重指针、摘要定位块、读取状态语义与估计器通道)不会合并进其他 Profile,因此当前 Profile「{profile}」下没有可配置的估计器通道。选择「TokenPilot 启发模式」后,本区块会出现「通道」选择,可复用已配置供应商(宿主模型)或直连 OpenAI 兼容端点。',
25
- 'estimator.provider': '供应商',
26
- 'estimator.provider.placeholder': '留空则跟随会话默认模型,可从下拉选择或自定义输入',
27
- 'estimator.model.placeholder': '留空则跟随会话默认模型,可从下拉选择或自定义输入',
28
- 'estimator.hostReuse': '宿主通道直接复用你在 DSH 中已配置的供应商与凭据,无需填写 API Key;此通道也不接收 API Key。',
29
- 'estimator.hostRoute': '当前生效路由:{route}。',
30
- 'estimator.hostUnresolved': '尚未确定(请在 DSH 设置中选择默认模型,或在此指定供应商与模型)',
31
- 'estimator.baseUrl': '端点地址(/v1)',
32
- 'estimator.model': '模型',
33
- 'estimator.apiKey': 'API Key(仅写入,不回显)',
34
- 'estimator.apiKey.placeholder': '输入端点密钥并失焦保存',
35
- 'estimator.apiKey.set': '已设置 · 输入新值覆盖',
36
- 'estimator.apiKey.clear': '清除',
37
- 'estimator.apiKey.overwrite': '已设置保密值,输入新值并失焦即可覆盖。',
38
- 'detail.tokenpilot-inspired': '在平衡模式之上叠加去重指针、恢复豁免、摘要定位块、前缀稳定与读取状态语义;估计器需另行配置端点',
39
- 'profile.custom': 'Custom/实验模式',
40
- 'profile.native': '原生对照',
41
- 'profile.off': '插件关闭',
42
- 'profile.current': '当前选择',
43
- 'detail.balanced': '确定性压缩新工具结果;高水位时老化旧结果',
44
- 'detail.cache-strict': '仅在确认容量压力时老化已发送历史;服务端缓存命中仍是 best-effort',
45
- 'detail.savings': '使用更小目标并更早清理旧工具结果;不保证每个请求更便宜',
46
- 'detail.adaptive': 'Fresh/Aggregate 与平衡模式一致;仅当紧邻官方 usage 与当前官方价格证明历史压缩明确更省钱时老化历史,否则保留',
47
- 'detail.custom': '为新会话选择已实现的压缩阶段和计量阈值',
48
- 'detail.native': '只使用 DeepSeek Harness 原生头尾裁剪',
49
- 'detail.off': '关闭确定性选择器;原生 auto-compact 仍由 Harness 配置决定',
50
- 'autoCompact.title': 'Auto Compact 触发水位',
51
- 'autoCompact.description': '模型驱动 Auto Compact 在请求占用达到该水位时触发。调整后,标准 Profile 的 History 触发值、最小回收量与近期尾窗随水位联动;修改只影响新会话。',
52
- 'autoCompact.inputLabel': 'Auto Compact 阈值(%)',
53
- 'autoCompact.sliderLabel': 'Auto Compact 阈值滑杆',
54
- 'autoCompact.quick': '快捷值',
55
- 'autoCompact.riskLow': '低于推荐范围:更早触发会增加摘要调用与前缀重建。',
56
- 'autoCompact.riskHigh': '高于推荐范围:上下文容量为请求与输出共享,过晚触发会减少单次大输出、推理与工具 schema 的余量。',
57
- 'autoCompact.invalid': 'Auto Compact 阈值必须是 50–90 之间的整数。',
58
- 'autoCompact.save': '保存 Auto Compact 阈值',
59
- 'autoCompact.summaryHint': 'Auto Compact 阈值:{percent}%。可在设置中修改。',
60
- 'codeSkeleton.title': '代码骨架压缩(备选)',
61
- 'codeSkeleton.description': '正交开关:独立于上方 Profile。开启后,首次曝光的超大源码类工具结果会先尝试保留导入与声明的骨架(省略函数体并保留错误行),失败时自动回退到原头部裁剪;需要精确 tokenizer,修改只影响新会话。',
62
- 'codeSkeleton.enabled': '代码骨架压缩',
63
- 'codeSkeleton.enabled.on': '开',
64
- 'codeSkeleton.enabled.off': '关(默认)',
65
- 'custom.title': 'Custom 策略',
66
- 'custom.settingsHint': '具体参数请前往“设置 > 上下文压缩选择器”中编辑。',
67
- 'custom.sessionScope': '保存后的修改会在当前压缩运行时随后首次观察某个 Session 时生效;已被该运行时观察的 Session 继续使用其冻结策略。',
68
- 'custom.measurement': '首选 DeepSeek 精确 tokenizer;不可用时回退到带校准的 tokenizer estimate,绝不使用 chars/4。缓存归因仍未知。',
69
- 'custom.unit': '规范单位',
70
- 'custom.unit.tokens': 'Tokens',
71
- 'custom.unit.contextPercent': '上下文百分比',
72
- 'custom.enabled': '是否启用',
73
- 'custom.enabled.on': '开',
74
- 'custom.enabled.off': '关',
75
- 'custom.fresh.enabled': '启用 Fresh',
76
- 'custom.fresh.trigger': 'Fresh 触发值',
77
- 'custom.fresh.target': 'Fresh 目标值',
78
- 'custom.aggregate.enabled': '启用 Aggregate',
79
- 'custom.aggregate.trigger': 'Aggregate 触发值',
80
- 'custom.aggregate.target': 'Aggregate 目标值',
81
- 'custom.history.enabled': '启用 History',
82
- 'custom.history.trigger': 'History 触发值',
83
- 'custom.history.keepRecentToolCalls': '保护近期工具调用数',
84
- 'custom.history.keepRecentTokens': '保护近期工具结果尾窗',
85
- 'custom.history.minReclaim': '最小回收量',
86
- 'custom.prefixPolicy': '已发送前缀策略',
87
- 'custom.prefixPolicy.preserve': '仅在容量压力时改写',
88
- 'custom.prefixPolicy.pressureBreak': '允许常规历史老化',
89
- 'custom.experimental': 'Experimental:以下功能仅用于 Custom,不会加入标准 Profile。',
90
- 'custom.tailTrim.enabled': '启用 TailTrim(实验)',
91
- 'custom.tailTrim.trigger': 'TailTrim 触发值',
92
- 'custom.tailTrim.warning': 'TailTrim 只在精确 tokenizer 可用时,把一个完整、已结束且非错误的纯工具组替换为可恢复引用;它与 History 共用近期工具调用数、工具结果尾窗和最小回收参数。它会改写已发送前缀,可能降低缓存命中。',
93
- 'custom.save': '保存 Custom 策略',
94
- 'custom.reset': '重置 Custom 策略',
95
- 'custom.invalid': 'Custom 策略参数无效。',
96
- } satisfies Record<string, string>
97
-
98
- /** Locale keys that every context-compression selector dictionary must provide. */
99
- export type ContextCompressionLocaleKey = keyof typeof zh
100
-
101
- /** English copy matching every simplified Chinese selector key. */
102
- export const en = {
103
- 'nav': 'Context compression selector',
104
- 'settings.title': 'Context compression selector',
105
- 'settings.description': 'Choose a compression profile for the current session and configure the parameters it provides.',
106
- 'label': 'Context compression',
107
- 'status.loading': 'Loading',
108
- 'status.unavailable': 'Unavailable',
109
- 'status.presetUnavailable': 'This session’s preset does not provide context compression, or availability is not yet confirmed.',
110
- 'status.minimalUnavailable': 'Minimal mode does not load context compression for this session. The selector is effectively off and Harness native behavior remains. Switch to Standard, PTC / Coding, Creative, or a capable custom preset to configure it.',
111
- 'status.saveFailed': 'Save failed. Try again.',
112
- 'pricing.disclosure': 'DeepSeek official prices checked 2026-08-25. Peak Mon–Fri 09:00–12:00 and 14:00–18:00 Asia/Shanghai; otherwise off-peak. Cross-boundary requests use a cost range.',
113
- 'profile.balanced': 'Balanced',
114
- 'profile.cache-strict': 'Cache Strict (prefix protection)',
115
- 'profile.savings': 'Savings',
116
- 'profile.adaptive': 'Adaptive (conservative cost)',
117
- 'profile.tokenpilot-inspired': 'TokenPilot-inspired',
118
- 'estimator.title': 'Estimator (optional)',
119
- 'estimator.description': 'A small auxiliary model zero-shots whether old file reads are still likely referenced, advisory-only for history aging; unconfigured or failing endpoints fall back to rule-only behavior.',
120
- 'estimator.mode': 'Channel',
121
- 'estimator.mode.off': 'Off (rule-only)',
122
- 'estimator.mode.host': 'Host model (reuse configured providers)',
123
- 'estimator.mode.direct': 'Direct OpenAI-compatible endpoint',
124
- 'estimator.inactive': 'The estimator ships only with the TokenPilot-inspired profile: that profile’s preset options (dedupe pointers, summary locators, read-state semantics, and the estimator channel) are never merged into another profile, so the current profile “{profile}” has no estimator channel to configure. Select TokenPilot-inspired and this section gains a Channel choice — reuse configured providers (host model) or a direct OpenAI-compatible endpoint.',
125
- 'estimator.provider': 'Provider',
126
- 'estimator.provider.placeholder': 'Empty follows the session default model; pick from the dropdown or type a custom id',
127
- 'estimator.model.placeholder': 'Empty follows the session default model; pick from the dropdown or type a custom id',
128
- 'estimator.hostReuse': 'The host channel reuses the providers and credentials you already configured in DSH, so no API key is needed — and none is accepted here.',
129
- 'estimator.hostRoute': 'Effective route: {route}.',
130
- 'estimator.hostUnresolved': 'not determined yet (choose a default model in DSH settings, or name a provider and model here)',
131
- 'estimator.baseUrl': 'Endpoint base URL (/v1)',
132
- 'estimator.model': 'Model',
133
- 'estimator.apiKey': 'API key (write-only, never echoed)',
134
- 'estimator.apiKey.placeholder': 'Type the endpoint key; blur to save',
135
- 'estimator.apiKey.set': 'Set · type a new value to overwrite',
136
- 'estimator.apiKey.clear': 'Clear',
137
- 'estimator.apiKey.overwrite': 'A secret is stored; type a new value and blur to overwrite it.',
138
- 'detail.tokenpilot-inspired': 'Layered on Balanced: dedupe pointers, recovery exemption, summary locators, prefix stabilization, and read-state semantics; the estimator needs an endpoint configured separately',
139
- 'profile.custom': 'Custom / Experimental',
140
- 'profile.native': 'Native baseline',
141
- 'profile.off': 'Plugin off',
142
- 'profile.current': 'Current profile',
143
- 'detail.balanced': 'Reduce fresh tool results deterministically; age old results at high watermarks',
144
- 'detail.cache-strict': 'Age sent history only under confirmed capacity pressure; provider cache hits remain best-effort',
145
- 'detail.savings': 'Use smaller targets and age old tool results earlier; does not guarantee a cheaper request',
146
- 'detail.adaptive': 'Use Balanced Fresh/Aggregate; age history only when adjacent official usage and current official prices prove a clear saving',
147
- 'detail.custom': 'Choose implemented stages and measured thresholds for new sessions',
148
- 'detail.native': 'Use only the Harness native head/tail pruner',
149
- 'detail.off': 'Disable the deterministic selector; native auto-compact remains separately configured',
150
- 'autoCompact.title': 'Auto Compact trigger level',
151
- 'autoCompact.description': 'Model-driven Auto Compact triggers once request usage crosses this level. Standard-profile History triggers, minimum reclaim, and the recent tail follow the level; changes affect new sessions only.',
152
- 'autoCompact.inputLabel': 'Auto Compact threshold (%)',
153
- 'autoCompact.sliderLabel': 'Auto Compact threshold slider',
154
- 'autoCompact.quick': 'Quick values',
155
- 'autoCompact.riskLow': 'Below the recommended band: triggering earlier increases summarization calls and prefix rebuilds.',
156
- 'autoCompact.riskHigh': 'Above the recommended band: context capacity is shared by requests and output, so triggering later reduces headroom for single large outputs, reasoning, and tool schemas.',
157
- 'autoCompact.invalid': 'The Auto Compact threshold must be an integer between 50 and 90.',
158
- 'autoCompact.save': 'Save Auto Compact threshold',
159
- 'autoCompact.summaryHint': 'Auto Compact threshold: {percent}%. Change it in Settings.',
160
- 'codeSkeleton.title': 'Code skeleton compression (opt-in)',
161
- 'codeSkeleton.description': 'Orthogonal switch, independent of the profiles above. When enabled, an oversized fresh source-code tool result first tries a skeleton that keeps imports and declarations (bodies elided, error lines kept) and falls back to the original head pruning on failure. Requires the exact tokenizer; changes affect new sessions only.',
162
- 'codeSkeleton.enabled': 'Code skeleton compression',
163
- 'codeSkeleton.enabled.on': 'On',
164
- 'codeSkeleton.enabled.off': 'Off (default)',
165
- 'custom.title': 'Custom policy',
166
- 'custom.settingsHint': 'Edit detailed parameters in Settings > Context compression selector.',
167
- 'custom.sessionScope': 'Saved changes apply when the current compression runtime next observes a Session for the first time. A Session already observed by that runtime keeps its frozen policy.',
168
- 'custom.measurement': 'Exact DeepSeek tokenizer first; tokenizer estimate with calibration fallback. Never chars/4. Cache attribution remains unknown.',
169
- 'custom.unit': 'Canonical unit',
170
- 'custom.unit.tokens': 'Tokens',
171
- 'custom.unit.contextPercent': 'Context percent',
172
- 'custom.enabled': 'Enabled',
173
- 'custom.enabled.on': 'On',
174
- 'custom.enabled.off': 'Off',
175
- 'custom.fresh.enabled': 'Enable Fresh',
176
- 'custom.fresh.trigger': 'Fresh trigger',
177
- 'custom.fresh.target': 'Fresh target',
178
- 'custom.aggregate.enabled': 'Enable Aggregate',
179
- 'custom.aggregate.trigger': 'Aggregate trigger',
180
- 'custom.aggregate.target': 'Aggregate target',
181
- 'custom.history.enabled': 'Enable History',
182
- 'custom.history.trigger': 'History trigger',
183
- 'custom.history.keepRecentToolCalls': 'Protected recent tool calls',
184
- 'custom.history.keepRecentTokens': 'Protected recent tool-result tail',
185
- 'custom.history.minReclaim': 'Minimum reclaim',
186
- 'custom.prefixPolicy': 'Sent-prefix policy',
187
- 'custom.prefixPolicy.preserve': 'Preserve until capacity pressure',
188
- 'custom.prefixPolicy.pressureBreak': 'Allow routine history aging',
189
- 'custom.experimental': 'Experimental: these controls are Custom-only and never added to standard profiles.',
190
- 'custom.tailTrim.enabled': 'Enable TailTrim (experimental)',
191
- 'custom.tailTrim.trigger': 'TailTrim trigger',
192
- 'custom.tailTrim.warning': 'TailTrim requires the exact tokenizer and replaces at most one complete, finished, non-error tool-only group with a recoverable reference. It shares Protected recent tool calls, Protected recent tool-result tail, and Minimum reclaim with History. It rewrites a sent prefix and may reduce cache hits.',
193
- 'custom.save': 'Save Custom policy',
194
- 'custom.reset': 'Reset Custom policy',
195
- 'custom.invalid': 'Custom policy values are invalid.',
196
- } satisfies Record<ContextCompressionLocaleKey, string>
1
+ /** Simplified Chinese copy for the context-compression selector. */
2
+ export const zh = {
3
+ 'nav': '上下文压缩选择器',
4
+ 'settings.title': '上下文压缩选择器',
5
+ 'settings.description': '为当前会话选择压缩 Profile,并配置该 Profile 提供的参数。',
6
+ 'label': '上下文压缩',
7
+ 'status.loading': '加载中',
8
+ 'status.unavailable': '不可用',
9
+ 'status.presetUnavailable': '此会话的 preset 未提供上下文压缩,或能力尚未确认。',
10
+ 'status.minimalUnavailable': '极简模式不会为此会话加载上下文压缩能力,因此选择器在本会话中等效为关闭,仅保留 Harness 原生行为。切换到标准、PTC/Coding、创造模式,或支持该能力的自定义 preset 后即可配置。',
11
+ 'status.saveFailed': '保存失败,请重试',
12
+ 'pricing.disclosure': 'DeepSeek 官方价格目录复核于 2026-08-25。Asia/Shanghai 周一至周五 09:00–12:00、14:00–18:00 为峰时,其余为谷时;跨边界请求按成本区间处理。',
13
+ 'profile.balanced': '平衡模式',
14
+ 'profile.cache-strict': 'Cache Strict(前缀保护)',
15
+ 'profile.savings': '节省模式',
16
+ 'profile.adaptive': 'Adaptive(保守成本)',
17
+ 'profile.tokenpilot-inspired': 'TokenPilot 启发模式',
18
+ 'estimator.title': '估计器(可选)',
19
+ 'estimator.description': '辅助小模型零样本判断旧文件读取是否仍有引用价值,仅建议性加速历史清理;未配置或失败时自动退回纯规则通道,不影响主流程。',
20
+ 'estimator.mode': '通道',
21
+ 'estimator.mode.off': '关闭(纯规则)',
22
+ 'estimator.mode.host': '宿主模型(复用已配置供应商)',
23
+ 'estimator.mode.direct': '直连 OpenAI 兼容端点',
24
+ 'estimator.inactive': '估计器只随「TokenPilot 启发模式」提供:该模式的预设选项(去重指针、摘要定位块、读取状态语义与估计器通道)不会合并进其他 Profile,因此当前 Profile「{profile}」下没有可配置的估计器通道。选择「TokenPilot 启发模式」后,本区块会出现「通道」选择,可复用已配置供应商(宿主模型)或直连 OpenAI 兼容端点。',
25
+ 'estimator.provider': '供应商',
26
+ 'estimator.provider.placeholder': '留空则跟随会话默认模型,可从下拉选择或自定义输入',
27
+ 'estimator.model.placeholder': '留空则跟随会话默认模型,可从下拉选择或自定义输入',
28
+ 'estimator.hostReuse': '宿主通道直接复用你在 DSH 中已配置的供应商与凭据,无需填写 API Key;此通道也不接收 API Key。',
29
+ 'estimator.hostRoute': '当前生效路由:{route}。',
30
+ 'estimator.hostUnresolved': '尚未确定(请在 DSH 设置中选择默认模型,或在此指定供应商与模型)',
31
+ 'estimator.baseUrl': '端点地址(/v1)',
32
+ 'estimator.model': '模型',
33
+ 'estimator.apiKey': 'API Key(仅写入,不回显)',
34
+ 'estimator.apiKey.placeholder': '输入端点密钥并失焦保存',
35
+ 'estimator.apiKey.set': '已设置 · 输入新值覆盖',
36
+ 'estimator.apiKey.clear': '清除',
37
+ 'estimator.apiKey.overwrite': '已设置保密值,输入新值并失焦即可覆盖。',
38
+ 'detail.tokenpilot-inspired': '在平衡模式之上叠加去重指针、恢复豁免、摘要定位块、前缀稳定与读取状态语义;估计器需另行配置端点',
39
+ 'profile.custom': 'Custom/实验模式',
40
+ 'profile.native': '原生对照',
41
+ 'profile.off': '插件关闭',
42
+ 'profile.current': '当前选择',
43
+ 'detail.balanced': '确定性压缩新工具结果;高水位时老化旧结果',
44
+ 'detail.cache-strict': '仅在确认容量压力时老化已发送历史;服务端缓存命中仍是 best-effort',
45
+ 'detail.savings': '使用更小目标并更早清理旧工具结果;不保证每个请求更便宜',
46
+ 'detail.adaptive': 'Fresh/Aggregate 与平衡模式一致;仅当紧邻官方 usage 与当前官方价格证明历史压缩明确更省钱时老化历史,否则保留',
47
+ 'detail.custom': '为新会话选择已实现的压缩阶段和计量阈值',
48
+ 'detail.native': '只使用 DeepSeek Harness 原生头尾裁剪',
49
+ 'detail.off': '关闭确定性选择器;原生 auto-compact 仍由 Harness 配置决定',
50
+ 'autoCompact.title': 'Auto Compact 触发水位',
51
+ 'autoCompact.description': '模型驱动 Auto Compact 在请求占用达到该水位时触发。调整后,标准 Profile 的 History 触发值、最小回收量与近期尾窗随水位联动;修改只影响新会话。',
52
+ 'autoCompact.inputLabel': 'Auto Compact 阈值(%)',
53
+ 'autoCompact.sliderLabel': 'Auto Compact 阈值滑杆',
54
+ 'autoCompact.quick': '快捷值',
55
+ 'autoCompact.riskLow': '低于推荐范围:更早触发会增加摘要调用与前缀重建。',
56
+ 'autoCompact.riskHigh': '高于推荐范围:上下文容量为请求与输出共享,过晚触发会减少单次大输出、推理与工具 schema 的余量。',
57
+ 'autoCompact.invalid': 'Auto Compact 阈值必须是 50–90 之间的整数。',
58
+ 'autoCompact.save': '保存 Auto Compact 阈值',
59
+ 'autoCompact.summaryHint': 'Auto Compact 阈值:{percent}%。可在设置中修改。',
60
+ 'codeSkeleton.title': '代码骨架压缩(备选)',
61
+ 'codeSkeleton.description': '正交开关:独立于上方 Profile。开启后,首次曝光的超大源码类工具结果会先尝试保留导入与声明的骨架(省略函数体并保留错误行),失败时自动回退到原头部裁剪;需要精确 tokenizer,修改只影响新会话。',
62
+ 'codeSkeleton.enabled': '代码骨架压缩',
63
+ 'codeSkeleton.enabled.on': '开',
64
+ 'codeSkeleton.enabled.off': '关(默认)',
65
+ 'custom.title': 'Custom 策略',
66
+ 'custom.settingsHint': '具体参数请前往“设置 > 上下文压缩选择器”中编辑。',
67
+ 'custom.sessionScope': '保存后的修改会在当前压缩运行时随后首次观察某个 Session 时生效;已被该运行时观察的 Session 继续使用其冻结策略。',
68
+ 'custom.measurement': '首选 DeepSeek 精确 tokenizer;不可用时回退到带校准的 tokenizer estimate,绝不使用 chars/4。缓存归因仍未知。',
69
+ 'custom.unit': '规范单位',
70
+ 'custom.unit.tokens': 'Tokens',
71
+ 'custom.unit.contextPercent': '上下文百分比',
72
+ 'custom.enabled': '是否启用',
73
+ 'custom.enabled.on': '开',
74
+ 'custom.enabled.off': '关',
75
+ 'custom.fresh.enabled': '启用 Fresh',
76
+ 'custom.fresh.trigger': 'Fresh 触发值',
77
+ 'custom.fresh.target': 'Fresh 目标值',
78
+ 'custom.aggregate.enabled': '启用 Aggregate',
79
+ 'custom.aggregate.trigger': 'Aggregate 触发值',
80
+ 'custom.aggregate.target': 'Aggregate 目标值',
81
+ 'custom.history.enabled': '启用 History',
82
+ 'custom.history.trigger': 'History 触发值',
83
+ 'custom.history.keepRecentToolCalls': '保护近期工具调用数',
84
+ 'custom.history.keepRecentTokens': '保护近期工具结果尾窗',
85
+ 'custom.history.minReclaim': '最小回收量',
86
+ 'custom.prefixPolicy': '已发送前缀策略',
87
+ 'custom.prefixPolicy.preserve': '仅在容量压力时改写',
88
+ 'custom.prefixPolicy.pressureBreak': '允许常规历史老化',
89
+ 'custom.experimental': 'Experimental:以下功能仅用于 Custom,不会加入标准 Profile。',
90
+ 'custom.tailTrim.enabled': '启用 TailTrim(实验)',
91
+ 'custom.tailTrim.trigger': 'TailTrim 触发值',
92
+ 'custom.tailTrim.warning': 'TailTrim 只在精确 tokenizer 可用时,把一个完整、已结束且非错误的纯工具组替换为可恢复引用;它与 History 共用近期工具调用数、工具结果尾窗和最小回收参数。它会改写已发送前缀,可能降低缓存命中。',
93
+ 'custom.save': '保存 Custom 策略',
94
+ 'custom.reset': '重置 Custom 策略',
95
+ 'custom.invalid': 'Custom 策略参数无效。',
96
+ } satisfies Record<string, string>
97
+
98
+ /** Locale keys that every context-compression selector dictionary must provide. */
99
+ export type ContextCompressionLocaleKey = keyof typeof zh
100
+
101
+ /** English copy matching every simplified Chinese selector key. */
102
+ export const en = {
103
+ 'nav': 'Context compression selector',
104
+ 'settings.title': 'Context compression selector',
105
+ 'settings.description': 'Choose a compression profile for the current session and configure the parameters it provides.',
106
+ 'label': 'Context compression',
107
+ 'status.loading': 'Loading',
108
+ 'status.unavailable': 'Unavailable',
109
+ 'status.presetUnavailable': 'This session’s preset does not provide context compression, or availability is not yet confirmed.',
110
+ 'status.minimalUnavailable': 'Minimal mode does not load context compression for this session. The selector is effectively off and Harness native behavior remains. Switch to Standard, PTC / Coding, Creative, or a capable custom preset to configure it.',
111
+ 'status.saveFailed': 'Save failed. Try again.',
112
+ 'pricing.disclosure': 'DeepSeek official prices checked 2026-08-25. Peak Mon–Fri 09:00–12:00 and 14:00–18:00 Asia/Shanghai; otherwise off-peak. Cross-boundary requests use a cost range.',
113
+ 'profile.balanced': 'Balanced',
114
+ 'profile.cache-strict': 'Cache Strict (prefix protection)',
115
+ 'profile.savings': 'Savings',
116
+ 'profile.adaptive': 'Adaptive (conservative cost)',
117
+ 'profile.tokenpilot-inspired': 'TokenPilot-inspired',
118
+ 'estimator.title': 'Estimator (optional)',
119
+ 'estimator.description': 'A small auxiliary model zero-shots whether old file reads are still likely referenced, advisory-only for history aging; unconfigured or failing endpoints fall back to rule-only behavior.',
120
+ 'estimator.mode': 'Channel',
121
+ 'estimator.mode.off': 'Off (rule-only)',
122
+ 'estimator.mode.host': 'Host model (reuse configured providers)',
123
+ 'estimator.mode.direct': 'Direct OpenAI-compatible endpoint',
124
+ 'estimator.inactive': 'The estimator ships only with the TokenPilot-inspired profile: that profile’s preset options (dedupe pointers, summary locators, read-state semantics, and the estimator channel) are never merged into another profile, so the current profile “{profile}” has no estimator channel to configure. Select TokenPilot-inspired and this section gains a Channel choice — reuse configured providers (host model) or a direct OpenAI-compatible endpoint.',
125
+ 'estimator.provider': 'Provider',
126
+ 'estimator.provider.placeholder': 'Empty follows the session default model; pick from the dropdown or type a custom id',
127
+ 'estimator.model.placeholder': 'Empty follows the session default model; pick from the dropdown or type a custom id',
128
+ 'estimator.hostReuse': 'The host channel reuses the providers and credentials you already configured in DSH, so no API key is needed — and none is accepted here.',
129
+ 'estimator.hostRoute': 'Effective route: {route}.',
130
+ 'estimator.hostUnresolved': 'not determined yet (choose a default model in DSH settings, or name a provider and model here)',
131
+ 'estimator.baseUrl': 'Endpoint base URL (/v1)',
132
+ 'estimator.model': 'Model',
133
+ 'estimator.apiKey': 'API key (write-only, never echoed)',
134
+ 'estimator.apiKey.placeholder': 'Type the endpoint key; blur to save',
135
+ 'estimator.apiKey.set': 'Set · type a new value to overwrite',
136
+ 'estimator.apiKey.clear': 'Clear',
137
+ 'estimator.apiKey.overwrite': 'A secret is stored; type a new value and blur to overwrite it.',
138
+ 'detail.tokenpilot-inspired': 'Layered on Balanced: dedupe pointers, recovery exemption, summary locators, prefix stabilization, and read-state semantics; the estimator needs an endpoint configured separately',
139
+ 'profile.custom': 'Custom / Experimental',
140
+ 'profile.native': 'Native baseline',
141
+ 'profile.off': 'Plugin off',
142
+ 'profile.current': 'Current profile',
143
+ 'detail.balanced': 'Reduce fresh tool results deterministically; age old results at high watermarks',
144
+ 'detail.cache-strict': 'Age sent history only under confirmed capacity pressure; provider cache hits remain best-effort',
145
+ 'detail.savings': 'Use smaller targets and age old tool results earlier; does not guarantee a cheaper request',
146
+ 'detail.adaptive': 'Use Balanced Fresh/Aggregate; age history only when adjacent official usage and current official prices prove a clear saving',
147
+ 'detail.custom': 'Choose implemented stages and measured thresholds for new sessions',
148
+ 'detail.native': 'Use only the Harness native head/tail pruner',
149
+ 'detail.off': 'Disable the deterministic selector; native auto-compact remains separately configured',
150
+ 'autoCompact.title': 'Auto Compact trigger level',
151
+ 'autoCompact.description': 'Model-driven Auto Compact triggers once request usage crosses this level. Standard-profile History triggers, minimum reclaim, and the recent tail follow the level; changes affect new sessions only.',
152
+ 'autoCompact.inputLabel': 'Auto Compact threshold (%)',
153
+ 'autoCompact.sliderLabel': 'Auto Compact threshold slider',
154
+ 'autoCompact.quick': 'Quick values',
155
+ 'autoCompact.riskLow': 'Below the recommended band: triggering earlier increases summarization calls and prefix rebuilds.',
156
+ 'autoCompact.riskHigh': 'Above the recommended band: context capacity is shared by requests and output, so triggering later reduces headroom for single large outputs, reasoning, and tool schemas.',
157
+ 'autoCompact.invalid': 'The Auto Compact threshold must be an integer between 50 and 90.',
158
+ 'autoCompact.save': 'Save Auto Compact threshold',
159
+ 'autoCompact.summaryHint': 'Auto Compact threshold: {percent}%. Change it in Settings.',
160
+ 'codeSkeleton.title': 'Code skeleton compression (opt-in)',
161
+ 'codeSkeleton.description': 'Orthogonal switch, independent of the profiles above. When enabled, an oversized fresh source-code tool result first tries a skeleton that keeps imports and declarations (bodies elided, error lines kept) and falls back to the original head pruning on failure. Requires the exact tokenizer; changes affect new sessions only.',
162
+ 'codeSkeleton.enabled': 'Code skeleton compression',
163
+ 'codeSkeleton.enabled.on': 'On',
164
+ 'codeSkeleton.enabled.off': 'Off (default)',
165
+ 'custom.title': 'Custom policy',
166
+ 'custom.settingsHint': 'Edit detailed parameters in Settings > Context compression selector.',
167
+ 'custom.sessionScope': 'Saved changes apply when the current compression runtime next observes a Session for the first time. A Session already observed by that runtime keeps its frozen policy.',
168
+ 'custom.measurement': 'Exact DeepSeek tokenizer first; tokenizer estimate with calibration fallback. Never chars/4. Cache attribution remains unknown.',
169
+ 'custom.unit': 'Canonical unit',
170
+ 'custom.unit.tokens': 'Tokens',
171
+ 'custom.unit.contextPercent': 'Context percent',
172
+ 'custom.enabled': 'Enabled',
173
+ 'custom.enabled.on': 'On',
174
+ 'custom.enabled.off': 'Off',
175
+ 'custom.fresh.enabled': 'Enable Fresh',
176
+ 'custom.fresh.trigger': 'Fresh trigger',
177
+ 'custom.fresh.target': 'Fresh target',
178
+ 'custom.aggregate.enabled': 'Enable Aggregate',
179
+ 'custom.aggregate.trigger': 'Aggregate trigger',
180
+ 'custom.aggregate.target': 'Aggregate target',
181
+ 'custom.history.enabled': 'Enable History',
182
+ 'custom.history.trigger': 'History trigger',
183
+ 'custom.history.keepRecentToolCalls': 'Protected recent tool calls',
184
+ 'custom.history.keepRecentTokens': 'Protected recent tool-result tail',
185
+ 'custom.history.minReclaim': 'Minimum reclaim',
186
+ 'custom.prefixPolicy': 'Sent-prefix policy',
187
+ 'custom.prefixPolicy.preserve': 'Preserve until capacity pressure',
188
+ 'custom.prefixPolicy.pressureBreak': 'Allow routine history aging',
189
+ 'custom.experimental': 'Experimental: these controls are Custom-only and never added to standard profiles.',
190
+ 'custom.tailTrim.enabled': 'Enable TailTrim (experimental)',
191
+ 'custom.tailTrim.trigger': 'TailTrim trigger',
192
+ 'custom.tailTrim.warning': 'TailTrim requires the exact tokenizer and replaces at most one complete, finished, non-error tool-only group with a recoverable reference. It shares Protected recent tool calls, Protected recent tool-result tail, and Minimum reclaim with History. It rewrites a sent prefix and may reduce cache hits.',
193
+ 'custom.save': 'Save Custom policy',
194
+ 'custom.reset': 'Reset Custom policy',
195
+ 'custom.invalid': 'Custom policy values are invalid.',
196
+ } satisfies Record<ContextCompressionLocaleKey, string>