@shuind/dsh-codex-harness 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/CHANGELOG.md +21 -0
- package/LICENSE +21 -21
- package/README.md +3 -5
- package/README.zh.md +3 -3
- package/RELEASE.md +1 -1
- package/docs/preset-library.md +1 -1
- package/docs/tool-policy.md +1 -1
- package/lib/client.js +268 -138
- package/lib/index.js +38 -20
- package/lib/types/client/desktop.js +30 -22
- package/lib/types/client/index.d.ts +11 -0
- package/lib/types/client/policy-locale.d.ts +14 -3
- package/lib/types/client/policy-locale.js +28 -1
- package/lib/types/client/tool-policy.d.ts +15 -1
- package/lib/types/client/tool-policy.js +67 -10
- package/lib/types/contracts/ui-contracts.d.ts +4 -0
- package/lib/types/entries/preferences.d.ts +3 -2
- package/lib/types/entries/tool-policy.d.ts +2 -77
- package/lib/types/policy/rule-resolver.d.ts +1 -77
- package/lib/types/responses/compact-checkpoint.js +3 -10
- package/lib/types/responses/remote-compact.js +39 -11
- package/package.json +271 -160
- package/src/client/desktop.tsx +40 -22
- package/src/client/policy-locale.ts +27 -2
- package/src/client/tool-policy.tsx +99 -11
- package/src/contracts/ui-contracts.ts +4 -0
- package/src/entries/preferences.ts +2 -1
- package/src/policy/rule-resolver.ts +2 -2
- package/src/responses/compact-checkpoint.ts +2 -8
- package/src/responses/remote-compact.ts +41 -11
package/package.json
CHANGED
|
@@ -1,24 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuind/dsh-codex-harness",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"packageManager": "pnpm@9.15.9",
|
|
5
5
|
"description": "Customizable Codex coding preset, tools and Responses enhancements for DeepSeek Harness.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"types": "lib/types/entries/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/types/entries/index.d.ts",
|
|
12
|
+
"default": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./preferences": {
|
|
15
|
+
"types": "./lib/types/entries/preferences.d.ts",
|
|
16
|
+
"default": "./lib/preferences.js"
|
|
17
|
+
},
|
|
18
|
+
"./compaction": {
|
|
19
|
+
"types": "./lib/types/entries/compaction.d.ts",
|
|
20
|
+
"default": "./lib/compaction.js"
|
|
21
|
+
},
|
|
22
|
+
"./tool-policy": {
|
|
23
|
+
"types": "./lib/types/entries/tool-policy.d.ts",
|
|
24
|
+
"default": "./lib/tool-policy.js"
|
|
25
|
+
},
|
|
14
26
|
"./tool-policy/locale/*.json": "./locale/tool-policy/*.json",
|
|
15
27
|
"./tool-policy/icon": "./assets/codex.svg",
|
|
16
|
-
"./hybrid-executor": {
|
|
28
|
+
"./hybrid-executor": {
|
|
29
|
+
"types": "./lib/types/entries/hybrid-executor.d.ts",
|
|
30
|
+
"default": "./lib/hybrid-executor.js"
|
|
31
|
+
},
|
|
17
32
|
"./hybrid-executor/locale/*.json": "./locale/hybrid-executor/*.json",
|
|
18
33
|
"./hybrid-executor/icon": "./assets/codex.svg",
|
|
19
|
-
"./compact-command": {
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
"./compact-command": {
|
|
35
|
+
"types": "./lib/types/entries/compact-command.d.ts",
|
|
36
|
+
"default": "./lib/compact-command.js"
|
|
37
|
+
},
|
|
38
|
+
"./typert": {
|
|
39
|
+
"types": "./lib/types/entries/typert.host.d.ts",
|
|
40
|
+
"default": "./lib/typert.js"
|
|
41
|
+
},
|
|
42
|
+
"./client": {
|
|
43
|
+
"types": "./lib/types/entries/client.d.ts",
|
|
44
|
+
"default": "./lib/client.js"
|
|
45
|
+
},
|
|
22
46
|
"./locale/*.json": "./locale/*.json",
|
|
23
47
|
"./icon": "./assets/codex.svg",
|
|
24
48
|
"./preferences/locale/*.json": "./locale/*.json",
|
|
@@ -67,15 +91,27 @@
|
|
|
67
91
|
"pack:check": "npm pack --dry-run",
|
|
68
92
|
"prepare": "npm run build"
|
|
69
93
|
},
|
|
70
|
-
"repository": {
|
|
71
|
-
|
|
72
|
-
|
|
94
|
+
"repository": {
|
|
95
|
+
"type": "git",
|
|
96
|
+
"url": "git+https://github.com/shuind/dsh-codex-harness.git"
|
|
97
|
+
},
|
|
98
|
+
"keywords": [
|
|
99
|
+
"dsh-plugin",
|
|
100
|
+
"deepseek-harness",
|
|
101
|
+
"codex",
|
|
102
|
+
"agent"
|
|
103
|
+
],
|
|
104
|
+
"publishConfig": {
|
|
105
|
+
"access": "public"
|
|
106
|
+
},
|
|
73
107
|
"license": "MIT",
|
|
74
108
|
"engines": {
|
|
75
|
-
"dsh": ">=0.2.2-rc.1 <=0.2.2-rc.
|
|
109
|
+
"dsh": ">=0.2.2-rc.1 <=0.2.2-rc.5"
|
|
76
110
|
},
|
|
77
111
|
"dsh": {
|
|
78
|
-
"bundle": {
|
|
112
|
+
"bundle": {
|
|
113
|
+
"patch": "./cordis.patch.yml"
|
|
114
|
+
},
|
|
79
115
|
"client": {
|
|
80
116
|
"inject": [
|
|
81
117
|
"@deepseek-ai/dsh-client-locale",
|
|
@@ -133,165 +169,240 @@
|
|
|
133
169
|
"@deepseek-ai/dsh-typert-protocol": ">=0.2.2-rc.1 <0.2.3"
|
|
134
170
|
},
|
|
135
171
|
"peerDependenciesMeta": {
|
|
136
|
-
"@deepseek-ai/cordis": {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"@deepseek-ai/dsh-agent
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"@deepseek-ai/dsh-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"@deepseek-ai/dsh-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"@deepseek-ai/dsh-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"@deepseek-ai/dsh-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"@deepseek-ai/dsh-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
"@deepseek-ai/dsh-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
"@deepseek-ai/dsh-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"@deepseek-ai/dsh-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"@deepseek-ai/dsh-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
"@deepseek-ai/dsh-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
"@deepseek-ai/dsh-
|
|
172
|
+
"@deepseek-ai/cordis": {
|
|
173
|
+
"optional": true
|
|
174
|
+
},
|
|
175
|
+
"@deepseek-ai/dsh-agent": {
|
|
176
|
+
"optional": true
|
|
177
|
+
},
|
|
178
|
+
"@deepseek-ai/dsh-agent-preset": {
|
|
179
|
+
"optional": true
|
|
180
|
+
},
|
|
181
|
+
"@deepseek-ai/dsh-agent-preset-registry": {
|
|
182
|
+
"optional": true
|
|
183
|
+
},
|
|
184
|
+
"@deepseek-ai/dsh-api-remotes": {
|
|
185
|
+
"optional": true
|
|
186
|
+
},
|
|
187
|
+
"@deepseek-ai/dsh-client-locale": {
|
|
188
|
+
"optional": true
|
|
189
|
+
},
|
|
190
|
+
"@deepseek-ai/dsh-client-ui-commands": {
|
|
191
|
+
"optional": true
|
|
192
|
+
},
|
|
193
|
+
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
194
|
+
"optional": true
|
|
195
|
+
},
|
|
196
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": {
|
|
197
|
+
"optional": true
|
|
198
|
+
},
|
|
199
|
+
"@deepseek-ai/dsh-client-ui-settings": {
|
|
200
|
+
"optional": true
|
|
201
|
+
},
|
|
202
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
203
|
+
"optional": true
|
|
204
|
+
},
|
|
205
|
+
"@deepseek-ai/dsh-commands": {
|
|
206
|
+
"optional": true
|
|
207
|
+
},
|
|
208
|
+
"@deepseek-ai/dsh-compaction": {
|
|
209
|
+
"optional": true
|
|
210
|
+
},
|
|
211
|
+
"@deepseek-ai/dsh-compaction-basic": {
|
|
212
|
+
"optional": true
|
|
213
|
+
},
|
|
214
|
+
"@deepseek-ai/dsh-compaction-tool-result-pruner": {
|
|
215
|
+
"optional": true
|
|
216
|
+
},
|
|
217
|
+
"@deepseek-ai/dsh-credentials": {
|
|
218
|
+
"optional": true
|
|
219
|
+
},
|
|
220
|
+
"@deepseek-ai/dsh-fs": {
|
|
221
|
+
"optional": true
|
|
222
|
+
},
|
|
223
|
+
"@deepseek-ai/dsh-jobs": {
|
|
224
|
+
"optional": true
|
|
225
|
+
},
|
|
226
|
+
"@deepseek-ai/dsh-llm": {
|
|
227
|
+
"optional": true
|
|
228
|
+
},
|
|
229
|
+
"@deepseek-ai/dsh-persona": {
|
|
230
|
+
"optional": true
|
|
231
|
+
},
|
|
232
|
+
"@deepseek-ai/dsh-sandbox": {
|
|
233
|
+
"optional": true
|
|
234
|
+
},
|
|
235
|
+
"@deepseek-ai/dsh-sandbox-policy": {
|
|
236
|
+
"optional": true
|
|
237
|
+
},
|
|
238
|
+
"@deepseek-ai/dsh-scope": {
|
|
239
|
+
"optional": true
|
|
240
|
+
},
|
|
241
|
+
"@deepseek-ai/dsh-session": {
|
|
242
|
+
"optional": true
|
|
243
|
+
},
|
|
244
|
+
"@deepseek-ai/dsh-session-projection": {
|
|
245
|
+
"optional": true
|
|
246
|
+
},
|
|
247
|
+
"@deepseek-ai/dsh-settings": {
|
|
248
|
+
"optional": true
|
|
249
|
+
},
|
|
250
|
+
"@deepseek-ai/dsh-shell": {
|
|
251
|
+
"optional": true
|
|
252
|
+
},
|
|
253
|
+
"@deepseek-ai/dsh-shell-env": {
|
|
254
|
+
"optional": true
|
|
255
|
+
},
|
|
256
|
+
"@deepseek-ai/dsh-system-prompt": {
|
|
257
|
+
"optional": true
|
|
258
|
+
},
|
|
259
|
+
"@deepseek-ai/dsh-terminal": {
|
|
260
|
+
"optional": true
|
|
261
|
+
},
|
|
262
|
+
"@deepseek-ai/dsh-token-meter": {
|
|
263
|
+
"optional": true
|
|
264
|
+
},
|
|
265
|
+
"@deepseek-ai/dsh-tool-fs": {
|
|
266
|
+
"optional": true
|
|
267
|
+
},
|
|
268
|
+
"@deepseek-ai/dsh-tool-jobs": {
|
|
269
|
+
"optional": true
|
|
270
|
+
},
|
|
271
|
+
"@deepseek-ai/dsh-tool-todo": {
|
|
272
|
+
"optional": true
|
|
273
|
+
},
|
|
274
|
+
"@deepseek-ai/dsh-tool-web": {
|
|
275
|
+
"optional": true
|
|
276
|
+
},
|
|
277
|
+
"@deepseek-ai/dsh-tools": {
|
|
278
|
+
"optional": true
|
|
279
|
+
},
|
|
280
|
+
"@deepseek-ai/dsh-typert-protocol": {
|
|
281
|
+
"optional": true
|
|
282
|
+
}
|
|
173
283
|
},
|
|
174
284
|
"devDependencies": {
|
|
175
285
|
"@deepseek-ai/cordis": "4.1.0",
|
|
176
286
|
"@deepseek-ai/cordis-plugin-group": "1.1.0",
|
|
177
287
|
"@deepseek-ai/cordis-plugin-include": "1.1.0",
|
|
178
288
|
"@deepseek-ai/cordis-plugin-loader": "1.1.0",
|
|
179
|
-
"@deepseek-ai/dsh-
|
|
180
|
-
"@deepseek-ai/dsh-
|
|
181
|
-
"@deepseek-ai/dsh-
|
|
182
|
-
"@deepseek-ai/dsh-
|
|
183
|
-
"
|
|
184
|
-
"@deepseek-ai/dsh-
|
|
185
|
-
"@deepseek-ai/dsh-
|
|
186
|
-
"@deepseek-ai/dsh-
|
|
187
|
-
"@deepseek-ai/dsh-
|
|
188
|
-
"@deepseek-ai/dsh-
|
|
189
|
-
"@deepseek-ai/dsh-
|
|
190
|
-
"@deepseek-ai/dsh-
|
|
191
|
-
"@deepseek-ai/dsh-
|
|
192
|
-
"@deepseek-ai/dsh-
|
|
193
|
-
"@deepseek-ai/dsh-
|
|
194
|
-
"@deepseek-ai/dsh-
|
|
195
|
-
"@deepseek-ai/dsh-
|
|
196
|
-
"@deepseek-ai/dsh-
|
|
197
|
-
"@deepseek-ai/dsh-
|
|
198
|
-
"@deepseek-ai/dsh-
|
|
199
|
-
"@deepseek-ai/dsh-
|
|
200
|
-
"@deepseek-ai/dsh-
|
|
201
|
-
"@deepseek-ai/dsh-
|
|
202
|
-
"@deepseek-ai/dsh-
|
|
203
|
-
"@deepseek-ai/dsh-
|
|
204
|
-
"@deepseek-ai/dsh-
|
|
205
|
-
"@deepseek-ai/dsh-
|
|
206
|
-
"@deepseek-ai/dsh-
|
|
207
|
-
"@deepseek-ai/dsh-
|
|
208
|
-
"@deepseek-ai/dsh-
|
|
209
|
-
"@deepseek-ai/dsh-
|
|
210
|
-
"@deepseek-ai/dsh-
|
|
211
|
-
"@deepseek-ai/dsh-
|
|
212
|
-
"@deepseek-ai/dsh-
|
|
213
|
-
"@deepseek-ai/dsh-
|
|
214
|
-
"@deepseek-ai/dsh-
|
|
215
|
-
"@deepseek-ai/dsh-
|
|
216
|
-
"@deepseek-ai/dsh-
|
|
217
|
-
"@deepseek-ai/dsh-
|
|
218
|
-
"@deepseek-ai/dsh-
|
|
219
|
-
"@deepseek-ai/dsh-
|
|
220
|
-
"@deepseek-ai/dsh-
|
|
221
|
-
"@deepseek-ai/dsh-
|
|
222
|
-
"@deepseek-ai/dsh-
|
|
223
|
-
"@deepseek-ai/dsh-
|
|
224
|
-
"@deepseek-ai/dsh-
|
|
225
|
-
"@deepseek-ai/dsh-
|
|
226
|
-
"@deepseek-ai/dsh-
|
|
227
|
-
"@deepseek-ai/dsh-
|
|
228
|
-
"@deepseek-ai/dsh-
|
|
229
|
-
"@deepseek-ai/dsh-
|
|
230
|
-
"@deepseek-ai/dsh-
|
|
231
|
-
"@deepseek-ai/dsh-
|
|
232
|
-
"@deepseek-ai/dsh-
|
|
233
|
-
"@deepseek-ai/dsh-
|
|
234
|
-
"@deepseek-ai/dsh-
|
|
235
|
-
"@deepseek-ai/dsh-session": "0.2.2-rc.
|
|
236
|
-
"@deepseek-ai/dsh-session-
|
|
237
|
-
"@deepseek-ai/dsh-
|
|
238
|
-
"@deepseek-ai/dsh-
|
|
239
|
-
"@deepseek-ai/dsh-
|
|
240
|
-
"@deepseek-ai/dsh-
|
|
241
|
-
"@deepseek-ai/dsh-
|
|
242
|
-
"@deepseek-ai/dsh-
|
|
243
|
-
"@deepseek-ai/dsh-
|
|
244
|
-
"@deepseek-ai/dsh-
|
|
245
|
-
"@deepseek-ai/dsh-
|
|
246
|
-
"@deepseek-ai/dsh-
|
|
247
|
-
"@deepseek-ai/dsh-
|
|
248
|
-
"@deepseek-ai/dsh-
|
|
249
|
-
"@deepseek-ai/dsh-
|
|
250
|
-
"@deepseek-ai/dsh-
|
|
251
|
-
"@deepseek-ai/dsh-
|
|
252
|
-
"@deepseek-ai/dsh-
|
|
253
|
-
"@deepseek-ai/dsh-
|
|
254
|
-
"@deepseek-ai/dsh-
|
|
255
|
-
"@deepseek-ai/dsh-
|
|
256
|
-
"@deepseek-ai/dsh-
|
|
257
|
-
"@deepseek-ai/dsh-
|
|
258
|
-
"@deepseek-ai/dsh-
|
|
259
|
-
"@deepseek-ai/dsh-
|
|
260
|
-
"@deepseek-ai/dsh-
|
|
261
|
-
"@deepseek-ai/dsh-
|
|
262
|
-
"@deepseek-ai/dsh-
|
|
263
|
-
"@deepseek-ai/dsh-
|
|
264
|
-
"@deepseek-ai/dsh-
|
|
265
|
-
"@deepseek-ai/dsh-
|
|
266
|
-
"@deepseek-ai/dsh-
|
|
267
|
-
"@deepseek-ai/dsh-
|
|
268
|
-
"@deepseek-ai/dsh-
|
|
269
|
-
"@deepseek-ai/dsh-
|
|
270
|
-
"@deepseek-ai/dsh-
|
|
271
|
-
"@deepseek-ai/dsh-
|
|
272
|
-
"@deepseek-ai/dsh-
|
|
273
|
-
"@deepseek-ai/dsh-
|
|
274
|
-
"@deepseek-ai/dsh-
|
|
275
|
-
"@deepseek-ai/dsh-
|
|
276
|
-
"@deepseek-ai/dsh-
|
|
277
|
-
"@deepseek-ai/dsh-
|
|
278
|
-
"@deepseek-ai/dsh-util-
|
|
279
|
-
"@deepseek-ai/dsh-util-
|
|
280
|
-
"@deepseek-ai/dsh-
|
|
281
|
-
"@deepseek-ai/dsh-
|
|
282
|
-
"@deepseek-ai/dsh-workflow": "0.2.2-rc.
|
|
283
|
-
"@deepseek-ai/dsh-working-directory": "0.2.2-rc.
|
|
284
|
-
"@deepseek-ai/dsh-workspace": "0.2.2-rc.
|
|
289
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.5",
|
|
290
|
+
"@deepseek-ai/dsh-agent-default-model": "0.2.2-rc.5",
|
|
291
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.2-rc.5",
|
|
292
|
+
"@deepseek-ai/dsh-agent-preset": "0.2.2-rc.5",
|
|
293
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.2-rc.5",
|
|
294
|
+
"@deepseek-ai/dsh-api-gateway": "0.2.2-rc.5",
|
|
295
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.2-rc.5",
|
|
296
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.5",
|
|
297
|
+
"@deepseek-ai/dsh-atomic-write": "0.2.2-rc.5",
|
|
298
|
+
"@deepseek-ai/dsh-attachment": "0.2.2-rc.5",
|
|
299
|
+
"@deepseek-ai/dsh-authorization": "0.2.2-rc.5",
|
|
300
|
+
"@deepseek-ai/dsh-brand": "0.2.2-rc.5",
|
|
301
|
+
"@deepseek-ai/dsh-chunked-list": "0.2.2-rc.5",
|
|
302
|
+
"@deepseek-ai/dsh-client-connection": "0.2.2-rc.5",
|
|
303
|
+
"@deepseek-ai/dsh-client-file-upload": "0.2.2-rc.5",
|
|
304
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.5",
|
|
305
|
+
"@deepseek-ai/dsh-client-store": "0.2.2-rc.5",
|
|
306
|
+
"@deepseek-ai/dsh-client-ui-commands": "0.2.2-rc.5",
|
|
307
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.5",
|
|
308
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.5",
|
|
309
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.5",
|
|
310
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.2-rc.5",
|
|
311
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.5",
|
|
312
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
|
|
313
|
+
"@deepseek-ai/dsh-commands": "0.2.2-rc.5",
|
|
314
|
+
"@deepseek-ai/dsh-compaction": "0.2.2-rc.5",
|
|
315
|
+
"@deepseek-ai/dsh-compaction-basic": "0.2.2-rc.5",
|
|
316
|
+
"@deepseek-ai/dsh-compaction-image-offload": "0.2.2-rc.5",
|
|
317
|
+
"@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.2-rc.5",
|
|
318
|
+
"@deepseek-ai/dsh-config-editor": "0.2.2-rc.5",
|
|
319
|
+
"@deepseek-ai/dsh-credentials": "0.2.2-rc.5",
|
|
320
|
+
"@deepseek-ai/dsh-deque": "0.2.2-rc.5",
|
|
321
|
+
"@deepseek-ai/dsh-error": "0.2.2-rc.5",
|
|
322
|
+
"@deepseek-ai/dsh-file-reference": "0.2.2-rc.5",
|
|
323
|
+
"@deepseek-ai/dsh-fs": "0.2.2-rc.5",
|
|
324
|
+
"@deepseek-ai/dsh-fs-local": "0.2.2-rc.5",
|
|
325
|
+
"@deepseek-ai/dsh-goal": "0.2.2-rc.5",
|
|
326
|
+
"@deepseek-ai/dsh-home-paths": "0.2.2-rc.5",
|
|
327
|
+
"@deepseek-ai/dsh-http-proxy": "0.2.2-rc.5",
|
|
328
|
+
"@deepseek-ai/dsh-jobs": "0.2.2-rc.5",
|
|
329
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.2-rc.5",
|
|
330
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.5",
|
|
331
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.2.2-rc.5",
|
|
332
|
+
"@deepseek-ai/dsh-llm-retry": "0.2.2-rc.5",
|
|
333
|
+
"@deepseek-ai/dsh-persona": "0.2.2-rc.5",
|
|
334
|
+
"@deepseek-ai/dsh-plan-mode": "0.2.2-rc.5",
|
|
335
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.2-rc.5",
|
|
336
|
+
"@deepseek-ai/dsh-pwsh-local": "0.2.2-rc.5",
|
|
337
|
+
"@deepseek-ai/dsh-sandbox": "0.2.2-rc.5",
|
|
338
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.5",
|
|
339
|
+
"@deepseek-ai/dsh-scope": "0.2.2-rc.5",
|
|
340
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.5",
|
|
341
|
+
"@deepseek-ai/dsh-session-format": "0.2.2-rc.5",
|
|
342
|
+
"@deepseek-ai/dsh-session-format-catalog": "0.2.2-rc.5",
|
|
343
|
+
"@deepseek-ai/dsh-session-format-v0-to-v1": "0.2.2-rc.5",
|
|
344
|
+
"@deepseek-ai/dsh-session-format-v1-to-v2": "0.2.2-rc.5",
|
|
345
|
+
"@deepseek-ai/dsh-session-format-v2-to-v3": "0.2.2-rc.5",
|
|
346
|
+
"@deepseek-ai/dsh-session-format-v3-to-v4": "0.2.2-rc.5",
|
|
347
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.2-rc.5",
|
|
348
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-rc.5",
|
|
349
|
+
"@deepseek-ai/dsh-session-query": "0.2.2-rc.5",
|
|
350
|
+
"@deepseek-ai/dsh-session-title": "0.2.2-rc.5",
|
|
351
|
+
"@deepseek-ai/dsh-settings": "0.2.2-rc.5",
|
|
352
|
+
"@deepseek-ai/dsh-shell": "0.2.2-rc.5",
|
|
353
|
+
"@deepseek-ai/dsh-shell-env": "0.2.2-rc.5",
|
|
354
|
+
"@deepseek-ai/dsh-skill": "0.2.2-rc.5",
|
|
355
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.2-rc.5",
|
|
356
|
+
"@deepseek-ai/dsh-spill": "0.2.2-rc.5",
|
|
357
|
+
"@deepseek-ai/dsh-storage": "0.2.2-rc.5",
|
|
358
|
+
"@deepseek-ai/dsh-storage-domain": "0.2.2-rc.5",
|
|
359
|
+
"@deepseek-ai/dsh-subagent": "0.2.2-rc.5",
|
|
360
|
+
"@deepseek-ai/dsh-subprocess": "0.2.2-rc.5",
|
|
361
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.2-rc.5",
|
|
362
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5",
|
|
363
|
+
"@deepseek-ai/dsh-terminal": "0.2.2-rc.5",
|
|
364
|
+
"@deepseek-ai/dsh-terminal-bash": "0.2.2-rc.5",
|
|
365
|
+
"@deepseek-ai/dsh-timeout": "0.2.2-rc.5",
|
|
366
|
+
"@deepseek-ai/dsh-token-meter": "0.2.2-rc.5",
|
|
367
|
+
"@deepseek-ai/dsh-tool-ask-user": "0.2.2-rc.5",
|
|
368
|
+
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-rc.5",
|
|
369
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.2-rc.5",
|
|
370
|
+
"@deepseek-ai/dsh-tool-fs-search": "0.2.2-rc.5",
|
|
371
|
+
"@deepseek-ai/dsh-tool-goal": "0.2.2-rc.5",
|
|
372
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.2-rc.5",
|
|
373
|
+
"@deepseek-ai/dsh-tool-pwsh": "0.2.2-rc.5",
|
|
374
|
+
"@deepseek-ai/dsh-tool-ralph": "0.2.2-rc.5",
|
|
375
|
+
"@deepseek-ai/dsh-tool-skill": "0.2.2-rc.5",
|
|
376
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.2-rc.5",
|
|
377
|
+
"@deepseek-ai/dsh-tool-subagent-control": "0.2.2-rc.5",
|
|
378
|
+
"@deepseek-ai/dsh-tool-todo": "0.2.2-rc.5",
|
|
379
|
+
"@deepseek-ai/dsh-tool-web": "0.2.2-rc.5",
|
|
380
|
+
"@deepseek-ai/dsh-tool-workflow": "0.2.2-rc.5",
|
|
381
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.5",
|
|
382
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5",
|
|
383
|
+
"@deepseek-ai/dsh-typert-registry": "0.2.2-rc.5",
|
|
384
|
+
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.5",
|
|
385
|
+
"@deepseek-ai/dsh-user-questions": "0.2.2-rc.5",
|
|
386
|
+
"@deepseek-ai/dsh-util-crypto": "0.2.2-rc.5",
|
|
387
|
+
"@deepseek-ai/dsh-util-time": "0.2.2-rc.5",
|
|
388
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-rc.5",
|
|
389
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.2-rc.5",
|
|
390
|
+
"@deepseek-ai/dsh-web": "0.2.2-rc.5",
|
|
391
|
+
"@deepseek-ai/dsh-workflow": "0.2.2-rc.5",
|
|
392
|
+
"@deepseek-ai/dsh-workflow-ptc": "0.2.2-rc.5",
|
|
393
|
+
"@deepseek-ai/dsh-working-directory": "0.2.2-rc.5",
|
|
394
|
+
"@deepseek-ai/dsh-workspace": "0.2.2-rc.5",
|
|
285
395
|
"@types/node": "^22.20.0",
|
|
286
396
|
"@types/react": "~18.3.1",
|
|
287
397
|
"@types/react-dom": "~18.3.0",
|
|
398
|
+
"immer": "^10.1.1",
|
|
399
|
+
"js-tiktoken": "^1.0.21",
|
|
288
400
|
"react": "^18.3.1",
|
|
289
401
|
"react-dom": "^18.3.1",
|
|
290
|
-
"zustand": "~4.5.7",
|
|
291
|
-
"immer": "^10.1.1",
|
|
292
402
|
"tsdown": "^0.22.2",
|
|
293
403
|
"typescript": "^6.0.3",
|
|
294
404
|
"unrun": "^0.3.1",
|
|
295
|
-
"vitest": "^4.1.8"
|
|
405
|
+
"vitest": "^4.1.8",
|
|
406
|
+
"zustand": "~4.5.7"
|
|
296
407
|
}
|
|
297
408
|
}
|
package/src/client/desktop.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** A single Settings workspace; the bundle page is only a signpost. */
|
|
2
|
-
import { useState } from 'react'
|
|
2
|
+
import { useState, useSyncExternalStore } from 'react'
|
|
3
3
|
import type { Context } from '@deepseek-ai/cordis'
|
|
4
4
|
import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
|
|
5
5
|
import type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
OPENAI_CODEX_SETTINGS_NAMESPACE,
|
|
18
18
|
} from '../contracts/ui-contracts.ts'
|
|
19
19
|
import type { PresetClientRemote } from './preset-manager.tsx'
|
|
20
|
-
import { bindToolPolicy, ToolPolicySection } from './tool-policy.tsx'
|
|
20
|
+
import { bindToolPolicy, resolveGptCapabilities, ToolPolicySection } from './tool-policy.tsx'
|
|
21
21
|
import type { ToolPolicyBinding, ToolPolicyMode } from './tool-policy.tsx'
|
|
22
22
|
|
|
23
23
|
export interface DesktopConfigForm extends Pick<CodexScope, 'getSnapshot' | 'subscribe'> {
|
|
@@ -60,6 +60,26 @@ function asOverrides(value: unknown): Record<string, number | null> | undefined
|
|
|
60
60
|
}
|
|
61
61
|
return out
|
|
62
62
|
}
|
|
63
|
+
function projectCodexConnectRecord(
|
|
64
|
+
record: Record<string, unknown>,
|
|
65
|
+
baseRecord: Record<string, unknown> | undefined,
|
|
66
|
+
writable: boolean,
|
|
67
|
+
): CodexConnectSnapshot {
|
|
68
|
+
const searchModel = typeof record.searchModel === 'string' && record.searchModel.trim() ? record.searchModel.trim() : undefined
|
|
69
|
+
const imageModelHint = typeof record.imageModelHint === 'string' ? record.imageModelHint.trim() : undefined
|
|
70
|
+
return {
|
|
71
|
+
status: 'ready',
|
|
72
|
+
writable,
|
|
73
|
+
overrides: asOverrides(record.contextWindowOverrides),
|
|
74
|
+
baseOverrides: asOverrides(baseRecord?.contextWindowOverrides),
|
|
75
|
+
...(typeof record.enableNativeCompaction === 'boolean' ? { nativeCompaction: record.enableNativeCompaction } : {}),
|
|
76
|
+
...(typeof record.enableSearch === 'boolean' ? { searchEnabled: record.enableSearch } : {}),
|
|
77
|
+
...(searchModel !== undefined ? { searchModel } : {}),
|
|
78
|
+
...(typeof record.enableImageGeneration === 'boolean' ? { imageGenerationEnabled: record.enableImageGeneration } : {}),
|
|
79
|
+
...(imageModelHint !== undefined ? { imageModelHint } : {}),
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
63
83
|
export function bindCodexConnectScope(configForms: DesktopSettingsContext['configForms']): CodexConnectScope {
|
|
64
84
|
const form = configForms.get(OPENAI_CODEX_SETTINGS_NAMESPACE)
|
|
65
85
|
const mirror = configForms.describe?.()
|
|
@@ -75,30 +95,14 @@ export function bindCodexConnectScope(configForms: DesktopSettingsContext['confi
|
|
|
75
95
|
lastMirrorSnap = mirrorSnap
|
|
76
96
|
const formRecord = formSnap.status === 'ready' ? asRecord(formSnap.value) : undefined
|
|
77
97
|
if (formRecord !== undefined) {
|
|
78
|
-
return projected =
|
|
79
|
-
status: 'ready',
|
|
80
|
-
writable: formSnap.writable,
|
|
81
|
-
overrides: asOverrides(formRecord.contextWindowOverrides),
|
|
82
|
-
baseOverrides: asOverrides(asRecord(formSnap.base)?.contextWindowOverrides),
|
|
83
|
-
...(typeof formRecord.enableNativeCompaction === 'boolean'
|
|
84
|
-
? { nativeCompaction: formRecord.enableNativeCompaction }
|
|
85
|
-
: {}),
|
|
86
|
-
}
|
|
98
|
+
return projected = projectCodexConnectRecord(formRecord, asRecord(formSnap.base), formSnap.writable)
|
|
87
99
|
}
|
|
88
100
|
const view = mirrorSnap?.view
|
|
89
101
|
if (view !== undefined) {
|
|
90
102
|
const row = view.namespaces?.find(candidate => candidate.ns === OPENAI_CODEX_SETTINGS_NAMESPACE)
|
|
91
103
|
const rowRecord = row === undefined ? undefined : asRecord(row.value)
|
|
92
104
|
if (row === undefined || rowRecord === undefined) return projected = { status: 'unavailable', writable: false }
|
|
93
|
-
return projected =
|
|
94
|
-
status: 'ready',
|
|
95
|
-
writable: view.writable ?? formSnap.writable,
|
|
96
|
-
overrides: asOverrides(rowRecord.contextWindowOverrides),
|
|
97
|
-
baseOverrides: asOverrides(asRecord(row.base)?.contextWindowOverrides),
|
|
98
|
-
...(typeof rowRecord.enableNativeCompaction === 'boolean'
|
|
99
|
-
? { nativeCompaction: rowRecord.enableNativeCompaction }
|
|
100
|
-
: {}),
|
|
101
|
-
}
|
|
105
|
+
return projected = projectCodexConnectRecord(rowRecord, asRecord(row.base), view.writable ?? formSnap.writable)
|
|
102
106
|
}
|
|
103
107
|
return projected = { status: formSnap.status, writable: formSnap.writable }
|
|
104
108
|
}
|
|
@@ -210,9 +214,22 @@ export function RuntimeSettingsEditor({ active, ...props }: DesktopSettingsProps
|
|
|
210
214
|
</section>
|
|
211
215
|
}
|
|
212
216
|
|
|
217
|
+
const EMPTY_CONNECT_SUBSCRIBE = () => () => {}
|
|
218
|
+
const EMPTY_CONNECT_SNAPSHOT = (): CodexConnectSnapshot | undefined => undefined
|
|
219
|
+
|
|
213
220
|
export function CodexSettingsTab(props: DesktopSettingsProps & { initialPage?: SettingsPage }) {
|
|
214
|
-
const { toolPolicy, presetManager, t } = props
|
|
221
|
+
const { toolPolicy, presetManager, getCodexConnectScope, t } = props
|
|
215
222
|
const [page, setPage] = useState<SettingsPage>(props.initialPage ?? 'tools')
|
|
223
|
+
const settingsSnapshot = typeof props.useSettings === 'function'
|
|
224
|
+
? props.useSettings(state => state as CodexSettingsSnapshot)
|
|
225
|
+
: undefined
|
|
226
|
+
const connectScope = getCodexConnectScope?.()
|
|
227
|
+
const connectSnapshot = useSyncExternalStore(
|
|
228
|
+
connectScope ? connectScope.subscribe : EMPTY_CONNECT_SUBSCRIBE,
|
|
229
|
+
connectScope ? connectScope.getSnapshot : EMPTY_CONNECT_SNAPSHOT,
|
|
230
|
+
connectScope ? connectScope.getSnapshot : EMPTY_CONNECT_SNAPSHOT,
|
|
231
|
+
)
|
|
232
|
+
const gptCapabilities = resolveGptCapabilities(settingsSnapshot?.value, connectSnapshot)
|
|
216
233
|
const mode: ToolPolicyMode = page === 'tools' ? 'tools' : 'inactive'
|
|
217
234
|
return <section className="codex-harness-settings">
|
|
218
235
|
<style>{desktopStyles}</style>
|
|
@@ -220,7 +237,7 @@ export function CodexSettingsTab(props: DesktopSettingsProps & { initialPage?: S
|
|
|
220
237
|
<button type="button" aria-pressed={page === 'tools'} onClick={() => setPage('tools')}>{t('settingsToolsPage')}</button>
|
|
221
238
|
<button type="button" aria-pressed={page === 'runtime'} onClick={() => setPage('runtime')}>{t('settingsRuntimePage')}</button>
|
|
222
239
|
</nav>
|
|
223
|
-
{toolPolicy !== undefined && <ToolPolicySection binding={toolPolicy} presetManager={presetManager} mode={mode} t={t} />}
|
|
240
|
+
{toolPolicy !== undefined && <ToolPolicySection binding={toolPolicy} presetManager={presetManager} mode={mode} gptCapabilities={gptCapabilities} t={t} />}
|
|
224
241
|
<RuntimeSettingsEditor {...props} active={page === 'runtime'} />
|
|
225
242
|
</section>
|
|
226
243
|
}
|
|
@@ -246,6 +263,7 @@ export function apply(ctx: Context): void {
|
|
|
246
263
|
unsetSetting: field => settings.unset(field),
|
|
247
264
|
presetManager,
|
|
248
265
|
toolPolicy,
|
|
266
|
+
getCodexConnectScope,
|
|
249
267
|
saveSettings: async (edits, revision) => {
|
|
250
268
|
await saveDesktopSettings(form, edits, revision)
|
|
251
269
|
if (typeof edits.remoteCompactionEnabled === 'boolean') {
|