@marktrue/dsh-mobile-remote 3.3.1-alpha.3 → 3.3.1-alpha.4-app

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 (367) hide show
  1. package/DSH-Remote-v3.3.1.apk +4 -0
  2. package/README.md +6 -256
  3. package/manifest.json +21 -0
  4. package/package.json +12 -68
  5. package/CHANGELOG.md +0 -2113
  6. package/CONTRIBUTING.md +0 -114
  7. package/FAQ.md +0 -111
  8. package/cordis.patch.yml +0 -14
  9. package/docs/00-/345/274/200/345/217/221/346/200/273/347/272/262.md +0 -125
  10. package/docs/01-PRD.md +0 -148
  11. package/docs/02-architecture.md +0 -249
  12. package/docs/03-api.md +0 -1683
  13. package/docs/04-security.md +0 -130
  14. package/docs/05-test-cases.md +0 -405
  15. package/docs/06-install-run.md +0 -342
  16. package/docs/07-user-manual.md +0 -70
  17. package/docs/08-/346/211/251/345/261/225/345/274/200/345/217/221/346/214/207/345/215/227.md +0 -86
  18. package/docs/09-compatibility.md +0 -259
  19. package/docs/10-release.md +0 -1032
  20. package/docs/11-notification-reliability.md +0 -45
  21. package/docs/12-implementation-status.md +0 -41
  22. package/docs/13-device-acceptance-2026-11-03.md +0 -37
  23. package/docs/16-next-window-handoff-2026-11-04.md +0 -44
  24. package/docs/17-remaining-work-review-2026-11-04.md +0 -53
  25. package/docs/18-device-reliability-acceptance-2026-11-04.md +0 -63
  26. package/docs/19-issue-followup-2026-11-04.md +0 -39
  27. package/docs/20-dsh-022-compatibility-2026-11-05.md +0 -32
  28. package/docs/screenshots/01-home.png +0 -0
  29. package/docs/screenshots/02-notifications.png +0 -0
  30. package/docs/screenshots/03-sessions.png +0 -0
  31. package/docs/screenshots/04-chat.png +0 -0
  32. package/docs/screenshots/05-settings.png +0 -0
  33. package/docs/screenshots/06-new-session.png +0 -0
  34. package/docs/screenshots/pgy-appstore.jpg +0 -0
  35. package/docs/screenshots/pgy-mobile-app.jpg +0 -0
  36. package/docs/screenshots/pgy-pc-client.jpg +0 -0
  37. package/lib/account-usage.js +0 -145
  38. package/lib/app-alignment.js +0 -112
  39. package/lib/app-carrier-store.js +0 -1972
  40. package/lib/app-carrier.js +0 -609
  41. package/lib/client.js +0 -1196
  42. package/lib/desktop-form.js +0 -738
  43. package/lib/endpoint-registry.js +0 -205
  44. package/lib/experimental-bundles.js +0 -121
  45. package/lib/git-read-bundled-provider.js +0 -480
  46. package/lib/git-read-service.js +0 -901
  47. package/lib/host-manager-update.js +0 -222
  48. package/lib/host-settings-whitelist.js +0 -207
  49. package/lib/host-settings.js +0 -695
  50. package/lib/host-update-capabilities.js +0 -209
  51. package/lib/index.js +0 -14891
  52. package/lib/npm-update-source.js +0 -226
  53. package/lib/plugin-content-digest.js +0 -80
  54. package/lib/plugin-self-update.js +0 -1112
  55. package/lib/plugin-update-check.js +0 -268
  56. package/lib/plugin-update-controller.js +0 -416
  57. package/lib/plugin-update-log.js +0 -164
  58. package/lib/plugin-update-transaction.js +0 -358
  59. package/lib/plugin-update.js +0 -309
  60. package/lib/runtime-dependency-snapshot.js +0 -345
  61. package/lib/session-title-cache.js +0 -123
  62. package/lib/session-title-refresh.js +0 -261
  63. package/lib/sse-connections.js +0 -172
  64. package/lib/tool-process.js +0 -20
  65. package/lib/update-fetch.js +0 -24
  66. package/lib/update-lock-arbiter.js +0 -210
  67. package/lib/update-supervisor.js +0 -379
  68. package/node_modules/ansi-regex/index.d.ts +0 -37
  69. package/node_modules/ansi-regex/index.js +0 -10
  70. package/node_modules/ansi-regex/license +0 -9
  71. package/node_modules/ansi-regex/package.json +0 -55
  72. package/node_modules/ansi-regex/readme.md +0 -78
  73. package/node_modules/ansi-styles/index.d.ts +0 -345
  74. package/node_modules/ansi-styles/index.js +0 -163
  75. package/node_modules/ansi-styles/license +0 -9
  76. package/node_modules/ansi-styles/package.json +0 -56
  77. package/node_modules/ansi-styles/readme.md +0 -152
  78. package/node_modules/camelcase/index.d.ts +0 -63
  79. package/node_modules/camelcase/index.js +0 -76
  80. package/node_modules/camelcase/license +0 -9
  81. package/node_modules/camelcase/package.json +0 -43
  82. package/node_modules/camelcase/readme.md +0 -99
  83. package/node_modules/cliui/CHANGELOG.md +0 -76
  84. package/node_modules/cliui/LICENSE.txt +0 -14
  85. package/node_modules/cliui/README.md +0 -115
  86. package/node_modules/cliui/index.js +0 -354
  87. package/node_modules/cliui/package.json +0 -65
  88. package/node_modules/color-convert/CHANGELOG.md +0 -54
  89. package/node_modules/color-convert/LICENSE +0 -21
  90. package/node_modules/color-convert/README.md +0 -68
  91. package/node_modules/color-convert/conversions.js +0 -839
  92. package/node_modules/color-convert/index.js +0 -81
  93. package/node_modules/color-convert/package.json +0 -48
  94. package/node_modules/color-convert/route.js +0 -97
  95. package/node_modules/color-name/LICENSE +0 -8
  96. package/node_modules/color-name/README.md +0 -11
  97. package/node_modules/color-name/index.js +0 -152
  98. package/node_modules/color-name/package.json +0 -28
  99. package/node_modules/decamelize/index.js +0 -13
  100. package/node_modules/decamelize/license +0 -21
  101. package/node_modules/decamelize/package.json +0 -38
  102. package/node_modules/decamelize/readme.md +0 -48
  103. package/node_modules/dijkstrajs/.travis.yml +0 -4
  104. package/node_modules/dijkstrajs/CONTRIBUTING.md +0 -8
  105. package/node_modules/dijkstrajs/LICENSE.md +0 -19
  106. package/node_modules/dijkstrajs/README.md +0 -18
  107. package/node_modules/dijkstrajs/dijkstra.js +0 -165
  108. package/node_modules/dijkstrajs/package.json +0 -60
  109. package/node_modules/dijkstrajs/test/dijkstra.test.js +0 -96
  110. package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  111. package/node_modules/emoji-regex/README.md +0 -73
  112. package/node_modules/emoji-regex/es2015/index.js +0 -6
  113. package/node_modules/emoji-regex/es2015/text.js +0 -6
  114. package/node_modules/emoji-regex/index.d.ts +0 -23
  115. package/node_modules/emoji-regex/index.js +0 -6
  116. package/node_modules/emoji-regex/package.json +0 -50
  117. package/node_modules/emoji-regex/text.js +0 -6
  118. package/node_modules/find-up/index.d.ts +0 -137
  119. package/node_modules/find-up/index.js +0 -89
  120. package/node_modules/find-up/license +0 -9
  121. package/node_modules/find-up/package.json +0 -53
  122. package/node_modules/find-up/readme.md +0 -156
  123. package/node_modules/get-caller-file/LICENSE.md +0 -6
  124. package/node_modules/get-caller-file/README.md +0 -41
  125. package/node_modules/get-caller-file/index.d.ts +0 -2
  126. package/node_modules/get-caller-file/index.js +0 -22
  127. package/node_modules/get-caller-file/index.js.map +0 -1
  128. package/node_modules/get-caller-file/package.json +0 -42
  129. package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  130. package/node_modules/is-fullwidth-code-point/index.js +0 -50
  131. package/node_modules/is-fullwidth-code-point/license +0 -9
  132. package/node_modules/is-fullwidth-code-point/package.json +0 -42
  133. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  134. package/node_modules/locate-path/index.d.ts +0 -83
  135. package/node_modules/locate-path/index.js +0 -65
  136. package/node_modules/locate-path/license +0 -9
  137. package/node_modules/locate-path/package.json +0 -45
  138. package/node_modules/locate-path/readme.md +0 -122
  139. package/node_modules/p-limit/index.d.ts +0 -38
  140. package/node_modules/p-limit/index.js +0 -57
  141. package/node_modules/p-limit/license +0 -9
  142. package/node_modules/p-limit/package.json +0 -52
  143. package/node_modules/p-limit/readme.md +0 -101
  144. package/node_modules/p-locate/index.d.ts +0 -64
  145. package/node_modules/p-locate/index.js +0 -52
  146. package/node_modules/p-locate/license +0 -9
  147. package/node_modules/p-locate/package.json +0 -53
  148. package/node_modules/p-locate/readme.md +0 -90
  149. package/node_modules/p-try/index.d.ts +0 -39
  150. package/node_modules/p-try/index.js +0 -9
  151. package/node_modules/p-try/license +0 -9
  152. package/node_modules/p-try/package.json +0 -42
  153. package/node_modules/p-try/readme.md +0 -58
  154. package/node_modules/path-exists/index.d.ts +0 -28
  155. package/node_modules/path-exists/index.js +0 -23
  156. package/node_modules/path-exists/license +0 -9
  157. package/node_modules/path-exists/package.json +0 -39
  158. package/node_modules/path-exists/readme.md +0 -52
  159. package/node_modules/pngjs/.eslintignore +0 -2
  160. package/node_modules/pngjs/.eslintrc.json +0 -19
  161. package/node_modules/pngjs/.prettierignore +0 -3
  162. package/node_modules/pngjs/LICENSE +0 -20
  163. package/node_modules/pngjs/README.md +0 -429
  164. package/node_modules/pngjs/browser.js +0 -16096
  165. package/node_modules/pngjs/coverage/lcov-report/base.css +0 -354
  166. package/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +0 -881
  167. package/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +0 -554
  168. package/node_modules/pngjs/coverage/lcov-report/block-navigation.js +0 -77
  169. package/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +0 -647
  170. package/node_modules/pngjs/coverage/lcov-report/constants.js.html +0 -176
  171. package/node_modules/pngjs/coverage/lcov-report/crc.js.html +0 -200
  172. package/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
  173. package/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +0 -593
  174. package/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +0 -152
  175. package/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +0 -143
  176. package/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +0 -611
  177. package/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +0 -359
  178. package/node_modules/pngjs/coverage/lcov-report/index.html +0 -426
  179. package/node_modules/pngjs/coverage/lcov-report/interlace.js.html +0 -365
  180. package/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +0 -230
  181. package/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +0 -248
  182. package/node_modules/pngjs/coverage/lcov-report/packer.js.html +0 -467
  183. package/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +0 -128
  184. package/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +0 -575
  185. package/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +0 -404
  186. package/node_modules/pngjs/coverage/lcov-report/parser.js.html +0 -950
  187. package/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +0 -116
  188. package/node_modules/pngjs/coverage/lcov-report/png.js.html +0 -662
  189. package/node_modules/pngjs/coverage/lcov-report/prettify.css +0 -101
  190. package/node_modules/pngjs/coverage/lcov-report/prettify.js +0 -1007
  191. package/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  192. package/node_modules/pngjs/coverage/lcov-report/sorter.js +0 -169
  193. package/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +0 -584
  194. package/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +0 -215
  195. package/node_modules/pngjs/coverage/lcov.info +0 -2177
  196. package/node_modules/pngjs/lib/bitmapper.js +0 -267
  197. package/node_modules/pngjs/lib/bitpacker.js +0 -158
  198. package/node_modules/pngjs/lib/chunkstream.js +0 -189
  199. package/node_modules/pngjs/lib/constants.js +0 -32
  200. package/node_modules/pngjs/lib/crc.js +0 -40
  201. package/node_modules/pngjs/lib/filter-pack.js +0 -171
  202. package/node_modules/pngjs/lib/filter-parse-async.js +0 -24
  203. package/node_modules/pngjs/lib/filter-parse-sync.js +0 -21
  204. package/node_modules/pngjs/lib/filter-parse.js +0 -177
  205. package/node_modules/pngjs/lib/format-normaliser.js +0 -93
  206. package/node_modules/pngjs/lib/interlace.js +0 -95
  207. package/node_modules/pngjs/lib/packer-async.js +0 -50
  208. package/node_modules/pngjs/lib/packer-sync.js +0 -56
  209. package/node_modules/pngjs/lib/packer.js +0 -129
  210. package/node_modules/pngjs/lib/paeth-predictor.js +0 -16
  211. package/node_modules/pngjs/lib/parser-async.js +0 -165
  212. package/node_modules/pngjs/lib/parser-sync.js +0 -108
  213. package/node_modules/pngjs/lib/parser.js +0 -290
  214. package/node_modules/pngjs/lib/png-sync.js +0 -12
  215. package/node_modules/pngjs/lib/png.js +0 -194
  216. package/node_modules/pngjs/lib/sync-inflate.js +0 -168
  217. package/node_modules/pngjs/lib/sync-reader.js +0 -45
  218. package/node_modules/pngjs/package.json +0 -73
  219. package/node_modules/qrcode/README.md +0 -770
  220. package/node_modules/qrcode/bin/qrcode +0 -159
  221. package/node_modules/qrcode/helper/to-sjis-browser.js +0 -2
  222. package/node_modules/qrcode/helper/to-sjis.js +0 -105
  223. package/node_modules/qrcode/lib/browser.js +0 -76
  224. package/node_modules/qrcode/lib/can-promise.js +0 -7
  225. package/node_modules/qrcode/lib/core/alignment-pattern.js +0 -83
  226. package/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -59
  227. package/node_modules/qrcode/lib/core/bit-buffer.js +0 -37
  228. package/node_modules/qrcode/lib/core/bit-matrix.js +0 -65
  229. package/node_modules/qrcode/lib/core/byte-data.js +0 -30
  230. package/node_modules/qrcode/lib/core/error-correction-code.js +0 -135
  231. package/node_modules/qrcode/lib/core/error-correction-level.js +0 -50
  232. package/node_modules/qrcode/lib/core/finder-pattern.js +0 -22
  233. package/node_modules/qrcode/lib/core/format-info.js +0 -29
  234. package/node_modules/qrcode/lib/core/galois-field.js +0 -69
  235. package/node_modules/qrcode/lib/core/kanji-data.js +0 -54
  236. package/node_modules/qrcode/lib/core/mask-pattern.js +0 -234
  237. package/node_modules/qrcode/lib/core/mode.js +0 -167
  238. package/node_modules/qrcode/lib/core/numeric-data.js +0 -43
  239. package/node_modules/qrcode/lib/core/polynomial.js +0 -62
  240. package/node_modules/qrcode/lib/core/qrcode.js +0 -495
  241. package/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -56
  242. package/node_modules/qrcode/lib/core/regex.js +0 -31
  243. package/node_modules/qrcode/lib/core/segments.js +0 -330
  244. package/node_modules/qrcode/lib/core/utils.js +0 -63
  245. package/node_modules/qrcode/lib/core/version-check.js +0 -9
  246. package/node_modules/qrcode/lib/core/version.js +0 -163
  247. package/node_modules/qrcode/lib/index.js +0 -12
  248. package/node_modules/qrcode/lib/renderer/canvas.js +0 -63
  249. package/node_modules/qrcode/lib/renderer/png.js +0 -78
  250. package/node_modules/qrcode/lib/renderer/svg-tag.js +0 -81
  251. package/node_modules/qrcode/lib/renderer/svg.js +0 -19
  252. package/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +0 -85
  253. package/node_modules/qrcode/lib/renderer/terminal/terminal.js +0 -49
  254. package/node_modules/qrcode/lib/renderer/terminal.js +0 -9
  255. package/node_modules/qrcode/lib/renderer/utf8.js +0 -71
  256. package/node_modules/qrcode/lib/renderer/utils.js +0 -99
  257. package/node_modules/qrcode/lib/server.js +0 -138
  258. package/node_modules/qrcode/license +0 -10
  259. package/node_modules/qrcode/package.json +0 -77
  260. package/node_modules/require-directory/.jshintrc +0 -67
  261. package/node_modules/require-directory/.npmignore +0 -1
  262. package/node_modules/require-directory/.travis.yml +0 -3
  263. package/node_modules/require-directory/LICENSE +0 -22
  264. package/node_modules/require-directory/README.markdown +0 -184
  265. package/node_modules/require-directory/index.js +0 -86
  266. package/node_modules/require-directory/package.json +0 -40
  267. package/node_modules/require-main-filename/CHANGELOG.md +0 -26
  268. package/node_modules/require-main-filename/LICENSE.txt +0 -14
  269. package/node_modules/require-main-filename/README.md +0 -26
  270. package/node_modules/require-main-filename/index.js +0 -18
  271. package/node_modules/require-main-filename/package.json +0 -35
  272. package/node_modules/set-blocking/CHANGELOG.md +0 -26
  273. package/node_modules/set-blocking/LICENSE.txt +0 -14
  274. package/node_modules/set-blocking/README.md +0 -31
  275. package/node_modules/set-blocking/index.js +0 -7
  276. package/node_modules/set-blocking/package.json +0 -42
  277. package/node_modules/string-width/index.d.ts +0 -29
  278. package/node_modules/string-width/index.js +0 -47
  279. package/node_modules/string-width/license +0 -9
  280. package/node_modules/string-width/package.json +0 -56
  281. package/node_modules/string-width/readme.md +0 -50
  282. package/node_modules/strip-ansi/index.d.ts +0 -17
  283. package/node_modules/strip-ansi/index.js +0 -4
  284. package/node_modules/strip-ansi/license +0 -9
  285. package/node_modules/strip-ansi/package.json +0 -54
  286. package/node_modules/strip-ansi/readme.md +0 -46
  287. package/node_modules/which-module/LICENSE +0 -13
  288. package/node_modules/which-module/README.md +0 -58
  289. package/node_modules/which-module/index.js +0 -9
  290. package/node_modules/which-module/package.json +0 -41
  291. package/node_modules/wrap-ansi/index.js +0 -186
  292. package/node_modules/wrap-ansi/license +0 -9
  293. package/node_modules/wrap-ansi/package.json +0 -61
  294. package/node_modules/wrap-ansi/readme.md +0 -97
  295. package/node_modules/y18n/CHANGELOG.md +0 -35
  296. package/node_modules/y18n/LICENSE +0 -13
  297. package/node_modules/y18n/README.md +0 -109
  298. package/node_modules/y18n/index.js +0 -188
  299. package/node_modules/y18n/package.json +0 -39
  300. package/node_modules/yargs/CHANGELOG.md +0 -420
  301. package/node_modules/yargs/LICENSE +0 -21
  302. package/node_modules/yargs/README.md +0 -140
  303. package/node_modules/yargs/build/lib/apply-extends.d.ts +0 -2
  304. package/node_modules/yargs/build/lib/apply-extends.js +0 -65
  305. package/node_modules/yargs/build/lib/argsert.d.ts +0 -2
  306. package/node_modules/yargs/build/lib/argsert.js +0 -65
  307. package/node_modules/yargs/build/lib/command.d.ts +0 -64
  308. package/node_modules/yargs/build/lib/command.js +0 -416
  309. package/node_modules/yargs/build/lib/common-types.d.ts +0 -36
  310. package/node_modules/yargs/build/lib/common-types.js +0 -25
  311. package/node_modules/yargs/build/lib/completion-templates.d.ts +0 -2
  312. package/node_modules/yargs/build/lib/completion-templates.js +0 -50
  313. package/node_modules/yargs/build/lib/completion.d.ts +0 -21
  314. package/node_modules/yargs/build/lib/completion.js +0 -135
  315. package/node_modules/yargs/build/lib/is-promise.d.ts +0 -1
  316. package/node_modules/yargs/build/lib/is-promise.js +0 -9
  317. package/node_modules/yargs/build/lib/levenshtein.d.ts +0 -1
  318. package/node_modules/yargs/build/lib/levenshtein.js +0 -58
  319. package/node_modules/yargs/build/lib/middleware.d.ts +0 -10
  320. package/node_modules/yargs/build/lib/middleware.js +0 -57
  321. package/node_modules/yargs/build/lib/obj-filter.d.ts +0 -1
  322. package/node_modules/yargs/build/lib/obj-filter.js +0 -14
  323. package/node_modules/yargs/build/lib/parse-command.d.ts +0 -11
  324. package/node_modules/yargs/build/lib/parse-command.js +0 -36
  325. package/node_modules/yargs/build/lib/process-argv.d.ts +0 -2
  326. package/node_modules/yargs/build/lib/process-argv.js +0 -31
  327. package/node_modules/yargs/build/lib/usage.d.ts +0 -49
  328. package/node_modules/yargs/build/lib/usage.js +0 -540
  329. package/node_modules/yargs/build/lib/validation.d.ts +0 -34
  330. package/node_modules/yargs/build/lib/validation.js +0 -330
  331. package/node_modules/yargs/build/lib/yargs.d.ts +0 -274
  332. package/node_modules/yargs/build/lib/yargs.js +0 -1190
  333. package/node_modules/yargs/build/lib/yerror.d.ts +0 -4
  334. package/node_modules/yargs/build/lib/yerror.js +0 -11
  335. package/node_modules/yargs/index.js +0 -40
  336. package/node_modules/yargs/locales/be.json +0 -46
  337. package/node_modules/yargs/locales/de.json +0 -46
  338. package/node_modules/yargs/locales/en.json +0 -51
  339. package/node_modules/yargs/locales/es.json +0 -46
  340. package/node_modules/yargs/locales/fi.json +0 -49
  341. package/node_modules/yargs/locales/fr.json +0 -53
  342. package/node_modules/yargs/locales/hi.json +0 -49
  343. package/node_modules/yargs/locales/hu.json +0 -46
  344. package/node_modules/yargs/locales/id.json +0 -50
  345. package/node_modules/yargs/locales/it.json +0 -46
  346. package/node_modules/yargs/locales/ja.json +0 -51
  347. package/node_modules/yargs/locales/ko.json +0 -49
  348. package/node_modules/yargs/locales/nb.json +0 -44
  349. package/node_modules/yargs/locales/nl.json +0 -49
  350. package/node_modules/yargs/locales/nn.json +0 -44
  351. package/node_modules/yargs/locales/pirate.json +0 -13
  352. package/node_modules/yargs/locales/pl.json +0 -49
  353. package/node_modules/yargs/locales/pt.json +0 -45
  354. package/node_modules/yargs/locales/pt_BR.json +0 -48
  355. package/node_modules/yargs/locales/ru.json +0 -46
  356. package/node_modules/yargs/locales/th.json +0 -46
  357. package/node_modules/yargs/locales/tr.json +0 -48
  358. package/node_modules/yargs/locales/zh_CN.json +0 -48
  359. package/node_modules/yargs/locales/zh_TW.json +0 -47
  360. package/node_modules/yargs/package.json +0 -92
  361. package/node_modules/yargs/yargs.js +0 -14
  362. package/node_modules/yargs-parser/CHANGELOG.md +0 -601
  363. package/node_modules/yargs-parser/LICENSE.txt +0 -14
  364. package/node_modules/yargs-parser/README.md +0 -449
  365. package/node_modules/yargs-parser/index.js +0 -1032
  366. package/node_modules/yargs-parser/lib/tokenize-arg-string.js +0 -40
  367. package/node_modules/yargs-parser/package.json +0 -46
@@ -1,261 +0,0 @@
1
- export const DEFAULT_TITLE_REFRESH_BUDGET_MS = 1500;
2
- export const DEFAULT_TITLE_REFRESH_CONCURRENCY = 4;
3
-
4
- /**
5
- * Coalesce title refreshes for one corpus pass.
6
- *
7
- * Why a pass folds in **one** host call (issue #20 review, 2026-10-07):
8
- * `sessionQuery.readTitleSnapshots(ids)` is not a point read. The installed
9
- * `0.2.0-rc.2` chain is
10
- *
11
- * readTitleSnapshots → SessionCorpus.projectMany → listPersisted → persistence.list()
12
- *
13
- * and `persistence.list()` walks the whole corpus (per-file header + stat, plus
14
- * a corpus-wide revision hash while a historical generation is present). Batch
15
- * size therefore multiplies corpus enumerations: folding four ids at a time
16
- * cost ceil(N/4) full enumerations on top of the pass. The pass now hands every
17
- * pending id to one call, so the enumeration count stays constant as N grows;
18
- * read width inside that call is the host's own `persistedReadConcurrency`
19
- * (default 4, `SESSION_QUERY_DEFAULT_PERSISTED_INSPECT_CONCURRENCY`, bounded by
20
- * `projectMany`'s worker pool), and this module adds no per-id fan-out on top of
21
- * it. Only the plugin's own revision scan is bounded here — it reads no logs.
22
- *
23
- * Waiters may leave independently; the shared pass is cancelled only after its
24
- * last waiter leaves, unless a timed-out response promoted it to deliberate
25
- * background warm-up. A cancelled pass is retired immediately so the next
26
- * request starts a live successor instead of feeding the dead queue, while the
27
- * fold gate keeps a retired pass and its successor from overlapping — an
28
- * overlap would double the host's read width during cancellation cleanup.
29
- */
30
- export const createSessionTitleRefresher = ({
31
- readRevision,
32
- readTitles,
33
- getCachedTitle,
34
- setCachedTitle,
35
- onCacheChange = () => {},
36
- concurrency = DEFAULT_TITLE_REFRESH_CONCURRENCY,
37
- } = {}) => {
38
- if (typeof readTitles !== "function") throw new TypeError("readTitles must be a function");
39
- if (!Number.isSafeInteger(concurrency) || concurrency < 1) throw new RangeError("concurrency must be a positive safe integer");
40
- let currentRun = null;
41
- let disposed = false;
42
- // Serializes fold calls across runs: at most one host title call is in flight
43
- // per refresher, so cancellation cleanup cannot overlap fresh read work.
44
- let foldTail = Promise.resolve();
45
-
46
- const foldAll = (ids, signal) => {
47
- const previous = foldTail;
48
- let release;
49
- foldTail = new Promise((resolve) => { release = resolve; });
50
- return (async () => {
51
- try {
52
- if (signal.aborted) throw signal.reason ?? new Error("session title refresh aborted");
53
- await previous.catch(() => {});
54
- if (signal.aborted) throw signal.reason ?? new Error("session title refresh aborted");
55
- return await readTitles(ids, signal);
56
- } finally {
57
- release();
58
- }
59
- })();
60
- };
61
-
62
- const finishRun = (run) => {
63
- run.done = true;
64
- if (run.deadlineTimer) {
65
- clearTimeout(run.deadlineTimer);
66
- run.deadlineTimer = null;
67
- }
68
- if (currentRun === run) currentRun = null;
69
- run.resolve();
70
- };
71
-
72
- // issue #28 复核 2:**run 级**有限寿命(源级政策)。
73
- // 调用者级的 `backgroundOnBudget: false` 只约束「谁不提升」——挡不住后来加入的 HTTP 调用者
74
- // 在自己的响应预算到点时把 run 提升为**永久后台**;坏源一旦永生,之后健康的请求会一直 join 它
75
- // (只拿到短码),失败隔离就没有闭环。故把截止放在 run 上:到点即中止并退休,**不看 background**。
76
- const armRunDeadline = (run) => {
77
- if (!Number.isFinite(run.deadlineAt) || run.deadlineTimer) return;
78
- const remaining = Math.max(0, run.deadlineAt - performance.now());
79
- run.deadlineTimer = setTimeout(() => {
80
- run.deadlineTimer = null;
81
- if (run.done || run.controller.signal.aborted) return;
82
- run.controller.abort(new Error("session-title refresh run exceeded its deadline"));
83
- if (currentRun === run) currentRun = null;
84
- }, remaining);
85
- run.deadlineTimer.unref?.();
86
- };
87
-
88
- const processRun = async (run) => {
89
- const { signal } = run.controller;
90
- try {
91
- while (!disposed && !signal.aborted && run.queue.length > 0) {
92
- // Drain everything queued so far into this round: revisions first
93
- // (bounded workers, no log reads), then a single fold call.
94
- const pending = run.queue.splice(0, run.queue.length);
95
- const misses = [];
96
- let cursor = 0;
97
- const scanRevisions = async () => {
98
- for (;;) {
99
- if (disposed || signal.aborted) return;
100
- const index = cursor;
101
- cursor += 1;
102
- if (index >= pending.length) return;
103
- const id = pending[index];
104
- let revision = null;
105
- if (typeof readRevision === "function") {
106
- try {
107
- const observed = await readRevision(id, signal);
108
- revision = typeof observed === "string" && observed !== "" ? observed : null;
109
- } catch (error) {
110
- if (signal.aborted) throw error;
111
- }
112
- }
113
- if (disposed || signal.aborted) return;
114
- const cached = getCachedTitle?.(id, revision);
115
- if (cached?.hit) run.results.set(id, cached.title);
116
- else misses.push({ index, id, revision });
117
- }
118
- };
119
- await Promise.all(Array.from(
120
- { length: Math.min(concurrency, pending.length) },
121
- () => scanRevisions(),
122
- ));
123
- if (disposed || signal.aborted) break;
124
- // Worker completion order is not the request order; keep the fold
125
- // deterministic (and stable for the host's first-occurrence ordering).
126
- misses.sort((a, b) => a.index - b.index);
127
-
128
- if (misses.length > 0) {
129
- let folded;
130
- try {
131
- folded = await foldAll(misses.map(({ id }) => id), signal);
132
- } catch (error) {
133
- if (signal.aborted) throw error;
134
- folded = new Map();
135
- }
136
- if (disposed || signal.aborted) break;
137
- for (const { id, revision } of misses) {
138
- const result = folded?.get?.(id);
139
- if (!result?.ok) continue;
140
- const title = typeof result.title === "string" && result.title !== "" ? result.title : null;
141
- setCachedTitle?.(id, revision, title);
142
- run.results.set(id, title);
143
- }
144
- }
145
- onCacheChange();
146
- }
147
- } catch {
148
- // An aborted or faulty refresh is a cache miss, never an endpoint failure.
149
- } finally {
150
- finishRun(run);
151
- }
152
- };
153
-
154
- const addIds = (run, ids) => {
155
- for (const id of ids) {
156
- if (typeof id !== "string" || id === "" || run.seen.has(id)) continue;
157
- run.seen.add(id);
158
- run.queue.push(id);
159
- }
160
- };
161
-
162
- const createRun = (ids) => {
163
- let resolve;
164
- const promise = new Promise((done) => { resolve = done; });
165
- const run = {
166
- controller: new AbortController(),
167
- queue: [],
168
- seen: new Set(),
169
- results: new Map(),
170
- waiters: 0,
171
- background: false,
172
- deadlineAt: Infinity,
173
- deadlineTimer: null,
174
- done: false,
175
- promise,
176
- resolve,
177
- };
178
- addIds(run, ids);
179
- currentRun = run;
180
- void processRun(run);
181
- return run;
182
- };
183
-
184
- const refresh = async (ids, { signal, budgetMs = DEFAULT_TITLE_REFRESH_BUDGET_MS, backgroundOnBudget = true, runDeadlineMs } = {}) => {
185
- if (disposed || signal?.aborted) return new Map();
186
- const uniqueIds = [...new Set(ids)].filter((id) => typeof id === "string" && id !== "");
187
- if (uniqueIds.length === 0) return new Map();
188
- if (!Number.isFinite(budgetMs) || budgetMs < 0) throw new RangeError("budgetMs must be a non-negative finite number");
189
-
190
- // A run whose upstream was already aborted can no longer consume its queue:
191
- // joining it would park this request's ids in a dead queue and hand back a
192
- // partial result. Retire it and start a live successor instead; the fold
193
- // gate keeps the successor's work behind the retiring pass's cleanup.
194
- let run = currentRun;
195
- if (!run || run.done || run.controller.signal.aborted) run = createRun(uniqueIds);
196
- else addIds(run, uniqueIds);
197
- // issue #28 复核 2:run 级截止(取所有声明中**最早**者——只收紧、不放松)。
198
- // 它不因后来调用者的 background promotion 而失效:到点由 armRunDeadline 退休该 run。
199
- if (Number.isFinite(runDeadlineMs) && runDeadlineMs >= 0) {
200
- const nextAt = performance.now() + runDeadlineMs;
201
- // 只在**收紧**时重设:后来者更晚的声明不得延长期限(issue #28 复核 3)。
202
- if (nextAt < run.deadlineAt) {
203
- run.deadlineAt = nextAt;
204
- // 旧 timer 必须先清掉再重设——armRunDeadline 见到已有 deadlineTimer 会直接返回,
205
- // 那样「收紧」就静默失效(评审实测:先声明 300ms、后声明 20ms,源仍按 300ms 才取消)。
206
- if (run.deadlineTimer) {
207
- clearTimeout(run.deadlineTimer);
208
- run.deadlineTimer = null;
209
- }
210
- armRunDeadline(run);
211
- }
212
- }
213
- run.waiters += 1;
214
- let released = false;
215
- const release = () => {
216
- if (released) return;
217
- released = true;
218
- run.waiters -= 1;
219
- if (!run.done && !run.background && run.waiters === 0) {
220
- run.controller.abort(new Error("all session-title refresh waiters left"));
221
- }
222
- };
223
-
224
- let timer;
225
- let abortHandler;
226
- const interrupted = new Promise((resolve) => {
227
- if (signal) {
228
- abortHandler = () => resolve("aborted");
229
- signal.addEventListener("abort", abortHandler, { once: true });
230
- }
231
- timer = setTimeout(() => resolve("budget"), budgetMs);
232
- });
233
- const outcome = await Promise.race([
234
- run.promise.then(() => "done"),
235
- interrupted,
236
- ]);
237
- clearTimeout(timer);
238
- if (signal && abortHandler) signal.removeEventListener("abort", abortHandler);
239
-
240
- // issue #28 复核 BLOCKING 2:调用方可以要求**有限生命期**。默认(响应路径)预算到点会把
241
- // run 提升为「后台预热」并长期存活;但启动预热**不能**这样——否则一次挂住的预热会让之后
242
- // 健康的请求一直 join 这个坏 run、只拿到短码。传 `backgroundOnBudget: false` 时不做提升,
243
- // 于是下面的 release() 在没有其它等待者时会中止该 run(退休),健康请求随后可重新开始。
244
- if (outcome === "budget" && backgroundOnBudget && !signal?.aborted && !run.done) run.background = true;
245
- const aborted = signal?.aborted === true;
246
- release();
247
- return aborted ? new Map() : new Map(run.results);
248
- };
249
-
250
- return {
251
- refresh,
252
- dispose() {
253
- disposed = true;
254
- currentRun?.controller.abort(new Error("session-title refresher disposed"));
255
- },
256
- /** Test seam: resolve when the current single-flight pass settles. */
257
- whenIdle() {
258
- return currentRun?.promise ?? Promise.resolve();
259
- },
260
- };
261
- };
@@ -1,172 +0,0 @@
1
- /**
2
- * issue #131:SSE 连接准入策略(纯函数,无 HTTP/无副作用,便于单测)。
3
- *
4
- * 真机症状:只有一台手机,`mobileOnline = 16 / 16`,新 `/m/api/events` 永久 503,
5
- * 只能重启宿主。App 侧泄漏已修(9670849),宿主侧仍需兜底:
6
- * - 满额时**不直接 503**,先驱逐「满龄且优先 stalled」的候选连接,再接受新连接;
7
- * - 候选必须 `age >= minAgeMs`(默认 60s):只能保证"60s 内不驱逐",不保证不误踢;
8
- * - 每次准入最多驱逐 1 条,绝不通过调大 maxConnections 掩盖泄漏。
9
- *
10
- * 排序(架构顾问 #131 契约 + Reviewer 预审 P3 收口):
11
- * **stalled 优先** > 同 clientId(若双方都有)> 同 clientIp > 全局最旧。
12
- *
13
- * 重要语义边界:`age >= 60s` 只是**可驱逐门槛**,不是"活跃/陈旧"判据——真实活跃设备
14
- * 也可能连接超过 60s;`stalled` 也只是排序/日志信号(半开连接的 `res.write` 可能仍成功,
15
- * 不能用"写成功"证明还活着)。两者合起来仍是启发式,不能宣称"不会误踢活跃连接"。
16
- */
17
-
18
- /** 满龄候选的最小年龄(毫秒):低于此年龄的连接一律不驱逐(硬门槛,不等于判活)。 */
19
- export const SSE_EVICT_MIN_AGE_MS = 60_000;
20
- /** 服务端 SSE 心跳间隔(毫秒):与既有 `: ping` 周期一致。 */
21
- export const SSE_HEARTBEAT_MS = 25_000;
22
- /** 无成功写的 stalled 判定(毫秒):约 2 个心跳周期。 */
23
- export const SSE_STALL_IDLE_MS = 50_000;
24
- /** SSE 背压阈值(字节):与 v2.7.2 review(M5) 一致。 */
25
- export const SSE_BACKPRESSURE_BYTES = 256 * 1024;
26
- /** 503 拒绝日志汇总窗口(毫秒):避免 App 重试风暴刷屏。 */
27
- export const SSE_REJECT_LOG_WINDOW_MS = 30_000;
28
-
29
- /**
30
- * 创建一条 SSE 连接的元数据。
31
- *
32
- * `id` 仅用于日志/诊断关联,不含 token/cookie;`clientIp` / `appVersion` / `clientId`
33
- * 都来自请求头或 socket,只用于准入排序与排障,不参与鉴权。
34
- */
35
- export function createSseConnectionMeta({ id, now = Date.now(), clientIp = "", appVersion = "", clientId = "" }) {
36
- return {
37
- id,
38
- createdAt: now,
39
- lastWriteAt: now,
40
- lastHeartbeatAt: now,
41
- writeFailures: 0,
42
- backpressure: false,
43
- clientIp,
44
- appVersion,
45
- clientId,
46
- };
47
- }
48
-
49
- /** 是否处于 stalled 状态(只用于排序/日志,不作为驱逐的唯一判据)。 */
50
- export function isSseConnectionStalled(meta, now = Date.now()) {
51
- if (!meta) return false;
52
- if (meta.writeFailures > 0) return true;
53
- if (meta.backpressure === true) return true;
54
- return now - meta.lastWriteAt >= SSE_STALL_IDLE_MS;
55
- }
56
-
57
- /**
58
- * 连接统计(诊断指标):最旧年龄 / 最久无成功写 / stalled 数 / 满龄候选数(非陈旧数)。
59
- *
60
- * @param {{res: unknown, meta: object}[]} entries
61
- */
62
- export function sseConnectionStats(entries, now = Date.now(), { minAgeMs = SSE_EVICT_MIN_AGE_MS } = {}) {
63
- let total = 0;
64
- let oldestAgeMs = 0;
65
- let oldestIdleMs = 0;
66
- let stalled = 0;
67
- // 仅表示"年龄达到可驱逐门槛"的候选数,不等于陈旧/活跃判定(Reviewer P3)。
68
- let ageEligible = 0;
69
- for (const entry of entries ?? []) {
70
- const meta = entry?.meta;
71
- if (!meta) continue;
72
- total += 1;
73
- const ageMs = Math.max(0, now - meta.createdAt);
74
- const idleMs = Math.max(0, now - meta.lastWriteAt);
75
- if (ageMs > oldestAgeMs) oldestAgeMs = ageMs;
76
- if (idleMs > oldestIdleMs) oldestIdleMs = idleMs;
77
- if (isSseConnectionStalled(meta, now)) stalled += 1;
78
- if (ageMs >= minAgeMs) ageEligible += 1;
79
- }
80
- return { total, oldestAgeMs, oldestIdleMs, stalled, ageEligible };
81
- }
82
-
83
- /** 毫秒 → 紧凑可读(日志/诊断用)。 */
84
- export function formatDurationMs(ms) {
85
- if (!Number.isFinite(ms) || ms <= 0) return "0s";
86
- if (ms < 1000) return `${Math.round(ms)}ms`;
87
- if (ms < 60_000) return `${Math.round(ms / 1000)}s`;
88
- if (ms < 3_600_000) return `${Math.floor(ms / 60_000)}m${Math.round((ms % 60_000) / 1000)}s`;
89
- return `${Math.floor(ms / 3_600_000)}h${Math.floor((ms % 3_600_000) / 60_000)}m`;
90
- }
91
-
92
- function identityTier(meta, incoming) {
93
- const wantedClientId = typeof incoming?.clientId === "string" ? incoming.clientId : "";
94
- if (wantedClientId !== "" && typeof meta.clientId === "string" && meta.clientId === wantedClientId) return 0;
95
- const wantedIp = typeof incoming?.clientIp === "string" ? incoming.clientIp : "";
96
- if (wantedIp !== "" && typeof meta.clientIp === "string" && meta.clientIp === wantedIp) return 1;
97
- return 2;
98
- }
99
-
100
- const TIER_REASON = ["same-client-id", "same-client-ip", "oldest"];
101
-
102
- /**
103
- * 准入决策(纯函数):未满直接 accept;满池才调用 planConnectionAdmission;
104
- * 候选不存在则 reject;任何情况下最多返回 1 条 evict。
105
- *
106
- * @returns {{action: "accept"} |
107
- * {action: "evict", evict: object} |
108
- * {action: "reject", reason: string}}
109
- */
110
- export function decideConnectionAdmission({ currentSize, maxConnections, entries, incoming = {}, now = Date.now(), minAgeMs = SSE_EVICT_MIN_AGE_MS }) {
111
- if (currentSize < maxConnections) return { action: "accept" };
112
- // 配额被调小到低于当前连接数:不通过连续驱逐掩盖配置问题(每次准入最多 1 条的原则)。
113
- if (currentSize > maxConnections) return { action: "reject", reason: "over-capacity" };
114
- const plan = planConnectionAdmission({ entries, incoming, now, minAgeMs });
115
- if (!plan.evict) return { action: "reject", reason: "no-eligible" };
116
- return { action: "evict", evict: plan.evict };
117
- }
118
-
119
- /**
120
- * 满池时的准入计划:最多返回 1 条可驱逐连接;没有年龄达标的候选就拒绝。
121
- *
122
- * **只在 `connections.size >= maxConnections` 时调用**;未满池直接接受,不经过本函数。
123
- *
124
- * @param {object} args
125
- * @param {{res: unknown, meta: object}[]} args.entries 当前在网连接
126
- * @param {{clientIp?: string, clientId?: string}} [args.incoming] 新连接的来源信息
127
- * @param {number} [args.now]
128
- * @param {number} [args.minAgeMs] 安全年龄(默认 60s)
129
- * @returns {{evict: null | {res: unknown, meta: object, ageMs: number, idleMs: number, stalled: boolean, reason: string, eligible: number}, eligible: number, stalled: number}}
130
- */
131
- export function planConnectionAdmission({ entries, incoming = {}, now = Date.now(), minAgeMs = SSE_EVICT_MIN_AGE_MS }) {
132
- const eligible = [];
133
- for (const entry of entries ?? []) {
134
- const meta = entry?.meta;
135
- if (!meta) continue;
136
- const ageMs = Math.max(0, now - meta.createdAt);
137
- if (ageMs < minAgeMs) continue;
138
- eligible.push({
139
- res: entry.res,
140
- meta,
141
- ageMs,
142
- idleMs: Math.max(0, now - meta.lastWriteAt),
143
- stalled: isSseConnectionStalled(meta, now),
144
- tier: identityTier(meta, incoming),
145
- });
146
- }
147
- if (eligible.length === 0) {
148
- return { evict: null, eligible: 0, stalled: 0 };
149
- }
150
- for (const candidate of eligible) candidate.reason = TIER_REASON[candidate.tier];
151
- eligible.sort(
152
- (a, b) =>
153
- (a.stalled === b.stalled ? 0 : a.stalled ? -1 : 1) ||
154
- a.tier - b.tier ||
155
- a.meta.createdAt - b.meta.createdAt ||
156
- String(a.meta.id ?? "").localeCompare(String(b.meta.id ?? "")),
157
- );
158
- const best = eligible[0];
159
- return {
160
- evict: {
161
- res: best.res,
162
- meta: best.meta,
163
- ageMs: best.ageMs,
164
- idleMs: best.idleMs,
165
- stalled: best.stalled,
166
- reason: best.reason,
167
- eligible: eligible.length,
168
- },
169
- eligible: eligible.length,
170
- stalled: eligible.filter((candidate) => candidate.stalled).length,
171
- };
172
- }
@@ -1,20 +0,0 @@
1
- // 跨平台子进程调用辅助(issue #39 Windows 修复)。
2
- //
3
- // Windows 上 npm/pnpm 是 `npm.cmd`/`pnpm.cmd`:Node 在 `shell: false` 下用 CreateProcess
4
- // 无法解析 `.cmd`(只会自动补 `.exe`),直接 spawn 裸命令名会 ENOENT。因此在 win32 上
5
- // 必须经 shell 调用,并对含空白的参数(典型是 profile/临时目录路径)做 cmd 引用。
6
- //
7
- // 本模块保持零依赖,避免 npm-update-source ↔ plugin-self-update 的循环引用。
8
-
9
- /** 仅 Windows 需要 `shell: true`;POSIX 保持直接 spawn(更可控、无 shell 注入面)。 */
10
- export function shellOptions(platform = process.platform) {
11
- return platform === "win32" ? { shell: true } : {};
12
- }
13
-
14
- /** Windows shell 下给含空白/元字符的参数加引号;POSIX 原样返回。 */
15
- export function quoteShellArgument(value, platform = process.platform) {
16
- const text = String(value ?? "");
17
- if (platform !== "win32" || text === "") return text;
18
- if (!/[\s"&|<>^]/.test(text)) return text;
19
- return `"${text.replace(/"/g, '""')}"`;
20
- }
@@ -1,24 +0,0 @@
1
- // Host credentials are scoped to the explicit loopback origin and update routes, not to arbitrary release URLs.
2
- export async function fetchUpdateResource(url, {
3
- fetchImpl = fetch, token = '', trustedOrigin = '', basePath = '/m', headers = {}, signal, maxRedirects = 5,
4
- } = {}) {
5
- // 精确路径集合:同 origin 的其它处理器(如 /other-plugin/api/update/manifest)不得拿到口令。
6
- const mount = basePath === '/' || basePath === '' ? '/m' : basePath.replace(/\/$/, '');
7
- const allowedPaths = new Set([`${mount}/api/update/manifest`, `${mount}/api/update/plugin`, `${mount}/api/update/apk`]);
8
- let target = new URL(url);
9
- for (let hops = 0; hops <= maxRedirects; hops++) {
10
- if (target.username || target.password || !(['https:'].includes(target.protocol) ||
11
- (target.protocol === 'http:' && ['127.0.0.1','localhost','[::1]'].includes(target.hostname)))) throw new Error('update-url-not-allowed');
12
- const authAllowed = Boolean(token) && trustedOrigin !== '' && target.origin === trustedOrigin &&
13
- allowedPaths.has(target.pathname);
14
- const response = await fetchImpl(target.toString(), {
15
- headers: { ...headers, ...(authAllowed ? { 'x-mobile-token': token } : {}) }, redirect: 'manual', signal,
16
- });
17
- if (![301,302,303,307,308].includes(response.status)) return { response, finalUrl: target.toString() };
18
- const location = response.headers.get('location');
19
- if (!location) throw new Error('update-redirect-missing');
20
- await response.body?.cancel?.();
21
- target = new URL(location, target);
22
- }
23
- throw new Error('update-redirect-limit');
24
- }