dsh-env-manager-plugin 0.1.0 → 0.1.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/LICENSE +21 -21
- package/README.md +273 -250
- package/client.js +2581 -2581
- package/cordis.patch.yml +4 -4
- package/docs/00-project/current-state.md +32 -6
- package/docs/00-project/glossary.md +215 -215
- package/docs/00-project/project-brief.md +114 -114
- package/docs/00-project/roadmap.md +89 -89
- package/docs/01-architecture/DSH_Environment_Service_Memory_Skill_Brainstorm.md +493 -493
- package/docs/01-architecture/api-verification.md +416 -416
- package/docs/01-architecture/architecture-overview.md +222 -222
- package/docs/01-architecture/data-model.md +930 -930
- package/docs/01-architecture/decisions/ADR-0001-plugin-as-bundle.md +29 -29
- package/docs/01-architecture/decisions/ADR-0002-file-based-storage.md +25 -25
- package/docs/01-architecture/decisions/ADR-0003-skill-router-over-search.md +25 -25
- package/docs/01-architecture/decisions/ADR-0004-typescript-host-js-client.md +31 -31
- package/docs/01-architecture/decisions/ADR-0005-layered-rule-resolution.md +36 -36
- package/docs/01-architecture/decisions/ADR-0006-credentials-as-references.md +30 -30
- package/docs/01-architecture/decisions/ADR-0007-session-scoped-default-environment.md +28 -28
- package/docs/01-architecture/decisions/ADR-0008-memory-bridge-not-second-store.md +31 -31
- package/docs/01-architecture/decisions/ADR-0009-client-host-http-transport.md +87 -87
- package/docs/01-architecture/decisions/ADR-0010-environment-plane-model.md +87 -87
- package/docs/01-architecture/decisions/ADR-0011-k8s-node-execution-model.md +92 -92
- package/docs/01-architecture/design.md +666 -666
- package/docs/01-architecture/detailed-design.md +961 -961
- package/docs/01-architecture/implementation-plan.md +323 -323
- package/docs/01-architecture/module-boundaries.md +306 -306
- package/docs/01-architecture/security-model.md +227 -227
- package/docs/01-architecture/storage-contract.md +224 -224
- package/docs/01-architecture/tool-contract.md +438 -438
- package/docs/01-architecture/ui-design.md +587 -587
- package/docs/02-harness/agent-behavior.md +36 -36
- package/docs/02-harness/change-snapshot-policy.md +29 -29
- package/docs/02-harness/client-ui-integration.md +110 -110
- package/docs/02-harness/context-policy.md +43 -43
- package/docs/02-harness/harness-standard.md +91 -91
- package/docs/02-harness/task-execution-policy.md +26 -26
- package/docs/02-harness/verification-policy.md +97 -97
- package/docs/03-openspec/archive-rule.md +25 -25
- package/docs/03-openspec/bugfix-rule.md +30 -30
- package/docs/03-openspec/design-rule.md +33 -33
- package/docs/03-openspec/openspec-usage-guide.md +31 -31
- package/docs/03-openspec/proposal-rule.md +70 -70
- package/docs/03-openspec/spec-rule.md +33 -33
- package/docs/03-openspec/tasks-rule.md +31 -31
- package/docs/04-development/coding-style.md +67 -67
- package/docs/04-development/dependency-policy.md +43 -43
- package/docs/04-development/development-guide.md +85 -85
- package/docs/04-development/directory-convention.md +105 -105
- package/docs/04-development/local-run-guide.md +61 -55
- package/docs/04-development/testing-guide.md +102 -102
- package/docs/05-domain/deployment-template.md +76 -76
- package/docs/05-domain/environment-template.md +165 -165
- package/docs/05-domain/operation-binding-template.md +55 -55
- package/docs/05-domain/operation-record-template.md +55 -55
- package/docs/05-domain/prompt-template.md +90 -90
- package/docs/05-domain/rule-template.md +73 -73
- package/docs/05-domain/service-template.md +39 -39
- package/docs/06-operations/deployment-guide.md +54 -54
- package/docs/06-operations/release.md +198 -188
- package/docs/06-operations/security-policy.md +53 -53
- package/docs/06-operations/troubleshooting.md +141 -91
- package/docs/07-templates/adr-template.md +21 -21
- package/docs/07-templates/bugfix-template.md +11 -11
- package/docs/07-templates/case-template.md +15 -15
- package/docs/07-templates/design-template.md +29 -29
- package/docs/07-templates/proposal-template.md +19 -19
- package/docs/07-templates/spec-template.md +15 -15
- package/docs/07-templates/tasks-template.md +12 -12
- package/docs/99-archive/README.md +13 -13
- package/docs/README.md +142 -142
- package/icon.svg +4 -4
- package/index.js +31 -8
- package/lib/skill.js +37 -37
- package/locale/en.json +6 -6
- package/locale/zh.json +6 -6
- package/package.json +101 -99
- package/scripts/repair-profile.mjs +141 -0
package/docs/README.md
CHANGED
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
# DSH Environment Manager Docs
|
|
2
|
-
|
|
3
|
-
This directory is the **project-level Harness Context Hub** for the DSH Environment Manager plugin.
|
|
4
|
-
|
|
5
|
-
It is used by humans and AI agents to understand project state, architecture, constraints, development standards, and operational procedures.
|
|
6
|
-
|
|
7
|
-
## Reading Policy
|
|
8
|
-
|
|
9
|
-
Do not read every document blindly. Read documents based on task type.
|
|
10
|
-
|
|
11
|
-
### Required for Every Non-trivial Change
|
|
12
|
-
|
|
13
|
-
1. `AGENTS.md` at the repository root
|
|
14
|
-
2. `docs/00-project/project-brief.md`
|
|
15
|
-
3. `docs/00-project/current-state.md`
|
|
16
|
-
4. `docs/02-harness/harness-standard.md`
|
|
17
|
-
5. `docs/04-development/development-guide.md`
|
|
18
|
-
|
|
19
|
-
### Architecture or Schema Changes
|
|
20
|
-
|
|
21
|
-
Also read:
|
|
22
|
-
|
|
23
|
-
1. `docs/01-architecture/design.md`
|
|
24
|
-
2. `docs/01-architecture/data-model.md`
|
|
25
|
-
3. `docs/01-architecture/detailed-design.md`
|
|
26
|
-
4. `docs/01-architecture/module-boundaries.md`
|
|
27
|
-
5. `docs/01-architecture/storage-contract.md`
|
|
28
|
-
|
|
29
|
-
### Environment Model Questions
|
|
30
|
-
|
|
31
|
-
Also read:
|
|
32
|
-
|
|
33
|
-
1. `docs/01-architecture/decisions/ADR-0010-environment-plane-model.md`
|
|
34
|
-
2. `docs/01-architecture/decisions/ADR-0011-k8s-node-execution-model.md`
|
|
35
|
-
3. `docs/01-architecture/data-model.md` §3
|
|
36
|
-
4. `docs/01-architecture/ui-design.md` §6.3
|
|
37
|
-
|
|
38
|
-
### Runtime API Questions
|
|
39
|
-
|
|
40
|
-
Also read:
|
|
41
|
-
|
|
42
|
-
1. `docs/01-architecture/api-verification.md`
|
|
43
|
-
2. `docs/01-architecture/decisions/ADR-0009-client-host-http-transport.md`
|
|
44
|
-
|
|
45
|
-
### Implementation Work
|
|
46
|
-
|
|
47
|
-
Also read:
|
|
48
|
-
|
|
49
|
-
1. `docs/01-architecture/implementation-plan.md`
|
|
50
|
-
2. `docs/01-architecture/ui-design.md` (Client changes only)
|
|
51
|
-
3. `docs/02-harness/client-ui-integration.md` (sidebar/main slot changes only)
|
|
52
|
-
|
|
53
|
-
### Tool Surface Changes
|
|
54
|
-
|
|
55
|
-
Also read:
|
|
56
|
-
|
|
57
|
-
1. `docs/01-architecture/tool-contract.md`
|
|
58
|
-
2. `docs/01-architecture/data-model.md`
|
|
59
|
-
3. `docs/01-architecture/detailed-design.md` §11
|
|
60
|
-
|
|
61
|
-
### Resolver / Rule Work
|
|
62
|
-
|
|
63
|
-
Also read:
|
|
64
|
-
|
|
65
|
-
1. `docs/01-architecture/design.md` §6
|
|
66
|
-
2. `docs/05-domain/rule-template.md`
|
|
67
|
-
3. `docs/01-architecture/decisions/ADR-0005-layered-rule-resolution.md`
|
|
68
|
-
|
|
69
|
-
### Router / Skill Binding Work
|
|
70
|
-
|
|
71
|
-
Also read:
|
|
72
|
-
|
|
73
|
-
1. `docs/01-architecture/design.md` §7
|
|
74
|
-
2. `docs/05-domain/operation-binding-template.md`
|
|
75
|
-
3. `docs/01-architecture/decisions/ADR-0003-skill-router-over-search.md`
|
|
76
|
-
|
|
77
|
-
### Security-Sensitive Work
|
|
78
|
-
|
|
79
|
-
Also read:
|
|
80
|
-
|
|
81
|
-
1. `docs/01-architecture/security-model.md`
|
|
82
|
-
2. `docs/06-operations/security-policy.md`
|
|
83
|
-
|
|
84
|
-
### Deployment / Operations Work
|
|
85
|
-
|
|
86
|
-
Also read:
|
|
87
|
-
|
|
88
|
-
1. `docs/06-operations/deployment-guide.md`
|
|
89
|
-
2. `docs/06-operations/release.md`
|
|
90
|
-
3. `docs/06-operations/security-policy.md`
|
|
91
|
-
4. `docs/06-operations/troubleshooting.md`
|
|
92
|
-
|
|
93
|
-
### OpenSpec Work
|
|
94
|
-
|
|
95
|
-
Also read:
|
|
96
|
-
|
|
97
|
-
1. `docs/03-openspec/proposal-rule.md`
|
|
98
|
-
2. `docs/03-openspec/design-rule.md`
|
|
99
|
-
3. `docs/03-openspec/spec-rule.md`
|
|
100
|
-
4. `docs/03-openspec/tasks-rule.md`
|
|
101
|
-
|
|
102
|
-
## Hard Rules
|
|
103
|
-
|
|
104
|
-
- Durable registry data is YAML files under the plugin data directory.
|
|
105
|
-
- Registry data is never committed to Git.
|
|
106
|
-
- Credentials are references only; values never appear in registry files or tool output.
|
|
107
|
-
- Rule templates use interpolation only; no code execution.
|
|
108
|
-
- Production write operations and production-affecting management writes require approval.
|
|
109
|
-
- Conflicts, missing Skills and broken references fail loudly; nothing is chosen silently.
|
|
110
|
-
- Every completed change updates `docs/00-project/current-state.md`.
|
|
111
|
-
|
|
112
|
-
## Directory Map
|
|
113
|
-
|
|
114
|
-
```text
|
|
115
|
-
docs/
|
|
116
|
-
├── 00-project/ # brief, current state, glossary, roadmap
|
|
117
|
-
├── 01-architecture/ # design, data model, tools, storage, security, ADRs
|
|
118
|
-
├── 02-harness/ # AI-assisted development harness standards
|
|
119
|
-
├── 03-openspec/ # proposal/design/spec/tasks rules
|
|
120
|
-
├── 04-development/ # coding, testing, local run, dependency rules
|
|
121
|
-
├── 05-domain/ # environment/service/deployment/rule/binding templates
|
|
122
|
-
├── 06-operations/ # deployment, release, security, troubleshooting
|
|
123
|
-
├── 07-templates/ # reusable artifact templates
|
|
124
|
-
└── 99-archive/ # obsolete or historical docs
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Architecture Index
|
|
128
|
-
|
|
129
|
-
| Document | Purpose |
|
|
130
|
-
|---|---|
|
|
131
|
-
| `architecture-overview.md` | layers, components, request flows |
|
|
132
|
-
| `design.md` | V1 scope, algorithms, acceptance criteria |
|
|
133
|
-
| `detailed-design.md` | module contracts, algorithms, tool/HTTP specs, tests |
|
|
134
|
-
| `data-model.md` | record schemas and result types |
|
|
135
|
-
| `tool-contract.md` | model-facing tool inputs, outputs, errors |
|
|
136
|
-
| `storage-contract.md` | files, atomicity, sessions, migration |
|
|
137
|
-
| `module-boundaries.md` | module ownership and dependencies |
|
|
138
|
-
| `ui-design.md` | panels, transport, states, i18n, QA checklist |
|
|
139
|
-
| `security-model.md` | credential, policy and redaction controls |
|
|
140
|
-
| `api-verification.md` | verified DSH runtime facts and open probes |
|
|
141
|
-
| `implementation-plan.md` | ordered tasks, acceptance, cut line |
|
|
142
|
-
| `decisions/ADR-*.md` | accepted decisions (ADR-0009 = UI transport, ADR-0010 = environment/plane model, ADR-0011 = K8s node/access model) |
|
|
1
|
+
# DSH Environment Manager Docs
|
|
2
|
+
|
|
3
|
+
This directory is the **project-level Harness Context Hub** for the DSH Environment Manager plugin.
|
|
4
|
+
|
|
5
|
+
It is used by humans and AI agents to understand project state, architecture, constraints, development standards, and operational procedures.
|
|
6
|
+
|
|
7
|
+
## Reading Policy
|
|
8
|
+
|
|
9
|
+
Do not read every document blindly. Read documents based on task type.
|
|
10
|
+
|
|
11
|
+
### Required for Every Non-trivial Change
|
|
12
|
+
|
|
13
|
+
1. `AGENTS.md` at the repository root
|
|
14
|
+
2. `docs/00-project/project-brief.md`
|
|
15
|
+
3. `docs/00-project/current-state.md`
|
|
16
|
+
4. `docs/02-harness/harness-standard.md`
|
|
17
|
+
5. `docs/04-development/development-guide.md`
|
|
18
|
+
|
|
19
|
+
### Architecture or Schema Changes
|
|
20
|
+
|
|
21
|
+
Also read:
|
|
22
|
+
|
|
23
|
+
1. `docs/01-architecture/design.md`
|
|
24
|
+
2. `docs/01-architecture/data-model.md`
|
|
25
|
+
3. `docs/01-architecture/detailed-design.md`
|
|
26
|
+
4. `docs/01-architecture/module-boundaries.md`
|
|
27
|
+
5. `docs/01-architecture/storage-contract.md`
|
|
28
|
+
|
|
29
|
+
### Environment Model Questions
|
|
30
|
+
|
|
31
|
+
Also read:
|
|
32
|
+
|
|
33
|
+
1. `docs/01-architecture/decisions/ADR-0010-environment-plane-model.md`
|
|
34
|
+
2. `docs/01-architecture/decisions/ADR-0011-k8s-node-execution-model.md`
|
|
35
|
+
3. `docs/01-architecture/data-model.md` §3
|
|
36
|
+
4. `docs/01-architecture/ui-design.md` §6.3
|
|
37
|
+
|
|
38
|
+
### Runtime API Questions
|
|
39
|
+
|
|
40
|
+
Also read:
|
|
41
|
+
|
|
42
|
+
1. `docs/01-architecture/api-verification.md`
|
|
43
|
+
2. `docs/01-architecture/decisions/ADR-0009-client-host-http-transport.md`
|
|
44
|
+
|
|
45
|
+
### Implementation Work
|
|
46
|
+
|
|
47
|
+
Also read:
|
|
48
|
+
|
|
49
|
+
1. `docs/01-architecture/implementation-plan.md`
|
|
50
|
+
2. `docs/01-architecture/ui-design.md` (Client changes only)
|
|
51
|
+
3. `docs/02-harness/client-ui-integration.md` (sidebar/main slot changes only)
|
|
52
|
+
|
|
53
|
+
### Tool Surface Changes
|
|
54
|
+
|
|
55
|
+
Also read:
|
|
56
|
+
|
|
57
|
+
1. `docs/01-architecture/tool-contract.md`
|
|
58
|
+
2. `docs/01-architecture/data-model.md`
|
|
59
|
+
3. `docs/01-architecture/detailed-design.md` §11
|
|
60
|
+
|
|
61
|
+
### Resolver / Rule Work
|
|
62
|
+
|
|
63
|
+
Also read:
|
|
64
|
+
|
|
65
|
+
1. `docs/01-architecture/design.md` §6
|
|
66
|
+
2. `docs/05-domain/rule-template.md`
|
|
67
|
+
3. `docs/01-architecture/decisions/ADR-0005-layered-rule-resolution.md`
|
|
68
|
+
|
|
69
|
+
### Router / Skill Binding Work
|
|
70
|
+
|
|
71
|
+
Also read:
|
|
72
|
+
|
|
73
|
+
1. `docs/01-architecture/design.md` §7
|
|
74
|
+
2. `docs/05-domain/operation-binding-template.md`
|
|
75
|
+
3. `docs/01-architecture/decisions/ADR-0003-skill-router-over-search.md`
|
|
76
|
+
|
|
77
|
+
### Security-Sensitive Work
|
|
78
|
+
|
|
79
|
+
Also read:
|
|
80
|
+
|
|
81
|
+
1. `docs/01-architecture/security-model.md`
|
|
82
|
+
2. `docs/06-operations/security-policy.md`
|
|
83
|
+
|
|
84
|
+
### Deployment / Operations Work
|
|
85
|
+
|
|
86
|
+
Also read:
|
|
87
|
+
|
|
88
|
+
1. `docs/06-operations/deployment-guide.md`
|
|
89
|
+
2. `docs/06-operations/release.md`
|
|
90
|
+
3. `docs/06-operations/security-policy.md`
|
|
91
|
+
4. `docs/06-operations/troubleshooting.md`
|
|
92
|
+
|
|
93
|
+
### OpenSpec Work
|
|
94
|
+
|
|
95
|
+
Also read:
|
|
96
|
+
|
|
97
|
+
1. `docs/03-openspec/proposal-rule.md`
|
|
98
|
+
2. `docs/03-openspec/design-rule.md`
|
|
99
|
+
3. `docs/03-openspec/spec-rule.md`
|
|
100
|
+
4. `docs/03-openspec/tasks-rule.md`
|
|
101
|
+
|
|
102
|
+
## Hard Rules
|
|
103
|
+
|
|
104
|
+
- Durable registry data is YAML files under the plugin data directory.
|
|
105
|
+
- Registry data is never committed to Git.
|
|
106
|
+
- Credentials are references only; values never appear in registry files or tool output.
|
|
107
|
+
- Rule templates use interpolation only; no code execution.
|
|
108
|
+
- Production write operations and production-affecting management writes require approval.
|
|
109
|
+
- Conflicts, missing Skills and broken references fail loudly; nothing is chosen silently.
|
|
110
|
+
- Every completed change updates `docs/00-project/current-state.md`.
|
|
111
|
+
|
|
112
|
+
## Directory Map
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
docs/
|
|
116
|
+
├── 00-project/ # brief, current state, glossary, roadmap
|
|
117
|
+
├── 01-architecture/ # design, data model, tools, storage, security, ADRs
|
|
118
|
+
├── 02-harness/ # AI-assisted development harness standards
|
|
119
|
+
├── 03-openspec/ # proposal/design/spec/tasks rules
|
|
120
|
+
├── 04-development/ # coding, testing, local run, dependency rules
|
|
121
|
+
├── 05-domain/ # environment/service/deployment/rule/binding templates
|
|
122
|
+
├── 06-operations/ # deployment, release, security, troubleshooting
|
|
123
|
+
├── 07-templates/ # reusable artifact templates
|
|
124
|
+
└── 99-archive/ # obsolete or historical docs
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Architecture Index
|
|
128
|
+
|
|
129
|
+
| Document | Purpose |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `architecture-overview.md` | layers, components, request flows |
|
|
132
|
+
| `design.md` | V1 scope, algorithms, acceptance criteria |
|
|
133
|
+
| `detailed-design.md` | module contracts, algorithms, tool/HTTP specs, tests |
|
|
134
|
+
| `data-model.md` | record schemas and result types |
|
|
135
|
+
| `tool-contract.md` | model-facing tool inputs, outputs, errors |
|
|
136
|
+
| `storage-contract.md` | files, atomicity, sessions, migration |
|
|
137
|
+
| `module-boundaries.md` | module ownership and dependencies |
|
|
138
|
+
| `ui-design.md` | panels, transport, states, i18n, QA checklist |
|
|
139
|
+
| `security-model.md` | credential, policy and redaction controls |
|
|
140
|
+
| `api-verification.md` | verified DSH runtime facts and open probes |
|
|
141
|
+
| `implementation-plan.md` | ordered tasks, acceptance, cut line |
|
|
142
|
+
| `decisions/ADR-*.md` | accepted decisions (ADR-0009 = UI transport, ADR-0010 = environment/plane model, ADR-0011 = K8s node/access model) |
|
package/icon.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
|
-
<circle cx="32" cy="32" r="28" fill="#0ea5e9"/>
|
|
3
|
-
<path d="M22 20h20v8H22zm0 14h20v8H22z" fill="#ffffff"/>
|
|
4
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
|
+
<circle cx="32" cy="32" r="28" fill="#0ea5e9"/>
|
|
3
|
+
<path d="M22 20h20v8H22zm0 14h20v8H22z" fill="#ffffff"/>
|
|
4
|
+
</svg>
|
package/index.js
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DSH Environment Manager - Host entry point.
|
|
3
|
-
*
|
|
4
|
-
* The implementation lives in `lib/` (compiled from `src/`); this shim keeps the
|
|
5
|
-
* bundle entry stable across builds.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/**
|
|
2
|
+
* DSH Environment Manager - Host entry point.
|
|
3
|
+
*
|
|
4
|
+
* The implementation lives in `lib/` (compiled from `src/`); this shim keeps the
|
|
5
|
+
* bundle entry stable across builds. `lib/` is committed so a checkout, git
|
|
6
|
+
* install or npm tarball all have the same executable entry.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
let implementation
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
implementation = await import('./lib/index.js')
|
|
13
|
+
} catch (error) {
|
|
14
|
+
const missingLib =
|
|
15
|
+
error &&
|
|
16
|
+
error.code === 'ERR_MODULE_NOT_FOUND' &&
|
|
17
|
+
/lib[\\/]index\.js/.test(String(error.message))
|
|
18
|
+
|
|
19
|
+
if (missingLib) {
|
|
20
|
+
throw new Error(
|
|
21
|
+
'[dsh-env-manager-plugin] Missing build output: lib/index.js. ' +
|
|
22
|
+
'Install the published `dsh-env-manager-plugin` package, or run ' +
|
|
23
|
+
'`npm install && npm run build` in the plugin checkout before installing it.',
|
|
24
|
+
{ cause: error },
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
throw error
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const { name, inject, Config, apply } = implementation
|
package/lib/skill.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
export const ENV_MANAGER_SKILL_NAME = 'dsh-env-manager';
|
|
2
2
|
export const ENV_MANAGER_SKILL_DESCRIPTION = 'Use when the user mentions DSH Environment Manager, a registered environment, host, service, deployment, log collection, restart or deploy, or asks where a registered service runs.';
|
|
3
3
|
export const ENV_MANAGER_SKILL_WHEN_TO_USE = 'The user asks which environment to use, where a registered service or host runs, how to find its paths or logs, or wants an operation on a registered environment.';
|
|
4
|
-
export const ENV_MANAGER_SKILL_CONTENT = `# DSH Environment Manager
|
|
5
|
-
|
|
6
|
-
Use the environment registry as the source of truth for registered environments, hosts,
|
|
7
|
-
services, deployments and operation routes. This is not the operating-system or Python
|
|
8
|
-
"environment"; it is the DSH Environment Manager registry.
|
|
9
|
-
|
|
10
|
-
## Workflow
|
|
11
|
-
|
|
12
|
-
1. Discover before guessing.
|
|
13
|
-
- Use \`env_list\` for an inventory.
|
|
14
|
-
- Use \`env_find\` with an id, name, alias or category fragment.
|
|
15
|
-
- If more than one candidate matches, ask which one the user means; do not pick one.
|
|
16
|
-
|
|
17
|
-
2. Pin the session when the user commits to one environment.
|
|
18
|
-
- Call \`env_set_context\` with the environment id.
|
|
19
|
-
- Use \`env_get_context\` to confirm it.
|
|
20
|
-
- Once pinned, later calls may omit \`environmentId\`.
|
|
21
|
-
|
|
22
|
-
3. Resolve concrete context.
|
|
23
|
-
- Use \`env_get\` when the raw record or YAML is needed.
|
|
24
|
-
- Use \`env_resolve\` for the service context, paths, logs, variables and provenance.
|
|
25
|
-
- Prefer the resolver over reconstructing paths from templates.
|
|
26
|
-
|
|
27
|
-
4. Route an operation before acting.
|
|
28
|
-
- Before deploy, redeploy, restart, rollback, collect-logs or a similar action, call
|
|
29
|
-
\`env_resolve_operation\` with the environment and service or deployment.
|
|
30
|
-
- A missing, ambiguous or conflicting binding is an error; do not invent a skill or
|
|
31
|
-
fall back to a different environment.
|
|
32
|
-
- \`env_resolve_operation\` returns a route; it does not execute the skill.
|
|
33
|
-
|
|
34
|
-
## Boundaries
|
|
35
|
-
|
|
36
|
-
- Do not assume the current workspace's files are the registry.
|
|
37
|
-
- Do not print credential values; report only whether a credential is configured.
|
|
38
|
-
- Respect approval and policy results; never bypass them because a route looks obvious.
|
|
39
|
-
- If the user says "not this environment", clear or replace the session default with
|
|
40
|
-
\`env_set_context\`; do not silently keep the old one.
|
|
4
|
+
export const ENV_MANAGER_SKILL_CONTENT = `# DSH Environment Manager
|
|
5
|
+
|
|
6
|
+
Use the environment registry as the source of truth for registered environments, hosts,
|
|
7
|
+
services, deployments and operation routes. This is not the operating-system or Python
|
|
8
|
+
"environment"; it is the DSH Environment Manager registry.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Discover before guessing.
|
|
13
|
+
- Use \`env_list\` for an inventory.
|
|
14
|
+
- Use \`env_find\` with an id, name, alias or category fragment.
|
|
15
|
+
- If more than one candidate matches, ask which one the user means; do not pick one.
|
|
16
|
+
|
|
17
|
+
2. Pin the session when the user commits to one environment.
|
|
18
|
+
- Call \`env_set_context\` with the environment id.
|
|
19
|
+
- Use \`env_get_context\` to confirm it.
|
|
20
|
+
- Once pinned, later calls may omit \`environmentId\`.
|
|
21
|
+
|
|
22
|
+
3. Resolve concrete context.
|
|
23
|
+
- Use \`env_get\` when the raw record or YAML is needed.
|
|
24
|
+
- Use \`env_resolve\` for the service context, paths, logs, variables and provenance.
|
|
25
|
+
- Prefer the resolver over reconstructing paths from templates.
|
|
26
|
+
|
|
27
|
+
4. Route an operation before acting.
|
|
28
|
+
- Before deploy, redeploy, restart, rollback, collect-logs or a similar action, call
|
|
29
|
+
\`env_resolve_operation\` with the environment and service or deployment.
|
|
30
|
+
- A missing, ambiguous or conflicting binding is an error; do not invent a skill or
|
|
31
|
+
fall back to a different environment.
|
|
32
|
+
- \`env_resolve_operation\` returns a route; it does not execute the skill.
|
|
33
|
+
|
|
34
|
+
## Boundaries
|
|
35
|
+
|
|
36
|
+
- Do not assume the current workspace's files are the registry.
|
|
37
|
+
- Do not print credential values; report only whether a credential is configured.
|
|
38
|
+
- Respect approval and policy results; never bypass them because a route looks obvious.
|
|
39
|
+
- If the user says "not this environment", clear or replace the session default with
|
|
40
|
+
\`env_set_context\`; do not silently keep the old one.
|
|
41
41
|
`;
|
|
42
42
|
export function createEnvironmentManagerSkill() {
|
|
43
43
|
return {
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"title": "DSH Environment Manager",
|
|
4
|
-
"description": "Manages enterprise environments, services, deployments and operation-skill bindings for DSH sessions."
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH Environment Manager",
|
|
4
|
+
"description": "Manages enterprise environments, services, deployments and operation-skill bindings for DSH sessions."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"title": "DSH 环境管理器",
|
|
4
|
-
"description": "为 DSH 会话管理企业环境、服务、部署实例以及操作与 Skill 的绑定关系。"
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH 环境管理器",
|
|
4
|
+
"description": "为 DSH 会话管理企业环境、服务、部署实例以及操作与 Skill 的绑定关系。"
|
|
5
|
+
}
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,99 +1,101 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-env-manager-plugin",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Environment registry, service catalog and operation-to-Skill routing for DSH.",
|
|
6
|
-
"author": "zhiwuli0228",
|
|
7
|
-
"homepage": "https://github.com/zhiwuli0228/dsh-env-manager#readme",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/zhiwuli0228/dsh-env-manager.git"
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/zhiwuli0228/dsh-env-manager/issues"
|
|
14
|
-
},
|
|
15
|
-
"exports": {
|
|
16
|
-
".": "./index.js",
|
|
17
|
-
"./client": "./client.js",
|
|
18
|
-
"./locale/*.json": "./locale/*.json",
|
|
19
|
-
"./icon": "./icon.svg",
|
|
20
|
-
"./package.json": "./package.json"
|
|
21
|
-
},
|
|
22
|
-
"files": [
|
|
23
|
-
"index.js",
|
|
24
|
-
"client.js",
|
|
25
|
-
"cordis.patch.yml",
|
|
26
|
-
"lib/",
|
|
27
|
-
"locale/*.json",
|
|
28
|
-
"icon.svg",
|
|
29
|
-
"README.md",
|
|
30
|
-
"LICENSE",
|
|
31
|
-
"docs/"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"dsh
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"@deepseek-ai/
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-sandbox
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
75
|
-
"@deepseek-ai/dsh-
|
|
76
|
-
"@
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"test
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"@deepseek-ai/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-env-manager-plugin",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Environment registry, service catalog and operation-to-Skill routing for DSH.",
|
|
6
|
+
"author": "zhiwuli0228",
|
|
7
|
+
"homepage": "https://github.com/zhiwuli0228/dsh-env-manager#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/zhiwuli0228/dsh-env-manager.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/zhiwuli0228/dsh-env-manager/issues"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./index.js",
|
|
17
|
+
"./client": "./client.js",
|
|
18
|
+
"./locale/*.json": "./locale/*.json",
|
|
19
|
+
"./icon": "./icon.svg",
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"index.js",
|
|
24
|
+
"client.js",
|
|
25
|
+
"cordis.patch.yml",
|
|
26
|
+
"lib/",
|
|
27
|
+
"locale/*.json",
|
|
28
|
+
"icon.svg",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"docs/",
|
|
32
|
+
"scripts/repair-profile.mjs"
|
|
33
|
+
],
|
|
34
|
+
"keywords": [
|
|
35
|
+
"dsh",
|
|
36
|
+
"dsh-plugin",
|
|
37
|
+
"environment",
|
|
38
|
+
"service-registry",
|
|
39
|
+
"ops"
|
|
40
|
+
],
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=20",
|
|
44
|
+
"dsh": ">=0.2.1-rc.5"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"dsh": {
|
|
50
|
+
"bundle": {
|
|
51
|
+
"patch": "./cordis.patch.yml"
|
|
52
|
+
},
|
|
53
|
+
"client": {
|
|
54
|
+
"platform": "web",
|
|
55
|
+
"immediately": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@deepseek-ai/schemastery": "^3.18.5",
|
|
60
|
+
"yaml": "^2.9.1",
|
|
61
|
+
"zod": "^4.6.7"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
65
|
+
"@deepseek-ai/dsh-agent": "0.2.1-rc.5",
|
|
66
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.5",
|
|
67
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.5",
|
|
68
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-rc.5",
|
|
69
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.5",
|
|
70
|
+
"@deepseek-ai/dsh-scope": "0.2.1-rc.5",
|
|
71
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.5",
|
|
72
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-rc.5",
|
|
73
|
+
"@deepseek-ai/dsh-tools": "0.2.1-rc.5",
|
|
74
|
+
"@deepseek-ai/dsh-user-approval": "0.2.1-rc.5",
|
|
75
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-rc.5",
|
|
76
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-rc.5",
|
|
77
|
+
"@types/node": "^24.19.2",
|
|
78
|
+
"typescript": "^5.9.3",
|
|
79
|
+
"vitest": "^3.2.7"
|
|
80
|
+
},
|
|
81
|
+
"scripts": {
|
|
82
|
+
"build": "tsc -p tsconfig.json",
|
|
83
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
84
|
+
"test": "vitest run",
|
|
85
|
+
"test:watch": "vitest",
|
|
86
|
+
"check": "npm run typecheck && npm run build && npm test && node --check client.js && node --check index.js",
|
|
87
|
+
"repair:profile": "node scripts/repair-profile.mjs",
|
|
88
|
+
"prepack": "npm run build"
|
|
89
|
+
},
|
|
90
|
+
"main": "index.js",
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
93
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.5",
|
|
94
|
+
"@deepseek-ai/dsh-tools": "0.2.1-rc.5"
|
|
95
|
+
},
|
|
96
|
+
"peerDependenciesMeta": {
|
|
97
|
+
"@deepseek-ai/cordis": {
|
|
98
|
+
"optional": "true"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|