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.
Files changed (43) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +6 -6
  3. package/README.zh.md +6 -6
  4. package/THIRD_PARTY_NOTICES.md +387 -1131
  5. package/dist/assets/index-BNMwCG9c.css +1 -0
  6. package/dist/assets/index-CA9Bpko5.js +96 -0
  7. package/dist/assets/langs/{php-D-uCvoST.js → php-DDkx9sim.js} +2 -2
  8. package/dist/assets/langs/{ruby-DEItuUFs.js → ruby-DCxyoPen.js} +2 -2
  9. package/dist/assets/{vendor-Cjbwl5VI.js → vendor-D22_Mp1f.js} +2 -2
  10. package/dist/index.html +26 -5
  11. package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +166 -27
  12. package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +136 -19
  13. package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +51 -12
  14. package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +188 -123
  15. package/dist/plugins/@deepseek-ai/dsh-client-runtime/client.js +43 -8
  16. package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +54 -54
  17. package/dist/plugins/@deepseek-ai/dsh-client-ui-brand-official/client.js +50 -0
  18. package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +46 -17
  19. package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +805 -486
  20. package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +5 -5
  21. package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +82 -26
  22. package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +7 -7
  23. package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +2 -2
  24. package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +18 -18
  25. package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +96 -82
  26. package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +989 -0
  27. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +1177 -67
  28. package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +61 -65
  29. package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +51 -21
  30. package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +12 -12
  31. package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +18 -45
  32. package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +46 -3
  33. package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +102 -62
  34. package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +143 -142
  35. package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +25 -25
  36. package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +261 -86
  37. package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +72 -62
  38. package/package.json +22 -22
  39. package/scripts/legal-files.mjs +2 -1
  40. package/worker/direct/index.js +692 -688
  41. package/worker/isolated/index.js +469 -465
  42. package/dist/assets/index-C-1AiF3k.js +0 -112
  43. package/dist/assets/index-CSGf6Qzd.css +0 -1
@@ -169,8 +169,8 @@ window.__ModuleLoader__.load({
169
169
  document.head.appendChild(tag);
170
170
  }
171
171
  var AgentPresetLabel_module_css_default = {
172
- "label": "SVAs4q_label",
173
- "icon": "SVAs4q_icon"
172
+ "icon": "SVAs4q_icon",
173
+ "label": "SVAs4q_label"
174
174
  };
175
175
  //#endregion
176
176
  //#region lib/types/client/AgentPresetLabel.js
@@ -268,12 +268,12 @@ window.__ModuleLoader__.load({
268
268
  document.head.appendChild(tag);
269
269
  }
270
270
  var AgentPresetRow_module_css_default = {
271
+ "chevron": "_5QVD0a_chevron",
271
272
  "desc": "_5QVD0a_desc",
272
- "selector": "_5QVD0a_selector",
273
+ "row": "_5QVD0a_row",
273
274
  "rowText": "_5QVD0a_rowText",
274
- "chevron": "_5QVD0a_chevron",
275
- "title": "_5QVD0a_title",
276
- "row": "_5QVD0a_row"
275
+ "selector": "_5QVD0a_selector",
276
+ "title": "_5QVD0a_title"
277
277
  };
278
278
  //#endregion
279
279
  //#region lib/types/client/AgentPresetRow.js
@@ -343,17 +343,17 @@ window.__ModuleLoader__.load({
343
343
  document.head.appendChild(tag);
344
344
  }
345
345
  var AgentPresetSeat_module_css_default = {
346
- "seatIcon": "cubgiG_seatIcon",
347
- "introChar": "cubgiG_introChar",
348
346
  "chevron": "cubgiG_chevron",
349
- "itemName": "cubgiG_itemName",
347
+ "introChar": "cubgiG_introChar",
350
348
  "introIcon": "cubgiG_introIcon",
351
- "itemDesc": "cubgiG_itemDesc",
352
- "seat-char-in": "cubgiG_seat-char-in",
349
+ "introText": "cubgiG_introText",
353
350
  "item": "cubgiG_item",
351
+ "itemDesc": "cubgiG_itemDesc",
352
+ "itemName": "cubgiG_itemName",
354
353
  "seat": "cubgiG_seat",
354
+ "seat-char-in": "cubgiG_seat-char-in",
355
355
  "seat-icon-in": "cubgiG_seat-icon-in",
356
- "introText": "cubgiG_introText"
356
+ "seatIcon": "cubgiG_seatIcon"
357
357
  };
358
358
  //#endregion
359
359
  //#region lib/types/client/AgentPresetSeat.js
@@ -607,10 +607,16 @@ window.__ModuleLoader__.load({
607
607
  /** Reads the roster and persists the chosen default. */
608
608
  var AgentPresetSettingsController = class {
609
609
  api;
610
+ describeFace;
610
611
  /** Row snapshot the renderer subscribes to. */
611
612
  store = (0, _deepseek_ai_dsh_client_runtime_client.createSnapshotStore)(INITIAL$2);
612
- constructor(api) {
613
+ /**
614
+ * @param api - the agent-preset and settings wire faces (roster and default write).
615
+ * @param describeFace - the shared mirror's describe face (writability source).
616
+ */
617
+ constructor(api, describeFace) {
613
618
  this.api = api;
619
+ this.describeFace = describeFace;
614
620
  }
615
621
  set(patch) {
616
622
  this.store.set({
@@ -637,21 +643,14 @@ window.__ModuleLoader__.load({
637
643
  });
638
644
  return;
639
645
  }
640
- try {
641
- const described = await this.api.settings.describe({});
642
- this.set({
643
- status: "ready",
644
- error: null,
645
- writable: described.result.ok && described.result.value.writable,
646
- options: presetOptions(presets),
647
- currentValue: presets.find((preset) => preset.isDefault)?.id ?? first.id
648
- });
649
- } catch (error) {
650
- this.set({
651
- status: "error",
652
- error: messageOf(error)
653
- });
654
- }
646
+ await this.describeFace.ensure();
647
+ this.set({
648
+ status: "ready",
649
+ error: null,
650
+ writable: this.describeFace.getSnapshot().view?.writable ?? false,
651
+ options: presetOptions(presets),
652
+ currentValue: presets.find((preset) => preset.isDefault)?.id ?? first.id
653
+ });
655
654
  }
656
655
  /**
657
656
  * Persist one preset as the default for sessions created later. Running
@@ -984,40 +983,40 @@ window.__ModuleLoader__.load({
984
983
  document.head.appendChild(tag);
985
984
  }
986
985
  var AgentPresetSection_module_css_default = {
986
+ "badge": "rtSEdW_badge",
987
987
  "brokenBadge": "rtSEdW_brokenBadge",
988
- "inUse": "rtSEdW_inUse",
989
- "cards": "rtSEdW_cards",
988
+ "card": "rtSEdW_card",
989
+ "cardActive": "rtSEdW_cardActive",
990
+ "cardBroken": "rtSEdW_cardBroken",
991
+ "cardBrokenReason": "rtSEdW_cardBrokenReason",
990
992
  "cardDesc": "rtSEdW_cardDesc",
991
- "fieldLabel": "rtSEdW_fieldLabel",
992
- "dialogFields": "rtSEdW_dialogFields",
993
+ "cardFoot": "rtSEdW_cardFoot",
993
994
  "cardHead": "rtSEdW_cardHead",
994
- "viewerCode": "rtSEdW_viewerCode",
995
- "groupHead": "rtSEdW_groupHead",
996
- "iconDanger": "rtSEdW_iconDanger",
997
- "error": "rtSEdW_error",
998
- "dialog": "rtSEdW_dialog",
999
- "cardActive": "rtSEdW_cardActive",
995
+ "cardId": "rtSEdW_cardId",
1000
996
  "cardMain": "rtSEdW_cardMain",
1001
- "group": "rtSEdW_group",
1002
997
  "cardName": "rtSEdW_cardName",
998
+ "cards": "rtSEdW_cards",
1003
999
  "creatorButton": "rtSEdW_creatorButton",
1004
- "card": "rtSEdW_card",
1005
- "section": "rtSEdW_section",
1006
1000
  "deleteConfirm": "rtSEdW_deleteConfirm",
1007
- "secondaryButton": "rtSEdW_secondaryButton",
1008
- "intro": "rtSEdW_intro",
1009
- "cardBrokenReason": "rtSEdW_cardBrokenReason",
1010
- "title": "rtSEdW_title",
1001
+ "deleteDialog": "rtSEdW_deleteDialog",
1002
+ "dialog": "rtSEdW_dialog",
1003
+ "dialogFields": "rtSEdW_dialogFields",
1004
+ "error": "rtSEdW_error",
1005
+ "field": "rtSEdW_field",
1006
+ "fieldLabel": "rtSEdW_fieldLabel",
1007
+ "group": "rtSEdW_group",
1008
+ "groupHead": "rtSEdW_groupHead",
1011
1009
  "iconButton": "rtSEdW_iconButton",
1010
+ "iconDanger": "rtSEdW_iconDanger",
1011
+ "inUse": "rtSEdW_inUse",
1012
1012
  "input": "rtSEdW_input",
1013
- "badge": "rtSEdW_badge",
1014
- "cardFoot": "rtSEdW_cardFoot",
1015
- "cardId": "rtSEdW_cardId",
1016
- "deleteDialog": "rtSEdW_deleteDialog",
1013
+ "intro": "rtSEdW_intro",
1017
1014
  "revealedPath": "rtSEdW_revealedPath",
1018
- "cardBroken": "rtSEdW_cardBroken",
1019
- "field": "rtSEdW_field",
1020
- "revealedPathLabel": "rtSEdW_revealedPathLabel"
1015
+ "revealedPathLabel": "rtSEdW_revealedPathLabel",
1016
+ "secondaryButton": "rtSEdW_secondaryButton",
1017
+ "section": "rtSEdW_section",
1018
+ "title": "rtSEdW_title",
1019
+ "viewerCode": "rtSEdW_viewerCode"
1021
1020
  };
1022
1021
  //#endregion
1023
1022
  //#region lib/types/client/AgentPresetSection.js
@@ -1557,7 +1556,8 @@ window.__ModuleLoader__.load({
1557
1556
  "slots",
1558
1557
  "locale",
1559
1558
  "connection",
1560
- "remote"
1559
+ "remote",
1560
+ "settingsScope"
1561
1561
  ];
1562
1562
  /**
1563
1563
  * Mount the General-settings row.
@@ -1565,7 +1565,7 @@ window.__ModuleLoader__.load({
1565
1565
  */
1566
1566
  function apply(ctx) {
1567
1567
  const { api } = ctx.get("connection");
1568
- const controller = new AgentPresetSettingsController(api);
1568
+ const controller = new AgentPresetSettingsController(api, ctx.settingsScope.describe());
1569
1569
  const rosterReaders = /* @__PURE__ */ new Set();
1570
1570
  const section = new AgentPresetSectionController(api, () => {
1571
1571
  controller.load();
@@ -0,0 +1,50 @@
1
+ window.__ModuleLoader__.load({
2
+ id: "@deepseek-ai/dsh-client-ui-brand-official",
3
+ factory: (require) => {
4
+ var module = { exports: {} };
5
+ var exports = module.exports;
6
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
9
+ //#region lib/types/client/Brand.js
10
+ /**
11
+ * Render the official mark with the presentation requested by its host surface.
12
+ * @param props - Host-supplied mark presentation.
13
+ * @returns the official whale mark.
14
+ */
15
+ function OfficialBrandMark({ size, className }) {
16
+ return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.FishLogo, {
17
+ size,
18
+ className
19
+ });
20
+ }
21
+ /**
22
+ * Render the official name artwork without its independently slotted mark.
23
+ * @returns the official name wordmark.
24
+ */
25
+ function OfficialBrandName() {
26
+ return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.BrandWordmark, { includeMark: false });
27
+ }
28
+ //#endregion
29
+ //#region lib/types/client/index.js
30
+ /** Required service: the UI slot registry. */
31
+ const inject = ["slots"];
32
+ /**
33
+ * Fill every shipped brand slot as one declaration-aware registration set.
34
+ * @param ctx - Client root context.
35
+ */
36
+ function apply(ctx) {
37
+ ctx.slots.inject("sidebar.brand.mark", () => ctx.slots.inject("sidebar.brand.name", () => ctx.slots.inject("conversation.hero.brand.mark", function* () {
38
+ yield ctx.slots.register({ name: "sidebar.brand.mark" }, OfficialBrandMark);
39
+ yield ctx.slots.register({ name: "sidebar.brand.name" }, OfficialBrandName);
40
+ yield ctx.slots.register({ name: "conversation.hero.brand.mark" }, OfficialBrandMark);
41
+ })));
42
+ }
43
+ //#endregion
44
+ exports.apply = apply;
45
+ exports.inject = inject;
46
+ return module.exports;
47
+ }
48
+ });
49
+
50
+ //# sourceMappingURL=client.js.map
@@ -500,12 +500,17 @@ window.__ModuleLoader__.load({
500
500
  decorations: /* @__PURE__ */ new Map(),
501
501
  popups: /* @__PURE__ */ new Map()
502
502
  };
503
+ /** `command`-namespace translator (composer refusal notices). */
504
+ t;
503
505
  /**
504
506
  * @param ctx - owning root context (plugin fiber; the service registers
505
507
  * itself as `command` and follows that fiber's lifetime).
506
508
  */
507
509
  constructor(ctx) {
508
510
  super(ctx, "commandUi");
511
+ const locale = ctx.get("locale");
512
+ if (locale === void 0) throw new Error("ui-commands: locale service unavailable");
513
+ this.t = locale.bind("command");
509
514
  this.directory = new CommandDirectory(async (sessionId) => {
510
515
  if (this.sessions().subagentAddress(sessionId) !== void 0) return [];
511
516
  const result = await ctx.remote.commands.list(sessionId);
@@ -520,7 +525,7 @@ window.__ModuleLoader__.load({
520
525
  candidates: (session, req) => this.candidates(session, req),
521
526
  onPick: (pick) => this.dispatch(pick),
522
527
  matchSpace: (session, token) => this.matchSpace(session, token),
523
- matchEnter: (session, line, signal) => this.matchEnter(session, line, signal),
528
+ matchEnter: (session, line, signal, envelope) => this.matchEnter(session, line, signal, envelope),
524
529
  warm: (session) => {
525
530
  this.directory.warm(session.sessionId);
526
531
  }
@@ -687,8 +692,14 @@ window.__ModuleLoader__.load({
687
692
  * warmup failure rejects — never a silent downgrade). Contributions and
688
693
  * bare host commands act on the bare token only; leadingInput claims
689
694
  * args-tolerant.
695
+ *
696
+ * Envelope policy: an enter submission carrying images resolves only
697
+ * through a command declaring image acceptance. Every other command route —
698
+ * popup, non-accepting claim, bare detached execute — throws the refusal
699
+ * so the machine surfaces one composer notice and the draft and images
700
+ * stay in place; nothing executes and nothing is dropped.
690
701
  */
691
- async matchEnter(session, line, signal) {
702
+ async matchEnter(session, line, signal, envelope) {
692
703
  const trimmed = line.trim();
693
704
  if (!trimmed.startsWith("/")) return void 0;
694
705
  const ws = trimmed.search(/\s/);
@@ -696,9 +707,13 @@ window.__ModuleLoader__.load({
696
707
  const bare = ws === -1;
697
708
  const name = token.slice(1);
698
709
  if (name === "") return void 0;
710
+ const refuseImages = () => {
711
+ throw new Error(this.t("notice.imagesUnsupported", { command: name }));
712
+ };
699
713
  const contribution = this.live.contributions.get(name);
700
714
  if (contribution !== void 0 && contribution.available(session)) {
701
715
  if (!bare) return void 0;
716
+ if (envelope.images > 0) refuseImages();
702
717
  this.openPopup(name, contribution.ui, session, {
703
718
  via: "enter",
704
719
  token
@@ -711,6 +726,7 @@ window.__ModuleLoader__.load({
711
726
  if (bare) {
712
727
  const decoration = this.live.decorations.get(name);
713
728
  if (decoration !== void 0 && decoration.available(session)) {
729
+ if (envelope.images > 0) refuseImages();
714
730
  this.openPopup(name, decoration.ui, session, {
715
731
  via: "enter",
716
732
  token
@@ -718,8 +734,12 @@ window.__ModuleLoader__.load({
718
734
  return "handled";
719
735
  }
720
736
  }
721
- if (desc.input !== void 0) return { claim: this.leadingClaim(desc, session) };
737
+ if (desc.input !== void 0) {
738
+ if (envelope.images > 0 && desc.input.images !== true) refuseImages();
739
+ return { claim: this.leadingClaim(desc, session) };
740
+ }
722
741
  if (!bare) return void 0;
742
+ if (envelope.images > 0) refuseImages();
723
743
  this.consumeVia(session.sessionId, {
724
744
  via: "enter",
725
745
  token
@@ -739,7 +759,8 @@ window.__ModuleLoader__.load({
739
759
  return {
740
760
  token,
741
761
  ...desc.input !== void 0 ? { hint: desc.input.hint } : {},
742
- submit: (args, _actx) => this.execute(session, token + args)
762
+ ...desc.input?.images === true ? { images: true } : {},
763
+ submit: (args, _actx, images) => this.execute(session, token + args, images)
743
764
  };
744
765
  }
745
766
  /**
@@ -749,16 +770,22 @@ window.__ModuleLoader__.load({
749
770
  * plain success regardless of its handler outcome, because the host
750
771
  * executor durably logged the lifecycle (`command/run`/`command/done`) and
751
772
  * the outcome renders as a persistent flow node — the composer never
752
- * echoes it. Transport failures throw.
773
+ * echoes it. A handler error result reports an error outcome so the
774
+ * composer keeps the submission (draft and images) for correction.
775
+ * Transport failures throw.
753
776
  */
754
- async execute(session, line) {
755
- const result = await this.ctx.remote.commands.execute(session.sessionId, line);
777
+ async execute(session, line, images = []) {
778
+ const result = await this.ctx.remote.commands.execute(session.sessionId, line, images);
756
779
  if (!result.ok) throw new Error(`command.execute failed: ${result.error.code}: ${result.error.message}`);
757
780
  if (result.value === void 0) return {
758
781
  kind: "error",
759
782
  text: `unknown or malformed command: ${line}`
760
783
  };
761
784
  this.notifyExecuted(session.sessionId, submittedCommandName(line), result.value.result);
785
+ if (images.length > 0 && result.value.result.kind === "error") return {
786
+ kind: "error",
787
+ text: result.value.result.text
788
+ };
762
789
  return { kind: "success" };
763
790
  }
764
791
  /** Publish the local acknowledgment without letting an observer change command admission. */
@@ -855,18 +882,18 @@ window.__ModuleLoader__.load({
855
882
  document.head.appendChild(tag);
856
883
  }
857
884
  var PopupSelectView_module_css_default = {
858
- "rowActive": "mufS8W_rowActive",
859
- "label": "mufS8W_label",
860
- "search": "mufS8W_search",
885
+ "card": "mufS8W_card",
886
+ "check": "mufS8W_check",
887
+ "detail": "mufS8W_detail",
861
888
  "error": "mufS8W_error",
862
889
  "errorText": "mufS8W_errorText",
863
- "check": "mufS8W_check",
890
+ "label": "mufS8W_label",
864
891
  "retry": "mufS8W_retry",
865
892
  "row": "mufS8W_row",
866
- "card": "mufS8W_card",
867
- "viewport": "mufS8W_viewport",
868
- "detail": "mufS8W_detail",
869
- "status": "mufS8W_status"
893
+ "rowActive": "mufS8W_rowActive",
894
+ "search": "mufS8W_search",
895
+ "status": "mufS8W_status",
896
+ "viewport": "mufS8W_viewport"
870
897
  };
871
898
  //#endregion
872
899
  //#region lib/types/client/PopupSelectView.js
@@ -1047,7 +1074,8 @@ window.__ModuleLoader__.load({
1047
1074
  "status.applying": "正在应用…",
1048
1075
  "status.empty": "无选项",
1049
1076
  "overlay.aria": "/{command} 选项",
1050
- "listbox.aria": "/{command} 匹配项"
1077
+ "listbox.aria": "/{command} 匹配项",
1078
+ "notice.imagesUnsupported": "/{command} 不接受图片附件,请先移除图片"
1051
1079
  };
1052
1080
  /** English dictionary, checked complete against the zh key set. */
1053
1081
  const en = {
@@ -1057,7 +1085,8 @@ window.__ModuleLoader__.load({
1057
1085
  "status.applying": "Applying…",
1058
1086
  "status.empty": "No options",
1059
1087
  "overlay.aria": "/{command} options",
1060
- "listbox.aria": "/{command} matches"
1088
+ "listbox.aria": "/{command} matches",
1089
+ "notice.imagesUnsupported": "/{command} does not accept image attachments; remove them first"
1061
1090
  };
1062
1091
  //#endregion
1063
1092
  //#region lib/types/client/index.js