dsh-config-manager 0.1.68 → 0.1.70
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.md +111 -17
- package/README.zh-CN.md +79 -8
- package/icon.svg +12 -7
- package/lib/adapters/agent-instructions.d.ts +28 -3
- package/lib/adapters/agent-instructions.js +26 -22
- package/lib/adapters/credentials.js +6 -3
- package/lib/adapters/file-collection.d.ts +30 -1
- package/lib/adapters/file-collection.js +59 -12
- package/lib/adapters/mcp.d.ts +12 -2
- package/lib/adapters/mcp.js +30 -13
- package/lib/adapters/plugin-files.d.ts +8 -0
- package/lib/adapters/plugin-files.js +36 -4
- package/lib/adapters/plugins.d.ts +31 -3
- package/lib/adapters/plugins.js +204 -55
- package/lib/adapters/prompts.d.ts +12 -2
- package/lib/adapters/prompts.js +34 -19
- package/lib/adapters/providers.js +5 -4
- package/lib/adapters/self.d.ts +71 -5
- package/lib/adapters/self.js +107 -49
- package/lib/adapters/sessions.d.ts +15 -2
- package/lib/adapters/sessions.js +87 -3
- package/lib/adapters/settings.d.ts +21 -3
- package/lib/adapters/settings.js +44 -7
- package/lib/adapters/skills.d.ts +36 -4
- package/lib/adapters/skills.js +222 -3
- package/lib/adapters/test-helpers.d.ts +31 -2
- package/lib/adapters/test-helpers.js +42 -5
- package/lib/adapters/workspaces.js +97 -5
- package/lib/cli/actions.d.ts +560 -0
- package/lib/cli/actions.js +1166 -0
- package/lib/cli/help.d.ts +65 -0
- package/lib/cli/help.js +517 -0
- package/lib/cli/import-source.d.ts +32 -0
- package/lib/cli/import-source.js +178 -0
- package/lib/cli/index.d.ts +24 -2
- package/lib/cli/index.js +256 -110
- package/lib/cli/sessions-inspect.d.ts +17 -0
- package/lib/cli/sessions-inspect.js +104 -0
- package/lib/cli/sessions-repair.js +12 -1
- package/lib/cli/web/browser.d.ts +1 -0
- package/lib/cli/web/browser.js +21 -0
- package/lib/cli/web/client-script.d.ts +12 -0
- package/lib/cli/web/client-script.js +256 -0
- package/lib/cli/web/exec.d.ts +1 -0
- package/lib/cli/web/exec.js +22 -0
- package/lib/cli/web/http.d.ts +24 -0
- package/lib/cli/web/http.js +14 -0
- package/lib/cli/web/page.d.ts +147 -0
- package/lib/cli/web/page.js +1020 -0
- package/lib/cli/web/routes.d.ts +15 -0
- package/lib/cli/web/routes.js +426 -0
- package/lib/cli/web/server.d.ts +37 -0
- package/lib/cli/web/server.js +210 -0
- package/lib/client.d.ts +2011 -142
- package/lib/client.js +30204 -21198
- package/lib/core/analyzer.d.ts +39 -2
- package/lib/core/analyzer.js +260 -16
- package/lib/core/backup-plan.js +17 -1
- package/lib/core/backup.d.ts +8 -0
- package/lib/core/backup.js +28 -6
- package/lib/core/cache-cleaner.d.ts +38 -1
- package/lib/core/cache-cleaner.js +199 -93
- package/lib/core/checkpoint.d.ts +362 -0
- package/lib/core/checkpoint.js +1309 -0
- package/lib/core/disk-usage.d.ts +113 -0
- package/lib/core/disk-usage.js +246 -0
- package/lib/core/importer.d.ts +6 -1
- package/lib/core/journal.d.ts +37 -0
- package/lib/core/journal.js +69 -0
- package/lib/core/local-plugin-host.d.ts +1 -1
- package/lib/core/local-plugin-host.js +17 -2
- package/lib/core/local-plugin-pack.d.ts +28 -0
- package/lib/core/local-plugin-pack.js +56 -1
- package/lib/core/messages.d.ts +20 -0
- package/lib/core/messages.js +41 -0
- package/lib/core/model-tools.js +3 -0
- package/lib/core/patch-layers.d.ts +83 -0
- package/lib/core/patch-layers.js +110 -0
- package/lib/core/recovery-orchestrator.d.ts +19 -1
- package/lib/core/recovery-orchestrator.js +68 -7
- package/lib/core/restore.d.ts +28 -1
- package/lib/core/restore.js +49 -5
- package/lib/core/rollback.js +6 -3
- package/lib/core/self-update.d.ts +52 -0
- package/lib/core/self-update.js +70 -0
- package/lib/core/session-health.d.ts +188 -0
- package/lib/core/session-health.js +189 -0
- package/lib/core/types.d.ts +311 -1
- package/lib/core/update-check.d.ts +81 -0
- package/lib/core/update-check.js +145 -0
- package/lib/core/validator.d.ts +22 -2
- package/lib/core/validator.js +52 -19
- package/lib/foreign/antigravity.d.ts +28 -0
- package/lib/foreign/antigravity.js +157 -0
- package/lib/foreign/bundle.d.ts +25 -0
- package/lib/foreign/bundle.js +79 -0
- package/lib/foreign/chatgpt.d.ts +6 -0
- package/lib/foreign/chatgpt.js +25 -0
- package/lib/foreign/claude-code.d.ts +3 -0
- package/lib/foreign/claude-code.js +85 -0
- package/lib/foreign/claude-sessions.d.ts +100 -0
- package/lib/foreign/claude-sessions.js +291 -0
- package/lib/foreign/cline.d.ts +6 -0
- package/lib/foreign/cline.js +27 -0
- package/lib/foreign/codex.d.ts +83 -0
- package/lib/foreign/codex.js +348 -0
- package/lib/foreign/continue.d.ts +9 -0
- package/lib/foreign/continue.js +65 -0
- package/lib/foreign/copilot.d.ts +39 -0
- package/lib/foreign/copilot.js +95 -0
- package/lib/foreign/crush.d.ts +11 -0
- package/lib/foreign/crush.js +57 -0
- package/lib/foreign/cursor.d.ts +87 -0
- package/lib/foreign/cursor.js +171 -0
- package/lib/foreign/dsh.d.ts +30 -0
- package/lib/foreign/dsh.js +101 -0
- package/lib/foreign/dsh4.d.ts +3 -0
- package/lib/foreign/dsh4.js +13 -0
- package/lib/foreign/gemini.d.ts +7 -0
- package/lib/foreign/gemini.js +44 -0
- package/lib/foreign/goose.d.ts +11 -0
- package/lib/foreign/goose.js +53 -0
- package/lib/foreign/grokbuild.d.ts +8 -0
- package/lib/foreign/grokbuild.js +25 -0
- package/lib/foreign/hermes.d.ts +2 -0
- package/lib/foreign/hermes.js +78 -0
- package/lib/foreign/kernel.d.ts +132 -0
- package/lib/foreign/kernel.js +569 -0
- package/lib/foreign/kilocode.d.ts +11 -0
- package/lib/foreign/kilocode.js +51 -0
- package/lib/foreign/kimi.d.ts +7 -0
- package/lib/foreign/kimi.js +47 -0
- package/lib/foreign/mimocode.d.ts +11 -0
- package/lib/foreign/mimocode.js +51 -0
- package/lib/foreign/openclaw.d.ts +7 -0
- package/lib/foreign/openclaw.js +46 -0
- package/lib/foreign/opencode.d.ts +11 -0
- package/lib/foreign/opencode.js +52 -0
- package/lib/foreign/pi.d.ts +7 -0
- package/lib/foreign/pi.js +48 -0
- package/lib/foreign/platform-paths.d.ts +66 -0
- package/lib/foreign/platform-paths.js +141 -0
- package/lib/foreign/qoder.d.ts +10 -0
- package/lib/foreign/qoder.js +49 -0
- package/lib/foreign/qwen.d.ts +7 -0
- package/lib/foreign/qwen.js +45 -0
- package/lib/foreign/read-antigravity.d.ts +57 -0
- package/lib/foreign/read-antigravity.js +504 -0
- package/lib/foreign/read-chatgpt.d.ts +20 -0
- package/lib/foreign/read-chatgpt.js +509 -0
- package/lib/foreign/read-claude-code.d.ts +24 -0
- package/lib/foreign/read-claude-code.js +234 -0
- package/lib/foreign/read-cline.d.ts +53 -0
- package/lib/foreign/read-cline.js +479 -0
- package/lib/foreign/read-codex.d.ts +75 -0
- package/lib/foreign/read-codex.js +842 -0
- package/lib/foreign/read-continue.d.ts +87 -0
- package/lib/foreign/read-continue.js +489 -0
- package/lib/foreign/read-copilot.d.ts +42 -0
- package/lib/foreign/read-copilot.js +267 -0
- package/lib/foreign/read-crush.d.ts +54 -0
- package/lib/foreign/read-crush.js +478 -0
- package/lib/foreign/read-cursor.d.ts +141 -0
- package/lib/foreign/read-cursor.js +705 -0
- package/lib/foreign/read-dsh.d.ts +43 -0
- package/lib/foreign/read-dsh.js +205 -0
- package/lib/foreign/read-dsh4.d.ts +14 -0
- package/lib/foreign/read-dsh4.js +27 -0
- package/lib/foreign/read-gemini.d.ts +55 -0
- package/lib/foreign/read-gemini.js +273 -0
- package/lib/foreign/read-goose.d.ts +25 -0
- package/lib/foreign/read-goose.js +322 -0
- package/lib/foreign/read-grokbuild.d.ts +34 -0
- package/lib/foreign/read-grokbuild.js +455 -0
- package/lib/foreign/read-hermes.d.ts +74 -0
- package/lib/foreign/read-hermes.js +690 -0
- package/lib/foreign/read-kilocode.d.ts +17 -0
- package/lib/foreign/read-kilocode.js +46 -0
- package/lib/foreign/read-kimi.d.ts +63 -0
- package/lib/foreign/read-kimi.js +719 -0
- package/lib/foreign/read-mimocode.d.ts +12 -0
- package/lib/foreign/read-mimocode.js +56 -0
- package/lib/foreign/read-openclaw.d.ts +51 -0
- package/lib/foreign/read-openclaw.js +445 -0
- package/lib/foreign/read-opencode.d.ts +150 -0
- package/lib/foreign/read-opencode.js +896 -0
- package/lib/foreign/read-pi.d.ts +56 -0
- package/lib/foreign/read-pi.js +411 -0
- package/lib/foreign/read-qoder.d.ts +54 -0
- package/lib/foreign/read-qoder.js +317 -0
- package/lib/foreign/read-qwen.d.ts +40 -0
- package/lib/foreign/read-qwen.js +326 -0
- package/lib/foreign/read-reasonix.d.ts +66 -0
- package/lib/foreign/read-reasonix.js +537 -0
- package/lib/foreign/read-teleagent.d.ts +15 -0
- package/lib/foreign/read-teleagent.js +68 -0
- package/lib/foreign/read-trae.d.ts +67 -0
- package/lib/foreign/read-trae.js +492 -0
- package/lib/foreign/read-vibe.d.ts +28 -0
- package/lib/foreign/read-vibe.js +364 -0
- package/lib/foreign/read-workbuddy.d.ts +49 -0
- package/lib/foreign/read-workbuddy.js +346 -0
- package/lib/foreign/read-zcode.d.ts +12 -0
- package/lib/foreign/read-zcode.js +38 -0
- package/lib/foreign/read-zed.d.ts +30 -0
- package/lib/foreign/read-zed.js +473 -0
- package/lib/foreign/reasonix.d.ts +6 -0
- package/lib/foreign/reasonix.js +20 -0
- package/lib/foreign/registry.d.ts +196 -0
- package/lib/foreign/registry.js +573 -0
- package/lib/foreign/session-ir.d.ts +186 -0
- package/lib/foreign/session-ir.js +391 -0
- package/lib/foreign/session-read.d.ts +102 -0
- package/lib/foreign/session-read.js +254 -0
- package/lib/foreign/session-source.d.ts +216 -0
- package/lib/foreign/session-source.js +453 -0
- package/lib/foreign/source-modules.d.ts +45 -0
- package/lib/foreign/source-modules.js +52 -0
- package/lib/foreign/sqlite.d.ts +61 -0
- package/lib/foreign/sqlite.js +404 -0
- package/lib/foreign/teleagent.d.ts +11 -0
- package/lib/foreign/teleagent.js +53 -0
- package/lib/foreign/trae.d.ts +6 -0
- package/lib/foreign/trae.js +20 -0
- package/lib/foreign/truth-table.d.ts +62 -0
- package/lib/foreign/truth-table.js +333 -0
- package/lib/foreign/types.d.ts +272 -0
- package/lib/foreign/types.js +2 -0
- package/lib/foreign/vibe.d.ts +6 -0
- package/lib/foreign/vibe.js +23 -0
- package/lib/foreign/workbuddy.d.ts +7 -0
- package/lib/foreign/workbuddy.js +45 -0
- package/lib/foreign/zcode.d.ts +11 -0
- package/lib/foreign/zcode.js +51 -0
- package/lib/foreign/zed.d.ts +11 -0
- package/lib/foreign/zed.js +53 -0
- package/lib/index.d.ts +210 -15
- package/lib/index.js +857 -86
- package/lib/market/github-repos.d.ts +28 -0
- package/lib/market/github-repos.js +43 -1
- package/lib/market/types.d.ts +1 -3
- package/lib/profiles/dsh-profile-manager.d.ts +56 -2
- package/lib/profiles/dsh-profile-manager.js +198 -8
- package/lib/profiles/dsh-profile-shared.d.ts +66 -0
- package/lib/profiles/dsh-profile-shared.js +15 -1
- package/lib/profiles/index.d.ts +1 -1
- package/lib/profiles/index.js +1 -1
- package/lib/routes/backup.js +155 -1
- package/lib/routes/consult.js +61 -7
- package/lib/routes/foreign-context.d.ts +43 -0
- package/lib/routes/foreign-context.js +65 -0
- package/lib/routes/foreign.d.ts +11 -0
- package/lib/routes/foreign.js +208 -0
- package/lib/routes/import.d.ts +8 -0
- package/lib/routes/import.js +43 -11
- package/lib/routes/index.d.ts +2 -2
- package/lib/routes/index.js +4 -0
- package/lib/routes/kit.d.ts +12 -3
- package/lib/routes/kit.js +8 -0
- package/lib/routes/market.js +0 -1
- package/lib/routes/prefs.d.ts +3 -1
- package/lib/routes/prefs.js +45 -2
- package/lib/routes/profiles.js +2 -0
- package/lib/routes/recovery.js +528 -2
- package/lib/routes/session-export.d.ts +117 -0
- package/lib/routes/session-export.js +270 -0
- package/lib/routes/session-format.d.ts +25 -0
- package/lib/routes/session-format.js +54 -0
- package/lib/routes/snapshots.js +12 -2
- package/lib/routes/sync.js +218 -13
- package/lib/security/container-kind.d.ts +15 -0
- package/lib/security/container-kind.js +48 -0
- package/lib/security/index.d.ts +2 -1
- package/lib/security/index.js +2 -1
- package/lib/security/redaction.d.ts +14 -0
- package/lib/security/redaction.js +46 -10
- package/lib/security/secret-scanner.d.ts +27 -0
- package/lib/security/secret-scanner.js +54 -1
- package/lib/sync/autosync-scheduler.d.ts +13 -1
- package/lib/sync/autosync-scheduler.js +49 -26
- package/lib/sync/backup-files.d.ts +28 -2
- package/lib/sync/backup-files.js +25 -5
- package/lib/sync/gist/gist-transport.d.ts +91 -0
- package/lib/sync/gist/gist-transport.js +406 -0
- package/lib/sync/gist/messages.d.ts +22 -0
- package/lib/sync/gist/messages.js +46 -0
- package/lib/sync/git/git-transport.d.ts +27 -2
- package/lib/sync/git/git-transport.js +49 -7
- package/lib/sync/s3/messages.d.ts +53 -0
- package/lib/sync/s3/messages.js +83 -0
- package/lib/sync/s3/s3-providers.d.ts +78 -0
- package/lib/sync/s3/s3-providers.js +156 -0
- package/lib/sync/s3/s3-transport.d.ts +126 -0
- package/lib/sync/s3/s3-transport.js +551 -0
- package/lib/sync/s3/sigv4.d.ts +107 -0
- package/lib/sync/s3/sigv4.js +196 -0
- package/lib/sync/snapshot-json.d.ts +8 -1
- package/lib/sync/snapshot-json.js +10 -3
- package/lib/sync/sync-config.d.ts +275 -4
- package/lib/sync/sync-config.js +677 -30
- package/lib/sync/sync-engine.d.ts +55 -0
- package/lib/sync/sync-engine.js +77 -7
- package/lib/sync/sync-history.d.ts +1 -1
- package/lib/sync/transport.js +4 -1
- package/lib/sync/ui-prefs.d.ts +10 -0
- package/lib/sync/ui-prefs.js +6 -0
- package/lib/sync/webdav/webdav-transport.d.ts +43 -3
- package/lib/sync/webdav/webdav-transport.js +124 -20
- package/lib/ui/artifact-view.d.ts +150 -0
- package/lib/ui/artifact-view.js +264 -0
- package/lib/ui/commands.d.ts +73 -0
- package/lib/ui/commands.js +185 -0
- package/lib/ui/disk-usage-view.d.ts +121 -0
- package/lib/ui/disk-usage-view.js +158 -0
- package/lib/ui/dsh-profiles-view.d.ts +70 -0
- package/lib/ui/dsh-profiles-view.js +73 -0
- package/lib/ui/foreign-view.d.ts +162 -0
- package/lib/ui/foreign-view.js +225 -0
- package/lib/ui/history-model.d.ts +1 -1
- package/lib/ui/history-model.js +1 -1
- package/lib/ui/i18n.d.ts +193 -0
- package/lib/ui/i18n.js +398 -0
- package/lib/ui/import-wizard.d.ts +25 -1
- package/lib/ui/import-wizard.js +69 -1
- package/lib/ui/menu-placement.d.ts +56 -0
- package/lib/ui/menu-placement.js +63 -0
- package/lib/ui/mid-ellipsis.d.ts +3 -2
- package/lib/ui/mid-ellipsis.js +3 -2
- package/lib/ui/nav-model.d.ts +34 -0
- package/lib/ui/nav-model.js +70 -0
- package/lib/ui/next-steps.d.ts +23 -1
- package/lib/ui/next-steps.js +19 -2
- package/lib/ui/overview-view.d.ts +1 -1
- package/lib/ui/overview-view.js +1 -1
- package/lib/ui/runs-view.d.ts +1 -1
- package/lib/ui/runs-view.js +1 -1
- package/lib/ui/session-format-disposition.d.ts +108 -0
- package/lib/ui/session-format-disposition.js +122 -0
- package/lib/ui/session-inventory-view.d.ts +361 -0
- package/lib/ui/session-inventory-view.js +239 -0
- package/lib/ui/session-layout-view.d.ts +265 -0
- package/lib/ui/session-layout-view.js +271 -0
- package/lib/ui/sync-repository-picker.d.ts +98 -0
- package/lib/ui/sync-repository-picker.js +145 -0
- package/lib/ui/sync-settings-view.d.ts +143 -4
- package/lib/ui/sync-settings-view.js +231 -7
- package/lib/ui/test-helpers.d.ts +6 -2
- package/lib/ui/test-helpers.js +1 -1
- package/lib/ui/types.d.ts +161 -1
- package/lib/utils/asar-read.d.ts +113 -0
- package/lib/utils/asar-read.js +523 -0
- package/lib/utils/env-lock.js +7 -2
- package/lib/utils/json.d.ts +13 -0
- package/lib/utils/json.js +13 -0
- package/lib/utils/patch-yaml.d.ts +25 -0
- package/lib/utils/patch-yaml.js +62 -0
- package/lib/utils/paths.d.ts +10 -1
- package/lib/utils/paths.js +24 -3
- package/lib/utils/recursive-walk.js +12 -13
- package/lib/utils/session-format.d.ts +65 -0
- package/lib/utils/session-format.js +233 -0
- package/lib/utils/session-health-scan.d.ts +48 -0
- package/lib/utils/session-health-scan.js +676 -0
- package/lib/utils/session-layout-repair-service.d.ts +98 -0
- package/lib/utils/session-layout-repair-service.js +457 -0
- package/lib/utils/session-log-repair.d.ts +154 -0
- package/lib/utils/session-log-repair.js +655 -0
- package/lib/utils/session-log.d.ts +28 -0
- package/lib/utils/session-log.js +65 -8
- package/lib/utils/session-repair-service.d.ts +175 -0
- package/lib/utils/session-repair-service.js +492 -0
- package/lib/utils/session-row-facts.d.ts +126 -0
- package/lib/utils/session-row-facts.js +290 -0
- package/lib/utils/session-verify.d.ts +118 -0
- package/lib/utils/session-verify.js +705 -0
- package/lib/utils/shared-constants.d.ts +82 -0
- package/lib/utils/shared-constants.js +95 -0
- package/lib/utils/ttl-cache.d.ts +40 -0
- package/lib/utils/ttl-cache.js +66 -0
- package/package.json +7 -5
- package/src/adapters/agent-instructions.test.ts +113 -0
- package/src/adapters/agent-instructions.ts +28 -23
- package/src/adapters/credentials.test.ts +27 -0
- package/src/adapters/credentials.ts +6 -3
- package/src/adapters/file-collection.test.ts +71 -0
- package/src/adapters/file-collection.ts +63 -11
- package/src/adapters/files.test.ts +222 -0
- package/src/adapters/mcp.test.ts +43 -0
- package/src/adapters/mcp.ts +37 -14
- package/src/adapters/plugin-files.ts +34 -4
- package/src/adapters/plugins.test.ts +244 -1
- package/src/adapters/plugins.ts +203 -54
- package/src/adapters/prompts.test.ts +49 -0
- package/src/adapters/prompts.ts +41 -20
- package/src/adapters/providers.test.ts +16 -0
- package/src/adapters/providers.ts +4 -3
- package/src/adapters/self.test.ts +125 -0
- package/src/adapters/self.ts +120 -29
- package/src/adapters/sessions.test.ts +189 -0
- package/src/adapters/sessions.ts +95 -4
- package/src/adapters/settings.test.ts +78 -0
- package/src/adapters/settings.ts +42 -6
- package/src/adapters/skills.ts +221 -3
- package/src/adapters/test-helpers.ts +43 -5
- package/src/adapters/workspaces-dup-id.test.ts +144 -0
- package/src/adapters/workspaces.test.ts +10 -0
- package/src/adapters/workspaces.ts +97 -5
- package/src/cli/actions.test.ts +548 -0
- package/src/cli/actions.ts +1560 -0
- package/src/cli/help.ts +570 -0
- package/src/cli/import-source.test.ts +193 -0
- package/src/cli/import-source.ts +229 -0
- package/src/cli/index.ts +284 -114
- package/src/cli/sessions-inspect.test.ts +90 -0
- package/src/cli/sessions-inspect.ts +114 -0
- package/src/cli/sessions-repair.ts +11 -1
- package/src/cli/web/browser.ts +20 -0
- package/src/cli/web/client-script.ts +259 -0
- package/src/cli/web/console-fixes.test.ts +36 -0
- package/src/cli/web/exec.ts +23 -0
- package/src/cli/web/http.ts +36 -0
- package/src/cli/web/page.ts +1203 -0
- package/src/cli/web/routes.ts +521 -0
- package/src/cli/web/script-anchor.test.ts +33 -0
- package/src/cli/web/server.ts +260 -0
- package/src/cli/web/web.test.ts +1446 -0
- package/src/client/CLIENT_DEPENDENCIES.md +10 -1
- package/src/client/ConfigManagerSection.tsx +437 -171
- package/src/client/about/AboutPanel.tsx +123 -9
- package/src/client/about/PluginUpdateDialog.tsx +185 -0
- package/src/client/about/ReleaseBody.tsx +144 -0
- package/src/client/about/ReleaseNotesDialog.tsx +3 -130
- package/src/client/about/about-view.test.ts +42 -2
- package/src/client/about/about-view.ts +64 -6
- package/src/client/about/plugin-update-view.test.ts +25 -0
- package/src/client/about/plugin-update-view.ts +26 -0
- package/src/client/about/release-notes-view.test.ts +33 -0
- package/src/client/about/release-notes-view.ts +34 -0
- package/src/client/api.ts +197 -4
- package/src/client/client-types.ts +5 -0
- package/src/client/common/CommandPalette.tsx +173 -0
- package/src/client/common/ContentPicker.tsx +4 -1
- package/src/client/common/CopyButton.tsx +9 -12
- package/src/client/common/Icon.tsx +7 -0
- package/src/client/common/InfoHint.tsx +280 -0
- package/src/client/common/Modal.tsx +14 -2
- package/src/client/common/MoreMenu.tsx +195 -0
- package/src/client/common/RunsCenter.tsx +20 -12
- package/src/client/common/Select.tsx +192 -42
- package/src/client/common/ToastViewport.tsx +1 -1
- package/src/client/common/client-route-parity.test.ts +10 -0
- package/src/client/common/clipboard.test.ts +42 -0
- package/src/client/common/clipboard.ts +19 -0
- package/src/client/common/compat-label.test.ts +43 -0
- package/src/client/common/compat-label.ts +28 -0
- package/src/client/common/floating-bounds.ts +48 -0
- package/src/client/common/floating-units.test.ts +71 -0
- package/src/client/common/http.test.ts +24 -0
- package/src/client/common/http.ts +19 -3
- package/src/client/common/info-hint-guard.test.ts +881 -0
- package/src/client/common/menu-align.ts +29 -0
- package/src/client/common/menu-scroll-guard.test.ts +61 -0
- package/src/client/common/plan-text-redaction.test.ts +200 -14
- package/src/client/common/routes.ts +33 -0
- package/src/client/common/ui.tsx +1 -1
- package/src/client/config-manager.module.css +1308 -473
- package/src/client/css-scale-guard.test.ts +122 -0
- package/src/client/css-token-guard.test.ts +82 -0
- package/src/client/{profiles/ProfilesPanel.tsx → environment/EnvironmentPanel.tsx} +133 -34
- package/src/client/environment/maintenance/DiskUsageCard.tsx +257 -0
- package/src/client/environment/profiles-incomplete-ui.test.ts +103 -0
- package/src/client/export/ExportView.tsx +27 -12
- package/src/client/history/HistoryPanel.tsx +2 -2
- package/src/client/{snapshots → home}/BackupScheduleCard.tsx +95 -117
- package/src/client/{overview/OverviewPanel.tsx → home/HomePanel.tsx} +161 -176
- package/src/client/icon-layer-guard.test.ts +1 -1
- package/src/client/import/ForeignImportView.tsx +318 -0
- package/src/client/import/ImportWizardView.tsx +113 -17
- package/src/client/import/foreign-import-view-guard.test.ts +195 -0
- package/src/client/import/import-file-select.test.ts +53 -0
- package/src/client/import/import-wizard-steps.tsx +118 -2
- package/src/client/import/use-import-wizard-controller.ts +116 -8
- package/src/client/index.ts +3 -3
- package/src/client/library/ArtifactDetail.tsx +34 -0
- package/src/client/library/ArtifactRow.tsx +128 -0
- package/src/client/library/BackupInspectView.tsx +96 -0
- package/src/client/library/LibraryActions.tsx +635 -0
- package/src/client/library/LibraryPanel.tsx +253 -0
- package/src/client/{snapshots → library}/RestorePlanView.tsx +1 -1
- package/src/client/library/files-layout.test.ts +90 -0
- package/src/client/library/report-dismiss.test.ts +86 -0
- package/src/client/library/task-panel-visibility.test.ts +50 -0
- package/src/client/locales.ts +483 -36
- package/src/client/lucide-icons.d.ts +2 -0
- package/src/client/market/MarketImportReview.tsx +8 -2
- package/src/client/market/MarketPanel.tsx +62 -5
- package/src/client/market/MyConfigsLoginCard.tsx +2 -1
- package/src/client/market/MyConfigsWizard.tsx +4 -2
- package/src/client/market/market-locales.ts +5 -0
- package/src/client/recovery/IncompleteCopiesSection.tsx +132 -0
- package/src/client/recovery/RecoveryPanel.tsx +1048 -13
- package/src/client/recovery/recovery-api.ts +81 -1
- package/src/client/recovery/recovery-incomplete-copies.test.ts +151 -0
- package/src/client/recovery/recovery-locales.test.ts +88 -0
- package/src/client/recovery/recovery-locales.ts +501 -0
- package/src/client/recovery/recovery-panel-layout.test.ts +52 -0
- package/src/client/recovery/recovery-view.test.ts +38 -0
- package/src/client/recovery/recovery-view.ts +104 -2
- package/src/client/recovery/session-dialog-mount.test.ts +58 -0
- package/src/client/run-store.test.ts +262 -116
- package/src/client/run-store.ts +231 -153
- package/src/client/session-export/session-export-view.test.ts +103 -0
- package/src/client/session-export/session-export-view.ts +118 -0
- package/src/client/sync/AutosyncCard.tsx +5 -6
- package/src/client/sync/ChannelClearConfirmDialog.tsx +58 -0
- package/src/client/sync/ChannelConfigDialog.tsx +246 -55
- package/src/client/sync/DecryptPasswordCard.tsx +2 -2
- package/src/client/sync/SecurityOptionsCard.tsx +2 -2
- package/src/client/sync/SyncChannelEntryCard.tsx +72 -8
- package/src/client/sync/SyncConfirmView.tsx +85 -26
- package/src/client/sync/{SyncHistoryView.tsx → SyncLogList.tsx} +84 -103
- package/src/client/sync/{SyncSettingsView.tsx → SyncPanel.tsx} +464 -261
- package/src/client/sync/SyncRepositoryPicker.tsx +216 -0
- package/src/client/sync/SyncSectionPickerDialog.tsx +20 -9
- package/src/client/sync/SyncSettingsView.test.ts +45 -5
- package/src/client/sync/UnreadableSnapshotsBanner.tsx +35 -0
- package/src/client/sync/history-model.test.ts +94 -57
- package/src/client/sync/history-model.ts +46 -27
- package/src/client/sync/sync-api.test.ts +56 -0
- package/src/client/sync/sync-api.ts +158 -1
- package/src/client/sync/sync-locales.ts +214 -2
- package/src/client/sync/sync-view-v2.test.ts +54 -2
- package/src/client/sync/sync-view.test.ts +3 -21
- package/src/client/sync/sync-view.ts +178 -44
- package/src/client/task/TaskShell.tsx +83 -0
- package/src/core/analyzer-cache.test.ts +47 -0
- package/src/core/analyzer.ts +278 -19
- package/src/core/backup-plan.test.ts +35 -0
- package/src/core/backup-plan.ts +19 -1
- package/src/core/backup.test.ts +37 -1
- package/src/core/backup.ts +27 -6
- package/src/core/cache-cleaner.test.ts +186 -1
- package/src/core/cache-cleaner.ts +155 -35
- package/src/core/checkpoint.test.ts +665 -0
- package/src/core/checkpoint.ts +1614 -0
- package/src/core/compatibility-reasons.test.ts +100 -0
- package/src/core/credential-plan-consistency.test.ts +93 -0
- package/src/core/disk-usage.test.ts +179 -0
- package/src/core/disk-usage.ts +360 -0
- package/src/core/import-sessions-visibility.test.ts +183 -7
- package/src/core/importer.ts +3 -1
- package/src/core/incident-wiring.test.ts +10 -1
- package/src/core/journal.test.ts +70 -0
- package/src/core/journal.ts +68 -0
- package/src/core/local-plugin-host.ts +17 -3
- package/src/core/local-plugin-pack.test.ts +101 -0
- package/src/core/local-plugin-pack.ts +70 -1
- package/src/core/messages.ts +41 -0
- package/src/core/model-tools.ts +3 -0
- package/src/core/patch-layers.test.ts +94 -0
- package/src/core/patch-layers.ts +150 -0
- package/src/core/recovery-orchestrator.ts +84 -9
- package/src/core/restore.ts +74 -5
- package/src/core/rollback.ts +6 -3
- package/src/core/section-content-consistency.test.ts +185 -0
- package/src/core/self-update.test.ts +110 -0
- package/src/core/self-update.ts +118 -0
- package/src/core/session-health.test.ts +314 -0
- package/src/core/session-health.ts +352 -0
- package/src/core/smoke.test.ts +14 -0
- package/src/core/types.ts +290 -2
- package/src/core/update-check.test.ts +149 -0
- package/src/core/update-check.ts +170 -0
- package/src/core/validator.ts +53 -21
- package/src/foreign/antigravity.test.ts +271 -0
- package/src/foreign/antigravity.ts +188 -0
- package/src/foreign/bundle.ts +108 -0
- package/src/foreign/chatgpt.test.ts +279 -0
- package/src/foreign/chatgpt.ts +30 -0
- package/src/foreign/claude-code.test.ts +234 -0
- package/src/foreign/claude-code.ts +106 -0
- package/src/foreign/claude-sessions-bytes.test.ts +214 -0
- package/src/foreign/claude-sessions.test.ts +155 -0
- package/src/foreign/claude-sessions.ts +453 -0
- package/src/foreign/cline.test.ts +274 -0
- package/src/foreign/cline.ts +32 -0
- package/src/foreign/codex.test.ts +585 -0
- package/src/foreign/codex.ts +409 -0
- package/src/foreign/continue.test.ts +365 -0
- package/src/foreign/continue.ts +73 -0
- package/src/foreign/copilot.test.ts +273 -0
- package/src/foreign/copilot.ts +133 -0
- package/src/foreign/crush.test.ts +234 -0
- package/src/foreign/crush.ts +66 -0
- package/src/foreign/cursor.test.ts +509 -0
- package/src/foreign/cursor.ts +259 -0
- package/src/foreign/dsh.test.ts +198 -0
- package/src/foreign/dsh.ts +117 -0
- package/src/foreign/dsh4.test.ts +127 -0
- package/src/foreign/dsh4.ts +15 -0
- package/src/foreign/file-budget.test.ts +256 -0
- package/src/foreign/fixtures/antigravity/README.md +18 -0
- package/src/foreign/fixtures/antigravity/basic/gemini/antigravity/mcp_config.json +13 -0
- package/src/foreign/fixtures/antigravity/basic/gemini/config/mcp_config.json +24 -0
- package/src/foreign/fixtures/antigravity/empty/gemini/antigravity/mcp_config.json +0 -0
- package/src/foreign/fixtures/antigravity/empty/gemini/antigravity/mcp_oauth_tokens.json +0 -0
- package/src/foreign/fixtures/antigravity/empty/gemini/config/mcp_config.json +0 -0
- package/src/foreign/fixtures/codex/README.md +31 -0
- package/src/foreign/fixtures/codex/basic/.agents/skills/hello/SKILL.md +6 -0
- package/src/foreign/fixtures/codex/basic/.agents/skills/wrapper/nested/SKILL.md +6 -0
- package/src/foreign/fixtures/codex/basic/.codex/AGENTS.md +4 -0
- package/src/foreign/fixtures/codex/basic/.codex/config.toml +28 -0
- package/src/foreign/fixtures/codex/malformed/.codex/config.toml +3 -0
- package/src/foreign/fixtures/codex/override/.codex/AGENTS.md +1 -0
- package/src/foreign/fixtures/codex/override/.codex/AGENTS.override.md +3 -0
- package/src/foreign/fixtures/codex/sessions/.codex/archived_sessions/rollout-2026-10-05T09-00-00-22222222-2222-4222-8222-222222222222.jsonl +2 -0
- package/src/foreign/fixtures/codex/sessions/.codex/sessions/2026/10/06/rollout-2026-10-06T10-00-00-11111111-1111-4111-8111-111111111111.jsonl +15 -0
- package/src/foreign/fixtures/codex/sessions/.codex/sessions/2026/10/06/rollout-2026-10-06T11-00-00-33333333-3333-4333-8333-333333333333.jsonl +2 -0
- package/src/foreign/fixtures/codex/sessions/.codex/sessions/2026/10/06/rollout-2026-10-06T11-30-00-55555555-5555-4555-8555-555555555555.jsonl +2 -0
- package/src/foreign/fixtures/codex/sessions/.codex/sessions/2026/10/06/rollout-2026-10-06T12-00-00-44444444-4444-4444-8444-444444444444.jsonl +2 -0
- package/src/foreign/fixtures/codex/sessions/.codex/sessions/notes.jsonl +1 -0
- package/src/foreign/fixtures/copilot/README.md +22 -0
- package/src/foreign/fixtures/copilot/basic/copilot-instructions.md +3 -0
- package/src/foreign/fixtures/copilot/basic/instructions/empty.instructions.md +1 -0
- package/src/foreign/fixtures/copilot/basic/instructions/repo.instructions.md +5 -0
- package/src/foreign/fixtures/copilot/basic/mcp-config.json +24 -0
- package/src/foreign/fixtures/copilot/basic/skills/hello/SKILL.md +6 -0
- package/src/foreign/fixtures/copilot/overridden/mcp-config.json +10 -0
- package/src/foreign/fixtures/cursor/README.md +17 -0
- package/src/foreign/fixtures/cursor/alt/.cursor/mcp.json +5 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/mcp.json +18 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/rules/agent.mdc +5 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/rules/always.mdc +6 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/rules/auto.mdc +7 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/rules/manual.mdc +3 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/skills/.hidden/SKILL.md +6 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/skills/hello/SKILL.md +6 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/skills/wrapper/nested/SKILL.md +6 -0
- package/src/foreign/fixtures/cursor/basic/.cursor/skills/wrapper/nested/notes.md +1 -0
- package/src/foreign/fixtures/cursor/basic/.cursorrules +1 -0
- package/src/foreign/fixtures/cursor/basic/project/.cursor/mcp.json +9 -0
- package/src/foreign/fixtures/cursor/basic/project/.cursor/rules/project-always.mdc +5 -0
- package/src/foreign/fixtures/cursor/basic/project/.cursor/skills/hello/SKILL.md +6 -0
- package/src/foreign/fixtures/cursor/basic/project/.cursorrules +1 -0
- package/src/foreign/fixtures/cursor/empty/.cursor/mcp.json +0 -0
- package/src/foreign/fixtures/cursor/malformed/.cursor/mcp.json +3 -0
- package/src/foreign/fixtures/cursor/malformed/.cursor/rules/broken.mdc +6 -0
- package/src/foreign/fixtures/cursor/shape/.cursor/mcp.json +3 -0
- package/src/foreign/fixtures/hermes/README.md +14 -0
- package/src/foreign/fixtures/hermes/basic/SOUL.md +3 -0
- package/src/foreign/fixtures/hermes/basic/config.yaml +48 -0
- package/src/foreign/fixtures/hermes/basic/dotenv.fixture +1 -0
- package/src/foreign/fixtures/hermes/basic/memories/MEMORY.md +1 -0
- package/src/foreign/fixtures/hermes/basic/memories/USER.md +1 -0
- package/src/foreign/fixtures/hermes/basic/skills/se-team-design/SKILL.md +6 -0
- package/src/foreign/fixtures/hermes/basic/skills/se-team-design/examples/usage.md +1 -0
- package/src/foreign/fixtures/hermes/basic/skills/software-development/dogfood/SKILL.md +6 -0
- package/src/foreign/fixtures/hermes/basic/skills/software-development/dogfood/notes.md +1 -0
- package/src/foreign/fixtures/hermes/basic/state.db +1 -0
- package/src/foreign/fixtures/hermes/empty/config.yaml +0 -0
- package/src/foreign/gemini.test.ts +291 -0
- package/src/foreign/gemini.ts +52 -0
- package/src/foreign/goose.test.ts +196 -0
- package/src/foreign/goose.ts +62 -0
- package/src/foreign/grokbuild.test.ts +246 -0
- package/src/foreign/grokbuild.ts +30 -0
- package/src/foreign/hermes.test.ts +545 -0
- package/src/foreign/hermes.ts +86 -0
- package/src/foreign/kernel-credentials.test.ts +88 -0
- package/src/foreign/kernel-workspaces.test.ts +88 -0
- package/src/foreign/kernel.ts +584 -0
- package/src/foreign/kilocode.test.ts +186 -0
- package/src/foreign/kilocode.ts +60 -0
- package/src/foreign/kimi.test.ts +259 -0
- package/src/foreign/kimi.ts +55 -0
- package/src/foreign/mcp-value-shape.test.ts +286 -0
- package/src/foreign/mimocode.test.ts +178 -0
- package/src/foreign/mimocode.ts +60 -0
- package/src/foreign/openclaw.test.ts +248 -0
- package/src/foreign/openclaw.ts +54 -0
- package/src/foreign/opencode.test.ts +376 -0
- package/src/foreign/opencode.ts +61 -0
- package/src/foreign/pi.test.ts +275 -0
- package/src/foreign/pi.ts +56 -0
- package/src/foreign/platform-paths.ts +156 -0
- package/src/foreign/qoder.test.ts +266 -0
- package/src/foreign/qoder.ts +57 -0
- package/src/foreign/qwen.test.ts +203 -0
- package/src/foreign/qwen.ts +53 -0
- package/src/foreign/read-antigravity.ts +569 -0
- package/src/foreign/read-chatgpt.ts +506 -0
- package/src/foreign/read-claude-code.ts +264 -0
- package/src/foreign/read-cline.ts +517 -0
- package/src/foreign/read-codex.ts +823 -0
- package/src/foreign/read-continue.ts +557 -0
- package/src/foreign/read-copilot.ts +304 -0
- package/src/foreign/read-crush.ts +503 -0
- package/src/foreign/read-cursor.ts +778 -0
- package/src/foreign/read-dsh.ts +215 -0
- package/src/foreign/read-dsh4.ts +35 -0
- package/src/foreign/read-gemini.ts +306 -0
- package/src/foreign/read-goose.ts +333 -0
- package/src/foreign/read-grokbuild.ts +475 -0
- package/src/foreign/read-hermes.ts +724 -0
- package/src/foreign/read-kilocode.ts +55 -0
- package/src/foreign/read-kimi.ts +768 -0
- package/src/foreign/read-mimocode.ts +66 -0
- package/src/foreign/read-openclaw.ts +505 -0
- package/src/foreign/read-opencode.ts +994 -0
- package/src/foreign/read-pi.ts +459 -0
- package/src/foreign/read-qoder.ts +351 -0
- package/src/foreign/read-qwen.ts +342 -0
- package/src/foreign/read-reasonix.ts +590 -0
- package/src/foreign/read-teleagent.ts +82 -0
- package/src/foreign/read-trae.ts +488 -0
- package/src/foreign/read-vibe.ts +353 -0
- package/src/foreign/read-workbuddy.ts +374 -0
- package/src/foreign/read-zcode.ts +48 -0
- package/src/foreign/read-zed.ts +479 -0
- package/src/foreign/reasonix.test.ts +334 -0
- package/src/foreign/reasonix.ts +25 -0
- package/src/foreign/registry.test.ts +377 -0
- package/src/foreign/registry.ts +750 -0
- package/src/foreign/session-ir.test.ts +136 -0
- package/src/foreign/session-ir.ts +579 -0
- package/src/foreign/session-read.ts +295 -0
- package/src/foreign/session-source.ts +625 -0
- package/src/foreign/skill-file-caps.test.ts +171 -0
- package/src/foreign/source-modules.ts +86 -0
- package/src/foreign/source-registry.test.ts +190 -0
- package/src/foreign/sqlite.test.ts +313 -0
- package/src/foreign/sqlite.ts +446 -0
- package/src/foreign/teleagent.test.ts +147 -0
- package/src/foreign/teleagent.ts +62 -0
- package/src/foreign/trae.test.ts +316 -0
- package/src/foreign/trae.ts +25 -0
- package/src/foreign/truncation-report.test.ts +238 -0
- package/src/foreign/truth-table.ts +453 -0
- package/src/foreign/types.ts +312 -0
- package/src/foreign/vibe.test.ts +209 -0
- package/src/foreign/vibe.ts +28 -0
- package/src/foreign/workbuddy.test.ts +207 -0
- package/src/foreign/workbuddy.ts +53 -0
- package/src/foreign/zcode.test.ts +224 -0
- package/src/foreign/zcode.ts +60 -0
- package/src/foreign/zed.test.ts +240 -0
- package/src/foreign/zed.ts +62 -0
- package/src/index.facade.test.ts +254 -16
- package/src/index.ts +907 -84
- package/src/market/github-repos.test.ts +98 -1
- package/src/market/github-repos.ts +63 -1
- package/src/market/types.ts +3 -3
- package/src/profiles/dsh-profile-incomplete-copy.test.ts +177 -0
- package/src/profiles/dsh-profile-manager.test.ts +63 -0
- package/src/profiles/dsh-profile-manager.ts +203 -10
- package/src/profiles/dsh-profile-shared.ts +74 -1
- package/src/profiles/index.ts +2 -1
- package/src/routes/backup.ts +167 -1
- package/src/routes/consult.ts +63 -6
- package/src/routes/foreign-context.ts +89 -0
- package/src/routes/foreign.test.ts +385 -0
- package/src/routes/foreign.ts +226 -0
- package/src/routes/import.ts +44 -9
- package/src/routes/index.ts +6 -2
- package/src/routes/kit.ts +17 -3
- package/src/routes/market.ts +0 -1
- package/src/routes/prefs.ts +45 -1
- package/src/routes/profiles.ts +2 -0
- package/src/routes/recovery.test.ts +167 -0
- package/src/routes/recovery.ts +482 -1
- package/src/routes/session-export.ts +308 -0
- package/src/routes/session-format.test.ts +59 -0
- package/src/routes/session-format.ts +74 -0
- package/src/routes/snapshots.ts +12 -2
- package/src/routes/sync.ts +229 -9
- package/src/security/container-kind.test.ts +92 -0
- package/src/security/container-kind.ts +51 -0
- package/src/security/index.ts +2 -1
- package/src/security/redaction.test.ts +149 -0
- package/src/security/redaction.ts +45 -10
- package/src/security/secret-scanner.test.ts +186 -0
- package/src/security/secret-scanner.ts +57 -1
- package/src/security/security.test.ts +9 -0
- package/src/sync/autosync-risk-tier.test.ts +61 -0
- package/src/sync/autosync-scheduler.test.ts +48 -1
- package/src/sync/autosync-scheduler.ts +50 -26
- package/src/sync/backup-files.test.ts +34 -0
- package/src/sync/backup-files.ts +44 -5
- package/src/sync/gist/gist-msgkeys-catalog.test.ts +33 -0
- package/src/sync/gist/gist-msgkeys.test.ts +71 -0
- package/src/sync/gist/gist-transport.test.ts +308 -0
- package/src/sync/gist/gist-transport.ts +550 -0
- package/src/sync/gist/messages.ts +49 -0
- package/src/sync/git/git-transport.test.ts +56 -0
- package/src/sync/git/git-transport.ts +49 -11
- package/src/sync/retention-prune-all-off.test.ts +50 -0
- package/src/sync/s3/cloud-config.test.ts +283 -0
- package/src/sync/s3/messages.ts +102 -0
- package/src/sync/s3/s3-delete-index-404.test.ts +170 -0
- package/src/sync/s3/s3-delete-index-unreadable.test.ts +141 -0
- package/src/sync/s3/s3-msgkeys.test.ts +101 -0
- package/src/sync/s3/s3-providers.ts +213 -0
- package/src/sync/s3/s3-transport.test.ts +394 -0
- package/src/sync/s3/s3-transport.ts +651 -0
- package/src/sync/s3/s3-upload-index-404.test.ts +171 -0
- package/src/sync/s3/sigv4.test.ts +219 -0
- package/src/sync/s3/sigv4.ts +283 -0
- package/src/sync/snapshot-json.test.ts +35 -0
- package/src/sync/snapshot-json.ts +10 -3
- package/src/sync/sync-config.test.ts +305 -6
- package/src/sync/sync-config.ts +872 -27
- package/src/sync/sync-engine-download-tombstone.test.ts +73 -0
- package/src/sync/sync-engine.test.ts +31 -0
- package/src/sync/sync-engine.ts +86 -7
- package/src/sync/sync-history.ts +1 -1
- package/src/sync/transport.ts +5 -1
- package/src/sync/ui-prefs.test.ts +24 -0
- package/src/sync/ui-prefs.ts +16 -0
- package/src/sync/webdav/webdav-delete-index-404.test.ts +178 -0
- package/src/sync/webdav/webdav-delete-index-unreadable.test.ts +143 -0
- package/src/sync/webdav/webdav-msgkeys.test.ts +53 -0
- package/src/sync/webdav/webdav-transport.test.ts +9 -5
- package/src/sync/webdav/webdav-transport.ts +123 -19
- package/src/sync/webdav/webdav-upload-index-404.test.ts +177 -0
- package/src/ui/artifact-view.test.ts +203 -0
- package/src/ui/artifact-view.ts +410 -0
- package/src/ui/commands.test.ts +162 -0
- package/src/ui/commands.ts +242 -0
- package/src/ui/disk-usage-view.test.ts +181 -0
- package/src/ui/disk-usage-view.ts +271 -0
- package/src/ui/dsh-profiles-incomplete-view.test.ts +102 -0
- package/src/ui/dsh-profiles-view.test.ts +21 -2
- package/src/ui/dsh-profiles-view.ts +132 -0
- package/src/ui/foreign-view.test.ts +241 -0
- package/src/ui/foreign-view.ts +362 -0
- package/src/ui/history-model.ts +1 -1
- package/src/ui/i18n.ts +398 -0
- package/src/ui/import-wizard.test.ts +124 -5
- package/src/ui/import-wizard.ts +93 -3
- package/src/ui/menu-placement.test.ts +84 -0
- package/src/ui/menu-placement.ts +89 -0
- package/src/ui/mid-ellipsis.test.ts +7 -10
- package/src/ui/mid-ellipsis.ts +3 -2
- package/src/ui/nav-model.test.ts +86 -0
- package/src/ui/nav-model.ts +82 -0
- package/src/ui/next-steps.test.ts +39 -1
- package/src/ui/next-steps.ts +33 -2
- package/src/ui/overview-view.ts +1 -1
- package/src/ui/runs-view.ts +1 -1
- package/src/ui/session-format-disposition.test.ts +114 -0
- package/src/ui/session-format-disposition.ts +174 -0
- package/src/ui/session-inventory-view.test.ts +349 -0
- package/src/ui/session-inventory-view.ts +493 -0
- package/src/ui/session-layout-view.test.ts +361 -0
- package/src/ui/session-layout-view.ts +444 -0
- package/src/ui/sync-repository-picker.test.ts +130 -0
- package/src/ui/sync-repository-picker.ts +180 -0
- package/src/ui/sync-settings-view.test.ts +166 -0
- package/src/ui/sync-settings-view.ts +319 -9
- package/src/ui/test-helpers.ts +12 -6
- package/src/ui/types.ts +171 -2
- package/src/utils/asar-read.test.ts +330 -0
- package/src/utils/asar-read.ts +606 -0
- package/src/utils/env-lock.test.ts +55 -0
- package/src/utils/env-lock.ts +6 -1
- package/src/utils/json.ts +14 -0
- package/src/utils/patch-yaml.test.ts +112 -0
- package/src/utils/patch-yaml.ts +72 -0
- package/src/utils/paths.test.ts +63 -0
- package/src/utils/paths.ts +25 -3
- package/src/utils/recursive-walk.test.ts +20 -0
- package/src/utils/recursive-walk.ts +12 -13
- package/src/utils/session-format.test.ts +218 -0
- package/src/utils/session-format.ts +237 -0
- package/src/utils/session-health-scan.test.ts +580 -0
- package/src/utils/session-health-scan.ts +784 -0
- package/src/utils/session-layout-repair-service.test.ts +362 -0
- package/src/utils/session-layout-repair-service.ts +568 -0
- package/src/utils/session-log-repair.test.ts +569 -0
- package/src/utils/session-log-repair.ts +783 -0
- package/src/utils/session-log.test.ts +13 -0
- package/src/utils/session-log.ts +78 -0
- package/src/utils/session-repair-service.test.ts +325 -0
- package/src/utils/session-repair-service.ts +612 -0
- package/src/utils/session-row-facts.test.ts +159 -0
- package/src/utils/session-row-facts.ts +305 -0
- package/src/utils/session-verify.test.ts +762 -0
- package/src/utils/session-verify.ts +784 -0
- package/src/utils/shared-constants.ts +106 -0
- package/src/utils/ttl-cache.test.ts +96 -0
- package/src/utils/ttl-cache.ts +90 -0
- package/lib/ui/nav-overflow.d.ts +0 -35
- package/lib/ui/nav-overflow.js +0 -41
- package/src/client/overview/overview-kind-labels.test.ts +0 -43
- package/src/client/snapshots/SnapshotsEmptyState.tsx +0 -31
- package/src/client/snapshots/SnapshotsListTable.tsx +0 -97
- package/src/client/snapshots/SnapshotsPanel.tsx +0 -811
- package/src/client/snapshots/report-dismiss.test.ts +0 -59
- package/src/ui/nav-overflow.test.ts +0 -57
- package/src/ui/nav-overflow.ts +0 -58
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ Backup, restore, export, import, migrate and sync your complete DeepSeek Harness
|
|
|
19
19
|
- 🔐 Encrypted backups with optional credentials
|
|
20
20
|
- ☁️ **Git / WebDAV** configuration sync
|
|
21
21
|
- 🛒 **Configuration market** — browse & one-click install shared configs
|
|
22
|
+
- 🧳 **Import from other AI agents** — Claude Code, Cursor, Codex, Hermes, Antigravity … config **and chat history**
|
|
22
23
|
- ↩️ Automatic snapshot and rollback before restore
|
|
23
24
|
|
|
24
25
|
[English](README.md) · [简体中文](README.zh-CN.md)
|
|
@@ -46,7 +47,7 @@ DSH is your AI assistant workbench — it holds your settings: model configs, pl
|
|
|
46
47
|
|
|
47
48
|
### Backup DeepSeek Harness configuration
|
|
48
49
|
|
|
49
|
-
Create a portable backup of your DSH settings, model providers, plugins, MCP servers, skills, agent presets and workspace — one ZIP file, no secret values included by default. (DSH's own profiles — `$DSH_HOME/profiles/<name>`, i.e. which plugin stack to boot — are machine-local and are not
|
|
50
|
+
Create a portable backup of your DSH settings, model providers, plugins, MCP servers, skills, agent presets and workspace — one ZIP file, no secret values included by default. (DSH's own profiles — `$DSH_HOME/profiles/<name>`, i.e. which plugin stack to boot — are machine-local and are **not** part of the backup; the **Profiles** page manages them instead — list / create / rename / delete, plus launching or stopping an independent instance for one.)
|
|
50
51
|
|
|
51
52
|
### Restore DeepSeek Harness on another machine
|
|
52
53
|
|
|
@@ -68,6 +69,10 @@ Turn on scheduled backups (6h / 12h / 24h / 7d — or a **custom weekly weekday
|
|
|
68
69
|
|
|
69
70
|
Browse the built-in official market for ready-made configurations (model providers, plugins, MCP servers, skills, agent presets…), preview what would be imported (dry-run), and install with one click — supply-chain warnings are always shown and every section must be explicitly approved before anything is written.
|
|
70
71
|
|
|
72
|
+
### Import from another AI agent (Claude Code, Cursor, Codex, …)
|
|
73
|
+
|
|
74
|
+
Your setup — and your chat history — already live in another AI coding agent on this machine? Pick the source and DSH Config Manager **translates it into a standard bundle** (MCP servers, skills, global instructions, conversations and the workspaces they belong to) and hands it to the same review-first import flow: preview → per-item conflict decisions → automatic snapshot → apply → rollback. 30 sources are recognized and 29 of them can migrate **chat history** too. Secret **values** are never read — only the key names, so the import plan can ask you to re-enter them.
|
|
75
|
+
|
|
71
76
|
---
|
|
72
77
|
|
|
73
78
|
## 🆚 How it differs from the other DSH backup / sync plugins
|
|
@@ -77,7 +82,7 @@ Several DSH plugins live in this space and they solve different problems — pic
|
|
|
77
82
|
| Plugin | Strongest at | Where DSH Config Manager goes further |
|
|
78
83
|
|---|---|---|
|
|
79
84
|
| [xiaoyuyu6420/dsh-backup](https://github.com/xiaoyuyu6420/dsh-backup) | One-command `~/.dsh` snapshots from the CLI, plus session doctor / upgrade snapshots / rescue console | Review-before-write GUI flow (dry-run preview, per-item conflict decisions, automatic rollback), cross-machine path remapping, encrypted credential payload, configuration marketplace |
|
|
80
|
-
| [muyifc/dsh-config-sync](https://github.com/muyifc/dsh-config-sync) | Export / import DSH configuration to a portable, password-encrypted file, callable from tool calls | 13–14 sections
|
|
85
|
+
| [muyifc/dsh-config-sync](https://github.com/muyifc/dsh-config-sync) | Export / import DSH configuration to a portable, password-encrypted file, callable from tool calls | 13–14 sections (plugins / MCP / skills / workspaces / session logs …), scheduled backups, Git + WebDAV sync per channel, session migration with path rebase |
|
|
81
86
|
| [dickpy/dsh-cloud-sync](https://github.com/dickpy/dsh-cloud-sync) · [weibaohui/dsh-sync](https://github.com/weibaohui/dsh-sync) | Keeping machines consistent through WebDAV / S3 or a private Git mirror | Sync is one of five capabilities here — alongside export/import, scheduling, marketplace and profile instance launch/stop |
|
|
82
87
|
| `cp -r ~/.dsh` (or Git on the home dir) | Free, zero setup, fine for a purely textual config | No secret handling, no path remapping, no capture of `link:` / `file:` plugin installs, no session-log work, no conflict handling or rollback |
|
|
83
88
|
|
|
@@ -102,7 +107,13 @@ Several DSH plugins live in this space and they solve different problems — pic
|
|
|
102
107
|
| 🛒 | **Config Marketplace** | Browse & one-click install community configs — supply-chain warnings + per-item content selection (change summary + in-place high-risk flags) |
|
|
103
108
|
| 🗂️ | **Profiles (DSH profiles)** | Manage `$DSH_HOME/profiles/<name>` directly: list / create from a shipped template / rename / hard delete / **launch this profile (independent instance)** / **stop the instance** (the row button flips between Launch and Stop with the running state) |
|
|
104
109
|
| 🌐 | **Bilingual UI** | Interface, reports and error details follow the DSH app language (中文 / English) |
|
|
110
|
+
| 🧩 | **Local plugin migration** | `link:` / `file:` development plugins are packed into the backup, so switching machines does not lose them |
|
|
111
|
+
| 🗄️ | **Configurable retention (GFS tiers)** | "keep the last N + one per month + one per year" — the defaults are equivalent to the previous behaviour |
|
|
105
112
|
| 🤖 | **Agent tools** | Backup / snapshot / restore / sync right from an agent session |
|
|
113
|
+
| 💾 | **Disk usage report** | The backups page shows how much space the plugin's own artifacts take (backups / snapshots / sync copies / caches / staging) with a three-tier cleanup policy; **one-click cleanup only touches regenerable caches and expired backups** — snapshots and sync data are never removed there |
|
|
114
|
+
| ⬆️ | **Update check** | The About page reads the latest version from npm (read-only, cached 10 minutes); when there is a newer one it offers a copyable upgrade command **and** a one-click **Update now** that installs exactly that version — DSH must then be restarted, and the plugin never restarts it for you. Offline failures are reported honestly and affect nothing else |
|
|
115
|
+
| 🧭 | **Compatibility explained** | Before importing you see "source DSH version / platform → local" plus **structured reasons** for the score (cross-platform / missing sections / newer source …) instead of a bare "partial" |
|
|
116
|
+
| 🧳 | **Import from other AI agents** | Read Claude Code / Cursor / Codex / Hermes / Antigravity … configuration **and chat history** on this machine, translate it into a standard bundle, then import through the usual preview / conflict / rollback flow |
|
|
106
117
|
|
|
107
118
|
---
|
|
108
119
|
|
|
@@ -211,6 +222,27 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
211
222
|
>
|
|
212
223
|
> Then retry the install. As long as that global copy exists and is incompatible with your DSH, every profile (`web` / `desktop` / custom) is rejected the same way.
|
|
213
224
|
|
|
225
|
+
### Installing from the GitHub source (`git+https://...`)
|
|
226
|
+
|
|
227
|
+
When installed from a git source, pnpm first runs this package's `prepare` script (= `npm run build`) inside that clone to produce `lib/` — **npm ships a prebuilt `lib/`, a git install builds it on the spot**. pnpm 11 blocks that script by default, so the install fails with `dsh: plugin command failed` and this in the log:
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED Failed to prepare git-hosted package ...
|
|
231
|
+
The git-hosted package "dsh-config-manager@x.y.z" needs to execute build scripts
|
|
232
|
+
but is not in the "allowBuilds" allowlist.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Fix**: copy the exact line pnpm prints (it includes the full git URL and commit sha) into the profile's `pnpm-workspace.yaml`:
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
# ~/.dsh/profiles/web/pnpm-workspace.yaml
|
|
239
|
+
allowBuilds:
|
|
240
|
+
dsh-config-manager@git+https://github.com/xiajiajun516/dsh-config-manager.git#<sha printed by pnpm>: true
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
> The key must be copied **verbatim** — the bare package name `dsh-config-manager` does not work (the allowlist matches on source + version).
|
|
244
|
+
> The simpler path is the prebuilt npm release above (`dsh-config-manager@latest`), which needs no allowlist at all.
|
|
245
|
+
|
|
214
246
|
---
|
|
215
247
|
|
|
216
248
|
## 🚀 Quick start (3-minute tour)
|
|
@@ -283,6 +315,17 @@ When the target already has a same-named item, you choose:
|
|
|
283
315
|
2. Lets you pick new paths
|
|
284
316
|
3. Supports **batch prefix mapping** (`C:\Users\alice\` → `/Users/bob/` in one shot)
|
|
285
317
|
|
|
318
|
+
### 🧳 Import from other AI agents (config + chat history)
|
|
319
|
+
|
|
320
|
+
You do not have to rebuild another agent's setup by hand.
|
|
321
|
+
|
|
322
|
+
- **30 sources recognized** — Claude Code, Hermes, Cursor, Codex, Antigravity, Gemini, OpenCode, Mimocode, ZCode, Grok Build, OpenClaw, Pi, Kimi, Kilocode, Qoder, ChatGPT, WorkBuddy, Qwen, Continue, Cline, Goose, Zed, Crush, TeleAgent, Trae, Vibe, Reasonix, Copilot, and DSH itself (importing from another DSH home — its v3 and v4 logs count as two ids). Sources **not** installed on this machine are still listed (greyed out, not selectable), so "this machine has no such tool" is never mistaken for "the feature is missing".
|
|
323
|
+
- **Translation, not a second import path** — the source is converted into a standard bundle v1 ZIP and handed to the **existing** import wizard: same preview, same per-item conflict decisions, same pre-import snapshot and rollback, same dry-run.
|
|
324
|
+
- **What travels** — MCP servers, skills, global instructions (as `AGENTS.md`), and **chat history together with the workspaces those conversations belong to** (29 sources; conversations are re-encoded into DSH's session-log format and placed by their recorded `cwd`).
|
|
325
|
+
- **What does not** — secret **values** are never read: only the key names are recorded so the plan can ask you to re-enter them. Structures DSH has no equivalent for (Claude Code hooks, slash commands, …) are reported as explicit codes rather than silently dropped.
|
|
326
|
+
- **Honest skips** — a conversation with no recorded `cwd` cannot be placed and is reported as skipped (never guessed into some other project); known lossy items are listed **before** the import runs.
|
|
327
|
+
- **Entry points** — Settings → "Backup & Migration" → Import → **"Import from another agent"**, the ⌘K command, or the CLI: `dcm import --from <source> [--dry-run] [--out <path>]`.
|
|
328
|
+
|
|
286
329
|
### 🔒 Secrets
|
|
287
330
|
|
|
288
331
|
| Scenario | Behavior |
|
|
@@ -301,7 +344,7 @@ Push / pull your portable config between machines through **either of two channe
|
|
|
301
344
|
| **Endpoint** | `repoUrl` | `webdav.url` |
|
|
302
345
|
| **Credentials** | auth token in DSH credentials (`DSH_CONFIG_MANAGER_SYNC_TOKEN`) | `username` stored in the config (echoed in the UI); **password never synced / never logged** — DSH credentials `DSH_CONFIG_MANAGER_SYNC_WEBDAV_PASSWORD` |
|
|
303
346
|
|
|
304
|
-
- **
|
|
347
|
+
- **Remote retention follows your backup schedule**: both channels keep the same policy as local backups — by default the newest **10** snapshots, plus optional "one per month / one per year" tiers — and the snapshot you just pushed is always kept; older ones are deleted automatically.
|
|
305
348
|
- **Switching channels starts fresh**: Git and WebDAV do **not** share snapshots or a common ancestor. When you switch transport, sync begins again from the new remote's empty baseline — push a fresh snapshot first.
|
|
306
349
|
- **WebDAV auth** uses HTTP Basic: the `username` is stored in the config and may be echoed back into the UI, while the `password` is read live from the DSH credentials slot `DSH_CONFIG_MANAGER_SYNC_WEBDAV_PASSWORD` — it never appears in any sync file or log.
|
|
307
350
|
- **Plugins auto-install**: when pulling diffs, plugins that are new in the backup are **installed automatically** on confirm — no manual per-item ticking in the diff list. Only **version-conflict** plugins still ask you to pick "Keep Current / Use Imported".
|
|
@@ -369,6 +412,19 @@ Every import creates a **safety snapshot** first. If something feels off afterwa
|
|
|
369
412
|
|
|
370
413
|
---
|
|
371
414
|
|
|
415
|
+
|
|
416
|
+
**Backup files & disk usage**: the **"Backup Files"** sub-tab (Backups → snapshot tab) manages everything in
|
|
417
|
+
`exports/` (manual exports + scheduled backups): download, import straight back, inspect, delete, search by
|
|
418
|
+
name or note. The **"Disk Usage"** card on the same page lists what this plugin itself occupies (exports,
|
|
419
|
+
pre-import snapshots, sync config and Git working copies, marketplace cache, temp staging, logs, transaction
|
|
420
|
+
log, …) and labels each item's cleanup policy: **regenerated on demand** (caches/staging), **retained**
|
|
421
|
+
(exports for 7 days, scheduled backups keep the latest N), or **your data / safety net** (snapshots and sync —
|
|
422
|
+
never auto-cleaned). **"Clean now"** clears only regenerable caches by default; reclaiming expired backups is
|
|
423
|
+
an explicit opt-in with a confirmation. Snapshots and sync data are never touched, and unreadable directories
|
|
424
|
+
are reported as "not measured" instead of a misleading 0 bytes.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
372
428
|
### 🚨 CLI — the first line of defense when DSH is broken
|
|
373
429
|
|
|
374
430
|
The GUI lives *inside* DSH — it can't help you if DSH won't start. The `dsh-config-manager` **CLI is completely independent of the DSH runtime** (pure Node + the core engine, **zero `@deepseek-ai/*` imports** — it runs even when the DSH peer packages are broken or missing). That makes it your **first rescue tool** when the config is corrupted, the GUI won't boot, or you changed machines and need to bring an environment back.
|
|
@@ -382,22 +438,40 @@ npm install -g dsh-config-manager@latest --omit=peer
|
|
|
382
438
|
|
|
383
439
|
> ⚠️ Installing/updating the plugin (`dsh plugin --profile web add ...`) only enables the GUI — it does **not** create the `dsh-config-manager` command. Run the install command above, then any of the commands below.
|
|
384
440
|
|
|
385
|
-
All commands (also shown by `dsh-config-manager help`):
|
|
441
|
+
All commands (also shown by `dsh-config-manager help`, which groups them by risk; `dsh-config-manager <command> --help` prints one command's options, exit codes and examples):
|
|
386
442
|
|
|
387
443
|
```text
|
|
388
|
-
|
|
444
|
+
# Rescue console (local web page — the least typing)
|
|
445
|
+
dsh-config-manager web [--port <n>] [--no-open] [--home <dir>]
|
|
446
|
+
[--data-root <dir>] [--idle-timeout <min>]
|
|
447
|
+
|
|
448
|
+
# Inspect (never touches your config)
|
|
389
449
|
dsh-config-manager snapshots [--data-dir <dir>] # list snapshots (newest first)
|
|
390
|
-
dsh-config-manager
|
|
391
|
-
[--
|
|
392
|
-
dsh-config-manager
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
dsh-config-manager backup [--sections <a,b,c>] [--out <path>] # offline file-level backup
|
|
450
|
+
dsh-config-manager verify [<file|path>] [--json] # read-only check of backup ZIPs
|
|
451
|
+
[--data-dir <dir>]
|
|
452
|
+
dsh-config-manager sessions list [--home <dir>] [--json] # list local sessions
|
|
453
|
+
dsh-config-manager sessions doctor [--home <dir>] [--json] # health check + advice
|
|
454
|
+
|
|
455
|
+
# Backup & migrate (only writes new files)
|
|
456
|
+
dsh-config-manager backup [--sections <a,b,c>] [--out <path>] # offline file-level backup
|
|
398
457
|
[--dry-run] [--data-dir <dir>]
|
|
399
|
-
dsh-config-manager
|
|
458
|
+
dsh-config-manager import --from <source> [--dry-run] # foreign agent config → bundle ZIP
|
|
459
|
+
[--out <path>] [--cwd <dir>] [--data-dir <dir>]
|
|
460
|
+
|
|
461
|
+
# Repair (writes to this machine — preview with --dry-run first)
|
|
462
|
+
dsh-config-manager restore [--id <id>] [--dry-run] # roll back to a pre-import snapshot
|
|
463
|
+
[--data-dir <dir>] [--data-root <dir>]
|
|
464
|
+
[--profile <name>] [--settings <path>]
|
|
465
|
+
dsh-config-manager sessions repair [--home <dir>] [--fix] # offline session layout repair
|
|
400
466
|
[--keep <dir>] [--map old=new]...
|
|
467
|
+
dsh-config-manager recover-stale-lock [--data-dir <dir>] # clear a leftover lock (see below)
|
|
468
|
+
|
|
469
|
+
# Dangerous (changes your DSH install / may wipe data)
|
|
470
|
+
dsh-config-manager reinstall [--version <v>] [--yes] [--list]
|
|
471
|
+
[--wipe-config] [--dry-run] [--data-root <dir>]
|
|
472
|
+
|
|
473
|
+
# Help
|
|
474
|
+
dsh-config-manager help [command] # overview / one command's detail
|
|
401
475
|
```
|
|
402
476
|
|
|
403
477
|
**`reinstall` — rescue when DSH is broken.** It reinstalls the `@deepseek-ai/dsh` launcher across platforms (uses the right command per OS: PowerShell on Windows, bash on Unix). By default it reinstalls the launcher + clears global caches; interactively it asks which **dangerous** clean-up items to include (settings / plugins / session data & credentials) — those are **not** selected by default, and any destructive choice requires a second confirmation by typing `YES` before anything runs. Before wiping any `~/.dsh` data it makes an emergency backup at `.reinstall-backup` (the `snapshots/` folder is deliberately never touched).
|
|
@@ -452,6 +526,8 @@ dsh-config-manager verify C:/backups/dsh-config.zip # ...or by path
|
|
|
452
526
|
|
|
453
527
|
**Credential files never enter a backup.** `.credentials.*`, `.env`, `*.pem` and friends are excluded by an explicit blacklist, only whitelisted directories are walked (never the whole home directory), and symlinks are skipped rather than followed.
|
|
454
528
|
|
|
529
|
+
**Offline backup only covers on-disk skills.** Skills that live in the plugin registry (the ones the shell loads from a profile's plugin packages — see issue #71) need the DSH runtime to enumerate, so only the GUI export (or a scheduled backup while DSH is healthy) can include them; the CLI `backup` collects just the files under `$DSH_HOME/skills`. For a complete skills backup, use the GUI export while DSH is healthy.
|
|
530
|
+
|
|
455
531
|
Structured sections (settings / UI / providers / plugins / MCP / prompts / workspaces) are **not** silently faked: they need the DSH service layer to read and redact, so they are left out and marked `false` in the manifest — the plan printout lists them under “not offline-collectable” so you know exactly what this backup does and does not contain. Use the GUI export when DSH is healthy for a full backup.
|
|
456
532
|
|
|
457
533
|
```bash
|
|
@@ -463,7 +539,7 @@ dsh-config-manager backup --sections skills,self # narrow the scope
|
|
|
463
539
|
|
|
464
540
|
`--sections` accepts `skills,agentPresets,agentInstructions,self,pluginFiles`. `pluginFiles` is **opt-in** (as in the GUI): it copies third-party plugin files verbatim, and `dsh-ssh.json` holds plaintext host passwords — select it only when you have looked at what is in there.
|
|
465
541
|
|
|
466
|
-
**A typical rescue flow** when DSH won't start: ① `dsh-config-manager reinstall` to bring the launcher back (plus any clean-up), ② if DSH reports a session-log error (`corrupt session log` / `duplicate JSONL session id`), run `dsh-config-manager sessions repair --fix`
|
|
542
|
+
**A typical rescue flow** when DSH won't start: ① `dsh-config-manager reinstall` to bring the launcher back (plus any clean-up), ② if DSH reports a session-log error (`corrupt session log` / `duplicate JSONL session id`), run `dsh-config-manager sessions repair --fix` — it repairs the log layout offline, ③ `dsh web` to start DSH again, ④ re-add the plugin from the registry, and ⑤ pull a snapshot from the remote repo (or run `dsh-config-manager restore`) to bring your config back. The CLI works at every step regardless of DSH's health.
|
|
467
543
|
|
|
468
544
|
**`recover-stale-lock` — when every operation suddenly fails.** Before touching your config, the plugin claims a small environment lock (it records who is operating plus a heartbeat) so that two operations can never write your config at the same time. If a `dsh web` process is **force-killed** (Task Manager, `kill -9`), the lock file survives with a dead owner: the next operation is refused, and it stays refused **no matter how often you retry or restart DSH** — because the plugin deliberately never removes a lock on its own (a wrong guess could evict a live operation).
|
|
469
545
|
|
|
@@ -530,6 +606,17 @@ How it behaves:
|
|
|
530
606
|
|
|
531
607
|
Alternative (host-wide): set `NODE_USE_ENV_PROXY=1` **before starting DSH** (Node 24+); note this also routes the host's own outbound traffic, not just this plugin's.
|
|
532
608
|
|
|
609
|
+
**`web` — the offline rescue console (for when you would rather click than type).** It starts a small web page bound to **127.0.0.1 only** and lays out the same diagnostics and rescue actions in a browser:
|
|
610
|
+
|
|
611
|
+
```bash
|
|
612
|
+
dsh-config-manager web # starts it and opens your browser (the terminal prints a one-time token URL)
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
- **Read-only:** running instances / SAFE MODE / leftover lock / snapshots / exported backups (with one-click verification) / disk usage / session health / profiles and their instances.
|
|
616
|
+
- **Write actions (each needs an explicit confirmation in the page, and every one calls the same implementation as the CLI):** ① relocate misplaced sessions ② clear rebuildable caches and expired exports ③ reclaim a stale environment lock ④ start/stop a profile's standalone instance ⑤ **unlock an encrypted backup** (decrypted in memory, lists entries only — never written to disk) ⑥ **restore a snapshot** (see the per-item plan first, zero writes; restoring copies current files to `<snapshot>/pre-restore/` first) ⑦ **offline export** (file-based sections, self-checked right after writing) ⑧ **reinstall DSH** (uninstall + reinstall the global CLI; **requires a 6-character code printed only in the terminal**).
|
|
617
|
+
- **Safety:** loopback-only binding; a one-time token printed to your terminal is exchanged for an HttpOnly + SameSite=Strict session cookie; the page has no scripts and no external resources. `Ctrl+C` or the idle timeout (30 minutes by default) shuts it down.
|
|
618
|
+
- **Preconditions:** session relocation and restore need DSH stopped; with an unresolved SAFE MODE transaction or a leftover environment lock every write action is refused (the page says why). **Import** (writing a bundle back into this machine) stays on the GUI/CLI — structural sections need live DSH services.
|
|
619
|
+
|
|
533
620
|
### 🤖 Agent tools (for AI assistants)
|
|
534
621
|
|
|
535
622
|
The plugin also registers **5 model tools** that an AI agent (a DSH assistant session) can call directly — the same backup / snapshot / sync engines, no GUI needed:
|
|
@@ -582,7 +669,7 @@ Yes. Dead absolute paths are detected and remapped (batch replacement supported)
|
|
|
582
669
|
No. A checksum mismatch rejects the import outright (protects against corruption or tampering).
|
|
583
670
|
|
|
584
671
|
**Q: Will re-importing duplicate things?**
|
|
585
|
-
No. Items are
|
|
672
|
+
No. Items are matched by stable IDs (plugin ID / MCP name / skill name…): identical ones are skipped, and ones that differ from the target surface as **conflicts you decide** (Keep Current / Use Imported) — nothing is overwritten silently.
|
|
586
673
|
|
|
587
674
|
**Q: Why is the console quiet after `dsh web` — how do I get the plugin logs back?**
|
|
588
675
|
By design. Routine progress logs (mount banner, scheduler skips, export/backup completion) are emitted at `info`, and the shipped default level is `warn` — so only warnings and errors reach the terminal. Set `DSH_CONFIG_MANAGER_LOG_LEVEL=info` (or `debug`) before starting DSH to bring the verbose lines back.
|
|
@@ -597,9 +684,11 @@ Yes. The import wizard asks for the export-time encryption password and verifies
|
|
|
597
684
|
1. **Installing / updating plugins or MCP takes effect after restarting DSH**
|
|
598
685
|
2. **Some UI state is not migrated** (e.g. task board data, panel widths — they live in the browser, not in DSH's config files)
|
|
599
686
|
3. **keybindings / workflow configs / commands** — DSH has no such concepts, so nothing is exported for them. Global agent rules are covered by **Agent Instructions** (`~/.dsh/AGENTS.md`, injected into every session); per-project `AGENTS.md`/`CLAUDE.md` belong to each project's repo and are not migrated
|
|
600
|
-
4. **History/session migration is
|
|
687
|
+
4. **History/session migration is opt-in** — DSH's own sessions are only exported/synced when you explicitly select the `sessions` section (the sync channel additionally needs both sides to allow it); **another agent's chat history is migrated when you pick that source** in the foreign import. Conversation state that DSH's session format has no room for (model reasoning traces, images, compaction checkpoints) is counted and reported, never fabricated
|
|
601
688
|
5. **Encrypted backups**: a lost password means the `secrets.enc` can't be decrypted (by design — keep your password safe)
|
|
602
689
|
6. **Snapshot restore is offline and honest**: entries the offline engine can't restore (settings namespaces / patch lines when the snapshot has no whole-file backup, workspace records stored in DSH storages) are reported as skipped with a pointer to online rollback; credential **values** are never auto-written (manual re-entry hint only); old snapshots without a plugin baseline only get a hint to remove added plugins manually
|
|
690
|
+
7. **Foreign-agent import has two known blanks**: **Copilot has no chat-history import** (its session format could not be verified on this machine, so only its configuration is imported), and Cursor's per-project history is located through Cursor's own folder-slug scheme, which may not resolve for every project. Conversations already imported with an older build should be deleted and re-imported first (a second import of the same id is reported as a **skipped** `session-id-conflict`, not merged)
|
|
691
|
+
8. **Local source plugins (`link:` / `file:`) are packed into the backup**: the export runs `npm pack` on plugins you are developing locally and stores the tarball in the backup; the import unpacks it under `$DSH_HOME/dsh-config-manager/local-plugins/` and installs it as `file:`. Three consequences: ① backup size grows with those plugins (a single plugin over 100 MB is skipped with a warning — publish it to a registry / git first); ② plugin **source code** enters the backup (this does not conflict with "no secrets in backups" — secrets stay excluded, what travels is code); ③ packing needs a working `npm` on this machine; without it the plugin falls back to the previous behaviour (the original spec is kept, and a new machine still needs a manual install)
|
|
603
692
|
|
|
604
693
|
## 💬 Feedback
|
|
605
694
|
|
|
@@ -629,6 +718,11 @@ Found a bug, a misaligned panel, a button that does nothing — or just have an
|
|
|
629
718
|
contribution, commit `1248200` was landed on `main` through a **"keep the commit, take the mainline tree"** merge
|
|
630
719
|
(`122317b`) — that merge takes **none** of its code (the resulting tree is byte-identical to the mainline) and exists purely
|
|
631
720
|
to record authorship, so GitHub now counts this contribution instead of leaving it invisible behind a closed PR.
|
|
721
|
+
- **OMSociety** — [PR #66](https://github.com/xiajiajun516/dsh-config-manager/pull/66), merged as `4170af4`: proposed and
|
|
722
|
+
implemented the 36×36 frame-less `icon.svg` (issue #61, aligning the plugin with the official bundle convention).
|
|
723
|
+
The report came with upstream evidence (host artwork frames of 48/36 px and 40/30 px, the official published bundle
|
|
724
|
+
icons, the fixture SVG) and the PR shipped a 16/30/36/48 × dark/light acceptance sheet plus a written argument for
|
|
725
|
+
keeping the proposal's palette over the plugin's brand blue.
|
|
632
726
|
- **Bug reports**: `zhyx1996` (#38 sync "Export secrets" did nothing), `IPF-Sinon` (#39 the `.credentials.yaml` `refs:` block
|
|
633
727
|
was not recognized — they also implemented and machine-tested a fix in their own fork), `zerginlaw` (#43 "Back up now"
|
|
634
728
|
silently no-oped while toasting success). Each report drove one fix.
|
package/README.zh-CN.md
CHANGED
|
@@ -21,7 +21,7 @@ DSH Config Manager 是一个 DeepSeek Harness 配置备份与迁移插件:一
|
|
|
21
21
|
> DSH 的 profile(`$DSH_HOME/profiles/<name>`)本身**不随备份迁移**(它是「用哪套插件组合启动」的机器本地选择);
|
|
22
22
|
> 本插件的「档案」页可以列表 / 新建 / 重命名 / 删除它们,也可以**用某个档案另起一个独立实例并随时停止它**(真正可用的切换)。
|
|
23
23
|
|
|
24
|
-
把当前 DeepSeek Harness 环境导出为可移植备份,在另一台电脑上一键恢复;也支持通过 Git / WebDAV
|
|
24
|
+
把当前 DeepSeek Harness 环境导出为可移植备份,在另一台电脑上一键恢复;也支持通过 Git / WebDAV 跨机同步(密钥默认不同步,勾选「导出密钥」并加密后可随加密快照迁移);还能通过内置**配置市场**浏览、一键安装社区分享的现成配置;并且能**从其它 AI Agent 导入**配置与历史会话(Claude Code / Cursor / Codex / Hermes / Antigravity 等 30 个来源)。
|
|
25
25
|
|
|
26
26
|
[English](README.md) · [简体中文](README.zh-CN.md)
|
|
27
27
|
|
|
@@ -48,7 +48,7 @@ DSH 是你的 AI 助手工作台,里面存着你的各种设置:模型配置
|
|
|
48
48
|
|
|
49
49
|
### 备份 DeepSeek Harness 配置
|
|
50
50
|
|
|
51
|
-
把你的 DSH 设置、模型供应商、插件、MCP 服务器、技能、Agent
|
|
51
|
+
把你的 DSH 设置、模型供应商、插件、MCP 服务器、技能、Agent 预设与工作区打包成一个便携 ZIP 备份——默认不含任何密钥值(DSH 档案不随备份迁移,见上方说明)。
|
|
52
52
|
|
|
53
53
|
### 在另一台电脑上恢复 DeepSeek Harness
|
|
54
54
|
|
|
@@ -70,6 +70,10 @@ DSH 是你的 AI 助手工作台,里面存着你的各种设置:模型配置
|
|
|
70
70
|
|
|
71
71
|
在内置官方市场浏览现成配置(模型 / Provider、插件、MCP、技能、Agent 预设……),先 dry-run 预览再一键安装——供应链警示恒展示,确认导入前每个分区都须显式批准。
|
|
72
72
|
|
|
73
|
+
### 从其它 AI Agent 导入(Claude Code / Cursor / Codex…)
|
|
74
|
+
|
|
75
|
+
你在这台机器上已经用过别的 AI 编程 Agent,配置和历史对话都在?选一个来源,本插件会把它**翻译成标准 bundle**(MCP、技能、全局指令、历史会话及其所属工作区),再交给同一条「先审后写」的导入流程:预览 → 逐项冲突决策 → 自动快照 → 应用 → 可回滚。共识别 **30 个来源**,其中 **29 个**可一并迁移**历史会话**。密钥**值**绝不读取,只记下名字供导入计划提示补录。
|
|
76
|
+
|
|
73
77
|
---
|
|
74
78
|
|
|
75
79
|
## 🆚 与其它备份 / 同步插件的区别
|
|
@@ -79,7 +83,7 @@ DSH 生态里这个方向有几个插件,它们解决的问题并不相同—
|
|
|
79
83
|
| 插件 | 最擅长 | 本插件更进一步的地方 |
|
|
80
84
|
|---|---|---|
|
|
81
85
|
| [xiaoyuyu6420/dsh-backup](https://github.com/xiaoyuyu6420/dsh-backup) | 一条命令从 CLI 给整个 `~/.dsh` 打快照,另有会话体检 / 升级快照 / 救援控制台 | 写盘前可审阅的 GUI 流程(dry-run 预览、冲突逐项决策、失败自动回滚)、跨机路径重映射、加密凭据载荷、配置市场 |
|
|
82
|
-
| [muyifc/dsh-config-sync](https://github.com/muyifc/dsh-config-sync) | 把 DSH 配置导出/导入成可移植的密码加密文件,可被工具调用 | 13–14
|
|
86
|
+
| [muyifc/dsh-config-sync](https://github.com/muyifc/dsh-config-sync) | 把 DSH 配置导出/导入成可移植的密码加密文件,可被工具调用 | 13–14 个分区(插件 / MCP / 技能 / 工作区 / 会话日志 …)、定时备份、Git + WebDAV 双通道同步、会话跨机迁移与路径重定基 |
|
|
83
87
|
| [dickpy/dsh-cloud-sync](https://github.com/dickpy/dsh-cloud-sync) · [weibaohui/dsh-sync](https://github.com/weibaohui/dsh-sync) | 通过 WebDAV / S3 或私有 Git 镜像让多台机器保持一致 | 同步只是本插件五项能力之一——另有导出/导入、定时备份、配置市场与档案实例启停 |
|
|
84
88
|
| `cp -r ~/.dsh`(或给 home 目录挂 Git) | 免费、零配置,纯文本配置够用 | 不处理密钥、不做路径重映射、抓不到 `link:` / `file:` 安装的本地插件、不动会话日志、没有冲突处理与回滚 |
|
|
85
89
|
|
|
@@ -105,7 +109,12 @@ DSH 生态里这个方向有几个插件,它们解决的问题并不相同—
|
|
|
105
109
|
| 🗂️ | **档案 Profiles(DSH profile)** | 直接管理 `$DSH_HOME/profiles/<name>`:列表 / 新建(官方模板)/ 重命名 / 物理删除 / **启动该档案(独立实例)** / **停止实例**(行内按钮按运行状态在「启动 ↔ 停止」间切换) |
|
|
106
110
|
| 🧩 | **本地插件随备份迁移** | `link:` / `file:` 安装的本地开发插件会被打包进备份,换机不再丢失 |
|
|
107
111
|
| 🗄️ | **保留策略可配(GFS 分层)** | 「最近 N 份 + 每月留 1 份 + 每年留 1 份」,默认值等价旧行为 |
|
|
112
|
+
| 🌐 | **双语界面** | 界面、报告与错误详情跟随 DSH 应用语言(中文 / English) |
|
|
108
113
|
| 🤖 | **Agent 工具** | Agent 会话内直接备份 / 快照 / 恢复 / 同步 |
|
|
114
|
+
| 💾 | **磁盘占用体检** | 备份页逐项列出本插件自身占了多少盘(备份 / 快照 / 同步副本 / 缓存 / 暂存),三档回收策略一目了然;**一键清理只碰可重建缓存与过期备份**,快照与同步数据永不在此删除 |
|
|
115
|
+
| ⬆️ | **版本更新检查** | 「关于」页只读探测 npm 上的最新版本(缓存 10 分钟);有新版本时既给可复制的升级命令,也提供一键**立即更新**(按该精确版本安装)——之后需重启 DSH 才生效,插件绝不代你重启;离线失败如实显示,不影响其它功能 |
|
|
116
|
+
| 🧭 | **兼容性讲清楚** | 导入前显示「来源 DSH 版本 / 平台 → 本机」,并用**结构化原因**解释评分(跨平台 / 分区缺失 / 版本超前…),而不是只丢一句「部分兼容」 |
|
|
117
|
+
| 🧳 | **从其它 AI Agent 导入** | 读取本机 Claude Code / Cursor / Codex / Hermes / Antigravity 等的配置**与历史会话**,翻译成标准 bundle,再走既有的预览 / 冲突 / 回滚流程导入 |
|
|
109
118
|
|
|
110
119
|
---
|
|
111
120
|
|
|
@@ -188,6 +197,27 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
188
197
|
> ```
|
|
189
198
|
>
|
|
190
199
|
> 重启 DSH 后,可在 **设置 → 备份与迁移 → 关于** 看到实际运行的版本(版本变化时也会自动弹出更新内容)。
|
|
200
|
+
|
|
201
|
+
### 从 GitHub 源码安装(`git+https://...`)
|
|
202
|
+
|
|
203
|
+
用 git 源安装时,pnpm 会先在该 clone 里跑本包的 `prepare` 脚本(= `npm run build`)把 `lib/` 构建出来 —— **产物在 npm 上已预构建,从 git 安装则是现构建**。pnpm 11 默认**拦截**这个脚本,直接报 `dsh: plugin command failed`,日志里是:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED Failed to prepare git-hosted package ...
|
|
207
|
+
The git-hosted package "dsh-config-manager@x.y.z" needs to execute build scripts
|
|
208
|
+
but is not in the "allowBuilds" allowlist.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**解决**:把它提示的那一行(**含完整 git URL 与 commit sha**,逐字复制)加进 profile 的 `pnpm-workspace.yaml`:
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
# ~/.dsh/profiles/web/pnpm-workspace.yaml
|
|
215
|
+
allowBuilds:
|
|
216
|
+
dsh-config-manager@git+https://github.com/xiajiajun516/dsh-config-manager.git#<pnpm 打印的 sha>: true
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
> 键必须**逐字**照抄 pnpm 打印的那一行 —— 只写包名 `dsh-config-manager` 不生效(该白名单按「来源 + 版本」匹配)。
|
|
220
|
+
> 更省事的路径是直接装 npm 预构建版(上面的 `dsh-config-manager@latest`),无需任何白名单。
|
|
191
221
|
>
|
|
192
222
|
> - 或一行命令彻底关闭年龄门槛(在 profile 的 `pnpm-workspace.yaml` 顶部加 `minimumReleaseAge: 0`):
|
|
193
223
|
> ```powershell
|
|
@@ -281,6 +311,17 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
281
311
|
2. 让你选择新路径
|
|
282
312
|
3. 支持**批量前缀映射**(如 `C:\Users\alice\` → `/Users/bob/` 一键替换所有相关路径)
|
|
283
313
|
|
|
314
|
+
### 🧳 从其它 AI Agent 导入(配置 + 历史会话)
|
|
315
|
+
|
|
316
|
+
不必手工重建另一个 Agent 里已经调好的那套配置。
|
|
317
|
+
|
|
318
|
+
- **识别 30 个来源** —— Claude Code、Hermes、Cursor、Codex、Antigravity、Gemini、OpenCode、Mimocode、ZCode、Grok Build、OpenClaw、Pi、Kimi、Kilocode、Qoder、ChatGPT、WorkBuddy、Qwen、Continue、Cline、Goose、Zed、Crush、TeleAgent、Trae、Vibe、Reasonix、Copilot,以及 DSH 自己(从另一个 DSH home 导入,其 v3 / v4 日志算两个 id)。本机**没装**的来源照样列出来(置灰不可选)——「这台机器没有这个工具」不会被误解成「功能没做」。
|
|
319
|
+
- **是翻译,不是第二套导入通道** —— 来源被转成标准 bundle v1 ZIP,交给**既有**导入向导:同一份预览、同一套逐项冲突决策、同一次导入前快照与回滚、同样的 dry-run。
|
|
320
|
+
- **会带走什么** —— MCP Servers、技能、全局指令(落成 `AGENTS.md`),以及**历史会话连同这些对话所属的工作区**(29 个来源;会话会重新编码成 DSH 的会话日志格式,并按它记录的 `cwd` 归位)。
|
|
321
|
+
- **不会带走什么** —— 密钥**值**一律不读:只记录键名,由导入计划提示补录。DSH 没有对等结构的东西(Claude Code 的 hooks、斜杠命令等)会**报出明确的码**,不会静默丢掉。
|
|
322
|
+
- **如实跳过** —— 没记录 `cwd` 的对话无处归位,会列为跳过(绝不猜进别的项目);已知的有损项在导入**之前**就摆明。
|
|
323
|
+
- **入口** —— 设置 →「备份与迁移」→ 导入 → **「从其它 agent 导入」**、⌘K 命令,或 CLI:`dcm import --from <来源> [--dry-run] [--out <路径>]`。
|
|
324
|
+
|
|
284
325
|
### 🔒 密钥处理
|
|
285
326
|
|
|
286
327
|
| 场景 | 行为 |
|
|
@@ -299,7 +340,7 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
299
340
|
| **端点** | `repoUrl` | `webdav.url` |
|
|
300
341
|
| **凭据** | 认证 token 存入 DSH credentials(`DSH_CONFIG_MANAGER_SYNC_TOKEN`) | `username` 存配置、可在界面回显;**密码永不同步、永不记日志**——存入 DSH credentials `DSH_CONFIG_MANAGER_SYNC_WEBDAV_PASSWORD` |
|
|
301
342
|
|
|
302
|
-
-
|
|
343
|
+
- **远端保留跟本地同一套策略**:两通道都按你的备份计划保留——默认最新 **10** 个快照,可另设「每月 1 份 / 每年 1 份」分层;刚推上去的那份恒保留,更旧的自动删除。
|
|
303
344
|
- **切换通道重新开始**:Git 与 WebDAV 的快照 / 共同祖先**互不共享**。切换通道后,同步从新远端的空基线重新开始——请先推送一个新快照。
|
|
304
345
|
- **WebDAV 认证**采用 HTTP Basic:`username` 存配置、可在界面回显;`password` 则实时从 DSH credentials 槽位 `DSH_CONFIG_MANAGER_SYNC_WEBDAV_PASSWORD` 读取——绝不出现于任何同步文件或日志。
|
|
305
346
|
- **插件自动安装**:拉取差异时,备份里新增的插件会在确认导入时**自动安装**,无需在差异列表里逐项手动勾选;只有**版本冲突**的插件仍需要你决定「保留当前 / 采用备份」。
|
|
@@ -351,6 +392,14 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
351
392
|
|
|
352
393
|
**GUI**:设置 → 「备份与迁移」→「快照恢复」tab → 选择快照 → 预览恢复计划(dry-run,零写入)→ 确认执行。
|
|
353
394
|
|
|
395
|
+
**备份文件与磁盘占用**:「备份与迁移」→「快照恢复」tab 下的**「备份文件」**子页统一管理 `exports/` 里的导出产物
|
|
396
|
+
(手动导出 + 定时备份)——可下载、直接导入恢复、查看内容、删除,并按文件名/备注搜索。
|
|
397
|
+
同页的**「磁盘占用」卡**会逐项列出本插件自己占用的空间(导出备份 / 导入前快照 / 同步配置与 Git 工作副本 /
|
|
398
|
+
市场缓存 / 临时暂存 / 日志 / 事务日志 …),标注每项的回收策略:**可随时重建**(缓存与暂存)、
|
|
399
|
+
**有保留期**(导出产物 7 天、定时备份保留最近 N 个)、**用户数据 / 安全网**(快照与同步,永不自动清理)。
|
|
400
|
+
需要腾空间时点**「立即清理」**:默认只清可重建的缓存与暂存;要回收过期备份文件需显式勾选(并二次确认)。
|
|
401
|
+
**快照与同步数据永远不会被这个按钮删掉**;目录读不到时如实显示「未统计」,不会伪报 0 字节。
|
|
402
|
+
|
|
354
403
|
---
|
|
355
404
|
|
|
356
405
|
### 🚨 CLI —— DSH 挂了时的第一救急手段
|
|
@@ -433,6 +482,8 @@ dsh-config-manager verify C:/backups/dsh-config.zip # 或按路径
|
|
|
433
482
|
|
|
434
483
|
**凭据文件永不进入备份。** `.credentials.*`、`.env`、`*.pem` 等由显式黑名单排除;只遍历白名单目录(绝不对整个主目录递归);symlink 一律跳过而非跟随。
|
|
435
484
|
|
|
485
|
+
**离线备份只覆盖磁盘上的技能。** 插件注册表里的技能(外壳从 profile 的插件包里加载的那些,见 issue #71)需要 DSH 运行时才能列举,因此**只有 GUI 导出(或 DSH 健康时的定时备份)能带上它们**;CLI `backup` 只收 `$DSH_HOME/skills` 目录下的文件——想要完整的技能备份,请在 DSH 健康时用 GUI 导出。
|
|
486
|
+
|
|
436
487
|
结构化分区(设置 / UI / providers / 插件 / MCP / prompts / workspaces)**不会**被偷偷伪造:它们需要 DSH 服务层读值并脱敏,因此一律不写入、在 manifest 里标记为 `false`——计划输出会把它们列在「离线不可收集」下,让你清楚这份备份到底有什么、没有什么。DSH 健康时想要完整备份,请用 GUI 导出。
|
|
437
488
|
|
|
438
489
|
```bash
|
|
@@ -445,7 +496,22 @@ dsh-config-manager backup --sections skills,self # 收窄范围
|
|
|
445
496
|
`--sections` 可选值为 `skills,agentPresets,agentInstructions,self,pluginFiles`。其中 `pluginFiles` 与 GUI 侧一致属**默认关闭**:它原样复制第三方插件自有文件,而 `dsh-ssh.json` 里是明文主机密码——确认过内容之后再选它。
|
|
446
497
|
|
|
447
498
|
|
|
448
|
-
**典型救急流程**(DSH 起不来时):① `dsh-config-manager reinstall` 先把启动器重装回来(必要时顺带清理),② `dsh web` 重新启动 DSH
|
|
499
|
+
**典型救急流程**(DSH 起不来时):① `dsh-config-manager reinstall` 先把启动器重装回来(必要时顺带清理),② 若 DSH 报会话日志错误(`corrupt session log` / `duplicate JSONL session id`),先跑 `dsh-config-manager sessions repair --fix` 把日志目录离线归位,③ `dsh web` 重新启动 DSH,④ 从仓库装回插件,⑤ 从远程仓库拉取快照(或执行 `dsh-config-manager restore`)把配置恢复回来。整个流程中 CLI 全程可用,与 DSH 是否健康无关。
|
|
500
|
+
|
|
501
|
+
**`web` —— 离线救急台(不想在终端里敲命令时用这个)。** 它在本机起一个**只绑 127.0.0.1** 的小网页,
|
|
502
|
+
把上面的诊断信息与救急动作都摊在浏览器里:
|
|
503
|
+
|
|
504
|
+
```bash
|
|
505
|
+
dsh-config-manager web # 启动并自动打开浏览器(终端里会打印带一次性 token 的链接)
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
- **只读部分**:实例心跳 / SAFE MODE / 残留锁 / 快照 / 导出产物(可一键自检)/ 磁盘占用 / 会话体检 / 档案与实例状态。
|
|
509
|
+
- **写动作(都要在网页里显式确认)**:会话布局归位、清理可重建缓存与过期导出产物、回收残留环境锁、
|
|
510
|
+
启动/停止某个档案的独立实例。它们调用的是与命令行**同一套实现**,结果页逐条如实回执。
|
|
511
|
+
- **安全**:只绑回环地址;启动时生成一次性 token(只打印在终端),换成一个 HttpOnly + SameSite=Strict 的
|
|
512
|
+
会话 cookie,用过即废;页面零脚本、零外链。`Ctrl+C` 或空闲超时(缺省 30 分钟)即退出。
|
|
513
|
+
- **门槛**:会话归位需要 DSH 已停止;有 SAFE MODE 未结案时写动作一律被拒(页面会写明原因)。
|
|
514
|
+
恢复快照(`restore`)与重装(`reinstall`)**不在网页里** —— 它们需要更强的确认,留在命令行/GUI。
|
|
449
515
|
|
|
450
516
|
### 🤖 Agent 可调用的模型工具
|
|
451
517
|
|
|
@@ -499,7 +565,7 @@ dsh-config-manager backup --sections skills,self # 收窄范围
|
|
|
499
565
|
不能。校验和检查不通过会直接拒绝导入(防止损坏或篡改)。
|
|
500
566
|
|
|
501
567
|
**Q:重复导入会重复吗?**
|
|
502
|
-
不会。按插件 ID / MCP 名称 /
|
|
568
|
+
不会。按插件 ID / MCP 名称 / 技能名等稳定标识配对:完全一致的跳过,与目标机有差异的会列为**冲突由你决定**(保留本机 / 用导入的),不会静默覆盖。
|
|
503
569
|
|
|
504
570
|
**Q:加密备份导入时需要密码吗?**
|
|
505
571
|
需要。导入向导会要求输入导出时设置的加密密码并验证通过后才能继续执行;密码仅存于内存、绝不保存。密码错误或缺失都会阻止导入(密码正确时凭据直接从备份解密恢复,无需重新填写)。
|
|
@@ -514,10 +580,11 @@ dsh-config-manager backup --sections skills,self # 收窄范围
|
|
|
514
580
|
1. **安装/更新插件或 MCP 后需重启 DSH 才生效**
|
|
515
581
|
2. **部分界面状态不迁移**(如任务看板数据、面板宽度——它们存在浏览器里,不在 DSH 配置文件内)
|
|
516
582
|
3. **keybindings / workflows 配置 / commands**:DSH 当前没有这些概念,因此不会导出相关内容。全局 agent 规则已由**全局指令(Agent Instructions)**承接(`~/.dsh/AGENTS.md`,注入每个会话);项目级 `AGENTS.md` / `CLAUDE.md` 属于各项目仓库本身,不在个人配置迁移范围内
|
|
517
|
-
4.
|
|
583
|
+
4. **历史会话是显式可选项** —— DSH 自己的会话只有在导出 / 同步时**显式勾选 `sessions` 分区**才会带走(同步通道还要求两侧都放行);**其它 Agent 的历史会话在你选中那个来源时迁移**。DSH 会话格式里没有位置的对话状态(模型思考过程、图片、压缩检查点)一律**如实计数并报告**,绝不伪造
|
|
518
584
|
5. **加密备份**:密码丢失则无法解密(设计使然——请牢记密码)
|
|
519
585
|
6. **快照恢复是离线的、诚实的**:离线引擎无法恢复的条目(快照无整文件备份时的 settings namespace / patch 行、存在 DSH storages 里的 workspace 记录)会如实列为跳过并指向在线回滚;凭据**值**绝不自动改写(只提示人工补录);无插件基线的旧快照只提示人工核对新增插件
|
|
520
|
-
7.
|
|
586
|
+
7. **从其它 Agent 导入有两处已知空白**:**Copilot 不支持导入历史会话**(其会话格式在本机无法取证,只导入它的配置);Cursor 的项目历史要靠它自己的目录 slug 反解,个别项目可能对不上。用**旧版本**导入过的会话请先删掉再重导(同一 id 二次导入会如实报**跳过** `session-id-conflict`,不会合并)
|
|
587
|
+
8. **本地源插件(`link:` / `file:`)随备份打包**:导出时执行 `npm pack` 把本地开发中的插件打成 tarball 一并备份,导入时解包到 `$DSH_HOME/dsh-config-manager/local-plugins/` 后按 `file:` 安装。因此:① 备份体积会随本地插件的体积增大(单插件超过 100 MB 会被跳过并告警,建议先发布到 registry / git 再备份);② 插件**源码**会进入备份(与「密钥永不进备份」不冲突——密钥仍被排除,这里进的是代码);③ 打包需要本机有可用的 `npm`,无 npm 时该插件退化为原行为(保留原 spec,换机后仍需手工安装)
|
|
521
588
|
|
|
522
589
|
## 💬 反馈与建议
|
|
523
590
|
|
|
@@ -545,6 +612,10 @@ dsh-config-manager backup --sections skills,self # 收窄范围
|
|
|
545
612
|
摆到用户面前。此外,为了让 GitHub 的 Contributors 列表如实计入这次贡献,其提交 `1248200` 已通过一次
|
|
546
613
|
**「保留其提交、树取主线」**的合并(`122317b`)成为 `main` 的祖先 —— 该合并**不取其代码**(合并后的树与主线
|
|
547
614
|
逐字节一致),只用于记录署名;因此按 GitHub 的口径这次贡献已被计入(而非 closed 后无痕)。
|
|
615
|
+
- **OMSociety** —— [PR #66](https://github.com/xiajiajun516/dsh-config-manager/pull/66)(合并提交 `4170af4`):提出并实现了
|
|
616
|
+
36×36 无底框的 `icon.svg`(issue #61,对齐官方插件图标约定)。反馈自带上游取证(宿主图位 48/36 与 40/30、
|
|
617
|
+
官方随包发布的图标形态与官方 fixture),PR 里附 16/30/36/48 × 深浅双主题实况图,并对「不换成品牌蓝」写了
|
|
618
|
+
可复核的理由(后片若同色,深色模式下两层会融成一块、16px 读不出前后关系)。
|
|
548
619
|
- **问题报告**:`zhyx1996`(#38 同步「导出密钥」未生效)、`IPF-Sinon`(#39 凭据 `refs:` 块未被识别,并在自己的 fork
|
|
549
620
|
上完成实现与真机验证)、`zerginlaw`(#43「立即备份」空转却提示成功)—— 这三条报告各自驱动了一个修复。
|
|
550
621
|
|
package/icon.svg
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none" role="img" aria-label="DSH Config Manager">
|
|
2
2
|
<defs>
|
|
3
|
-
<linearGradient id="
|
|
4
|
-
<stop
|
|
5
|
-
<stop offset="1" stop-color="#
|
|
3
|
+
<linearGradient id="cm-snapshot-back" x1="4" y1="4" x2="26.1" y2="26.1" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#45E7A4"/>
|
|
5
|
+
<stop offset="1" stop-color="#145AF3"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="cm-snapshot-front" x1="9.9" y1="9.9" x2="32" y2="32" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop stop-color="#67C7FE"/>
|
|
9
|
+
<stop offset="1" stop-color="#324DE2"/>
|
|
6
10
|
</linearGradient>
|
|
7
11
|
</defs>
|
|
8
|
-
<rect width="
|
|
9
|
-
<
|
|
10
|
-
<path
|
|
12
|
+
<rect x="4" y="4" width="22.1" height="22.1" rx="5.2" fill="url(#cm-snapshot-back)" fill-opacity="0.9"/>
|
|
13
|
+
<rect x="9.9" y="9.9" width="22.1" height="22.1" rx="5.2" fill="url(#cm-snapshot-front)"/>
|
|
14
|
+
<path d="M20.95 15.8V26.1" stroke="#FFFFFF" stroke-width="2.9" stroke-linecap="round"/>
|
|
15
|
+
<path d="M17.27 22.4L20.95 26.1L24.63 22.4" stroke="#FFFFFF" stroke-width="2.9" stroke-linecap="round" stroke-linejoin="round"/>
|
|
11
16
|
</svg>
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agentInstructions 分区 adapter(设计 §3.3 / dsh-agent-instructions 插件):
|
|
3
|
+
* 数据源 = ~/.dsh/AGENTS.md(用户全局指令文件,dsh-agent-instructions 固定读取 $DSH_HOME/AGENTS.md,
|
|
4
|
+
* 注入每个会话的基线指令)。
|
|
5
|
+
*
|
|
6
|
+
* 与 skills/agentPresets 的差异:AGENTS.md 位于 $DSH_HOME 根目录,**不能对 homeDir 整目录递归枚举**,
|
|
7
|
+
* 因此覆写 `listRelPaths()` 返回单文件白名单(而不是目录扫描)。
|
|
8
|
+
* 仅迁移全局文件;项目级 AGENTS.md / CLAUDE.md 属于各项目仓库,默认不迁(研究报告 §2.2 同策略)。
|
|
9
|
+
* baseDir = ''(homeDir 根),与 core/backup.ts FILE_BASES 的 '' 基准一致,保证通用快照/回滚路径正确。
|
|
10
|
+
*
|
|
11
|
+
* 2026-09 修复(真机报告「总览/导出页变慢」):本类此前只覆写了 `export()`(单文件),
|
|
12
|
+
* 却让 v0.1.68 新增的 `preview()` 走了基类的 `collect()` → 对 `baseDir=''` 递归**整个 $DSH_HOME**
|
|
13
|
+
* (实测 4.8 s / 4016 个文件 / 242 MB,且选择器冒出 21 个假单元:profiles、sessions、attachments…)。
|
|
14
|
+
* 现在 `export()` 与 `preview()` 都经 `collect()`,但清单来自同一个 `listRelPaths()` 白名单
|
|
15
|
+
* —— 既快,又保证「预览说的」与「导出做的」逐项一致(这正是基类 preview() 的存在意义)。
|
|
16
|
+
*/
|
|
1
17
|
import { FileCollectionAdapter } from './file-collection.ts';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
18
|
+
import type { HostContext } from '../core/types.ts';
|
|
19
|
+
import type { RecursiveListing } from '../utils/recursive-walk.ts';
|
|
4
20
|
export declare class AgentInstructionsAdapter extends FileCollectionAdapter {
|
|
5
21
|
readonly id: 'agentInstructions';
|
|
6
22
|
readonly displayName: string;
|
|
@@ -9,5 +25,14 @@ export declare class AgentInstructionsAdapter extends FileCollectionAdapter {
|
|
|
9
25
|
readonly baseDir = "";
|
|
10
26
|
/** 用户全局指令文件(相对 homeDir;同时是 schema 端该分区唯一的文件) */
|
|
11
27
|
static readonly FILE = "AGENTS.md";
|
|
12
|
-
|
|
28
|
+
/**
|
|
29
|
+
* 清单枚举 = **单文件白名单**(覆写基类的目录递归)。
|
|
30
|
+
*
|
|
31
|
+
* 为什么必须覆写:`baseDir` 是 ''(AGENTS.md 在 `$DSH_HOME` 根),基类会对整个 home 递归
|
|
32
|
+
* —— 4.8 s、4016 个文件,并把 `profiles/`/`sessions/` 等无关目录当成该分区的单元。
|
|
33
|
+
*
|
|
34
|
+
* 存在性判定优先走 `statSize`(只 stat);门面未实现(旧宿主 / 测试 mock)时退回读一次文件
|
|
35
|
+
* (单文件代价可忽略,且 `collect` 之后还要读它)。读不到 → 空清单(与「文件不存在 = 空分区」同语义)。
|
|
36
|
+
*/
|
|
37
|
+
protected listRelPaths(ctx: HostContext): Promise<RecursiveListing>;
|
|
13
38
|
}
|
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
* 数据源 = ~/.dsh/AGENTS.md(用户全局指令文件,dsh-agent-instructions 固定读取 $DSH_HOME/AGENTS.md,
|
|
4
4
|
* 注入每个会话的基线指令)。
|
|
5
5
|
*
|
|
6
|
-
* 与 skills/agentPresets 的差异:AGENTS.md 位于 $DSH_HOME
|
|
7
|
-
*
|
|
6
|
+
* 与 skills/agentPresets 的差异:AGENTS.md 位于 $DSH_HOME 根目录,**不能对 homeDir 整目录递归枚举**,
|
|
7
|
+
* 因此覆写 `listRelPaths()` 返回单文件白名单(而不是目录扫描)。
|
|
8
8
|
* 仅迁移全局文件;项目级 AGENTS.md / CLAUDE.md 属于各项目仓库,默认不迁(研究报告 §2.2 同策略)。
|
|
9
9
|
* baseDir = ''(homeDir 根),与 core/backup.ts FILE_BASES 的 '' 基准一致,保证通用快照/回滚路径正确。
|
|
10
|
+
*
|
|
11
|
+
* 2026-09 修复(真机报告「总览/导出页变慢」):本类此前只覆写了 `export()`(单文件),
|
|
12
|
+
* 却让 v0.1.68 新增的 `preview()` 走了基类的 `collect()` → 对 `baseDir=''` 递归**整个 $DSH_HOME**
|
|
13
|
+
* (实测 4.8 s / 4016 个文件 / 242 MB,且选择器冒出 21 个假单元:profiles、sessions、attachments…)。
|
|
14
|
+
* 现在 `export()` 与 `preview()` 都经 `collect()`,但清单来自同一个 `listRelPaths()` 白名单
|
|
15
|
+
* —— 既快,又保证「预览说的」与「导出做的」逐项一致(这正是基类 preview() 的存在意义)。
|
|
10
16
|
*/
|
|
11
|
-
import { sha256Hex } from '../utils/hashing.js';
|
|
12
|
-
import { msgOf } from '../core/messages.js';
|
|
13
17
|
import { FileCollectionAdapter } from './file-collection.js';
|
|
14
18
|
import { sectionMeta } from '../schema/section-registry.js';
|
|
15
19
|
export class AgentInstructionsAdapter extends FileCollectionAdapter {
|
|
@@ -21,28 +25,28 @@ export class AgentInstructionsAdapter extends FileCollectionAdapter {
|
|
|
21
25
|
baseDir = '';
|
|
22
26
|
/** 用户全局指令文件(相对 homeDir;同时是 schema 端该分区唯一的文件) */
|
|
23
27
|
static FILE = 'AGENTS.md';
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
/**
|
|
29
|
+
* 清单枚举 = **单文件白名单**(覆写基类的目录递归)。
|
|
30
|
+
*
|
|
31
|
+
* 为什么必须覆写:`baseDir` 是 ''(AGENTS.md 在 `$DSH_HOME` 根),基类会对整个 home 递归
|
|
32
|
+
* —— 4.8 s、4016 个文件,并把 `profiles/`/`sessions/` 等无关目录当成该分区的单元。
|
|
33
|
+
*
|
|
34
|
+
* 存在性判定优先走 `statSize`(只 stat);门面未实现(旧宿主 / 测试 mock)时退回读一次文件
|
|
35
|
+
* (单文件代价可忽略,且 `collect` 之后还要读它)。读不到 → 空清单(与「文件不存在 = 空分区」同语义)。
|
|
36
|
+
*/
|
|
37
|
+
async listRelPaths(ctx) {
|
|
38
|
+
const empty = { paths: [], skippedLinks: [], followedLinks: 0, unreadableDirs: [] };
|
|
39
|
+
const rel = AgentInstructionsAdapter.FILE;
|
|
26
40
|
try {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
41
|
+
if (ctx.fs.statSize !== undefined) {
|
|
42
|
+
return (await ctx.fs.statSize(rel)) === null ? empty : { ...empty, paths: [rel] };
|
|
43
|
+
}
|
|
44
|
+
await ctx.fs.readFile(rel);
|
|
45
|
+
return { ...empty, paths: [rel] };
|
|
33
46
|
}
|
|
34
47
|
catch {
|
|
35
|
-
|
|
48
|
+
return empty;
|
|
36
49
|
}
|
|
37
|
-
const warnings = [];
|
|
38
|
-
if (files.length === 0)
|
|
39
|
-
warnings.push(msgOf(ctx)('adapter.dirEmpty', { type: this.displayName }));
|
|
40
|
-
return {
|
|
41
|
-
sectionId: this.id,
|
|
42
|
-
data: { version: 1, files },
|
|
43
|
-
counts: { files: files.length },
|
|
44
|
-
warnings,
|
|
45
|
-
};
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
52
|
//# sourceMappingURL=agent-instructions.js.map
|