@songtonyli/dsh-cli 0.1.16 → 0.1.18

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 (59) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.js +61 -0
  4. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
  5. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +61 -61
  6. package/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +11 -11
  7. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +55 -55
  8. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +182 -182
  9. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
  10. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +151 -151
  11. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
  12. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +76 -76
  13. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
  14. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
  15. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
  16. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +15 -15
  17. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +8 -8
  18. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +13 -13
  19. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +27 -27
  20. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +6 -6
  21. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
  22. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
  23. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +115 -115
  24. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +14 -14
  25. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +40 -40
  26. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +85 -85
  27. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +35 -35
  28. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +61 -61
  29. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/lib/client.js +24 -24
  30. package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/client.js +10 -10
  31. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +41 -41
  32. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +17 -17
  33. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +68 -68
  34. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +12 -12
  35. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +21 -21
  36. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +24 -24
  37. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +18 -18
  38. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
  39. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +19 -19
  40. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +38 -38
  41. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +25 -25
  42. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +70 -70
  43. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +198 -198
  44. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +50 -50
  45. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
  46. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +81 -81
  47. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +25 -25
  48. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.i18n.yaml +2 -2
  49. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +1 -1
  50. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +1 -1
  51. package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +22 -4
  52. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +3 -3
  53. package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-UEJ3Ntqn.js +1511 -0
  54. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
  55. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +126 -32
  56. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +125 -31
  57. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +3125 -356
  58. package/node_modules/@deepseek-ai/dsh-tui-app/lib/startup.js +3 -2
  59. package/package.json +1 -1
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/llm/llm-cursor/README.md
5
- README.md: d46f17251ec89d70165627179d6a41aad2949854
6
- README.zh.md: 2ffacf2c23f090f0c4209b24d8232aa301af8df5
5
+ README.md: ed90bf879f0f0a6e709b6008f0cd16f78e565a48
6
+ README.zh.md: c18c787d2ff6b51945b08213b6738a82fdf28ca3
@@ -82,7 +82,7 @@ Attribution headers required by `LlmAdapter` go on every HTTP/2 request, with Cu
82
82
 
83
83
  #### What the model sees
84
84
 
85
- One rebuilt Cursor `AgentRunRequest`: the system prompt as a root blob, completed turns (user text plus assistant text, thinking, and MCP tool calls with results), the current user action, requested model id, and MCP tool definitions with `providerIdentifier: dsh`. Images are not sent as Cursor selected images. Native Cursor workspace tools are not offered.
85
+ One rebuilt Cursor `AgentRunRequest`: the system prompt as a root blob, completed turns (user text plus assistant text, thinking, and MCP tool calls with results), the current user action, requested model id, and MCP tool definitions with `providerIdentifier: dsh`. Consecutive user-role messages with no assistant between them — the human prompt plus runtime-context snapshots, skill catalogs, and other injected user messages — join in order into that turn's user text, because a Run has one `userMessageAction`. Images are not sent as Cursor selected images. Native Cursor workspace tools are not offered.
86
86
 
87
87
  #### Token effect
88
88
 
@@ -82,7 +82,7 @@ DSH 的每一步模型调用是一次新的 HTTP/2 Connect `Run`,由 harness
82
82
 
83
83
  #### 模型看见什么
84
84
 
85
- 一次重建的 Cursor `AgentRunRequest`:作为根 blob 的系统提示、已完成的轮次(用户文本加上助手文本、thinking,以及带结果的 MCP 工具调用)、当前用户动作、请求的模型 id,以及 `providerIdentifier: dsh` 的 MCP 工具定义。图片不会作为 Cursor 选中图片发送。不提供原生 Cursor 工作区工具。
85
+ 一次重建的 Cursor `AgentRunRequest`:作为根 blob 的系统提示、已完成的轮次(用户文本加上助手文本、thinking,以及带结果的 MCP 工具调用)、当前用户动作、请求的模型 id,以及 `providerIdentifier: dsh` 的 MCP 工具定义。中间没有助手回复的连续 user 角色消息——人类提示加上运行时上下文快照、技能目录和其他注入的用户消息——按顺序拼进该轮的用户文本,因为一次 Run 只有一个 `userMessageAction`。图片不会作为 Cursor 选中图片发送。不提供原生 Cursor 工作区工具。
86
86
 
87
87
  #### Token 影响
88
88
 
@@ -969,6 +969,22 @@ function textOf(message) {
969
969
  return "";
970
970
  }).join("");
971
971
  }
972
+ function joinUserTexts(left, right) {
973
+ if (left.length === 0) return right;
974
+ if (right.length === 0) return left;
975
+ return `${left}\n\n${right}`;
976
+ }
977
+ function appendUserTurn(turns, text) {
978
+ const last = turns[turns.length - 1];
979
+ if (last !== void 0 && last.steps.length === 0) {
980
+ last.userText = joinUserTexts(last.userText, text);
981
+ return;
982
+ }
983
+ turns.push({
984
+ userText: text,
985
+ steps: []
986
+ });
987
+ }
972
988
  function parseArguments(raw) {
973
989
  try {
974
990
  const parsed = JSON.parse(raw);
@@ -1056,6 +1072,11 @@ function createUserMessage(text, selectedContextBlob) {
1056
1072
  }
1057
1073
  /**
1058
1074
  * Split harness messages into completed Cursor turns plus the current user text.
1075
+ *
1076
+ * Consecutive user-role messages with no assistant steps between them join in
1077
+ * order into one Cursor user text. A Run has a single `userMessageAction`, so
1078
+ * runtime-context snapshots and skill catalogs that follow the human prompt
1079
+ * ride that action instead of replacing it.
1059
1080
  * @param options - assembled model request.
1060
1081
  * @returns conversation turns and the new user action text.
1061
1082
  */
@@ -1087,10 +1108,7 @@ function conversationFromOptions(options) {
1087
1108
  continue;
1088
1109
  }
1089
1110
  if (message.role === "user") {
1090
- turns.push({
1091
- userText: textOf(message),
1092
- steps: []
1093
- });
1111
+ appendUserTurn(turns, textOf(message));
1094
1112
  continue;
1095
1113
  }
1096
1114
  if (turns.length === 0) turns.push({
@@ -169,8 +169,8 @@ window.__ModuleLoader__.load({
169
169
  });
170
170
  }
171
171
  //#endregion
172
- //#region \0dsh-css:/Users/songli/deepseek-harness/.worktrees/cursor-subscription/packages/session-query/session-log-export/src/client/HeaderAction.module.css.mjs
173
- const css = ".UeeU3q_moreButton{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:28px;flex:none;justify-content:center;align-items:center;padding:6px;display:inline-flex}.UeeU3q_moreButton svg{width:15px;height:15px}.UeeU3q_moreButton:hover{background:var(--dsw-alias-interactive-bg-hover)}";
172
+ //#region \0dsh-css:/Users/songli/deepseek-harness/packages/session-query/session-log-export/src/client/HeaderAction.module.css.mjs
173
+ const css = ".srMG_G_moreButton{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:28px;flex:none;justify-content:center;align-items:center;padding:6px;display:inline-flex}.srMG_G_moreButton svg{width:15px;height:15px}.srMG_G_moreButton:hover{background:var(--dsw-alias-interactive-bg-hover)}";
174
174
  const tagId = "@deepseek-ai/dsh-session-log-export/HeaderAction.module.css";
175
175
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
176
176
  const tag = document.createElement("style");
@@ -179,7 +179,7 @@ window.__ModuleLoader__.load({
179
179
  tag.textContent = css;
180
180
  document.head.appendChild(tag);
181
181
  }
182
- var HeaderAction_module_css_default = { "moreButton": "UeeU3q_moreButton" };
182
+ var HeaderAction_module_css_default = { "moreButton": "srMG_G_moreButton" };
183
183
  //#endregion
184
184
  //#region lib/types/client/HeaderAction.js
185
185
  /**