@songtonyli/dsh-cli 0.1.14 → 0.1.16

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 (250) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@bufbuild/protobuf/README.md +41 -0
  4. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
  5. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
  6. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
  7. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
  8. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
  9. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
  10. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
  11. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
  12. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
  13. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
  14. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
  15. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
  16. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
  17. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
  18. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
  19. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
  20. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
  21. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
  22. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
  23. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
  24. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
  25. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
  26. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +296 -0
  27. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
  28. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
  29. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
  30. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
  31. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +415 -0
  32. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +1037 -0
  33. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
  34. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
  35. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
  36. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
  37. package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
  38. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
  39. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
  40. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
  41. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
  42. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
  43. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
  44. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
  45. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
  46. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +292 -0
  47. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
  48. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +469 -0
  49. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
  50. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
  51. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +954 -0
  52. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +437 -0
  53. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +625 -0
  54. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
  55. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
  56. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
  57. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
  58. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
  59. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
  60. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
  61. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
  62. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +188 -0
  63. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +726 -0
  64. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +37 -0
  65. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
  66. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +106 -0
  67. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
  68. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +334 -0
  69. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
  70. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
  71. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
  72. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
  73. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
  74. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
  75. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
  76. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
  77. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
  78. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
  79. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
  80. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
  81. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
  82. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
  83. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
  84. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
  85. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
  86. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
  87. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
  88. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
  89. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
  90. package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
  91. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
  92. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
  93. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
  94. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
  95. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
  96. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
  97. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
  98. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
  99. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
  100. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
  101. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
  102. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
  103. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
  104. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
  105. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
  106. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
  107. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
  108. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
  109. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
  110. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
  111. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
  112. package/node_modules/@bufbuild/protobuf/dist/esm/create.js +293 -0
  113. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
  114. package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
  115. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
  116. package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
  117. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +409 -0
  118. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +1029 -0
  119. package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
  120. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
  121. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
  122. package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
  123. package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
  124. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
  125. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
  126. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
  127. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
  128. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
  129. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
  130. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
  131. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
  132. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +284 -0
  133. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
  134. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +464 -0
  135. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
  136. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
  137. package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +948 -0
  138. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +433 -0
  139. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +620 -0
  140. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
  141. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
  142. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
  143. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
  144. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
  145. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
  146. package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
  147. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
  148. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +184 -0
  149. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +721 -0
  150. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
  151. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
  152. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +101 -0
  153. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
  154. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +325 -0
  155. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
  156. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
  157. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
  158. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
  159. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
  160. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
  161. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
  162. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
  163. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
  164. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
  165. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
  166. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
  167. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
  168. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
  169. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
  170. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
  171. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
  172. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
  173. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
  174. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
  175. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
  176. package/node_modules/@bufbuild/protobuf/package.json +136 -0
  177. package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
  178. package/node_modules/@deepseek-ai/dsh-base/README.md +1 -1
  179. package/node_modules/@deepseek-ai/dsh-base/README.zh.md +1 -1
  180. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +9 -3
  181. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -0
  182. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
  183. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +61 -61
  184. package/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +11 -11
  185. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +55 -55
  186. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +182 -182
  187. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
  188. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +151 -151
  189. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
  190. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +76 -76
  191. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
  192. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
  193. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
  194. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +15 -15
  195. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +8 -8
  196. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +13 -13
  197. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +27 -27
  198. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +6 -6
  199. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
  200. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
  201. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +115 -115
  202. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +14 -14
  203. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +40 -40
  204. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +2 -2
  205. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +4 -2
  206. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +4 -2
  207. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +97 -87
  208. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +35 -35
  209. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +61 -61
  210. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.i18n.yaml +2 -2
  211. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.md +6 -5
  212. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.zh.md +6 -5
  213. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/lib/client.js +36 -35
  214. package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/client.js +10 -10
  215. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +41 -41
  216. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +17 -17
  217. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +68 -68
  218. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +12 -12
  219. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +21 -21
  220. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +24 -24
  221. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +18 -18
  222. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
  223. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +19 -19
  224. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +38 -38
  225. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +25 -25
  226. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +70 -70
  227. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +198 -198
  228. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +50 -50
  229. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
  230. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +81 -81
  231. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +25 -25
  232. package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
  233. package/node_modules/@deepseek-ai/dsh-llm/README.md +2 -1
  234. package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +2 -1
  235. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.i18n.yaml +6 -0
  236. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +136 -0
  237. package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +136 -0
  238. package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +2511 -0
  239. package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +62 -0
  240. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +3 -3
  241. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
  242. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +14 -12
  243. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +14 -12
  244. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +508 -74
  245. package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
  246. package/node_modules/@deepseek-ai/dsh-web-app/README.md +1 -1
  247. package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +1 -1
  248. package/package.json +5 -1
  249. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.js +0 -61
  250. package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-UEJ3Ntqn.js +0 -1511
@@ -0,0 +1,721 @@
1
+ // Copyright 2021-2026 Buf Technologies, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { varint32read, varint64read } from "./varint.js";
15
+ import { protoInt64 } from "../proto-int64.js";
16
+ import { emulateEncodeInto, getTextEncoding } from "./text-encoding.js";
17
+ /**
18
+ * Protobuf binary format wire types.
19
+ *
20
+ * A wire type provides just enough information to find the length of the
21
+ * following value.
22
+ *
23
+ * See https://developers.google.com/protocol-buffers/docs/encoding#structure
24
+ */
25
+ export var WireType;
26
+ (function (WireType) {
27
+ /**
28
+ * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
29
+ */
30
+ WireType[WireType["Varint"] = 0] = "Varint";
31
+ /**
32
+ * Used for fixed64, sfixed64, double.
33
+ * Always 8 bytes with little-endian byte order.
34
+ */
35
+ WireType[WireType["Bit64"] = 1] = "Bit64";
36
+ /**
37
+ * Used for string, bytes, embedded messages, packed repeated fields
38
+ *
39
+ * Only repeated numeric types (types which use the varint, 32-bit,
40
+ * or 64-bit wire types) can be packed. In proto3, such fields are
41
+ * packed by default.
42
+ */
43
+ WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited";
44
+ /**
45
+ * Start of a tag-delimited aggregate, such as a proto2 group, or a message
46
+ * in editions with message_encoding = DELIMITED.
47
+ */
48
+ WireType[WireType["StartGroup"] = 3] = "StartGroup";
49
+ /**
50
+ * End of a tag-delimited aggregate.
51
+ */
52
+ WireType[WireType["EndGroup"] = 4] = "EndGroup";
53
+ /**
54
+ * Used for fixed32, sfixed32, float.
55
+ * Always 4 bytes with little-endian byte order.
56
+ */
57
+ WireType[WireType["Bit32"] = 5] = "Bit32";
58
+ })(WireType || (WireType = {}));
59
+ /**
60
+ * Maximum value for a 32-bit floating point value (Protobuf FLOAT).
61
+ */
62
+ export const FLOAT32_MAX = 3.4028234663852886e38;
63
+ /**
64
+ * Minimum value for a 32-bit floating point value (Protobuf FLOAT).
65
+ */
66
+ export const FLOAT32_MIN = -3.4028234663852886e38;
67
+ /**
68
+ * Maximum value for an unsigned 32-bit integer (Protobuf UINT32, FIXED32).
69
+ */
70
+ export const UINT32_MAX = 0xffffffff;
71
+ /**
72
+ * Maximum value for a signed 32-bit integer (Protobuf INT32, SFIXED32, SINT32).
73
+ */
74
+ export const INT32_MAX = 0x7fffffff;
75
+ /**
76
+ * Minimum value for a signed 32-bit integer (Protobuf INT32, SFIXED32, SINT32).
77
+ */
78
+ export const INT32_MIN = -0x80000000;
79
+ export class BinaryWriter {
80
+ constructor(encodeUtf8) {
81
+ /**
82
+ * Previous fork positions (the write position at the time
83
+ * `fork()` was called).
84
+ */
85
+ this.stackPos = [];
86
+ this.encodeUtf8Into = encodeUtf8
87
+ ? emulateEncodeInto(encodeUtf8)
88
+ : getTextEncoding().encodeUtf8Into;
89
+ this.buffer = EMPTY_BUFFER;
90
+ this.viewCache = EMPTY_VIEW;
91
+ this.pos = 0;
92
+ }
93
+ ensureCapacity(size) {
94
+ const required = this.pos + size;
95
+ if (required > this.buffer.length) {
96
+ let newLen = this.buffer.length || INITIAL_SIZE;
97
+ while (newLen < required)
98
+ newLen *= 2;
99
+ const newBuf = new Uint8Array(newLen);
100
+ if (this.pos > 0)
101
+ newBuf.set(this.buffer);
102
+ this.buffer = newBuf;
103
+ }
104
+ }
105
+ /**
106
+ * The DataView over `buffer`, rebuilt only if the buffer has grown since it
107
+ * was last used.
108
+ */
109
+ view() {
110
+ const bytes = this.buffer;
111
+ const view = this.viewCache;
112
+ // Since ensureCapacity() only ever replaces the buffer with a strictly larger one,
113
+ // equal lengths mean the view is still current. This is faster than comparing
114
+ // buffers directly.
115
+ if (view.byteLength === bytes.byteLength)
116
+ return view;
117
+ const newView = new DataView(bytes.buffer);
118
+ this.viewCache = newView;
119
+ return newView;
120
+ }
121
+ /**
122
+ * Return all bytes written and reset this writer.
123
+ */
124
+ finish() {
125
+ const result = this.buffer.slice(0, this.pos);
126
+ this.pos = 0;
127
+ this.stackPos = [];
128
+ return result;
129
+ }
130
+ /**
131
+ * Start a new fork for length-delimited data like a message
132
+ * or a packed repeated field.
133
+ *
134
+ * Must be joined later with `join()`.
135
+ */
136
+ fork() {
137
+ this.stackPos.push(this.pos);
138
+ // Reserve room for the length prefix. Payloads under 128 bytes, fairly
139
+ // common, will need no copy in join().
140
+ this.ensureCapacity(DEFAULT_LEN_PREFIX_SIZE);
141
+ this.buffer[this.pos++] = 0;
142
+ return this;
143
+ }
144
+ /**
145
+ * Join the last fork. Write its length and bytes, then
146
+ * return to the previous state.
147
+ */
148
+ join() {
149
+ const forkPos = this.stackPos.pop();
150
+ if (forkPos === undefined)
151
+ throw new Error("invalid state, fork stack empty");
152
+ // fork() presumed the payload would fit the prefix it reserved. If it
153
+ // doesn't, we need to shift the bytes we just wrote.
154
+ const len = this.pos - forkPos - DEFAULT_LEN_PREFIX_SIZE;
155
+ const lenPrefixSize = varint32Size(len);
156
+ if (lenPrefixSize > DEFAULT_LEN_PREFIX_SIZE) {
157
+ // Widening pushes the payload past the end of the buffer, so grow first:
158
+ // copyWithin clamps to the buffer instead of throwing, so a short buffer
159
+ // would silently drop the tail of the payload.
160
+ this.ensureCapacity(lenPrefixSize - DEFAULT_LEN_PREFIX_SIZE);
161
+ this.buffer.copyWithin(forkPos + lenPrefixSize, forkPos + DEFAULT_LEN_PREFIX_SIZE, this.pos);
162
+ }
163
+ this.pos = forkPos;
164
+ this.uint32(len);
165
+ this.pos += len;
166
+ return this;
167
+ }
168
+ /**
169
+ * Writes a tag (field number and wire type).
170
+ *
171
+ * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.
172
+ *
173
+ * Generated code should compute the tag ahead of time and call `uint32()`.
174
+ */
175
+ tag(fieldNo, type) {
176
+ return this.uint32(((fieldNo << 3) | type) >>> 0);
177
+ }
178
+ /**
179
+ * Write a chunk of raw bytes.
180
+ */
181
+ raw(chunk) {
182
+ this.ensureCapacity(chunk.length);
183
+ this.buffer.set(chunk, this.pos);
184
+ this.pos += chunk.length;
185
+ return this;
186
+ }
187
+ /**
188
+ * Write a `uint32` value, an unsigned 32 bit varint.
189
+ */
190
+ uint32(value) {
191
+ assertUInt32(value);
192
+ // uint32 varints are at most 5 bytes; reserve once and avoid per-byte
193
+ // capacity checks.
194
+ this.ensureCapacity(5);
195
+ if (value < 0x80) {
196
+ this.buffer[this.pos++] = value;
197
+ return this;
198
+ }
199
+ while (value > 0x7f) {
200
+ this.buffer[this.pos++] = (value & 0x7f) | 0x80;
201
+ value >>>= 7;
202
+ }
203
+ this.buffer[this.pos++] = value;
204
+ return this;
205
+ }
206
+ /**
207
+ * Write a `int32` value, a signed 32 bit varint.
208
+ */
209
+ int32(value) {
210
+ assertInt32(value);
211
+ if (value >= 0) {
212
+ return this.uint32(value);
213
+ }
214
+ // Negative: sign-extend to 64 bits, encodes to 10 bytes.
215
+ this.ensureCapacity(10);
216
+ for (let i = 0; i < 9; i++) {
217
+ this.buffer[this.pos++] = (value & 0x7f) | 0x80;
218
+ value >>= 7;
219
+ }
220
+ this.buffer[this.pos++] = 1;
221
+ return this;
222
+ }
223
+ /**
224
+ * Write a `bool` value, a varint.
225
+ */
226
+ bool(value) {
227
+ this.ensureCapacity(1);
228
+ this.buffer[this.pos++] = value ? 1 : 0;
229
+ return this;
230
+ }
231
+ /**
232
+ * Write a `bytes` value, length-delimited arbitrary data.
233
+ */
234
+ bytes(value) {
235
+ this.uint32(value.byteLength);
236
+ return this.raw(value);
237
+ }
238
+ /**
239
+ * Write a `string` value, length-delimited data converted to UTF-8 text.
240
+ */
241
+ string(value) {
242
+ // TextEncoder.encode() coerces its argument to string, but encodeInto()
243
+ // rejects non-strings.
244
+ if (typeof value !== "string") {
245
+ value = String(value);
246
+ }
247
+ const len = value.length;
248
+ // Fast path for ASCII.
249
+ if (len <= ASCII_MAX_LENGTH) {
250
+ this.ensureCapacity(len + 1);
251
+ const ascii = this.buffer;
252
+ let pos = this.pos;
253
+ ascii[pos++] = len;
254
+ let i = 0;
255
+ for (; i < len; i++) {
256
+ const code = value.charCodeAt(i);
257
+ if (code > 0x7f)
258
+ break;
259
+ ascii[pos++] = code;
260
+ }
261
+ if (i == len) {
262
+ this.pos = pos;
263
+ return this;
264
+ }
265
+ }
266
+ // encodeUtf8Into needs the full-length buffer upfront. The length prefix
267
+ // can be upto 5 bytes, and a UTF-16 code unit takes at most 3 UTF-8 bytes.
268
+ this.ensureCapacity(len * 3 + 5);
269
+ // The length prefix goes first, but the byte length is only known after
270
+ // encoding. We guess the final varint size here (assuming most text is
271
+ // ASCII) and then encode.
272
+ const lenPrefixSizeGuess = varint32Size(len);
273
+ const buf = this.buffer;
274
+ const start = this.pos;
275
+ const { written } = this.encodeUtf8Into(value, buf.subarray(start + lenPrefixSizeGuess));
276
+ // If our guess was incorrect, we need to shift the bytes we just wrote.
277
+ const lenPrefixSize = varint32Size(written);
278
+ if (lenPrefixSize != lenPrefixSizeGuess) {
279
+ buf.copyWithin(start + lenPrefixSize, start + lenPrefixSizeGuess, start + lenPrefixSizeGuess + written);
280
+ }
281
+ // Write the lenPrefix and advance the pos.
282
+ this.uint32(written);
283
+ this.pos += written;
284
+ return this;
285
+ }
286
+ /**
287
+ * Write a `float` value, 32-bit floating point number.
288
+ */
289
+ float(value) {
290
+ assertFloat32(value);
291
+ this.ensureCapacity(4);
292
+ this.view().setFloat32(this.pos, value, true);
293
+ this.pos += 4;
294
+ return this;
295
+ }
296
+ /**
297
+ * Write a `double` value, a 64-bit floating point number.
298
+ */
299
+ double(value) {
300
+ this.ensureCapacity(8);
301
+ this.view().setFloat64(this.pos, value, true);
302
+ this.pos += 8;
303
+ return this;
304
+ }
305
+ /**
306
+ * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
307
+ */
308
+ fixed32(value) {
309
+ assertUInt32(value);
310
+ this.ensureCapacity(4);
311
+ this.view().setUint32(this.pos, value, true);
312
+ this.pos += 4;
313
+ return this;
314
+ }
315
+ /**
316
+ * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
317
+ */
318
+ sfixed32(value) {
319
+ assertInt32(value);
320
+ this.ensureCapacity(4);
321
+ this.view().setInt32(this.pos, value, true);
322
+ this.pos += 4;
323
+ return this;
324
+ }
325
+ /**
326
+ * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
327
+ */
328
+ sint32(value) {
329
+ assertInt32(value);
330
+ // zigzag encode then emit as uint32 varint
331
+ return this.uint32(((value << 1) ^ (value >> 31)) >>> 0);
332
+ }
333
+ /**
334
+ * Write a `sfixed64` value, a signed, fixed-length 64-bit integer.
335
+ */
336
+ sfixed64(value) {
337
+ const tc = protoInt64.enc(value);
338
+ this.ensureCapacity(8);
339
+ const view = this.view();
340
+ view.setInt32(this.pos, tc.lo, true);
341
+ view.setInt32(this.pos + 4, tc.hi, true);
342
+ this.pos += 8;
343
+ return this;
344
+ }
345
+ /**
346
+ * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
347
+ */
348
+ fixed64(value) {
349
+ const tc = protoInt64.uEnc(value);
350
+ this.ensureCapacity(8);
351
+ const view = this.view();
352
+ view.setInt32(this.pos, tc.lo, true);
353
+ view.setInt32(this.pos + 4, tc.hi, true);
354
+ this.pos += 8;
355
+ return this;
356
+ }
357
+ /**
358
+ * Write a `int64` value, a signed 64-bit varint.
359
+ */
360
+ int64(value) {
361
+ const tc = protoInt64.enc(value);
362
+ return this.writeVarint64(tc.lo, tc.hi);
363
+ }
364
+ /**
365
+ * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
366
+ */
367
+ sint64(value) {
368
+ const tc = protoInt64.enc(value),
369
+ // zigzag encode
370
+ sign = tc.hi >> 31, lo = (tc.lo << 1) ^ sign, hi = ((tc.hi << 1) | (tc.lo >>> 31)) ^ sign;
371
+ return this.writeVarint64(lo, hi);
372
+ }
373
+ /**
374
+ * Write a `uint64` value, an unsigned 64-bit varint.
375
+ */
376
+ uint64(value) {
377
+ const tc = protoInt64.uEnc(value);
378
+ return this.writeVarint64(tc.lo, tc.hi);
379
+ }
380
+ /**
381
+ * Write a 64-bit varint directly into the buffer. Accepts the value as
382
+ * split low/high 32-bit words.
383
+ *
384
+ * Ported from varint64write() to avoid the intermediate number[] buffer.
385
+ * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
386
+ */
387
+ writeVarint64(lo, hi) {
388
+ // Worst case: 10 bytes.
389
+ this.ensureCapacity(10);
390
+ const buf = this.buffer;
391
+ let pos = this.pos;
392
+ for (let i = 0; i < 28; i = i + 7) {
393
+ const shift = lo >>> i;
394
+ const hasNext = !(shift >>> 7 == 0 && hi == 0);
395
+ buf[pos++] = (hasNext ? shift | 0x80 : shift) & 0xff;
396
+ if (!hasNext) {
397
+ this.pos = pos;
398
+ return this;
399
+ }
400
+ }
401
+ const splitBits = ((lo >>> 28) & 0x0f) | ((hi & 0x07) << 4);
402
+ const hasMoreBits = !(hi >> 3 == 0);
403
+ buf[pos++] = (hasMoreBits ? splitBits | 0x80 : splitBits) & 0xff;
404
+ if (!hasMoreBits) {
405
+ this.pos = pos;
406
+ return this;
407
+ }
408
+ for (let i = 3; i < 31; i = i + 7) {
409
+ const shift = hi >>> i;
410
+ const hasNext = !(shift >>> 7 == 0);
411
+ buf[pos++] = (hasNext ? shift | 0x80 : shift) & 0xff;
412
+ if (!hasNext) {
413
+ this.pos = pos;
414
+ return this;
415
+ }
416
+ }
417
+ buf[pos++] = (hi >>> 31) & 0x01;
418
+ this.pos = pos;
419
+ return this;
420
+ }
421
+ }
422
+ /**
423
+ * Capacity of the buffer allocated by the first write..
424
+ */
425
+ const INITIAL_SIZE = 128;
426
+ /**
427
+ * Bytes `fork()` reserves for the length prefix, betting that the payload will
428
+ * be under 128 bytes. `join()` fills them in, and widens them if the bet was
429
+ * wrong.
430
+ */
431
+ const DEFAULT_LEN_PREFIX_SIZE = 1;
432
+ /**
433
+ * Shared empty buffer used as the initial value before the first write.
434
+ * Avoids allocating and zeroing `INITIAL_SIZE` bytes per BinaryWriter when a
435
+ * writer is only used for a tiny message (or not used at all).
436
+ */
437
+ const EMPTY_BUFFER = new Uint8Array(0);
438
+ /**
439
+ * Shared empty view, paired with `EMPTY_BUFFER`. Never written to: any
440
+ * fixed-width write first grows the buffer, which replaces this view.
441
+ */
442
+ const EMPTY_VIEW = new DataView(EMPTY_BUFFER.buffer);
443
+ /**
444
+ * Longest string on the ASCII fast paths. Must stay below 0x80, so
445
+ * that the writer's length prefix always fits a single varint byte.
446
+ */
447
+ const ASCII_MAX_LENGTH = 32;
448
+ /**
449
+ * Number of bytes needed to encode `value` as an unsigned 32-bit varint.
450
+ */
451
+ function varint32Size(value) {
452
+ if (value < 0x80)
453
+ return 1;
454
+ if (value < 0x4000)
455
+ return 2;
456
+ if (value < 0x200000)
457
+ return 3;
458
+ if (value < 0x10000000)
459
+ return 4;
460
+ return 5;
461
+ }
462
+ export class BinaryReader {
463
+ constructor(buf, decodeUtf8 = getTextEncoding().decodeUtf8) {
464
+ this.decodeUtf8 = decodeUtf8;
465
+ this.varint64Lo = 0;
466
+ this.varint64Hi = 0;
467
+ this.varint64 = varint64read; // dirty cast for `this`
468
+ /**
469
+ * Read a `uint32` field, an unsigned 32 bit varint.
470
+ */
471
+ this.uint32 = varint32read;
472
+ this.buf = buf;
473
+ this.len = buf.length;
474
+ this.pos = 0;
475
+ this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
476
+ }
477
+ /**
478
+ * Reads a tag - field number and wire type. Tags are uint32 varints; values
479
+ * that do not fit in uint32 are rejected.
480
+ */
481
+ tag() {
482
+ const start = this.pos;
483
+ const tag = this.uint32();
484
+ const bytesRead = this.pos - start;
485
+ if (bytesRead > 5 || (bytesRead == 5 && this.buf[this.pos - 1] > 0x0f)) {
486
+ throw new Error("illegal tag: varint overflows uint32");
487
+ }
488
+ const fieldNo = tag >>> 3;
489
+ const wireType = tag & 7;
490
+ if (fieldNo <= 0 || wireType > 5) {
491
+ throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType);
492
+ }
493
+ return [fieldNo, wireType];
494
+ }
495
+ /**
496
+ * Skip one element and return the skipped data.
497
+ *
498
+ * When skipping StartGroup, provide the tags field number to check for
499
+ * matching field number in the EndGroup tag. Recursion into nested groups
500
+ * is guarded by the `recursionLimit` argument: When the limit is reached,
501
+ * this method throws.
502
+ */
503
+ skip(wireType, fieldNo, recursionLimit = 100) {
504
+ let start = this.pos;
505
+ switch (wireType) {
506
+ case WireType.Varint:
507
+ while (this.buf[this.pos++] & 0x80) {
508
+ // ignore
509
+ }
510
+ break;
511
+ // @ts-ignore TS7029: Fallthrough case in switch -- ignore instead of expect-error for compiler settings without noFallthroughCasesInSwitch: true
512
+ case WireType.Bit64:
513
+ this.pos += 4;
514
+ case WireType.Bit32:
515
+ this.pos += 4;
516
+ break;
517
+ case WireType.LengthDelimited:
518
+ let len = this.uint32();
519
+ this.pos += len;
520
+ break;
521
+ case WireType.StartGroup:
522
+ if (recursionLimit <= 0) {
523
+ throw new Error("maximum recursion depth reached");
524
+ }
525
+ for (;;) {
526
+ const [fn, wt] = this.tag();
527
+ if (wt === WireType.EndGroup) {
528
+ if (fieldNo !== undefined && fn !== fieldNo) {
529
+ throw new Error("invalid end group tag");
530
+ }
531
+ break;
532
+ }
533
+ this.skip(wt, fn, recursionLimit - 1);
534
+ }
535
+ break;
536
+ default:
537
+ throw new Error("cant skip wire type " + wireType);
538
+ }
539
+ this.assertBounds();
540
+ return this.buf.subarray(start, this.pos);
541
+ }
542
+ /**
543
+ * Throws error if position in byte array is out of range.
544
+ */
545
+ assertBounds() {
546
+ if (this.pos > this.len)
547
+ throw new RangeError("premature EOF");
548
+ }
549
+ /**
550
+ * Read a `int32` field, a signed 32 bit varint.
551
+ */
552
+ int32() {
553
+ return this.uint32() | 0;
554
+ }
555
+ /**
556
+ * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
557
+ */
558
+ sint32() {
559
+ let zze = this.uint32();
560
+ // decode zigzag
561
+ return (zze >>> 1) ^ -(zze & 1);
562
+ }
563
+ /**
564
+ * Read a `int64` field, a signed 64-bit varint.
565
+ */
566
+ int64() {
567
+ this.varint64();
568
+ return protoInt64.dec(this.varint64Lo, this.varint64Hi);
569
+ }
570
+ /**
571
+ * Read a `uint64` field, an unsigned 64-bit varint.
572
+ */
573
+ uint64() {
574
+ this.varint64();
575
+ return protoInt64.uDec(this.varint64Lo, this.varint64Hi);
576
+ }
577
+ /**
578
+ * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
579
+ */
580
+ sint64() {
581
+ this.varint64();
582
+ let lo = this.varint64Lo;
583
+ let hi = this.varint64Hi;
584
+ // decode zig zag
585
+ let s = -(lo & 1);
586
+ lo = ((lo >>> 1) | ((hi & 1) << 31)) ^ s;
587
+ hi = (hi >>> 1) ^ s;
588
+ return protoInt64.dec(lo, hi);
589
+ }
590
+ /**
591
+ * Read a `bool` field, a variant.
592
+ */
593
+ bool() {
594
+ // Fast path: most bools are 0x0 or 0x1.
595
+ const b = this.buf[this.pos];
596
+ if (b < 0x80) {
597
+ this.pos++;
598
+ return b !== 0;
599
+ }
600
+ this.varint64();
601
+ return this.varint64Lo !== 0 || this.varint64Hi !== 0;
602
+ }
603
+ /**
604
+ * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
605
+ */
606
+ fixed32() {
607
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
608
+ return this.view.getUint32((this.pos += 4) - 4, true);
609
+ }
610
+ /**
611
+ * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
612
+ */
613
+ sfixed32() {
614
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
615
+ return this.view.getInt32((this.pos += 4) - 4, true);
616
+ }
617
+ /**
618
+ * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
619
+ */
620
+ fixed64() {
621
+ return protoInt64.uDec(this.sfixed32(), this.sfixed32());
622
+ }
623
+ /**
624
+ * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
625
+ */
626
+ sfixed64() {
627
+ return protoInt64.dec(this.sfixed32(), this.sfixed32());
628
+ }
629
+ /**
630
+ * Read a `float` field, 32-bit floating point number.
631
+ */
632
+ float() {
633
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
634
+ return this.view.getFloat32((this.pos += 4) - 4, true);
635
+ }
636
+ /**
637
+ * Read a `double` field, a 64-bit floating point number.
638
+ */
639
+ double() {
640
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
641
+ return this.view.getFloat64((this.pos += 8) - 8, true);
642
+ }
643
+ /**
644
+ * Read a `bytes` field, length-delimited arbitrary data.
645
+ */
646
+ bytes() {
647
+ let len = this.uint32(), start = this.pos;
648
+ this.pos += len;
649
+ this.assertBounds();
650
+ return this.buf.subarray(start, start + len);
651
+ }
652
+ /**
653
+ * Read a `string` field, length-delimited data converted to UTF-8 text. If
654
+ * `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD.
655
+ */
656
+ string(strict) {
657
+ const bytes = this.bytes();
658
+ const len = bytes.length;
659
+ // Fast path for ASCII.
660
+ if (len <= ASCII_MAX_LENGTH) {
661
+ const codes = new Array(len);
662
+ for (let i = 0; i < len; i++) {
663
+ const byte = bytes[i];
664
+ if (byte > 0x7f) {
665
+ return this.decodeUtf8(bytes, strict);
666
+ }
667
+ codes[i] = byte;
668
+ }
669
+ return String.fromCharCode.apply(String, codes);
670
+ }
671
+ return this.decodeUtf8(bytes, strict);
672
+ }
673
+ }
674
+ /**
675
+ * Assert a valid signed protobuf 32-bit integer as a number or string.
676
+ */
677
+ function assertInt32(arg) {
678
+ if (typeof arg == "string") {
679
+ arg = Number(arg);
680
+ }
681
+ else if (typeof arg != "number") {
682
+ throw new Error("invalid int32: " + typeof arg);
683
+ }
684
+ if (!Number.isInteger(arg) ||
685
+ arg > INT32_MAX ||
686
+ arg < INT32_MIN)
687
+ throw new Error("invalid int32: " + arg);
688
+ }
689
+ /**
690
+ * Assert a valid unsigned protobuf 32-bit integer as a number or string.
691
+ */
692
+ function assertUInt32(arg) {
693
+ if (typeof arg == "string") {
694
+ arg = Number(arg);
695
+ }
696
+ else if (typeof arg != "number") {
697
+ throw new Error("invalid uint32: " + typeof arg);
698
+ }
699
+ if (!Number.isInteger(arg) ||
700
+ arg > UINT32_MAX ||
701
+ arg < 0)
702
+ throw new Error("invalid uint32: " + arg);
703
+ }
704
+ /**
705
+ * Assert a valid protobuf float value as a number or string.
706
+ */
707
+ function assertFloat32(arg) {
708
+ if (typeof arg == "string") {
709
+ const o = arg;
710
+ arg = Number(arg);
711
+ if (Number.isNaN(arg) && o !== "NaN") {
712
+ throw new Error("invalid float32: " + o);
713
+ }
714
+ }
715
+ else if (typeof arg != "number") {
716
+ throw new Error("invalid float32: " + typeof arg);
717
+ }
718
+ if (Number.isFinite(arg) &&
719
+ (arg > FLOAT32_MAX || arg < FLOAT32_MIN))
720
+ throw new Error("invalid float32: " + arg);
721
+ }