dsh-edge 0.2.0-alpha.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +6 -6
- package/README.zh.md +6 -6
- package/THIRD_PARTY_NOTICES.md +387 -1131
- package/dist/assets/index-BNMwCG9c.css +1 -0
- package/dist/assets/index-CA9Bpko5.js +96 -0
- package/dist/assets/langs/{php-D-uCvoST.js → php-DDkx9sim.js} +2 -2
- package/dist/assets/langs/{ruby-DEItuUFs.js → ruby-DCxyoPen.js} +2 -2
- package/dist/assets/{vendor-Cjbwl5VI.js → vendor-D22_Mp1f.js} +2 -2
- package/dist/index.html +26 -5
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +166 -27
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +136 -19
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +51 -12
- package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +188 -123
- package/dist/plugins/@deepseek-ai/dsh-client-runtime/client.js +43 -8
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +54 -54
- package/dist/plugins/@deepseek-ai/dsh-client-ui-brand-official/client.js +50 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +46 -17
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +805 -486
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +5 -5
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +82 -26
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +7 -7
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +2 -2
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +18 -18
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +96 -82
- package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +989 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +1177 -67
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +61 -65
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +51 -21
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +12 -12
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +18 -45
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +46 -3
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +102 -62
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +143 -142
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +25 -25
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +261 -86
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +72 -62
- package/package.json +22 -22
- package/scripts/legal-files.mjs +2 -1
- package/worker/direct/index.js +692 -688
- package/worker/isolated/index.js +469 -465
- package/dist/assets/index-C-1AiF3k.js +0 -112
- package/dist/assets/index-CSGf6Qzd.css +0 -1
|
@@ -8,7 +8,6 @@ window.__ModuleLoader__.load({
|
|
|
8
8
|
let react = require("react");
|
|
9
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
10
10
|
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
11
|
-
let _deepseek_ai_dsh_client_schema_form = require("@deepseek-ai/dsh-client-schema-form");
|
|
12
11
|
//#region lib/types/client/presentation.js
|
|
13
12
|
/** Machine value of the preset that requires an explicit GUI risk gate. */
|
|
14
13
|
const FULL_ACCESS_PRESET = "danger-full-access";
|
|
@@ -43,11 +42,11 @@ window.__ModuleLoader__.load({
|
|
|
43
42
|
}
|
|
44
43
|
var PermissionRow_module_css_default = {
|
|
45
44
|
"chevron": "oY77xG_chevron",
|
|
45
|
+
"desc": "oY77xG_desc",
|
|
46
46
|
"row": "oY77xG_row",
|
|
47
|
-
"title": "oY77xG_title",
|
|
48
47
|
"rowText": "oY77xG_rowText",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
48
|
+
"selector": "oY77xG_selector",
|
|
49
|
+
"title": "oY77xG_title"
|
|
51
50
|
};
|
|
52
51
|
//#endregion
|
|
53
52
|
//#region lib/types/client/PermissionRow.js
|
|
@@ -193,21 +192,24 @@ window.__ModuleLoader__.load({
|
|
|
193
192
|
//#endregion
|
|
194
193
|
//#region lib/types/client/settings-store.js
|
|
195
194
|
/**
|
|
196
|
-
* Permission default-settings controller. The
|
|
197
|
-
*
|
|
198
|
-
*
|
|
195
|
+
* Permission default-settings controller. The permission descriptor comes
|
|
196
|
+
* from the shared describe mirror (the dynamic preset enum lives in the
|
|
197
|
+
* namespace schema, which per-namespace scopes do not carry); writes target
|
|
198
|
+
* only `defaultPreset`, carry the descriptor revision, and fold their answer
|
|
199
|
+
* back into the mirror.
|
|
199
200
|
*/
|
|
200
201
|
/** Permission's settings namespace on the host wire. */
|
|
201
202
|
const PERMISSION_SETTINGS_NS = "permission";
|
|
202
203
|
/**
|
|
203
204
|
* Read the dynamic preset enum encoded by the host's `defaultPreset` schema.
|
|
204
205
|
* @param view - permission namespace descriptor.
|
|
206
|
+
* @param schema - settings schema operations.
|
|
205
207
|
* @returns current value and selectable options.
|
|
206
208
|
*/
|
|
207
|
-
function permissionDefaultOf(view) {
|
|
209
|
+
function permissionDefaultOf(view, schema) {
|
|
208
210
|
const value = view.value?.defaultPreset;
|
|
209
211
|
if (typeof value !== "string") throw new Error("permission settings has no defaultPreset value");
|
|
210
|
-
const node =
|
|
212
|
+
const node = schema.nodeAtPath(schema.rehydrate(view.schema), ["defaultPreset"]);
|
|
211
213
|
if (node === void 0) throw new Error("permission settings schema has no defaultPreset field");
|
|
212
214
|
const options = (node.type === "union" ? node.list ?? [] : [node]).flatMap((candidate) => {
|
|
213
215
|
const choice = candidate;
|
|
@@ -224,9 +226,11 @@ window.__ModuleLoader__.load({
|
|
|
224
226
|
options
|
|
225
227
|
};
|
|
226
228
|
}
|
|
227
|
-
/** Controller
|
|
229
|
+
/** Controller deriving the row from the shared mirror and writing the default through it. */
|
|
228
230
|
var PermissionPresetSettingsController = class {
|
|
231
|
+
describeFace;
|
|
229
232
|
api;
|
|
233
|
+
schema;
|
|
230
234
|
/** Row snapshot consumed through a bound selector hook. */
|
|
231
235
|
store = (0, _deepseek_ai_dsh_client_runtime_client.createSnapshotStore)({
|
|
232
236
|
status: "idle",
|
|
@@ -236,53 +240,48 @@ window.__ModuleLoader__.load({
|
|
|
236
240
|
options: [],
|
|
237
241
|
revision: 0
|
|
238
242
|
});
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
+
following;
|
|
244
|
+
saving = false;
|
|
245
|
+
disposed = false;
|
|
246
|
+
/**
|
|
247
|
+
* @param describeFace - the shared mirror's read/fold face (descriptor and schema source).
|
|
248
|
+
* @param api - settings wire face for the `defaultPreset` write.
|
|
249
|
+
* @param schema - settings-owned schema operations.
|
|
250
|
+
*/
|
|
251
|
+
constructor(describeFace, api, schema) {
|
|
252
|
+
this.describeFace = describeFace;
|
|
243
253
|
this.api = api;
|
|
254
|
+
this.schema = schema;
|
|
244
255
|
}
|
|
245
256
|
/**
|
|
246
|
-
*
|
|
247
|
-
* @returns
|
|
257
|
+
* Begin following the mirror (idempotent) and reflect its current answer.
|
|
258
|
+
* @returns settlement once the snapshot reflects the mirror.
|
|
248
259
|
*/
|
|
249
260
|
async load() {
|
|
250
|
-
|
|
261
|
+
if (this.disposed) return;
|
|
262
|
+
this.following ??= this.describeFace.subscribe(() => {
|
|
263
|
+
this.derive();
|
|
264
|
+
});
|
|
251
265
|
this.store.update((state) => {
|
|
252
266
|
state.status = "loading";
|
|
253
267
|
state.error = null;
|
|
254
268
|
});
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
if (!response.result.ok) throw new Error(response.result.error.message);
|
|
258
|
-
if (generation !== this.generation) return;
|
|
259
|
-
const view = response.result.value.namespaces.find((entry) => entry.ns === PERMISSION_SETTINGS_NS);
|
|
260
|
-
if (view === void 0) {
|
|
261
|
-
this.view = void 0;
|
|
262
|
-
this.store.update((state) => {
|
|
263
|
-
state.status = "unavailable";
|
|
264
|
-
state.writable = false;
|
|
265
|
-
state.currentValue = "";
|
|
266
|
-
state.options = [];
|
|
267
|
-
});
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
this.accept(view, response.result.value.writable);
|
|
271
|
-
} catch (error) {
|
|
272
|
-
if (generation !== this.generation) return;
|
|
273
|
-
this.fail(error);
|
|
274
|
-
}
|
|
269
|
+
await this.describeFace.ensure();
|
|
270
|
+
this.derive();
|
|
275
271
|
}
|
|
276
272
|
/**
|
|
277
273
|
* Persist one preset as the default for subsequently created sessions.
|
|
274
|
+
* A selection made while one is already saving is ignored — the row's
|
|
275
|
+
* control is disabled during the save, so this only drops programmatic
|
|
276
|
+
* double-submits rather than user intent.
|
|
278
277
|
* @param preset - advertised preset key.
|
|
279
278
|
* @returns nothing; {@link store} carries success or failure.
|
|
280
279
|
*/
|
|
281
280
|
async select(preset) {
|
|
282
|
-
const view = this.view;
|
|
283
281
|
const state = this.store.getSnapshot();
|
|
284
|
-
|
|
285
|
-
|
|
282
|
+
const view = this.describeFace.getSnapshot().view?.namespaces.find((entry) => entry.ns === PERMISSION_SETTINGS_NS);
|
|
283
|
+
if (view === void 0 || !state.writable || this.saving) return;
|
|
284
|
+
this.saving = true;
|
|
286
285
|
this.store.update((draft) => {
|
|
287
286
|
draft.status = "saving";
|
|
288
287
|
draft.error = null;
|
|
@@ -297,30 +296,62 @@ window.__ModuleLoader__.load({
|
|
|
297
296
|
}],
|
|
298
297
|
expectedRevision: view.revision
|
|
299
298
|
});
|
|
300
|
-
if (generation !== this.generation) return;
|
|
301
299
|
if (!response.result.ok) throw new Error(response.result.error.message);
|
|
302
|
-
this.
|
|
300
|
+
this.saving = false;
|
|
301
|
+
if (this.disposed) return;
|
|
302
|
+
this.describeFace.acceptView(response.result.value);
|
|
303
303
|
} catch (error) {
|
|
304
|
-
|
|
304
|
+
this.saving = false;
|
|
305
|
+
if (this.disposed) return;
|
|
305
306
|
this.fail(error);
|
|
306
307
|
}
|
|
307
308
|
}
|
|
308
|
-
/** Stop
|
|
309
|
+
/** Stop following the mirror; later publishes leave the snapshot alone. */
|
|
309
310
|
dispose() {
|
|
310
|
-
this.
|
|
311
|
-
this.
|
|
311
|
+
this.disposed = true;
|
|
312
|
+
this.following?.();
|
|
313
|
+
this.following = void 0;
|
|
312
314
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
state
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
315
|
+
derive() {
|
|
316
|
+
if (this.disposed || this.saving) return;
|
|
317
|
+
const mirrored = this.describeFace.getSnapshot();
|
|
318
|
+
if (mirrored.status === "unavailable") {
|
|
319
|
+
this.store.update((state) => {
|
|
320
|
+
state.status = "unavailable";
|
|
321
|
+
state.writable = false;
|
|
322
|
+
state.currentValue = "";
|
|
323
|
+
state.options = [];
|
|
324
|
+
});
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (mirrored.view === void 0) {
|
|
328
|
+
if (mirrored.error !== null) this.fail(new Error(mirrored.error));
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const view = mirrored.view.namespaces.find((entry) => entry.ns === PERMISSION_SETTINGS_NS);
|
|
332
|
+
if (view === void 0) {
|
|
333
|
+
this.store.update((state) => {
|
|
334
|
+
state.status = "unavailable";
|
|
335
|
+
state.writable = false;
|
|
336
|
+
state.currentValue = "";
|
|
337
|
+
state.options = [];
|
|
338
|
+
});
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
try {
|
|
342
|
+
const resolved = permissionDefaultOf(view, this.schema);
|
|
343
|
+
const { writable } = mirrored.view;
|
|
344
|
+
this.store.update((state) => {
|
|
345
|
+
state.status = "ready";
|
|
346
|
+
state.error = null;
|
|
347
|
+
state.writable = writable;
|
|
348
|
+
state.currentValue = resolved.currentValue;
|
|
349
|
+
state.options = resolved.options;
|
|
350
|
+
state.revision = view.revision;
|
|
351
|
+
});
|
|
352
|
+
} catch (error) {
|
|
353
|
+
this.fail(error);
|
|
354
|
+
}
|
|
324
355
|
}
|
|
325
356
|
fail(error) {
|
|
326
357
|
this.store.update((state) => {
|
|
@@ -329,14 +360,6 @@ window.__ModuleLoader__.load({
|
|
|
329
360
|
});
|
|
330
361
|
}
|
|
331
362
|
};
|
|
332
|
-
/**
|
|
333
|
-
* Refetch only after the row has opened once.
|
|
334
|
-
* @param controller - permission settings controller.
|
|
335
|
-
*/
|
|
336
|
-
function refreshPermissionIfLoaded(controller) {
|
|
337
|
-
if (controller.store.getSnapshot().status === "idle") return;
|
|
338
|
-
controller.load();
|
|
339
|
-
}
|
|
340
363
|
//#endregion
|
|
341
364
|
//#region lib/types/client/index.js
|
|
342
365
|
/** Required services (cordis fiber inject). */
|
|
@@ -346,7 +369,9 @@ window.__ModuleLoader__.load({
|
|
|
346
369
|
"slots",
|
|
347
370
|
"locale",
|
|
348
371
|
"connection",
|
|
349
|
-
"remote"
|
|
372
|
+
"remote",
|
|
373
|
+
"settingsScope",
|
|
374
|
+
"settingsSchema"
|
|
350
375
|
];
|
|
351
376
|
const ACCESS_NS = "permission.access";
|
|
352
377
|
/** Read one session's current permissions projection value (undefined = capability absent). */
|
|
@@ -401,7 +426,8 @@ window.__ModuleLoader__.load({
|
|
|
401
426
|
zh,
|
|
402
427
|
en
|
|
403
428
|
}), "ui-permission: settings row dictionaries");
|
|
404
|
-
const
|
|
429
|
+
const connection = ctx.get("connection");
|
|
430
|
+
const controller = new PermissionPresetSettingsController(ctx.settingsScope.describe(), connection.api, ctx.settingsSchema);
|
|
405
431
|
const load = () => controller.load();
|
|
406
432
|
const select = (preset) => controller.select(preset);
|
|
407
433
|
const injected = () => ({
|
|
@@ -409,21 +435,9 @@ window.__ModuleLoader__.load({
|
|
|
409
435
|
load,
|
|
410
436
|
select
|
|
411
437
|
});
|
|
412
|
-
ctx.effect(() => {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
};
|
|
416
|
-
const disposers = [ctx.remote.$on("settings/document-updated", (ns) => {
|
|
417
|
-
if (ns !== "permission") return;
|
|
418
|
-
refresh();
|
|
419
|
-
}), ctx.on("connection/reset", () => {
|
|
420
|
-
refresh();
|
|
421
|
-
})];
|
|
422
|
-
return () => {
|
|
423
|
-
controller.dispose();
|
|
424
|
-
for (const dispose of disposers) dispose();
|
|
425
|
-
};
|
|
426
|
-
}, "ui-permission: settings invalidations");
|
|
438
|
+
ctx.effect(() => () => {
|
|
439
|
+
controller.dispose();
|
|
440
|
+
}, "ui-permission: settings row directory");
|
|
427
441
|
ctx.slots.inject("settings.general.item", () => ctx.slots.register({
|
|
428
442
|
name: "settings.general.item",
|
|
429
443
|
id: "permission",
|