dsh-thinking-levels 4.4.20 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -31,6 +31,8 @@ window.__ModuleLoader__.load({
31
31
  "card.defaultPricing": "目录外定价",
32
32
  "card.simpleTools": "简单工具白名单(auto 降档判定)",
33
33
  "card.simpleToolsHint": "逗号或空格分隔的工具名,追加进内置的「廉价确定性工具」判定(如 shell、pwsh、web_fetch)。auto 档据此把仅由这类短小调用构成的步骤降到低档;内置已覆盖 bash/terminal/shell/pwsh 等,此处仅补充宿主专有工具名。",
34
+ "card.simpleToolsRegex": "简单工具 regex 名单(auto 降档判定)",
35
+ "card.simpleToolsRegexHint": "每条一个 JavaScript 正则(不自动加锚点,建议自写 ^;大小写不敏感),与上方字面量名单并存、同一统计。匹配同时测完整工具名与剥 ops_ 后的裸名——「^ops_.*」可一次覆盖整个 dsh-ops 家族。编译失败的条目跳过并告警一次。",
34
36
  "card.defaultPricingHint": "定价目录未收录的模型(含其他插件接入的网关型号)如何计价;目录内模型始终按自己的目录价。改价只影响后续新账。",
35
37
  "card.defaultPricing.estimate": "estimate — 典型价兜底估算(未校准·仅供参考,默认)",
36
38
  "card.defaultPricing.cn": "cn — 人民币校准档(目录外仍按典型价估算)",
@@ -112,7 +114,11 @@ window.__ModuleLoader__.load({
112
114
  "card.dsContextTitle": "官方 DeepSeek 模型上下文上限",
113
115
  "input.effort.default": "提供方默认",
114
116
  "input.effort.reset": "恢复提供方默认",
115
- "card.capabilities.failed": "保存失败:配置被拒绝或冲突,请检查值。"
117
+ "card.capabilities.failed": "保存失败:配置被拒绝或冲突,请检查值。",
118
+ "trace.label": "Effort 轨迹",
119
+ "trace.empty": "本会话还没有已提交的请求档位。",
120
+ "trace.intent.auto": "auto",
121
+ "trace.intent.manual": "手动"
116
122
  };
117
123
  /** English dictionary (keys mirror zh). */
118
124
  const en = {
@@ -135,6 +141,8 @@ window.__ModuleLoader__.load({
135
141
  "card.defaultPricing": "Off-catalog pricing",
136
142
  "card.simpleTools": "Simple-tool allowlist (auto downgrade)",
137
143
  "card.simpleToolsHint": "Comma- or space-separated tool names added to the built-in \"cheap and deterministic tool\" set (e.g. shell, pwsh, web_fetch). In auto, a step made only of these short calls drops to low. The built-in set already covers bash/terminal/shell/pwsh; use this for host-specific names.",
144
+ "card.simpleToolsRegex": "Simple-tool regex list (auto downgrade)",
145
+ "card.simpleToolsRegexHint": "One JavaScript regex per entry (no auto-anchoring — write your own ^; case-insensitive), alongside the literal list above and counted in the same ratio. Patterns match BOTH the full tool name and the ops_-stripped bare name, so \"^ops_.*\" covers the whole dsh-ops family at once. Invalid entries are skipped with a one-time warning.",
138
146
  "card.defaultPricingHint": "How to price models the catalog does not list (including gateway models brought in by other plugins); catalogued models always use their own rates. Pricing changes only affect new accounting from now on.",
139
147
  "card.defaultPricing.estimate": "estimate — typical-price fallback (uncalibrated, reference only; default)",
140
148
  "card.defaultPricing.cn": "cn — CNY calibration tier (off-catalog still falls back to the typical price)",
@@ -216,7 +224,11 @@ window.__ModuleLoader__.load({
216
224
  "card.dsContextTitle": "Official DeepSeek context windows",
217
225
  "input.effort.default": "Provider default",
218
226
  "input.effort.reset": "Restore provider default",
219
- "card.capabilities.failed": "Save failed: the value was rejected or conflicted. Check it."
227
+ "card.capabilities.failed": "Save failed: the value was rejected or conflicted. Check it.",
228
+ "trace.label": "Effort trace",
229
+ "trace.empty": "No committed request levels in this session yet.",
230
+ "trace.intent.auto": "auto",
231
+ "trace.intent.manual": "manual"
220
232
  };
221
233
  /** Japanese dictionary (keys mirror zh). */
222
234
  const ja = {
@@ -239,6 +251,8 @@ window.__ModuleLoader__.load({
239
251
  "card.defaultPricing": "カタログ外モデルの価格",
240
252
  "card.simpleTools": "簡易ツール許可リスト(auto ダウングレード)",
241
253
  "card.simpleToolsHint": "カンマまたはスペース区切りのツール名を内蔵の「安価・決定論的ツール」判定に追加します(例: shell、pwsh、web_fetch)。auto ではこれらの短い呼び出しのみのステップは low に下がります。内蔵集合は既に bash/terminal/shell/pwsh を含むため、ここではホスト固有の名前を補完してください。",
254
+ "card.simpleToolsRegex": "簡易ツール正規表現リスト(auto 降格判定)",
255
+ "card.simpleToolsRegexHint": "1 エントリ = 1 つの JavaScript 正規表現(自動アンカーなし — 自前で ^ を書く、大文字小文字を無視)。上のリテラル名単と併存し同一の比率に計上されます。パターンは完全なツール名と ops_ を剥いだ裸名の両方に一致するため、「^ops_.*」だけで dsh-ops ファミリー全体を覆えます。不正なパターンは 1 度だけ警告してスキップされます。",
242
256
  "card.defaultPricingHint": "価格カタログに未登録のモデル(他プラグイン経由のゲートウェイモデル含む)の計算方法。登録済みモデルは常にカタログ価格を使用。価格変更は以降の新規記録のみ影響。",
243
257
  "card.defaultPricing.estimate": "estimate — 典型価格でフォールバック見積り(未校正・参考値、デフォルト)",
244
258
  "card.defaultPricing.cn": "cn — 人民元キャリブレーション(カタログ外は典型価格の見積りのまま)",
@@ -320,7 +334,11 @@ window.__ModuleLoader__.load({
320
334
  "card.dsContextTitle": "公式 DeepSeek モデルのコンテキスト上限",
321
335
  "input.effort.default": "プロバイダーの既定",
322
336
  "input.effort.reset": "プロバイダーの既定に戻す",
323
- "card.capabilities.failed": "保存に失敗しました:値が拒否されたか競合しています。確認してください。"
337
+ "card.capabilities.failed": "保存に失敗しました:値が拒否されたか競合しています。確認してください。",
338
+ "trace.label": "Effort 軌跡",
339
+ "trace.empty": "このセッションには確定済みリクエストのレベルがまだありません。",
340
+ "trace.intent.auto": "auto",
341
+ "trace.intent.manual": "手動"
324
342
  };
325
343
  /** Korean dictionary (keys mirror zh). */
326
344
  const ko = {
@@ -343,6 +361,8 @@ window.__ModuleLoader__.load({
343
361
  "card.defaultPricing": "카탈로그 외 과금",
344
362
  "card.simpleTools": "간단한 도구 허용 목록(auto 강등)",
345
363
  "card.simpleToolsHint": "쉼표 또는 공백으로 구분한 도구 이름을 내장 \"저렴하고 결정적인 도구\" 판정에 추가합니다(예: shell, pwsh, web_fetch). auto에서는 이런 짧은 호출만으로 구성된 단계가 low로 내려갑니다. 내장 목록은 이미 bash/terminal/shell/pwsh를 포함하므로 호스트 고유 이름을 보충하세요.",
364
+ "card.simpleToolsRegex": "간단 도구 정규식 목록(auto 강등 판정)",
365
+ "card.simpleToolsRegexHint": "한 줄에 하나의 JavaScript 정규식(자동 앵커 없음 — ^ 를 직접 쓰세요, 대소문자 무시). 위 리터럴 목록과 병행되어 같은 비율에 계산됩니다. 패턴은 전체 도구 이름과 ops_ 를 제거한 이름 모두에 일치하므로 \"^ops_.*\" 하나로 dsh-ops 계열 전체를 커버합니다. 잘못된 항목은 한 번 경고 후 건너뜁니다.",
346
366
  "card.defaultPricingHint": "가격 카탈로그에 없는 모델(다른 플러그인으로 유입된 게이트웨이 모델 포함)의 과금 방식. 카탈로그 등재 모델은 항상 자체 등재가 사용. 가격 변경은 이후 신규 기록에만 반영.",
347
367
  "card.defaultPricing.estimate": "estimate — 전형가 폴백 추정(미교정·참고용, 기본)",
348
368
  "card.defaultPricing.cn": "cn — 위안화 보정 등급(카탈로그 외는 여전히 전형가 추정)",
@@ -424,7 +444,11 @@ window.__ModuleLoader__.load({
424
444
  "card.dsContextTitle": "공식 DeepSeek 모델 컨텍스트 상한",
425
445
  "input.effort.default": "공급자 기본값",
426
446
  "input.effort.reset": "공급자 기본값으로 복원",
427
- "card.capabilities.failed": "저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요."
447
+ "card.capabilities.failed": "저장 실패: 값이 거부되었거나 충돌합니다. 확인하세요.",
448
+ "trace.label": "Effort 궤적",
449
+ "trace.empty": "이 세션에는 아직 확정된 요청 레벨이 없습니다.",
450
+ "trace.intent.auto": "auto",
451
+ "trace.intent.manual": "수동"
428
452
  };
429
453
  /** French dictionary (keys mirror zh). */
430
454
  const fr = {
@@ -447,6 +471,8 @@ window.__ModuleLoader__.load({
447
471
  "card.defaultPricing": "Tarification hors catalogue",
448
472
  "card.simpleTools": "Liste d'outils simples (rétrogradation auto)",
449
473
  "card.simpleToolsHint": "Noms d'outils séparés par virgule ou espace, ajoutés à l'ensemble interne des « outils bon marché et déterministes » (ex. shell, pwsh, web_fetch). En mode auto, une étape composée uniquement de ces appels courts passe à low. L'ensemble interne couvre déjà bash/terminal/shell/pwsh ; utilisez ce champ pour les noms propres à l'hôte.",
474
+ "card.simpleToolsRegex": "Liste regex d'outils simples (déclassement auto)",
475
+ "card.simpleToolsRegexHint": "Une regex JavaScript par entrée (pas d'ancrage automatique — écrivez votre ^ ; insensible à la casse), en complément de la liste littérale ci-dessus et comptée dans le même ratio. Les motifs testent à la fois le nom complet et le nom nu sans ops_ — « ^ops_.* » couvre toute la famille dsh-ops d'un coup. Les entrées invalides sont ignorées avec un avertissement unique.",
450
476
  "card.defaultPricingHint": "Comment tarifer les modèles absents du catalogue (y compris les modèles de passerelle apportés par d'autres plugins) ; les modèles catalogués gardent leurs tarifs. Les changements ne touchent que les nouvelles lignes.",
451
477
  "card.defaultPricing.estimate": "estimate — estimation par prix type (non calibrée, à titre indicatif ; par défaut)",
452
478
  "card.defaultPricing.cn": "cn — palier calibré CNY (hors catalogue : estimation au prix type)",
@@ -528,7 +554,11 @@ window.__ModuleLoader__.load({
528
554
  "card.dsContextTitle": "Fenêtres de contexte DeepSeek officielles",
529
555
  "input.effort.default": "Valeur par défaut du fournisseur",
530
556
  "input.effort.reset": "Restaurer la valeur par défaut du fournisseur",
531
- "card.capabilities.failed": "Échec de l'enregistrement : la valeur a été rejetée ou est en conflit. Vérifiez-la."
557
+ "card.capabilities.failed": "Échec de l'enregistrement : la valeur a été rejetée ou est en conflit. Vérifiez-la.",
558
+ "trace.label": "Trace des efforts",
559
+ "trace.empty": "Aucun niveau de requête validé dans cette session pour l'instant.",
560
+ "trace.intent.auto": "auto",
561
+ "trace.intent.manual": "manuel"
532
562
  };
533
563
  /** German dictionary (keys mirror zh). */
534
564
  const de = {
@@ -551,6 +581,8 @@ window.__ModuleLoader__.load({
551
581
  "card.defaultPricing": "Preis außerhalb des Katalogs",
552
582
  "card.simpleTools": "Allowlist einfacher Tools (Auto-Downgrade)",
553
583
  "card.simpleToolsHint": "Durch Komma oder Leerzeichen getrennte Tool-Namen, die der internen Menge „billige und deterministische Tools“ hinzugefügt werden (z. B. shell, pwsh, web_fetch). Im Auto-Modus sinkt ein Schritt, der nur aus diesen kurzen Aufrufen besteht, auf low. Die interne Menge enthält bereits bash/terminal/shell/pwsh; nutzen Sie dieses Feld für hostspezifische Namen.",
584
+ "card.simpleToolsRegex": "Regex-Liste einfacher Tools (Auto-Downgrade)",
585
+ "card.simpleToolsRegexHint": "Ein JavaScript-Regex pro Eintrag (kein automatischer Anker — ^ selbst schreiben; Groß-/Kleinschreibung ignoriert), neben der Literal-Liste oben und in derselben Quote gezählt. Muster prüfen BOTH den vollständigen Tool-Namen und den ohne ops_ — „^ops_.*“ deckt die ganze dsh-ops-Familie auf einen Schlag ab. Ungültige Einträge werden mit einer einmaligen Warnung übersprungen.",
554
586
  "card.defaultPricingHint": "Bepreisung von Modellen ohne Katalogeintrag (inkl. Gateway-Modelle anderer Plugins); katalogisierte Modelle nutzen immer ihre Katalogpreise. Änderungen wirken nur auf neue Buchungen.",
555
587
  "card.defaultPricing.estimate": "estimate — Schätzung über Typicalpreis (unkalibriert, nur Referenz; Standard)",
556
588
  "card.defaultPricing.cn": "cn — Kalibrierungsstufe CNY (ohne Katalogeintrag weiterhin Typicalpreis-Schätzung)",
@@ -632,7 +664,11 @@ window.__ModuleLoader__.load({
632
664
  "card.dsContextTitle": "Kontextfenster der offiziellen DeepSeek-Modelle",
633
665
  "input.effort.default": "Anbieterstandard",
634
666
  "input.effort.reset": "Auf Anbieterstandard zurücksetzen",
635
- "card.capabilities.failed": "Speichern fehlgeschlagen: Der Wert wurde abgelehnt oder steht in Konflikt. Bitte überprüfen."
667
+ "card.capabilities.failed": "Speichern fehlgeschlagen: Der Wert wurde abgelehnt oder steht in Konflikt. Bitte überprüfen.",
668
+ "trace.label": "Effort-Verlauf",
669
+ "trace.empty": "In dieser Sitzung gibt es noch keine übermittelten Request-Stufen.",
670
+ "trace.intent.auto": "auto",
671
+ "trace.intent.manual": "manuell"
636
672
  };
637
673
  /** Italian dictionary (keys mirror zh). */
638
674
  const it = {
@@ -655,6 +691,8 @@ window.__ModuleLoader__.load({
655
691
  "card.defaultPricing": "Prezzi fuori catalogo",
656
692
  "card.simpleTools": "Elenco strumenti semplici (downgrade automatico)",
657
693
  "card.simpleToolsHint": "Nomi di strumenti separati da virgole o spazi, aggiunti all'insieme interno degli \"strumenti economici e deterministici\" (es. shell, pwsh, web_fetch). In modalità auto, un passo composto solo da queste chiamate brevi scende a low. L'insieme interno copre già bash/terminal/shell/pwsh; usa questo campo per nomi specifici dell'host.",
694
+ "card.simpleToolsRegex": "Lista regex strumenti semplici (downgrade auto)",
695
+ "card.simpleToolsRegexHint": "Una regex JavaScript per voce (nessun ancoraggio automatico — scrivi tu il ^; insensibile a maiuscole), a fianco della lista letterale sopra e conteggiata nello stesso rapporto. I pattern testano sia il nome completo sia il nome nudo senza ops_ — «^ops_.*» copre l'intera famiglia dsh-ops in una volta. Le voci non valide vengono saltate con un avviso una tantum.",
658
696
  "card.defaultPricingHint": "Come fatturare i modelli assenti dal catalogo (inclusi i modelli gateway di altri plugin); i modelli in catalogo usano sempre i propri prezzi. Le modifiche valgono solo per le nuove registrazioni.",
659
697
  "card.defaultPricing.estimate": "estimate — stima a prezzo tipico (non calibrata, solo indicativa; predefinito)",
660
698
  "card.defaultPricing.cn": "cn — livello calibrato CNY (fuori catalogo resta la stima a prezzo tipico)",
@@ -736,7 +774,11 @@ window.__ModuleLoader__.load({
736
774
  "card.dsContextTitle": "Finestra di contesto dei modelli DeepSeek ufficiali",
737
775
  "input.effort.default": "Predefinito del provider",
738
776
  "input.effort.reset": "Ripristina il predefinito del provider",
739
- "card.capabilities.failed": "Salvataggio non riuscito: il valore è stato rifiutato o è in conflitto. Verifica."
777
+ "card.capabilities.failed": "Salvataggio non riuscito: il valore è stato rifiutato o è in conflitto. Verifica.",
778
+ "trace.label": "Traccia degli effort",
779
+ "trace.empty": "Nessun livello di richiesta confermato in questa sessione.",
780
+ "trace.intent.auto": "auto",
781
+ "trace.intent.manual": "manuale"
740
782
  };
741
783
  /** Russian dictionary (keys mirror zh). */
742
784
  const ru = {
@@ -759,6 +801,8 @@ window.__ModuleLoader__.load({
759
801
  "card.defaultPricing": "Внекаталожное ценообразование",
760
802
  "card.simpleTools": "Список простых инструментов (понижение auto)",
761
803
  "card.simpleToolsHint": "Имена инструментов через запятую или пробел, добавляемые во встроенный набор «дешёвых и детерминированных инструментов» (напр. shell, pwsh, web_fetch). В режиме auto шаг из таких коротких вызовов понижается до low. Встроенный набор уже включает bash/terminal/shell/pwsh; используйте это поле для имён, специфичных для хоста.",
804
+ "card.simpleToolsRegex": "Regex-список простых инструментов (понижение auto)",
805
+ "card.simpleToolsRegexHint": "Одно регулярное выражение JavaScript на запись (без автозаякоривания — ^ пишите сами; без учёта регистра), рядом со литеральным списком выше и в той же доле. Шаблоны проверяют и полное имя инструмента, и имя без ops_ — «^ops_.*» покрывает всё семейство dsh-ops разом. Некорректные записи пропускаются с однократным предупреждением.",
762
806
  "card.defaultPricingHint": "Как считать модели, которых нет в каталоге цен (включая шлюзовые модели из других плагинов); каталожные модели всегда считаются по своему прайсу. Изменения влияют только на новые записи.",
763
807
  "card.defaultPricing.estimate": "estimate — оценка по типовой цене (не откалибровано, справочно; по умолчанию)",
764
808
  "card.defaultPricing.cn": "cn — калибровка CNY (вне каталога всё равно оценка по типовой цене)",
@@ -840,7 +884,11 @@ window.__ModuleLoader__.load({
840
884
  "card.dsContextTitle": "Лимиты контекста официальных моделей DeepSeek",
841
885
  "input.effort.default": "Значение провайдера по умолчанию",
842
886
  "input.effort.reset": "Вернуть значение провайдера по умолчанию",
843
- "card.capabilities.failed": "Ошибка сохранения: значение отклонено или конфликтует. Проверьте его."
887
+ "card.capabilities.failed": "Ошибка сохранения: значение отклонено или конфликтует. Проверьте его.",
888
+ "trace.label": "Трасса усилий",
889
+ "trace.empty": "В этой сессии ещё нет зафиксированных уровней запросов.",
890
+ "trace.intent.auto": "auto",
891
+ "trace.intent.manual": "вручную"
844
892
  };
845
893
  /** Spanish dictionary (keys mirror zh). */
846
894
  const es = {
@@ -863,6 +911,8 @@ window.__ModuleLoader__.load({
863
911
  "card.defaultPricing": "Precio fuera del catálogo",
864
912
  "card.simpleTools": "Lista de herramientas simples (degradación auto)",
865
913
  "card.simpleToolsHint": "Nombres de herramientas separados por comas o espacios, añadidos al conjunto interno de \"herramientas baratas y deterministas\" (p. ej. shell, pwsh, web_fetch). En modo auto, un paso compuesto solo por estas llamadas cortas baja a low. El conjunto interno ya cubre bash/terminal/shell/pwsh; use este campo para nombres propios del host.",
914
+ "card.simpleToolsRegex": "Lista regex de herramientas simples (bajada auto)",
915
+ "card.simpleToolsRegexHint": "Una expresión regular de JavaScript por entrada (sin anclaje automático — escriba su propio ^; insensible a mayúsculas), junto a la lista literal de arriba y contada en la misma proporción. Los patrones prueban tanto el nombre completo como el nombre sin ops_ — «^ops_.*» cubre toda la familia dsh-ops de una vez. Las entradas inválidas se omiten con un aviso único.",
866
916
  "card.defaultPricingHint": "Cómo facturar los modelos sin entrada en el catálogo (incluidos modelos de puerta de enlace de otros plugins); los modelos catalogados usan siempre sus precios. Los cambios solo afectan a registros nuevos.",
867
917
  "card.defaultPricing.estimate": "estimate — estimación a precio típico (sin calibrar, solo referencia; predeterminado)",
868
918
  "card.defaultPricing.cn": "cn — nivel calibrado en CNY (fuera del catálogo sigue siendo estimación a precio típico)",
@@ -944,7 +994,11 @@ window.__ModuleLoader__.load({
944
994
  "card.dsContextTitle": "Ventana de contexto de los modelos DeepSeek oficiales",
945
995
  "input.effort.default": "Predeterminado del proveedor",
946
996
  "input.effort.reset": "Restaurar el valor predeterminado del proveedor",
947
- "card.capabilities.failed": "Error al guardar: el valor fue rechazado o está en conflicto. Verifícalo."
997
+ "card.capabilities.failed": "Error al guardar: el valor fue rechazado o está en conflicto. Verifícalo.",
998
+ "trace.label": "Trazado de esfuerzo",
999
+ "trace.empty": "Aún no hay niveles de solicitud confirmados en esta sesión.",
1000
+ "trace.intent.auto": "auto",
1001
+ "trace.intent.manual": "manual"
948
1002
  };
949
1003
  /** Portuguese (pt-BR) dictionary (keys mirror zh). */
950
1004
  const pt = {
@@ -967,6 +1021,8 @@ window.__ModuleLoader__.load({
967
1021
  "card.defaultPricing": "Preço fora do catálogo",
968
1022
  "card.simpleTools": "Lista de ferramentas simples (rebaixamento automático)",
969
1023
  "card.simpleToolsHint": "Nomes de ferramentas separados por vírgula ou espaço, adicionados ao conjunto interno de \"ferramentas baratas e determinísticas\" (por exemplo shell, pwsh, web_fetch). No modo auto, uma etapa composta apenas por essas chamadas curtas desce para low. O conjunto interno já cobre bash/terminal/shell/pwsh; use este campo para nomes próprios do host.",
1024
+ "card.simpleToolsRegex": "Lista regex de ferramentas simples (rebaixamento auto)",
1025
+ "card.simpleToolsRegexHint": "Uma expressão regular JavaScript por entrada (sem âncora automática — escreva o seu ^; insensível a maiúsculas), ao lado da lista literal acima e contada na mesma razão. Os padrões testam tanto o nome completo quanto o nome sem ops_ — «^ops_.*» cobre toda a família dsh-ops de uma vez. Entradas inválidas são ignoradas com um aviso único.",
970
1026
  "card.defaultPricingHint": "Como cobrar modelos sem entrada no catálogo (incluindo modelos de gateway de outros plugins); modelos catalogados usam sempre os próprios preços. Alterações afetam apenas registros novos.",
971
1027
  "card.defaultPricing.estimate": "estimate — estimativa a preço típico (não calibrado, só referência; padrão)",
972
1028
  "card.defaultPricing.cn": "cn — nível calibrado em CNY (fora do catálogo continua sendo estimativa a preço típico)",
@@ -1048,7 +1104,11 @@ window.__ModuleLoader__.load({
1048
1104
  "card.dsContextTitle": "Janela de contexto dos modelos DeepSeek oficiais",
1049
1105
  "input.effort.default": "Padrão do provedor",
1050
1106
  "input.effort.reset": "Restaurar o padrão do provedor",
1051
- "card.capabilities.failed": "Falha ao salvar: o valor foi rejeitado ou está em conflito. Verifique-o."
1107
+ "card.capabilities.failed": "Falha ao salvar: o valor foi rejeitado ou está em conflito. Verifique-o.",
1108
+ "trace.label": "Trilha de esforço",
1109
+ "trace.empty": "Ainda não há níveis de solicitação confirmados nesta sessão.",
1110
+ "trace.intent.auto": "auto",
1111
+ "trace.intent.manual": "manual"
1052
1112
  };
1053
1113
  //#endregion
1054
1114
  //#region src/client/context-ring.tsx
@@ -1189,7 +1249,7 @@ window.__ModuleLoader__.load({
1189
1249
  fontVariantNumeric: "tabular-nums",
1190
1250
  fontFamily: "var(--ds-font-family-code, monospace)"
1191
1251
  };
1192
- const rowStyle$1 = {
1252
+ const rowStyle$2 = {
1193
1253
  display: "flex",
1194
1254
  alignItems: "center",
1195
1255
  gap: "12px",
@@ -1253,7 +1313,7 @@ window.__ModuleLoader__.load({
1253
1313
  function BillSubRow({ label, tokens, amount, color }) {
1254
1314
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1255
1315
  style: {
1256
- ...rowStyle$1,
1316
+ ...rowStyle$2,
1257
1317
  paddingLeft: "16px"
1258
1318
  },
1259
1319
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dt", {
@@ -1358,7 +1418,7 @@ window.__ModuleLoader__.load({
1358
1418
  /** One breakdown row (cache-billing's swatch-row layout). */
1359
1419
  function BreakdownRow({ label, value, color }) {
1360
1420
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1361
- style: rowStyle$1,
1421
+ style: rowStyle$2,
1362
1422
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dt", {
1363
1423
  style: rowLabelStyle,
1364
1424
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { style: swatchStyle(color) }), label]
@@ -1398,7 +1458,7 @@ window.__ModuleLoader__.load({
1398
1458
  },
1399
1459
  children: [
1400
1460
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1401
- style: rowStyle$1,
1461
+ style: rowStyle$2,
1402
1462
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
1403
1463
  style: {
1404
1464
  ...rowLabelStyle,
@@ -1436,7 +1496,7 @@ window.__ModuleLoader__.load({
1436
1496
  color: BILL_COLORS.output
1437
1497
  }),
1438
1498
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1439
- style: rowStyle$1,
1499
+ style: rowStyle$2,
1440
1500
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
1441
1501
  style: {
1442
1502
  ...rowLabelStyle,
@@ -1474,7 +1534,7 @@ window.__ModuleLoader__.load({
1474
1534
  color: BILL_COLORS.output
1475
1535
  }),
1476
1536
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1477
- style: rowStyle$1,
1537
+ style: rowStyle$2,
1478
1538
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dt", {
1479
1539
  style: {
1480
1540
  ...rowLabelStyle,
@@ -1512,7 +1572,7 @@ window.__ModuleLoader__.load({
1512
1572
  color: BILL_COLORS.output
1513
1573
  }),
1514
1574
  (billing.sessionFullMissSteps ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1515
- style: rowStyle$1,
1575
+ style: rowStyle$2,
1516
1576
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
1517
1577
  style: {
1518
1578
  ...rowLabelStyle,
@@ -1616,7 +1676,7 @@ window.__ModuleLoader__.load({
1616
1676
  })]
1617
1677
  }),
1618
1678
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1619
- style: rowStyle$1,
1679
+ style: rowStyle$2,
1620
1680
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
1621
1681
  style: rowLabelStyle,
1622
1682
  children: c.percent
@@ -1630,7 +1690,7 @@ window.__ModuleLoader__.load({
1630
1690
  })]
1631
1691
  }),
1632
1692
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1633
- style: rowStyle$1,
1693
+ style: rowStyle$2,
1634
1694
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
1635
1695
  style: rowLabelStyle,
1636
1696
  children: c.remaining
@@ -3299,6 +3359,182 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
3299
3359
  });
3300
3360
  }
3301
3361
  //#endregion
3362
+ //#region src/client/effort-trace.tsx
3363
+ /**
3364
+ * Effort-trace tab — the `conversation.view` face of dsh-thinking-levels,
3365
+ * following the conversation-view pattern dsh-perm-gate's history tab
3366
+ * demonstrates (runtime slot declared by the conversation UI package; the
3367
+ * typed SlotMap merge lives in `types/contracts.d.ts`).
3368
+ *
3369
+ * A run-length timeline of the effort levels this session's requests ACTUALLY
3370
+ * went out with — the `tlAutoSchedule` projection's `trace` (stateVersion 3),
3371
+ * the same durable fold the composer chip's `lastEffective` reads. Consecutive
3372
+ * requests with the same level AND intent collapse into one run, so even a
3373
+ * 95-step session reads as a handful of rows:
3374
+ *
3375
+ * ↑ auto max ×1
3376
+ * = auto high ×12
3377
+ * ↓ auto low ×3
3378
+ *
3379
+ * The ↑/↓/= glyph is the transition against the escalation rank of the
3380
+ * previous (older) run; the run text shows the intent (`auto`/`manual`,
3381
+ * neutral when the session never picked and the configured default applied)
3382
+ * plus the repetition count.
3383
+ *
3384
+ * Data source: the session's projection face — NO HTTP feed. The projection is
3385
+ * a pure fold over the session log, so a cold read rebuilds historical
3386
+ * sessions for free. Everything is best-effort: a missing projection face, an
3387
+ * empty trace or a throwing face read renders the empty state — a thrown
3388
+ * render would abdicate the whole tab, which is never acceptable for a
3389
+ * cosmetic view.
3390
+ */
3391
+ /** Transition glyph per direction (mirrors perm-gate's glyph table pattern). */
3392
+ const GLYPH = {
3393
+ up: "↑",
3394
+ down: "↓",
3395
+ flat: "=",
3396
+ start: "•"
3397
+ };
3398
+ /** Unknown ids rank after the standard table (same tail semantics as the slider). */
3399
+ const rankOf = (level) => EFFORT_SLIDER_RANK[level] ?? 100;
3400
+ /**
3401
+ * Build the display rows: newest run first, each carrying the transition
3402
+ * against its chronological predecessor. Pure — the component is a straight
3403
+ * map over this.
3404
+ * @param trace - the folded run-length trace, oldest run first.
3405
+ * @returns rows newest first; empty for an absent or empty trace.
3406
+ */
3407
+ function traceRows(trace) {
3408
+ if (trace === void 0 || trace.length === 0) return [];
3409
+ const rows = [];
3410
+ for (let i = trace.length - 1; i >= 0; i -= 1) {
3411
+ const run = trace[i];
3412
+ const prev = i > 0 ? trace[i - 1] : void 0;
3413
+ if (prev === void 0) {
3414
+ rows.push({
3415
+ run,
3416
+ dir: "start"
3417
+ });
3418
+ continue;
3419
+ }
3420
+ const from = rankOf(prev.level);
3421
+ const to = rankOf(run.level);
3422
+ rows.push({
3423
+ run,
3424
+ dir: to > from ? "up" : to < from ? "down" : "flat"
3425
+ });
3426
+ }
3427
+ return rows;
3428
+ }
3429
+ /**
3430
+ * Read the folded trace off the session's projection face — the exact read
3431
+ * path the composer chip's `lastEffective` uses. Returns `undefined` — never
3432
+ * throws — when the session id, the face or the field is absent (older hosts,
3433
+ * cold sessions, odd shapes).
3434
+ * @param sessions - the sessions face.
3435
+ * @param sessionId - the owning session.
3436
+ * @returns the folded run-length trace, or undefined.
3437
+ */
3438
+ function traceOf(sessions, sessionId) {
3439
+ try {
3440
+ if (typeof sessionId !== "string" || sessionId.length === 0) return void 0;
3441
+ const face = sessions?.binding(sessionId)?.session?.projections?.faceOf?.("tlAutoSchedule");
3442
+ const snapshot = typeof face?.getSnapshot === "function" ? face.getSnapshot() : void 0;
3443
+ const value = typeof snapshot === "object" && snapshot !== null ? snapshot.value : void 0;
3444
+ const raw = typeof value === "object" && value !== null ? value.trace : void 0;
3445
+ return Array.isArray(raw) ? raw : void 0;
3446
+ } catch {
3447
+ return;
3448
+ }
3449
+ }
3450
+ /**
3451
+ * Subscribe to the trace over the projection face's store when it offers one;
3452
+ * a one-shot read otherwise (the conversation re-renders around every request
3453
+ * anyway, so the one-shot cadence still tracks). `useSyncExternalStore` needs
3454
+ * a cached snapshot — the projection registry gates republishes on
3455
+ * `Object.is`, so the face's `value.trace` reference is stable between
3456
+ * publishes and the read wrapper stays honest.
3457
+ */
3458
+ function useTrace(sessions, sessionId) {
3459
+ const id = typeof sessionId === "string" && sessionId.length > 0 ? sessionId : void 0;
3460
+ const face = (0, react.useMemo)(() => {
3461
+ try {
3462
+ return id === void 0 ? void 0 : sessions?.binding(id)?.session?.projections?.faceOf?.("tlAutoSchedule");
3463
+ } catch {
3464
+ return;
3465
+ }
3466
+ }, [sessions, id]);
3467
+ const getSnapshot = (0, react.useMemo)(() => () => traceOf(sessions, id), [sessions, id]);
3468
+ const subscribe = (0, react.useMemo)(() => (listener) => {
3469
+ try {
3470
+ return typeof face?.subscribe === "function" ? face.subscribe(listener) : () => {};
3471
+ } catch {
3472
+ return () => {};
3473
+ }
3474
+ }, [face]);
3475
+ return (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
3476
+ }
3477
+ const listStyle = {
3478
+ display: "flex",
3479
+ flexDirection: "column",
3480
+ gap: 6,
3481
+ padding: 12,
3482
+ overflowY: "auto",
3483
+ font: "inherit"
3484
+ };
3485
+ const rowStyle$1 = {
3486
+ display: "flex",
3487
+ alignItems: "baseline",
3488
+ gap: 8
3489
+ };
3490
+ const glyphStyle = {
3491
+ width: 18,
3492
+ flexShrink: 0,
3493
+ textAlign: "center",
3494
+ fontFamily: "monospace",
3495
+ color: "var(--dsw-alias-text-secondary, rgba(127,127,127,0.9))"
3496
+ };
3497
+ const countStyle = {
3498
+ color: "var(--dsw-alias-text-secondary, rgba(127,127,127,0.9))",
3499
+ fontVariantNumeric: "tabular-nums"
3500
+ };
3501
+ const levelStyle = { fontFamily: "monospace" };
3502
+ /** The tab body: timeline rows newest first, or the empty state. */
3503
+ function EffortTrace(props) {
3504
+ const t = props.t ?? props.tFallback ?? ((key) => key);
3505
+ const trace = useTrace(props.sessions, props.sessionId);
3506
+ const rows = traceRows(trace);
3507
+ if (trace === void 0 || rows.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3508
+ style: listStyle,
3509
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3510
+ style: countStyle,
3511
+ children: t("trace.empty")
3512
+ })
3513
+ });
3514
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3515
+ style: listStyle,
3516
+ children: rows.map((row, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3517
+ style: rowStyle$1,
3518
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3519
+ style: glyphStyle,
3520
+ "aria-hidden": "true",
3521
+ children: GLYPH[row.dir]
3522
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
3523
+ row.run.intent === "auto" && `${t("trace.intent.auto")} `,
3524
+ row.run.intent === "manual" && `${t("trace.intent.manual")} `,
3525
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
3526
+ style: levelStyle,
3527
+ children: row.run.level
3528
+ }),
3529
+ row.run.count > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3530
+ style: countStyle,
3531
+ children: [" ×", row.run.count]
3532
+ })
3533
+ ] })]
3534
+ }, trace.length - i))
3535
+ });
3536
+ }
3537
+ //#endregion
3302
3538
  //#region src/client/card.tsx
3303
3539
  /**
3304
3540
  * Thinking-levels settings card — the family settings tab face of the
@@ -5583,6 +5819,23 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
5583
5819
  };
5584
5820
  });
5585
5821
  });
5822
+ ctx.inject(["sessions"], (scope) => {
5823
+ const sessions = scope.sessions;
5824
+ ctx.slots.inject("conversation.view", function* () {
5825
+ yield ctx.slots.register({
5826
+ name: "conversation.view",
5827
+ id: "dsh-thinking-levels.effort-trace",
5828
+ order: 25,
5829
+ label: () => t("trace.label"),
5830
+ locale: NS,
5831
+ inject: (sessionId) => ({
5832
+ sessionId,
5833
+ sessions,
5834
+ tFallback: t
5835
+ })
5836
+ }, EffortTrace);
5837
+ });
5838
+ });
5586
5839
  /** Registrant labels arrive as a string or a locale thunk; unwrap either.
5587
5840
  * A throwing thunk (e.g. a contributor whose label touches a service its own
5588
5841
  * inject never declared) must not kill the whole tab-ledger projection — fall