dsh-session-sync 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.pt.md CHANGED
@@ -11,6 +11,8 @@
11
11
 
12
12
  Um plugin de sincronização puramente host-side para DeepSeek Harness: os arquivos de sessão são copiados como bytes opacos, a divergência é resolvida por um merge de três vias append-only e o remoto é seu (git em texto plano por padrão, criptografia age opcional) — sem serviço na nuvem, sem armazenamento de terceiros.
13
13
 
14
+ Última verificação: DeepSeek Harness `dsh-v0.2.3-alpha.1` (2026-11-22).
15
+
14
16
  [Instalar](#instalação-em-três-passos) · [Configuração](#configuração) · [FAQ](#faq) · [简体中文](README.md) · [English](README.en.md) · [Español](README.es.md) · [Português](README.pt.md) · [हिन्दी](README.hi.md)
15
17
 
16
18
  [![License](https://img.shields.io/badge/license-Apache--2.0-3366CC?style=flat-square&labelColor=2B3245)](LICENSE)
@@ -43,6 +45,11 @@ O `dsh-session-sync` espelha o armazenamento de sessões do DSH (`$DSH_HOME/sess
43
45
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/dsh-session-sync-flow-v5-dark.svg">
44
46
  <img src="docs/assets/dsh-session-sync-flow-v5-light.svg" width="100%" alt="Estrutura do dsh-session-sync: o dispositivo A espelha os bytes e confirma $DSH_HOME/sessions, e o push cruza o portão de confirmação até o seu remoto git; o dispositivo B faz fetch, executa um merge de três vias por arquivo (base/ours/theirs) e restaura as sessões localmente, mantendo os bytes remotos divergentes como arquivos fork no caminho original; arquivos fork nunca são apagados nem sobrescritos.">
45
47
  </picture>
48
+
49
+ ![dsh-session-sync: execução real de terminal](docs/assets/dsh-session-sync-demo.gif)
50
+
51
+ *Repetição animada de uma execução real registrada neste repositório.*
52
+
46
53
  </p>
47
54
 
48
55
  ## Instalação em três passos
@@ -313,6 +320,8 @@ O espelho **nunca segue links simbólicos** por padrão (limite de segurança).
313
320
  | Plataformas | Onde quer que `git` e DSH rodem (espelho baseado em git; sem código específico de plataforma) |
314
321
  | Modelo | Modelos apenas de texto totalmente suportados; nenhuma visão ou capacidade extra de modelo é necessária |
315
322
 
323
+ **A sincronização entre dispositivos precisa de versões compatíveis do motor DSH.** O evento `subagent/catalog` carrega um fact versionado; um motor antigo que lê um fact version 3 gravado por um mais novo (por exemplo 0.2.2-rc.3) rejeita o log inteiro como `stored log is corrupt: ... subagent/catalog requires a supported versioned catalog fact`. Os bytes replicados estão corretos — o leitor é antigo demais. Sessões sem subagentes normalmente não são afetadas. Mantenha os dois motores em versões próximas, ou atualize o dispositivo antigo antes de abrir essas sessões.
324
+
316
325
  ## Ecossistema e qualidade
317
326
 
318
327
  - [Espelho no Gitee](https://gitee.com/perrylink/dsh-session-sync) (espelho sincronizado; o GitHub é canônico)
@@ -354,18 +363,28 @@ Este projeto faz parte da família de plugins de DeepSeek Harness da [PerryLink]
354
363
  | **[dsh-aqua-input-check](https://github.com/PerryLink/dsh-aqua-input-check)** | |
355
364
  | **[dsh-archive-check](https://github.com/PerryLink/dsh-archive-check)** | |
356
365
  | **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | |
357
- | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | 🧊 CONGELADO — ver o README do repo |
366
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | 🧊 CONGELADO — ver o README do repositório |
367
+ | **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | 🚫 RETIRADO — ver o README do repositório |
358
368
  | **[dsh-bid-ca-precheck](https://github.com/PerryLink/dsh-bid-ca-precheck)** | |
359
369
  | **[dsh-bid-qual-check](https://github.com/PerryLink/dsh-bid-qual-check)** | |
360
- | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | 🧊 CONGELADO — ver o README do repo |
370
+ | **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | 🧊 CONGELADO — ver o README do repositório |
371
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | 🧊 CONGELADO — ver o README do repositório |
372
+ | **[dsh-check-pack](https://github.com/PerryLink/dsh-check-pack)** | |
361
373
  | **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | |
374
+ | **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | 🧊 CONGELADO — ver o README do repositório |
362
375
  | **[dsh-click](https://github.com/PerryLink/dsh-click)** | |
376
+ | **[dsh-clinic](https://github.com/PerryLink/dsh-clinic)** | |
377
+ | **[dsh-codemod](https://github.com/PerryLink/dsh-codemod)** | |
378
+ | **[dsh-community-bench](https://github.com/PerryLink/dsh-community-bench)** | 🧊 CONGELADO — ver o README do repositório |
363
379
  | **[dsh-composer-history](https://github.com/PerryLink/dsh-composer-history)** | |
364
380
  | **[dsh-contract-stance](https://github.com/PerryLink/dsh-contract-stance)** | |
365
381
  | **[dsh-customs-doc-check](https://github.com/PerryLink/dsh-customs-doc-check)** | |
366
382
  | **[dsh-data-quality](https://github.com/PerryLink/dsh-data-quality)** | 🧊 CONGELADO — ver o README do repo |
383
+ | **[dsh-defend](https://github.com/PerryLink/dsh-defend)** | 🧊 CONGELADO — ver o README do repositório |
367
384
  | **[dsh-demurrage-ledger](https://github.com/PerryLink/dsh-demurrage-ledger)** | |
385
+ | **[dsh-dida](https://github.com/PerryLink/dsh-dida)** | |
368
386
  | **[dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck)** | |
387
+ | **[dsh-draw](https://github.com/PerryLink/dsh-draw)** | 🧊 CONGELADO — ver o README do repositório |
369
388
  | **[dsh-drill-script-check](https://github.com/PerryLink/dsh-drill-script-check)** | |
370
389
  | **[dsh-eia-guide-check](https://github.com/PerryLink/dsh-eia-guide-check)** | |
371
390
  | **[dsh-emergency-plan](https://github.com/PerryLink/dsh-emergency-plan)** | |
@@ -376,7 +395,7 @@ Este projeto faz parte da família de plugins de DeepSeek Harness da [PerryLink]
376
395
  | **[dsh-fmea-table-check](https://github.com/PerryLink/dsh-fmea-table-check)** | |
377
396
  | **[dsh-forecast-penalty](https://github.com/PerryLink/dsh-forecast-penalty)** | |
378
397
  | **[dsh-fund-research](https://github.com/PerryLink/dsh-fund-research)** | |
379
- | **[dsh-github](https://github.com/PerryLink/dsh-github)** | |
398
+ | **[dsh-github-bot](https://github.com/PerryLink/dsh-github-bot)** | |
380
399
  | **[dsh-gongwen-flow-check](https://github.com/PerryLink/dsh-gongwen-flow-check)** | |
381
400
  | **[dsh-gongwen-word-check](https://github.com/PerryLink/dsh-gongwen-word-check)** | |
382
401
  | **[dsh-guard-plan-qc](https://github.com/PerryLink/dsh-guard-plan-qc)** | |
@@ -404,48 +423,42 @@ Este projeto faz parte da família de plugins de DeepSeek Harness da [PerryLink]
404
423
  | **[dsh-ota-review-check](https://github.com/PerryLink/dsh-ota-review-check)** | |
405
424
  | **[dsh-output-styles](https://github.com/PerryLink/dsh-output-styles)** | |
406
425
  | **[dsh-paper-doc-adapter](https://github.com/PerryLink/dsh-paper-doc-adapter)** | |
426
+ | **[dsh-param-repair](https://github.com/PerryLink/dsh-param-repair)** | |
407
427
  | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | |
408
428
  | **[dsh-permit-report-check](https://github.com/PerryLink/dsh-permit-report-check)** | |
429
+ | **[dsh-phocinae](https://github.com/PerryLink/dsh-phocinae)** | |
430
+ | **[dsh-phone-inbox](https://github.com/PerryLink/dsh-phone-inbox)** | |
409
431
  | **[dsh-pipeline-check](https://github.com/PerryLink/dsh-pipeline-check)** | |
410
432
  | **[dsh-pleading-draft](https://github.com/PerryLink/dsh-pleading-draft)** | |
411
- | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | 🚫 APOSENTADO (repo arquivado) |
412
- | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | |
413
- | **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | 🚫 APOSENTADO (repo arquivado) |
414
- | **[dsh-plugin-upgrade](https://github.com/PerryLink/dsh-plugin-upgrade)** | 🚫 APOSENTADO (repo arquivado) |
415
433
  | **[dsh-policy-brief-draft](https://github.com/PerryLink/dsh-policy-brief-draft)** | |
416
434
  | **[dsh-power-loss-split](https://github.com/PerryLink/dsh-power-loss-split)** | |
417
435
  | **[dsh-power-ticket-check](https://github.com/PerryLink/dsh-power-ticket-check)** | |
418
436
  | **[dsh-ppap-check](https://github.com/PerryLink/dsh-ppap-check)** | |
437
+ | **[dsh-primer](https://github.com/PerryLink/dsh-primer)** | |
419
438
  | **[dsh-protest-deadline](https://github.com/PerryLink/dsh-protest-deadline)** | |
420
439
  | **[dsh-railway-window](https://github.com/PerryLink/dsh-railway-window)** | |
440
+ | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | 🧊 CONGELADO — ver o README do repositório |
421
441
  | **[dsh-repair-order-qc](https://github.com/PerryLink/dsh-repair-order-qc)** | |
422
442
  | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | |
423
443
  | **[dsh-review-reply-check](https://github.com/PerryLink/dsh-review-reply-check)** | |
424
444
  | **[dsh-rulefile-check](https://github.com/PerryLink/dsh-rulefile-check)** | |
425
445
  | **[dsh-safety-brief-check](https://github.com/PerryLink/dsh-safety-brief-check)** | |
446
+ | **[dsh-scaffold](https://github.com/PerryLink/dsh-scaffold)** | |
426
447
  | **[dsh-score](https://github.com/PerryLink/dsh-score)** | 🧊 CONGELADO — ver o README do repo |
448
+ | **[dsh-security-pack](https://github.com/PerryLink/dsh-security-pack)** | |
449
+ | **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | 🚫 RETIRADO — ver o README do repositório |
427
450
  | **[dsh-session-sync](https://github.com/PerryLink/dsh-session-sync)** | |
428
451
  | **[dsh-site-log-check](https://github.com/PerryLink/dsh-site-log-check)** | |
429
- | **[dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security)** | |
430
452
  | **[dsh-soe-decision-check](https://github.com/PerryLink/dsh-soe-decision-check)** | |
431
453
  | **[dsh-soilwater-check](https://github.com/PerryLink/dsh-soilwater-check)** | |
432
454
  | **[dsh-sop-sync-check](https://github.com/PerryLink/dsh-sop-sync-check)** | |
433
455
  | **[dsh-spc-gbt-adapter](https://github.com/PerryLink/dsh-spc-gbt-adapter)** | |
434
456
  | **[dsh-talk](https://github.com/PerryLink/dsh-talk)** | |
457
+ | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | 🚫 RETIRADO — ver o README do repositório |
435
458
  | **[dsh-tender-extract](https://github.com/PerryLink/dsh-tender-extract)** | |
436
459
  | **[dsh-tender-matrix](https://github.com/PerryLink/dsh-tender-matrix)** | |
437
460
  | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | |
438
- | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | 🚫 APOSENTADO (repo arquivado) |
439
- | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | |
440
461
  | **[dsh-warranty-calc](https://github.com/PerryLink/dsh-warranty-calc)** | |
441
- | **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | 🧊 CONGELADO — ver o README do repo |
442
- | **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | 🧊 CONGELADO — ver o README do repo |
443
- | **[dsh-defend](https://github.com/PerryLink/dsh-defend)** | 🧊 CONGELADO — ver o README do repo |
444
- | **[dsh-draw](https://github.com/PerryLink/dsh-draw)** | 🧊 CONGELADO — ver o README do repo |
445
- | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | 🧊 CONGELADO — ver o README do repo |
446
- | **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | 🚫 APOSENTADO (repo arquivado) |
447
- | **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | 🚫 APOSENTADO (repo arquivado) |
448
- | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | 🚫 APOSENTADO (repo arquivado) |
449
462
 
450
463
  </details>
451
464
 
@@ -0,0 +1,40 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400" role="img" aria-label="dsh-session-sync data flow">
2
+ <title>dsh-session-sync data flow</title>
3
+ <rect width="1200" height="400" rx="18" fill="#0d1117"/>
4
+ <text x="60" y="58" fill="#f0f6fc" font-family="ui-sans-serif,system-ui,sans-serif" font-size="30" font-weight="700">dsh-session-sync</text>
5
+ <text x="60" y="90" fill="#8b949e" font-family="ui-monospace,monospace" font-size="16">git mirror of the session store · append-only keep-both merge</text>
6
+ <line x1="60" y1="112" x2="1140" y2="112" stroke="#30363d"/>
7
+ <rect x="62" y="150" width="156" height="88" rx="14" fill="#161b22" stroke="#30363d" stroke-width="2"/>
8
+ <text x="140" y="188" fill="#f0f6fc" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">$DSH_HOME/sessions</text>
9
+ <text x="140" y="214" fill="#8b949e" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">session bytes</text>
10
+ <path d="M221 194h16" stroke="#8b949e" stroke-width="3"/>
11
+ <path d="M235 187l10 7-10 7" fill="none" stroke="#8b949e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
12
+ <rect x="246" y="150" width="156" height="88" rx="14" fill="#161b22" stroke="#4B67B4" stroke-width="2"/>
13
+ <text x="324" y="188" fill="#f0f6fc" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">mirror</text>
14
+ <text x="324" y="214" fill="#8b949e" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">opaque copy</text>
15
+ <path d="M405 194h16" stroke="#8b949e" stroke-width="3"/>
16
+ <path d="M419 187l10 7-10 7" fill="none" stroke="#8b949e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
17
+ <rect x="430" y="150" width="156" height="88" rx="14" fill="#161b22" stroke="#30363d" stroke-width="2"/>
18
+ <text x="508" y="188" fill="#f0f6fc" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">commit</text>
19
+ <text x="508" y="214" fill="#8b949e" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">plugin identity</text>
20
+ <path d="M589 194h16" stroke="#8b949e" stroke-width="3"/>
21
+ <path d="M603 187l10 7-10 7" fill="none" stroke="#8b949e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
22
+ <rect x="614" y="150" width="156" height="88" rx="14" fill="#161b22" stroke="#30363d" stroke-width="2"/>
23
+ <text x="692" y="188" fill="#f0f6fc" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">push</text>
24
+ <text x="692" y="214" fill="#8b949e" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">git + age</text>
25
+ <path d="M773 194h16" stroke="#8b949e" stroke-width="3"/>
26
+ <path d="M787 187l10 7-10 7" fill="none" stroke="#8b949e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
27
+ <rect x="798" y="150" width="156" height="88" rx="14" fill="#161b22" stroke="#30363d" stroke-width="2"/>
28
+ <text x="876" y="188" fill="#f0f6fc" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">your remote</text>
29
+ <text x="876" y="214" fill="#8b949e" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">private repo</text>
30
+ <path d="M957 194h16" stroke="#8b949e" stroke-width="3"/>
31
+ <path d="M971 187l10 7-10 7" fill="none" stroke="#8b949e" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
32
+ <rect x="982" y="150" width="156" height="88" rx="14" fill="#161b22" stroke="#4B67B4" stroke-width="2"/>
33
+ <text x="1060" y="188" fill="#f0f6fc" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">pull</text>
34
+ <text x="1060" y="214" fill="#8b949e" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">fetch + merge</text>
35
+ <path d="M324 238v48" stroke="#4B67B4" stroke-width="2" stroke-dasharray="5 5"/>
36
+ <path d="M1060 238v48" stroke="#4B67B4" stroke-width="2" stroke-dasharray="5 5"/>
37
+ <rect x="300" y="286" width="784" height="50" rx="12" fill="#161b22" stroke="#4B67B4" stroke-width="2"/>
38
+ <text x="692" y="317" fill="#f0f6fc" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13">append-only three-way merge · keep both + fork file · never force-push</text>
39
+ <text x="60" y="378" fill="#8b949e" font-family="ui-monospace,monospace" font-size="13">backend: git | encrypted (age) · /sync status: branch · ahead/behind · dirty · forks</text>
40
+ </svg>
@@ -0,0 +1,40 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400" role="img" aria-label="dsh-session-sync data flow">
2
+ <title>dsh-session-sync data flow</title>
3
+ <rect width="1200" height="400" rx="18" fill="#ffffff"/>
4
+ <text x="60" y="58" fill="#1f2328" font-family="ui-sans-serif,system-ui,sans-serif" font-size="30" font-weight="700">dsh-session-sync</text>
5
+ <text x="60" y="90" fill="#57606a" font-family="ui-monospace,monospace" font-size="16">git mirror of the session store · append-only keep-both merge</text>
6
+ <line x1="60" y1="112" x2="1140" y2="112" stroke="#d0d7de"/>
7
+ <rect x="62" y="150" width="156" height="88" rx="14" fill="#f6f8fa" stroke="#d0d7de" stroke-width="2"/>
8
+ <text x="140" y="188" fill="#1f2328" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">$DSH_HOME/sessions</text>
9
+ <text x="140" y="214" fill="#57606a" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">session bytes</text>
10
+ <path d="M221 194h16" stroke="#57606a" stroke-width="3"/>
11
+ <path d="M235 187l10 7-10 7" fill="none" stroke="#57606a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
12
+ <rect x="246" y="150" width="156" height="88" rx="14" fill="#f6f8fa" stroke="#4B67B4" stroke-width="2"/>
13
+ <text x="324" y="188" fill="#1f2328" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">mirror</text>
14
+ <text x="324" y="214" fill="#57606a" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">opaque copy</text>
15
+ <path d="M405 194h16" stroke="#57606a" stroke-width="3"/>
16
+ <path d="M419 187l10 7-10 7" fill="none" stroke="#57606a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
17
+ <rect x="430" y="150" width="156" height="88" rx="14" fill="#f6f8fa" stroke="#d0d7de" stroke-width="2"/>
18
+ <text x="508" y="188" fill="#1f2328" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">commit</text>
19
+ <text x="508" y="214" fill="#57606a" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">plugin identity</text>
20
+ <path d="M589 194h16" stroke="#57606a" stroke-width="3"/>
21
+ <path d="M603 187l10 7-10 7" fill="none" stroke="#57606a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
22
+ <rect x="614" y="150" width="156" height="88" rx="14" fill="#f6f8fa" stroke="#d0d7de" stroke-width="2"/>
23
+ <text x="692" y="188" fill="#1f2328" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">push</text>
24
+ <text x="692" y="214" fill="#57606a" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">git + age</text>
25
+ <path d="M773 194h16" stroke="#57606a" stroke-width="3"/>
26
+ <path d="M787 187l10 7-10 7" fill="none" stroke="#57606a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
27
+ <rect x="798" y="150" width="156" height="88" rx="14" fill="#f6f8fa" stroke="#d0d7de" stroke-width="2"/>
28
+ <text x="876" y="188" fill="#1f2328" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">your remote</text>
29
+ <text x="876" y="214" fill="#57606a" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">private repo</text>
30
+ <path d="M957 194h16" stroke="#57606a" stroke-width="3"/>
31
+ <path d="M971 187l10 7-10 7" fill="none" stroke="#57606a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
32
+ <rect x="982" y="150" width="156" height="88" rx="14" fill="#f6f8fa" stroke="#4B67B4" stroke-width="2"/>
33
+ <text x="1060" y="188" fill="#1f2328" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13" font-weight="700">pull</text>
34
+ <text x="1060" y="214" fill="#57606a" text-anchor="middle" font-family="ui-monospace,monospace" font-size="11">fetch + merge</text>
35
+ <path d="M324 238v48" stroke="#4B67B4" stroke-width="2" stroke-dasharray="5 5"/>
36
+ <path d="M1060 238v48" stroke="#4B67B4" stroke-width="2" stroke-dasharray="5 5"/>
37
+ <rect x="300" y="286" width="784" height="50" rx="12" fill="#f6f8fa" stroke="#4B67B4" stroke-width="2"/>
38
+ <text x="692" y="317" fill="#1f2328" text-anchor="middle" font-family="ui-monospace,monospace" font-size="13">append-only three-way merge · keep both + fork file · never force-push</text>
39
+ <text x="60" y="378" fill="#57606a" font-family="ui-monospace,monospace" font-size="13">backend: git | encrypted (age) · /sync status: branch · ahead/behind · dirty · forks</text>
40
+ </svg>
@@ -0,0 +1,125 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1100" height="660" viewBox="0 0 1100 660" role="img" aria-label="dsh-session-sync structure diagram">
2
+ <title>dsh-session-sync structure: byte mirror, owned git remote, keep-both fork</title>
3
+ <desc>Device A mirrors the session store as opaque bytes and commits; push crosses a confirmation gate into the git remote you own. Device B fetches, runs a per-file three-way merge (base, ours, theirs) and restores sessions. Divergent remote bytes become fork files at the original path, never overwritten and never force-pushed.</desc>
4
+ <defs>
5
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#131a2a"/><stop offset="1" stop-color="#0c1016"/></linearGradient>
6
+ <radialGradient id="glow" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#8496f5" stop-opacity=".18"/><stop offset="1" stop-color="#8496f5" stop-opacity="0"/></radialGradient>
7
+ <filter id="soft" x="-15%" y="-15%" width="130%" height="140%"><feDropShadow dx="0" dy="6" stdDeviation="9" flood-color="#000000" flood-opacity=".38"/></filter>
8
+ <marker id="ar" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="#8496f5"/></marker>
9
+ <marker id="ar-soft" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="#93a0c0"/></marker>
10
+ </defs>
11
+ <style>
12
+ .h1{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:26px;font-weight:700;fill:#eef1ff}
13
+ .sub{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:12.5px;fill:#c2cbe4}
14
+ .k{font-family:'Segoe UI',system-ui,sans-serif;font-size:11px;font-weight:700;letter-spacing:2px;fill:#8496f5}
15
+ .ptitle{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:18px;font-weight:700;fill:#eef1ff}
16
+ .pnote{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#93a0c0}
17
+ .ctitle{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:15px;font-weight:700;fill:#eef1ff}
18
+ .mtitle{font-family:'Consolas',ui-monospace,monospace;font-size:13.5px;font-weight:700;fill:#eef1ff}
19
+ .note{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#c2cbe4}
20
+ .muted{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#93a0c0}
21
+ .mono{font-family:'Consolas',ui-monospace,monospace;font-size:11px;fill:#c2cbe4}
22
+ .mono-a{font-family:'Consolas',ui-monospace,monospace;font-size:11px;fill:#aebcff}
23
+ .lbl{font-family:'Segoe UI',system-ui,sans-serif;font-size:11px;font-weight:700;fill:#aebcff}
24
+ .foot{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#93a0c0}
25
+ </style>
26
+ <rect width="1100" height="660" rx="22" fill="url(#bg)"/>
27
+ <ellipse cx="960" cy="80" rx="300" ry="170" fill="url(#glow)"/>
28
+ <ellipse cx="150" cy="600" rx="260" ry="130" fill="url(#glow)" opacity=".55"/>
29
+ <text x="48" y="52" class="k">DSH PLUGIN · SESSION SYNC</text>
30
+ <text x="47" y="86" class="h1">Byte mirror → owned remote → keep-both</text>
31
+ <text x="48" y="110" class="sub">Session files move as opaque bytes; divergent histories keep both sides as fork files.</text>
32
+ <line x1="48" y1="126" x2="1052" y2="126" stroke="#2c3852" stroke-width="1"/>
33
+ <rect x="48" y="140" width="332" height="338" rx="20" fill="#161e2e" fill-opacity=".90" stroke="#2c3852" filter="url(#soft)"/>
34
+ <text x="68" y="166" class="k">DEVICE A · LOCAL</text>
35
+ <text x="68" y="192" class="ptitle">Byte mirror &amp; commit</text>
36
+ <text x="68" y="210" class="pnote">push path · manual writes confirm</text>
37
+ <rect x="66" y="218" width="296" height="64" rx="18" fill="#1b2436" fill-opacity=".94" stroke="#33405e"/>
38
+ <text x="84" y="242" class="mtitle">$DSH_HOME/sessions</text>
39
+ <text x="84" y="260" class="note">opaque session bytes · JSONL/zstd untouched</text>
40
+ <text x="84" y="276" class="muted">session.lock &amp; migration temp files excluded</text>
41
+ <line x1="120" y1="282" x2="120" y2="300" stroke="#8496f5" stroke-width="2" marker-end="url(#ar)"/>
42
+ <text x="134" y="299" class="lbl">byte mirror</text>
43
+ <rect x="66" y="306" width="296" height="64" rx="18" fill="#1b2436" fill-opacity=".94" stroke="#33405e"/>
44
+ <text x="84" y="330" class="mtitle">&lt;repoDir&gt;/sessions</text>
45
+ <text x="84" y="348" class="note">dedicated git worktree · plaintext mirror</text>
46
+ <text x="84" y="364" class="muted">symlinks refused · paths contained</text>
47
+ <line x1="120" y1="370" x2="120" y2="388" stroke="#8496f5" stroke-width="2" marker-end="url(#ar)"/>
48
+ <text x="134" y="387" class="lbl">commit</text>
49
+ <rect x="66" y="394" width="296" height="64" rx="18" fill="#1b2436" fill-opacity=".94" stroke="#33405e"/>
50
+ <text x="84" y="418" class="mtitle">local commit</text>
51
+ <text x="84" y="436" class="note">plugin identity (never your git identity)</text>
52
+ <text x="84" y="452" class="muted">device.txt recorded for fork attribution</text>
53
+ <rect x="420" y="140" width="260" height="338" rx="20" fill="#8496f5" fill-opacity=".12" stroke="#8496f5" stroke-opacity=".34" filter="url(#soft)"/>
54
+ <rect x="421" y="162" width="6" height="296" rx="3" fill="#8496f5" fill-opacity=".55"/>
55
+ <text x="444" y="166" class="k">YOUR GIT REMOTE</text>
56
+ <text x="444" y="192" class="ptitle">your repo</text>
57
+ <text x="444" y="212" class="mono">branch: main</text>
58
+ <line x1="480" y1="242" x2="480" y2="430" stroke="#8496f5" stroke-width="2.5"/>
59
+ <circle cx="480" cy="252" r="5.5" fill="#1b2436" stroke="#8496f5" stroke-width="2.5"/>
60
+ <circle cx="480" cy="296" r="5.5" fill="#1b2436" stroke="#8496f5" stroke-width="2.5"/>
61
+ <circle cx="480" cy="340" r="5.5" fill="#1b2436" stroke="#8496f5" stroke-width="2.5"/>
62
+ <circle cx="480" cy="384" r="5.5" fill="#1b2436" stroke="#8496f5" stroke-width="2.5"/>
63
+ <circle cx="480" cy="428" r="5.5" fill="#1b2436" stroke="#8496f5" stroke-width="2.5"/>
64
+ <text x="512" y="302" class="note">never force-push,</text>
65
+ <text x="512" y="320" class="note">reset or rebase</text>
66
+ <text x="512" y="354" class="muted">backend: git | encrypted</text>
67
+ <text x="512" y="372" class="muted">age layer: *.age optional</text>
68
+ <rect x="720" y="140" width="332" height="338" rx="20" fill="#161e2e" fill-opacity=".90" stroke="#2c3852" filter="url(#soft)"/>
69
+ <text x="740" y="166" class="k">DEVICE B · LOCAL</text>
70
+ <text x="740" y="192" class="ptitle">Pull, merge &amp; restore</text>
71
+ <text x="740" y="210" class="pnote">pull path · manual writes confirm</text>
72
+ <rect x="738" y="218" width="296" height="64" rx="18" fill="#1b2436" fill-opacity=".94" stroke="#33405e"/>
73
+ <text x="756" y="242" class="mtitle">fetch origin/main</text>
74
+ <text x="756" y="260" class="note">remote refs only · worktree untouched</text>
75
+ <text x="756" y="276" class="muted">three-way merge stays local</text>
76
+ <line x1="760" y1="282" x2="760" y2="300" stroke="#8496f5" stroke-width="2" marker-end="url(#ar)"/>
77
+ <text x="774" y="299" class="lbl">beginMerge</text>
78
+ <rect x="738" y="306" width="296" height="78" rx="18" fill="#1b2436" fill-opacity=".94" stroke="#33405e"/>
79
+ <text x="756" y="330" class="ctitle">three-way merge</text>
80
+ <rect x="756" y="340" width="70" height="22" rx="7" fill="#202a40" stroke="#3a4770"/>
81
+ <text x="791" y="355" class="mono" text-anchor="middle">base</text>
82
+ <rect x="834" y="340" width="70" height="22" rx="7" fill="#202a40" stroke="#3a4770"/>
83
+ <text x="869" y="355" class="mono" text-anchor="middle">ours</text>
84
+ <rect x="912" y="340" width="70" height="22" rx="7" fill="#202a40" stroke="#3a4770"/>
85
+ <text x="947" y="355" class="mono" text-anchor="middle">theirs</text>
86
+ <text x="756" y="378" class="note">per-file byte compare · no parsing</text>
87
+ <line x1="760" y1="384" x2="760" y2="402" stroke="#8496f5" stroke-width="2" marker-end="url(#ar)"/>
88
+ <text x="774" y="401" class="lbl">keep-both</text>
89
+ <rect x="738" y="408" width="296" height="62" rx="18" fill="#1b2436" fill-opacity=".94" stroke="#33405e"/>
90
+ <text x="756" y="432" class="ctitle">merge commit + restore</text>
91
+ <text x="756" y="450" class="note">sessions resume on this device</text>
92
+ <text x="756" y="466" class="muted">fork files never deleted</text>
93
+ <line x1="380" y1="428" x2="472" y2="428" stroke="#8496f5" stroke-width="2.5" marker-end="url(#ar)"/>
94
+ <text x="382" y="418" class="lbl">push</text>
95
+ <line x1="484" y1="252" x2="730" y2="252" stroke="#8496f5" stroke-width="2.5" marker-end="url(#ar)"/>
96
+ <text x="690" y="243" class="lbl">pull</text>
97
+ <rect x="48" y="492" width="1004" height="140" rx="20" fill="#161e2e" fill-opacity=".90" stroke="#2c3852" filter="url(#soft)"/>
98
+ <text x="68" y="522" class="k">KEEP-BOTH · PER-FILE VERDICT</text>
99
+ <text x="68" y="550" class="ctitle">Never silently overwrite</text>
100
+ <text x="68" y="576" class="note">same bytes or ours-only → keep ours</text>
101
+ <text x="68" y="592" class="note">theirs-only → adopt the remote bytes</text>
102
+ <text x="68" y="608" class="note">both advanced / rewritten → keep ours + fork</text>
103
+ <rect x="372" y="548" width="66" height="34" rx="10" fill="#202a40" stroke="#3a4770"/>
104
+ <text x="405" y="570" class="mono" text-anchor="middle">base</text>
105
+ <path d="M438 565 C464 565 560 550 634 556" fill="none" stroke="#8496f5" stroke-width="1.6" stroke-opacity=".72"/>
106
+ <rect x="446" y="548" width="66" height="34" rx="10" fill="#202a40" stroke="#3a4770"/>
107
+ <text x="479" y="570" class="mono" text-anchor="middle">ours</text>
108
+ <path d="M512 565 C538 565 560 550 634 556" fill="none" stroke="#8496f5" stroke-width="1.6" stroke-opacity=".72"/>
109
+ <rect x="520" y="548" width="66" height="34" rx="10" fill="#202a40" stroke="#3a4770"/>
110
+ <text x="553" y="570" class="mono" text-anchor="middle">theirs</text>
111
+ <path d="M586 565 C612 565 600 550 634 556" fill="none" stroke="#8496f5" stroke-width="1.6" stroke-opacity=".72"/>
112
+ <path d="M640 565 L700 531 L760 565 L700 599 Z" fill="#8496f5" fill-opacity=".14" stroke="#8496f5" stroke-width="1.8" stroke-linejoin="round"/>
113
+ <text x="700" y="562" class="lbl" text-anchor="middle">classify</text>
114
+ <text x="700" y="578" class="mono" text-anchor="middle">per file</text>
115
+ <path d="M760 565 C780 565 782 544 800 544" fill="none" stroke="#8496f5" stroke-width="1.8" marker-end="url(#ar)"/>
116
+ <path d="M760 565 C780 565 782 600 800 600" fill="none" stroke="#8496f5" stroke-width="1.8" marker-end="url(#ar)"/>
117
+ <rect x="800" y="520" width="228" height="46" rx="18" fill="#1b2436" fill-opacity=".94" stroke="#33405e"/>
118
+ <text x="816" y="540" class="lbl">ours</text>
119
+ <text x="816" y="556" class="note">kept at the original path</text>
120
+ <rect x="800" y="574" width="228" height="52" rx="18" fill="#8496f5" fill-opacity=".10" stroke="#8496f5" stroke-width="1.5"/>
121
+ <text x="816" y="594" class="lbl">theirs → fork file</text>
122
+ <text x="816" y="610" class="mono">&lt;basename&gt;.remote-fork-</text>
123
+ <text x="816" y="624" class="mono">&lt;UTC14&gt;-&lt;device8&gt;</text>
124
+ <text x="550" y="652" class="foot" text-anchor="middle">Fork files are never deleted or overwritten · each device can push and pull · auto: on mount, turn end, every N minutes</text>
125
+ </svg>
@@ -0,0 +1,125 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1100" height="660" viewBox="0 0 1100 660" role="img" aria-label="dsh-session-sync structure diagram">
2
+ <title>dsh-session-sync structure: byte mirror, owned git remote, keep-both fork</title>
3
+ <desc>Device A mirrors the session store as opaque bytes and commits; push crosses a confirmation gate into the git remote you own. Device B fetches, runs a per-file three-way merge (base, ours, theirs) and restores sessions. Divergent remote bytes become fork files at the original path, never overwritten and never force-pushed.</desc>
4
+ <defs>
5
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#f9f6fd"/><stop offset="1" stop-color="#e4eaf8"/></linearGradient>
6
+ <radialGradient id="glow" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#4B67B4" stop-opacity=".18"/><stop offset="1" stop-color="#4B67B4" stop-opacity="0"/></radialGradient>
7
+ <filter id="soft" x="-15%" y="-15%" width="130%" height="140%"><feDropShadow dx="0" dy="6" stdDeviation="9" flood-color="#2b3350" flood-opacity=".10"/></filter>
8
+ <marker id="ar" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="#4B67B4"/></marker>
9
+ <marker id="ar-soft" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="#66708d"/></marker>
10
+ </defs>
11
+ <style>
12
+ .h1{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:26px;font-weight:700;fill:#1b2340}
13
+ .sub{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:12.5px;fill:#4d5777}
14
+ .k{font-family:'Segoe UI',system-ui,sans-serif;font-size:11px;font-weight:700;letter-spacing:2px;fill:#4B67B4}
15
+ .ptitle{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:18px;font-weight:700;fill:#1b2340}
16
+ .pnote{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#66708d}
17
+ .ctitle{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:15px;font-weight:700;fill:#1b2340}
18
+ .mtitle{font-family:'Consolas',ui-monospace,monospace;font-size:13.5px;font-weight:700;fill:#1b2340}
19
+ .note{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#4d5777}
20
+ .muted{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#66708d}
21
+ .mono{font-family:'Consolas',ui-monospace,monospace;font-size:11px;fill:#4d5777}
22
+ .mono-a{font-family:'Consolas',ui-monospace,monospace;font-size:11px;fill:#3a5098}
23
+ .lbl{font-family:'Segoe UI',system-ui,sans-serif;font-size:11px;font-weight:700;fill:#3a5098}
24
+ .foot{font-family:'Microsoft YaHei','Segoe UI',system-ui,sans-serif;font-size:11px;fill:#66708d}
25
+ </style>
26
+ <rect width="1100" height="660" rx="22" fill="url(#bg)"/>
27
+ <ellipse cx="960" cy="80" rx="300" ry="170" fill="url(#glow)"/>
28
+ <ellipse cx="150" cy="600" rx="260" ry="130" fill="url(#glow)" opacity=".55"/>
29
+ <text x="48" y="52" class="k">DSH PLUGIN · SESSION SYNC</text>
30
+ <text x="47" y="86" class="h1">Byte mirror → owned remote → keep-both</text>
31
+ <text x="48" y="110" class="sub">Session files move as opaque bytes; divergent histories keep both sides as fork files.</text>
32
+ <line x1="48" y1="126" x2="1052" y2="126" stroke="#d8d4e8" stroke-width="1"/>
33
+ <rect x="48" y="140" width="332" height="338" rx="20" fill="#ffffff" fill-opacity=".72" stroke="#d8d4e8" filter="url(#soft)"/>
34
+ <text x="68" y="166" class="k">DEVICE A · LOCAL</text>
35
+ <text x="68" y="192" class="ptitle">Byte mirror &amp; commit</text>
36
+ <text x="68" y="210" class="pnote">push path · manual writes confirm</text>
37
+ <rect x="66" y="218" width="296" height="64" rx="18" fill="#ffffff" fill-opacity=".78" stroke="#d8d4e8"/>
38
+ <text x="84" y="242" class="mtitle">$DSH_HOME/sessions</text>
39
+ <text x="84" y="260" class="note">opaque session bytes · JSONL/zstd untouched</text>
40
+ <text x="84" y="276" class="muted">session.lock &amp; migration temp files excluded</text>
41
+ <line x1="120" y1="282" x2="120" y2="300" stroke="#4B67B4" stroke-width="2" marker-end="url(#ar)"/>
42
+ <text x="134" y="299" class="lbl">byte mirror</text>
43
+ <rect x="66" y="306" width="296" height="64" rx="18" fill="#ffffff" fill-opacity=".78" stroke="#d8d4e8"/>
44
+ <text x="84" y="330" class="mtitle">&lt;repoDir&gt;/sessions</text>
45
+ <text x="84" y="348" class="note">dedicated git worktree · plaintext mirror</text>
46
+ <text x="84" y="364" class="muted">symlinks refused · paths contained</text>
47
+ <line x1="120" y1="370" x2="120" y2="388" stroke="#4B67B4" stroke-width="2" marker-end="url(#ar)"/>
48
+ <text x="134" y="387" class="lbl">commit</text>
49
+ <rect x="66" y="394" width="296" height="64" rx="18" fill="#ffffff" fill-opacity=".78" stroke="#d8d4e8"/>
50
+ <text x="84" y="418" class="mtitle">local commit</text>
51
+ <text x="84" y="436" class="note">plugin identity (never your git identity)</text>
52
+ <text x="84" y="452" class="muted">device.txt recorded for fork attribution</text>
53
+ <rect x="420" y="140" width="260" height="338" rx="20" fill="#4B67B4" fill-opacity=".10" stroke="#4B67B4" stroke-opacity=".34" filter="url(#soft)"/>
54
+ <rect x="421" y="162" width="6" height="296" rx="3" fill="#4B67B4" fill-opacity=".55"/>
55
+ <text x="444" y="166" class="k">YOUR GIT REMOTE</text>
56
+ <text x="444" y="192" class="ptitle">your repo</text>
57
+ <text x="444" y="212" class="mono">branch: main</text>
58
+ <line x1="480" y1="242" x2="480" y2="430" stroke="#4B67B4" stroke-width="2.5"/>
59
+ <circle cx="480" cy="252" r="5.5" fill="#ffffff" stroke="#4B67B4" stroke-width="2.5"/>
60
+ <circle cx="480" cy="296" r="5.5" fill="#ffffff" stroke="#4B67B4" stroke-width="2.5"/>
61
+ <circle cx="480" cy="340" r="5.5" fill="#ffffff" stroke="#4B67B4" stroke-width="2.5"/>
62
+ <circle cx="480" cy="384" r="5.5" fill="#ffffff" stroke="#4B67B4" stroke-width="2.5"/>
63
+ <circle cx="480" cy="428" r="5.5" fill="#ffffff" stroke="#4B67B4" stroke-width="2.5"/>
64
+ <text x="512" y="302" class="note">never force-push,</text>
65
+ <text x="512" y="320" class="note">reset or rebase</text>
66
+ <text x="512" y="354" class="muted">backend: git | encrypted</text>
67
+ <text x="512" y="372" class="muted">age layer: *.age optional</text>
68
+ <rect x="720" y="140" width="332" height="338" rx="20" fill="#ffffff" fill-opacity=".72" stroke="#d8d4e8" filter="url(#soft)"/>
69
+ <text x="740" y="166" class="k">DEVICE B · LOCAL</text>
70
+ <text x="740" y="192" class="ptitle">Pull, merge &amp; restore</text>
71
+ <text x="740" y="210" class="pnote">pull path · manual writes confirm</text>
72
+ <rect x="738" y="218" width="296" height="64" rx="18" fill="#ffffff" fill-opacity=".78" stroke="#d8d4e8"/>
73
+ <text x="756" y="242" class="mtitle">fetch origin/main</text>
74
+ <text x="756" y="260" class="note">remote refs only · worktree untouched</text>
75
+ <text x="756" y="276" class="muted">three-way merge stays local</text>
76
+ <line x1="760" y1="282" x2="760" y2="300" stroke="#4B67B4" stroke-width="2" marker-end="url(#ar)"/>
77
+ <text x="774" y="299" class="lbl">beginMerge</text>
78
+ <rect x="738" y="306" width="296" height="78" rx="18" fill="#ffffff" fill-opacity=".78" stroke="#d8d4e8"/>
79
+ <text x="756" y="330" class="ctitle">three-way merge</text>
80
+ <rect x="756" y="340" width="70" height="22" rx="7" fill="#f0eef9" stroke="#d6d2e7"/>
81
+ <text x="791" y="355" class="mono" text-anchor="middle">base</text>
82
+ <rect x="834" y="340" width="70" height="22" rx="7" fill="#f0eef9" stroke="#d6d2e7"/>
83
+ <text x="869" y="355" class="mono" text-anchor="middle">ours</text>
84
+ <rect x="912" y="340" width="70" height="22" rx="7" fill="#f0eef9" stroke="#d6d2e7"/>
85
+ <text x="947" y="355" class="mono" text-anchor="middle">theirs</text>
86
+ <text x="756" y="378" class="note">per-file byte compare · no parsing</text>
87
+ <line x1="760" y1="384" x2="760" y2="402" stroke="#4B67B4" stroke-width="2" marker-end="url(#ar)"/>
88
+ <text x="774" y="401" class="lbl">keep-both</text>
89
+ <rect x="738" y="408" width="296" height="62" rx="18" fill="#ffffff" fill-opacity=".78" stroke="#d8d4e8"/>
90
+ <text x="756" y="432" class="ctitle">merge commit + restore</text>
91
+ <text x="756" y="450" class="note">sessions resume on this device</text>
92
+ <text x="756" y="466" class="muted">fork files never deleted</text>
93
+ <line x1="380" y1="428" x2="472" y2="428" stroke="#4B67B4" stroke-width="2.5" marker-end="url(#ar)"/>
94
+ <text x="382" y="418" class="lbl">push</text>
95
+ <line x1="484" y1="252" x2="730" y2="252" stroke="#4B67B4" stroke-width="2.5" marker-end="url(#ar)"/>
96
+ <text x="690" y="243" class="lbl">pull</text>
97
+ <rect x="48" y="492" width="1004" height="140" rx="20" fill="#ffffff" fill-opacity=".72" stroke="#d8d4e8" filter="url(#soft)"/>
98
+ <text x="68" y="522" class="k">KEEP-BOTH · PER-FILE VERDICT</text>
99
+ <text x="68" y="550" class="ctitle">Never silently overwrite</text>
100
+ <text x="68" y="576" class="note">same bytes or ours-only → keep ours</text>
101
+ <text x="68" y="592" class="note">theirs-only → adopt the remote bytes</text>
102
+ <text x="68" y="608" class="note">both advanced / rewritten → keep ours + fork</text>
103
+ <rect x="372" y="548" width="66" height="34" rx="10" fill="#f0eef9" stroke="#d6d2e7"/>
104
+ <text x="405" y="570" class="mono" text-anchor="middle">base</text>
105
+ <path d="M438 565 C464 565 560 550 634 556" fill="none" stroke="#4B67B4" stroke-width="1.6" stroke-opacity=".72"/>
106
+ <rect x="446" y="548" width="66" height="34" rx="10" fill="#f0eef9" stroke="#d6d2e7"/>
107
+ <text x="479" y="570" class="mono" text-anchor="middle">ours</text>
108
+ <path d="M512 565 C538 565 560 550 634 556" fill="none" stroke="#4B67B4" stroke-width="1.6" stroke-opacity=".72"/>
109
+ <rect x="520" y="548" width="66" height="34" rx="10" fill="#f0eef9" stroke="#d6d2e7"/>
110
+ <text x="553" y="570" class="mono" text-anchor="middle">theirs</text>
111
+ <path d="M586 565 C612 565 600 550 634 556" fill="none" stroke="#4B67B4" stroke-width="1.6" stroke-opacity=".72"/>
112
+ <path d="M640 565 L700 531 L760 565 L700 599 Z" fill="#4B67B4" fill-opacity=".14" stroke="#4B67B4" stroke-width="1.8" stroke-linejoin="round"/>
113
+ <text x="700" y="562" class="lbl" text-anchor="middle">classify</text>
114
+ <text x="700" y="578" class="mono" text-anchor="middle">per file</text>
115
+ <path d="M760 565 C780 565 782 544 800 544" fill="none" stroke="#4B67B4" stroke-width="1.8" marker-end="url(#ar)"/>
116
+ <path d="M760 565 C780 565 782 600 800 600" fill="none" stroke="#4B67B4" stroke-width="1.8" marker-end="url(#ar)"/>
117
+ <rect x="800" y="520" width="228" height="46" rx="18" fill="#ffffff" fill-opacity=".78" stroke="#d8d4e8"/>
118
+ <text x="816" y="540" class="lbl">ours</text>
119
+ <text x="816" y="556" class="note">kept at the original path</text>
120
+ <rect x="800" y="574" width="228" height="52" rx="18" fill="#4B67B4" fill-opacity=".10" stroke="#4B67B4" stroke-width="1.5"/>
121
+ <text x="816" y="594" class="lbl">theirs → fork file</text>
122
+ <text x="816" y="610" class="mono">&lt;basename&gt;.remote-fork-</text>
123
+ <text x="816" y="624" class="mono">&lt;UTC14&gt;-&lt;device8&gt;</text>
124
+ <text x="550" y="652" class="foot" text-anchor="middle">Fork files are never deleted or overwritten · each device can push and pull · auto: on mount, turn end, every N minutes</text>
125
+ </svg>
@@ -0,0 +1,19 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="360" viewBox="0 0 1200 360" role="img" aria-label="dsh-session-sync workflow">
2
+ <title>dsh-session-sync workflow</title>
3
+ <rect width="1200" height="360" rx="18" fill="#0d1117"/>
4
+ <text x="60" y="58" fill="#f0f6fc" font-family="ui-sans-serif,system-ui,sans-serif" font-size="30" font-weight="700">dsh-session-sync</text>
5
+ <text x="60" y="92" fill="#8b949e" font-family="ui-monospace,monospace" font-size="16">DeepSeek Harness plugin</text>
6
+ <line x1="60" y1="118" x2="1140" y2="118" stroke="#30363d"/>
7
+ <rect x="120" y="150" width="240" height="140" rx="14" fill="#161b22" stroke="#dc2626" stroke-width="2"/>
8
+ <path d="M215 203h34l-8-8m8 8l-8 8" stroke="#dc2626" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/><rect x="255" y="193" width="20" height="20" rx="5" fill="none" stroke="#dc2626" stroke-width="3"/>
9
+ <circle cx="330" cy="270" r="13" fill="#dc2626"/><text x="330" y="276" fill="#0d1117" text-anchor="middle" font-family="ui-monospace,monospace" font-size="14" font-weight="700">1</text>
10
+ <path d="M368 220h64" stroke="#dc2626" stroke-width="3"/><path d="M422 213l10 7-10 7" fill="none" stroke="#dc2626" stroke-width="3" stroke-linecap="round"/>
11
+ <rect x="480" y="150" width="240" height="140" rx="14" fill="#161b22" stroke="#dc2626" stroke-width="2"/>
12
+ <path d="M600 189l23 9v18c0 17-12 28-23 33-11-5-23-16-23-33V198z" fill="none" stroke="#dc2626" stroke-width="3"/><path d="M589 218l8 8 14-17" stroke="#dc2626" stroke-width="4" fill="none" stroke-linecap="round"/>
13
+ <circle cx="690" cy="270" r="13" fill="#dc2626"/><text x="690" y="276" fill="#0d1117" text-anchor="middle" font-family="ui-monospace,monospace" font-size="14" font-weight="700">2</text>
14
+ <path d="M728 220h64" stroke="#dc2626" stroke-width="3"/><path d="M782 213l10 7-10 7" fill="none" stroke="#dc2626" stroke-width="3" stroke-linecap="round"/>
15
+ <rect x="840" y="150" width="240" height="140" rx="14" fill="#161b22" stroke="#dc2626" stroke-width="2"/>
16
+ <circle cx="960" cy="218" r="28" fill="none" stroke="#dc2626" stroke-width="3"/><path d="M948 207l10 10m0-10L948 217" stroke="#dc2626" stroke-width="4" stroke-linecap="round"/><path d="M972 209l8 8 8-16" stroke="#dc2626" stroke-width="4" fill="none" stroke-linecap="round"/>
17
+ <circle cx="1050" cy="270" r="13" fill="#dc2626"/><text x="1050" y="276" fill="#0d1117" text-anchor="middle" font-family="ui-monospace,monospace" font-size="14" font-weight="700">3</text>
18
+ <text x="60" y="332" fill="#8b949e" font-family="ui-monospace,monospace" font-size="14">PerryLink DSH plugin family · Apache-2.0</text>
19
+ </svg>
package/index.mjs CHANGED
@@ -340,7 +340,10 @@ export function makeRunAge(subprocess, opts) {
340
340
  const executable = await subprocess.resolveExecutable(args[0], undefined, controller.signal)
341
341
  const handle = subprocess.spawn({
342
342
  argv: [executable, ...args.slice(1)],
343
- cwd: runOpts.cwd,
343
+ // SubprocessSpawnSpec.cwd is required and validated unconditionally on DSH >= 0.2.2; an
344
+ // undefined cwd aborted every encrypted push/pull with "Cannot read properties of
345
+ // undefined (reading 'includes')" (#34). Fall back to a real directory.
346
+ cwd: typeof runOpts.cwd === 'string' && runOpts.cwd.length > 0 ? runOpts.cwd : process.cwd(),
344
347
  stdio: {
345
348
  stdin: 'ignore',
346
349
  stdout: { maxBytes: opts.maxOutputBytes },