dsh-crate-web 0.1.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.
Files changed (57) hide show
  1. package/README.md +302 -0
  2. package/README.zh-CN.md +304 -0
  3. package/cordis.patch.yml +11 -0
  4. package/core/dsh_pack/__init__.py +77 -0
  5. package/core/dsh_pack/__main__.py +4 -0
  6. package/core/dsh_pack/cli.py +372 -0
  7. package/core/dsh_pack/errors.py +167 -0
  8. package/core/dsh_pack/export.py +912 -0
  9. package/core/dsh_pack/importer.py +1347 -0
  10. package/core/dsh_pack/network.py +77 -0
  11. package/core/dsh_pack/pack.py +248 -0
  12. package/core/dsh_pack/preflight.py +811 -0
  13. package/core/dsh_pack/user_cli.py +462 -0
  14. package/core/dsh_pack/validation.py +272 -0
  15. package/core/dsh_pack/verify.py +1336 -0
  16. package/lib/client.js +1623 -0
  17. package/lib/index.d.ts +30 -0
  18. package/lib/index.js +1275 -0
  19. package/package.json +73 -0
  20. package/restart-helper.mjs +121 -0
  21. package/runtime/python/LICENSE.txt +676 -0
  22. package/runtime/python/__install__.json +82 -0
  23. package/runtime/python/_asyncio.pyd +0 -0
  24. package/runtime/python/_bz2.pyd +0 -0
  25. package/runtime/python/_ctypes.pyd +0 -0
  26. package/runtime/python/_decimal.pyd +0 -0
  27. package/runtime/python/_elementtree.pyd +0 -0
  28. package/runtime/python/_hashlib.pyd +0 -0
  29. package/runtime/python/_lzma.pyd +0 -0
  30. package/runtime/python/_multiprocessing.pyd +0 -0
  31. package/runtime/python/_overlapped.pyd +0 -0
  32. package/runtime/python/_queue.pyd +0 -0
  33. package/runtime/python/_remote_debugging.pyd +0 -0
  34. package/runtime/python/_socket.pyd +0 -0
  35. package/runtime/python/_sqlite3.pyd +0 -0
  36. package/runtime/python/_ssl.pyd +0 -0
  37. package/runtime/python/_uuid.pyd +0 -0
  38. package/runtime/python/_wmi.pyd +0 -0
  39. package/runtime/python/_zoneinfo.pyd +0 -0
  40. package/runtime/python/_zstd.pyd +0 -0
  41. package/runtime/python/libcrypto-3.dll +0 -0
  42. package/runtime/python/libffi-8.dll +0 -0
  43. package/runtime/python/libssl-3.dll +0 -0
  44. package/runtime/python/pyexpat.pyd +0 -0
  45. package/runtime/python/python.cat +0 -0
  46. package/runtime/python/python.exe +0 -0
  47. package/runtime/python/python3.dll +0 -0
  48. package/runtime/python/python314._pth +6 -0
  49. package/runtime/python/python314.dll +0 -0
  50. package/runtime/python/python314.zip +0 -0
  51. package/runtime/python/pythonw.exe +0 -0
  52. package/runtime/python/select.pyd +0 -0
  53. package/runtime/python/sqlite3.dll +0 -0
  54. package/runtime/python/unicodedata.pyd +0 -0
  55. package/runtime/python/vcruntime140.dll +0 -0
  56. package/runtime/python/vcruntime140_1.dll +0 -0
  57. package/runtime/python/winsound.pyd +0 -0
package/README.md ADDED
@@ -0,0 +1,302 @@
1
+ <div align="center">
2
+
3
+ # DSH Crate
4
+
5
+ **Share a complete DeepSeek Harness setup as one inspectable file.**
6
+
7
+ [![Status: Preview](https://img.shields.io/badge/status-preview-orange.svg)](#current-preview)
8
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](#license)
9
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek-Harness-4D6BFE.svg)](https://github.com/deepseek-ai/deepseek-harness)
10
+
11
+ [Quick Start](#quick-start) · [How It Works](#how-it-works) · [Community Crates](#community-crates) · [简体中文](README.zh-CN.md)
12
+
13
+ </div>
14
+
15
+ DSH Crate turns a configured DeepSeek Harness Profile into a portable `.dshcrate` you can **inspect before Import, reconstruct as another Profile, and verify afterward**.
16
+
17
+ Instead of sending someone a plugin list, version notes, Bundle instructions, and configuration steps, send one Crate.
18
+
19
+ ```mermaid
20
+ flowchart LR
21
+ A["Working DSH Profile"] --> B["Export .dshcrate"]
22
+ B --> C["Inspect"]
23
+ C --> D["Import"]
24
+ D --> E["Verify"]
25
+ ```
26
+
27
+ ## Highlights
28
+
29
+ - **Share complete setups** — package a working DSH Profile into one `.dshcrate`.
30
+ - **Inspect before importing** — review plugins, environment differences, and risks before anything changes.
31
+ - **Portable plugin sources** — embed installable artifacts where appropriate, or keep plugins `reference-only`.
32
+ - **Safe by default** — Secret values stay out, Inspect is read-only, and existing Profiles are never silently overwritten.
33
+ - **Verify after Import** — check the reconstructed Profile and keep structured diagnostics when something fails.
34
+
35
+ ## Quick Start
36
+
37
+ Install the Web plugin into your DSH Web Profile:
38
+
39
+ ```bash
40
+ dsh plugin --profile web add dsh-crate-web
41
+ ```
42
+
43
+ Restart DSH Web, then open:
44
+
45
+ ```text
46
+ Settings → DSH Crate
47
+ ```
48
+
49
+ DSH Crate is an extension for DeepSeek Harness. It does **not** install or replace the DSH runtime; the target machine must already have a working DSH installation.
50
+
51
+ ## How It Works
52
+
53
+ ### 1. Export
54
+
55
+ Pick a configured Profile and export it as a `.dshcrate`.
56
+
57
+ A Crate can carry:
58
+
59
+ - Profile metadata
60
+ - installed plugin identity and sources
61
+ - Bundles
62
+ - required Secret names
63
+ - environment information
64
+ - embedded plugin artifacts where appropriate
65
+
66
+ Secret **values** are excluded.
67
+
68
+ ### 2. Inspect
69
+
70
+ Before Import, DSH Crate runs Preflight and reports:
71
+
72
+ - **BLOCKER** — Import should not continue
73
+ - **WARNING** — Import can continue, but a known risk or difference exists
74
+ - **INFO** — useful package or environment information
75
+
76
+ You can review the target Profile, plugin operations, environment differences, and detected risks before anything is written.
77
+
78
+ ### 3. Import
79
+
80
+ Import creates a **new Profile by default**.
81
+
82
+ Overwriting an existing Profile requires explicit confirmation. The current running Profile is never silently replaced.
83
+
84
+ ### 4. Verify
85
+
86
+ After Import, DSH Crate can Verify the imported or prepared Profile and produce structured diagnostics.
87
+
88
+ A Verify PASS means the checks DSH Crate actually ran passed. It is **not** a blanket claim that every model, Session, Core Tool, or third-party plugin business function works.
89
+
90
+ ## Current Preview
91
+
92
+ The current Preview supports:
93
+
94
+ - inspecting the current Profile, installed plugins, and Bundles
95
+ - exporting Profiles as `.dshcrate`
96
+ - choosing `embedded` or `reference-only` plugin handling
97
+ - recording required Secret names without exporting Secret values
98
+ - Inspect / Preflight with `BLOCKER`, `WARNING`, `INFO`, and environment differences
99
+ - Import Preview before changes are applied
100
+ - Import as a new Profile
101
+ - explicit-confirmation overwrite of an existing Profile
102
+ - Verify for imported or prepared Profiles
103
+ - complete failure diagnostics and copyable diagnostic JSON
104
+ - operation history and Crate download
105
+ - deletion of non-running Profiles
106
+ - explicit-confirmation Profile switch and restart
107
+
108
+ The current Preview does **not** directly test:
109
+
110
+ - model conversations
111
+ - Session creation
112
+ - Core Tool execution
113
+ - plugin-specific business functions
114
+
115
+ Those capabilities remain outside the current verification claim.
116
+
117
+ ## Share or Migrate
118
+
119
+ ### Share a setup
120
+
121
+ Without a Crate:
122
+
123
+ ```text
124
+ Install plugin A
125
+ Install plugin B
126
+ Use this version
127
+ Enable these Bundles
128
+ Apply this config
129
+ Add these Secrets
130
+ ...
131
+ ```
132
+
133
+ With DSH Crate:
134
+
135
+ ```text
136
+ Export → send setup.dshcrate → Inspect → Import
137
+ ```
138
+
139
+ The recipient can see what is inside before changing their environment.
140
+
141
+ ### Move to another machine
142
+
143
+ ```text
144
+ Machine A
145
+ ↓
146
+ Export
147
+ ↓
148
+ .dshcrate
149
+ ↓
150
+ Machine B
151
+ ↓
152
+ Preflight
153
+ ↓
154
+ Import
155
+ ↓
156
+ Verify
157
+ ```
158
+
159
+ The goal is not to clone the original machine byte-for-byte. The goal is to reconstruct the DSH environment from portable information and explicit package sources.
160
+
161
+ ## Embedded vs Reference-only
162
+
163
+ ### Embedded
164
+
165
+ The Crate carries an installable plugin artifact when available and appropriate.
166
+
167
+ Use this when preserving the actual installable artifact matters more than file size.
168
+
169
+ ```text
170
+ plugin artifact
171
+ + package identity
172
+ + integrity information
173
+ ↓
174
+ .dshcrate
175
+ ```
176
+
177
+ ### Reference-only
178
+
179
+ The Crate stores plugin source and identity, then reacquires the plugin during Import.
180
+
181
+ Use this when:
182
+
183
+ - the source is expected to remain available
184
+ - redistribution is not appropriate
185
+ - you want a smaller Crate
186
+
187
+ A single Crate can mix both modes.
188
+
189
+ ## Community Crates
190
+
191
+ A `.dshcrate` can be more than a backup artifact: it can be a reusable DSH setup.
192
+
193
+ **Useful, tested Community Crates are welcome as Pull Requests.**
194
+
195
+ Good examples include:
196
+
197
+ - Coding environments
198
+ - Research / Browser environments
199
+ - minimal practical Profiles
200
+ - specialized workflow setups
201
+ - plugin combinations that solve a real task
202
+
203
+ A Community Crate should state:
204
+
205
+ - purpose
206
+ - included plugins
207
+ - embedded / reference-only choices
208
+ - required Secret names
209
+ - tested DSH version
210
+ - tested Node version
211
+ - tested operating system
212
+ - what was actually verified
213
+ - known limitations
214
+ - last tested date
215
+
216
+ `Verified` means only that the listed checks were executed in the listed environment. It does **not** mean universal compatibility.
217
+
218
+ ## Safety
219
+
220
+ DSH Crate is designed around explicit changes and inspectable artifacts:
221
+
222
+ - Secret values are excluded from ordinary Crates.
223
+ - Inspect and dry-run are read-only.
224
+ - Existing Profiles are not silently overwritten.
225
+ - Overwrite, switch, restart, and destructive Profile operations require explicit confirmation.
226
+ - Failed Import should not commit a partially successful target.
227
+ - Full diagnostics remain available after failure.
228
+
229
+ ## FAQ
230
+
231
+ ### Why not just zip `DSH_HOME`?
232
+
233
+ You can — and for a private backup of one machine, that may be the simplest option.
234
+
235
+ DSH Crate solves a different problem: **sharing, migration, inspection, and controlled reconstruction** without copying the entire DSH home.
236
+
237
+ A raw archive may contain or depend on credentials, private Conversations, caches, logs, temporary state, machine-specific paths, `node_modules`, and local runtime details.
238
+
239
+ DSH Crate instead separates portable environment data, reference-only dependencies, required Secret names, and excluded private/runtime data.
240
+
241
+ ### What does Verify actually prove?
242
+
243
+ Only the checks DSH Crate actually ran.
244
+
245
+ A successful Profile Verify is not evidence that model conversation, Session creation, Core Tool execution, or every plugin-specific feature works unless those checks were explicitly performed.
246
+
247
+ ### Is DSH Crate a Profile manager?
248
+
249
+ Profile management is not the main product.
250
+
251
+ DSH Crate focuses on **portable environment artifacts, controlled Import, migration, diagnostics, and evidence-based verification** rather than becoming a second general-purpose Profile manager.
252
+
253
+ ## Roadmap
254
+
255
+ The near-term direction is intentionally narrow:
256
+
257
+ - **Troubleshooting Skill** — consume diagnostic JSON, identify the failing stage, suggest evidence-backed minimal repairs, then Verify again.
258
+ - **Broader environment portability** — add Conversation, plugin configuration, plugin-owned workflow, and other safely identifiable plugin-local data.
259
+ - **Full Configuration Freeze** — later, preserve as much reconstructible DSH configuration as possible and report whether offline restoration is actually proven.
260
+
261
+ Freeze is an advanced workflow, not the primary reason to use DSH Crate.
262
+
263
+ ## Development CLI
264
+
265
+ The Core currently exposes a development CLI:
266
+
267
+ ```powershell
268
+ dsh-crate inspect .\example.dshcrate --json
269
+ dsh-crate import .\example.dshcrate --dsh-home $env:DSH_HOME --json
270
+ dsh-crate verify --dsh-home $env:DSH_HOME --profile my-profile --mode web --json
271
+ ```
272
+
273
+ Use `--offline` to disable network fallback for missing reference-only plugins.
274
+
275
+ ## Contributing
276
+
277
+ Useful contributions include:
278
+
279
+ - reproducible Import / Export failures
280
+ - unusual npm / Git / tarball plugin sources
281
+ - Windows / Linux / macOS test results
282
+ - third-party packaging edge cases
283
+ - documentation improvements
284
+ - useful, tested Community Crates
285
+
286
+ For bug reports, include:
287
+
288
+ ```text
289
+ DSH version:
290
+ Node version:
291
+ OS / architecture:
292
+ Source Profile:
293
+ Expected behavior:
294
+ Observed behavior:
295
+ Diagnostic JSON:
296
+ ```
297
+
298
+ Do not include real credentials.
299
+
300
+ ## License
301
+
302
+ MIT License.
@@ -0,0 +1,304 @@
1
+ <div align="center">
2
+
3
+ # DSH Crate
4
+
5
+ **把一整套 DeepSeek Harness 环境分享成一个可检查的文件。**
6
+
7
+ [![状态:Preview](https://img.shields.io/badge/status-preview-orange.svg)](#当前-preview)
8
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](#license)
9
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek-Harness-4D6BFE.svg)](https://github.com/deepseek-ai/deepseek-harness)
10
+
11
+ [快速开始](#快速开始) · [工作方式](#工作方式) · [Community Crates](#community-crates) · [English](README.md)
12
+
13
+ </div>
14
+
15
+ DSH Crate 可以把已经配置好的 DeepSeek Harness Profile 导出为 `.dshcrate`:**导入前先检查,导入时受控重建,导入后再 Verify**。
16
+
17
+ 不用再给别人发一长串插件列表、版本说明、Bundle 配置和操作步骤,直接发一个 Crate。
18
+
19
+ ```mermaid
20
+ flowchart LR
21
+ A["已经工作的 DSH Profile"] --> B["导出 .dshcrate"]
22
+ B --> C["Inspect"]
23
+ C --> D["Import"]
24
+ D --> E["Verify"]
25
+ ```
26
+
27
+ ## 核心特点
28
+
29
+ - **分享完整环境** — 把已经工作的 DSH Profile 导出成一个 `.dshcrate`。
30
+ - **导入前先检查** — 在真正修改环境前查看插件、环境差异和风险。
31
+ - **插件来源可移植** — 适合时嵌入可安装制品,也可以保持 `reference-only`。
32
+ - **默认安全** — Secret 值不进入 Crate,Inspect 只读,已有 Profile 不会被静默覆盖。
33
+ - **导入后验证** — 对重建后的 Profile 执行 Verify,失败时保留结构化诊断。
34
+
35
+ ## 快速开始
36
+
37
+ 把 Web 插件安装到 DSH Web Profile:
38
+
39
+ ```bash
40
+ dsh plugin --profile web add dsh-crate-web
41
+ ```
42
+
43
+ 重启 DSH Web,然后打开:
44
+
45
+ ```text
46
+ Settings → DSH Crate
47
+ ```
48
+
49
+ DSH Crate 是 DeepSeek Harness 的扩展,不负责安装或替代 DSH runtime。目标机器需要已经能够正常运行 DSH。
50
+
51
+ ## 工作方式
52
+
53
+ ### 1. Export
54
+
55
+ 选择一个已经配置好的 Profile,导出为 `.dshcrate`。
56
+
57
+ Crate 可以记录:
58
+
59
+ - Profile 元数据
60
+ - 已安装插件的身份与来源
61
+ - Bundle
62
+ - required Secret 名称
63
+ - 环境信息
64
+ - 适合嵌入的插件制品
65
+
66
+ Secret **真实值**不会被导出。
67
+
68
+ ### 2. Inspect
69
+
70
+ Import 前先执行 Preflight:
71
+
72
+ - **BLOCKER** — 不应该继续 Import
73
+ - **WARNING** — 可以继续,但存在已知风险或差异
74
+ - **INFO** — 普通包信息或环境信息
75
+
76
+ 真正写入之前,可以先查看目标 Profile、插件操作、环境差异和检测到的风险。
77
+
78
+ ### 3. Import
79
+
80
+ Import 默认创建**新的 Profile**。
81
+
82
+ 覆盖已有 Profile 必须明确确认;当前正在运行的 Profile 不会被静默替换。
83
+
84
+ ### 4. Verify
85
+
86
+ Import 后,DSH Crate 可以对导入或准备好的 Profile 执行 Verify,并生成结构化诊断。
87
+
88
+ Verify PASS 只代表 **DSH Crate 实际执行的检查通过了**,不代表模型、Session、Core Tool 或所有第三方插件业务功能全部可用。
89
+
90
+ ## 当前 Preview
91
+
92
+ 当前版本支持:
93
+
94
+ - 查看当前 Profile、已安装插件和 Bundle
95
+ - 导出 Profile 为 `.dshcrate`
96
+ - 为插件选择 `embedded` 或 `reference-only`
97
+ - 记录 required Secret 名称,但不导出 Secret 值
98
+ - Inspect / Preflight,展示 `BLOCKER`、`WARNING`、`INFO` 和环境差异
99
+ - Import 前预览目标 Profile、插件和风险
100
+ - 导入为新的 Profile
101
+ - 明确确认后覆盖已有 Profile
102
+ - 对导入或准备好的 Profile 执行 Verify
103
+ - 查看完整错误诊断并复制 diagnostic JSON
104
+ - 查看操作历史并下载导出的 Crate
105
+ - 删除当前未运行的 Profile
106
+ - 明确确认后切换并重启 Profile
107
+
108
+ 当前 Preview **不直接测试**:
109
+
110
+ - 模型对话
111
+ - Session 创建
112
+ - Core Tool 执行
113
+ - 插件业务功能
114
+
115
+ 因此这些能力不属于当前 Verify 的承诺范围。
116
+
117
+ ## 分享或迁移
118
+
119
+ ### 分享一套环境
120
+
121
+ 没有 Crate 时:
122
+
123
+ ```text
124
+ 先装插件 A
125
+ 再装插件 B
126
+ 用这个版本
127
+ 启用这些 Bundle
128
+ 改这些配置
129
+ 还需要这些 Secret
130
+ ……
131
+ ```
132
+
133
+ 有了 DSH Crate:
134
+
135
+ ```text
136
+ Export → 发送 setup.dshcrate → Inspect → Import
137
+ ```
138
+
139
+ 接收者可以先看到里面有什么,再决定是否导入。
140
+
141
+ ### 迁移到另一台机器
142
+
143
+ ```text
144
+ 电脑 A
145
+ ↓
146
+ Export
147
+ ↓
148
+ .dshcrate
149
+ ↓
150
+ 电脑 B
151
+ ↓
152
+ Preflight
153
+ ↓
154
+ Import
155
+ ↓
156
+ Verify
157
+ ```
158
+
159
+ 目标不是把原机器逐字节复制过去,而是根据可迁移信息和明确的插件来源,在目标机器重建 DSH 环境。
160
+
161
+ ## Embedded 与 Reference-only
162
+
163
+ ### Embedded
164
+
165
+ 在适合的情况下,把可安装的插件制品直接放进 Crate。
166
+
167
+ 适合更重视实际安装制品保存、而不是文件体积的场景。
168
+
169
+ ```text
170
+ 插件制品
171
+ + Package Identity
172
+ + 完整性信息
173
+ ↓
174
+ .dshcrate
175
+ ```
176
+
177
+ ### Reference-only
178
+
179
+ 只保存插件来源和身份,在 Import 时重新获取。
180
+
181
+ 适合:
182
+
183
+ - 原始来源预计长期可用
184
+ - 不适合重新分发插件制品
185
+ - 希望 Crate 更小
186
+
187
+ 同一个 Crate 可以同时包含两种模式。
188
+
189
+ ## Community Crates
190
+
191
+ `.dshcrate` 不只是备份文件,也可以是一套可以直接复用的 DSH 环境。
192
+
193
+ **好用、经过实际验证的 Community Crate,欢迎通过 Pull Request 提交。**
194
+
195
+ 适合投稿的内容包括:
196
+
197
+ - Coding 环境
198
+ - Research / Browser 环境
199
+ - 简洁但真正实用的 Profile
200
+ - 专用工作流环境
201
+ - 已经实际使用过的插件组合
202
+
203
+ Community Crate 至少应该说明:
204
+
205
+ - 用途
206
+ - 包含哪些插件
207
+ - embedded / reference-only 选择
208
+ - required Secret 名称
209
+ - 测试时使用的 DSH 版本
210
+ - Node 版本
211
+ - 操作系统
212
+ - 实际验证范围
213
+ - 已知限制
214
+ - 最后测试日期
215
+
216
+ `Verified` 只表示列出的测试确实在列出的环境中运行过,不表示全平台、全版本永久兼容。
217
+
218
+ ## 安全边界
219
+
220
+ DSH Crate 的设计原则是:所有重要修改都应该显式、可检查。
221
+
222
+ - Secret 值不进入普通 Crate。
223
+ - Inspect 和 dry-run 保持只读。
224
+ - 已有 Profile 不会被静默覆盖。
225
+ - 覆盖、切换、重启和破坏性 Profile 操作需要明确确认。
226
+ - Import 失败时不应提交半成功目标。
227
+ - 失败后仍保留完整诊断。
228
+
229
+ ## FAQ
230
+
231
+ ### 为什么不直接压缩 `DSH_HOME`?
232
+
233
+ 完全可以。
234
+
235
+ 如果只是给自己备份当前机器,直接压缩整个 DSH 目录可能反而是最简单的方案。
236
+
237
+ DSH Crate 解决的是另一个问题:**分享、迁移、检查和受控重建**,而不是直接复制整个 DSH home。
238
+
239
+ 普通压缩包可能同时包含或依赖 Credential、私人 Conversation、缓存、日志、临时状态、本机绝对路径、`node_modules` 和本地 runtime 状态。
240
+
241
+ DSH Crate 更关注把环境拆成可迁移数据、reference-only 依赖、required Secret 名称,以及明确排除的隐私 / runtime 数据。
242
+
243
+ ### Verify 到底证明了什么?
244
+
245
+ 只证明 DSH Crate 实际执行过的检查。
246
+
247
+ 如果没有显式测试模型对话、Session 创建、Core Tool 或插件业务能力,那么 Profile Verify 成功也不能被解释成这些能力已经通过。
248
+
249
+ ### DSH Crate 是 Profile Manager 吗?
250
+
251
+ Profile 管理不是主要产品。
252
+
253
+ DSH Crate 的重点是**可分享环境制品、受控 Import、跨机器迁移、诊断和基于证据的 Verify**,而不是再做一套通用 Profile Manager。
254
+
255
+ ## Roadmap
256
+
257
+ 近期开发方向会刻意保持收敛:
258
+
259
+ - **Troubleshooting Skill** — 读取 diagnostic JSON,定位失败阶段,基于证据提出最小修复,然后再次 Verify。
260
+ - **更完整的环境迁移** — 增加 Conversation、插件配置、插件内工作流,以及能够安全识别归属关系的其他插件本地数据。
261
+ - **Full Configuration Freeze** — 后续高级能力,尽可能保存可重建的 DSH 配置,并明确报告离线恢复是否真正经过验证。
262
+
263
+ Freeze 是高级工作流,不是 DSH Crate 当前最主要的使用理由。
264
+
265
+ ## 开发环境 CLI
266
+
267
+ Core 当前提供开发环境 CLI:
268
+
269
+ ```powershell
270
+ dsh-crate inspect .\example.dshcrate --json
271
+ dsh-crate import .\example.dshcrate --dsh-home $env:DSH_HOME --json
272
+ dsh-crate verify --dsh-home $env:DSH_HOME --profile my-profile --mode web --json
273
+ ```
274
+
275
+ 使用 `--offline` 可以禁止缺失 reference-only 插件时通过网络回退获取。
276
+
277
+ ## 贡献
278
+
279
+ 欢迎提交:
280
+
281
+ - 可复现的 Import / Export 问题
282
+ - 特殊 npm / Git / tarball 插件来源案例
283
+ - Windows / Linux / macOS 测试结果
284
+ - 第三方插件打包边界案例
285
+ - 文档修改
286
+ - 好用并经过实际验证的 Community Crate
287
+
288
+ Bug Report 建议包含:
289
+
290
+ ```text
291
+ DSH version:
292
+ Node version:
293
+ OS / architecture:
294
+ Source Profile:
295
+ Expected behavior:
296
+ Observed behavior:
297
+ Diagnostic JSON:
298
+ ```
299
+
300
+ 请不要提交真实 Credential。
301
+
302
+ ## License
303
+
304
+ MIT License.
@@ -0,0 +1,11 @@
1
+ # Add this Bundle after dsh-web-app. The host half exposes the local Core CLI
2
+ # bridge and its dsh.client manifest adds the Settings page to the Web roster.
3
+ - insert:
4
+ - id: dsh-crate-web
5
+ name: 'dsh-crate-web'
6
+ inject: [webServer]
7
+ # Replace the official read-only plugin-list tab: DSH Crate registers the same
8
+ # `settings.plugins.tab` id (`all`) with a collapsible official/user inventory.
9
+ # The data host row `plugin-inventory` is left enabled.
10
+ - id: ui-settings-plugin-inventory
11
+ disabled: true
@@ -0,0 +1,77 @@
1
+ """DSH Pack Phase 1 core and Phase 2 export.
2
+
3
+ The Pack core validates semantic Pack data and reads/writes a safe ZIP
4
+ container with SHA-256 integrity metadata. Export reads an existing Profile
5
+ and uses local ``npm pack`` only for explicitly embedded artifacts; it does
6
+ not install packages or start DSH.
7
+ """
8
+
9
+ from .errors import (
10
+ DshPackError,
11
+ DuplicateEntryError,
12
+ ExportError,
13
+ IntegrityError,
14
+ PackImportError,
15
+ PathSafetyError,
16
+ PackFormatError,
17
+ SchemaValidationError,
18
+ )
19
+ from .export import EMBEDDED, REFERENCE_ONLY, ExportOptions, ExportResult, PluginExportOptions, export_profile
20
+ from .importer import DeleteResult, ImportOptions, ImportPlan, ImportResult, create_import_plan, delete_profile, import_pack
21
+ from .pack import PackData, create, read
22
+ from .preflight import Finding, PreflightContext, PreflightResult, inspect_pack, render_text
23
+ from .validation import validate_archive_path, validate_environment, validate_manifest, validate_plugins_lock
24
+ from .verify import (
25
+ RUNTIME_STEPS,
26
+ SmokeTestContract,
27
+ SubprocessVerifyAdapter,
28
+ VerifyOptions,
29
+ VerifyResult,
30
+ VerifyStep,
31
+ load_smoke_contracts,
32
+ verify_profile,
33
+ )
34
+
35
+ __all__ = [
36
+ "DshPackError",
37
+ "DeleteResult",
38
+ "DuplicateEntryError",
39
+ "EMBEDDED",
40
+ "ExportError",
41
+ "ExportOptions",
42
+ "ExportResult",
43
+ "Finding",
44
+ "IntegrityError",
45
+ "ImportOptions",
46
+ "ImportPlan",
47
+ "ImportResult",
48
+ "PackData",
49
+ "PackFormatError",
50
+ "PackImportError",
51
+ "PathSafetyError",
52
+ "PreflightContext",
53
+ "PreflightResult",
54
+ "PluginExportOptions",
55
+ "REFERENCE_ONLY",
56
+ "RUNTIME_STEPS",
57
+ "SchemaValidationError",
58
+ "SmokeTestContract",
59
+ "SubprocessVerifyAdapter",
60
+ "VerifyOptions",
61
+ "VerifyResult",
62
+ "VerifyStep",
63
+ "create",
64
+ "export_profile",
65
+ "create_import_plan",
66
+ "delete_profile",
67
+ "import_pack",
68
+ "inspect_pack",
69
+ "read",
70
+ "render_text",
71
+ "validate_archive_path",
72
+ "validate_environment",
73
+ "validate_manifest",
74
+ "validate_plugins_lock",
75
+ "load_smoke_contracts",
76
+ "verify_profile",
77
+ ]
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+
4
+ raise SystemExit(main())