dsh-crate-web 0.1.1 → 0.1.2-preview.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.md +11 -290
- package/README.zh-CN.md +2 -303
- package/THIRD-PARTY-LICENSE.txt +21 -0
- package/cordis.patch.yml +1 -6
- package/core/dsh_pack/_version.py +1 -0
- package/core/dsh_pack/bundle.py +74 -0
- package/core/dsh_pack/cli.py +81 -18
- package/core/dsh_pack/desktop_verify.py +304 -0
- package/core/dsh_pack/diagnostics.py +1170 -0
- package/core/dsh_pack/errors.py +16 -1
- package/core/dsh_pack/export.py +86 -103
- package/core/dsh_pack/export_plan.py +96 -0
- package/core/dsh_pack/identity.py +25 -0
- package/core/dsh_pack/importer.py +468 -217
- package/core/dsh_pack/network.py +5 -4
- package/core/dsh_pack/pack.py +14 -2
- package/core/dsh_pack/portability.py +392 -0
- package/core/dsh_pack/preflight.py +63 -16
- package/core/dsh_pack/troubleshooting.py +94 -0
- package/core/dsh_pack/user_cli.py +16 -0
- package/core/dsh_pack/validation.py +64 -4
- package/core/dsh_pack/verify.py +343 -194
- package/core/dsh_pack/windows_verify.py +177 -0
- package/desktop-patch-helper.mjs +140 -0
- package/lib/client.js +292 -102
- package/lib/index.d.ts +7 -1
- package/lib/index.js +1121 -229
- package/package.json +14 -7
- package/skills/dsh-crate-troubleshooting/SKILL.md +172 -0
- package/skills/dsh-crate-troubleshooting/compatibility.json +11 -0
- package/skills/dsh-crate-troubleshooting/reference/diagnostics.generated.md +96 -0
- package/skills/dsh-crate-troubleshooting/reference/repair-boundaries.md +60 -0
- package/skills/dsh-crate-troubleshooting/reference/stages.generated.md +22 -0
- package/verify-desktop.mjs +314 -0
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-crate-web",
|
|
3
3
|
"description": "DSH Web Settings surface for DSH Crate export, import, inspect, and history",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2-preview.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
|
-
"types": "lib/
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./lib/index.d.ts",
|
|
@@ -21,12 +21,19 @@
|
|
|
21
21
|
"lib/client.js",
|
|
22
22
|
"lib/*.d.ts",
|
|
23
23
|
"restart-helper.mjs",
|
|
24
|
+
"verify-desktop.mjs",
|
|
25
|
+
"desktop-patch-helper.mjs",
|
|
24
26
|
"cordis.patch.yml",
|
|
25
27
|
"core/dsh_pack/**/*.py",
|
|
26
|
-
"runtime/python"
|
|
28
|
+
"runtime/python",
|
|
29
|
+
"skills/dsh-crate-troubleshooting/SKILL.md",
|
|
30
|
+
"skills/dsh-crate-troubleshooting/compatibility.json",
|
|
31
|
+
"skills/dsh-crate-troubleshooting/reference/*.md",
|
|
32
|
+
"THIRD-PARTY-LICENSE.txt"
|
|
27
33
|
],
|
|
28
34
|
"publishConfig": {
|
|
29
|
-
"access": "public"
|
|
35
|
+
"access": "public",
|
|
36
|
+
"tag": "preview"
|
|
30
37
|
},
|
|
31
38
|
"license": "MIT",
|
|
32
39
|
"dsh": {
|
|
@@ -46,6 +53,7 @@
|
|
|
46
53
|
"bundle": "node scripts/vendor-core.mjs && node scripts/prepare-runtime.mjs && tsdown"
|
|
47
54
|
},
|
|
48
55
|
"peerDependencies": {
|
|
56
|
+
"@deepseek-ai/dsh-client-connection": "*",
|
|
49
57
|
"@deepseek-ai/cordis": "^4.0.0",
|
|
50
58
|
"@deepseek-ai/dsh-client-locale": "*",
|
|
51
59
|
"@deepseek-ai/dsh-client-runtime": "*",
|
|
@@ -68,7 +76,6 @@
|
|
|
68
76
|
],
|
|
69
77
|
"repository": {
|
|
70
78
|
"type": "git",
|
|
71
|
-
"url": "https://github.com/joezhou172/dsh-crate-web.git"
|
|
72
|
-
}
|
|
73
|
-
"author": "joezhou172 <rdhwhyhrg@163.com>"
|
|
79
|
+
"url": "git+https://github.com/joezhou172/dsh-crate-web.git"
|
|
80
|
+
}
|
|
74
81
|
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dsh-crate-troubleshooting
|
|
3
|
+
description: Diagnose DSH Crate Import, Export and Verify failures from complete diagnostic reports, with version checks and minimal scoped next steps.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DSH Crate Troubleshooting Skill
|
|
7
|
+
|
|
8
|
+
Version-aware troubleshooting for DSH Crate diagnostics. Run dsh-crate diagnose report.json --json for a read-only classification; it preserves the complete input report and never executes commands from it.
|
|
9
|
+
|
|
10
|
+
This Skill ships with the same version as the DSH Crate release it supports.
|
|
11
|
+
The version compatibility contract lives in `compatibility.json`; the code
|
|
12
|
+
registry in `src/dsh_pack/diagnostics.py` is the single source of truth for
|
|
13
|
+
diagnostic codes and stages (rendered into `reference/diagnostics.generated.md`
|
|
14
|
+
and `reference/stages.generated.md` by `scripts/generate-skill-reference.py`).
|
|
15
|
+
|
|
16
|
+
## 0. Read first
|
|
17
|
+
|
|
18
|
+
1. `compatibility.json` — what this Skill version supports.
|
|
19
|
+
2. `reference/repair-boundaries.md` — what may be touched at each repair level.
|
|
20
|
+
3. `reference/diagnostics.generated.md` / `reference/stages.generated.md` —
|
|
21
|
+
codes and stages this release knows.
|
|
22
|
+
4. The incoming diagnostic JSON — never guess what it contains.
|
|
23
|
+
|
|
24
|
+
## 1. Version Gate (always first)
|
|
25
|
+
|
|
26
|
+
Read the diagnostic envelope:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"producer": "dsh-crate",
|
|
31
|
+
"crateVersion": "0.1.0",
|
|
32
|
+
"diagnosticSchemaVersion": 1,
|
|
33
|
+
"operation": "import",
|
|
34
|
+
"operationId": "...",
|
|
35
|
+
"status": "FAIL"
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Classify with the compatibility contract:
|
|
40
|
+
|
|
41
|
+
- `FULL` — same Crate generation and a supported diagnostic schema; diagnose normally.
|
|
42
|
+
- `COMPATIBLE` — older Crate inside the supported range; use compatibility rules, do not assume newer-only behavior.
|
|
43
|
+
- `UNSUPPORTED` — Crate outside the supported range or an unsupported schema. You may interpret the raw evidence, but you MUST NOT apply version-related automatic repair. State clearly: `This diagnostic was produced by DSH Crate <x>, but this Troubleshooting Skill supports <range>. Update the Skill before applying automated repair.`
|
|
44
|
+
|
|
45
|
+
Missing envelope fields: treat as `UNSUPPORTED` with reason "diagnostic envelope is incomplete"; do not guess the missing values.
|
|
46
|
+
|
|
47
|
+
## 2. Identify the operation
|
|
48
|
+
|
|
49
|
+
Use `operation` (e.g. `import`, `export`, `inspect`, `verify`, `create-profile`, `delete-profile`, `switch-profile`). The operation tells you which end state was requested and therefore which "original state unchanged" guarantee applies.
|
|
50
|
+
|
|
51
|
+
## 3. Identify the failed stage
|
|
52
|
+
|
|
53
|
+
Look at the issue `stage` and the operation report. Confirm with evidence:
|
|
54
|
+
|
|
55
|
+
- which Pack file or Profile path is involved;
|
|
56
|
+
- which command was run (and its exit code / stdout / stderr);
|
|
57
|
+
- which plugin/artifact/item is the subject.
|
|
58
|
+
|
|
59
|
+
`reference/stages.generated.md` maps each stage to its meaning and Import state.
|
|
60
|
+
|
|
61
|
+
## 4. Collect evidence
|
|
62
|
+
|
|
63
|
+
Separate **fact** from **hypothesis**:
|
|
64
|
+
|
|
65
|
+
- Fact: envelope fields, `code`, `stage`, `item`, `expected`, `observed`, `evidence`, `stdout`/`stderr`, exit code, current file state, current Profile state.
|
|
66
|
+
- Hypothesis: anything you infer beyond the evidence. Label it explicitly.
|
|
67
|
+
|
|
68
|
+
Do not treat a missing check as a pass and do not invent evidence. If the diagnostic says `canContinue: false`, stopping is the correct behavior.
|
|
69
|
+
|
|
70
|
+
## 5. Match the known diagnostic
|
|
71
|
+
|
|
72
|
+
Look up `code` in `reference/diagnostics.generated.md`.
|
|
73
|
+
|
|
74
|
+
- Known code -> use the registry entry (severity, repair level, write scope, suggested checks).
|
|
75
|
+
- Unknown code -> `known: false`, repair level `L3`, write scope `none`. Report the code as unknown; never guess a fix.
|
|
76
|
+
|
|
77
|
+
## 6. Build a hypothesis
|
|
78
|
+
|
|
79
|
+
Only after evidence supports it:
|
|
80
|
+
|
|
81
|
+
1. Read the failing stage and its evidence.
|
|
82
|
+
2. List plausible causes (max 2-3) with the evidence each would need.
|
|
83
|
+
3. Run the cheapest read-only check that discriminates between them.
|
|
84
|
+
4. Proceed only when evidence points at one cause.
|
|
85
|
+
|
|
86
|
+
If evidence is insufficient, stop and request the missing evidence.
|
|
87
|
+
|
|
88
|
+
## 7. Select the minimum action
|
|
89
|
+
|
|
90
|
+
Choose the smallest write that addresses the confirmed cause. Respect the repair level:
|
|
91
|
+
|
|
92
|
+
- `L0` — read-only. Automatic.
|
|
93
|
+
- `L1` — safe reversible writes. Automatic; see `reference/repair-boundaries.md`.
|
|
94
|
+
- `L2` — must obtain explicit user confirmation before writing.
|
|
95
|
+
- `L3` — never automatic. Report only.
|
|
96
|
+
|
|
97
|
+
## 8. Respect the write boundary
|
|
98
|
+
|
|
99
|
+
Never:
|
|
100
|
+
|
|
101
|
+
- mutate credentials, tokens, cookies, passwords, private keys, or `Authorization` material;
|
|
102
|
+
- delete or modify the original working Profile except through an explicit confirmed operation;
|
|
103
|
+
- modify unrelated Profiles;
|
|
104
|
+
- modify DSH vendor source;
|
|
105
|
+
- lower the verification standard to clear an error (FAIL -> WARNING);
|
|
106
|
+
- fake a Verify PASS.
|
|
107
|
+
|
|
108
|
+
Scope every write to the target temporary Profile or the exact confirmed target, and record it.
|
|
109
|
+
|
|
110
|
+
## 9. Execute if allowed
|
|
111
|
+
|
|
112
|
+
Perform the L1/L2 action exactly as confirmed. If the action fails, do not paper over it: keep the operation `FAIL`, record the new evidence, and stop or request the next confirmed step.
|
|
113
|
+
|
|
114
|
+
## 10. Verify
|
|
115
|
+
|
|
116
|
+
Verification is the only arbiter of success:
|
|
117
|
+
|
|
118
|
+
- Re-run the DSH Crate `verify` for the affected Profile (web or headless mode as configured).
|
|
119
|
+
- `PASS` — report PASS with the verifying evidence.
|
|
120
|
+
- `FAIL` — report FAIL: "Repair did not resolve the original failure."
|
|
121
|
+
- If the affected capability cannot be verified, the result is `UNTESTED`, never PASS.
|
|
122
|
+
|
|
123
|
+
## 11. Report
|
|
124
|
+
|
|
125
|
+
Fixed structured output:
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
Diagnosis
|
|
129
|
+
---------
|
|
130
|
+
Operation: <operation>
|
|
131
|
+
Stage: <stage>
|
|
132
|
+
Code: <code>
|
|
133
|
+
Severity: <severity>
|
|
134
|
+
Item: <item>
|
|
135
|
+
Known: yes/no
|
|
136
|
+
|
|
137
|
+
Evidence
|
|
138
|
+
--------
|
|
139
|
+
<facts and captured output>
|
|
140
|
+
|
|
141
|
+
Likely cause
|
|
142
|
+
------------
|
|
143
|
+
<evidence-backed cause>
|
|
144
|
+
|
|
145
|
+
Confidence
|
|
146
|
+
----------
|
|
147
|
+
High / Medium / Low
|
|
148
|
+
|
|
149
|
+
Action
|
|
150
|
+
------
|
|
151
|
+
<what was done, or what is proposed>
|
|
152
|
+
|
|
153
|
+
Write scope
|
|
154
|
+
-----------
|
|
155
|
+
<scope actually touched>
|
|
156
|
+
|
|
157
|
+
Verification
|
|
158
|
+
------------
|
|
159
|
+
PASS / FAIL / UNTESTED / DEGRADED
|
|
160
|
+
<evidence>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## 12. Stop conditions
|
|
164
|
+
|
|
165
|
+
Stop and hand back to the user when any of these hold:
|
|
166
|
+
|
|
167
|
+
- version gate is `UNSUPPORTED`;
|
|
168
|
+
- the code is unknown (L3);
|
|
169
|
+
- the required action is `L2`/`L3` without explicit confirmation;
|
|
170
|
+
- evidence is insufficient to choose a cause;
|
|
171
|
+
- a repair was attempted and verification still fails;
|
|
172
|
+
- the diagnostic says the operation is not allowed to continue.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# DSH Crate Diagnostic Codes
|
|
2
|
+
|
|
3
|
+
> Generated from `core/dsh_pack/diagnostics.py` (schema v1, producer `dsh-crate`, crate 0.1.2-preview.2). Do not edit by hand.
|
|
4
|
+
|
|
5
|
+
Total codes: **79**. Stages: **16**.
|
|
6
|
+
|
|
7
|
+
| Code | Stage | Severity | Repair | Write scope | Verify after | Summary |
|
|
8
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
9
|
+
| `ACTIVE_PROFILE` | delete | BLOCKER | L2 | target-profile | yes | Cannot delete the active Profile. |
|
|
10
|
+
| `ARTIFACT_MEMBER_DUPLICATE` | embedded-install | BLOCKER | L1 | none | yes | Embedded artifact contains a duplicate member. |
|
|
11
|
+
| `ARTIFACT_MEMBER_READ_ERROR` | embedded-install | BLOCKER | L1 | none | yes | Embedded artifact member cannot be read. |
|
|
12
|
+
| `ARTIFACT_MEMBER_TYPE_INVALID` | embedded-install | BLOCKER | L1 | none | yes | Embedded artifact member type is invalid. |
|
|
13
|
+
| `ARTIFACT_PATH_INVALID` | embedded-install | BLOCKER | L1 | none | yes | Embedded artifact path is invalid. |
|
|
14
|
+
| `ARTIFACT_PATH_MISSING` | embedded-install | BLOCKER | L1 | none | yes | Embedded artifact path is missing. |
|
|
15
|
+
| `ARTIFACT_UNPACK_FAILED` | embedded-install | BLOCKER | L1 | temporary-profile | yes | Embedded artifact unpack failed. |
|
|
16
|
+
| `CONFLICT_BUNDLE_COMPOSITION` | composition | BLOCKER | L1 | target-profile | yes | Bundle composition conflict. |
|
|
17
|
+
| `CONFLICT_DUPLICATE_ARTIFACT` | composition | BLOCKER | L1 | none | yes | Duplicate plugin artifact. |
|
|
18
|
+
| `CONFLICT_DUPLICATE_BUNDLE_ORDER` | composition | BLOCKER | L1 | none | yes | Duplicate Bundle order. |
|
|
19
|
+
| `CRATE_VERSION_MISSING` | planning | BLOCKER | L1 | dsh-home | yes | DSH Crate package version is missing. |
|
|
20
|
+
| `DELETE_CONFIRMATION_REQUIRED` | delete | BLOCKER | L2 | target-profile | yes | Delete requires explicit confirmation. |
|
|
21
|
+
| `EMBEDDED_DEPENDENCIES_INSTALL_FAILED` | embedded-install | BLOCKER | L1 | temporary-profile | yes | Embedded dependency install failed. |
|
|
22
|
+
| `EMBEDDED_DEPENDENCIES_TIMEOUT` | embedded-install | BLOCKER | L1 | temporary-profile | yes | Embedded dependency install timed out. |
|
|
23
|
+
| `EMBEDDED_NPM_FAILED` | embedded-install | BLOCKER | L1 | temporary-profile | yes | Embedded npm install failed. |
|
|
24
|
+
| `EMBEDDED_NPM_UNAVAILABLE` | embedded-install | BLOCKER | L1 | temporary-profile | yes | npm is unavailable for embedded install. |
|
|
25
|
+
| `ENVIRONMENT_EXACT_MATCH` | environment | INFO | L0 | none | yes | Environment matches the source. |
|
|
26
|
+
| `ENVIRONMENT_OS_MISMATCH` | environment | WARNING | L0 | none | yes | Operating system differs from the source. |
|
|
27
|
+
| `ENVIRONMENT_VERSION_MISMATCH` | environment | WARNING | L0 | none | yes | Environment version differs from the source. |
|
|
28
|
+
| `FORMAT_ERROR` | preflight | BLOCKER | L1 | none | yes | Pack format is invalid. |
|
|
29
|
+
| `HASH_MISMATCH` | preflight | BLOCKER | L1 | none | yes | Pack hash mismatch. |
|
|
30
|
+
| `HASH_OR_INTEGRITY_ERROR` | preflight | BLOCKER | L1 | none | yes | Pack hash or integrity check failed. |
|
|
31
|
+
| `HEADLESS_RUNNER_FAILED` | runtime | BLOCKER | L1 | none | yes | Headless runtime failed. |
|
|
32
|
+
| `IMPORT_FAILED` | commit | BLOCKER | L1 | temporary-profile | yes | Import failed. |
|
|
33
|
+
| `INTEGRITY_FILE_MISSING` | preflight | BLOCKER | L1 | none | yes | Integrity record is missing. |
|
|
34
|
+
| `INTEGRITY_FILE_SET_MISMATCH` | preflight | BLOCKER | L1 | none | yes | Integrity file set does not match. |
|
|
35
|
+
| `NETWORK_INSTALL_FAILED` | network-install | BLOCKER | L1 | temporary-profile | yes | Network install failed. |
|
|
36
|
+
| `NETWORK_INSTALL_REQUIRED` | network-install | WARNING | L0 | none | yes | Network install will be required. |
|
|
37
|
+
| `NETWORK_INSTALL_TIMEOUT` | network-install | BLOCKER | L1 | temporary-profile | yes | Network install timed out. |
|
|
38
|
+
| `NETWORK_PACKAGE_MISSING` | network-install | BLOCKER | L1 | temporary-profile | yes | Network package is missing. |
|
|
39
|
+
| `NETWORK_SOURCE_UNSUPPORTED` | network-install | BLOCKER | L1 | temporary-profile | yes | Network source type is unsupported. |
|
|
40
|
+
| `OFFICIAL_BUNDLE_MISSING` | planning | BLOCKER | L1 | dsh-home | yes | Official DSH Bundle cannot be resolved. |
|
|
41
|
+
| `OPTIONAL_ARTIFACT_MISSING` | reference-install | WARNING | L0 | none | yes | Optional artifact is missing. |
|
|
42
|
+
| `OPTIONAL_PLUGIN_MISSING` | reference-install | WARNING | L0 | none | yes | Optional plugin is missing. |
|
|
43
|
+
| `OVERWRITE_CONFIRMATION_REQUIRED` | planning | BLOCKER | L2 | target-profile | yes | Overwrite requires explicit confirmation. |
|
|
44
|
+
| `OVERWRITE_MODE_REQUIRED` | planning | BLOCKER | L2 | target-profile | yes | Overwrite mode is required. |
|
|
45
|
+
| `PACKAGE_IDENTITY_DRIFT` | version-confirmation | BLOCKER | L1 | none | yes | Package identity drift. |
|
|
46
|
+
| `PACKAGE_MANAGER_REQUIRED` | planning | BLOCKER | L0 | none | yes | 新建 Profile 需要正式包管理器。 |
|
|
47
|
+
| `PACKAGE_MANIFEST_INVALID` | planning | BLOCKER | L1 | none | yes | Plugin package manifest is invalid. |
|
|
48
|
+
| `PACKAGE_NAME_INVALID` | planning | BLOCKER | L1 | none | yes | Plugin package name is invalid. |
|
|
49
|
+
| `PACK_READ_ERROR` | planning | BLOCKER | L1 | none | yes | Pack cannot be read. |
|
|
50
|
+
| `PLUGIN_INSTALL_FAILED` | reference-install | BLOCKER | L1 | temporary-profile | yes | Plugin install failed. |
|
|
51
|
+
| `PLUGIN_MISSING` | reference-install | BLOCKER | L1 | temporary-profile | yes | Plugin is missing after install. |
|
|
52
|
+
| `PLUGIN_SMOKE_FAILED` | plugin-smoke | BLOCKER | L1 | none | yes | Plugin smoke test failed. |
|
|
53
|
+
| `PLUGIN_SOURCE_MISSING` | reference-install | BLOCKER | L1 | temporary-profile | yes | Plugin source is missing. |
|
|
54
|
+
| `PLUGIN_SOURCE_UNSAFE` | reference-install | BLOCKER | L2 | target-profile | yes | Plugin source is unsafe. |
|
|
55
|
+
| `PLUGIN_TARGET_EXISTS` | configuration | BLOCKER | L2 | target-profile | yes | Plugin target directory already exists. |
|
|
56
|
+
| `PLUGIN_VERSION_MISMATCH` | version-confirmation | BLOCKER | L1 | temporary-profile | yes | Installed plugin version does not match the Pack. |
|
|
57
|
+
| `PREFLIGHT_BLOCKED` | preflight | BLOCKER | L1 | none | yes | Preflight found BLOCKER findings. |
|
|
58
|
+
| `PREFLIGHT_ERROR` | preflight | BLOCKER | L1 | none | yes | Preflight crashed. |
|
|
59
|
+
| `PROBE_FAILED` | probe | BLOCKER | L1 | none | yes | Runtime probe failed. |
|
|
60
|
+
| `PROFILE_CONFIG_MISSING` | configuration | BLOCKER | L1 | temporary-profile | yes | Profile configuration is missing. |
|
|
61
|
+
| `PROFILE_DELETE_FAILED` | delete | BLOCKER | L1 | target-profile | yes | Profile deletion failed. |
|
|
62
|
+
| `PROFILE_EXISTS` | planning | BLOCKER | L2 | target-profile | yes | Target Profile already exists. |
|
|
63
|
+
| `PROFILE_FILE_EXISTS` | configuration | BLOCKER | L2 | target-profile | yes | Target Profile file already exists. |
|
|
64
|
+
| `PROFILE_MISSING` | planning | BLOCKER | L1 | none | yes | Target Profile does not exist. |
|
|
65
|
+
| `PROFILE_NAME_INVALID` | planning | BLOCKER | L1 | none | yes | Profile name is invalid. |
|
|
66
|
+
| `PROFILE_NAME_MISSING` | planning | BLOCKER | L1 | none | yes | Profile name is missing. |
|
|
67
|
+
| `PROFILE_NAME_RESERVED` | planning | BLOCKER | L1 | none | yes | Profile name is reserved. |
|
|
68
|
+
| `PROFILE_NAME_UNAVAILABLE` | planning | BLOCKER | L1 | none | yes | Profile name is unavailable. |
|
|
69
|
+
| `PROFILE_NOT_FOUND` | delete | BLOCKER | L1 | none | yes | Profile not found. |
|
|
70
|
+
| `PROFILE_PATCH_ADAPTATION_FAILED` | configuration | BLOCKER | L0 | none | yes | 无法证明恢复配置与官方 Loader 配置等价。 |
|
|
71
|
+
| `PROFILE_PATCH_ADAPTER_COMMAND_INVALID` | planning | BLOCKER | L0 | none | yes | 桌面配置适配器命令无效。 |
|
|
72
|
+
| `PROFILE_TARGET_INVALID` | planning | BLOCKER | L1 | none | yes | Import target is invalid. |
|
|
73
|
+
| `PROFILE_TARGET_MISSING` | planning | BLOCKER | L1 | none | yes | Import target is missing. |
|
|
74
|
+
| `REQUIRED_ARTIFACT_MISSING` | reference-install | BLOCKER | L1 | temporary-profile | yes | Required artifact is missing. |
|
|
75
|
+
| `RESTART_NOT_CONFIGURED` | restart | BLOCKER | L2 | environment | yes | DSH restart launcher is not configured. |
|
|
76
|
+
| `RESTART_PORT_NOT_RELEASED` | restart | BLOCKER | L2 | environment | yes | Port was not released after restart. |
|
|
77
|
+
| `RUNNER_EXITED_BEFORE_READY` | runtime | BLOCKER | L1 | none | yes | Runtime exited before ready. |
|
|
78
|
+
| `RUNNER_READY_REGEX_INVALID` | runtime | BLOCKER | L1 | temporary-profile | yes | Runtime readyRegex is invalid. |
|
|
79
|
+
| `RUNNER_READY_TIMEOUT` | runtime | BLOCKER | L1 | none | yes | Runtime ready timeout. |
|
|
80
|
+
| `RUNNER_SPAWN_FAILED` | runtime | BLOCKER | L1 | none | yes | Runtime command could not start. |
|
|
81
|
+
| `SCHEMA_ERROR` | preflight | BLOCKER | L1 | none | yes | Pack schema is unsupported. |
|
|
82
|
+
| `SECRET_MISSING` | planning | WARNING | L0 | none | yes | Required Secret is missing. |
|
|
83
|
+
| `SWITCH_CONFIRMATION_REQUIRED` | planning | BLOCKER | L2 | environment | yes | Profile switch requires explicit confirmation. |
|
|
84
|
+
| `VERSION_MISSING` | environment | WARNING | L0 | none | yes | A recorded version is missing. |
|
|
85
|
+
| `WEB_HTTP_STATUS_MISMATCH` | runtime | BLOCKER | L1 | none | yes | Web HTTP status does not match. |
|
|
86
|
+
| `WEB_HTTP_UNREACHABLE` | runtime | BLOCKER | L1 | none | yes | Web endpoint is unreachable. |
|
|
87
|
+
| `WEB_PORT_NOT_OWNED` | runtime | BLOCKER | L2 | environment | yes | Web port is not owned by the runtime. |
|
|
88
|
+
|
|
89
|
+
## Repair levels
|
|
90
|
+
|
|
91
|
+
| Level | Meaning |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| L0 | No write needed; the diagnostic is advisory or the fix is already applied. |
|
|
94
|
+
| L1 | Safe, reversible writes allowed without confirmation (see repair-boundaries.md). |
|
|
95
|
+
| L2 | Writes that change the target Profile / environment; explicit user confirmation required. |
|
|
96
|
+
| L3 | Never repair; unknown codes and credential-class issues are report-only. |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Repair boundaries
|
|
2
|
+
|
|
3
|
+
What the DSH Crate Troubleshooting Skill may touch at each repair level.
|
|
4
|
+
This file is manually maintained policy and applies to every code in
|
|
5
|
+
`diagnostics.generated.md` that carries a repair level.
|
|
6
|
+
|
|
7
|
+
## L0 — Read only (automatic)
|
|
8
|
+
|
|
9
|
+
- Read the diagnostic, the Pack manifest, `plugins.lock.json`, `profile/` files, and integrity records.
|
|
10
|
+
- Inspect Profile state under DSH_HOME.
|
|
11
|
+
- Check whether files, packages, artifacts, ports, and processes exist.
|
|
12
|
+
- Read versions, manifests, stdout/stderr, and operation history.
|
|
13
|
+
- Never write anything.
|
|
14
|
+
|
|
15
|
+
## L1 — Safe repair (automatic)
|
|
16
|
+
|
|
17
|
+
Allowed without confirmation because it never changes the original environment's critical state:
|
|
18
|
+
|
|
19
|
+
- Clean up the failed temporary/scratch directory created by the Import that already failed.
|
|
20
|
+
- Re-run the read-only Preflight / Inspect to refresh evidence.
|
|
21
|
+
- Re-download a reference-only dependency from its recorded source (network) into the temporary Profile.
|
|
22
|
+
- Re-run Verify after an L1 action.
|
|
23
|
+
- Retry a transient install that failed on a network/timing issue, into the temporary Profile only.
|
|
24
|
+
|
|
25
|
+
L1 actions never touch:
|
|
26
|
+
|
|
27
|
+
- the original working Profile;
|
|
28
|
+
- credentials;
|
|
29
|
+
- committed Import targets;
|
|
30
|
+
- installed plugin versions in a committed Profile.
|
|
31
|
+
|
|
32
|
+
## L2 — Confirmation required
|
|
33
|
+
|
|
34
|
+
Must show the user the exact target and get explicit confirmation before writing:
|
|
35
|
+
|
|
36
|
+
- Overwrite an existing Profile (Import overwrite).
|
|
37
|
+
- Switch the active Profile.
|
|
38
|
+
- Restart the DSH runtime.
|
|
39
|
+
- Delete a Profile.
|
|
40
|
+
- Modify Profile configuration.
|
|
41
|
+
- Change an installed plugin version.
|
|
42
|
+
- Replace an embedded artifact.
|
|
43
|
+
|
|
44
|
+
## L3 — Never automatic (report only)
|
|
45
|
+
|
|
46
|
+
The Skill never performs, even with confirmation inside an automated flow:
|
|
47
|
+
|
|
48
|
+
- Modify credentials, tokens, cookies, passwords, private keys, or `Authorization` material.
|
|
49
|
+
- Delete or modify the original working Profile outside an explicitly confirmed operation.
|
|
50
|
+
- Modify unrelated Profiles.
|
|
51
|
+
- Modify DSH vendor source or the DSH Crate package itself.
|
|
52
|
+
- Lower the verification standard (FAIL -> WARNING) or fabricate a Verify PASS.
|
|
53
|
+
|
|
54
|
+
Unknown codes and unsupported versions default to L3 / no write.
|
|
55
|
+
|
|
56
|
+
## Defaults
|
|
57
|
+
|
|
58
|
+
- Unknown code -> repair level `L3`, write scope `none`.
|
|
59
|
+
- Missing envelope -> do not repair; request a matching diagnostic.
|
|
60
|
+
- Unsupported version/schema -> interpret evidence only; no automated repair.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# DSH Crate Diagnostic Stages
|
|
2
|
+
|
|
3
|
+
> Generated from `core/dsh_pack/diagnostics.py` (schema v1). Do not edit by hand.
|
|
4
|
+
|
|
5
|
+
| Stage | Title | Description | Import state |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| commit | Commit | Committing the prepared Profile and metadata as a successful Import. | commit |
|
|
8
|
+
| composition | Bundle composition | Composing Bundle patches and Loader rows for the Profile. | composition |
|
|
9
|
+
| configuration | Configuration | Writing Pack profile configuration into the target Profile. | configuration |
|
|
10
|
+
| delete | Delete | Deleting a non-running Profile after explicit confirmation. | delete |
|
|
11
|
+
| embedded-install | Embedded install | Installing an embedded plugin artifact (npm tarball) into the temporary Profile. | embedded-install |
|
|
12
|
+
| environment | Environment | Environment compatibility findings (OS, Node, DSH versions). | environment |
|
|
13
|
+
| network-install | Network install | Downloading and installing a recorded network package. | network-install |
|
|
14
|
+
| planning | Plan | Operation planning: target Profile selection, name validation, pack read, and Import preview. | planning |
|
|
15
|
+
| plugin-smoke | Plugin smoke | Running a plugin-specific smoke test against the runtime. | plugin-smoke |
|
|
16
|
+
| preflight | Preflight | Read-only Inspect/Preflight of a Pack before any Profile change. | preflight |
|
|
17
|
+
| probe | Probe | Running a runtime capability probe after boot. | probe |
|
|
18
|
+
| reference-install | Reference install | Installing or resolving a reference-only plugin source. | reference-install |
|
|
19
|
+
| restart | Restart | Restarting DSH on the target Profile and port. | restart |
|
|
20
|
+
| runtime | Runtime boot | Starting the DSH runtime and waiting for a ready URL. | runtime |
|
|
21
|
+
| surface | Surface | Web surface or Bundle composition surface checks. | surface |
|
|
22
|
+
| version-confirmation | Version confirmation | Confirming the installed package identity matches the Pack resolution. | version-confirmation |
|