@mysterycode-liwen/dsh-credential-vault 1.5.0 → 1.5.1
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 +6 -0
- package/client.js +33 -13
- package/cordis.patch.yml +3 -3
- package/icon.svg +6 -6
- package/index.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -126,6 +126,12 @@ Host 侧工具在 Harness 启动时注册。重启 Harness,或在插件管理
|
|
|
126
126
|
|
|
127
127
|
## 更新日志 / Changelog
|
|
128
128
|
|
|
129
|
+
### 1.5.1 — 2026-11-28 — 新增「通用密钥」类型
|
|
130
|
+
|
|
131
|
+
- **新增凭据类型「通用密钥」**(`secretKey`):标题 + 密钥名称 + 密钥值 + 备注,适合保存零散的 token / secret / 口令,密钥值默认脱敏。
|
|
132
|
+
- **安全链路同步**:密钥值纳入 Host 脱敏、浏览器镜像掩码、安全审计与加密导出范围;工具 `category` 过滤新增 `secretKey`。
|
|
133
|
+
- **导入导出同步**:新增「密钥名称 / 密钥值」中文字段与 Card 展示,JSON / CSV / Markdown 三格式往返无损。
|
|
134
|
+
|
|
129
135
|
### 1.5.0 — 2026-11-26 — 微信开发凭据类型与表单改版
|
|
130
136
|
|
|
131
137
|
- **新增两种凭据类型**:微信公众号(`wechatMp`)与微信小程序(`wechatMini`),字段包含 AppID、AppSecret、Token / EncodingAESKey、服务器地址、上传密钥、服务器域名等;密钥类字段默认脱敏。
|
package/client.js
CHANGED
|
@@ -15,7 +15,7 @@ window.__ModuleLoader__.load({
|
|
|
15
15
|
// whatever port the Web GUI is on.
|
|
16
16
|
var API = 'dsh-credential-vault/';
|
|
17
17
|
/** Plugin version shown in Settings; keep in sync with package.json on release. */
|
|
18
|
-
var VERSION = '1.5.
|
|
18
|
+
var VERSION = '1.5.1';
|
|
19
19
|
|
|
20
20
|
// Compare two semver-ish strings: -1 (left older), 0 (equal), 1 (left newer).
|
|
21
21
|
// Used to decide "update available" against THIS client's version, so the
|
|
@@ -40,7 +40,7 @@ window.__ModuleLoader__.load({
|
|
|
40
40
|
sort: 'Sort', sortRecent: 'Recently updated', sortTitle: 'Name (A–Z)', sortCategory: 'Type',
|
|
41
41
|
search: 'Search name, account, URL or notes…',
|
|
42
42
|
filterAll: 'All', filterAccount: 'Accounts', filterApikey: 'API keys', filterOther: 'Other',
|
|
43
|
-
filterWechatMp: 'Official Accounts', filterWechatMini: 'Mini Programs',
|
|
43
|
+
filterWechatMp: 'Official Accounts', filterWechatMini: 'Mini Programs', filterSecretKey: 'Secret keys',
|
|
44
44
|
localNotice: 'Stored locally in this browser (localStorage) on this device. Not synced or encrypted — avoid shared / public browsers.',
|
|
45
45
|
show: 'Show', hide: 'Hide', copy: 'Copy', visit: 'Visit', copied: 'Copied to clipboard', copyFail: 'Copy failed — select the text manually',
|
|
46
46
|
visitFail: 'Could not open the browser. Check the URL and try again.',
|
|
@@ -51,6 +51,7 @@ window.__ModuleLoader__.load({
|
|
|
51
51
|
editorNew: 'New credential', editorEdit: 'Edit credential',
|
|
52
52
|
fTitle: 'Name', fTitlePh: 'e.g. GitHub, Google', fTitlePhApikey: 'e.g. OpenAI, AWS, GitHub PAT', fTitlePhOther: 'e.g. Recovery codes, Wi-Fi, License',
|
|
53
53
|
fTitlePhWechatMp: 'e.g. My Official Account', fTitlePhWechatMini: 'e.g. My Mini Program',
|
|
54
|
+
fTitlePhSecretKey: 'e.g. GitHub PAT, service token',
|
|
54
55
|
fCategory: 'Type', formDetails: 'Credentials', moreFields: 'More fields', lessFields: 'Fewer fields',
|
|
55
56
|
fAccount: 'Account / username', fAccountPh: 'user@example.com',
|
|
56
57
|
fPassword: 'Password', fPasswordPh: 'Enter password',
|
|
@@ -68,13 +69,16 @@ window.__ModuleLoader__.load({
|
|
|
68
69
|
fServerUrl: 'Server URL', fServerUrlPh: 'https://… (callback URL)',
|
|
69
70
|
fUploadKey: 'Code upload key', fUploadKeyPh: 'Private key used to upload mini program code',
|
|
70
71
|
fDomains: 'Server domains', fDomainsPh: 'request / socket / upload / download domains',
|
|
72
|
+
fKeyName: 'Key name', fKeyNamePh: 'e.g. access token, webhook secret',
|
|
73
|
+
fKeyValue: 'Secret value', fKeyValuePh: 'Paste the token / secret / password',
|
|
71
74
|
catAccount: 'Account', catApikey: 'API key', catOther: 'Other',
|
|
72
|
-
catWechatMp: 'WeChat Official Account', catWechatMini: 'WeChat Mini Program',
|
|
75
|
+
catWechatMp: 'WeChat Official Account', catWechatMini: 'WeChat Mini Program', catSecretKey: 'Secret key',
|
|
73
76
|
hintAccount: 'For website / app logins — username and password.',
|
|
74
77
|
hintApikey: 'For platform-issued API keys, tokens and endpoints.',
|
|
75
78
|
hintOther: 'For recovery codes, licenses, certificates or any free text.',
|
|
76
79
|
hintWechatMp: 'For WeChat Official Account developer credentials and server config.',
|
|
77
80
|
hintWechatMini: 'For WeChat Mini Program developer credentials and upload key.',
|
|
81
|
+
hintSecretKey: 'For miscellaneous name + value secrets — tokens, secrets, passwords.',
|
|
78
82
|
save: 'Save', cancel: 'Cancel', required: 'Please enter a name',
|
|
79
83
|
confirmDelete: 'Delete this credential? This cannot be undone.',
|
|
80
84
|
saved: 'Saved', deleted: 'Deleted', revealAll: 'Reveal all', hideAll: 'Hide all',
|
|
@@ -165,7 +169,7 @@ window.__ModuleLoader__.load({
|
|
|
165
169
|
sort: '排序', sortRecent: '最近更新', sortTitle: '名称(A–Z)', sortCategory: '类型',
|
|
166
170
|
search: '搜索名称、账号、网址或备注…',
|
|
167
171
|
filterAll: '全部', filterAccount: '账号密码', filterApikey: 'API Key', filterOther: '其他',
|
|
168
|
-
filterWechatMp: '微信公众号', filterWechatMini: '微信小程序',
|
|
172
|
+
filterWechatMp: '微信公众号', filterWechatMini: '微信小程序', filterSecretKey: '通用密钥',
|
|
169
173
|
localNotice: '数据仅保存在本机浏览器的 localStorage 中,不跨设备同步、不加密,请避免在公用/共享浏览器使用。',
|
|
170
174
|
show: '显示', hide: '隐藏', copy: '复制', visit: '访问', copied: '已复制到剪贴板', copyFail: '复制失败,请手动选择文本',
|
|
171
175
|
visitFail: '无法打开浏览器,请检查网址后重试。',
|
|
@@ -176,6 +180,7 @@ window.__ModuleLoader__.load({
|
|
|
176
180
|
editorNew: '新增凭据', editorEdit: '编辑凭据',
|
|
177
181
|
fTitle: '名称', fTitlePh: '例如:GitHub、Google', fTitlePhApikey: '例如:OpenAI、AWS、GitHub PAT', fTitlePhOther: '例如:恢复码、Wi-Fi、许可证',
|
|
178
182
|
fTitlePhWechatMp: '例如:我的公众号', fTitlePhWechatMini: '例如:我的小程序',
|
|
183
|
+
fTitlePhSecretKey: '例如:GitHub PAT、服务令牌',
|
|
179
184
|
fCategory: '类型', formDetails: '凭据信息', moreFields: '更多字段', lessFields: '收起字段',
|
|
180
185
|
fAccount: '账号 / 用户名', fAccountPh: 'user@example.com',
|
|
181
186
|
fPassword: '密码', fPasswordPh: '输入密码',
|
|
@@ -193,13 +198,16 @@ window.__ModuleLoader__.load({
|
|
|
193
198
|
fServerUrl: '服务器地址', fServerUrlPh: 'https://…(回调地址)',
|
|
194
199
|
fUploadKey: '代码上传密钥', fUploadKeyPh: '上传小程序代码用的私钥',
|
|
195
200
|
fDomains: '服务器域名', fDomainsPh: 'request / socket / upload / download 合法域名',
|
|
201
|
+
fKeyName: '密钥名称', fKeyNamePh: '例如:访问令牌、Webhook 密钥',
|
|
202
|
+
fKeyValue: '密钥值', fKeyValuePh: '粘贴令牌 / 密钥 / 口令',
|
|
196
203
|
catAccount: '账号密码', catApikey: 'API Key', catOther: '其他',
|
|
197
|
-
catWechatMp: '微信公众号', catWechatMini: '微信小程序',
|
|
204
|
+
catWechatMp: '微信公众号', catWechatMini: '微信小程序', catSecretKey: '通用密钥',
|
|
198
205
|
hintAccount: '用于保存网站 / 应用的登录账号与密码。',
|
|
199
206
|
hintApikey: '用于保存平台签发的 API Key、令牌与接口地址。',
|
|
200
207
|
hintOther: '用于保存恢复码、许可证、证书等任意文本。',
|
|
201
208
|
hintWechatMp: '用于保存公众号开发者凭证与服务器配置。',
|
|
202
209
|
hintWechatMini: '用于保存小程序开发者凭证与代码上传密钥。',
|
|
210
|
+
hintSecretKey: '用于保存零散的名称 + 值型密钥:令牌、密钥、口令等。',
|
|
203
211
|
save: '保存', cancel: '取消', required: '请输入名称',
|
|
204
212
|
confirmDelete: '确定删除这条凭据?此操作不可撤销。',
|
|
205
213
|
saved: '已保存', deleted: '已删除', revealAll: '全部显示', hideAll: '全部隐藏',
|
|
@@ -305,6 +313,12 @@ window.__ModuleLoader__.load({
|
|
|
305
313
|
{ key: 'expiry', label: 'fExpiry', type: 'date' },
|
|
306
314
|
{ key: 'notes', label: 'fNotes', ph: 'fNotesPh', type: 'textarea' }
|
|
307
315
|
],
|
|
316
|
+
secretKey: [
|
|
317
|
+
{ key: 'title', label: 'fTitle', ph: 'fTitlePhSecretKey', type: 'text', required: true },
|
|
318
|
+
{ key: 'keyName', label: 'fKeyName', ph: 'fKeyNamePh', type: 'text', mono: true },
|
|
319
|
+
{ key: 'keyValue', label: 'fKeyValue', ph: 'fKeyValuePh', type: 'secret', mono: true },
|
|
320
|
+
{ key: 'notes', label: 'fNotes', ph: 'fNotesPh', type: 'textarea' }
|
|
321
|
+
],
|
|
308
322
|
other: [
|
|
309
323
|
{ key: 'title', label: 'fTitle', ph: 'fTitlePhOther', type: 'text', required: true },
|
|
310
324
|
{ key: 'content', label: 'fContent', ph: 'fContentPh', type: 'secretarea', mono: true },
|
|
@@ -335,6 +349,7 @@ window.__ModuleLoader__.load({
|
|
|
335
349
|
{ k: 'apikey', label: 'catApikey', hint: 'hintApikey' },
|
|
336
350
|
{ k: 'wechatMp', label: 'catWechatMp', hint: 'hintWechatMp' },
|
|
337
351
|
{ k: 'wechatMini', label: 'catWechatMini', hint: 'hintWechatMini' },
|
|
352
|
+
{ k: 'secretKey', label: 'catSecretKey', hint: 'hintSecretKey' },
|
|
338
353
|
{ k: 'other', label: 'catOther', hint: 'hintOther' }
|
|
339
354
|
];
|
|
340
355
|
var FILTERS = [
|
|
@@ -343,6 +358,7 @@ window.__ModuleLoader__.load({
|
|
|
343
358
|
{ k: 'apikey', label: 'filterApikey' },
|
|
344
359
|
{ k: 'wechatMp', label: 'filterWechatMp' },
|
|
345
360
|
{ k: 'wechatMini', label: 'filterWechatMini' },
|
|
361
|
+
{ k: 'secretKey', label: 'filterSecretKey' },
|
|
346
362
|
{ k: 'other', label: 'filterOther' }
|
|
347
363
|
];
|
|
348
364
|
function schemaOf(cat) { return SCHEMAS[cat] || SCHEMAS.account; }
|
|
@@ -408,6 +424,7 @@ window.__ModuleLoader__.load({
|
|
|
408
424
|
'.cv-badge-other{background:var(--cv-l2);color:var(--cv-t2)}',
|
|
409
425
|
'.cv-badge-wechatMp{background:#07c160;color:#fff}',
|
|
410
426
|
'.cv-badge-wechatMini{background:#10aec2;color:#fff}',
|
|
427
|
+
'.cv-badge-secretKey{background:#8b5cf6;color:#fff}',
|
|
411
428
|
'.cv-card-title{font-weight:600;font-size:14.5px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}',
|
|
412
429
|
'.cv-card-actions{display:flex;gap:4px}',
|
|
413
430
|
'.cv-icon-btn{width:28px;height:28px;border-radius:7px;border:1px solid transparent;background:transparent;color:var(--cv-t2);cursor:pointer;font-size:14px;line-height:1;display:flex;align-items:center;justify-content:center}',
|
|
@@ -545,6 +562,7 @@ window.__ModuleLoader__.load({
|
|
|
545
562
|
if (n.secret != null && n.password == null && n.apiKey == null && n.content == null) {
|
|
546
563
|
if (n.category === 'apikey') n.apiKey = n.secret;
|
|
547
564
|
else if (n.category === 'other') n.content = n.secret;
|
|
565
|
+
else if (n.category === 'secretKey') n.keyValue = n.secret;
|
|
548
566
|
else n.password = n.secret;
|
|
549
567
|
}
|
|
550
568
|
if (n.category === 'apikey') {
|
|
@@ -577,9 +595,9 @@ window.__ModuleLoader__.load({
|
|
|
577
595
|
// Fire-and-forget: the browser stays usable even if the Host route is down.
|
|
578
596
|
// Large vaults: DEBOUNCE so a burst of edits results in one POST, not dozens
|
|
579
597
|
// of multi-megabyte payloads. A trailing timer always flushes the latest data.
|
|
580
|
-
var MIRROR_FIELDS = ['id', 'title', 'category', 'username', 'provider', 'url', 'endpoint', 'expiry',
|
|
598
|
+
var MIRROR_FIELDS = ['id', 'title', 'category', 'username', 'provider', 'keyName', 'url', 'endpoint', 'expiry',
|
|
581
599
|
'appId', 'serverUrl', 'domains', 'notes', 'createdAt', 'updatedAt'];
|
|
582
|
-
var MIRROR_SECRETS = ['password', 'apiKey', 'content', 'appSecret', 'token', 'encodingAesKey', 'uploadKey'];
|
|
600
|
+
var MIRROR_SECRETS = ['password', 'apiKey', 'content', 'appSecret', 'token', 'encodingAesKey', 'uploadKey', 'keyValue'];
|
|
583
601
|
function toEnvelope(entry) {
|
|
584
602
|
var out = {};
|
|
585
603
|
MIRROR_FIELDS.forEach(function (k) {
|
|
@@ -682,6 +700,7 @@ window.__ModuleLoader__.load({
|
|
|
682
700
|
var cat = e.category || 'account';
|
|
683
701
|
if (cat === 'apikey') return String(e.apiKey || '');
|
|
684
702
|
if (cat === 'other') return String(e.content || '');
|
|
703
|
+
if (cat === 'secretKey') return String(e.keyValue || '');
|
|
685
704
|
return String(e.password || '');
|
|
686
705
|
}
|
|
687
706
|
function runAudit(entries) {
|
|
@@ -754,7 +773,7 @@ window.__ModuleLoader__.load({
|
|
|
754
773
|
function pad(n) { return n < 10 ? '0' + n : '' + n; }
|
|
755
774
|
return d.getFullYear() + pad(d.getMonth() + 1) + pad(d.getDate()) + '-' + pad(d.getHours()) + pad(d.getMinutes());
|
|
756
775
|
}
|
|
757
|
-
var EXPORT_COLS = ['id', 'title', 'category', 'username', 'password', 'url', 'provider', 'apiKey', 'endpoint', 'expiry', 'content',
|
|
776
|
+
var EXPORT_COLS = ['id', 'title', 'category', 'username', 'password', 'url', 'provider', 'apiKey', 'endpoint', 'expiry', 'content', 'keyName', 'keyValue',
|
|
758
777
|
'appId', 'appSecret', 'token', 'encodingAesKey', 'serverUrl', 'uploadKey', 'domains',
|
|
759
778
|
'notes', 'createdAt', 'updatedAt'];
|
|
760
779
|
|
|
@@ -764,14 +783,14 @@ window.__ModuleLoader__.load({
|
|
|
764
783
|
var FIELD_LABELS = {
|
|
765
784
|
id: 'ID', title: '标题', category: '类型', username: '用户名', password: '密码',
|
|
766
785
|
url: '网址', provider: '服务商', apiKey: 'API Key', endpoint: '接口地址',
|
|
767
|
-
expiry: '有效期', content: '内容',
|
|
786
|
+
expiry: '有效期', content: '内容', keyName: '密钥名称', keyValue: '密钥值',
|
|
768
787
|
appId: 'AppID', appSecret: 'AppSecret', token: '服务器Token', encodingAesKey: 'EncodingAESKey',
|
|
769
788
|
serverUrl: '服务器地址', uploadKey: '代码上传密钥', domains: '服务器域名',
|
|
770
789
|
notes: '备注', createdAt: '创建时间', updatedAt: '更新时间'
|
|
771
790
|
};
|
|
772
791
|
var LABEL_FIELDS = {};
|
|
773
792
|
Object.keys(FIELD_LABELS).forEach(function (k) { LABEL_FIELDS[FIELD_LABELS[k]] = k; });
|
|
774
|
-
var CATEGORY_LABELS = { account: '账号', apikey: 'API Key', other: '其他', wechatMp: '微信公众号', wechatMini: '微信小程序' };
|
|
793
|
+
var CATEGORY_LABELS = { account: '账号', apikey: 'API Key', secretKey: '通用密钥', other: '其他', wechatMp: '微信公众号', wechatMini: '微信小程序' };
|
|
775
794
|
var LABEL_CATEGORIES = {};
|
|
776
795
|
Object.keys(CATEGORY_LABELS).forEach(function (k) { LABEL_CATEGORIES[CATEGORY_LABELS[k]] = k; });
|
|
777
796
|
// Only export fields that belong to the entry's type. A record may carry
|
|
@@ -780,6 +799,7 @@ window.__ModuleLoader__.load({
|
|
|
780
799
|
var VISIBLE_FIELDS = {
|
|
781
800
|
account: ['title', 'username', 'password', 'url', 'notes'],
|
|
782
801
|
apikey: ['title', 'provider', 'apiKey', 'endpoint', 'expiry', 'notes'],
|
|
802
|
+
secretKey: ['title', 'keyName', 'keyValue', 'notes'],
|
|
783
803
|
other: ['title', 'content', 'notes'],
|
|
784
804
|
wechatMp: ['title', 'appId', 'appSecret', 'token', 'encodingAesKey', 'serverUrl', 'notes'],
|
|
785
805
|
wechatMini: ['title', 'appId', 'appSecret', 'uploadKey', 'domains', 'notes']
|
|
@@ -812,7 +832,7 @@ window.__ModuleLoader__.load({
|
|
|
812
832
|
// CSV shows the fields people actually read first; technical columns
|
|
813
833
|
// (ID / timestamps) go last. Import maps by header label, so order is safe.
|
|
814
834
|
var CSV_COLS = ['title', 'category', 'username', 'password', 'url', 'provider',
|
|
815
|
-
'apiKey', 'endpoint', 'expiry', 'content',
|
|
835
|
+
'apiKey', 'endpoint', 'expiry', 'content', 'keyName', 'keyValue',
|
|
816
836
|
'appId', 'appSecret', 'token', 'encodingAesKey', 'serverUrl', 'uploadKey', 'domains',
|
|
817
837
|
'notes', 'id', 'createdAt', 'updatedAt'];
|
|
818
838
|
function buildCsv(arr) {
|
|
@@ -1277,7 +1297,7 @@ window.__ModuleLoader__.load({
|
|
|
1277
1297
|
id: '', title: '', category: cat || 'account',
|
|
1278
1298
|
username: '', password: '', url: '',
|
|
1279
1299
|
provider: '', apiKey: '', endpoint: '', expiry: '',
|
|
1280
|
-
content: '',
|
|
1300
|
+
content: '', keyName: '', keyValue: '',
|
|
1281
1301
|
appId: '', appSecret: '', token: '', encodingAesKey: '', serverUrl: '', uploadKey: '', domains: '',
|
|
1282
1302
|
notes: ''
|
|
1283
1303
|
};
|
|
@@ -1375,7 +1395,7 @@ window.__ModuleLoader__.load({
|
|
|
1375
1395
|
|
|
1376
1396
|
// Only the essential fields show by default; the rest fold behind a
|
|
1377
1397
|
// "More fields" toggle so short forms stay short and long forms compact.
|
|
1378
|
-
var PRIMARY_KEYS = { title: 1, username: 1, password: 1, apiKey: 1, appId: 1, appSecret: 1, content: 1 };
|
|
1398
|
+
var PRIMARY_KEYS = { title: 1, username: 1, password: 1, apiKey: 1, appId: 1, appSecret: 1, content: 1, keyName: 1, keyValue: 1 };
|
|
1379
1399
|
var primary = fields.filter(function (f) { return PRIMARY_KEYS[f.key]; });
|
|
1380
1400
|
var secondary = fields.filter(function (f) { return !PRIMARY_KEYS[f.key]; });
|
|
1381
1401
|
var hasSecondary = secondary.some(function (f) { return !!d[f.key]; });
|
package/cordis.patch.yml
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
- insert:
|
|
2
|
-
- id: dsh-credential-vault
|
|
3
|
-
name: '@mysterycode-liwen/dsh-credential-vault'
|
|
1
|
+
- insert:
|
|
2
|
+
- id: dsh-credential-vault
|
|
3
|
+
name: '@mysterycode-liwen/dsh-credential-vault'
|
package/icon.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
-
<rect width="64" height="64" rx="14" fill="#2563eb"/>
|
|
3
|
-
<path d="M32 14 L46 19.5 V31 C46 40.5 39.8 46.8 32 50 C24.2 46.8 18 40.5 18 31 V19.5 Z" fill="#ffffff" opacity="0.96"/>
|
|
4
|
-
<circle cx="32" cy="29.5" r="4.3" fill="#2563eb"/>
|
|
5
|
-
<rect x="29.8" y="32.5" width="4.4" height="8.5" rx="2.2" fill="#2563eb"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#2563eb"/>
|
|
3
|
+
<path d="M32 14 L46 19.5 V31 C46 40.5 39.8 46.8 32 50 C24.2 46.8 18 40.5 18 31 V19.5 Z" fill="#ffffff" opacity="0.96"/>
|
|
4
|
+
<circle cx="32" cy="29.5" r="4.3" fill="#2563eb"/>
|
|
5
|
+
<rect x="29.8" y="32.5" width="4.4" height="8.5" rx="2.2" fill="#2563eb"/>
|
|
6
|
+
</svg>
|
package/index.js
CHANGED
|
@@ -35,7 +35,7 @@ const MAX_BODY_BYTES = 16 * 1024 * 1024
|
|
|
35
35
|
const MAX_ENTRIES = 20000
|
|
36
36
|
|
|
37
37
|
/** Fields that hold secrets; masked by default in tool output. */
|
|
38
|
-
const SECRET_FIELDS = ['password', 'apiKey', 'content', 'appSecret', 'token', 'encodingAesKey', 'uploadKey']
|
|
38
|
+
const SECRET_FIELDS = ['password', 'apiKey', 'content', 'appSecret', 'token', 'encodingAesKey', 'uploadKey', 'keyValue']
|
|
39
39
|
const MASK = '••••••••'
|
|
40
40
|
|
|
41
41
|
/** Pagination defaults / limits for the read tool. */
|
|
@@ -46,7 +46,7 @@ const MAX_LIMIT = 200
|
|
|
46
46
|
const SUMMARY_FIELDS = ['id', 'title', 'category', 'username', 'provider', 'expiry', 'updatedAt']
|
|
47
47
|
|
|
48
48
|
/** Current plugin version. Keep in sync with package.json when releasing. */
|
|
49
|
-
const CURRENT_VERSION = '1.5.
|
|
49
|
+
const CURRENT_VERSION = '1.5.1'
|
|
50
50
|
|
|
51
51
|
/** Where update checks read the latest published version from (GitHub Releases latest). */
|
|
52
52
|
const RELEASES_API = 'https://api.github.com/repos/mysterycode-liwen/dsh-credential-vault/releases/latest'
|
|
@@ -62,7 +62,7 @@ let snapshot = { entries: [], updatedAt: 0 }
|
|
|
62
62
|
* Fields mirrored from the browser. Everything else (especially SECRET_FIELDS)
|
|
63
63
|
* is dropped, so the Host can never hold a plaintext password / key / body.
|
|
64
64
|
*/
|
|
65
|
-
const META_FIELDS = ['id', 'title', 'category', 'username', 'provider', 'url', 'endpoint', 'expiry',
|
|
65
|
+
const META_FIELDS = ['id', 'title', 'category', 'username', 'provider', 'keyName', 'url', 'endpoint', 'expiry',
|
|
66
66
|
'appId', 'serverUrl', 'domains', 'notes', 'createdAt', 'updatedAt']
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -331,7 +331,7 @@ export function apply(ctx) {
|
|
|
331
331
|
},
|
|
332
332
|
category: {
|
|
333
333
|
type: 'string',
|
|
334
|
-
enum: ['all', 'account', 'apikey', 'other', 'wechatMp', 'wechatMini'],
|
|
334
|
+
enum: ['all', 'account', 'apikey', 'secretKey', 'other', 'wechatMp', 'wechatMini'],
|
|
335
335
|
description: 'Only return entries of this category. Defaults to all.',
|
|
336
336
|
},
|
|
337
337
|
mode: {
|
|
@@ -404,7 +404,7 @@ export function apply(ctx) {
|
|
|
404
404
|
name: 'tool:dsh-credential-vault',
|
|
405
405
|
order: 118,
|
|
406
406
|
text:
|
|
407
|
-
'凭据保险箱:用户把账号密码、API Key、微信公众号 /
|
|
407
|
+
'凭据保险箱:用户把账号密码、API Key、微信公众号 / 小程序开发信息、通用密钥、恢复码等保存在侧边栏「凭据保险箱」里。需要知道有哪些凭据时用 dsh_credential_vault_read 工具(按 query / category 过滤,category 可选 account / apikey / secretKey / other / wechatMp / wechatMini;数据多时先用 mode="summary" 看标题清单,再用 limit/offset 翻页)。出于安全,该工具只返回元数据——密码 / API Key / 密钥值 / AppSecret / Token / 上传密钥等一律显示为 ••••••••,明文只留在浏览器内、不会进入模型上下文,revealSecrets 参数已失效。不要向用户索要明文密钥;需要用到具体密钥时,请让用户自行在侧边栏面板中查看或复制。',
|
|
408
408
|
})
|
|
409
409
|
return () => {}
|
|
410
410
|
}, 'dsh-credential-vault-prompt')
|
package/package.json
CHANGED