@songtonyli/dsh-cli 0.1.53 → 0.1.55

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 (1001) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +28 -0
  4. package/node_modules/@anthropic-ai/sdk/client.js +2 -1
  5. package/node_modules/@anthropic-ai/sdk/client.mjs +2 -1
  6. package/node_modules/@anthropic-ai/sdk/core/streaming.js +4 -2
  7. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +4 -2
  8. package/node_modules/@anthropic-ai/sdk/package.json +1 -1
  9. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js +25 -10
  10. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs +25 -10
  11. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.js +5 -2
  12. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.mjs +5 -2
  13. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js +10 -4
  14. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs +10 -4
  15. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js +40 -16
  16. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs +40 -16
  17. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js +25 -10
  18. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs +25 -10
  19. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js +30 -12
  20. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs +30 -12
  21. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js +20 -8
  22. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs +20 -8
  23. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +22 -9
  24. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +22 -9
  25. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js +25 -10
  26. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs +25 -10
  27. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js +30 -12
  28. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs +30 -12
  29. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js +15 -6
  30. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs +15 -6
  31. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +25 -11
  32. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +25 -11
  33. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +4 -2
  34. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +4 -2
  35. package/node_modules/@anthropic-ai/sdk/resources/beta/models.js +10 -4
  36. package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +10 -4
  37. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js +15 -6
  38. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs +15 -6
  39. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.js +25 -10
  40. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.mjs +25 -10
  41. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js +30 -12
  42. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs +30 -12
  43. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js +10 -4
  44. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs +10 -4
  45. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js +15 -6
  46. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs +15 -6
  47. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js +20 -8
  48. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs +20 -8
  49. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js +22 -9
  50. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs +22 -9
  51. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js +20 -8
  52. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs +20 -8
  53. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js +30 -12
  54. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs +30 -12
  55. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js +35 -14
  56. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs +35 -14
  57. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.js +30 -12
  58. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.mjs +30 -12
  59. package/node_modules/@anthropic-ai/sdk/resources/completions.js +5 -2
  60. package/node_modules/@anthropic-ai/sdk/resources/completions.mjs +5 -2
  61. package/node_modules/@anthropic-ai/sdk/resources/files.js +79 -10
  62. package/node_modules/@anthropic-ai/sdk/resources/files.mjs +79 -10
  63. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +52 -13
  64. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +52 -13
  65. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +10 -4
  66. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +10 -4
  67. package/node_modules/@anthropic-ai/sdk/resources/models.js +23 -4
  68. package/node_modules/@anthropic-ai/sdk/resources/models.mjs +23 -4
  69. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js +64 -8
  70. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs +64 -8
  71. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js +67 -7
  72. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs +67 -7
  73. package/node_modules/@anthropic-ai/sdk/src/client.ts +12 -1
  74. package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +4 -2
  75. package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/agents.ts +75 -10
  76. package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/versions.ts +15 -2
  77. package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployment-runs.ts +30 -4
  78. package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployments.ts +120 -16
  79. package/node_modules/@anthropic-ai/sdk/src/resources/beta/dreams.ts +75 -10
  80. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/environments.ts +90 -12
  81. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/work.ts +60 -8
  82. package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +75 -11
  83. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memories.ts +75 -10
  84. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-stores.ts +90 -12
  85. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-versions.ts +49 -10
  86. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +85 -11
  87. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +24 -2
  88. package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +30 -4
  89. package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/compliance-settings.ts +12 -2
  90. package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/index.ts +2 -0
  91. package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/organization.ts +4 -0
  92. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/events.ts +45 -6
  93. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/resources.ts +75 -10
  94. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/sessions.ts +90 -12
  95. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/events.ts +30 -4
  96. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/threads.ts +45 -6
  97. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/skills.ts +60 -8
  98. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/versions.ts +72 -9
  99. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/certificates.ts +60 -8
  100. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/tunnels.ts +90 -12
  101. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/credentials.ts +105 -14
  102. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/vaults.ts +90 -12
  103. package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +15 -2
  104. package/node_modules/@anthropic-ai/sdk/src/resources/files.ts +161 -18
  105. package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +5 -0
  106. package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +137 -13
  107. package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +4 -0
  108. package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +38 -4
  109. package/node_modules/@anthropic-ai/sdk/src/resources/models.ts +43 -4
  110. package/node_modules/@anthropic-ai/sdk/src/resources/skills/index.ts +2 -0
  111. package/node_modules/@anthropic-ai/sdk/src/resources/skills/skills.ts +127 -13
  112. package/node_modules/@anthropic-ai/sdk/src/resources/skills/versions.ts +115 -11
  113. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/fs-util.ts +16 -4
  114. package/node_modules/@anthropic-ai/sdk/src/version.ts +1 -1
  115. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js +14 -4
  116. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs +14 -4
  117. package/node_modules/@anthropic-ai/sdk/version.js +1 -1
  118. package/node_modules/@anthropic-ai/sdk/version.mjs +1 -1
  119. package/node_modules/@aws-sdk/client-bedrock-runtime/README.md +7 -0
  120. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +2419 -185
  121. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/BedrockRuntime.js +2 -0
  122. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commandBuilder.js +14 -0
  123. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ApplyGuardrailCommand.js +2 -14
  124. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ConverseCommand.js +2 -14
  125. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ConverseStreamCommand.js +2 -18
  126. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/CountTokensCommand.js +2 -14
  127. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/GetAsyncInvokeCommand.js +2 -14
  128. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeGuardrailChecksCommand.js +4 -0
  129. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelCommand.js +2 -14
  130. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelWithBidirectionalStreamCommand.js +2 -27
  131. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelWithResponseStreamCommand.js +2 -18
  132. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ListAsyncInvokesCommand.js +2 -14
  133. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/StartAsyncInvokeCommand.js +2 -14
  134. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/index.js +1 -0
  135. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/index.js +2 -1
  136. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/enums.js +51 -0
  137. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.browser.js +0 -2
  138. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.js +1 -2
  139. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.native.js +0 -2
  140. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.shared.js +2 -0
  141. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/schemas/schemas_0.js +244 -31
  142. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +43 -45
  143. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +34 -32
  144. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +8 -4
  145. package/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -4
  146. package/node_modules/@aws-sdk/token-providers/package.json +31 -31
  147. package/node_modules/@deepseek-ai/dsh/README.i18n.yaml +4 -4
  148. package/node_modules/@deepseek-ai/dsh/README.md +3 -1
  149. package/node_modules/@deepseek-ai/dsh/README.zh.md +3 -1
  150. package/node_modules/@deepseek-ai/dsh/lib/bin.js +12 -8
  151. package/node_modules/@deepseek-ai/dsh/lib/{plugin-DkYIj96-.js → plugin-BGnVfe_D.js} +26 -8
  152. package/node_modules/@deepseek-ai/dsh/package.json +111 -111
  153. package/node_modules/@deepseek-ai/dsh-acp/package.json +22 -22
  154. package/node_modules/@deepseek-ai/dsh-acp-app/package.json +3 -3
  155. package/node_modules/@deepseek-ai/dsh-agent/package.json +20 -20
  156. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +7 -7
  157. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +22 -22
  158. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +24 -24
  159. package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +6 -6
  160. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +2 -2
  161. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +1 -1
  162. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +28 -28
  163. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +8 -8
  164. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +5 -5
  165. package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +7 -7
  166. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +9 -9
  167. package/node_modules/@deepseek-ai/dsh-api-gateway/README.i18n.yaml +2 -2
  168. package/node_modules/@deepseek-ai/dsh-api-gateway/README.md +2 -0
  169. package/node_modules/@deepseek-ai/dsh-api-gateway/README.zh.md +2 -0
  170. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/index.js +9 -0
  171. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/index.js +12 -0
  172. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +11 -11
  173. package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +10 -10
  174. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +260 -20
  175. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +2 -1
  176. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +41 -41
  177. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +160 -4
  178. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +120 -0
  179. package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +69 -69
  180. package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +13 -13
  181. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.i18n.yaml +2 -2
  182. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.md +1 -1
  183. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.zh.md +1 -1
  184. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/index.js +13 -7
  185. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +1 -1
  186. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/shells.js +14 -8
  187. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +17 -17
  188. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +18 -18
  189. package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +12 -12
  190. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +9 -9
  191. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-attachment/package.json +3 -3
  193. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +6 -6
  194. package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
  195. package/node_modules/@deepseek-ai/dsh-base/package.json +93 -93
  196. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +8 -8
  197. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +12 -12
  198. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +10 -10
  201. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +1 -1
  202. package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
  203. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +4 -4
  204. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
  205. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +5 -5
  206. package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +11 -11
  207. package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
  208. package/node_modules/@deepseek-ai/dsh-client-shortcuts/README.i18n.yaml +2 -2
  209. package/node_modules/@deepseek-ai/dsh-client-shortcuts/README.md +1 -1
  210. package/node_modules/@deepseek-ai/dsh-client-shortcuts/README.zh.md +1 -1
  211. package/node_modules/@deepseek-ai/dsh-client-shortcuts/lib/client.js +12 -7
  212. package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +8 -8
  213. package/node_modules/@deepseek-ai/dsh-client-store/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.i18n.yaml +2 -2
  215. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.md +1 -1
  216. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.zh.md +1 -1
  217. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +9 -20
  218. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +16 -16
  219. package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
  220. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +9 -9
  221. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +4 -4
  222. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +9 -9
  223. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +8 -3
  224. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +7 -2
  225. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +90 -126
  226. package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +37 -37
  227. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.i18n.yaml +4 -4
  228. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.md +7 -1
  229. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.zh.md +7 -1
  230. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +111 -50
  231. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +15 -15
  232. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +14 -1
  233. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +33 -33
  234. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +12 -12
  235. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.i18n.yaml +2 -2
  236. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.md +1 -1
  237. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +1 -1
  238. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +3 -3
  239. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +27 -27
  240. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
  241. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +3 -3
  242. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
  243. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +12 -12
  244. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
  245. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
  246. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +16 -16
  247. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +6 -6
  248. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +9 -3
  249. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +9 -3
  250. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +216 -63
  251. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
  252. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.i18n.yaml +6 -6
  253. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.md +3 -3
  254. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +3 -3
  255. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +37 -23
  256. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +19 -18
  257. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +15 -15
  258. package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.i18n.yaml +2 -2
  259. package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.md +1 -1
  260. package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.zh.md +1 -1
  261. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +4 -4
  262. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +20 -20
  263. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +4 -4
  264. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +2 -2
  265. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +2 -2
  266. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +82 -101
  267. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +16 -16
  268. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.i18n.yaml +4 -4
  269. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.md +10 -3
  270. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.zh.md +10 -3
  271. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DisclosureRow.module.css +14 -2
  272. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/MenuGroup.module.css +37 -0
  273. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +349 -226
  274. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DisclosureRow.d.ts +1 -1
  275. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Input.d.ts +4 -3
  276. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/MenuGroup.d.ts +22 -0
  277. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/index.d.ts +1 -0
  278. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +4 -4
  279. package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +13 -13
  280. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/lib/client.js +1 -1
  281. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
  282. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +19 -19
  283. package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +8 -8
  284. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +6 -6
  285. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.i18n.yaml +2 -2
  286. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.md +1 -1
  287. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.zh.md +1 -1
  288. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +11 -15
  289. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +16 -16
  290. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +9 -9
  291. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +2 -2
  292. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +1 -1
  293. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +1 -1
  294. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +7 -7
  295. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +13 -13
  296. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
  297. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +12 -12
  298. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +6 -6
  299. package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +9 -9
  300. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +9 -9
  301. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +7 -7
  302. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +9 -9
  303. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +9 -9
  304. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/README.i18n.yaml +2 -2
  305. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/README.md +1 -1
  306. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/README.zh.md +1 -1
  307. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/lib/client.js +1 -1
  308. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +10 -10
  309. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +2 -2
  310. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +1 -1
  311. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +1 -1
  312. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +10 -15
  313. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +12 -12
  314. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +11 -11
  315. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +18 -18
  316. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.i18n.yaml +2 -2
  317. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.md +1 -1
  318. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.zh.md +1 -1
  319. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +9 -4
  320. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +14 -14
  321. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.i18n.yaml +6 -6
  322. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.md +4 -4
  323. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.zh.md +4 -4
  324. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +183 -156
  325. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -15
  326. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +15 -15
  327. package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.i18n.yaml +2 -2
  328. package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.md +1 -1
  329. package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.zh.md +1 -1
  330. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  331. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +13 -13
  332. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +3 -3
  333. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +17 -17
  334. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +8 -8
  335. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +5 -3
  336. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +5 -3
  337. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +6 -6
  338. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/index.js +4 -4
  339. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +11 -11
  340. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +9 -6
  341. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +12 -2
  342. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +12 -2
  343. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +304 -54
  344. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +24 -23
  345. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +16 -16
  346. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.i18n.yaml +26 -20
  347. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.md +37 -13
  348. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.zh.md +37 -13
  349. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1257 -218
  350. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +23 -19
  351. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.i18n.yaml +2 -2
  352. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.md +1 -1
  353. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.zh.md +1 -1
  354. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  355. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +14 -14
  356. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +2 -2
  357. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +1 -1
  358. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +1 -1
  359. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +3 -2
  360. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +24 -24
  361. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  362. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +8 -8
  363. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +11 -11
  364. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +11 -11
  365. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +1 -1
  366. package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
  367. package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
  368. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +22 -22
  369. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +16 -16
  370. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +13 -13
  371. package/node_modules/@deepseek-ai/dsh-config-editor/package.json +6 -6
  372. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +59 -4
  373. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +6 -6
  374. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/README.i18n.yaml +5 -2
  375. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/README.md +8 -0
  376. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/README.zh.md +8 -0
  377. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/index.js +58 -20
  378. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +18 -18
  379. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.remote-client.js +12 -12
  380. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/index.js +5 -3
  381. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/inspect-registry.js +62 -17
  382. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +17 -16
  383. package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
  384. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +9 -9
  385. package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +7 -7
  386. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +9 -9
  387. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +1 -1
  388. package/node_modules/@deepseek-ai/dsh-deque/package.json +1 -1
  389. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +21 -21
  390. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +4 -4
  391. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +5 -5
  392. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.i18n.yaml +2 -2
  393. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.md +1 -1
  394. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.zh.md +1 -1
  395. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/cordis.patch.yml +3 -0
  396. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/lib/index.js +11 -5
  397. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +39 -35
  398. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +22 -22
  399. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +31 -31
  400. package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/package.json +4 -4
  401. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +6 -6
  402. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +7 -7
  403. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +22 -22
  404. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +5 -5
  405. package/node_modules/@deepseek-ai/dsh-file-reference/package.json +3 -3
  406. package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +9 -9
  407. package/node_modules/@deepseek-ai/dsh-fs/package.json +9 -9
  408. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +4 -4
  409. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +4 -4
  410. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +10 -10
  411. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +1 -1
  412. package/node_modules/@deepseek-ai/dsh-goal/package.json +22 -22
  413. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +15 -15
  414. package/node_modules/@deepseek-ai/dsh-headless/package.json +17 -17
  415. package/node_modules/@deepseek-ai/dsh-hmr/README.i18n.yaml +2 -2
  416. package/node_modules/@deepseek-ai/dsh-hmr/README.md +1 -0
  417. package/node_modules/@deepseek-ai/dsh-hmr/README.zh.md +1 -0
  418. package/node_modules/@deepseek-ai/dsh-hmr/package.json +6 -6
  419. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  420. package/node_modules/@deepseek-ai/dsh-hook-protocol/package.json +7 -7
  421. package/node_modules/@deepseek-ai/dsh-hooks-claude-code/package.json +20 -20
  422. package/node_modules/@deepseek-ai/dsh-hooks-codex/package.json +18 -18
  423. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  424. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +13 -13
  425. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +2 -2
  426. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +3 -3
  427. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +6 -6
  428. package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +5 -5
  429. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +9 -9
  430. package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +4 -4
  431. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  432. package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +2 -2
  433. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  434. package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
  435. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +11 -11
  436. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  437. package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +1 -1
  438. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +1 -1
  439. package/node_modules/@deepseek-ai/dsh-llm/package.json +8 -8
  440. package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +20 -20
  441. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +37 -37
  442. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +10 -10
  443. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +9 -9
  444. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +4 -4
  445. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +3 -3
  446. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +3 -3
  447. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +10 -6
  448. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +22 -22
  449. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +21 -21
  450. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +20 -20
  451. package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +12 -12
  452. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +14 -14
  453. package/node_modules/@deepseek-ai/dsh-native-command/package.json +2 -2
  454. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +10 -10
  455. package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +6 -6
  456. package/node_modules/@deepseek-ai/dsh-otel/package.json +3 -3
  457. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  458. package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +1 -1
  459. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +1 -1
  460. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +20 -20
  461. package/node_modules/@deepseek-ai/dsh-persona/package.json +4 -4
  462. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +22 -22
  463. package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +27 -27
  464. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +13 -13
  465. package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +3 -3
  466. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +20 -20
  467. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +8 -8
  468. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +12 -12
  469. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +9 -9
  470. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +6 -6
  471. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +9 -9
  472. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +13 -13
  473. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.i18n.yaml +2 -2
  474. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.md +3 -3
  475. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.zh.md +3 -3
  476. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/SKILL.md +39 -22
  477. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/scripts/diagnose-windows-sandbox-acl.ps1 +308 -231
  478. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +10 -10
  479. package/node_modules/@deepseek-ai/dsh-schedule/README.i18n.yaml +2 -2
  480. package/node_modules/@deepseek-ai/dsh-schedule/README.md +3 -3
  481. package/node_modules/@deepseek-ai/dsh-schedule/README.zh.md +3 -3
  482. package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +6 -4
  483. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/domain.js +6 -4
  484. package/node_modules/@deepseek-ai/dsh-schedule/package.json +30 -30
  485. package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
  486. package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +5 -5
  487. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +21 -21
  488. package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +28 -28
  489. package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +7 -7
  490. package/node_modules/@deepseek-ai/dsh-session/package.json +9 -9
  491. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +15 -15
  492. package/node_modules/@deepseek-ai/dsh-session-format/package.json +2 -2
  493. package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +9 -9
  494. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +4 -4
  495. package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +6 -6
  496. package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +4 -4
  497. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +3 -3
  498. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +15 -15
  499. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +21 -21
  500. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +9 -9
  501. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +10 -10
  502. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +3 -3
  503. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +10 -10
  504. package/node_modules/@deepseek-ai/dsh-session-query/package.json +18 -18
  505. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +9 -9
  506. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +1 -1
  507. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +34 -34
  508. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +7 -7
  509. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +5 -5
  510. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +21 -21
  511. package/node_modules/@deepseek-ai/dsh-session-title/package.json +16 -16
  512. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +13 -13
  513. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +10 -10
  514. package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +7 -7
  515. package/node_modules/@deepseek-ai/dsh-settings/package.json +12 -12
  516. package/node_modules/@deepseek-ai/dsh-shell/package.json +5 -5
  517. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +11 -11
  518. package/node_modules/@deepseek-ai/dsh-skill/package.json +6 -6
  519. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +3 -3
  520. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +7 -7
  521. package/node_modules/@deepseek-ai/dsh-skill-office/package.json +3 -3
  522. package/node_modules/@deepseek-ai/dsh-spill/package.json +7 -7
  523. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +6 -6
  524. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +30 -30
  525. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  526. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +5 -5
  527. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +3 -3
  528. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +1 -1
  529. package/node_modules/@deepseek-ai/dsh-subagent/package.json +48 -48
  530. package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +20 -20
  531. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +14 -14
  532. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +22 -22
  533. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +17 -17
  534. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +4 -4
  535. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +7 -7
  536. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +7 -7
  537. package/node_modules/@deepseek-ai/dsh-terminal/package.json +6 -6
  538. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +17 -17
  539. package/node_modules/@deepseek-ai/dsh-time-context/package.json +20 -20
  540. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  541. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +11 -11
  542. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +14 -14
  543. package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.i18n.yaml +22 -22
  544. package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.md +27 -11
  545. package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.zh.md +27 -11
  546. package/node_modules/@deepseek-ai/dsh-tool-ask-user/lib/index.js +211 -3
  547. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +12 -9
  548. package/node_modules/@deepseek-ai/dsh-tool-bash/README.i18n.yaml +2 -2
  549. package/node_modules/@deepseek-ai/dsh-tool-bash/README.md +1 -1
  550. package/node_modules/@deepseek-ai/dsh-tool-bash/README.zh.md +1 -1
  551. package/node_modules/@deepseek-ai/dsh-tool-bash/lib/index.js +1 -1
  552. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +29 -29
  553. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +19 -19
  554. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +7 -7
  555. package/node_modules/@deepseek-ai/dsh-tool-cordis/README.i18n.yaml +2 -2
  556. package/node_modules/@deepseek-ai/dsh-tool-cordis/README.md +1 -1
  557. package/node_modules/@deepseek-ai/dsh-tool-cordis/README.zh.md +1 -1
  558. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +1 -1
  559. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +31 -1
  560. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/index.js +3 -3
  561. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +10 -10
  562. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +29 -29
  563. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +20 -20
  564. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +16 -16
  565. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +15 -15
  566. package/node_modules/@deepseek-ai/dsh-tool-present/package.json +17 -17
  567. package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.i18n.yaml +2 -2
  568. package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.md +1 -1
  569. package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.zh.md +1 -1
  570. package/node_modules/@deepseek-ai/dsh-tool-pwsh/lib/index.js +2 -2
  571. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +28 -28
  572. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.i18n.yaml +4 -4
  573. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.md +2 -2
  574. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.zh.md +2 -2
  575. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/lib/index.js +1 -1
  576. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +20 -20
  577. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +19 -19
  578. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +12 -12
  579. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +19 -19
  580. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +26 -26
  581. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +19 -19
  582. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +15 -15
  583. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +19 -19
  584. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +22 -22
  585. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +6 -6
  586. package/node_modules/@deepseek-ai/dsh-tools/package.json +24 -24
  587. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +75 -75
  588. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +4 -4
  589. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +2 -2
  590. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +2 -2
  591. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +15 -15
  592. package/node_modules/@deepseek-ai/dsh-user-questions/README.i18n.yaml +19 -22
  593. package/node_modules/@deepseek-ai/dsh-user-questions/README.md +13 -10
  594. package/node_modules/@deepseek-ai/dsh-user-questions/README.zh.md +13 -10
  595. package/node_modules/@deepseek-ai/dsh-user-questions/lib/index.js +659 -46
  596. package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +770 -0
  597. package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.remote-client.js +125 -0
  598. package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/index.js +289 -58
  599. package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/projection.js +298 -0
  600. package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/timed-wait.js +85 -0
  601. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +35 -11
  602. package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +1 -1
  603. package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +1 -1
  604. package/node_modules/@deepseek-ai/dsh-util-time/package.json +1 -1
  605. package/node_modules/@deepseek-ai/dsh-util-values/package.json +1 -1
  606. package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +1 -1
  607. package/node_modules/@deepseek-ai/dsh-web/package.json +3 -3
  608. package/node_modules/@deepseek-ai/dsh-web-app/package.json +136 -136
  609. package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +7 -7
  610. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-5SrrfWpU.js +127 -0
  611. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BPHePDI_.css +1 -0
  612. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
  613. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +16 -16
  614. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +15 -15
  615. package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +6 -6
  616. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +6 -6
  617. package/node_modules/@deepseek-ai/dsh-webhook/package.json +21 -21
  618. package/node_modules/@deepseek-ai/dsh-webhook-github/package.json +10 -10
  619. package/node_modules/@deepseek-ai/dsh-win32-process/package.json +2 -2
  620. package/node_modules/@deepseek-ai/dsh-workflow/package.json +11 -11
  621. package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +34 -34
  622. package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
  623. package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +11 -11
  624. package/node_modules/@earendil-works/pi-ai/README.md +52 -8
  625. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +131 -87
  626. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +17 -5
  627. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +13 -12
  628. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +21 -73
  629. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +55 -4
  630. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +25 -65
  631. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -12
  632. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +26 -23
  633. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +44 -59
  634. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +56 -56
  635. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +14 -19
  636. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  637. package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js +21 -7
  638. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
  639. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/meta.js +190 -0
  640. package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
  641. package/node_modules/@earendil-works/pi-ai/dist/compat.js +9 -6
  642. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
  643. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +49 -4
  644. package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -1
  645. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +4 -0
  646. package/node_modules/@earendil-works/pi-ai/dist/models.js +5 -2
  647. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -0
  648. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  649. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  650. package/node_modules/@earendil-works/pi-ai/dist/providers/data/ant-ling.json +1 -1
  651. package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
  652. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  653. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  654. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
  655. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  656. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  657. package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
  658. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  659. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  660. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
  661. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
  662. package/node_modules/@earendil-works/pi-ai/dist/providers/data/groq.json +1 -1
  663. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  664. package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
  665. package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -0
  666. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
  667. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
  668. package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  669. package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
  670. package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
  671. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  672. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  673. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  674. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  675. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  676. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  677. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  678. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
  679. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  680. package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -0
  681. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  682. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  683. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  684. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
  685. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
  686. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
  687. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
  688. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  689. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  690. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +12 -11
  691. package/node_modules/@earendil-works/pi-ai/dist/providers/meta.js +24 -0
  692. package/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.js +6 -0
  693. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +4 -3
  694. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +22 -0
  695. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +5 -4
  696. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js +19 -5
  697. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.js +6 -0
  698. package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +8 -29
  699. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -7
  700. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +11 -5
  701. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +9 -1
  702. package/node_modules/@earendil-works/pi-ai/dist/utils/text.js +26 -0
  703. package/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js +204 -0
  704. package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/LICENSE +22 -0
  705. package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/README.md +70 -0
  706. package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/dist/index.js +234 -0
  707. package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/dist/parse-proxy-response.js +94 -0
  708. package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/package.json +51 -0
  709. package/node_modules/@earendil-works/pi-ai/package.json +9 -9
  710. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  711. package/node_modules/@google/genai/README.md +19 -4
  712. package/node_modules/@google/genai/dist/index.cjs +7737 -2768
  713. package/node_modules/@google/genai/dist/index.mjs +7730 -2769
  714. package/node_modules/@google/genai/dist/node/index.cjs +7741 -2763
  715. package/node_modules/@google/genai/dist/node/index.mjs +7734 -2764
  716. package/node_modules/@google/genai/dist/tokenizer/node.cjs +424 -117
  717. package/node_modules/@google/genai/dist/tokenizer/node.mjs +424 -117
  718. package/node_modules/@google/genai/dist/vertex_internal/index.cjs +560 -181
  719. package/node_modules/@google/genai/dist/vertex_internal/index.js +561 -182
  720. package/node_modules/@google/genai/dist/web/index.mjs +7717 -2757
  721. package/node_modules/@google/genai/package.json +3 -3
  722. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +41 -70
  723. package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
  724. package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
  725. package/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -3
  726. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +19 -8
  727. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
  728. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +10 -2
  729. package/node_modules/@smithy/node-http-handler/package.json +23 -30
  730. package/node_modules/agent-base/dist/helpers.js +5 -34
  731. package/node_modules/agent-base/dist/index.js +8 -40
  732. package/node_modules/agent-base/package.json +11 -11
  733. package/node_modules/http-proxy-agent/dist/index.js +26 -42
  734. package/node_modules/http-proxy-agent/package.json +14 -13
  735. package/node_modules/https-proxy-agent/node_modules/agent-base/LICENSE +22 -0
  736. package/node_modules/https-proxy-agent/node_modules/agent-base/README.md +69 -0
  737. package/node_modules/https-proxy-agent/node_modules/agent-base/dist/helpers.js +66 -0
  738. package/node_modules/https-proxy-agent/node_modules/agent-base/dist/index.js +178 -0
  739. package/node_modules/https-proxy-agent/node_modules/agent-base/package.json +46 -0
  740. package/node_modules/proxy-agent-negotiate/dist/index.js +35 -0
  741. package/node_modules/proxy-agent-negotiate/package.json +43 -0
  742. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  743. package/node_modules/typebox/build/format/date.mjs +1 -1
  744. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  745. package/node_modules/typebox/build/format/email.mjs +2 -2
  746. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  747. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  748. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  749. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  750. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  751. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  752. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +43 -0
  753. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  754. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  755. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  756. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  757. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  758. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  759. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  760. package/node_modules/typebox/build/format/iri.mjs +30 -8
  761. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  762. package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
  763. package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
  764. package/node_modules/typebox/build/format/regex.mjs +2 -6
  765. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  766. package/node_modules/typebox/build/format/time.mjs +19 -14
  767. package/node_modules/typebox/build/format/uri.mjs +3 -130
  768. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  769. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  770. package/node_modules/typebox/build/format/url.mjs +4 -5
  771. package/node_modules/typebox/build/guard/emit.mjs +13 -8
  772. package/node_modules/typebox/build/guard/guard.mjs +22 -13
  773. package/node_modules/typebox/build/guard/string.mjs +23 -31
  774. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  775. package/node_modules/typebox/build/schema/engine/_context.mjs +12 -17
  776. package/node_modules/typebox/build/schema/engine/_functions.mjs +2 -3
  777. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  778. package/node_modules/typebox/build/schema/engine/_stack.mjs +138 -36
  779. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  780. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +20 -7
  781. package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
  782. package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
  783. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  784. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  785. package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
  786. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  787. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  788. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  789. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  790. package/node_modules/typebox/build/schema/engine/oneOf.mjs +9 -8
  791. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  792. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  793. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +1 -3
  794. package/node_modules/typebox/build/schema/engine/ref.mjs +3 -9
  795. package/node_modules/typebox/build/schema/engine/schema.mjs +19 -4
  796. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  797. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
  798. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
  799. package/node_modules/typebox/build/schema/errors.mjs +7 -13
  800. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  801. package/node_modules/typebox/build/schema/intern/intern.mjs +259 -0
  802. package/node_modules/typebox/build/schema/parse.mjs +10 -5
  803. package/node_modules/typebox/build/schema/resolve/resolve.mjs +327 -1
  804. package/node_modules/typebox/build/schema/schema.mjs +1 -0
  805. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  806. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  807. package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
  808. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  809. package/node_modules/typebox/build/system/memory/create.mjs +3 -4
  810. package/node_modules/typebox/build/system/memory/discard.mjs +8 -7
  811. package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
  812. package/node_modules/typebox/build/system/memory/update.mjs +3 -2
  813. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  814. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  815. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  816. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  817. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  818. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  819. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  820. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  821. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  822. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  823. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  824. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  825. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  826. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  827. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  828. package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
  829. package/node_modules/typebox/package.json +29 -29
  830. package/node_modules/typebox/readme.md +84 -83
  831. package/package.json +294 -308
  832. package/node_modules/@aws-crypto/sha256-browser/CHANGELOG.md +0 -118
  833. package/node_modules/@aws-crypto/sha256-browser/LICENSE +0 -202
  834. package/node_modules/@aws-crypto/sha256-browser/README.md +0 -31
  835. package/node_modules/@aws-crypto/sha256-browser/build/main/constants.js +0 -43
  836. package/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.js +0 -30
  837. package/node_modules/@aws-crypto/sha256-browser/build/main/index.js +0 -8
  838. package/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.js +0 -11
  839. package/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.js +0 -56
  840. package/node_modules/@aws-crypto/sha256-browser/build/module/constants.js +0 -40
  841. package/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js +0 -27
  842. package/node_modules/@aws-crypto/sha256-browser/build/module/index.js +0 -3
  843. package/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.js +0 -7
  844. package/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js +0 -53
  845. package/node_modules/@aws-crypto/sha256-browser/package.json +0 -28
  846. package/node_modules/@aws-crypto/sha256-browser/src/constants.ts +0 -41
  847. package/node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts +0 -30
  848. package/node_modules/@aws-crypto/sha256-browser/src/index.ts +0 -2
  849. package/node_modules/@aws-crypto/sha256-browser/src/isEmptyData.ts +0 -9
  850. package/node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts +0 -71
  851. package/node_modules/@aws-crypto/sha256-browser/tsconfig.json +0 -10
  852. package/node_modules/@aws-crypto/sha256-browser/tsconfig.module.json +0 -7
  853. package/node_modules/@aws-crypto/sha256-js/CHANGELOG.md +0 -106
  854. package/node_modules/@aws-crypto/sha256-js/LICENSE +0 -201
  855. package/node_modules/@aws-crypto/sha256-js/README.md +0 -29
  856. package/node_modules/@aws-crypto/sha256-js/build/main/RawSha256.js +0 -124
  857. package/node_modules/@aws-crypto/sha256-js/build/main/constants.js +0 -98
  858. package/node_modules/@aws-crypto/sha256-js/build/main/index.js +0 -5
  859. package/node_modules/@aws-crypto/sha256-js/build/main/jsSha256.js +0 -85
  860. package/node_modules/@aws-crypto/sha256-js/build/main/knownHashes.fixture.js +0 -322
  861. package/node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js +0 -121
  862. package/node_modules/@aws-crypto/sha256-js/build/module/constants.js +0 -95
  863. package/node_modules/@aws-crypto/sha256-js/build/module/index.js +0 -2
  864. package/node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js +0 -82
  865. package/node_modules/@aws-crypto/sha256-js/build/module/knownHashes.fixture.js +0 -319
  866. package/node_modules/@aws-crypto/sha256-js/package.json +0 -27
  867. package/node_modules/@aws-crypto/sha256-js/src/RawSha256.ts +0 -164
  868. package/node_modules/@aws-crypto/sha256-js/src/constants.ts +0 -98
  869. package/node_modules/@aws-crypto/sha256-js/src/index.ts +0 -1
  870. package/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts +0 -94
  871. package/node_modules/@aws-crypto/sha256-js/src/knownHashes.fixture.ts +0 -401
  872. package/node_modules/@aws-crypto/sha256-js/tsconfig.json +0 -10
  873. package/node_modules/@aws-crypto/sha256-js/tsconfig.module.json +0 -7
  874. package/node_modules/@aws-crypto/supports-web-crypto/CHANGELOG.md +0 -66
  875. package/node_modules/@aws-crypto/supports-web-crypto/LICENSE +0 -202
  876. package/node_modules/@aws-crypto/supports-web-crypto/README.md +0 -32
  877. package/node_modules/@aws-crypto/supports-web-crypto/build/main/index.js +0 -5
  878. package/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.js +0 -69
  879. package/node_modules/@aws-crypto/supports-web-crypto/build/module/index.js +0 -2
  880. package/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js +0 -62
  881. package/node_modules/@aws-crypto/supports-web-crypto/package.json +0 -23
  882. package/node_modules/@aws-crypto/supports-web-crypto/src/index.ts +0 -1
  883. package/node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts +0 -76
  884. package/node_modules/@aws-crypto/supports-web-crypto/tsconfig.json +0 -10
  885. package/node_modules/@aws-crypto/supports-web-crypto/tsconfig.module.json +0 -7
  886. package/node_modules/@aws-crypto/util/CHANGELOG.md +0 -71
  887. package/node_modules/@aws-crypto/util/LICENSE +0 -201
  888. package/node_modules/@aws-crypto/util/README.md +0 -16
  889. package/node_modules/@aws-crypto/util/build/main/convertToBuffer.js +0 -24
  890. package/node_modules/@aws-crypto/util/build/main/index.js +0 -14
  891. package/node_modules/@aws-crypto/util/build/main/isEmptyData.js +0 -13
  892. package/node_modules/@aws-crypto/util/build/main/numToUint8.js +0 -15
  893. package/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js +0 -20
  894. package/node_modules/@aws-crypto/util/build/module/convertToBuffer.js +0 -20
  895. package/node_modules/@aws-crypto/util/build/module/index.js +0 -7
  896. package/node_modules/@aws-crypto/util/build/module/isEmptyData.js +0 -9
  897. package/node_modules/@aws-crypto/util/build/module/numToUint8.js +0 -11
  898. package/node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js +0 -16
  899. package/node_modules/@aws-crypto/util/package.json +0 -27
  900. package/node_modules/@aws-crypto/util/src/convertToBuffer.ts +0 -30
  901. package/node_modules/@aws-crypto/util/src/index.ts +0 -7
  902. package/node_modules/@aws-crypto/util/src/isEmptyData.ts +0 -12
  903. package/node_modules/@aws-crypto/util/src/numToUint8.ts +0 -11
  904. package/node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts +0 -16
  905. package/node_modules/@aws-crypto/util/tsconfig.json +0 -9
  906. package/node_modules/@aws-crypto/util/tsconfig.module.json +0 -7
  907. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/auth/httpAuthSchemeProvider.js +0 -63
  908. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/bdd.js +0 -49
  909. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/endpointResolver.js +0 -18
  910. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/models/BedrockRuntimeServiceException.js +0 -12
  911. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/models/errors.js +0 -169
  912. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.browser.js +0 -41
  913. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.js +0 -78
  914. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.native.js +0 -19
  915. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.shared.js +0 -48
  916. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/schemas/schemas_0.js +0 -1500
  917. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/LICENSE +0 -201
  918. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/README.md +0 -9
  919. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -859
  920. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
  921. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
  922. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -12
  923. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -51
  924. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
  925. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -251
  926. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -135
  927. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
  928. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -180
  929. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
  930. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
  931. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
  932. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
  933. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
  934. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
  935. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +0 -56
  936. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +0 -201
  937. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +0 -9
  938. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -859
  939. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
  940. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
  941. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -12
  942. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -51
  943. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
  944. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -251
  945. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -135
  946. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
  947. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -180
  948. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +0 -2
  949. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +0 -2
  950. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
  951. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
  952. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
  953. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
  954. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
  955. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
  956. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +0 -56
  957. package/node_modules/@aws-sdk/util-locate-window/LICENSE +0 -201
  958. package/node_modules/@aws-sdk/util-locate-window/README.md +0 -4
  959. package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -12
  960. package/node_modules/@aws-sdk/util-locate-window/dist-es/index.js +0 -10
  961. package/node_modules/@aws-sdk/util-locate-window/package.json +0 -43
  962. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Cq6ljTv2.css +0 -1
  963. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dy0OhsZ5.js +0 -127
  964. package/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +0 -36
  965. package/node_modules/@smithy/is-array-buffer/LICENSE +0 -201
  966. package/node_modules/@smithy/is-array-buffer/README.md +0 -10
  967. package/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +0 -32
  968. package/node_modules/@smithy/is-array-buffer/dist-es/index.js +0 -2
  969. package/node_modules/@smithy/is-array-buffer/package.json +0 -48
  970. package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
  971. package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
  972. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
  973. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
  974. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
  975. package/node_modules/@smithy/util-buffer-from/LICENSE +0 -201
  976. package/node_modules/@smithy/util-buffer-from/README.md +0 -10
  977. package/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +0 -47
  978. package/node_modules/@smithy/util-buffer-from/dist-es/index.js +0 -14
  979. package/node_modules/@smithy/util-buffer-from/package.json +0 -49
  980. package/node_modules/@smithy/util-utf8/LICENSE +0 -201
  981. package/node_modules/@smithy/util-utf8/README.md +0 -4
  982. package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +0 -1
  983. package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +0 -1
  984. package/node_modules/@smithy/util-utf8/dist-cjs/index.js +0 -65
  985. package/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +0 -1
  986. package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +0 -1
  987. package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +0 -1
  988. package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +0 -1
  989. package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js +0 -5
  990. package/node_modules/@smithy/util-utf8/dist-es/index.js +0 -3
  991. package/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +0 -10
  992. package/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +0 -9
  993. package/node_modules/@smithy/util-utf8/dist-es/toUtf8.js +0 -10
  994. package/node_modules/@smithy/util-utf8/package.json +0 -54
  995. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  996. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  997. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  998. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  999. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
  1000. /package/node_modules/{@aws-sdk/credential-provider-http/node_modules/@smithy → @smithy}/node-http-handler/dist-es/node-http2.js +0 -0
  1001. /package/node_modules/{@aws-sdk/credential-provider-http/node_modules/@smithy → @smithy}/node-http-handler/dist-es/node-https.js +0 -0
@@ -8,6 +8,16 @@ window.__ModuleLoader__.load({
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
9
  let react = require("react");
10
10
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
11
+ //#region ../../util/brand/src/index.ts
12
+ /**
13
+ * Apply a compile-time string brand without changing the value.
14
+ * @param value - string admitted by the domain that owns the target brand.
15
+ * @returns the same string with the requested compile-time brand.
16
+ */
17
+ function brandString(value) {
18
+ return value;
19
+ }
20
+ //#endregion
11
21
  //#region ../../interaction/user-questions/lib/types/plan-review.js
12
22
  /**
13
23
  * The plan-review narrowing every surface applies before drawing a
@@ -74,107 +84,366 @@ window.__ModuleLoader__.load({
74
84
  ...verdicts
75
85
  };
76
86
  }
87
+ /** Reload-unique prefix so an unnamed legacy card cannot reuse a persisted draft. */
88
+ const unnamedQuestionPrefix = Array.from(globalThis.crypto.getRandomValues(new Uint8Array(16)), (byte) => byte.toString(16).padStart(2, "0")).join("");
77
89
  let nextQuestionKey = 0;
90
+ const rejectionMessages = {
91
+ ASK_ABORTED: "ask_user_question was aborted before the user answered",
92
+ ASK_CANCELLED: "the user cancelled ask_user_question",
93
+ ASK_TIMED_OUT: "ask_user_question timed out before the user answered"
94
+ };
78
95
  /** Create a wire-preserved user-question rejection. */
79
- function questionError(message, code) {
80
- const error = new Error(message);
96
+ function questionError(code) {
97
+ const error = new Error(rejectionMessages[code]);
81
98
  error.name = "UserQuestionError";
82
99
  error.code = code;
83
100
  return error;
84
101
  }
85
- /** One answerable Client presentation of a pending Host waterfall. */
86
- var PendingQuestion = class {
87
- sessionId;
102
+ /**
103
+ * Create the deferred one Remote Event listener settles through a card.
104
+ * The request signal ends the channel with `ASK_ABORTED`; the Host ignores that
105
+ * outcome for an event it already finished, so a cancel frame loses nothing.
106
+ * @param deadline - Client-clock deadline in epoch milliseconds derived from the business claim's remaining duration.
107
+ * @param signal - Delivery lifetime of the forwarded request.
108
+ * @param onSettle - Called once with the channel when it settles or aborts.
109
+ * @returns The channel to attach and the promise the listener awaits.
110
+ */
111
+ function createWaterfallRequest(deadline, signal, onSettle) {
112
+ const completion = Promise.withResolvers();
113
+ const delegated = Symbol("pending question delegated");
114
+ let settled = false;
115
+ const finish = (settle) => {
116
+ if (settled) return;
117
+ settled = true;
118
+ signal?.removeEventListener("abort", onAbort);
119
+ settle();
120
+ onSettle(channel);
121
+ };
122
+ const onAbort = () => {
123
+ finish(() => {
124
+ completion.reject(questionError("ASK_ABORTED"));
125
+ });
126
+ };
127
+ const channel = {
128
+ deadline,
129
+ resolve: (answer) => {
130
+ finish(() => {
131
+ completion.resolve(answer);
132
+ });
133
+ },
134
+ reject: (code) => {
135
+ finish(() => {
136
+ completion.reject(questionError(code));
137
+ });
138
+ },
139
+ delegate: () => {
140
+ finish(() => {
141
+ completion.reject(delegated);
142
+ });
143
+ }
144
+ };
145
+ if (signal !== void 0) {
146
+ signal.addEventListener("abort", onAbort, { once: true });
147
+ if (signal.aborted) onAbort();
148
+ }
149
+ return {
150
+ channel,
151
+ result: completion.promise,
152
+ isDelegation: (reason) => reason === delegated
153
+ };
154
+ }
155
+ /**
156
+ * One answerable Client card. A card keyed by tool call is created by whichever
157
+ * source arrives first, the forwarded waterfall or the Session projection, and
158
+ * removed only when the projection no longer lists the call.
159
+ */
160
+ var PendingQuestion = class PendingQuestion {
88
161
  /** Presentation discriminator used by Session pending-interaction consumers. */
89
162
  kind;
90
- /** Opaque render identity and request key for the Session-scoped draft store. */
163
+ /** Render identity and request key for the Session-scoped draft store. */
91
164
  key;
165
+ /** Agent/Session identity owning the request. */
166
+ sessionId;
92
167
  /** The request's question list. */
93
168
  questions;
94
- /** Result returned by the Remote Event listener to the Host waterfall. */
95
- result;
96
- #resolve;
97
- #reject;
98
- #signal;
99
- #onAbort;
100
- #delegated = Symbol("pending question delegated");
101
- #settled = false;
169
+ /** Tool call identity; absent for a blocking request that carried no `wait`. */
170
+ callId;
102
171
  /**
103
- * @param sessionId - Agent/Session identity owning the scoped request.
172
+ * Recorded answers of a call that already settled. Present only on a
173
+ * read-only review card, which the tool call row builds from its own
174
+ * transcript so a finished question can be read back in the panel that
175
+ * asked it. Such a card has no answer channel and no countdown.
176
+ */
177
+ review;
178
+ /**
179
+ * What closing the panel does. A card keyed by tool call stays reachable
180
+ * from its tool call row, so closing only withdraws the panel (`hide`) and
181
+ * persists nothing. A card the Host never named has no way back, so closing
182
+ * it ends the request (`cancel`).
183
+ */
184
+ dismissal;
185
+ #state = "open";
186
+ #waterfall;
187
+ #rpc;
188
+ #seat;
189
+ #timedWait = false;
190
+ #timer;
191
+ #deadline;
192
+ #remainingMs;
193
+ #focused = false;
194
+ #engaged = false;
195
+ #held = false;
196
+ #closed = false;
197
+ #siblings;
198
+ #listeners = /* @__PURE__ */ new Set();
199
+ #snapshot;
200
+ /**
201
+ * @param sessionId - Agent/Session identity owning the request.
104
202
  * @param questions - complete question batch.
105
- * @param signal - Host request and delivery lifetime.
203
+ * @param callId - tool call identity when the Host named one.
204
+ * @param siblings - keys of every card currently registered for the Session, for draft pruning.
205
+ * @param review - recorded answers of a settled call, making this a read-only card.
106
206
  */
107
- constructor(sessionId, questions, signal) {
207
+ constructor(sessionId, questions, callId, siblings, review) {
108
208
  this.sessionId = sessionId;
109
- nextQuestionKey += 1;
110
- this.key = `question:${String(nextQuestionKey)}`;
111
209
  this.questions = questions;
112
210
  this.kind = planReviewOf(questions) === void 0 ? "question" : "plan-review";
113
- const completion = Promise.withResolvers();
114
- this.result = completion.promise;
115
- this.#resolve = completion.resolve;
116
- this.#reject = completion.reject;
117
- this.#signal = signal;
118
- if (signal === void 0) {
119
- this.#onAbort = void 0;
211
+ this.callId = callId;
212
+ this.review = review;
213
+ this.dismissal = callId === void 0 ? "cancel" : "hide";
214
+ this.#siblings = siblings;
215
+ if (callId === void 0) nextQuestionKey += 1;
216
+ this.key = callId === void 0 ? `question:${unnamedQuestionPrefix}:${String(nextQuestionKey)}` : PendingQuestion.keyOf(sessionId, callId);
217
+ this.#snapshot = this.createSnapshot();
218
+ }
219
+ /**
220
+ * Card key of a tool call, shared by every source that names one. The Host
221
+ * request and the Session projection carry the branded `ToolCallId`; a
222
+ * transcript row carries the same wire value as a plain string.
223
+ * @param sessionId - owning Session.
224
+ * @param callId - tool call identity, branded or as a transcript spells it.
225
+ * @returns the render identity and draft key.
226
+ */
227
+ static keyOf(sessionId, callId) {
228
+ return `question:${String(sessionId)}:${callId}`;
229
+ }
230
+ /**
231
+ * Draft keys that are still live in this Session, this card included.
232
+ * @returns keys the draft store must keep; everything else is stale.
233
+ */
234
+ liveKeys() {
235
+ return this.#siblings?.() ?? [this.key];
236
+ }
237
+ /** Subscribe to card state changes. */
238
+ subscribe = (listener) => {
239
+ this.#listeners.add(listener);
240
+ return () => {
241
+ this.#listeners.delete(listener);
242
+ };
243
+ };
244
+ /** Read the stable current card state. */
245
+ snapshot = () => this.#snapshot;
246
+ /** Observable snapshot read by the renderer's keyed Hook. */
247
+ getSnapshot = this.snapshot;
248
+ createSnapshot() {
249
+ const channel = this.#waterfall !== void 0 ? "waterfall" : this.#state === "continued" && this.#rpc !== void 0 ? "rpc" : "none";
250
+ const waitState = this.#state === "continued" ? "continued" : this.#held ? "waiting" : this.#engaged ? "editing" : this.#focused ? "focused" : "counting";
251
+ return {
252
+ state: this.#state,
253
+ waitState,
254
+ countdown: this.#timedWait ? {
255
+ remainingMs: this.#deadline === void 0 ? this.#remainingMs ?? 0 : Math.max(0, this.#deadline - Date.now()),
256
+ running: this.#deadline !== void 0
257
+ } : void 0,
258
+ channel,
259
+ closed: this.#closed
260
+ };
261
+ }
262
+ publish() {
263
+ this.#snapshot = this.createSnapshot();
264
+ this.#reschedule();
265
+ for (const listener of this.#listeners) listener();
266
+ }
267
+ /**
268
+ * Own the countdown here rather than in a mounted component: the panel can be
269
+ * hidden and remounted while the request stands, and a timer that died with
270
+ * the component would leave the tool call waiting past its deadline.
271
+ */
272
+ #reschedule() {
273
+ const wanted = this.#deadline !== void 0 && !this.#closed;
274
+ if (wanted === (this.#timer !== void 0)) return;
275
+ if (!wanted) {
276
+ clearInterval(this.#timer);
277
+ this.#timer = void 0;
120
278
  return;
121
279
  }
122
- const onAbort = () => {
123
- this.abort(questionError("ask_user_question was aborted before the user answered", "ASK_ABORTED"));
124
- };
125
- this.#onAbort = onAbort;
126
- signal.addEventListener("abort", onAbort, { once: true });
127
- if (signal.aborted) onAbort();
280
+ this.#timer = setInterval(() => {
281
+ this.#tick();
282
+ }, 1e3);
283
+ }
284
+ #tick() {
285
+ const deadline = this.#deadline;
286
+ /* v8 ignore next -- #reschedule clears the interval in the same publish that drops the deadline. */
287
+ if (deadline === void 0) return;
288
+ if (Date.now() >= deadline) {
289
+ this.timeout();
290
+ return;
291
+ }
292
+ this.publish();
128
293
  }
129
294
  /**
130
- * Resolve the Host waterfall with the whole answer batch.
131
- * @param answer - complete structured answer batch.
295
+ * Attach the live waterfall of a forwarded request.
296
+ * @param channel - request channel created by {@link createWaterfallRequest}.
132
297
  */
133
- answer(answer) {
134
- return settlePendingComposer(() => {
135
- this.finish(() => {
136
- this.#resolve(answer);
137
- });
138
- }, "pending question settlement failed");
298
+ attachWaterfall(channel) {
299
+ this.#waterfall = channel;
300
+ this.#timedWait = channel.deadline !== void 0;
301
+ if (!this.#held && !this.#engaged) {
302
+ this.#deadline = channel.deadline;
303
+ if (this.#focused && channel.deadline !== void 0) {
304
+ this.#remainingMs = Math.max(0, channel.deadline - Date.now());
305
+ this.#deadline = void 0;
306
+ }
307
+ }
308
+ this.publish();
139
309
  }
140
- /** Delegate an unanswered request to the next waterfall listener. */
141
- delegate() {
142
- if (this.#settled) return;
143
- this.finish(() => {
144
- this.#reject(this.#delegated);
145
- });
310
+ /**
311
+ * Drop a waterfall channel that settled or was cancelled; the card stays.
312
+ * @param channel - the channel that ended.
313
+ */
314
+ detachWaterfall(channel) {
315
+ if (this.#waterfall !== channel) return;
316
+ this.#waterfall = void 0;
317
+ this.#timedWait = false;
318
+ this.#deadline = void 0;
319
+ this.publish();
146
320
  }
147
321
  /**
148
- * Test whether a rejection requests waterfall delegation.
149
- * @param reason - rejection received from {@link PendingQuestion.result}.
150
- * @returns whether {@link PendingQuestion.delegate} produced it.
322
+ * Whether a live waterfall is attached.
323
+ * @returns whether the pending Host request still accepts settlement.
151
324
  */
152
- isDelegation(reason) {
153
- return reason === this.#delegated;
325
+ hasWaterfall() {
326
+ return this.#waterfall !== void 0;
154
327
  }
155
- /** Reject the Host waterfall because the user closed the question. */
156
- cancel() {
157
- return settlePendingComposer(() => {
158
- this.finish(() => {
159
- this.#reject(questionError("the user cancelled ask_user_question", "ASK_CANCELLED"));
160
- });
161
- }, "pending question cancellation failed");
328
+ /**
329
+ * Attach the Remote answer path used once the question is continued.
330
+ * @param channel - Remote calls bound to this Session and call.
331
+ */
332
+ attachRpc(channel) {
333
+ this.#rpc = channel;
334
+ this.publish();
335
+ }
336
+ /**
337
+ * Attach the composer seat this card is published into.
338
+ * @param seat - withdrawal of the published panel, owned by the card registry.
339
+ */
340
+ attachSeat(seat) {
341
+ this.#seat = seat;
342
+ }
343
+ /**
344
+ * Copy the projection row state.
345
+ * @param state - `open` or `continued`.
346
+ */
347
+ setState(state) {
348
+ if (this.#state === state) return;
349
+ this.#state = state;
350
+ this.publish();
351
+ }
352
+ /** Stop this Client's countdown indefinitely; the waterfall then waits like a blocking question. */
353
+ takeTime() {
354
+ if (this.#held) return;
355
+ this.#held = true;
356
+ this.#focused = false;
357
+ this.#remainingMs = void 0;
358
+ this.#deadline = void 0;
359
+ this.publish();
360
+ }
361
+ /**
362
+ * Record focus even before the request arrives, freezing a pristine countdown once attached.
363
+ * @param now - current Client epoch time.
364
+ */
365
+ holdFocus(now = Date.now()) {
366
+ if (this.#held || this.#engaged || this.#focused) return;
367
+ this.#remainingMs = this.#deadline === void 0 ? void 0 : Math.max(0, this.#deadline - now);
368
+ this.#deadline = void 0;
369
+ this.#focused = true;
370
+ this.publish();
162
371
  }
163
372
  /**
164
- * End an unanswered presentation when its transport, scope, or plugin lifetime ends.
165
- * @param reason - rejection exposed to the waiting Remote Event listener.
373
+ * Resume a pristine countdown after the answer surface loses focus.
374
+ * @param now - current Client epoch time.
166
375
  */
167
- abort(reason) {
168
- if (this.#settled) return;
169
- this.finish(() => {
170
- this.#reject(reason);
376
+ releaseFocus(now = Date.now()) {
377
+ if (!this.#focused) return;
378
+ this.#focused = false;
379
+ this.#deadline = this.#timedWait && this.#remainingMs !== void 0 ? now + this.#remainingMs : void 0;
380
+ this.#remainingMs = void 0;
381
+ this.publish();
382
+ }
383
+ /**
384
+ * Keep the first edited draft answerable without a foreground deadline.
385
+ * @param now - current Client epoch time used to preserve the remaining duration.
386
+ */
387
+ engage(now = Date.now()) {
388
+ if (this.#held || this.#engaged) return;
389
+ if (this.#remainingMs === void 0 && this.#deadline !== void 0) this.#remainingMs = Math.max(0, this.#deadline - now);
390
+ this.#engaged = true;
391
+ this.#focused = false;
392
+ this.#deadline = void 0;
393
+ this.publish();
394
+ }
395
+ /** Local countdown reached zero: settle the waterfall with `ASK_TIMED_OUT`, keep the card. */
396
+ timeout() {
397
+ if (this.#held || this.#engaged || this.#focused) return;
398
+ const channel = this.#waterfall;
399
+ if (channel === void 0) return;
400
+ this.#waterfall = void 0;
401
+ this.#timedWait = false;
402
+ this.#deadline = void 0;
403
+ channel.reject("ASK_TIMED_OUT");
404
+ this.publish();
405
+ }
406
+ /** Hand a live waterfall to the next listener when this presentation domain unloads. */
407
+ delegate() {
408
+ this.#waterfall?.delegate();
409
+ }
410
+ /** Mark the card removed from the registry; the mounted composer clears its draft. */
411
+ close() {
412
+ if (this.#closed) return;
413
+ this.#closed = true;
414
+ this.publish();
415
+ }
416
+ /**
417
+ * Submit the whole answer batch through the live waterfall, or through the
418
+ * Remote path once the question is continued.
419
+ * @param answer - complete structured answer batch.
420
+ */
421
+ answer(answer) {
422
+ const waterfall = this.#waterfall;
423
+ if (waterfall !== void 0) return settlePendingComposer(() => {
424
+ waterfall.resolve(answer);
425
+ }, "pending question settlement failed");
426
+ const rpc = this.#rpc;
427
+ if (this.#state === "continued" && rpc !== void 0) return rpc.answer(answer).then((accepted) => {
428
+ if (!accepted) throw new Error("this question is no longer answerable");
171
429
  });
430
+ return Promise.reject(/* @__PURE__ */ new Error("no channel accepts an answer yet"));
172
431
  }
173
- finish(settle) {
174
- if (this.#settled) throw new Error(`pending question ${this.key} is already settled`);
175
- this.#settled = true;
176
- if (this.#signal !== void 0 && this.#onAbort !== void 0) this.#signal.removeEventListener("abort", this.#onAbort);
177
- settle();
432
+ /**
433
+ * Close the panel. A tool-call-keyed card only leaves the composer seat: the
434
+ * request stands, the countdown keeps running here, and the tool call row
435
+ * reopens it. A card the Host never named ends its request instead, because
436
+ * nothing could bring it back.
437
+ */
438
+ dismiss() {
439
+ if (this.dismissal === "hide") return settlePendingComposer(() => {
440
+ this.#seat?.hide();
441
+ }, "pending question hide failed");
442
+ const waterfall = this.#waterfall;
443
+ if (waterfall === void 0) return Promise.reject(/* @__PURE__ */ new Error("no channel accepts a cancellation yet"));
444
+ return settlePendingComposer(() => {
445
+ waterfall.reject("ASK_CANCELLED");
446
+ }, "pending question cancellation failed");
178
447
  }
179
448
  };
180
449
  //#endregion
@@ -184,26 +453,25 @@ window.__ModuleLoader__.load({
184
453
  * registry owns store instances; this module exports only the factory so a
185
454
  * plugin reload cannot reuse a module-global handle.
186
455
  */
187
- const emptyProgress = () => ({
188
- index: 0,
189
- drafts: []
190
- });
191
456
  /**
192
- * Declare the question composer's transient Session store.
193
- * @returns a non-persisted store handle whose instance is owned by the Slot registry.
457
+ * Declare the question composer's Session store. Drafts persist per Session so
458
+ * leaving the Session or restarting the Client does not erase an unfinished answer.
459
+ * @returns a persisted store handle whose instance is owned by the Slot registry.
194
460
  */
195
461
  function createQuestionDraftStore() {
196
462
  return (0, _deepseek_ai_dsh_client_store.defineStore)({
197
- init: () => ({ progress: emptyProgress() }),
463
+ init: () => ({ progressByRequest: {} }),
464
+ persist: "dsh.user-questions.drafts.v1",
198
465
  actions: {
199
466
  replace: (draft, requestKey, progress) => {
200
- draft.requestKey = requestKey;
201
- draft.progress = progress;
467
+ draft.progressByRequest[requestKey] = progress;
202
468
  },
203
469
  clear: (draft, requestKey) => {
204
- if (draft.requestKey !== requestKey) return;
205
- delete draft.requestKey;
206
- draft.progress = emptyProgress();
470
+ draft.progressByRequest = Object.fromEntries(Object.entries(draft.progressByRequest).filter(([key]) => key !== requestKey));
471
+ },
472
+ prune: (draft, keep) => {
473
+ const live = new Set(keep);
474
+ draft.progressByRequest = Object.fromEntries(Object.entries(draft.progressByRequest).filter(([key]) => live.has(key)));
207
475
  }
208
476
  }
209
477
  });
@@ -225,13 +493,13 @@ window.__ModuleLoader__.load({
225
493
  }
226
494
  //#endregion
227
495
  //#region \0dsh-css:/Users/songli/deepseek-harness/packages/client/ui-user-questions/src/client/PlanReviewPanel.module.css.mjs
228
- const css$1 = ".T3J2nG_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}.T3J2nG_card{width:100%;max-width:var(--dsh-chat-content-width);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-input-major);box-shadow:var(--dsw-elevation-panel);color:var(--dsw-alias-label-primary);border:0;flex-direction:column;display:flex;overflow:hidden}.T3J2nG_card,.T3J2nG_card *{box-sizing:border-box}.T3J2nG_strip{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-primary);flex-shrink:0;align-items:center;gap:8px;padding:12px 16px;font-size:14px;line-height:20px;display:flex}.T3J2nG_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;padding:8px 16px 12px;display:flex}.T3J2nG_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);font-size:11px;line-height:16px}.T3J2nG_actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.T3J2nG_summary{min-width:0;padding:14px 16px 12px}.T3J2nG_title{text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:15px;font-weight:500;line-height:22px;overflow:hidden}.T3J2nG_description{-webkit-line-clamp:2;color:var(--dsw-alias-label-secondary);-webkit-box-orient:vertical;margin:8px 0 0;font-size:14px;line-height:24px;display:-webkit-box;overflow:hidden}.T3J2nG_discuss{gap:6px}@media (width<=720px){.T3J2nG_card{border-radius:var(--dsw-radius-xl)}.T3J2nG_footer{align-items:flex-end;padding:8px 12px 10px}}.T3J2nG_previewActions{align-items:center;margin-left:auto;display:flex}";
229
- const tagId$1 = "@deepseek-ai/dsh-client-ui-user-questions/PlanReviewPanel.module.css";
230
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
496
+ const css$2 = ".T3J2nG_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}.T3J2nG_card{width:100%;max-width:var(--dsh-chat-content-width);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-input-major);box-shadow:var(--dsw-elevation-panel);color:var(--dsw-alias-label-primary);border:0;flex-direction:column;display:flex;overflow:hidden}.T3J2nG_card,.T3J2nG_card *{box-sizing:border-box}.T3J2nG_strip{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-primary);flex-shrink:0;align-items:center;gap:8px;padding:12px 16px;font-size:14px;line-height:20px;display:flex}.T3J2nG_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;padding:8px 16px 12px;display:flex}.T3J2nG_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);font-size:11px;line-height:16px}.T3J2nG_actions{flex-shrink:0;align-items:center;gap:8px;display:flex}.T3J2nG_summary{min-width:0;padding:14px 16px 12px}.T3J2nG_title{text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:15px;font-weight:500;line-height:22px;overflow:hidden}.T3J2nG_description{-webkit-line-clamp:2;color:var(--dsw-alias-label-secondary);-webkit-box-orient:vertical;margin:8px 0 0;font-size:14px;line-height:24px;display:-webkit-box;overflow:hidden}.T3J2nG_discuss{gap:6px}@media (width<=720px){.T3J2nG_card{border-radius:var(--dsw-radius-xl)}.T3J2nG_footer{align-items:flex-end;padding:8px 12px 10px}}.T3J2nG_previewActions{align-items:center;margin-left:auto;display:flex}";
497
+ const tagId$2 = "@deepseek-ai/dsh-client-ui-user-questions/PlanReviewPanel.module.css";
498
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
231
499
  const tag = document.createElement("style");
232
500
  tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-user-questions";
233
- tag.dataset.pluginCss = tagId$1;
234
- tag.textContent = css$1;
501
+ tag.dataset.pluginCss = tagId$2;
502
+ tag.textContent = css$2;
235
503
  document.head.appendChild(tag);
236
504
  }
237
505
  var PlanReviewPanel_module_css_default = {
@@ -268,10 +536,16 @@ window.__ModuleLoader__.load({
268
536
  function PlanReviewPanel({ pending, review, t, renderSlot }) {
269
537
  const [busy, setBusy] = (0, react.useState)(false);
270
538
  const [error, setError] = (0, react.useState)(null);
271
- const settle = (send) => {
539
+ const settle = (send, remote = false) => {
272
540
  setBusy(true);
273
541
  setError(null);
274
- send().catch((cause) => {
542
+ send().then(() => {
543
+ if (!remote) return;
544
+ setBusy(false);
545
+ pending.dismiss().catch(() => {
546
+ setError(t("status.sent"));
547
+ });
548
+ }).catch((cause) => {
275
549
  setBusy(false);
276
550
  setError(cause instanceof Error ? cause.message : String(cause));
277
551
  });
@@ -280,7 +554,7 @@ window.__ModuleLoader__.load({
280
554
  settle(() => pending.answer({ answers: [{
281
555
  id: review.id,
282
556
  selected: [label]
283
- }] }));
557
+ }] }), pending.snapshot().channel === "rpc");
284
558
  };
285
559
  const summary = (0, react.useMemo)(() => {
286
560
  const title = (0, _deepseek_ai_dsh_client_ui_primitives.extractMarkdownPlainText)(review.plan, { mode: "first-line" });
@@ -336,7 +610,7 @@ window.__ModuleLoader__.load({
336
610
  icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 14 }),
337
611
  disabled: busy,
338
612
  onClick: () => {
339
- settle(() => pending.cancel());
613
+ settle(() => pending.dismiss());
340
614
  },
341
615
  children: t("plan.discuss")
342
616
  }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
@@ -356,13 +630,13 @@ window.__ModuleLoader__.load({
356
630
  }
357
631
  //#endregion
358
632
  //#region \0dsh-css:/Users/songli/deepseek-harness/packages/client/ui-user-questions/src/client/QuestionComposer.module.css.mjs
359
- const css = "._3GshpW_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}._3GshpW_card{width:100%;max-width:var(--dsh-chat-content-width);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2-darkmode-thin);border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-input-major);max-height:min(60vh,520px);box-shadow:var(--dsw-elevation-panel);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border:0;flex-direction:column;padding:0 0 10px;display:flex;overflow:hidden}._3GshpW_card,._3GshpW_card *{box-sizing:border-box}._3GshpW_cardMinimized{max-height:none}._3GshpW_cardMinimized ._3GshpW_header{padding-bottom:14px}._3GshpW_headerActions{flex-shrink:0;align-items:center;gap:4px;display:flex}._3GshpW_header{flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 16px 0 24px;display:flex}._3GshpW_headingBlock{min-width:0}._3GshpW_eyebrow{color:var(--dsw-alias-label-tertiary);margin-bottom:5px;font-size:11px;line-height:16px}._3GshpW_title{margin:0;font-size:16px;font-weight:500;line-height:22px}._3GshpW_detail{margin:0 2px 8px}._3GshpW_footerActions{flex-shrink:0;align-items:center;gap:12px;display:flex}._3GshpW_pager{flex-shrink:0;align-items:center;gap:6px;display:flex}._3GshpW_progress{color:var(--dsw-alias-label-secondary);white-space:nowrap;word-spacing:-2px;padding:0 4px;font-size:14px;font-weight:500;line-height:24px}._3GshpW_iconButton{corner-shape:round;width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;place-items:center;padding:0;display:grid}._3GshpW_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._3GshpW_iconButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._3GshpW_body{overscroll-behavior:contain;flex-direction:column;flex:auto;min-height:0;display:flex;overflow-y:auto}._3GshpW_options{flex-direction:column;gap:1px;margin:8px 0 0;padding:4px 12px;display:flex}._3GshpW_option{border-radius:var(--dsw-radius-md);width:100%;min-height:40px;color:inherit;text-align:left;cursor:pointer;background:0 0;border:1px solid #0000;flex-shrink:0;align-items:flex-start;gap:8px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}._3GshpW_option:hover:not(:disabled),._3GshpW_optionSelected{background:var(--dsw-alias-interactive-bg-hover)}._3GshpW_optionSelected{border-color:var(--dsw-alias-border-l2)}._3GshpW_option:disabled{cursor:default}._3GshpW_number{border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-bg-overlay);width:20px;height:20px;color:var(--dsw-alias-label-secondary);flex:0 0 20px;place-items:center;margin-top:2px;font-size:12px;font-weight:500;line-height:18px;display:grid}._3GshpW_checkbox{flex:0 0 20px;place-items:center;width:20px;height:20px;margin-top:2px;display:grid}._3GshpW_checkbox:before{content:\"\";border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-xs);grid-area:1/1;width:14px;height:14px;transition:background-color .12s,border-color .12s}._3GshpW_checkbox>svg{grid-area:1/1}._3GshpW_checkboxChecked{color:var(--dsw-alias-label-primary-foreground)}._3GshpW_checkboxChecked:before{border-color:var(--dsw-alias-label-primary);background:var(--dsw-alias-label-primary)}._3GshpW_optionCopy{flex:1;min-width:0}._3GshpW_optionLine{flex-wrap:wrap;align-items:baseline;gap:2px 6px;display:flex}._3GshpW_optionLabel{font-size:14px;font-weight:500;line-height:24px}._3GshpW_badge{border-radius:var(--dsw-radius-xs);background:var(--dsw-specific-sidebar-nav-item-active-accent);color:var(--dsw-alias-button-info-fill);padding:0 4px;font-size:11px;font-weight:600;line-height:18px}._3GshpW_description{color:var(--dsw-alias-label-tertiary);font-size:14px;font-weight:400;line-height:24px}._3GshpW_customRow{border-radius:var(--dsw-radius-md);border:1px solid #0000;flex-shrink:0;align-items:flex-start;gap:8px;width:100%;min-height:40px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}._3GshpW_customRow:hover,._3GshpW_customRow:focus-within,._3GshpW_customRowActive{background:var(--dsw-alias-interactive-bg-hover)}._3GshpW_customRow:focus-within,._3GshpW_customRowActive{border-color:var(--dsw-alias-border-l2)}._3GshpW_field{--dsh-answer-field-padding:0;min-width:0;display:grid}._3GshpW_field>*{min-width:0;padding:var(--dsh-answer-field-padding);font:inherit;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;grid-area:1/1;font-size:14px;line-height:24px}._3GshpW_fieldMirror{box-sizing:content-box;visibility:hidden;max-height:144px;overflow:hidden}._3GshpW_fieldInput{resize:none;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);background:0 0;border:none;outline:none;overflow-y:auto}._3GshpW_fieldInput::placeholder{color:var(--dsw-alias-label-caption)}._3GshpW_customInline{flex:1}._3GshpW_customBlock{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);--dsh-answer-field-padding:8px 12px;flex-shrink:0;min-height:64px;margin:0 12px}._3GshpW_customBlock:focus-within{border-color:var(--dsw-alias-state-business-primary)}._3GshpW_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding:0 10px 0 18px;display:flex}._3GshpW_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);text-align:right;flex:1;font-size:11px;line-height:16px}@media (width<=720px){._3GshpW_card{border-radius:var(--dsw-radius-xl)}._3GshpW_header{padding:10px 12px 0 18px}._3GshpW_options{padding:4px 8px}._3GshpW_title{font-size:15px;line-height:21px}._3GshpW_option,._3GshpW_customRow{padding:8px 6px}._3GshpW_footer{align-items:flex-end;padding:0 10px}._3GshpW_footerActions{flex-shrink:0}}@media (prefers-reduced-motion:reduce){._3GshpW_option,._3GshpW_customRow{transition:none}}";
360
- const tagId = "@deepseek-ai/dsh-client-ui-user-questions/QuestionComposer.module.css";
361
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
633
+ const css$1 = "._3GshpW_frame{padding:6px calc(var(--dsh-composer-side-clearance) + 16px) 10px;justify-content:center;display:flex}._3GshpW_card{width:100%;max-width:var(--dsh-chat-content-width);--dsw-elevation-stroke-color:var(--dsw-alias-border-l2-darkmode-thin);border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-input-major);max-height:min(60vh,520px);box-shadow:var(--dsw-elevation-panel);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border:0;flex-direction:column;padding:0 0 10px;display:flex;overflow:hidden}._3GshpW_card,._3GshpW_card *{box-sizing:border-box}._3GshpW_cardMinimized{max-height:none}._3GshpW_cardMinimized ._3GshpW_header{padding-bottom:14px}._3GshpW_headerActions{flex-shrink:0;align-items:center;gap:4px;display:flex}._3GshpW_waitButton{white-space:nowrap}._3GshpW_waitStatus{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:12px;line-height:24px}._3GshpW_header{flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 16px 0 24px;display:flex}._3GshpW_headingBlock{min-width:0}._3GshpW_eyebrow{color:var(--dsw-alias-label-tertiary);margin-bottom:5px;font-size:11px;line-height:16px}._3GshpW_title{margin:0;font-size:16px;font-weight:500;line-height:22px}._3GshpW_detail{margin:0 2px 8px}._3GshpW_footerActions{flex-shrink:0;align-items:center;gap:12px;display:flex}._3GshpW_pager{flex-shrink:0;align-items:center;gap:6px;display:flex}._3GshpW_progress{color:var(--dsw-alias-label-secondary);white-space:nowrap;word-spacing:-2px;padding:0 4px;font-size:14px;font-weight:500;line-height:24px}._3GshpW_iconButton{corner-shape:round;width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;place-items:center;padding:0;display:grid}._3GshpW_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._3GshpW_iconButton:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._3GshpW_body{overscroll-behavior:contain;flex-direction:column;flex:auto;min-height:0;display:flex;overflow-y:auto}._3GshpW_options{flex-direction:column;gap:1px;margin:8px 0 0;padding:4px 12px;display:flex}._3GshpW_option{border-radius:var(--dsw-radius-md);width:100%;min-height:40px;color:inherit;text-align:left;cursor:pointer;background:0 0;border:1px solid #0000;flex-shrink:0;align-items:flex-start;gap:8px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}._3GshpW_option:hover:not(:disabled),._3GshpW_optionSelected{background:var(--dsw-alias-interactive-bg-hover)}._3GshpW_optionSelected{border-color:var(--dsw-alias-border-l2)}._3GshpW_option:disabled{cursor:default}._3GshpW_number{border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-bg-overlay);width:20px;height:20px;color:var(--dsw-alias-label-secondary);flex:0 0 20px;place-items:center;margin-top:2px;font-size:12px;font-weight:500;line-height:18px;display:grid}._3GshpW_checkbox{flex:0 0 20px;place-items:center;width:20px;height:20px;margin-top:2px;display:grid}._3GshpW_checkbox:before{content:\"\";border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-xs);grid-area:1/1;width:14px;height:14px;transition:background-color .12s,border-color .12s}._3GshpW_checkbox>svg{grid-area:1/1}._3GshpW_checkboxChecked{color:var(--dsw-alias-label-primary-foreground)}._3GshpW_checkboxChecked:before{border-color:var(--dsw-alias-label-primary);background:var(--dsw-alias-label-primary)}._3GshpW_optionCopy{flex:1;min-width:0}._3GshpW_optionLine{flex-wrap:wrap;align-items:baseline;gap:2px 6px;display:flex}._3GshpW_optionLabel{font-size:14px;font-weight:500;line-height:24px}._3GshpW_badge{border-radius:var(--dsw-radius-xs);background:var(--dsw-specific-sidebar-nav-item-active-accent);color:var(--dsw-alias-button-info-fill);padding:0 4px;font-size:11px;font-weight:600;line-height:18px}._3GshpW_description{color:var(--dsw-alias-label-tertiary);font-size:14px;font-weight:400;line-height:24px}._3GshpW_reviewNote{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px 12px;font-size:14px;line-height:24px}._3GshpW_customRow{border-radius:var(--dsw-radius-md);border:1px solid #0000;flex-shrink:0;align-items:flex-start;gap:8px;width:100%;min-height:40px;padding:8px 12px 8px 8px;transition:background-color .12s,border-color .12s;display:flex}._3GshpW_customRow:hover,._3GshpW_customRow:focus-within,._3GshpW_customRowActive{background:var(--dsw-alias-interactive-bg-hover)}._3GshpW_customRow:focus-within,._3GshpW_customRowActive{border-color:var(--dsw-alias-border-l2)}._3GshpW_field{--dsh-answer-field-padding:0;min-width:0;display:grid}._3GshpW_field>*{min-width:0;padding:var(--dsh-answer-field-padding);font:inherit;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;grid-area:1/1;font-size:14px;line-height:24px}._3GshpW_fieldMirror{box-sizing:content-box;visibility:hidden;max-height:144px;overflow:hidden}._3GshpW_fieldInput{resize:none;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);background:0 0;border:none;outline:none;overflow-y:auto}._3GshpW_fieldInput::placeholder{color:var(--dsw-alias-label-caption)}._3GshpW_customInline{flex:1}._3GshpW_customBlock{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);--dsh-answer-field-padding:8px 12px;flex-shrink:0;min-height:64px;margin:0 12px}._3GshpW_customBlock:focus-within{border-color:var(--dsw-alias-state-business-primary)}._3GshpW_footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding:0 10px 0 18px;display:flex}._3GshpW_feedback{min-height:16px;color:var(--dsw-alias-state-error-primary);text-align:right;flex:1;font-size:11px;line-height:16px}@media (width<=720px){._3GshpW_card{border-radius:var(--dsw-radius-xl)}._3GshpW_header{padding:10px 12px 0 18px}._3GshpW_options{padding:4px 8px}._3GshpW_title{font-size:15px;line-height:21px}._3GshpW_option,._3GshpW_customRow{padding:8px 6px}._3GshpW_footer{align-items:flex-end;padding:0 10px}._3GshpW_footerActions{flex-shrink:0}}@media (prefers-reduced-motion:reduce){._3GshpW_option,._3GshpW_customRow{transition:none}}";
634
+ const tagId$1 = "@deepseek-ai/dsh-client-ui-user-questions/QuestionComposer.module.css";
635
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
362
636
  const tag = document.createElement("style");
363
637
  tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-user-questions";
364
- tag.dataset.pluginCss = tagId;
365
- tag.textContent = css;
638
+ tag.dataset.pluginCss = tagId$1;
639
+ tag.textContent = css$1;
366
640
  document.head.appendChild(tag);
367
641
  }
368
642
  var QuestionComposer_module_css_default = {
@@ -399,10 +673,21 @@ window.__ModuleLoader__.load({
399
673
  "options": "_3GshpW_options",
400
674
  "pager": "_3GshpW_pager",
401
675
  "progress": "_3GshpW_progress",
402
- "title": "_3GshpW_title"
676
+ "reviewNote": "_3GshpW_reviewNote",
677
+ "title": "_3GshpW_title",
678
+ "waitButton": "_3GshpW_waitButton",
679
+ "waitStatus": "_3GshpW_waitStatus"
403
680
  };
404
681
  //#endregion
405
682
  //#region lib/types/client/QuestionComposer.js
683
+ /** A removed card can remain mounted until the composer seat updates. */
684
+ const REMOVED_CARD = {
685
+ state: "open",
686
+ waitState: "counting",
687
+ countdown: void 0,
688
+ channel: "none",
689
+ closed: true
690
+ };
406
691
  /**
407
692
  * Split the conventional recommendation suffix without changing the answer value.
408
693
  * @param label - Original option label returned if selected.
@@ -418,6 +703,22 @@ window.__ModuleLoader__.load({
418
703
  recommended: false
419
704
  };
420
705
  }
706
+ /** Only a marked first choice is an implicit draft; the user still submits it. */
707
+ function recommendedFirstOption(question) {
708
+ const label = question.options?.[0]?.label;
709
+ return label !== void 0 && parseRecommendedLabel(label).recommended ? label : void 0;
710
+ }
711
+ /** Accept persisted progress only when it still describes this question batch. */
712
+ function isQuestionDraftProgress(value, questionCount) {
713
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
714
+ const progress = value;
715
+ if (typeof progress.index !== "number" || !Number.isInteger(progress.index) || progress.index < 0 || progress.index >= questionCount || !Array.isArray(progress.drafts) || progress.drafts.length !== questionCount || progress.wait !== void 0 && progress.wait !== "editing" && progress.wait !== "waiting") return false;
716
+ return progress.drafts.every((item) => {
717
+ if (typeof item !== "object" || item === null || Array.isArray(item)) return false;
718
+ const draft = item;
719
+ return Array.isArray(draft.selected) && draft.selected.every((label) => typeof label === "string") && typeof draft.custom === "string" && typeof draft.skipped === "boolean";
720
+ });
721
+ }
421
722
  /** Return whether a text-field key event belongs to an active IME composition. */
422
723
  function isComposing(event) {
423
724
  return event.nativeEvent.isComposing || Reflect.get(event.nativeEvent, "keyCode") === 229;
@@ -479,6 +780,7 @@ window.__ModuleLoader__.load({
479
780
  pending: question,
480
781
  t: props.t,
481
782
  useStore: props.useStore,
783
+ useQuestionCard: props.useQuestionCard,
482
784
  actions: props.actions
483
785
  }, question.key) : (0, react_jsx_runtime.jsx)(PlanReviewPanel, {
484
786
  pending: question,
@@ -487,8 +789,9 @@ window.__ModuleLoader__.load({
487
789
  renderSlot: props.renderSlot
488
790
  }, question.key);
489
791
  }
490
- function QuestionFlow({ pending, t, useStore, actions }) {
792
+ function QuestionFlow({ pending, t, useStore, useQuestionCard, actions }) {
491
793
  const questions = pending.questions;
794
+ const review = pending.review;
492
795
  const markdownLabels = (0, react.useMemo)(() => ({
493
796
  code: {
494
797
  copyLabel: t("copy"),
@@ -501,39 +804,127 @@ window.__ModuleLoader__.load({
501
804
  },
502
805
  footnotes: t("markdown.footnotes")
503
806
  }), [t]);
504
- const initialProgress = (0, react.useMemo)(() => ({
505
- index: 0,
506
- drafts: questions.map(() => ({
507
- selected: [],
508
- custom: "",
509
- skipped: false
510
- }))
511
- }), [questions]);
512
- const { index, drafts } = useStore((state) => state.requestKey === pending.key && state.progress.drafts.length === questions.length ? state.progress : void 0) ?? initialProgress;
807
+ const initialDrafts = (0, react.useMemo)(() => {
808
+ const recorded = new Map((review ?? []).map((answer) => [answer.id, answer]));
809
+ return questions.map((item) => {
810
+ const answer = recorded.get(item.id);
811
+ const custom = answer?.custom ?? "";
812
+ const recommended = review === void 0 ? recommendedFirstOption(item) : void 0;
813
+ return {
814
+ selected: answer === void 0 && recommended !== void 0 ? [recommended] : [...answer?.selected ?? []],
815
+ custom,
816
+ skipped: answer !== void 0 && answer.selected.length === 0 && custom === ""
817
+ };
818
+ });
819
+ }, [questions, review]);
820
+ const stored = useStore((state) => state.progressByRequest[pending.key]);
821
+ const validStored = isQuestionDraftProgress(stored, questions.length) ? stored : void 0;
822
+ const storedProgress = review === void 0 ? validStored : void 0;
823
+ const index = validStored?.index ?? 0;
824
+ const drafts = storedProgress?.drafts ?? initialDrafts;
825
+ const restoredWait = storedProgress?.wait ?? (storedProgress?.drafts.some((item, itemIndex) => item.selected.length !== initialDrafts[itemIndex]?.selected.length || item.selected.some((label, labelIndex) => label !== initialDrafts[itemIndex]?.selected[labelIndex]) || item.custom !== "" || item.skipped) === true ? "editing" : void 0);
513
826
  const [busy, setBusy] = (0, react.useState)(null);
514
827
  const [error, setError] = (0, react.useState)(null);
828
+ const card = useQuestionCard(pending.key, (snapshot) => snapshot ?? REMOVED_CARD);
829
+ const canSubmit = card.channel !== "none";
830
+ const locked = busy !== null || review !== void 0;
831
+ const sentVia = (0, react.useRef)(null);
832
+ (0, react.useEffect)(() => {
833
+ if (sentVia.current !== "waterfall" || card.state !== "continued") return;
834
+ sentVia.current = null;
835
+ setBusy(null);
836
+ setError({ key: "error.resubmit" });
837
+ }, [card.state]);
838
+ (0, react.useEffect)(() => {
839
+ if (card.closed) actions.clear(pending.key);
840
+ }, [
841
+ actions,
842
+ card.closed,
843
+ pending.key
844
+ ]);
845
+ (0, react.useEffect)(() => {
846
+ actions.prune(pending.liveKeys());
847
+ }, [actions, pending]);
848
+ const waitDisposition = (0, react.useRef)(restoredWait);
849
+ (0, react.useEffect)(() => {
850
+ if (waitDisposition.current === "waiting") pending.takeTime();
851
+ if (waitDisposition.current === "editing") pending.engage();
852
+ }, [pending]);
853
+ const countdown = card.countdown;
515
854
  const [minimized, setMinimized] = (0, react.useState)(false);
516
855
  const focusedQuestions = (0, react.useRef)(/* @__PURE__ */ new Set());
856
+ const answerSurface = (0, react.useRef)(null);
517
857
  const question = questions[index];
518
858
  const draft = drafts[index];
519
859
  const hasOptions = (question.options?.length ?? 0) > 0;
520
860
  const replaceProgress = (nextIndex, nextDrafts) => {
521
861
  actions.replace(pending.key, {
522
862
  index: nextIndex,
523
- drafts: nextDrafts
863
+ drafts: nextDrafts,
864
+ ...waitDisposition.current === void 0 ? {} : { wait: waitDisposition.current }
524
865
  });
525
866
  };
526
- const cancelFlow = () => {
867
+ const takeTime = () => {
868
+ waitDisposition.current = "waiting";
869
+ pending.takeTime();
870
+ replaceProgress(index, drafts);
871
+ };
872
+ const engage = () => {
873
+ if (waitDisposition.current !== void 0) return;
874
+ waitDisposition.current = "editing";
875
+ pending.engage();
876
+ };
877
+ const focusAnswerSurface = (event) => {
878
+ if (!event.currentTarget.contains(event.relatedTarget)) pending.holdFocus();
879
+ };
880
+ const blurAnswerSurface = (event) => {
881
+ if (!event.currentTarget.contains(event.relatedTarget)) pending.releaseFocus();
882
+ };
883
+ (0, react.useEffect)(() => {
884
+ const release = () => {
885
+ pending.releaseFocus();
886
+ };
887
+ const refocus = () => {
888
+ if (waitDisposition.current === "editing") {
889
+ pending.engage();
890
+ return;
891
+ }
892
+ if (answerSurface.current?.contains(document.activeElement) === true) pending.holdFocus();
893
+ };
894
+ const visibilityChanged = () => {
895
+ if (document.hidden) release();
896
+ else refocus();
897
+ };
898
+ window.addEventListener("blur", release);
899
+ window.addEventListener("focus", refocus);
900
+ document.addEventListener("visibilitychange", visibilityChanged);
901
+ return () => {
902
+ release();
903
+ window.removeEventListener("blur", release);
904
+ window.removeEventListener("focus", refocus);
905
+ document.removeEventListener("visibilitychange", visibilityChanged);
906
+ };
907
+ }, [pending]);
908
+ const dismissFlow = () => {
909
+ if (pending.dismissal === "hide") {
910
+ pending.dismiss();
911
+ return;
912
+ }
913
+ if (!canSubmit) {
914
+ setError({ key: "error.unavailable" });
915
+ return;
916
+ }
527
917
  setBusy("cancel");
528
918
  setError(null);
529
- pending.cancel().then(() => {
530
- actions.clear(pending.key);
531
- }).catch((cause) => {
919
+ sentVia.current = "waterfall";
920
+ pending.dismiss().catch((cause) => {
921
+ sentVia.current = null;
532
922
  setBusy(null);
533
923
  setError({ text: cause instanceof Error ? cause.message : String(cause) });
534
924
  });
535
925
  };
536
926
  const updateDraft = (update, nextIndex = index) => {
927
+ engage();
537
928
  replaceProgress(nextIndex, drafts.map((item, itemIndex) => itemIndex === index ? update(item) : item));
538
929
  setError(null);
539
930
  };
@@ -563,6 +954,10 @@ window.__ModuleLoader__.load({
563
954
  setError({ key: "error.incomplete" });
564
955
  return;
565
956
  }
957
+ if (!canSubmit) {
958
+ setError({ key: "error.unavailable" });
959
+ return;
960
+ }
566
961
  const answer = { answers: questions.map((item, itemIndex) => {
567
962
  const value = values[itemIndex];
568
963
  if (value.skipped) return {
@@ -578,9 +973,18 @@ window.__ModuleLoader__.load({
578
973
  }) };
579
974
  setBusy("answer");
580
975
  setError(null);
976
+ const channel = pending.snapshot().channel;
977
+ sentVia.current = channel === "waterfall" ? "waterfall" : null;
581
978
  pending.answer(answer).then(() => {
582
- actions.clear(pending.key);
979
+ if (channel !== "rpc") return;
980
+ sentVia.current = null;
981
+ setBusy(null);
982
+ setError(null);
983
+ pending.dismiss().catch(() => {
984
+ setError({ key: "status.sent" });
985
+ });
583
986
  }).catch((cause) => {
987
+ sentVia.current = null;
584
988
  setBusy(null);
585
989
  setError({ text: cause instanceof Error ? cause.message : String(cause) });
586
990
  });
@@ -612,6 +1016,7 @@ window.__ModuleLoader__.load({
612
1016
  continueFlow();
613
1017
  };
614
1018
  const skipQuestion = () => {
1019
+ engage();
615
1020
  const nextDrafts = drafts.map((item, itemIndex) => itemIndex === index ? {
616
1021
  selected: [],
617
1022
  custom: "",
@@ -642,30 +1047,58 @@ window.__ModuleLoader__.load({
642
1047
  })]
643
1048
  }), (0, react_jsx_runtime.jsxs)("div", {
644
1049
  className: QuestionComposer_module_css_default.headerActions,
645
- children: [(0, react_jsx_runtime.jsx)("button", {
646
- type: "button",
647
- className: QuestionComposer_module_css_default.iconButton,
648
- "aria-label": t(minimized ? "nav.maximize" : "nav.minimize"),
649
- title: t(minimized ? "nav.maximize" : "nav.minimize"),
650
- "aria-expanded": !minimized,
651
- disabled: busy !== null,
652
- onClick: () => {
653
- setMinimized((current) => !current);
654
- },
655
- children: minimized ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronUpOutlineRegular, {}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {})
656
- }), (0, react_jsx_runtime.jsx)("button", {
657
- type: "button",
658
- className: QuestionComposer_module_css_default.iconButton,
659
- "aria-label": t("nav.cancel"),
660
- title: t("nav.cancel"),
661
- disabled: busy !== null,
662
- onClick: cancelFlow,
663
- children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, {})
664
- })]
1050
+ children: [
1051
+ countdown !== void 0 && card.waitState !== "waiting" && card.waitState !== "editing" && card.waitState !== "continued" && (0, react_jsx_runtime.jsx)("span", {
1052
+ className: QuestionComposer_module_css_default.waitStatus,
1053
+ children: t(countdown.running ? "wait.countdown" : "wait.paused", { seconds: Math.ceil(countdown.remainingMs / 1e3) })
1054
+ }),
1055
+ countdown !== void 0 && card.waitState !== "waiting" && card.waitState !== "editing" && card.waitState !== "continued" && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
1056
+ variant: "outline",
1057
+ className: QuestionComposer_module_css_default.waitButton,
1058
+ onClick: takeTime,
1059
+ children: t("wait.takeTime")
1060
+ }),
1061
+ card.state === "continued" && (0, react_jsx_runtime.jsx)("span", {
1062
+ className: QuestionComposer_module_css_default.waitStatus,
1063
+ children: t("wait.continued")
1064
+ }),
1065
+ countdown !== void 0 && (card.waitState === "waiting" || card.waitState === "editing") && (0, react_jsx_runtime.jsx)("span", {
1066
+ className: QuestionComposer_module_css_default.waitStatus,
1067
+ children: t("wait.held")
1068
+ }),
1069
+ review !== void 0 && (0, react_jsx_runtime.jsx)("span", {
1070
+ className: QuestionComposer_module_css_default.waitStatus,
1071
+ children: t("review.status")
1072
+ }),
1073
+ (0, react_jsx_runtime.jsx)("button", {
1074
+ type: "button",
1075
+ className: QuestionComposer_module_css_default.iconButton,
1076
+ "aria-label": t(minimized ? "nav.maximize" : "nav.minimize"),
1077
+ title: t(minimized ? "nav.maximize" : "nav.minimize"),
1078
+ "aria-expanded": !minimized,
1079
+ disabled: busy !== null,
1080
+ onClick: () => {
1081
+ setMinimized((current) => !current);
1082
+ },
1083
+ children: minimized ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronUpOutlineRegular, {}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {})
1084
+ }),
1085
+ (0, react_jsx_runtime.jsx)("button", {
1086
+ type: "button",
1087
+ className: QuestionComposer_module_css_default.iconButton,
1088
+ "aria-label": t(pending.dismissal === "hide" ? "nav.close" : "nav.cancel"),
1089
+ title: t(pending.dismissal === "hide" ? "nav.close" : "nav.cancel"),
1090
+ disabled: busy !== null,
1091
+ onClick: dismissFlow,
1092
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, {})
1093
+ })
1094
+ ]
665
1095
  })]
666
1096
  }), !minimized && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
1097
+ ref: answerSurface,
667
1098
  className: QuestionComposer_module_css_default.body,
668
1099
  "data-question-scroll": true,
1100
+ onFocusCapture: focusAnswerSurface,
1101
+ onBlurCapture: blurAnswerSurface,
669
1102
  children: [question.detail !== void 0 && (0, react_jsx_runtime.jsx)("div", {
670
1103
  className: QuestionComposer_module_css_default.detail,
671
1104
  children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
@@ -675,82 +1108,89 @@ window.__ModuleLoader__.load({
675
1108
  }), (0, react_jsx_runtime.jsxs)("div", {
676
1109
  className: QuestionComposer_module_css_default.options,
677
1110
  role: question.multiSelect === true ? "group" : "radiogroup",
678
- children: [(question.options ?? []).map((option, optionIndex) => {
679
- const selected = draft.selected.includes(option.label);
680
- const display = parseRecommendedLabel(option.label);
681
- return (0, react_jsx_runtime.jsxs)("button", {
682
- type: "button",
683
- className: clsx(QuestionComposer_module_css_default.option, selected && question.multiSelect !== true && QuestionComposer_module_css_default.optionSelected),
684
- role: question.multiSelect === true ? "checkbox" : "radio",
685
- "aria-checked": selected,
686
- "aria-label": display.label,
687
- disabled: busy !== null,
688
- onClick: () => {
689
- choose(option.label);
690
- },
691
- onKeyDown: (event) => {
692
- if (event.key !== "Enter" || !drafts.every(completed)) return;
693
- event.preventDefault();
694
- submitDrafts(drafts);
695
- },
1111
+ children: [
1112
+ (question.options ?? []).map((option, optionIndex) => {
1113
+ const selected = draft.selected.includes(option.label);
1114
+ const display = parseRecommendedLabel(option.label);
1115
+ return (0, react_jsx_runtime.jsxs)("button", {
1116
+ type: "button",
1117
+ className: clsx(QuestionComposer_module_css_default.option, selected && question.multiSelect !== true && QuestionComposer_module_css_default.optionSelected),
1118
+ role: question.multiSelect === true ? "checkbox" : "radio",
1119
+ "aria-checked": selected,
1120
+ "aria-label": display.label,
1121
+ disabled: locked,
1122
+ onClick: () => {
1123
+ choose(option.label);
1124
+ },
1125
+ onKeyDown: (event) => {
1126
+ if (event.key !== "Enter") return;
1127
+ event.preventDefault();
1128
+ submitDrafts(drafts);
1129
+ },
1130
+ children: [question.multiSelect === true ? (0, react_jsx_runtime.jsx)("span", {
1131
+ className: clsx(QuestionComposer_module_css_default.checkbox, selected && QuestionComposer_module_css_default.checkboxChecked),
1132
+ "aria-hidden": "true",
1133
+ children: selected && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, { size: 12 })
1134
+ }) : (0, react_jsx_runtime.jsx)("span", {
1135
+ className: QuestionComposer_module_css_default.number,
1136
+ children: optionIndex + 1
1137
+ }), (0, react_jsx_runtime.jsx)("span", {
1138
+ className: QuestionComposer_module_css_default.optionCopy,
1139
+ children: (0, react_jsx_runtime.jsxs)("span", {
1140
+ className: QuestionComposer_module_css_default.optionLine,
1141
+ children: [
1142
+ (0, react_jsx_runtime.jsx)("span", {
1143
+ className: QuestionComposer_module_css_default.optionLabel,
1144
+ children: display.label
1145
+ }),
1146
+ display.recommended && (0, react_jsx_runtime.jsx)("span", {
1147
+ className: QuestionComposer_module_css_default.badge,
1148
+ children: t("option.recommended")
1149
+ }),
1150
+ option.description !== void 0 && (0, react_jsx_runtime.jsx)("span", {
1151
+ className: QuestionComposer_module_css_default.description,
1152
+ children: option.description
1153
+ })
1154
+ ]
1155
+ })
1156
+ })]
1157
+ }, `${option.label}-${String(optionIndex)}`);
1158
+ }),
1159
+ review !== void 0 && draft.skipped && (0, react_jsx_runtime.jsx)("p", {
1160
+ className: QuestionComposer_module_css_default.reviewNote,
1161
+ children: t("review.skipped")
1162
+ }),
1163
+ (review === void 0 || draft.custom !== "") && (hasOptions ? (0, react_jsx_runtime.jsxs)("div", {
1164
+ className: clsx(QuestionComposer_module_css_default.customRow, draft.custom !== "" && QuestionComposer_module_css_default.customRowActive),
696
1165
  children: [question.multiSelect === true ? (0, react_jsx_runtime.jsx)("span", {
697
- className: clsx(QuestionComposer_module_css_default.checkbox, selected && QuestionComposer_module_css_default.checkboxChecked),
1166
+ className: clsx(QuestionComposer_module_css_default.checkbox, draft.custom !== "" && QuestionComposer_module_css_default.checkboxChecked),
698
1167
  "aria-hidden": "true",
699
- children: selected && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, { size: 12 })
1168
+ children: draft.custom !== "" && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, { size: 12 })
700
1169
  }) : (0, react_jsx_runtime.jsx)("span", {
701
1170
  className: QuestionComposer_module_css_default.number,
702
- children: optionIndex + 1
703
- }), (0, react_jsx_runtime.jsx)("span", {
704
- className: QuestionComposer_module_css_default.optionCopy,
705
- children: (0, react_jsx_runtime.jsxs)("span", {
706
- className: QuestionComposer_module_css_default.optionLine,
707
- children: [
708
- (0, react_jsx_runtime.jsx)("span", {
709
- className: QuestionComposer_module_css_default.optionLabel,
710
- children: display.label
711
- }),
712
- display.recommended && (0, react_jsx_runtime.jsx)("span", {
713
- className: QuestionComposer_module_css_default.badge,
714
- children: t("option.recommended")
715
- }),
716
- option.description !== void 0 && (0, react_jsx_runtime.jsx)("span", {
717
- className: QuestionComposer_module_css_default.description,
718
- children: option.description
719
- })
720
- ]
721
- })
1171
+ "aria-hidden": "true",
1172
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 12 })
1173
+ }), (0, react_jsx_runtime.jsx)(AnswerField, {
1174
+ variant: "inline",
1175
+ value: draft.custom,
1176
+ disabled: locked,
1177
+ placeholder: t("custom.placeholder"),
1178
+ onChange: draftCustom,
1179
+ onKeyDown: continueFromCustom
722
1180
  })]
723
- }, `${option.label}-${String(optionIndex)}`);
724
- }), hasOptions ? (0, react_jsx_runtime.jsxs)("div", {
725
- className: clsx(QuestionComposer_module_css_default.customRow, draft.custom !== "" && QuestionComposer_module_css_default.customRowActive),
726
- children: [question.multiSelect === true ? (0, react_jsx_runtime.jsx)("span", {
727
- className: clsx(QuestionComposer_module_css_default.checkbox, draft.custom !== "" && QuestionComposer_module_css_default.checkboxChecked),
728
- "aria-hidden": "true",
729
- children: draft.custom !== "" && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, { size: 12 })
730
- }) : (0, react_jsx_runtime.jsx)("span", {
731
- className: QuestionComposer_module_css_default.number,
732
- "aria-hidden": "true",
733
- children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 12 })
734
- }), (0, react_jsx_runtime.jsx)(AnswerField, {
735
- variant: "inline",
1181
+ }) : (0, react_jsx_runtime.jsx)(AnswerField, {
1182
+ autoFocus: canSubmit && countdown === void 0 && !locked && !focusedQuestions.current.has(index),
1183
+ variant: "block",
736
1184
  value: draft.custom,
737
- disabled: busy !== null,
1185
+ disabled: locked,
738
1186
  placeholder: t("custom.placeholder"),
1187
+ onFocus: () => {
1188
+ focusedQuestions.current.add(index);
1189
+ },
739
1190
  onChange: draftCustom,
740
1191
  onKeyDown: continueFromCustom
741
- })]
742
- }) : (0, react_jsx_runtime.jsx)(AnswerField, {
743
- autoFocus: !focusedQuestions.current.has(index),
744
- variant: "block",
745
- value: draft.custom,
746
- disabled: busy !== null,
747
- placeholder: t("custom.placeholder"),
748
- onFocus: () => {
749
- focusedQuestions.current.add(index);
750
- },
751
- onChange: draftCustom,
752
- onKeyDown: continueFromCustom
753
- })]
1192
+ }))
1193
+ ]
754
1194
  })]
755
1195
  }), (0, react_jsx_runtime.jsxs)("footer", {
756
1196
  className: QuestionComposer_module_css_default.footer,
@@ -795,7 +1235,7 @@ window.__ModuleLoader__.load({
795
1235
  role: "status",
796
1236
  children: error === null ? null : "key" in error ? t(error.key) : error.text
797
1237
  }),
798
- (0, react_jsx_runtime.jsxs)("div", {
1238
+ review === void 0 && (0, react_jsx_runtime.jsxs)("div", {
799
1239
  className: QuestionComposer_module_css_default.footerActions,
800
1240
  children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
801
1241
  variant: "outline",
@@ -804,7 +1244,7 @@ window.__ModuleLoader__.load({
804
1244
  children: t("action.skip")
805
1245
  }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
806
1246
  variant: "primary",
807
- disabled: busy !== null || !answered(draft),
1247
+ disabled: busy !== null || !answered(draft) || index === questions.length - 1 && !canSubmit,
808
1248
  onClick: continueFlow,
809
1249
  children: busy === "answer" ? t("submitting") : index === questions.length - 1 ? t("submit") : t("action.next")
810
1250
  })]
@@ -815,17 +1255,355 @@ window.__ModuleLoader__.load({
815
1255
  });
816
1256
  }
817
1257
  //#endregion
1258
+ //#region ../../core/session/src/surface.ts
1259
+ /** Runtime counterpart of the message-producing event union. */
1260
+ const SURFACE_EVENT_TYPES = new Set([
1261
+ "system/message",
1262
+ "developer/message",
1263
+ "user/message",
1264
+ "assistant/message",
1265
+ "tool/result"
1266
+ ]);
1267
+ /**
1268
+ * Narrow an event to a surface-eligible event carrying its required marker.
1269
+ * @param event - event to test.
1270
+ * @returns true when both the type and marker identify a surface event.
1271
+ */
1272
+ function isSurfaceEvent(event) {
1273
+ if (!SURFACE_EVENT_TYPES.has(event.type)) return false;
1274
+ return event.surfaceOp !== void 0;
1275
+ }
1276
+ /**
1277
+ * Narrow an event to an append-origin surface event: one that entered the
1278
+ * surface at its own log position and was never itself a replacement copy.
1279
+ *
1280
+ * The model-visible surface deliberately shadows replaced ranges, so it is the
1281
+ * wrong source for a human transcript — a landed replacement would erase
1282
+ * conversation the user already saw. Append-origin events are that transcript's
1283
+ * durable source material; replacement copies stay model-only.
1284
+ * @param event - event to test.
1285
+ * @returns true when the event appended to the surface tail.
1286
+ */
1287
+ function isAppendSurfaceEvent(event) {
1288
+ return isSurfaceEvent(event) && event.surfaceOp === "append";
1289
+ }
1290
+ //#endregion
1291
+ //#region lib/types/client/question-reply.js
1292
+ function isRecord(value) {
1293
+ return typeof value === "object" && value !== null && !Array.isArray(value);
1294
+ }
1295
+ /**
1296
+ * Read the question and answer pairs out of the reply text at the conversation boundary.
1297
+ * @param text - Model-facing JSON payload of the steered message.
1298
+ * @returns The pairs, or empty lists when the payload is unreadable.
1299
+ */
1300
+ function replyPairsOf(text) {
1301
+ let value;
1302
+ try {
1303
+ value = JSON.parse(text);
1304
+ } catch (error) {
1305
+ return {
1306
+ questions: [],
1307
+ answers: []
1308
+ };
1309
+ }
1310
+ if (!isRecord(value) || !Array.isArray(value.questions)) return {
1311
+ questions: [],
1312
+ answers: []
1313
+ };
1314
+ const questions = [];
1315
+ for (const question of value.questions) {
1316
+ if (!isRecord(question) || typeof question.id !== "string" || typeof question.question !== "string") continue;
1317
+ questions.push({
1318
+ id: question.id,
1319
+ question: question.question,
1320
+ ...typeof question.detail === "string" ? { detail: question.detail } : {},
1321
+ ...typeof question.header === "string" ? { header: question.header } : {},
1322
+ ...Array.isArray(question.options) ? { options: question.options.flatMap((option) => {
1323
+ if (!isRecord(option) || typeof option.label !== "string") return [];
1324
+ return [{
1325
+ label: option.label,
1326
+ ...typeof option.description === "string" ? { description: option.description } : {}
1327
+ }];
1328
+ }) } : {},
1329
+ ...typeof question.multiSelect === "boolean" ? { multiSelect: question.multiSelect } : {}
1330
+ });
1331
+ }
1332
+ const answers = [];
1333
+ for (const answer of Array.isArray(value.answers) ? value.answers : []) {
1334
+ if (!isRecord(answer) || typeof answer.id !== "string" || !Array.isArray(answer.selected)) continue;
1335
+ answers.push({
1336
+ id: answer.id,
1337
+ selected: answer.selected.filter((item) => typeof item === "string"),
1338
+ ...typeof answer.custom === "string" ? { custom: answer.custom } : {}
1339
+ });
1340
+ }
1341
+ return {
1342
+ questions,
1343
+ answers
1344
+ };
1345
+ }
1346
+ /**
1347
+ * Answer values of one question in display order: the selected option labels
1348
+ * followed by a non-blank custom answer.
1349
+ * @param data - Projected reply holding the recorded answers.
1350
+ * @param id - Question id to read.
1351
+ * @returns The values, empty when the user skipped that question.
1352
+ */
1353
+ function replyAnswerValues(data, id) {
1354
+ const answer = data.answers.find((item) => item.id === id);
1355
+ const custom = answer?.custom?.trim() ?? "";
1356
+ return [...answer?.selected ?? [], ...custom === "" ? [] : [custom]];
1357
+ }
1358
+ /**
1359
+ * Clipboard text of one late reply: every question with the answer the user
1360
+ * gave, in the layout the open bubble shows, without the options nobody chose.
1361
+ * The text does not depend on whether the bubble is open.
1362
+ * @param data - Projected reply to copy.
1363
+ * @param t - Bound `question` namespace translator owning the answer labels.
1364
+ * @returns One block per question, or the model-facing text when the payload was unreadable.
1365
+ */
1366
+ function replyClipboardText(data, t) {
1367
+ if (data.questions.length === 0) return data.text;
1368
+ return data.questions.map((question) => {
1369
+ const values = replyAnswerValues(data, question.id);
1370
+ return `${question.header && question.header !== question.question ? `${question.header} — ${question.question}` : question.question}\n${values.length === 0 ? t("reply.skipped") : `${t("reply.answerLabel")}${values.join(", ")}`}`;
1371
+ }).join("\n\n");
1372
+ }
1373
+ /** Validate a late reply source at the persisted conversation boundary. */
1374
+ function replySource(event) {
1375
+ const source = event.data.source;
1376
+ return isRecord(source) && source.kind === "user-question-reply" && typeof source.callId === "string" && source.outcome === "answered" ? {
1377
+ callId: source.callId,
1378
+ outcome: "answered"
1379
+ } : null;
1380
+ }
1381
+ /** Late-reply projection owned by the questions UI. */
1382
+ const questionReplyDefinition = {
1383
+ kind: "user-question-reply",
1384
+ target: "chat",
1385
+ match: (event) => {
1386
+ if (event.type !== "user/message" || !isAppendSurfaceEvent(event)) return null;
1387
+ return replySource(event) === null ? null : {
1388
+ id: String(event.data.id),
1389
+ role: "start"
1390
+ };
1391
+ },
1392
+ start: (_context, match) => {
1393
+ if (match.event.type !== "user/message") throw new Error("user-question-reply start requires user/message");
1394
+ const event = match.event;
1395
+ const text = event.data.content.find((item) => item.type === "text")?.text ?? "";
1396
+ const source = replySource(event);
1397
+ if (source === null) throw new Error("user-question-reply start requires a reply source");
1398
+ return {
1399
+ seq: event.seq,
1400
+ time: event.time,
1401
+ callId: source.callId,
1402
+ outcome: source.outcome,
1403
+ text,
1404
+ ...replyPairsOf(text)
1405
+ };
1406
+ },
1407
+ update: (context) => context.state,
1408
+ buildViewNode: (context) => {
1409
+ if (context.state === void 0) return null;
1410
+ const { seq, ...data } = context.state;
1411
+ return {
1412
+ key: context.key,
1413
+ kind: "question-reply",
1414
+ id: context.id,
1415
+ target: "chat",
1416
+ anchorSeq: seq,
1417
+ location: context.start?.location ?? { kind: "unresolved" },
1418
+ visibility: "visible",
1419
+ data
1420
+ };
1421
+ }
1422
+ };
1423
+ //#endregion
1424
+ //#region \0dsh-css:/Users/songli/deepseek-harness/packages/client/ui-user-questions/src/client/QuestionReplyView.module.css.mjs
1425
+ const css = ".XHxPVq_row{flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:6px;padding:4px 0;display:flex}.XHxPVq_bubble{border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-bubble);max-width:72%;color:var(--dsw-alias-label-primary);cursor:pointer;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));text-align:left;overflow-wrap:anywhere;white-space:pre-wrap;padding:10px 16px}.XHxPVq_toggle{width:100%;color:inherit;cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;padding:0}.XHxPVq_toggle:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.XHxPVq_bubble:has(.XHxPVq_toggle:focus-visible){box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}.XHxPVq_labelRow{align-items:center;gap:3px;display:flex}.XHxPVq_caret{color:var(--dsw-alias-label-secondary);display:inline-flex}.XHxPVq_caret svg{width:12px;height:12px}.XHxPVq_label{color:var(--dsw-alias-label-secondary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(18px + var(--dsh-content-font-delta-secondary,0px));display:block}.XHxPVq_summary{color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size,14px);margin-top:3px;display:block}.XHxPVq_text{margin:8px 0 0}.XHxPVq_details{border-top:1px solid color-mix(in srgb, var(--dsw-alias-label-secondary) 24%, transparent);margin:8px 0 0;padding-top:8px}.XHxPVq_details>div+div{margin-top:12px}.XHxPVq_details dt{color:var(--dsw-alias-label-secondary);font-size:12px}.XHxPVq_question{gap:3px;display:grid}.XHxPVq_header,.XHxPVq_detail,.XHxPVq_options{color:var(--dsw-alias-label-secondary);font-size:11px}.XHxPVq_questionText{color:var(--dsw-alias-label-primary)}.XHxPVq_options{margin:0;padding-left:16px}.XHxPVq_details dd{margin:4px 0 0}.XHxPVq_answer{font-size:14px}.XHxPVq_answerLabel{color:var(--dsw-alias-label-secondary);margin-right:4px;font-size:12px}.XHxPVq_actions{height:28px;color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;padding-right:4px;display:flex}.XHxPVq_time{white-space:nowrap;padding-right:4px;font-size:13px;line-height:24px}.XHxPVq_action{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:inherit;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:6px;display:inline-flex}.XHxPVq_action svg{width:15px;height:15px}.XHxPVq_action:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}";
1426
+ const tagId = "@deepseek-ai/dsh-client-ui-user-questions/QuestionReplyView.module.css";
1427
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
1428
+ const tag = document.createElement("style");
1429
+ tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-user-questions";
1430
+ tag.dataset.pluginCss = tagId;
1431
+ tag.textContent = css;
1432
+ document.head.appendChild(tag);
1433
+ }
1434
+ var QuestionReplyView_module_css_default = {
1435
+ "action": "XHxPVq_action",
1436
+ "actions": "XHxPVq_actions",
1437
+ "answer": "XHxPVq_answer",
1438
+ "answerLabel": "XHxPVq_answerLabel",
1439
+ "bubble": "XHxPVq_bubble",
1440
+ "caret": "XHxPVq_caret",
1441
+ "detail": "XHxPVq_detail",
1442
+ "details": "XHxPVq_details",
1443
+ "header": "XHxPVq_header",
1444
+ "label": "XHxPVq_label",
1445
+ "labelRow": "XHxPVq_labelRow",
1446
+ "options": "XHxPVq_options",
1447
+ "question": "XHxPVq_question",
1448
+ "questionText": "XHxPVq_questionText",
1449
+ "row": "XHxPVq_row",
1450
+ "summary": "XHxPVq_summary",
1451
+ "text": "XHxPVq_text",
1452
+ "time": "XHxPVq_time",
1453
+ "toggle": "XHxPVq_toggle"
1454
+ };
1455
+ //#endregion
1456
+ //#region lib/types/client/QuestionReplyView.js
1457
+ /**
1458
+ * Right-aligned late-reply bubble: a label naming the earlier pending
1459
+ * questions, then one question and answer pair per question. A payload the
1460
+ * Client cannot read falls back to the model-facing text.
1461
+ */
1462
+ const QuestionReplyView = (0, react.memo)(function QuestionReplyView({ node, t }) {
1463
+ return (0, react_jsx_runtime.jsx)(QuestionReplyBubble, {
1464
+ data: node.data,
1465
+ t
1466
+ });
1467
+ });
1468
+ /**
1469
+ * Render one settled question reply as a compact transcript bubble.
1470
+ * @param props - Reply data and the question locale translator.
1471
+ * @returns The expandable reply bubble.
1472
+ */
1473
+ function QuestionReplyBubble({ data, t }) {
1474
+ const label = t("reply.label");
1475
+ const [open, setOpen] = (0, react.useState)(false);
1476
+ const toggleLabel = t(open ? "reply.close" : "reply.open");
1477
+ const summary = data.questions.map((question) => replyAnswerValues(data, question.id)).flat().join(", ");
1478
+ const copyText = replyClipboardText(data, t);
1479
+ const [copied, setCopied] = (0, react.useState)(false);
1480
+ const onCopy = (0, react.useCallback)(() => {
1481
+ if (copied) return;
1482
+ (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(copyText).then((ok) => {
1483
+ if (!ok) return;
1484
+ setCopied(true);
1485
+ window.setTimeout(() => {
1486
+ setCopied(false);
1487
+ }, 1e3);
1488
+ });
1489
+ }, [copied, copyText]);
1490
+ return (0, react_jsx_runtime.jsxs)("div", {
1491
+ className: QuestionReplyView_module_css_default.row,
1492
+ "data-question-reply": data.callId,
1493
+ "data-reply-outcome": data.outcome,
1494
+ role: "group",
1495
+ "aria-label": label,
1496
+ children: [(0, react_jsx_runtime.jsxs)("div", {
1497
+ className: QuestionReplyView_module_css_default.bubble,
1498
+ children: [(0, react_jsx_runtime.jsxs)("button", {
1499
+ type: "button",
1500
+ className: QuestionReplyView_module_css_default.toggle,
1501
+ "aria-expanded": open,
1502
+ "aria-label": `${label} · ${toggleLabel}`,
1503
+ onClick: () => {
1504
+ setOpen((value) => !value);
1505
+ },
1506
+ children: [(0, react_jsx_runtime.jsxs)("span", {
1507
+ className: QuestionReplyView_module_css_default.labelRow,
1508
+ children: [(0, react_jsx_runtime.jsx)("span", {
1509
+ className: QuestionReplyView_module_css_default.caret,
1510
+ "aria-hidden": "true",
1511
+ children: open ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, {})
1512
+ }), (0, react_jsx_runtime.jsx)("span", {
1513
+ className: QuestionReplyView_module_css_default.label,
1514
+ children: label
1515
+ })]
1516
+ }), !open && (0, react_jsx_runtime.jsx)("span", {
1517
+ className: QuestionReplyView_module_css_default.summary,
1518
+ children: summary === "" ? t("reply.skipped") : summary
1519
+ })]
1520
+ }), open && (data.questions.length === 0 ? (0, react_jsx_runtime.jsx)("p", {
1521
+ className: QuestionReplyView_module_css_default.text,
1522
+ children: data.text
1523
+ }) : (0, react_jsx_runtime.jsx)("dl", {
1524
+ className: QuestionReplyView_module_css_default.details,
1525
+ children: data.questions.map((question) => {
1526
+ const values = replyAnswerValues(data, question.id);
1527
+ return (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsxs)("dt", {
1528
+ className: QuestionReplyView_module_css_default.question,
1529
+ children: [
1530
+ question.header && question.header !== question.question && (0, react_jsx_runtime.jsx)("span", {
1531
+ className: QuestionReplyView_module_css_default.header,
1532
+ children: question.header
1533
+ }),
1534
+ (0, react_jsx_runtime.jsx)("span", {
1535
+ className: QuestionReplyView_module_css_default.questionText,
1536
+ children: question.question
1537
+ }),
1538
+ question.detail && (0, react_jsx_runtime.jsx)("span", {
1539
+ className: QuestionReplyView_module_css_default.detail,
1540
+ children: question.detail
1541
+ }),
1542
+ question.options && question.options.length > 0 && (0, react_jsx_runtime.jsx)("ul", {
1543
+ className: QuestionReplyView_module_css_default.options,
1544
+ children: question.options.map((option) => (0, react_jsx_runtime.jsxs)("li", { children: [option.label, option.description && ` — ${option.description}`] }, option.label))
1545
+ })
1546
+ ]
1547
+ }), (0, react_jsx_runtime.jsxs)("dd", {
1548
+ className: QuestionReplyView_module_css_default.answer,
1549
+ children: [(0, react_jsx_runtime.jsx)("span", {
1550
+ className: QuestionReplyView_module_css_default.answerLabel,
1551
+ children: t("reply.answerLabel")
1552
+ }), values.length === 0 ? t("reply.skipped") : values.join(", ")]
1553
+ })] }, question.id);
1554
+ })
1555
+ }))]
1556
+ }), (0, react_jsx_runtime.jsxs)("div", {
1557
+ className: QuestionReplyView_module_css_default.actions,
1558
+ children: [(0, react_jsx_runtime.jsx)("span", {
1559
+ className: QuestionReplyView_module_css_default.time,
1560
+ children: new Intl.DateTimeFormat(void 0, {
1561
+ hour: "2-digit",
1562
+ minute: "2-digit",
1563
+ hour12: false
1564
+ }).format(data.time)
1565
+ }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
1566
+ label: copied ? t("copied") : t("copy"),
1567
+ side: "bottom",
1568
+ children: (0, react_jsx_runtime.jsx)("button", {
1569
+ type: "button",
1570
+ className: QuestionReplyView_module_css_default.action,
1571
+ "aria-label": copied ? t("copied") : t("copy"),
1572
+ onClick: onCopy,
1573
+ children: copied ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineRegular, {}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCopyOutlineRegular, {})
1574
+ })
1575
+ })]
1576
+ })]
1577
+ });
1578
+ }
1579
+ //#endregion
818
1580
  //#region lib/types/client/locales.js
819
1581
  /** `question` namespace dictionaries. */
820
1582
  /** Simplified Chinese dictionary (the key-set source of truth). */
821
1583
  const zh = {
822
1584
  "error.incomplete": "请先完成这道问题。",
823
1585
  "error.unanswered": "请选择一个选项或填写自定义答案。",
1586
+ "error.unavailable": "当前无法提交,请稍候再试。",
1587
+ "error.resubmit": "回答未送达,工作已继续,请再提交一次。",
1588
+ "status.sent": "回答已发送;面板未能关闭。",
1589
+ "wait.takeTime": "慢慢回答",
1590
+ "wait.countdown": "{seconds} 秒后继续工作",
1591
+ "wait.paused": "已暂停 · 剩余 {seconds} 秒",
1592
+ "wait.held": "会一直等你回答",
1593
+ "wait.continued": "已继续工作,仍可回答",
1594
+ "review.status": "已回答",
1595
+ "review.skipped": "这道问题当时被跳过。",
1596
+ "reply.label": "回答先前等待中的问题",
1597
+ "reply.open": "展开问题详情",
1598
+ "reply.close": "收起问题详情",
1599
+ "reply.answerLabel": "回答:",
1600
+ "reply.skipped": "已跳过",
824
1601
  "nav.prev": "上一题",
825
1602
  "nav.next": "下一题",
826
1603
  "nav.minimize": "收起问题卡片",
827
1604
  "nav.maximize": "展开问题卡片",
828
1605
  "nav.cancel": "放弃整组问题",
1606
+ "nav.close": "收起问题面板,可从工具调用重新打开",
829
1607
  "option.recommended": "推荐",
830
1608
  "custom.placeholder": "输入你的答案",
831
1609
  "action.skip": "跳过",
@@ -839,11 +1617,27 @@ window.__ModuleLoader__.load({
839
1617
  const en = {
840
1618
  "error.incomplete": "Please complete this question first.",
841
1619
  "error.unanswered": "Please select an option or enter a custom answer.",
1620
+ "error.unavailable": "Cannot submit right now; try again in a moment.",
1621
+ "error.resubmit": "The answer did not arrive before work continued; submit it again.",
1622
+ "status.sent": "Reply sent; the panel could not close.",
1623
+ "wait.takeTime": "Take time",
1624
+ "wait.countdown": "Continuing in {seconds}s",
1625
+ "wait.paused": "Paused · {seconds}s remaining",
1626
+ "wait.held": "Waiting until you answer",
1627
+ "wait.continued": "Work continued — you can still answer",
1628
+ "review.status": "Answered",
1629
+ "review.skipped": "This question was skipped.",
1630
+ "reply.label": "Reply to earlier pending questions",
1631
+ "reply.open": "Open question details",
1632
+ "reply.close": "Close question details",
1633
+ "reply.answerLabel": "Answer: ",
1634
+ "reply.skipped": "Skipped",
842
1635
  "nav.prev": "Previous question",
843
1636
  "nav.next": "Next question",
844
1637
  "nav.minimize": "Collapse the question card",
845
1638
  "nav.maximize": "Expand the question card",
846
1639
  "nav.cancel": "Dismiss all questions",
1640
+ "nav.close": "Close the panel — reopen it from the tool call",
847
1641
  "option.recommended": "Recommended",
848
1642
  "custom.placeholder": "Type your answer",
849
1643
  "action.skip": "Skip",
@@ -857,40 +1651,269 @@ window.__ModuleLoader__.load({
857
1651
  //#region lib/types/client/index.js
858
1652
  /** Dictionary namespace owned by this plugin. */
859
1653
  const NS = "question";
860
- /** Required services: Agent scopes, Remote Events, Session UI, Slot registry, and copy. */
1654
+ /** Required services: Agent scopes, Remote Events, Session UI, Slot registry, conversation nodes, and copy. */
861
1655
  const inject = [
862
1656
  "sessions",
863
1657
  "remote",
1658
+ "remote.userQuestions",
864
1659
  "uiSession",
865
1660
  "slots",
866
- "locale"
1661
+ "locale",
1662
+ "uiConversation"
867
1663
  ];
868
- /** Present one request until the user answers, cancels, or its lifetime ends. */
869
- async function answerQuestion(ctx, owner, request, next, registerPendingInteraction) {
1664
+ /**
1665
+ * Cards published to the Session pending-interaction registry, keyed by
1666
+ * `PendingQuestion.key`. A tool-call-keyed card is shared by the forwarded
1667
+ * waterfall and the Session projection.
1668
+ *
1669
+ * A card outlives its seat. Closing the panel only unpublishes it, which keeps
1670
+ * the request answerable from its tool call row, so this registry — not the
1671
+ * pending-interaction registry — decides when a request is over.
1672
+ */
1673
+ var QuestionCards = class {
1674
+ publish;
1675
+ #cards = /* @__PURE__ */ new Map();
1676
+ constructor(publish) {
1677
+ this.publish = publish;
1678
+ }
1679
+ byCallId(sessionId, callId) {
1680
+ return this.#cards.get(PendingQuestion.keyOf(sessionId, callId));
1681
+ }
1682
+ /** Observable state for one card while the registry owns it. */
1683
+ source(key) {
1684
+ return this.#cards.get(key)?.pending;
1685
+ }
1686
+ values() {
1687
+ return [...this.#cards.values()];
1688
+ }
1689
+ /** Keys of every card registered for one Session. */
1690
+ keysFor(sessionId) {
1691
+ return this.values().filter((card) => card.pending.sessionId === sessionId).map((card) => card.pending.key);
1692
+ }
1693
+ /**
1694
+ * Return the card of a tool call, creating and publishing it when absent.
1695
+ * A request without a call id always gets a fresh card.
1696
+ */
1697
+ ensure(sessionId, questions, callId) {
1698
+ if (callId !== void 0) {
1699
+ const existing = this.byCallId(sessionId, callId);
1700
+ if (existing !== void 0) return existing;
1701
+ }
1702
+ return this.#create(new PendingQuestion(sessionId, questions, callId, () => this.keysFor(sessionId)));
1703
+ }
1704
+ /** Publish one carrier into the composer seat and register the card that owns it. */
1705
+ #create(pending) {
1706
+ const requests = /* @__PURE__ */ new Set();
1707
+ const delegate = async () => {
1708
+ pending.delegate();
1709
+ await Promise.all(requests);
1710
+ };
1711
+ let unpublish = this.publish(pending, delegate);
1712
+ const card = {
1713
+ pending,
1714
+ hide: () => {
1715
+ unpublish?.();
1716
+ unpublish = void 0;
1717
+ },
1718
+ reveal: () => {
1719
+ unpublish?.();
1720
+ unpublish = this.publish(pending, delegate);
1721
+ },
1722
+ remove: () => {
1723
+ /* v8 ignore next -- a card leaves the registry once; no caller holds a card the registry already replaced. */
1724
+ if (this.#cards.get(pending.key) !== card) return;
1725
+ this.#cards.delete(pending.key);
1726
+ pending.close();
1727
+ unpublish?.();
1728
+ unpublish = void 0;
1729
+ },
1730
+ trackRequest: (completion) => {
1731
+ requests.add(completion);
1732
+ return () => {
1733
+ requests.delete(completion);
1734
+ };
1735
+ },
1736
+ hasRequest: () => requests.size > 0
1737
+ };
1738
+ pending.attachSeat({ hide: pending.review === void 0 ? card.hide : card.remove });
1739
+ this.#cards.set(pending.key, card);
1740
+ return card;
1741
+ }
1742
+ /**
1743
+ * Show the panel of one answerable tool call.
1744
+ * @param sessionId - Session the tool call belongs to.
1745
+ * @param callId - `ask_user_question` call whose panel to show, as its
1746
+ * transcript row spells it.
1747
+ * @returns whether a card for that call is still answerable.
1748
+ */
1749
+ reveal(sessionId, callId) {
1750
+ const card = this.byCallId(sessionId, callId);
1751
+ if (card === void 0) return false;
1752
+ card.reveal();
1753
+ return true;
1754
+ }
1755
+ /**
1756
+ * Show one settled tool call's recorded answers as a read-only card. A call
1757
+ * that somehow still holds a card is shown as it stands, so a live request is
1758
+ * never replaced by a stale copy of itself.
1759
+ * @param sessionId - Session the tool call belongs to.
1760
+ * @param callId - `ask_user_question` call whose record to show, as its
1761
+ * transcript row spells it.
1762
+ * @param record - the call's questions and recorded answers.
1763
+ * @returns true; a record always produces a card.
1764
+ */
1765
+ review(sessionId, callId, record) {
1766
+ (this.byCallId(sessionId, callId) ?? this.#create(new PendingQuestion(sessionId, record.questions, brandString(callId), () => this.keysFor(sessionId), record.answers))).reveal();
1767
+ return true;
1768
+ }
1769
+ /**
1770
+ * Hand every live waterfall back at plugin teardown. The pending-interaction
1771
+ * registry only drains what it currently holds, and a hidden card is not in
1772
+ * it, so its Host request would wait for its own abort instead.
1773
+ */
1774
+ dispose() {
1775
+ for (const card of this.values()) {
1776
+ card.pending.delegate();
1777
+ card.remove();
1778
+ }
1779
+ }
1780
+ };
1781
+ /** Present one forwarded request through its card until the waterfall settles. */
1782
+ async function answerQuestion(ctx, owner, request, next, cards) {
870
1783
  const sessionId = ctx.sessions.scopeOf(owner);
871
1784
  if (sessionId === void 0) return next();
872
- const pending = new PendingQuestion(sessionId, request.questions, request.signal);
1785
+ const callId = request.wait?.callId;
1786
+ const card = cards.ensure(sessionId, request.questions, callId);
1787
+ const claimLifetime = new AbortController();
1788
+ const claimSignal = request.signal === void 0 ? claimLifetime.signal : AbortSignal.any([claimLifetime.signal, request.signal]);
1789
+ let claim;
1790
+ let claimEnded;
1791
+ let delegateRequest;
1792
+ const releaseClaim = request.wait?.timed === true && callId !== void 0 ? ctx.effect(() => {
1793
+ claim = ctx.remote.userQuestions.attachWait(sessionId, callId, claimSignal);
1794
+ return async () => {
1795
+ delegateRequest?.();
1796
+ claimLifetime.abort();
1797
+ claim?.dispose();
1798
+ if (claimEnded !== void 0) await Promise.allSettled([claimEnded]);
1799
+ };
1800
+ }, "ui-user-questions: foreground claim") : void 0;
873
1801
  const completed = Promise.withResolvers();
874
- const remove = registerPendingInteraction(pending, async () => {
875
- pending.delegate();
876
- await completed.promise;
877
- });
1802
+ const finishRequest = card.trackRequest(completed.promise);
878
1803
  try {
1804
+ const iterator = claim?.[Symbol.asyncIterator]();
1805
+ const opening = iterator === void 0 ? void 0 : await iterator.next();
1806
+ if (opening?.done === true) return await next();
1807
+ const waterfall = createWaterfallRequest(opening === void 0 ? void 0 : Date.now() + opening.value.remainingMs, claimSignal, (channel) => {
1808
+ card.pending.detachWaterfall(channel);
1809
+ });
1810
+ if (claimSignal.aborted) return await waterfall.result;
1811
+ delegateRequest = () => {
1812
+ waterfall.channel.delegate();
1813
+ };
1814
+ card.pending.attachWaterfall(waterfall.channel);
1815
+ if (iterator !== void 0) claimEnded = (async () => {
1816
+ await iterator.next();
1817
+ throw new Error("the foreground question wait ended");
1818
+ })();
879
1819
  try {
880
- return await pending.result;
1820
+ return await (claimEnded === void 0 ? waterfall.result : Promise.race([waterfall.result, claimEnded]));
881
1821
  } catch (error) {
882
- if (pending.isDelegation(error)) return await next();
1822
+ if (waterfall.isDelegation(error)) {
1823
+ await releaseClaim?.();
1824
+ return await next();
1825
+ }
883
1826
  throw error;
884
1827
  }
885
1828
  } finally {
886
- remove();
1829
+ if (releaseClaim === void 0) claimLifetime.abort();
1830
+ else if (claimEnded === void 0) await releaseClaim();
1831
+ else Promise.allSettled([claimEnded]).then(() => {
1832
+ releaseClaim();
1833
+ });
1834
+ if (callId === void 0) card.remove();
887
1835
  completed.resolve();
1836
+ finishRequest();
888
1837
  }
889
1838
  }
890
1839
  /**
891
- * Client plugin body: register the `question` dictionaries and the question
892
- * composer into the composer chain. Zero business face — data and verbs live
893
- * on the matched carrier; t rides the standard locale seat.
1840
+ * Mirror answerable calls onto cards. A submitted reply in the durable Inbox
1841
+ * removes the editable card until the reply is admitted or discarded.
1842
+ */
1843
+ function publishContinuedQuestions(ctx, cards) {
1844
+ const sessions = ctx.sessions;
1845
+ const stopProjections = /* @__PURE__ */ new Map();
1846
+ const unwrap = (result) => {
1847
+ if (!result.ok) throw new Error(result.error.message);
1848
+ return result.value;
1849
+ };
1850
+ const rpcFor = (sessionId, callId) => ({ answer: async (answer) => unwrap(await ctx.remote.userQuestions.answer(sessionId, callId, answer)) });
1851
+ const reconcile = () => {
1852
+ const snapshot = sessions.list.getSnapshot();
1853
+ const bound = new Map(Object.values(snapshot.byId).flatMap((summary) => {
1854
+ const binding = sessions.binding(summary.id);
1855
+ return binding === void 0 ? [] : [[summary.id, binding]];
1856
+ }));
1857
+ for (const [sessionId, stop] of stopProjections) {
1858
+ if (bound.has(sessionId)) continue;
1859
+ stop();
1860
+ stopProjections.delete(sessionId);
1861
+ }
1862
+ for (const [sessionId, binding] of bound) {
1863
+ if (stopProjections.has(sessionId)) continue;
1864
+ const stopQuestions = binding.session.projections.faceOf("userQuestions").subscribe(reconcile);
1865
+ const stopInbox = binding.session.projections.faceOf("inbox").subscribe(reconcile);
1866
+ stopProjections.set(sessionId, () => {
1867
+ stopQuestions();
1868
+ stopInbox();
1869
+ });
1870
+ }
1871
+ const rows = /* @__PURE__ */ new Map();
1872
+ for (const [sessionId, binding] of bound) {
1873
+ const projected = binding.session.projections.faceOf("userQuestions").getSnapshot();
1874
+ const inbox = binding.session.projections.faceOf("inbox").getSnapshot();
1875
+ const queued = /* @__PURE__ */ new Set();
1876
+ for (const message of [...inbox?.["next-step"] ?? [], ...inbox?.["next-turn"] ?? []]) {
1877
+ if (typeof message !== "object" || message === null || Array.isArray(message)) continue;
1878
+ const source = message.source;
1879
+ if (typeof source !== "object" || source === null || Array.isArray(source)) continue;
1880
+ if (source.kind === "user-question-reply" && typeof source.callId === "string") queued.add(source.callId);
1881
+ }
1882
+ for (const row of projected?.active ?? []) {
1883
+ if (row.state === "continued" && queued.has(row.callId)) continue;
1884
+ rows.set(PendingQuestion.keyOf(sessionId, row.callId), {
1885
+ sessionId,
1886
+ row
1887
+ });
1888
+ }
1889
+ }
1890
+ for (const { sessionId, row } of rows.values()) {
1891
+ if (row.state === "continued") {
1892
+ const card = cards.ensure(sessionId, row.questions, row.callId);
1893
+ card.pending.attachRpc(rpcFor(sessionId, row.callId));
1894
+ card.pending.setState("continued");
1895
+ continue;
1896
+ }
1897
+ cards.byCallId(sessionId, row.callId)?.pending.setState("open");
1898
+ }
1899
+ for (const card of cards.values()) {
1900
+ if (card.pending.callId === void 0 || card.pending.review !== void 0 || rows.has(card.pending.key) || card.hasRequest() || card.pending.hasWaterfall()) continue;
1901
+ card.remove();
1902
+ }
1903
+ };
1904
+ reconcile();
1905
+ const stopList = sessions.list.subscribe(reconcile);
1906
+ return () => {
1907
+ stopList();
1908
+ for (const stop of stopProjections.values()) stop();
1909
+ stopProjections.clear();
1910
+ };
1911
+ }
1912
+ /**
1913
+ * Client plugin body: register the `question` dictionaries, the question
1914
+ * composer into the composer chain, and the late-reply conversation node.
1915
+ * Zero business face — data and verbs live on the matched carrier; t rides
1916
+ * the standard locale seat.
894
1917
  * @param ctx - client root context.
895
1918
  */
896
1919
  function apply(ctx) {
@@ -899,19 +1922,35 @@ window.__ModuleLoader__.load({
899
1922
  en
900
1923
  }), "ui-user-questions: dictionaries");
901
1924
  const questionDraftStore = createQuestionDraftStore();
902
- const registerPendingInteraction = ctx.uiSession.registerPendingInteraction((pending) => pending.kind === "plan-review" ? 2 : 1);
1925
+ const cards = new QuestionCards(ctx.uiSession.registerPendingInteraction((pending) => pending.kind === "plan-review" ? 2 : 1));
1926
+ ctx.effect(() => () => {
1927
+ cards.dispose();
1928
+ }, "ui-user-questions: cards");
1929
+ const disposePanels = ctx.reflect.provide("userQuestionPanels", {
1930
+ reveal: (sessionId, callId) => cards.reveal(sessionId, callId),
1931
+ review: (sessionId, callId, record) => cards.review(sessionId, callId, record)
1932
+ });
1933
+ ctx.effect(() => disposePanels, "ui-user-questions: answer panels");
1934
+ ctx.effect(() => publishContinuedQuestions(ctx, cards), "ui-user-questions: continued questions");
903
1935
  ctx.slots.inject("conversation.composer", () => ctx.slots.register({
904
1936
  name: "conversation.composer",
905
1937
  select: ({ pendingInteraction }) => pendingInteraction instanceof PendingQuestion ? pendingInteraction : null,
906
1938
  locale: NS,
907
1939
  store: questionDraftStore,
1940
+ inject: () => ({ keyedHooks: { questionCard: (key) => cards.source(key) } }),
908
1941
  children: { "conversation.plan-review.actions": {
909
1942
  kind: "list",
910
1943
  scope: "session"
911
1944
  } }
912
1945
  }, QuestionComposer));
1946
+ ctx.uiConversation.events.register(questionReplyDefinition);
1947
+ ctx.slots.inject("conversation.chat.node", () => ctx.slots.register({
1948
+ name: "conversation.chat.node",
1949
+ key: "question-reply",
1950
+ locale: NS
1951
+ }, QuestionReplyView));
913
1952
  ctx.remote.$on("user-questions/request", function(request, next) {
914
- return answerQuestion(ctx, this, request, next, registerPendingInteraction);
1953
+ return answerQuestion(ctx, this, request, next, cards);
915
1954
  });
916
1955
  }
917
1956
  //#endregion