dsh-vault 1.6.0-rc.8 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-zh.md +3 -1
- package/README.md +3 -1
- package/lib/client.js +89 -72
- package/lib/client.js.map +1 -1
- package/lib/index.js +60 -0
- package/package.json +1 -1
package/README-zh.md
CHANGED
|
@@ -58,6 +58,7 @@ dsh-vault 是一个面向 DeepSeek Harness 的安全加密插件:把你在使
|
|
|
58
58
|
| `vault_rekey` | 原地升级 scrypt KDF 参数并重加密 |
|
|
59
59
|
| `vault_backup` | 带时间戳的加密备份,支持保留策略:超过 `maxBackups`(默认 10)的旧备份自动清理 |
|
|
60
60
|
| `vault_import_csv` | 从 CSV 批量导入凭据(自定义列变为 fields;`overwrite: true` 合并字段到已有条目,不再产生重复) |
|
|
61
|
+
| `vault_bulk_delete` | 按 query/kind/tag 或显式 ids 批量软删除条目;需 `confirm: true`(默认仅试运行);回收站可恢复 |
|
|
61
62
|
| `vault_apply_tags` | 按查询批量增/删/替换条目标签(支持 dry-run,不含密钥) |
|
|
62
63
|
| `vault_totp_uri` | 为存储的或裸 TOTP 密钥生成 otpauth:// 配置 URI |
|
|
63
64
|
| `vault_switch` / `vault_list` | 按名称切换当前保险库 / 列出可用保险库 |
|
|
@@ -78,6 +79,7 @@ dsh-vault 是一个面向 DeepSeek Harness 的安全加密插件:把你在使
|
|
|
78
79
|
| `vault_backup` / `vault_backup_now` | 时间戳加密备份,文件名 `<库名>-backups-YYYY-MM-DD_HH-MM-SS-<hex>.json`(库名+日期一目了然);自动保留最近 N 份 |
|
|
79
80
|
| `vault_restore_backup` | 从备份还原:`mode: "merge"`(默认)把备份条目复制进当前库,出现在条目列表;`mode: "replace"` 整体覆盖(先写安全快照) |
|
|
80
81
|
| `vault_vault_rename` / `vault_vault_delete` | 重命名命名库(文件移动,当前会话跟随)或永久删除(default 库受保护) |
|
|
82
|
+
| `vault_match_url` | 按 URL 查找匹配的登录条目(Bitwarden/1Password 风格:精确主机、子域、父域、路径前缀;www./端口归一化),带 0–100 评分——绝不返回密码 |
|
|
81
83
|
| `vault_fill` | 按 host/URL/用户名/标题匹配条目并返回其凭据 |
|
|
82
84
|
| `vault_env` | 把标记 env 的条目(tags 含 `env`)渲染为 `KEY=VALUE` 行 |
|
|
83
85
|
| `vault_export_bitwarden` / `vault_import_bitwarden` | Bitwarden/Vaultwarden JSON 互通(完整字段映射,支持覆盖) |
|
|
@@ -100,7 +102,7 @@ dsh-vault 是一个面向 DeepSeek Harness 的安全加密插件:把你在使
|
|
|
100
102
|
| `vault_session_close` | 关闭已打开的浏览器登录会话(已收集的 cookie 仍保留在保险库中) |
|
|
101
103
|
| `vault_session_prune` | 移除已保存会话中的过期 cookie(无过期的会话 cookie 保留);`preview: true` 只报告不修改 |
|
|
102
104
|
| `vault_copy` | 复制条目(含密钥)到另一个命名保险库 |
|
|
103
|
-
| `vault_templates` | 内建 + 用户自定义模板(save/list/remove,KeePassXC 风格) |
|
|
105
|
+
| `vault_templates` | 内建 + 用户自定义模板(save/list/remove,KeePassXC 风格);内建模板新增 Wi-Fi、服务器、数据库、身份、银行账户、银行卡(借鉴 1Password) | 内建 + 用户自定义模板(save/list/remove,KeePassXC 风格) |
|
|
104
106
|
|
|
105
107
|
**典型开发场景**:存一条 SSH 凭据(`kind: ssh` + host/port/username/password 或 privateKey),开发时让模型 `vault_search` 找主机、`vault_get` 取连接信息;存 API 网关的 `api-key`/`oauth` 条目管理 access/refresh token 轮换。
|
|
106
108
|
|
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ Each record has a `title`, an optional `kind`, and any combination of fields:
|
|
|
60
60
|
| `vault_rekey` | Upgrade the vault to fresh scrypt KDF parameters in place |
|
|
61
61
|
| `vault_backup` | Timestamped encrypted backup with retention; optional `note` |
|
|
62
62
|
| `vault_import_csv` | Bulk-import credentials from a CSV file (custom columns become fields; `overwrite: true` merges fields into existing entries instead of duplicating) |
|
|
63
|
+
| `vault_bulk_delete` | Soft-delete entries matching a query/kind/tag or explicit ids; `confirm: true` required (dry-run by default); trashed entries are restorable |
|
|
63
64
|
| `vault_apply_tags` | Bulk add/remove/replace tags on every entry matching a query (dry-run supported, no secrets) |
|
|
64
65
|
| `vault_totp_uri` | Build an otpauth:// provisioning URI for a stored or bare TOTP secret |
|
|
65
66
|
| `vault_switch` / `vault_list` | Switch the active vault by name / list available vaults |
|
|
@@ -80,6 +81,7 @@ Each record has a `title`, an optional `kind`, and any combination of fields:
|
|
|
80
81
|
| `vault_backup` / `vault_backup_now` | Timestamped encrypted backup named `<vault>-backups-YYYY-MM-DD_HH-MM-SS-<hex>.json` (owning vault + date visible); retention pruning keeps the newest N |
|
|
81
82
|
| `vault_restore_backup` | Restore from a backup: `mode: "merge"` (default) copies the backup entries INTO the current vault so they appear in the entries list; `mode: "replace"` overwrites the whole vault with a safety snapshot first |
|
|
82
83
|
| `vault_vault_rename` / `vault_vault_delete` | Rename a named vault (file moves, active session follows) or permanently delete one (default vault protected) |
|
|
84
|
+
| `vault_match_url` | Find login entries matching a URL (Bitwarden/1Password-style: exact host, subdomain, parent domain, path-prefix; www./port normalization) with a 0–100 score — never returns the password |
|
|
83
85
|
| `vault_fill` | Find the entry matching a host/URL/username/title and return its credentials |
|
|
84
86
|
| `vault_env` | Render env-flagged entries (tags contain `env`) as `KEY=VALUE` lines |
|
|
85
87
|
| `vault_export_bitwarden` / `vault_import_bitwarden` | Bitwarden/Vaultwarden JSON interop (full field mapping, overwrite support) |
|
|
@@ -102,7 +104,7 @@ Each record has a `title`, an optional `kind`, and any combination of fields:
|
|
|
102
104
|
| `vault_session_close` | Close an open browser login session (collected cookies stay in the vault) |
|
|
103
105
|
| `vault_session_prune` | Remove expired cookies from a saved session (session cookies are kept); `preview: true` reports without writing |
|
|
104
106
|
| `vault_copy` | Copy an entry (secrets included) into another named vault |
|
|
105
|
-
| `vault_templates` | Built-in + user-defined templates (save/list/remove), KeePassXC-style |
|
|
107
|
+
| `vault_templates` | Built-in + user-defined templates (save/list/remove), KeePassXC-style; built-ins now include Wi-Fi, Server, Database, Identity, Bank account, Card (1Password-inspired) | Built-in + user-defined templates (save/list/remove), KeePassXC-style |
|
|
106
108
|
|
|
107
109
|
**Typical workflows**: store an SSH credential (`kind: ssh` + host/port/username/password or privateKey) and have the model `vault_search` for the host then `vault_get` the connection details; keep `api-key`/`oauth` entries for API-gateway access/refresh token rotation.
|
|
108
110
|
|
package/lib/client.js
CHANGED
|
@@ -17,89 +17,89 @@ window.__ModuleLoader__.load({
|
|
|
17
17
|
document.head.appendChild(tag);
|
|
18
18
|
}
|
|
19
19
|
var VaultSection_module_css_default = {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"auditIssues": "t_j5va_auditIssues",
|
|
20
|
+
"rowExpired": "t_j5va_rowExpired",
|
|
21
|
+
"toolbar": "t_j5va_toolbar",
|
|
22
|
+
"status": "t_j5va_status",
|
|
23
|
+
"badge": "t_j5va_badge",
|
|
25
24
|
"detailItem": "t_j5va_detailItem",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
25
|
+
"pwFair": "t_j5va_pwFair",
|
|
26
|
+
"pwStrong": "t_j5va_pwStrong",
|
|
27
|
+
"copied": "t_j5va_copied",
|
|
28
|
+
"editorBody": "t_j5va_editorBody",
|
|
29
|
+
"addButton": "t_j5va_addButton",
|
|
30
|
+
"modeAuto": "t_j5va_modeAuto",
|
|
31
|
+
"scoreRing": "t_j5va_scoreRing",
|
|
31
32
|
"tabs": "t_j5va_tabs",
|
|
32
|
-
"
|
|
33
|
-
"empty": "t_j5va_empty",
|
|
33
|
+
"reportLine": "t_j5va_reportLine",
|
|
34
34
|
"secretField": "t_j5va_secretField",
|
|
35
|
-
"
|
|
36
|
-
"pwBar": "t_j5va_pwBar",
|
|
37
|
-
"section": "t_j5va_section",
|
|
38
|
-
"emptyHint": "t_j5va_emptyHint",
|
|
35
|
+
"badgeDanger": "t_j5va_badgeDanger",
|
|
39
36
|
"backupButton": "t_j5va_backupButton",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"reportBox": "t_j5va_reportBox",
|
|
43
|
-
"pwWeak": "t_j5va_pwWeak",
|
|
44
|
-
"copied": "t_j5va_copied",
|
|
45
|
-
"list": "t_j5va_list",
|
|
46
|
-
"resultCount": "t_j5va_resultCount",
|
|
47
|
-
"healthBar": "t_j5va_healthBar",
|
|
48
|
-
"modeAsk": "t_j5va_modeAsk",
|
|
49
|
-
"editorActions": "t_j5va_editorActions",
|
|
50
|
-
"identity": "t_j5va_identity",
|
|
51
|
-
"rowMain": "t_j5va_rowMain",
|
|
52
|
-
"field": "t_j5va_field",
|
|
53
|
-
"reportTitle": "t_j5va_reportTitle",
|
|
37
|
+
"modeReadonly": "t_j5va_modeReadonly",
|
|
38
|
+
"uriCode": "t_j5va_uriCode",
|
|
54
39
|
"badgeOk": "t_j5va_badgeOk",
|
|
55
|
-
"
|
|
56
|
-
"kindFilter": "t_j5va_kindFilter",
|
|
57
|
-
"deleteButton": "t_j5va_deleteButton",
|
|
58
|
-
"retryButton": "t_j5va_retryButton",
|
|
59
|
-
"pinStar": "t_j5va_pinStar",
|
|
60
|
-
"srOnly": "t_j5va_srOnly",
|
|
61
|
-
"scoreRing": "t_j5va_scoreRing",
|
|
62
|
-
"modeAuto": "t_j5va_modeAuto",
|
|
63
|
-
"genOpts": "t_j5va_genOpts",
|
|
64
|
-
"rowExpired": "t_j5va_rowExpired",
|
|
65
|
-
"editorBody": "t_j5va_editorBody",
|
|
66
|
-
"error": "t_j5va_error",
|
|
40
|
+
"searchBox": "t_j5va_searchBox",
|
|
67
41
|
"row": "t_j5va_row",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
42
|
+
"dupNames": "t_j5va_dupNames",
|
|
43
|
+
"reportTitle": "t_j5va_reportTitle",
|
|
44
|
+
"highBadge": "t_j5va_highBadge",
|
|
45
|
+
"tabActive": "t_j5va_tabActive",
|
|
46
|
+
"error": "t_j5va_error",
|
|
47
|
+
"rowActions": "t_j5va_rowActions",
|
|
48
|
+
"pwBar": "t_j5va_pwBar",
|
|
70
49
|
"emptyBox": "t_j5va_emptyBox",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"modeReadonly": "t_j5va_modeReadonly",
|
|
82
|
-
"footer": "t_j5va_footer",
|
|
83
|
-
"pwFair": "t_j5va_pwFair",
|
|
50
|
+
"rowMain": "t_j5va_rowMain",
|
|
51
|
+
"empty": "t_j5va_empty",
|
|
52
|
+
"lockedTag": "t_j5va_lockedTag",
|
|
53
|
+
"totp": "t_j5va_totp",
|
|
54
|
+
"modeAsk": "t_j5va_modeAsk",
|
|
55
|
+
"healthBar": "t_j5va_healthBar",
|
|
56
|
+
"kindIcon": "t_j5va_kindIcon",
|
|
57
|
+
"genHist": "t_j5va_genHist",
|
|
58
|
+
"section": "t_j5va_section",
|
|
59
|
+
"totpRing": "t_j5va_totpRing",
|
|
84
60
|
"dangerButton": "t_j5va_dangerButton",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
61
|
+
"reportSub": "t_j5va_reportSub",
|
|
62
|
+
"dupGroup": "t_j5va_dupGroup",
|
|
63
|
+
"genOptRow": "t_j5va_genOptRow",
|
|
64
|
+
"editor": "t_j5va_editor",
|
|
65
|
+
"auditIssues": "t_j5va_auditIssues",
|
|
89
66
|
"pwMeter": "t_j5va_pwMeter",
|
|
67
|
+
"srOnly": "t_j5va_srOnly",
|
|
68
|
+
"genOpts": "t_j5va_genOpts",
|
|
69
|
+
"sortButton": "t_j5va_sortButton",
|
|
70
|
+
"emptyHint": "t_j5va_emptyHint",
|
|
71
|
+
"trashButton": "t_j5va_trashButton",
|
|
72
|
+
"tab": "t_j5va_tab",
|
|
73
|
+
"rowDue": "t_j5va_rowDue",
|
|
74
|
+
"auditRow": "t_j5va_auditRow",
|
|
90
75
|
"clearButton": "t_j5va_clearButton",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"kindIcon": "t_j5va_kindIcon",
|
|
95
|
-
"genHist": "t_j5va_genHist",
|
|
76
|
+
"resultCount": "t_j5va_resultCount",
|
|
77
|
+
"lockedBanner": "t_j5va_lockedBanner",
|
|
78
|
+
"field": "t_j5va_field",
|
|
96
79
|
"policyField": "t_j5va_policyField",
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
80
|
+
"reportBox": "t_j5va_reportBox",
|
|
81
|
+
"editorActions": "t_j5va_editorActions",
|
|
82
|
+
"dueBadge": "t_j5va_dueBadge",
|
|
83
|
+
"footer": "t_j5va_footer",
|
|
84
|
+
"checkField": "t_j5va_checkField",
|
|
85
|
+
"detailBox": "t_j5va_detailBox",
|
|
86
|
+
"dupMerge": "t_j5va_dupMerge",
|
|
87
|
+
"pwLabel": "t_j5va_pwLabel",
|
|
88
|
+
"deleteButton": "t_j5va_deleteButton",
|
|
89
|
+
"identity": "t_j5va_identity",
|
|
90
|
+
"saveButton": "t_j5va_saveButton",
|
|
91
|
+
"revealButton": "t_j5va_revealButton",
|
|
100
92
|
"badgeWarn": "t_j5va_badgeWarn",
|
|
101
|
-
"
|
|
102
|
-
"
|
|
93
|
+
"policyBar": "t_j5va_policyBar",
|
|
94
|
+
"pinStar": "t_j5va_pinStar",
|
|
95
|
+
"retryButton": "t_j5va_retryButton",
|
|
96
|
+
"pwWeak": "t_j5va_pwWeak",
|
|
97
|
+
"intro": "t_j5va_intro",
|
|
98
|
+
"tabPane": "t_j5va_tabPane",
|
|
99
|
+
"kindChip": "t_j5va_kindChip",
|
|
100
|
+
"title": "t_j5va_title",
|
|
101
|
+
"kindFilter": "t_j5va_kindFilter",
|
|
102
|
+
"list": "t_j5va_list"
|
|
103
103
|
};
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/client/VaultSection.tsx
|
|
@@ -265,6 +265,23 @@ window.__ModuleLoader__.load({
|
|
|
265
265
|
color: ""
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
+
/** Human label for a built-in template name (`builtin:wifi` → Wi-Fi). */
|
|
269
|
+
function templateLabel(name) {
|
|
270
|
+
return {
|
|
271
|
+
"builtin:login": "Login",
|
|
272
|
+
"builtin:ssh": "SSH",
|
|
273
|
+
"builtin:api-key": "API key",
|
|
274
|
+
"builtin:oauth": "OAuth",
|
|
275
|
+
"builtin:secret": "Secret",
|
|
276
|
+
"builtin:card": "Card",
|
|
277
|
+
"builtin:wifi": "Wi-Fi",
|
|
278
|
+
"builtin:server": "Server",
|
|
279
|
+
"builtin:database": "Database",
|
|
280
|
+
"builtin:identity": "Identity",
|
|
281
|
+
"builtin:bank": "Bank account",
|
|
282
|
+
"builtin:custom": "Custom"
|
|
283
|
+
}[name] ?? name;
|
|
284
|
+
}
|
|
268
285
|
/** Render the Vault settings section. */
|
|
269
286
|
function VaultSection(props) {
|
|
270
287
|
const { t, config, setAccessMode, setAutoCapture, list, search, get, add, update, remove, trash, rotation, health, duplicates, duplicateGroups, merge, history, stats, backupStatus, backup, recent, restore, undeleteAll, totp, status, switchVault, listVaults, touch, verifyAll, breachCheck, generatePassword, strength, generateUsername, templates, saveTemplate, lock, totpUri, tags, renameTag, generatorHistory, backups, deleteBackup, restoreBackup, importChrome, importFirefox, import1password, importManagerCsv, importEnpass, importBitwarden, import1pif, importKeePassXml, importKdbx, importBitwardenEncrypted, keychainImport, searchSystem, sessionOpen, sessionCollect, sessionClose, sessionListOpen, sessionListSaved, sessionSave, sessionExport, sessionGet, sessionPrune, vaultRename, vaultDelete, watchtower, export1pux, exportBitwarden, recoveryCode, verifyRecovery, recoveryStatus } = props;
|
|
@@ -3079,7 +3096,7 @@ window.__ModuleLoader__.load({
|
|
|
3079
3096
|
children: "—"
|
|
3080
3097
|
}), tplList.map((tpl) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3081
3098
|
value: tpl.name,
|
|
3082
|
-
children: tpl.name
|
|
3099
|
+
children: templateLabel(tpl.name)
|
|
3083
3100
|
}, tpl.name))]
|
|
3084
3101
|
})]
|
|
3085
3102
|
}), editor.status === "editing" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|