dsh-switchman 1.9.0 → 1.10.3

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/client.js CHANGED
@@ -714,11 +714,11 @@ window.__ModuleLoader__.load({
714
714
  badgeTip:
715
715
  'dsh-switchman:四个内置预设(standard / ptc / minimal / cordis)已注入自主智能体团队调度规程',
716
716
  handoverActive: '交接进行中',
717
- handoverPhaseBackup: '备份会话',
717
+ handoverPhaseBackup: '写入交接文档',
718
718
  handoverPhaseCompacting: '压缩上下文',
719
719
  handoverPhaseContinuation: '唤醒续接',
720
720
  handoverActiveTip:
721
- 'Switchman 正在后台交接:fork 备份会话并压缩上下文,完成后自动继续任务;期间会话静止属正常现象。',
721
+ 'Switchman 正在后台交接:写入交接文档并压缩上下文,完成后自动继续任务;期间会话静止属正常现象。',
722
722
  visionHintNeedsPool:
723
723
  '当前模型不支持读图:请在 dsh-switchman 设置中配置「视觉池」模型,之后用 /vision 发送图片。',
724
724
  visionHintUseVision:
@@ -825,7 +825,7 @@ window.__ModuleLoader__.load({
825
825
  wmHardLabel: '硬水位(hard)',
826
826
  wmHardHelp: '达到后读取预算收紧,并建议收尾当前工作。',
827
827
  wmForceLabel: '强制水位(force)',
828
- wmForceHelp: '达到后建议备份并移交压缩(可设为自动)。',
828
+ wmForceHelp: '达到后建议写交接文档并压缩(可设为自动)。',
829
829
  wmReadBudgetLabel: '单次读取预算',
830
830
  wmReadBudgetHelp: '每次读取的 token 预算;每轮上限为其两倍。',
831
831
  wmNumberInvalid: '请输入不小于 {min} 的整数。',
@@ -836,7 +836,7 @@ window.__ModuleLoader__.load({
836
836
  wmDenyModeHelpCap: '超出读预算的调用放行,但记录警示。',
837
837
  wmDenyModeHelpDeny: '超出读预算的调用直接拒绝。',
838
838
  wmAutoHandoverLabel: '自动交接',
839
- wmAutoHandoverHelp: '达到强制水位时自动备份并移交压缩,无需手动确认。',
839
+ wmAutoHandoverHelp: '达到强制水位时自动写交接文档并压缩,无需手动确认。',
840
840
  wmSubagentTitle: '子智能体',
841
841
  wmSubagentCapLabel: '子智能体上下文上限',
842
842
  wmSubagentCapHelp:
@@ -846,7 +846,7 @@ window.__ModuleLoader__.load({
846
846
  '仅覆盖子智能体的 force 档(soft/hard 与主会话共用);0 = 跟随上方强制水位。',
847
847
  wmSubagentFollowForce: '跟随 force 档(0)',
848
848
  wmCommands:
849
- '命令:/ctx-pause 暂停水位干预 · /ctx-resume 恢复干预 · /ctx-handover 立即备份并交接压缩。',
849
+ '命令:/ctx-pause 暂停水位干预 · /ctx-resume 恢复干预 · /ctx-handover 立即写交接文档并压缩。',
850
850
  trimSectionTitle: '上下文裁剪',
851
851
  trimModeLabel: '自动裁剪模式',
852
852
  trimModeHelp:
@@ -953,11 +953,11 @@ window.__ModuleLoader__.load({
953
953
  badgeTip:
954
954
  'dsh-switchman: the four built-in presets (standard / ptc / minimal / cordis) carry the autonomous Agent Teams doctrine',
955
955
  handoverActive: 'Handover in progress',
956
- handoverPhaseBackup: 'forking backup',
956
+ handoverPhaseBackup: 'writing handover doc',
957
957
  handoverPhaseCompacting: 'compacting context',
958
958
  handoverPhaseContinuation: 'waking continuation',
959
959
  handoverActiveTip:
960
- 'Switchman is handing over in the background: forking a backup session and compacting context; the task continues automatically when done. A still session during this window is expected.',
960
+ 'Switchman is handing over in the background: writing the handover document and compacting context; the task continues automatically when done. A still session during this window is expected.',
961
961
  visionHintNeedsPool:
962
962
  'This model cannot read images: add vision-pool models in the dsh-switchman settings, then send images with /vision.',
963
963
  visionHintUseVision:
@@ -1065,7 +1065,7 @@ window.__ModuleLoader__.load({
1065
1065
  wmHardLabel: 'Hard watermark',
1066
1066
  wmHardHelp: 'Past this, the read budget tightens and wrapping up is advised.',
1067
1067
  wmForceLabel: 'Force watermark',
1068
- wmForceHelp: 'Past this, back up and hand over to compaction (can be automatic).',
1068
+ wmForceHelp: 'Past this, write the handover doc and compact (can be automatic).',
1069
1069
  wmReadBudgetLabel: 'Read budget',
1070
1070
  wmReadBudgetHelp: 'Token budget per read; each round caps at twice this.',
1071
1071
  wmNumberInvalid: 'Enter a whole number of {min} or more.',
@@ -1076,7 +1076,7 @@ window.__ModuleLoader__.load({
1076
1076
  wmDenyModeHelpCap: 'Over-budget calls pass, but a warning is recorded.',
1077
1077
  wmDenyModeHelpDeny: 'Over-budget calls are denied outright.',
1078
1078
  wmAutoHandoverLabel: 'Automatic handover',
1079
- wmAutoHandoverHelp: 'At the force watermark, back up and hand over to compaction automatically.',
1079
+ wmAutoHandoverHelp: 'At the force watermark, write the handover doc and compact automatically.',
1080
1080
  wmSubagentTitle: 'Subagents',
1081
1081
  wmSubagentCapLabel: 'Subagent context cap',
1082
1082
  wmSubagentCapHelp:
@@ -1086,7 +1086,7 @@ window.__ModuleLoader__.load({
1086
1086
  'Overrides only the subagent force tier (soft/hard are shared with the main session); 0 follows the force watermark above.',
1087
1087
  wmSubagentFollowForce: 'Follow the force tier (0)',
1088
1088
  wmCommands:
1089
- 'Commands: /ctx-pause suspends watermark actions · /ctx-resume resumes them · /ctx-handover backs up and hands over now.',
1089
+ 'Commands: /ctx-pause suspends watermark actions · /ctx-resume resumes them · /ctx-handover writes the handover doc and compacts now.',
1090
1090
  trimSectionTitle: 'Context trim',
1091
1091
  trimModeLabel: 'Trim mode',
1092
1092
  trimModeHelp:
@@ -1213,10 +1213,10 @@ window.__ModuleLoader__.load({
1213
1213
  badge: '自主團隊',
1214
1214
  badgeTip: 'dsh-switchman:四個內建預設(standard / ptc / minimal / cordis)已注入自主智能體團隊調度規程',
1215
1215
  handoverActive: '交接進行中',
1216
- handoverPhaseBackup: '備份會話',
1216
+ handoverPhaseBackup: '寫入交接文件',
1217
1217
  handoverPhaseCompacting: '壓縮上下文',
1218
1218
  handoverPhaseContinuation: '喚醒續接',
1219
- handoverActiveTip: 'Switchman 正在背景交接:fork 備份會話並壓縮上下文,完成後自動繼續任務;期間會話靜止屬正常現象。',
1219
+ handoverActiveTip: 'Switchman 正在背景交接:寫入交接文件並壓縮上下文,完成後自動繼續任務;期間會話靜止屬正常現象。',
1220
1220
  visionHintNeedsPool: '目前模型不支援讀圖:請在 dsh-switchman 設定中配置多模態池模型,之後用 /vision 傳送圖片。',
1221
1221
  visionHintUseVision: '目前模型不支援讀圖:圖片請用 /vision 傳送(將自動派發多模態池讀取)。',
1222
1222
  visionAutoConverted: '圖片直傳被拒:已自動改用 /vision 重送(由多模態池讀取)。',
@@ -1311,7 +1311,7 @@ window.__ModuleLoader__.load({
1311
1311
  wmHardLabel: '硬水位(hard)',
1312
1312
  wmHardHelp: '達到後讀取預算收緊,並建議收尾目前工作。',
1313
1313
  wmForceLabel: '強制水位(force)',
1314
- wmForceHelp: '達到後建議備份並移交壓縮(可設為自動)。',
1314
+ wmForceHelp: '達到後建議寫交接文件並壓縮(可設為自動)。',
1315
1315
  wmReadBudgetLabel: '單次讀取預算',
1316
1316
  wmReadBudgetHelp: '每次讀取的 token 預算;每輪上限為其兩倍。',
1317
1317
  wmNumberInvalid: '請輸入不小於 {min} 的整數。',
@@ -1322,14 +1322,14 @@ window.__ModuleLoader__.load({
1322
1322
  wmDenyModeHelpCap: '超出讀取預算的呼叫放行,但記錄警示。',
1323
1323
  wmDenyModeHelpDeny: '超出讀取預算的呼叫直接拒絕。',
1324
1324
  wmAutoHandoverLabel: '自動交接',
1325
- wmAutoHandoverHelp: '達到強制水位時自動備份並移交壓縮,無需手動確認。',
1325
+ wmAutoHandoverHelp: '達到強制水位時自動寫交接文件並壓縮,無需手動確認。',
1326
1326
  wmSubagentTitle: '子智能體',
1327
1327
  wmSubagentCapLabel: '子智能體上下文上限',
1328
1328
  wmSubagentCapHelp: '開啟後子智能體可用下方獨立強制閾值;關閉則完全跟隨上方三檔水位。',
1329
1329
  wmSubagentForceLabel: '子智能體強制閾值',
1330
1330
  wmSubagentForceHelp: '僅覆蓋子智能體的 force 檔(soft/hard 與主會話共用);0 = 跟隨上方強制水位。',
1331
1331
  wmSubagentFollowForce: '跟隨 force 檔(0)',
1332
- wmCommands: '命令:/ctx-pause 暫停水位干預 · /ctx-resume 恢復干預 · /ctx-handover 立即備份並交接壓縮。',
1332
+ wmCommands: '命令:/ctx-pause 暫停水位干預 · /ctx-resume 恢復干預 · /ctx-handover 立即寫交接文件並壓縮。',
1333
1333
  trimSectionTitle: '上下文裁剪',
1334
1334
  trimModeLabel: '自動裁剪模式',
1335
1335
  trimModeHelp:
@@ -1432,10 +1432,10 @@ window.__ModuleLoader__.load({
1432
1432
  badge: '自律チーム',
1433
1433
  badgeTip: 'dsh-switchman:内蔵の 4 プリセット(standard / ptc / minimal / cordis)には自律エージェントチームのディスパッチ規律が注入済み',
1434
1434
  handoverActive: 'ハンドオーバー進行中',
1435
- handoverPhaseBackup: 'バックアップ作成中',
1435
+ handoverPhaseBackup: '引き継ぎ文書を作成中',
1436
1436
  handoverPhaseCompacting: 'コンテキスト圧縮中',
1437
1437
  handoverPhaseContinuation: '継続セッション起動中',
1438
- handoverActiveTip: 'Switchman がバックグラウンドでハンドオーバー中です:セッションを fork してバックアップし、コンテキストを圧縮します。完了するとタスクは自動的に再開します。この間セッションが静止するのは正常です。',
1438
+ handoverActiveTip: 'Switchman がバックグラウンドでハンドオーバー中です:引き継ぎ文書を書き込み、コンテキストを圧縮します。完了するとタスクは自動的に再開します。この間セッションが静止するのは正常です。',
1439
1439
  visionHintNeedsPool: 'このモデルは画像を読めません:dsh-switchman の設定でマルチモーダルプールのモデルを追加し、画像は /vision で送信してください。',
1440
1440
  visionHintUseVision: 'このモデルは画像を読めません:画像は /vision で送ってください(自動的にマルチモーダルプールへルーティングされます)。',
1441
1441
  visionAutoConverted: '画像の直接送信は拒否されました:自動的に /vision で再送信します(マルチモーダルプールが読み取ります)。',
@@ -1530,7 +1530,7 @@ window.__ModuleLoader__.load({
1530
1530
  wmHardLabel: 'ハード水位(hard)',
1531
1531
  wmHardHelp: '超えると読み取り予算が引き締められ、仕事の締めくくりが推奨されます。',
1532
1532
  wmForceLabel: '強制水位(force)',
1533
- wmForceHelp: '超えるとバックアップと圧縮へのハンドオーバーが推奨されます(自動化可能)。',
1533
+ wmForceHelp: '超えると引き継ぎ文書の作成と圧縮が推奨されます(自動化可能)。',
1534
1534
  wmReadBudgetLabel: '読み取り予算',
1535
1535
  wmReadBudgetHelp: '1 回の読み取りあたりの token 予算です。各ラウンドの上限はその 2 倍です。',
1536
1536
  wmNumberInvalid: '{min} 以上の整数を入力してください。',
@@ -1541,14 +1541,14 @@ window.__ModuleLoader__.load({
1541
1541
  wmDenyModeHelpCap: '予算超過の呼び出しは通しますが、警告を記録します。',
1542
1542
  wmDenyModeHelpDeny: '予算超過の呼び出しは即座に拒否します。',
1543
1543
  wmAutoHandoverLabel: '自動ハンドオーバー',
1544
- wmAutoHandoverHelp: '強制水位に達したら、確認なしでバックアップして圧縮へハンドオーバーします。',
1544
+ wmAutoHandoverHelp: '強制水位に達したら、確認なしで引き継ぎ文書を書いて圧縮します。',
1545
1545
  wmSubagentTitle: 'サブエージェント',
1546
1546
  wmSubagentCapLabel: 'サブエージェントのコンテキスト上限',
1547
1547
  wmSubagentCapHelp: 'オンにすると、下の専用強制しきい値を使えます。オフなら上の 3 段階の水位に完全に従います。',
1548
1548
  wmSubagentForceLabel: 'サブエージェント強制しきい値',
1549
1549
  wmSubagentForceHelp: 'サブエージェントの force 段階のみを上書きします(soft/hard はメインセッションと共通)。0 なら上の強制水位に従います。',
1550
1550
  wmSubagentFollowForce: 'force 段階に従う(0)',
1551
- wmCommands: 'コマンド:/ctx-pause で水位アクションを一時停止 · /ctx-resume で再開 · /ctx-handover で今すぐバックアップしてハンドオーバー。',
1551
+ wmCommands: 'コマンド:/ctx-pause で水位アクションを一時停止 · /ctx-resume で再開 · /ctx-handover で今すぐ引き継ぎ文書を書いて圧縮。',
1552
1552
  trimSectionTitle: 'コンテキストトリム',
1553
1553
  trimModeLabel: 'トリムモード',
1554
1554
  trimModeHelp:
@@ -1659,10 +1659,10 @@ window.__ModuleLoader__.load({
1659
1659
  badge: '자율 팀',
1660
1660
  badgeTip: 'dsh-switchman: 네 가지 내장 프리셋(standard / ptc / minimal / cordis)에 자율 에이전트 팀 디스패치 규율이 주입되어 있습니다',
1661
1661
  handoverActive: '핸드오버 진행 중',
1662
- handoverPhaseBackup: '세션 백업 중',
1662
+ handoverPhaseBackup: '핸드오버 문서 작성 중',
1663
1663
  handoverPhaseCompacting: '컨텍스트 압축 중',
1664
1664
  handoverPhaseContinuation: '후속 세션 깨우는 중',
1665
- handoverActiveTip: 'Switchman이 백그라운드에서 핸드오버 중입니다: 세션을 fork해 백업하고 컨텍스트를 압축하며, 완료되면 작업이 자동으로 이어집니다. 이 동안 세션이 잠시 멈추는 것은 정상입니다.',
1665
+ handoverActiveTip: 'Switchman이 백그라운드에서 핸드오버 중입니다: 핸드오버 문서를 작성하고 컨텍스트를 압축하며, 완료되면 작업이 자동으로 이어집니다. 이 동안 세션이 잠시 멈추는 것은 정상입니다.',
1666
1666
  visionHintNeedsPool: '이 모델은 이미지를 읽을 수 없습니다: dsh-switchman 설정에서 멀티모달 풀 모델을 추가한 뒤, 이미지를 /vision으로 보내 주세요.',
1667
1667
  visionHintUseVision: '이 모델은 이미지를 읽을 수 없습니다: 이미지는 /vision으로 보내 주세요(자동으로 멀티모달 풀로 라우팅됩니다).',
1668
1668
  visionAutoConverted: '이미지 직접 전송이 거부되었습니다: 자동으로 /vision으로 다시 보냅니다(멀티모달 풀이 읽습니다).',
@@ -1757,7 +1757,7 @@ window.__ModuleLoader__.load({
1757
1757
  wmHardLabel: '하드 수위(hard)',
1758
1758
  wmHardHelp: '넘으면 읽기 예산이 줄어들고 작업 마무리를 권장합니다.',
1759
1759
  wmForceLabel: '강제 수위(force)',
1760
- wmForceHelp: '넘으면 백업 후 압축으로 핸드오버를 권장합니다(자동화 가능).',
1760
+ wmForceHelp: '넘으면 핸드오버 문서 작성 후 압축을 권장합니다(자동화 가능).',
1761
1761
  wmReadBudgetLabel: '읽기 예산',
1762
1762
  wmReadBudgetHelp: '한 번 읽기당 토큰 예산입니다. 매 라운드 상한은 그 두 배입니다.',
1763
1763
  wmNumberInvalid: '{min} 이상의 정수를 입력하세요.',
@@ -1768,14 +1768,14 @@ window.__ModuleLoader__.load({
1768
1768
  wmDenyModeHelpCap: '예산 초과 호출은 통과시키지만 경고를 기록합니다.',
1769
1769
  wmDenyModeHelpDeny: '예산 초과 호출은 즉시 거부합니다.',
1770
1770
  wmAutoHandoverLabel: '자동 핸드오버',
1771
- wmAutoHandoverHelp: '강제 수위에 도달하면 확인 없이 백업하고 압축으로 핸드오버합니다.',
1771
+ wmAutoHandoverHelp: '강제 수위에 도달하면 확인 없이 핸드오버 문서를 작성하고 압축합니다.',
1772
1772
  wmSubagentTitle: '서브에이전트',
1773
1773
  wmSubagentCapLabel: '서브에이전트 컨텍스트 상한',
1774
1774
  wmSubagentCapHelp: '켜면 서브에이전트가 아래 전용 강제 임계값을 사용합니다. 끄면 위 세 수위를 그대로 따릅니다.',
1775
1775
  wmSubagentForceLabel: '서브에이전트 강제 임계값',
1776
1776
  wmSubagentForceHelp: '서브에이전트의 force 단계만 덮어씁니다(soft/hard는 메인 세션과 공유). 0이면 위 강제 수위를 따릅니다.',
1777
1777
  wmSubagentFollowForce: 'force 단계 따르기(0)',
1778
- wmCommands: '명령: /ctx-pause 수위 개입 일시 중지 · /ctx-resume 재개 · /ctx-handover 지금 백업하고 핸드오버.',
1778
+ wmCommands: '명령: /ctx-pause 수위 개입 일시 중지 · /ctx-resume 재개 · /ctx-handover 지금 핸드오버 문서를 작성하고 압축.',
1779
1779
  trimSectionTitle: '컨텍스트 트림',
1780
1780
  trimModeLabel: '트림 모드',
1781
1781
  trimModeHelp:
@@ -1885,10 +1885,10 @@ window.__ModuleLoader__.load({
1885
1885
  badge: 'Autonomes Team',
1886
1886
  badgeTip: 'dsh-switchman: Die vier integrierten Presets (standard / ptc / minimal / cordis) tragen die autonome-Agent-Teams-Doktrin',
1887
1887
  handoverActive: 'Übergabe läuft',
1888
- handoverPhaseBackup: 'Backup wird erstellt',
1888
+ handoverPhaseBackup: 'Übergabedokument wird geschrieben',
1889
1889
  handoverPhaseCompacting: 'Kontext wird komprimiert',
1890
1890
  handoverPhaseContinuation: 'Fortsetzung wird geweckt',
1891
- handoverActiveTip: 'Switchman übergibt gerade im Hintergrund: Eine Backup-Session wird geforkt und der Kontext komprimiert; die Aufgabe läuft danach automatisch weiter. Eine ruhende Session ist in dieser Phase normal.',
1891
+ handoverActiveTip: 'Switchman übergibt gerade im Hintergrund: Ein Übergabedokument wird geschrieben und der Kontext komprimiert; die Aufgabe läuft danach automatisch weiter. Eine ruhende Session ist in dieser Phase normal.',
1892
1892
  visionHintNeedsPool: 'Dieses Modell kann keine Bilder lesen: Fügen Sie in den dsh-switchman-Einstellungen Modelle zum Vision-Pool hinzu und senden Sie Bilder dann mit /vision.',
1893
1893
  visionHintUseVision: 'Dieses Modell kann keine Bilder lesen: Senden Sie Bilder mit /vision (automatisch an den Vision-Pool geleitet).',
1894
1894
  visionAutoConverted: 'Direkter Bildversand wurde abgelehnt: Er wird automatisch über /vision erneut gesendet (vom Vision-Pool gelesen).',
@@ -1983,7 +1983,7 @@ window.__ModuleLoader__.load({
1983
1983
  wmHardLabel: 'Harter Wasserstand (hard)',
1984
1984
  wmHardHelp: 'Danach strafft sich das Lese-Budget, und ein Abschluss wird empfohlen.',
1985
1985
  wmForceLabel: 'Erzwungener Wasserstand (force)',
1986
- wmForceHelp: 'Danach Backup erstellen und an die Komprimierung übergeben (automatisch möglich).',
1986
+ wmForceHelp: 'Danach Übergabedokument schreiben und komprimieren (automatisch möglich).',
1987
1987
  wmReadBudgetLabel: 'Lese-Budget',
1988
1988
  wmReadBudgetHelp: 'Token-Budget pro Lesevorgang; jede Runde ist auf das Doppelte gedeckelt.',
1989
1989
  wmNumberInvalid: 'Geben Sie eine ganze Zahl von mindestens {min} ein.',
@@ -1994,14 +1994,14 @@ window.__ModuleLoader__.load({
1994
1994
  wmDenyModeHelpCap: 'Über-Budget-Aufrufe laufen durch, aber eine Warnung wird protokolliert.',
1995
1995
  wmDenyModeHelpDeny: 'Über-Budget-Aufrufe werden direkt abgelehnt.',
1996
1996
  wmAutoHandoverLabel: 'Automatische Übergabe',
1997
- wmAutoHandoverHelp: 'Beim erzwungenen Wasserstand automatisch sichern und an die Komprimierung übergeben.',
1997
+ wmAutoHandoverHelp: 'Beim erzwungenen Wasserstand automatisch Übergabedokument schreiben und komprimieren.',
1998
1998
  wmSubagentTitle: 'Subagents',
1999
1999
  wmSubagentCapLabel: 'Kontext-Deckel für Subagents',
2000
2000
  wmSubagentCapHelp: 'Subagents dürfen die eigene erzwungene Schwelle unten nutzen; aus = vollständig den drei Stufen oben folgen.',
2001
2001
  wmSubagentForceLabel: 'Erzwungene Schwelle für Subagents',
2002
2002
  wmSubagentForceHelp: 'Überschreibt nur die Force-Stufe der Subagents (soft/hard teilen sich mit der Haupt-Session); 0 folgt dem erzwungenen Wasserstand oben.',
2003
2003
  wmSubagentFollowForce: 'Der Force-Stufe folgen (0)',
2004
- wmCommands: 'Befehle: /ctx-pause pausiert Wasserstand-Aktionen · /ctx-resume setzt sie fort · /ctx-handover sichert jetzt und übergibt sofort.',
2004
+ wmCommands: 'Befehle: /ctx-pause pausiert Wasserstand-Aktionen · /ctx-resume setzt sie fort · /ctx-handover schreibt das Übergabedokument jetzt und komprimiert sofort.',
2005
2005
  trimSectionTitle: 'Kontext-Trim',
2006
2006
  trimModeLabel: 'Trim-Modus',
2007
2007
  trimModeHelp:
@@ -2114,10 +2114,10 @@ window.__ModuleLoader__.load({
2114
2114
  badge: 'Equipo autónomo',
2115
2115
  badgeTip: 'dsh-switchman: los cuatro preajustes integrados (standard / ptc / minimal / cordis) incorporan la doctrina de equipos de agentes autónomos',
2116
2116
  handoverActive: 'Traspaso en curso',
2117
- handoverPhaseBackup: 'creando copia de seguridad',
2117
+ handoverPhaseBackup: 'escribiendo documento de traspaso',
2118
2118
  handoverPhaseCompacting: 'compactando contexto',
2119
2119
  handoverPhaseContinuation: 'despertando continuación',
2120
- handoverActiveTip: 'Switchman está realizando el traspaso en segundo plano: crea un fork de la sesión de respaldo y compacta el contexto; la tarea continúa automáticamente al terminar. Es normal que la sesión quede quieta durante este intervalo.',
2120
+ handoverActiveTip: 'Switchman está realizando el traspaso en segundo plano: escribe el documento de traspaso y compacta el contexto; la tarea continúa automáticamente al terminar. Es normal que la sesión quede quieta durante este intervalo.',
2121
2121
  visionHintNeedsPool: 'Este modelo no puede leer imágenes: añade modelos del grupo de visión en los ajustes de dsh-switchman y envía las imágenes con /vision.',
2122
2122
  visionHintUseVision: 'Este modelo no puede leer imágenes: envíalas con /vision (se enrutan automáticamente al grupo de visión).',
2123
2123
  visionAutoConverted: 'El envío directo de la imagen fue rechazado: se reenvía automáticamente vía /vision (lo lee el grupo de visión).',
@@ -2212,7 +2212,7 @@ window.__ModuleLoader__.load({
2212
2212
  wmHardLabel: 'Nivel duro (hard)',
2213
2213
  wmHardHelp: 'Al superarlo se ajusta el presupuesto de lectura y se recomienda cerrar el trabajo.',
2214
2214
  wmForceLabel: 'Nivel forzado (force)',
2215
- wmForceHelp: 'Al superarlo, haz copia de seguridad y traspasa a la compactación (puede ser automático).',
2215
+ wmForceHelp: 'Al superarlo, escribe el documento de traspaso y compacta (puede ser automático).',
2216
2216
  wmReadBudgetLabel: 'Presupuesto de lectura',
2217
2217
  wmReadBudgetHelp: 'Presupuesto de tokens por lectura; cada ronda se limita al doble.',
2218
2218
  wmNumberInvalid: 'Introduce un número entero de {min} o más.',
@@ -2223,14 +2223,14 @@ window.__ModuleLoader__.load({
2223
2223
  wmDenyModeHelpCap: 'Las llamadas sobre el presupuesto pasan, pero se registra un aviso.',
2224
2224
  wmDenyModeHelpDeny: 'Las llamadas sobre el presupuesto se rechazan directamente.',
2225
2225
  wmAutoHandoverLabel: 'Traspaso automático',
2226
- wmAutoHandoverHelp: 'En el nivel forzado, hace copia de seguridad y traspasa a la compactación automáticamente.',
2226
+ wmAutoHandoverHelp: 'En el nivel forzado, escribe el documento de traspaso y compacta automáticamente.',
2227
2227
  wmSubagentTitle: 'Subagentes',
2228
2228
  wmSubagentCapLabel: 'Tope de contexto de subagentes',
2229
2229
  wmSubagentCapHelp: 'Permite que los subagentes usen el umbral forzado propio de abajo; desactivado = seguir por completo los tres niveles de arriba.',
2230
2230
  wmSubagentForceLabel: 'Umbral forzado de subagentes',
2231
2231
  wmSubagentForceHelp: 'Solo sobrescribe el nivel forzado de los subagentes (soft/hard se comparten con la sesión principal); 0 sigue el nivel forzado de arriba.',
2232
2232
  wmSubagentFollowForce: 'Seguir el nivel forzado (0)',
2233
- wmCommands: 'Comandos: /ctx-pause suspende las acciones del nivel · /ctx-resume las reanuda · /ctx-handover hace copia y traspasa ahora.',
2233
+ wmCommands: 'Comandos: /ctx-pause suspende las acciones del nivel · /ctx-resume las reanuda · /ctx-handover escribe el documento y compacta ahora.',
2234
2234
  trimSectionTitle: 'Recorte de contexto',
2235
2235
  trimModeLabel: 'Modo de recorte',
2236
2236
  trimModeHelp:
@@ -2344,10 +2344,10 @@ window.__ModuleLoader__.load({
2344
2344
  badge: 'Équipe autonome',
2345
2345
  badgeTip: 'dsh-switchman : les quatre préréglages intégrés (standard / ptc / minimal / cordis) embarquent la doctrine d’équipe autonome des Agent Teams',
2346
2346
  handoverActive: 'Remise en cours',
2347
- handoverPhaseBackup: 'sauvegarde de la session',
2347
+ handoverPhaseBackup: 'écriture du document de remise',
2348
2348
  handoverPhaseCompacting: 'compactage du contexte',
2349
2349
  handoverPhaseContinuation: 'réveil de la continuation',
2350
- handoverActiveTip: 'Switchman effectue la remise en arrière-plan : fork d’une session de sauvegarde et compactage du contexte ; la tâche se poursuit automatiquement une fois terminée. Une session immobile pendant cette fenêtre est normale.',
2350
+ handoverActiveTip: 'Switchman effectue la remise en arrière-plan : écriture du document de remise et compactage du contexte ; la tâche se poursuit automatiquement une fois terminée. Une session immobile pendant cette fenêtre est normale.',
2351
2351
  visionHintNeedsPool: 'Ce modèle ne sait pas lire les images : ajoutez des modèles au pool multimodal dans les réglages dsh-switchman, puis envoyez les images avec /vision.',
2352
2352
  visionHintUseVision: 'Ce modèle ne sait pas lire les images : envoyez-les avec /vision (routage automatique vers le pool multimodal).',
2353
2353
  visionAutoConverted: 'Envoi d’image refusé : renvoi automatique via /vision (lecture par le pool multimodal).',
@@ -2442,7 +2442,7 @@ window.__ModuleLoader__.load({
2442
2442
  wmHardLabel: 'Ligne d’eau hard',
2443
2443
  wmHardHelp: 'Au-delà, le budget de lecture se resserre et il est conseillé de conclure.',
2444
2444
  wmForceLabel: 'Ligne d’eau force',
2445
- wmForceHelp: 'Au-delà, sauvegardez et remettez à la compaction (peut être automatique).',
2445
+ wmForceHelp: 'Au-delà, écrivez le document de remise et compactez (peut être automatique).',
2446
2446
  wmReadBudgetLabel: 'Budget de lecture',
2447
2447
  wmReadBudgetHelp: 'Budget de tokens par lecture ; chaque tour plafonne au double.',
2448
2448
  wmNumberInvalid: 'Saisissez un nombre entier d’au moins {min}.',
@@ -2453,14 +2453,14 @@ window.__ModuleLoader__.load({
2453
2453
  wmDenyModeHelpCap: 'Les appels au-delà du budget passent, mais un avertissement est consigné.',
2454
2454
  wmDenyModeHelpDeny: 'Les appels au-delà du budget sont refusés d’office.',
2455
2455
  wmAutoHandoverLabel: 'Remise automatique',
2456
- wmAutoHandoverHelp: 'À la ligne d’eau force, sauvegarde et remise automatiques à la compaction.',
2456
+ wmAutoHandoverHelp: 'À la ligne d’eau force, écriture du document de remise et compactage automatiques.',
2457
2457
  wmSubagentTitle: 'Subagents',
2458
2458
  wmSubagentCapLabel: 'Plafond de contexte des subagents',
2459
2459
  wmSubagentCapHelp: 'Laisse les subagents utiliser le seuil force dédié ci-dessous ; désactivé = suivent intégralement les trois paliers ci-dessus.',
2460
2460
  wmSubagentForceLabel: 'Seuil force des subagents',
2461
2461
  wmSubagentForceHelp: 'Ne remplace que le palier force des subagents (soft/hard partagés avec la session principale) ; 0 suit la ligne d’eau force ci-dessus.',
2462
2462
  wmSubagentFollowForce: 'Suivre le palier force (0)',
2463
- wmCommands: 'Commandes : /ctx-pause suspend les actions de niveau d’eau · /ctx-resume les reprend · /ctx-handover sauvegarde et remet maintenant.',
2463
+ wmCommands: 'Commandes : /ctx-pause suspend les actions de niveau d’eau · /ctx-resume les reprend · /ctx-handover écrit le document et compacte maintenant.',
2464
2464
  trimSectionTitle: 'Rognage du contexte',
2465
2465
  trimModeLabel: 'Mode de rognage',
2466
2466
  trimModeHelp:
@@ -2574,10 +2574,10 @@ window.__ModuleLoader__.load({
2574
2574
  badge: 'Squadra autonoma',
2575
2575
  badgeTip: 'dsh-switchman: i quattro preset integrati (standard / ptc / minimal / cordis) portano con sé la dottrina di squadra autonoma degli Agent Teams',
2576
2576
  handoverActive: 'Handover in corso',
2577
- handoverPhaseBackup: 'backup della sessione',
2577
+ handoverPhaseBackup: 'scrittura del documento di handover',
2578
2578
  handoverPhaseCompacting: 'compattazione del contesto',
2579
2579
  handoverPhaseContinuation: 'risveglio della continuazione',
2580
- handoverActiveTip: 'Switchman sta facendo l’handover in background: fork di una sessione di backup e compattazione del contesto; finito quello, il task prosegue da solo. Una sessione ferma in questa finestra è normale.',
2580
+ handoverActiveTip: 'Switchman sta facendo l’handover in background: scrittura del documento di handover e compattazione del contesto; finito quello, il task prosegue da solo. Una sessione ferma in questa finestra è normale.',
2581
2581
  visionHintNeedsPool: 'Questo modello non sa leggere le immagini: aggiungi modelli al pool multimodale nelle impostazioni di dsh-switchman, poi invia le immagini con /vision.',
2582
2582
  visionHintUseVision: 'Questo modello non sa leggere le immagini: inviale con /vision (instradate automaticamente al pool multimodale).',
2583
2583
  visionAutoConverted: 'Invio dell’immagine rifiutato: reinvio automatico via /vision (lettura dal pool multimodale).',
@@ -2672,7 +2672,7 @@ window.__ModuleLoader__.load({
2672
2672
  wmHardLabel: 'Soglia hard',
2673
2673
  wmHardHelp: 'Superata, il budget di lettura si stringe e conviene chiudere.',
2674
2674
  wmForceLabel: 'Soglia force',
2675
- wmForceHelp: 'Superata, backup e handover alla compattazione (può essere automatico).',
2675
+ wmForceHelp: 'Superata, scrittura del documento di handover e compattazione (può essere automatica).',
2676
2676
  wmReadBudgetLabel: 'Budget di lettura',
2677
2677
  wmReadBudgetHelp: 'Budget di token per lettura; ogni turno arriva al massimo al doppio.',
2678
2678
  wmNumberInvalid: 'Inserisci un numero intero di almeno {min}.',
@@ -2683,14 +2683,14 @@ window.__ModuleLoader__.load({
2683
2683
  wmDenyModeHelpCap: 'Le chiamate oltre budget passano, ma viene registrato un avviso.',
2684
2684
  wmDenyModeHelpDeny: 'Le chiamate oltre budget vengono rifiutate sul posto.',
2685
2685
  wmAutoHandoverLabel: 'Handover automatico',
2686
- wmAutoHandoverHelp: 'Alla soglia force, backup e handover alla compattazione avvengono da soli.',
2686
+ wmAutoHandoverHelp: 'Alla soglia force, scrittura del documento di handover e compattazione avvengono da soli.',
2687
2687
  wmSubagentTitle: 'Subagent',
2688
2688
  wmSubagentCapLabel: 'Tetto di contesto dei subagent',
2689
2689
  wmSubagentCapHelp: 'Lascia i subagent usare la soglia force dedicata qui sotto; spento = seguono appieno le tre soglie sopra.',
2690
2690
  wmSubagentForceLabel: 'Soglia force dei subagent',
2691
2691
  wmSubagentForceHelp: 'Sostituisce solo la soglia force dei subagent (soft/hard restano condivise con la sessione principale); 0 segue la soglia force sopra.',
2692
2692
  wmSubagentFollowForce: 'Segui la soglia force (0)',
2693
- wmCommands: 'Comandi: /ctx-pause sospende le azioni da livello dell’acqua · /ctx-resume le riprende · /ctx-handover fa backup e handover subito.',
2693
+ wmCommands: 'Comandi: /ctx-pause sospende le azioni da livello dell’acqua · /ctx-resume le riprende · /ctx-handover scrive il documento e compatta subito.',
2694
2694
  trimSectionTitle: 'Riduzione del contesto',
2695
2695
  trimModeLabel: 'Modalità di riduzione',
2696
2696
  trimModeHelp:
@@ -2804,10 +2804,10 @@ window.__ModuleLoader__.load({
2804
2804
  badge: 'Equipe autônoma',
2805
2805
  badgeTip: 'dsh-switchman: os quatro presets embutidos (standard / ptc / minimal / cordis) carregam a doutrina de equipe autônoma do Agent Teams',
2806
2806
  handoverActive: 'Handover em andamento',
2807
- handoverPhaseBackup: 'backup da sessão',
2807
+ handoverPhaseBackup: 'escrevendo documento de handover',
2808
2808
  handoverPhaseCompacting: 'compactação do contexto',
2809
2809
  handoverPhaseContinuation: 'despertar da continuação',
2810
- handoverActiveTip: 'O Switchman está fazendo o handover em segundo plano: fork de uma sessão de backup e compactação do contexto; ao terminar, a tarefa continua automaticamente. Uma sessão parada durante essa janela é esperada.',
2810
+ handoverActiveTip: 'O Switchman está fazendo o handover em segundo plano: escrita do documento de handover e compactação do contexto; ao terminar, a tarefa continua automaticamente. Uma sessão parada durante essa janela é esperada.',
2811
2811
  visionHintNeedsPool: 'Este modelo não sabe ler imagens: adicione modelos ao pool multimodal nas configurações do dsh-switchman e depois envie imagens com /vision.',
2812
2812
  visionHintUseVision: 'Este modelo não sabe ler imagens: envie-as com /vision (roteadas automaticamente para o pool multimodal).',
2813
2813
  visionAutoConverted: 'Envio da imagem recusado: reenvio automático via /vision (leitura pelo pool multimodal).',
@@ -2902,7 +2902,7 @@ window.__ModuleLoader__.load({
2902
2902
  wmHardLabel: 'Limiar hard',
2903
2903
  wmHardHelp: 'Além dele, o orçamento de leitura aperta e convém encerrar.',
2904
2904
  wmForceLabel: 'Limiar force',
2905
- wmForceHelp: 'Além dele, backup e handover para a compactação (pode ser automático).',
2905
+ wmForceHelp: 'Além dele, escrita do documento de handover e compactação (pode ser automática).',
2906
2906
  wmReadBudgetLabel: 'Orçamento de leitura',
2907
2907
  wmReadBudgetHelp: 'Orçamento de tokens por leitura; cada turno se limita ao dobro disso.',
2908
2908
  wmNumberInvalid: 'Informe um número inteiro de {min} ou mais.',
@@ -2913,14 +2913,14 @@ window.__ModuleLoader__.load({
2913
2913
  wmDenyModeHelpCap: 'Chamadas acima do orçamento passam, mas um aviso é registrado.',
2914
2914
  wmDenyModeHelpDeny: 'Chamadas acima do orçamento são negadas na hora.',
2915
2915
  wmAutoHandoverLabel: 'Handover automático',
2916
- wmAutoHandoverHelp: 'No limiar force, backup e handover para a compactação acontecem sozinhos.',
2916
+ wmAutoHandoverHelp: 'No limiar force, a escrita do documento de handover e a compactação acontecem sozinhas.',
2917
2917
  wmSubagentTitle: 'Subagents',
2918
2918
  wmSubagentCapLabel: 'Teto de contexto dos subagents',
2919
2919
  wmSubagentCapHelp: 'Deixa os subagents usar o limiar force dedicado abaixo; desligado = seguem integralmente os três limiares acima.',
2920
2920
  wmSubagentForceLabel: 'Limiar force dos subagents',
2921
2921
  wmSubagentForceHelp: 'Sobrepõe apenas o limiar force dos subagents (soft/hard são compartilhados com a sessão principal); 0 segue o limiar force acima.',
2922
2922
  wmSubagentFollowForce: 'Seguir o limiar force (0)',
2923
- wmCommands: 'Comandos: /ctx-pause suspende as ações de nível de água · /ctx-resume as retoma · /ctx-handover faz backup e handover agora.',
2923
+ wmCommands: 'Comandos: /ctx-pause suspende as ações de nível de água · /ctx-resume as retoma · /ctx-handover escreve o documento e compacta agora.',
2924
2924
  trimSectionTitle: 'Corte de contexto',
2925
2925
  trimModeLabel: 'Modo de corte',
2926
2926
  trimModeHelp:
@@ -3034,10 +3034,10 @@ window.__ModuleLoader__.load({
3034
3034
  badge: 'Автономная команда',
3035
3035
  badgeTip: 'dsh-switchman: четыре встроенных пресета (standard / ptc / minimal / cordis) несут с собой регламент автономной команды Agent Teams',
3036
3036
  handoverActive: 'Идёт передача',
3037
- handoverPhaseBackup: 'резервная сессия',
3037
+ handoverPhaseBackup: 'запись документа передачи',
3038
3038
  handoverPhaseCompacting: 'сжатие контекста',
3039
3039
  handoverPhaseContinuation: 'пробуждение продолжения',
3040
- handoverActiveTip: 'Switchman передаёт контекст в фоне: форкает резервную сессию и сжимает контекст; по завершении задача продолжается автоматически. Неподвижная сессия в это окно — это нормально.',
3040
+ handoverActiveTip: 'Switchman передаёт контекст в фоне: записывает документ передачи и сжимает контекст; по завершении задача продолжается автоматически. Неподвижная сессия в это окно — это нормально.',
3041
3041
  visionHintNeedsPool: 'Эта модель не умеет читать изображения: добавьте модели в мультимодальный пул в настройках dsh-switchman и отправляйте картинки через /vision.',
3042
3042
  visionHintUseVision: 'Эта модель не умеет читать изображения: отправляйте их через /vision (автоматически уйдут в мультимодальный пул).',
3043
3043
  visionAutoConverted: 'Отправка картинки отклонена: повторная отправка идёт автоматически через /vision (прочитает мультимодальный пул).',
@@ -3132,7 +3132,7 @@ window.__ModuleLoader__.load({
3132
3132
  wmHardLabel: 'Линия hard',
3133
3133
  wmHardHelp: 'Выше неё бюджет чтения урезается и стоит подвигаться к завершению.',
3134
3134
  wmForceLabel: 'Линия force',
3135
- wmForceHelp: 'Выше неё — резервная копия и передача на сжатие (может быть автоматически).',
3135
+ wmForceHelp: 'Выше неё — запись документа передачи и сжатие (может быть автоматически).',
3136
3136
  wmReadBudgetLabel: 'Бюджет чтения',
3137
3137
  wmReadBudgetHelp: 'Бюджет токенов на одно чтение; каждый ход ограничен удвоенным значением.',
3138
3138
  wmNumberInvalid: 'Введите целое число не меньше {min}.',
@@ -3143,14 +3143,14 @@ window.__ModuleLoader__.load({
3143
3143
  wmDenyModeHelpCap: 'Вызовы сверх бюджета проходят, но предупреждение записывается.',
3144
3144
  wmDenyModeHelpDeny: 'Вызовы сверх бюджета отклоняются сразу.',
3145
3145
  wmAutoHandoverLabel: 'Автоматическая передача',
3146
- wmAutoHandoverHelp: 'На линии force — резервная копия и передача на сжатие автоматически.',
3146
+ wmAutoHandoverHelp: 'На линии force — запись документа передачи и сжатие автоматически.',
3147
3147
  wmSubagentTitle: 'Субагенты',
3148
3148
  wmSubagentCapLabel: 'Потолок контекста субагентов',
3149
3149
  wmSubagentCapHelp: 'Субагенты используют отдельный порог force ниже; выключено = полностью следуют трём линиям выше.',
3150
3150
  wmSubagentForceLabel: 'Порог force субагентов',
3151
3151
  wmSubagentForceHelp: 'Меняет только линию force субагентов (soft/hard общие с главной сессией); 0 — следовать линии force выше.',
3152
3152
  wmSubagentFollowForce: 'Следовать линии force (0)',
3153
- wmCommands: 'Команды: /ctx-pause приостанавливает действия по уровню воды · /ctx-resume возобновляет их · /ctx-handover делает резервную копию и передаёт прямо сейчас.',
3153
+ wmCommands: 'Команды: /ctx-pause приостанавливает действия по уровню воды · /ctx-resume возобновляет их · /ctx-handover записывает документ передачи и сжимает прямо сейчас.',
3154
3154
  trimSectionTitle: 'Обрезка контекста',
3155
3155
  trimModeLabel: 'Режим обрезки',
3156
3156
  trimModeHelp:
@@ -3317,7 +3317,7 @@ window.__ModuleLoader__.load({
3317
3317
  );
3318
3318
  // Re-render when the manual interface-locale override changes.
3319
3319
  React.useSyncExternalStore(subscribeUiLocale, () => uiLocaleVersion);
3320
- // Live handover cue: during the fork+compact window the session
3320
+ // Live handover cue: during the handover window the session
3321
3321
  // GUI has no motion of its own, so the badge polls the Host's
3322
3322
  // handover-state route (phases recorded from runHandover's first
3323
3323
  // synchronous line) and flips to an animated status chip. Fast
package/host/config.js CHANGED
@@ -131,13 +131,13 @@ export const Config = z.object({
131
131
  wmSoftTokens: z.number().min(1000).default(80000).volatile(),
132
132
  /** Hard watermark: read budget tightens, wrap-up advised (tokens). */
133
133
  wmHardTokens: z.number().min(2000).default(120000).volatile(),
134
- /** Force watermark: backup + compaction handover (tokens). */
134
+ /** Force watermark: handover document + compaction (tokens). */
135
135
  wmForceTokens: z.number().min(3000).default(150000).volatile(),
136
136
  /** Per-call read budget for read/glob/grep (tokens). */
137
137
  wmReadBudgetTokens: z.number().min(200).default(3000).volatile(),
138
138
  /** Hard-tier behavior: cap reads and advise, or deny outright. */
139
139
  wmDenyMode: z.union(["cap", "deny"]).default("cap").volatile(),
140
- /** Force tier triggers backup + compaction automatically. */
140
+ /** Force tier triggers the handover (document + compaction) automatically. */
141
141
  wmAutoHandover: z.boolean().default(true).volatile(),
142
142
  /** Cap subagent contexts at wmSubagentForceTokens. */
143
143
  wmSubagentCap: z.boolean().default(true).volatile(),
@@ -261,6 +261,12 @@ export const Config = z.object({
261
261
  /** Explicit ledger state directory. Empty = <dshHome>/.dsh-switchman/
262
262
  * state/trim/. */
263
263
  trimStateDir: z.string().default("").volatile(),
264
+ /** Ship committed folds onto the session surface: append the host-style
265
+ * shadow-price + surfaceOp replace event pair so folds reach the wire
266
+ * even while the host freezes assembled requests. OFF keeps the legacy
267
+ * splice-only view (wire=raw banner on frozen dispatches). Auto-noop
268
+ * on hosts without the surface mechanism. */
269
+ surfaceFold: z.boolean().default(true).volatile(),
264
270
  });
265
271
 
266
272
  /** The six dispatch lanes, in display order. */
@@ -1,7 +1,6 @@
1
1
  /** dsh-switchman context-trim fork-state inheritance.
2
2
  *
3
- * When a session is forked (subagent_fork tool, or the handover's backup
4
- * fork through the subagents service), the child conversation STARTS as a
3
+ * When a session is forked (subagent_fork tool), the child conversation STARTS as a
5
4
  * content copy of the parent's history — including every range the parent
6
5
  * already folded. Without inheritance the child re-derives its ledger from
7
6
  * scratch and re-folds (or never folds) ranges the parent already settled,
@@ -12,8 +11,7 @@
12
11
  * - Linkage (fork time): the parent→child edge is recorded the moment the
13
12
  * fork is observed, into <stateDir>/fork-links.json (one bounded JSON
14
13
  * map, atomic tmp+rename writes). Two call sites observe forks: the
15
- * tools/post-execute listener on the subagent_fork tool (index.js) and
16
- * the handover backup fork (context-watch.js forkBackup). Refs are
14
+ * tools/post-execute listener on the subagent_fork tool (index.js). Refs are
17
15
  * CONTENT-anchored (view.js refOf), so a link only stores session ids.
18
16
  * - Inheritance (child first sight): when the child's history first flows
19
17
  * through the llm/stream view builder, the parent ledger is cloned into
@@ -152,13 +150,25 @@ export function resolveInheritance(parentLedger, parentId, childId, childMessage
152
150
  const frontier = typeof parentLedger.frontier === "string" && parentLedger.frontier !== "" ? parentLedger.frontier : null;
153
151
  if (frontier === null || !refPositions(childMessages).has(frontier)) return { ok: false, reason: "frontier-not-found" };
154
152
  // Detached copy: blocks are shared CONTENT but the ledgers must never
155
- // alias each other (two levels deep covers block + refRange).
153
+ // alias each other (two levels deep covers block + refRange). The
154
+ // parent's SURFACE bookkeeping (surfaceSeqs / surfaceReplaced /
155
+ // surfaceSkip) is stripped: those fields index the PARENT's event log —
156
+ // meaningless seqs in the child, and a parent-shipped range must re-ship
157
+ // (or re-locate) against the child's own surface (see surface.js).
156
158
  const ledger = {
157
159
  version: LEDGER_VERSION,
158
160
  sessionId: childId,
159
- blocks: blocks.map((block) => ({ ...block, refRange: { ...block.refRange } })),
161
+ blocks: blocks.map((block) => {
162
+ const clone = { ...block, refRange: { ...block.refRange } };
163
+ delete clone.surfaceSeqs;
164
+ delete clone.surfaceReplaced;
165
+ delete clone.surfaceSkip;
166
+ delete clone.surfaceHeadClamped;
167
+ return clone;
168
+ }),
160
169
  frontier,
161
170
  lastFoldViewTokens: Number.isFinite(parentLedger.lastFoldViewTokens) && parentLedger.lastFoldViewTokens > 0 ? Math.round(parentLedger.lastFoldViewTokens) : 0,
171
+ lastFoldLowTokens: Number.isFinite(parentLedger.lastFoldLowTokens) && parentLedger.lastFoldLowTokens > 0 ? Math.round(parentLedger.lastFoldLowTokens) : 0,
162
172
  lastFoldAt: Number.isFinite(parentLedger.lastFoldAt) ? parentLedger.lastFoldAt : 0,
163
173
  foldsThisHour: Array.isArray(parentLedger.foldsThisHour) ? parentLedger.foldsThisHour.filter((ts) => Number.isFinite(ts)) : [],
164
174
  inheritedFrom: typeof parentId === "string" && parentId !== "" ? parentId : "unknown",