@prismshadow/penguin-server 0.2.13 → 0.2.15

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 (428) hide show
  1. package/dist/api/types.d.ts +2722 -159
  2. package/dist/api/types.js +3 -1
  3. package/dist/auth-token.d.ts +22 -1
  4. package/dist/auth-token.js +2 -2
  5. package/dist/auth-token.js.map +1 -1
  6. package/dist/benchmark-package.d.ts +39 -0
  7. package/dist/benchmark-package.js +97 -0
  8. package/dist/benchmark-package.js.map +1 -0
  9. package/dist/chunk-54E64LWB.js +63 -0
  10. package/dist/chunk-54E64LWB.js.map +1 -0
  11. package/dist/{chunk-3I2XOPJB.js → chunk-5Z4UCHDB.js} +95 -78
  12. package/dist/chunk-5Z4UCHDB.js.map +1 -0
  13. package/dist/chunk-HX3WBUYX.js +18 -0
  14. package/dist/chunk-HX3WBUYX.js.map +1 -0
  15. package/dist/chunk-JKJXQTHH.js +19 -0
  16. package/dist/chunk-JKJXQTHH.js.map +1 -0
  17. package/dist/{chunk-A3QANMU5.js → chunk-NVWAYYRX.js} +279 -9
  18. package/dist/chunk-NVWAYYRX.js.map +1 -0
  19. package/dist/chunk-Q4ON2L6E.js +52 -0
  20. package/dist/chunk-Q4ON2L6E.js.map +1 -0
  21. package/dist/chunk-QFV3ERQO.js +20 -0
  22. package/dist/chunk-QFV3ERQO.js.map +1 -0
  23. package/dist/index.js +69394 -36621
  24. package/dist/index.js.map +1 -1
  25. package/dist/install.ps1 +16 -6
  26. package/dist/install.sh +24 -10
  27. package/dist/machine-status.js +1 -1
  28. package/dist/plugin/index.d.ts +1061 -272
  29. package/dist/reset-admin-password.js +3 -2
  30. package/dist/reset-admin-password.js.map +1 -1
  31. package/dist/secret-file.js +3 -14
  32. package/dist/secret-file.js.map +1 -1
  33. package/dist/version-report.d.ts +3 -0
  34. package/dist/version-report.js +1 -1
  35. package/package.json +12 -6
  36. package/web-dist/assets/KaTeX_Size3-Regular-gV2CO0n9.woff2 +0 -0
  37. package/web-dist/assets/abnfDiagram-VCTEODGH-CKWh4hoA.js +1 -0
  38. package/web-dist/assets/{addon-clipboard-DrZY90Ks.js → addon-clipboard-DxLqat7q.js} +1 -1
  39. package/web-dist/assets/{addon-fit-CtEAdAax.js → addon-fit-B8oPGPkW.js} +1 -1
  40. package/web-dist/assets/{addon-web-links-DJL13cYY.js → addon-web-links-C0W5TcK0.js} +1 -1
  41. package/web-dist/assets/arc-Dp9EkaAH.js +1 -0
  42. package/web-dist/assets/architectureDiagram-5GKGNRK7-BQ3LUcle.js +36 -0
  43. package/web-dist/assets/blockDiagram-I7D4REHJ-CZzyU0Jj.js +129 -0
  44. package/web-dist/assets/c4Diagram-7LVT6UL2-Qps3jeAu.js +38 -0
  45. package/web-dist/assets/channel--PblgLlC.js +1 -0
  46. package/web-dist/assets/chunk-2Q5K7J3B-CQMntzuX.js +1 -0
  47. package/web-dist/assets/chunk-5VM5RSS4-2H2ZJAte.js +15 -0
  48. package/web-dist/assets/chunk-F27PBJKO-B30xCNBv.js +1 -0
  49. package/web-dist/assets/chunk-IMKFNOWR-Cyfx4zDs.js +231 -0
  50. package/web-dist/assets/chunk-JWPE2WC7-DADUytTh.js +1 -0
  51. package/web-dist/assets/chunk-POPQ4Y6H-9bjsAxLS.js +1 -0
  52. package/web-dist/assets/chunk-SVP7TREG-B9xO1VpN.js +88 -0
  53. package/web-dist/assets/chunk-TICWLB2K-B6oDkrep.js +206 -0
  54. package/web-dist/assets/chunk-XXDRQBXY-BbU8DR4B.js +1 -0
  55. package/web-dist/assets/classDiagram-ZZMXUADV-mn8tbuqa.js +1 -0
  56. package/web-dist/assets/classDiagram-v2-VYDZK3BY-mn8tbuqa.js +1 -0
  57. package/web-dist/assets/cose-bilkent-JH36ORCC-pkbuyec-.js +1 -0
  58. package/web-dist/assets/cynefin-OW5HDTMX-DU9YQQnc.js +166 -0
  59. package/web-dist/assets/cynefinDiagram-5FMLGOSQ-3a3XuhQq.js +62 -0
  60. package/web-dist/assets/cytoscape.esm-BB4DxJjf.js +321 -0
  61. package/web-dist/assets/dagre-GXQ25YYZ-BfZ9C5CZ.js +4 -0
  62. package/web-dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  63. package/web-dist/assets/diagram-S7CK7UJ4-BoGhVBMn.js +30 -0
  64. package/web-dist/assets/diagram-UQ7AKVKN-zE67quty.js +41 -0
  65. package/web-dist/assets/diagram-VSXAHHWV-NihoXeXm.js +3 -0
  66. package/web-dist/assets/diagram-VX7I27RA-1627np0S.js +24 -0
  67. package/web-dist/assets/diagram-Z3DM3KII-Ddg_bUan.js +24 -0
  68. package/web-dist/assets/ebnfDiagram-PWID7BFC-CmPUOM4j.js +1 -0
  69. package/web-dist/assets/erDiagram-RLTQ6QDP-DiTnEK72.js +99 -0
  70. package/web-dist/assets/flowDiagram-HODETNUW-mGQ38tRM.js +168 -0
  71. package/web-dist/assets/ganttDiagram-EL5Y4UJY-DU7MlzpW.js +292 -0
  72. package/web-dist/assets/gitGraphDiagram-WWUBYQGX-CRE_3vjl.js +106 -0
  73. package/web-dist/assets/highlighter-CzfXQ6yd.js +2 -0
  74. package/web-dist/assets/{highlighter-core-CrBdruEx.js → highlighter-core-B5CvXcEK.js} +7 -7
  75. package/web-dist/assets/{highlighter.worker-CL6f9Fzw.js → highlighter.worker-D6D9fPma.js} +9 -9
  76. package/web-dist/assets/ibm-plex-sans-condensed-latin-600-normal-CRd5VyFf.woff2 +0 -0
  77. package/web-dist/assets/ibm-plex-sans-condensed-latin-ext-600-normal-CBdNZ9Ci.woff2 +0 -0
  78. package/web-dist/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
  79. package/web-dist/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
  80. package/web-dist/assets/index-BdG4qRyI.js +1275 -0
  81. package/web-dist/assets/index-W-xYFoIm.css +1 -0
  82. package/web-dist/assets/infoDiagram-27XIBGKW-Cdo6Ar-a.js +2 -0
  83. package/web-dist/assets/init-Gi6I4Gst.js +1 -0
  84. package/web-dist/assets/ishikawaDiagram-5VMMS53U-C27pgect.js +70 -0
  85. package/web-dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  86. package/web-dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  87. package/web-dist/assets/journeyDiagram-3NMN7TZE-CVxtKpLG.js +139 -0
  88. package/web-dist/assets/kanban-definition-UXKFOSKX-DWA31Da7.js +89 -0
  89. package/web-dist/assets/layout-DWKCU9PO.js +1 -0
  90. package/web-dist/assets/linear-BwCthj_k.js +1 -0
  91. package/web-dist/assets/mermaid.core-BcTrmPOv.js +310 -0
  92. package/web-dist/assets/mindmap-definition-YA3MSWOX-BLEDhbn1.js +96 -0
  93. package/web-dist/assets/misans-400-100-DHkMCix2.woff2 +0 -0
  94. package/web-dist/assets/misans-400-101-CwgSLsmc.woff2 +0 -0
  95. package/web-dist/assets/misans-400-102-BQgefHPQ.woff2 +0 -0
  96. package/web-dist/assets/misans-400-103-CP58Mc_T.woff2 +0 -0
  97. package/web-dist/assets/misans-400-104-Ta_Xu1gd.woff2 +0 -0
  98. package/web-dist/assets/misans-400-105-CDop11AR.woff2 +0 -0
  99. package/web-dist/assets/misans-400-106-Dv8y0ubk.woff2 +0 -0
  100. package/web-dist/assets/misans-400-107-CjnHtp9E.woff2 +0 -0
  101. package/web-dist/assets/misans-400-108-BA8nQUBw.woff2 +0 -0
  102. package/web-dist/assets/misans-400-109-B6uEN0pG.woff2 +0 -0
  103. package/web-dist/assets/misans-400-110-BQqnShrY.woff2 +0 -0
  104. package/web-dist/assets/misans-400-111-CHB-Jj5X.woff2 +0 -0
  105. package/web-dist/assets/misans-400-112-D1dh4Cjx.woff2 +0 -0
  106. package/web-dist/assets/misans-400-113-Bw_wNCFp.woff2 +0 -0
  107. package/web-dist/assets/misans-400-114-CUb-5IzE.woff2 +0 -0
  108. package/web-dist/assets/misans-400-115-BICOatsO.woff2 +0 -0
  109. package/web-dist/assets/misans-400-116-B3_gmYW6.woff2 +0 -0
  110. package/web-dist/assets/misans-400-117-B8k_y3cv.woff2 +0 -0
  111. package/web-dist/assets/misans-400-118-C-2Cf5C6.woff2 +0 -0
  112. package/web-dist/assets/misans-400-119-CmLP7xnX.woff2 +0 -0
  113. package/web-dist/assets/misans-400-21-DsSSD_Zj.woff2 +0 -0
  114. package/web-dist/assets/misans-400-22-rtkxWOv4.woff2 +0 -0
  115. package/web-dist/assets/misans-400-23-CDDB4M1H.woff2 +0 -0
  116. package/web-dist/assets/misans-400-24-Dqf_XeOL.woff2 +0 -0
  117. package/web-dist/assets/misans-400-25-C4U1tJ5J.woff2 +0 -0
  118. package/web-dist/assets/misans-400-26-CEXOK-nT.woff2 +0 -0
  119. package/web-dist/assets/misans-400-27-BrNOAScF.woff2 +0 -0
  120. package/web-dist/assets/misans-400-28-CPpEnCkG.woff2 +0 -0
  121. package/web-dist/assets/misans-400-29-C9JMVw8g.woff2 +0 -0
  122. package/web-dist/assets/misans-400-30-CD-QimXa.woff2 +0 -0
  123. package/web-dist/assets/misans-400-31-S4k06NbS.woff2 +0 -0
  124. package/web-dist/assets/misans-400-32-zRMBDkz6.woff2 +0 -0
  125. package/web-dist/assets/misans-400-33-sQ_tNZSM.woff2 +0 -0
  126. package/web-dist/assets/misans-400-34-8LEGljja.woff2 +0 -0
  127. package/web-dist/assets/misans-400-35-CxSPyuiU.woff2 +0 -0
  128. package/web-dist/assets/misans-400-36-BY1i4WtO.woff2 +0 -0
  129. package/web-dist/assets/misans-400-37-C0oF42pu.woff2 +0 -0
  130. package/web-dist/assets/misans-400-38-y7xcB90w.woff2 +0 -0
  131. package/web-dist/assets/misans-400-39-C307YgZx.woff2 +0 -0
  132. package/web-dist/assets/misans-400-40-ByZr736f.woff2 +0 -0
  133. package/web-dist/assets/misans-400-41-ChKEw5zV.woff2 +0 -0
  134. package/web-dist/assets/misans-400-42-CD__zJu5.woff2 +0 -0
  135. package/web-dist/assets/misans-400-43-CqNV6_TG.woff2 +0 -0
  136. package/web-dist/assets/misans-400-44-zE-akmW8.woff2 +0 -0
  137. package/web-dist/assets/misans-400-45-Du98otwc.woff2 +0 -0
  138. package/web-dist/assets/misans-400-46-B6JXbEy2.woff2 +0 -0
  139. package/web-dist/assets/misans-400-47-DpqW0kSq.woff2 +0 -0
  140. package/web-dist/assets/misans-400-48-BprON5Q_.woff2 +0 -0
  141. package/web-dist/assets/misans-400-49-N-ct3sN6.woff2 +0 -0
  142. package/web-dist/assets/misans-400-5-ton_4jCN.woff2 +0 -0
  143. package/web-dist/assets/misans-400-50-JgU49P0U.woff2 +0 -0
  144. package/web-dist/assets/misans-400-51-DSS3Moge.woff2 +0 -0
  145. package/web-dist/assets/misans-400-52-BMoXFmwE.woff2 +0 -0
  146. package/web-dist/assets/misans-400-53-BaLMGl4z.woff2 +0 -0
  147. package/web-dist/assets/misans-400-54-CaeSn3OR.woff2 +0 -0
  148. package/web-dist/assets/misans-400-55-BBqrtLxN.woff2 +0 -0
  149. package/web-dist/assets/misans-400-56-DAZ5BnbO.woff2 +0 -0
  150. package/web-dist/assets/misans-400-57-F-n3b0gI.woff2 +0 -0
  151. package/web-dist/assets/misans-400-58-DEUuPQAq.woff2 +0 -0
  152. package/web-dist/assets/misans-400-59-DXP5rhCL.woff2 +0 -0
  153. package/web-dist/assets/misans-400-6-DWCCUO_c.woff2 +0 -0
  154. package/web-dist/assets/misans-400-60-BE6IO6zJ.woff2 +0 -0
  155. package/web-dist/assets/misans-400-61-5Qb1gaxK.woff2 +0 -0
  156. package/web-dist/assets/misans-400-62-D_tJKNAj.woff2 +0 -0
  157. package/web-dist/assets/misans-400-63-hwmne8yB.woff2 +0 -0
  158. package/web-dist/assets/misans-400-64-BGedxReM.woff2 +0 -0
  159. package/web-dist/assets/misans-400-65-BaKPsugb.woff2 +0 -0
  160. package/web-dist/assets/misans-400-66-IdaOMzCz.woff2 +0 -0
  161. package/web-dist/assets/misans-400-67-BdWyS83H.woff2 +0 -0
  162. package/web-dist/assets/misans-400-68-DrZ_1swq.woff2 +0 -0
  163. package/web-dist/assets/misans-400-69-B3jsSD92.woff2 +0 -0
  164. package/web-dist/assets/misans-400-70-D6UZI2Ua.woff2 +0 -0
  165. package/web-dist/assets/misans-400-71-HFxyMCYg.woff2 +0 -0
  166. package/web-dist/assets/misans-400-72-CP5A-yQP.woff2 +0 -0
  167. package/web-dist/assets/misans-400-73-BoD_bu6s.woff2 +0 -0
  168. package/web-dist/assets/misans-400-74-CbJlhZlZ.woff2 +0 -0
  169. package/web-dist/assets/misans-400-75-BsbWuELX.woff2 +0 -0
  170. package/web-dist/assets/misans-400-76-DkwiQhof.woff2 +0 -0
  171. package/web-dist/assets/misans-400-77-6pVHXHnF.woff2 +0 -0
  172. package/web-dist/assets/misans-400-78-CfUF6pih.woff2 +0 -0
  173. package/web-dist/assets/misans-400-79-BCS3Dx4e.woff2 +0 -0
  174. package/web-dist/assets/misans-400-80-BEYSdQ_N.woff2 +0 -0
  175. package/web-dist/assets/misans-400-81-BzL-Gncx.woff2 +0 -0
  176. package/web-dist/assets/misans-400-82-CaENmdUU.woff2 +0 -0
  177. package/web-dist/assets/misans-400-83-Bvq1eBcA.woff2 +0 -0
  178. package/web-dist/assets/misans-400-84-Ctd90hiP.woff2 +0 -0
  179. package/web-dist/assets/misans-400-85-DWuOxfL1.woff2 +0 -0
  180. package/web-dist/assets/misans-400-86-D5niZS5c.woff2 +0 -0
  181. package/web-dist/assets/misans-400-87-DkOIADQJ.woff2 +0 -0
  182. package/web-dist/assets/misans-400-88-CGY4WTcC.woff2 +0 -0
  183. package/web-dist/assets/misans-400-89-CA3eoMTt.woff2 +0 -0
  184. package/web-dist/assets/misans-400-90-CzxR9MYb.woff2 +0 -0
  185. package/web-dist/assets/misans-400-91-Dyr85txc.woff2 +0 -0
  186. package/web-dist/assets/misans-400-97-qEZrCUNe.woff2 +0 -0
  187. package/web-dist/assets/misans-400-cyrillic--hFcG0Xp.woff2 +0 -0
  188. package/web-dist/assets/misans-400-extra-ZRI9n2Hu.woff2 +0 -0
  189. package/web-dist/assets/misans-400-latin-BRDR1WaL.woff2 +0 -0
  190. package/web-dist/assets/misans-400-latin-ext-6xS-MvHW.woff2 +0 -0
  191. package/web-dist/assets/misans-400-vietnamese-D7xD7kBB.woff2 +0 -0
  192. package/web-dist/assets/misans-500-100-BHuGA96E.woff2 +0 -0
  193. package/web-dist/assets/misans-500-101-CDMYUz0c.woff2 +0 -0
  194. package/web-dist/assets/misans-500-102-CWcqYYCV.woff2 +0 -0
  195. package/web-dist/assets/misans-500-103-BE1QSEzY.woff2 +0 -0
  196. package/web-dist/assets/misans-500-104-CDp743BV.woff2 +0 -0
  197. package/web-dist/assets/misans-500-105-y7dY6Foi.woff2 +0 -0
  198. package/web-dist/assets/misans-500-106-CP-kGZ6j.woff2 +0 -0
  199. package/web-dist/assets/misans-500-107-CUc8Hvle.woff2 +0 -0
  200. package/web-dist/assets/misans-500-108-ItN_x8jX.woff2 +0 -0
  201. package/web-dist/assets/misans-500-109-CEtf3R4D.woff2 +0 -0
  202. package/web-dist/assets/misans-500-110-BSZSHYRL.woff2 +0 -0
  203. package/web-dist/assets/misans-500-111-DfdArrjn.woff2 +0 -0
  204. package/web-dist/assets/misans-500-112-DRtNyrQw.woff2 +0 -0
  205. package/web-dist/assets/misans-500-113-CDT7tKuB.woff2 +0 -0
  206. package/web-dist/assets/misans-500-114-CCh4jwL8.woff2 +0 -0
  207. package/web-dist/assets/misans-500-115-DplUgPp0.woff2 +0 -0
  208. package/web-dist/assets/misans-500-116-C7eCklyK.woff2 +0 -0
  209. package/web-dist/assets/misans-500-117-BA0KabyT.woff2 +0 -0
  210. package/web-dist/assets/misans-500-118-V_M0eu2q.woff2 +0 -0
  211. package/web-dist/assets/misans-500-119-Cgf3Hszt.woff2 +0 -0
  212. package/web-dist/assets/misans-500-21-Di6DyR6O.woff2 +0 -0
  213. package/web-dist/assets/misans-500-22-CSnXvtL-.woff2 +0 -0
  214. package/web-dist/assets/misans-500-23-A06Hm9a6.woff2 +0 -0
  215. package/web-dist/assets/misans-500-24-Df97RCik.woff2 +0 -0
  216. package/web-dist/assets/misans-500-25-bOSJ6YXH.woff2 +0 -0
  217. package/web-dist/assets/misans-500-26-C65icgBb.woff2 +0 -0
  218. package/web-dist/assets/misans-500-27-C_GRm0va.woff2 +0 -0
  219. package/web-dist/assets/misans-500-28-CzZkqO0l.woff2 +0 -0
  220. package/web-dist/assets/misans-500-29-BReyeRyX.woff2 +0 -0
  221. package/web-dist/assets/misans-500-30-DzfjlROz.woff2 +0 -0
  222. package/web-dist/assets/misans-500-31-B2nLpgdU.woff2 +0 -0
  223. package/web-dist/assets/misans-500-32-Bz3rHm8X.woff2 +0 -0
  224. package/web-dist/assets/misans-500-33-AU3lZ1vY.woff2 +0 -0
  225. package/web-dist/assets/misans-500-34-CBAWkH-I.woff2 +0 -0
  226. package/web-dist/assets/misans-500-35-VgnGd14P.woff2 +0 -0
  227. package/web-dist/assets/misans-500-36-B2kfXv6A.woff2 +0 -0
  228. package/web-dist/assets/misans-500-37-DhKo8ykb.woff2 +0 -0
  229. package/web-dist/assets/misans-500-38-D8tTxFuc.woff2 +0 -0
  230. package/web-dist/assets/misans-500-39-DTm3aqJQ.woff2 +0 -0
  231. package/web-dist/assets/misans-500-40-C_akwj8_.woff2 +0 -0
  232. package/web-dist/assets/misans-500-41-RVM1JHQW.woff2 +0 -0
  233. package/web-dist/assets/misans-500-42-MVWIN_il.woff2 +0 -0
  234. package/web-dist/assets/misans-500-43-BtLZYNyD.woff2 +0 -0
  235. package/web-dist/assets/misans-500-44-D0QHMl6G.woff2 +0 -0
  236. package/web-dist/assets/misans-500-45-DRlclX7-.woff2 +0 -0
  237. package/web-dist/assets/misans-500-46-BEWswL4N.woff2 +0 -0
  238. package/web-dist/assets/misans-500-47-COSoxWaW.woff2 +0 -0
  239. package/web-dist/assets/misans-500-48-DZAISq3n.woff2 +0 -0
  240. package/web-dist/assets/misans-500-49-KSfi7MW0.woff2 +0 -0
  241. package/web-dist/assets/misans-500-5-h1SBcwuW.woff2 +0 -0
  242. package/web-dist/assets/misans-500-50-CIVMfG11.woff2 +0 -0
  243. package/web-dist/assets/misans-500-51-BdeNBhBL.woff2 +0 -0
  244. package/web-dist/assets/misans-500-52-CEW4e7ex.woff2 +0 -0
  245. package/web-dist/assets/misans-500-53-lmPCsEnt.woff2 +0 -0
  246. package/web-dist/assets/misans-500-54-B_7AqKQW.woff2 +0 -0
  247. package/web-dist/assets/misans-500-55-B-3RtUnH.woff2 +0 -0
  248. package/web-dist/assets/misans-500-56-g6D0e0cW.woff2 +0 -0
  249. package/web-dist/assets/misans-500-57-D5hp5Yqr.woff2 +0 -0
  250. package/web-dist/assets/misans-500-58-ilnDgEKt.woff2 +0 -0
  251. package/web-dist/assets/misans-500-59-DJYXz8tr.woff2 +0 -0
  252. package/web-dist/assets/misans-500-6-uCdpdDQy.woff2 +0 -0
  253. package/web-dist/assets/misans-500-60-B3Iaqx0p.woff2 +0 -0
  254. package/web-dist/assets/misans-500-61-CMxqg5hc.woff2 +0 -0
  255. package/web-dist/assets/misans-500-62-7FY8O2NQ.woff2 +0 -0
  256. package/web-dist/assets/misans-500-63-JP6vEuJf.woff2 +0 -0
  257. package/web-dist/assets/misans-500-64-Cdub62jh.woff2 +0 -0
  258. package/web-dist/assets/misans-500-65-DVHk_mlC.woff2 +0 -0
  259. package/web-dist/assets/misans-500-66-BX39wRtF.woff2 +0 -0
  260. package/web-dist/assets/misans-500-67-BcsepI3X.woff2 +0 -0
  261. package/web-dist/assets/misans-500-68-etUIUjrh.woff2 +0 -0
  262. package/web-dist/assets/misans-500-69-DfhVmnuA.woff2 +0 -0
  263. package/web-dist/assets/misans-500-70-D6dgy6-B.woff2 +0 -0
  264. package/web-dist/assets/misans-500-71-PkeKjcVn.woff2 +0 -0
  265. package/web-dist/assets/misans-500-72-D66Fnb30.woff2 +0 -0
  266. package/web-dist/assets/misans-500-73-jr9z9870.woff2 +0 -0
  267. package/web-dist/assets/misans-500-74-DsCkPKwe.woff2 +0 -0
  268. package/web-dist/assets/misans-500-75-Dkooq6KM.woff2 +0 -0
  269. package/web-dist/assets/misans-500-76-B0sfieHl.woff2 +0 -0
  270. package/web-dist/assets/misans-500-77-8tflq1ji.woff2 +0 -0
  271. package/web-dist/assets/misans-500-78-COKdMbdp.woff2 +0 -0
  272. package/web-dist/assets/misans-500-79-Bm0rBjSF.woff2 +0 -0
  273. package/web-dist/assets/misans-500-80-B9OoAnyy.woff2 +0 -0
  274. package/web-dist/assets/misans-500-81-DsQ9tpfX.woff2 +0 -0
  275. package/web-dist/assets/misans-500-82-VKsL2Tk2.woff2 +0 -0
  276. package/web-dist/assets/misans-500-83-Ce6mfHYD.woff2 +0 -0
  277. package/web-dist/assets/misans-500-84-D7kPSZLm.woff2 +0 -0
  278. package/web-dist/assets/misans-500-85-W5L0cEfd.woff2 +0 -0
  279. package/web-dist/assets/misans-500-86-DukGOEET.woff2 +0 -0
  280. package/web-dist/assets/misans-500-87-BJ_Lok6j.woff2 +0 -0
  281. package/web-dist/assets/misans-500-88-DbJ11zcA.woff2 +0 -0
  282. package/web-dist/assets/misans-500-89-LNKcEq6M.woff2 +0 -0
  283. package/web-dist/assets/misans-500-90-DNDDgSCd.woff2 +0 -0
  284. package/web-dist/assets/misans-500-91-rT8Q0evu.woff2 +0 -0
  285. package/web-dist/assets/misans-500-97-c8zW_WRq.woff2 +0 -0
  286. package/web-dist/assets/misans-500-cyrillic-CLHOGwgx.woff2 +0 -0
  287. package/web-dist/assets/misans-500-extra-CTAMEQ59.woff2 +0 -0
  288. package/web-dist/assets/misans-500-latin-Be606ott.woff2 +0 -0
  289. package/web-dist/assets/misans-500-latin-ext-BzDyL4sU.woff2 +0 -0
  290. package/web-dist/assets/misans-500-vietnamese-DBOLOqZH.woff2 +0 -0
  291. package/web-dist/assets/mona-sans-latin-ext-wght-normal-BqSk0Z3x.woff2 +0 -0
  292. package/web-dist/assets/mona-sans-latin-wght-normal-Pz49MTQZ.woff2 +0 -0
  293. package/web-dist/assets/noto-sans-sc-100-wght-normal-DrqXJETY.woff2 +0 -0
  294. package/web-dist/assets/noto-sans-sc-101-wght-normal-c94LAl5p.woff2 +0 -0
  295. package/web-dist/assets/noto-sans-sc-102-wght-normal-C1RtbCZr.woff2 +0 -0
  296. package/web-dist/assets/noto-sans-sc-103-wght-normal-DGHo20nu.woff2 +0 -0
  297. package/web-dist/assets/noto-sans-sc-104-wght-normal-CJT2ioDJ.woff2 +0 -0
  298. package/web-dist/assets/noto-sans-sc-105-wght-normal-BFoiJwz2.woff2 +0 -0
  299. package/web-dist/assets/noto-sans-sc-106-wght-normal-D6uUHw3w.woff2 +0 -0
  300. package/web-dist/assets/noto-sans-sc-107-wght-normal-kFQzJDLH.woff2 +0 -0
  301. package/web-dist/assets/noto-sans-sc-108-wght-normal-7aXvqIa2.woff2 +0 -0
  302. package/web-dist/assets/noto-sans-sc-109-wght-normal-CnjNbNmw.woff2 +0 -0
  303. package/web-dist/assets/noto-sans-sc-110-wght-normal-D2JBr045.woff2 +0 -0
  304. package/web-dist/assets/noto-sans-sc-111-wght-normal-ClFr5QXM.woff2 +0 -0
  305. package/web-dist/assets/noto-sans-sc-112-wght-normal-CiZxJMyY.woff2 +0 -0
  306. package/web-dist/assets/noto-sans-sc-113-wght-normal-OgQXOX6x.woff2 +0 -0
  307. package/web-dist/assets/noto-sans-sc-114-wght-normal-CRH9SDZu.woff2 +0 -0
  308. package/web-dist/assets/noto-sans-sc-115-wght-normal-BN__2iBG.woff2 +0 -0
  309. package/web-dist/assets/noto-sans-sc-116-wght-normal-vdFVzbO2.woff2 +0 -0
  310. package/web-dist/assets/noto-sans-sc-117-wght-normal-Dsz3vkzU.woff2 +0 -0
  311. package/web-dist/assets/noto-sans-sc-118-wght-normal-BPEb0gM9.woff2 +0 -0
  312. package/web-dist/assets/noto-sans-sc-119-wght-normal-BfzSEbFz.woff2 +0 -0
  313. package/web-dist/assets/noto-sans-sc-21-wght-normal-DIu_1ZBI.woff2 +0 -0
  314. package/web-dist/assets/noto-sans-sc-22-wght-normal-VXjdYcT-.woff2 +0 -0
  315. package/web-dist/assets/noto-sans-sc-23-wght-normal-4HrHKhpL.woff2 +0 -0
  316. package/web-dist/assets/noto-sans-sc-24-wght-normal-B58DWgHS.woff2 +0 -0
  317. package/web-dist/assets/noto-sans-sc-25-wght-normal-C3Jm6l7O.woff2 +0 -0
  318. package/web-dist/assets/noto-sans-sc-26-wght-normal-YNOygvr_.woff2 +0 -0
  319. package/web-dist/assets/noto-sans-sc-27-wght-normal-BP2pEGQH.woff2 +0 -0
  320. package/web-dist/assets/noto-sans-sc-28-wght-normal-BWPKDbtH.woff2 +0 -0
  321. package/web-dist/assets/noto-sans-sc-29-wght-normal-45aVmHn_.woff2 +0 -0
  322. package/web-dist/assets/noto-sans-sc-30-wght-normal-B8_s30jZ.woff2 +0 -0
  323. package/web-dist/assets/noto-sans-sc-31-wght-normal-DW0t445S.woff2 +0 -0
  324. package/web-dist/assets/noto-sans-sc-32-wght-normal-ShbWPcei.woff2 +0 -0
  325. package/web-dist/assets/noto-sans-sc-33-wght-normal-BOTZYTjM.woff2 +0 -0
  326. package/web-dist/assets/noto-sans-sc-34-wght-normal-BF1rqDSt.woff2 +0 -0
  327. package/web-dist/assets/noto-sans-sc-35-wght-normal-Bosspiyr.woff2 +0 -0
  328. package/web-dist/assets/noto-sans-sc-36-wght-normal-CtU9CyKw.woff2 +0 -0
  329. package/web-dist/assets/noto-sans-sc-37-wght-normal-ghDiyiuv.woff2 +0 -0
  330. package/web-dist/assets/noto-sans-sc-38-wght-normal-4Nz8k_dt.woff2 +0 -0
  331. package/web-dist/assets/noto-sans-sc-39-wght-normal-Ddtm1XVC.woff2 +0 -0
  332. package/web-dist/assets/noto-sans-sc-4-wght-normal-BRbPMj-C.woff2 +0 -0
  333. package/web-dist/assets/noto-sans-sc-40-wght-normal-BVn4-kgX.woff2 +0 -0
  334. package/web-dist/assets/noto-sans-sc-41-wght-normal-CZqajZnl.woff2 +0 -0
  335. package/web-dist/assets/noto-sans-sc-42-wght-normal-CQ4lY28u.woff2 +0 -0
  336. package/web-dist/assets/noto-sans-sc-43-wght-normal-psppu0d8.woff2 +0 -0
  337. package/web-dist/assets/noto-sans-sc-44-wght-normal-cbKJlTUe.woff2 +0 -0
  338. package/web-dist/assets/noto-sans-sc-45-wght-normal-MKIEVRIC.woff2 +0 -0
  339. package/web-dist/assets/noto-sans-sc-46-wght-normal-CErGc6Mt.woff2 +0 -0
  340. package/web-dist/assets/noto-sans-sc-47-wght-normal-C5Kgg1_m.woff2 +0 -0
  341. package/web-dist/assets/noto-sans-sc-48-wght-normal-DFMjDDY6.woff2 +0 -0
  342. package/web-dist/assets/noto-sans-sc-49-wght-normal-B7l_3BZr.woff2 +0 -0
  343. package/web-dist/assets/noto-sans-sc-5-wght-normal-DI846rD9.woff2 +0 -0
  344. package/web-dist/assets/noto-sans-sc-50-wght-normal-C5KfAmFp.woff2 +0 -0
  345. package/web-dist/assets/noto-sans-sc-51-wght-normal-C2bq6hC8.woff2 +0 -0
  346. package/web-dist/assets/noto-sans-sc-52-wght-normal-P18e_Y0j.woff2 +0 -0
  347. package/web-dist/assets/noto-sans-sc-53-wght-normal-Bgkuo2tF.woff2 +0 -0
  348. package/web-dist/assets/noto-sans-sc-54-wght-normal-DL5lmlUd.woff2 +0 -0
  349. package/web-dist/assets/noto-sans-sc-55-wght-normal-BV_Oy6IF.woff2 +0 -0
  350. package/web-dist/assets/noto-sans-sc-56-wght-normal-B4L7Hj8f.woff2 +0 -0
  351. package/web-dist/assets/noto-sans-sc-57-wght-normal-DU8YBsDj.woff2 +0 -0
  352. package/web-dist/assets/noto-sans-sc-58-wght-normal-CE0BKS9u.woff2 +0 -0
  353. package/web-dist/assets/noto-sans-sc-59-wght-normal-Azv2Ku9_.woff2 +0 -0
  354. package/web-dist/assets/noto-sans-sc-6-wght-normal-ozUCEY9O.woff2 +0 -0
  355. package/web-dist/assets/noto-sans-sc-60-wght-normal-C1lngC61.woff2 +0 -0
  356. package/web-dist/assets/noto-sans-sc-61-wght-normal-BxWkGF5M.woff2 +0 -0
  357. package/web-dist/assets/noto-sans-sc-62-wght-normal-CXXMAq-5.woff2 +0 -0
  358. package/web-dist/assets/noto-sans-sc-63-wght-normal-4La5uKvS.woff2 +0 -0
  359. package/web-dist/assets/noto-sans-sc-64-wght-normal-CbIuD2Eg.woff2 +0 -0
  360. package/web-dist/assets/noto-sans-sc-65-wght-normal-BGqvKda2.woff2 +0 -0
  361. package/web-dist/assets/noto-sans-sc-66-wght-normal-BvNozWOY.woff2 +0 -0
  362. package/web-dist/assets/noto-sans-sc-67-wght-normal-CC-WRBV-.woff2 +0 -0
  363. package/web-dist/assets/noto-sans-sc-68-wght-normal-c0FjfUaj.woff2 +0 -0
  364. package/web-dist/assets/noto-sans-sc-69-wght-normal-D596Jjl2.woff2 +0 -0
  365. package/web-dist/assets/noto-sans-sc-70-wght-normal-ColEcmtJ.woff2 +0 -0
  366. package/web-dist/assets/noto-sans-sc-71-wght-normal-ChZfXpdg.woff2 +0 -0
  367. package/web-dist/assets/noto-sans-sc-72-wght-normal-D1VyfEG3.woff2 +0 -0
  368. package/web-dist/assets/noto-sans-sc-73-wght-normal-DwSJRYPJ.woff2 +0 -0
  369. package/web-dist/assets/noto-sans-sc-74-wght-normal-Cte7o1QG.woff2 +0 -0
  370. package/web-dist/assets/noto-sans-sc-75-wght-normal-B0qL41rF.woff2 +0 -0
  371. package/web-dist/assets/noto-sans-sc-76-wght-normal-BPLMO_2x.woff2 +0 -0
  372. package/web-dist/assets/noto-sans-sc-77-wght-normal-Dkbi3pye.woff2 +0 -0
  373. package/web-dist/assets/noto-sans-sc-78-wght-normal-BFUXeSw6.woff2 +0 -0
  374. package/web-dist/assets/noto-sans-sc-79-wght-normal-DoJG4UTB.woff2 +0 -0
  375. package/web-dist/assets/noto-sans-sc-80-wght-normal-BEFypWOO.woff2 +0 -0
  376. package/web-dist/assets/noto-sans-sc-81-wght-normal-ed_TZlfo.woff2 +0 -0
  377. package/web-dist/assets/noto-sans-sc-82-wght-normal-DcxfR5OJ.woff2 +0 -0
  378. package/web-dist/assets/noto-sans-sc-83-wght-normal-C9UjAcMM.woff2 +0 -0
  379. package/web-dist/assets/noto-sans-sc-84-wght-normal-C7NxT478.woff2 +0 -0
  380. package/web-dist/assets/noto-sans-sc-85-wght-normal-DBcDBu1n.woff2 +0 -0
  381. package/web-dist/assets/noto-sans-sc-86-wght-normal-CLJIoPpl.woff2 +0 -0
  382. package/web-dist/assets/noto-sans-sc-87-wght-normal-DYfJ-vGE.woff2 +0 -0
  383. package/web-dist/assets/noto-sans-sc-88-wght-normal-ClNDOCGW.woff2 +0 -0
  384. package/web-dist/assets/noto-sans-sc-89-wght-normal-IQU_KQA8.woff2 +0 -0
  385. package/web-dist/assets/noto-sans-sc-90-wght-normal-BWcrRNoG.woff2 +0 -0
  386. package/web-dist/assets/noto-sans-sc-91-wght-normal-CGekvDdH.woff2 +0 -0
  387. package/web-dist/assets/noto-sans-sc-97-wght-normal-BsBHkXi3.woff2 +0 -0
  388. package/web-dist/assets/noto-sans-sc-98-wght-normal-BZqSA1r_.woff2 +0 -0
  389. package/web-dist/assets/noto-sans-sc-99-wght-normal-Q_IptJM5.woff2 +0 -0
  390. package/web-dist/assets/noto-sans-sc-cyrillic-wght-normal-CRA5_Pf1.woff2 +0 -0
  391. package/web-dist/assets/noto-sans-sc-latin-ext-wght-normal-CqPqLCfe.woff2 +0 -0
  392. package/web-dist/assets/noto-sans-sc-latin-wght-normal-DYAKOyvl.woff2 +0 -0
  393. package/web-dist/assets/noto-sans-sc-vietnamese-wght-normal-y5SU35Rl.woff2 +0 -0
  394. package/web-dist/assets/ordinal-Cboi1Yqb.js +1 -0
  395. package/web-dist/assets/pegDiagram-XKGWAZYB-CLEM1SDU.js +1 -0
  396. package/web-dist/assets/pieDiagram-E7YTZNPT-B__g6eF0.js +39 -0
  397. package/web-dist/assets/quadrantDiagram-AXDQQJYC-C7VQ2LMY.js +7 -0
  398. package/web-dist/assets/railroadDiagram-O6MQD6OU-eWNnzjwS.js +1 -0
  399. package/web-dist/assets/requirementDiagram-BXWQKSXE-Bi5qeD4b.js +84 -0
  400. package/web-dist/assets/sankeyDiagram-P5KCCOFB-DG1VOpXX.js +40 -0
  401. package/web-dist/assets/sequenceDiagram-WJ2MYXX4-Fhkw73Th.js +162 -0
  402. package/web-dist/assets/sizeCapture-INFHLROL-D9E_17SF.js +1 -0
  403. package/web-dist/assets/stateDiagram-D77RDMKH-Cs5Y0xhW.js +1 -0
  404. package/web-dist/assets/stateDiagram-v2-MP3YSRHH-CEM51fAf.js +1 -0
  405. package/web-dist/assets/swimlanes-42K2YHIH-t-EocvKZ.js +1 -0
  406. package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BrR66vrK.js +8 -0
  407. package/web-dist/assets/timeline-definition-24CTP7MA-CozGCxuA.js +120 -0
  408. package/web-dist/assets/vennDiagram-4TSXK5OY-ewU8ycSa.js +34 -0
  409. package/web-dist/assets/wardleyDiagram-VM6X3IG4-DuAhDu-0.js +78 -0
  410. package/web-dist/assets/{xterm-B2oS8Mg8.js → xterm-v5e56GC9.js} +1 -1
  411. package/web-dist/assets/xychartDiagram-S5SC5T6Z-BxGuZO23.js +7 -0
  412. package/web-dist/fonts-licenses/ibm-plex-sans-condensed.txt +93 -0
  413. package/web-dist/fonts-licenses/ibm-plex-sans.txt +93 -0
  414. package/web-dist/fonts-licenses/jetbrains-mono.txt +93 -0
  415. package/web-dist/fonts-licenses/misans.txt +119 -0
  416. package/web-dist/fonts-licenses/mona-sans.txt +93 -0
  417. package/web-dist/fonts-licenses/noto-sans-sc.txt +93 -0
  418. package/web-dist/index.html +18 -4
  419. package/web-dist/workflow-ui.css +261 -0
  420. package/dist/chunk-3I2XOPJB.js.map +0 -1
  421. package/dist/chunk-A3QANMU5.js.map +0 -1
  422. package/dist/chunk-L2H3K4DT.js +0 -7
  423. package/dist/chunk-L2H3K4DT.js.map +0 -1
  424. package/dist/chunk-S3BI6R7I.js +0 -14
  425. package/dist/chunk-S3BI6R7I.js.map +0 -1
  426. package/web-dist/assets/highlighter-CUb4XKtQ.js +0 -2
  427. package/web-dist/assets/index-CmfumtXy.js +0 -570
  428. package/web-dist/assets/index-Ywc2uM5u.css +0 -1
package/dist/api/types.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import {
2
+ MACHINE_PHASES,
2
3
  TICKET_SLUG_PATTERN
3
- } from "../chunk-L2H3K4DT.js";
4
+ } from "../chunk-JKJXQTHH.js";
4
5
  import "../chunk-B5IP37ZQ.js";
5
6
  export {
7
+ MACHINE_PHASES,
6
8
  TICKET_SLUG_PATTERN
7
9
  };
8
10
  //# sourceMappingURL=types.js.map
@@ -1,3 +1,6 @@
1
+ /** How a session was established, as stored. NULL on rows formed before the column existed. */
2
+ type SessionViaValue = "password" | "desktop" | "setup" | "cli";
3
+
1
4
  /** An hour: long enough for a controller to finish, short enough to forget. */
2
5
  declare const CLI_TOKEN_TTL_MS: number;
3
6
  /**
@@ -5,6 +8,22 @@ declare const CLI_TOKEN_TTL_MS: number;
5
8
  * a token that lives in a file must not outlive an ordinary browser session.
6
9
  */
7
10
  declare const CLI_TOKEN_MAX_TTL_MS: number;
11
+ /**
12
+ * What a minted row records about how its session was established.
13
+ *
14
+ * `cli` is the default and what `penguin auth token` writes: a session that behaves like a
15
+ * password one in every way. `desktop` is for the desktop shell signing its own window in
16
+ * against a server it did not spawn, and says the same thing its one-shot claim token says —
17
+ * with as much backing, since only an account that can write this file can mint at all.
18
+ *
19
+ * The distinction is not cosmetic: a desktop session may set a password without supplying the
20
+ * current one, because the account the shell created has a password that was generated,
21
+ * hashed and discarded unseen — there is nothing to supply, and whoever can write to this
22
+ * data root can already reset that password offline (`penguin server reset-admin-password`).
23
+ * That allowance is granted by a server running in desktop mode; against any other server the
24
+ * value records what the session is without widening what it may do (routes/me.ts).
25
+ */
26
+ type MintedVia = Extract<SessionViaValue, "cli" | "desktop">;
8
27
  type MintTokenResult = {
9
28
  outcome: "minted";
10
29
  token: string;
@@ -24,6 +43,8 @@ declare function mintApiToken(root: string, opts?: {
24
43
  ttlMs?: number;
25
44
  dbPath?: string;
26
45
  now?: Date;
46
+ /** How the session records its own establishment; `cli` unless told otherwise. */
47
+ via?: MintedVia;
27
48
  }): MintTokenResult;
28
49
 
29
- export { CLI_TOKEN_MAX_TTL_MS, CLI_TOKEN_TTL_MS, type MintTokenResult, mintApiToken };
50
+ export { CLI_TOKEN_MAX_TTL_MS, CLI_TOKEN_TTL_MS, type MintTokenResult, type MintedVia, mintApiToken };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-TOOTEEM4.js";
5
5
  import {
6
6
  openExistingDatabase
7
- } from "./chunk-A3QANMU5.js";
7
+ } from "./chunk-NVWAYYRX.js";
8
8
  import "./chunk-B5IP37ZQ.js";
9
9
 
10
10
  // src/auth-token.ts
@@ -35,7 +35,7 @@ function mintApiToken(root, opts = {}) {
35
35
  }
36
36
  const { token, expiresAt } = wire(AuthSessionsRepo, { db }).issue({
37
37
  userId,
38
- via: "cli",
38
+ via: opts.via ?? "cli",
39
39
  now: opts.now ?? /* @__PURE__ */ new Date(),
40
40
  ttlMs: opts.ttlMs ?? CLI_TOKEN_TTL_MS,
41
41
  maxTtlMs: CLI_TOKEN_MAX_TTL_MS
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth-token.ts"],"sourcesContent":["/**\n * Mints an API session by inserting a row into the root's `web.db` — no running server needed.\n * Authorized by being able to read and write that root, which already holds every credential\n * the token could reach. On a multi-user box that means the OS account running the server;\n * everyone else signs in with `penguin auth login --server <url>`.\n */\nimport path from \"node:path\";\nimport fs from \"node:fs\";\nimport { openExistingDatabase } from \"./db/database.js\";\nimport { AuthSessionsRepo } from \"./db/repos/auth-sessions.js\";\nimport { UsersRepo } from \"./db/repos/users.js\";\nimport { wire } from \"@prismshadow/penguin-core/kernel\";\n\n/** An hour: long enough for a controller to finish, short enough to forget. */\nexport const CLI_TOKEN_TTL_MS = 60 * 60_000;\n\n/**\n * Ceiling on a caller-supplied `--ttl-seconds`, matching the default session TTL (config.ts):\n * a token that lives in a file must not outlive an ordinary browser session.\n */\nexport const CLI_TOKEN_MAX_TTL_MS = 30 * 24 * 60 * 60_000;\n\nexport type MintTokenResult =\n | { outcome: \"minted\"; token: string; userId: string; expiresAt: string }\n /** No web.db on this root — the server has never run here, so there is no account to mint for. */\n | { outcome: \"no_server\" }\n | { outcome: \"failed\"; detail: string };\n\n/**\n * Turns a failure into something the person at the terminal can act on. Both cases are\n * ordinary situations, not crashes: a database owned by another OS account, and one written\n * by an older release (minting deliberately does not migrate — see openExistingDatabase).\n */\nfunction explain(err: unknown, dbPath: string): string {\n const message = err instanceof Error ? err.message : String(err);\n if (message.includes(\"no column named via\")) {\n return `${dbPath} predates this release — start the server once (\\`penguin web\\`) to upgrade it`;\n }\n if (message.includes(\"unable to open database\")) {\n return (\n `cannot open ${dbPath} — minting needs the data root's own OS account; ` +\n \"otherwise sign in with `penguin auth login --server <url>`\"\n );\n }\n return message;\n}\n\n/** Issues an API session token for the data root at `root`. */\nexport function mintApiToken(\n root: string,\n opts: { userId?: string; ttlMs?: number; dbPath?: string; now?: Date } = {},\n): MintTokenResult {\n const userId = opts.userId ?? \"admin\";\n const dbPath = opts.dbPath ?? path.join(root, \"web.db\");\n // Existence check first: openExistingDatabase would otherwise create an empty file, and a\n // root with no web.db has no account to mint for.\n if (!fs.existsSync(dbPath)) return { outcome: \"no_server\" };\n\n let db: ReturnType<typeof openExistingDatabase> | null = null;\n try {\n db = openExistingDatabase(dbPath);\n if (wire(UsersRepo, { db: db }).findById(userId) === null) {\n return { outcome: \"failed\", detail: `no such account: ${userId}` };\n }\n // The repo is the single minting point (token shape, hash, TTL ceiling), so a CLI-minted\n // row cannot drift from one the server issues itself.\n const { token, expiresAt } = wire(AuthSessionsRepo, { db: db }).issue({\n userId,\n via: \"cli\",\n now: opts.now ?? new Date(),\n ttlMs: opts.ttlMs ?? CLI_TOKEN_TTL_MS,\n maxTtlMs: CLI_TOKEN_MAX_TTL_MS,\n });\n return { outcome: \"minted\", token, userId, expiresAt };\n } catch (err) {\n return { outcome: \"failed\", detail: explain(err, dbPath) };\n } finally {\n db?.close();\n }\n}\n"],"mappings":";;;;;;;;;;AAMA,OAAO,UAAU;AACjB,OAAO,QAAQ;AAIf,SAAS,YAAY;AAGd,IAAM,mBAAmB,KAAK;AAM9B,IAAM,uBAAuB,KAAK,KAAK,KAAK;AAanD,SAAS,QAAQ,KAAc,QAAwB;AACrD,QAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,MAAI,QAAQ,SAAS,qBAAqB,GAAG;AAC3C,WAAO,GAAG,MAAM;AAAA,EAClB;AACA,MAAI,QAAQ,SAAS,yBAAyB,GAAG;AAC/C,WACE,eAAe,MAAM;AAAA,EAGzB;AACA,SAAO;AACT;AAGO,SAAS,aACd,MACA,OAAyE,CAAC,GACzD;AACjB,QAAM,SAAS,KAAK,UAAU;AAC9B,QAAM,SAAS,KAAK,UAAU,KAAK,KAAK,MAAM,QAAQ;AAGtD,MAAI,CAAC,GAAG,WAAW,MAAM,EAAG,QAAO,EAAE,SAAS,YAAY;AAE1D,MAAI,KAAqD;AACzD,MAAI;AACF,SAAK,qBAAqB,MAAM;AAChC,QAAI,KAAK,WAAW,EAAE,GAAO,CAAC,EAAE,SAAS,MAAM,MAAM,MAAM;AACzD,aAAO,EAAE,SAAS,UAAU,QAAQ,oBAAoB,MAAM,GAAG;AAAA,IACnE;AAGA,UAAM,EAAE,OAAO,UAAU,IAAI,KAAK,kBAAkB,EAAE,GAAO,CAAC,EAAE,MAAM;AAAA,MACpE;AAAA,MACA,KAAK;AAAA,MACL,KAAK,KAAK,OAAO,oBAAI,KAAK;AAAA,MAC1B,OAAO,KAAK,SAAS;AAAA,MACrB,UAAU;AAAA,IACZ,CAAC;AACD,WAAO,EAAE,SAAS,UAAU,OAAO,QAAQ,UAAU;AAAA,EACvD,SAAS,KAAK;AACZ,WAAO,EAAE,SAAS,UAAU,QAAQ,QAAQ,KAAK,MAAM,EAAE;AAAA,EAC3D,UAAE;AACA,QAAI,MAAM;AAAA,EACZ;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/auth-token.ts"],"sourcesContent":["/**\n * Mints an API session by inserting a row into the root's `web.db` — no running server needed.\n * Authorized by being able to read and write that root, which already holds every credential\n * the token could reach. On a multi-user box that means the OS account running the server;\n * everyone else signs in with `penguin auth login --server <url>`.\n */\nimport path from \"node:path\";\nimport fs from \"node:fs\";\nimport { openExistingDatabase } from \"./db/database.js\";\nimport { AuthSessionsRepo } from \"./db/repos/auth-sessions.js\";\nimport type { SessionViaValue } from \"./db/repos/auth-sessions.js\";\nimport { UsersRepo } from \"./db/repos/users.js\";\nimport { wire } from \"@prismshadow/penguin-core/kernel\";\n\n/** An hour: long enough for a controller to finish, short enough to forget. */\nexport const CLI_TOKEN_TTL_MS = 60 * 60_000;\n\n/**\n * Ceiling on a caller-supplied `--ttl-seconds`, matching the default session TTL (config.ts):\n * a token that lives in a file must not outlive an ordinary browser session.\n */\nexport const CLI_TOKEN_MAX_TTL_MS = 30 * 24 * 60 * 60_000;\n\n/**\n * What a minted row records about how its session was established.\n *\n * `cli` is the default and what `penguin auth token` writes: a session that behaves like a\n * password one in every way. `desktop` is for the desktop shell signing its own window in\n * against a server it did not spawn, and says the same thing its one-shot claim token says —\n * with as much backing, since only an account that can write this file can mint at all.\n *\n * The distinction is not cosmetic: a desktop session may set a password without supplying the\n * current one, because the account the shell created has a password that was generated,\n * hashed and discarded unseen — there is nothing to supply, and whoever can write to this\n * data root can already reset that password offline (`penguin server reset-admin-password`).\n * That allowance is granted by a server running in desktop mode; against any other server the\n * value records what the session is without widening what it may do (routes/me.ts).\n */\nexport type MintedVia = Extract<SessionViaValue, \"cli\" | \"desktop\">;\n\nexport type MintTokenResult =\n | { outcome: \"minted\"; token: string; userId: string; expiresAt: string }\n /** No web.db on this root — the server has never run here, so there is no account to mint for. */\n | { outcome: \"no_server\" }\n | { outcome: \"failed\"; detail: string };\n\n/**\n * Turns a failure into something the person at the terminal can act on. Both cases are\n * ordinary situations, not crashes: a database owned by another OS account, and one written\n * by an older release (minting deliberately does not migrate — see openExistingDatabase).\n */\nfunction explain(err: unknown, dbPath: string): string {\n const message = err instanceof Error ? err.message : String(err);\n if (message.includes(\"no column named via\")) {\n return `${dbPath} predates this release — start the server once (\\`penguin web\\`) to upgrade it`;\n }\n if (message.includes(\"unable to open database\")) {\n return (\n `cannot open ${dbPath} — minting needs the data root's own OS account; ` +\n \"otherwise sign in with `penguin auth login --server <url>`\"\n );\n }\n return message;\n}\n\n/** Issues an API session token for the data root at `root`. */\nexport function mintApiToken(\n root: string,\n opts: {\n userId?: string;\n ttlMs?: number;\n dbPath?: string;\n now?: Date;\n /** How the session records its own establishment; `cli` unless told otherwise. */\n via?: MintedVia;\n } = {},\n): MintTokenResult {\n const userId = opts.userId ?? \"admin\";\n const dbPath = opts.dbPath ?? path.join(root, \"web.db\");\n // Existence check first: openExistingDatabase would otherwise create an empty file, and a\n // root with no web.db has no account to mint for.\n if (!fs.existsSync(dbPath)) return { outcome: \"no_server\" };\n\n let db: ReturnType<typeof openExistingDatabase> | null = null;\n try {\n db = openExistingDatabase(dbPath);\n if (wire(UsersRepo, { db: db }).findById(userId) === null) {\n return { outcome: \"failed\", detail: `no such account: ${userId}` };\n }\n // The repo is the single minting point (token shape, hash, TTL ceiling), so a CLI-minted\n // row cannot drift from one the server issues itself.\n const { token, expiresAt } = wire(AuthSessionsRepo, { db: db }).issue({\n userId,\n via: opts.via ?? \"cli\",\n now: opts.now ?? new Date(),\n ttlMs: opts.ttlMs ?? CLI_TOKEN_TTL_MS,\n maxTtlMs: CLI_TOKEN_MAX_TTL_MS,\n });\n return { outcome: \"minted\", token, userId, expiresAt };\n } catch (err) {\n return { outcome: \"failed\", detail: explain(err, dbPath) };\n } finally {\n db?.close();\n }\n}\n"],"mappings":";;;;;;;;;;AAMA,OAAO,UAAU;AACjB,OAAO,QAAQ;AAKf,SAAS,YAAY;AAGd,IAAM,mBAAmB,KAAK;AAM9B,IAAM,uBAAuB,KAAK,KAAK,KAAK;AA8BnD,SAAS,QAAQ,KAAc,QAAwB;AACrD,QAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,MAAI,QAAQ,SAAS,qBAAqB,GAAG;AAC3C,WAAO,GAAG,MAAM;AAAA,EAClB;AACA,MAAI,QAAQ,SAAS,yBAAyB,GAAG;AAC/C,WACE,eAAe,MAAM;AAAA,EAGzB;AACA,SAAO;AACT;AAGO,SAAS,aACd,MACA,OAOI,CAAC,GACY;AACjB,QAAM,SAAS,KAAK,UAAU;AAC9B,QAAM,SAAS,KAAK,UAAU,KAAK,KAAK,MAAM,QAAQ;AAGtD,MAAI,CAAC,GAAG,WAAW,MAAM,EAAG,QAAO,EAAE,SAAS,YAAY;AAE1D,MAAI,KAAqD;AACzD,MAAI;AACF,SAAK,qBAAqB,MAAM;AAChC,QAAI,KAAK,WAAW,EAAE,GAAO,CAAC,EAAE,SAAS,MAAM,MAAM,MAAM;AACzD,aAAO,EAAE,SAAS,UAAU,QAAQ,oBAAoB,MAAM,GAAG;AAAA,IACnE;AAGA,UAAM,EAAE,OAAO,UAAU,IAAI,KAAK,kBAAkB,EAAE,GAAO,CAAC,EAAE,MAAM;AAAA,MACpE;AAAA,MACA,KAAK,KAAK,OAAO;AAAA,MACjB,KAAK,KAAK,OAAO,oBAAI,KAAK;AAAA,MAC1B,OAAO,KAAK,SAAS;AAAA,MACrB,UAAU;AAAA,IACZ,CAAC;AACD,WAAO,EAAE,SAAS,UAAU,OAAO,QAAQ,UAAU;AAAA,EACvD,SAAS,KAAK;AACZ,WAAO,EAAE,SAAS,UAAU,QAAQ,QAAQ,KAAK,MAAM,EAAE;AAAA,EAC3D,UAAE;AACA,QAAI,MAAM;AAAA,EACZ;AACF;","names":[]}
@@ -0,0 +1,39 @@
1
+ /** Why a path cannot go up as a Benchmark package; the caller words it. */
2
+ type BenchmarkUploadProblem = {
3
+ kind: "missing";
4
+ }
5
+ /** Neither a folder nor a file. */
6
+ | {
7
+ kind: "unsupported";
8
+ } | {
9
+ kind: "tooManyFiles";
10
+ limit: number;
11
+ }
12
+ /** `file` is the entry's path inside the folder. */
13
+ | {
14
+ kind: "fileTooLarge";
15
+ file: string;
16
+ limitBytes: number;
17
+ }
18
+ /** The folder's files add up to more than the package may hold. */
19
+ | {
20
+ kind: "tooLarge";
21
+ limitBytes: number;
22
+ }
23
+ /** The zip, given or made, is larger than an upload may be. */
24
+ | {
25
+ kind: "zipTooLarge";
26
+ limitBytes: number;
27
+ };
28
+ declare class BenchmarkUploadError extends Error {
29
+ readonly problem: BenchmarkUploadProblem;
30
+ constructor(problem: BenchmarkUploadProblem);
31
+ }
32
+ /**
33
+ * The bytes to upload for `source`: the zip file itself, or the folder zipped as the module doc
34
+ * says. Throws BenchmarkUploadError for a path that cannot go up (nothing there, past a cap), and
35
+ * whatever the filesystem throws for a path it cannot read.
36
+ */
37
+ declare function readBenchmarkUpload(source: string): Promise<Uint8Array>;
38
+
39
+ export { BenchmarkUploadError, type BenchmarkUploadProblem, readBenchmarkUpload };
@@ -0,0 +1,97 @@
1
+ import {
2
+ MAX_ARCHIVE_BYTES,
3
+ MAX_BENCHMARK_ARCHIVE_FILES,
4
+ MAX_FILE_BYTES,
5
+ MAX_TOTAL_BYTES
6
+ } from "./chunk-54E64LWB.js";
7
+ import "./chunk-Q4ON2L6E.js";
8
+ import "./chunk-B5IP37ZQ.js";
9
+
10
+ // src/benchmark-package.ts
11
+ import fs from "fs/promises";
12
+ import path from "path";
13
+ import { strToU8, zipSync } from "fflate";
14
+ var BenchmarkUploadError = class extends Error {
15
+ constructor(problem) {
16
+ super(`Not a Benchmark package upload: ${problem.kind}`);
17
+ this.problem = problem;
18
+ this.name = "BenchmarkUploadError";
19
+ }
20
+ problem;
21
+ };
22
+ var UNIX_HOST = 3;
23
+ function specialMode(entry) {
24
+ if (entry.isSymbolicLink()) return 41471;
25
+ if (entry.isSocket()) return 49572;
26
+ if (entry.isBlockDevice()) return 24996;
27
+ if (entry.isCharacterDevice()) return 8612;
28
+ return 4516;
29
+ }
30
+ function byName(a, b) {
31
+ return a.name < b.name ? -1 : a.name > b.name ? 1 : 0;
32
+ }
33
+ async function readBenchmarkUpload(source) {
34
+ let stat;
35
+ try {
36
+ stat = await fs.stat(source);
37
+ } catch (error) {
38
+ if (error.code === "ENOENT") {
39
+ throw new BenchmarkUploadError({ kind: "missing" });
40
+ }
41
+ throw error;
42
+ }
43
+ const zipTooLarge = () => new BenchmarkUploadError({ kind: "zipTooLarge", limitBytes: MAX_ARCHIVE_BYTES });
44
+ if (stat.isFile()) {
45
+ if (stat.size > MAX_ARCHIVE_BYTES) throw zipTooLarge();
46
+ return new Uint8Array(await fs.readFile(source));
47
+ }
48
+ if (!stat.isDirectory()) throw new BenchmarkUploadError({ kind: "unsupported" });
49
+ const files = {};
50
+ let count = 0;
51
+ let total = 0;
52
+ const walk = async (dir, prefix) => {
53
+ const entries = await fs.readdir(dir, { withFileTypes: true });
54
+ for (const entry of entries.sort(byName)) {
55
+ const abs = path.join(dir, entry.name);
56
+ const name = `${prefix}${entry.name}`;
57
+ if (entry.isDirectory()) {
58
+ await walk(abs, `${name}/`);
59
+ continue;
60
+ }
61
+ count += 1;
62
+ if (count > MAX_BENCHMARK_ARCHIVE_FILES) {
63
+ throw new BenchmarkUploadError({
64
+ kind: "tooManyFiles",
65
+ limit: MAX_BENCHMARK_ARCHIVE_FILES
66
+ });
67
+ }
68
+ if (!entry.isFile()) {
69
+ const target = entry.isSymbolicLink() ? await fs.readlink(abs).catch(() => "") : "";
70
+ files[name] = [strToU8(target), { os: UNIX_HOST, attrs: specialMode(entry) << 16 }];
71
+ continue;
72
+ }
73
+ const size = (await fs.stat(abs)).size;
74
+ if (size > MAX_FILE_BYTES) {
75
+ throw new BenchmarkUploadError({
76
+ kind: "fileTooLarge",
77
+ file: name,
78
+ limitBytes: MAX_FILE_BYTES
79
+ });
80
+ }
81
+ total += size;
82
+ if (total > MAX_TOTAL_BYTES) {
83
+ throw new BenchmarkUploadError({ kind: "tooLarge", limitBytes: MAX_TOTAL_BYTES });
84
+ }
85
+ files[name] = new Uint8Array(await fs.readFile(abs));
86
+ }
87
+ };
88
+ await walk(source, "");
89
+ const zip = zipSync(files);
90
+ if (zip.byteLength > MAX_ARCHIVE_BYTES) throw zipTooLarge();
91
+ return zip;
92
+ }
93
+ export {
94
+ BenchmarkUploadError,
95
+ readBenchmarkUpload
96
+ };
97
+ //# sourceMappingURL=benchmark-package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/benchmark-package.ts"],"sourcesContent":["/**\n * A Benchmark package on this machine as the zip `POST /api/projects/:p/benchmarks/archive` takes:\n * what `penguin benchmark import` uploads. A zip file goes as it is. A folder is zipped whole, its\n * entries at the zip's root and nothing left out — dot-entries, stray files and links included, a\n * link as a link — so that the server's checks (services/benchmark-archive.ts) see what the folder\n * holds and refuse by name what a package may not carry. Nothing is trimmed here: an Agent that\n * imports a folder gets the verdict a person uploading its zip would.\n *\n * The folder is held to the import's caps while it is read — 1000 files, 5MB a file, 20MB in all,\n * 14MB zipped — so a wrong path (a whole repository, say) fails at once rather than being read\n * into memory for the server to refuse.\n *\n * Published as `@prismshadow/penguin-server/benchmark-package`, side-effect-free and without the\n * server, for the CLI.\n */\nimport type { Dirent, Stats } from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { strToU8, zipSync, type Zippable } from \"fflate\";\nimport {\n MAX_ARCHIVE_BYTES,\n MAX_BENCHMARK_ARCHIVE_FILES,\n MAX_FILE_BYTES,\n MAX_TOTAL_BYTES,\n} from \"./services/skill-import-limits.js\";\n\n/** Why a path cannot go up as a Benchmark package; the caller words it. */\nexport type BenchmarkUploadProblem =\n | { kind: \"missing\" }\n /** Neither a folder nor a file. */\n | { kind: \"unsupported\" }\n | { kind: \"tooManyFiles\"; limit: number }\n /** `file` is the entry's path inside the folder. */\n | { kind: \"fileTooLarge\"; file: string; limitBytes: number }\n /** The folder's files add up to more than the package may hold. */\n | { kind: \"tooLarge\"; limitBytes: number }\n /** The zip, given or made, is larger than an upload may be. */\n | { kind: \"zipTooLarge\"; limitBytes: number };\n\nexport class BenchmarkUploadError extends Error {\n constructor(readonly problem: BenchmarkUploadProblem) {\n super(`Not a Benchmark package upload: ${problem.kind}`);\n this.name = \"BenchmarkUploadError\";\n }\n}\n\n/** The zip format's host id for Unix: an entry's high attribute bits are then its `st_mode`. */\nconst UNIX_HOST = 3;\n\n/** The `st_mode` an entry that is neither a file nor a directory is recorded with. */\nfunction specialMode(entry: Dirent): number {\n if (entry.isSymbolicLink()) return 0o120777;\n if (entry.isSocket()) return 0o140644;\n if (entry.isBlockDevice()) return 0o060644;\n if (entry.isCharacterDevice()) return 0o020644;\n return 0o010644; // a FIFO, or a type this platform does not name\n}\n\n/** Code-unit order: the same zip from the same folder, whatever the locale. */\nfunction byName(a: Dirent, b: Dirent): number {\n return a.name < b.name ? -1 : a.name > b.name ? 1 : 0;\n}\n\n/**\n * The bytes to upload for `source`: the zip file itself, or the folder zipped as the module doc\n * says. Throws BenchmarkUploadError for a path that cannot go up (nothing there, past a cap), and\n * whatever the filesystem throws for a path it cannot read.\n */\nexport async function readBenchmarkUpload(source: string): Promise<Uint8Array> {\n let stat: Stats;\n try {\n stat = await fs.stat(source);\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n throw new BenchmarkUploadError({ kind: \"missing\" });\n }\n throw error;\n }\n const zipTooLarge = () =>\n new BenchmarkUploadError({ kind: \"zipTooLarge\", limitBytes: MAX_ARCHIVE_BYTES });\n if (stat.isFile()) {\n if (stat.size > MAX_ARCHIVE_BYTES) throw zipTooLarge();\n return new Uint8Array(await fs.readFile(source));\n }\n if (!stat.isDirectory()) throw new BenchmarkUploadError({ kind: \"unsupported\" });\n\n const files: Zippable = {};\n let count = 0;\n let total = 0;\n const walk = async (dir: string, prefix: string): Promise<void> => {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n for (const entry of entries.sort(byName)) {\n const abs = path.join(dir, entry.name);\n const name = `${prefix}${entry.name}`;\n if (entry.isDirectory()) {\n await walk(abs, `${name}/`);\n continue;\n }\n count += 1;\n if (count > MAX_BENCHMARK_ARCHIVE_FILES) {\n throw new BenchmarkUploadError({\n kind: \"tooManyFiles\",\n limit: MAX_BENCHMARK_ARCHIVE_FILES,\n });\n }\n if (!entry.isFile()) {\n // A link or a special file goes in as what it is, its type in the entry's mode and a\n // link's target as its content, for the server to refuse by name: never followed, never\n // read.\n const target = entry.isSymbolicLink() ? await fs.readlink(abs).catch(() => \"\") : \"\";\n files[name] = [strToU8(target), { os: UNIX_HOST, attrs: specialMode(entry) << 16 }];\n continue;\n }\n const size = (await fs.stat(abs)).size;\n if (size > MAX_FILE_BYTES) {\n throw new BenchmarkUploadError({\n kind: \"fileTooLarge\",\n file: name,\n limitBytes: MAX_FILE_BYTES,\n });\n }\n total += size;\n if (total > MAX_TOTAL_BYTES) {\n throw new BenchmarkUploadError({ kind: \"tooLarge\", limitBytes: MAX_TOTAL_BYTES });\n }\n files[name] = new Uint8Array(await fs.readFile(abs));\n }\n };\n await walk(source, \"\");\n const zip = zipSync(files);\n if (zip.byteLength > MAX_ARCHIVE_BYTES) throw zipTooLarge();\n return zip;\n}\n"],"mappings":";;;;;;;;;;AAgBA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,SAAS,SAAS,eAA8B;AAqBzC,IAAM,uBAAN,cAAmC,MAAM;AAAA,EAC9C,YAAqB,SAAiC;AACpD,UAAM,mCAAmC,QAAQ,IAAI,EAAE;AADpC;AAEnB,SAAK,OAAO;AAAA,EACd;AAAA,EAHqB;AAIvB;AAGA,IAAM,YAAY;AAGlB,SAAS,YAAY,OAAuB;AAC1C,MAAI,MAAM,eAAe,EAAG,QAAO;AACnC,MAAI,MAAM,SAAS,EAAG,QAAO;AAC7B,MAAI,MAAM,cAAc,EAAG,QAAO;AAClC,MAAI,MAAM,kBAAkB,EAAG,QAAO;AACtC,SAAO;AACT;AAGA,SAAS,OAAO,GAAW,GAAmB;AAC5C,SAAO,EAAE,OAAO,EAAE,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,IAAI;AACtD;AAOA,eAAsB,oBAAoB,QAAqC;AAC7E,MAAI;AACJ,MAAI;AACF,WAAO,MAAM,GAAG,KAAK,MAAM;AAAA,EAC7B,SAAS,OAAO;AACd,QAAK,MAAgC,SAAS,UAAU;AACtD,YAAM,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAAA,IACpD;AACA,UAAM;AAAA,EACR;AACA,QAAM,cAAc,MAClB,IAAI,qBAAqB,EAAE,MAAM,eAAe,YAAY,kBAAkB,CAAC;AACjF,MAAI,KAAK,OAAO,GAAG;AACjB,QAAI,KAAK,OAAO,kBAAmB,OAAM,YAAY;AACrD,WAAO,IAAI,WAAW,MAAM,GAAG,SAAS,MAAM,CAAC;AAAA,EACjD;AACA,MAAI,CAAC,KAAK,YAAY,EAAG,OAAM,IAAI,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE/E,QAAM,QAAkB,CAAC;AACzB,MAAI,QAAQ;AACZ,MAAI,QAAQ;AACZ,QAAM,OAAO,OAAO,KAAa,WAAkC;AACjE,UAAM,UAAU,MAAM,GAAG,QAAQ,KAAK,EAAE,eAAe,KAAK,CAAC;AAC7D,eAAW,SAAS,QAAQ,KAAK,MAAM,GAAG;AACxC,YAAM,MAAM,KAAK,KAAK,KAAK,MAAM,IAAI;AACrC,YAAM,OAAO,GAAG,MAAM,GAAG,MAAM,IAAI;AACnC,UAAI,MAAM,YAAY,GAAG;AACvB,cAAM,KAAK,KAAK,GAAG,IAAI,GAAG;AAC1B;AAAA,MACF;AACA,eAAS;AACT,UAAI,QAAQ,6BAA6B;AACvC,cAAM,IAAI,qBAAqB;AAAA,UAC7B,MAAM;AAAA,UACN,OAAO;AAAA,QACT,CAAC;AAAA,MACH;AACA,UAAI,CAAC,MAAM,OAAO,GAAG;AAInB,cAAM,SAAS,MAAM,eAAe,IAAI,MAAM,GAAG,SAAS,GAAG,EAAE,MAAM,MAAM,EAAE,IAAI;AACjF,cAAM,IAAI,IAAI,CAAC,QAAQ,MAAM,GAAG,EAAE,IAAI,WAAW,OAAO,YAAY,KAAK,KAAK,GAAG,CAAC;AAClF;AAAA,MACF;AACA,YAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,GAAG;AAClC,UAAI,OAAO,gBAAgB;AACzB,cAAM,IAAI,qBAAqB;AAAA,UAC7B,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,QACd,CAAC;AAAA,MACH;AACA,eAAS;AACT,UAAI,QAAQ,iBAAiB;AAC3B,cAAM,IAAI,qBAAqB,EAAE,MAAM,YAAY,YAAY,gBAAgB,CAAC;AAAA,MAClF;AACA,YAAM,IAAI,IAAI,IAAI,WAAW,MAAM,GAAG,SAAS,GAAG,CAAC;AAAA,IACrD;AAAA,EACF;AACA,QAAM,KAAK,QAAQ,EAAE;AACrB,QAAM,MAAM,QAAQ,KAAK;AACzB,MAAI,IAAI,aAAa,kBAAmB,OAAM,YAAY;AAC1D,SAAO;AACT;","names":[]}
@@ -0,0 +1,63 @@
1
+ import {
2
+ HttpError,
3
+ badRequest
4
+ } from "./chunk-Q4ON2L6E.js";
5
+
6
+ // src/services/skill-import-limits.ts
7
+ import { unzipSync } from "fflate";
8
+ var MAX_ARCHIVE_BYTES = 14 * 1024 * 1024;
9
+ var MAX_ARCHIVE_FILES = 200;
10
+ var MAX_FILE_BYTES = 5 * 1024 * 1024;
11
+ var MAX_TOTAL_BYTES = 20 * 1024 * 1024;
12
+ var MAX_BENCHMARK_ARCHIVE_FILES = 1e3;
13
+ function assertSafeEntryPath(name) {
14
+ if (name.includes("\\")) throw badRequest(`Invalid zip entry path (backslash): ${name}`);
15
+ if (name.startsWith("/") || /^[A-Za-z]:/.test(name)) {
16
+ throw badRequest(`Invalid zip entry path (absolute): ${name}`);
17
+ }
18
+ if (name.split("/").some((segment) => segment === "..")) {
19
+ throw badRequest(`Invalid zip entry path (traversal): ${name}`);
20
+ }
21
+ }
22
+ function unzipBounded(archive, limits = {}) {
23
+ const maxFiles = limits.maxFiles ?? MAX_ARCHIVE_FILES;
24
+ const tooLarge = limits.tooLarge ?? badRequest;
25
+ let files = 0;
26
+ let declared = 0;
27
+ return unzipSync(archive, {
28
+ filter: ({ name, originalSize }) => {
29
+ if (name.endsWith("/")) return true;
30
+ files += 1;
31
+ if (files > maxFiles) {
32
+ throw tooLarge(`The zip archive exceeds the ${maxFiles}-file limit.`);
33
+ }
34
+ if (originalSize > MAX_FILE_BYTES) {
35
+ throw tooLarge(`Zip entry exceeds the 5MB uncompressed limit: ${name}`);
36
+ }
37
+ declared += originalSize;
38
+ if (declared > MAX_TOTAL_BYTES) {
39
+ throw tooLarge("The zip archive exceeds the 20MB uncompressed limit.");
40
+ }
41
+ return true;
42
+ }
43
+ });
44
+ }
45
+ function skillTooLarge() {
46
+ return new HttpError(
47
+ 413,
48
+ "skill_too_large",
49
+ `Skill directory exceeds the archive limits (${MAX_ARCHIVE_FILES} files, 5MB per file, 20MB total).`
50
+ );
51
+ }
52
+
53
+ export {
54
+ MAX_ARCHIVE_BYTES,
55
+ MAX_ARCHIVE_FILES,
56
+ MAX_FILE_BYTES,
57
+ MAX_TOTAL_BYTES,
58
+ MAX_BENCHMARK_ARCHIVE_FILES,
59
+ assertSafeEntryPath,
60
+ unzipBounded,
61
+ skillTooLarge
62
+ };
63
+ //# sourceMappingURL=chunk-54E64LWB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/services/skill-import-limits.ts"],"sourcesContent":["/**\n * Caps shared by every path that pulls Skill files in from outside the library — the archive\n * upload/download routes and the directory import. One set of numbers, so a limit raised for one\n * entry point cannot quietly leave another behind, and one message, so the failure reads the same\n * wherever the user hit it. `unzipBounded` is where they are enforced on the way in, since an\n * archive can only be bounded before it is inflated. The Benchmark package archive\n * (benchmark-archive.ts) shares them all but the file count.\n *\n * The CLI loads this module too, through benchmark-package.ts, to hold a folder it uploads to the\n * same caps: it imports fflate and errors.ts and nothing heavier, and keeps it that way.\n */\nimport { unzipSync } from \"fflate\";\nimport { HttpError, badRequest } from \"../http/errors.js\";\n\n/** Decoded zip cap: aligned with the Agent snapshot import (stays within the 20MB body limit after base64). Shared with the hooks and Benchmark archive routes. */\nexport const MAX_ARCHIVE_BYTES = 14 * 1024 * 1024;\nexport const MAX_ARCHIVE_FILES = 200;\nexport const MAX_FILE_BYTES = 5 * 1024 * 1024;\nexport const MAX_TOTAL_BYTES = 20 * 1024 * 1024;\n\n/**\n * A Benchmark package's file cap. Each case carries its statement's and its rubric's materials,\n * so a package of ten cases outgrows the Skill cap long before it nears the byte caps, which it\n * shares.\n */\nexport const MAX_BENCHMARK_ARCHIVE_FILES = 1000;\n\n/**\n * Validates one zip entry path (zip-slip guard): rejects absolute paths (leading \"/\" or a\n * drive letter), backslashes and any \"..\" segment — a malicious archive must never write\n * outside the target directory. Shared by the Skill, hook and Benchmark archive imports.\n */\nexport function assertSafeEntryPath(name: string): void {\n if (name.includes(\"\\\\\")) throw badRequest(`Invalid zip entry path (backslash): ${name}`);\n if (name.startsWith(\"/\") || /^[A-Za-z]:/.test(name)) {\n throw badRequest(`Invalid zip entry path (absolute): ${name}`);\n }\n if (name.split(\"/\").some((segment) => segment === \"..\")) {\n throw badRequest(`Invalid zip entry path (traversal): ${name}`);\n }\n}\n\n/** What a caller may change about `unzipBounded`'s caps. */\nexport interface UnzipLimits {\n /** Files the archive may hold; MAX_ARCHIVE_FILES when absent. */\n maxFiles?: number;\n /** The error a broken cap throws, given its message; a 400 when absent. */\n tooLarge?: (message: string) => HttpError;\n}\n\n/**\n * `unzipSync` with the caps above enforced from the central directory, before a byte is inflated.\n *\n * They have to be read there, because `unzipSync` allocates a buffer of each entry's declared\n * uncompressed size and inflates into it — so caps measured on what comes back bound nothing.\n * Zeros deflate at roughly 1000:1, which turns the largest archive the route accepts into\n * gigabytes of allocation; and an entry whose header overstates its size hands back a short view\n * onto a buffer of the declared length, passing every after-the-fact byte check outright.\n *\n * Bounding against the declared sizes is sound in the other direction too: the buffer is exactly\n * the declared size and fflate never grows it, so an entry can only ever yield fewer bytes than\n * it claimed. Directory entries carry no content and are left to the caller to filter.\n *\n * Throws the caps as 400s unless `limits.tooLarge` says otherwise, matching the archive route this\n * was factored out of; a corrupt archive still throws whatever fflate throws, for the caller to\n * translate.\n */\nexport function unzipBounded(\n archive: Uint8Array,\n limits: UnzipLimits = {},\n): Record<string, Uint8Array> {\n const maxFiles = limits.maxFiles ?? MAX_ARCHIVE_FILES;\n const tooLarge = limits.tooLarge ?? badRequest;\n let files = 0;\n let declared = 0;\n return unzipSync(archive, {\n filter: ({ name, originalSize }) => {\n if (name.endsWith(\"/\")) return true;\n files += 1;\n if (files > maxFiles) {\n throw tooLarge(`The zip archive exceeds the ${maxFiles}-file limit.`);\n }\n if (originalSize > MAX_FILE_BYTES) {\n throw tooLarge(`Zip entry exceeds the 5MB uncompressed limit: ${name}`);\n }\n declared += originalSize;\n if (declared > MAX_TOTAL_BYTES) {\n throw tooLarge(\"The zip archive exceeds the 20MB uncompressed limit.\");\n }\n return true;\n },\n });\n}\n\nexport function skillTooLarge(): HttpError {\n return new HttpError(\n 413,\n \"skill_too_large\",\n `Skill directory exceeds the archive limits (${MAX_ARCHIVE_FILES} files, 5MB per file, 20MB total).`,\n );\n}\n"],"mappings":";;;;;;AAWA,SAAS,iBAAiB;AAInB,IAAM,oBAAoB,KAAK,OAAO;AACtC,IAAM,oBAAoB;AAC1B,IAAM,iBAAiB,IAAI,OAAO;AAClC,IAAM,kBAAkB,KAAK,OAAO;AAOpC,IAAM,8BAA8B;AAOpC,SAAS,oBAAoB,MAAoB;AACtD,MAAI,KAAK,SAAS,IAAI,EAAG,OAAM,WAAW,uCAAuC,IAAI,EAAE;AACvF,MAAI,KAAK,WAAW,GAAG,KAAK,aAAa,KAAK,IAAI,GAAG;AACnD,UAAM,WAAW,sCAAsC,IAAI,EAAE;AAAA,EAC/D;AACA,MAAI,KAAK,MAAM,GAAG,EAAE,KAAK,CAAC,YAAY,YAAY,IAAI,GAAG;AACvD,UAAM,WAAW,uCAAuC,IAAI,EAAE;AAAA,EAChE;AACF;AA2BO,SAAS,aACd,SACA,SAAsB,CAAC,GACK;AAC5B,QAAM,WAAW,OAAO,YAAY;AACpC,QAAM,WAAW,OAAO,YAAY;AACpC,MAAI,QAAQ;AACZ,MAAI,WAAW;AACf,SAAO,UAAU,SAAS;AAAA,IACxB,QAAQ,CAAC,EAAE,MAAM,aAAa,MAAM;AAClC,UAAI,KAAK,SAAS,GAAG,EAAG,QAAO;AAC/B,eAAS;AACT,UAAI,QAAQ,UAAU;AACpB,cAAM,SAAS,+BAA+B,QAAQ,cAAc;AAAA,MACtE;AACA,UAAI,eAAe,gBAAgB;AACjC,cAAM,SAAS,iDAAiD,IAAI,EAAE;AAAA,MACxE;AACA,kBAAY;AACZ,UAAI,WAAW,iBAAiB;AAC9B,cAAM,SAAS,sDAAsD;AAAA,MACvE;AACA,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;AAEO,SAAS,gBAA2B;AACzC,SAAO,IAAI;AAAA,IACT;AAAA,IACA;AAAA,IACA,+CAA+C,iBAAiB;AAAA,EAClE;AACF;","names":[]}
@@ -1,3 +1,6 @@
1
+ import {
2
+ HttpError
3
+ } from "./chunk-Q4ON2L6E.js";
1
4
  import {
2
5
  sessionTokenHash
3
6
  } from "./chunk-TOOTEEM4.js";
@@ -36,42 +39,50 @@ async function hashPassword(password, cost = SCRYPT_COST) {
36
39
  key.toString("base64")
37
40
  ].join("$");
38
41
  }
39
- async function verifyPassword(password, stored) {
42
+ async function checkPassword(password, stored) {
40
43
  const parts = stored.split("$");
41
- if (parts.length !== 6 || parts[0] !== "scrypt") return false;
44
+ if (parts.length !== 6 || parts[0] !== "scrypt") return "unverifiable";
42
45
  const n = Number(parts[1]);
43
46
  const r = Number(parts[2]);
44
47
  const p = Number(parts[3]);
45
- if (!Number.isInteger(n) || !Number.isInteger(r) || !Number.isInteger(p)) return false;
46
- let salt;
47
- let expected;
48
- try {
49
- salt = Buffer.from(parts[4], "base64");
50
- expected = Buffer.from(parts[5], "base64");
51
- } catch {
52
- return false;
53
- }
54
- if (salt.length === 0 || expected.length === 0) return false;
48
+ if (!Number.isInteger(n) || !Number.isInteger(r) || !Number.isInteger(p)) return "unverifiable";
49
+ const salt = Buffer.from(parts[4], "base64");
50
+ const expected = Buffer.from(parts[5], "base64");
51
+ if (salt.length === 0 || expected.length === 0) return "unverifiable";
55
52
  let actual;
56
53
  try {
57
54
  actual = await scryptAsync(password, salt, expected.length, n, r, p);
58
55
  } catch {
59
- return false;
56
+ return "unverifiable";
60
57
  }
61
- return actual.length === expected.length && timingSafeEqual(actual, expected);
58
+ return timingSafeEqual(actual, expected) ? "match" : "mismatch";
59
+ }
60
+ async function verifyPassword(password, stored) {
61
+ return await checkPassword(password, stored) === "match";
62
+ }
63
+ async function verifyAccountPassword(password, stored, dummyHash, check = checkPassword) {
64
+ const outcome = stored === null ? "unverifiable" : await check(password, stored);
65
+ if (outcome !== "unverifiable") return outcome === "match";
66
+ await check(password, await dummyHash());
67
+ return false;
62
68
  }
63
- var PasswordHasher = class extends Interface() {
69
+ var _PasswordHasher_decorators, _init;
70
+ _PasswordHasher_decorators = [Interface()];
71
+ var PasswordHasher = class {
64
72
  };
65
- var _ScryptHasher_decorators, _init;
73
+ _init = __decoratorStart(null);
74
+ PasswordHasher = __decorateElement(_init, 0, "PasswordHasher", _PasswordHasher_decorators, PasswordHasher);
75
+ __runInitializers(_init, 1, PasswordHasher);
76
+ var _ScryptHasher_decorators, _init2;
66
77
  _ScryptHasher_decorators = [Component()];
67
78
  var ScryptHasher = class {
68
79
  hash(password) {
69
80
  return hashPassword(password, SCRYPT_COST);
70
81
  }
71
82
  };
72
- _init = __decoratorStart(null);
73
- ScryptHasher = __decorateElement(_init, 0, "ScryptHasher", _ScryptHasher_decorators, ScryptHasher);
74
- __runInitializers(_init, 1, ScryptHasher);
83
+ _init2 = __decoratorStart(null);
84
+ ScryptHasher = __decorateElement(_init2, 0, "ScryptHasher", _ScryptHasher_decorators, ScryptHasher);
85
+ __runInitializers(_init2, 1, ScryptHasher);
75
86
 
76
87
  // src/auth/service.ts
77
88
  import { randomBytes as randomBytes3 } from "crypto";
@@ -102,39 +113,6 @@ function tokensEqual(a, b) {
102
113
  return timingSafeEqual2(digest(a), digest(b));
103
114
  }
104
115
 
105
- // src/http/errors.ts
106
- var HttpError = class extends Error {
107
- constructor(status, code, message) {
108
- super(message);
109
- this.status = status;
110
- this.code = code;
111
- this.name = "HttpError";
112
- }
113
- status;
114
- code;
115
- };
116
- function errorBody(code, message) {
117
- return { error: { code, message } };
118
- }
119
- function isMissingCredential(err) {
120
- const message = err instanceof Error ? err.message : String(err);
121
- return /missing credentials|api[_ ]?key/i.test(message);
122
- }
123
- function modelCredentialMissing(modelId) {
124
- return new HttpError(
125
- 400,
126
- "model_credential_missing",
127
- `Model ${modelId} has no API key yet. Configure it on the Models page first.`
128
- );
129
- }
130
- function handleError(err, c) {
131
- if (err instanceof HttpError) {
132
- return c.json(errorBody(err.code, err.message), err.status);
133
- }
134
- console.error(`[server] Unhandled exception: ${err.stack ?? err.message}`);
135
- return c.json(errorBody("internal", "Internal server error."), 500);
136
- }
137
-
138
116
  // src/auth/service.ts
139
117
  import { Component as Component2, Use, Interface as Interface2 } from "@prismshadow/penguin-core/kernel";
140
118
  var MIN_PASSWORD_LENGTH = 8;
@@ -157,19 +135,21 @@ function toUserInfo(row) {
157
135
  createdAt: row.createdAt
158
136
  };
159
137
  }
160
- var _hasher_dec, _clock_dec, _config_dec, _provisioner_dec, _state_dec, _authSessions_dec, _users_dec, _AuthService_decorators, _init2;
138
+ var _hasher_dec, _clock_dec, _config_dec, _provisioner_dec, _state_dec, _authSessions_dec, _users_dec, _AuthService_decorators, _init3;
161
139
  _AuthService_decorators = [Component2()], _users_dec = [Use()], _authSessions_dec = [Use()], _state_dec = [Use()], _provisioner_dec = [Use()], _config_dec = [Use()], _clock_dec = [Use()], _hasher_dec = [Use()];
162
140
  var AuthService = class {
163
141
  constructor() {
164
- __publicField(this, "users", __runInitializers(_init2, 8, this)), __runInitializers(_init2, 11, this);
165
- __publicField(this, "authSessions", __runInitializers(_init2, 12, this)), __runInitializers(_init2, 15, this);
166
- __publicField(this, "state", __runInitializers(_init2, 16, this)), __runInitializers(_init2, 19, this);
167
- __publicField(this, "provisioner", __runInitializers(_init2, 20, this)), __runInitializers(_init2, 23, this);
168
- __publicField(this, "config", __runInitializers(_init2, 24, this)), __runInitializers(_init2, 27, this);
169
- __publicField(this, "clock", __runInitializers(_init2, 28, this)), __runInitializers(_init2, 31, this);
170
- __publicField(this, "hasher", __runInitializers(_init2, 32, this)), __runInitializers(_init2, 35, this);
142
+ __publicField(this, "users", __runInitializers(_init3, 8, this)), __runInitializers(_init3, 11, this);
143
+ __publicField(this, "authSessions", __runInitializers(_init3, 12, this)), __runInitializers(_init3, 15, this);
144
+ __publicField(this, "state", __runInitializers(_init3, 16, this)), __runInitializers(_init3, 19, this);
145
+ __publicField(this, "provisioner", __runInitializers(_init3, 20, this)), __runInitializers(_init3, 23, this);
146
+ __publicField(this, "config", __runInitializers(_init3, 24, this)), __runInitializers(_init3, 27, this);
147
+ __publicField(this, "clock", __runInitializers(_init3, 28, this)), __runInitializers(_init3, 31, this);
148
+ __publicField(this, "hasher", __runInitializers(_init3, 32, this)), __runInitializers(_init3, 35, this);
171
149
  /** Consecutive login failures per userId (see the throttling comment on the constants). */
172
150
  __publicField(this, "loginFailures", /* @__PURE__ */ new Map());
151
+ /** Cache for loginDummyHash. */
152
+ __publicField(this, "dummyHash", null);
173
153
  }
174
154
  /** Session lifetime, for the cookie that must expire WITH the session, not before it. */
175
155
  get sessionTtlMs() {
@@ -251,6 +231,16 @@ var AuthService = class {
251
231
  adminPasswordIsInitial() {
252
232
  return this.users.findById(ADMIN_USER_ID)?.passwordIsInitial === true;
253
233
  }
234
+ /**
235
+ * The hash a sign-in with no account to check is verified against (verifyAccountPassword), so
236
+ * it costs what a wrong password costs. Made by this server's own hasher, hence at the cost its
237
+ * real hashes carry, from a random password nobody holds; computed on the first such sign-in
238
+ * and kept.
239
+ */
240
+ async loginDummyHash() {
241
+ this.dummyHash ??= await this.hasher.hash(randomBytes3(18).toString("base64url"));
242
+ return this.dummyHash;
243
+ }
254
244
  /** The wait imposed after `failures` consecutive failures (0 while within the free attempts). */
255
245
  loginDelayMs(failures) {
256
246
  const excess = failures - LOGIN_FREE_ATTEMPTS;
@@ -274,7 +264,11 @@ var AuthService = class {
274
264
  }
275
265
  }
276
266
  const row = this.users.findById(userId);
277
- const ok = row !== null && await verifyPassword(password, row.passwordHash);
267
+ const ok = await verifyAccountPassword(
268
+ password,
269
+ row?.passwordHash ?? null,
270
+ () => this.loginDummyHash()
271
+ );
278
272
  if (!row || !ok) {
279
273
  this.loginFailures.set(userId, {
280
274
  failures: (failed?.failures ?? 0) + 1,
@@ -286,6 +280,16 @@ var AuthService = class {
286
280
  this.authSessions.deleteExpired(this.clock.now().toISOString());
287
281
  return { user: toUserInfo(row), token: this.issueSession(row.userId, "password") };
288
282
  }
283
+ /**
284
+ * Whether a user is an admin, by id — for a caller that has a user's NAME rather than an
285
+ * authenticated request: the terminal relay reads the owner out of a pty reference the
286
+ * runtime has already matched against the signed-in user (machines/terminal-relay.ts), and
287
+ * what is left to decide is whether that user may reach machines at all. Unknown users are
288
+ * not admins.
289
+ */
290
+ isAdmin(userId) {
291
+ return this.users.findById(userId)?.isAdmin === true;
292
+ }
289
293
  /**
290
294
  * Desktop-mode sign-in: an admin session with no password check — the claim route already
291
295
  * redeemed the shell's one-shot token, which is the credential here. Throws only on a
@@ -378,6 +382,19 @@ var AuthService = class {
378
382
  const via = session.via === "desktop" ? "desktop" : session.via === "setup" ? "setup" : "password";
379
383
  return { user, via, renewed };
380
384
  }
385
+ /**
386
+ * Whether the session behind a cookie token still exists and has not expired — the same
387
+ * two facts {@link authenticateWithMeta} establishes, without its sliding renewal or its
388
+ * user lookup. A connection that outlives the request that opened it has to re-ask
389
+ * periodically (the SSE heartbeat does, once per beat), and asking through the renewing
390
+ * path would top the expiry up every time: a window nobody has touched since last week
391
+ * would stay signed in purely because it is still connected.
392
+ */
393
+ sessionIsLive(token) {
394
+ const session = this.authSessions.findByTokenHash(sessionTokenHash(token));
395
+ if (!session) return false;
396
+ return Date.parse(session.expiresAt) > this.clock.now().getTime();
397
+ }
381
398
  issueSession(userId, via) {
382
399
  return this.authSessions.issue({
383
400
  userId,
@@ -387,25 +404,25 @@ var AuthService = class {
387
404
  }).token;
388
405
  }
389
406
  };
390
- _init2 = __decoratorStart(null);
391
- __decorateElement(_init2, 5, "users", _users_dec, AuthService);
392
- __decorateElement(_init2, 5, "authSessions", _authSessions_dec, AuthService);
393
- __decorateElement(_init2, 5, "state", _state_dec, AuthService);
394
- __decorateElement(_init2, 5, "provisioner", _provisioner_dec, AuthService);
395
- __decorateElement(_init2, 5, "config", _config_dec, AuthService);
396
- __decorateElement(_init2, 5, "clock", _clock_dec, AuthService);
397
- __decorateElement(_init2, 5, "hasher", _hasher_dec, AuthService);
398
- AuthService = __decorateElement(_init2, 0, "AuthService", _AuthService_decorators, AuthService);
399
- __runInitializers(_init2, 1, AuthService);
400
- var InitialProjectProvisioner = class extends Interface2() {
407
+ _init3 = __decoratorStart(null);
408
+ __decorateElement(_init3, 5, "users", _users_dec, AuthService);
409
+ __decorateElement(_init3, 5, "authSessions", _authSessions_dec, AuthService);
410
+ __decorateElement(_init3, 5, "state", _state_dec, AuthService);
411
+ __decorateElement(_init3, 5, "provisioner", _provisioner_dec, AuthService);
412
+ __decorateElement(_init3, 5, "config", _config_dec, AuthService);
413
+ __decorateElement(_init3, 5, "clock", _clock_dec, AuthService);
414
+ __decorateElement(_init3, 5, "hasher", _hasher_dec, AuthService);
415
+ AuthService = __decorateElement(_init3, 0, "AuthService", _AuthService_decorators, AuthService);
416
+ __runInitializers(_init3, 1, AuthService);
417
+ var _InitialProjectProvisioner_decorators, _init4;
418
+ _InitialProjectProvisioner_decorators = [Interface2()];
419
+ var InitialProjectProvisioner = class {
401
420
  };
421
+ _init4 = __decoratorStart(null);
422
+ InitialProjectProvisioner = __decorateElement(_init4, 0, "InitialProjectProvisioner", _InitialProjectProvisioner_decorators, InitialProjectProvisioner);
423
+ __runInitializers(_init4, 1, InitialProjectProvisioner);
402
424
 
403
425
  export {
404
- HttpError,
405
- errorBody,
406
- isMissingCredential,
407
- modelCredentialMissing,
408
- handleError,
409
426
  mintApiToken,
410
427
  storeApiToken,
411
428
  hashPassword,
@@ -418,4 +435,4 @@ export {
418
435
  AuthService,
419
436
  InitialProjectProvisioner
420
437
  };
421
- //# sourceMappingURL=chunk-3I2XOPJB.js.map
438
+ //# sourceMappingURL=chunk-5Z4UCHDB.js.map