superfactory 0.0.0-stage → 0.4.30

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 (308) hide show
  1. package/README.md +34 -2
  2. package/THIRD-PARTY-NOTICES.md +27604 -0
  3. package/bin/superfactory.js +57 -0
  4. package/cli/agent-rf446fr1.js +2 -0
  5. package/cli/agent-state-wv62c1td.js +2 -0
  6. package/cli/bin-0cvfmkhh.js +33 -0
  7. package/cli/bin-0t68hf99.js +3 -0
  8. package/cli/bin-19vpzq7g.js +4 -0
  9. package/cli/bin-37w316c6.js +3 -0
  10. package/cli/bin-3dsqxzbz.js +3 -0
  11. package/cli/bin-4j0jjd8g.js +3 -0
  12. package/cli/bin-4tdqjbbd.js +229 -0
  13. package/cli/bin-4zvje4sn.js +502 -0
  14. package/cli/bin-674kd343.js +7 -0
  15. package/cli/bin-8jdkg4ke.js +3 -0
  16. package/cli/bin-d99yte0j.js +5 -0
  17. package/cli/bin-fgvkq9cq.js +867 -0
  18. package/cli/bin-fkp3j5f3.js +3 -0
  19. package/cli/bin-fypan1f6.js +951 -0
  20. package/cli/bin-gg19acwr.js +4 -0
  21. package/cli/bin-ghp5x0x5.js +139 -0
  22. package/cli/bin-gk00mnmn.js +5 -0
  23. package/cli/bin-gne2w036.js +29 -0
  24. package/cli/bin-grxzwpe8.js +3 -0
  25. package/cli/bin-h57gajkz.js +8 -0
  26. package/cli/bin-mbpvzx2b.js +8 -0
  27. package/cli/bin-nnq8kd9z.js +4 -0
  28. package/cli/bin-ven2efjq.js +3 -0
  29. package/cli/bin-yqb1d1mw.js +22 -0
  30. package/cli/bin-z5b3tt05.js +20 -0
  31. package/cli/bin-za1by1n5.js +3 -0
  32. package/cli/bin-zpfe0pxz.js +1 -0
  33. package/cli/bin.js +3 -0
  34. package/cli/child-agent-qgeqvs03.js +4 -0
  35. package/cli/connect-chn8pxyf.js +2 -0
  36. package/cli/container-j6zr9gww.js +4 -0
  37. package/cli/dev-gsaehf19.js +7 -0
  38. package/cli/health-nqzge5kh.js +2 -0
  39. package/cli/home-lock-5seng0k3.js +2 -0
  40. package/cli/host-7dfjhf0z.js +1507 -0
  41. package/cli/index-1wseh1tm.js +2 -0
  42. package/cli/index-axfe8zef.js +2 -0
  43. package/cli/index-s9pw90xe.js +2 -0
  44. package/cli/install-17r8t45e.js +2 -0
  45. package/cli/join-551zg7yr.js +31 -0
  46. package/cli/local-server-2smsafvg.js +2 -0
  47. package/cli/machine-zfjmpw7h.js +2 -0
  48. package/cli/main-0mxhd968.js +33 -0
  49. package/cli/main-53qmhxmd.js +303 -0
  50. package/cli/move-to-xrr2b135.js +2 -0
  51. package/cli/npm-package.json +1 -0
  52. package/cli/pair-phone-070c9ztt.js +5 -0
  53. package/cli/prompt-psc4drtd.js +2 -0
  54. package/cli/reached-vwzx2cdg.js +2 -0
  55. package/cli/sessions-bm4mk37y.js +3 -0
  56. package/cli/sf-cli-s42gkp0b.js +2 -0
  57. package/cli/sf-db-r8f1a20b.js +23 -0
  58. package/cli/sf-deploy-wqaa4fdm.js +21 -0
  59. package/cli/sf-pr-rg3q3tn6.js +13 -0
  60. package/cli/sf-test-pff158qc.js +10 -0
  61. package/cli/tart-isolation-wr3xwfmw.js +3 -0
  62. package/cli/tray-4rr0y1dv.png +0 -0
  63. package/cli/tray-mac-offline-89dva0gs.png +0 -0
  64. package/cli/tray-mac-paused-hq3a1cxv.png +0 -0
  65. package/cli/tray-mac-tvtavf0g.png +0 -0
  66. package/cli/tray-offline-xj6b5ta4.png +0 -0
  67. package/cli/tray-paused-6pzdv5ze.png +0 -0
  68. package/cli/vm-keeper-p0ggcw3z.js +3 -0
  69. package/package.json +50 -4
  70. package/plugins/sf-video-review/.claude-plugin/plugin.json +17 -0
  71. package/plugins/sf-video-review/.mcp.json +9 -0
  72. package/plugins/sf-video-review/dist/video-review.mjs +135 -0
  73. package/plugins/sf-video-review/skills/video-review/SKILL.md +65 -0
  74. package/plugins/sf-video-studio/.claude-plugin/plugin.json +17 -0
  75. package/plugins/sf-video-studio/.mcp.json +19 -0
  76. package/plugins/sf-video-studio/dist/demo-video.mjs +139 -0
  77. package/plugins/sf-video-studio/dist/narration-voice.mjs +134 -0
  78. package/plugins/sf-video-studio/dist/video-generation.mjs +131 -0
  79. package/plugins/sf-video-studio/fonts/DejaVuSansMono-Bold.ttf +0 -0
  80. package/plugins/sf-video-studio/fonts/DejaVuSansMono.ttf +0 -0
  81. package/plugins/sf-video-studio/fonts/LICENSE-DejaVu +187 -0
  82. package/plugins/sf-video-studio/hooks/hooks.json +17 -0
  83. package/plugins/sf-video-studio/hooks/no-robot-voice.sh +77 -0
  84. package/plugins/sf-video-studio/kokoro/package-lock.json +1137 -0
  85. package/plugins/sf-video-studio/kokoro/package.json +11 -0
  86. package/plugins/sf-video-studio/skills/demo-video/SKILL.md +101 -0
  87. package/plugins/sf-video-studio/skills/narration-voice/SKILL.md +49 -0
  88. package/plugins/sf-video-studio/skills/video-generation/SKILL.md +30 -0
  89. package/server/dist/account.js +3 -0
  90. package/server/dist/backup-process.js +2 -0
  91. package/server/dist/backup.js +3 -0
  92. package/server/dist/chunk-0tbq288f.js +3055 -0
  93. package/server/dist/chunk-18n7tr66.js +3 -0
  94. package/server/dist/chunk-1kgfrgmv.js +3 -0
  95. package/server/dist/chunk-1rnmxaav.js +209 -0
  96. package/server/dist/chunk-26zhqbyn.js +25 -0
  97. package/server/dist/chunk-34mn2zj2.js +2 -0
  98. package/server/dist/chunk-3psgsw9t.js +2 -0
  99. package/server/dist/chunk-8zbwppny.js +391 -0
  100. package/server/dist/chunk-9pn7q001.js +3 -0
  101. package/server/dist/chunk-9y7a9gkf.js +2 -0
  102. package/server/dist/chunk-bhm6jzch.js +8 -0
  103. package/server/dist/chunk-dbzjsqvb.js +17 -0
  104. package/server/dist/chunk-fxn504n0.js +2 -0
  105. package/server/dist/chunk-g6pwaap3.js +2 -0
  106. package/server/dist/chunk-gefgv8rg.js +7 -0
  107. package/server/dist/chunk-jg8b833v.js +2 -0
  108. package/server/dist/chunk-jy148bhn.js +3 -0
  109. package/server/dist/chunk-ky4nz39j.js +7 -0
  110. package/server/dist/chunk-mbd1y9qk.js +2 -0
  111. package/server/dist/chunk-neyhk32g.js +13 -0
  112. package/server/dist/chunk-nrz953bx.js +2 -0
  113. package/server/dist/chunk-padvv31s.js +2 -0
  114. package/server/dist/chunk-q1s2ez77.js +3 -0
  115. package/server/dist/chunk-q403h2bh.js +10 -0
  116. package/server/dist/chunk-t64r6enn.js +4 -0
  117. package/server/dist/chunk-vccappg7.js +59 -0
  118. package/server/dist/chunk-vj60fbhw.js +2 -0
  119. package/server/dist/chunk-xj26rwda.js +3 -0
  120. package/server/dist/chunk-xyw98jst.js +5 -0
  121. package/server/dist/main.js +43 -0
  122. package/server/dist/move.js +3 -0
  123. package/server/drizzle/pg/0000_baseline.sql +632 -0
  124. package/server/drizzle/pg/0001_transcripts_packed.sql +2 -0
  125. package/server/drizzle/pg/0002_vm_server_origin.sql +1 -0
  126. package/server/drizzle/pg/0003_reached_machines.sql +1 -0
  127. package/server/drizzle/pg/0004_link_records.sql +2 -0
  128. package/server/drizzle/pg/0005_task_columns.sql +7 -0
  129. package/server/drizzle/pg/0006_task_bundle.sql +3 -0
  130. package/server/drizzle/pg/0007_server_log.sql +9 -0
  131. package/server/drizzle/pg/0008_notification_pauses.sql +6 -0
  132. package/server/drizzle/pg/0009_vm_replaces.sql +1 -0
  133. package/server/drizzle/pg/0010_question_told_once.sql +10 -0
  134. package/server/drizzle/pg/0011_node_next_key.sql +3 -0
  135. package/server/drizzle/pg/0012_task_work.sql +8 -0
  136. package/server/drizzle/pg/0013_task_secret_grants.sql +9 -0
  137. package/server/drizzle/pg/0014_node_paused.sql +2 -0
  138. package/server/drizzle/pg/0015_ssh_machines.sql +19 -0
  139. package/server/drizzle/pg/0016_node_wake.sql +1 -0
  140. package/server/drizzle/pg/0017_node_uninstall_key.sql +1 -0
  141. package/server/drizzle/pg/0018_release_starts.sql +6 -0
  142. package/server/drizzle/pg/0019_session_memory.sql +7 -0
  143. package/server/drizzle/pg/meta/_journal.json +146 -0
  144. package/server/drizzle/sqlite/0000_pre_drizzle_schema.sql +351 -0
  145. package/server/drizzle/sqlite/0001_cluster.sql +36 -0
  146. package/server/drizzle/sqlite/0002_task_records.sql +22 -0
  147. package/server/drizzle/sqlite/0003_indexes.sql +12 -0
  148. package/server/drizzle/sqlite/0004_project_machines.sql +19 -0
  149. package/server/drizzle/sqlite/0005_session_events.sql +7 -0
  150. package/server/drizzle/sqlite/0006_task_platforms.sql +8 -0
  151. package/server/drizzle/sqlite/0007_session_event_tags.sql +7 -0
  152. package/server/drizzle/sqlite/0008_sprints.sql +7 -0
  153. package/server/drizzle/sqlite/0009_project_vms.sql +19 -0
  154. package/server/drizzle/sqlite/0010_server_repairs.sql +4 -0
  155. package/server/drizzle/sqlite/0011_drop_todos.sql +2 -0
  156. package/server/drizzle/sqlite/0012_hypervisors.sql +14 -0
  157. package/server/drizzle/sqlite/0013_manager_leads.sql +2 -0
  158. package/server/drizzle/sqlite/0014_session_text.sql +35 -0
  159. package/server/drizzle/sqlite/0015_vm_resize_machine_instructions_access.sql +22 -0
  160. package/server/drizzle/sqlite/0016_tunnel.sql +23 -0
  161. package/server/drizzle/sqlite/0017_session_secret_grants.sql +7 -0
  162. package/server/drizzle/sqlite/0018_https.sql +18 -0
  163. package/server/drizzle/sqlite/0019_secret_grant_runs.sql +1 -0
  164. package/server/drizzle/sqlite/0020_session_transcripts.sql +16 -0
  165. package/server/drizzle/sqlite/0021_claude_signed_out.sql +2 -0
  166. package/server/drizzle/sqlite/0022_machine_disabled.sql +1 -0
  167. package/server/drizzle/sqlite/0023_machine_access_granted_by.sql +1 -0
  168. package/server/drizzle/sqlite/0024_machine_vms.sql +27 -0
  169. package/server/drizzle/sqlite/0025_machine_tunnel_fallback.sql +1 -0
  170. package/server/drizzle/sqlite/0026_tunnel_peer_linked.sql +3 -0
  171. package/server/drizzle/sqlite/0027_tunnel_upgrade_grace.sql +2 -0
  172. package/server/drizzle/sqlite/0028_dialed_machines.sql +2 -0
  173. package/server/drizzle/sqlite/0029_node_link.sql +3 -0
  174. package/server/drizzle/sqlite/0030_sprint_calendar.sql +1 -0
  175. package/server/drizzle/sqlite/0031_transcripts_packed.sql +2 -0
  176. package/server/drizzle/sqlite/0032_vm_server_origin.sql +1 -0
  177. package/server/drizzle/sqlite/meta/_journal.json +237 -0
  178. package/server/src/account.ts +2 -0
  179. package/server/src/backup.ts +2 -0
  180. package/server/src/features/backups/backup-process.ts +2 -0
  181. package/server/src/main.ts +2 -0
  182. package/server/src/move.ts +2 -0
  183. package/ui/dist/_expo/static/css/global-d378e211074d97e633bc15418ccf57d4.css +2 -0
  184. package/ui/dist/_expo/static/css/xterm-8a7c4e0dca731c11dbe6bdff98fb667c.css +1 -0
  185. package/ui/dist/_expo/static/js/web/Network-f300a5960620f5029c91c06cae29dba5.js +3 -0
  186. package/ui/dist/_expo/static/js/web/[...rest]-9e454d985f211f5c983f42bec15b6ad9.js +1 -0
  187. package/ui/dist/_expo/static/js/web/[managerId]-2580b90e8d862ad66197eecb1dc04a12.js +1 -0
  188. package/ui/dist/_expo/static/js/web/[managerId]-39308153b42eed025c0abb9242ae6c71.js +1 -0
  189. package/ui/dist/_expo/static/js/web/[managerId]-8b7a94ec818e50a371b6b2750b73df6a.js +1 -0
  190. package/ui/dist/_expo/static/js/web/[managerId]-ac3a14c7607e4576d7e6c39c1014bcaf.js +1 -0
  191. package/ui/dist/_expo/static/js/web/[managerId]-e8549b2313a119437c373e30207518c0.js +1 -0
  192. package/ui/dist/_expo/static/js/web/[ref]-9b46f1ec4348f980e9838b68d47c34bf.js +2 -0
  193. package/ui/dist/_expo/static/js/web/[sessionId]-09e376674fb8b3edc4ae8aa9b3a189d7.js +1 -0
  194. package/ui/dist/_expo/static/js/web/[sessionId]-0e5fdba25c9f78220cea4cb66227743d.js +1 -0
  195. package/ui/dist/_expo/static/js/web/[sessionId]-104af3c3885009e6a8d204b6fd6e2c3a.js +1 -0
  196. package/ui/dist/_expo/static/js/web/[sessionId]-863a34ca3835b469134ddbc4ebc6fafc.js +1 -0
  197. package/ui/dist/_expo/static/js/web/[taskId]-1218e1dd3ecf175ffb7701fc886d62c9.js +1 -0
  198. package/ui/dist/_expo/static/js/web/[taskId]-31a48c7017dbd096f8ece9dc102a9762.js +1 -0
  199. package/ui/dist/_expo/static/js/web/[taskId]-a56cf85bcfd14f2d6b5d4180ea17e8d7.js +1 -0
  200. package/ui/dist/_expo/static/js/web/[taskId]-f2a157b3cb676b3c5d04c8eadfe90cdd.js +1 -0
  201. package/ui/dist/_expo/static/js/web/__common-1ad58e53e08528a67b99f53a1690b669.js +2078 -0
  202. package/ui/dist/_expo/static/js/web/__expo-metro-runtime-1f8f5d3ca6b7f58204d51e14506d73fb.js +5 -0
  203. package/ui/dist/_expo/static/js/web/_layout-057457e97e0af20433ed41b39cb5e809.js +1 -0
  204. package/ui/dist/_expo/static/js/web/_layout-2a7d73d5356823e1f7d2dab23e440d09.js +7 -0
  205. package/ui/dist/_expo/static/js/web/_layout-42e6a6b7855655d456015ce41aefdd39.js +1 -0
  206. package/ui/dist/_expo/static/js/web/_layout-a5e5a5b2fb3bfbfcc2914131976679e7.js +1 -0
  207. package/ui/dist/_expo/static/js/web/_layout-b2cbba92506f66815a5d744fd7cd5d8c.js +1 -0
  208. package/ui/dist/_expo/static/js/web/_layout-b4d13dc52bbcb65b18b4e52813d53883.js +198 -0
  209. package/ui/dist/_expo/static/js/web/_layout-fb0f75b354800de2e1582dc963f5c148.js +1 -0
  210. package/ui/dist/_expo/static/js/web/index-41299a961569cc8e5410ec53ba2b87c4.js +4 -0
  211. package/ui/dist/_expo/static/js/web/index-6c2bb0d3b6d00c5c007a663e9f4ce108.js +1 -0
  212. package/ui/dist/_expo/static/js/web/index-70484f7d2769d9ae01dac1fdb22aef1d.js +14 -0
  213. package/ui/dist/_expo/static/js/web/index-7d764cb7cefe0a217728c24d44990057.js +14 -0
  214. package/ui/dist/_expo/static/js/web/index-a5eb3d0c6aa4c483674beb5de428634c.js +12 -0
  215. package/ui/dist/_expo/static/js/web/index-b1c2543003cba86eeb3abfa4d21fd8da.js +14 -0
  216. package/ui/dist/_expo/static/js/web/index-d200aded5448966e5e05d9ccb77b56a4.js +5 -0
  217. package/ui/dist/_expo/static/js/web/index-ea43f51ceec4a981c942fc6dce9cedc4.js +2378 -0
  218. package/ui/dist/_expo/static/js/web/index-efa68d817a7febbf8c0163303bf4cd49.js +29 -0
  219. package/ui/dist/_expo/static/js/web/licenses-30f8c0555f7f4d434a68ee4706fa433d.js +1 -0
  220. package/ui/dist/_expo/static/js/web/pair-3f6f72208023894f43f4f07db5116cca.js +1 -0
  221. package/ui/dist/_expo/static/js/web/rich-markdown-editor-dea9c0f7c0306da4146e54ee44cce173.js +228 -0
  222. package/ui/dist/_expo/static/js/web/sign-in-67d2a0c00232e0e6f40efade1a83dc4b.js +4 -0
  223. package/ui/dist/_expo/static/js/web/terminal-view-32db8e6f8a21dd073f6a310862d36db8.js +90 -0
  224. package/ui/dist/apple-touch-icon.png +0 -0
  225. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/100Thin/GeistMono_100Thin.95eed4519d8c395e41b3b837ca97edea.ttf +0 -0
  226. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/100Thin_Italic/GeistMono_100Thin_Italic.2e50fb9a43d70ceb4925a2c54502097c.ttf +0 -0
  227. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/200ExtraLight/GeistMono_200ExtraLight.0714ea94ac265d76bc16698dd1808599.ttf +0 -0
  228. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/200ExtraLight_Italic/GeistMono_200ExtraLight_Italic.107f2670e94507223548f1d38eb14087.ttf +0 -0
  229. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/300Light/GeistMono_300Light.d6a3533adfd5834dd9f68ee37faa1e2d.ttf +0 -0
  230. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/300Light_Italic/GeistMono_300Light_Italic.09420cdceda8d1f1612daceae1e4890e.ttf +0 -0
  231. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/400Regular/GeistMono_400Regular.3656dcb247d3a6cd141f7601c2101125.ttf +0 -0
  232. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/400Regular_Italic/GeistMono_400Regular_Italic.88343c321b266476ad3bc56735cc6ac7.ttf +0 -0
  233. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/500Medium/GeistMono_500Medium.a298cd61aebdb709299e2a7deb73ed93.ttf +0 -0
  234. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/500Medium_Italic/GeistMono_500Medium_Italic.e149441dd9360bd7dbffeb1de9aa1685.ttf +0 -0
  235. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/600SemiBold/GeistMono_600SemiBold.cae945cb3b6156e396a1008b6252af21.ttf +0 -0
  236. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/600SemiBold_Italic/GeistMono_600SemiBold_Italic.e939ba436795ee2f0a379e7271bb957d.ttf +0 -0
  237. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/700Bold/GeistMono_700Bold.7fcc8478bc1dcadc865d97626ba3206b.ttf +0 -0
  238. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/700Bold_Italic/GeistMono_700Bold_Italic.8cc57ff1f3c45e7ed84e74853c141e06.ttf +0 -0
  239. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/800ExtraBold/GeistMono_800ExtraBold.b09b5457204e06ea7bacff03f0880065.ttf +0 -0
  240. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/800ExtraBold_Italic/GeistMono_800ExtraBold_Italic.0b4dd8c1b0e6d8791ea34c8f1417edfd.ttf +0 -0
  241. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/900Black/GeistMono_900Black.9ec025adf049c8a476588eeac81a36e4.ttf +0 -0
  242. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/900Black_Italic/GeistMono_900Black_Italic.8dfe24b2fef43fb3d535316e2412be7d.ttf +0 -0
  243. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/100Thin/HankenGrotesk_100Thin.2d9c9415d97b66fb3bbca06b538f11d8.ttf +0 -0
  244. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/100Thin_Italic/HankenGrotesk_100Thin_Italic.5ad53da9f1ff702f55cf870763a159ff.ttf +0 -0
  245. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/200ExtraLight/HankenGrotesk_200ExtraLight.2cae1a1078b5af081aff084011b07522.ttf +0 -0
  246. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/200ExtraLight_Italic/HankenGrotesk_200ExtraLight_Italic.5d4eff887cdb33164b4fba2066c687e3.ttf +0 -0
  247. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/300Light/HankenGrotesk_300Light.2be9fd730ff95b91631e3f99bc449709.ttf +0 -0
  248. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/300Light_Italic/HankenGrotesk_300Light_Italic.4ae6910889ffdf69093da607b369b0a8.ttf +0 -0
  249. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/400Regular/HankenGrotesk_400Regular.2e544d6119b4e635f6cc5a47800523bb.ttf +0 -0
  250. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/400Regular_Italic/HankenGrotesk_400Regular_Italic.ed9d322cffe9e614205ce9512f144834.ttf +0 -0
  251. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/500Medium/HankenGrotesk_500Medium.a822d33614b51eb05478e0e29cf757f3.ttf +0 -0
  252. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/500Medium_Italic/HankenGrotesk_500Medium_Italic.bc71c45237e12974e52335b615fab7da.ttf +0 -0
  253. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/600SemiBold/HankenGrotesk_600SemiBold.b016ff502f15ce9b59c453304c74fb48.ttf +0 -0
  254. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/600SemiBold_Italic/HankenGrotesk_600SemiBold_Italic.94428d43b74e372dc47910fd4fc6b552.ttf +0 -0
  255. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/700Bold/HankenGrotesk_700Bold.14d2af6df606492d846389d2108dae50.ttf +0 -0
  256. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/700Bold_Italic/HankenGrotesk_700Bold_Italic.d075966aaf26126d8aaac0802735e310.ttf +0 -0
  257. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/800ExtraBold/HankenGrotesk_800ExtraBold.b419489745bc870b4e4288e969945f31.ttf +0 -0
  258. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/800ExtraBold_Italic/HankenGrotesk_800ExtraBold_Italic.ea7ac4778026e067a5d637f4a494b2d2.ttf +0 -0
  259. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/900Black/HankenGrotesk_900Black.55e860e6549b53fa530d9eda7c7518a2.ttf +0 -0
  260. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/900Black_Italic/HankenGrotesk_900Black_Italic.dcad6f722a66aae93f70a72604112754.ttf +0 -0
  261. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/200ExtraLight/Newsreader_200ExtraLight.1ee07dc260606863f8bf8101308d85f2.ttf +0 -0
  262. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/200ExtraLight_Italic/Newsreader_200ExtraLight_Italic.52c51abab458715d1205b8732b55735f.ttf +0 -0
  263. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/300Light/Newsreader_300Light.bf0dfa126654b01f65e1c53a4507ec12.ttf +0 -0
  264. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/300Light_Italic/Newsreader_300Light_Italic.03190fe46aa9b7083610981ac13b10f3.ttf +0 -0
  265. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/400Regular/Newsreader_400Regular.b1d919187d5645f84124ef065868ba9e.ttf +0 -0
  266. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/400Regular_Italic/Newsreader_400Regular_Italic.f7b81d92eb42d85de96b6dc1c72d2c36.ttf +0 -0
  267. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/500Medium/Newsreader_500Medium.df89e83cfd4e37176dda53076a01b3b7.ttf +0 -0
  268. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/500Medium_Italic/Newsreader_500Medium_Italic.fb45099c4fb3c395e8f12e181475230c.ttf +0 -0
  269. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/600SemiBold/Newsreader_600SemiBold.20bce29dc5180892ce1fbf4a563737a0.ttf +0 -0
  270. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/600SemiBold_Italic/Newsreader_600SemiBold_Italic.93e2816e201fa363d3289e741f757ff0.ttf +0 -0
  271. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/700Bold/Newsreader_700Bold.bf7c54edbd2afe9b289d5da777f489e9.ttf +0 -0
  272. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/700Bold_Italic/Newsreader_700Bold_Italic.e2f5e5260513d7d4f9f3edbdcbc9f43f.ttf +0 -0
  273. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/800ExtraBold/Newsreader_800ExtraBold.702211ca77927e4c276b28169dc3694c.ttf +0 -0
  274. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/800ExtraBold_Italic/Newsreader_800ExtraBold_Italic.9b9eacc7d72e5152e692cb144ef7a9fd.ttf +0 -0
  275. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png +0 -0
  276. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png +0 -0
  277. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png +0 -0
  278. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png +0 -0
  279. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png +0 -0
  280. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/drawer/toggle-drawer-icon.ae74bb20586a731af545e6b00fe14a09.png +0 -0
  281. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png +0 -0
  282. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png +0 -0
  283. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png +0 -0
  284. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png +0 -0
  285. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png +0 -0
  286. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png +0 -0
  287. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png +0 -0
  288. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png +0 -0
  289. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png +0 -0
  290. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png +0 -0
  291. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png +0 -0
  292. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png +0 -0
  293. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png +0 -0
  294. package/ui/dist/favicon.ico +0 -0
  295. package/ui/dist/favicon.svg +10 -0
  296. package/ui/dist/icon-192.png +0 -0
  297. package/ui/dist/icon-512.png +0 -0
  298. package/ui/dist/index.html +45 -0
  299. package/ui/dist/legal/privacy-policy.md +174 -0
  300. package/ui/dist/legal/terms-of-use.md +76 -0
  301. package/ui/dist/load-again.js +42 -0
  302. package/ui/dist/manifest.webmanifest +12 -0
  303. package/ui/dist/metadata.json +1 -0
  304. package/ui/dist/sounds/bell.wav +0 -0
  305. package/ui/dist/sounds/chime.wav +0 -0
  306. package/ui/dist/sounds/knock.wav +0 -0
  307. package/ui/dist/sounds/pop.wav +0 -0
  308. package/ui/dist/sw.js +121 -0
@@ -0,0 +1,25 @@
1
+ // @bun
2
+ import{i,s,w,Ce,Ve,Je,zt,rt,V,Ku,W,qe,N,me,y,v}from"./chunk-1rnmxaav.js";function ur(e){return i`count(${e||i.raw("*")})`.mapWith(Number)}var{user:d,passkey:k}=y,Gf="This account used an authenticator app, which Superfactory no longer supports. Sign in with a passkey, or ask the server owner to unlock it.",rl=(e,t)=>qe(`passkeys:${t}`,async()=>v(await e.select({n:ur()}).from(k).where(s(k.userId,t)))?.n??0);async function Kf(e,t){return v(await e.select({on:d.twoFactorEnabled}).from(d).where(s(d.id,t)))?.on===!0&&await rl(e,t)===0}async function Hi(e){let t=await e.select({id:d.id,name:d.name}).from(d).where(s(d.twoFactorEnabled,!0)).orderBy(d.createdAt);return(await Promise.all(t.map(async(r)=>await rl(e,r.id)===0?r:null))).filter((r)=>r!==null)}async function Xo(e,t){await e.update(d).set({twoFactorEnabled:!1}).where(s(d.id,t))}var A=160,P=500,I=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,T=/\b[a-z0-9][a-z0-9-]*-[0-9a-f]{6}\b/g,O=/\b(?=[0-9a-f]*\d)[0-9a-f]{7,64}\b/gi;function g(e){return e.replace(/ at [^ ]+ \(.*$/s,"").replace(/ \((?:top|the most now): [^)]*\)/g,"").replace(T,"<machine>").replace(I,"#").replace(O,"#").replace(/\d+/g,"#").replace(/\s+/g," ").trim().slice(0,A)}function ea(e){N.info("failure",{...e,text:e.text.slice(0,P)})}var E=/(\d+) (of this project's tasks|sessions) are at work \((?:Settings \u203A Agents \u203A Tasks running at once|its Sessions at once): (\d+)\)/,D=/authenticat|log ?in\b|logged in|oauth/i;function F(e){switch(e.type){case"login_failed":return{kind:`Claude refused a session's login: ${g(e.reason)}`,text:e.reason,severity:"error"};case"result":{if(e.outcome!=="error")return;let t=e.error??"";if(D.test(t))return;return{kind:`A Claude turn failed: ${g(t||"no reason given")}`,text:t||"no reason given",severity:"warn"}}case"error":return{kind:`A session's error: ${g(e.message)}`,text:e.message,severity:"error"};case"notice":return L(e);default:return}}function L(e){let{kind:t,text:n,level:r}=e;switch(t){case"fresh_start":return{kind:"A session's earlier conversation can't go on: it started a new one",text:n,severity:"warn"};case"stalled":return{kind:"A session's turn stalled: no progress for minutes",text:n,severity:"warn"};case"stuck":return{kind:"A task is stuck: no progress on two status checks",text:n,severity:"warn"};case"queued":{let a=E.exec(n);if(!a||Number(a[1])<=Number(a[3]))return;return{kind:`More of ${a[2]==="sessions"?"a machine's sessions":"a project's tasks"} at work than its limit lets`,text:n,severity:"error"}}case"important":return;default:return r==="error"?{kind:`${q(t)}: ${g(n)}`,text:n,severity:"error"}:void 0}}var q=(e)=>e==="not_started"?"A session couldn't start":e==="claude_exited"?"A session's Claude exited":`A session's ${e.replace(/_/g," ")}`;function M(e){if(e.state!=="failed")return;let t=e.error?.trim()||"no reason given";return{source:"session",kind:`A session failed: ${g(t)}`,text:t,severity:"error",...m(e)}}var m=(e)=>({nodeId:e.nodeId,projectId:e.projectId,taskId:e.taskId,sessionId:e.id,account:e.claudeAccount?.name}),S=/^- \d{4}-\d{2}-\d{2}(?:[ T][\d:]+Z?)?: /,R=/\s*\(\d+ times, last [^)]*\)\s*$/,J=[{match:/^PR #\d+ couldn't merge: /,kind:"A merge failed",strip:!0},{match:/^GitHub: .*\b(failed|refused|couldn't|can't)\b/i,kind:""},{match:/\bsetup\b.*\bfailed\b/i,kind:"A project's setup failed"},{match:/^Couldn't start\b/,kind:"A session couldn't start"}];function Q(e){let t=e.replace(S,"").replace(R,""),n=J.find((a)=>a.match.test(t));if(!n)return;let r=g(n.strip?t.replace(n.match,""):t);return{kind:n.kind?`${n.kind}: ${r}`:r,text:t}}function Wf(e,t,n){let r=new Set((t?.notes??"").split(`
3
+ `));return e.notes.split(`
4
+ `).filter((a)=>!r.has(a)&&S.test(a)).flatMap((a)=>{let u=Q(a);if(!u)return[];let l={nodeId:n,projectId:e.projectId,taskId:e.id};return[{source:"task",...u,severity:"warn",...l}]})}function _(e,t,n){if(t.endsWith("refused")||!/(denied|failed|\.refuse)$/.test(t))return;if(t.startsWith("test."))return;return{source:"audit",kind:`Audited ${t}`,text:`${t}${n?` ${n}`:""} by ${e}`,severity:"warn",...e.startsWith("node:")?{nodeId:e.slice(5)}:{}}}var b=5,j=86400000,C=5000;class au{emit;now;lastSeq=new Map;starts=new Map;failed=new Map;constructor(e=ea,t=()=>Date.now()){this.emit=e;this.now=t}onEvent(e,t){if((this.lastSeq.get(e.id)??-1)>=t.seq)return;p(this.lastSeq,e.id,t.seq);let n=F(t);if(n)this.emit({source:"session",...n,...m(e)});if(t.type==="state"&&t.state==="starting")this.started(e)}onSession(e){let t=M(e);if(!t||this.failed.get(e.id)===t.text)return;p(this.failed,e.id,t.text),this.emit(t)}started(e){let t=this.now(),n=[...(this.starts.get(e.id)??[]).filter((a)=>t-a<j),t];if(p(this.starts,e.id,n),n.length<=b)return;let r=e.taskId?`${e.projectId}/${e.taskId}'s session`:`a ${e.kind} session`;this.emit({source:"session",kind:`A session started again and again (more than ${b} times in a day)`,text:`${r} started ${n.length} times in 24 h`,severity:"warn",...m(e)})}}function p(e,t,n){if(e.delete(t),e.set(t,n),e.size>C)e.delete(e.keys().next().value)}import{createHash as z}from"crypto";class ta{values=new Map;hits=new Map;live(e){let t=this.values.get(e);if(t&&t.expiresAt>Date.now())return t;this.values.delete(e);return}async put(e,t,n,r){let a=Date.now();if(this.values.size>1e4){for(let[u,l]of this.values)if(l.expiresAt<=a)this.values.delete(u)}this.values.set(`${e}:${t}`,{value:JSON.stringify(n),expiresAt:a+r})}async claim(e,t,n,r){if(this.live(`${e}:${t}`))return!1;return await this.put(e,t,n,r),!0}async get(e,t){let n=this.live(`${e}:${t}`);return n?JSON.parse(n.value):void 0}async take(e,t){let n=await this.get(e,t);return this.values.delete(`${e}:${t}`),n}async update(e,t,n){let r=this.live(`${e}:${t}`);if(r)r.value=JSON.stringify(n);return r!==void 0}async delete(e,t){this.values.delete(`${e}:${t}`)}async deleteIf(e,t,n){if(this.live(`${e}:${t}`)?.value!==JSON.stringify(n))return!1;return this.values.delete(`${e}:${t}`)}async all(e){let t=`${e}:`;return[...this.values.keys()].filter((n)=>n.startsWith(t)&&this.live(n)).map((n)=>({key:n.slice(t.length),value:JSON.parse(this.values.get(n)?.value??"null")}))}async hit(e,t){let n=Date.now();if(this.hits.size>1e4){for(let[a,u]of this.hits)if(u.resetAt<=n)this.hits.delete(a)}let r=this.hits.get(e);if(!r||r.resetAt<=n){let a={count:1,resetAt:n+t};return this.hits.set(e,a),{...a}}return r.count++,{...r}}}class cu{sql;constructor(e){this.sql=e}async put(e,t,n,r){await this.sql`
5
+ insert into cluster_ephemeral (kind, key, value, expires_at)
6
+ values (${e}, ${t}, ${JSON.stringify(n)}, now() + ${`${r} milliseconds`}::interval)
7
+ on conflict (kind, key) do update set value = excluded.value, expires_at = excluded.expires_at`}async claim(e,t,n,r){return(await this.sql`
8
+ insert into cluster_ephemeral (kind, key, value, expires_at)
9
+ values (${e}, ${t}, ${JSON.stringify(n)}, now() + ${`${r} milliseconds`}::interval)
10
+ on conflict (kind, key) do update set value = excluded.value, expires_at = excluded.expires_at
11
+ where cluster_ephemeral.expires_at <= now()
12
+ returning key`).length>0}async get(e,t){let[n]=await this.sql`
13
+ select value from cluster_ephemeral where kind = ${e} and key = ${t} and expires_at > now()`;return n?JSON.parse(n.value):void 0}async take(e,t){let[n]=await this.sql`
14
+ delete from cluster_ephemeral where kind = ${e} and key = ${t} and expires_at > now() returning value`;return n?JSON.parse(n.value):void 0}async update(e,t,n){return(await this.sql`
15
+ update cluster_ephemeral set value = ${JSON.stringify(n)}
16
+ where kind = ${e} and key = ${t} and expires_at > now() returning key`).length>0}async delete(e,t){await this.sql`delete from cluster_ephemeral where kind = ${e} and key = ${t}`}async deleteIf(e,t,n){return(await this.sql`
17
+ delete from cluster_ephemeral
18
+ where kind = ${e} and key = ${t} and value::jsonb = ${JSON.stringify(n)}::text::jsonb returning key`).length>0}async all(e){return(await this.sql`
19
+ select key, value from cluster_ephemeral where kind = ${e} and expires_at > now()`).map((n)=>({key:n.key,value:JSON.parse(n.value)}))}async hit(e,t){let n=`${t} milliseconds`,[r]=await this.sql`
20
+ insert into cluster_hits (key, count, reset_at) values (${e}, 1, now() + ${n}::interval)
21
+ on conflict (key) do update set
22
+ count = case when cluster_hits.reset_at <= now() then 1 else cluster_hits.count + 1 end,
23
+ reset_at = case when cluster_hits.reset_at <= now() then now() + ${n}::interval else cluster_hits.reset_at end
24
+ returning count, (extract(epoch from reset_at) * 1000)::float8 as reset_at`;return{count:r.count,resetAt:r.reset_at}}async sweep(){await this.sql`delete from cluster_ephemeral where expires_at <= now()`,await this.sql`delete from cluster_hits where reset_at <= now()`}}var{audit:o}=y,H=3600000;class Tn{db;ephemeral;agentIdOf;constructor(e,t=new ta){this.db=e;this.ephemeral=t}knowSessions(e){this.agentIdOf=e}async callerOf(e){if(!e||typeof e!=="object")return;let{by:t,sessionId:n}=e,r=typeof n==="string"&&n?n:typeof t==="string"&&t?t:"";if(!r)return;let a=await this.agentIdOf?.(r).catch(()=>{return});return{sessionId:r,...a?{agent:a}:{}}}async refused(e,t,n){let r=z("sha256").update(JSON.stringify([t,n??null])).digest("base64url"),{count:a}=await this.ephemeral.hit(`link-refused:${e}:${r}`,H);if(a===1)await this.write(`node:${e}`,"link.refused",t,n);else me.refusals.inc({action:"link.refused"})}async write(e,t,n,r){if(t.endsWith("refused")){let a=await this.callerOf(r);if(a)r={...r,...a};N.warn("refused",{actor:e,action:t,target:n,...a}),me.refusals.inc({action:t})}else{let a=_(e,t,n);if(a)ea(a)}await this.db.insert(o).values({at:new Date().toISOString(),actor:e,action:t,target:n??null,detail:r??null})}async happened(e,t){return(await this.db.select({id:o.id}).from(o).where(w(s(o.action,e),s(o.target,t))).limit(1)).length>0}async lastOf(e,t){return(await this.db.select({action:o.action,detail:o.detail}).from(o).where(w(s(o.target,e),Ce(...t.map((r)=>s(o.action,r))))).orderBy(V(o.id)).limit(1))[0]}async list(e,t,n={}){return(await this.db.select().from(o).where(w(Je(o.id,t??2147483647),...U(n))).orderBy(V(o.id)).limit(e)).map((a)=>({...a,detail:a.detail===null?null:JSON.stringify(a.detail)}))}async read(e,t){let n=Math.min(e.limit??100,Ku),r=await this.db.select().from(o).where(w(...B(e))).orderBy(V(o.id)).limit(n+1),a=(u)=>W(u,t);return{entries:r.slice(0,n).map((u)=>({id:u.id,at:u.at,actor:a(u.actor),action:u.action,target:u.target===null?null:a(u.target),detail:u.detail===null?null:a(JSON.stringify(u.detail))})),more:r.length>n}}}var X=["nodeId","machine","node"],h=(e)=>e.replace(/[\\%_]/g,(t)=>`\\${t}`);function B({projectId:e,node:t,actions:n,from:r,to:a,beforeId:u}){let l=[],f=(c,x)=>i`${c} like ${x} escape '\\'`;if(e)l.push(Ce(s(o.target,e),f(o.target,`${h(e)}/%`),i`${o.detail}->>'projectId' = ${e}`));if(t)l.push(Ce(s(o.actor,`node:${t}`),s(o.target,t),f(o.target,`${h(t)}/%`),...X.map((c)=>i`${o.detail}->>${c} = ${t}`)));if(n?.length)l.push(Ce(...n.map((c)=>Ce(s(o.action,c),f(o.action,`${h(c)}.%`)))));if(r)l.push(Ve(o.at,r));if(a)l.push(zt(o.at,a));if(u)l.push(Je(o.id,u));return l}var G=(e)=>`%${e.toLowerCase().replace(/[\\%_]/g,(t)=>`\\${t}`)}%`;function U({text:e,refused:t,leads:n}){let r=[];if(e){let a=G(e),u=(l)=>i`lower(${l}) like ${a} escape '\\'`;r.push(Ce(u(o.actor),u(o.action),u(o.target)))}if(t)r.push(rt(o.action,"%refused"));if(n)r.push(i`${o.detail}->>'as' is not null`);return r}
25
+ export{ur,Gf,rl,Kf,Hi,Xo,ea,Wf,au,ta,cu,Tn};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Vn,Ao,Ey,Nd,_y}from"./chunk-9pn7q001.js";import"./chunk-q403h2bh.js";import"./chunk-1rnmxaav.js";import"./chunk-1kgfrgmv.js";export{Ao as BUNDLED_ROWS,Vn as MOVED,_y as deliverKeys,Ey as exportBundle,Nd as verifiedManifest};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-gefgv8rg.js";import{Yd,Ty}from"./chunk-dbzjsqvb.js";import"./chunk-neyhk32g.js";import"./chunk-bhm6jzch.js";export{Yd as createKyselyAdapter,Ty as kyselyAdapter};