@lmzhen/dsh-evolution-commands 0.40.1 → 0.42.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/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import { createRequire } from "node:module";
2
- import { DEFAULT_SKILL_LIMITS, DIAGNOSTICS_FACT_KEYS, DIAGNOSTICS_RUNTIME_KEYS, DIAGNOSTICS_VIEW_SCHEMA_VERSION, EVOLUTION_PRESET_IDS, MAINTAINER_PRESET_ID, MAX_TIMER_DELAY_MS, PARAM_EXPOSURE, PARAM_GROUP_LABELS, PARAM_NAMESPACES, PLATFORM_LINE, REVIEWER_PRESET_ID, absentHostServices, appendEvolutionEvent, applyNamespaceMigration, asRecord, assertSkillsRootAliasRetired, atomicWriteFiles, authorityFrom, buildExtractPlanFromLibrary, buildLearnPrompt, canonicalWriteId, clampedNumber, classifyNamespaceMigration, classifySessionEvent, createSubagentChannel, elapsedSince, errorText, eventsFile, evolutionHome, evolutionRoot, hostSurface, isDeprecatedParamId, isPresent, isRecord, isUnknown, liveBool, mutationLockFrom, newRunRegistry, newSkillLibrary, ownerDecisionText, paramSettingsId, partitionVersions, planNamespaceMigration, policyStageLimits, probeMtime, probeText, proposalFromPlan, readProposalReport, registerOwnerSettings, reportsSweepLockTarget, resolveParamId, resolveRootConfig, scopedPackageName, scopedProbeReport, sweepReports, transactIo, unwrapLive, writeProposalReport } from "@lmzhen/dsh-evolution-core";
2
+ import { DEFAULT_SKILL_LIMITS, DIAGNOSTICS_FACT_KEYS, DIAGNOSTICS_RUNTIME_KEYS, DIAGNOSTICS_VIEW_SCHEMA_VERSION, EVOLUTION_PRESET_IDS, HOST_LOCALES, MAINTAINER_PRESET_ID, MAX_TIMER_DELAY_MS, PARAM_EXPOSURE, PARAM_GROUP_LABELS, PARAM_NAMESPACES, PLATFORM_LINE, REVIEWER_PRESET_ID, absentHostServices, appendEvolutionEvent, applyNamespaceMigration, asRecord, atomicWriteFiles, authorityFrom, buildExtractPlanFromLibrary, buildLearnPrompt, canonicalWriteId, clampedNumber, classifyNamespaceMigration, classifySessionEvent, createSubagentChannel, errorText, errorTextIn, eventsFile, evolutionHome, evolutionRoot, hostSurface, isDeprecatedParamId, isPresent, isRecord, isUnknown, liveBool, mutationLockFrom, newRunRegistry, ownerDecisionText, paramSettingsId, planNamespaceMigration, policyStageLimits, probeMtime, probeText, proposalFromPlan, readProposalReport, registerOwnerSettings, reportsSweepLockTarget, resolveParamId, scopedPackageName, scopedProbeReport, sweepReports, transactIo, unwrapLive, writeProposalReport } from "@lmzhen/dsh-evolution-core";
3
3
  import { HOST_ROUTES, json, methodNotAllowed, registerHostRoutes } from "@lmzhen/dsh-evolution-core/http-routes";
4
4
  import { existsSync, readFileSync, readdirSync } from "node:fs";
5
5
  import { dirname, join } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import z from "@deepseek-ai/schemastery";
8
8
  import { effectiveSessionPolicy } from "@lmzhen/dsh-evolution-approval";
9
- import { createUserMessage } from "@deepseek-ai/dsh-llm";
9
+ import { createUserMessage } from "@lmzhen/dsh-evolution-core/platform";
10
+ import { assertSkillsRootAliasRetired, elapsedSince, newSkillLibrary, partitionVersions, resolveRootConfig } from "@lmzhen/dsh-evolution-core/skills";
10
11
  import { composePresetEntry, mergePresetRow, presetPatchText, presetRowBlock, presetRowBody, presetRowId, resolveBasePresetPatch } from "@lmzhen/dsh-evolution-core/composition";
11
12
  import { buildEnrichment, buildMaintainFacts, enrichmentSnapshotOptions, runMaintain, snapshotFromLibrary } from "@lmzhen/dsh-evolution-maintenance";
12
13
  import { processScopeViolations } from "@lmzhen/dsh-evolution-state-storage";
@@ -631,6 +632,720 @@ function makeSettingsRoutes(getProvider) {
631
632
  }];
632
633
  }
633
634
  //#endregion
635
+ //#region lib/types/generated/host-commands.js
636
+ /**
637
+ * GENERATED by packages/scripts/gen-host-commands.mjs — do not edit.
638
+ */
639
+ const HOST_COMMANDS = {
640
+ "summary.merge": {
641
+ "zh": "技能自动合并(扫描/待批准/重跑/报告/撤销)",
642
+ "en": "Skill auto-merge (scan / pending approval / rerun / report / undo)",
643
+ "ja": "スキルの自動マージ(スキャン/承認待ち/再実行/レポート/取り消し)",
644
+ "es": "Merge automático de skills (escaneo / aprobación pendiente / nueva ejecución / informe / deshacer)",
645
+ "fr": "Fusion automatique des skills (scan / en attente d’approbation / relance / rapport / annulation)",
646
+ "de": "Skill-Auto-Merge (Scan / offene Freigaben / erneuter Lauf / Bericht / Rücknahme)",
647
+ "ru": "Автообъединение навыков (сканирование / ожидание одобрения / повторный запуск / отчёт / отмена)",
648
+ "pt": "Merge automático de skills (varredura / aguardando aprovação / reexecução / relatório / desfazer)"
649
+ },
650
+ "summary.pending": {
651
+ "zh": "列出暂存的写入(--detail 显示参数)",
652
+ "en": "List pending writes (--detail shows arguments)",
653
+ "ja": "承認待ちの書き込みを一覧表示(--detail で引数を表示)",
654
+ "es": "Listar las escrituras pendientes (--detail muestra los argumentos)",
655
+ "fr": "Lister les écritures en attente (--detail affiche les arguments)",
656
+ "de": "Ausstehende Schreibvorgänge auflisten (--detail zeigt die Argumente)",
657
+ "ru": "Показать ожидающие записи (--detail показывает аргументы)",
658
+ "pt": "Listar as escritas pendentes (--detail mostra os argumentos)"
659
+ },
660
+ "summary.approve": {
661
+ "zh": "执行一条已批准的写入",
662
+ "en": "Run an approved write",
663
+ "ja": "承認済みの書き込みを実行",
664
+ "es": "Ejecutar una escritura aprobada",
665
+ "fr": "Exécuter une écriture approuvée",
666
+ "de": "Einen freigegebenen Schreibvorgang ausführen",
667
+ "ru": "Выполнить одобренную запись",
668
+ "pt": "Executar uma escrita aprovada"
669
+ },
670
+ "summary.reject": {
671
+ "zh": "丢弃一条暂存写入,不执行",
672
+ "en": "Discard a pending write without running it",
673
+ "ja": "承認待ちの書き込みを破棄(実行しない)",
674
+ "es": "Descartar una escritura pendiente sin ejecutarla",
675
+ "fr": "Écarter une écriture en attente sans l’exécuter",
676
+ "de": "Einen ausstehenden Schreibvorgang verwerfen, ohne ihn auszuführen",
677
+ "ru": "Отбросить ожидающую запись, не выполняя её",
678
+ "pt": "Descartar uma escrita pendente sem executá-la"
679
+ },
680
+ "summary.release": {
681
+ "zh": "把卡在执行中的写入放回待批窗口(先确认效果再批准或驳回)",
682
+ "en": "Return a write stuck mid-execution to the pending list (check the result first, then approve or reject)",
683
+ "ja": "実行中に詰まった書き込みを承認待ちに戻す(結果を確認してから承認または却下)",
684
+ "es": "Devolver a pendientes una escritura atascada en ejecución (comprobar el resultado antes de aprobar o rechazar)",
685
+ "fr": "Renvoyer en attente une écriture bloquée en cours d’exécution (vérifier le résultat avant d’approuver ou de rejeter)",
686
+ "de": "Einen in der Ausführung hängenden Schreibvorgang zurück in die Freigabeliste stellen (erst das Ergebnis prüfen, dann freigeben oder ablehnen)",
687
+ "ru": "Вернуть в список на одобрение запись, застрявшую при выполнении (сначала проверить результат, затем одобрить или отклонить)",
688
+ "pt": "Devolver para pendentes uma escrita travada em execução (conferir o resultado antes de aprovar ou rejeitar)"
689
+ },
690
+ "summary.doctor": {
691
+ "zh": "只读自检:安装形态、冲突、环境、服务(--json 供脚本用)",
692
+ "en": "Read-only self-check: installation type, conflicts, environment, services (--json for scripts)",
693
+ "ja": "読み取り専用の自己診断:インストール形態、競合、環境、サービス(--json はスクリプト向け)",
694
+ "es": "Autodiagnóstico de solo lectura: tipo de instalación, conflictos, entorno y servicios (--json para scripts)",
695
+ "fr": "Autodiagnostic en lecture seule : type d’installation, conflits, environnement et services (--json pour les scripts)",
696
+ "de": "Schreibgeschützter Selbsttest: Installationstyp, Konflikte, Umgebung, Dienste (--json für Skripte)",
697
+ "ru": "Самопроверка только для чтения: тип установки, конфликты, окружение, службы (--json для скриптов)",
698
+ "pt": "Autodiagnóstico somente leitura: tipo de instalação, conflitos, ambiente e serviços (--json para scripts)"
699
+ },
700
+ "summary.curator": {
701
+ "zh": "立即运行一次自动整理,或暂停/恢复/查看状态",
702
+ "en": "Run automatic skill curation once now, or pause, resume, or check status",
703
+ "ja": "スキルの自動整理を今すぐ1回実行、または一時停止/再開/状態確認",
704
+ "es": "Ejecutar una pasada de curación automática de skills ahora, o pausarla, reanudarla o consultar su estado",
705
+ "fr": "Lancer une passe de curation automatique des skills maintenant, ou la mettre en pause, la reprendre ou consulter son état",
706
+ "de": "Automatische Skill-Pflege jetzt einmal ausführen; alternativ pausieren, fortsetzen oder Status prüfen",
707
+ "ru": "Запустить проход автоматического упорядочивания навыков сейчас или приостановить, возобновить либо проверить состояние",
708
+ "pt": "Executar uma passagem de curadoria automática de skills agora, ou pausar, retomar ou consultar o estado"
709
+ },
710
+ "summary.mutations": {
711
+ "zh": "列出技能改动记录",
712
+ "en": "List skill change records",
713
+ "ja": "スキルの変更記録を一覧表示",
714
+ "es": "Listar el historial de cambios de skills",
715
+ "fr": "Lister l’historique des modifications de skills",
716
+ "de": "Skill-Änderungen auflisten",
717
+ "ru": "Показать историю изменений навыков",
718
+ "pt": "Listar o histórico de mudanças em skills"
719
+ },
720
+ "summary.restore": {
721
+ "zh": "从最近的快照恢复技能",
722
+ "en": "Restore skills from the latest snapshot",
723
+ "ja": "最新のスナップショットからスキルを復元",
724
+ "es": "Restaurar los skills desde la instantánea más reciente",
725
+ "fr": "Restaurer les skills depuis l’instantané le plus récent",
726
+ "de": "Skills aus dem neuesten Snapshot wiederherstellen",
727
+ "ru": "Восстановить навыки из последнего снимка",
728
+ "pt": "Restaurar as skills a partir do snapshot mais recente"
729
+ },
730
+ "summary.skill restore": {
731
+ "zh": "按名字恢复一个已归档的技能",
732
+ "en": "Restore an archived skill by name",
733
+ "ja": "アーカイブ済みのスキルを名前で復元",
734
+ "es": "Restaurar por nombre un skill archivado",
735
+ "fr": "Restaurer un skill archivé par son nom",
736
+ "de": "Einen archivierten Skill anhand des Namens wiederherstellen",
737
+ "ru": "Восстановить архивный навык по имени",
738
+ "pt": "Restaurar uma skill arquivada pelo nome"
739
+ },
740
+ "summary.skill history": {
741
+ "zh": "列出某个技能的内容版本(含时间、动作、字符数、哈希前缀)",
742
+ "en": "List a skill's content versions (time, action, character count, hash prefix)",
743
+ "ja": "スキルの内容のバージョンを一覧表示(時刻、操作、文字数、ハッシュ接頭辞)",
744
+ "es": "Listar las versiones del contenido de un skill (fecha y hora, acción, número de caracteres y prefijo del hash)",
745
+ "fr": "Lister les versions du contenu d’un skill (date, action, nombre de caractères, préfixe de hash)",
746
+ "de": "Inhaltsversionen eines Skills auflisten (Zeitpunkt, Aktion, Zeichenzahl, Hash-Präfix)",
747
+ "ru": "Показать версии содержимого навыка (время, действие, число символов, префикс хеша)",
748
+ "pt": "Listar as versões do conteúdo de uma skill (horário, ação, contagem de caracteres, prefixo do hash)"
749
+ },
750
+ "summary.skill undo": {
751
+ "zh": "把某个技能的内容回退到某一版(默认上一版;只动内容,撤销本身也记为一版)",
752
+ "en": "Revert a skill's content to a version (the previous one by default; only the content changes, and the revert itself counts as a version)",
753
+ "ja": "スキルの内容を指定バージョンに戻す(既定は直前の版。変わるのは内容のみで、戻す操作自体も1バージョンとして記録)",
754
+ "es": "Restaurar el contenido de un skill a una versión (la anterior por defecto; solo cambia el contenido y la restauración cuenta como una versión más)",
755
+ "fr": "Restaurer le contenu d’un skill à une version (la précédente par défaut ; seul le contenu change, et la restauration compte elle-même comme une version)",
756
+ "de": "Den Inhalt eines Skills auf eine Version zurücksetzen (standardmäßig die vorherige; nur der Inhalt ändert sich, und das Zurücksetzen zählt selbst als Version)",
757
+ "ru": "Вернуть содержимое навыка к версии (по умолчанию к предыдущей; меняется только содержимое, а сам откат считается ещё одной версией)",
758
+ "pt": "Reverter o conteúdo de uma skill para uma versão (a anterior por padrão; só o conteúdo muda, e a própria reversão conta como versão)"
759
+ },
760
+ "summary.skill pin": {
761
+ "zh": "钉住一个技能:免于删除、后台审查与生命周期整理(立即生效、随时可解钉;与 skill_manage 的 pin 动作同一语义,不走审批)",
762
+ "en": "Pin a skill: exempt from deletion, background review, and lifecycle curation (takes effect immediately and can be unpinned anytime; same semantics as skill_manage's pin action, no approval needed)",
763
+ "ja": "スキルをピン留め:削除・バックグラウンドレビュー・ライフサイクル整理の対象外にする(即時反映、ピン留めはいつでも解除可。skill_manage の pin と同じ意味で、承認は不要)",
764
+ "es": "Fijar un skill: queda exento de borrado, revisión en segundo plano y curación del ciclo de vida (surte efecto al instante y se puede desfijar cuando quieras; misma semántica que la acción pin de skill_manage, sin aprobación)",
765
+ "fr": "Épingler un skill : il échappe à la suppression, à la revue en arrière-plan et à la curation du cycle de vie (effet immédiat, désépinglage possible à tout moment ; même sémantique que l’action pin de skill_manage, sans approbation)",
766
+ "de": "Einen Skill anheften: ausgenommen von Löschung, Hintergrund-Review und Lebenszyklus-Pflege (sofort wirksam, jederzeit lösbar; dieselbe Semantik wie die pin-Aktion von skill_manage, keine Freigabe nötig)",
767
+ "ru": "Закрепить навык: на него не распространяются удаление, фоновый обзор и упорядочивание жизненного цикла (действует сразу, открепить можно в любой момент; та же семантика, что у действия pin в skill_manage, без одобрения)",
768
+ "pt": "Fixar uma skill: isenta de exclusão, revisão em segundo plano e curadoria do ciclo de vida (efeito imediato, pode ser desafixada a qualquer momento; mesma semântica da ação pin do skill_manage, sem aprovação)"
769
+ },
770
+ "summary.skill unpin": {
771
+ "zh": "解钉一个技能:撤销上面的冻结(立即生效、不走审批)",
772
+ "en": "Unpin a skill: lift the freeze (takes effect immediately, no approval needed)",
773
+ "ja": "スキルのピン留めを解除:凍結を解除する(即時反映、承認不要)",
774
+ "es": "Desfijar un skill: levanta el bloqueo (surte efecto al instante, sin aprobación)",
775
+ "fr": "Désépingler un skill : lève le gel (effet immédiat, sans approbation)",
776
+ "de": "Einen Skill lösen: hebt die Sperre auf (sofort wirksam, keine Freigabe nötig)",
777
+ "ru": "Открепить навык: снять заморозку (действует сразу, без одобрения)",
778
+ "pt": "Desafixar uma skill: remove o congelamento (efeito imediato, sem aprovação)"
779
+ },
780
+ "summary.propose": {
781
+ "zh": "为 body-oversize 技能写 keep 提议(不自动拆分;同一 reports store)",
782
+ "en": "Write a keep proposal for body-oversize skills (no automatic split; the same reports store)",
783
+ "ja": "body-oversize のスキルに keep の提案を書き出す(自動分割なし。reports store は共通)",
784
+ "es": "Escribir una propuesta keep para los skills body-oversize (sin división automática; el mismo reports store)",
785
+ "fr": "Écrire une proposition keep pour les skills body-oversize (pas de découpage automatique ; le même reports store)",
786
+ "de": "Einen keep-Vorschlag für body-oversize-Skills schreiben (keine automatische Aufteilung; derselbe reports store)",
787
+ "ru": "Записать предложение keep для навыков body-oversize (без автоматического разделения; тот же reports store)",
788
+ "pt": "Gravar uma proposta keep para skills body-oversize (sem divisão automática; o mesmo reports store)"
789
+ },
790
+ "summary.skills health": {
791
+ "zh": "技能库结构体检",
792
+ "en": "Structural health check of the skill library",
793
+ "ja": "スキルライブラリの構造チェック",
794
+ "es": "Revisión estructural de la biblioteca de skills",
795
+ "fr": "Contrôle structurel de la bibliothèque de skills",
796
+ "de": "Strukturprüfung der Skill-Bibliothek",
797
+ "ru": "Проверка структуры библиотеки навыков",
798
+ "pt": "Verificação estrutural da biblioteca de skills"
799
+ },
800
+ "summary.skills refresh": {
801
+ "zh": "丢弃目录缓存并重新读取技能树",
802
+ "en": "Drop the catalog cache and reread the skill tree",
803
+ "ja": "カタログキャッシュを破棄してスキルツリーを読み直す",
804
+ "es": "Descartar la caché del catálogo y releer el árbol de skills",
805
+ "fr": "Vider le cache du catalogue et relire l’arborescence des skills",
806
+ "de": "Den Katalog-Cache verwerfen und den Skill-Baum neu einlesen",
807
+ "ru": "Сбросить кеш каталога и перечитать дерево навыков",
808
+ "pt": "Descartar o cache do catálogo e reler a árvore de skills"
809
+ },
810
+ "summary.learn": {
811
+ "zh": "向本会话发一条学习请求",
812
+ "en": "Send a learning request to this session",
813
+ "ja": "このセッションに学習リクエストを送る",
814
+ "es": "Enviar una solicitud de aprendizaje a esta sesión",
815
+ "fr": "Envoyer une demande d’apprentissage à cette session",
816
+ "de": "Eine Lernanfrage an diese Sitzung senden",
817
+ "ru": "Отправить запрос на обучение в эту сессию",
818
+ "pt": "Enviar uma solicitação de aprendizado para esta sessão"
819
+ },
820
+ "summary.maintain": {
821
+ "zh": "起一次维护扫描并立即回 run id(后台跑;--facts 为 0 token 预览)",
822
+ "en": "Start a maintenance scan and return the run id immediately (runs in the background; --facts is a 0-token preview)",
823
+ "ja": "メンテナンススキャンを開始し、実行 ID をすぐ返す(バックグラウンド実行。--facts は0トークンのプレビュー)",
824
+ "es": "Iniciar un escaneo de mantenimiento y devolver el ID de ejecución al momento (corre en segundo plano; --facts es una vista previa de 0 tokens)",
825
+ "fr": "Lancer un scan de maintenance et renvoyer aussitôt l’ID d’exécution (s’exécute en arrière-plan ; --facts est un aperçu à 0 token)",
826
+ "de": "Einen Wartungsscan starten und sofort die Run-ID zurückgeben (läuft im Hintergrund; --facts ist eine Vorschau mit 0 Token)",
827
+ "ru": "Запустить служебное сканирование и сразу вернуть ID запуска (работает в фоне; --facts — предпросмотр без токенов)",
828
+ "pt": "Iniciar uma varredura de manutenção e devolver o ID da execução na hora (roda em segundo plano; --facts é uma prévia com 0 token)"
829
+ },
830
+ "summary.maintain status": {
831
+ "zh": "看维护扫描:在飞的那次(含已跑多久)或某个 run 的终态",
832
+ "en": "Show maintenance scans: the in-flight run (and how long it has been running) or a run's final state",
833
+ "ja": "メンテナンススキャンを表示:実行中の回(経過時間を含む)または実行の終了状態",
834
+ "es": "Ver los escaneos de mantenimiento: el que está en curso (y cuánto lleva) o el estado final de una ejecución",
835
+ "fr": "Voir les scans de maintenance : celui en cours (et sa durée) ou l’état final d’une exécution",
836
+ "de": "Wartungsscans anzeigen: den laufenden (inklusive Laufzeit) oder den Endzustand eines Runs",
837
+ "ru": "Показать служебные сканирования: текущее (и сколько уже идёт) или конечное состояние запуска",
838
+ "pt": "Ver as varreduras de manutenção: a que está em andamento (e há quanto tempo) ou o estado final de uma execução"
839
+ },
840
+ "summary.maintain report": {
841
+ "zh": "读某个 run 的结果正文(省略 id 取本 home 最新一条;没有结果就明说,不装成空结果)",
842
+ "en": "Read a run's result body (omit the id for the latest one in this home; say so when there's no result instead of faking an empty one)",
843
+ "ja": "実行の結果本文を読む(id を省略するとこの home の最新。結果がなければ空の結果を装わず、そのまま伝える)",
844
+ "es": "Leer el texto del resultado de una ejecución (omite el id para la más reciente de este home; si no hay resultado, dilo sin fingir un resultado vacío)",
845
+ "fr": "Lire le texte du résultat d’une exécution (sans ID, la plus récente de ce home ; s’il n’y a pas de résultat, le dire au lieu de faire passer un résultat vide)",
846
+ "de": "Den Ergebnistext eines Runs lesen (ohne ID den neuesten in diesem Home; gibt es kein Ergebnis, das sagen statt ein leeres vorzutäuschen)",
847
+ "ru": "Прочитать текст результата запуска (без id — последнее в этом home; если результата нет, сказать прямо, а не изображать пустой результат)",
848
+ "pt": "Ler o texto do resultado de uma execução (omita o id para a mais recente deste home; se não houver resultado, dizer isso sem fingir um resultado vazio)"
849
+ },
850
+ "summary.maintain handoff": {
851
+ "zh": "把某次维护报告交给模型:注入指针与汇报协议,模型只汇报、等你确认后再动手",
852
+ "en": "Hand a maintenance report to the model: inject a pointer and a reporting protocol; the model only reports and waits for your confirmation before acting",
853
+ "ja": "メンテナンスレポートをモデルに渡す:ポインタと報告プロトコルを注入し、モデルは報告のみ行い、あなたの確認を待ってから動く",
854
+ "es": "Pasar un informe de mantenimiento al modelo: inyecta un puntero y un protocolo de informe; el modelo solo informa y espera tu confirmación antes de actuar",
855
+ "fr": "Transmettre un rapport de maintenance au modèle : injecter un pointeur et un protocole de compte rendu ; le modèle se contente de rapporter et attend votre feu vert avant d’agir",
856
+ "de": "Einen Wartungsbericht an das Modell übergeben: einen Verweis und ein Berichtsprotokoll injizieren; das Modell berichtet nur und wartet auf deine Freigabe, bevor es etwas tut",
857
+ "ru": "Передать отчёт служебного сканирования модели: внедрить ссылку и протокол отчёта; модель только докладывает и ждёт вашего подтверждения, прежде чем действовать",
858
+ "pt": "Passar um relatório de manutenção ao modelo: injeta uma referência e um protocolo de relato; o modelo só relata e espera sua confirmação antes de agir"
859
+ },
860
+ "summary.maintain cancel": {
861
+ "zh": "停掉在飞的那次维护扫描(省略 id 仅当最新一条是本进程在跑的那次)",
862
+ "en": "Stop the in-flight maintenance scan (omit the id only when the latest run is the one this process is running)",
863
+ "ja": "実行中のメンテナンススキャンを停止(id を省略できるのは、最新がこのプロセスで実行中の回のときだけ)",
864
+ "es": "Detener el escaneo de mantenimiento en curso (omite el id solo si la última ejecución es la que corre en este proceso)",
865
+ "fr": "Arrêter le scan de maintenance en cours (n’omettre l’ID que si la dernière exécution est celle lancée par ce processus)",
866
+ "de": "Den laufenden Wartungsscan stoppen (die ID nur weglassen, wenn der neueste Run der ist, den dieser Prozess gerade ausführt)",
867
+ "ru": "Остановить текущее служебное сканирование (id можно опустить, только если последнее — запуск, идущий в этом процессе)",
868
+ "pt": "Parar a varredura de manutenção em andamento (omita o id só se a última execução for a que roda neste processo)"
869
+ },
870
+ "summary.migrate": {
871
+ "zh": "把旧设置文档里家族的旧分区迁进现在的行(幂等;已迁移过就报「已一致」)",
872
+ "en": "Move the family's old namespaces from the legacy settings document into the current rows (idempotent; reports “already consistent” when already migrated)",
873
+ "ja": "旧設定ドキュメントにあるファミリーの旧名前空間を現在の行へ移す(冪等。移行済みなら「整合済み」と報告)",
874
+ "es": "Mover los espacios de nombres antiguos de la familia del documento de ajustes heredado a las filas actuales (idempotente; si ya se migró, informa de que «ya está alineado»)",
875
+ "fr": "Déplacer les anciens espaces de noms de la famille du document de paramètres hérité vers les lignes actuelles (idempotent ; signale « déjà aligné » si la migration a déjà eu lieu)",
876
+ "de": "Die alten Namespaces der Familie aus dem alten Einstellungsdokument in die aktuellen Zeilen übernehmen (idempotent; meldet „bereits konsistent“, wenn schon migriert)",
877
+ "ru": "Перенести старые пространства имён семейства из старого документа настроек в текущие строки (идемпотентно; если уже перенесено, сообщает «уже совпадает»)",
878
+ "pt": "Mover os namespaces antigos da família do documento de configurações legado para as linhas atuais (idempotente; se já migrado, informa “já consistente”)"
879
+ },
880
+ "summary.policy set": {
881
+ "zh": "通过设置服务写入一个你可改的参数 (仅 E3;E1/E2 仍留在 cordis.yml)",
882
+ "en": "Write a parameter you can change through the settings service (E3 only; E1/E2 stay in cordis.yml)",
883
+ "ja": "設定サービス経由で変更できるパラメータを書き込む(E3 のみ。E1/E2 は cordis.yml のまま)",
884
+ "es": "Escribir un parámetro que puedes cambiar mediante el servicio de ajustes (solo E3; E1/E2 siguen en cordis.yml)",
885
+ "fr": "Écrire un paramètre que vous pouvez modifier via le service de paramètres (E3 uniquement ; E1/E2 restent dans cordis.yml)",
886
+ "de": "Einen von dir änderbaren Parameter über den Einstellungsdienst schreiben (nur E3; E1/E2 bleiben in cordis.yml)",
887
+ "ru": "Записать изменяемый вами параметр через службу настроек (только E3; E1/E2 остаются в cordis.yml)",
888
+ "pt": "Gravar um parâmetro que você pode alterar pelo serviço de configurações (somente E3; E1/E2 ficam em cordis.yml)"
889
+ },
890
+ "summary.params": {
891
+ "zh": "列出全部参数:分组、档位、生效时机、来源与当前值(--json 便于脚本处理)",
892
+ "en": "List all parameters: group, tier, when they take effect, source, and current value (--json for scripts)",
893
+ "ja": "全パラメータを一覧表示:グループ、ティア、反映タイミング、取得元、現在値(--json はスクリプト向け)",
894
+ "es": "Listar todos los parámetros: grupo, nivel, cuándo aplican, origen y valor actual (--json para scripts)",
895
+ "fr": "Lister tous les paramètres : groupe, palier, moment d’application, source et valeur actuelle (--json pour les scripts)",
896
+ "de": "Alle Parameter auflisten: Gruppe, Stufe, wann sie greifen, Quelle und aktueller Wert (--json für Skripte)",
897
+ "ru": "Показать все параметры: группа, уровень, когда вступают в силу, источник и текущее значение (--json для скриптов)",
898
+ "pt": "Listar todos os parâmetros: grupo, nível, quando entram em vigor, origem e valor atual (--json para scripts)"
899
+ },
900
+ "summary.preset install": {
901
+ "zh": "把自进化 Agent 预设**行**写进当前 profile 的 patch 层(`profiles/<p>/cordis.patch.yml`;bases 来自 agent 包的 bases.json)",
902
+ "en": "Write the self-evolution Agent preset **row** into the current profile's patch layer (`profiles/<p>/cordis.patch.yml`; bases come from the agent package's bases.json)",
903
+ "ja": "自己進化 Agent プリセットの**行**を現在のプロファイルのパッチ層に書き込む(`profiles/<p>/cordis.patch.yml`。bases は agent パッケージの bases.json から)",
904
+ "es": "Escribir la **fila** del preset Agent de autoevolución en la capa de parches del perfil actual (`profiles/<p>/cordis.patch.yml`; las bases vienen del bases.json del paquete agent)",
905
+ "fr": "Écrire la **ligne** du preset Agent de l’auto-évolution dans la couche de patchs du profil actuel (`profiles/<p>/cordis.patch.yml` ; les bases viennent du bases.json du paquet agent)",
906
+ "de": "Die **Zeile** des Selbstevolution-Agent-Presets in die Patch-Ebene des aktuellen Profils schreiben (`profiles/<p>/cordis.patch.yml`; die Bases stammen aus der bases.json des agent-Pakets)",
907
+ "ru": "Записать **строку** пресета Agent самоэволюции в слой патчей текущего профиля (`profiles/<p>/cordis.patch.yml`; bases берутся из bases.json пакета agent)",
908
+ "pt": "Gravar a **linha** do preset Agent de autoevolução na camada de patches do perfil atual (`profiles/<p>/cordis.patch.yml`; as bases vêm do bases.json do pacote agent)"
909
+ },
910
+ "summary.restructure": {
911
+ "zh": "把技能正文的一节移到 references 文件",
912
+ "en": "Move one section of a skill body into a references file",
913
+ "ja": "スキル本文の1セクションを references ファイルへ移す",
914
+ "es": "Mover una sección del cuerpo de un skill a un archivo de references",
915
+ "fr": "Déplacer une section du corps d’un skill vers un fichier references",
916
+ "de": "Einen Abschnitt des Skill-Textes in eine references-Datei verschieben",
917
+ "ru": "Перенести один раздел текста навыка в файл references",
918
+ "pt": "Mover uma seção do corpo de uma skill para um arquivo references"
919
+ },
920
+ "summary.extract": {
921
+ "zh": "预览把源技能的可复用部分提取到已有类级 owner;默认 plan,--apply 才写(多根一次事务)",
922
+ "en": "Preview extracting a source skill's reusable part into an existing class-level owner; by default it produces a plan, and only --apply writes (multiple roots in one transaction)",
923
+ "ja": "元スキルの再利用できる部分を既存のクラス担当スキルへ抽出するプレビュー(既定は plan のみ、--apply で書き込み。複数ルートを1トランザクション)",
924
+ "es": "Previsualizar la extracción de la parte reutilizable de un skill de origen a un skill existente que ya cubre esa clase; por defecto solo genera un plan y solo --apply escribe (varias raíces en una transacción)",
925
+ "fr": "Prévisualiser l’extraction de la partie réutilisable d’un skill d’origine vers un skill existant qui couvre déjà la classe ; par défaut, elle produit un plan et seul --apply écrit (plusieurs racines en une transaction)",
926
+ "de": "In der Vorschau zeigen, wie der wiederverwendbare Teil eines Quell-Skills in einen vorhandenen Skill, der die Klasse abdeckt, extrahiert wird; standardmäßig entsteht nur ein Plan, und erst --apply schreibt (mehrere Roots in einer Transaktion)",
927
+ "ru": "Показать предпросмотр извлечения переиспользуемой части исходного навыка в существующий навык, покрывающий этот класс; по умолчанию только план, запись — с --apply (несколько корней в одной транзакции)",
928
+ "pt": "Pré-visualizar a extração da parte reutilizável de uma skill de origem para uma skill existente que já cobre a classe; por padrão gera só o plano e --apply é que grava (várias raízes em uma transação)"
929
+ },
930
+ "summary.replay": {
931
+ "zh": "比较不同会话与重启之间的计划结果(从活动记录回填)",
932
+ "en": "Compare plan results across sessions and restarts (backfilled from the activity log)",
933
+ "ja": "セッションや再起動をまたいで計画結果を比較(活動ログから補完)",
934
+ "es": "Comparar los resultados de los planes entre sesiones y reinicios (rellenados desde el registro de actividad)",
935
+ "fr": "Comparer les résultats des plans entre sessions et redémarrages (complétés depuis le journal d’activité)",
936
+ "de": "Plan-Ergebnisse über Sitzungen und Neustarts hinweg vergleichen (aus dem Aktivitätsprotokoll nachgetragen)",
937
+ "ru": "Сравнить результаты планов между сессиями и перезапусками (дополняются из журнала активности)",
938
+ "pt": "Comparar os resultados dos planos entre sessões e reinícios (preenchidos a partir do registro de atividade)"
939
+ },
940
+ "help.header": {
941
+ "zh": "自进化:记忆、技能、会话回顾、技能整理——状态、待批准写入与维护。",
942
+ "en": "Self-evolution: memory, skills, session review, skill curation — status, pending writes, and maintenance.",
943
+ "ja": "自己進化:記憶、スキル、セッションのレビュー、スキル整理 — 状態、承認待ちの書き込み、メンテナンス。",
944
+ "es": "Evolución: memoria, skills, revisión de sesiones y curación de skills — estado, escrituras pendientes y mantenimiento.",
945
+ "fr": "Auto-évolution : mémoire, skills, revue de session, curation des skills — état, écritures en attente et maintenance.",
946
+ "de": "Selbstevolution: Gedächtnis, Skills, Session-Review und Skill-Pflege — Status, ausstehende Schreibvorgänge und Wartung.",
947
+ "ru": "Самоэволюция: память, навыки, обзор сессий, упорядочивание навыков — состояние, ожидающие записи и обслуживание.",
948
+ "pt": "Autoevolução: memória, skills, revisão de sessões e curadoria de skills — estado, escritas pendentes e manutenção."
949
+ },
950
+ "help.unknown": {
951
+ "zh": "不是本构建能应答的子命令(已知子命令但缺参数也会落到这里)。",
952
+ "en": "is not a subcommand this build can answer (a known subcommand with missing arguments lands here too).",
953
+ "ja": "は本ビルドで応答できるサブコマンドではありません(既知のサブコマンドでも引数が足りない場合はここに表示されます)。",
954
+ "es": "no es un subcomando que esta compilación pueda atender (un subcomando conocido sin argumentos también acaba aquí).",
955
+ "fr": "n’est pas une sous-commande que ce build peut traiter (une sous-commande connue avec des arguments manquants finit aussi ici).",
956
+ "de": "ist kein Unterbefehl, den dieser Build beantworten kann (ein bekannter Unterbefehl mit fehlenden Argumenten landet ebenfalls hier).",
957
+ "ru": "не является подкомандой, которую эта сборка может обработать (известная подкоманда без аргументов тоже попадает сюда).",
958
+ "pt": "não é um subcomando que esta compilação consegue atender (um subcomando conhecido sem argumentos também cai aqui)."
959
+ },
960
+ "doctor.status.ok": {
961
+ "zh": "正常",
962
+ "en": "OK",
963
+ "ja": "正常",
964
+ "es": "correcto",
965
+ "fr": "sain",
966
+ "de": "OK",
967
+ "ru": "в норме",
968
+ "pt": "saudável"
969
+ },
970
+ "doctor.status.warn": {
971
+ "zh": "注意",
972
+ "en": "Warning",
973
+ "ja": "注意",
974
+ "es": "requiere atención",
975
+ "fr": "à surveiller",
976
+ "de": "Achtung",
977
+ "ru": "требует внимания",
978
+ "pt": "atenção"
979
+ },
980
+ "doctor.status.fail": {
981
+ "zh": "异常",
982
+ "en": "Error",
983
+ "ja": "異常",
984
+ "es": "con error",
985
+ "fr": "en échec",
986
+ "de": "Fehler",
987
+ "ru": "сбой",
988
+ "pt": "falha"
989
+ },
990
+ "doctor.status.unknown": {
991
+ "zh": "未知",
992
+ "en": "Unknown",
993
+ "ja": "不明",
994
+ "es": "desconocido",
995
+ "fr": "inconnu",
996
+ "de": "Unbekannt",
997
+ "ru": "неизвестно",
998
+ "pt": "desconhecido"
999
+ },
1000
+ "doctor.pending": {
1001
+ "zh": "待批:",
1002
+ "en": "Pending: ",
1003
+ "ja": "承認待ち:",
1004
+ "es": "Pendientes: ",
1005
+ "fr": "En attente : ",
1006
+ "de": "Ausstehend: ",
1007
+ "ru": "Ожидают: ",
1008
+ "pt": "Pendentes: "
1009
+ },
1010
+ "doctor.executing": {
1011
+ "zh": "执行中:",
1012
+ "en": "Running: ",
1013
+ "ja": "実行中:",
1014
+ "es": "En ejecución: ",
1015
+ "fr": "En cours : ",
1016
+ "de": "Laufend: ",
1017
+ "ru": "Выполняется: ",
1018
+ "pt": "Em execução: "
1019
+ },
1020
+ "doctor.supplement": {
1021
+ "zh": "补充检查(view 未覆盖的运行时事实):",
1022
+ "en": "Supplemental checks (runtime facts the view does not cover):",
1023
+ "ja": "補足チェック(ビューが扱わない実行時情報):",
1024
+ "es": "Comprobaciones adicionales (datos de ejecución que la vista no cubre):",
1025
+ "fr": "Vérifications complémentaires (faits d’exécution non couverts par la vue) :",
1026
+ "de": "Ergänzende Prüfungen (Laufzeitfakten, die die Ansicht nicht abdeckt):",
1027
+ "ru": "Дополнительные проверки (факты выполнения, не охваченные представлением):",
1028
+ "pt": "Verificações complementares (fatos de execução não cobertos pela visualização):"
1029
+ },
1030
+ "doctor.diagnosticsHeader": {
1031
+ "zh": "诊断(schema v{version},生成于 {at}):",
1032
+ "en": "Diagnostics (schema v{version}, generated {at}):",
1033
+ "ja": "診断(schema v{version}、{at} 生成):",
1034
+ "es": "Diagnóstico (schema v{version}, generado el {at}):",
1035
+ "fr": "Diagnostic (schéma v{version}, généré le {at}) :",
1036
+ "de": "Diagnose (Schema v{version}, erzeugt am {at}):",
1037
+ "ru": "Диагностика (схема v{version}, создано {at}):",
1038
+ "pt": "Diagnóstico (schema v{version}, gerado em {at}):"
1039
+ },
1040
+ "doctor.facts": {
1041
+ "zh": " 事实:",
1042
+ "en": " Facts:",
1043
+ "ja": " 事実:",
1044
+ "es": " Datos:",
1045
+ "fr": " Faits :",
1046
+ "de": " Fakten:",
1047
+ "ru": " Факты:",
1048
+ "pt": " Fatos:"
1049
+ },
1050
+ "doctor.runtime": {
1051
+ "zh": " 运行时:",
1052
+ "en": " Runtime:",
1053
+ "ja": " 実行時:",
1054
+ "es": " Ejecución:",
1055
+ "fr": " Exécution :",
1056
+ "de": " Laufzeit:",
1057
+ "ru": " Выполнение:",
1058
+ "pt": " Execução:"
1059
+ },
1060
+ "doctor.source": {
1061
+ "zh": "(出处:{home})",
1062
+ "en": " (source: {home})",
1063
+ "ja": "(出典:{home})",
1064
+ "es": " (origen: {home})",
1065
+ "fr": " (source : {home})",
1066
+ "de": " (Quelle: {home})",
1067
+ "ru": " (источник: {home})",
1068
+ "pt": " (origem: {home})"
1069
+ },
1070
+ "doctor.nextStep": {
1071
+ "zh": ";下一步:",
1072
+ "en": "; next step: ",
1073
+ "ja": "。次の手順:",
1074
+ "es": "; siguiente paso: ",
1075
+ "fr": " ; étape suivante : ",
1076
+ "de": "; nächster Schritt: ",
1077
+ "ru": "; следующий шаг: ",
1078
+ "pt": "; próximo passo: "
1079
+ },
1080
+ "doctor.presetLine": {
1081
+ "zh": "preset: {base} → {destination} {verdict}",
1082
+ "en": "preset: {base} → {destination} {verdict}",
1083
+ "ja": "preset: {base} → {destination} {verdict}",
1084
+ "es": "preset: {base} → {destination} {verdict}",
1085
+ "fr": "preset: {base} → {destination} {verdict}",
1086
+ "de": "preset: {base} → {destination} {verdict}",
1087
+ "ru": "preset: {base} → {destination} {verdict}",
1088
+ "pt": "preset: {base} → {destination} {verdict}"
1089
+ },
1090
+ "doctor.presetFresh": {
1091
+ "zh": "最新 — 新生成的版本与此文件逐字节一致",
1092
+ "en": "fresh — a fresh generation matches this file byte-for-byte",
1093
+ "ja": "最新 — 新しく生成した内容がこのファイルとバイト単位で一致します",
1094
+ "es": "actualizado — una generación nueva coincide byte por byte con este archivo",
1095
+ "fr": "à jour — une nouvelle génération correspond octet pour octet à ce fichier",
1096
+ "de": "aktuell — eine neue Erzeugung stimmt bytegenau mit dieser Datei überein",
1097
+ "ru": "актуально — новая генерация совпадает с файлом побайтно",
1098
+ "pt": "atualizado — uma nova geração corresponde byte a byte a este arquivo"
1099
+ },
1100
+ "doctor.presetDiffers": {
1101
+ "zh": "与最新生成不同 — 这是安装时快照;重新运行安装器(/evolution preset install)以重新生成",
1102
+ "en": "DIFFERS from a fresh generation — it is an install-time snapshot; re-run the installer (/evolution preset install) to regenerate",
1103
+ "ja": "最新の生成結果と異なります — インストール時のスナップショットです。インストーラー(/evolution preset install)を再実行して再生成してください",
1104
+ "es": "DIFIERE de una generación nueva — es una instantánea del momento de instalar; vuelve a ejecutar el instalador (/evolution preset install) para regenerarla",
1105
+ "fr": "DIFFÈRE d’une nouvelle génération — c’est un instantané de l’installation ; relancez l’installateur (/evolution preset install) pour la régénérer",
1106
+ "de": "WEICHT von einer neuen Erzeugung ab — es ist ein Installations-Snapshot; Installer erneut ausführen (/evolution preset install), um ihn neu zu erzeugen",
1107
+ "ru": "ОТЛИЧАЕТСЯ от новой генерации — это снимок на момент установки; запустите установщик повторно (/evolution preset install)",
1108
+ "pt": "DIFERE de uma nova geração — é um instantâneo do momento da instalação; execute o instalador novamente (/evolution preset install)"
1109
+ },
1110
+ "doctor.presetUnknown": {
1111
+ "zh": "未知 — 无法重新生成({detail})",
1112
+ "en": "unknown — a fresh generation could not be recomputed ({detail})",
1113
+ "ja": "不明 — 新しい生成を再計算できませんでした({detail})",
1114
+ "es": "desconocido — no se pudo recalcular una generación nueva ({detail})",
1115
+ "fr": "inconnu — une nouvelle génération n’a pas pu être recalculée ({detail})",
1116
+ "de": "unbekannt — eine neue Erzeugung konnte nicht berechnet werden ({detail})",
1117
+ "ru": "неизвестно — не удалось пересчитать новую генерацию ({detail})",
1118
+ "pt": "desconhecido — não foi possível recalcular uma nova geração ({detail})"
1119
+ },
1120
+ "command.pending.ttl": {
1121
+ "zh": "\n(暂存写入 {ttl} 毫秒后过期:过期即关闭为 REJECTED,且永不执行。若仍需要,请重新暂存。)",
1122
+ "en": "\n(staged writes expire after {ttl} ms: expiry closes them as REJECTED and they never run; stage again if still needed)",
1123
+ "ja": "\n(ステージ済みの書き込みは {ttl} ミリ秒で期限切れになります。期限切れは REJECTED として閉じられ、実行されません。必要なら再ステージしてください)",
1124
+ "es": "\n(las escrituras en espera caducan a los {ttl} ms: al caducar se cierran como REJECTED y nunca se ejecutan; vuelve a prepararlas si aún las necesitas)",
1125
+ "fr": "\n(les écritures en attente expirent après {ttl} ms : à l’expiration elles sont closes en REJECTED et ne s’exécutent jamais ; préparez-les à nouveau si nécessaire)",
1126
+ "de": "\n(ausstehende Schreibvorgänge verfallen nach {ttl} ms: danach werden sie als REJECTED geschlossen und nie ausgeführt; bei Bedarf erneut vorbereiten)",
1127
+ "ru": "\n(ожидающие записи истекают через {ttl} мс: после этого они закрываются как REJECTED и никогда не выполняются; при необходимости подготовьте их снова)",
1128
+ "pt": "\n(as escritas pendentes expiram após {ttl} ms: ao expirar são encerradas como REJECTED e nunca são executadas; prepare novamente se ainda precisar)"
1129
+ },
1130
+ "command.pending.neverExpires": {
1131
+ "zh": "\n(暂存写入不会过期 —— 窗口一直等决定;可在 evolution-approval 行设置 pendingTtlMs 来限定)",
1132
+ "en": "\n(staged writes never expire — the window waits for a decision; set pendingTtlMs on the evolution-approval row to bound it)",
1133
+ "ja": "\n(ステージ済みの書き込みは期限切れになりません。判断があるまで待機します。evolution-approval 行の pendingTtlMs で上限を設定できます)",
1134
+ "es": "\n(las escrituras en espera no caducan: la ventana espera una decisión; define pendingTtlMs en la fila evolution-approval para limitarla)",
1135
+ "fr": "\n(les écritures en attente n’expirent jamais : la fenêtre attend une décision ; définissez pendingTtlMs sur la ligne evolution-approval pour la borner)",
1136
+ "de": "\n(ausstehende Schreibvorgänge verfallen nie – das Fenster wartet auf eine Entscheidung; pendingTtlMs in der evolution-approval-Zeile begrenzt es)",
1137
+ "ru": "\n(ожидающие записи не истекают — окно ждёт решения; задайте pendingTtlMs в строке evolution-approval, чтобы ограничить его)",
1138
+ "pt": "\n(as escritas pendentes nunca expiram — a janela aguarda uma decisão; defina pendingTtlMs na linha evolution-approval para limitá-la)"
1139
+ },
1140
+ "command.pending.empty": {
1141
+ "zh": "没有待批准的自进化写入。",
1142
+ "en": "No pending self-evolution writes.",
1143
+ "ja": "承認待ちの自己進化書き込みはありません。",
1144
+ "es": "No hay escrituras de autoevolución pendientes.",
1145
+ "fr": "Aucune écriture d’auto-évolution en attente.",
1146
+ "de": "Keine ausstehenden Selbstentwicklungs-Schreibvorgänge.",
1147
+ "ru": "Ожидающих записей самоэволюции нет.",
1148
+ "pt": "Não há escritas de autoevolução pendentes."
1149
+ },
1150
+ "command.pending.executingHint": {
1151
+ "zh": "\n(EXECUTING:之前的 approve 可能在执行后崩溃;请人工核验写入,然后 reject —— approve 不会重跑)",
1152
+ "en": "\n(EXECUTING: a previous approve may have crashed after running; verify the write manually, then reject — approve will not re-run it)",
1153
+ "ja": "\n(EXECUTING:以前の approve が実行後にクラッシュした可能性があります。書き込みを手動で確認してから reject してください。approve は再実行しません)",
1154
+ "es": "\n(EXECUTING: una aprobación anterior pudo caer tras ejecutarse; verifica la escritura a mano y luego rechaza — approve no la volverá a ejecutar)",
1155
+ "fr": "\n(EXECUTING : une approbation précédente a peut-être planté après exécution ; vérifiez l’écriture manuellement, puis rejetez — approve ne la relancera pas)",
1156
+ "de": "\n(EXECUTING: Ein früheres approve ist möglicherweise nach dem Lauf abgestürzt; prüfe die Schreibvorgang manuell und lehne dann ab — approve führt ihn nicht erneut aus)",
1157
+ "ru": "\n(EXECUTING: предыдущий approve мог упасть после выполнения; проверьте запись вручную и затем отклоните — approve не запустит её снова)",
1158
+ "pt": "\n(EXECUTING: um approve anterior pode ter falhado após executar; verifique a escrita manualmente e depois rejeite — approve não a executará de novo)"
1159
+ },
1160
+ "command.pending.executing": {
1161
+ "zh": "执行中",
1162
+ "en": "EXECUTING",
1163
+ "ja": "実行中",
1164
+ "es": "EN EJECUCIÓN",
1165
+ "fr": "EN COURS",
1166
+ "de": "LÄUFT",
1167
+ "ru": "ВЫПОЛНЯЕТСЯ",
1168
+ "pt": "EM EXECUÇÃO"
1169
+ },
1170
+ "command.pending.stagedArgs": {
1171
+ "zh": " 暂存参数:{args}",
1172
+ "en": " staged args: {args}",
1173
+ "ja": " ステージ済み引数:{args}",
1174
+ "es": " argumentos preparados: {args}",
1175
+ "fr": " arguments préparés : {args}",
1176
+ "de": " vorbereitete Argumente: {args}",
1177
+ "ru": " подготовленные аргументы: {args}",
1178
+ "pt": " argumentos preparados: {args}"
1179
+ },
1180
+ "command.pending.justNow": {
1181
+ "zh": "刚刚",
1182
+ "en": "just now",
1183
+ "ja": "たった今",
1184
+ "es": "ahora mismo",
1185
+ "fr": "à l’instant",
1186
+ "de": "gerade eben",
1187
+ "ru": "только что",
1188
+ "pt": "agora mesmo"
1189
+ },
1190
+ "command.pending.ago": {
1191
+ "zh": "{n} {unit}前",
1192
+ "en": "{n} {unit} ago",
1193
+ "ja": "{n} {unit}前",
1194
+ "es": "hace {n} {unit}",
1195
+ "fr": "il y a {n} {unit}",
1196
+ "de": "vor {n} {unit}",
1197
+ "ru": "{n} {unit} назад",
1198
+ "pt": "há {n} {unit}"
1199
+ },
1200
+ "command.pending.from": {
1201
+ "zh": " 来自 {origin}",
1202
+ "en": " from {origin}",
1203
+ "ja": " {origin} から",
1204
+ "es": " de {origin}",
1205
+ "fr": " de {origin}",
1206
+ "de": " von {origin}",
1207
+ "ru": " от {origin}",
1208
+ "pt": " de {origin}"
1209
+ },
1210
+ "command.pending.session": {
1211
+ "zh": "(会话 {session})",
1212
+ "en": " (session {session})",
1213
+ "ja": "(セッション {session})",
1214
+ "es": " (sesión {session})",
1215
+ "fr": " (session {session})",
1216
+ "de": " (Sitzung {session})",
1217
+ "ru": " (сеанс {session})",
1218
+ "pt": " (sessão {session})"
1219
+ },
1220
+ "command.curator.skipped": {
1221
+ "zh": "策展轮已跳过({reason}):未执行策展过程。\nrunId={runId}",
1222
+ "en": "Curation round skipped ({reason}): no curation pass ran.\nrunId={runId}",
1223
+ "ja": "キュレーションをスキップしました({reason}):処理は実行されていません。\nrunId={runId}",
1224
+ "es": "Ronda de curación omitida ({reason}): no se ejecutó ningún pase.\nrunId={runId}",
1225
+ "fr": "Tour de curation ignoré ({reason}) : aucune passe n’a été exécutée.\nrunId={runId}",
1226
+ "de": "Kurationslauf übersprungen ({reason}): Es wurde kein Durchlauf ausgeführt.\nrunId={runId}",
1227
+ "ru": "Цикл упорядочивания пропущен ({reason}): проход не выполнялся.\nrunId={runId}",
1228
+ "pt": "Rodada de curadoria ignorada ({reason}): nenhuma passagem foi executada.\nrunId={runId}"
1229
+ },
1230
+ "command.curator.done": {
1231
+ "zh": "策展轮完成:{stale} 项过期,{archived} 项已归档,{errors} 项失败。\nrunId={runId}{snapshot}",
1232
+ "en": "Curation round complete: {stale} stale, {archived} archived, {errors} failed.\nrunId={runId}{snapshot}",
1233
+ "ja": "キュレーション完了:期限切れ {stale} 件、アーカイブ {archived} 件、失敗 {errors} 件。\nrunId={runId}{snapshot}",
1234
+ "es": "Ronda de curación completada: {stale} obsoletas, {archived} archivadas, {errors} fallidas.\nrunId={runId}{snapshot}",
1235
+ "fr": "Tour de curation terminé : {stale} obsolètes, {archived} archivées, {errors} en échec.\nrunId={runId}{snapshot}",
1236
+ "de": "Kurationslauf abgeschlossen: {stale} veraltet, {archived} archiviert, {errors} fehlgeschlagen.\nrunId={runId}{snapshot}",
1237
+ "ru": "Цикл упорядочивания завершён: устарело {stale}, в архив {archived}, ошибок {errors}.\nrunId={runId}{snapshot}",
1238
+ "pt": "Rodada de curadoria concluída: {stale} obsoletas, {archived} arquivadas, {errors} falharam.\nrunId={runId}{snapshot}"
1239
+ },
1240
+ "command.curator.paused": {
1241
+ "zh": "策展自动轮已暂停。手动 /evolution curator run 不受影响;用 /evolution curator resume 恢复。",
1242
+ "en": "Automatic curation is paused. Manual /evolution curator run still works; use /evolution curator resume to restart.",
1243
+ "ja": "自動キュレーションを一時停止しました。手動の /evolution curator run は引き続き使えます。再開するには /evolution curator resume を実行してください。",
1244
+ "es": "La curación automática está en pausa. La ejecución manual /evolution curator run sigue funcionando; usa /evolution curator resume para reanudarla.",
1245
+ "fr": "La curation automatique est en pause. /evolution curator run manuel fonctionne toujours ; utilisez /evolution curator resume pour la relancer.",
1246
+ "de": "Die automatische Kuration ist pausiert. Der manuelle /evolution curator run funktioniert weiterhin; mit /evolution curator resume wieder starten.",
1247
+ "ru": "Автоматическое упорядочивание приостановлено. Ручной /evolution curator run продолжает работать; для возобновления используйте /evolution curator resume.",
1248
+ "pt": "A curadoria automática está pausada. O /evolution curator run manual continua funcionando; use /evolution curator resume para retomar."
1249
+ },
1250
+ "command.curator.resumed": {
1251
+ "zh": "策展自动轮已恢复。下一次定时轮要等一个间隔(首轮延后语义)。",
1252
+ "en": "Automatic curation resumed. The next scheduled round waits one interval (first round delayed).",
1253
+ "ja": "自動キュレーションを再開しました。次の定時実行は 1 インターバル後です(初回は遅延)。",
1254
+ "es": "Curación automática reanudada. La siguiente ronda programada espera un intervalo (primera ronda diferida).",
1255
+ "fr": "Curation automatique relancée. Le prochain tour attend un intervalle (premier tour différé).",
1256
+ "de": "Automatische Kuration fortgesetzt. Der nächste planmäßige Lauf wartet ein Intervall (erster Lauf verzögert).",
1257
+ "ru": "Автоматическое упорядочивание возобновлено. Следующий плановый цикл ждёт один интервал (первый цикл отложен).",
1258
+ "pt": "Curadoria automática retomada. A próxima rodada agendada aguarda um intervalo (primeira rodada adiada)."
1259
+ },
1260
+ "command.curator.notPersisted": {
1261
+ "zh": "\n注意:没有挂载 evolution 状态服务 —— 该设置不会被持久化,也不会在此进程之后保留。",
1262
+ "en": "\nNote: the evolution state service is not mounted — this setting is not persisted and will not survive this process.",
1263
+ "ja": "\n注意:evolution 状態サービスが未マウントです。この設定は永続化されず、このプロセスの終了後も残りません。",
1264
+ "es": "\nNota: el servicio de estado de evolution no está montado; este ajuste no se guardará y no sobrevivirá a este proceso.",
1265
+ "fr": "\nRemarque : le service d’état evolution n’est pas monté — ce réglage n’est pas persistant et ne survivra pas à ce processus.",
1266
+ "de": "\nHinweis: Der evolution-Statusdienst ist nicht eingebunden – diese Einstellung wird nicht gespeichert und überlebt diesen Prozess nicht.",
1267
+ "ru": "\nПримечание: служба состояния evolution не подключена — настройка не сохранится и не переживёт этот процесс.",
1268
+ "pt": "\nNota: o serviço de estado do evolution não está montado — esta configuração não será persistida e não sobreviverá a este processo."
1269
+ },
1270
+ "command.curator.noState": {
1271
+ "zh": "还没有策展状态:首个自动轮次要等间隔到达后才会执行。",
1272
+ "en": "No curation state yet: the first automatic round runs after one interval.",
1273
+ "ja": "キュレーション状態はまだありません。最初の自動実行は 1 インターバル後に走ります。",
1274
+ "es": "Aún no hay estado de curación: la primera ronda automática se ejecuta tras un intervalo.",
1275
+ "fr": "Aucun état de curation pour l’instant : le premier tour automatique s’exécute après un intervalle.",
1276
+ "de": "Noch kein Kurationsstatus: Der erste automatische Lauf startet nach einem Intervall.",
1277
+ "ru": "Состояния упорядочивания пока нет: первый автоматический цикл запустится через интервал.",
1278
+ "pt": "Ainda não há estado de curadoria: a primeira rodada automática ocorre após um intervalo."
1279
+ },
1280
+ "command.curator.noReport": {
1281
+ "zh": "暂无策展报告。",
1282
+ "en": "No curation report yet.",
1283
+ "ja": "キュレーションレポートはまだありません。",
1284
+ "es": "Aún no hay informe de curación.",
1285
+ "fr": "Aucun rapport de curation pour l’instant.",
1286
+ "de": "Noch kein Kurationsbericht.",
1287
+ "ru": "Отчёта об упорядочивании пока нет.",
1288
+ "pt": "Ainda não há relatório de curadoria."
1289
+ },
1290
+ "command.curator.reportReadFailed": {
1291
+ "zh": "报告文件读不出来。",
1292
+ "en": "The report file could not be read.",
1293
+ "ja": "レポートファイルを読み込めませんでした。",
1294
+ "es": "No se pudo leer el archivo del informe.",
1295
+ "fr": "Le fichier du rapport n’a pas pu être lu.",
1296
+ "de": "Die Berichtsdatei konnte nicht gelesen werden.",
1297
+ "ru": "Не удалось прочитать файл отчёта.",
1298
+ "pt": "Não foi possível ler o arquivo do relatório."
1299
+ },
1300
+ "help.subcommands": {
1301
+ "zh": "/evolution 子命令({count}):",
1302
+ "en": "/evolution subcommands ({count}):",
1303
+ "ja": "/evolution サブコマンド({count}):",
1304
+ "es": "/evolution subcomandos ({count}):",
1305
+ "fr": "/evolution sous-commandes ({count}) :",
1306
+ "de": "/evolution Unterbefehle ({count}):",
1307
+ "ru": "/evolution подкоманды ({count}):",
1308
+ "pt": "/evolution subcomandos ({count}):"
1309
+ }
1310
+ };
1311
+ //#endregion
1312
+ //#region lib/types/host-locale.js
1313
+ /**
1314
+ * Resolve the host human-output locale.
1315
+ * No preference keeps the authored Chinese; an explicit unknown locale falls back to English.
1316
+ * @param ctx - host context carrying the settings provider.
1317
+ * @returns the locale used for human-readable command output.
1318
+ */
1319
+ function resolveHostLocale(ctx) {
1320
+ try {
1321
+ const value = ctx.get("settings")?.describe?.({ redactSecrets: false })?.find((entry) => entry.ns === "locale")?.value;
1322
+ const preference = typeof value === "object" && value !== null ? value.preference : void 0;
1323
+ if (preference === void 0 || preference === null) return "zh";
1324
+ return HOST_LOCALES.includes(preference) ? preference : "en";
1325
+ } catch {
1326
+ return "zh";
1327
+ }
1328
+ }
1329
+ /**
1330
+ * Render one human-facing command-help line in the resolved host locale.
1331
+ * @param locale - resolved host locale.
1332
+ * @param key - stable command-help key.
1333
+ * @returns localized help text.
1334
+ */
1335
+ function hostCommandText(locale, key, values = {}) {
1336
+ return (HOST_COMMANDS[key][locale] ?? HOST_COMMANDS[key].zh).replace(/\{(\w+)\}/g, (match, slot) => values[slot] === void 0 ? match : String(values[slot]));
1337
+ }
1338
+ /**
1339
+ * Render one human-facing error in the resolved host locale.
1340
+ * @param locale - resolved host locale.
1341
+ * @param id - stable error id.
1342
+ * @param args - values for %aN% slots.
1343
+ * @returns localized human error text.
1344
+ */
1345
+ function hostErrorText(locale, id, args = {}) {
1346
+ return errorTextIn(locale, id, args);
1347
+ }
1348
+ //#endregion
634
1349
  //#region lib/types/migration.js
635
1350
  /**
636
1351
  * G3 (caller half): find the legacy settings document and run the namespace migration.
@@ -1257,17 +1972,6 @@ function collectEvolutionBundles(home, onReadError) {
1257
1972
  }
1258
1973
  return bundles;
1259
1974
  }
1260
- const SESSION_QUERY_MODES = new Set([
1261
- "startup",
1262
- "first-search",
1263
- "never"
1264
- ]);
1265
- function envIssues() {
1266
- const issues = [];
1267
- const query = process.env.DSH_EVOLUTION_SESSION_QUERY;
1268
- if (query && !SESSION_QUERY_MODES.has(query)) issues.push(`DSH_EVOLUTION_SESSION_QUERY="${query}" is not one of startup|first-search|never — the patch normalizes it to 'startup' silently; set it to a listed mode.`);
1269
- return issues;
1270
- }
1271
1975
  /** G3-② (B2): the family delta container. An optionalDependency of this
1272
1976
  * package, so resolution may legitimately fail; every failure degrades to
1273
1977
  * "unknown" — the doctor never throws.
@@ -1279,7 +1983,7 @@ const AGENT_PRESET_PACKAGE = scopedPackageName("dsh-evolution-agent-preset", imp
1279
1983
  * @returns the file path, or null when the package is not installed. */
1280
1984
  function resolveAgentPresetAsset(asset) {
1281
1985
  try {
1282
- return fileURLToPath(import.meta.resolve(`${AGENT_PRESET_PACKAGE}/${asset}`));
1986
+ return createRequire(import.meta.url).resolve(`${AGENT_PRESET_PACKAGE}/${asset}`);
1283
1987
  } catch {
1284
1988
  return null;
1285
1989
  }
@@ -1607,8 +2311,6 @@ async function diagnose(ctx, options = {}) {
1607
2311
  else if (installForm === "none") actions.push("Install the default full bundle: dsh plugin --profile web add @lmzhen/dsh-evolution-all");
1608
2312
  else if (installForm === "preset-only") actions.push(`The Evolution preset row is installed but no profile mounts an evolution bundle — re-add @lmzhen/dsh-evolution-host for the layered layout (do NOT add all on top of the preset: that double-mounts the model rows), or drop the row (${layeredArtifactLabel}) from the profile patch if the layered layout is no longer wanted.`);
1609
2313
  else if (installForm === "layered") actions.push("Variant form (session opt-in): model tools follow the Evolution preset, and a session on a platform original preset carries no family rows; add @lmzhen/dsh-evolution-all instead if every session should have them.");
1610
- const env = envIssues();
1611
- if (env.length > 0) actions.push("Fix the DSH_EVOLUTION_* variable listed above.");
1612
2314
  if (capabilityAbsence.length > 0) actions.push(`The family probes ${capabilityAbsence.length} platform capability/ies this deployment does not mount (${capabilityAbsence.map((entry) => entry.service).join(", ")}) — mount the rows that carry the ones you need; the features they gate are listed above.`);
1613
2315
  if (processScopeIssues.length > 0) actions.push(`The mounted IO backend does not back every cross-process medium claim: ${processScopeIssues.join("; ")} — mount a provider that declares processScope 'cross-process', or treat this home as single-process (no concurrent writers).`);
1614
2316
  if (services.review && !services.curator) actions.push("Curator service is not mounted — automatic curation is off; verify the host/all bundle row set is complete.");
@@ -1639,7 +2341,6 @@ async function diagnose(ctx, options = {}) {
1639
2341
  bundles,
1640
2342
  foreignProfiles: homeProfiles(home).filter(({ profile, dir }) => mounted === void 0 || profile !== mounted.profile && dir !== mounted.dir).map(({ profile }) => profile),
1641
2343
  conflicts,
1642
- envIssues: env,
1643
2344
  budgetIssues,
1644
2345
  paramIssues,
1645
2346
  queryIssues,
@@ -1820,34 +2521,37 @@ function legacyLine(row) {
1820
2521
  * @param report - the assembled report (view + legacy findings).
1821
2522
  * @returns the text face.
1822
2523
  */
1823
- function renderDoctorText(report) {
2524
+ function renderDoctorText(report, locale = "zh") {
1824
2525
  const extras = [];
1825
2526
  extras.push(report.runtimeBundles === null ? "runtime bundles: unknown — the platform bundle surface (pluginManager.listBundles) is not mounted here" : `runtime bundles (this profile): ${report.runtimeBundles.length > 0 ? report.runtimeBundles.join(", ") : "(none)"}`);
1826
2527
  if (report.dormantBundles.length > 0) extras.push(`installed but not selected: ${report.dormantBundles.join(", ")} — the Plugins page lists them; this runtime mounts neither`);
1827
2528
  extras.push(`bundles (all profiles): ${report.bundles.length > 0 ? report.bundles.join(", ") : "(none)"}`);
1828
2529
  extras.push(`services: review=${report.services.review} (${report.serviceSource === "platform" ? "the live row, this runtime" : "inferred from bundles, all profiles"}) curator=${report.services.curator} approval=${report.services.approval} skillUsage=${report.services.skillUsage} io=${report.services.io}`);
1829
- const mergeStatus = report.merge.status === "ok" ? "正常" : report.merge.status === "warn" ? "注意" : report.merge.status === "fail" ? "异常" : "未知";
1830
- extras.push("merge: [" + mergeStatus + "] " + report.merge.detail + (report.merge.remedy === void 0 ? "" : ";下一步:" + report.merge.remedy));
2530
+ const mergeStatus = hostCommandText(locale, "doctor.status." + report.merge.status);
2531
+ extras.push("merge: [" + mergeStatus + "] " + report.merge.detail + (report.merge.remedy === void 0 ? "" : hostCommandText(locale, "doctor.nextStep") + report.merge.remedy));
1831
2532
  if (report.merge.status !== "ok" && report.merge.remedy !== void 0) extras.push(" → " + report.merge.remedy);
1832
2533
  if (report.capabilityAbsence.length > 0) extras.push(`capability absence (${report.capabilityAbsence.length}): ${report.capabilityAbsence.map((entry) => `${entry.service} — ${entry.feature}`).join("; ")}`);
1833
2534
  extras.push(scopedProbeLine(report.scopedProbe));
1834
2535
  extras.push(legacyLine(report.legacy));
1835
- extras.push(`pending: ${report.pendingCount === null ? "unknown" : report.pendingCount}`);
1836
- extras.push(`executing: ${report.executingCount === null ? "unknown" : report.executingCount}`);
2536
+ extras.push(hostCommandText(locale, "doctor.pending") + String(report.pendingCount === null ? "unknown" : report.pendingCount));
2537
+ extras.push(hostCommandText(locale, "doctor.executing") + String(report.executingCount === null ? "unknown" : report.executingCount));
1837
2538
  for (const row of report.presetFreshness) {
1838
2539
  if (row.status === "absent") continue;
1839
- const verdict = row.status === "fresh" ? "fresh — a fresh generation matches this file byte-for-byte" : row.status === "differs" ? "DIFFERS from a fresh generation — it is an install-time snapshot; re-run the installer (/evolution preset install) to regenerate" : `unknown — a fresh generation could not be recomputed (${row.detail ?? "reason not recorded"})`;
1840
- extras.push(`preset: ${row.base} → ${row.destination} ${verdict}`);
2540
+ const verdict = row.status === "fresh" ? hostCommandText(locale, "doctor.presetFresh") : row.status === "differs" ? hostCommandText(locale, "doctor.presetDiffers") : hostCommandText(locale, "doctor.presetUnknown", { detail: row.detail ?? "reason not recorded" });
2541
+ extras.push(hostCommandText(locale, "doctor.presetLine", {
2542
+ base: row.base,
2543
+ destination: row.destination,
2544
+ verdict
2545
+ }));
1841
2546
  }
1842
2547
  if (report.presetIssues.length > 0) extras.push("agent presets:", ...report.presetIssues.map((line) => ` ! ${line}`));
1843
2548
  if (report.foreignProfiles.length > 0) extras.push("profiles-foreign: " + report.foreignProfiles.join(", ") + " — not part of this plane: /evolution preset install ignores them, while the bundles (all profiles) line above counts them");
1844
2549
  if (report.conflicts.length > 0) extras.push("conflicts:", ...report.conflicts.map((line) => ` ! ${line}`));
1845
- if (report.envIssues.length > 0) extras.push("env:", ...report.envIssues.map((line) => ` ! ${line}`));
1846
2550
  if (report.budgetIssues.length > 0) extras.push("memory budget:", ...report.budgetIssues.map((line) => ` ! ${line}`));
1847
2551
  if (report.paramIssues.length > 0) extras.push("parameters:", ...report.paramIssues.map((line) => ` ! ${line}`));
1848
2552
  if (report.queryIssues.length > 0) extras.push("session search:", ...report.queryIssues.map((line) => ` ! ${line}`));
1849
2553
  if (report.actions.length > 0) extras.push("next steps:", ...report.actions.map((line) => ` → ${line}`));
1850
- return renderDiagnosticsText(report.view).trimEnd() + "\n\n补充检查(view 未覆盖的运行时事实):\n" + extras.join("\n");
2554
+ return renderDiagnosticsText(report.view, locale).trimEnd() + "\n\n" + hostCommandText(locale, "doctor.supplement") + "\n" + extras.join("\n");
1851
2555
  }
1852
2556
  /**
1853
2557
  * G6/W8 tail: render the frozen DiagnosticsView as the doctor's diagnostics section.
@@ -1858,16 +2562,19 @@ function renderDoctorText(report) {
1858
2562
  * @param view - the assembled view.
1859
2563
  * @returns the section text (ends with a newline).
1860
2564
  */
1861
- function renderDiagnosticsText(view) {
2565
+ function renderDiagnosticsText(view, locale = "zh") {
1862
2566
  const lines = [];
1863
- lines.push("诊断(schema v" + String(view.schemaVersion) + ",生成于 " + view.generatedAt + "):");
1864
- lines.push(" 事实:");
1865
- for (const fact of view.facts) lines.push(" - " + fact.label + ":" + fact.value + "(出处:" + fact.home + ")");
1866
- lines.push(" 运行时:");
2567
+ lines.push(hostCommandText(locale, "doctor.diagnosticsHeader", {
2568
+ version: view.schemaVersion,
2569
+ at: view.generatedAt
2570
+ }));
2571
+ lines.push(hostCommandText(locale, "doctor.facts"));
2572
+ for (const fact of view.facts) lines.push(" - " + fact.label + ":" + fact.value + hostCommandText(locale, "doctor.source", { home: fact.home }));
2573
+ lines.push(hostCommandText(locale, "doctor.runtime"));
1867
2574
  for (const row of view.runtime) {
1868
- const status = row.status === "ok" ? "正常" : row.status === "warn" ? "注意" : row.status === "fail" ? "异常" : "未知";
2575
+ const status = hostCommandText(locale, "doctor.status." + row.status);
1869
2576
  const detail = row.detail === void 0 ? "" : ":" + row.detail;
1870
- const remedy = row.remedy === void 0 ? "" : ";下一步:" + row.remedy;
2577
+ const remedy = row.remedy === void 0 ? "" : hostCommandText(locale, "doctor.nextStep") + row.remedy;
1871
2578
  lines.push(" - [" + status + "] " + row.label + detail + remedy);
1872
2579
  }
1873
2580
  return lines.join("\n") + "\n";
@@ -2053,6 +2760,17 @@ function renderParamJson(rows) {
2053
2760
  }
2054
2761
  //#endregion
2055
2762
  //#region lib/types/registry.js
2763
+ /**
2764
+ * Subcommand registry — the SINGLE SOURCE for the /evolution command surface.
2765
+ *
2766
+ * 0.3.55 (WD1): the input-declaration hint, the bare `/evolution` help output
2767
+ * and the README command table all render FROM this table; a hand-written
2768
+ * copy anywhere is drift waiting to happen (v10 R-13 proved it once).
2769
+ * PLAN S5.3 (2026-09-16): "the README command table" means the FAMILY README
2770
+ * (`packages/README.md` — the T-WD2 anchor). Package-level READMEs cite that
2771
+ * home instead of restating the table (doc-facts rule N19).
2772
+ * Keep `usage` in the exact shape a user can type after `/evolution`.
2773
+ */
2056
2774
  /** The flags the TABLE declares for one subcommand (name → `--flag`), DERIVED from its usage. */
2057
2775
  function flagsOf(name) {
2058
2776
  const entry = COMMAND_ENTRIES.find((candidate) => entryName(candidate) === name);
@@ -2236,11 +2954,11 @@ function renderHint() {
2236
2954
  return COMMAND_ENTRIES.map((entry) => entry.usage).join(" | ");
2237
2955
  }
2238
2956
  /** The bare `/evolution` help body (one line per subcommand). */
2239
- function renderHelpText() {
2957
+ function renderHelpText(locale = "zh") {
2240
2958
  return [
2241
- `/evolution subcommands (${COMMAND_ENTRIES.length}):`,
2959
+ (HOST_COMMANDS["help.subcommands"][locale] ?? HOST_COMMANDS["help.subcommands"].en).replace("{count}", String(COMMAND_ENTRIES.length)),
2242
2960
  "",
2243
- ...COMMAND_ENTRIES.map((entry) => ` ${entry.usage.padEnd(44)} ${entry.summary}`)
2961
+ ...COMMAND_ENTRIES.map((entry) => ` ${entry.usage.padEnd(44)} ${HOST_COMMANDS["summary." + entryName(entry)]?.[locale] ?? entry.summary}`)
2244
2962
  ].join("\n");
2245
2963
  }
2246
2964
  //#endregion
@@ -2724,6 +3442,8 @@ function apply(ctx, rawConfig = {}) {
2724
3442
  kind: "error",
2725
3443
  text
2726
3444
  });
3445
+ const hostLocale = resolveHostLocale(ctx);
3446
+ const hostError = (id, args = {}) => hostErrorText(hostLocale, id, args);
2727
3447
  if (input === "merge" || input.startsWith("merge ")) {
2728
3448
  const merge = ctx.get("evolutionMerge");
2729
3449
  if (merge === void 0) return err("merge 未挂载:当前安装形态没有 evolution-merge 行(安装形态与命令可用性见 INSTALL.md),或先运行 /evolution doctor。");
@@ -2731,42 +3451,45 @@ function apply(ctx, rawConfig = {}) {
2731
3451
  return result.ok ? ok(result.text) : err(result.text);
2732
3452
  }
2733
3453
  const invocationAgent = invocation.agent;
2734
- const agentMissing = (need) => invocationAgent === void 0 ? err(errorText("e-305-this-invocation-carries-no", { a1: need })) : void 0;
3454
+ const agentMissing = (need) => invocationAgent === void 0 ? err(hostError("e-305-this-invocation-carries-no", { a1: need })) : void 0;
2735
3455
  const unreplayableWriteRefusal = (what) => {
2736
3456
  if (approval === void 0) return void 0;
2737
3457
  const session = invocationAgent?.session;
2738
3458
  const sessionPolicy = effectiveSessionPolicy(ctx, session);
2739
3459
  if (!(approval.isEnabled !== false && sessionPolicy !== "never" && approval.stageForeground !== false)) return void 0;
2740
- return err(errorText("e-306-this-deployment-stages-foreground", { a1: what }));
3460
+ return err(hostError("e-306-this-deployment-stages-foreground", { a1: what }));
2741
3461
  };
2742
3462
  const approval = ctx.get("evolutionApproval");
2743
3463
  const pendingParsed = parseSubcommand(input);
2744
3464
  if (!isParseFailure(pendingParsed) && pendingParsed.name === "pending" && pendingParsed.positionals.length === 0 && [...pendingParsed.flags.keys()].every((flag) => flag === "detail")) {
2745
- if (!approval) return err(errorText("e-301-approval-service-not-mounted"));
3465
+ if (!approval) return err(hostError("e-301-approval-service-not-mounted"));
2746
3466
  const listed = [...await approval.list("pending"), ...await approval.list("executing")];
2747
3467
  const pending = [...new Map(listed.map((row) => [row.id, row])).values()];
2748
3468
  const ttlMs = typeof approval.ttlMs === "number" && Number.isFinite(approval.ttlMs) ? approval.ttlMs : 0;
2749
- const ttlNote = ttlMs > 0 ? `\n(暂存写入 ${ttlMs} 毫秒后过期:过期即关闭为 REJECTED,且永不执行。若仍需要,请重新暂存。)` : "\n(staged writes never expire — the window waits for a decision; set the evolution-approval row pendingTtlMs to bound it)";
2750
- if (pending.length === 0) return ok("没有待批准的自进化写入。" + ttlNote);
3469
+ const ttlNote = ttlMs > 0 ? hostCommandText(hostLocale, "command.pending.ttl", { ttl: ttlMs }) : hostCommandText(hostLocale, "command.pending.neverExpires");
3470
+ if (pending.length === 0) return ok(hostCommandText(hostLocale, "command.pending.empty") + ttlNote);
2751
3471
  const detailed = pendingParsed.flags.get("detail") === true;
2752
3472
  const nowMs = Date.now();
2753
3473
  const attribution = (p) => {
2754
3474
  const age = elapsedSince(p.createdAt, nowMs);
2755
3475
  const unit = age.n === 1 ? age.unit.replace(/s$/u, "") : age.unit;
2756
- return ` · ${age.unit === "now" ? "just now" : `${age.n} ${unit} ago`}${p.origin === void 0 ? "" : ` from ${p.origin}`}${p.sessionId === void 0 ? "" : ` (session ${p.sessionId.slice(0, 8)})`}`;
3476
+ return ` · ${age.unit === "now" ? hostCommandText(hostLocale, "command.pending.justNow") : hostCommandText(hostLocale, "command.pending.ago", {
3477
+ n: age.n,
3478
+ unit
3479
+ })}${p.origin === void 0 ? "" : hostCommandText(hostLocale, "command.pending.from", { origin: p.origin })}${p.sessionId === void 0 ? "" : hostCommandText(hostLocale, "command.pending.session", { session: p.sessionId.slice(0, 8) })}`;
2757
3480
  };
2758
3481
  return ok(pending.map((p) => {
2759
- if (!detailed) return `${p.id} ${p.kind} ${p.status === "executing" ? "EXECUTING " : ""}${p.summary}${attribution(p)}`;
2760
- const status = p.status === "executing" ? "EXECUTING" : p.status;
3482
+ if (!detailed) return `${p.id} ${p.kind} ${p.status === "executing" ? hostCommandText(hostLocale, "command.pending.executing") + " " : ""}${p.summary}${attribution(p)}`;
3483
+ const status = p.status === "executing" ? hostCommandText(hostLocale, "command.pending.executing") : p.status;
2761
3484
  const line = `${p.id} ${p.kind} ${status} ${p.summary}${attribution(p)}`;
2762
- return p.args === void 0 ? line : `${line}\n staged args: ${safeStagedArgs(p.args)}`;
2763
- }).join("\n") + (pending.some((p) => p.status === "executing") ? "\n(EXECUTING: a previous approve may have crashed after running; verify the write manually, then reject — approve will not re-run it)" : "") + ttlNote);
3485
+ return p.args === void 0 ? line : `${line}\n` + hostCommandText(hostLocale, "command.pending.stagedArgs", { args: safeStagedArgs(p.args) });
3486
+ }).join("\n") + (pending.some((p) => p.status === "executing") ? hostCommandText(hostLocale, "command.pending.executingHint") : "") + ttlNote);
2764
3487
  }
2765
3488
  if (input.startsWith("approve ")) {
2766
3489
  const id = input.slice(8).trim();
2767
3490
  const result = approval ? await approval.approve(id) : {
2768
3491
  ok: false,
2769
- message: errorText("e-301-approval-service-not-mounted-2")
3492
+ message: hostError("e-301-approval-service-not-mounted-2")
2770
3493
  };
2771
3494
  return result.ok ? ok(result.message) : err(result.message);
2772
3495
  }
@@ -2774,37 +3497,46 @@ function apply(ctx, rawConfig = {}) {
2774
3497
  const id = input.slice(7).trim();
2775
3498
  const result = approval ? await approval.reject(id) : {
2776
3499
  ok: false,
2777
- message: errorText("e-301-approval-service-not-mounted-2")
3500
+ message: hostError("e-301-approval-service-not-mounted-2")
2778
3501
  };
2779
3502
  return result.ok ? ok(result.message) : err(result.message);
2780
3503
  }
2781
3504
  if (input.startsWith("release ")) {
2782
3505
  const id = input.slice(8).trim();
2783
- if (!approval) return err(errorText("e-301-approval-service-not-mounted-2"));
2784
- if (!approval.release) return err(errorText("e-304-the-mounted-approval-service"));
3506
+ if (!approval) return err(hostError("e-301-approval-service-not-mounted-2"));
3507
+ if (!approval.release) return err(hostError("e-304-the-mounted-approval-service"));
2785
3508
  const result = await approval.release(id);
2786
3509
  return result.ok ? ok(result.message) : err(result.message);
2787
3510
  }
2788
3511
  if (input === "curator run") {
2789
3512
  const curator = ctx.get("evolutionCurator");
2790
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3513
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2791
3514
  const result = await curator.run({ ignoreGates: true });
2792
- if (result.skipped !== void 0) return ok(`策展轮已跳过(${result.skipped}):未执行策展过程。\nrunId=${result.report.runId}`);
2793
- return ok(`策展轮完成:${result.stale.length} 项过期,${result.archived.length} 项已归档,${result.errors.length} 项失败。\nrunId=${result.report.runId}${result.report.snapshotPath ? `\nsnapshot=${result.report.snapshotPath}` : ""}`);
3515
+ if (result.skipped !== void 0) return ok(hostCommandText(hostLocale, "command.curator.skipped", {
3516
+ reason: result.skipped,
3517
+ runId: result.report.runId
3518
+ }));
3519
+ return ok(hostCommandText(hostLocale, "command.curator.done", {
3520
+ stale: result.stale.length,
3521
+ archived: result.archived.length,
3522
+ errors: result.errors.length,
3523
+ runId: result.report.runId,
3524
+ snapshot: result.report.snapshotPath ? `\nsnapshot=${result.report.snapshotPath}` : ""
3525
+ }));
2794
3526
  }
2795
3527
  if (input === "curator pause" || input === "curator resume") {
2796
3528
  const curator = ctx.get("evolutionCurator");
2797
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3529
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2798
3530
  const paused = input === "curator pause";
2799
3531
  await curator.setPaused(paused);
2800
- const notPersisted = ctx.get("evolutionState") !== void 0 ? "" : "\n注意:没有挂载 evolution 状态服务 —— 该设置不会被持久化,也不会在此进程之后保留。";
2801
- return ok((paused ? "策展自动轮已暂停。手动 /evolution curator run 不受影响;用 /evolution curator resume 恢复。" : "策展自动轮已恢复。下一次定时轮要等一个间隔(首轮延后语义)。") + notPersisted);
3532
+ const notPersisted = ctx.get("evolutionState") !== void 0 ? "" : hostCommandText(hostLocale, "command.curator.notPersisted");
3533
+ return ok((paused ? hostCommandText(hostLocale, "command.curator.paused") : hostCommandText(hostLocale, "command.curator.resumed")) + notPersisted);
2802
3534
  }
2803
3535
  if (input === "curator status") {
2804
3536
  const curator = ctx.get("evolutionCurator");
2805
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3537
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2806
3538
  const state = await curator.status();
2807
- if (!state) return ok("还没有策展状态:首个自动轮次要等间隔到达后才会执行。");
3539
+ if (!state) return ok(hostCommandText(hostLocale, "command.curator.noState"));
2808
3540
  const lastRun = typeof state.lastRunAt === "number" && Number.isFinite(state.lastRunAt) && state.lastRunAt > 0 ? new Date(state.lastRunAt).toISOString() : "unknown";
2809
3541
  return ok([
2810
3542
  `paused=${state.paused}`,
@@ -2815,7 +3547,7 @@ function apply(ctx, rawConfig = {}) {
2815
3547
  }
2816
3548
  if (input === "mutations") {
2817
3549
  const curator = ctx.get("evolutionCurator");
2818
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3550
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2819
3551
  const records = await curator.skills.listMutations();
2820
3552
  const usable = Array.isArray(records) ? records.filter((row) => typeof row === "object" && row !== null && typeof row.at === "string" && typeof row.skillName === "string" && typeof row.action === "string" && typeof row.summary === "string") : [];
2821
3553
  if (usable.length === 0) return ok("还没有写入记录。");
@@ -2824,7 +3556,7 @@ function apply(ctx, rawConfig = {}) {
2824
3556
  }
2825
3557
  if (input === "curator scope") {
2826
3558
  const curator = ctx.get("evolutionCurator");
2827
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3559
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2828
3560
  const view = await curator.scopeView();
2829
3561
  const line = (label, names) => `${label}: ${names.length}${names.length === 0 ? "" : `\n ${names.join(", ")}`}`;
2830
3562
  return ok([
@@ -2838,10 +3570,10 @@ function apply(ctx, rawConfig = {}) {
2838
3570
  }
2839
3571
  if (input === "curator report") {
2840
3572
  const curator = ctx.get("evolutionCurator");
2841
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3573
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2842
3574
  const report = await curator.latestReport();
2843
- if (!report) return ok("暂无策展报告。");
2844
- if (typeof report !== "object" || typeof report.runId !== "string" || typeof report.startedAt !== "string" || !Array.isArray(report.archived) || !Array.isArray(report.failed)) return err("报告文件读不出来。");
3575
+ if (!report) return ok(hostCommandText(hostLocale, "command.curator.noReport"));
3576
+ if (typeof report !== "object" || typeof report.runId !== "string" || typeof report.startedAt !== "string" || !Array.isArray(report.archived) || !Array.isArray(report.failed)) return err(hostCommandText(hostLocale, "command.curator.reportReadFailed"));
2845
3577
  const reportAny = report;
2846
3578
  const nameOf = (item) => typeof item === "object" && item !== null && typeof item.name === "string" ? item.name : "?";
2847
3579
  const reasonOf = (item) => typeof item === "object" && item !== null && typeof item.reason === "string" ? item.reason : "?";
@@ -2864,7 +3596,7 @@ function apply(ctx, rawConfig = {}) {
2864
3596
  const curator = ctx.get("evolutionCurator");
2865
3597
  const result = curator ? await curator.restoreSnapshot() : {
2866
3598
  ok: false,
2867
- message: errorText("e-302-curator-service-not-mounted")
3599
+ message: hostError("e-302-curator-service-not-mounted")
2868
3600
  };
2869
3601
  return result.ok ? ok(result.message) : err(result.message);
2870
3602
  }
@@ -2880,7 +3612,7 @@ function apply(ctx, rawConfig = {}) {
2880
3612
  const curator = ctx.get("evolutionCurator");
2881
3613
  const result = curator ? await curator.restore(name) : {
2882
3614
  ok: false,
2883
- message: errorText("e-302-curator-service-not-mounted")
3615
+ message: hostError("e-302-curator-service-not-mounted")
2884
3616
  };
2885
3617
  return result.ok ? ok(result.message) : err(result.message);
2886
3618
  }
@@ -2888,7 +3620,7 @@ function apply(ctx, rawConfig = {}) {
2888
3620
  const name = input.slice(14).trim();
2889
3621
  if (!name) return err("用法:/evolution skill history <name>");
2890
3622
  const curator = ctx.get("evolutionCurator");
2891
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3623
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2892
3624
  const versions = await curator.history(name);
2893
3625
  if (versions.length === 0) return ok(`技能 "${name}" 还没有内容版本:下一次经 skill_manage 写入后才会出现。`);
2894
3626
  const groups = partitionVersions(versions);
@@ -2912,7 +3644,7 @@ function apply(ctx, rawConfig = {}) {
2912
3644
  const unitId = unitMatch?.[1];
2913
3645
  const result = curator ? unitId !== void 0 ? await curator.undoUnit(name, unitId) : target === void 0 ? await curator.undo(name) : await curator.undo(name, target) : {
2914
3646
  ok: false,
2915
- message: errorText("e-302-curator-service-not-mounted")
3647
+ message: hostError("e-302-curator-service-not-mounted")
2916
3648
  };
2917
3649
  return result.ok ? ok(result.message) : err(result.message);
2918
3650
  }
@@ -2936,13 +3668,13 @@ function apply(ctx, rawConfig = {}) {
2936
3668
  }
2937
3669
  if (input === "propose") {
2938
3670
  const curator = ctx.get("evolutionCurator");
2939
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3671
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2940
3672
  const result = await curator.proposeKeeps();
2941
3673
  return result.ok ? ok(result.message) : err(result.message);
2942
3674
  }
2943
3675
  if (input === "skills health") {
2944
3676
  const curator = ctx.get("evolutionCurator");
2945
- if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
3677
+ if (!curator) return err(hostError("e-302-curator-service-not-mounted"));
2946
3678
  const [rows, observed] = await Promise.all([curator.healthView(), curator.usageObserved()]);
2947
3679
  const banner = observed ? "" : "使用观测尚未建立 —— 频繁变动(写入幽灵)行已被抑制。";
2948
3680
  const line = (row) => {
@@ -2991,7 +3723,7 @@ function apply(ctx, rawConfig = {}) {
2991
3723
  agent.followup(message);
2992
3724
  woke = true;
2993
3725
  } else if (typeof agent.inject === "function") agent.inject(message);
2994
- else return err(errorText("e-305-the-invocation-agent-exposes", { a1: "this learn request" }));
3726
+ else return err(hostError("e-305-the-invocation-agent-exposes", { a1: "this learn request" }));
2995
3727
  const eventIo = ctx.get("evolutionIo")?.provider();
2996
3728
  if (eventIo) appendEvolutionEvent(eventIo, eventsFile(evolutionRoot()), {
2997
3729
  type: "learn",
@@ -3278,7 +4010,7 @@ function apply(ctx, rawConfig = {}) {
3278
4010
  summary: "maintenance report handoff"
3279
4011
  }
3280
4012
  }));
3281
- if (woke === void 0) return err(errorText("e-305-the-invocation-agent-exposes", { a1: "this maintenance handoff" }));
4013
+ if (woke === void 0) return err(hostError("e-305-the-invocation-agent-exposes", { a1: "this maintenance handoff" }));
3282
4014
  return ok(woke ? `已把运行 ${record.id} 交给模型 —— 报告:${reportDigestPath(record)}。它会读取该文件并执行其中的行动项。` : `已把运行 ${record.id} 交给模型并排队 —— 本宿主没有唤醒通道,因此会在你下一条消息时被读取。`);
3283
4015
  }
3284
4016
  if (/^maintain\b/.test(input)) return err("未知的 maintain 参数:应为 `maintain`、`maintain --timeout <ms>` / `maintain --timeout=<ms>`、`maintain status [<id>]`、`maintain report [<id>]`、`maintain handoff [<id>]` 或 `maintain cancel [<id>]`。实际收到:" + input);
@@ -3425,7 +4157,7 @@ function apply(ctx, rawConfig = {}) {
3425
4157
  const session = invocationAgent?.session;
3426
4158
  const sessionPolicy = effectiveSessionPolicy(ctx, session);
3427
4159
  const stagesForeground = approval.isEnabled !== false && sessionPolicy !== "never" && approval.stageForeground !== false;
3428
- if (stagesForeground && session === void 0) return err(errorText("e-306-this-deployment-stages-foreground-2"));
4160
+ if (stagesForeground && session === void 0) return err(hostError("e-306-this-deployment-stages-foreground-2"));
3429
4161
  if (stagesForeground && !approval.hasRunner("skill")) return err("无法暂存提取:没有注册技能回放运行器:请挂载 tool-skill-manage 行,或禁用 evolution-approval。");
3430
4162
  const decision = await approval.request({
3431
4163
  kind: "skill",
@@ -3468,7 +4200,7 @@ function apply(ctx, rawConfig = {}) {
3468
4200
  const session = invocationAgent?.session;
3469
4201
  const sessionPolicy = effectiveSessionPolicy(ctx, session);
3470
4202
  const stagesForeground = approval.isEnabled !== false && sessionPolicy !== "never" && approval.stageForeground !== false;
3471
- if (stagesForeground && session === void 0) return err(errorText("e-306-this-deployment-stages-foreground-2"));
4203
+ if (stagesForeground && session === void 0) return err(hostError("e-306-this-deployment-stages-foreground-2"));
3472
4204
  if (stagesForeground && !approval.hasRunner("skill")) return err("无法暂存重构:没有注册技能回放运行器:请挂载 tool-skill-manage 行(evolution-agent 预设或 evolution-all),或禁用 evolution-approval。");
3473
4205
  const decision = await approval.request({
3474
4206
  kind: "skill",
@@ -3514,7 +4246,7 @@ function apply(ctx, rawConfig = {}) {
3514
4246
  }
3515
4247
  if (input === "replay") {
3516
4248
  const replay = ctx.get("evolutionReplay");
3517
- if (!replay) return err(errorText("e-303-replay-service-not-mounted"));
4249
+ if (!replay) return err(hostError("e-303-replay-service-not-mounted"));
3518
4250
  return ok(replay.compare().report);
3519
4251
  }
3520
4252
  const paramsParsed = parseSubcommand(input);
@@ -3530,13 +4262,13 @@ function apply(ctx, rawConfig = {}) {
3530
4262
  sections.set(descriptor.ns, section);
3531
4263
  }
3532
4264
  } catch (error) {
3533
- return err(errorText("e-307-the-settings-service-could", { a1: error instanceof Error ? error.message : String(error) }));
4265
+ return err(hostError("e-307-the-settings-service-could", { a1: error instanceof Error ? error.message : String(error) }));
3534
4266
  }
3535
4267
  const rows = paramSurfaceRows(sections, PARAM_EXPOSURE);
3536
4268
  const groupFlag = paramsParsed.flags.get("group");
3537
4269
  const group = typeof groupFlag === "string" ? groupFlag : void 0;
3538
4270
  const selected = group === void 0 ? rows : rows.filter((row) => row.group === group);
3539
- if (group !== void 0 && selected.length === 0) return err(errorText("e-308-unknown-parameter-group-group", {
4271
+ if (group !== void 0 && selected.length === 0) return err(hostError("e-308-unknown-parameter-group-group", {
3540
4272
  a1: group,
3541
4273
  a2: paramGroups(PARAM_EXPOSURE).join(", ")
3542
4274
  }));
@@ -3547,24 +4279,24 @@ function apply(ctx, rawConfig = {}) {
3547
4279
  if (isParseFailure(policyParsed) && policyParsed.name === "policy" && policyParsed.kind === "missing-value") return err("/evolution policy set 需要在 --" + (policyParsed.flag ?? "") + ";用法:policy set <id> <value> [--expect <revision>]");
3548
4280
  if (!isParseFailure(policyParsed) && policyParsed.name === "policy" && policyParsed.positionals[0] === "set") {
3549
4281
  const provider = ctx.get("settings");
3550
- if (provider?.update === void 0 || provider.describe === void 0) return err(errorText("e-311-no-settings-service-is"));
4282
+ if (provider?.update === void 0 || provider.describe === void 0) return err(hostError("e-311-no-settings-service-is"));
3551
4283
  const rawId = policyParsed.positionals[1] ?? "";
3552
4284
  const rawValue = policyParsed.positionals[2] ?? "";
3553
4285
  let id;
3554
4286
  try {
3555
4287
  id = canonicalWriteId(rawId);
3556
4288
  } catch (error) {
3557
- return err(errorText("e-312-error-instanceof-Error-error", { a1: error instanceof Error ? error.message : String(error) }));
4289
+ return err(hostError("e-312-error-instanceof-Error-error", { a1: error instanceof Error ? error.message : String(error) }));
3558
4290
  }
3559
4291
  const entry = PARAM_EXPOSURE.find((candidate) => candidate.id === id);
3560
- if (entry === void 0) return err(errorText("e-313-unknown-parameter-id-evolution", { a1: id }));
3561
- if (entry.tier !== "E3") return err(errorText("e-314-id-is-a-deployment", {
4292
+ if (entry === void 0) return err(hostError("e-313-unknown-parameter-id-evolution", { a1: id }));
4293
+ if (entry.tier !== "E3") return err(hostError("e-314-id-is-a-deployment", {
3562
4294
  a1: id,
3563
4295
  a2: entry.tier,
3564
4296
  a3: entry.owner
3565
4297
  }));
3566
4298
  const namespace = paramSettingsId(entry.owner);
3567
- if (namespace === void 0) return err(errorText("e-315-id-has-no-user", {
4299
+ if (namespace === void 0) return err(hostError("e-315-id-has-no-user", {
3568
4300
  a1: id,
3569
4301
  a2: entry.owner
3570
4302
  }));
@@ -3572,9 +4304,9 @@ function apply(ctx, rawConfig = {}) {
3572
4304
  try {
3573
4305
  descriptor = provider.describe({ redactSecrets: false }).find((candidate) => candidate.ns === namespace);
3574
4306
  } catch (error) {
3575
- return err(errorText("e-307-the-settings-service-could-2", { a1: error instanceof Error ? error.message : String(error) }));
4307
+ return err(hostError("e-307-the-settings-service-could-2", { a1: error instanceof Error ? error.message : String(error) }));
3576
4308
  }
3577
- if (descriptor === void 0) return err(errorText("e-316-namespace-namespace-is-not", {
4309
+ if (descriptor === void 0) return err(hostError("e-316-namespace-namespace-is-not", {
3578
4310
  a1: namespace,
3579
4311
  a2: entry.owner
3580
4312
  }));
@@ -3583,7 +4315,7 @@ function apply(ctx, rawConfig = {}) {
3583
4315
  const expectFlag = policyParsed.flags.get("expect");
3584
4316
  const expectedRaw = typeof expectFlag === "string" ? expectFlag : void 0;
3585
4317
  const expected = expectedRaw === void 0 ? descriptor.revision : Number(expectedRaw);
3586
- if (expectedRaw !== void 0 && descriptor.revision !== void 0 && Number(expectedRaw) !== descriptor.revision) return err(errorText("e-309-revision-conflict-you-sent", {
4318
+ if (expectedRaw !== void 0 && descriptor.revision !== void 0 && Number(expectedRaw) !== descriptor.revision) return err(hostError("e-309-revision-conflict-you-sent", {
3587
4319
  a1: expectedRaw,
3588
4320
  a2: descriptor.revision
3589
4321
  }));
@@ -3592,7 +4324,7 @@ function apply(ctx, rawConfig = {}) {
3592
4324
  if (floorId !== void 0 && typeof value === "number") {
3593
4325
  const sibling = resolved?.[floorId];
3594
4326
  const floor = typeof sibling === "number" ? sibling : NaN;
3595
- if (Number.isFinite(floor) && value < floor) return err(errorText("e-322-a-parameter-would-break-a", {
4327
+ if (Number.isFinite(floor) && value < floor) return err(hostError("e-322-a-parameter-would-break-a", {
3596
4328
  a1: id,
3597
4329
  a2: String(floor),
3598
4330
  a3: String(value)
@@ -3603,8 +4335,8 @@ function apply(ctx, rawConfig = {}) {
3603
4335
  } catch (error) {
3604
4336
  const code = error?.code;
3605
4337
  const message = error instanceof Error ? error.message : String(error);
3606
- if (code === "SETTINGS_CONFLICT") return err(errorText("e-309-revision-conflict-message-Re", { a1: message }));
3607
- return err(errorText("e-310-the-settings-service-refused", { a1: message }));
4338
+ if (code === "SETTINGS_CONFLICT") return err(hostError("e-309-revision-conflict-message-Re", { a1: message }));
4339
+ return err(hostError("e-310-the-settings-service-refused", { a1: message }));
3608
4340
  }
3609
4341
  return ok(renderPolicySet({
3610
4342
  id,
@@ -3618,9 +4350,9 @@ function apply(ctx, rawConfig = {}) {
3618
4350
  if (input === "migrate") {
3619
4351
  const attempt = await migrateFromContext(ctx);
3620
4352
  if (!attempt.ok) {
3621
- if (attempt.problem === "settings") return err(errorText("e-311-no-settings-service-is"));
3622
- if (attempt.problem === "home") return err(errorText("e-320-the-profile-home-is-not"));
3623
- return err(errorText("e-321-no-io-provider-is"));
4353
+ if (attempt.problem === "settings") return err(hostError("e-311-no-settings-service-is"));
4354
+ if (attempt.problem === "home") return err(hostError("e-320-the-profile-home-is-not"));
4355
+ return err(hostError("e-321-no-io-provider-is"));
3624
4356
  }
3625
4357
  return ok(renderNamespaceMigration(attempt.outcome));
3626
4358
  }
@@ -3637,10 +4369,10 @@ function apply(ctx, rawConfig = {}) {
3637
4369
  runs: doctorRuns()
3638
4370
  });
3639
4371
  if (input === "doctor --json") return ok(JSON.stringify(report.view, null, 2));
3640
- return ok(renderDoctorText(report));
4372
+ return ok(renderDoctorText(report, hostLocale));
3641
4373
  }
3642
- if (input === "" || input === "help") return ok(`自进化:记忆、技能、会话回顾、技能整理——状态、待批准写入与维护。\n${renderHelpText()}`);
3643
- return err(`/evolution ${input} 不是本构建能应答的子命令(已知子命令但缺参数也会落到这里)。\n${renderHint()}`);
4374
+ if (input === "" || input === "help") return ok(hostCommandText(hostLocale, "help.header") + "\n" + renderHelpText(hostLocale));
4375
+ return err("/evolution " + input + " " + hostCommandText(hostLocale, "help.unknown") + "\n" + renderHint());
3644
4376
  } };
3645
4377
  /** The registered definition: declared members only (A46). */
3646
4378
  const evolutionCommand = {