@logictan/dsh-config-manager 0.1.60
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/LICENSE +21 -0
- package/README.md +105 -0
- package/cordis.patch.yml +21 -0
- package/lib/adapters/agent-instructions.d.ts +13 -0
- package/lib/adapters/agent-instructions.js +46 -0
- package/lib/adapters/agent-presets.d.ts +13 -0
- package/lib/adapters/agent-presets.js +14 -0
- package/lib/adapters/credentials.d.ts +37 -0
- package/lib/adapters/credentials.js +122 -0
- package/lib/adapters/file-collection.d.ts +15 -0
- package/lib/adapters/file-collection.js +127 -0
- package/lib/adapters/index.d.ts +57 -0
- package/lib/adapters/index.js +55 -0
- package/lib/adapters/link-report.d.ts +16 -0
- package/lib/adapters/link-report.js +47 -0
- package/lib/adapters/mcp.d.ts +28 -0
- package/lib/adapters/mcp.js +178 -0
- package/lib/adapters/plugin-files.d.ts +18 -0
- package/lib/adapters/plugin-files.js +142 -0
- package/lib/adapters/plugins.d.ts +41 -0
- package/lib/adapters/plugins.js +603 -0
- package/lib/adapters/pnpm-workspace.d.ts +26 -0
- package/lib/adapters/pnpm-workspace.js +147 -0
- package/lib/adapters/prompts.d.ts +30 -0
- package/lib/adapters/prompts.js +231 -0
- package/lib/adapters/providers.d.ts +34 -0
- package/lib/adapters/providers.js +155 -0
- package/lib/adapters/self.d.ts +17 -0
- package/lib/adapters/self.js +71 -0
- package/lib/adapters/sessions.d.ts +14 -0
- package/lib/adapters/sessions.js +15 -0
- package/lib/adapters/settings.d.ts +28 -0
- package/lib/adapters/settings.js +165 -0
- package/lib/adapters/skills.d.ts +13 -0
- package/lib/adapters/skills.js +14 -0
- package/lib/adapters/test-helpers.d.ts +125 -0
- package/lib/adapters/test-helpers.js +236 -0
- package/lib/adapters/ui.d.ts +27 -0
- package/lib/adapters/ui.js +89 -0
- package/lib/adapters/workspaces.d.ts +13 -0
- package/lib/adapters/workspaces.js +106 -0
- package/lib/client.d.ts +1026 -0
- package/lib/client.js +10047 -0
- package/lib/core/analyzer.d.ts +99 -0
- package/lib/core/analyzer.js +934 -0
- package/lib/core/backup.d.ts +138 -0
- package/lib/core/backup.js +513 -0
- package/lib/core/boot-rescue.d.ts +146 -0
- package/lib/core/boot-rescue.js +618 -0
- package/lib/core/cache-cleaner.d.ts +31 -0
- package/lib/core/cache-cleaner.js +95 -0
- package/lib/core/config-lifecycle.d.ts +180 -0
- package/lib/core/config-lifecycle.js +481 -0
- package/lib/core/config-snapshot.d.ts +135 -0
- package/lib/core/config-snapshot.js +424 -0
- package/lib/core/config-state.d.ts +70 -0
- package/lib/core/config-state.js +177 -0
- package/lib/core/consult-source.d.ts +58 -0
- package/lib/core/consult-source.js +260 -0
- package/lib/core/crash-report.d.ts +84 -0
- package/lib/core/crash-report.js +317 -0
- package/lib/core/exporter.d.ts +68 -0
- package/lib/core/exporter.js +375 -0
- package/lib/core/ghost-sweep.d.ts +19 -0
- package/lib/core/ghost-sweep.js +52 -0
- package/lib/core/importer.d.ts +60 -0
- package/lib/core/importer.js +29 -0
- package/lib/core/index.d.ts +14 -0
- package/lib/core/index.js +14 -0
- package/lib/core/journal.d.ts +197 -0
- package/lib/core/journal.js +418 -0
- package/lib/core/local-plugin-host.d.ts +35 -0
- package/lib/core/local-plugin-host.js +120 -0
- package/lib/core/local-plugin-pack.d.ts +135 -0
- package/lib/core/local-plugin-pack.js +278 -0
- package/lib/core/messages.d.ts +310 -0
- package/lib/core/messages.js +621 -0
- package/lib/core/migration-consult.d.ts +117 -0
- package/lib/core/migration-consult.js +363 -0
- package/lib/core/migration-history.d.ts +153 -0
- package/lib/core/migration-history.js +411 -0
- package/lib/core/model-tools.d.ts +50 -0
- package/lib/core/model-tools.js +148 -0
- package/lib/core/msg-types.d.ts +8 -0
- package/lib/core/msg-types.js +6 -0
- package/lib/core/phase3-child-crash.d.ts +1 -0
- package/lib/core/phase3-child-crash.js +87 -0
- package/lib/core/phase3-host.d.ts +138 -0
- package/lib/core/phase3-host.js +359 -0
- package/lib/core/phase3-prod-child.d.ts +1 -0
- package/lib/core/phase3-prod-child.js +35 -0
- package/lib/core/phase4-crash-child.d.ts +1 -0
- package/lib/core/phase4-crash-child.js +103 -0
- package/lib/core/plugin-cli.d.ts +150 -0
- package/lib/core/plugin-cli.js +497 -0
- package/lib/core/reconcile.d.ts +120 -0
- package/lib/core/reconcile.js +389 -0
- package/lib/core/recovery-orchestrator.d.ts +94 -0
- package/lib/core/recovery-orchestrator.js +327 -0
- package/lib/core/restore.d.ts +162 -0
- package/lib/core/restore.js +703 -0
- package/lib/core/rollback.d.ts +12 -0
- package/lib/core/rollback.js +145 -0
- package/lib/core/run-registry.d.ts +85 -0
- package/lib/core/run-registry.js +157 -0
- package/lib/core/startup-barrier.d.ts +53 -0
- package/lib/core/startup-barrier.js +77 -0
- package/lib/core/types.d.ts +515 -0
- package/lib/core/types.js +27 -0
- package/lib/core/undo.d.ts +73 -0
- package/lib/core/undo.js +87 -0
- package/lib/core/validator.d.ts +18 -0
- package/lib/core/validator.js +77 -0
- package/lib/core/verify-recovery.d.ts +21 -0
- package/lib/core/verify-recovery.js +256 -0
- package/lib/core/watcher.d.ts +101 -0
- package/lib/core/watcher.js +219 -0
- package/lib/index.d.ts +238 -0
- package/lib/index.js +2764 -0
- package/lib/migrations/index.d.ts +29 -0
- package/lib/migrations/index.js +56 -0
- package/lib/migrations/v1-to-v2.d.ts +9 -0
- package/lib/migrations/v1-to-v2.js +10 -0
- package/lib/profiles/index.d.ts +4 -0
- package/lib/profiles/index.js +5 -0
- package/lib/profiles/profile-manager.d.ts +106 -0
- package/lib/profiles/profile-manager.js +543 -0
- package/lib/schema/config.d.ts +28 -0
- package/lib/schema/config.js +165 -0
- package/lib/schema/index.d.ts +24 -0
- package/lib/schema/index.js +26 -0
- package/lib/schema/manifest.d.ts +28 -0
- package/lib/schema/manifest.js +109 -0
- package/lib/schema/tombstones.d.ts +46 -0
- package/lib/schema/tombstones.js +64 -0
- package/lib/schema/types.d.ts +232 -0
- package/lib/schema/types.js +8 -0
- package/lib/schema/versions.d.ts +27 -0
- package/lib/schema/versions.js +50 -0
- package/lib/security/encryption.d.ts +85 -0
- package/lib/security/encryption.js +279 -0
- package/lib/security/index.d.ts +16 -0
- package/lib/security/index.js +17 -0
- package/lib/security/integrity.d.ts +30 -0
- package/lib/security/integrity.js +78 -0
- package/lib/security/redaction.d.ts +26 -0
- package/lib/security/redaction.js +95 -0
- package/lib/security/secret-scanner.d.ts +86 -0
- package/lib/security/secret-scanner.js +404 -0
- package/lib/security/vault.d.ts +59 -0
- package/lib/security/vault.js +151 -0
- package/lib/security/zip-security.d.ts +27 -0
- package/lib/security/zip-security.js +154 -0
- package/lib/sync/autosync-config.d.ts +39 -0
- package/lib/sync/autosync-config.js +151 -0
- package/lib/sync/autosync-scheduler.d.ts +139 -0
- package/lib/sync/autosync-scheduler.js +564 -0
- package/lib/sync/fs.d.ts +18 -0
- package/lib/sync/fs.js +49 -0
- package/lib/sync/git/git-transport.d.ts +100 -0
- package/lib/sync/git/git-transport.js +437 -0
- package/lib/sync/github-auth.d.ts +131 -0
- package/lib/sync/github-auth.js +264 -0
- package/lib/sync/layout.d.ts +43 -0
- package/lib/sync/layout.js +203 -0
- package/lib/sync/snapshot-json.d.ts +9 -0
- package/lib/sync/snapshot-json.js +107 -0
- package/lib/sync/sync-config.d.ts +81 -0
- package/lib/sync/sync-config.js +281 -0
- package/lib/sync/sync-engine.d.ts +269 -0
- package/lib/sync/sync-engine.js +591 -0
- package/lib/sync/sync-history.d.ts +42 -0
- package/lib/sync/sync-history.js +78 -0
- package/lib/sync/sync-selection.d.ts +29 -0
- package/lib/sync/sync-selection.js +127 -0
- package/lib/sync/sync-session.d.ts +40 -0
- package/lib/sync/sync-session.js +54 -0
- package/lib/sync/sync-state.d.ts +37 -0
- package/lib/sync/sync-state.js +108 -0
- package/lib/sync/transport.d.ts +75 -0
- package/lib/sync/transport.js +55 -0
- package/lib/sync/ui-prefs.d.ts +34 -0
- package/lib/sync/ui-prefs.js +109 -0
- package/lib/sync/webdav/webdav-transport.d.ts +77 -0
- package/lib/sync/webdav/webdav-transport.js +451 -0
- package/lib/ui/errors.d.ts +19 -0
- package/lib/ui/errors.js +81 -0
- package/lib/ui/export-flow.d.ts +82 -0
- package/lib/ui/export-flow.js +98 -0
- package/lib/ui/i18n.d.ts +289 -0
- package/lib/ui/i18n.js +581 -0
- package/lib/ui/migration-consult-view.d.ts +91 -0
- package/lib/ui/migration-consult-view.js +115 -0
- package/lib/ui/progress.d.ts +38 -0
- package/lib/ui/progress.js +87 -0
- package/lib/ui/report.d.ts +23 -0
- package/lib/ui/report.js +153 -0
- package/lib/ui/test-helpers.d.ts +69 -0
- package/lib/ui/test-helpers.js +154 -0
- package/lib/ui/types.d.ts +257 -0
- package/lib/ui/types.js +21 -0
- package/lib/utils/atomic-write.d.ts +88 -0
- package/lib/utils/atomic-write.js +399 -0
- package/lib/utils/env-lock.d.ts +393 -0
- package/lib/utils/env-lock.js +930 -0
- package/lib/utils/hashing.d.ts +17 -0
- package/lib/utils/hashing.js +41 -0
- package/lib/utils/json.d.ts +24 -0
- package/lib/utils/json.js +76 -0
- package/lib/utils/logger.d.ts +39 -0
- package/lib/utils/logger.js +82 -0
- package/lib/utils/paths.d.ts +42 -0
- package/lib/utils/paths.js +189 -0
- package/lib/utils/proxy.d.ts +69 -0
- package/lib/utils/proxy.js +455 -0
- package/lib/utils/recursive-walk.d.ts +24 -0
- package/lib/utils/recursive-walk.js +134 -0
- package/lib/utils/zip.d.ts +54 -0
- package/lib/utils/zip.js +285 -0
- package/package.json +188 -0
- package/src/adapters/agent-instructions.ts +48 -0
- package/src/adapters/agent-presets.ts +14 -0
- package/src/adapters/credentials.test.ts +90 -0
- package/src/adapters/credentials.ts +143 -0
- package/src/adapters/file-collection.ts +137 -0
- package/src/adapters/files.test.ts +353 -0
- package/src/adapters/index.ts +94 -0
- package/src/adapters/link-report.test.ts +65 -0
- package/src/adapters/link-report.ts +61 -0
- package/src/adapters/mcp.test.ts +96 -0
- package/src/adapters/mcp.ts +185 -0
- package/src/adapters/plugin-files.ts +146 -0
- package/src/adapters/plugins.test.ts +326 -0
- package/src/adapters/plugins.ts +615 -0
- package/src/adapters/pnpm-workspace.test.ts +87 -0
- package/src/adapters/pnpm-workspace.ts +150 -0
- package/src/adapters/prompts.test.ts +110 -0
- package/src/adapters/prompts.ts +230 -0
- package/src/adapters/providers.test.ts +126 -0
- package/src/adapters/providers.ts +173 -0
- package/src/adapters/roundtrip.test.ts +190 -0
- package/src/adapters/self.test.ts +92 -0
- package/src/adapters/self.ts +75 -0
- package/src/adapters/sessions.ts +15 -0
- package/src/adapters/settings.test.ts +100 -0
- package/src/adapters/settings.ts +187 -0
- package/src/adapters/skills.ts +14 -0
- package/src/adapters/test-helpers.ts +248 -0
- package/src/adapters/ui.test.ts +57 -0
- package/src/adapters/ui.ts +108 -0
- package/src/adapters/workspaces.test.ts +106 -0
- package/src/adapters/workspaces.ts +109 -0
- package/src/client/ConfigManagerSection.tsx +90 -0
- package/src/client/api.ts +66 -0
- package/src/client/client-types.ts +18 -0
- package/src/client/common/ErrorBanner.tsx +73 -0
- package/src/client/common/Icon.tsx +129 -0
- package/src/client/common/Modal.tsx +173 -0
- package/src/client/common/ToastViewport.tsx +73 -0
- package/src/client/common/toast-store.test.ts +192 -0
- package/src/client/common/toast-store.ts +181 -0
- package/src/client/common/toast-types.ts +7 -0
- package/src/client/common/ui.tsx +342 -0
- package/src/client/config-manager.module.css +2971 -0
- package/src/client/css-modules.d.ts +8 -0
- package/src/client/index.ts +65 -0
- package/src/client/locales.ts +56 -0
- package/src/client/lucide-icons.d.ts +38 -0
- package/src/client/run-store.test.ts +223 -0
- package/src/client/run-store.ts +372 -0
- package/src/client/sync/SyncConfirmView.tsx +379 -0
- package/src/client/sync/SyncHistoryView.test.ts +40 -0
- package/src/client/sync/SyncHistoryView.tsx +220 -0
- package/src/client/sync/SyncSettingsView.tsx +1535 -0
- package/src/client/sync/history-model.test.ts +194 -0
- package/src/client/sync/history-model.ts +195 -0
- package/src/client/sync/sync-api.test.ts +585 -0
- package/src/client/sync/sync-api.ts +543 -0
- package/src/client/sync/sync-locales.ts +416 -0
- package/src/client/sync/sync-push-preview.test.ts +52 -0
- package/src/client/sync/sync-view-v2.test.ts +213 -0
- package/src/client/sync/sync-view.test.ts +487 -0
- package/src/client/sync/sync-view.ts +759 -0
- package/src/core/analyzer.ts +1068 -0
- package/src/core/backup.ts +605 -0
- package/src/core/boot-rescue.test.ts +847 -0
- package/src/core/boot-rescue.ts +737 -0
- package/src/core/cache-cleaner.test.ts +169 -0
- package/src/core/cache-cleaner.ts +121 -0
- package/src/core/config-lifecycle.test.ts +727 -0
- package/src/core/config-lifecycle.ts +573 -0
- package/src/core/config-snapshot.test.ts +369 -0
- package/src/core/config-snapshot.ts +522 -0
- package/src/core/config-state.test.ts +381 -0
- package/src/core/config-state.ts +207 -0
- package/src/core/consult-source.test.ts +199 -0
- package/src/core/consult-source.ts +293 -0
- package/src/core/crash-report.test.ts +380 -0
- package/src/core/crash-report.ts +369 -0
- package/src/core/exporter.ts +417 -0
- package/src/core/ghost-sweep.test.ts +94 -0
- package/src/core/ghost-sweep.ts +67 -0
- package/src/core/importer.ts +83 -0
- package/src/core/index.ts +56 -0
- package/src/core/journal.test.ts +257 -0
- package/src/core/journal.ts +518 -0
- package/src/core/local-plugin-host.ts +152 -0
- package/src/core/local-plugin-pack.test.ts +359 -0
- package/src/core/local-plugin-pack.ts +363 -0
- package/src/core/messages.test.ts +54 -0
- package/src/core/messages.ts +664 -0
- package/src/core/migration-consult.test.ts +315 -0
- package/src/core/migration-consult.ts +494 -0
- package/src/core/migration-history.test.ts +319 -0
- package/src/core/migration-history.ts +484 -0
- package/src/core/model-tools.test.ts +190 -0
- package/src/core/model-tools.ts +208 -0
- package/src/core/msg-types.ts +10 -0
- package/src/core/phase3-child-crash.ts +95 -0
- package/src/core/phase3-host.ts +411 -0
- package/src/core/phase3-p1.test.ts +212 -0
- package/src/core/phase3-p2b-fingerprint.test.ts +189 -0
- package/src/core/phase3-prod-child.ts +36 -0
- package/src/core/phase3-production-integration.test.ts +286 -0
- package/src/core/phase4-crash-child.ts +101 -0
- package/src/core/phase4-crash-injection.test.ts +166 -0
- package/src/core/plugin-cli.fs.test.ts +184 -0
- package/src/core/plugin-cli.test.ts +137 -0
- package/src/core/plugin-cli.ts +563 -0
- package/src/core/reconcile.test.ts +392 -0
- package/src/core/reconcile.ts +498 -0
- package/src/core/recovery-orchestrator.test.ts +145 -0
- package/src/core/recovery-orchestrator.ts +366 -0
- package/src/core/restore-manage.test.ts +94 -0
- package/src/core/restore.ts +849 -0
- package/src/core/rollback.ts +151 -0
- package/src/core/run-progress.test.ts +237 -0
- package/src/core/run-registry.test.ts +232 -0
- package/src/core/run-registry.ts +209 -0
- package/src/core/smoke.test.ts +842 -0
- package/src/core/startup-barrier.ts +99 -0
- package/src/core/types.ts +542 -0
- package/src/core/undo.ts +116 -0
- package/src/core/validator.ts +84 -0
- package/src/core/verify-recovery.ts +265 -0
- package/src/core/watcher.test.ts +326 -0
- package/src/core/watcher.ts +263 -0
- package/src/index.facade.test.ts +265 -0
- package/src/index.sync.test.ts +217 -0
- package/src/index.ts +2975 -0
- package/src/migrations/index.ts +71 -0
- package/src/migrations/v1-to-v2.ts +17 -0
- package/src/profiles/index.ts +8 -0
- package/src/profiles/profile-manager.test.ts +282 -0
- package/src/profiles/profile-manager.ts +630 -0
- package/src/schema/config.ts +165 -0
- package/src/schema/index.ts +71 -0
- package/src/schema/manifest-schema.test.ts +519 -0
- package/src/schema/manifest.ts +124 -0
- package/src/schema/tombstones.test.ts +131 -0
- package/src/schema/tombstones.ts +89 -0
- package/src/schema/types.ts +245 -0
- package/src/schema/versions.ts +55 -0
- package/src/security/encryption.ts +335 -0
- package/src/security/index.ts +16 -0
- package/src/security/integrity.ts +102 -0
- package/src/security/redaction.ts +101 -0
- package/src/security/secret-scanner.ts +445 -0
- package/src/security/security.test.ts +1215 -0
- package/src/security/vault.test.ts +164 -0
- package/src/security/vault.ts +198 -0
- package/src/security/zip-security.ts +180 -0
- package/src/sync/autosync-config.test.ts +147 -0
- package/src/sync/autosync-config.ts +179 -0
- package/src/sync/autosync-scheduler.test.ts +490 -0
- package/src/sync/autosync-scheduler.ts +646 -0
- package/src/sync/fs.ts +48 -0
- package/src/sync/git/git-transport.test.ts +673 -0
- package/src/sync/git/git-transport.ts +491 -0
- package/src/sync/github-auth.test.ts +280 -0
- package/src/sync/github-auth.ts +356 -0
- package/src/sync/layout.test.ts +270 -0
- package/src/sync/layout.ts +222 -0
- package/src/sync/snapshot-json.test.ts +119 -0
- package/src/sync/snapshot-json.ts +128 -0
- package/src/sync/sync-config.test.ts +310 -0
- package/src/sync/sync-config.ts +299 -0
- package/src/sync/sync-engine.test.ts +1074 -0
- package/src/sync/sync-engine.ts +754 -0
- package/src/sync/sync-history.test.ts +116 -0
- package/src/sync/sync-history.ts +120 -0
- package/src/sync/sync-selection.test.ts +186 -0
- package/src/sync/sync-selection.ts +143 -0
- package/src/sync/sync-session.test.ts +143 -0
- package/src/sync/sync-session.ts +77 -0
- package/src/sync/sync-state.test.ts +164 -0
- package/src/sync/sync-state.ts +131 -0
- package/src/sync/transport.test.ts +111 -0
- package/src/sync/transport.ts +118 -0
- package/src/sync/ui-prefs.test.ts +152 -0
- package/src/sync/ui-prefs.ts +135 -0
- package/src/sync/webdav/webdav-transport.test.ts +871 -0
- package/src/sync/webdav/webdav-transport.ts +535 -0
- package/src/ui/errors.test.ts +47 -0
- package/src/ui/errors.ts +100 -0
- package/src/ui/export-flow.test.ts +87 -0
- package/src/ui/export-flow.ts +156 -0
- package/src/ui/i18n.ts +590 -0
- package/src/ui/migration-consult-view.test.ts +151 -0
- package/src/ui/migration-consult-view.ts +178 -0
- package/src/ui/progress.test.ts +47 -0
- package/src/ui/progress.ts +102 -0
- package/src/ui/report.test.ts +101 -0
- package/src/ui/report.ts +146 -0
- package/src/ui/test-helpers.ts +184 -0
- package/src/ui/types.ts +325 -0
- package/src/utils/atomic-write.test.ts +312 -0
- package/src/utils/atomic-write.ts +422 -0
- package/src/utils/env-lock.test.ts +999 -0
- package/src/utils/env-lock.ts +1086 -0
- package/src/utils/hashing.ts +53 -0
- package/src/utils/json.ts +77 -0
- package/src/utils/logger.ts +114 -0
- package/src/utils/paths.ts +176 -0
- package/src/utils/proxy.test.ts +465 -0
- package/src/utils/proxy.ts +493 -0
- package/src/utils/recursive-walk.test.ts +148 -0
- package/src/utils/recursive-walk.ts +145 -0
- package/src/utils/zip.ts +332 -0
package/lib/client.d.ts
ADDED
|
@@ -0,0 +1,1026 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@logictan/dsh-config-manager",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
|
|
7
|
+
import { ClientContext } from "@deepseek-ai/dsh-client-runtime/client";
|
|
8
|
+
import { PropsRuntime, TranslateNS } from "@deepseek-ai/dsh-client-ui-slots";
|
|
9
|
+
//#region src/ui/i18n.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* 客户端展示层(src/ui/*、src/client/common/*)的渲染文案目录(zh 源语言 / en 镜像)。
|
|
12
|
+
*
|
|
13
|
+
* 与 core 的 messages.ts 分工:本目录负责「客户端纯渲染层」(ReportView / ErrorBanner /
|
|
14
|
+
* ProgressBar / sync-view)产生的中文文案;core 侧引擎消息已随 API 数据源翻译。
|
|
15
|
+
* 这些纯函数原先直接内嵌中文,现经 UiDict 注入:Client 挂载时按 ctx.locale 提供。
|
|
16
|
+
*
|
|
17
|
+
* 纪律:
|
|
18
|
+
* - TextKey 类型 = keyof typeof uiZh,en 缺键/多键即编译错误;
|
|
19
|
+
* - {param} 插值,缺参原样保留。
|
|
20
|
+
*/
|
|
21
|
+
declare const uiZh: {
|
|
22
|
+
readonly commonClose: '关闭';
|
|
23
|
+
readonly commonCancel: '取消';
|
|
24
|
+
readonly commonRetry: '重试';
|
|
25
|
+
readonly commonLoading: '加载中…';
|
|
26
|
+
readonly commonUnknownError: '未知错误';
|
|
27
|
+
readonly commonNext: '下一步';
|
|
28
|
+
readonly commonBack: '上一步';
|
|
29
|
+
readonly commonDone: '完成';
|
|
30
|
+
readonly 'export.download': '下载备份文件';
|
|
31
|
+
readonly 'export.running': '正在导出…';
|
|
32
|
+
readonly 'export.run': '开始导出';
|
|
33
|
+
readonly 'export.selectionWarnings': '以下分区为设备相关数据,跨设备导入时可能不适用:';
|
|
34
|
+
readonly 'export.included': '已包含';
|
|
35
|
+
readonly 'export.excluded': '未包含';
|
|
36
|
+
readonly 'export.unknownSection': '未知分区:{id}';
|
|
37
|
+
readonly 'export.deviceSpecific': '{label} 为设备相关数据({portability}),跨设备导入时可能不适用';
|
|
38
|
+
readonly 'report.backupCreated': '备份已创建';
|
|
39
|
+
readonly 'report.importComplete': '导入完成';
|
|
40
|
+
readonly 'report.importFailed': '导入失败';
|
|
41
|
+
readonly 'report.tombstonedSkipped': '已按删除记录跳过 {count} 项';
|
|
42
|
+
readonly 'report.included': '已包含:';
|
|
43
|
+
readonly 'report.excluded': '未包含:';
|
|
44
|
+
readonly 'report.security': '安全:';
|
|
45
|
+
readonly 'report.apiKeysExcluded': 'API 密钥已排除:';
|
|
46
|
+
readonly 'report.containsSecrets': '包含密钥:';
|
|
47
|
+
readonly 'report.encrypted': '已加密:';
|
|
48
|
+
readonly 'report.redacted': '{count} 个敏感字段已脱敏';
|
|
49
|
+
readonly 'report.file': '文件:';
|
|
50
|
+
readonly 'report.yes': '是';
|
|
51
|
+
readonly 'report.yesEncrypted': '是(加密)';
|
|
52
|
+
readonly 'report.no': '否';
|
|
53
|
+
readonly 'report.importedRestored': '已导入/恢复';
|
|
54
|
+
readonly 'report.skipped': '跳过';
|
|
55
|
+
readonly 'report.needAttention': '需注意';
|
|
56
|
+
readonly 'report.failed': '失败';
|
|
57
|
+
readonly 'report.noChanges': '无变更';
|
|
58
|
+
readonly 'report.reason': '原因';
|
|
59
|
+
readonly 'report.note': '说明';
|
|
60
|
+
readonly 'report.unknownReason': '未知原因';
|
|
61
|
+
readonly 'report.secrets': '密钥:';
|
|
62
|
+
readonly 'report.credentialsNeedEntry': '{count} 个凭据需要补录';
|
|
63
|
+
readonly 'report.restartRequired': '重启 DSH 后生效:{detail}';
|
|
64
|
+
readonly 'report.restartPluginsMcp': '插件/MCP 更改将在重启 DSH 后生效';
|
|
65
|
+
readonly 'report.rollbackFull': '回滚:已完整恢复导入前的配置。';
|
|
66
|
+
readonly 'report.rollbackPartial': '回滚部分完成。';
|
|
67
|
+
readonly 'report.rollbackManual': '以下项目可能需要人工恢复:';
|
|
68
|
+
readonly 'report.restored': '已恢复:{count} 项';
|
|
69
|
+
readonly 'error.notMounted': 'config-manager 服务未挂载(插件未加载):请确认 profile 中已安装 dsh-config-manager 并重启 DSH';
|
|
70
|
+
readonly 'error.httpInvalidJson': 'HTTP {status}: 无效的 JSON 响应';
|
|
71
|
+
readonly 'error.fallback': '操作失败';
|
|
72
|
+
readonly 'error.downloadFailed': '下载失败:HTTP {status}';
|
|
73
|
+
readonly 'error.exportTimeout': '导出超时({minutes} 分钟):导出过程未完成,请重试;若反复超时请检查 DSH 状态';
|
|
74
|
+
readonly 'error.syncTimeout': '同步请求超时({minutes} 分钟):请检查网络与仓库可达性后重试';
|
|
75
|
+
readonly 'error.recoveryTimeout': '恢复请求超时({minutes} 分钟):恢复过程未完成,请重试;若反复超时请检查 DSH 状态';
|
|
76
|
+
readonly 'error.lifecycleTimeout': '灾备请求超时({minutes} 分钟):撤销/重做未完成,请重试;若反复超时请检查 DSH 状态';
|
|
77
|
+
readonly 'error.settingsConflict.title': '配置已被并发修改';
|
|
78
|
+
readonly 'error.settingsConflict.action': '目标 DSH 的该配置在导入期间被其他进程修改,为避免覆盖请重新导出或手动核对后再试。';
|
|
79
|
+
readonly 'error.notConfirmed.title': '导入未确认';
|
|
80
|
+
readonly 'error.notConfirmed.action': '请在预览页确认导入内容后重试。';
|
|
81
|
+
readonly 'error.integrity.title': '备份完整性校验失败';
|
|
82
|
+
readonly 'error.integrity.action': '备份文件可能已损坏或被篡改,请重新导出备份后再试。';
|
|
83
|
+
readonly 'error.schema.title': '备份格式版本不受支持';
|
|
84
|
+
readonly 'error.schema.action': '请升级 DSH Config Manager 或使用相同版本的备份文件。';
|
|
85
|
+
readonly 'error.notFound.title': '文件或路径不存在';
|
|
86
|
+
readonly 'error.notFound.action': '请检查文件路径是否正确、文件是否已被移动或删除。';
|
|
87
|
+
readonly 'error.permission.title': '权限不足';
|
|
88
|
+
readonly 'error.permission.action': '请检查目标目录的读写权限后重试。';
|
|
89
|
+
readonly 'error.needsRestart.title': '插件代码更新需要重启生效';
|
|
90
|
+
readonly 'error.needsRestart.action': '导入已完成;patch / settings 由宿主热重载即时生效,但被覆盖安装的插件包代码需重启 DSH 后才生效。';
|
|
91
|
+
readonly 'error.reason': '原因';
|
|
92
|
+
readonly 'error.suggestedAction': '建议操作';
|
|
93
|
+
readonly 'error.item': '相关项';
|
|
94
|
+
readonly 'progress.analyzing': '正在分析配置…';
|
|
95
|
+
readonly 'progress.exportingSettings': '正在导出设置…';
|
|
96
|
+
readonly 'progress.scanningSecrets': '正在扫描密钥…';
|
|
97
|
+
readonly 'progress.exportingPlugins': '正在导出插件…';
|
|
98
|
+
readonly 'progress.creatingArchive': '正在创建归档…';
|
|
99
|
+
readonly 'progress.calculatingChecksums': '正在核对文件完整性…';
|
|
100
|
+
readonly 'progress.exporting': '正在导出配置…';
|
|
101
|
+
readonly 'progress.validating': '正在校验备份…';
|
|
102
|
+
readonly 'progress.checkingCompatibility': '正在检查兼容性…';
|
|
103
|
+
readonly 'progress.creatingSnapshot': '正在创建安全快照…';
|
|
104
|
+
readonly 'progress.restoringSettings': '正在恢复设置…';
|
|
105
|
+
readonly 'progress.restoringPlugins': '正在恢复插件…';
|
|
106
|
+
readonly 'progress.restoringMcp': '正在恢复 MCP…';
|
|
107
|
+
readonly 'progress.validatingConfig': '正在校验配置…';
|
|
108
|
+
readonly 'progress.rollingBack': '正在回滚…';
|
|
109
|
+
readonly 'progress.executing': '正在应用配置(插件安装可能需要较长时间)…';
|
|
110
|
+
readonly 'progress.done': '完成';
|
|
111
|
+
readonly 'snapshots.createdAt': '创建时间';
|
|
112
|
+
readonly 'snapshots.sourceZip': '来源';
|
|
113
|
+
readonly 'snapshots.status': '状态';
|
|
114
|
+
readonly 'snapshots.entries': '条目';
|
|
115
|
+
readonly 'snapshots.plugins': '插件';
|
|
116
|
+
readonly 'snapshots.statusPending': '待处理';
|
|
117
|
+
readonly 'snapshots.statusDone': '已完成';
|
|
118
|
+
readonly 'snapshots.statusRolledback': '已回滚';
|
|
119
|
+
readonly 'snapshots.statusUnknown': '未知';
|
|
120
|
+
readonly 'snapshots.planTitle': '恢复计划预览';
|
|
121
|
+
readonly 'snapshots.confirmRestore': '确认恢复?会先把当前文件备份到一个安全位置,再删除导入期间新增的插件。';
|
|
122
|
+
readonly 'snapshots.execute': '执行恢复';
|
|
123
|
+
readonly 'snapshots.executing': '正在恢复…';
|
|
124
|
+
readonly 'snapshots.restored': '已恢复';
|
|
125
|
+
readonly 'snapshots.removedPlugins': '已卸载插件';
|
|
126
|
+
readonly 'snapshots.manualHints': '需人工处理';
|
|
127
|
+
readonly 'snapshots.failed': '失败';
|
|
128
|
+
readonly 'snapshots.skipped': '跳过';
|
|
129
|
+
readonly 'snapshots.noActions': '该快照无可恢复动作(或全部跳过)。';
|
|
130
|
+
readonly 'snapshots.empty': '暂无快照。导入时会自动创建安全快照。';
|
|
131
|
+
readonly 'snapshots.loading': '正在加载快照…';
|
|
132
|
+
readonly 'snapshots.selectHint': '选择一个快照预览其恢复计划(只读预览,不会改动任何设置):';
|
|
133
|
+
readonly 'snapshots.reportTitle': '恢复报告';
|
|
134
|
+
readonly 'sync.privateRepoHint': '安全要求:同步仓库必须为私有仓库(public 仓库会公开你的配置内容)。认证 token 仅用于仓库访问,绝不写入同步文件、提交内容或日志。';
|
|
135
|
+
readonly 'sync.kind.create': '新增';
|
|
136
|
+
readonly 'sync.kind.update': '更新';
|
|
137
|
+
readonly 'sync.kind.skip': '跳过';
|
|
138
|
+
readonly 'sync.kind.conflict': '冲突';
|
|
139
|
+
readonly 'sync.kind.install': '安装';
|
|
140
|
+
readonly 'sync.kind.missingSecret': '缺密钥';
|
|
141
|
+
readonly 'sync.kind.missingDependency': '缺依赖';
|
|
142
|
+
readonly 'sync.kind.pathMapping': '路径映射';
|
|
143
|
+
readonly 'sync.kind.warning': '警告';
|
|
144
|
+
readonly 'sync.kind.error': '错误';
|
|
145
|
+
readonly 'sync.severity.error': '错误';
|
|
146
|
+
readonly 'sync.severity.warning': '警告';
|
|
147
|
+
readonly 'sync.severity.info': '信息';
|
|
148
|
+
readonly 'sync.pushLabel': '推送到远端';
|
|
149
|
+
readonly 'sync.pullLabel': '拉取差异预览';
|
|
150
|
+
readonly 'sync.pushing': '正在推送…';
|
|
151
|
+
readonly 'sync.pulling': '正在拉取…';
|
|
152
|
+
readonly 'sync.statusLoading': '正在读取同步状态…';
|
|
153
|
+
readonly 'sync.statusUnconfigured': '尚未配置同步仓库(请填写仓库地址并推送一次以保存配置)';
|
|
154
|
+
readonly 'sync.credConfigured': '凭据已配置';
|
|
155
|
+
readonly 'sync.credMissing': '未配置凭据(token 将在首次推送/拉取时写入 DSH credentials)';
|
|
156
|
+
readonly 'sync.lastSync': '上次同步:{time}';
|
|
157
|
+
readonly 'sync.neverSynced': '尚未同步过';
|
|
158
|
+
readonly 'sync.neverSyncedShort': '从未同步';
|
|
159
|
+
readonly 'sync.pushFailed': '推送失败';
|
|
160
|
+
readonly 'sync.pushOk': '推送成功(快照 {id})';
|
|
161
|
+
readonly 'sync.pushPreviewHeadline': '将推送 {total} 个分区({changed} 个有变化)';
|
|
162
|
+
readonly 'sync.pushPreviewHint': '以上为只读预览,不会写入远端。确认后点击「推送」才真正上传。';
|
|
163
|
+
readonly 'sync.pushPreviewEncrypted': '加密快照:载荷将整体加密,各分区相对基线的变化不可比对。';
|
|
164
|
+
readonly 'sync.pullFailed': '拉取失败';
|
|
165
|
+
readonly 'sync.pullOk': '远端快照 {id} 差异预览:共 {count} 项变更';
|
|
166
|
+
readonly 'sync.pullEmpty': '远端快照与本地一致(无变更)';
|
|
167
|
+
readonly 'sync.previewHint': '以上为只读差异预览,不会执行导入。当前版本暂不支持一键导入;如需应用远端配置,请使用「导入恢复」向导手动导入导出的备份。';
|
|
168
|
+
readonly 'sync.syncTitle': '一键同步';
|
|
169
|
+
readonly 'sync.syncButton': '一键同步';
|
|
170
|
+
readonly 'sync.syncing': '正在同步…';
|
|
171
|
+
readonly 'sync.syncHeadline': '远端快照 {id} 差异确认:共 {count} 项';
|
|
172
|
+
readonly 'sync.syncEmpty': '远端快照与本地一致(无变更)';
|
|
173
|
+
readonly 'sync.syncFailed': '同步失败';
|
|
174
|
+
readonly 'sync.confirmAdopt': '采用远端';
|
|
175
|
+
readonly 'sync.confirmSkip': '跳过';
|
|
176
|
+
readonly 'sync.confirmRequired': '需要人工决策';
|
|
177
|
+
readonly 'sync.needsReviewBadge': '需人工决策';
|
|
178
|
+
readonly 'sync.selectSnapshot': '选择历史快照';
|
|
179
|
+
readonly 'sync.latestSnapshot': '最新快照';
|
|
180
|
+
readonly 'sync.noSnapshots': '远端暂无快照';
|
|
181
|
+
readonly 'sync.confirmImport': '确认导入';
|
|
182
|
+
readonly 'sync.cancelConfirm': '取消';
|
|
183
|
+
readonly 'sync.conflictResolve': '冲突解决';
|
|
184
|
+
readonly 'sync.conflictUseLocal': '用本地';
|
|
185
|
+
readonly 'sync.conflictUseRemote': '用远端';
|
|
186
|
+
readonly 'sync.conflictSkip': '跳过';
|
|
187
|
+
readonly 'sync.conflictResolvedLocal': '已选:本地';
|
|
188
|
+
readonly 'sync.conflictResolvedRemote': '已选:远端';
|
|
189
|
+
readonly 'sync.conflictResolvedSkip': '已选:跳过';
|
|
190
|
+
readonly 'sync.importDone': '已导入 {n} 个分区';
|
|
191
|
+
readonly 'sync.importSkipped': '已跳过 {n} 项';
|
|
192
|
+
readonly 'sync.importFailed': '导入失败(已整体回滚)';
|
|
193
|
+
readonly 'sync.rollbackButton': '回滚到应用前';
|
|
194
|
+
readonly 'sync.rollingBack': '正在回滚…';
|
|
195
|
+
readonly 'sync.rollbackDone': '已回滚到应用前';
|
|
196
|
+
readonly 'sync.appliedSections': '已写入';
|
|
197
|
+
readonly 'sync.importWarnings': '导入告警';
|
|
198
|
+
readonly 'sync.autosyncTitle': '自动同步';
|
|
199
|
+
readonly 'sync.autosyncDesc': '开启后,DSH 将按固定间隔自动执行双向同步(拉取合并 + 上传);DSH 启动时还会触发一次「自动下载合并(不上传)」以保持本地为最新。仅在无冲突且无需人工干预时才自动写入。';
|
|
200
|
+
readonly 'sync.autosyncEnabled': '启用自动同步';
|
|
201
|
+
readonly 'sync.autosyncInterval': '同步间隔';
|
|
202
|
+
readonly 'sync.autosyncIntervalHint': 'DSH 启动时自动下载合并不上传。';
|
|
203
|
+
readonly 'sync.autosyncNever': '从未运行';
|
|
204
|
+
readonly 'sync.autosyncLastRun': '上次运行:{time}';
|
|
205
|
+
readonly 'sync.autosyncNextIn': '下次约 {time} 后';
|
|
206
|
+
readonly 'sync.autosyncSuccess': '成功';
|
|
207
|
+
readonly 'sync.autosyncSkipped': '已跳过';
|
|
208
|
+
readonly 'sync.autosyncFailed': '失败';
|
|
209
|
+
readonly 'sync.autosyncPartial': '部分成功';
|
|
210
|
+
readonly 'sync.autosyncFailCount': '连续失败 {n} 次';
|
|
211
|
+
readonly 'sync.autosyncSyncing': '自动同步进行中…';
|
|
212
|
+
readonly 'sync.interval.5m': '5 分钟';
|
|
213
|
+
readonly 'sync.interval.15m': '15 分钟';
|
|
214
|
+
readonly 'sync.interval.30m': '30 分钟';
|
|
215
|
+
readonly 'sync.interval.60m': '60 分钟';
|
|
216
|
+
readonly 'sync.interval.6h': '6 小时';
|
|
217
|
+
readonly 'sync.interval.12h': '12 小时';
|
|
218
|
+
readonly 'sync.interval.24h': '24 小时';
|
|
219
|
+
readonly 'sync.duration.min': '{n} 分钟';
|
|
220
|
+
readonly 'sync.duration.hour': '{n} 小时';
|
|
221
|
+
readonly 'sync.duration.day': '{n} 天';
|
|
222
|
+
readonly 'sync.hist.autosync': '自动同步';
|
|
223
|
+
readonly 'sync.hist.directionPull': '下载';
|
|
224
|
+
readonly 'sync.hist.directionPush': '上传';
|
|
225
|
+
readonly 'sync.hist.directionBoth': '双向';
|
|
226
|
+
readonly 'sync.hist.skipReasonConflict': '冲突项被跳过';
|
|
227
|
+
readonly 'sync.hist.skipReasonNoRemote': '远端无快照';
|
|
228
|
+
readonly 'sync.hist.skipReasonNotConfigured': '未配置仓库';
|
|
229
|
+
readonly 'sync.hist.skipReasonNetwork': '网络问题';
|
|
230
|
+
readonly 'sync.hist.conflictedSections': '跳过冲突分区:{sections}';
|
|
231
|
+
readonly 'sync.hist.appliedSections': '应用分区:{sections}';
|
|
232
|
+
readonly 'sync.hist.failedError': '错误:{error}';
|
|
233
|
+
readonly 'sync.hist.notifiedAt': '已通知';
|
|
234
|
+
readonly 'sync.github.starting': '正在发起 GitHub 授权…';
|
|
235
|
+
readonly 'sync.github.waitingNoCode': '请在浏览器中打开授权页面并完成授权…';
|
|
236
|
+
readonly 'sync.github.waiting': '请在浏览器中打开授权页面,输入一次性代码 {code} 完成授权(自动等待确认)。';
|
|
237
|
+
readonly 'sync.github.polling': '正在确认 GitHub 授权状态…';
|
|
238
|
+
readonly 'sync.github.success': 'GitHub 登录成功:token 已安全写入 DSH credentials,可直接推送/拉取。';
|
|
239
|
+
readonly 'sync.github.failed': 'GitHub 登录失败';
|
|
240
|
+
readonly 'sync.github.defaultStatus': '通过 GitHub OAuth 设备码流程登录,token 自动写入 DSH credentials(无需手动输入)。';
|
|
241
|
+
readonly 'sync.github.login': '使用 GitHub 登录';
|
|
242
|
+
readonly 'sync.github.relogin': '重新登录';
|
|
243
|
+
readonly 'sync.github.pollSuccess': 'GitHub 登录成功:token 已安全写入 DSH credentials。';
|
|
244
|
+
readonly 'sync.github.pollDenied': 'GitHub 授权被拒绝(access_denied)。可重新发起登录,或改用下方手动 token 输入。';
|
|
245
|
+
readonly 'sync.github.pollExpired': 'GitHub 授权已过期(expired_token)。请重新发起登录。';
|
|
246
|
+
readonly 'sync.github.pollError': 'GitHub OAuth 错误:{detail}';
|
|
247
|
+
readonly 'sync.github.unknownError': '未知错误';
|
|
248
|
+
readonly 'market.statusLoading': '正在读取市场状态…';
|
|
249
|
+
readonly 'market.statusUnconfigured': '尚未添加市场(请输入公开 Git 仓库地址)';
|
|
250
|
+
readonly 'market.statusConfigured': '已添加 {count} 个市场';
|
|
251
|
+
readonly 'market.supplyUnofficial': '来自公共网络、非官方审核';
|
|
252
|
+
readonly 'market.supplySource': '来源仓库:{url}';
|
|
253
|
+
readonly 'market.supplyDownloadedAt': '下载时间:{time}';
|
|
254
|
+
readonly 'market.supplyAuthor': '作者:{author}';
|
|
255
|
+
readonly 'market.supplyProvenanceSource': '作者声明来源:{source}';
|
|
256
|
+
readonly 'market.supplyProvenanceNote': '作者自述:{note}';
|
|
257
|
+
readonly 'market.detail.sections': '包含分区:{sections}';
|
|
258
|
+
readonly 'market.detail.sectionsEmpty': '未声明分区';
|
|
259
|
+
readonly 'market.detail.statusValid': '校验通过';
|
|
260
|
+
readonly 'market.detail.statusInvalid': '校验未通过';
|
|
261
|
+
readonly 'myConfigs.autoField': '系统自动';
|
|
262
|
+
readonly 'myConfigs.field.id': '条目 ID';
|
|
263
|
+
readonly 'myConfigs.field.author': '作者';
|
|
264
|
+
readonly 'myConfigs.field.version': '版本';
|
|
265
|
+
readonly 'myConfigs.field.updatedAt': '更新时间';
|
|
266
|
+
readonly 'myConfigs.status.notListed': '未收录';
|
|
267
|
+
readonly 'myConfigs.status.pendingPr': 'PR 待审核';
|
|
268
|
+
readonly 'myConfigs.status.listed': '已收录';
|
|
269
|
+
readonly 'myConfigs.form.errorName': '名称不能为空';
|
|
270
|
+
readonly 'consult.dim.compatibility': '版本/平台兼容性';
|
|
271
|
+
readonly 'consult.dim.integrity': '结构完整性';
|
|
272
|
+
readonly 'consult.dim.sections': '分区完整性';
|
|
273
|
+
readonly 'consult.dim.consistency': '一致性';
|
|
274
|
+
readonly 'consult.dim.sensitive': '敏感暴露';
|
|
275
|
+
readonly 'consult.dim.migratability': '可迁移性';
|
|
276
|
+
readonly 'consult.recommendation.proceed': '建议:可继续';
|
|
277
|
+
readonly 'consult.recommendation.review': '建议:需人工确认';
|
|
278
|
+
readonly 'consult.recommendation.block': '建议:阻止执行';
|
|
279
|
+
readonly 'consult.title': '迁移前咨询';
|
|
280
|
+
readonly 'consult.healthScore': '健康评分 {score}';
|
|
281
|
+
readonly 'consult.dryRun': '只读分析';
|
|
282
|
+
readonly 'consult.reasons': '建议依据';
|
|
283
|
+
readonly 'consult.willApply': '将应用';
|
|
284
|
+
readonly 'consult.sections': '{count} 个分区';
|
|
285
|
+
readonly 'consult.items': '{count} 项';
|
|
286
|
+
readonly 'consult.conflicts': '{count} 个冲突';
|
|
287
|
+
readonly 'consult.risks': '{count} 个风险';
|
|
288
|
+
readonly 'consult.dimensions': '评分维度';
|
|
289
|
+
readonly 'consult.loading': '正在生成咨询报告…';
|
|
290
|
+
};
|
|
291
|
+
type UiTextKey = keyof typeof uiZh;
|
|
292
|
+
/** UI 翻译函数:key → 当前语言文案({param} 插值;未知键回退 zh/键名)。 */
|
|
293
|
+
type UiT = (key: UiTextKey, params?: Record<string, string | number>) => string;
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region src/client/api.d.ts
|
|
296
|
+
/** Host 半健康检查响应(plugin 版本 / DSH 版本 / 平台,用于主页横幅与兼容性说明) */
|
|
297
|
+
interface ServiceStatus {
|
|
298
|
+
ready: boolean;
|
|
299
|
+
pluginVersion: string;
|
|
300
|
+
dshVersion: string;
|
|
301
|
+
platform: string;
|
|
302
|
+
arch: string;
|
|
303
|
+
homeDir?: string;
|
|
304
|
+
profile?: string;
|
|
305
|
+
profileManifestReadable?: boolean;
|
|
306
|
+
installedPluginCount?: number;
|
|
307
|
+
installedPluginNames?: string[];
|
|
308
|
+
bundles?: string[];
|
|
309
|
+
}
|
|
310
|
+
/** 携带路由 JSON error 消息的错误类型 */
|
|
311
|
+
declare class ConfigManagerApiError extends Error {
|
|
312
|
+
constructor(message: string);
|
|
313
|
+
}
|
|
314
|
+
declare class ConfigManagerApi {
|
|
315
|
+
readonly t: UiT;
|
|
316
|
+
constructor(t?: UiT);
|
|
317
|
+
status(): Promise<ServiceStatus>;
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/schema/types.d.ts
|
|
321
|
+
/**
|
|
322
|
+
* 分区标识,与 ZIP 目录结构、manifest.sections 键一一对应。
|
|
323
|
+
* 明确不实现的分区(keybindings/workflows/commands)不在此列;
|
|
324
|
+
* rules 已由 agentInstructions(~/.dsh/AGENTS.md,dsh-agent-instructions 全局指令)承接。
|
|
325
|
+
*/
|
|
326
|
+
type SectionId = 'settings' | 'ui' | 'providers' | 'plugins' | 'mcp' | 'prompts' | 'skills' | 'agentPresets' | 'agentInstructions' | 'workspaces' | 'pluginFiles' | 'credentialsStatus' | 'secrets' | 'sessions' | 'self';
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/core/types.d.ts
|
|
329
|
+
type PlanItemKind = 'Create' | 'Update' | 'Skip' | 'Conflict' | 'Install' | 'MissingSecret' | 'MissingDependency' | 'PathMapping' | 'Warning' | 'Error';
|
|
330
|
+
type ItemResolution = 'keepCurrent' | 'useImported' | 'review';
|
|
331
|
+
interface ConflictDecision {
|
|
332
|
+
itemId: string;
|
|
333
|
+
resolution: ItemResolution;
|
|
334
|
+
}
|
|
335
|
+
interface PathMapping {
|
|
336
|
+
oldPrefix: string;
|
|
337
|
+
newPrefix: string;
|
|
338
|
+
appliesTo: ('workspaces' | 'mcp' | 'pluginConfig' | 'skills')[];
|
|
339
|
+
}
|
|
340
|
+
interface SnapshotTarget {
|
|
341
|
+
adapter: SectionId;
|
|
342
|
+
ref: string;
|
|
343
|
+
}
|
|
344
|
+
interface PlanItem {
|
|
345
|
+
id: string;
|
|
346
|
+
kind: PlanItemKind;
|
|
347
|
+
adapter: SectionId;
|
|
348
|
+
description: string;
|
|
349
|
+
detail?: string;
|
|
350
|
+
severity: 'info' | 'warning' | 'error';
|
|
351
|
+
conflict?: ConflictDecision;
|
|
352
|
+
pathMapping?: PathMapping;
|
|
353
|
+
missingDependency?: string;
|
|
354
|
+
target?: SnapshotTarget;
|
|
355
|
+
}
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region src/sync/sync-engine.d.ts
|
|
358
|
+
interface SyncPushReport {
|
|
359
|
+
ok: boolean;
|
|
360
|
+
snapshotId: string;
|
|
361
|
+
/** 实际进入同步的分区 */
|
|
362
|
+
sections: SectionId[];
|
|
363
|
+
/** 分区级告警(单项失败不拖垮整体,§34.17 语义) */
|
|
364
|
+
warnings: string[];
|
|
365
|
+
message?: string;
|
|
366
|
+
}
|
|
367
|
+
/** 差异报告中的单个变更项(PlanItem 摘要,不含敏感细节) */
|
|
368
|
+
interface PullChange {
|
|
369
|
+
id: string;
|
|
370
|
+
adapter: SectionId;
|
|
371
|
+
kind: PlanItemKind;
|
|
372
|
+
description: string;
|
|
373
|
+
severity: PlanItem['severity'];
|
|
374
|
+
}
|
|
375
|
+
interface SyncPullReport {
|
|
376
|
+
ok: boolean;
|
|
377
|
+
snapshotId: string;
|
|
378
|
+
changes: PullChange[];
|
|
379
|
+
/** 是否存在需要人工决策的项(Conflict / MissingSecret / MissingDependency / 路径问题)。 */
|
|
380
|
+
needsReview: boolean;
|
|
381
|
+
message?: string;
|
|
382
|
+
}
|
|
383
|
+
/** push 前只读预览 ——「将推送什么」的单分区摘要(不写远端、不落盘)。 */
|
|
384
|
+
interface SyncPushPreviewSection {
|
|
385
|
+
/** 分区 id(将进入快照的分区) */
|
|
386
|
+
section: SectionId;
|
|
387
|
+
/** 分区内条目计数(adapter.export 的 counts 聚合;无计数时为 0) */
|
|
388
|
+
count: number;
|
|
389
|
+
/** 相对上次基线(sync-state)是否变化:true = 本次会更新该分区;false = 与基线一致 */
|
|
390
|
+
changed: boolean;
|
|
391
|
+
}
|
|
392
|
+
/** push 前预览结果(零写入)。 */
|
|
393
|
+
interface SyncPushPreview {
|
|
394
|
+
ok: boolean;
|
|
395
|
+
/** 将推送的分区清单(含计数与变化标记) */
|
|
396
|
+
sections: SyncPushPreviewSection[];
|
|
397
|
+
/** 远端现有快照数(0 = 首次推送将创建首个基线) */
|
|
398
|
+
remoteSnapshotCount: number;
|
|
399
|
+
message?: string;
|
|
400
|
+
}
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region src/client/sync/sync-api.d.ts
|
|
403
|
+
/** 远程同步通道类型:git(默认)或 webdav */
|
|
404
|
+
type SyncTransportType = 'git' | 'webdav';
|
|
405
|
+
/** GET /sync/status 响应:配置/凭据/上次同步的只读事实(无任何 secret 值) */
|
|
406
|
+
interface SyncStatusResponse {
|
|
407
|
+
ok: boolean;
|
|
408
|
+
/** 是否已保存过仓库/通道配置(sync-config.json;任一通道配置过即为 true) */
|
|
409
|
+
configured: boolean;
|
|
410
|
+
/** git 通道:已配置的仓库地址(不含 token,可回显;与当前通道无关,配置过即返回) */
|
|
411
|
+
repoUrl?: string;
|
|
412
|
+
/** git 通道:DSH credentials 中是否已存在 token(describe 只报状态,值永不返回) */
|
|
413
|
+
credentialConfigured: boolean;
|
|
414
|
+
credentialWritable: boolean;
|
|
415
|
+
/** webdav 通道:配置状态(url 可回显,username 非敏感;password 值永不返回;
|
|
416
|
+
* 与当前通道无关,配置过即返回,供 git ↔ webdav 切换时回填表单) */
|
|
417
|
+
webdav?: WebDavStatusResponse;
|
|
418
|
+
/** sync-state.lastSyncAt;'' = 从未同步 */
|
|
419
|
+
lastSyncAt?: string;
|
|
420
|
+
/** sync-state.sections 条目数 */
|
|
421
|
+
sectionCount: number;
|
|
422
|
+
transport?: {
|
|
423
|
+
type: string;
|
|
424
|
+
ref: string;
|
|
425
|
+
};
|
|
426
|
+
/** 上次选择的同步通道(磁盘 ui-prefs.json;UI 回填优先于此,localStorage 仅兜底) */
|
|
427
|
+
lastSyncChannel?: 'git' | 'webdav';
|
|
428
|
+
/** 可同步分区目录(自定义同步勾选列表;host adapters 唯一事实源) */
|
|
429
|
+
syncSections?: SyncSectionInfo[];
|
|
430
|
+
/** 当前分区选择(当前激活通道;UI 回填用,自动同步与手动 push 共用) */
|
|
431
|
+
syncSelection?: SyncSelectionPayload;
|
|
432
|
+
/** 全部通道的分区选择(git/webdav 各自独立;UI 按当前 tab 取对应通道) */
|
|
433
|
+
syncSelectionByChannel?: Record<SyncTransportType, SyncSelectionPayload>;
|
|
434
|
+
/** 自动同步当前状态(当前激活通道;供 UI 顶部开关回填;§3.9) */
|
|
435
|
+
autosync?: AutosyncStatusResponse;
|
|
436
|
+
/** 全部通道的自动同步状态(git/webdav 各自独立;UI 按当前 tab 取对应通道) */
|
|
437
|
+
autosyncByChannel?: Record<SyncTransportType, AutosyncStatusResponse>;
|
|
438
|
+
}
|
|
439
|
+
/** 同步分区选择(POST /sync/selection 请求体 + status.syncSelection 响应;持久化于 Host)。
|
|
440
|
+
* git/webdav 通道各自独立(transport 缺省 git)。 */
|
|
441
|
+
interface SyncSelectionPayload {
|
|
442
|
+
/** 目标通道(git/webdav 各自独立的模式与勾选;缺省 git) */
|
|
443
|
+
transport?: SyncTransportType;
|
|
444
|
+
mode: 'default' | 'advanced';
|
|
445
|
+
/** 高级模式勾选分区;default 模式可为空数组 */
|
|
446
|
+
sections: SectionId[];
|
|
447
|
+
}
|
|
448
|
+
/** webdav 通道状态字段(无任何 secret 值;password 只报 passwordConfigured 布尔) */
|
|
449
|
+
interface WebDavStatusResponse {
|
|
450
|
+
/** 上次使用的服务器地址(可回显;不含 userinfo) */
|
|
451
|
+
url?: string;
|
|
452
|
+
/** 上次使用的用户名(非敏感,可回显;供表单回填) */
|
|
453
|
+
username?: string;
|
|
454
|
+
/** 是否已填过用户名(布尔;便于 UI 提示徽章) */
|
|
455
|
+
usernameConfigured: boolean;
|
|
456
|
+
/** DSH credentials 中是否已存在密码(值永不返回) */
|
|
457
|
+
passwordConfigured: boolean;
|
|
458
|
+
}
|
|
459
|
+
/** POST /sync/config 响应:保存成功后的轻量凭据状态(无 secret 值;UI 直接合并刷新徽章)。 */
|
|
460
|
+
interface SyncConfigSaveResponse {
|
|
461
|
+
ok: boolean;
|
|
462
|
+
configured: boolean;
|
|
463
|
+
transport: SyncTransportType;
|
|
464
|
+
/** git 通道:token 是否已配置(值永不返回) */
|
|
465
|
+
credentialConfigured: boolean;
|
|
466
|
+
/** webdav 通道:username/password 是否已配置(值永不返回;git 通道为 undefined) */
|
|
467
|
+
webdav?: {
|
|
468
|
+
usernameConfigured: boolean;
|
|
469
|
+
passwordConfigured: boolean;
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
/** 可同步分区条目(status.syncSections 项)。 */
|
|
473
|
+
interface SyncSectionInfo {
|
|
474
|
+
id: SectionId;
|
|
475
|
+
/** 展示名(host adapter displayName) */
|
|
476
|
+
displayName: string;
|
|
477
|
+
defaultIncluded: boolean;
|
|
478
|
+
}
|
|
479
|
+
/** push 请求体(token 可选:非空则 Host 先写入 DSH credentials 再使用)。
|
|
480
|
+
* 扁平形状与 Host parseSyncBody 一致:git 携带 repoUrl/token;
|
|
481
|
+
* webdav 携带 url/username/password(顶层,不嵌套 webdav 对象)。
|
|
482
|
+
* git 可执行文件固定使用系统 PATH 中的 git,不再接受自定义路径。
|
|
483
|
+
* sections 可选(自定义同步模式):只推送勾选分区;缺省 = 全部推荐分区。
|
|
484
|
+
* 快照恒为明文:勾选即同步,不加密、不脱敏。 */
|
|
485
|
+
interface SyncPushPayload {
|
|
486
|
+
/** 通道类型;缺省 'git' */
|
|
487
|
+
transport?: SyncTransportType;
|
|
488
|
+
repoUrl?: string;
|
|
489
|
+
token?: string;
|
|
490
|
+
/** webdav 通道字段(transport='webdav' 时使用;扁平顶层) */
|
|
491
|
+
url?: string;
|
|
492
|
+
username?: string;
|
|
493
|
+
password?: string;
|
|
494
|
+
/** 仅同步指定分区(缺省 = 全部推荐分区) */
|
|
495
|
+
sections?: SectionId[];
|
|
496
|
+
}
|
|
497
|
+
/** pull 请求体(strategy 缺省 replace:远端值覆盖本地;snapshotId 缺省 = 最新)。 */
|
|
498
|
+
interface SyncPullPayload extends SyncPushPayload {
|
|
499
|
+
strategy?: 'merge' | 'replace' | 'skipExisting';
|
|
500
|
+
snapshotId?: string;
|
|
501
|
+
}
|
|
502
|
+
/** GET /sync/snapshots-list 响应:远端历史快照列表(按 createdAt 倒序)。 */
|
|
503
|
+
interface SyncSnapshotsListResponse {
|
|
504
|
+
ok: boolean;
|
|
505
|
+
/** 按 createdAt 倒序(最新在前) */
|
|
506
|
+
snapshots: SyncSnapshotLite[];
|
|
507
|
+
/** 当前本地祖先指针(sync-state.lastSnapshotId),用于高亮当前基线 */
|
|
508
|
+
currentSnapshotId?: string;
|
|
509
|
+
}
|
|
510
|
+
/** 远端快照摘要(「选择历史快照」下拉项)。 */
|
|
511
|
+
interface SyncSnapshotLite {
|
|
512
|
+
id: string;
|
|
513
|
+
createdAt: string;
|
|
514
|
+
sectionCount: number;
|
|
515
|
+
platform: string;
|
|
516
|
+
dshVersion: string;
|
|
517
|
+
}
|
|
518
|
+
/** POST /sync/sync 请求体(一键同步第一步:拉取 → 差异确认会话)。 */
|
|
519
|
+
interface SyncStartPayload extends SyncPushPayload {
|
|
520
|
+
/** 缺省 = 最新快照;传入则对该历史快照拉取 */
|
|
521
|
+
snapshotId?: string;
|
|
522
|
+
}
|
|
523
|
+
/** POST /sync/sync 响应:差异确认会话(items 供 UI 逐项确认)。 */
|
|
524
|
+
interface SyncStartResponse {
|
|
525
|
+
ok: boolean;
|
|
526
|
+
/** 差异确认会话 id:后续 apply-items / cancel 引用 */
|
|
527
|
+
syncSessionId: string;
|
|
528
|
+
/** 被拉取的远端快照 id */
|
|
529
|
+
snapshotId: string;
|
|
530
|
+
items: SyncConfirmItem[];
|
|
531
|
+
/** 是否包含任何需人工决策项 */
|
|
532
|
+
needsReview: boolean;
|
|
533
|
+
compatibility: 'excellent' | 'good' | 'partial' | 'unsupported';
|
|
534
|
+
message?: string;
|
|
535
|
+
}
|
|
536
|
+
/** 单条可确认的差异项(由 ImportPlan.item 投影 + 冲突详情)。 */
|
|
537
|
+
interface SyncConfirmItem {
|
|
538
|
+
itemId: string;
|
|
539
|
+
adapter: SectionId;
|
|
540
|
+
kind: PlanItemKind;
|
|
541
|
+
description: string;
|
|
542
|
+
/** 变更详情(如插件「当前 1.1 vs 导入 1.6」),与导入恢复向导展示一致 */
|
|
543
|
+
detail?: string;
|
|
544
|
+
severity: 'info' | 'warning' | 'error';
|
|
545
|
+
/** 默认采纳方向;Conflict/MissingSecret 等人工项默认 false */
|
|
546
|
+
defaultAdopt: boolean;
|
|
547
|
+
/** 用户最终决策(缺省 = defaultAdopt) */
|
|
548
|
+
adopt: boolean;
|
|
549
|
+
/** 冲突项内联解决所需详情(仅 Conflict 项非空) */
|
|
550
|
+
conflict?: SyncConflictDetail;
|
|
551
|
+
/** 该项若采用将写入的目标摘要 */
|
|
552
|
+
target?: {
|
|
553
|
+
adapter: SectionId;
|
|
554
|
+
ref: string;
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
/** 冲突项内联解决详情(来源 MergeConflict + 可读 diff)。 */
|
|
558
|
+
interface SyncConflictDetail {
|
|
559
|
+
path: string;
|
|
560
|
+
kind: 'key' | 'file' | 'section';
|
|
561
|
+
local?: unknown;
|
|
562
|
+
remote?: unknown;
|
|
563
|
+
ancestor?: unknown;
|
|
564
|
+
diff?: string;
|
|
565
|
+
}
|
|
566
|
+
/** POST /sync/apply-items 请求体(一键同步第二步:按逐项决策执行导入)。 */
|
|
567
|
+
interface ApplyItemsPayload {
|
|
568
|
+
syncSessionId: string;
|
|
569
|
+
/** 每项的最终采纳决策(未列出项视为 adopt=false) */
|
|
570
|
+
adoptions: SyncItemAdoption[];
|
|
571
|
+
}
|
|
572
|
+
/** 单条采纳决策。 */
|
|
573
|
+
interface SyncItemAdoption {
|
|
574
|
+
itemId: string;
|
|
575
|
+
adopt: boolean;
|
|
576
|
+
/** 冲突项解决方案(仅当该项是 Conflict 且 adopt=true 时必须)。
|
|
577
|
+
* 与导入恢复向导一致:keepLocal=保留当前 / useRemote=使用导入;跳过 = adopt=false。 */
|
|
578
|
+
resolution?: 'useRemote' | 'keepLocal';
|
|
579
|
+
}
|
|
580
|
+
/** POST /sync/apply-items 响应。 */
|
|
581
|
+
interface ApplyItemsResponse {
|
|
582
|
+
ok: boolean;
|
|
583
|
+
applied: string[];
|
|
584
|
+
skipped: string[];
|
|
585
|
+
needsRestart: boolean;
|
|
586
|
+
warnings: string[];
|
|
587
|
+
/** 应用前快照 id(UI 一键回滚用) */
|
|
588
|
+
restoreId: string;
|
|
589
|
+
/** 任一失败是否整体回滚 */
|
|
590
|
+
rolledBack: boolean;
|
|
591
|
+
failed: {
|
|
592
|
+
itemId: string;
|
|
593
|
+
message?: string;
|
|
594
|
+
}[];
|
|
595
|
+
result: unknown;
|
|
596
|
+
}
|
|
597
|
+
/** 统一间隔类型。 */
|
|
598
|
+
type AutosyncInterval = '5m' | '15m' | '30m' | '60m' | '6h' | '12h' | '24h';
|
|
599
|
+
/** 最近一次自动同步执行状态。 */
|
|
600
|
+
type AutosyncRunStatus = 'success' | 'skipped' | 'failed' | 'partial';
|
|
601
|
+
/** GET/POST /sync/autosync 响应:自动同步状态。 */
|
|
602
|
+
interface AutosyncStatusResponse {
|
|
603
|
+
enabled: boolean;
|
|
604
|
+
interval: AutosyncInterval;
|
|
605
|
+
lastRunAt?: string;
|
|
606
|
+
lastRunStatus?: AutosyncRunStatus;
|
|
607
|
+
lastRunMessage?: string;
|
|
608
|
+
consecutiveFailures: number;
|
|
609
|
+
/** 距上次自动同步已过 ms(host 计算,供 UI 倒计时/立即触发判断) */
|
|
610
|
+
elapsedMs: number;
|
|
611
|
+
lastRunHistoryId?: string;
|
|
612
|
+
}
|
|
613
|
+
/** POST /sync/autosync 请求体(transport 指定目标通道;git/webdav 各自独立)。 */
|
|
614
|
+
interface AutosyncUpdatePayload {
|
|
615
|
+
/** 目标通道(git/webdav 各自独立的开关/间隔/状态;缺省 git) */
|
|
616
|
+
transport?: SyncTransportType;
|
|
617
|
+
enabled: boolean;
|
|
618
|
+
interval?: AutosyncInterval;
|
|
619
|
+
startupMinIntervalMs?: number;
|
|
620
|
+
}
|
|
621
|
+
/** 自动同步执行记录(§3.7 AutosyncHistoryEntry)。 */
|
|
622
|
+
interface AutosyncHistoryEntry {
|
|
623
|
+
/** 触发该次运行的同步通道(git / webdav;旧记录缺省 undefined) */
|
|
624
|
+
transport?: SyncTransportType;
|
|
625
|
+
direction: 'pull' | 'push' | 'both';
|
|
626
|
+
status: 'success' | 'skipped' | 'failed' | 'partial';
|
|
627
|
+
/** 跳过原因(冲突项 / 缺失依赖 / Install / 错误 / 无远端 / 网络) */
|
|
628
|
+
skipReason?: string;
|
|
629
|
+
/** 被跳过的冲突分区 id(冲突跳过时列出) */
|
|
630
|
+
conflictedSections?: string[];
|
|
631
|
+
/** 本次自动合并实际写入的分区 */
|
|
632
|
+
appliedSections?: string[];
|
|
633
|
+
/** 本次 push 产生的快照 id */
|
|
634
|
+
pushedSnapshotId?: string;
|
|
635
|
+
/** 本次 pull 来源快照 id */
|
|
636
|
+
pulledSnapshotId?: string;
|
|
637
|
+
error?: string;
|
|
638
|
+
notifiedAt?: string;
|
|
639
|
+
/** 本次触发时的连续失败计数 */
|
|
640
|
+
failureCountAtRun: number;
|
|
641
|
+
createdAt: string;
|
|
642
|
+
}
|
|
643
|
+
/** 同步历史条目(Host 端返回;kind='autosync' 时 autosync 非空)。 */
|
|
644
|
+
interface SyncHistoryEntry {
|
|
645
|
+
id: string;
|
|
646
|
+
createdAt: string;
|
|
647
|
+
kind: 'push' | 'pull' | 'apply' | 'autosync' | 'rollback';
|
|
648
|
+
sectionCount?: number;
|
|
649
|
+
reviewCount?: number;
|
|
650
|
+
/** 快照类条目的触发通道(git / webdav;旧快照缺省 undefined) */
|
|
651
|
+
transport?: string;
|
|
652
|
+
autosync?: AutosyncHistoryEntry;
|
|
653
|
+
}
|
|
654
|
+
/** GET /sync/history 响应:{ entries }。 */
|
|
655
|
+
interface SyncHistoryResponse {
|
|
656
|
+
entries: SyncHistoryEntry[];
|
|
657
|
+
}
|
|
658
|
+
/** POST /sync/github/start 响应:UI 展示用(device_code 只存宿主,绝不回传) */
|
|
659
|
+
interface GithubDeviceFlowStartResponse {
|
|
660
|
+
/** 随机 flowId:后续 poll/cancel 凭它引用宿主侧登记的 device_code */
|
|
661
|
+
flowId: string;
|
|
662
|
+
/** 一次性用户码(用户在 GitHub 授权页输入) */
|
|
663
|
+
userCode: string;
|
|
664
|
+
/** GitHub 授权页 URL(用户浏览器打开) */
|
|
665
|
+
verificationUri: string;
|
|
666
|
+
/** 设备码过期秒数 */
|
|
667
|
+
expiresIn: number;
|
|
668
|
+
/** GitHub 建议轮询间隔秒数 */
|
|
669
|
+
interval: number;
|
|
670
|
+
}
|
|
671
|
+
/** POST /sync/github/poll 响应状态 */
|
|
672
|
+
type GithubPollStatus = 'pending' | 'success' | 'denied' | 'expired' | 'error';
|
|
673
|
+
/** POST /sync/github/poll 响应:成功时 token 已由 Host 写入 DSH credentials(值永不回传) */
|
|
674
|
+
interface GithubPollResponse {
|
|
675
|
+
status: GithubPollStatus;
|
|
676
|
+
/** pending:下次轮询前应等待的毫秒数 */
|
|
677
|
+
pollDelayMs?: number;
|
|
678
|
+
/** 终止态错误码(GitHub error code) */
|
|
679
|
+
errorCode?: string;
|
|
680
|
+
/** 终止态可展示消息(来自 GitHub error_description / 宿主文案,不含秘密) */
|
|
681
|
+
message?: string;
|
|
682
|
+
/** success 时恒 true(凭据已配置);便于 UI 直接刷新状态 */
|
|
683
|
+
credentialConfigured?: boolean;
|
|
684
|
+
}
|
|
685
|
+
/** POST /sync/github/validate 响应:token 是否已配置 + 是否有效(GET /user;
|
|
686
|
+
* 401 → 无效)。只回布尔 + 登录名(非敏感),token 值永不回传浏览器。 */
|
|
687
|
+
interface GithubValidateResponse {
|
|
688
|
+
ok: boolean;
|
|
689
|
+
/** token 是否存在于 DSH credentials */
|
|
690
|
+
configured: boolean;
|
|
691
|
+
/** token 是否有效(GitHub GET /user 成功;configured=false 时恒 false) */
|
|
692
|
+
valid: boolean;
|
|
693
|
+
/** GitHub 登录名(valid=true 时;非敏感展示位) */
|
|
694
|
+
login?: string;
|
|
695
|
+
}
|
|
696
|
+
/** 远程同步浏览器半数据入口(备份与迁移页第 4 个 tab 的注入业务面) */
|
|
697
|
+
declare class SyncApi {
|
|
698
|
+
readonly t: UiT;
|
|
699
|
+
constructor(t?: UiT);
|
|
700
|
+
/** 读取同步状态(配置 / 凭据 / 上次同步时间 / 分区数) */
|
|
701
|
+
status(): Promise<SyncStatusResponse>;
|
|
702
|
+
/** 推送:导出勾选分区 → 提交到私有 Git 仓库 → 更新 sync-state */
|
|
703
|
+
push(payload: SyncPushPayload): Promise<SyncPushReport>;
|
|
704
|
+
/** P0-②:push 前只读预览(「将推送什么」,零写入远端)——body.preview=true 触发 */
|
|
705
|
+
pushPreview(payload: SyncPushPayload): Promise<SyncPushPreview>;
|
|
706
|
+
/** 拉取差异预览:拉取远端最新快照 → 只读分析(绝不执行导入) */
|
|
707
|
+
pull(payload: SyncPullPayload): Promise<SyncPullReport>;
|
|
708
|
+
/** GitHub OAuth device flow:发起登录,返回一次性用户码 + 授权页 URL + flowId */
|
|
709
|
+
githubStart(): Promise<GithubDeviceFlowStartResponse>;
|
|
710
|
+
/** GitHub OAuth device flow:凭 flowId 轮询授权结果(成功时 token 已由 Host 写入 credentials) */
|
|
711
|
+
githubPoll(flowId: string): Promise<GithubPollResponse>;
|
|
712
|
+
/** GitHub OAuth device flow:取消(丢弃宿主侧登记,零副作用) */
|
|
713
|
+
githubCancel(flowId: string): Promise<{
|
|
714
|
+
ok: boolean;
|
|
715
|
+
}>;
|
|
716
|
+
/** GitHub token 有效性校验(判定「是否已登录」:token 存在且 GitHub API 接受;
|
|
717
|
+
* 401 → valid:false 引导重新登录;非 401 错误向上抛,UI 兜底不误判登出) */
|
|
718
|
+
githubValidate(): Promise<GithubValidateResponse>;
|
|
719
|
+
/** 同步历史:列出本地祖先快照 + 自动同步执行记录(按 createdAt 倒序合并)。 */
|
|
720
|
+
history(): Promise<SyncHistoryResponse>;
|
|
721
|
+
/** 远端历史快照列表(供「选择历史快照」下拉)。 */
|
|
722
|
+
snapshotsList(payload: SyncPushPayload): Promise<SyncSnapshotsListResponse>;
|
|
723
|
+
/** 一键同步第一步:拉取 → 差异确认会话(items 逐项确认,暂不导入)。 */
|
|
724
|
+
sync(payload: SyncStartPayload): Promise<SyncStartResponse>;
|
|
725
|
+
/** 一键同步第二步:按用户对差异项的逐项决策执行导入。 */
|
|
726
|
+
applyItems(payload: ApplyItemsPayload): Promise<ApplyItemsResponse>;
|
|
727
|
+
/** 取消/清理差异确认会话(丢弃临时 ZIP,零副作用)。 */
|
|
728
|
+
cancel(syncSessionId: string): Promise<{
|
|
729
|
+
ok: boolean;
|
|
730
|
+
}>;
|
|
731
|
+
/** 自动同步状态(GET /sync/autosync 返回全部通道的 { git, webdav },各自独立)。 */
|
|
732
|
+
autosyncStatusAll(): Promise<Record<SyncTransportType, AutosyncStatusResponse>>;
|
|
733
|
+
/** 自动同步状态(指定通道;从全部通道状态中取)。 */
|
|
734
|
+
autosyncStatus(transport?: SyncTransportType): Promise<AutosyncStatusResponse>;
|
|
735
|
+
/** 自动同步配置更新(POST /sync/autosync;payload.transport 指定目标通道)。 */
|
|
736
|
+
autosyncUpdate(payload: AutosyncUpdatePayload): Promise<AutosyncStatusResponse>;
|
|
737
|
+
/** 保存同步分区选择(POST /sync/selection):模式 + 勾选分区持久化到 Host。
|
|
738
|
+
* 自动同步调度器与手动 push 共用此配置(刷新/重启后仍然生效)。 */
|
|
739
|
+
saveSelection(payload: SyncSelectionPayload): Promise<SyncSelectionPayload>;
|
|
740
|
+
/** 保存同步通道配置(POST /sync/config):url/username/password(git: repoUrl/token)持久化。
|
|
741
|
+
* password/token 经 Host 写入 DSH credentials(值永不回传);返回凭据布尔供 UI 刷新徽章。 */
|
|
742
|
+
saveConfig(payload: SyncPushPayload): Promise<SyncConfigSaveResponse>;
|
|
743
|
+
/** 保存插件 UI 偏好(POST /sync/ui-prefs):当前为上次选择的同步通道(ui-prefs.json,
|
|
744
|
+
* 随 self 分区进导出备份)。纯偏好无 secret;失败由调用方静默降级(localStorage 兜底)。 */
|
|
745
|
+
saveUiPrefs(payload: {
|
|
746
|
+
lastSyncChannel?: 'git' | 'webdav';
|
|
747
|
+
}): Promise<{
|
|
748
|
+
ok: boolean;
|
|
749
|
+
lastSyncChannel?: 'git' | 'webdav';
|
|
750
|
+
}>;
|
|
751
|
+
/** 一键回滚:按 restoreId 调用 backup→rollback */
|
|
752
|
+
rollback(payload: {
|
|
753
|
+
restoreId: string;
|
|
754
|
+
}): Promise<{
|
|
755
|
+
ok: boolean;
|
|
756
|
+
full: boolean;
|
|
757
|
+
}>;
|
|
758
|
+
}
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region src/client/client-types.d.ts
|
|
761
|
+
/** 本插件 Client 半的注入业务面:每个 settings.section 注册项都拿到同一个 api 实例 */
|
|
762
|
+
interface ConfigManagerSectionInjected {
|
|
763
|
+
api: ConfigManagerApi;
|
|
764
|
+
/** 远程同步 API */
|
|
765
|
+
syncApi: SyncApi;
|
|
766
|
+
/** 远程同步 locale(config-manager-sync 命名空间) */
|
|
767
|
+
syncT: import('@deepseek-ai/dsh-client-ui-slots').TranslateNS<'config-manager-sync'>;
|
|
768
|
+
}
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region src/client/locales.d.ts
|
|
771
|
+
/**
|
|
772
|
+
* Config Manager 表面文案:zh 为源语言,en 镜像每个键。
|
|
773
|
+
* 字典 namespace 由 client/index.ts 注册(declare module 合并进 LocaleNamespaceMap)。
|
|
774
|
+
* 键集合通过 `ConfigManagerKey` 类型在注册处做编译期校验(缺键/多键即编译错误)。
|
|
775
|
+
* 宽读法精简版:仅保留同步页与基础 Shell/Toast 文案。
|
|
776
|
+
*/
|
|
777
|
+
declare const zh$1: {
|
|
778
|
+
'section.label': string;
|
|
779
|
+
'section.description': string;
|
|
780
|
+
'view.sync': string;
|
|
781
|
+
'nav.sync': string;
|
|
782
|
+
'common.close': string;
|
|
783
|
+
'common.cancel': string;
|
|
784
|
+
'common.confirm': string;
|
|
785
|
+
'common.retry': string;
|
|
786
|
+
'common.loading': string;
|
|
787
|
+
'common.unknownError': string;
|
|
788
|
+
'toast.copied': string;
|
|
789
|
+
'toast.copyFailed': string;
|
|
790
|
+
'toast.refreshed': string;
|
|
791
|
+
'shell.status.running': string;
|
|
792
|
+
'shell.status.idle': string;
|
|
793
|
+
'shell.version': string;
|
|
794
|
+
};
|
|
795
|
+
type ConfigManagerKey = keyof typeof zh$1;
|
|
796
|
+
//#endregion
|
|
797
|
+
//#region src/client/sync/sync-locales.d.ts
|
|
798
|
+
/**
|
|
799
|
+
* 远程同步设置区块(config-manager-sync)表面文案:zh 为源语言,en 镜像每个键。
|
|
800
|
+
* 独立命名空间、独立文件:不触碰共享的 locales.ts(并行会话已改),零冲突。
|
|
801
|
+
* 键集合经 `SyncKey` 类型在 client/index.ts 注册处做编译期校验。
|
|
802
|
+
*/
|
|
803
|
+
declare const zh: {
|
|
804
|
+
readonly 'section.label': '远程同步';
|
|
805
|
+
readonly 'section.description': '通过私有 Git / WebDAV 通道在设备间同步 DSH 配置(明文,私有通道自用)';
|
|
806
|
+
readonly privateRepoHint: '安全要求:同步仓库必须为私有仓库(public 仓库会公开你的配置内容)。认证 token 仅用于仓库访问,绝不写入同步文件、提交内容或日志。';
|
|
807
|
+
readonly 'config.title': '仓库配置';
|
|
808
|
+
readonly 'config.repoUrl': '仓库地址';
|
|
809
|
+
readonly 'config.repoUrlHint': 'Git 私有仓库地址(https / ssh / 本地路径)。认证 token 请使用下方凭据字段,不要拼入地址。';
|
|
810
|
+
readonly 'config.token': '认证 token';
|
|
811
|
+
readonly 'config.tokenHint': '将安全写入 DSH credentials(引用名 {ref}),不会写入同步文件或日志。留空表示沿用已保存的凭据。';
|
|
812
|
+
readonly 'config.tokenSaved': '凭据已配置';
|
|
813
|
+
readonly 'config.tokenPlaceholder': 'ghp_…(可选)';
|
|
814
|
+
readonly 'config.save': '保存配置';
|
|
815
|
+
readonly 'config.saving': '保存中…';
|
|
816
|
+
readonly 'config.saveHint': '表单改动会自动保存(密码/token 安全写入 DSH credentials,不会写入同步文件或日志);也可点击按钮立即保存。';
|
|
817
|
+
readonly 'channel.title': '同步通道';
|
|
818
|
+
readonly 'channel.git': 'Git 私有仓库';
|
|
819
|
+
readonly 'channel.webdav': 'WebDAV 服务器';
|
|
820
|
+
readonly 'channel.perChannelHint': 'GitHub 与 WebDAV 通道的自动同步、同步模式与远端快照各自独立配置。';
|
|
821
|
+
readonly 'channel.open': '配置同步通道';
|
|
822
|
+
readonly 'channel.openHint': '远程同步通过「同步通道」进行:Git 私有仓库或 WebDAV 服务器。点击按钮在弹窗中配置或修改。';
|
|
823
|
+
readonly 'channel.configured': '已配置';
|
|
824
|
+
readonly 'channel.notConfigured': '未配置';
|
|
825
|
+
readonly 'channel.currentUrl': '当前地址';
|
|
826
|
+
readonly 'syncStatus.lastSync': '上次同步';
|
|
827
|
+
readonly 'syncStatus.sections': '可同步分区';
|
|
828
|
+
readonly 'syncStatus.state': '配置状态';
|
|
829
|
+
readonly 'webdav.title': 'WebDAV 配置';
|
|
830
|
+
readonly 'webdav.url': '服务器地址';
|
|
831
|
+
readonly 'webdav.urlHint': 'WebDAV 服务器根地址(https://…)。同步快照与索引存放于该地址的 dsh-config-manager/ 子目录下。请勿在地址中包含用户名/密码。';
|
|
832
|
+
readonly 'webdav.username': '用户名';
|
|
833
|
+
readonly 'webdav.usernameHint': 'HTTP Basic 认证用户名(非敏感,可回显)。';
|
|
834
|
+
readonly 'webdav.password': '密码';
|
|
835
|
+
readonly 'webdav.passwordHint': '将安全写入 DSH credentials(引用名 {ref}),不会写入同步文件或日志。留空表示沿用已保存的凭据。';
|
|
836
|
+
readonly 'webdav.passwordSaved': '凭据已配置';
|
|
837
|
+
readonly 'webdav.passwordPlaceholder': '密码(可选)';
|
|
838
|
+
readonly 'webdav.presetHint': '选择常见 WebDAV 服务器可快速填入地址;含 <占位符> 的模板请替换为你的真实服务器/用户名。';
|
|
839
|
+
readonly 'github.title': 'GitHub 登录';
|
|
840
|
+
readonly 'github.description': '通过 GitHub OAuth 设备码流程授权:无需手动输入 token,在浏览器中确认授权后,token 自动写入 DSH credentials。';
|
|
841
|
+
readonly 'github.login': '使用 GitHub 登录';
|
|
842
|
+
readonly 'github.retry': '重新登录';
|
|
843
|
+
readonly 'github.cancel': '取消';
|
|
844
|
+
readonly 'github.tokenInvalid': 'GitHub 登录已失效,请重新登录。';
|
|
845
|
+
readonly 'github.userCode': '一次性授权代码';
|
|
846
|
+
readonly 'github.openAuth': '打开 GitHub 授权页面';
|
|
847
|
+
readonly 'github.clientIdHint': '需要插件配置 githubClientId(GitHub OAuth App 的 client_id)才能使用 GitHub 登录。';
|
|
848
|
+
readonly 'status.title': '同步状态';
|
|
849
|
+
readonly 'status.never': '从未同步';
|
|
850
|
+
readonly 'action.push': '推送到远端';
|
|
851
|
+
readonly 'action.pull': '拉取差异预览';
|
|
852
|
+
readonly 'action.pushing': '正在推送…';
|
|
853
|
+
readonly 'action.pulling': '正在拉取…';
|
|
854
|
+
readonly 'push.title': '推送结果';
|
|
855
|
+
readonly 'pull.title': '拉取差异预览';
|
|
856
|
+
readonly 'pull.previewHint': '以上为只读差异预览,不会执行导入。当前版本暂不支持一键导入;如需应用远端配置,请使用「导入恢复」向导手动导入导出的备份。';
|
|
857
|
+
readonly 'pull.needsReview': '包含需要人工决策的项(冲突 / 密钥 / 依赖 / 安装)';
|
|
858
|
+
readonly 'pull.empty': '远端快照与本地一致(无变更)';
|
|
859
|
+
readonly 'change.total': '共 {total} 项变更';
|
|
860
|
+
readonly 'sections.title': '同步分区';
|
|
861
|
+
readonly 'warnings.title': '分区告警';
|
|
862
|
+
readonly 'syncflow.title': '一键同步';
|
|
863
|
+
readonly 'syncflow.button': '一键同步';
|
|
864
|
+
readonly 'syncflow.syncing': '正在同步…';
|
|
865
|
+
readonly 'syncflow.syncFailed': '同步失败';
|
|
866
|
+
readonly 'syncflow.snapshotOption': '({date} · {count} 分区)';
|
|
867
|
+
readonly 'syncflow.selectSnapshot': '选择历史快照';
|
|
868
|
+
readonly 'syncflow.refreshSnapshots': '刷新快照列表';
|
|
869
|
+
readonly 'syncflow.refreshingSnapshots': '正在获取…';
|
|
870
|
+
readonly 'syncflow.latestSnapshot': '最新快照';
|
|
871
|
+
readonly 'syncflow.noSnapshots': '远端暂无快照';
|
|
872
|
+
readonly 'syncflow.confirmImport': '确认导入';
|
|
873
|
+
readonly 'syncflow.cancel': '取消';
|
|
874
|
+
readonly 'syncflow.adoptRemote': '采用远端';
|
|
875
|
+
readonly 'syncflow.adoptHint': '勾选 = 导入该项;取消 = 跳过';
|
|
876
|
+
readonly 'syncflow.needsReviewBadge': '需人工决策';
|
|
877
|
+
readonly 'syncflow.empty': '远端快照与本地一致(无变更)';
|
|
878
|
+
readonly 'syncflow.diffCount': '共 {count} 项差异';
|
|
879
|
+
readonly 'syncflow.keepLocalAll': '全部保留当前配置';
|
|
880
|
+
readonly 'syncflow.useRemoteAll': '全部使用备份配置';
|
|
881
|
+
readonly 'syncflow.bulkHint': '批量决策仅作用于冲突项;其余差异默认自动采用。';
|
|
882
|
+
readonly 'syncflow.conflictTitle': '冲突解决';
|
|
883
|
+
readonly 'syncflow.conflictUseLocal': '保留当前';
|
|
884
|
+
readonly 'syncflow.conflictUseRemote': '使用备份';
|
|
885
|
+
readonly 'syncflow.conflictLocalLabel': '当前';
|
|
886
|
+
readonly 'syncflow.conflictRemoteLabel': '备份';
|
|
887
|
+
readonly 'syncflow.conflictAncestorLabel': '共同祖先';
|
|
888
|
+
readonly 'syncflow.conflictUnresolved': '冲突项 {itemId} 尚未选择解决方式(保留当前 / 使用备份)';
|
|
889
|
+
readonly 'syncflow.diff': '差异';
|
|
890
|
+
readonly 'syncflow.importDone': '已导入 {n} 个分区';
|
|
891
|
+
readonly 'syncflow.importFailed': '导入失败(已整体回滚)';
|
|
892
|
+
readonly 'syncflow.importedSections': '已写入';
|
|
893
|
+
readonly 'syncflow.importWarnings': '导入告警';
|
|
894
|
+
readonly 'syncflow.rollback': '回滚到应用前';
|
|
895
|
+
readonly 'syncflow.rollingBack': '正在回滚…';
|
|
896
|
+
readonly 'syncflow.rollbackDone': '已回滚到应用前';
|
|
897
|
+
readonly 'syncflow.needsRestart': '部分改动需要重启 DSH 后生效';
|
|
898
|
+
readonly 'syncflow.pushPreviewTitle': '确认推送';
|
|
899
|
+
readonly 'syncflow.pushPreviewSections': '将推送的分区';
|
|
900
|
+
readonly 'syncflow.pushConfirm': '确认推送';
|
|
901
|
+
readonly 'syncflow.pushing': '正在推送…';
|
|
902
|
+
readonly 'syncflow.pushFirstBaseline': '远端暂无快照:本次将创建首个同步基线';
|
|
903
|
+
readonly 'mode.title': '同步模式';
|
|
904
|
+
readonly 'mode.hint': '选择推送时导出哪些分区:默认 = 推荐分区一键推送(快速导出);高级 = 自定义勾选(自定义导出)。';
|
|
905
|
+
readonly 'mode.default': '默认(快速导出)';
|
|
906
|
+
readonly 'mode.defaultHint': '一键推送全部推荐分区(settings、providers、plugins、prompts、skills 等),无需配置。';
|
|
907
|
+
readonly 'mode.advanced': '高级(自定义导出)';
|
|
908
|
+
readonly 'mode.advancedHint': '手动勾选要推送的分区;未勾选任何分区时回退为全部推荐分区。';
|
|
909
|
+
readonly 'mode.sectionsTitle': '同步分区';
|
|
910
|
+
readonly 'mode.sectionsHint': '所有分区都可勾选同步(标「推荐」的默认勾选);快照为明文,仅同步到你自己配置的私有通道。';
|
|
911
|
+
readonly 'mode.atLeastOne': '请至少勾选一个同步分区';
|
|
912
|
+
readonly 'mode.defaultCount': '将同步 {n} 个推荐分区';
|
|
913
|
+
readonly 'mode.sectionRecommended': '推荐';
|
|
914
|
+
readonly 'mode.persistHint': '模式与分区选择已保存到本机:自动同步和手动推送都会使用此配置(重启后仍生效)。';
|
|
915
|
+
readonly 'autosync.title': '自动同步';
|
|
916
|
+
readonly 'autosync.description': '开启后,DSH 在后台保持配置一致:本地配置有改动时自动上传,检测到远端有新快照时才自动拉取覆盖;定时器仅作兜底轮询,无变化不重复动作。仅在无冲突且无需人工干预时才自动写入本地。';
|
|
917
|
+
readonly 'autosync.enable': '启用自动同步';
|
|
918
|
+
readonly 'autosync.interval': '兜底轮询间隔';
|
|
919
|
+
readonly 'autosync.intervalHint': '间隔到点 / DSH 启动时检查远端是否有新快照,有才拉取覆盖(不上传本地);本地配置改动会触发上传。';
|
|
920
|
+
readonly 'autosync.interval5m': '5 分钟';
|
|
921
|
+
readonly 'autosync.interval15m': '15 分钟';
|
|
922
|
+
readonly 'autosync.interval30m': '30 分钟';
|
|
923
|
+
readonly 'autosync.interval60m': '60 分钟';
|
|
924
|
+
readonly 'autosync.interval6h': '6 小时';
|
|
925
|
+
readonly 'autosync.interval12h': '12 小时';
|
|
926
|
+
readonly 'autosync.interval24h': '24 小时';
|
|
927
|
+
readonly 'autosync.status': '上次运行:{status}({time})';
|
|
928
|
+
readonly 'autosync.statusNever': '从未运行';
|
|
929
|
+
readonly 'autosync.nextRun': '下次约 {time} 后';
|
|
930
|
+
readonly 'autosync.due': '已到同步时间,即将执行';
|
|
931
|
+
readonly 'autosync.failCount': '连续失败 {n} 次';
|
|
932
|
+
readonly 'autosync.running': '自动同步进行中…';
|
|
933
|
+
readonly 'autosync.success': '成功';
|
|
934
|
+
readonly 'autosync.skipped': '已跳过';
|
|
935
|
+
readonly 'autosync.failed': '失败';
|
|
936
|
+
readonly 'autosync.partial': '部分成功';
|
|
937
|
+
readonly 'history.title': '同步历史';
|
|
938
|
+
readonly 'history.empty': '尚无同步历史';
|
|
939
|
+
readonly 'history.emptyHint': '完成首次 push / 一键同步 / 自动同步后,这里会显示记录。';
|
|
940
|
+
readonly 'history.colTime': '时间';
|
|
941
|
+
readonly 'history.colKind': '类型';
|
|
942
|
+
readonly 'history.colDetail': '详情';
|
|
943
|
+
readonly 'history.kindSnapshot': '快照';
|
|
944
|
+
readonly 'history.kindAutosync': '自动同步';
|
|
945
|
+
readonly 'history.sectionCount': '分区';
|
|
946
|
+
readonly 'history.detail': '明细';
|
|
947
|
+
readonly 'history.autosyncDirection': '方向:{direction}';
|
|
948
|
+
readonly 'history.autosyncPull': '下载';
|
|
949
|
+
readonly 'history.autosyncPush': '上传';
|
|
950
|
+
readonly 'history.autosyncBoth': '双向';
|
|
951
|
+
readonly 'history.autosyncSkipReason': '跳过原因:{reason}';
|
|
952
|
+
readonly 'history.autosyncReasonConflict': '冲突';
|
|
953
|
+
readonly 'history.autosyncReasonNoRemote': '无远端快照';
|
|
954
|
+
readonly 'history.autosyncReasonNotConfigured': '未配置仓库';
|
|
955
|
+
readonly 'history.autosyncReasonNetwork': '网络问题';
|
|
956
|
+
readonly 'history.autosyncConflicted': '跳过冲突分区:{sections}';
|
|
957
|
+
readonly 'history.autosyncApplied': '应用分区:{sections}';
|
|
958
|
+
readonly 'history.autosyncError': '错误:{error}';
|
|
959
|
+
readonly 'history.autosyncNotified': '已通知(连续失败 3 次)';
|
|
960
|
+
readonly 'history.column.snapshot': '快照';
|
|
961
|
+
readonly 'history.column.autosync': '自动同步';
|
|
962
|
+
readonly 'history.channelGit': 'GitHub';
|
|
963
|
+
readonly 'history.channelWebdav': 'WebDAV';
|
|
964
|
+
readonly 'history.stats.total': '共 {count} 条';
|
|
965
|
+
readonly 'history.stats.snapshots': '快照 {count}';
|
|
966
|
+
readonly 'history.stats.autosync': '自动同步 {count}';
|
|
967
|
+
readonly 'history.stats.failed': '失败 {count}';
|
|
968
|
+
readonly 'history.stats.skipped': '跳过 {count}';
|
|
969
|
+
readonly 'history.stats.summary': '同步历史统计';
|
|
970
|
+
readonly 'toast.autosyncLoadFailed': '读取自动同步状态失败';
|
|
971
|
+
readonly 'toast.configSaveFailed': '保存通道配置失败';
|
|
972
|
+
readonly 'toast.configSaved': '通道配置已保存';
|
|
973
|
+
readonly 'toast.configNothingToSave': '请先填写通道地址再保存';
|
|
974
|
+
readonly 'toast.selectionSaveFailed': '同步设置保存失败';
|
|
975
|
+
readonly 'toast.pushPreviewFailed': '推送预览失败';
|
|
976
|
+
readonly 'toast.pushFailed': '推送失败';
|
|
977
|
+
readonly 'toast.pushDone': '推送完成';
|
|
978
|
+
readonly 'toast.pullFailed': '拉取失败';
|
|
979
|
+
readonly 'toast.pullDone': '拉取完成';
|
|
980
|
+
readonly 'toast.syncStartFailed': '一键同步失败';
|
|
981
|
+
readonly 'toast.autosyncUpdateFailed': '自动同步设置更新失败';
|
|
982
|
+
readonly 'toast.autosyncUpdated': '自动同步设置已更新';
|
|
983
|
+
readonly 'toast.snapshotsLoadFailed': '读取远端快照失败';
|
|
984
|
+
readonly 'toast.snapshotsRefreshed': '远端快照列表已刷新';
|
|
985
|
+
readonly 'load.failed': '加载同步状态失败';
|
|
986
|
+
readonly 'common.close': '关闭';
|
|
987
|
+
readonly 'common.retry': '重试';
|
|
988
|
+
readonly 'common.loading': '加载中…';
|
|
989
|
+
};
|
|
990
|
+
/** 字典键联合(注册处 compile-time 校验) */
|
|
991
|
+
type SyncKey = keyof typeof zh;
|
|
992
|
+
//#endregion
|
|
993
|
+
//#region src/client/ConfigManagerSection.d.ts
|
|
994
|
+
type ConfigManagerSectionProps = PropsRuntime<'settings.section'> & ConfigManagerSectionInjected & {
|
|
995
|
+
t: TranslateNS<'config-manager'>;
|
|
996
|
+
};
|
|
997
|
+
//#endregion
|
|
998
|
+
//#region src/client/sync/SyncSettingsView.d.ts
|
|
999
|
+
interface SyncSettingsViewProps {
|
|
1000
|
+
api: SyncApi;
|
|
1001
|
+
t: TranslateNS<'config-manager-sync'>;
|
|
1002
|
+
}
|
|
1003
|
+
//#endregion
|
|
1004
|
+
//#region src/client/index.d.ts
|
|
1005
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
1006
|
+
interface LocaleNamespaceMap {
|
|
1007
|
+
/** Config Manager 表面文案。 */
|
|
1008
|
+
'config-manager': ConfigManagerKey;
|
|
1009
|
+
/** 远程同步设置区块文案。 */
|
|
1010
|
+
'config-manager-sync': SyncKey;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
/** 必需服务(fiber inject 等待 —— slots/locale 必须先就绪)。 */
|
|
1014
|
+
declare const inject: string[];
|
|
1015
|
+
/**
|
|
1016
|
+
* 注册 Config Manager 设置页。
|
|
1017
|
+
* @param ctx - client root context(slots + locale 服务)。
|
|
1018
|
+
*/
|
|
1019
|
+
declare function apply(ctx: ClientContext): void;
|
|
1020
|
+
//#endregion
|
|
1021
|
+
export { type ConfigManagerApiError, type ConfigManagerKey, type ConfigManagerSectionProps, type ServiceStatus, type SyncKey, type SyncSettingsViewProps, apply, inject };
|
|
1022
|
+
|
|
1023
|
+
return module.exports;
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
//# sourceMappingURL=client.d.ts.map
|