buninu-linux 0.15.58 → 0.17.60

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 (228) hide show
  1. package/NOTICE.md +46 -46
  2. package/README.md +22 -15
  3. package/README.zh.md +22 -15
  4. package/initramfs/buninu/CHANGELOG.md +47 -0
  5. package/initramfs/buninu/apps/jsgotty/LICENSES/MIT-jsmdcui.txt +22 -0
  6. package/initramfs/buninu/apps/jsgotty/NOTICE +5 -0
  7. package/initramfs/buninu/apps/jsgotty/README.en.md +21 -0
  8. package/initramfs/buninu/apps/jsgotty/README.md +21 -0
  9. package/initramfs/buninu/apps/jsgotty/client-modes.mjs +117 -0
  10. package/initramfs/buninu/apps/jsgotty/client.mjs +100 -10
  11. package/initramfs/buninu/apps/jsgotty/clipboard-powershell.js +18 -0
  12. package/initramfs/buninu/apps/jsgotty/clipboard.js +148 -0
  13. package/initramfs/buninu/apps/jsgotty/gotty.js +13 -0
  14. package/initramfs/buninu/apps/jsgotty/package-lock.json +2 -2
  15. package/initramfs/buninu/apps/jsgotty/package.json +1 -1
  16. package/initramfs/buninu/apps/jsgotty/static/css/index.css +14 -1
  17. package/initramfs/buninu/apps/jsgotty/static/js/gotty.js +107 -8
  18. package/initramfs/buninu/apps/jsgotty/static/js/kitty.js +115 -7
  19. package/initramfs/buninu/apps/jsgotty/terminal-modes.js +332 -0
  20. package/initramfs/buninu/apps/jsgotty/tests/client-exit.test.mjs +45 -0
  21. package/initramfs/buninu/apps/jsgotty/tests/client-modes.test.mjs +105 -0
  22. package/initramfs/buninu/apps/jsgotty/tests/clipboard-browser.test.js +81 -0
  23. package/initramfs/buninu/apps/jsgotty/tests/clipboard.test.js +75 -0
  24. package/initramfs/buninu/apps/jsgotty/tests/manual/zoom-collector.cjs +55 -0
  25. package/initramfs/buninu/apps/jsgotty/tests/manual/zoom-debug.js +39 -0
  26. package/initramfs/buninu/apps/jsgotty/tests/manual-touch-diagnostics.js +33 -0
  27. package/initramfs/buninu/apps/jsgotty/tests/manual-touch-diagnostics.mjs +22 -0
  28. package/initramfs/buninu/apps/jsgotty/tests/nested-cli-pty.test.mjs +116 -0
  29. package/initramfs/buninu/apps/jsgotty/tests/reconnect-modes-browser.test.js +144 -0
  30. package/initramfs/buninu/apps/jsgotty/tests/reconnect-modes.md +44 -0
  31. package/initramfs/buninu/apps/jsgotty/tests/reconnect-modes.test.js +166 -0
  32. package/initramfs/buninu/apps/jsgotty/tests/touch-drag-browser.test.js +106 -0
  33. package/initramfs/buninu/apps/jsgotty/tests/wheel-browser.test.js +60 -0
  34. package/initramfs/buninu/apps/jsmdcui/CHANGELOG.md +44 -0
  35. package/initramfs/buninu/apps/jsmdcui/package.json +1 -1
  36. package/initramfs/buninu/apps/jsmdcui/src/highlight/go-regexp.js +83 -0
  37. package/initramfs/buninu/apps/jsmdcui/src/highlight/highlighter.js +49 -62
  38. package/initramfs/buninu/apps/jsmdcui/src/highlight/parser.js +8 -5
  39. package/initramfs/buninu/apps/jsmdcui/tests/go-regexp.test.js +98 -0
  40. package/initramfs/buninu/apps/jsmdcui/tests/heading-ids.test.js +21 -16
  41. package/initramfs/buninu/apps/jsmdcui/tests/highlight-regions.test.js +73 -0
  42. package/initramfs/buninu/apps/jsmdcui/tests/id-collision.test.js +32 -9
  43. package/initramfs/buninu/apps/jsmdcui/tests/markdown-behavior.mjs +9 -0
  44. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/NORMAL-HTML.md +46 -0
  45. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/README.md +85 -0
  46. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/REPORT.md +328 -0
  47. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/compare.mjs +75 -0
  48. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/go.mod +5 -0
  49. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/normal-html-report.json +619 -0
  50. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/normal-html.html +9 -0
  51. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/oracle.go +49 -0
  52. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/report.json +2174 -0
  53. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/PowerShell.txt +39 -0
  54. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/ada.txt +25 -0
  55. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/apacheconf.txt +49 -0
  56. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/arduino.txt +38 -0
  57. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/asciidoc.txt +33 -0
  58. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/asm.txt +77 -0
  59. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/ats.txt +48 -0
  60. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/awk.txt +28 -0
  61. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/b.txt +27 -0
  62. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/bat.txt +39 -0
  63. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/c.txt +34 -0
  64. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/caddyfile.txt +14 -0
  65. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/cake.txt +7 -0
  66. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/clojure.txt +18 -0
  67. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/cmake.txt +20 -0
  68. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/coffeescript.txt +32 -0
  69. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/colortest.txt +19 -0
  70. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/conky.txt +12 -0
  71. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/cpp.txt +46 -0
  72. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/crontab.txt +16 -0
  73. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/crystal.txt +28 -0
  74. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/csharp.txt +28 -0
  75. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/css.txt +19 -0
  76. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/csx.txt +7 -0
  77. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/cuda.txt +37 -0
  78. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/cython.txt +22 -0
  79. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/d.txt +52 -0
  80. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/dart.txt +27 -0
  81. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/default.txt +8 -0
  82. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/dockerfile.txt +10 -0
  83. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/dot.txt +15 -0
  84. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/elixir.txt +23 -0
  85. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/elm.txt +20 -0
  86. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/erb.txt +32 -0
  87. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/erlang.txt +23 -0
  88. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/fish.txt +20 -0
  89. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/forth.txt +17 -0
  90. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/fortran.txt +40 -0
  91. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/freebsd-kernel.txt +10 -0
  92. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/fsharp.txt +27 -0
  93. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/gdscript.txt +26 -0
  94. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/gemini.txt +11 -0
  95. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/gentoo-ebuild.txt +28 -0
  96. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/gentoo-etc-portage.txt +14 -0
  97. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/git-commit.txt +19 -0
  98. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/git-config.txt +11 -0
  99. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/git-rebase-todo.txt +10 -0
  100. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/gleam.txt +44 -0
  101. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/glsl.txt +18 -0
  102. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/gnuplot.txt +11 -0
  103. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/go.txt +33 -0
  104. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/godoc.txt +9 -0
  105. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/golo.txt +50 -0
  106. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/gomod.txt +16 -0
  107. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/graphql.txt +20 -0
  108. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/groff.txt +18 -0
  109. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/groovy.txt +42 -0
  110. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/haml.txt +16 -0
  111. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/hare.txt +31 -0
  112. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/haskell.txt +26 -0
  113. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/hc.txt +28 -0
  114. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/html.txt +26 -0
  115. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/html4.txt +20 -0
  116. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/html5.txt +20 -0
  117. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/ini.txt +16 -0
  118. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/inputrc.txt +14 -0
  119. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/java.txt +18 -0
  120. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/javascript.txt +41 -0
  121. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/jinja2.txt +13 -0
  122. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/json.txt +21 -0
  123. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/jsonnet.txt +28 -0
  124. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/julia.txt +24 -0
  125. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/justfile.txt +26 -0
  126. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/keymap.txt +15 -0
  127. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/kickstart.txt +16 -0
  128. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/kotlin.txt +30 -0
  129. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/kvlang.txt +37 -0
  130. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/ledger.txt +13 -0
  131. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/lfe.txt +17 -0
  132. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/lilypond.txt +15 -0
  133. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/lisp.txt +17 -0
  134. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/log.txt +45 -0
  135. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/lua.txt +48 -0
  136. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/mail.txt +17 -0
  137. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/makefile.txt +25 -0
  138. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/man.txt +12 -0
  139. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/markdown.txt +21 -0
  140. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/mc.txt +11 -0
  141. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/meson.txt +29 -0
  142. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/micro.txt +25 -0
  143. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/mpdconf.txt +13 -0
  144. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/msbuild.txt +7 -0
  145. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/nanorc.txt +16 -0
  146. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/nftables.txt +22 -0
  147. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/nginx.txt +17 -0
  148. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/nim.txt +23 -0
  149. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/nix.txt +15 -0
  150. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/nu.txt +92 -0
  151. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/objc.txt +36 -0
  152. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/ocaml.txt +25 -0
  153. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/octave.txt +35 -0
  154. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/odin.txt +35 -0
  155. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/pascal.txt +22 -0
  156. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/patch.txt +13 -0
  157. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/peg.txt +16 -0
  158. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/perl.txt +27 -0
  159. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/php.txt +44 -0
  160. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/pkg-config.txt +12 -0
  161. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/po.txt +12 -0
  162. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/pony.txt +29 -0
  163. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/pov.txt +17 -0
  164. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/privoxy-action.txt +14 -0
  165. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/privoxy-config.txt +10 -0
  166. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/privoxy-filter.txt +12 -0
  167. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/proto.txt +22 -0
  168. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/prql.txt +42 -0
  169. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/puppet.txt +22 -0
  170. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/python2.txt +24 -0
  171. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/python3.txt +28 -0
  172. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/r.txt +16 -0
  173. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/raku.txt +19 -0
  174. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/reST.txt +18 -0
  175. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/renpy.txt +11 -0
  176. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/rpmspec.txt +31 -0
  177. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/ruby.txt +34 -0
  178. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/rust.txt +27 -0
  179. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/sage.txt +24 -0
  180. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/scad.txt +23 -0
  181. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/scala.txt +16 -0
  182. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/sed.txt +12 -0
  183. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/sh.txt +20 -0
  184. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/sls.txt +15 -0
  185. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/smalltalk.txt +28 -0
  186. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/solidity.txt +26 -0
  187. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/sql.txt +35 -0
  188. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/stata.txt +32 -0
  189. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/svelte.txt +10 -0
  190. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/swift.txt +53 -0
  191. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/systemd.txt +15 -0
  192. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/tcl.txt +17 -0
  193. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/terraform.txt +28 -0
  194. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/tex.txt +15 -0
  195. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/toml.txt +31 -0
  196. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/twig.txt +29 -0
  197. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/typescript.txt +32 -0
  198. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/v.txt +47 -0
  199. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/vala.txt +22 -0
  200. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/verilog.txt +37 -0
  201. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/vhdl.txt +37 -0
  202. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/vi.txt +17 -0
  203. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/vue.txt +29 -0
  204. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/xml.txt +14 -0
  205. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/xresources.txt +14 -0
  206. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/yaml.txt +19 -0
  207. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/yum.txt +12 -0
  208. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/zig.txt +24 -0
  209. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/zscript.txt +31 -0
  210. package/initramfs/buninu/apps/jsmdcui/tests/syntax-parity/samples/zsh.txt +21 -0
  211. package/initramfs/buninu/package.json +1 -1
  212. package/initramfs/lib/bunterm/images.js +5 -1
  213. package/initramfs/lib/bunterm/raw-protocol.js +82 -4
  214. package/initramfs/lib/bunterm/renderer.js +35 -16
  215. package/initramfs/lib/bunterm/terminal.js +11 -1
  216. package/initramfs/lib/fbdev.js +11 -5
  217. package/initramfs/lib/mapped-frame.js +28 -0
  218. package/initramfs/lib/raw-image.js +29 -5
  219. package/package.json +1 -1
  220. package/scripts/arch.js +5 -5
  221. package/scripts/arch.sh +5 -5
  222. package/scripts/npm-packages.md +11 -10
  223. package/test/bunterm-image-bytes.test.js +15 -0
  224. package/test/bunterm-mapped-lifetime.test.js +147 -0
  225. package/test/bunterm-raw-protocol.test.js +20 -0
  226. package/test/bunterm-renderer.test.js +9 -0
  227. package/test/fbdev-sync.test.js +9 -0
  228. package/test/fetch-npm.test.js +2 -2
package/NOTICE.md CHANGED
@@ -156,83 +156,83 @@ the built image redistributes them.
156
156
  - License: GPL-2.0-only WITH Linux-syscall-note
157
157
  - See: `LICENSES/GPL-2.0.txt` and `LICENSES/Linux-syscall-note.txt`
158
158
 
159
- Linux 6.18.58 as packaged by Alpine Linux 3.24 from the `linux-lts` aport.
160
- The default build uses package `linux-virt`, version 6.18.58-r0.
161
- `--linux-lts` and `--real` use package `linux-lts`, version 6.18.58-r0.
159
+ Linux 6.18.60 as packaged by Alpine Linux 3.24 from the `linux-lts` aport.
160
+ The default build uses package `linux-virt`, version 6.18.60-r0.
161
+ `--linux-lts` and `--real` use package `linux-lts`, version 6.18.60-r0.
162
162
  Each comes from the x86_64 or aarch64 repository to match `--arch`. All
163
163
  listed modules are the selected package's `.ko.gz` files decompressed without
164
164
  modification.
165
165
 
166
- - Upstream source: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.58.tar.xz
166
+ - Upstream source: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.60.tar.xz
167
167
  - Alpine build recipe, configuration and patches (Corresponding Source),
168
- pinned to the commit shipping 6.18.58-r0 (the same for both architectures):
169
- https://gitlab.alpinelinux.org/alpine/aports/-/blob/5fe63f789de75f6a71001cf2de771f922bedd0d2/main/linux-lts/APKBUILD
168
+ pinned to the commit shipping 6.18.60-r0 (the same for both architectures):
169
+ https://gitlab.alpinelinux.org/alpine/aports/-/blob/97a4e7b01d88cdec22ef3a5d30247628dc14d8bc/main/linux-lts/APKBUILD
170
170
  - Packages:
171
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-virt-6.18.58-r0.apk
172
- SHA-256 `1eec55004cf7167c914c8839f46691d2bc82767e20466bff51eb45d06f8e90cc`
173
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-lts-6.18.58-r0.apk
174
- SHA-256 `af399fba75cafb2940fc2853eb73ba2289aa463228f33541cd3010334a30992b`
175
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-virt-6.18.58-r0.apk
176
- SHA-256 `b46c51ddf572d85b2ba7b9adfaa64f4c38fc490c93d97a20ffd2418d51284085`
177
- https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-lts-6.18.58-r0.apk
178
- SHA-256 `65ab581dd6773e2b1b6831dac50142518b2f2083668f164f68ebfcd00d1763c4`
171
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-virt-6.18.60-r0.apk
172
+ SHA-256 `3ff658cf5aada14687238527f48526cef7a75ac8c673fc597f3a65791c86a25e`
173
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/linux-lts-6.18.60-r0.apk
174
+ SHA-256 `f205a980e1d683414f5557d26366bee1e52cf128613aa74ef371b3f11b019085`
175
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-virt-6.18.60-r0.apk
176
+ SHA-256 `b931f14a93634469cc8930afe5d6837361325456b620b94e970bb981d841c99c`
177
+ https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/linux-lts-6.18.60-r0.apk
178
+ SHA-256 `4d398f1d401597da5e92fa7c3c1af93c4a9988b3747222c0173bfe3ff4cfe4a2`
179
179
 
180
180
  SHA-256 of files in the default x86_64 `linux-virt` image:
181
181
 
182
182
  ```text
183
- kernel/x86_64/vmlinuz-virt 17fbd3efd16f2e7cb1b945f06423b37399ba7d5ac8cdd3665e7f13f363500e85
184
- failover.ko 4a9c64a0e9a8e7ea9899fe2a4958fedb71691e904e91a16109f944cae3647745
185
- net_failover.ko 175984d70fd5bd11de5f184f729fd7aee8d50146b23f0e591670b175837c7010
186
- virtio_net.ko 72bdeeb075dccbb8c67938d633662e890784f0c388fcdddfe72e9c4b509b987c
183
+ kernel/x86_64/vmlinuz-virt 1e8ac7aebfab3f0fcb443eae94ad320efbbda51be91b928c32ca1740b44ebe9d
184
+ failover.ko 38da7006965e9595c08ebf062bd681bf991d1b1d4356363e9af9b16731781992
185
+ net_failover.ko a753488889d8b5b0289542ffcf734c7802da2bc6fa7605feab96381d085880e3
186
+ virtio_net.ko a369f7726343f67f1ec3f12c42024fa873d988ff3922efb0c75eb53d79c5d280
187
187
  ```
188
188
 
189
189
  SHA-256 of files in an x86_64 `--linux-lts` image:
190
190
 
191
191
  ```text
192
- kernel/x86_64/vmlinuz-lts 14ac8b1b0f92aacb815c46c2e6e9e70e9e80d9fd1391ebf48c0d4ba5059f6652
193
- failover.ko 8154cc9a26e1a751fd0e29b35653679a22189dce9a35c1b78c42838d7f10e40c
194
- net_failover.ko 3b45635fed29500db82ca400bfd4080f6129240f34f7b603e6f4d7612c019c94
195
- virtio_net.ko 5a81ac1fbf786a33609d3f1f00f0b08f6da4e8ea9509690cd7fe59c30f81b596
196
- virtio_ring.ko 529b4e5c64787a80af7c1a06e44ce8fc007b4e805d3b2a7b673acbcffad887ed
197
- virtio.ko 87b99cefeb119f9a49c589cdd1ae732d34d9416bb92385c7022bc038bc0146e0
198
- virtio_pci_legacy_dev.ko 10be513db7fdb8b2eec44347fbe74f482be83085aabe3b4abeb193f47fac0615
199
- virtio_pci_modern_dev.ko fa2dd36e83a65202b4494765f6ef75634cf5e9fc21906ccaee71a0106427638f
200
- virtio_pci.ko acb46043812dfc42fa0bd9d6bbebc7b61d313eb36236ba9bd4ace3cfaa89f902
192
+ kernel/x86_64/vmlinuz-lts 4b7fd8c62d98e10fec5cad572a2e5e4446ab8c83db06015521824556514581fc
193
+ failover.ko 8c2dba793b09615556234ea62455173c47c012a08f5f147a24e2138a7123b8e3
194
+ net_failover.ko 595eb1fc7cf568ecb06b1364b075dc4d818fe9582243625d38295699df54f92b
195
+ virtio_net.ko 35836c6a68aa6aaaafbe9c8bdd796c45a3cb8b2cfe943d09a5dbcc62e1039646
196
+ virtio_ring.ko 791e3c91f6abab031e1585a869e054f29e0093b072793f4ef0468ba61c31b82b
197
+ virtio.ko 11ea2958363dce81c4df8f325bdd8aba417205c2cbc802429b61abbaa34096d2
198
+ virtio_pci_legacy_dev.ko 515994aafbd6a6cb3543daa1fa0791135640212afede68e63f353877182f865c
199
+ virtio_pci_modern_dev.ko 7fda960c51fa394d1e1a7686060a1919985ff173af3b74c50a160d0a0c8160a2
200
+ virtio_pci.ko 1dcb0fad10f95e3fb2b7704efb4ab3090fd0fc43e4961606372fe56b1e0cb016
201
201
  ```
202
202
 
203
203
  `--real` additionally includes the following modules from that same
204
204
  x86_64 `linux-lts` package for physical xHCI controllers and USB HID keyboards:
205
205
 
206
206
  ```text
207
- usb-common.ko fea517ef78b4f39c2de5980bcff506b1b9a55561b35949f1f320bcd923b04b78
208
- usbcore.ko 8229fce701d624d6ed9b436406eb35155d78a4f2af12e0ebaeff7c5f78f33d78
209
- xhci-hcd.ko 36e62e85b9f312f5fffcf6d1c74bd86ddaf0d0253bb000376163360b04ed75d2
210
- xhci-pci.ko 8132c975ee33dc50f213b20e4cb836f5bf9e46d14a93665781b6d171ead764c0
211
- xhci-pci-renesas.ko 5e4cb38fce1668cb8780a4fadf4ce51bfbc0f586a129c6203f4b7e6e6ce24292
212
- hid.ko bb08c478b6efc032f5e22e461c529e05fe811f28c63646d8a0e3a961020b5e9e
213
- hid-generic.ko eb6f98948b7d82d750bf3320bb886e00fd03fa4683a35ec0ee28eff6b20a1ad5
214
- usbhid.ko e479535c61bed7691f72ebd09a35ab3b5b53ed23dda3a07d5899049685b8a3b8
207
+ usb-common.ko 1ac8dea6b468dd4428329003f5161e2184dbec9d2af671736581b8dccbed2aa9
208
+ usbcore.ko 1121a6019673800300056a587fbf0d71de252a3c7f1aafe534111bf4e34f3a75
209
+ xhci-hcd.ko 523a5610eee78a342e07305dbad2b7b0a422eff6f0efe7cc4d10bc03185d678a
210
+ xhci-pci.ko 6ae655f06532ec56b3f93e1909e10bce0acf7f5166825461152c706817b5b926
211
+ xhci-pci-renesas.ko 59be69cceeb3ab918b4bd070da23bd91d9bf81f9627d0c57abc13fd3e2ebd997
212
+ hid.ko e7cf5abe7e29b50ea9fae671b5d0a42d0cf4c7415e30b3e127d77d00ea37cd7d
213
+ hid-generic.ko c9082124336d616a489784a117670f83075c0e4bdf0253ffd2fbddf093452efc
214
+ usbhid.ko a764883e8831a14d500328af3723d4a5dbb20d3ddf92f9ec7d4136392b6dd539
215
215
  ```
216
216
 
217
217
  SHA-256 of files in the default aarch64 `linux-virt` image:
218
218
 
219
219
  ```text
220
- kernel/aarch64/vmlinuz-virt 849394914e6a93cc9bb17e901f445ce21fcd7e4528541d9496a74d6a6ccee319
221
- failover.ko 3c806423468d1ca1d2339125a958ef42ee2fc8f56d3ee3547ec5e848f997c4e7
222
- net_failover.ko 04443fea2bec85ebc3634732c8b4023c66a86c11b7ad07ddcca57adbbd24a56c
223
- virtio_net.ko 052a058c333d4d59e8b5b4f82822d3ccfb54cda03cc8cff2007cfc7145cf4520
220
+ kernel/aarch64/vmlinuz-virt cd05fed9e617b5df93dc62ece9b78c422fd94e9b432a2f7c092714b139d5eef4
221
+ failover.ko 3326352b8cbb89fb1b1281588ec03318175ad8151253da97a50b2180e4e24358
222
+ net_failover.ko 7b0b21b6992453ca6b525f816982b7d2b2aec7cdac66ee6a7a57a3506fbef5ce
223
+ virtio_net.ko 5e66ddb9e20b5401808a792e245f9c6165654da7fb6b6274df8b33260500d8d2
224
224
  ```
225
225
 
226
226
  SHA-256 of files in an aarch64 `--linux-lts` image:
227
227
 
228
228
  ```text
229
- kernel/aarch64/vmlinuz-lts 1a1c64908397369119a016b163b726741ec97a52e5405e5bbe3275e97f6a39cc
230
- failover.ko b8d1e9ea95083cce714b8b045ac28799e08fa388b95062f4ac90335903ec6709
231
- net_failover.ko be4271294cd959c86dab7e3498127f5194b67aeab63521755acd78ddfed15ff7
232
- virtio_net.ko df090940866c21e0ae2af9c75ca2c8c0c2f4a732e346ddeab734befa801af64a
233
- virtio_pci_legacy_dev.ko 0528589d3347a19bcfab93c860703f97e5636ccaeb6498a02257026abe9c8c2e
234
- virtio_pci_modern_dev.ko facbbeb0324365aa90abd47496059855e0ebe4523c01dd531d0304ad01ccdb84
235
- virtio_pci.ko 618ba972e7b26f7321a73652c9f1d036f78ea0add7aa58fd71472da3e4bb3248
229
+ kernel/aarch64/vmlinuz-lts 5ad2bbfaaaf6323f1ae3eef4ca392047413cb397a0d5421ec0f0f450b0ada35e
230
+ failover.ko dcd9538f66ecb0ab2aa7d2da8262ab499197899b858eafe73ea322a4d81d587d
231
+ net_failover.ko 3570053bf89cdf54fd7188af34150ff2019405cc4018f8dcf02a369f8de71ed8
232
+ virtio_net.ko 1254fc3018a319b59cafca3f68632ad739e4e8529b5684062c278a21c85c2784
233
+ virtio_pci_legacy_dev.ko e57ab0e3f977104fa9127755af28d450dd459689b99a230066e0f9c43710df04
234
+ virtio_pci_modern_dev.ko 1b7b21794f360313a6d7f08d6257892c7932ffcc397eb1dbfb6d128f472d7bef
235
+ virtio_pci.ko b7529e676e5237a1b25b2675320526084a6f78c512863e6da6f8ad6aa1e927fb
236
236
  ```
237
237
 
238
238
  ### linuxx64.efi.stub and linuxaa64.efi.stub
package/README.md CHANGED
@@ -432,17 +432,6 @@ Run `poweroff` for a synced shutdown.
432
432
 
433
433
  ### Using bunterm
434
434
 
435
- Click the FPS button on the right of the bunterm menu title to toggle a cyan counter at the top-right of the terminal. It reports newly presented Kitty image frames per second (such as Casty/Land output), sampled once per second; mouse/menu redraws are excluded. Static images and text-only sessions show 0 FPS. The setting is local to this bunterm session and defaults off.
436
-
437
- Native bunterm advertises its preferred raw pixel format from the framebuffer bitfields: BGRA or RGBA for supported 32-bit layouts, otherwise PNG. Updated Casty, buninu-browser and Land negotiate this automatically over shared-file Kitty transport; BGRA uses the private format `f=1111970369`, RGBA uses standard `f=32`. Other terminals and jsgotty retain their existing protocol.
438
-
439
- To inspect the current picture path in Casty, press `Ctrl-E`, type `kitty`,
440
- and press Enter. In Land, click **@** instead to open the command line.
441
- For example, `Kitty: file · format=bgra` reports shared-file raw frames;
442
- `rgba` is also raw, while PNG/JPEG indicate encoded images. Raw is negotiated
443
- automatically with supported local peers; no extra launch flag is needed.
444
- The bunterm FPS counter measures presented images, not a client's rendering FPS.
445
-
446
435
  `bunterm` is the graphical terminal on the Linux framebuffer. It displays CJK
447
436
  text, colour emoji and Kitty graphics without starting X11 or Wayland. On the
448
437
  real-hardware image, enter the shell with `start()` at the `bun-repl>` prompt,
@@ -497,6 +486,17 @@ when the application disables Kitty or bunterm exits. VT-switching shortcuts sta
497
486
  reserved. Dead-key/Compose sequences are not yet implemented in Kitty mode.
498
487
  Use `bunterm --help` for full options and keyboard details.
499
488
 
489
+ Casty is the default terminal frontend for [buninu-browser](#buninu-browser-early-stage-experimental) and [buninu-land](#buninu-land-early-stage-experimental): it displays their graphics inside bunterm and forwards keyboard and mouse input. See the linked sections below for usage.
490
+
491
+ Click the FPS button on the right of the bunterm menu title to toggle a cyan counter at the top-right of the terminal. It reports newly presented Kitty image frames per second (such as Casty/Land output), sampled once per second; mouse/menu redraws are excluded. Static images and text-only sessions show 0 FPS. The setting is local to this bunterm session and defaults off.
492
+
493
+ To inspect the current picture path in Casty, press `Ctrl-E`, type `kitty`,
494
+ and press Enter. In Land, click **@** instead to open the command line.
495
+ For example, `Kitty: file · format=bgra` reports shared-file raw frames;
496
+ `rgba` is also raw, while PNG/JPEG indicate encoded images. Raw is negotiated
497
+ automatically with supported local peers; no extra launch flag is needed.
498
+ The bunterm FPS counter measures presented images, not a client's rendering FPS.
499
+
500
500
  ### Using Bun Modern Shell
501
501
 
502
502
  bunmsh is the dependency-free, mksh-inspired shell bundled with Buninu. Its
@@ -1415,7 +1415,7 @@ initramfs/ init.js, commands, userspace: the same for every archi
1415
1415
  native/<arch>/ musl and the GCC runtime (committed); bun and modules (fetched)
1416
1416
  ```
1417
1417
 
1418
- The `--real` inputs are Alpine v3.24 `linux-lts-6.18.58-r0`, musl `1.2.6-r2`,
1418
+ The `--real` inputs are Alpine v3.24 `linux-lts-6.18.60-r0`, musl `1.2.6-r2`,
1419
1419
  `systemd-efistub-260.2-r0`, `libstdc++`/`libgcc` `15.2.0-r5`, and Bun 1.4.2
1420
1420
  `linux-x64-musl-baseline`. The aarch64 guest uses the same versions from
1421
1421
  Alpine's aarch64 repository and Bun's `linux-aarch64-musl`. There is no BusyBox
@@ -1577,7 +1577,7 @@ The physical boot chain is firmware → the UKI stub → its embedded
1577
1577
  and, with the currently pinned kernel, embeds this complete command line:
1578
1578
 
1579
1579
  ```text
1580
- console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-lts rdinit=/bin/bun -- -e import('/init.js')
1580
+ console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.60-0-lts rdinit=/bin/bun -- -e import('/init.js')
1581
1581
  ```
1582
1582
 
1583
1583
  Serial kernel logging is retained, while the final console makes
@@ -1601,7 +1601,7 @@ the same way). Build without `--real`; this selects Alpine `linux-virt`, omits t
1601
1601
  module set, and puts `ttyS0` last so serial stdio owns `/dev/console`:
1602
1602
 
1603
1603
  ```text
1604
- console=tty0 console=ttyS0,115200 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-virt rdinit=/bin/bun -- -e import('/init.js')
1604
+ console=tty0 console=ttyS0,115200 panic=0 PATH=/bin KERNEL_RELEASE=6.18.60-0-virt rdinit=/bin/bun -- -e import('/init.js')
1605
1605
  ```
1606
1606
 
1607
1607
  Build and boot it with:
@@ -1712,13 +1712,19 @@ the wired NICs, Android USB-tethering drivers and the ACPI power drivers. Alpine
1712
1712
  kernels build all of these as modules; a self-built kernel with them `=y`
1713
1713
  works the same way, the loaders just find nothing to load.
1714
1714
 
1715
+ #### Bunterm image transport
1716
+
1717
+ Native bunterm advertises its preferred raw pixel format from the framebuffer bitfields: BGRA or RGBA for supported 32-bit layouts, otherwise PNG. Updated Casty, buninu-browser and Land negotiate this automatically over shared-file Kitty transport; BGRA uses the private format `f=1111970369`, RGBA uses standard `f=32`. Other terminals and jsgotty retain their existing protocol.
1718
+
1719
+ Raw temporary frames use mmap when available. bunterm releases each mapping as soon as the parser, renderer and in-flight packet handler have all finished with it, avoiding batches of old frames being reclaimed in a later GC pause. Shared placements retain their image; unsupported immediate release falls back to garbage collection.
1720
+
1715
1721
  #### Reaching JavaScript with nothing mounted
1716
1722
 
1717
1723
  The default `--real` image embeds this kernel command line (shown for the
1718
1724
  currently pinned LTS release):
1719
1725
 
1720
1726
  ```text
1721
- console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-lts rdinit=/bin/bun -- -e import('/init.js')
1727
+ console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.60-0-lts rdinit=/bin/bun -- -e import('/init.js')
1722
1728
  ```
1723
1729
 
1724
1730
  The physical display (`tty0`) is the final console and therefore owns PID 1's
@@ -1961,6 +1967,7 @@ driver, Android KGSL, or board-specific ARM GPU/DT/firmware enablement.
1961
1967
  + [QEMU development](#qemu-development)
1962
1968
  - [QEMU networking](#qemu-networking)
1963
1969
  + [Command implementation](#command-implementation)
1970
+ + [Bunterm image transport](#bunterm-image-transport)
1964
1971
  + [Reaching JavaScript with nothing mounted](#reaching-javascript-with-nothing-mounted)
1965
1972
  + [What init.js does](#what-initjs-does)
1966
1973
  * [Optional client GPU acceleration (`cfg.gpu`)](#optional-client-gpu-acceleration-cfggpu)
package/README.zh.md CHANGED
@@ -432,17 +432,6 @@ mount -fv /dev/sda1 /mnt
432
432
 
433
433
  ### 使用終端機
434
434
 
435
- 點擊 bunterm 選單標題右側的 FPS 按鈕,可開啟/關閉終端右上角的青藍色計數器。它每秒取樣一次,統計實際呈現的新 Kitty 圖片幀(例如 Casty/Land 輸出),不計滑鼠與選單重畫。靜態圖片與純文字工作階段顯示 0 FPS。設定僅作用於目前 bunterm,預設關閉。
436
-
437
- 原生 bunterm 依 framebuffer 的位元欄位宣告偏好的原始像素格式:支援的 32 位元排列採用 BGRA 或 RGBA,其餘回報 PNG。新版 Casty、buninu-browser 與 Land 透過 Kitty 共用檔案傳輸自動協商;BGRA 使用私有格式 `f=1111970369`,RGBA 使用標準 `f=32`。其他終端機與 jsgotty 維持既有協議。
438
-
439
- 若要查看 Casty 目前的畫面傳輸路徑,按 `Ctrl-E`,輸入 `kitty`,
440
- 再按 Enter。在 Land 中則點擊 **@** 開啟命令列。
441
- 例如 `Kitty: file · format=bgra` 表示透過共用檔案傳送原始像素;
442
- `rgba` 也是原始像素,PNG/JPEG 則表示已編碼圖片。支援的本機兩端
443
- 會自動協商 raw,不需要額外啟動旗標。
444
- bunterm 的 FPS 計數器統計實際呈現的圖片,不是客戶端本身的渲染 FPS。
445
-
446
435
  `bunterm` 是 Linux framebuffer 上的圖形終端機,不必啟動
447
436
  X11 或 Wayland 即可顯示中日韓文字、彩色 emoji 與 Kitty
448
437
  圖形。在真機映像中,於 `bun-repl>` 提示用 `start()` 進入
@@ -497,6 +486,17 @@ HTTP/HTTPS 與 `about:` URL 直接開啟;本機路徑與 `file://` URL
497
486
  Kitty 模式尚未實作 dead key/Compose 序列。完整
498
487
  選項與鍵盤細節見 `bunterm --help`。
499
488
 
489
+ Casty 是 [buninu-browser](#內建瀏覽器的早期實驗支援) 和 [buninu-land](#內建合成器的早期實驗支援) 的預設終端前端,負責將畫面顯示在 bunterm 裡,並轉送鍵盤與滑鼠輸入。使用方式請見連結指向的後續章節。
490
+
491
+ 點擊 bunterm 選單標題右側的 FPS 按鈕,可開啟/關閉終端右上角的青藍色計數器。它每秒取樣一次,統計實際呈現的新 Kitty 圖片幀(例如 Casty/Land 輸出),不計滑鼠與選單重畫。靜態圖片與純文字工作階段顯示 0 FPS。設定僅作用於目前 bunterm,預設關閉。
492
+
493
+ 若要查看 Casty 目前的畫面傳輸路徑,按 `Ctrl-E`,輸入 `kitty`,
494
+ 再按 Enter。在 Land 中則點擊 **@** 開啟命令列。
495
+ 例如 `Kitty: file · format=bgra` 表示透過共用檔案傳送原始像素;
496
+ `rgba` 也是原始像素,PNG/JPEG 則表示已編碼圖片。支援的本機兩端
497
+ 會自動協商 raw,不需要額外啟動旗標。
498
+ bunterm 的 FPS 計數器統計實際呈現的圖片,不是客戶端本身的渲染 FPS。
499
+
500
500
  ### 使用命令殼層
501
501
 
502
502
  bunmsh 是 Buninu 內附、受 mksh 啟發且無外部依賴的 shell。
@@ -1415,7 +1415,7 @@ initramfs/ init.js, commands, userspace: the same for every archi
1415
1415
  native/<arch>/ musl and the GCC runtime (committed); bun and modules (fetched)
1416
1416
  ```
1417
1417
 
1418
- `--real` 的輸入為 Alpine v3.24 `linux-lts-6.18.58-r0`、musl
1418
+ `--real` 的輸入為 Alpine v3.24 `linux-lts-6.18.60-r0`、musl
1419
1419
  `1.2.6-r2`、`systemd-efistub-260.2-r0`、`libstdc++`/`libgcc`
1420
1420
  `15.2.0-r5`,以及 Bun 1.4.2 `linux-x64-musl-baseline`。aarch64
1421
1421
  客體使用 Alpine aarch64 儲存庫的相同版本與 Bun 的 `linux-aarch64-musl`。
@@ -1577,7 +1577,7 @@ MiB 對齊,尾端保留 34 個磁區
1577
1577
  包含 xHCI 與 USB HID 模組鏈,目前鎖定核心使用以下完整命令列:
1578
1578
 
1579
1579
  ```text
1580
- console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-lts rdinit=/bin/bun -- -e import('/init.js')
1580
+ console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.60-0-lts rdinit=/bin/bun -- -e import('/init.js')
1581
1581
  ```
1582
1582
 
1583
1583
  保留序列核心日誌,最後指定的主控台則讓
@@ -1601,7 +1601,7 @@ pkg install qemu-system-x86-64
1601
1601
  機模組集,並將 `ttyS0` 放最後,讓序列標準輸入輸出擁有 `/dev/console`:
1602
1602
 
1603
1603
  ```text
1604
- console=tty0 console=ttyS0,115200 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-virt rdinit=/bin/bun -- -e import('/init.js')
1604
+ console=tty0 console=ttyS0,115200 panic=0 PATH=/bin KERNEL_RELEASE=6.18.60-0-virt rdinit=/bin/bun -- -e import('/init.js')
1605
1605
  ```
1606
1606
 
1607
1607
  使用以下命令建置並開機:
@@ -1712,13 +1712,19 @@ Bun 腳本。`--help` 使用 `Bun.markdown.ansi`
1712
1712
  驅動及 ACPI 電源驅動。Alpine 核心將這些都建成模組;自行建置核心並將它們
1713
1713
  設為 `=y` 也能以相同方式運作,只是載入器找不到需要載入的項目。
1714
1714
 
1715
+ #### 終端機影像傳輸
1716
+
1717
+ 原生 bunterm 依 framebuffer 的位元欄位宣告偏好的原始像素格式:支援的 32 位元排列採用 BGRA 或 RGBA,其餘回報 PNG。新版 Casty、buninu-browser 與 Land 透過 Kitty 共用檔案傳輸自動協商;BGRA 使用私有格式 `f=1111970369`,RGBA 使用標準 `f=32`。其他終端機與 jsgotty 維持既有協議。
1718
+
1719
+ 原始像素暫存影格在可用時採用 mmap。bunterm 會在 parser、renderer 與處理中的封包全部使用完畢後立即釋放映射,避免累積舊影格到之後的 GC 才整批回收而停頓。共用的 placement 仍會保留影像;不支援立即釋放時則退回垃圾回收。
1720
+
1715
1721
  #### 尚未掛載時進入腳本環境
1716
1722
 
1717
1723
  預設 `--real` 映像內嵌以下核心命令列(此處為目前
1718
1724
  鎖定的 LTS 版本):
1719
1725
 
1720
1726
  ```text
1721
- console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.58-0-lts rdinit=/bin/bun -- -e import('/init.js')
1727
+ console=ttyS0,115200 console=tty0 REAL_MACHINE=1 panic=0 PATH=/bin KERNEL_RELEASE=6.18.60-0-lts rdinit=/bin/bun -- -e import('/init.js')
1722
1728
  ```
1723
1729
 
1724
1730
  實體螢幕(`tty0`)是最後指定的主控台,因此擁有 PID 1 的
@@ -1961,6 +1967,7 @@ KGSL 或特定 ARM 板子的 GPU/DT/韌體啟用支援。
1961
1967
  + [虛擬機開發](#虛擬機開發)
1962
1968
  - [虛擬機網路](#虛擬機網路)
1963
1969
  + [命令實作](#命令實作)
1970
+ + [終端機影像傳輸](#終端機影像傳輸)
1964
1971
  + [尚未掛載時進入腳本環境](#尚未掛載時進入腳本環境)
1965
1972
  + [初始化腳本的工作](#初始化腳本的工作)
1966
1973
  * [可選的客戶端圖形加速](#可選的客戶端圖形加速)
@@ -1,5 +1,52 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 - 2026-10-26
4
+
5
+ - Sync jsgotty to 1.4.0:
6
+ * Add horizontal and diagonal scrolling through terminal mouse reporting,
7
+ including Shift-wheel horizontal scrolling and preserved wheel modifiers.
8
+ * Double-tap and hold the second tap to drag with the left mouse button when
9
+ application mouse reporting is enabled. Release the button on touch
10
+ cancellation, backgrounding or disconnect; ordinary swipes still scroll.
11
+ * Add Right click to the existing image long-press menu, sending the click
12
+ at the position where the menu was opened without removing the image.
13
+ * Prevent Android WebView from automatically zooming the terminal's hidden
14
+ input after native long-press paste, including at reduced viewport zoom.
15
+ Keep native paste, IME input and pinch zoom on the visible terminal.
16
+ - Sync jsmdcui to 0.19.4:
17
+ * Restore Dockerfile highlighting and improve compatibility with Micro's
18
+ syntax definitions by translating Go regexp flags and POSIX character
19
+ classes while preserving scoped flags.
20
+ * Fix nested HTML/XML highlighting regions so quoted attributes return to
21
+ their enclosing tags and unfinished attributes retain state across lines.
22
+ * Use iterative region scanning to support long minified lines without
23
+ recursive stack exhaustion or truncating highlighting.
24
+ * Guard against zero-width region cycles, cyclic syntax/state trees and
25
+ excessively nested regexp conversion. Disable failing rules individually
26
+ instead of losing an entire syntax definition; retain support for long
27
+ lines. These guards do not impose timeouts on individual JavaScript regexps.
28
+
29
+ ## 0.6.0 - 2026-10-25
30
+
31
+ - Sync jsgotty to 1.3.0:
32
+ * Add OSC 52 clipboard reads and writes for browser terminals using the
33
+ server host's clipboard. Try xclip first on every platform, then available
34
+ platform tools, with an in-memory fallback when all tools fail. Only the
35
+ session writer performs clipboard operations; CLI clients pass OSC 52
36
+ through to their terminal emulator.
37
+ * Restore mouse reporting, mouse encoding, Kitty keyboard state and other
38
+ terminal modes when reconnecting to an existing session, including from
39
+ a fresh terminal and through nested CLI clients. Preserve keyboard mode
40
+ stacks without unnecessarily switching screens.
41
+ * Probe and restore the CLI client's original terminal modes on exit;
42
+ handle unsupported mode replies and independently enabled mouse modes
43
+ without leaving stale mouse reporting behind.
44
+ * Fix read-only CLI viewer exit shortcuts (Ctrl-C, Ctrl-D and Ctrl-Q) when
45
+ the enclosing terminal uses Kitty keyboard encoding.
46
+ * Fix Android WebView double-tap handling at non-default viewport zoom so
47
+ terminal clicks reach applications instead of triggering browser zoom,
48
+ while retaining two-finger pinch zoom.
49
+
3
50
  ## 0.5.0 - 2026-10-21
4
51
 
5
52
  - Sync jsgotty to 1.2.0:
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016-2020: Zachary Yedidia, et al.
4
+ Copyright (c) 2026 Dr. John (醫者小智)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -119,3 +119,8 @@ such an executable must also follow Bun's license terms, including the LGPL
119
119
  relinking provisions described at
120
120
  https://github.com/oven-sh/bun/blob/main/LICENSE.md. The executables carry
121
121
  LICENSE, NOTICE and LICENSES/ as embedded assets.
122
+
123
+ Clipboard backend helpers reference jsmdcui (MIT).
124
+ clipboard-powershell.js retains its powershellClipboard function verbatim from
125
+ jsmdcui/src/platform/clipboard.js, Copyright (c) 2026 Dr. John (醫者小智).
126
+ Full source license: LICENSES/MIT-jsmdcui.txt.
@@ -332,3 +332,24 @@ bun sz.js file.txt
332
332
  - Bun is the primary runtime.
333
333
  - On Linux / macOS, PTY support will not work unless the program is launched with Bun.
334
334
  - GoTTY config file loading is not implemented yet.
335
+
336
+ ## OSC 52 clipboard
337
+
338
+ The browser frontend supports OSC 52 writes and `?` queries against the **server host's clipboard**, not the browser device's clipboard. Only the session writer can request access; viewers do not duplicate operations. Query replies are sent directly back to the originating PTY as OSC 52 sequences.
339
+
340
+ Each operation tries `xclip` first, including on Windows and Android. Missing or failing commands fall through to applicable `termux-clipboard-*`, `wl-copy`/`wl-paste`, `xsel`, macOS `pbcopy`/`pbpaste`, then Windows PowerShell. The PowerShell function is copied verbatim from jsmdcui. If all tools fail, the server uses its in-memory cache. A successful empty read remains empty, rather than returning stale cached text. There is no polling; external commands run in a worker.
341
+
342
+ Supported selections: `c` (clipboard), `p` (primary), `q` (secondary); `s` maps to clipboard, and `0`–`7` are in-memory buffers. An empty selector uses `s0`. Tools without primary/secondary support do not substitute the clipboard. Requests are limited to 1 MiB.
343
+
344
+ ```sh
345
+ # Write to the server clipboard
346
+ printf '\033]52;c;%s\007' "$(printf 'Hello' | base64 | tr -d '\n')"
347
+ ```
348
+
349
+ Applications can send `ESC ] 52 ; c ; ? ST` to read and receive a base64-encoded OSC 52 reply on stdin.
350
+
351
+ `jsgotty --client` **does not intercept OSC 52**: it forwards reads and writes unchanged for the outer terminal emulator to handle.
352
+
353
+ ### Touch dragging and right click
354
+
355
+ When the application enables mouse reporting, double-tap and hold the second tap to drag with the left button; lifting your finger releases it. Single-finger swipes still scroll. The existing image long-press menu now includes `Right click` below `Remove image`; it sends a right click at the position where the menu was opened. Pinch zoom and the existing remove-image gesture remain unchanged. To disable double-tap dragging, set `window.touchDoubleTapDrag = false` in the page JavaScript.
@@ -334,3 +334,24 @@ bun sz.js file.txt
334
334
  - 以 Bun 為主要執行方式。
335
335
  - Linux / macOS 如果不是用 Bun 執行,PTY 會無法使用。
336
336
  - 目前未實作 Go 版的 config 檔載入
337
+
338
+ ## OSC 52 剪貼板
339
+
340
+ 瀏覽器版 jsgotty 支援 OSC 52 寫入與 `?` 查詢。操作的是 **server 所在主機**的剪貼板,不是瀏覽器裝置的剪貼板。只有 session 的 writer 可以執行;viewer 不會重複操作。查詢結果以 OSC 52 回覆直接送回原本的 PTY。
341
+
342
+ 每次操作都先嘗試 `xclip`(包括 Windows/Android),不存在或執行失敗才依序嘗試適用的 `termux-clipboard-*`、`wl-copy`/`wl-paste`、`xsel`、macOS 的 `pbcopy`/`pbpaste`、Windows 的 PowerShell。PowerShell 函式原封不動取自 jsmdcui。所有工具都失敗時使用 server 記憶體快取;成功讀到空字串就是空剪貼板,不會被舊快取取代。沒有輪詢,外部工具在 worker 中執行。
343
+
344
+ 支援 `c`(clipboard)、`p`(primary)、`q`(secondary);`s` 對應 clipboard,`0`~`7` 為記憶體暫存。空選擇使用 `s0`。不提供 primary/secondary 的工具不會拿 clipboard 冒充。單次 OSC 52 請求上限 1 MiB。
345
+
346
+ ```sh
347
+ # 寫入 server 剪貼板
348
+ printf '\033]52;c;%s\007' "$(printf 'Hello' | base64 | tr -d '\n')"
349
+ ```
350
+
351
+ 程式可送出 `ESC ] 52 ; c ; ? ST` 讀取,並從 stdin 接收 base64 編碼的 OSC 52 回覆。
352
+
353
+ `jsgotty --client` **不攔截 OSC 52**,讀寫控制碼都原樣轉送,交給最外層真正的終端模擬器決定。
354
+
355
+ ### 觸控拖曳與右鍵
356
+
357
+ 在程式啟用滑鼠回報時,快速點兩下並按住第二下可拖曳左鍵,放開即釋放;單指滑動仍是捲動。既有圖片長按選單的 `Remove image` 下方新增 `Right click`,會在叫出選單的原始位置送出右鍵點擊。雙指縮放與原本的移除圖片入口不變。若要停用雙擊拖曳,可在網頁 JavaScript 設定 `window.touchDoubleTapDrag = false`。
@@ -0,0 +1,117 @@
1
+ // Read the terminal before attaching. No reset and no guessed default modes.
2
+ import { randomBytes } from 'node:crypto';
3
+ import modes from './terminal-modes.js';
4
+ const {TerminalModeTracker, validateSnapshot, TRACKED_DEC_FLAGS, MOUSE_PROTOCOLS, MOUSE_ENCODINGS} = modes;
5
+ const ESC = '\x1b';
6
+ export class ModeProbe {
7
+ constructor(nonce = randomBytes(16).toString('hex')) {
8
+ this.nonce = nonce;
9
+ this.pending = Buffer.alloc(0);
10
+ this.complete = false;
11
+ this.kittyRestore = false;
12
+ this.state = new TerminalModeTracker().snapshot();
13
+ for (const key of Object.keys(this.state.dec)) this.state.dec[key] = null;
14
+ for (const key of ['alternate','cursorHidden','mouse','encoding']) this.state[key] = null;
15
+ this.state.kitty.normal.flags = this.state.kitty.alternate.flags = null;
16
+ this.state.mouseModeBits = Object.fromEntries(Object.keys(MOUSE_PROTOCOLS).map(n=>[n,null]));
17
+ this.state.mouseEncodingBits = Object.fromEntries(Object.keys(MOUSE_ENCODINGS).map(n=>[n,null]));
18
+ this.replies = new Map();
19
+ this.outstanding = new Set();
20
+ this.kittyOutstanding = false;
21
+ this.privatePrefix = `${ESC}]777;jsgotty-modes;${nonce};`;
22
+ }
23
+ privateQuery() { return `${ESC}]777;jsgotty-modes;${this.nonce}\x07`; }
24
+ standardQuery() {
25
+ this.outstanding = new Set([...Object.keys(TRACKED_DEC_FLAGS),25,1049,...Object.keys(MOUSE_PROTOCOLS),...Object.keys(MOUSE_ENCODINGS)].map(Number));
26
+ this.kittyOutstanding = true;
27
+ this.replyDeadline = Date.now() + 1500;
28
+ return [...this.outstanding]
29
+ .map(n => `${ESC}[?${n}$p`).join('') + `${ESC}[?u`;
30
+ }
31
+ reply(mode, value) {
32
+ if (this.complete) return;
33
+ const yes = value === 1 || value === 3;
34
+ // An unsupported mode cannot be active, but unlike silence it is a reply.
35
+ // Still aggregate below when 0 is the last answer in a mouse-mode group.
36
+ this.replies.set(mode, yes);
37
+ if (MOUSE_PROTOCOLS[mode]) this.state.mouseModeBits[mode] = yes;
38
+ if (MOUSE_ENCODINGS[mode]) this.state.mouseEncodingBits[mode] = yes;
39
+ if (value !== 0) {
40
+ if (TRACKED_DEC_FLAGS[mode]) this.state.dec[TRACKED_DEC_FLAGS[mode]] = yes;
41
+ else if (mode === 25) this.state.cursorHidden = !yes;
42
+ else if (mode === 1049) this.state.alternate = yes;
43
+ }
44
+ for (const [name, table, fallback, priority] of [
45
+ ['mouse',MOUSE_PROTOCOLS,'NONE',[1003,1002,1000,9]],
46
+ ['encoding',MOUSE_ENCODINGS,'DEFAULT',[1016,1006]],
47
+ ]) {
48
+ const active = priority.find(key => this.replies.get(key) === true);
49
+ if (active) this.state[name] = table[active];
50
+ else if (Object.keys(table).every(key => this.replies.has(+key))) this.state[name] = fallback;
51
+ }
52
+ }
53
+ consume(chunk) {
54
+ if ((this.complete && !this.outstanding.size && !this.kittyOutstanding) ||
55
+ (this.replyDeadline && Date.now() > this.replyDeadline)) {
56
+ this.outstanding.clear(); this.kittyOutstanding = false;
57
+ return Buffer.concat([this.flush(), Buffer.from(chunk)]);
58
+ }
59
+ this.pending = Buffer.concat([this.pending, Buffer.from(chunk)]);
60
+ const out = [];
61
+ while (this.pending.length) {
62
+ const text = this.pending.toString('latin1');
63
+ if (text.startsWith(this.privatePrefix)) {
64
+ const end = text.indexOf('\x07', this.privatePrefix.length);
65
+ if (end < 0 && text.length < 16384) break;
66
+ if (end >= 0) {
67
+ try {
68
+ const reply = JSON.parse(Buffer.from(text.slice(this.privatePrefix.length,end),'base64').toString());
69
+ this.state = validateSnapshot(reply);
70
+ this.kittyRestore = reply.kittyRestore === 1;
71
+ this.complete = true;
72
+ } catch {}
73
+ this.pending = this.pending.subarray(end+1); continue;
74
+ }
75
+ }
76
+ const dec = /^\x1b\[\?(\d+);([0-4])\$y/.exec(text);
77
+ const kitty = /^\x1b\[\?(\d+)u/.exec(text);
78
+ if ((dec && this.outstanding.delete(+dec[1])) || (kitty && this.kittyOutstanding)) {
79
+ if (dec) this.reply(+dec[1],+dec[2]);
80
+ else {
81
+ this.kittyOutstanding = false;
82
+ if (!this.complete && this.state.alternate != null)
83
+ this.state.kitty[this.state.alternate?'alternate':'normal'].flags = +kitty[1] & 31;
84
+ }
85
+ this.pending = this.pending.subarray((dec||kitty)[0].length); continue;
86
+ }
87
+ // Hold only possible query replies; normal keystrokes and mouse packets pass unchanged.
88
+ if (this.privatePrefix.startsWith(text) || (text.length < 64 && /^\x1b\[\?[0-9;\$]*$/.test(text)) || text === ESC+'[') break;
89
+ // Forward ordinary input in spans; large pastes must not become quadratic.
90
+ const next = this.pending.indexOf(0x1b, 1);
91
+ const count = next < 0 ? this.pending.length : next;
92
+ out.push(this.pending.subarray(0,count));this.pending=this.pending.subarray(count);
93
+ }
94
+ return Buffer.concat(out);
95
+ }
96
+ flush() { const data=this.pending;this.pending=Buffer.alloc(0);return data; }
97
+ }
98
+ export async function captureTerminalModes(input, output, {timeout=1000, probe=new ModeProbe()}={}) {
99
+ const buffered=[];
100
+ if (!input.isTTY || !output.isTTY) {
101
+ probe.replyDeadline = 1;
102
+ return {state:probe.state, probe, buffered:Buffer.alloc(0)};
103
+ }
104
+ const raw=!!input.isRaw;
105
+ input.setRawMode(true);
106
+ await new Promise(resolve=>{
107
+ let finished=false;
108
+ const finish=()=>{if(finished)return;finished=true;clearTimeout(fallback);clearTimeout(end);input.off('data',data);resolve();};
109
+ const data=chunk=>{const rest=probe.consume(chunk);if(rest.length)buffered.push(rest);if(probe.complete)finish();};
110
+ const fallback=setTimeout(()=>output.write(probe.standardQuery()),Math.min(200,timeout/2));
111
+ const end=setTimeout(finish,timeout);
112
+ input.on('data',data);input.resume();output.write(probe.privateQuery());
113
+ });
114
+ input.pause();input.setRawMode(raw);
115
+ buffered.push(probe.flush());
116
+ return {state:validateSnapshot(probe.state),probe,buffered:Buffer.concat(buffered)};
117
+ }