dsh-reference-anything 0.3.0 → 0.3.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/LICENSE +22 -22
- package/NOTICE.md +52 -25
- package/README.md +339 -286
- package/cordis.patch.yml +89 -18
- package/lib/client.js +13538 -591
- package/lib/contract.d.ts +155 -16
- package/lib/contract.js +68 -7
- package/lib/download-directory.d.ts +18 -0
- package/lib/download-directory.js +55 -0
- package/lib/errors.d.ts +4 -0
- package/lib/host.d.ts +96 -8
- package/lib/host.js +88 -19
- package/lib/index.d.ts +22 -2
- package/lib/index.js +57 -7
- package/lib/opencli.d.ts +5 -3
- package/lib/opencli.js +13 -6
- package/lib/openlist/host.d.ts +157 -0
- package/lib/openlist/host.js +873 -0
- package/lib/openlist/index.d.ts +84 -0
- package/lib/openlist/index.js +507 -0
- package/lib/render.d.ts +12 -7
- package/lib/render.js +27 -21
- package/lib/sources/cloud-drive/cache.d.ts +60 -0
- package/lib/sources/cloud-drive/cache.js +107 -0
- package/lib/sources/cloud-drive/index.d.ts +190 -0
- package/lib/sources/cloud-drive/index.js +526 -0
- package/lib/sources/cloud-drive/providers/http.d.ts +27 -0
- package/lib/sources/cloud-drive/providers/http.js +73 -0
- package/lib/sources/cloud-drive/providers/openlist.d.ts +59 -0
- package/lib/sources/cloud-drive/providers/openlist.js +535 -0
- package/lib/sources/cloud-drive/registry.d.ts +53 -0
- package/lib/sources/cloud-drive/registry.js +101 -0
- package/lib/sources/cloud-drive/types.d.ts +169 -0
- package/lib/sources/cloud-drive/types.js +17 -0
- package/lib/sources/file.d.ts +2 -0
- package/lib/sources/file.js +2 -0
- package/lib/sources/local-agent/adapters/claude-code.d.ts +16 -0
- package/lib/sources/local-agent/adapters/claude-code.js +171 -0
- package/lib/sources/local-agent/adapters/codex.d.ts +20 -0
- package/lib/sources/local-agent/adapters/codex.js +204 -0
- package/lib/sources/local-agent/adapters/cursor.d.ts +23 -0
- package/lib/sources/local-agent/adapters/cursor.js +121 -0
- package/lib/sources/local-agent/adapters/gemini-cli.d.ts +20 -0
- package/lib/sources/local-agent/adapters/gemini-cli.js +141 -0
- package/lib/sources/local-agent/adapters/grokbuild.d.ts +22 -0
- package/lib/sources/local-agent/adapters/grokbuild.js +76 -0
- package/lib/sources/local-agent/adapters/hermes.d.ts +19 -0
- package/lib/sources/local-agent/adapters/hermes.js +85 -0
- package/lib/sources/local-agent/adapters/kimi.d.ts +28 -0
- package/lib/sources/local-agent/adapters/kimi.js +261 -0
- package/lib/sources/local-agent/adapters/openclaw.d.ts +21 -0
- package/lib/sources/local-agent/adapters/openclaw.js +120 -0
- package/lib/sources/local-agent/adapters/opencode.d.ts +44 -0
- package/lib/sources/local-agent/adapters/opencode.js +236 -0
- package/lib/sources/local-agent/adapters/pi.d.ts +26 -0
- package/lib/sources/local-agent/adapters/pi.js +242 -0
- package/lib/sources/local-agent/adapters/qoder.d.ts +19 -0
- package/lib/sources/local-agent/adapters/qoder.js +93 -0
- package/lib/sources/local-agent/adapters/reasonix.d.ts +23 -0
- package/lib/sources/local-agent/adapters/reasonix.js +90 -0
- package/lib/sources/local-agent/adapters/shared.d.ts +163 -0
- package/lib/sources/local-agent/adapters/shared.js +415 -0
- package/lib/sources/local-agent/adapters/sqlite-shared.d.ts +92 -0
- package/lib/sources/local-agent/adapters/sqlite-shared.js +215 -0
- package/lib/sources/local-agent/adapters/zcode.d.ts +41 -0
- package/lib/sources/local-agent/adapters/zcode.js +159 -0
- package/lib/sources/local-agent/index.d.ts +222 -0
- package/lib/sources/local-agent/index.js +656 -0
- package/lib/sources/local-agent/page.d.ts +55 -0
- package/lib/sources/local-agent/page.js +83 -0
- package/lib/sources/local-agent/path.d.ts +8 -0
- package/lib/sources/local-agent/path.js +43 -0
- package/lib/sources/local-agent/registry.d.ts +68 -0
- package/lib/sources/local-agent/registry.js +116 -0
- package/lib/sources/local-agent/scan.d.ts +175 -0
- package/lib/sources/local-agent/scan.js +472 -0
- package/lib/sources/local-agent/sqlite.d.ts +45 -0
- package/lib/sources/local-agent/sqlite.js +113 -0
- package/lib/sources/local-agent/store.d.ts +93 -0
- package/lib/sources/local-agent/store.js +113 -0
- package/lib/sources/local-agent/types.d.ts +338 -0
- package/lib/sources/local-agent/types.js +20 -0
- package/lib/sources/web-chat/index.d.ts +5 -1
- package/lib/sources/web-chat/index.js +47 -8
- package/lib/store/spec.d.ts +50 -4
- package/lib/store/spec.js +2 -2
- package/lib/sync/index.d.ts +1 -0
- package/lib/sync/index.js +28 -8
- package/lib/tool.d.ts +5 -0
- package/lib/tool.js +418 -45
- package/lib/typert.js +13 -2
- package/lib/types.d.ts +28 -2
- package/lib/update.d.ts +6 -0
- package/lib/update.js +29 -1
- package/lib/web.js +5 -1
- package/lib/wire.d.ts +80 -9
- package/lib/wire.js +30 -4
- package/opencli-plugin/chatgpt.js +30 -27
- package/opencli-plugin/claude.js +12 -8
- package/opencli-plugin/common.js +266 -187
- package/opencli-plugin/deepseek.js +8 -5
- package/opencli-plugin/gemini.js +42 -38
- package/opencli-plugin/grok.js +22 -21
- package/opencli-plugin/kimi.js +34 -31
- package/opencli-plugin/opencli-plugin.json +6 -6
- package/opencli-plugin/package.json +8 -8
- package/package.json +182 -167
- package/lib/profile-mode.d.ts +0 -30
- package/lib/profile-mode.js +0 -90
package/package.json
CHANGED
|
@@ -1,92 +1,104 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-reference-anything",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Reference
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/Chael-Chael/dsh-reference-anything.git"
|
|
13
|
-
},
|
|
14
|
-
"main": "lib/index.js",
|
|
15
|
-
"types": "lib/index.d.ts",
|
|
16
|
-
"exports": {
|
|
17
|
-
".": {
|
|
18
|
-
"types": "./lib/index.d.ts",
|
|
19
|
-
"default": "./lib/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./reference": {
|
|
22
|
-
"types": "./lib/reference.d.ts",
|
|
23
|
-
"default": "./lib/reference.js"
|
|
24
|
-
},
|
|
25
|
-
"./tool": {
|
|
26
|
-
"types": "./lib/tool.d.ts",
|
|
27
|
-
"default": "./lib/tool.js"
|
|
28
|
-
},
|
|
29
|
-
"./file": {
|
|
30
|
-
"types": "./lib/sources/file.d.ts",
|
|
31
|
-
"default": "./lib/sources/file.js"
|
|
32
|
-
},
|
|
33
|
-
"./
|
|
34
|
-
"types": "./lib/sources/
|
|
35
|
-
"default": "./lib/sources/
|
|
36
|
-
},
|
|
37
|
-
"./
|
|
38
|
-
"types": "./lib/
|
|
39
|
-
"default": "./lib/
|
|
40
|
-
},
|
|
41
|
-
"./
|
|
42
|
-
"types": "./lib/
|
|
43
|
-
"default": "./lib/
|
|
44
|
-
},
|
|
45
|
-
"./
|
|
46
|
-
"types": "./lib/
|
|
47
|
-
"default": "./lib/
|
|
48
|
-
},
|
|
49
|
-
"./
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-reference-anything",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "Reference commands, skills, workspace files, DSH sessions, local agent transcripts, cloud-drive files, and mirrored web-chat conversations from one DeepSeek Harness @ menu",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/Chael-Chael/dsh-reference-anything.git"
|
|
13
|
+
},
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./reference": {
|
|
22
|
+
"types": "./lib/reference.d.ts",
|
|
23
|
+
"default": "./lib/reference.js"
|
|
24
|
+
},
|
|
25
|
+
"./tool": {
|
|
26
|
+
"types": "./lib/tool.d.ts",
|
|
27
|
+
"default": "./lib/tool.js"
|
|
28
|
+
},
|
|
29
|
+
"./file": {
|
|
30
|
+
"types": "./lib/sources/file.d.ts",
|
|
31
|
+
"default": "./lib/sources/file.js"
|
|
32
|
+
},
|
|
33
|
+
"./local-agent": {
|
|
34
|
+
"types": "./lib/sources/local-agent/index.d.ts",
|
|
35
|
+
"default": "./lib/sources/local-agent/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./cloud-drive": {
|
|
38
|
+
"types": "./lib/sources/cloud-drive/index.d.ts",
|
|
39
|
+
"default": "./lib/sources/cloud-drive/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./openlist": {
|
|
42
|
+
"types": "./lib/openlist/index.d.ts",
|
|
43
|
+
"default": "./lib/openlist/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./web-chat": {
|
|
46
|
+
"types": "./lib/sources/web-chat/index.d.ts",
|
|
47
|
+
"default": "./lib/sources/web-chat/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./web": {
|
|
50
|
+
"types": "./lib/web.d.ts",
|
|
51
|
+
"default": "./lib/web.js"
|
|
52
|
+
},
|
|
53
|
+
"./sync": {
|
|
54
|
+
"types": "./lib/sync/index.d.ts",
|
|
55
|
+
"default": "./lib/sync/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./client": {
|
|
58
|
+
"types": "./lib/client/index.d.ts",
|
|
59
|
+
"default": "./lib/client.js"
|
|
60
|
+
},
|
|
61
|
+
"./package.json": "./package.json"
|
|
62
|
+
},
|
|
63
|
+
"files": [
|
|
64
|
+
"lib",
|
|
65
|
+
"opencli-plugin/*.js",
|
|
66
|
+
"opencli-plugin/opencli-plugin.json",
|
|
67
|
+
"opencli-plugin/package.json",
|
|
68
|
+
"cordis.patch.yml",
|
|
69
|
+
"images/logo.png",
|
|
70
|
+
"NOTICE.md",
|
|
71
|
+
"README.md"
|
|
72
|
+
],
|
|
73
|
+
"dsh": {
|
|
74
|
+
"bundle": {
|
|
75
|
+
"patch": "./cordis.patch.yml"
|
|
76
|
+
},
|
|
77
|
+
"client": {
|
|
78
|
+
"platform": "web",
|
|
79
|
+
"inject": [
|
|
80
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
81
|
+
"@deepseek-ai/dsh-api-remotes",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-input-trigger",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
85
|
+
"@deepseek-ai/dsh-client-locale"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"scripts": {
|
|
90
|
+
"build": "node build.mjs",
|
|
91
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
92
|
+
"test": "vitest run",
|
|
93
|
+
"check": "pnpm run typecheck && pnpm run test && pnpm run build",
|
|
94
|
+
"prepublishOnly": "pnpm run check",
|
|
95
|
+
"prepare": "node build.mjs"
|
|
96
|
+
},
|
|
97
|
+
"peerDependencies": {
|
|
98
|
+
"@deepseek-ai/cordis": ">=4.0.1",
|
|
99
|
+
"@deepseek-ai/dsh-agent": ">=0.1.0-rc.6",
|
|
88
100
|
"@deepseek-ai/dsh-api-remotes": ">=0.1.0-rc.8",
|
|
89
|
-
"@deepseek-ai/dsh-attachment": ">=0.1.0-rc.6",
|
|
101
|
+
"@deepseek-ai/dsh-attachment": ">=0.1.0-rc.6",
|
|
90
102
|
"@deepseek-ai/dsh-client-connection": ">=0.1.0-rc.8",
|
|
91
103
|
"@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.8",
|
|
92
104
|
"@deepseek-ai/dsh-client-runtime": ">=0.1.0-rc.8",
|
|
@@ -95,91 +107,94 @@
|
|
|
95
107
|
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.0-rc.8",
|
|
96
108
|
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.8",
|
|
97
109
|
"@deepseek-ai/dsh-file-reference": ">=0.1.0-rc.8",
|
|
98
|
-
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.6",
|
|
99
|
-
"@deepseek-ai/dsh-output-retention": ">=0.1.0-rc.6",
|
|
100
|
-
"@deepseek-ai/dsh-session": ">=0.1.0-rc.6",
|
|
101
|
-
"@deepseek-ai/dsh-session-reference": ">=0.1.0-rc.6",
|
|
110
|
+
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.6",
|
|
111
|
+
"@deepseek-ai/dsh-output-retention": ">=0.1.0-rc.6",
|
|
112
|
+
"@deepseek-ai/dsh-session": ">=0.1.0-rc.6",
|
|
113
|
+
"@deepseek-ai/dsh-session-reference": ">=0.1.0-rc.6",
|
|
102
114
|
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.8",
|
|
103
115
|
"@deepseek-ai/dsh-storage-domain": ">=0.1.0-rc.8",
|
|
104
|
-
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.6",
|
|
105
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.1.0-rc.6",
|
|
116
|
+
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.6",
|
|
117
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.1.0-rc.6",
|
|
106
118
|
"@deepseek-ai/dsh-typert-registry": ">=0.1.0-rc.8",
|
|
107
|
-
"react": "^18.2.0"
|
|
108
|
-
},
|
|
109
|
-
"peerDependenciesMeta": {
|
|
119
|
+
"react": "^18.2.0"
|
|
120
|
+
},
|
|
121
|
+
"peerDependenciesMeta": {
|
|
110
122
|
"@deepseek-ai/dsh-session-reference": {
|
|
111
123
|
"optional": true
|
|
112
124
|
},
|
|
113
125
|
"@deepseek-ai/dsh-file-reference": {
|
|
114
126
|
"optional": true
|
|
115
127
|
},
|
|
116
|
-
"@deepseek-ai/dsh-client-runtime": {
|
|
117
|
-
"optional": true
|
|
118
|
-
},
|
|
119
|
-
"@deepseek-ai/dsh-api-remotes": {
|
|
120
|
-
"optional": true
|
|
121
|
-
},
|
|
122
|
-
"@deepseek-ai/dsh-client-ui-input-trigger": {
|
|
123
|
-
"optional": true
|
|
124
|
-
},
|
|
125
|
-
"@deepseek-ai/dsh-client-ui-slots": {
|
|
126
|
-
"optional": true
|
|
127
|
-
},
|
|
128
|
-
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
129
|
-
"optional": true
|
|
130
|
-
},
|
|
131
|
-
"@deepseek-ai/dsh-client-locale": {
|
|
132
|
-
"optional": true
|
|
133
|
-
},
|
|
134
|
-
"@deepseek-ai/dsh-client-connection": {
|
|
135
|
-
"optional": true
|
|
136
|
-
},
|
|
137
|
-
"@deepseek-ai/dsh-client-ui-settings": {
|
|
138
|
-
"optional": true
|
|
139
|
-
},
|
|
140
|
-
"@deepseek-ai/dsh-settings": {
|
|
141
|
-
"optional": true
|
|
142
|
-
},
|
|
143
|
-
"react": {
|
|
144
|
-
"optional": true
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
"dependencies": {
|
|
148
|
-
"@deepseek-ai/schemastery": "^3.18.1",
|
|
149
|
-
"@lobehub/icons": "^5.16.0",
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"@deepseek-ai/
|
|
155
|
-
"@deepseek-ai/dsh-
|
|
156
|
-
"@deepseek-ai/dsh-
|
|
157
|
-
"@deepseek-ai/dsh-
|
|
158
|
-
"@deepseek-ai/dsh-client-
|
|
159
|
-
"@deepseek-ai/dsh-client-
|
|
160
|
-
"@deepseek-ai/dsh-client-
|
|
161
|
-
"@deepseek-ai/dsh-client-ui-
|
|
162
|
-
"@deepseek-ai/dsh-client-ui-
|
|
163
|
-
"@deepseek-ai/dsh-client-ui-
|
|
164
|
-
"@deepseek-ai/dsh-
|
|
165
|
-
"@deepseek-ai/dsh-
|
|
166
|
-
"@deepseek-ai/dsh-
|
|
167
|
-
"@deepseek-ai/dsh-
|
|
168
|
-
"@deepseek-ai/dsh-session
|
|
169
|
-
"@deepseek-ai/dsh-
|
|
170
|
-
"@deepseek-ai/dsh-
|
|
171
|
-
"@deepseek-ai/dsh-
|
|
172
|
-
"@deepseek-ai/dsh-
|
|
173
|
-
"@deepseek-ai/dsh-
|
|
174
|
-
"@deepseek-ai/dsh-
|
|
175
|
-
"@
|
|
176
|
-
"@
|
|
177
|
-
"@
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"react": "^18.
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
128
|
+
"@deepseek-ai/dsh-client-runtime": {
|
|
129
|
+
"optional": true
|
|
130
|
+
},
|
|
131
|
+
"@deepseek-ai/dsh-api-remotes": {
|
|
132
|
+
"optional": true
|
|
133
|
+
},
|
|
134
|
+
"@deepseek-ai/dsh-client-ui-input-trigger": {
|
|
135
|
+
"optional": true
|
|
136
|
+
},
|
|
137
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
140
|
+
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
141
|
+
"optional": true
|
|
142
|
+
},
|
|
143
|
+
"@deepseek-ai/dsh-client-locale": {
|
|
144
|
+
"optional": true
|
|
145
|
+
},
|
|
146
|
+
"@deepseek-ai/dsh-client-connection": {
|
|
147
|
+
"optional": true
|
|
148
|
+
},
|
|
149
|
+
"@deepseek-ai/dsh-client-ui-settings": {
|
|
150
|
+
"optional": true
|
|
151
|
+
},
|
|
152
|
+
"@deepseek-ai/dsh-settings": {
|
|
153
|
+
"optional": true
|
|
154
|
+
},
|
|
155
|
+
"react": {
|
|
156
|
+
"optional": true
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"dependencies": {
|
|
160
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
161
|
+
"@lobehub/icons": "^5.16.0",
|
|
162
|
+
"react-markdown": "^10.1.0",
|
|
163
|
+
"zod": "^4.4.3"
|
|
164
|
+
},
|
|
165
|
+
"devDependencies": {
|
|
166
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
167
|
+
"@deepseek-ai/dsh-agent": "^0.1.0-rc.8",
|
|
168
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.8",
|
|
169
|
+
"@deepseek-ai/dsh-attachment": "^0.1.0-rc.8",
|
|
170
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.0-rc.8",
|
|
171
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.8",
|
|
172
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.8",
|
|
173
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.8",
|
|
174
|
+
"@deepseek-ai/dsh-client-ui-input-trigger": "^0.1.0-rc.8",
|
|
175
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.8",
|
|
176
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.8",
|
|
177
|
+
"@deepseek-ai/dsh-file-reference": "^0.1.0-rc.8",
|
|
178
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.8",
|
|
179
|
+
"@deepseek-ai/dsh-output-retention": "^0.1.0-rc.8",
|
|
180
|
+
"@deepseek-ai/dsh-session": "^0.1.0-rc.8",
|
|
181
|
+
"@deepseek-ai/dsh-session-reference": "^0.1.0-rc.8",
|
|
182
|
+
"@deepseek-ai/dsh-settings": "^0.1.0-rc.8",
|
|
183
|
+
"@deepseek-ai/dsh-storage": "^0.1.0-rc.8",
|
|
184
|
+
"@deepseek-ai/dsh-storage-domain": "^0.1.0-rc.8",
|
|
185
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.8",
|
|
186
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.8",
|
|
187
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.8",
|
|
188
|
+
"@deepseek-ai/dsh-typert-registry": "^0.1.0-rc.8",
|
|
189
|
+
"@jackwener/opencli": "1.8.6",
|
|
190
|
+
"@types/node": "^22.20.1",
|
|
191
|
+
"@types/react": "^18.2.0",
|
|
192
|
+
"@types/react-dom": "^18.3.7",
|
|
193
|
+
"esbuild": "^0.25.0",
|
|
194
|
+
"jsdom": "^26.1.0",
|
|
195
|
+
"react": "^18.2.0",
|
|
196
|
+
"react-dom": "^18.2.0",
|
|
197
|
+
"typescript": "^5.7.0",
|
|
198
|
+
"vitest": "^3.0.0"
|
|
199
|
+
}
|
|
200
|
+
}
|
package/lib/profile-mode.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ReferenceUiMode } from './wire.ts';
|
|
2
|
-
export declare const OFFICIAL_REFERENCE_PATCH_BEGIN = "# BEGIN dsh-reference-anything managed official-reference override";
|
|
3
|
-
export declare const OFFICIAL_REFERENCE_PATCH_END = "# END dsh-reference-anything managed official-reference override";
|
|
4
|
-
export interface ReferenceUiSwitchResult {
|
|
5
|
-
mode: ReferenceUiMode;
|
|
6
|
-
restartRequired: false;
|
|
7
|
-
}
|
|
8
|
-
interface SwitchReferenceUiModeOptions {
|
|
9
|
-
mode: ReferenceUiMode;
|
|
10
|
-
packageRoot?: string;
|
|
11
|
-
dshHome?: string;
|
|
12
|
-
signal?: AbortSignal;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Switch only the visible @ implementation while keeping this package alive.
|
|
16
|
-
*
|
|
17
|
-
* The bundle patch remains untouched so updating or reinstalling the package
|
|
18
|
-
* cannot erase the user's choice. The plugin Host and settings entry remain
|
|
19
|
-
* active in both modes; the client separately registers or disposes its own
|
|
20
|
-
* picker sources.
|
|
21
|
-
*/
|
|
22
|
-
export declare function switchReferenceUiMode(options: SwitchReferenceUiModeOptions): Promise<ReferenceUiSwitchResult>;
|
|
23
|
-
/** Write the managed override without exposing a partially-written YAML file. */
|
|
24
|
-
export declare function writeReferenceUiModeOverride(path: string, mode: ReferenceUiMode, signal?: AbortSignal): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Preserve every user-owned row and append one idempotent block at the end,
|
|
27
|
-
* where Cordis' ordered patch semantics make it the effective override.
|
|
28
|
-
*/
|
|
29
|
-
export declare function withReferenceUiModeOverride(source: string, mode: ReferenceUiMode): string;
|
|
30
|
-
export {};
|
package/lib/profile-mode.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
3
|
-
import { findOwningProfileDir } from "./update.js";
|
|
4
|
-
export const OFFICIAL_REFERENCE_PATCH_BEGIN = '# BEGIN dsh-reference-anything managed official-reference override';
|
|
5
|
-
export const OFFICIAL_REFERENCE_PATCH_END = '# END dsh-reference-anything managed official-reference override';
|
|
6
|
-
/**
|
|
7
|
-
* Switch only the visible @ implementation while keeping this package alive.
|
|
8
|
-
*
|
|
9
|
-
* The bundle patch remains untouched so updating or reinstalling the package
|
|
10
|
-
* cannot erase the user's choice. The plugin Host and settings entry remain
|
|
11
|
-
* active in both modes; the client separately registers or disposes its own
|
|
12
|
-
* picker sources.
|
|
13
|
-
*/
|
|
14
|
-
export async function switchReferenceUiMode(options) {
|
|
15
|
-
options.signal?.throwIfAborted();
|
|
16
|
-
const profileDir = await findOwningProfileDir(options.packageRoot, options.dshHome);
|
|
17
|
-
await writeReferenceUiModeOverride(join(profileDir, 'cordis.patch.yml'), options.mode, options.signal);
|
|
18
|
-
return { mode: options.mode, restartRequired: false };
|
|
19
|
-
}
|
|
20
|
-
/** Write the managed override without exposing a partially-written YAML file. */
|
|
21
|
-
export async function writeReferenceUiModeOverride(path, mode, signal) {
|
|
22
|
-
signal?.throwIfAborted();
|
|
23
|
-
let source = '';
|
|
24
|
-
try {
|
|
25
|
-
source = await readFile(path, { encoding: 'utf8', signal });
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
const code = error.code;
|
|
29
|
-
if (code !== 'ENOENT')
|
|
30
|
-
throw error;
|
|
31
|
-
}
|
|
32
|
-
const next = withReferenceUiModeOverride(source, mode);
|
|
33
|
-
if (next === source)
|
|
34
|
-
return;
|
|
35
|
-
const temporary = join(dirname(path), `.cordis.patch.yml.dsh-reference-anything-${String(process.pid)}-${String(Date.now())}.tmp`);
|
|
36
|
-
try {
|
|
37
|
-
await writeFile(temporary, next, { encoding: 'utf8', signal });
|
|
38
|
-
signal?.throwIfAborted();
|
|
39
|
-
await rename(temporary, path);
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
await rm(temporary, { force: true }).catch(() => undefined);
|
|
43
|
-
throw error;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Preserve every user-owned row and append one idempotent block at the end,
|
|
48
|
-
* where Cordis' ordered patch semantics make it the effective override.
|
|
49
|
-
*/
|
|
50
|
-
export function withReferenceUiModeOverride(source, mode) {
|
|
51
|
-
const eol = source.includes('\r\n') ? '\r\n' : '\n';
|
|
52
|
-
const lines = source.split(/\r?\n/);
|
|
53
|
-
const beginRows = markerRows(lines, OFFICIAL_REFERENCE_PATCH_BEGIN);
|
|
54
|
-
const endRows = markerRows(lines, OFFICIAL_REFERENCE_PATCH_END);
|
|
55
|
-
if (beginRows.length > 1 || endRows.length > 1 || beginRows.length !== endRows.length) {
|
|
56
|
-
throw new Error('the managed official-reference block in cordis.patch.yml is malformed');
|
|
57
|
-
}
|
|
58
|
-
if (beginRows.length === 1) {
|
|
59
|
-
const begin = beginRows[0];
|
|
60
|
-
const end = endRows[0];
|
|
61
|
-
if (end < begin)
|
|
62
|
-
throw new Error('the managed official-reference block in cordis.patch.yml is malformed');
|
|
63
|
-
lines.splice(begin, end - begin + 1);
|
|
64
|
-
}
|
|
65
|
-
removeEmptyArrayDocument(lines);
|
|
66
|
-
while (lines.length > 0 && lines.at(-1)?.trim() === '')
|
|
67
|
-
lines.pop();
|
|
68
|
-
const block = [
|
|
69
|
-
OFFICIAL_REFERENCE_PATCH_BEGIN,
|
|
70
|
-
'# Switch only the visible @ implementation; Reference Anything stays loaded.',
|
|
71
|
-
'- id: ui-reference',
|
|
72
|
-
` disabled: ${mode === 'official' ? 'false' : 'true'}`,
|
|
73
|
-
OFFICIAL_REFERENCE_PATCH_END,
|
|
74
|
-
];
|
|
75
|
-
return [...lines, ...(lines.length > 0 ? [''] : []), ...block, ''].join(eol);
|
|
76
|
-
}
|
|
77
|
-
function markerRows(lines, marker) {
|
|
78
|
-
const rows = [];
|
|
79
|
-
lines.forEach((line, index) => { if (line.trim() === marker)
|
|
80
|
-
rows.push(index); });
|
|
81
|
-
return rows;
|
|
82
|
-
}
|
|
83
|
-
/** `[]` is the valid empty profile document, but cannot precede list rows. */
|
|
84
|
-
function removeEmptyArrayDocument(lines) {
|
|
85
|
-
const meaningful = lines
|
|
86
|
-
.map((line, index) => ({ index, text: line.trim() }))
|
|
87
|
-
.filter(row => row.text !== '' && !row.text.startsWith('#'));
|
|
88
|
-
if (meaningful.length === 1 && meaningful[0]?.text === '[]')
|
|
89
|
-
lines.splice(meaningful[0].index, 1);
|
|
90
|
-
}
|