@juspay/shooter 1.0.0

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 (327) hide show
  1. package/.claude/hooks/notifier.cjs +1431 -0
  2. package/.claude/settings.json +162 -0
  3. package/README.md +515 -0
  4. package/bin/shooter.cjs +141 -0
  5. package/build/client/_app/immutable/assets/0.CM9Hl6d-.css +1 -0
  6. package/build/client/_app/immutable/assets/0.CM9Hl6d-.css.br +0 -0
  7. package/build/client/_app/immutable/assets/0.CM9Hl6d-.css.gz +0 -0
  8. package/build/client/_app/immutable/assets/2.CAShZ7lQ.css +1 -0
  9. package/build/client/_app/immutable/assets/2.CAShZ7lQ.css.br +1 -0
  10. package/build/client/_app/immutable/assets/2.CAShZ7lQ.css.gz +0 -0
  11. package/build/client/_app/immutable/assets/3.C0uFg0IS.css +1 -0
  12. package/build/client/_app/immutable/assets/3.C0uFg0IS.css.br +0 -0
  13. package/build/client/_app/immutable/assets/3.C0uFg0IS.css.gz +0 -0
  14. package/build/client/_app/immutable/assets/4.cJuCkJKZ.css +1 -0
  15. package/build/client/_app/immutable/assets/4.cJuCkJKZ.css.br +0 -0
  16. package/build/client/_app/immutable/assets/4.cJuCkJKZ.css.gz +0 -0
  17. package/build/client/_app/immutable/assets/5.DRjApZQW.css +1 -0
  18. package/build/client/_app/immutable/assets/5.DRjApZQW.css.br +0 -0
  19. package/build/client/_app/immutable/assets/5.DRjApZQW.css.gz +0 -0
  20. package/build/client/_app/immutable/assets/6.AraZrY8I.css +1 -0
  21. package/build/client/_app/immutable/assets/6.AraZrY8I.css.br +0 -0
  22. package/build/client/_app/immutable/assets/6.AraZrY8I.css.gz +0 -0
  23. package/build/client/_app/immutable/assets/7.BCJ1IuMx.css +1 -0
  24. package/build/client/_app/immutable/assets/7.BCJ1IuMx.css.br +0 -0
  25. package/build/client/_app/immutable/assets/7.BCJ1IuMx.css.gz +0 -0
  26. package/build/client/_app/immutable/assets/ChatView.CsdBAOKx.css +1 -0
  27. package/build/client/_app/immutable/assets/ChatView.CsdBAOKx.css.br +0 -0
  28. package/build/client/_app/immutable/assets/ChatView.CsdBAOKx.css.gz +0 -0
  29. package/build/client/_app/immutable/assets/markdown.B0b5w2tq.css +1 -0
  30. package/build/client/_app/immutable/assets/markdown.B0b5w2tq.css.br +0 -0
  31. package/build/client/_app/immutable/assets/markdown.B0b5w2tq.css.gz +0 -0
  32. package/build/client/_app/immutable/assets/xterm.DFuMZ0ql.css +1 -0
  33. package/build/client/_app/immutable/assets/xterm.DFuMZ0ql.css.br +0 -0
  34. package/build/client/_app/immutable/assets/xterm.DFuMZ0ql.css.gz +0 -0
  35. package/build/client/_app/immutable/chunks/BNJphC1q.js +56 -0
  36. package/build/client/_app/immutable/chunks/BNJphC1q.js.br +0 -0
  37. package/build/client/_app/immutable/chunks/BNJphC1q.js.gz +0 -0
  38. package/build/client/_app/immutable/chunks/BTGVxaYV.js +9 -0
  39. package/build/client/_app/immutable/chunks/BTGVxaYV.js.br +0 -0
  40. package/build/client/_app/immutable/chunks/BTGVxaYV.js.gz +0 -0
  41. package/build/client/_app/immutable/chunks/BlxrFPDK.js +1 -0
  42. package/build/client/_app/immutable/chunks/BlxrFPDK.js.br +0 -0
  43. package/build/client/_app/immutable/chunks/BlxrFPDK.js.gz +0 -0
  44. package/build/client/_app/immutable/chunks/Bvk7mfPM.js +1 -0
  45. package/build/client/_app/immutable/chunks/Bvk7mfPM.js.br +0 -0
  46. package/build/client/_app/immutable/chunks/Bvk7mfPM.js.gz +0 -0
  47. package/build/client/_app/immutable/chunks/CAokzuPQ.js +1 -0
  48. package/build/client/_app/immutable/chunks/CAokzuPQ.js.br +0 -0
  49. package/build/client/_app/immutable/chunks/CAokzuPQ.js.gz +0 -0
  50. package/build/client/_app/immutable/chunks/CGLrx-H5.js +1 -0
  51. package/build/client/_app/immutable/chunks/CGLrx-H5.js.br +0 -0
  52. package/build/client/_app/immutable/chunks/CGLrx-H5.js.gz +0 -0
  53. package/build/client/_app/immutable/chunks/CgCpWzEA.js +1 -0
  54. package/build/client/_app/immutable/chunks/CgCpWzEA.js.br +0 -0
  55. package/build/client/_app/immutable/chunks/CgCpWzEA.js.gz +0 -0
  56. package/build/client/_app/immutable/chunks/Cjwk_cGO.js +6 -0
  57. package/build/client/_app/immutable/chunks/Cjwk_cGO.js.br +0 -0
  58. package/build/client/_app/immutable/chunks/Cjwk_cGO.js.gz +0 -0
  59. package/build/client/_app/immutable/chunks/CtQ8EED1.js +11 -0
  60. package/build/client/_app/immutable/chunks/CtQ8EED1.js.br +0 -0
  61. package/build/client/_app/immutable/chunks/CtQ8EED1.js.gz +0 -0
  62. package/build/client/_app/immutable/chunks/DERQCisl.js +1 -0
  63. package/build/client/_app/immutable/chunks/DERQCisl.js.br +0 -0
  64. package/build/client/_app/immutable/chunks/DERQCisl.js.gz +0 -0
  65. package/build/client/_app/immutable/chunks/DKrg8TQs.js +1 -0
  66. package/build/client/_app/immutable/chunks/DKrg8TQs.js.br +0 -0
  67. package/build/client/_app/immutable/chunks/DKrg8TQs.js.gz +0 -0
  68. package/build/client/_app/immutable/chunks/DLu6yJIZ.js +1 -0
  69. package/build/client/_app/immutable/chunks/DLu6yJIZ.js.br +0 -0
  70. package/build/client/_app/immutable/chunks/DLu6yJIZ.js.gz +0 -0
  71. package/build/client/_app/immutable/chunks/Dkkpz_4D.js +126 -0
  72. package/build/client/_app/immutable/chunks/Dkkpz_4D.js.br +0 -0
  73. package/build/client/_app/immutable/chunks/Dkkpz_4D.js.gz +0 -0
  74. package/build/client/_app/immutable/chunks/DoczjQhA.js +1 -0
  75. package/build/client/_app/immutable/chunks/DoczjQhA.js.br +0 -0
  76. package/build/client/_app/immutable/chunks/DoczjQhA.js.gz +0 -0
  77. package/build/client/_app/immutable/chunks/PPVm8Dsz.js +1 -0
  78. package/build/client/_app/immutable/chunks/PPVm8Dsz.js.br +0 -0
  79. package/build/client/_app/immutable/chunks/PPVm8Dsz.js.gz +0 -0
  80. package/build/client/_app/immutable/chunks/RpcNruLP.js +2 -0
  81. package/build/client/_app/immutable/chunks/RpcNruLP.js.br +0 -0
  82. package/build/client/_app/immutable/chunks/RpcNruLP.js.gz +0 -0
  83. package/build/client/_app/immutable/chunks/a-St0Zwo.js +1 -0
  84. package/build/client/_app/immutable/chunks/a-St0Zwo.js.br +0 -0
  85. package/build/client/_app/immutable/chunks/a-St0Zwo.js.gz +0 -0
  86. package/build/client/_app/immutable/chunks/bo70OQUZ.js +1 -0
  87. package/build/client/_app/immutable/chunks/bo70OQUZ.js.br +0 -0
  88. package/build/client/_app/immutable/chunks/bo70OQUZ.js.gz +0 -0
  89. package/build/client/_app/immutable/entry/app.QvGgdvTI.js +2 -0
  90. package/build/client/_app/immutable/entry/app.QvGgdvTI.js.br +0 -0
  91. package/build/client/_app/immutable/entry/app.QvGgdvTI.js.gz +0 -0
  92. package/build/client/_app/immutable/entry/start.BntDNRMC.js +1 -0
  93. package/build/client/_app/immutable/entry/start.BntDNRMC.js.br +0 -0
  94. package/build/client/_app/immutable/entry/start.BntDNRMC.js.gz +0 -0
  95. package/build/client/_app/immutable/nodes/0.CzkdvJ7j.js +1 -0
  96. package/build/client/_app/immutable/nodes/0.CzkdvJ7j.js.br +0 -0
  97. package/build/client/_app/immutable/nodes/0.CzkdvJ7j.js.gz +0 -0
  98. package/build/client/_app/immutable/nodes/1.MG1QhfrI.js +1 -0
  99. package/build/client/_app/immutable/nodes/1.MG1QhfrI.js.br +0 -0
  100. package/build/client/_app/immutable/nodes/1.MG1QhfrI.js.gz +0 -0
  101. package/build/client/_app/immutable/nodes/2.B4MlOSh6.js +1 -0
  102. package/build/client/_app/immutable/nodes/2.B4MlOSh6.js.br +0 -0
  103. package/build/client/_app/immutable/nodes/2.B4MlOSh6.js.gz +0 -0
  104. package/build/client/_app/immutable/nodes/3.DIwYkjDn.js +3 -0
  105. package/build/client/_app/immutable/nodes/3.DIwYkjDn.js.br +0 -0
  106. package/build/client/_app/immutable/nodes/3.DIwYkjDn.js.gz +0 -0
  107. package/build/client/_app/immutable/nodes/4.D-cIe70D.js +1 -0
  108. package/build/client/_app/immutable/nodes/4.D-cIe70D.js.br +0 -0
  109. package/build/client/_app/immutable/nodes/4.D-cIe70D.js.gz +0 -0
  110. package/build/client/_app/immutable/nodes/5.D7zPRe3L.js +1 -0
  111. package/build/client/_app/immutable/nodes/5.D7zPRe3L.js.br +0 -0
  112. package/build/client/_app/immutable/nodes/5.D7zPRe3L.js.gz +0 -0
  113. package/build/client/_app/immutable/nodes/6.BB7QE48r.js +2 -0
  114. package/build/client/_app/immutable/nodes/6.BB7QE48r.js.br +0 -0
  115. package/build/client/_app/immutable/nodes/6.BB7QE48r.js.gz +0 -0
  116. package/build/client/_app/immutable/nodes/7.D8mqsrZG.js +2 -0
  117. package/build/client/_app/immutable/nodes/7.D8mqsrZG.js.br +0 -0
  118. package/build/client/_app/immutable/nodes/7.D8mqsrZG.js.gz +0 -0
  119. package/build/client/_app/version.json +1 -0
  120. package/build/client/_app/version.json.br +0 -0
  121. package/build/client/_app/version.json.gz +0 -0
  122. package/build/client/app-icon.png +0 -0
  123. package/build/client/apple-touch-icon.png +0 -0
  124. package/build/client/favicon.png +0 -0
  125. package/build/client/favicon.svg +10 -0
  126. package/build/client/favicon.svg.br +0 -0
  127. package/build/client/favicon.svg.gz +0 -0
  128. package/build/client/manifest.webmanifest +1 -0
  129. package/build/client/pwa-192x192.png +0 -0
  130. package/build/client/pwa-512x512.png +0 -0
  131. package/build/client/registerSW.js +1 -0
  132. package/build/client/registerSW.js.br +0 -0
  133. package/build/client/registerSW.js.gz +0 -0
  134. package/build/client/sw.js +222 -0
  135. package/build/client/sw.js.br +0 -0
  136. package/build/client/sw.js.gz +0 -0
  137. package/build/client/workbox-5119daf5.js +3395 -0
  138. package/build/client/workbox-5119daf5.js.br +0 -0
  139. package/build/client/workbox-5119daf5.js.gz +0 -0
  140. package/build/env.js +94 -0
  141. package/build/handler.js +1494 -0
  142. package/build/index.js +345 -0
  143. package/build/pty-holder.cjs +510 -0
  144. package/build/server/chunks/0-q2IUp76Y.js +9 -0
  145. package/build/server/chunks/0-q2IUp76Y.js.map +1 -0
  146. package/build/server/chunks/1-CU50G5wZ.js +9 -0
  147. package/build/server/chunks/1-CU50G5wZ.js.map +1 -0
  148. package/build/server/chunks/2-D01t9s8T.js +9 -0
  149. package/build/server/chunks/2-D01t9s8T.js.map +1 -0
  150. package/build/server/chunks/3-5PUQ04wC.js +9 -0
  151. package/build/server/chunks/3-5PUQ04wC.js.map +1 -0
  152. package/build/server/chunks/4-e7gywnSG.js +9 -0
  153. package/build/server/chunks/4-e7gywnSG.js.map +1 -0
  154. package/build/server/chunks/5-CA1SA6KZ.js +9 -0
  155. package/build/server/chunks/5-CA1SA6KZ.js.map +1 -0
  156. package/build/server/chunks/6-71H221sV.js +9 -0
  157. package/build/server/chunks/6-71H221sV.js.map +1 -0
  158. package/build/server/chunks/7-Bo-vmdyz.js +9 -0
  159. package/build/server/chunks/7-Bo-vmdyz.js.map +1 -0
  160. package/build/server/chunks/_layout.svelte-SFHOxs74.js +132 -0
  161. package/build/server/chunks/_layout.svelte-SFHOxs74.js.map +1 -0
  162. package/build/server/chunks/_page.svelte-B4w-2wD-.js +120 -0
  163. package/build/server/chunks/_page.svelte-B4w-2wD-.js.map +1 -0
  164. package/build/server/chunks/_page.svelte-B_qAXjkh.js +213 -0
  165. package/build/server/chunks/_page.svelte-B_qAXjkh.js.map +1 -0
  166. package/build/server/chunks/_page.svelte-CsF1_TRG.js +50 -0
  167. package/build/server/chunks/_page.svelte-CsF1_TRG.js.map +1 -0
  168. package/build/server/chunks/_page.svelte-DJC6U-P0.js +68 -0
  169. package/build/server/chunks/_page.svelte-DJC6U-P0.js.map +1 -0
  170. package/build/server/chunks/_page.svelte-DQ6HBtsz.js +407 -0
  171. package/build/server/chunks/_page.svelte-DQ6HBtsz.js.map +1 -0
  172. package/build/server/chunks/_page.svelte-LbhhjP21.js +148 -0
  173. package/build/server/chunks/_page.svelte-LbhhjP21.js.map +1 -0
  174. package/build/server/chunks/_server.ts-BL2FGb5Z.js +387 -0
  175. package/build/server/chunks/_server.ts-BL2FGb5Z.js.map +1 -0
  176. package/build/server/chunks/_server.ts-BgdjBZco.js +47 -0
  177. package/build/server/chunks/_server.ts-BgdjBZco.js.map +1 -0
  178. package/build/server/chunks/_server.ts-BihKSdj_.js +59 -0
  179. package/build/server/chunks/_server.ts-BihKSdj_.js.map +1 -0
  180. package/build/server/chunks/_server.ts-BjOJsoy4.js +63 -0
  181. package/build/server/chunks/_server.ts-BjOJsoy4.js.map +1 -0
  182. package/build/server/chunks/_server.ts-C29xzfaw.js +77 -0
  183. package/build/server/chunks/_server.ts-C29xzfaw.js.map +1 -0
  184. package/build/server/chunks/_server.ts-CPa6DgIt.js +71 -0
  185. package/build/server/chunks/_server.ts-CPa6DgIt.js.map +1 -0
  186. package/build/server/chunks/_server.ts-CbDRDIoP.js +36 -0
  187. package/build/server/chunks/_server.ts-CbDRDIoP.js.map +1 -0
  188. package/build/server/chunks/_server.ts-Cl1OEWL4.js +54 -0
  189. package/build/server/chunks/_server.ts-Cl1OEWL4.js.map +1 -0
  190. package/build/server/chunks/_server.ts-ColfDHW8.js +60 -0
  191. package/build/server/chunks/_server.ts-ColfDHW8.js.map +1 -0
  192. package/build/server/chunks/_server.ts-Cv_OrRuL.js +494 -0
  193. package/build/server/chunks/_server.ts-Cv_OrRuL.js.map +1 -0
  194. package/build/server/chunks/_server.ts-D4MNi4cD.js +25 -0
  195. package/build/server/chunks/_server.ts-D4MNi4cD.js.map +1 -0
  196. package/build/server/chunks/_server.ts-DRVbgm6k.js +125 -0
  197. package/build/server/chunks/_server.ts-DRVbgm6k.js.map +1 -0
  198. package/build/server/chunks/_server.ts-DfajWaqh.js +39 -0
  199. package/build/server/chunks/_server.ts-DfajWaqh.js.map +1 -0
  200. package/build/server/chunks/_server.ts-y9-WYDMa.js +35 -0
  201. package/build/server/chunks/_server.ts-y9-WYDMa.js.map +1 -0
  202. package/build/server/chunks/auth-CEgFis71.js +32 -0
  203. package/build/server/chunks/auth-CEgFis71.js.map +1 -0
  204. package/build/server/chunks/client-CxCatAKr.js +255 -0
  205. package/build/server/chunks/client-CxCatAKr.js.map +1 -0
  206. package/build/server/chunks/error.svelte-BqdwMWdK.js +26 -0
  207. package/build/server/chunks/error.svelte-BqdwMWdK.js.map +1 -0
  208. package/build/server/chunks/exports-CJ0Q5XmL.js +4081 -0
  209. package/build/server/chunks/exports-CJ0Q5XmL.js.map +1 -0
  210. package/build/server/chunks/index2-DAxIoAO-.js +36 -0
  211. package/build/server/chunks/index2-DAxIoAO-.js.map +1 -0
  212. package/build/server/chunks/jsonl-parser-dmZU_Hyu.js +137 -0
  213. package/build/server/chunks/jsonl-parser-dmZU_Hyu.js.map +1 -0
  214. package/build/server/chunks/library-apns-BHxLmuIx.js +104 -0
  215. package/build/server/chunks/library-apns-BHxLmuIx.js.map +1 -0
  216. package/build/server/chunks/markdown-Bxrl3cCF.js +1241 -0
  217. package/build/server/chunks/markdown-Bxrl3cCF.js.map +1 -0
  218. package/build/server/chunks/pending-requests-D8UiTw7L.js +44 -0
  219. package/build/server/chunks/pending-requests-D8UiTw7L.js.map +1 -0
  220. package/build/server/chunks/pty-manager-C0FhBiVq.js +1697 -0
  221. package/build/server/chunks/pty-manager-C0FhBiVq.js.map +1 -0
  222. package/build/server/chunks/shared-server-BDY8jh20.js +200 -0
  223. package/build/server/chunks/shared-server-BDY8jh20.js.map +1 -0
  224. package/build/server/chunks/stores-D0HorpgL.js +36 -0
  225. package/build/server/chunks/stores-D0HorpgL.js.map +1 -0
  226. package/build/server/index.js +6466 -0
  227. package/build/server/index.js.map +1 -0
  228. package/build/server/manifest.js +184 -0
  229. package/build/server/manifest.js.map +1 -0
  230. package/build/shims.js +32 -0
  231. package/package.json +94 -0
  232. package/scripts/clipboard-shims/wl-paste +48 -0
  233. package/scripts/clipboard-shims/xclip +31 -0
  234. package/scripts/install.sh +477 -0
  235. package/scripts/setup-node-pty.sh +63 -0
  236. package/scripts/setup.cjs +571 -0
  237. package/scripts/test-runner.ts +243 -0
  238. package/scripts/vercel-env-commands.sh +60 -0
  239. package/server.ts +139 -0
  240. package/src/app.css +1835 -0
  241. package/src/app.d.ts +31 -0
  242. package/src/app.html +24 -0
  243. package/src/generated/types/APN.ts +305 -0
  244. package/src/generated/types/CLI.ts +52 -0
  245. package/src/generated/types/JWT.ts +92 -0
  246. package/src/generated/types/Terminal.ts +2736 -0
  247. package/src/generated/types/index.ts +6 -0
  248. package/src/lib/assets/icons/alert-triangle.svg +5 -0
  249. package/src/lib/assets/icons/bell.svg +4 -0
  250. package/src/lib/assets/icons/check-circle.svg +4 -0
  251. package/src/lib/assets/icons/file.svg +4 -0
  252. package/src/lib/assets/icons/folder.svg +3 -0
  253. package/src/lib/assets/icons/play.svg +3 -0
  254. package/src/lib/assets/icons/refresh.svg +4 -0
  255. package/src/lib/assets/icons/settings.svg +4 -0
  256. package/src/lib/assets/icons/terminal.svg +1 -0
  257. package/src/lib/assets/icons/tool.svg +3 -0
  258. package/src/lib/assets/icons/x-circle.svg +5 -0
  259. package/src/lib/modules/client/common/Card.svelte +26 -0
  260. package/src/lib/modules/client/common/EmptyState.svelte +36 -0
  261. package/src/lib/modules/client/common/Icon.svelte +61 -0
  262. package/src/lib/modules/client/common/StatusBadge.svelte +38 -0
  263. package/src/lib/modules/client/common/cache.ts +31 -0
  264. package/src/lib/modules/client/common/config-guard.ts +18 -0
  265. package/src/lib/modules/client/common/index.ts +12 -0
  266. package/src/lib/modules/client/common/markdown.ts +23 -0
  267. package/src/lib/modules/client/common/native-bridge.ts +50 -0
  268. package/src/lib/modules/client/common/time.ts +22 -0
  269. package/src/lib/modules/client/common/tool-title.ts +28 -0
  270. package/src/lib/modules/client/terminal/ChatView.svelte +400 -0
  271. package/src/lib/modules/client/terminal/CommandPalette.svelte +60 -0
  272. package/src/lib/modules/client/terminal/ConnectionStatus.svelte +99 -0
  273. package/src/lib/modules/client/terminal/LaunchSheet.svelte +294 -0
  274. package/src/lib/modules/client/terminal/QuickKeys.svelte +71 -0
  275. package/src/lib/modules/client/terminal/ShortcutsHelp.svelte +79 -0
  276. package/src/lib/modules/client/terminal/keyboard-shortcuts.ts +70 -0
  277. package/src/lib/modules/client/terminal/xterm-wrapper.ts +243 -0
  278. package/src/lib/modules/server/apn/library-apns.ts +137 -0
  279. package/src/lib/modules/server/apn/notification-history.ts +35 -0
  280. package/src/lib/modules/server/apn/notification-sessions.ts +117 -0
  281. package/src/lib/modules/server/apn/pending-requests.ts +65 -0
  282. package/src/lib/modules/server/apn/types.ts +51 -0
  283. package/src/lib/modules/server/auth.ts +34 -0
  284. package/src/lib/modules/server/cli/index.ts +79 -0
  285. package/src/lib/modules/server/cli/runner.ts +162 -0
  286. package/src/lib/modules/server/fcm/fcm-service.ts +72 -0
  287. package/src/lib/modules/server/sessions/jsonl-parser.ts +197 -0
  288. package/src/lib/modules/server/sessions/jsonl-reader.ts +301 -0
  289. package/src/lib/modules/server/sessions/opencode-reader.ts +264 -0
  290. package/src/lib/modules/server/sessions/types.ts +53 -0
  291. package/src/lib/modules/server/terminal/holder-client.ts +273 -0
  292. package/src/lib/modules/server/terminal/opencode-watcher.ts +661 -0
  293. package/src/lib/modules/server/terminal/pty-holder.cjs +510 -0
  294. package/src/lib/modules/server/terminal/pty-manager.ts +1012 -0
  295. package/src/lib/modules/server/terminal/session-watcher.ts +320 -0
  296. package/src/lib/modules/server/terminal/terminal-store.ts +198 -0
  297. package/src/lib/modules/server/ws/events-handler.ts +73 -0
  298. package/src/lib/modules/server/ws/keepalive.ts +108 -0
  299. package/src/lib/modules/server/ws/server.ts +93 -0
  300. package/src/lib/modules/server/ws/session-handler.ts +462 -0
  301. package/src/lib/modules/server/ws/terminal-handler.ts +197 -0
  302. package/src/lib/modules/server/ws/ticket-store.ts +58 -0
  303. package/src/lib/theme.css +529 -0
  304. package/src/lib/types/config.ts +6 -0
  305. package/src/routes/+layout.svelte +218 -0
  306. package/src/routes/+page.svelte +261 -0
  307. package/src/routes/api/debug/+server.ts +33 -0
  308. package/src/routes/api/device-token/+server.ts +85 -0
  309. package/src/routes/api/health/+server.ts +100 -0
  310. package/src/routes/api/notify/+server.ts +418 -0
  311. package/src/routes/api/qr-config/+server.ts +45 -0
  312. package/src/routes/api/response/+server.ts +73 -0
  313. package/src/routes/api/sessions/+server.ts +120 -0
  314. package/src/routes/api/terminals/+server.ts +141 -0
  315. package/src/routes/api/terminals/[id]/+server.ts +75 -0
  316. package/src/routes/api/terminals/[id]/paste-image/+server.ts +61 -0
  317. package/src/routes/api/terminals/[id]/resize/+server.ts +60 -0
  318. package/src/routes/api/webhook/+server.ts +42 -0
  319. package/src/routes/api/ws-status/+server.ts +23 -0
  320. package/src/routes/api/ws-ticket/+server.ts +86 -0
  321. package/src/routes/config/+page.svelte +600 -0
  322. package/src/routes/project/+page.svelte +274 -0
  323. package/src/routes/session/[id]/+page.svelte +434 -0
  324. package/src/routes/terminals/+page.svelte +618 -0
  325. package/src/routes/terminals/[id]/+page.svelte +968 -0
  326. package/svelte.config.js +18 -0
  327. package/tsconfig.json +14 -0
package/src/app.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ // See https://svelte.dev/docs/kit/types#app.d.ts
2
+ // for information about these interfaces
3
+
4
+ interface ShooterBridgeScanner {
5
+ scan: () => Promise<string>;
6
+ }
7
+
8
+ interface ShooterBridge {
9
+ scanner?: ShooterBridgeScanner;
10
+ getConfig?: () => string;
11
+ saveConfig?: (config: string) => void;
12
+ getFcmToken?: () => string;
13
+ getPlatform?: () => string;
14
+ }
15
+
16
+ declare global {
17
+ namespace App {
18
+ // interface Error {}
19
+ // interface Locals {}
20
+ // interface PageData {}
21
+ // interface PageState {}
22
+ // interface Platform {}
23
+ }
24
+
25
+ interface Window {
26
+ ShooterBridge?: ShooterBridge;
27
+ handleNativeResponse?: (callbackId: string, response: string) => void;
28
+ }
29
+ }
30
+
31
+ export {};
package/src/app.html ADDED
@@ -0,0 +1,24 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" type="image/svg+xml" href="%sveltekit.assets%/favicon.svg" />
6
+ <link rel="icon" type="image/png" href="%sveltekit.assets%/favicon.png" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
8
+ <meta name="theme-color" content="#0a0a0a" />
9
+ <link rel="apple-touch-icon" href="%sveltekit.assets%/apple-touch-icon.png" />
10
+ <link rel="manifest" href="%sveltekit.assets%/manifest.webmanifest" />
11
+ <title>Shooter</title>
12
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
13
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
14
+ <link
15
+ href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap"
16
+ rel="stylesheet"
17
+ />
18
+ %sveltekit.head%
19
+ </head>
20
+ <body data-sveltekit-preload-data="hover">
21
+ <div style="display: contents">%sveltekit.body%</div>
22
+ <script src="%sveltekit.assets%/registerSW.js"></script>
23
+ </body>
24
+ </html>
@@ -0,0 +1,305 @@
1
+ import { _decodeBoolean, _decodeNumber, _decodeString , decodeBoolean, decodeNumber , decodeString, isJSON } from 'type-decoder';
2
+
3
+ /**
4
+ * @type { Error }
5
+ * @description Individual notification error for a specific device
6
+ */
7
+ export interface Error {
8
+ /**
9
+ * @description Device token that failed to receive notification
10
+ * @type { string }
11
+ * @memberof Error
12
+ */
13
+ device: string;
14
+ /**
15
+ * @description Error response from APNs
16
+ * @type { ErrorResponse }
17
+ * @memberof Error
18
+ */
19
+ response: ErrorResponse | null;
20
+ /**
21
+ * @description HTTP status code from APNs
22
+ * @type { number }
23
+ * @memberof Error
24
+ */
25
+ status: null | number;
26
+ }
27
+
28
+ /**
29
+ * @type { ErrorData }
30
+ * @description Error details returned from APNs server
31
+ */
32
+ export interface ErrorData {
33
+ /**
34
+ * @description Specific error reason code from APNs
35
+ * @type { string }
36
+ * @memberof ErrorData
37
+ */
38
+ reason: null | string;
39
+ }
40
+
41
+
42
+ /**
43
+ * @type { ErrorResponse }
44
+ * @description Full error response from APNs
45
+ */
46
+ export interface ErrorResponse {
47
+ /**
48
+ * @description Specific error reason code from APNs
49
+ * @type { string }
50
+ * @memberof ErrorResponse
51
+ */
52
+ reason: null | string;
53
+ }
54
+
55
+ /**
56
+ * @type { LibraryFailedItem }
57
+ * @description Individual failed notification item from apn library
58
+ */
59
+ export interface LibraryFailedItem {
60
+ /**
61
+ * @description Device token that failed
62
+ * @type { string }
63
+ * @memberof LibraryFailedItem
64
+ */
65
+ device: string;
66
+ /**
67
+ * @description Error response from APNs
68
+ * @type { ErrorResponse }
69
+ * @memberof LibraryFailedItem
70
+ */
71
+ response: ErrorResponse | null;
72
+ /**
73
+ * @description HTTP status code
74
+ * @type { number }
75
+ * @memberof LibraryFailedItem
76
+ */
77
+ status: null | number;
78
+ }
79
+
80
+
81
+ /**
82
+ * @type { LibrarySentItem }
83
+ * @description Individual sent notification item from apn library
84
+ */
85
+ export interface LibrarySentItem {
86
+ /**
87
+ * @description Device token that received notification
88
+ * @type { string }
89
+ * @memberof LibrarySentItem
90
+ */
91
+ device: string;
92
+ }
93
+
94
+ /**
95
+ * @type { RawResponse }
96
+ * @description Raw HTTP response from APNs server
97
+ */
98
+ export interface RawResponse {
99
+ /**
100
+ * @description Unique identifier for this notification from APNs
101
+ * @type { string }
102
+ * @memberof RawResponse
103
+ */
104
+ apnsId: null | string;
105
+ /**
106
+ * @description Response body data (nullable - null on success)
107
+ * @type { ErrorData }
108
+ * @memberof RawResponse
109
+ */
110
+ data: ErrorData | null;
111
+ /**
112
+ * @description HTTP response headers from APNs
113
+ * @type { RawResponseHeaders }
114
+ * @memberof RawResponse
115
+ */
116
+ headers: RawResponseHeaders;
117
+ /**
118
+ * @description HTTP status code from APNs
119
+ * @type { number }
120
+ * @memberof RawResponse
121
+ */
122
+ statusCode: number;
123
+ /**
124
+ * @description Whether the notification was successfully sent
125
+ * @type { boolean }
126
+ * @memberof RawResponse
127
+ */
128
+ success: boolean;
129
+ }
130
+
131
+ /**
132
+ * @type { RawResponseHeaders }
133
+ * @description HTTP response headers from APNs
134
+ */
135
+ export type RawResponseHeaders = Record<string, unknown>;
136
+
137
+ /**
138
+ * @type { SentDetail }
139
+ * @description Details about a successfully sent notification
140
+ */
141
+ export interface SentDetail {
142
+ /**
143
+ * @description Unique APNs identifier for the notification
144
+ * @type { string }
145
+ * @memberof SentDetail
146
+ */
147
+ 'apns-unique-id': null | string;
148
+ /**
149
+ * @description Device token that received the notification
150
+ * @type { string }
151
+ * @memberof SentDetail
152
+ */
153
+ device: null | string;
154
+ /**
155
+ * @description Delivery status
156
+ * @type { string }
157
+ * @memberof SentDetail
158
+ */
159
+ status: null | string;
160
+ }
161
+
162
+
163
+ export function decodeError(rawInput: unknown): Error | null {
164
+ if (isJSON(rawInput)) {
165
+ const decodedDevice = decodeString(rawInput.device);
166
+ const decodedResponse = decodeErrorResponse(rawInput.response);
167
+ const decodedStatus = decodeNumber(rawInput.status);
168
+
169
+ if (
170
+ decodedDevice === null
171
+ ) {
172
+ return null;
173
+ }
174
+
175
+ return {
176
+ device: decodedDevice,
177
+ response: decodedResponse,
178
+ status: decodedStatus
179
+ };
180
+ }
181
+ return null;
182
+ }
183
+
184
+ export function decodeErrorData(rawInput: unknown): ErrorData | null {
185
+ if (isJSON(rawInput)) {
186
+ const decodedReason = decodeString(rawInput.reason);
187
+
188
+
189
+ return {
190
+ reason: decodedReason
191
+ };
192
+ }
193
+ return null;
194
+ }
195
+
196
+
197
+ export function decodeErrorResponse(rawInput: unknown): ErrorResponse | null {
198
+ if (isJSON(rawInput)) {
199
+ const decodedReason = decodeString(rawInput.reason);
200
+
201
+
202
+ return {
203
+ reason: decodedReason
204
+ };
205
+ }
206
+ return null;
207
+ }
208
+
209
+ export function decodeLibraryFailedItem(rawInput: unknown): LibraryFailedItem | null {
210
+ if (isJSON(rawInput)) {
211
+ const decodedDevice = decodeString(rawInput.device);
212
+ const decodedResponse = decodeErrorResponse(rawInput.response);
213
+ const decodedStatus = decodeNumber(rawInput.status);
214
+
215
+ if (
216
+ decodedDevice === null
217
+ ) {
218
+ return null;
219
+ }
220
+
221
+ return {
222
+ device: decodedDevice,
223
+ response: decodedResponse,
224
+ status: decodedStatus
225
+ };
226
+ }
227
+ return null;
228
+ }
229
+
230
+
231
+ export function decodeLibrarySentItem(rawInput: unknown): LibrarySentItem | null {
232
+ if (isJSON(rawInput)) {
233
+ const decodedDevice = decodeString(rawInput.device);
234
+
235
+ if (
236
+ decodedDevice === null
237
+ ) {
238
+ return null;
239
+ }
240
+
241
+ return {
242
+ device: decodedDevice
243
+ };
244
+ }
245
+ return null;
246
+ }
247
+
248
+ export function decodeRawResponse(rawInput: unknown): null | RawResponse {
249
+ if (isJSON(rawInput)) {
250
+ const decodedStatusCode = decodeNumber(rawInput.statusCode);
251
+ const decodedHeaders = decodeRawResponseHeaders(rawInput.headers);
252
+ const decodedData = decodeErrorData(rawInput.data);
253
+ const decodedSuccess = decodeBoolean(rawInput.success);
254
+ const decodedApnsId = decodeString(rawInput.apnsId);
255
+
256
+ if (
257
+ decodedStatusCode === null ||
258
+ decodedHeaders === null ||
259
+ decodedSuccess === null
260
+ ) {
261
+ return null;
262
+ }
263
+
264
+ return {
265
+ apnsId: decodedApnsId,
266
+ data: decodedData,
267
+ headers: decodedHeaders,
268
+ statusCode: decodedStatusCode,
269
+ success: decodedSuccess
270
+ };
271
+ }
272
+ return null;
273
+ }
274
+
275
+
276
+ export function decodeRawResponseHeaders(rawInput: unknown): null | RawResponseHeaders {
277
+ if (isJSON(rawInput)) {
278
+
279
+
280
+ return {
281
+ ...rawInput,
282
+ };
283
+ }
284
+ return null;
285
+ }
286
+
287
+ export function decodeSentDetail(rawInput: unknown): null | SentDetail {
288
+ if (isJSON(rawInput)) {
289
+ const decodedDevice = decodeString(rawInput.device);
290
+ const decodedStatus = decodeString(rawInput.status);
291
+ const decodedApnsUniqueId = decodeString(rawInput['apns-unique-id']);
292
+
293
+
294
+ return {
295
+ 'apns-unique-id': decodedApnsUniqueId,
296
+ device: decodedDevice,
297
+ status: decodedStatus
298
+ };
299
+ }
300
+ return null;
301
+ }
302
+
303
+
304
+
305
+
@@ -0,0 +1,52 @@
1
+ import { _decodeBoolean, _decodeNumber, decodeBoolean , decodeNumber, isJSON } from 'type-decoder';
2
+
3
+ /**
4
+ * @type { Options }
5
+ * @description Configuration options for CLI command execution
6
+ */
7
+ export interface Options {
8
+ /**
9
+ * @description Simulate execution without making changes
10
+ * @type { boolean }
11
+ * @memberof Options
12
+ */
13
+ dryRun: boolean;
14
+ /**
15
+ * @description Command timeout in milliseconds
16
+ * @type { number }
17
+ * @memberof Options
18
+ */
19
+ timeout: null | number;
20
+ /**
21
+ * @description Enable verbose output logging
22
+ * @type { boolean }
23
+ * @memberof Options
24
+ */
25
+ verbose: boolean;
26
+ }
27
+
28
+ export function decodeOptions(rawInput: unknown): null | Options {
29
+ if (isJSON(rawInput)) {
30
+ const decodedVerbose = decodeBoolean(rawInput.verbose);
31
+ const decodedDryRun = decodeBoolean(rawInput.dryRun);
32
+ const decodedTimeout = decodeNumber(rawInput.timeout);
33
+
34
+ if (
35
+ decodedVerbose === null ||
36
+ decodedDryRun === null
37
+ ) {
38
+ return null;
39
+ }
40
+
41
+ return {
42
+ dryRun: decodedDryRun,
43
+ timeout: decodedTimeout,
44
+ verbose: decodedVerbose
45
+ };
46
+ }
47
+ return null;
48
+ }
49
+
50
+
51
+
52
+
@@ -0,0 +1,92 @@
1
+ import { _decodeNumber, _decodeString, decodeNumber , decodeString, isJSON } from 'type-decoder';
2
+
3
+ /**
4
+ * @type { Header }
5
+ * @description JWT header for APNs authentication token
6
+ */
7
+ export interface Header {
8
+ /**
9
+ * @description Algorithm used for signing (ES256 for APNs)
10
+ * @type { string }
11
+ * @memberof Header
12
+ */
13
+ alg: string;
14
+ /**
15
+ * @description Key ID from Apple Developer account
16
+ * @type { string }
17
+ * @memberof Header
18
+ */
19
+ kid: string;
20
+ }
21
+
22
+ /**
23
+ * @type { Payload }
24
+ * @description JWT payload containing token claims
25
+ */
26
+ export interface Payload {
27
+ /**
28
+ * @description Expiration time (Unix timestamp, optional)
29
+ * @type { number }
30
+ * @memberof Payload
31
+ */
32
+ exp: null | number;
33
+ /**
34
+ * @description Issued at time (Unix timestamp)
35
+ * @type { number }
36
+ * @memberof Payload
37
+ */
38
+ iat: number;
39
+ /**
40
+ * @description Issuer - your Apple Team ID
41
+ * @type { string }
42
+ * @memberof Payload
43
+ */
44
+ iss: string;
45
+ }
46
+
47
+
48
+ export function decodeHeader(rawInput: unknown): Header | null {
49
+ if (isJSON(rawInput)) {
50
+ const decodedAlg = decodeString(rawInput.alg);
51
+ const decodedKid = decodeString(rawInput.kid);
52
+
53
+ if (
54
+ decodedAlg === null ||
55
+ decodedKid === null
56
+ ) {
57
+ return null;
58
+ }
59
+
60
+ return {
61
+ alg: decodedAlg,
62
+ kid: decodedKid
63
+ };
64
+ }
65
+ return null;
66
+ }
67
+
68
+ export function decodePayload(rawInput: unknown): null | Payload {
69
+ if (isJSON(rawInput)) {
70
+ const decodedIss = decodeString(rawInput.iss);
71
+ const decodedIat = decodeNumber(rawInput.iat);
72
+ const decodedExp = decodeNumber(rawInput.exp);
73
+
74
+ if (
75
+ decodedIss === null ||
76
+ decodedIat === null
77
+ ) {
78
+ return null;
79
+ }
80
+
81
+ return {
82
+ exp: decodedExp,
83
+ iat: decodedIat,
84
+ iss: decodedIss
85
+ };
86
+ }
87
+ return null;
88
+ }
89
+
90
+
91
+
92
+