shortcutxl 0.3.77 → 0.3.78

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 (351) hide show
  1. package/BINARY-INVENTORY.json +9 -9
  2. package/CHANGELOG.md +8 -0
  3. package/dist/app/agent-session.d.ts +0 -15
  4. package/dist/app/agent-session.js +0 -37
  5. package/dist/app/extensions/slash-commands.js +1 -3
  6. package/dist/app/modes/action/agent.js +4 -5
  7. package/dist/app/modes/ask/agent.js +4 -6
  8. package/dist/app/modes/index.js +20 -10
  9. package/dist/app/modes/installation/agent.js +4 -5
  10. package/dist/app/modes/manage/agent.js +3 -4
  11. package/dist/app/modes/manage/prompt.js +1 -2
  12. package/dist/app/modes/metadata.d.ts +31 -0
  13. package/dist/app/modes/metadata.js +35 -0
  14. package/dist/app/modes/plan/agent.js +5 -8
  15. package/dist/app/modes/plan/prompt.js +3 -3
  16. package/dist/app/prompts/com-api.js +1 -1
  17. package/dist/app/prompts/shared-guidelines.js +6 -2
  18. package/dist/app/providers/register-shortcut-provider.js +4 -0
  19. package/dist/app/tools/bash.js +3 -3
  20. package/dist/app/tools/switch-mode.js +2 -2
  21. package/dist/app/tools/web-search.js +12 -2
  22. package/dist/cli.js +871 -2144
  23. package/dist/constants.d.ts +0 -2
  24. package/dist/constants.js +0 -3
  25. package/dist/contracts/model-call.d.ts +0 -1
  26. package/dist/contracts/model-call.js +1 -2
  27. package/dist/contracts/wire.d.ts +8 -1
  28. package/dist/contracts/wire.js +8 -0
  29. package/dist/embedded-agent/ai-invoke.d.ts +1 -2
  30. package/dist/embedded-agent/ai-invoke.js +0 -70
  31. package/dist/embedded-agent/anthropic-messages-transport.d.ts +1 -2
  32. package/dist/embedded-agent/google-vertex-transport.d.ts +1 -2
  33. package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +1 -1
  34. package/dist/embedded-agent/host-tools/invoke-llm/contract.js +1 -1
  35. package/dist/embedded-agent/host-tools/shared/index.d.ts +1 -1
  36. package/dist/embedded-agent/host-tools/shared/index.js +1 -1
  37. package/dist/embedded-agent/host-tools/shared/llm-stream-error.d.ts +7 -0
  38. package/dist/embedded-agent/host-tools/shared/llm-stream-error.js +10 -0
  39. package/dist/embedded-agent/index.d.ts +3 -4
  40. package/dist/embedded-agent/index.js +2 -3
  41. package/dist/embedded-agent/openai-completions-transport.d.ts +1 -2
  42. package/dist/embedded-agent/openai-responses-transport.d.ts +1 -2
  43. package/dist/embedded-agent/prompt/sections.d.ts +1 -1
  44. package/dist/embedded-agent/prompt/sections.js +2 -0
  45. package/dist/embedded-agent/provider-native-request.d.ts +5 -0
  46. package/dist/embedded-agent/provider-native-request.js +3 -2
  47. package/dist/embedded-agent/stream.d.ts +8 -88
  48. package/dist/embedded-agent/stream.js +20 -537
  49. package/dist/embedded-agent/suggestions.d.ts +1 -1
  50. package/dist/embedded-agent/suggestions.js +1 -1
  51. package/dist/embedded-agent/worker-bridge/host-client.d.ts +7 -0
  52. package/dist/embedded-agent/worker-bridge/host-client.js +15 -0
  53. package/dist/embedded-agent/worker-bridge/worker-port.js +17 -1
  54. package/dist/main.js +16 -1
  55. package/dist/rpc/index.d.ts +1 -1
  56. package/dist/rpc/rpc-host.d.ts +4 -0
  57. package/dist/rpc/rpc-host.js +13 -24
  58. package/dist/rpc/rpc-types.d.ts +6 -17
  59. package/dist/shared/platform/open.d.ts +4 -1
  60. package/dist/shared/platform/open.js +14 -2
  61. package/dist/shell/interactive/interactive-mode-options.d.ts +10 -0
  62. package/dist/shell/interactive/interactive-mode.d.ts +6 -12
  63. package/dist/shell/interactive/interactive-mode.js +36 -157
  64. package/dist/shell/interactive/slash-commands.d.ts +0 -34
  65. package/dist/shell/interactive/slash-commands.js +0 -2
  66. package/dist/shell/links/local-file-link-input.d.ts +15 -0
  67. package/dist/shell/links/local-file-link-input.js +38 -0
  68. package/dist/shell/links/local-file-link.d.ts +7 -0
  69. package/dist/shell/links/local-file-link.js +35 -0
  70. package/dist/shell/links/local-file-opener.d.ts +16 -0
  71. package/dist/shell/links/local-file-opener.js +90 -0
  72. package/dist/shell/session-client.d.ts +0 -1
  73. package/dist/shell/session-client.js +0 -6
  74. package/dist/shell/status/update-check-scheduler.d.ts +30 -0
  75. package/dist/shell/status/update-check-scheduler.js +71 -0
  76. package/dist/shell/status/update-reminder-controller.d.ts +22 -0
  77. package/dist/shell/status/update-reminder-controller.js +40 -0
  78. package/dist/shell/status/update-reminder.d.ts +6 -0
  79. package/dist/shell/status/update-reminder.js +4 -0
  80. package/dist/shell/theme/dark.json +1 -2
  81. package/dist/shell/theme/light.json +1 -2
  82. package/dist/shell/theme/runtime.d.ts +1 -2
  83. package/dist/shell/theme/runtime.js +1 -6
  84. package/dist/shell/theme/theme-schema.json +1 -6
  85. package/dist/shortcut-model-catalog.js +12 -5
  86. package/dist/startup/update-manager.d.ts +6 -6
  87. package/dist/startup/update-manager.js +23 -38
  88. package/dist/startup/update-prompt.d.ts +1 -0
  89. package/dist/startup/update-prompt.js +2 -2
  90. package/dist/tui/components/markdown.js +15 -6
  91. package/dist/tui/index.d.ts +7 -1
  92. package/dist/tui/index.js +7 -1
  93. package/dist/tui/tui.d.ts +2 -0
  94. package/dist/tui/tui.js +16 -1
  95. package/dist/tui/utils.d.ts +7 -0
  96. package/dist/tui/utils.js +58 -8
  97. package/native-app/main/index.js +1 -1
  98. package/native-app/package.json +1 -1
  99. package/native-app/renderer/assets/{index-CtherCML.js → index-B4jz6epR.js} +594 -151
  100. package/native-app/renderer/assets/{index-B9UxxO8s.css → index-C__g36ft.css} +408 -160
  101. package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
  102. package/native-app/renderer/index.html +2 -2
  103. package/package.json +2 -1
  104. package/user-docs/dist/index.html +1 -1
  105. package/user-docs/dist/shortcutxl-docs.pdf +0 -0
  106. package/xll/ShortcutXL.xll +0 -0
  107. package/xll/modules/shortcut_xl/_managed.py +26 -7
  108. package/xll/modules/shortcut_xl/_tracking.py +141 -251
  109. package/xll/modules/shortcut_xl/api/__init__.py +60 -0
  110. package/xll/modules/shortcut_xl/api/workbook.py +9 -1
  111. package/xll/modules/shortcut_xl/api/worksheet.py +4 -1
  112. package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
  113. package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
  114. package/xll/python/Lib/site-packages/pip/__init__.py +1 -1
  115. package/xll/python/Lib/site-packages/pip/_internal/build_env/__init__.py +25 -0
  116. package/xll/python/Lib/site-packages/pip/_internal/build_env/base.py +103 -0
  117. package/xll/python/Lib/site-packages/pip/_internal/build_env/installer.py +333 -0
  118. package/xll/python/Lib/site-packages/pip/_internal/build_env/noop.py +42 -0
  119. package/xll/python/Lib/site-packages/pip/_internal/build_env/venv.py +145 -0
  120. package/xll/python/Lib/site-packages/pip/_internal/build_env/virtual.py +139 -0
  121. package/xll/python/Lib/site-packages/pip/_internal/cache.py +4 -1
  122. package/xll/python/Lib/site-packages/pip/_internal/cli/autocompletion.py +4 -1
  123. package/xll/python/Lib/site-packages/pip/_internal/cli/base_command.py +11 -14
  124. package/xll/python/Lib/site-packages/pip/_internal/cli/cmdoptions.py +133 -22
  125. package/xll/python/Lib/site-packages/pip/_internal/cli/index_command.py +11 -6
  126. package/xll/python/Lib/site-packages/pip/_internal/cli/main.py +2 -1
  127. package/xll/python/Lib/site-packages/pip/_internal/cli/main_parser.py +1 -2
  128. package/xll/python/Lib/site-packages/pip/_internal/cli/parser.py +10 -2
  129. package/xll/python/Lib/site-packages/pip/_internal/cli/progress_bars.py +2 -2
  130. package/xll/python/Lib/site-packages/pip/_internal/cli/req_command.py +57 -25
  131. package/xll/python/Lib/site-packages/pip/_internal/cli/status_codes.py +1 -0
  132. package/xll/python/Lib/site-packages/pip/_internal/commands/cache.py +7 -6
  133. package/xll/python/Lib/site-packages/pip/_internal/commands/configuration.py +2 -1
  134. package/xll/python/Lib/site-packages/pip/_internal/commands/debug.py +4 -5
  135. package/xll/python/Lib/site-packages/pip/_internal/commands/download.py +4 -0
  136. package/xll/python/Lib/site-packages/pip/_internal/commands/freeze.py +1 -1
  137. package/xll/python/Lib/site-packages/pip/_internal/commands/index.py +10 -3
  138. package/xll/python/Lib/site-packages/pip/_internal/commands/inspect.py +1 -1
  139. package/xll/python/Lib/site-packages/pip/_internal/commands/install.py +6 -6
  140. package/xll/python/Lib/site-packages/pip/_internal/commands/list.py +11 -6
  141. package/xll/python/Lib/site-packages/pip/_internal/commands/lock.py +4 -6
  142. package/xll/python/Lib/site-packages/pip/_internal/commands/show.py +14 -8
  143. package/xll/python/Lib/site-packages/pip/_internal/commands/wheel.py +7 -1
  144. package/xll/python/Lib/site-packages/pip/_internal/configuration.py +2 -3
  145. package/xll/python/Lib/site-packages/pip/_internal/distributions/base.py +5 -3
  146. package/xll/python/Lib/site-packages/pip/_internal/distributions/installed.py +3 -2
  147. package/xll/python/Lib/site-packages/pip/_internal/distributions/sdist.py +45 -20
  148. package/xll/python/Lib/site-packages/pip/_internal/distributions/wheel.py +3 -2
  149. package/xll/python/Lib/site-packages/pip/_internal/exceptions.py +174 -0
  150. package/xll/python/Lib/site-packages/pip/_internal/index/collector.py +70 -48
  151. package/xll/python/Lib/site-packages/pip/_internal/index/package_finder.py +46 -7
  152. package/xll/python/Lib/site-packages/pip/_internal/index/sources.py +1 -2
  153. package/xll/python/Lib/site-packages/pip/_internal/locations/_sysconfig.py +1 -1
  154. package/xll/python/Lib/site-packages/pip/_internal/locations/base.py +1 -1
  155. package/xll/python/Lib/site-packages/pip/_internal/metadata/base.py +10 -5
  156. package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +1 -1
  157. package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +8 -3
  158. package/xll/python/Lib/site-packages/pip/_internal/models/candidate.py +5 -1
  159. package/xll/python/Lib/site-packages/pip/_internal/models/link.py +53 -13
  160. package/xll/python/Lib/site-packages/pip/_internal/network/auth.py +38 -21
  161. package/xll/python/Lib/site-packages/pip/_internal/network/cache.py +2 -2
  162. package/xll/python/Lib/site-packages/pip/_internal/network/download.py +58 -11
  163. package/xll/python/Lib/site-packages/pip/_internal/network/session.py +35 -40
  164. package/xll/python/Lib/site-packages/pip/_internal/network/utils.py +109 -1
  165. package/xll/python/Lib/site-packages/pip/_internal/operations/check.py +2 -3
  166. package/xll/python/Lib/site-packages/pip/_internal/operations/install/wheel.py +23 -18
  167. package/xll/python/Lib/site-packages/pip/_internal/operations/prepare.py +152 -7
  168. package/xll/python/Lib/site-packages/pip/_internal/req/__init__.py +2 -0
  169. package/xll/python/Lib/site-packages/pip/_internal/req/constructors.py +54 -69
  170. package/xll/python/Lib/site-packages/pip/_internal/req/req_file.py +6 -6
  171. package/xll/python/Lib/site-packages/pip/_internal/req/req_install.py +25 -21
  172. package/xll/python/Lib/site-packages/pip/_internal/req/req_uninstall.py +13 -8
  173. package/xll/python/Lib/site-packages/pip/_internal/resolution/base.py +2 -2
  174. package/xll/python/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +2 -2
  175. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +1 -1
  176. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -1
  177. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +39 -52
  178. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +3 -3
  179. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +3 -0
  180. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +9 -0
  181. package/xll/python/Lib/site-packages/pip/_internal/utils/compat.py +15 -9
  182. package/xll/python/Lib/site-packages/pip/_internal/utils/deprecation.py +6 -1
  183. package/xll/python/Lib/site-packages/pip/_internal/utils/filesystem.py +2 -2
  184. package/xll/python/Lib/site-packages/pip/_internal/utils/logging.py +11 -3
  185. package/xll/python/Lib/site-packages/pip/_internal/utils/misc.py +48 -4
  186. package/xll/python/Lib/site-packages/pip/_internal/utils/pylock.py +18 -2
  187. package/xll/python/Lib/site-packages/pip/_internal/utils/retry.py +2 -1
  188. package/xll/python/Lib/site-packages/pip/_internal/utils/subprocess.py +4 -3
  189. package/xll/python/Lib/site-packages/pip/_internal/utils/temp_dir.py +1 -2
  190. package/xll/python/Lib/site-packages/pip/_internal/utils/unpacking.py +30 -4
  191. package/xll/python/Lib/site-packages/pip/_internal/utils/urls.py +5 -2
  192. package/xll/python/Lib/site-packages/pip/_internal/utils/virtualenv.py +2 -36
  193. package/xll/python/Lib/site-packages/pip/_internal/vcs/git.py +8 -5
  194. package/xll/python/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +1 -2
  195. package/xll/python/Lib/site-packages/pip/_internal/wheel_builder.py +5 -1
  196. package/xll/python/Lib/site-packages/pip/_vendor/bom.cdx.json +231 -0
  197. package/xll/python/Lib/site-packages/pip/_vendor/certifi/__init__.py +1 -1
  198. package/xll/python/Lib/site-packages/pip/_vendor/certifi/cacert.pem +0 -631
  199. package/xll/python/Lib/site-packages/pip/_vendor/distlib/__init__.py +1 -1
  200. package/xll/python/Lib/site-packages/pip/_vendor/distlib/compat.py +34 -64
  201. package/xll/python/Lib/site-packages/pip/_vendor/distlib/resources.py +28 -14
  202. package/xll/python/Lib/site-packages/pip/_vendor/distlib/scripts.py +7 -3
  203. package/xll/python/Lib/site-packages/pip/_vendor/distlib/util.py +48 -11
  204. package/xll/python/Lib/site-packages/pip/_vendor/idna/LICENSE.md +1 -1
  205. package/xll/python/Lib/site-packages/pip/_vendor/idna/__main__.py +6 -0
  206. package/xll/python/Lib/site-packages/pip/_vendor/idna/cli.py +128 -0
  207. package/xll/python/Lib/site-packages/pip/_vendor/idna/codec.py +50 -13
  208. package/xll/python/Lib/site-packages/pip/_vendor/idna/compat.py +26 -0
  209. package/xll/python/Lib/site-packages/pip/_vendor/idna/core.py +352 -141
  210. package/xll/python/Lib/site-packages/pip/_vendor/idna/idnadata.py +571 -2983
  211. package/xll/python/Lib/site-packages/pip/_vendor/idna/intranges.py +5 -7
  212. package/xll/python/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -1
  213. package/xll/python/Lib/site-packages/pip/_vendor/idna/uts46data.py +16887 -8832
  214. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +352 -66
  215. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +11 -0
  216. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
  217. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/android.py +92 -41
  218. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/api.py +213 -49
  219. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/macos.py +128 -51
  220. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/unix.py +176 -127
  221. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/version.py +8 -18
  222. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/windows.py +185 -68
  223. package/xll/python/Lib/site-packages/pip/_vendor/pygments/__init__.py +2 -2
  224. package/xll/python/Lib/site-packages/pip/_vendor/pygments/__main__.py +1 -1
  225. package/xll/python/Lib/site-packages/pip/_vendor/pygments/console.py +1 -1
  226. package/xll/python/Lib/site-packages/pip/_vendor/pygments/filter.py +1 -1
  227. package/xll/python/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +10 -8
  228. package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatter.py +1 -1
  229. package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +1 -1
  230. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexer.py +7 -5
  231. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +1 -1
  232. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +9 -8
  233. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +35 -32
  234. package/xll/python/Lib/site-packages/pip/_vendor/pygments/modeline.py +1 -1
  235. package/xll/python/Lib/site-packages/pip/_vendor/pygments/plugin.py +3 -1
  236. package/xll/python/Lib/site-packages/pip/_vendor/pygments/regexopt.py +13 -2
  237. package/xll/python/Lib/site-packages/pip/_vendor/pygments/scanner.py +1 -1
  238. package/xll/python/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +1 -1
  239. package/xll/python/Lib/site-packages/pip/_vendor/pygments/style.py +1 -1
  240. package/xll/python/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +1 -1
  241. package/xll/python/Lib/site-packages/pip/_vendor/pygments/token.py +1 -1
  242. package/xll/python/Lib/site-packages/pip/_vendor/pygments/unistring.py +1 -1
  243. package/xll/python/Lib/site-packages/pip/_vendor/pygments/util.py +2 -2
  244. package/xll/python/Lib/site-packages/pip/_vendor/requests/__init__.py +52 -16
  245. package/xll/python/Lib/site-packages/pip/_vendor/requests/__version__.py +2 -2
  246. package/xll/python/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +2 -2
  247. package/xll/python/Lib/site-packages/pip/_vendor/requests/_types.py +183 -0
  248. package/xll/python/Lib/site-packages/pip/_vendor/requests/adapters.py +101 -50
  249. package/xll/python/Lib/site-packages/pip/_vendor/requests/api.py +31 -8
  250. package/xll/python/Lib/site-packages/pip/_vendor/requests/auth.py +80 -40
  251. package/xll/python/Lib/site-packages/pip/_vendor/requests/compat.py +9 -3
  252. package/xll/python/Lib/site-packages/pip/_vendor/requests/cookies.py +143 -79
  253. package/xll/python/Lib/site-packages/pip/_vendor/requests/exceptions.py +15 -5
  254. package/xll/python/Lib/site-packages/pip/_vendor/requests/help.py +13 -10
  255. package/xll/python/Lib/site-packages/pip/_vendor/requests/hooks.py +23 -9
  256. package/xll/python/Lib/site-packages/pip/_vendor/requests/models.py +265 -126
  257. package/xll/python/Lib/site-packages/pip/_vendor/requests/py.typed +0 -0
  258. package/xll/python/Lib/site-packages/pip/_vendor/requests/sessions.py +164 -78
  259. package/xll/python/Lib/site-packages/pip/_vendor/requests/status_codes.py +2 -2
  260. package/xll/python/Lib/site-packages/pip/_vendor/requests/structures.py +51 -20
  261. package/xll/python/Lib/site-packages/pip/_vendor/requests/utils.py +161 -89
  262. package/xll/python/Lib/site-packages/pip/_vendor/tomli/__init__.py +1 -1
  263. package/xll/python/Lib/site-packages/pip/_vendor/tomli/_parser.py +9 -4
  264. package/xll/python/Lib/site-packages/pip/_vendor/tomli/_re.py +13 -9
  265. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py +3 -1
  266. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -1
  267. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_version.py +8 -18
  268. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connection.py +4 -4
  269. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +23 -10
  270. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +5 -1
  271. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +7 -8
  272. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +1 -1
  273. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +2 -2
  274. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/fields.py +14 -14
  275. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +8 -6
  276. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/response.py +35 -22
  277. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +8 -0
  278. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +11 -61
  279. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +5 -11
  280. package/xll/python/Lib/site-packages/pip/_vendor/vendor.txt +8 -8
  281. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/METADATA +3 -2
  282. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/RECORD +208 -188
  283. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/AUTHORS.txt +20 -0
  284. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +1 -1
  285. package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
  286. package/xll/python/Scripts/httpx.exe +0 -0
  287. package/xll/python/Scripts/idna.exe +0 -0
  288. package/xll/python/Scripts/pip.exe +0 -0
  289. package/xll/python/Scripts/pip3.13.exe +0 -0
  290. package/xll/python/Scripts/pip3.exe +0 -0
  291. package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
  292. package/xll/python/Scripts/pywin32_testall.exe +0 -0
  293. package/dist/app/collab/awareness.d.ts +0 -32
  294. package/dist/app/collab/awareness.js +0 -52
  295. package/dist/app/collab/collab-client.d.ts +0 -37
  296. package/dist/app/collab/collab-client.js +0 -208
  297. package/dist/app/collab/collab-manager.d.ts +0 -91
  298. package/dist/app/collab/collab-manager.js +0 -218
  299. package/dist/app/collab/collab-sync.d.ts +0 -62
  300. package/dist/app/collab/collab-sync.js +0 -215
  301. package/dist/app/collab/index.d.ts +0 -9
  302. package/dist/app/collab/index.js +0 -6
  303. package/dist/app/collab/super-fight.d.ts +0 -90
  304. package/dist/app/collab/super-fight.js +0 -310
  305. package/dist/app/collab/sync-bridge.d.ts +0 -35
  306. package/dist/app/collab/sync-bridge.js +0 -109
  307. package/dist/app/collab/types.d.ts +0 -75
  308. package/dist/app/collab/types.js +0 -5
  309. package/dist/embedded-agent/ai-content.d.ts +0 -52
  310. package/dist/embedded-agent/ai-content.js +0 -101
  311. package/dist/embedded-agent/host-tools/shared/llm-stream.d.ts +0 -31
  312. package/dist/embedded-agent/host-tools/shared/llm-stream.js +0 -136
  313. package/dist/embedded-agent/model-call-orchestrator.d.ts +0 -22
  314. package/dist/embedded-agent/model-call-orchestrator.js +0 -22
  315. package/dist/embedded-agent/stream-errors.d.ts +0 -10
  316. package/dist/embedded-agent/stream-errors.js +0 -73
  317. package/dist/embedded-agent/stream-message-state.d.ts +0 -14
  318. package/dist/embedded-agent/stream-message-state.js +0 -271
  319. package/dist/embedded-agent/stream-sse.d.ts +0 -78
  320. package/dist/embedded-agent/stream-sse.js +0 -73
  321. package/dist/shell/interactive/collab-command.d.ts +0 -9
  322. package/dist/shell/interactive/collab-command.js +0 -115
  323. package/dist/shell/interactive/super-fight-ui.d.ts +0 -80
  324. package/dist/shell/interactive/super-fight-ui.js +0 -484
  325. package/dist/shell/status/collab-status.d.ts +0 -18
  326. package/dist/shell/status/collab-status.js +0 -46
  327. package/xll/python/Lib/site-packages/pip/_internal/build_env.py +0 -606
  328. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/INSTALLER +0 -0
  329. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/REQUESTED +0 -0
  330. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/WHEEL +0 -0
  331. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/entry_points.txt +0 -0
  332. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/LICENSE.txt +0 -0
  333. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
  334. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
  335. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
  336. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
  337. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
  338. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
  339. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
  340. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
  341. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
  342. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
  343. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
  344. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
  345. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
  346. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
  347. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
  348. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
  349. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
  350. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
  351. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
@@ -1,484 +0,0 @@
1
- /**
2
- * Super Fight UI — Terminal takeover for the multiplayer ASCII fighting game.
3
- *
4
- * Clears and takes over the outer TUI's alternate screen, intercepts all
5
- * keyboard input, runs the game loop, and bridges the headless game engine
6
- * with terminal rendering and network I/O.
7
- */
8
- import { DAMAGE, GROUND_Y, JUMP_VY, SPRITE_H, TICK_MS, VIEWPORT_H, VIEWPORT_W, applyDamage, checkHit, createPlayer, decodeGameMsg, encodeGameMsg, renderFrame, tickPlayer } from '../../app/collab/super-fight.js';
9
- export class SuperFightUI {
10
- ui;
11
- client;
12
- localPeerId;
13
- localDisplayName;
14
- gameState = new Map();
15
- gameLoop = null;
16
- removeInputListener = null;
17
- inputListener = null;
18
- resizeHandler = null;
19
- running = false;
20
- paused = false; // true when terminal too small
21
- localAction = 'idle';
22
- /** Set of target IDs we've already registered a hit for this attack */
23
- hitTargets = new Set();
24
- titleScreenTimeout = null;
25
- showingTitle = true;
26
- killFeed = [];
27
- /** Tick counter for respawn invincibility flash */
28
- invincibilityTicks = new Map();
29
- /** Callback fired when game stops (for cleanup by InteractiveMode) */
30
- onStop;
31
- constructor(opts) {
32
- this.ui = opts.ui;
33
- this.client = opts.client;
34
- this.localPeerId = opts.localPeerId;
35
- this.localDisplayName = opts.localDisplayName;
36
- // Initialize players from peer list
37
- let colorIdx = 0;
38
- // Add local player first
39
- this.gameState.set(this.localPeerId, createPlayer(this.localDisplayName, colorIdx++, 20));
40
- // Add remote peers
41
- for (const [peerId, peer] of opts.peers) {
42
- if (peerId === this.localPeerId)
43
- continue;
44
- this.gameState.set(peerId, createPlayer(peer.displayName, colorIdx++, 20 + colorIdx * 10));
45
- }
46
- }
47
- // ── Lifecycle ──────────────────────────────────────────────────────────
48
- start() {
49
- if (this.running)
50
- return;
51
- this.running = true;
52
- // Suspend TUI rendering so resize events don't clobber the game screen
53
- this.ui.renderSuspended = true;
54
- // The main TUI already owns the alternate screen; clear it for the game.
55
- this.ui.terminal.write('\x1b[2J\x1b[H\x1b[?25l');
56
- // Register input listener (intercepts ALL keys)
57
- this.inputListener = (data) => this.handleInput(data);
58
- this.removeInputListener = this.ui.addInputListener(this.inputListener);
59
- // Listen for resize
60
- this.resizeHandler = () => this.handleResize();
61
- process.stdout.on('resize', this.resizeHandler);
62
- // Check terminal size — if too small, show warning and wait for resize
63
- if (!this.checkSize()) {
64
- this.paused = true;
65
- this.renderSizeWarning();
66
- // Don't show title screen until terminal is big enough
67
- return;
68
- }
69
- this.showTitleAndStart();
70
- }
71
- stop() {
72
- if (!this.running)
73
- return;
74
- this.running = false;
75
- // Clear title timeout if still showing
76
- if (this.titleScreenTimeout) {
77
- clearTimeout(this.titleScreenTimeout);
78
- this.titleScreenTimeout = null;
79
- }
80
- // Stop game loop
81
- if (this.gameLoop) {
82
- clearInterval(this.gameLoop);
83
- this.gameLoop = null;
84
- }
85
- // Remove input listener
86
- if (this.removeInputListener) {
87
- this.removeInputListener();
88
- this.removeInputListener = null;
89
- }
90
- // Remove resize listener
91
- if (this.resizeHandler) {
92
- process.stdout.removeListener('resize', this.resizeHandler);
93
- this.resizeHandler = null;
94
- }
95
- // Broadcast quit
96
- this.client.sendChat(encodeGameMsg({ type: 'quit' }));
97
- // Keep the main TUI's alternate screen active and restore its cursor state.
98
- this.ui.terminal.write('\x1b[?25h');
99
- // Resume TUI rendering and force a full re-render to restore normal display
100
- this.ui.renderSuspended = false;
101
- this.ui.requestRender(true);
102
- this.onStop?.();
103
- }
104
- // ── Game Loop ──────────────────────────────────────────────────────────
105
- showTitleAndStart() {
106
- this.showingTitle = true;
107
- // Clear alternate screen before rendering title
108
- this.ui.terminal.write('\x1b[2J');
109
- this.renderTitleScreen();
110
- this.titleScreenTimeout = setTimeout(() => {
111
- this.showingTitle = false;
112
- this.titleScreenTimeout = null;
113
- // Clear screen before first game frame to remove title remnants
114
- this.ui.terminal.write('\x1b[2J');
115
- this.startGameLoop();
116
- }, 2000);
117
- }
118
- startGameLoop() {
119
- if (!this.running || this.gameLoop)
120
- return;
121
- this.gameLoop = setInterval(() => {
122
- if (this.paused || this.showingTitle)
123
- return;
124
- this.tick();
125
- }, TICK_MS);
126
- }
127
- tick() {
128
- const localPlayer = this.gameState.get(this.localPeerId);
129
- if (!localPlayer)
130
- return;
131
- // Apply local input action
132
- this.applyLocalInput(localPlayer);
133
- // Track pre-tick dead state for respawn detection
134
- const wasDead = new Map();
135
- for (const [id, p] of this.gameState)
136
- wasDead.set(id, p.action === 'dead');
137
- // Physics
138
- tickPlayer(localPlayer);
139
- // Detect respawns → start invincibility flash (15 ticks ≈ 1s)
140
- for (const [id, p] of this.gameState) {
141
- if (wasDead.get(id) && p.action !== 'dead') {
142
- this.invincibilityTicks.set(id, 15);
143
- }
144
- const remaining = this.invincibilityTicks.get(id);
145
- if (remaining && remaining > 0) {
146
- this.invincibilityTicks.set(id, remaining - 1);
147
- }
148
- else {
149
- this.invincibilityTicks.delete(id);
150
- }
151
- }
152
- // Hit detection — check local player's attacks against all remotes
153
- for (const [peerId, target] of this.gameState) {
154
- if (peerId === this.localPeerId)
155
- continue;
156
- if (this.hitTargets.has(peerId))
157
- continue; // already hit this attack
158
- if (this.invincibilityTicks.has(peerId))
159
- continue; // invincible
160
- if (checkHit(localPlayer, target)) {
161
- this.hitTargets.add(peerId);
162
- // Terminal bell on hit
163
- this.ui.terminal.write('\x07');
164
- // Broadcast hit
165
- this.client.sendChat(encodeGameMsg({ type: 'hit', targetId: peerId, damage: DAMAGE }));
166
- // Apply locally too
167
- const killed = applyDamage(target, DAMAGE);
168
- if (killed) {
169
- localPlayer.kills++;
170
- this.addKillFeedEntry(localPlayer.displayName, localPlayer.action === 'kick' ? 'kicked' : 'punched', target.displayName);
171
- }
172
- }
173
- }
174
- // Broadcast local state
175
- this.client.sendChat(encodeGameMsg({
176
- type: 'state',
177
- peerId: this.localPeerId,
178
- x: localPlayer.x,
179
- y: localPlayer.y,
180
- vy: localPlayer.vy,
181
- action: localPlayer.action,
182
- facing: localPlayer.facing,
183
- health: localPlayer.health,
184
- kills: localPlayer.kills
185
- }));
186
- // Render
187
- this.renderGameFrame();
188
- }
189
- // ── Input ──────────────────────────────────────────────────────────────
190
- handleInput(data) {
191
- if (!this.running)
192
- return undefined;
193
- // Quit — Escape, q, or Ctrl+C
194
- if (data === '\x1b' || data === 'q' || data === '\x03') {
195
- this.stop();
196
- return { consume: true };
197
- }
198
- // Movement keys
199
- switch (data) {
200
- case '\x1b[A':
201
- case 'w': // Up / Jump
202
- this.localAction = 'jump';
203
- break;
204
- case '\x1b[B':
205
- case 's': // Down / Crouch
206
- this.localAction = 'crouch';
207
- break;
208
- case '\x1b[C':
209
- case 'd': // Right
210
- this.localAction = 'walk-right';
211
- break;
212
- case '\x1b[D':
213
- case 'a': // Left
214
- this.localAction = 'walk-left';
215
- break;
216
- case 'j':
217
- case 'z': // Punch
218
- this.localAction = 'punch';
219
- this.hitTargets.clear(); // new attack, clear hit tracking
220
- break;
221
- case 'k':
222
- case 'x': // Kick
223
- this.localAction = 'kick';
224
- this.hitTargets.clear();
225
- break;
226
- default:
227
- // On key release or unknown key, go idle
228
- if (data.length === 1 && data >= ' ') {
229
- // Ignore other printable chars
230
- }
231
- break;
232
- }
233
- return { consume: true };
234
- }
235
- applyLocalInput(player) {
236
- if (player.action === 'dead')
237
- return;
238
- const onGround = player.y >= GROUND_Y - SPRITE_H;
239
- switch (this.localAction) {
240
- case 'jump':
241
- if (onGround && player.action !== 'jump') {
242
- player.vy = JUMP_VY;
243
- player.action = 'jump';
244
- }
245
- this.localAction = 'idle'; // jump is one-shot
246
- break;
247
- case 'crouch':
248
- if (onGround) {
249
- player.action = 'crouch';
250
- }
251
- break;
252
- case 'walk-left':
253
- if (player.action !== 'punch' && player.action !== 'kick' && player.action !== 'hit') {
254
- player.action = 'walk-left';
255
- player.facing = 'left';
256
- }
257
- break;
258
- case 'walk-right':
259
- if (player.action !== 'punch' && player.action !== 'kick' && player.action !== 'hit') {
260
- player.action = 'walk-right';
261
- player.facing = 'right';
262
- }
263
- break;
264
- case 'punch':
265
- if (player.actionTimer <= 0) {
266
- player.action = 'punch';
267
- player.actionTimer = 4; // 4 ticks of punch animation
268
- }
269
- this.localAction = 'idle';
270
- break;
271
- case 'kick':
272
- if (player.actionTimer <= 0) {
273
- player.action = 'kick';
274
- player.actionTimer = 5; // 5 ticks of kick animation
275
- }
276
- this.localAction = 'idle';
277
- break;
278
- case 'idle':
279
- // Only go idle if not in an attack/hit animation and on the ground
280
- if (player.actionTimer <= 0 && player.action !== 'jump' && onGround) {
281
- player.action = 'idle';
282
- }
283
- break;
284
- }
285
- }
286
- // ── Incoming Network Messages ──────────────────────────────────────────
287
- /** Called by the chat handler when a game message arrives */
288
- handleGameMessage(peerId, text) {
289
- const msg = decodeGameMsg(text);
290
- if (!msg)
291
- return;
292
- switch (msg.type) {
293
- case 'state':
294
- this.handleRemoteState(msg.peerId, msg);
295
- break;
296
- case 'hit':
297
- if (msg.targetId === this.localPeerId) {
298
- const localPlayer = this.gameState.get(this.localPeerId);
299
- if (localPlayer) {
300
- applyDamage(localPlayer, msg.damage);
301
- }
302
- }
303
- break;
304
- case 'quit':
305
- this.gameState.delete(peerId);
306
- break;
307
- }
308
- }
309
- handleRemoteState(peerId, msg) {
310
- let player = this.gameState.get(peerId);
311
- if (!player) {
312
- // New player joined mid-game
313
- player = createPlayer(peerId, this.gameState.size);
314
- this.gameState.set(peerId, player);
315
- }
316
- player.x = msg.x;
317
- player.y = msg.y;
318
- player.vy = msg.vy;
319
- player.action = msg.action;
320
- player.facing = msg.facing;
321
- player.health = msg.health;
322
- player.kills = msg.kills;
323
- }
324
- /** Add a peer that joined the collab room during the game */
325
- addPeer(peerId, displayName) {
326
- if (!this.gameState.has(peerId)) {
327
- this.gameState.set(peerId, createPlayer(displayName, this.gameState.size));
328
- }
329
- }
330
- /** Remove a peer that left the collab room during the game */
331
- removePeer(peerId) {
332
- this.gameState.delete(peerId);
333
- }
334
- // ── Rendering ──────────────────────────────────────────────────────────
335
- addKillFeedEntry(killer, verb, victim) {
336
- this.killFeed.push({ text: `${killer} ${verb} ${victim}!`, time: Date.now() });
337
- // Keep only last 3
338
- if (this.killFeed.length > 3)
339
- this.killFeed.shift();
340
- }
341
- tickCount = 0;
342
- renderGameFrame() {
343
- this.tickCount++;
344
- // Invincibility flash: temporarily remove flashing players on odd ticks
345
- const hidden = new Map();
346
- for (const [id, ticks] of this.invincibilityTicks) {
347
- if (ticks > 0 && this.tickCount % 2 === 0) {
348
- const player = this.gameState.get(id);
349
- if (player) {
350
- hidden.set(id, player);
351
- this.gameState.delete(id);
352
- }
353
- }
354
- }
355
- const lines = renderFrame(this.gameState, VIEWPORT_W, VIEWPORT_H);
356
- // Restore hidden players
357
- for (const [id, player] of hidden) {
358
- this.gameState.set(id, player);
359
- }
360
- const now = Date.now();
361
- // Overlay kill feed at bottom of viewport (above ground)
362
- this.killFeed = this.killFeed.filter((e) => now - e.time < 5000);
363
- for (let i = 0; i < this.killFeed.length; i++) {
364
- const row = GROUND_Y - 2 - (this.killFeed.length - 1 - i);
365
- if (row >= 1 && row < lines.length) {
366
- const entry = this.killFeed[i];
367
- const age = now - entry.time;
368
- // Fade: bright for first 3s, dim for last 2s
369
- const color = age < 3000 ? '\x1b[97m' : '\x1b[90m';
370
- const pad = Math.max(0, VIEWPORT_W - entry.text.length - 4);
371
- lines[row] = ' '.repeat(pad) + color + ' ' + entry.text + ' \x1b[0m ';
372
- }
373
- }
374
- // Move cursor to home position and overwrite
375
- let output = '\x1b[H';
376
- for (let i = 0; i < lines.length; i++) {
377
- output += lines[i];
378
- if (i < lines.length - 1)
379
- output += '\r\n';
380
- }
381
- this.ui.terminal.write(output);
382
- }
383
- renderTitleScreen() {
384
- const w = VIEWPORT_W;
385
- const h = VIEWPORT_H;
386
- const lines = Array(h).fill(' '.repeat(w));
387
- // ASCII art title centered
388
- const title = [
389
- ' ____ _ _ ____ _____ ____ _____ ___ ____ _ _ _____ _ ',
390
- ' / ___|| | | | _ \\| ____| _ \\ | ___|_ _/ ___| | | |_ _| |',
391
- ' \\___ \\| | | | |_) | _| | |_) | | |_ | | | _| |_| | | | | |',
392
- ' ___) | |_| | __/| |___| _ < | _| | | |_| | _ | | | |_|',
393
- ' |____/ \\___/|_| |_____|_| \\_\\ |_| |___\\____|_| |_| |_| (_)'
394
- ];
395
- const startRow = Math.floor((h - title.length - 6) / 2);
396
- const result = [...lines];
397
- for (let i = 0; i < title.length; i++) {
398
- const row = startRow + i;
399
- if (row >= 0 && row < h) {
400
- const pad = Math.max(0, Math.floor((w - title[i].length) / 2));
401
- result[row] =
402
- ' '.repeat(pad) +
403
- '\x1b[93m' +
404
- title[i] +
405
- '\x1b[0m' +
406
- ' '.repeat(Math.max(0, w - pad - title[i].length));
407
- }
408
- }
409
- // Player list below title
410
- const playerRow = startRow + title.length + 2;
411
- const players = [...this.gameState.values()];
412
- let playerLine = '';
413
- for (const p of players) {
414
- playerLine += `${p.color}● ${p.displayName}\x1b[0m `;
415
- }
416
- if (playerRow < h) {
417
- const pad = Math.max(0, Math.floor((w - players.length * 12) / 2));
418
- result[playerRow] =
419
- ' '.repeat(pad) + playerLine + ' '.repeat(Math.max(0, w - pad - players.length * 12));
420
- }
421
- // "Get ready!" text
422
- const readyRow = playerRow + 2;
423
- const readyText = 'Get ready...';
424
- if (readyRow < h) {
425
- const pad = Math.floor((w - readyText.length) / 2);
426
- result[readyRow] =
427
- ' '.repeat(pad) +
428
- '\x1b[97m' +
429
- readyText +
430
- '\x1b[0m' +
431
- ' '.repeat(Math.max(0, w - pad - readyText.length));
432
- }
433
- let output = '\x1b[H';
434
- for (let i = 0; i < result.length; i++) {
435
- output += result[i];
436
- if (i < result.length - 1)
437
- output += '\r\n';
438
- }
439
- this.ui.terminal.write(output);
440
- }
441
- // ── Terminal Size ──────────────────────────────────────────────────────
442
- checkSize() {
443
- return this.ui.terminal.columns >= VIEWPORT_W && this.ui.terminal.rows >= VIEWPORT_H;
444
- }
445
- handleResize() {
446
- if (!this.running)
447
- return;
448
- if (this.checkSize()) {
449
- if (this.paused) {
450
- this.paused = false;
451
- // If we never showed the title (was paused from the start), show it now
452
- if (!this.gameLoop && !this.titleScreenTimeout) {
453
- this.showTitleAndStart();
454
- }
455
- }
456
- }
457
- else {
458
- this.paused = true;
459
- this.renderSizeWarning();
460
- }
461
- }
462
- renderSizeWarning() {
463
- const cols = this.ui.terminal.columns;
464
- const rows = this.ui.terminal.rows;
465
- const msg1 = `Resize terminal to at least ${VIEWPORT_W}×${VIEWPORT_H} to play`;
466
- const msg2 = `Current: ${cols}×${rows}`;
467
- // Clear screen and center the message
468
- let output = '\x1b[2J\x1b[H';
469
- const row1 = Math.max(0, Math.floor(rows / 2) - 1);
470
- const row2 = row1 + 1;
471
- if (row1 > 0)
472
- output += `\x1b[${row1 + 1};1H`;
473
- const pad1 = Math.max(0, Math.floor((cols - msg1.length) / 2));
474
- output += ' '.repeat(pad1) + msg1;
475
- output += `\x1b[${row2 + 1};1H`;
476
- const pad2 = Math.max(0, Math.floor((cols - msg2.length) / 2));
477
- output += ' '.repeat(pad2) + '\x1b[90m' + msg2 + '\x1b[0m';
478
- this.ui.terminal.write(output);
479
- }
480
- get isRunning() {
481
- return this.running;
482
- }
483
- }
484
- //# sourceMappingURL=super-fight-ui.js.map
@@ -1,18 +0,0 @@
1
- /**
2
- * Collab footer status — shows room, peers, and sync info when in a collab session.
3
- *
4
- * Uses the FooterDataProvider's setExtensionStatus('collab', text) pattern.
5
- */
6
- import type { CollabClient } from '../../app/collab/collab-client.js';
7
- import type { InteractiveSessionClient } from '../session-client.js';
8
- type SetStatusFn = (key: string, text: string | undefined) => void;
9
- type RequestRenderFn = () => void;
10
- /**
11
- * Start the collab footer status updater.
12
- *
13
- * Registers event handlers on the collab client to keep the footer
14
- * line up to date. Returns a cleanup function.
15
- */
16
- export declare function startCollabStatusUpdater(session: Pick<InteractiveSessionClient, 'sheetPool'>, client: CollabClient, setStatus: SetStatusFn, requestRender: RequestRenderFn): () => void;
17
- export {};
18
- //# sourceMappingURL=collab-status.d.ts.map
@@ -1,46 +0,0 @@
1
- /**
2
- * Collab footer status — shows room, peers, and sync info when in a collab session.
3
- *
4
- * Uses the FooterDataProvider's setExtensionStatus('collab', text) pattern.
5
- */
6
- /**
7
- * Start the collab footer status updater.
8
- *
9
- * Registers event handlers on the collab client to keep the footer
10
- * line up to date. Returns a cleanup function.
11
- */
12
- export function startCollabStatusUpdater(session, client, setStatus, requestRender) {
13
- function update() {
14
- const state = client.state;
15
- if (!state.roomId) {
16
- setStatus('collab', undefined);
17
- requestRender();
18
- return;
19
- }
20
- const peerNames = [...state.peers.values()].map((p) => p.displayName);
21
- const peerPart = peerNames.length > 0 ? peerNames.join(', ') : 'waiting for peers';
22
- const pool = session.sheetPool;
23
- const wbCount = pool?.size ?? 0;
24
- const wbPart = wbCount > 0 ? `${wbCount} workbook${wbCount > 1 ? 's' : ''}` : '';
25
- const parts = [`room ${state.roomId}`, `${state.peers.size + 1} peers (${peerPart})`];
26
- if (wbPart)
27
- parts.push(wbPart);
28
- setStatus('collab', parts.join(' · '));
29
- requestRender();
30
- }
31
- // Initial update
32
- update();
33
- // Subscribe to events that change the status
34
- client.on('onPeerJoined', update);
35
- client.on('onPeerLeft', update);
36
- client.on('onAwareness', update);
37
- client.on('onDisconnect', () => {
38
- setStatus('collab', undefined);
39
- requestRender();
40
- });
41
- return () => {
42
- setStatus('collab', undefined);
43
- requestRender();
44
- };
45
- }
46
- //# sourceMappingURL=collab-status.js.map