dsh-vault 0.1.1 → 0.1.2
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 +35 -10
- package/README.md +35 -10
- package/lib/client.js +15 -15
- package/package.json +1 -1
package/README-zh.md
CHANGED
|
@@ -53,6 +53,15 @@ dsh-vault 是一个面向 DeepSeek Harness 的安全加密插件:把你在使
|
|
|
53
53
|
|
|
54
54
|
dsh-vault 是一个 **bundle**(声明 `dsh.bundle` 的包):安装到 profile 后,它的 `cordis.patch.yml` 会自动插入 `vault` 插件行(按包名 `dsh-vault` 引用,主密码经 `DSH_VAULT_PASSWORD` 环境变量注入)。包内含自包含构建脚本,git 安装时会自动编译 `lib/`。
|
|
55
55
|
|
|
56
|
+
以下四种安装方式均已**端到端实测通过**(安装 → bundle 层被识别 → 插件激活且 7 个 `vault_*` 工具全部注册 → `vault_add`/`vault_get` 真实往返成功 → 卸载移除 layer):
|
|
57
|
+
|
|
58
|
+
| 方式 | 命令 | 需构建 | 需 allowBuilds |
|
|
59
|
+
|---|---|---|---|
|
|
60
|
+
| npm | `add dsh-vault` | 否(预构建 lib) | 否 |
|
|
61
|
+
| GitHub | `add github:Ox0400/dsh-vault#v0.1.1` | 是(prepare) | 是(首次) |
|
|
62
|
+
| 本地路径 | `add /绝对/路径/to/dsh-vault` | 否(链接已构建源码) | 否 |
|
|
63
|
+
| tarball | `add ./dsh-vault-0.1.1.tgz` | 否(预构建 lib) | 否 |
|
|
64
|
+
|
|
56
65
|
### 方式一:从 npm 安装(最省事)
|
|
57
66
|
|
|
58
67
|
```sh
|
|
@@ -68,16 +77,28 @@ export DSH_VAULT_PASSWORD='你的强主密码'
|
|
|
68
77
|
### 方式二:从 GitHub 安装(锁 tag 或 commit)
|
|
69
78
|
|
|
70
79
|
```sh
|
|
71
|
-
dsh plugin --profile demo add github:Ox0400/dsh-vault#v0.1.
|
|
80
|
+
dsh plugin --profile demo add github:Ox0400/dsh-vault#v0.1.1
|
|
72
81
|
```
|
|
73
82
|
|
|
74
|
-
git 安装拉取的是**源码**,`prepare` 脚本会在安装时构建 `lib/`。pnpm ≥10 默认阻止 git
|
|
83
|
+
git 安装拉取的是**源码**,`prepare` 脚本会在安装时构建 `lib/`。pnpm ≥10 默认阻止 git 依赖执行构建脚本。实测流程:
|
|
75
84
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
1. 执行 `add` 命令——会因 `allowBuilds` 失败,并打印需要放行的**精确键**(含仓库 URL 与解析后的 commit hash 的那行):
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
allowBuilds:
|
|
89
|
+
dsh-vault@https://codeload.github.com/Ox0400/dsh-vault/tar.gz/<sha>: true
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
2. 把该精确键追加到 profile 的 `pnpm-workspace.yaml`(`$DSH_HOME/profiles/<name>/pnpm-workspace.yaml`):
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
packages:
|
|
96
|
+
- .
|
|
97
|
+
allowBuilds:
|
|
98
|
+
dsh-vault@https://codeload.github.com/Ox0400/dsh-vault/tar.gz/<sha>: true
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. 重新执行 `add`——pnpm 现在会运行 `prepare` 脚本,构建 `lib/` 并完成安装。
|
|
81
102
|
|
|
82
103
|
建议**锁定 tag/commit** 再安装,避免上游推送改变安装时执行的代码。允许构建 = 允许该包的代码在你的机器上于安装时执行;只对你信任的源码授予。
|
|
83
104
|
|
|
@@ -87,12 +108,16 @@ allowBuilds:
|
|
|
87
108
|
dsh plugin --profile demo add /绝对/路径/to/dsh-vault
|
|
88
109
|
```
|
|
89
110
|
|
|
111
|
+
pnpm 将 checkout 链接进 profile;只要 `lib/` 存在(必要时先在 checkout 里执行 `pnpm build`)即被识别为 bundle。
|
|
112
|
+
|
|
90
113
|
### 方式四:本地 tarball 安装
|
|
91
114
|
|
|
92
115
|
```sh
|
|
93
|
-
npm pack && dsh plugin --profile demo add ./dsh-vault-0.1.
|
|
116
|
+
npm pack && dsh plugin --profile demo add ./dsh-vault-0.1.1.tgz
|
|
94
117
|
```
|
|
95
118
|
|
|
119
|
+
tarball 自带预构建 `lib/` 产物,无需构建或 allowBuilds。
|
|
120
|
+
|
|
96
121
|
`dsh plugin --profile demo remove dsh-vault` 卸载(同时移除依赖与 layer)。
|
|
97
122
|
|
|
98
123
|
## 配置
|
|
@@ -132,7 +157,7 @@ pnpm typecheck # tsc -p tsconfig.json --noEmit
|
|
|
132
157
|
# 构建(host 侧 lib/*.js 与浏览器 bundle lib/client.js)
|
|
133
158
|
pnpm build # = build:host (tsc) + build:client (tsdown)
|
|
134
159
|
|
|
135
|
-
# 打包发布(可选:npm pack 产物可直接 `dsh plugin add ./dsh-vault-0.1.
|
|
160
|
+
# 打包发布(可选:npm pack 产物可直接 `dsh plugin add ./dsh-vault-0.1.1.tgz`)
|
|
136
161
|
npm pack
|
|
137
162
|
```
|
|
138
163
|
|
|
@@ -150,7 +175,7 @@ npm pack
|
|
|
150
175
|
可选发布途径:
|
|
151
176
|
|
|
152
177
|
```sh
|
|
153
|
-
npm pack # 产出 tarball → dsh plugin add ./dsh-vault-0.1.
|
|
178
|
+
npm pack # 产出 tarball → dsh plugin add ./dsh-vault-0.1.1.tgz
|
|
154
179
|
npm publish --access public # 发布 npm → dsh plugin add dsh-vault
|
|
155
180
|
```
|
|
156
181
|
|
package/README.md
CHANGED
|
@@ -55,6 +55,15 @@ Each record has a `title`, an optional `kind`, and any combination of fields:
|
|
|
55
55
|
|
|
56
56
|
dsh-vault is a **bundle** (a package declaring `dsh.bundle`): once installed into a profile, its `cordis.patch.yml` automatically inserts the `vault` plugin row (referenced by package name `dsh-vault`; the master password is injected via the `DSH_VAULT_PASSWORD` environment variable). The package ships a self-contained build script — git installs compile `lib/` automatically.
|
|
57
57
|
|
|
58
|
+
All four install paths below are **verified end-to-end** (install → bundle layer recognized → plugin activates with all 7 `vault_*` tools registered → real `vault_add`/`vault_get` round trip → uninstall removes the layer):
|
|
59
|
+
|
|
60
|
+
| Path | Command | Build needed | `allowBuilds` |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| npm | `add dsh-vault` | no (prebuilt `lib/`) | no |
|
|
63
|
+
| GitHub | `add github:Ox0400/dsh-vault#v0.1.1` | yes (`prepare`) | yes (first run) |
|
|
64
|
+
| local path | `add /abs/path/to/dsh-vault` | no (link to built source) | no |
|
|
65
|
+
| tarball | `add ./dsh-vault-0.1.1.tgz` | no (prebuilt `lib/`) | no |
|
|
66
|
+
|
|
58
67
|
### Option 1: Install from npm (easiest)
|
|
59
68
|
|
|
60
69
|
```sh
|
|
@@ -70,16 +79,28 @@ export DSH_VAULT_PASSWORD='your strong master password'
|
|
|
70
79
|
### Option 2: Install from GitHub (pin a tag or commit)
|
|
71
80
|
|
|
72
81
|
```sh
|
|
73
|
-
dsh plugin --profile demo add github:Ox0400/dsh-vault#v0.1.
|
|
82
|
+
dsh plugin --profile demo add github:Ox0400/dsh-vault#v0.1.1
|
|
74
83
|
```
|
|
75
84
|
|
|
76
|
-
A git install fetches **sources, not built artifacts**, so the `prepare` script builds `lib/` at install time. pnpm ≥10 blocks git dependencies from running build scripts by default
|
|
85
|
+
A git install fetches **sources, not built artifacts**, so the `prepare` script builds `lib/` at install time. pnpm ≥10 blocks git dependencies from running build scripts by default. The verified flow:
|
|
77
86
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
1. Run the `add` command — it fails with an `allowBuilds` error and prints the exact key to allow (the line containing the repo URL, including the resolved commit hash):
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
allowBuilds:
|
|
91
|
+
dsh-vault@https://codeload.github.com/Ox0400/dsh-vault/tar.gz/<sha>: true
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
2. Append that exact key to the profile's `pnpm-workspace.yaml` (`$DSH_HOME/profiles/<name>/pnpm-workspace.yaml`):
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
packages:
|
|
98
|
+
- .
|
|
99
|
+
allowBuilds:
|
|
100
|
+
dsh-vault@https://codeload.github.com/Ox0400/dsh-vault/tar.gz/<sha>: true
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
3. Re-run the `add` — pnpm now runs the `prepare` script, builds `lib/`, and installs.
|
|
83
104
|
|
|
84
105
|
**Pin a tag/commit** so a later upstream push cannot silently change what runs on install. Treat the allowance for what it is: permission to execute that package's code on your machine at install time — only grant it to sources you trust.
|
|
85
106
|
|
|
@@ -89,12 +110,16 @@ allowBuilds:
|
|
|
89
110
|
dsh plugin --profile demo add /absolute/path/to/dsh-vault
|
|
90
111
|
```
|
|
91
112
|
|
|
113
|
+
pnpm links the checkout into the profile; the bundle is recognized as long as `lib/` exists (run `pnpm build` in the checkout first if needed).
|
|
114
|
+
|
|
92
115
|
### Option 4: Install from a tarball
|
|
93
116
|
|
|
94
117
|
```sh
|
|
95
|
-
npm pack && dsh plugin --profile demo add ./dsh-vault-0.1.
|
|
118
|
+
npm pack && dsh plugin --profile demo add ./dsh-vault-0.1.1.tgz
|
|
96
119
|
```
|
|
97
120
|
|
|
121
|
+
The tarball ships prebuilt `lib/` artifacts, so no build step or `allowBuilds` is required.
|
|
122
|
+
|
|
98
123
|
`dsh plugin --profile demo remove dsh-vault` uninstalls (removes both the dependency and the layer).
|
|
99
124
|
|
|
100
125
|
## Configuration
|
|
@@ -128,7 +153,7 @@ Common commands:
|
|
|
128
153
|
pnpm test # unit + integration tests (vitest, 41)
|
|
129
154
|
pnpm typecheck # tsc -p tsconfig.json --noEmit
|
|
130
155
|
pnpm build # = build:host (tsc) + build:client (tsdown)
|
|
131
|
-
npm pack # optional: tarball for `dsh plugin add ./dsh-vault-0.1.
|
|
156
|
+
npm pack # optional: tarball for `dsh plugin add ./dsh-vault-0.1.1.tgz`
|
|
132
157
|
```
|
|
133
158
|
|
|
134
159
|
All 41 tests pass (crypto / TOTP / password generation / store CRUD / gateway / integration).
|
|
@@ -145,7 +170,7 @@ This package is a standard npm bundle:
|
|
|
145
170
|
Distribution options:
|
|
146
171
|
|
|
147
172
|
```sh
|
|
148
|
-
npm pack # tarball → dsh plugin add ./dsh-vault-0.1.
|
|
173
|
+
npm pack # tarball → dsh plugin add ./dsh-vault-0.1.1.tgz
|
|
149
174
|
npm publish --access public # registry → dsh plugin add dsh-vault
|
|
150
175
|
```
|
|
151
176
|
|
package/lib/client.js
CHANGED
|
@@ -17,28 +17,28 @@ window.__ModuleLoader__.load({
|
|
|
17
17
|
document.head.appendChild(tag);
|
|
18
18
|
}
|
|
19
19
|
var VaultSection_module_css_default = {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"totp": "t_j5va_totp",
|
|
21
|
+
"rowActions": "t_j5va_rowActions",
|
|
22
|
+
"status": "t_j5va_status",
|
|
22
23
|
"error": "t_j5va_error",
|
|
24
|
+
"field": "t_j5va_field",
|
|
23
25
|
"editor": "t_j5va_editor",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
+
"editorActions": "t_j5va_editorActions",
|
|
27
|
+
"section": "t_j5va_section",
|
|
28
|
+
"empty": "t_j5va_empty",
|
|
26
29
|
"toolbar": "t_j5va_toolbar",
|
|
30
|
+
"editorBody": "t_j5va_editorBody",
|
|
27
31
|
"rowMain": "t_j5va_rowMain",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"section": "t_j5va_section",
|
|
31
|
-
"copied": "t_j5va_copied",
|
|
32
|
+
"deleteButton": "t_j5va_deleteButton",
|
|
33
|
+
"addButton": "t_j5va_addButton",
|
|
32
34
|
"saveButton": "t_j5va_saveButton",
|
|
33
|
-
"list": "t_j5va_list",
|
|
34
35
|
"intro": "t_j5va_intro",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"totp": "t_j5va_totp",
|
|
38
|
-
"status": "t_j5va_status",
|
|
36
|
+
"copied": "t_j5va_copied",
|
|
37
|
+
"identity": "t_j5va_identity",
|
|
39
38
|
"searchBox": "t_j5va_searchBox",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
39
|
+
"title": "t_j5va_title",
|
|
40
|
+
"row": "t_j5va_row",
|
|
41
|
+
"list": "t_j5va_list"
|
|
42
42
|
};
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/client/VaultSection.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vault",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Encrypted credential vault for DeepSeek Harness: store and retrieve usernames, emails, phone numbers, passwords, TOTP secrets, SSH/API-key/OAuth developer credentials through model tools and a Settings UI page.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|