dsh-edge 0.9.0 → 0.10.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.
Files changed (56) hide show
  1. package/THIRD_PARTY_NOTICES.md +1318 -1075
  2. package/dist/assets/index-Df-65__b.js +110 -0
  3. package/dist/assets/index-b24khbeK.css +1 -0
  4. package/dist/assets/langs/{php-DDkx9sim.js → php-DJl5gRdb.js} +2 -2
  5. package/dist/assets/langs/{ruby-DCxyoPen.js → ruby-5eNB0pDK.js} +2 -2
  6. package/dist/assets/vendor-BNsW4eBh.css +1 -0
  7. package/dist/assets/vendor-CCJJTK99.js +411 -0
  8. package/dist/index.html +8 -8
  9. package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +1513 -77
  10. package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +3608 -757
  11. package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +2777 -0
  12. package/dist/plugins/@deepseek-ai/dsh-api-workspace-controller/client.js +415 -0
  13. package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +1975 -7466
  14. package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +225 -76
  15. package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +67 -15
  16. package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +270 -460
  17. package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +292 -0
  18. package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +42 -17
  19. package/dist/plugins/@deepseek-ai/dsh-client-ui-brand-official/client.js +7 -9
  20. package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +8177 -0
  21. package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +22 -10
  22. package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +14950 -8910
  23. package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +161 -137
  24. package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +6 -7
  25. package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +268 -40
  26. package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +1 -1
  27. package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +45 -11
  28. package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +30 -58
  29. package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +188 -89
  30. package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +105 -75
  31. package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +650 -188
  32. package/dist/plugins/@deepseek-ai/dsh-client-ui-schedule/client.js +307 -0
  33. package/dist/plugins/@deepseek-ai/dsh-client-ui-session/client.js +340 -0
  34. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +57 -50
  35. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +134 -69
  36. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +575 -442
  37. package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +24 -11
  38. package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +13 -9
  39. package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +44 -20
  40. package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +265 -94
  41. package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +899 -433
  42. package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +1472 -613
  43. package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +249 -95
  44. package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +5 -5
  45. package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +425 -146
  46. package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +29 -14
  47. package/dist/plugins/dsh-edge-client-ui/client.js +28 -26
  48. package/package.json +62 -58
  49. package/scripts/verify-packed.mjs +1 -1
  50. package/worker/direct/index.js +2866 -1466
  51. package/worker/isolated/index.js +2438 -1038
  52. package/dist/assets/index-C6eRlFa6.css +0 -1
  53. package/dist/assets/index-ClqxG24t.js +0 -96
  54. package/dist/assets/vendor-CjyC-hUb.css +0 -1
  55. package/dist/assets/vendor-D22_Mp1f.js +0 -411
  56. package/dist/plugins/@deepseek-ai/dsh-client-runtime/client.js +0 -10574
@@ -7,10 +7,75 @@ window.__ModuleLoader__.load({
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let react = require("react");
9
9
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
10
- let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
10
+ let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
11
+ //#region lib/types/client/locales.js
12
+ /** `settings.permission` namespace dictionaries (the Permission row's copy). */
13
+ /** Simplified Chinese dictionary (the key-set source of truth). */
14
+ const zh = {
15
+ "title": "权限",
16
+ "description": "选择新会话的默认权限模式",
17
+ "loading": "加载中",
18
+ "unavailable": "不可用",
19
+ "preset.readOnly": "仅可查看",
20
+ "preset.workspaceWrite": "工作区内修改",
21
+ "preset.fullAccess": "完全权限",
22
+ "confirm.title": "确认启用完全权限?",
23
+ "confirm.description": "启用完全权限后,新会话将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任后续任务时使用。",
24
+ "confirm.acknowledge": "我已了解风险,并愿意继续",
25
+ "confirm.cancel": "取消",
26
+ "confirm.enable": "启用完全权限"
27
+ };
28
+ /** English dictionary, checked complete against the zh key set. */
29
+ const en = {
30
+ "title": "Permission",
31
+ "description": "Choose the default permission mode for new sessions",
32
+ "loading": "Loading",
33
+ "unavailable": "Unavailable",
34
+ "preset.readOnly": "Read Only",
35
+ "preset.workspaceWrite": "Workspace Write",
36
+ "preset.fullAccess": "Full access",
37
+ "confirm.title": "Enable Full access?",
38
+ "confirm.description": "Full access lets new sessions reduce confirmation steps and perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust subsequent tasks.",
39
+ "confirm.acknowledge": "I understand the risks and want to continue",
40
+ "confirm.cancel": "Cancel",
41
+ "confirm.enable": "Enable Full access"
42
+ };
43
+ /** Simplified Chinese dictionary for the current-session popup gate. */
44
+ const accessZh = {
45
+ "preset.readOnly": "仅可查看",
46
+ "preset.workspaceWrite": "工作区内修改",
47
+ "preset.fullAccess": "完全权限",
48
+ "confirm.title": "确认启用完全权限?",
49
+ "confirm.description": "启用完全权限后,智能体将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。",
50
+ "confirm.acknowledge": "我已了解风险,并愿意继续",
51
+ "confirm.cancel": "取消",
52
+ "confirm.enable": "启用完全权限"
53
+ };
54
+ /** English dictionary for the current-session popup gate. */
55
+ const accessEn = {
56
+ "preset.readOnly": "Read Only",
57
+ "preset.workspaceWrite": "Workspace Write",
58
+ "preset.fullAccess": "Full access",
59
+ "confirm.title": "Enable Full access?",
60
+ "confirm.description": "Full access reduces confirmation steps and lets the agent perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust the current task.",
61
+ "confirm.acknowledge": "I understand the risks and want to continue",
62
+ "confirm.cancel": "Cancel",
63
+ "confirm.enable": "Enable Full access"
64
+ };
65
+ //#endregion
11
66
  //#region lib/types/client/presentation.js
12
67
  /** Machine value of the preset that requires an explicit GUI risk gate. */
13
68
  const FULL_ACCESS_PRESET = "danger-full-access";
69
+ const PRESET_LABEL_KEYS = new Map([
70
+ ["read-only", "preset.readOnly"],
71
+ ["workspace-write", "preset.workspaceWrite"],
72
+ [FULL_ACCESS_PRESET, "preset.fullAccess"]
73
+ ]);
74
+ const DEFAULT_PRESET_LABELS = {
75
+ "preset.readOnly": en["preset.readOnly"],
76
+ "preset.workspaceWrite": en["preset.workspaceWrite"],
77
+ "preset.fullAccess": en["preset.fullAccess"]
78
+ };
14
79
  /**
15
80
  * Convert conventional kebab-case preset names into user-facing title case.
16
81
  * @param name - host-supplied preset label or key.
@@ -24,14 +89,17 @@ window.__ModuleLoader__.load({
24
89
  * Render a permission preset under its product label.
25
90
  * @param value - preset machine value.
26
91
  * @param name - host-supplied preset name.
27
- * @returns the Full access product label or the conventional display name.
92
+ * @param t - optional locale dictionary lookup for built-in product labels.
93
+ * @returns the built-in product label or the conventional display name.
28
94
  */
29
- function displayPermissionPreset(value, name) {
30
- return value === "danger-full-access" ? "Full access" : displayPresetName(name);
95
+ function displayPermissionPreset(value, name, t) {
96
+ const key = PRESET_LABEL_KEYS.get(value);
97
+ if (key !== void 0 && (name === value || name === DEFAULT_PRESET_LABELS[key])) return t?.(key) ?? DEFAULT_PRESET_LABELS[key];
98
+ return displayPresetName(name);
31
99
  }
32
100
  //#endregion
33
101
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-permission-presets/src/client/PermissionRow.module.css.mjs
34
- const css = ".oY77xG_row{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.oY77xG_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.oY77xG_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.oY77xG_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.oY77xG_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.oY77xG_selector:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.oY77xG_selector:disabled{cursor:default}.oY77xG_chevron{flex:none}";
102
+ const css = ".oY77xG_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.oY77xG_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.oY77xG_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.oY77xG_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.oY77xG_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.oY77xG_selector:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.oY77xG_selector:disabled{cursor:default}.oY77xG_chevron{flex:none}";
35
103
  const tagId = "@deepseek-ai/dsh-client-ui-permission-presets/PermissionRow.module.css";
36
104
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
37
105
  const tag = document.createElement("style");
@@ -77,7 +145,8 @@ window.__ModuleLoader__.load({
77
145
  if (state.status === "unavailable") return null;
78
146
  const selected = state.options.find((option) => option.id === state.currentValue);
79
147
  const busy = state.status === "loading" || state.status === "saving" || confirmingFullAccess;
80
- const label = selected?.label ?? (busy ? t("loading") : t("unavailable"));
148
+ const optionLabel = (option) => displayPermissionPreset(option.id, option.label, t);
149
+ const label = selected !== void 0 ? optionLabel(selected) : busy ? t("loading") : t("unavailable");
81
150
  const description = state.error ?? t("description");
82
151
  return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
83
152
  className: PermissionRow_module_css_default.row,
@@ -98,7 +167,7 @@ window.__ModuleLoader__.load({
98
167
  },
99
168
  items: state.options.map((option) => ({
100
169
  id: option.id,
101
- label: option.label
170
+ label: optionLabel(option)
102
171
  })),
103
172
  selectedId: state.currentValue,
104
173
  onSelect: (id) => {
@@ -131,6 +200,7 @@ window.__ModuleLoader__.load({
131
200
  description: t("confirm.description"),
132
201
  acknowledgeLabel: t("confirm.acknowledge"),
133
202
  cancelLabel: t("confirm.cancel"),
203
+ closeLabel: t("close"),
134
204
  confirmLabel: t("confirm.enable"),
135
205
  acknowledged,
136
206
  disabled: !state.writable || state.status === "saving",
@@ -147,49 +217,6 @@ window.__ModuleLoader__.load({
147
217
  })] });
148
218
  }
149
219
  //#endregion
150
- //#region lib/types/client/locales.js
151
- /** `settings.permission` namespace dictionaries (the Permission row's copy). */
152
- /** Simplified Chinese dictionary (the key-set source of truth). */
153
- const zh = {
154
- "title": "权限",
155
- "description": "选择新会话的默认权限模式",
156
- "loading": "加载中",
157
- "unavailable": "不可用",
158
- "confirm.title": "确认启用 Full access?",
159
- "confirm.description": "启用 Full access 后,新会话将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任后续任务时使用。",
160
- "confirm.acknowledge": "我已了解风险,并愿意继续",
161
- "confirm.cancel": "取消",
162
- "confirm.enable": "启用 Full access"
163
- };
164
- /** English dictionary, checked complete against the zh key set. */
165
- const en = {
166
- "title": "Permission",
167
- "description": "Choose the default permission mode for new sessions",
168
- "loading": "Loading",
169
- "unavailable": "Unavailable",
170
- "confirm.title": "Enable Full access?",
171
- "confirm.description": "Full access lets new sessions reduce confirmation steps and perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust subsequent tasks.",
172
- "confirm.acknowledge": "I understand the risks and want to continue",
173
- "confirm.cancel": "Cancel",
174
- "confirm.enable": "Enable Full access"
175
- };
176
- /** Simplified Chinese dictionary for the current-session popup gate. */
177
- const accessZh = {
178
- "confirm.title": "确认启用 Full access?",
179
- "confirm.description": "启用 Full access 后,agent 将减少确认步骤,并且可以直接执行更多操作,包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。",
180
- "confirm.acknowledge": "我已了解风险,并愿意继续",
181
- "confirm.cancel": "取消",
182
- "confirm.enable": "启用 Full access"
183
- };
184
- /** English dictionary for the current-session popup gate. */
185
- const accessEn = {
186
- "confirm.title": "Enable Full access?",
187
- "confirm.description": "Full access reduces confirmation steps and lets the agent perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust the current task.",
188
- "confirm.acknowledge": "I understand the risks and want to continue",
189
- "confirm.cancel": "Cancel",
190
- "confirm.enable": "Enable Full access"
191
- };
192
- //#endregion
193
220
  //#region lib/types/client/settings-store.js
194
221
  /**
195
222
  * Permission default-settings controller. The permission descriptor comes
@@ -229,10 +256,10 @@ window.__ModuleLoader__.load({
229
256
  /** Controller deriving the row from the shared mirror and writing the default through it. */
230
257
  var PermissionPresetSettingsController = class {
231
258
  describeFace;
232
- api;
259
+ ctx;
233
260
  schema;
234
261
  /** Row snapshot consumed through a bound selector hook. */
235
- store = (0, _deepseek_ai_dsh_client_runtime_client.createSnapshotStore)({
262
+ store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
236
263
  status: "idle",
237
264
  error: null,
238
265
  writable: false,
@@ -245,12 +272,13 @@ window.__ModuleLoader__.load({
245
272
  disposed = false;
246
273
  /**
247
274
  * @param describeFace - the shared mirror's read/fold face (descriptor and schema source).
248
- * @param api - settings wire face for the `defaultPreset` write.
275
+ * @param ctx - the row plugin's context, whose `remote.settings` namespace
276
+ * carries the `defaultPreset` write.
249
277
  * @param schema - settings-owned schema operations.
250
278
  */
251
- constructor(describeFace, api, schema) {
279
+ constructor(describeFace, ctx, schema) {
252
280
  this.describeFace = describeFace;
253
- this.api = api;
281
+ this.ctx = ctx;
254
282
  this.schema = schema;
255
283
  }
256
284
  /**
@@ -286,25 +314,22 @@ window.__ModuleLoader__.load({
286
314
  draft.status = "saving";
287
315
  draft.error = null;
288
316
  });
317
+ let response;
289
318
  try {
290
- const response = await this.api.settings.mutate({
291
- ns: PERMISSION_SETTINGS_NS,
292
- ops: [{
293
- op: "set",
294
- path: ["defaultPreset"],
295
- value: preset
296
- }],
297
- expectedRevision: view.revision
298
- });
299
- if (!response.result.ok) throw new Error(response.result.error.message);
300
- this.saving = false;
301
- if (this.disposed) return;
302
- this.describeFace.acceptView(response.result.value);
303
- } catch (error) {
319
+ response = await this.ctx.remote.settings.mutate(PERMISSION_SETTINGS_NS, [{
320
+ op: "set",
321
+ path: ["defaultPreset"],
322
+ value: preset
323
+ }], view.revision);
324
+ } finally {
304
325
  this.saving = false;
305
- if (this.disposed) return;
306
- this.fail(error);
307
326
  }
327
+ if (this.disposed) return;
328
+ if (!response.ok) {
329
+ this.fail(response.error);
330
+ return;
331
+ }
332
+ this.describeFace.acceptView(response.value);
308
333
  }
309
334
  /** Stop following the mirror; later publishes leave the snapshot alone. */
310
335
  dispose() {
@@ -368,8 +393,8 @@ window.__ModuleLoader__.load({
368
393
  "sessions",
369
394
  "slots",
370
395
  "locale",
371
- "connection",
372
396
  "remote",
397
+ "remote.settings",
373
398
  "settingsScope",
374
399
  "settingsSchema"
375
400
  ];
@@ -382,7 +407,7 @@ window.__ModuleLoader__.load({
382
407
  function optionsOf(value, t) {
383
408
  return value.options.filter((option) => option.value !== "custom").map((option) => ({
384
409
  id: option.value,
385
- label: displayPermissionPreset(option.value, option.name),
410
+ label: displayPermissionPreset(option.value, option.name, t),
386
411
  ...option.description !== void 0 ? { detail: option.description } : {},
387
412
  ...option.value === value.currentValue ? { active: true } : {},
388
413
  ...option.value === "danger-full-access" ? { confirmation: {
@@ -404,12 +429,18 @@ window.__ModuleLoader__.load({
404
429
  const sessions = ctx.sessions;
405
430
  ctx.effect(() => {
406
431
  const disposers = [ctx.locale.register(ACCESS_NS, "zh", {
432
+ "preset.readOnly": accessZh["preset.readOnly"],
433
+ "preset.workspaceWrite": accessZh["preset.workspaceWrite"],
434
+ "preset.fullAccess": accessZh["preset.fullAccess"],
407
435
  "confirm.title": accessZh["confirm.title"],
408
436
  "confirm.description": accessZh["confirm.description"],
409
437
  "confirm.acknowledge": accessZh["confirm.acknowledge"],
410
438
  "confirm.cancel": accessZh["confirm.cancel"],
411
439
  "confirm.enable": accessZh["confirm.enable"]
412
440
  }), ctx.locale.register(ACCESS_NS, "en", {
441
+ "preset.readOnly": accessEn["preset.readOnly"],
442
+ "preset.workspaceWrite": accessEn["preset.workspaceWrite"],
443
+ "preset.fullAccess": accessEn["preset.fullAccess"],
413
444
  "confirm.title": accessEn["confirm.title"],
414
445
  "confirm.description": accessEn["confirm.description"],
415
446
  "confirm.acknowledge": accessEn["confirm.acknowledge"],
@@ -426,8 +457,7 @@ window.__ModuleLoader__.load({
426
457
  zh,
427
458
  en
428
459
  }), "ui-permission: settings row dictionaries");
429
- const connection = ctx.get("connection");
430
- const controller = new PermissionPresetSettingsController(ctx.settingsScope.describe(), connection.api, ctx.settingsSchema);
460
+ const controller = new PermissionPresetSettingsController(ctx.settingsScope.describe(), ctx, ctx.settingsSchema);
431
461
  const load = () => controller.load();
432
462
  const select = (preset) => controller.select(preset);
433
463
  const injected = () => ({