shortcutxl 0.3.76 → 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 (480) hide show
  1. package/BINARY-INVENTORY.json +813 -813
  2. package/CHANGELOG.md +14 -0
  3. package/dist/ai/models.d.ts +10 -6
  4. package/dist/ai/models.generated.d.ts +72 -0
  5. package/dist/ai/models.generated.js +33 -0
  6. package/dist/ai/models.js +36 -13
  7. package/dist/ai/providers/anthropic.d.ts +4 -2
  8. package/dist/ai/providers/anthropic.js +59 -29
  9. package/dist/ai/providers/azure-openai-responses.d.ts +2 -1
  10. package/dist/ai/providers/azure-openai-responses.js +4 -20
  11. package/dist/ai/providers/google-vertex.d.ts +8 -2
  12. package/dist/ai/providers/google-vertex.js +66 -54
  13. package/dist/ai/providers/google.js +15 -48
  14. package/dist/ai/providers/openai-completions.d.ts +4 -1
  15. package/dist/ai/providers/openai-completions.js +26 -10
  16. package/dist/ai/providers/openai-reasoning.d.ts +5 -0
  17. package/dist/ai/providers/openai-reasoning.js +13 -0
  18. package/dist/ai/providers/openai-responses-shared.js +1 -1
  19. package/dist/ai/providers/openai-responses.d.ts +6 -2
  20. package/dist/ai/providers/openai-responses.js +28 -23
  21. package/dist/ai/providers/simple-options.d.ts +2 -3
  22. package/dist/ai/providers/simple-options.js +4 -6
  23. package/dist/ai/types.d.ts +19 -2
  24. package/dist/app/agent-session-runtime-adapter.js +7 -6
  25. package/dist/app/agent-session.d.ts +0 -15
  26. package/dist/app/agent-session.js +0 -37
  27. package/dist/app/approvals/approval-errors.d.ts +15 -0
  28. package/dist/app/approvals/approval-errors.js +14 -0
  29. package/dist/app/approvals/runtime-approval-gates.d.ts +1 -2
  30. package/dist/app/approvals/tool-approval.d.ts +1 -0
  31. package/dist/app/approvals/tool-approval.js +11 -23
  32. package/dist/app/approvals/types.d.ts +0 -14
  33. package/dist/app/approvals/types.js +0 -2
  34. package/dist/app/background/tool-summaries.js +0 -2
  35. package/dist/app/extensions/slash-commands.js +1 -3
  36. package/dist/app/local/tools/execute-code/executor.d.ts +1 -1
  37. package/dist/app/local/tools/execute-code/executor.js +20 -10
  38. package/dist/app/local/tools/execute-code/tool.js +21 -2
  39. package/dist/app/modes/action/agent.js +4 -5
  40. package/dist/app/modes/ask/agent.js +4 -6
  41. package/dist/app/modes/index.js +20 -10
  42. package/dist/app/modes/installation/agent.js +4 -5
  43. package/dist/app/modes/manage/agent.js +3 -4
  44. package/dist/app/modes/manage/prompt.js +1 -2
  45. package/dist/app/modes/metadata.d.ts +31 -0
  46. package/dist/app/modes/metadata.js +35 -0
  47. package/dist/app/modes/plan/agent.js +5 -8
  48. package/dist/app/modes/plan/prompt.js +3 -3
  49. package/dist/app/permissions/runtime-approval-flow.d.ts +1 -5
  50. package/dist/app/permissions/runtime-approval-flow.js +0 -28
  51. package/dist/app/permissions/tool-gates.d.ts +2 -3
  52. package/dist/app/permissions/tool-gates.js +3 -81
  53. package/dist/app/prompts/com-api.js +1 -1
  54. package/dist/app/prompts/shared-guidelines.js +7 -3
  55. package/dist/app/providers/google-vertex-gateway.js +4 -51
  56. package/dist/app/providers/model-registry.d.ts +1 -0
  57. package/dist/app/providers/model-registry.js +39 -0
  58. package/dist/app/providers/model-resolver.js +10 -7
  59. package/dist/app/providers/register-shortcut-provider.js +6 -6
  60. package/dist/app/providers/shortcut-api-v2-transport.js +4 -0
  61. package/dist/app/providers/shortcut-llm-proxy-client.d.ts +2 -2
  62. package/dist/app/providers/shortcut-llm-proxy-client.js +1 -0
  63. package/dist/app/resources/package-manager.js +2 -123
  64. package/dist/app/resources/resource-patterns.d.ts +9 -0
  65. package/dist/app/resources/resource-patterns.js +120 -0
  66. package/dist/app/session/forked-agent.d.ts +2 -2
  67. package/dist/app/session/model-manager.js +3 -2
  68. package/dist/app/session/session-lifecycle.js +3 -2
  69. package/dist/app/session/session-models.d.ts +2 -0
  70. package/dist/app/session/session-models.js +14 -6
  71. package/dist/app/settings-manager.d.ts +3 -3
  72. package/dist/app/shared/tools/execute-code/mog.d.ts +3 -1
  73. package/dist/app/shared/tools/execute-code/mog.js +18 -2
  74. package/dist/app/tools/bash.js +3 -3
  75. package/dist/app/tools/execute-code/index.d.ts +1 -0
  76. package/dist/app/tools/execute-code/index.js +3 -1
  77. package/dist/app/tools/find-ignore-files.d.ts +3 -0
  78. package/dist/app/tools/find-ignore-files.js +33 -0
  79. package/dist/app/tools/find.js +2 -21
  80. package/dist/app/tools/llm-analysis.js +0 -2
  81. package/dist/app/tools/refresh-context.d.ts +1 -1
  82. package/dist/app/tools/session-settings/update-session-settings.js +2 -2
  83. package/dist/app/tools/switch-mode.js +2 -2
  84. package/dist/app/tools/take-screenshot.js +0 -2
  85. package/dist/app/tools/task/runner.js +1 -2
  86. package/dist/app/tools/task/task.d.ts +1 -3
  87. package/dist/app/tools/task/task.js +20 -40
  88. package/dist/app/tools/web-search.js +12 -2
  89. package/dist/autocomplete/core.d.ts +33 -0
  90. package/dist/autocomplete/core.js +113 -0
  91. package/dist/{tui → autocomplete}/fuzzy.d.ts +0 -1
  92. package/dist/{tui → autocomplete}/fuzzy.js +0 -1
  93. package/dist/{tui/autocomplete.d.ts → autocomplete/index.d.ts} +0 -1
  94. package/dist/{tui/autocomplete.js → autocomplete/index.js} +62 -158
  95. package/dist/cli/args.js +1 -1
  96. package/dist/cli/list-models.js +1 -1
  97. package/dist/cli.js +26227 -30480
  98. package/dist/constants.d.ts +0 -2
  99. package/dist/constants.js +0 -3
  100. package/dist/contracts/agent-session-store.d.ts +1 -1
  101. package/dist/contracts/agent-settings.d.ts +1 -0
  102. package/dist/contracts/agent-settings.js +2 -1
  103. package/dist/contracts/model-call.d.ts +1 -2
  104. package/dist/contracts/model-call.js +1 -2
  105. package/dist/contracts/model-stream.d.ts +1 -0
  106. package/dist/contracts/model-stream.js +1 -0
  107. package/dist/contracts/wire.d.ts +10 -7
  108. package/dist/contracts/wire.js +8 -0
  109. package/dist/core/agent-engine.js +1 -1
  110. package/dist/core/core-types.d.ts +1 -21
  111. package/dist/core/defaults.d.ts +1 -1
  112. package/dist/core/defaults.js +9 -1
  113. package/dist/core/prompts/agent-guidelines.d.ts +4 -5
  114. package/dist/core/prompts/agent-guidelines.js +28 -42
  115. package/dist/core/session-schema.d.ts +1 -1
  116. package/dist/embedded-agent/ai-invoke.d.ts +1 -2
  117. package/dist/embedded-agent/ai-invoke.js +2 -70
  118. package/dist/embedded-agent/anthropic-messages-transport.d.ts +4 -20
  119. package/dist/embedded-agent/anthropic-messages-transport.js +23 -786
  120. package/dist/embedded-agent/bootstrap.js +2 -2
  121. package/dist/embedded-agent/compose.js +8 -7
  122. package/dist/embedded-agent/gateway-base-url.d.ts +3 -0
  123. package/dist/embedded-agent/gateway-base-url.js +35 -0
  124. package/dist/embedded-agent/google-vertex-transport.d.ts +2 -11
  125. package/dist/embedded-agent/google-vertex-transport.js +20 -117
  126. package/dist/embedded-agent/host-runtime-options.d.ts +0 -8
  127. package/dist/embedded-agent/host-runtime-options.js +10 -2
  128. package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +2 -2
  129. package/dist/embedded-agent/host-tools/invoke-llm/contract.js +4 -2
  130. package/dist/embedded-agent/host-tools/sandbox-llm/contract.d.ts +8 -3
  131. package/dist/embedded-agent/host-tools/sandbox-llm/contract.js +12 -8
  132. package/dist/embedded-agent/host-tools/sandbox-llm/index.d.ts +1 -1
  133. package/dist/embedded-agent/host-tools/sandbox-llm/index.js +1 -1
  134. package/dist/embedded-agent/host-tools/shared/index.d.ts +1 -1
  135. package/dist/embedded-agent/host-tools/shared/index.js +1 -1
  136. package/dist/embedded-agent/host-tools/shared/llm-stream-error.d.ts +7 -0
  137. package/dist/embedded-agent/host-tools/shared/llm-stream-error.js +10 -0
  138. package/dist/embedded-agent/host-tools/take-screenshot/contract.d.ts +0 -2
  139. package/dist/embedded-agent/host-tools/take-screenshot/contract.js +1 -3
  140. package/dist/embedded-agent/host-tools/take-screenshot/index.d.ts +1 -1
  141. package/dist/embedded-agent/host-tools/take-screenshot/index.js +1 -1
  142. package/dist/embedded-agent/host-tools/task/agents/clone.js +1 -2
  143. package/dist/embedded-agent/host-tools/task/contract.js +1 -1
  144. package/dist/embedded-agent/index.d.ts +3 -4
  145. package/dist/embedded-agent/index.js +2 -3
  146. package/dist/embedded-agent/model-selection.d.ts +0 -6
  147. package/dist/embedded-agent/model-selection.js +15 -8
  148. package/dist/embedded-agent/openai-completions-transport.d.ts +2 -11
  149. package/dist/embedded-agent/openai-completions-transport.js +20 -120
  150. package/dist/embedded-agent/openai-responses-transport.d.ts +2 -11
  151. package/dist/embedded-agent/openai-responses-transport.js +15 -170
  152. package/dist/embedded-agent/prompt/build.js +1 -2
  153. package/dist/embedded-agent/prompt/sections.d.ts +1 -1
  154. package/dist/embedded-agent/prompt/sections.js +2 -0
  155. package/dist/embedded-agent/provider-native-request.d.ts +29 -0
  156. package/dist/embedded-agent/provider-native-request.js +65 -0
  157. package/dist/embedded-agent/run-stats.d.ts +1 -1
  158. package/dist/embedded-agent/stream.d.ts +10 -96
  159. package/dist/embedded-agent/stream.js +31 -556
  160. package/dist/embedded-agent/suggestions.d.ts +1 -1
  161. package/dist/embedded-agent/suggestions.js +1 -1
  162. package/dist/embedded-agent/worker-bridge/host-client.d.ts +7 -0
  163. package/dist/embedded-agent/worker-bridge/host-client.js +15 -0
  164. package/dist/embedded-agent/worker-bridge/worker-port.js +17 -1
  165. package/dist/main.js +18 -14
  166. package/dist/rpc/index.d.ts +1 -1
  167. package/dist/rpc/rpc-approval-gates.js +1 -2
  168. package/dist/rpc/rpc-host.d.ts +4 -0
  169. package/dist/rpc/rpc-host.js +13 -24
  170. package/dist/rpc/rpc-types.d.ts +6 -17
  171. package/dist/shared/platform/open.d.ts +4 -1
  172. package/dist/shared/platform/open.js +14 -2
  173. package/dist/shell/approvals/runtime-approval-gates.js +1 -3
  174. package/dist/shell/components/selectors/model-selector.js +2 -1
  175. package/dist/shell/components/selectors/session-selector-search.js +1 -1
  176. package/dist/shell/components/selectors/thinking-selector.js +7 -6
  177. package/dist/shell/index.d.ts +0 -1
  178. package/dist/shell/index.js +0 -1
  179. package/dist/shell/interactive/interactive-mode-options.d.ts +10 -0
  180. package/dist/shell/interactive/interactive-mode.d.ts +6 -12
  181. package/dist/shell/interactive/interactive-mode.js +39 -158
  182. package/dist/shell/interactive/slash-commands.d.ts +0 -34
  183. package/dist/shell/interactive/slash-commands.js +0 -2
  184. package/dist/shell/links/local-file-link-input.d.ts +15 -0
  185. package/dist/shell/links/local-file-link-input.js +38 -0
  186. package/dist/shell/links/local-file-link.d.ts +7 -0
  187. package/dist/shell/links/local-file-link.js +35 -0
  188. package/dist/shell/links/local-file-opener.d.ts +16 -0
  189. package/dist/shell/links/local-file-opener.js +90 -0
  190. package/dist/shell/session-client.d.ts +0 -1
  191. package/dist/shell/session-client.js +0 -6
  192. package/dist/shell/status/update-check-scheduler.d.ts +30 -0
  193. package/dist/shell/status/update-check-scheduler.js +71 -0
  194. package/dist/shell/status/update-reminder-controller.d.ts +22 -0
  195. package/dist/shell/status/update-reminder-controller.js +40 -0
  196. package/dist/shell/status/update-reminder.d.ts +6 -0
  197. package/dist/shell/status/update-reminder.js +4 -0
  198. package/dist/shell/theme/dark.json +1 -2
  199. package/dist/shell/theme/light.json +1 -2
  200. package/dist/shell/theme/runtime.d.ts +2 -3
  201. package/dist/shell/theme/runtime.js +2 -6
  202. package/dist/shell/theme/theme-schema.json +1 -6
  203. package/dist/shortcut-model-catalog.d.ts +7 -2
  204. package/dist/shortcut-model-catalog.js +134 -10
  205. package/dist/startup/update-manager.d.ts +6 -6
  206. package/dist/startup/update-manager.js +23 -38
  207. package/dist/startup/update-prompt.d.ts +1 -0
  208. package/dist/startup/update-prompt.js +2 -2
  209. package/dist/tui/components/editor.d.ts +1 -1
  210. package/dist/tui/components/editor.js +1 -1
  211. package/dist/tui/components/markdown.js +15 -6
  212. package/dist/tui/components/settings-list.js +1 -1
  213. package/dist/tui/editor-component.d.ts +1 -1
  214. package/dist/tui/index.d.ts +7 -8
  215. package/dist/tui/index.js +7 -6
  216. package/dist/tui/tui.d.ts +2 -0
  217. package/dist/tui/tui.js +16 -1
  218. package/dist/tui/utils.d.ts +7 -0
  219. package/dist/tui/utils.js +58 -8
  220. package/native-app/main/index.js +3200 -48
  221. package/native-app/main/{photon_rs-SoVDgheu.js → photon_rs-XkYyYTVA.js} +2 -2
  222. package/native-app/package.json +1 -1
  223. package/native-app/preload/index.cjs +2 -0
  224. package/native-app/renderer/assets/{index-CFc-oZuS.js → index-B4jz6epR.js} +825 -155
  225. package/native-app/renderer/assets/{index-OhGE0UY4.css → index-C__g36ft.css} +412 -162
  226. package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
  227. package/native-app/renderer/index.html +2 -2
  228. package/package.json +17 -3
  229. package/skills/add-custom-model/SKILL.md +52 -0
  230. package/user-docs/dist/index.html +1 -1
  231. package/user-docs/dist/shortcutxl-docs.pdf +0 -0
  232. package/xll/ShortcutXL.xll +0 -0
  233. package/xll/modules/shortcut_xl/_managed.py +26 -7
  234. package/xll/modules/shortcut_xl/_tracking.py +141 -251
  235. package/xll/modules/shortcut_xl/api/__init__.py +60 -0
  236. package/xll/modules/shortcut_xl/api/workbook.py +9 -1
  237. package/xll/modules/shortcut_xl/api/worksheet.py +4 -1
  238. package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
  239. package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
  240. package/xll/python/Lib/site-packages/pip/__init__.py +1 -1
  241. package/xll/python/Lib/site-packages/pip/_internal/build_env/__init__.py +25 -0
  242. package/xll/python/Lib/site-packages/pip/_internal/build_env/base.py +103 -0
  243. package/xll/python/Lib/site-packages/pip/_internal/build_env/installer.py +333 -0
  244. package/xll/python/Lib/site-packages/pip/_internal/build_env/noop.py +42 -0
  245. package/xll/python/Lib/site-packages/pip/_internal/build_env/venv.py +145 -0
  246. package/xll/python/Lib/site-packages/pip/_internal/build_env/virtual.py +139 -0
  247. package/xll/python/Lib/site-packages/pip/_internal/cache.py +4 -1
  248. package/xll/python/Lib/site-packages/pip/_internal/cli/autocompletion.py +4 -1
  249. package/xll/python/Lib/site-packages/pip/_internal/cli/base_command.py +11 -14
  250. package/xll/python/Lib/site-packages/pip/_internal/cli/cmdoptions.py +133 -22
  251. package/xll/python/Lib/site-packages/pip/_internal/cli/index_command.py +11 -6
  252. package/xll/python/Lib/site-packages/pip/_internal/cli/main.py +2 -1
  253. package/xll/python/Lib/site-packages/pip/_internal/cli/main_parser.py +1 -2
  254. package/xll/python/Lib/site-packages/pip/_internal/cli/parser.py +10 -2
  255. package/xll/python/Lib/site-packages/pip/_internal/cli/progress_bars.py +2 -2
  256. package/xll/python/Lib/site-packages/pip/_internal/cli/req_command.py +57 -25
  257. package/xll/python/Lib/site-packages/pip/_internal/cli/status_codes.py +1 -0
  258. package/xll/python/Lib/site-packages/pip/_internal/commands/cache.py +7 -6
  259. package/xll/python/Lib/site-packages/pip/_internal/commands/configuration.py +2 -1
  260. package/xll/python/Lib/site-packages/pip/_internal/commands/debug.py +4 -5
  261. package/xll/python/Lib/site-packages/pip/_internal/commands/download.py +4 -0
  262. package/xll/python/Lib/site-packages/pip/_internal/commands/freeze.py +1 -1
  263. package/xll/python/Lib/site-packages/pip/_internal/commands/index.py +10 -3
  264. package/xll/python/Lib/site-packages/pip/_internal/commands/inspect.py +1 -1
  265. package/xll/python/Lib/site-packages/pip/_internal/commands/install.py +6 -6
  266. package/xll/python/Lib/site-packages/pip/_internal/commands/list.py +11 -6
  267. package/xll/python/Lib/site-packages/pip/_internal/commands/lock.py +4 -6
  268. package/xll/python/Lib/site-packages/pip/_internal/commands/show.py +14 -8
  269. package/xll/python/Lib/site-packages/pip/_internal/commands/wheel.py +7 -1
  270. package/xll/python/Lib/site-packages/pip/_internal/configuration.py +2 -3
  271. package/xll/python/Lib/site-packages/pip/_internal/distributions/base.py +5 -3
  272. package/xll/python/Lib/site-packages/pip/_internal/distributions/installed.py +3 -2
  273. package/xll/python/Lib/site-packages/pip/_internal/distributions/sdist.py +45 -20
  274. package/xll/python/Lib/site-packages/pip/_internal/distributions/wheel.py +3 -2
  275. package/xll/python/Lib/site-packages/pip/_internal/exceptions.py +174 -0
  276. package/xll/python/Lib/site-packages/pip/_internal/index/collector.py +70 -48
  277. package/xll/python/Lib/site-packages/pip/_internal/index/package_finder.py +46 -7
  278. package/xll/python/Lib/site-packages/pip/_internal/index/sources.py +1 -2
  279. package/xll/python/Lib/site-packages/pip/_internal/locations/_sysconfig.py +1 -1
  280. package/xll/python/Lib/site-packages/pip/_internal/locations/base.py +1 -1
  281. package/xll/python/Lib/site-packages/pip/_internal/metadata/base.py +10 -5
  282. package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +1 -1
  283. package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +8 -3
  284. package/xll/python/Lib/site-packages/pip/_internal/models/candidate.py +5 -1
  285. package/xll/python/Lib/site-packages/pip/_internal/models/link.py +53 -13
  286. package/xll/python/Lib/site-packages/pip/_internal/network/auth.py +38 -21
  287. package/xll/python/Lib/site-packages/pip/_internal/network/cache.py +2 -2
  288. package/xll/python/Lib/site-packages/pip/_internal/network/download.py +58 -11
  289. package/xll/python/Lib/site-packages/pip/_internal/network/session.py +35 -40
  290. package/xll/python/Lib/site-packages/pip/_internal/network/utils.py +109 -1
  291. package/xll/python/Lib/site-packages/pip/_internal/operations/check.py +2 -3
  292. package/xll/python/Lib/site-packages/pip/_internal/operations/install/wheel.py +23 -18
  293. package/xll/python/Lib/site-packages/pip/_internal/operations/prepare.py +152 -7
  294. package/xll/python/Lib/site-packages/pip/_internal/req/__init__.py +2 -0
  295. package/xll/python/Lib/site-packages/pip/_internal/req/constructors.py +54 -69
  296. package/xll/python/Lib/site-packages/pip/_internal/req/req_file.py +6 -6
  297. package/xll/python/Lib/site-packages/pip/_internal/req/req_install.py +25 -21
  298. package/xll/python/Lib/site-packages/pip/_internal/req/req_uninstall.py +13 -8
  299. package/xll/python/Lib/site-packages/pip/_internal/resolution/base.py +2 -2
  300. package/xll/python/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +2 -2
  301. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +1 -1
  302. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -1
  303. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +39 -52
  304. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +3 -3
  305. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +3 -0
  306. package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +9 -0
  307. package/xll/python/Lib/site-packages/pip/_internal/utils/compat.py +15 -9
  308. package/xll/python/Lib/site-packages/pip/_internal/utils/deprecation.py +6 -1
  309. package/xll/python/Lib/site-packages/pip/_internal/utils/filesystem.py +2 -2
  310. package/xll/python/Lib/site-packages/pip/_internal/utils/logging.py +11 -3
  311. package/xll/python/Lib/site-packages/pip/_internal/utils/misc.py +48 -4
  312. package/xll/python/Lib/site-packages/pip/_internal/utils/pylock.py +18 -2
  313. package/xll/python/Lib/site-packages/pip/_internal/utils/retry.py +2 -1
  314. package/xll/python/Lib/site-packages/pip/_internal/utils/subprocess.py +4 -3
  315. package/xll/python/Lib/site-packages/pip/_internal/utils/temp_dir.py +1 -2
  316. package/xll/python/Lib/site-packages/pip/_internal/utils/unpacking.py +30 -4
  317. package/xll/python/Lib/site-packages/pip/_internal/utils/urls.py +5 -2
  318. package/xll/python/Lib/site-packages/pip/_internal/utils/virtualenv.py +2 -36
  319. package/xll/python/Lib/site-packages/pip/_internal/vcs/git.py +8 -5
  320. package/xll/python/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +1 -2
  321. package/xll/python/Lib/site-packages/pip/_internal/wheel_builder.py +5 -1
  322. package/xll/python/Lib/site-packages/pip/_vendor/bom.cdx.json +231 -0
  323. package/xll/python/Lib/site-packages/pip/_vendor/certifi/__init__.py +1 -1
  324. package/xll/python/Lib/site-packages/pip/_vendor/certifi/cacert.pem +0 -631
  325. package/xll/python/Lib/site-packages/pip/_vendor/distlib/__init__.py +1 -1
  326. package/xll/python/Lib/site-packages/pip/_vendor/distlib/compat.py +34 -64
  327. package/xll/python/Lib/site-packages/pip/_vendor/distlib/resources.py +28 -14
  328. package/xll/python/Lib/site-packages/pip/_vendor/distlib/scripts.py +7 -3
  329. package/xll/python/Lib/site-packages/pip/_vendor/distlib/util.py +48 -11
  330. package/xll/python/Lib/site-packages/pip/_vendor/idna/LICENSE.md +1 -1
  331. package/xll/python/Lib/site-packages/pip/_vendor/idna/__main__.py +6 -0
  332. package/xll/python/Lib/site-packages/pip/_vendor/idna/cli.py +128 -0
  333. package/xll/python/Lib/site-packages/pip/_vendor/idna/codec.py +50 -13
  334. package/xll/python/Lib/site-packages/pip/_vendor/idna/compat.py +26 -0
  335. package/xll/python/Lib/site-packages/pip/_vendor/idna/core.py +352 -141
  336. package/xll/python/Lib/site-packages/pip/_vendor/idna/idnadata.py +571 -2983
  337. package/xll/python/Lib/site-packages/pip/_vendor/idna/intranges.py +5 -7
  338. package/xll/python/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -1
  339. package/xll/python/Lib/site-packages/pip/_vendor/idna/uts46data.py +16887 -8832
  340. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +352 -66
  341. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +11 -0
  342. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
  343. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/android.py +92 -41
  344. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/api.py +213 -49
  345. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/macos.py +128 -51
  346. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/unix.py +176 -127
  347. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/version.py +8 -18
  348. package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/windows.py +185 -68
  349. package/xll/python/Lib/site-packages/pip/_vendor/pygments/__init__.py +2 -2
  350. package/xll/python/Lib/site-packages/pip/_vendor/pygments/__main__.py +1 -1
  351. package/xll/python/Lib/site-packages/pip/_vendor/pygments/console.py +1 -1
  352. package/xll/python/Lib/site-packages/pip/_vendor/pygments/filter.py +1 -1
  353. package/xll/python/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +10 -8
  354. package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatter.py +1 -1
  355. package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +1 -1
  356. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexer.py +7 -5
  357. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +1 -1
  358. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +9 -8
  359. package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +35 -32
  360. package/xll/python/Lib/site-packages/pip/_vendor/pygments/modeline.py +1 -1
  361. package/xll/python/Lib/site-packages/pip/_vendor/pygments/plugin.py +3 -1
  362. package/xll/python/Lib/site-packages/pip/_vendor/pygments/regexopt.py +13 -2
  363. package/xll/python/Lib/site-packages/pip/_vendor/pygments/scanner.py +1 -1
  364. package/xll/python/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +1 -1
  365. package/xll/python/Lib/site-packages/pip/_vendor/pygments/style.py +1 -1
  366. package/xll/python/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +1 -1
  367. package/xll/python/Lib/site-packages/pip/_vendor/pygments/token.py +1 -1
  368. package/xll/python/Lib/site-packages/pip/_vendor/pygments/unistring.py +1 -1
  369. package/xll/python/Lib/site-packages/pip/_vendor/pygments/util.py +2 -2
  370. package/xll/python/Lib/site-packages/pip/_vendor/requests/__init__.py +52 -16
  371. package/xll/python/Lib/site-packages/pip/_vendor/requests/__version__.py +2 -2
  372. package/xll/python/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +2 -2
  373. package/xll/python/Lib/site-packages/pip/_vendor/requests/_types.py +183 -0
  374. package/xll/python/Lib/site-packages/pip/_vendor/requests/adapters.py +101 -50
  375. package/xll/python/Lib/site-packages/pip/_vendor/requests/api.py +31 -8
  376. package/xll/python/Lib/site-packages/pip/_vendor/requests/auth.py +80 -40
  377. package/xll/python/Lib/site-packages/pip/_vendor/requests/compat.py +9 -3
  378. package/xll/python/Lib/site-packages/pip/_vendor/requests/cookies.py +143 -79
  379. package/xll/python/Lib/site-packages/pip/_vendor/requests/exceptions.py +15 -5
  380. package/xll/python/Lib/site-packages/pip/_vendor/requests/help.py +13 -10
  381. package/xll/python/Lib/site-packages/pip/_vendor/requests/hooks.py +23 -9
  382. package/xll/python/Lib/site-packages/pip/_vendor/requests/models.py +265 -126
  383. package/xll/python/Lib/site-packages/pip/_vendor/requests/py.typed +0 -0
  384. package/xll/python/Lib/site-packages/pip/_vendor/requests/sessions.py +164 -78
  385. package/xll/python/Lib/site-packages/pip/_vendor/requests/status_codes.py +2 -2
  386. package/xll/python/Lib/site-packages/pip/_vendor/requests/structures.py +51 -20
  387. package/xll/python/Lib/site-packages/pip/_vendor/requests/utils.py +161 -89
  388. package/xll/python/Lib/site-packages/pip/_vendor/tomli/__init__.py +1 -1
  389. package/xll/python/Lib/site-packages/pip/_vendor/tomli/_parser.py +9 -4
  390. package/xll/python/Lib/site-packages/pip/_vendor/tomli/_re.py +13 -9
  391. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py +3 -1
  392. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -1
  393. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_version.py +8 -18
  394. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connection.py +4 -4
  395. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +23 -10
  396. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +5 -1
  397. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +7 -8
  398. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +1 -1
  399. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +2 -2
  400. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/fields.py +14 -14
  401. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +8 -6
  402. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/response.py +35 -22
  403. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +8 -0
  404. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +11 -61
  405. package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +5 -11
  406. package/xll/python/Lib/site-packages/pip/_vendor/vendor.txt +8 -8
  407. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/METADATA +3 -2
  408. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/RECORD +208 -188
  409. package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/AUTHORS.txt +20 -0
  410. 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
  411. package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
  412. package/xll/python/Scripts/httpx.exe +0 -0
  413. package/xll/python/Scripts/idna.exe +0 -0
  414. package/xll/python/Scripts/pip.exe +0 -0
  415. package/xll/python/Scripts/pip3.13.exe +0 -0
  416. package/xll/python/Scripts/pip3.exe +0 -0
  417. package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
  418. package/xll/python/Scripts/pywin32_testall.exe +0 -0
  419. package/dist/app/collab/awareness.d.ts +0 -32
  420. package/dist/app/collab/awareness.js +0 -52
  421. package/dist/app/collab/collab-client.d.ts +0 -37
  422. package/dist/app/collab/collab-client.js +0 -208
  423. package/dist/app/collab/collab-manager.d.ts +0 -91
  424. package/dist/app/collab/collab-manager.js +0 -218
  425. package/dist/app/collab/collab-sync.d.ts +0 -62
  426. package/dist/app/collab/collab-sync.js +0 -215
  427. package/dist/app/collab/index.d.ts +0 -9
  428. package/dist/app/collab/index.js +0 -6
  429. package/dist/app/collab/super-fight.d.ts +0 -90
  430. package/dist/app/collab/super-fight.js +0 -310
  431. package/dist/app/collab/sync-bridge.d.ts +0 -35
  432. package/dist/app/collab/sync-bridge.js +0 -109
  433. package/dist/app/collab/types.d.ts +0 -75
  434. package/dist/app/collab/types.js +0 -5
  435. package/dist/embedded-agent/ai-content.d.ts +0 -52
  436. package/dist/embedded-agent/ai-content.js +0 -101
  437. package/dist/embedded-agent/host-tools/shared/llm-stream.d.ts +0 -31
  438. package/dist/embedded-agent/host-tools/shared/llm-stream.js +0 -136
  439. package/dist/embedded-agent/model-call-orchestrator.d.ts +0 -22
  440. package/dist/embedded-agent/model-call-orchestrator.js +0 -22
  441. package/dist/embedded-agent/stream-errors.d.ts +0 -10
  442. package/dist/embedded-agent/stream-errors.js +0 -73
  443. package/dist/embedded-agent/stream-message-state.d.ts +0 -14
  444. package/dist/embedded-agent/stream-message-state.js +0 -271
  445. package/dist/embedded-agent/stream-sse.d.ts +0 -78
  446. package/dist/embedded-agent/stream-sse.js +0 -73
  447. package/dist/shell/approvals/task-spawn-approval.d.ts +0 -20
  448. package/dist/shell/approvals/task-spawn-approval.js +0 -93
  449. package/dist/shell/interactive/collab-command.d.ts +0 -9
  450. package/dist/shell/interactive/collab-command.js +0 -115
  451. package/dist/shell/interactive/super-fight-ui.d.ts +0 -80
  452. package/dist/shell/interactive/super-fight-ui.js +0 -484
  453. package/dist/shell/status/collab-status.d.ts +0 -18
  454. package/dist/shell/status/collab-status.js +0 -46
  455. package/xll/python/Lib/site-packages/pip/_internal/build_env.py +0 -606
  456. /package/dist/{tui → autocomplete}/skill-autocomplete.js +0 -0
  457. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/INSTALLER +0 -0
  458. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/REQUESTED +0 -0
  459. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/WHEEL +0 -0
  460. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/entry_points.txt +0 -0
  461. /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/LICENSE.txt +0 -0
  462. /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
  463. /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
  464. /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
  465. /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
  466. /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
  467. /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
  468. /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
  469. /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
  470. /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
  471. /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
  472. /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
  473. /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
  474. /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
  475. /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
  476. /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
  477. /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
  478. /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
  479. /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
  480. /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,310 +0,0 @@
1
- /**
2
- * Super Fight — Multiplayer ASCII fighting game engine.
3
- *
4
- * Headless game logic: state, physics, hit detection, sprite rendering,
5
- * frame composition, and network message encoding. Zero TUI dependencies.
6
- */
7
- // ── Constants ──────────────────────────────────────────────────────────────
8
- export const VIEWPORT_W = 80;
9
- export const VIEWPORT_H = 40;
10
- export const GROUND_Y = 34; // ground starts here (rows 34-39 are ground)
11
- export const GRAVITY = 0.8; // pixels per tick²
12
- export const JUMP_VY = -8; // initial upward velocity
13
- export const MOVE_SPEED = 2; // pixels per tick
14
- export const PUNCH_RANGE = 2;
15
- export const KICK_RANGE = 3;
16
- export const DAMAGE = 10;
17
- export const MAX_HEALTH = 100;
18
- export const RESPAWN_TIME = 3000; // ms
19
- export const TICK_MS = 66; // ~15 FPS
20
- export const SPRITE_W = 5;
21
- export const SPRITE_H = 5;
22
- export const GAME_MSG_PREFIX = '\x01GAME:';
23
- /** 8 bright ANSI colors for up to 8 players (wraps if more) */
24
- export const PLAYER_COLORS = [
25
- '\x1b[91m', // bright red
26
- '\x1b[92m', // bright green
27
- '\x1b[93m', // bright yellow
28
- '\x1b[94m', // bright blue
29
- '\x1b[95m', // bright magenta
30
- '\x1b[96m', // bright cyan
31
- '\x1b[97m', // bright white
32
- '\x1b[33m' // orange-ish (dark yellow)
33
- ];
34
- export const RESET = '\x1b[0m';
35
- export function encodeGameMsg(msg) {
36
- return GAME_MSG_PREFIX + JSON.stringify(msg);
37
- }
38
- export function decodeGameMsg(text) {
39
- if (!text.startsWith(GAME_MSG_PREFIX))
40
- return null;
41
- try {
42
- return JSON.parse(text.slice(GAME_MSG_PREFIX.length));
43
- }
44
- catch {
45
- return null;
46
- }
47
- }
48
- // ── Player Factory ─────────────────────────────────────────────────────────
49
- export function createPlayer(displayName, colorIndex, x) {
50
- return {
51
- x: x ?? Math.floor(Math.random() * (VIEWPORT_W - SPRITE_W * 2)) + SPRITE_W,
52
- y: GROUND_Y - SPRITE_H,
53
- vy: 0,
54
- action: 'idle',
55
- facing: 'right',
56
- health: MAX_HEALTH,
57
- kills: 0,
58
- respawnTimer: 0,
59
- color: PLAYER_COLORS[colorIndex % PLAYER_COLORS.length],
60
- displayName,
61
- actionTimer: 0
62
- };
63
- }
64
- // ── Sprites ────────────────────────────────────────────────────────────────
65
- /**
66
- * Returns a 5-line array of the ASCII fighter sprite for the given pose.
67
- * All sprites are exactly SPRITE_W (5) chars wide.
68
- * `facing` flips the sprite horizontally.
69
- */
70
- export function renderSprite(action, facing) {
71
- let lines;
72
- switch (action) {
73
- case 'idle':
74
- lines = [' O ', ' /|\\ ', ' | ', ' / \\ ', '/ \\'];
75
- break;
76
- case 'walk-left':
77
- case 'walk-right':
78
- lines = [' O ', ' /|\\ ', ' | ', ' / \\ ', '| |'];
79
- break;
80
- case 'jump':
81
- lines = [' \\O/ ', ' | ', ' | ', ' / \\ ', '/ \\'];
82
- break;
83
- case 'crouch':
84
- // Crouch is only 3 lines tall, padded with empty lines at top
85
- lines = [' ', ' ', ' O ', ' /|\\ ', ' /_\\ '];
86
- break;
87
- case 'punch':
88
- lines = [' O ', ' /|--', ' | ', ' / \\ ', '/ \\'];
89
- break;
90
- case 'kick':
91
- lines = [' O ', ' /|\\ ', ' | ', ' / _', '/ '];
92
- break;
93
- case 'hit':
94
- lines = [' O ', ' | ', ' /|\\ ', ' | ', ' / \\ '];
95
- break;
96
- case 'dead':
97
- lines = [' ', ' ', ' ', ' ', '_O/|_'];
98
- break;
99
- default:
100
- lines = [' O ', ' /|\\ ', ' | ', ' / \\ ', '/ \\'];
101
- }
102
- // Flip horizontally if facing left
103
- if (facing === 'left') {
104
- lines = lines.map((line) => line
105
- .split('')
106
- .reverse()
107
- .map((ch) => {
108
- if (ch === '/')
109
- return '\\';
110
- if (ch === '\\')
111
- return '/';
112
- if (ch === '<')
113
- return '>';
114
- if (ch === '>')
115
- return '<';
116
- return ch;
117
- })
118
- .join(''));
119
- }
120
- return lines;
121
- }
122
- // ── Frame Renderer ─────────────────────────────────────────────────────────
123
- /**
124
- * Renders a complete game frame as an array of VIEWPORT_H strings,
125
- * each exactly VIEWPORT_W chars. No ANSI colors — caller wraps with color.
126
- * Returns { lines, colors } where colors[row][col] is the ANSI color code.
127
- */
128
- export function renderFrame(state, viewportW = VIEWPORT_W, viewportH = VIEWPORT_H) {
129
- // Initialize blank frame buffer
130
- const buf = Array.from({ length: viewportH }, () => Array(viewportW).fill(' '));
131
- // Color buffer — one ANSI string per cell
132
- const colorBuf = Array.from({ length: viewportH }, () => Array(viewportW).fill(''));
133
- // Draw ground (rows GROUND_Y to viewportH-1)
134
- for (let row = GROUND_Y; row < viewportH; row++) {
135
- for (let col = 0; col < viewportW; col++) {
136
- buf[row][col] = row === GROUND_Y ? '=' : '▓';
137
- }
138
- }
139
- // Draw walls
140
- for (let row = 0; row < viewportH; row++) {
141
- buf[row][0] = '│';
142
- buf[row][viewportW - 1] = '│';
143
- }
144
- // Sort players by x so overlapping sprites have consistent z-order
145
- const players = [...state.entries()].sort((a, b) => a[1].x - b[1].x);
146
- // Draw player sprites
147
- for (const [, player] of players) {
148
- const sprite = renderSprite(player.action, player.facing);
149
- const px = Math.round(player.x);
150
- const py = Math.round(player.y);
151
- for (let sy = 0; sy < sprite.length; sy++) {
152
- const row = py + sy;
153
- if (row < 1 || row >= GROUND_Y)
154
- continue; // skip out-of-bounds and ground
155
- for (let sx = 0; sx < sprite[sy].length; sx++) {
156
- const col = px + sx;
157
- if (col < 1 || col >= viewportW - 1)
158
- continue; // skip walls
159
- const ch = sprite[sy][sx];
160
- if (ch !== ' ') {
161
- buf[row][col] = ch;
162
- colorBuf[row][col] = player.color;
163
- }
164
- }
165
- }
166
- }
167
- // Render status bar at top (row 0)
168
- let statusStr = '';
169
- for (const [, player] of players) {
170
- const healthBar = renderHealthBar(player.health);
171
- const segment = ` ${player.displayName.slice(0, 8)}:${healthBar} K:${player.kills} `;
172
- statusStr += segment;
173
- }
174
- statusStr = statusStr.slice(0, viewportW);
175
- for (let i = 0; i < statusStr.length && i < viewportW; i++) {
176
- buf[0][i] = statusStr[i];
177
- }
178
- // Compose final lines with ANSI colors
179
- const lines = [];
180
- for (let row = 0; row < viewportH; row++) {
181
- let line = '';
182
- let currentColor = '';
183
- for (let col = 0; col < viewportW; col++) {
184
- const cellColor = colorBuf[row][col];
185
- if (cellColor !== currentColor) {
186
- if (currentColor !== '')
187
- line += RESET;
188
- if (cellColor !== '')
189
- line += cellColor;
190
- currentColor = cellColor;
191
- }
192
- line += buf[row][col];
193
- }
194
- if (currentColor !== '')
195
- line += RESET;
196
- lines.push(line);
197
- }
198
- return lines;
199
- }
200
- function renderHealthBar(health) {
201
- const filled = Math.ceil((health / MAX_HEALTH) * 10);
202
- return '[' + '█'.repeat(filled) + '░'.repeat(10 - filled) + ']';
203
- }
204
- // ── Physics ────────────────────────────────────────────────────────────────
205
- /**
206
- * Update a single player's physics for one tick.
207
- * `dt` is the number of ticks elapsed (usually 1).
208
- */
209
- export function tickPlayer(player, dt = 1) {
210
- // Dead players: count down respawn
211
- if (player.action === 'dead') {
212
- player.respawnTimer -= TICK_MS * dt;
213
- if (player.respawnTimer <= 0) {
214
- player.respawnTimer = 0;
215
- player.health = MAX_HEALTH;
216
- player.action = 'idle';
217
- player.x = Math.floor(Math.random() * (VIEWPORT_W - SPRITE_W * 2)) + SPRITE_W;
218
- player.y = GROUND_Y - SPRITE_H;
219
- player.vy = 0;
220
- }
221
- return;
222
- }
223
- // Decay action timer (for punch/kick/hit animations)
224
- if (player.actionTimer > 0) {
225
- player.actionTimer -= dt;
226
- if (player.actionTimer <= 0) {
227
- player.actionTimer = 0;
228
- if (player.action === 'punch' || player.action === 'kick' || player.action === 'hit') {
229
- player.action = 'idle';
230
- }
231
- }
232
- }
233
- // Gravity
234
- const onGround = player.y >= GROUND_Y - SPRITE_H;
235
- if (!onGround) {
236
- player.vy += GRAVITY * dt;
237
- player.y += player.vy * dt;
238
- // Land on ground
239
- if (player.y >= GROUND_Y - SPRITE_H) {
240
- player.y = GROUND_Y - SPRITE_H;
241
- player.vy = 0;
242
- if (player.action === 'jump') {
243
- player.action = 'idle';
244
- }
245
- }
246
- }
247
- // Movement (only when walking)
248
- if (player.action === 'walk-left') {
249
- player.x -= MOVE_SPEED * dt;
250
- player.facing = 'left';
251
- }
252
- else if (player.action === 'walk-right') {
253
- player.x += MOVE_SPEED * dt;
254
- player.facing = 'right';
255
- }
256
- // Clamp to arena bounds (inside walls)
257
- player.x = Math.max(1, Math.min(VIEWPORT_W - SPRITE_W - 1, player.x));
258
- }
259
- // ── Hit Detection ──────────────────────────────────────────────────────────
260
- /**
261
- * Check whether `attacker` is currently hitting `target`.
262
- * Returns true if the attacker is punching/kicking and the target is in range.
263
- */
264
- export function checkHit(attacker, target) {
265
- if (attacker.action !== 'punch' && attacker.action !== 'kick')
266
- return false;
267
- if (target.action === 'dead')
268
- return false;
269
- if (attacker.actionTimer <= 0)
270
- return false; // animation expired
271
- const range = attacker.action === 'punch' ? PUNCH_RANGE : KICK_RANGE;
272
- // Center-x of each sprite
273
- const ax = attacker.x + SPRITE_W / 2;
274
- const tx = target.x + SPRITE_W / 2;
275
- const dx = tx - ax;
276
- // Check facing direction
277
- if (attacker.facing === 'right' && dx < 0)
278
- return false;
279
- if (attacker.facing === 'left' && dx > 0)
280
- return false;
281
- // Check distance (horizontal range + sprite width overlap)
282
- if (Math.abs(dx) > SPRITE_W + range)
283
- return false;
284
- // Check vertical overlap (must be roughly same height)
285
- const ay = attacker.y;
286
- const ty = target.y;
287
- if (Math.abs(ay - ty) > SPRITE_H)
288
- return false;
289
- return true;
290
- }
291
- /**
292
- * Apply damage to a target. Returns true if the hit killed them.
293
- */
294
- export function applyDamage(target, amount) {
295
- if (target.action === 'dead')
296
- return false;
297
- target.health -= amount;
298
- if (target.health <= 0) {
299
- target.health = 0;
300
- target.action = 'dead';
301
- target.respawnTimer = RESPAWN_TIME;
302
- target.vy = 0;
303
- return true;
304
- }
305
- // Hit stagger animation
306
- target.action = 'hit';
307
- target.actionTimer = 3; // 3 ticks of hit stagger
308
- return false;
309
- }
310
- //# sourceMappingURL=super-fight.js.map
@@ -1,35 +0,0 @@
1
- /**
2
- * SyncBridge — wraps a mog SDK object's internal compute bridge to
3
- * expose Yrs CRDT sync primitives as binary (Uint8Array) operations.
4
- *
5
- * This is the ONLY file that touches mog SDK internals for CRDT sync.
6
- * If the mog team later exposes a public network sync API, swap this file.
7
- *
8
- * Internal access paths (both lead to the same ComputeBridge):
9
- * HeadlessEngine → .lifecycle.computeBridge
10
- * Workbook (WorkbookImpl) → .ctx.computeBridge
11
- */
12
- export declare class SyncBridge {
13
- private bridge;
14
- /**
15
- * @param engineOrWorkbook - A mog HeadlessEngine or Workbook instance.
16
- * At runtime, both expose a compute bridge via internal properties.
17
- */
18
- constructor(engineOrWorkbook: any);
19
- /** Full Yrs document state as binary — used for initial sync to server. */
20
- getFullState(): Promise<Uint8Array>;
21
- /** Local Yrs state vector — used in state-vector exchange protocol. */
22
- getStateVector(): Promise<Uint8Array>;
23
- /** Compute diff that would bring a remote (with given state vector) up to date. */
24
- computeDiff(remoteSv: Uint8Array): Promise<Uint8Array>;
25
- /** Apply a remote Yrs update to the local engine. */
26
- applyUpdate(update: Uint8Array): Promise<void>;
27
- /**
28
- * Convert raw Yrs state bytes into a WorkbookSnapshot JSON string.
29
- * Uses the NAPI addon's `yrs_state_to_snapshot_json` function.
30
- */
31
- static snapshotFromState(state: Uint8Array): string;
32
- /** Return the native compute addon (for createHeadlessEngine's computeAddon param). */
33
- static getNativeAddon(): any;
34
- }
35
- //# sourceMappingURL=sync-bridge.d.ts.map
@@ -1,109 +0,0 @@
1
- /**
2
- * SyncBridge — wraps a mog SDK object's internal compute bridge to
3
- * expose Yrs CRDT sync primitives as binary (Uint8Array) operations.
4
- *
5
- * This is the ONLY file that touches mog SDK internals for CRDT sync.
6
- * If the mog team later exposes a public network sync API, swap this file.
7
- *
8
- * Internal access paths (both lead to the same ComputeBridge):
9
- * HeadlessEngine → .lifecycle.computeBridge
10
- * Workbook (WorkbookImpl) → .ctx.computeBridge
11
- */
12
- // ── Native addon loader ────────────────────────────────────────────────
13
- import { createRequire } from 'node:module';
14
- const PLATFORM_PACKAGES = {
15
- darwin: { arm64: '@mog-sdk/darwin-arm64', x64: '@mog-sdk/darwin-x64' },
16
- linux: { x64: '@mog-sdk/linux-x64-gnu', arm64: '@mog-sdk/linux-arm64-gnu' },
17
- win32: { x64: '@mog-sdk/win32-x64-msvc' }
18
- };
19
- let _cachedAddon;
20
- /**
21
- * Load the platform-native compute addon.
22
- * Same resolution as @mog-sdk/sdk's internal tryLoadNapiAddon.
23
- *
24
- * Uses createRequire anchored to @mog-sdk/sdk's package location so
25
- * pnpm's symlinked node_modules resolves the platform package correctly.
26
- */
27
- function loadNativeAddon() {
28
- if (_cachedAddon)
29
- return _cachedAddon;
30
- // Resolve the SDK's main entry, then create require from its directory.
31
- // This ensures pnpm's symlinked deps (@mog-sdk/darwin-arm64 etc.) are findable.
32
- const req = createRequire(import.meta.url);
33
- const sdkEntry = req.resolve('@mog-sdk/sdk');
34
- const sdkReq = createRequire(sdkEntry);
35
- const pkg = PLATFORM_PACKAGES[process.platform]?.[process.arch];
36
- if (!pkg)
37
- throw new Error(`Unsupported platform: ${process.platform}/${process.arch}`);
38
- _cachedAddon = sdkReq(pkg);
39
- return _cachedAddon;
40
- }
41
- /**
42
- * Try to extract the compute bridge from various mog SDK object types.
43
- * Returns null if the object doesn't expose a compute bridge.
44
- */
45
- function extractComputeBridge(obj) {
46
- // Path 1: HeadlessEngine → .lifecycle.computeBridge
47
- const fromEngine = obj?.lifecycle?.computeBridge;
48
- if (fromEngine && typeof fromEngine.syncStateVector === 'function') {
49
- return fromEngine;
50
- }
51
- // Path 2: Workbook (WorkbookImpl) → .ctx.computeBridge
52
- const fromWorkbook = obj?.ctx?.computeBridge;
53
- if (fromWorkbook && typeof fromWorkbook.syncStateVector === 'function') {
54
- return fromWorkbook;
55
- }
56
- return null;
57
- }
58
- // ── SyncBridge ─────────────────────────────────────────────────────────
59
- export class SyncBridge {
60
- bridge;
61
- /**
62
- * @param engineOrWorkbook - A mog HeadlessEngine or Workbook instance.
63
- * At runtime, both expose a compute bridge via internal properties.
64
- */
65
- constructor(engineOrWorkbook) {
66
- const bridge = extractComputeBridge(engineOrWorkbook);
67
- if (!bridge) {
68
- throw new Error('SyncBridge: object does not expose a compute bridge with sync methods');
69
- }
70
- this.bridge = bridge;
71
- }
72
- /** Full Yrs document state as binary — used for initial sync to server. */
73
- async getFullState() {
74
- const nums = await this.bridge.core.syncFullState();
75
- return new Uint8Array(nums);
76
- }
77
- /** Local Yrs state vector — used in state-vector exchange protocol. */
78
- async getStateVector() {
79
- const nums = await this.bridge.syncStateVector();
80
- return new Uint8Array(nums);
81
- }
82
- /** Compute diff that would bring a remote (with given state vector) up to date. */
83
- async computeDiff(remoteSv) {
84
- const nums = await this.bridge.syncDiff(Array.from(remoteSv));
85
- return new Uint8Array(nums);
86
- }
87
- /** Apply a remote Yrs update to the local engine. */
88
- async applyUpdate(update) {
89
- await this.bridge.syncApply(Array.from(update));
90
- }
91
- // ── Static helpers ───────────────────────────────────────────────────
92
- /**
93
- * Convert raw Yrs state bytes into a WorkbookSnapshot JSON string.
94
- * Uses the NAPI addon's `yrs_state_to_snapshot_json` function.
95
- */
96
- static snapshotFromState(state) {
97
- const addon = loadNativeAddon();
98
- const fn = addon.yrs_state_to_snapshot_json;
99
- if (typeof fn !== 'function') {
100
- throw new Error('SyncBridge: yrs_state_to_snapshot_json not found on NAPI addon');
101
- }
102
- return fn(Buffer.from(state));
103
- }
104
- /** Return the native compute addon (for createHeadlessEngine's computeAddon param). */
105
- static getNativeAddon() {
106
- return loadNativeAddon();
107
- }
108
- }
109
- //# sourceMappingURL=sync-bridge.js.map
@@ -1,75 +0,0 @@
1
- /**
2
- * Shared types for the real-time collaboration system.
3
- */
4
- export interface PeerInfo {
5
- peerId: string;
6
- displayName: string;
7
- sheets?: SheetInfo[];
8
- }
9
- export interface SheetInfo {
10
- id: string;
11
- name: string;
12
- usedRange: string | null;
13
- cellCount: number;
14
- }
15
- export interface CollabState {
16
- roomId: string | null;
17
- peerId: string | null;
18
- peers: Map<string, PeerInfo>;
19
- connected: boolean;
20
- }
21
- export type ClientMessage = {
22
- type: 'create';
23
- } | {
24
- type: 'join';
25
- roomId: string;
26
- displayName: string;
27
- } | {
28
- type: 'chat';
29
- text: string;
30
- } | {
31
- type: 'awareness';
32
- sheets: SheetInfo[];
33
- } | {
34
- type: 'leave';
35
- };
36
- export type ServerMessage = {
37
- type: 'room_created';
38
- roomId: string;
39
- } | {
40
- type: 'joined';
41
- roomId: string;
42
- peerId: string;
43
- peers: PeerInfo[];
44
- docIds?: string[];
45
- } | {
46
- type: 'peer_joined';
47
- peerId: string;
48
- displayName: string;
49
- } | {
50
- type: 'peer_left';
51
- peerId: string;
52
- } | {
53
- type: 'chat';
54
- peerId: string;
55
- displayName: string;
56
- text: string;
57
- } | {
58
- type: 'awareness';
59
- peerId: string;
60
- displayName: string;
61
- sheets: SheetInfo[];
62
- } | {
63
- type: 'error';
64
- message: string;
65
- };
66
- export interface CollabCallbacks {
67
- onPeerJoined?: (peer: PeerInfo) => void;
68
- onPeerLeft?: (peerId: string, displayName?: string) => void;
69
- onChat?: (peerId: string, displayName: string, text: string) => void;
70
- onAwareness?: (peerId: string, displayName: string, sheets: SheetInfo[]) => void;
71
- onSyncData?: (docId: string, data: Uint8Array) => void;
72
- onDisconnect?: () => void;
73
- onError?: (message: string) => void;
74
- }
75
- //# sourceMappingURL=types.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Shared types for the real-time collaboration system.
3
- */
4
- export {};
5
- //# sourceMappingURL=types.js.map
@@ -1,52 +0,0 @@
1
- import type { DocumentContent, ImageContent, TextContent, ToolCall } from '../ai/types.js';
2
- import type { ShortcutXLModelInvokePayload } from '../contracts/model-call.js';
3
- /**
4
- * Shortcut document-content helpers.
5
- *
6
- * There are two distinct wire contracts in play:
7
- * - Private gateway: owned AI content is serialized directly to provider APIs
8
- * (Anthropic Messages or OpenAI Responses).
9
- * - Normal Shortcut proxy invoke/helper calls: owned AI content is converted back to
10
- * the multimodal block shapes accepted by the Shortcut invoke proxy and by
11
- * helper LLM stream calls (sandbox_llm/screenshot).
12
- *
13
- * The normal Shortcut proxy is not one universal provider format. Claude/Haiku
14
- * gets Anthropic-native base64 blocks; Gemini/non-Anthropic gets the existing
15
- * LangChain multimodal shape (`image_url` for images, `media` for PDFs).
16
- */
17
- export type ShortcutXLUserContent = TextContent | ImageContent | DocumentContent;
18
- export declare function aiContentToShortcutProxyContent(content: string | readonly (ShortcutXLUserContent | ToolCall)[], model: string): ShortcutXLModelInvokePayload['messages'][number]['content'];
19
- export declare function aiUserContentToAnthropicContent(content: string | readonly ShortcutXLUserContent[], modelInput: readonly string[]): string | ({
20
- readonly text: string;
21
- readonly type: "text";
22
- } | {
23
- readonly source: {
24
- readonly data: string;
25
- readonly media_type: string;
26
- readonly type: "base64";
27
- };
28
- readonly type: "document" | "image";
29
- })[];
30
- export declare function aiUserContentToOpenAIResponsesContent(content: string | readonly ShortcutXLUserContent[]): ({
31
- text: string;
32
- type: string;
33
- detail?: undefined;
34
- image_url?: undefined;
35
- file_data?: undefined;
36
- filename?: undefined;
37
- } | {
38
- detail: string;
39
- image_url: string;
40
- type: string;
41
- text?: undefined;
42
- file_data?: undefined;
43
- filename?: undefined;
44
- } | {
45
- file_data: string;
46
- filename: string;
47
- type: string;
48
- text?: undefined;
49
- detail?: undefined;
50
- image_url?: undefined;
51
- })[];
52
- //# sourceMappingURL=ai-content.d.ts.map
@@ -1,101 +0,0 @@
1
- function isAnthropicLikeModel(model) {
2
- const normalized = model.toLowerCase();
3
- return normalized.includes('claude') || normalized.includes('haiku');
4
- }
5
- function imageToShortcutProxyMultimodalBlock(block, model) {
6
- if (isAnthropicLikeModel(model)) {
7
- return {
8
- source: {
9
- data: block.data,
10
- media_type: block.mimeType,
11
- type: 'base64'
12
- },
13
- type: 'image'
14
- };
15
- }
16
- // Normal Shortcut proxy non-Anthropic path: this is the existing LangChain
17
- // multimodal image block consumed by Shortcut invoke and helper LLM stream
18
- // calls.
19
- return {
20
- image_url: { url: `data:${block.mimeType};base64,${block.data}` },
21
- type: 'image_url'
22
- };
23
- }
24
- function documentToShortcutProxyMultimodalBlock(block, model) {
25
- if (isAnthropicLikeModel(model)) {
26
- return {
27
- source: {
28
- data: block.data,
29
- media_type: block.mimeType,
30
- type: 'base64'
31
- },
32
- type: 'document'
33
- };
34
- }
35
- // Normal Shortcut proxy non-Anthropic path: LangChain multimodal `media`
36
- // block for Gemini PDF input. This is not OpenAI Responses `input_file`.
37
- return {
38
- data: block.data,
39
- mime_type: block.mimeType,
40
- type: 'media'
41
- };
42
- }
43
- export function aiContentToShortcutProxyContent(content, model) {
44
- if (typeof content === 'string')
45
- return content;
46
- return content
47
- .filter((block) => block.type === 'text' || block.type === 'image' || block.type === 'document')
48
- .map((block) => block.type === 'text'
49
- ? { text: block.text, type: 'text' }
50
- : block.type === 'image'
51
- ? imageToShortcutProxyMultimodalBlock(block, model)
52
- : documentToShortcutProxyMultimodalBlock(block, model));
53
- }
54
- export function aiUserContentToAnthropicContent(content, modelInput) {
55
- if (typeof content === 'string')
56
- return content;
57
- const blocks = content.map((block) => {
58
- if (block.type === 'text') {
59
- return { text: block.text, type: 'text' };
60
- }
61
- return {
62
- source: {
63
- data: block.data,
64
- media_type: block.mimeType,
65
- type: 'base64'
66
- },
67
- type: block.type
68
- };
69
- });
70
- const filteredBlocks = modelInput.includes('image')
71
- ? blocks
72
- : blocks.filter((block) => block.type !== 'image');
73
- return filteredBlocks.filter((block) => {
74
- if (block.type === 'text')
75
- return block.text.trim().length > 0;
76
- return true;
77
- });
78
- }
79
- export function aiUserContentToOpenAIResponsesContent(content) {
80
- if (typeof content === 'string')
81
- return [{ text: content, type: 'input_text' }];
82
- return content.map((block) => {
83
- if (block.type === 'text') {
84
- return { text: block.text, type: 'input_text' };
85
- }
86
- if (block.type === 'image') {
87
- return {
88
- detail: 'auto',
89
- image_url: `data:${block.mimeType};base64,${block.data}`,
90
- type: 'input_image'
91
- };
92
- }
93
- // OpenAI Responses accepts PDFs as input_file data URLs.
94
- return {
95
- file_data: `data:${block.mimeType};base64,${block.data}`,
96
- filename: block.filename ?? 'document.pdf',
97
- type: 'input_file'
98
- };
99
- });
100
- }
101
- //# sourceMappingURL=ai-content.js.map